Commit c421c016da2084f4165403053b24379bd56d02b5
1 parent
c67341ed
KTS-1687
"Double quote to single quote conversion" Fixed. Reviewed by: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6233 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
16 additions
and
16 deletions
lib/authentication/builtinauthenticationprovider.inc.php
| ... | ... | @@ -29,10 +29,10 @@ require_once(KT_LIB_DIR . '/authentication/Authenticator.inc'); |
| 29 | 29 | require_once(KT_LIB_DIR . '/authentication/DBAuthenticator.inc'); |
| 30 | 30 | |
| 31 | 31 | class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider { |
| 32 | - var $sNamespace = "ktcore.authentication.builtin"; | |
| 32 | + var $sNamespace = 'ktcore.authentication.builtin'; | |
| 33 | 33 | |
| 34 | 34 | function KTBuiltinAuthenticationProvider() { |
| 35 | - $this->sName = _kt("Built-in authentication provider"); | |
| 35 | + $this->sName = _kt('Built-in authentication provider'); | |
| 36 | 36 | parent::KTAuthenticationProvider(); |
| 37 | 37 | } |
| 38 | 38 | |
| ... | ... | @@ -45,7 +45,7 @@ class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider { |
| 45 | 45 | function showUserSource($oUser, $oSource) { |
| 46 | 46 | $sQuery = sprintf('action=editUserSource&user_id=%d', $oUser->getId()); |
| 47 | 47 | $sUrl = KTUtil::addQueryString($_SERVER['PHP_SELF'], $sQuery); |
| 48 | - return '<p class="descriptiveText"><a href="' . $sUrl . '">' . sprintf(_kt("Change %s's password"), $oUser->getName()) . '</a></p>'; | |
| 48 | + return '<p class="descriptiveText"><a href="' . $sUrl . '">' . sprintf(_kt('Change %s\'s password'), $oUser->getName()) . '</a></p>'; | |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | function do_editUserSource() { |
| ... | ... | @@ -55,7 +55,7 @@ class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider { |
| 55 | 55 | |
| 56 | 56 | function editUserSource_main() { |
| 57 | 57 | $this->oPage->setBreadcrumbDetails(_kt('Change User Password')); |
| 58 | - $this->oPage->setTitle(_kt("Change User Password")); | |
| 58 | + $this->oPage->setTitle(_kt('Change User Password')); | |
| 59 | 59 | |
| 60 | 60 | $user_id = KTUtil::arrayGet($_REQUEST, 'user_id'); |
| 61 | 61 | $oUser =& User::get($user_id); |
| ... | ... | @@ -68,11 +68,11 @@ class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider { |
| 68 | 68 | $edit_fields = array(); |
| 69 | 69 | $edit_fields[] = new KTPasswordWidget(_kt('Password'), _kt('Specify an initial password for the user.'), 'password', null, $this->oPage, true); $edit_fields[] = new KTPasswordWidget(_kt('Confirm Password'), _kt('Confirm the password specified above.'), 'confirm_password', null, $this->oPage, true); |
| 70 | 70 | $oTemplating =& KTTemplating::getSingleton(); |
| 71 | - $oTemplate = $oTemplating->loadTemplate("ktcore/principals/updatepassword"); | |
| 71 | + $oTemplate = $oTemplating->loadTemplate('ktcore/principals/updatepassword'); | |
| 72 | 72 | $aTemplateData = array( |
| 73 | - "context" => $this, | |
| 74 | - "edit_fields" => $edit_fields, | |
| 75 | - "edit_user" => $oUser, | |
| 73 | + 'context' => $this, | |
| 74 | + 'edit_fields' => $edit_fields, | |
| 75 | + 'edit_user' => $oUser, | |
| 76 | 76 | ); |
| 77 | 77 | return $oTemplate->render($aTemplateData); |
| 78 | 78 | } |
| ... | ... | @@ -112,7 +112,7 @@ class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider { |
| 112 | 112 | $restrictAdmin = ((bool) $KTConfig->get('user_prefs/restrictAdminPasswords', false)); |
| 113 | 113 | |
| 114 | 114 | if ($restrictAdmin && (strlen($sPassword) < $minLength)) { |
| 115 | - $this->errorRedirectToMain(sprintf(_kt("The password must be at least %d characters long."), $minLength)); | |
| 115 | + $this->errorRedirectToMain(sprintf(_kt('The password must be at least %d characters long.'), $minLength)); | |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | $this->startTransaction(); |
| ... | ... | @@ -160,8 +160,8 @@ class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider { |
| 160 | 160 | |
| 161 | 161 | function verify($oUser) { |
| 162 | 162 | if (isset($_SESSION['mustChangePassword'])) { |
| 163 | - $url = generateControllerUrl("login", "action=providerVerify&type=1"); | |
| 164 | - $this->addErrorMessage(_kt("Your password has expired")); | |
| 163 | + $url = generateControllerUrl('login', 'action=providerVerify&type=1'); | |
| 164 | + $this->addErrorMessage(_kt('Your password has expired')); | |
| 165 | 165 | redirect($url); |
| 166 | 166 | exit(0); |
| 167 | 167 | } |
| ... | ... | @@ -188,7 +188,7 @@ class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider { |
| 188 | 188 | function providerVerify_return() { |
| 189 | 189 | $url = KTUtil::arrayGet($_SESSION, 'providerVerifyReturnUrl'); |
| 190 | 190 | if (empty($url)) { |
| 191 | - $url = generateControllerUrl("login"); | |
| 191 | + $url = generateControllerUrl('login'); | |
| 192 | 192 | } |
| 193 | 193 | redirect($url); |
| 194 | 194 | exit(0); |
| ... | ... | @@ -204,13 +204,13 @@ class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider { |
| 204 | 204 | $minLength = (int) $KTConfig->get('user_prefs/passwordLength', 6); |
| 205 | 205 | |
| 206 | 206 | if (strlen($sPassword) < $minLength) { |
| 207 | - $this->errorRedirectTo('providerVerify', sprintf(_kt("The password must be at least %d characters long."), $minLength)); | |
| 207 | + $this->errorRedirectTo('providerVerify', sprintf(_kt('The password must be at least %d characters long.'), $minLength)); | |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | $sNewMD5 = md5($sPassword); |
| 211 | 211 | $sOldMD5 = $this->oUser->getPassword(); |
| 212 | 212 | if ($sNewMD5 == $sOldMD5) { |
| 213 | - $this->errorRedirectTo('providerVerify', _kt("Can not use the same password as before.")); | |
| 213 | + $this->errorRedirectTo('providerVerify', _kt('Can not use the same password as before.')); | |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | // FIXME more validation would be useful. |
| ... | ... | @@ -264,7 +264,7 @@ class BuiltinAuthenticator extends Authenticator { |
| 264 | 264 | */ |
| 265 | 265 | function getUser($sUserName, $aAttributes) { |
| 266 | 266 | $sTable = KTUtil::getTableName('users'); |
| 267 | - $sQuery = "SELECT ";/*ok*/ | |
| 267 | + $sQuery = 'SELECT ';/*ok*/ | |
| 268 | 268 | $sQuery .= implode(', ', $aAttributes); |
| 269 | 269 | $sQuery .= " FROM $sTable WHERE username = ?"; |
| 270 | 270 | $aParams = array($sUserName); |
| ... | ... | @@ -292,7 +292,7 @@ class BuiltinAuthenticator extends Authenticator { |
| 292 | 292 | */ |
| 293 | 293 | function searchUsers($sUserNameSearch, $aAttributes) { |
| 294 | 294 | $sTable = KTUtil::getTableName('users'); |
| 295 | - $sQuery = "SELECT "; /*ok*/ | |
| 295 | + $sQuery = 'SELECT '; /*ok*/ | |
| 296 | 296 | $sQuery .= implode(', ', $aAttributes); |
| 297 | 297 | $sQuery .= " FROM $sTable where username like '%" . DBUtil::escapeSimple($sUserNameSearch) . "%'"; |
| 298 | 298 | ... | ... |