Restructure language files
This commit is contained in:
16
lib/User.php
16
lib/User.php
@@ -107,7 +107,7 @@ class User extends PhpObject {
|
||||
|
||||
if($iUserId > 0) {
|
||||
//Just log user in
|
||||
$sDesc = 'lang:nl_email_exists';
|
||||
$sDesc = 'lang:newsletter.email_exists';
|
||||
$bSuccess = true;
|
||||
}
|
||||
else {
|
||||
@@ -118,9 +118,9 @@ class User extends PhpObject {
|
||||
array('email')
|
||||
);
|
||||
|
||||
if($iUserId==0) $sDesc = 'lang:error_commit_db';
|
||||
if($iUserId==0) $sDesc = 'lang:error.commit_db';
|
||||
else {
|
||||
$sDesc = 'lang:nl_subscribed';
|
||||
$sDesc = 'lang:newsletter.subscribed';
|
||||
$bSuccess = true;
|
||||
}
|
||||
}
|
||||
@@ -150,16 +150,16 @@ class User extends PhpObject {
|
||||
if($bSelf || $this->checkUserClearance(self::CLEARANCE_ADMIN)) {
|
||||
if($this->getUserId() > 0) {
|
||||
$iUserId = $this->oDb->updateRow(self::USER_TABLE, $iUserId, array('active' => self::USER_INACTIVE));
|
||||
if($iUserId==0) $sDesc = 'lang:error_commit_db';
|
||||
if($iUserId==0) $sDesc = 'lang:error.commit_db';
|
||||
else {
|
||||
$sDesc = 'lang:nl_unsubscribed';
|
||||
$sDesc = 'lang:newsletter.unsubscribed';
|
||||
if($bSelf) $this->updateCookie(-60 * 60); //Set Cookie in the past, deleting it
|
||||
$bSuccess = true;
|
||||
}
|
||||
}
|
||||
else $sDesc = 'lang:nl_unknown_email';
|
||||
else $sDesc = 'lang:newsletter.unknown_email';
|
||||
}
|
||||
else $sDesc = 'lang:no_auth';
|
||||
else $sDesc = 'lang:error.no_auth';
|
||||
|
||||
return Spot::getResult($bSuccess, $sDesc);
|
||||
}
|
||||
@@ -196,7 +196,7 @@ class User extends PhpObject {
|
||||
if(!in_array($iClearance, self::CLEARANCES)) $sDesc = 'Setting wrong clearance "'.$iClearance.'" to user ID "'.$iUserId.'"';
|
||||
else {
|
||||
$iUserId = $this->oDb->updateRow(self::USER_TABLE, $iUserId, array('clearance'=>$iClearance));
|
||||
if(!$iUserId) $sDesc = 'lang:error_commit_db';
|
||||
if(!$iUserId) $sDesc = 'lang:error.commit_db';
|
||||
else $bSuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user