From: <var...@us...> - 2015-02-11 09:11:51
|
Revision: 9517 http://sourceforge.net/p/phpwiki/code/9517 Author: vargenau Date: 2015-02-11 09:11:42 +0000 (Wed, 11 Feb 2015) Log Message: ----------- Use && Modified Paths: -------------- trunk/lib/EditToolbar.php trunk/lib/IniConfig.php trunk/lib/MailNotify.php trunk/lib/PageList.php trunk/lib/PagePerm.php trunk/lib/Request.php trunk/lib/WikiTheme.php trunk/lib/WikiUser.php trunk/lib/loadsave.php trunk/lib/main.php trunk/lib/plugin/PluginManager.php trunk/lib/plugin/UpLoad.php trunk/lib/plugin/UserPreferences.php trunk/lib/plugin/WatchPage.php trunk/lib/wikilens/RatingsDb.php trunk/lib/wikilens/RatingsUser.php trunk/themes/fusionforge/themeinfo.php Modified: trunk/lib/EditToolbar.php =================================================================== --- trunk/lib/EditToolbar.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/EditToolbar.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -128,7 +128,7 @@ if (defined('ENABLE_EDIT_TOOLBAR') and ENABLE_EDIT_TOOLBAR) { $username = $request->_user->UserName(); - if ((defined('FUSIONFORGE') and FUSIONFORGE) or DISABLE_MARKUP_WIKIWORD or (!isWikiWord($username))) { + if ((defined('FUSIONFORGE') && FUSIONFORGE) or DISABLE_MARKUP_WIKIWORD or (!isWikiWord($username))) { $username = '[[' . $username . ']]'; } $signature = " ––" . $username . " " . CTime(); @@ -320,7 +320,7 @@ $categories = array(); while ($p = $pages->next()) { $page = $p->getName(); - if ((defined('FUSIONFORGE') and FUSIONFORGE)) { + if ((defined('FUSIONFORGE') && 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 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/IniConfig.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -600,7 +600,7 @@ . 'WantedPages:WatchPage:WhoIsOnline:WikiAdminSelect'); // The FUSIONFORGE theme omits them - if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { + if (!(defined('FUSIONFORGE') && FUSIONFORGE)) { // Add some some action pages $ActionPages[] = 'DebugInfo'; $ActionPages[] = 'SpellCheck'; // SpellCheck does not work @@ -693,7 +693,7 @@ $AllAllowedPlugins[] = 'DebugRetransform'; // The FUSIONFORGE theme omits them - if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { + if (!(defined('FUSIONFORGE') && FUSIONFORGE)) { $AllAllowedPlugins[] = 'AnalyseAccessLogSql'; $AllAllowedPlugins[] = 'CacheTest'; $AllAllowedPlugins[] = 'CategoryPage'; @@ -748,7 +748,7 @@ $AllActionPages[] = 'SetGlobalAccessRightsSimple'; $AllActionPages[] = 'UserContribs'; - if ((defined('FUSIONFORGE') and FUSIONFORGE)) { + if ((defined('FUSIONFORGE') && FUSIONFORGE)) { if (ENABLE_EXTERNAL_PAGES) { $AllAllowedPlugins[] = 'WikiAdminSetExternal'; $AllActionPages[] = 'PhpWikiAdministration/SetExternal'; @@ -861,7 +861,7 @@ define('DEFAULT_LANGUAGE', ''); // detect from client // FusionForge hack - if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { + if (!(defined('FUSIONFORGE') && 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 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/MailNotify.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -65,7 +65,7 @@ private function fromId() { global $request; - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { return $request->_user->getId(); } else { return $request->_user->getId() . '@' . $request->get('REMOTE_HOST'); @@ -83,7 +83,7 @@ global $request; // Disable verification of emails for corporate env. - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { $doverify = false; } Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/PageList.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -1406,7 +1406,7 @@ trigger_error(sprintf("%s: Bad column", $column), E_USER_NOTICE); return false; } - if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { + if (!(defined('FUSIONFORGE') && FUSIONFORGE)) { // FIXME: anon users might rate and see ratings also. // Defer this logic to the plugin. if ($column == 'rating' and !$request->_user->isSignedIn()) { Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/PagePerm.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -241,7 +241,7 @@ $page = $request->getPage($pagename); // Exceptions: - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { if ($pagename != '.' && isset($request->_user->_is_external) && $request->_user->_is_external && !$page->get('external')) { $permcache[$pagename][$access] = 0; return 0; Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/Request.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -636,7 +636,7 @@ function get_old($key) { - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { return false; } $vars = &$GLOBALS['HTTP_COOKIE_VARS']; Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/WikiTheme.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -233,7 +233,7 @@ return; } $this->addMoreHeaders(JavaScript('', array('src' => $this->_findData("wikicommon.js")))); - if (!(defined('FUSIONFORGE') and FUSIONFORGE)) { + if (!(defined('FUSIONFORGE') && FUSIONFORGE)) { // FusionForge already loads this $this->addMoreHeaders(JavaScript('', array('src' => $this->_findData("jquery-1.11.1.min.js")))); $this->addMoreHeaders(JavaScript('', array('src' => $this->_findData("jquery.tablesorter.min.js")))); Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/WikiUser.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -567,7 +567,7 @@ { if (!$userid) $userid = $this->_userid; if (!$userid) return false; - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { return true; } return preg_match("/^[\-\w\.@ ]+$/U", $userid) and strlen($userid) < 32; @@ -1765,7 +1765,7 @@ function get($name) { // get e-mail address from FusionForge - if ((defined('FUSIONFORGE') and FUSIONFORGE) && session_loggedin()) { + if ((defined('FUSIONFORGE') && FUSIONFORGE) && session_loggedin()) { $user = session_get_user(); return $user->getEmail(); } else { @@ -1776,7 +1776,7 @@ function sanify($value) { // e-mail address is already checked by FusionForge - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { return $value; } // check for valid email address @@ -1808,7 +1808,7 @@ global $request; // e-mail address is already checked by FusionForge - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { return; } if (!empty($this->_init)) { @@ -2001,7 +2001,7 @@ // This should be probably be done with $customUserPreferenceColumns // For now, we use FUSIONFORGE define - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { $fusionforgeprefs = array( 'pageTrail' => new _UserPreference_bool(), 'diffMenuItem' => new _UserPreference_bool(), @@ -2194,7 +2194,7 @@ } } - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && 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. @@ -2244,7 +2244,7 @@ } } - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && 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 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/loadsave.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -1521,7 +1521,7 @@ 'CategoryActionPage', 'PhpWikiAdministration'); - if ((defined('FUSIONFORGE') and FUSIONFORGE)) { + if ((defined('FUSIONFORGE') && FUSIONFORGE)) { $mandatory[] = 'Template/UserPage'; } else { $mandatory[] = 'Help/TextFormattingRules'; Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/main.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -976,7 +976,7 @@ // Switched auth between sessions. // Note: There's no way to demandload a missing class-definition // afterwards! Stupid php. - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { if (empty($_SERVER['PHP_AUTH_USER'])) { return false; } @@ -1463,7 +1463,7 @@ $request->finish(); } -if ((!(defined('FUSIONFORGE') and FUSIONFORGE)) || (forge_get_config('installation_environment') != 'production')) { +if ((!(defined('FUSIONFORGE') && 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 Modified: trunk/lib/plugin/PluginManager.php =================================================================== --- trunk/lib/plugin/PluginManager.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/plugin/PluginManager.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -126,7 +126,7 @@ // make a link if an actionpage exists $pluginNamelink = $pluginName; $pluginDocPageName = "Help" . "/" . $pluginName . "Plugin"; - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { $pluginDocPageName = "Help" . ":" . $pluginName . "Plugin"; } @@ -154,7 +154,7 @@ $pluginDocPageNamelink = WikiLink($pluginDocPageName, 'if_known'); } - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { $pluginDocPageNamelink = WikiLink($pluginDocPageName, 'known'); } Modified: trunk/lib/plugin/UpLoad.php =================================================================== --- trunk/lib/plugin/UpLoad.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/plugin/UpLoad.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -109,7 +109,7 @@ // Make sure that the user is logged in. $user = $request->getUser(); if (!$user->isAuthenticated()) { - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { $message->pushContent(HTML::div(array('class' => 'error'), HTML::p(_("You cannot upload files.")), HTML::ul( Modified: trunk/lib/plugin/UserPreferences.php =================================================================== --- trunk/lib/plugin/UserPreferences.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/plugin/UserPreferences.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -75,7 +75,7 @@ $user->_request = $request; if (is_a($request, 'MockRequest')) return ''; - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { if (!($user->isAuthenticated())) { return HTML::p(array('class' => 'error'), _("Error: You are not logged in, cannot display UserPreferences.")); Modified: trunk/lib/plugin/WatchPage.php =================================================================== --- trunk/lib/plugin/WatchPage.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/plugin/WatchPage.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -113,7 +113,7 @@ $page = $args['page']; if (!$user->isAuthenticated() or empty($userid)) { // wrong or unauthenticated user - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { // No login banner for FusionForge return HTML::div(array('class' => 'error'), HTML::p(_("You must sign in to watch pages."))); @@ -122,7 +122,7 @@ } else { $pref = &$request->_prefs; $messages = ""; - if (!defined('FUSIONFORGE') or !FUSIONFORGE) { + if (!defined('FUSIONFORGE') || !FUSIONFORGE) { $email = $pref->get("email"); if (empty($email)) { return HTML::p( Modified: trunk/lib/wikilens/RatingsDb.php =================================================================== --- trunk/lib/wikilens/RatingsDb.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/wikilens/RatingsDb.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -382,7 +382,7 @@ $where = "WHERE"; } if (isset($pagename)) { - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { $rateeid = $this->_sqlbackend->_get_pageid($pagename, true); $where .= " rateepage=$rateeid"; } else { @@ -395,7 +395,7 @@ $where .= " dimension=$dimension"; } extract($dbi->_table_names); - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { $query = "SELECT AVG(ratingvalue) as avg FROM $rating_tbl " . $where; } else { $query = "SELECT AVG(ratingvalue) as avg FROM $rating_tbl r, $page_tbl p " . $where . " GROUP BY raterpage"; Modified: trunk/lib/wikilens/RatingsUser.php =================================================================== --- trunk/lib/wikilens/RatingsUser.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/lib/wikilens/RatingsUser.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -340,7 +340,7 @@ $rating_iter = $dbi->get_rating_page(null, $this->_userid); while ($rating = $rating_iter->next()) { - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { $rating['pagename'] = preg_replace('/^' . PAGE_PREFIX . '/', '', $rating['pagename']); } $this->_num_ratings++; Modified: trunk/themes/fusionforge/themeinfo.php =================================================================== --- trunk/themes/fusionforge/themeinfo.php 2015-02-09 14:12:08 UTC (rev 9516) +++ trunk/themes/fusionforge/themeinfo.php 2015-02-11 09:11:42 UTC (rev 9517) @@ -31,7 +31,7 @@ $submenu = Template('navbar')->asXML(); - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { $domain = textdomain(NULL); textdomain('fusionforge'); @@ -80,8 +80,7 @@ function footer() { - - if (defined('FUSIONFORGE') and FUSIONFORGE) { + if (defined('FUSIONFORGE') && FUSIONFORGE) { global $HTML; $domain = textdomain(NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |