From df65f87002d31958e8f694e76fb791c4960cf37a Mon Sep 17 00:00:00 2001 From: sakamocchi Date: Wed, 19 Jan 2011 08:53:08 +0000 Subject: [PATCH 1/1] Enforce password checking. Revise the deference between the installed and the latest. Put div element for Microsoft (R) Internet Explore 6. Put some codes for contemporary admin skins. git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@1097 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- utf8/nucleus/libs/ADMIN.php | 51 ++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/utf8/nucleus/libs/ADMIN.php b/utf8/nucleus/libs/ADMIN.php index e91befc..4f63391 100755 --- a/utf8/nucleus/libs/ADMIN.php +++ b/utf8/nucleus/libs/ADMIN.php @@ -1,7 +1,7 @@ _showActivationPage($key, _ERROR_PASSWORDMISSING); + } + + if ($password != $repeatpassword) { return $this->_showActivationPage($key, _ERROR_PASSWORDMISMATCH); - - if ($password && (strlen($password) < 6)) + } + + if (strlen($password) < 6) { return $this->_showActivationPage($key, _ERROR_PASSWORDTOOSHORT); + } - if ($password) { - $pwdvalid = true; - $pwderror = ''; - global $manager; - $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid)); - if (!$pwdvalid) { - return $this->_showActivationPage($key,$pwderror); - } + $pwdvalid = true; + $pwderror = ''; + + global $manager; + $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid)); + + if (!$pwdvalid) { + return $this->_showActivationPage($key,$pwderror); } + $error = ''; $manager->notify('ValidateForm', array('type' => 'activation', 'member' => $mem, 'error' => &$error)); if ($error != '') @@ -4376,7 +4383,7 @@ selector(); "._MESSAGE.": $msg

"; ?> - +
@@ -4423,7 +4430,7 @@ selector(); echo '
' . _SKINEDIT_ALLOWEDTEMPLATESS; $query = 'SELECT tdname as name, tddesc as description FROM '.sql_table('template_desc'); showlist($query,'table',array('content'=>'shortnames')); - echo '
'; + echo '
'; $this->pagefoot(); } @@ -5027,6 +5034,7 @@ selector(); $this->updateConfig('CookiePrefix', postVar('CookiePrefix')); $this->updateConfig('DebugVars', postVar('DebugVars')); $this->updateConfig('DefaultListSize', postVar('DefaultListSize')); + $this->updateConfig('AdminCSS', postVar('AdminCSS')); // load new config and redirect (this way, the new language will be used is necessary) // note that when changing cookie settings, this redirect might cause the user @@ -5243,7 +5251,7 @@ selector(); <?php echo htmlspecialchars($CONF['SiteName'])?> - Admin - + .css" /> @@ -5283,10 +5291,9 @@ selector(); echo 'Nucleus CMS ' . $nucleus['version'] . $codenamestring . ''; $newestVersion = getLatestVersion(); $newestCompare = str_replace('/','.',$newestVersion); - $newestCompare = intval($newestCompare); $currentVersion = str_replace(array('/','v'),array('.',''),$nucleus['version']); if ($newestVersion && version_compare($newestCompare,$currentVersion) > 0) { - echo '
'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT.$newestVersion.''; + echo '
'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT.$newestVersion.''; } } else { echo 'Nucleus CMS ' . $nucleus['version'] . $codenamestring; @@ -5923,9 +5930,9 @@ selector(); } - /** - * @todo document this - */ +/* + * @todo document this + */ function action_pluginlist() { global $member, $manager; @@ -6041,7 +6048,7 @@ selector(); if (($plug->supportsFeature('HelpPage') > 0) && (@file_exists($helpFile))) { @readfile($helpFile); } else { - echo '

Error: ', _ERROR_PLUGNOHELPFILE,'

'; + echo '

' . _ERROR .': ', _ERROR_PLUGNOHELPFILE,'

'; echo '

(',_BACK,')

'; } -- 2.11.0