From: <var...@us...> - 2012-12-05 19:01:39
|
Revision: 8607 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8607&view=rev Author: vargenau Date: 2012-12-05 19:01:32 +0000 (Wed, 05 Dec 2012) Log Message: ----------- (defined('FUSIONFORGE') and FUSIONFORGE) Modified Paths: -------------- trunk/lib/EditToolbar.php trunk/lib/IniConfig.php trunk/lib/MailNotify.php trunk/lib/PageList.php trunk/lib/PagePerm.php trunk/lib/WikiTheme.php trunk/lib/WikiUserNew.php trunk/lib/loadsave.php trunk/lib/main.php Modified: trunk/lib/EditToolbar.php =================================================================== --- trunk/lib/EditToolbar.php 2012-12-05 18:19:12 UTC (rev 8606) +++ trunk/lib/EditToolbar.php 2012-12-05 19:01:32 UTC (rev 8607) @@ -117,7 +117,7 @@ if (ENABLE_EDIT_TOOLBAR) { $username = $request->_user->UserName(); - if (FUSIONFORGE or DISABLE_MARKUP_WIKIWORD or (!isWikiWord($username))) { + if ((defined('FUSIONFORGE') and FUSIONFORGE) or DISABLE_MARKUP_WIKIWORD or (!isWikiWord($username))) { $username = '[[' . $username . ']]'; } $signature = " ––" . $username . " " . CTime(); @@ -305,7 +305,7 @@ $categories = array(); while ($p = $pages->next()) { $page = $p->getName(); - if (FUSIONFORGE) { + if ((defined('FUSIONFORGE') and FUSIONFORGE)) { $categories[] = "['$page', '%0A----%0A%5B%5B" . $page . "%5D%5D']"; } elseif (DISABLE_MARKUP_WIKIWORD or (!isWikiWord($page))) { $categories[] = "['$page', '%0A%5B" . $page . "%5D']"; Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2012-12-05 18:19:12 UTC (rev 8606) +++ trunk/lib/IniConfig.php 2012-12-05 19:01:32 UTC (rev 8607) @@ -635,7 +635,7 @@ . 'WantedPages:WatchPage:WhoIsOnline:WikiAdminSelect'); // The FUSIONFORGE theme omits them - if (!FUSIONFORGE) { + if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { // Add some some action pages depending on configuration if (DEBUG) { $ActionPages[] = 'DebugInfo'; @@ -726,7 +726,7 @@ $AllAllowedPlugins[] = 'YouTube'; // The FUSIONFORGE theme omits them - if (!FUSIONFORGE) { + if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { $AllAllowedPlugins[] = 'AnalyseAccessLogSql'; $AllAllowedPlugins[] = '_AuthInfo'; $AllAllowedPlugins[] = '_BackendInfo'; @@ -790,7 +790,7 @@ $AllActionPages[] = 'UserContribs'; // The FUSIONFORGE theme omits them - if (!FUSIONFORGE) { + if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { // Add some some action pages depending on configuration if (DEBUG) { $AllActionPages[] = 'PhpWikiAdministration/Chmod'; @@ -798,7 +798,7 @@ $AllActionPages[] = 'PhpWikiAdministration/Markup'; } - if (FUSIONFORGE) { + if ((defined('FUSIONFORGE') and FUSIONFORGE)) { if (ENABLE_EXTERNAL_PAGES) { $AllAllowedPlugins[] = 'WikiAdminSetExternal'; $AllActionPages[] = 'PhpWikiAdministration/SetExternal'; @@ -937,7 +937,7 @@ define('DEFAULT_LANGUAGE', ''); // detect from client // FusionForge hack - if (!FUSIONFORGE) { + if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { // Disable update_locale because Zend Debugger crash if (!extension_loaded('Zend Debugger')) { update_locale(isset($LANG) ? $LANG : DEFAULT_LANGUAGE); Modified: trunk/lib/MailNotify.php =================================================================== --- trunk/lib/MailNotify.php 2012-12-05 18:19:12 UTC (rev 8606) +++ trunk/lib/MailNotify.php 2012-12-05 19:01:32 UTC (rev 8607) @@ -66,7 +66,7 @@ function fromId() { global $request; - if (FUSIONFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { return $request->_user->getId(); } else { return $request->_user->getId() . '@' . $request->get('REMOTE_HOST'); @@ -84,7 +84,7 @@ global $request; // Disable verification of emails for corporate env. - if (FUSIONFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { $doverify = false; } @@ -193,7 +193,7 @@ $encoded_subject = $this->subject_encode($subject); $emails = $this->emails; // Do not send if modification is from FusionForge admin - if (FUSIONFORGE and ($this->fromId() == ADMIN_USER)) { + if ((defined('FUSIONFORGE') and FUSIONFORGE) and ($this->fromId() == ADMIN_USER)) { return true; } if (!$notice) { Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2012-12-05 18:19:12 UTC (rev 8606) +++ trunk/lib/PageList.php 2012-12-05 19:01:32 UTC (rev 8607) @@ -1368,7 +1368,7 @@ trigger_error(sprintf("%s: Bad column", $column), E_USER_NOTICE); return false; } - if (!FUSIONFORGE) { + if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { // FIXME: anon users might rate and see ratings also. // Defer this logic to the plugin. if ($column == 'rating' and !$GLOBALS['request']->_user->isSignedIn()) { Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2012-12-05 18:19:12 UTC (rev 8606) +++ trunk/lib/PagePerm.php 2012-12-05 19:01:32 UTC (rev 8607) @@ -239,7 +239,7 @@ $page = $request->getPage($pagename); // Exceptions: - if (FUSIONFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { if ($pagename != '.' && isset($request->_user->_is_external) && $request->_user->_is_external && !$page->get('external')) { $permcache[$pagename][$access] = 0; return 0; Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2012-12-05 18:19:12 UTC (rev 8606) +++ trunk/lib/WikiTheme.php 2012-12-05 19:01:32 UTC (rev 8607) @@ -215,7 +215,7 @@ return; } $this->addMoreHeaders(JavaScript('', array('src' => $this->_findData("wikicommon.js")))); - if (!FUSIONFORGE) { + if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { // FusionForge already loads this $this->addMoreHeaders(JavaScript('', array('src' => $this->_findData("sortable.js")))); } Modified: trunk/lib/WikiUserNew.php =================================================================== --- trunk/lib/WikiUserNew.php 2012-12-05 18:19:12 UTC (rev 8606) +++ trunk/lib/WikiUserNew.php 2012-12-05 19:01:32 UTC (rev 8607) @@ -595,7 +595,7 @@ { if (!$userid) $userid = $this->_userid; if (!$userid) return false; - if (FUSIONFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { return true; } return preg_match("/^[\-\w\.@ ]+$/U", $userid) and strlen($userid) < 32; @@ -1764,7 +1764,7 @@ function get($name) { // get e-mail address from FusionForge - if (FUSIONFORGE && session_loggedin()) { + if ((defined('FUSIONFORGE') and FUSIONFORGE) && session_loggedin()) { $user = session_get_user(); return $user->getEmail(); } else { @@ -1775,7 +1775,7 @@ function sanify($value) { // e-mail address is already checked by FusionForge - if (FUSIONFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { return $value; } // check for valid email address @@ -1802,7 +1802,7 @@ function update($value) { // e-mail address is already checked by FusionForge - if (FUSIONFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { return; } if (!empty($this->_init)) { @@ -1985,7 +1985,7 @@ // This should be probably be done with $customUserPreferenceColumns // For now, we use FUSIONFORGE define - if (FUSIONFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { $fusionforgeprefs = array( 'pageTrail' => new _UserPreference_bool(), 'diffMenuItem' => new _UserPreference_bool(), @@ -2177,7 +2177,7 @@ } } - if (FUSIONFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { // Merge current notifyPages with notifyPagesAll // notifyPages are pages to notify in the current project // while $notifyPagesAll is used to store all the monitored pages. @@ -2227,7 +2227,7 @@ } } - if (FUSIONFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { // Restore notifyPages from notifyPagesAll // notifyPages are pages to notify in the current project // while $notifyPagesAll is used to store all the monitored pages. Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2012-12-05 18:19:12 UTC (rev 8606) +++ trunk/lib/loadsave.php 2012-12-05 19:01:32 UTC (rev 8607) @@ -1527,7 +1527,7 @@ // Ensure that all mandatory pages are loaded $finder = new FileFinder; - if (!FUSIONFORGE) { + if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { $mandatory = explode(':', 'SandBox:Template/Category:Template/Talk:SpecialPages:CategoryCategory:CategoryActionPage:Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration'); } elseif (WIKI_NAME == "help") { $mandatory = explode(':', 'SandBox:Template/Category:Template/Talk:SpecialPages:CategoryCategory:CategoryActionPage:Help/TextFormattingRules:PhpWikiAdministration'); Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2012-12-05 18:19:12 UTC (rev 8606) +++ trunk/lib/main.php 2012-12-05 19:01:32 UTC (rev 8607) @@ -1482,7 +1482,7 @@ $request->finish(); } -if ((!FUSIONFORGE) || (forge_get_config('installation_environment') != 'production')) { +if ((!(defined('FUSIONFORGE') and FUSIONFORGE)) || (forge_get_config('installation_environment') != 'production')) { if (defined('E_STRICT') and (E_ALL & E_STRICT)) // strict php5? error_reporting(E_ALL & ~E_STRICT); // exclude E_STRICT else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |