From: <ru...@us...> - 2010-06-07 10:36:09
|
Revision: 7470 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7470&view=rev Author: rurban Date: 2010-06-07 10:36:03 +0000 (Mon, 07 Jun 2010) Log Message: ----------- Always define GFORGE true or false Do not fail if config/config.php is not writable. This is optional only. Modified Paths: -------------- trunk/lib/IniConfig.php Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2010-06-07 09:47:12 UTC (rev 7469) +++ trunk/lib/IniConfig.php 2010-06-07 10:36:03 UTC (rev 7470) @@ -109,7 +109,7 @@ function IniConfig($file) { - // check config/config.php dump for faster startup + // Optionally check config/config.php dump for faster startup $dump = substr($file, 0, -3)."php"; if (isWindows($dump)) $dump = str_replace("/","\\",$dump); if (file_exists($dump) and is_readable($dump) and filesize($dump) > 0 and sort_file_mtime($dump, $file) < 0) { @@ -203,7 +203,7 @@ 'ENABLE_AUTH_OPENID', 'INSECURE_ACTIONS_LOCALHOST_ONLY', 'ENABLE_MAILNOTIFY', 'ENABLE_RECENTCHANGESBOX', 'ENABLE_PAGE_PUBLIC', 'ENABLE_AJAX', 'ENABLE_EXTERNAL_PAGES', - 'READONLY' + 'READONLY', 'GFORGE' ); $rs = @parse_ini_file($file); @@ -553,10 +553,6 @@ // The question is if reading this is faster then doing IniConfig() + fixup_static_configs() if (is_writable($dump)) { save_dump($dump); - } else { - if (! defined('GFORGE') or !GFORGE) { - die($dump . " is not writable"); - } } // store locale[] in config.php? This is too problematic. fixup_dynamic_configs($file); // [100ms] @@ -624,9 +620,9 @@ .'WantedPages:WatchPage:WhoIsOnline:WikiAdminSelect'); // The GFORGE theme omits them - if (!defined('GFORGE') or !GFORGE) { + if (!GFORGE) { // Add some some action pages depending on configuration - if (defined('DEBUG') and DEBUG) { + if (DEBUG) { $ActionPages[] = 'DebugInfo'; $ActionPages[] = 'EditMetaData'; $ActionPages[] = 'SpellCheck'; // SpellCheck does not work @@ -710,7 +706,7 @@ $AllAllowedPlugins[] = 'YouTube'; // The GFORGE theme omits them - if (!defined('GFORGE') or !GFORGE) { + if (!GFORGE) { $AllAllowedPlugins[] = 'AddComment'; $AllAllowedPlugins[] = 'AnalyseAccessLogSql'; $AllAllowedPlugins[] = 'AsciiMath'; @@ -770,16 +766,16 @@ $AllActionPages[] = 'UserContribs'; // The GFORGE theme omits them - if (!defined('GFORGE') or !GFORGE) { + if (!GFORGE) { // Add some some action pages depending on configuration - if (defined('DEBUG') and DEBUG) { + if (DEBUG) { $AllActionPages[] = 'PhpWikiAdministration/Chmod'; } $AllActionPages[] = 'PhpWikiAdministration/Markup'; } - if (defined('GFORGE') and GFORGE) { - if (defined('ENABLE_EXTERNAL_PAGES') and ENABLE_EXTERNAL_PAGES) { + if (GFORGE) { + if (ENABLE_EXTERNAL_PAGES) { $AllAllowedPlugins[] = 'WikiAdminSetExternal'; $AllActionPages[] = 'ExternalPages'; } @@ -915,7 +911,7 @@ define('DEFAULT_LANGUAGE', ''); // detect from client // Gforge hack - if (!defined('GFORGE') or !GFORGE) { + if (!GFORGE) { // Disable update_locale because Zend Debugger crash if(! extension_loaded('Zend Debugger')) { update_locale(isset($LANG) ? $LANG : DEFAULT_LANGUAGE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |