OSDN Git Service

ADDED: debug info in System info to show if $CONF['ItemURL'] is broken in admin panel...
authorshizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Sat, 14 Mar 2009 03:28:04 +0000 (03:28 +0000)
committershizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Sat, 14 Mar 2009 03:28:04 +0000 (03:28 +0000)
FIXED: Reorder the setting of config vars ($CONF) to avoid notices (should have no side effects)(kaigreve)
FIXED: Avoid notices caused by explode because the string '\\' is not a part of the $val and no array is returned(kaigreve)
FIXED: remove one redundant definition of the constant _MANAGER_PLUGINFILE_NOTFOUND(kaigreve)

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@973 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/documentation/history.html
utf8/nucleus/language/english-utf8.php
utf8/nucleus/language/english.php
utf8/nucleus/libs/ADMIN.php
utf8/nucleus/libs/globalfunctions.php

index dabf466..343d58a 100755 (executable)
                        <li>CHANGED: NP_SkinFilesオプション用言語定義追加(NP_SkinFiles option word update via language file)(shizuki)</li>\r
                        <li>UPDATED: NP_SkinFiles 2.03に差し替え(code:yama/commit:shizuki)(NP_SkinFiles update to 2.03)(code:yama,katsumi/commit:shizuki)</li>\r
                        <li>FIXED: 「General」カテゴリのUPDATE漏れ修正(install.php)(preinstall default category name is not localize)(shizuki)</li>\r
+                       <li>ADDED: debug info in System info to show if $CONF['ItemURL'] is broken in admin panel (admun)</li>\r
+                       <li>FIXED: Reorder the setting of config vars ($CONF) to avoid notices (should have no side effects)(kaigreve)</li>\r
+                       <li>FIXED: Avoid notices caused by explode because the string '\\' is not a part of the $val and no array is returned(kaigreve)</li>\r
+                       <li>FIXED: remove one redundant definition of the constant _MANAGER_PLUGINFILE_NOTFOUND(kaigreve)</li>\r
                        <li>FIXED: bug in showlist.php for displaying plugin dependency. See <a href="http://forum.nucleuscms.org/viewtopic.php?t=18594">Manage Plugins error in Nucleus 3.40</a> (ftruscot, thanks ajmiller)</li>\r
                        <li>FIXED: SQL error in MEMBER::write() where mautosave not forced to be integer. See <a href="http://forum.nucleuscms.org/viewtopic.php?t=18575">Problem with 3.40</a>. (ftruscot)</li>\r
                        <li>CHANGED: Modify Fix SQL error when new blog add by shizuki, to give a default english value for category name, category desc, first item title, and first item body in case where user does not have updated language file. (ftruscot)</li>\r
index bd1afdf..28d9a7e 100644 (file)
@@ -63,7 +63,7 @@ define('_LIST_ITEM_COMMENTS',                                         '%d Comments');
 define('_EDITC_URL',                                                           'Web site');
 define('_EDITC_EMAIL',                                                         'E-mail');
 
-define('_MANAGER_PLUGINFILE_NOTFOUND',                         'Plugin file was not found');
+define('_MANAGER_PLUGINFILE_NOTFOUND',                         'Plugin %s was not loaded (File not found)');
 /* changed */
 // plugin dependency
 define('_ERROR_INSREQPLUGIN',                                          'Plugin installation failed, requires %s');
@@ -279,7 +279,6 @@ define('_GFUNCTIONS_AN_ERROR_OCCURRED',                             'Sorry. An error occurred.');
 define('_GFUNCTIONS_YOU_AERNT_LOGGEDIN',                       "You aren't logged in.");
 
 // MANAGER.php
-define('_MANAGER_PLUGINFILE_NOTFOUND',                         "Plugin %s was not loaded (File not found)");
 define('_MANAGER_PLUGINFILE_NOCLASS',                          "Plugin %s was not loaded (Class not found in file, possible parse error)");
 define('_MANAGER_PLUGINTABLEPREFIX_NOTSUPPORT',                "Plugin %s was not loaded (does not support SqlTablePrefix)");
 
@@ -771,7 +770,7 @@ define('_BACKTOMANAGE',                                                             'Back to Nucleus management');
 
 
 // charset to use
-define('_CHARSET',                                                                     'iso-8859-1');
+define('_CHARSET',                                                                     'UTF-8');
 
 // global stuff
 define('_LOGOUT',                                                                      'Log Out');
index bd1afdf..d595e1d 100755 (executable)
@@ -63,7 +63,7 @@ define('_LIST_ITEM_COMMENTS',                                         '%d Comments');
 define('_EDITC_URL',                                                           'Web site');
 define('_EDITC_EMAIL',                                                         'E-mail');
 
-define('_MANAGER_PLUGINFILE_NOTFOUND',                         'Plugin file was not found');
+define('_MANAGER_PLUGINFILE_NOTFOUND',                         'Plugin %s was not loaded (File not found)');
 /* changed */
 // plugin dependency
 define('_ERROR_INSREQPLUGIN',                                          'Plugin installation failed, requires %s');
@@ -279,7 +279,6 @@ define('_GFUNCTIONS_AN_ERROR_OCCURRED',                             'Sorry. An error occurred.');
 define('_GFUNCTIONS_YOU_AERNT_LOGGEDIN',                       "You aren't logged in.");
 
 // MANAGER.php
-define('_MANAGER_PLUGINFILE_NOTFOUND',                         "Plugin %s was not loaded (File not found)");
 define('_MANAGER_PLUGINFILE_NOCLASS',                          "Plugin %s was not loaded (Class not found in file, possible parse error)");
 define('_MANAGER_PLUGINTABLEPREFIX_NOTSUPPORT',                "Plugin %s was not loaded (does not support SqlTablePrefix)");
 
index 3ff133f..d7d9ec8 100755 (executable)
@@ -5215,6 +5215,9 @@ selector();
                        echo "\t\t" . '<td width="50%">' . '$CONF[' . "'Self']</td>\n";\r
                        echo "\t\t" . '<td>' . $CONF['Self'] . "</td>\n";\r
                        echo "\t</tr><tr>\n";\r
+                       echo "\t\t" . '<td width="50%">' . '$CONF[' . "'ItemURL']</td>\n";\r
+                       echo "\t\t" . '<td>' . $CONF['ItemURL'] . "</td>\n";\r
+                       echo "\t</tr><tr>\n";\r
                        echo "\t\t" . '<td width="50%">' . '$CONF[' . "'alertOnHeadersSent']</td>\n";\r
                        $ohs = $CONF['alertOnHeadersSent'] ?\r
                                                _ADMIN_SYSTEMOVERVIEW_ENABLE :\r
index 7530e72..10d75d6 100755 (executable)
@@ -46,9 +46,10 @@ if ($CONF['debug']) {
                more of the installation files (install.php, install.sql, upgrades/\r
                directory) are still on the server.\r
 */\r
+\r
 $CONF['alertOnHeadersSent']  = 1;\r
 $CONF['alertOnSecurityRisk'] = 1;\r
-$CONF['ItemURL']             = $CONF['Self'];\r
+/*$CONF['ItemURL']             = $CONF['Self'];\r
 $CONF['ArchiveURL']          = $CONF['Self'];\r
 $CONF['ArchiveListURL']      = $CONF['Self'];\r
 $CONF['MemberURL']           = $CONF['Self'];\r
@@ -60,7 +61,7 @@ $CONF['CategoryURL']         = $CONF['Self'];
 // this avoids urls like index.php/item/13/index.php/item/15\r
 if (!isset($CONF['URLMode']) || (($CONF['URLMode'] == 'pathinfo') && (substr($CONF['Self'], strlen($CONF['Self']) - 4) == '.php'))) {\r
        $CONF['URLMode'] = 'normal';\r
-}\r
+}*/\r
 \r
 if (getNucleusPatchLevel() > 0) {\r
        $nucleus['version'] .= '/' . getNucleusPatchLevel();\r
@@ -164,13 +165,27 @@ if (!isset($CONF['Self'])) {
                $CONF['Self'] = substr($CONF['Self'], 0, strlen($CONF['Self']) -1);\r
        }\r
 \r
-       $CONF['ItemURL']        = $CONF['Self'];\r
+/*     $CONF['ItemURL']        = $CONF['Self'];\r
        $CONF['ArchiveURL']     = $CONF['Self'];\r
        $CONF['ArchiveListURL'] = $CONF['Self'];\r
        $CONF['MemberURL']      = $CONF['Self'];\r
        $CONF['SearchURL']      = $CONF['Self'];\r
        $CONF['BlogURL']        = $CONF['Self'];\r
-       $CONF['CategoryURL']    = $CONF['Self'];\r
+       $CONF['CategoryURL']    = $CONF['Self'];*/\r
+}\r
+\r
+$CONF['ItemURL'] = $CONF['Self'];\r
+$CONF['ArchiveURL'] = $CONF['Self'];\r
+$CONF['ArchiveListURL'] = $CONF['Self'];\r
+$CONF['MemberURL'] = $CONF['Self'];\r
+$CONF['SearchURL'] = $CONF['Self'];\r
+$CONF['BlogURL'] = $CONF['Self'];\r
+$CONF['CategoryURL'] = $CONF['Self'];\r
+\r
+// switch URLMode back to normal when $CONF['Self'] ends in .php\r
+// this avoids urls like index.php/item/13/index.php/item/15\r
+if (!isset($CONF['URLMode']) || (($CONF['URLMode'] == 'pathinfo') && (substr($CONF['Self'], strlen($CONF['Self']) - 4) == '.php'))) {\r
+       $CONF['URLMode'] = 'normal';\r
 }\r
 \r
 // automatically use simpler toolbar for mozilla\r
@@ -374,7 +389,7 @@ if ($CONF['URLMode'] == 'pathinfo') {
                $CONF['CategoryKey'] = 'category';\r
        }\r
 \r
-       if ($CONF['SpecialskinKey'] == '') {\r
+       if (!isset($CONF['SpecialskinKey']) || $CONF['SpecialskinKey'] == '') {\r
                $CONF['SpecialskinKey'] = 'special';\r
        }\r
 \r
@@ -1891,7 +1906,9 @@ function sanitizeArray(&$array)
                if (!in_array($key, $excludeListForSanitization)) {\r
 \r
                        // check value\r
-                       @list($val, $tmp) = explode('\\', $val);\r
+                       if (strpos($val, '\\')) {\r
+                               list($val, $tmp) = explode('\\', $val);\r
+                       }\r
 \r
                        // remove control code etc.\r
                        $val = strtr($val, "\0\r\n<>'\"", "       ");\r