From 7ffd7d3a805e8ce3d4b664605dea967d1a6af88a Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 31 Aug 2010 14:55:29 +0000 Subject: [PATCH] GFORGE --> FUSIONFORGE git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@7659 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- g | 2 +- lib/EditToolbar.php | 4 ++-- lib/IniConfig.php | 18 +++++++++--------- lib/MailNotify.php | 6 +++--- lib/PageList.php | 2 +- lib/PagePerm.php | 2 +- lib/WikiTheme.php | 2 +- lib/WikiUserNew.php | 16 ++++++++-------- lib/loadsave.php | 2 +- lib/main.php | 4 ++-- lib/plugin/PluginManager.php | 4 ++-- lib/plugin/UpLoad.php | 2 +- lib/plugin/UserPreferences.php | 2 +- lib/plugin/WatchPage.php | 4 ++-- lib/wikilens/RatingsUser.php | 2 +- 15 files changed, 36 insertions(+), 36 deletions(-) diff --git a/g b/g index 838b74ccd..92613e058 100644 --- a/g +++ b/g @@ -76,7 +76,7 @@ if (!$group_id || !$project) { define('WIKI_PGSRC', 'themes/gforge/pgsrc'); } - define('GFORGE', true); + define('FUSIONFORGE', true); define('PATH_INFO_PREFIX', '/'.$group_name . '/'); define('USE_PATH_INFO', true); diff --git a/lib/EditToolbar.php b/lib/EditToolbar.php index d46eb3779..fb95f069e 100644 --- a/lib/EditToolbar.php +++ b/lib/EditToolbar.php @@ -114,7 +114,7 @@ msg_repl_close = '"._("Close")."' if (ENABLE_EDIT_TOOLBAR) { $username = $request->_user->UserName(); - if (GFORGE or DISABLE_MARKUP_WIKIWORD or (!isWikiWord($username))) { + if (FUSIONFORGE or DISABLE_MARKUP_WIKIWORD or (!isWikiWord($username))) { $username = '[['.$username.']]'; } $signature = " ––".$username." ".CTime(); @@ -302,7 +302,7 @@ msg_repl_close = '"._("Close")."' $categories = array(); while ($p = $pages->next()) { $page = $p->getName(); - if (GFORGE) { + if (FUSIONFORGE) { $categories[] = "['$page', '%0A----%0A%5B%5B".$page."%5D%5D']"; } else if (DISABLE_MARKUP_WIKIWORD or (!isWikiWord($page))) { $categories[] = "['$page', '%0A%5B".$page."%5D']"; diff --git a/lib/IniConfig.php b/lib/IniConfig.php index 3cb9b83d2..1a7955516 100644 --- a/lib/IniConfig.php +++ b/lib/IniConfig.php @@ -194,7 +194,7 @@ function IniConfig($file) { 'DISABLE_HTTP_REDIRECT', 'PLUGIN_CACHED_USECACHE', 'PLUGIN_CACHED_FORCE_SYNCMAP', 'BLOG_DEFAULT_EMPTY_PREFIX', 'DATABASE_PERSISTENT', - 'GFORGE', + 'FUSIONFORGE', 'ENABLE_DISCUSSION_LINK', 'ENABLE_CAPTCHA', 'ENABLE_WYSIWYG', 'WYSIWYG_DEFAULT_PAGETYPE_HTML', 'DISABLE_MARKUP_WIKIWORD', 'ENABLE_MARKUP_COLOR', 'ENABLE_MARKUP_TEMPLATE', @@ -620,8 +620,8 @@ function fixup_static_configs($file) { .'UserRatings:' // UserRatings works only in wikilens derived themes .'WantedPages:WatchPage:WhoIsOnline:WikiAdminSelect'); - // The GFORGE theme omits them - if (!GFORGE) { + // The FUSIONFORGE theme omits them + if (!FUSIONFORGE) { // Add some some action pages depending on configuration if (DEBUG) { $ActionPages[] = 'DebugInfo'; @@ -708,8 +708,8 @@ function fixup_static_configs($file) { $AllAllowedPlugins[] = 'WikiPoll'; $AllAllowedPlugins[] = 'YouTube'; - // The GFORGE theme omits them - if (!GFORGE) { + // The FUSIONFORGE theme omits them + if (!FUSIONFORGE) { $AllAllowedPlugins[] = 'AddComment'; $AllAllowedPlugins[] = 'AnalyseAccessLogSql'; $AllAllowedPlugins[] = 'AsciiMath'; @@ -773,8 +773,8 @@ function fixup_static_configs($file) { $AllActionPages[] = 'SetGlobalAccessRightsSimple'; $AllActionPages[] = 'UserContribs'; - // The GFORGE theme omits them - if (!GFORGE) { + // The FUSIONFORGE theme omits them + if (!FUSIONFORGE) { // Add some some action pages depending on configuration if (DEBUG) { $AllActionPages[] = 'PhpWikiAdministration/Chmod'; @@ -782,7 +782,7 @@ function fixup_static_configs($file) { $AllActionPages[] = 'PhpWikiAdministration/Markup'; } - if (GFORGE) { + if (FUSIONFORGE) { if (ENABLE_EXTERNAL_PAGES) { $AllAllowedPlugins[] = 'WikiAdminSetExternal'; $AllActionPages[] = 'ExternalPages'; @@ -919,7 +919,7 @@ function fixup_dynamic_configs($file) { define('DEFAULT_LANGUAGE', ''); // detect from client // Gforge hack - if (!GFORGE) { + if (!FUSIONFORGE) { // Disable update_locale because Zend Debugger crash if(! extension_loaded('Zend Debugger')) { update_locale(isset($LANG) ? $LANG : DEFAULT_LANGUAGE); diff --git a/lib/MailNotify.php b/lib/MailNotify.php index 9e60c776f..d62d973b8 100644 --- a/lib/MailNotify.php +++ b/lib/MailNotify.php @@ -61,7 +61,7 @@ class MailNotify { function fromId() { global $request; - if (GFORGE) { + if (FUSIONFORGE) { return $request->_user->getId(); } else { return $request->_user->getId() . '@' . $request->get('REMOTE_HOST'); @@ -72,7 +72,7 @@ class MailNotify { global $request; // Disable verification of emails for corporate env. - if (GFORGE) { + if (FUSIONFORGE) { $doverify = false; } @@ -188,7 +188,7 @@ class MailNotify { $emails = $this->emails; $from = $this->from; // Do not send if modification is from Gforge admin - if (GFORGE and $from == ADMIN_USER) { + if (FUSIONFORGE and $from == ADMIN_USER) { return; } if (!$notice) $notice = _("PageChange Notification of %s"); diff --git a/lib/PageList.php b/lib/PageList.php index ee027f549..b7e77f182 100644 --- a/lib/PageList.php +++ b/lib/PageList.php @@ -1282,7 +1282,7 @@ class PageList { trigger_error(sprintf("%s: Bad column", $column), E_USER_NOTICE); return false; } - if (!GFORGE) { + if (!FUSIONFORGE) { // FIXME: anon users might rate and see ratings also. // Defer this logic to the plugin. if ($column == 'rating' and !$GLOBALS['request']->_user->isSignedIn()) { diff --git a/lib/PagePerm.php b/lib/PagePerm.php index 5e4e1fd38..ac1100df5 100644 --- a/lib/PagePerm.php +++ b/lib/PagePerm.php @@ -236,7 +236,7 @@ function _requiredAuthorityForPagename($access, $pagename) { $page = $request->getPage($pagename); // Exceptions: - if (GFORGE) { + if (FUSIONFORGE) { if ($pagename != '.' && isset($request->_user->_is_external) && $request->_user->_is_external && ! $page->get('external')) { $permcache[$pagename][$access] = 0; return 0; diff --git a/lib/WikiTheme.php b/lib/WikiTheme.php index 4b0de17b7..4e95f058a 100644 --- a/lib/WikiTheme.php +++ b/lib/WikiTheme.php @@ -223,7 +223,7 @@ class WikiTheme { return; } $this->addMoreHeaders(JavaScript('',array('src' => $this->_findData("wikicommon.js")))); - if (!GFORGE) { + if (!FUSIONFORGE) { // Gforge already loads this $this->addMoreHeaders(JavaScript('',array('src' => $this->_findData("sortable.js")))); } diff --git a/lib/WikiUserNew.php b/lib/WikiUserNew.php index c2583a427..4e40c5a65 100644 --- a/lib/WikiUserNew.php +++ b/lib/WikiUserNew.php @@ -563,7 +563,7 @@ class _WikiUser function isValidName ($userid = false) { if (!$userid) $userid = $this->_userid; if (!$userid) return false; - if (GFORGE) { + if (FUSIONFORGE) { return true; } return preg_match("/^[\-\w\.@ ]+$/U", $userid) and strlen($userid) < 32; @@ -1776,7 +1776,7 @@ extends _UserPreference { function get($name) { // get email address from Gforge - if (GFORGE && session_loggedin()) { + if (FUSIONFORGE && session_loggedin()) { $user = session_get_user(); return $user->getEmail(); } else { @@ -1786,7 +1786,7 @@ extends _UserPreference function sanify($value) { // email address is already checked by Gforge - if (GFORGE) return $value; + if (FUSIONFORGE) return $value; // check for valid email address if ($this->get('email') == $value and $this->getraw('emailVerified')) return $value; @@ -1808,7 +1808,7 @@ extends _UserPreference */ function update($value) { // email address is already checked by Gforge - if (GFORGE) return $value; + if (FUSIONFORGE) return $value; if (!empty($this->_init)) return; $verified = $this->getraw('emailVerified'); // hack! @@ -1982,8 +1982,8 @@ class UserPreferences ); // This should be probably be done with $customUserPreferenceColumns - // For now, we use GFORGE define - if (GFORGE) { + // For now, we use FUSIONFORGE define + if (FUSIONFORGE) { $gforgeprefs = array( 'pageTrail' => new _UserPreference_bool(), 'diffMenuItem' => new _UserPreference_bool(), @@ -2161,7 +2161,7 @@ class UserPreferences } } - if (GFORGE) { + if (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. @@ -2210,7 +2210,7 @@ class UserPreferences } } - if (GFORGE) { + if (FUSIONFORGE) { // Restore notifyPages from notifyPagesAll // notifyPages are pages to notify in the current project // while $notifyPagesAll is used to store all the monitored pages. diff --git a/lib/loadsave.php b/lib/loadsave.php index 6c314e4b8..c08d83e33 100644 --- a/lib/loadsave.php +++ b/lib/loadsave.php @@ -1527,7 +1527,7 @@ function SetupWiki (&$request) // Ensure that all mandatory pages are loaded $finder = new FileFinder; - if (!GFORGE) { + if (!FUSIONFORGE) { $mandatory = explode(':','SandBox:Template/Category:Template/Talk:SpecialPages:CategoryCategory:CategoryActionPage:Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration'); } else if (WIKI_NAME == "help") { $mandatory = explode(':','SandBox:Template/Category:Template/Talk:SpecialPages:CategoryCategory:CategoryActionPage:Help/TextFormattingRules:PhpWikiAdministration'); diff --git a/lib/main.php b/lib/main.php index 2e2a5f856..6236e302e 100644 --- a/lib/main.php +++ b/lib/main.php @@ -954,7 +954,7 @@ class WikiRequest extends Request { // Switched auth between sessions. // Note: There's no way to demandload a missing class-definition // afterwards! Stupid php. - if (defined('GFORGE') and GFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { if (empty($HTTP_SERVER_VARS['PHP_AUTH_USER'])) { return false; } @@ -1413,7 +1413,7 @@ function main () { $request->finish(); } -if ((!GFORGE) || (forge_get_config('installation_environment') != 'production')) { +if ((!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 diff --git a/lib/plugin/PluginManager.php b/lib/plugin/PluginManager.php index 570c381cd..ab5a16a2d 100644 --- a/lib/plugin/PluginManager.php +++ b/lib/plugin/PluginManager.php @@ -120,7 +120,7 @@ extends WikiPlugin // make a link if an actionpage exists $pluginNamelink = $pluginName; $pluginDocPageName = _("Help")."/" . $pluginName . "Plugin"; - if (defined('GFORGE') and GFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { $pluginDocPageName = _("Help").":" . $pluginName . "Plugin"; } @@ -148,7 +148,7 @@ extends WikiPlugin $pluginDocPageNamelink = WikiLink($pluginDocPageName,'if_known'); } - if (defined('GFORGE') and GFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { $pluginDocPageNamelink = WikiLink($pluginDocPageName, 'known'); } diff --git a/lib/plugin/UpLoad.php b/lib/plugin/UpLoad.php index afd372e05..8d65e8870 100644 --- a/lib/plugin/UpLoad.php +++ b/lib/plugin/UpLoad.php @@ -174,7 +174,7 @@ ws[cfh]"); // Make sure that the user is logged in. $user = $request->getUser(); if (!$user->isAuthenticated()) { - if (defined('GFORGE') and GFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { $message->pushContent(HTML::div(array('class' => 'error'), HTML::p(_("You cannot upload files.")), HTML::ul( diff --git a/lib/plugin/UserPreferences.php b/lib/plugin/UserPreferences.php index d59b15c9a..6685592b1 100644 --- a/lib/plugin/UserPreferences.php +++ b/lib/plugin/UserPreferences.php @@ -68,7 +68,7 @@ extends WikiPlugin $user->_request = $request; if (isa($request,'MockRequest')) return ''; - if (defined('GFORGE') and GFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { if (!($user->isAuthenticated())) { return HTML::div(array('class' => 'errors'), _("Error: You are not logged in, cannot display UserPreferences.")); diff --git a/lib/plugin/WatchPage.php b/lib/plugin/WatchPage.php index d0969fa66..81795ae5b 100644 --- a/lib/plugin/WatchPage.php +++ b/lib/plugin/WatchPage.php @@ -104,7 +104,7 @@ extends WikiPlugin $page = $args['page']; if (!$user->isAuthenticated() or empty($userid)) { // wrong or unauthenticated user - if (defined('GFORGE') and GFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { // No login banner for Gforge return HTML::div(array('class' => 'error'), HTML::p(_("You must sign in to watch pages."))); @@ -113,7 +113,7 @@ extends WikiPlugin } else { $pref = &$request->_prefs; $messages = ""; - if (!defined('GFORGE') or !GFORGE) { + if (!defined('FUSIONFORGE') or !FUSIONFORGE) { $email = $pref->get("email"); if (empty($email)) { return HTML::div( diff --git a/lib/wikilens/RatingsUser.php b/lib/wikilens/RatingsUser.php index ea82ed85a..d6058c36f 100644 --- a/lib/wikilens/RatingsUser.php +++ b/lib/wikilens/RatingsUser.php @@ -363,7 +363,7 @@ class RatingsUser { while($rating = $rating_iter->next()) { - if (defined('GFORGE') and GFORGE) { + if (defined('FUSIONFORGE') and FUSIONFORGE) { $rating['pagename'] = preg_replace('/^'.PAGE_PREFIX.'/', '', $rating['pagename']); } $this->_num_ratings++; -- 2.45.0