From: <var...@us...> - 2016-07-19 14:29:52
|
Revision: 9886 http://sourceforge.net/p/phpwiki/code/9886 Author: vargenau Date: 2016-07-19 14:29:46 +0000 (Tue, 19 Jul 2016) Log Message: ----------- Add () in class instantiation Modified Paths: -------------- trunk/RPC2.php trunk/doc/README.foaf trunk/lib/BlockParser.php trunk/lib/ErrorManager.php trunk/lib/FileFinder.php trunk/lib/InlineParser.php trunk/lib/Request.php trunk/lib/RssWriter091.php trunk/lib/TextSearchQuery.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiPluginCached.php trunk/lib/WikiTheme.php trunk/lib/WikiUser.php trunk/lib/editpage.php trunk/lib/imagecache.php trunk/lib/loadsave.php trunk/lib/pdf.php trunk/lib/plugin/Diff.php trunk/lib/plugin/FoafViewer.php trunk/lib/plugin/LikePages.php trunk/lib/plugin/RecentChanges.php trunk/lib/plugin/SpellCheck.php trunk/lib/plugin/WikiAdminRename.php trunk/lib/prepend.php trunk/lib/upgrade.php trunk/themes/Sidebar/themeinfo.php trunk/themes/wikilens/templates/head.tmpl Modified: trunk/RPC2.php =================================================================== --- trunk/RPC2.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/RPC2.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -25,5 +25,5 @@ include_once 'lib/XmlRpcServer.php'; -$server = new XmlRpcServer; +$server = new XmlRpcServer(); $server->service(); Modified: trunk/doc/README.foaf =================================================================== --- trunk/doc/README.foaf 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/doc/README.foaf 2016-07-19 14:29:46 UTC (rev 9886) @@ -157,7 +157,7 @@ require_once 'XML/FOAF/Parser.php'; // Create new Parser object -$parser = new XML_FOAF_Parser; +$parser = new XML_FOAF_Parser(); // Start of output echo '<h1>XML_FOAF_Parser Example</h1>'; Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/BlockParser.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -100,7 +100,7 @@ return false; } - $match = new AnchoredRegexpSet_match; + $match = new AnchoredRegexpSet_match(); $match->postmatch = substr($text, strlen($m[0])); $match->match = $m[1]; $match->regexp_ind = count($m) - 3; @@ -139,7 +139,7 @@ return false; } - $match = new AnchoredRegexpSet_match; + $match = new AnchoredRegexpSet_match(); $match->postmatch = substr($text, strlen($m[0])); $match->match = $m[1]; $match->regexp_ind = count($m) - 3 + $prevMatch->regexp_ind + 1; Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/ErrorManager.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -355,7 +355,7 @@ } if (!isset($GLOBALS['ErrorManager'])) { - $GLOBALS['ErrorManager'] = new ErrorManager; + $GLOBALS['ErrorManager'] = new ErrorManager(); } if (defined('DEBUG') and DEBUG) { @@ -647,5 +647,5 @@ require_once(dirname(__FILE__) . '/HtmlElement.php'); if (!isset($GLOBALS['ErrorManager'])) { - $GLOBALS['ErrorManager'] = new ErrorManager; + $GLOBALS['ErrorManager'] = new ErrorManager(); } Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/FileFinder.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -350,7 +350,7 @@ * Example usage: * * <pre> - * $pearFinder = new PearFileFinder; + * $pearFinder = new PearFileFinder(); * $pearFinder->includeOnce('DB.php'); * </pre> * @@ -460,7 +460,7 @@ { static $finder; if (!isset($finder)) { - $finder = new FileFinder; + $finder = new FileFinder(); // remove "/lib" from dirname(__FILE__) $wikidir = preg_replace('/.lib$/', '', dirname(__FILE__)); // let the system favor its local pear? @@ -482,7 +482,7 @@ { static $finder; if ($re_init or !isset($finder)) - $finder = new LocalizedFileFinder; + $finder = new LocalizedFileFinder(); return $finder->findFile($file, $missing_okay); } @@ -490,7 +490,7 @@ { static $buttonfinder; if ($re_init or !isset($buttonfinder)) - $buttonfinder = new LocalizedButtonFinder; + $buttonfinder = new LocalizedButtonFinder(); return $buttonfinder->findFile($file, $missing_okay); } @@ -507,7 +507,7 @@ { static $finder; if (!isset($finder)) { - $finder = new FileFinder; + $finder = new FileFinder(); } // remove "/lib" from dirname(__FILE__) if ($finder->_is_abs($file)) @@ -529,7 +529,7 @@ { static $finder; if (!isset($finder)) { - $finder = new FileFinder; + $finder = new FileFinder(); } if (defined("DATA_PATH")) { $wikipath = DATA_PATH; Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/InlineParser.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -147,7 +147,7 @@ // S - STUDY private function _match($text, $regexps, $repeat) { - $match = new RegexpSet_match; + $match = new RegexpSet_match(); // Optimization: if the matches are only "$" and another, then omit "$" assert(!empty($repeat)); @@ -1244,7 +1244,7 @@ $regexps = new RegexpSet($regexps); $input = $text; - $output = new XmlContent; + $output = new XmlContent(); $match = $regexps->match($input); @@ -1343,7 +1343,7 @@ static $trfm; $action = $request->getArg('action'); if (empty($trfm) or $action == 'SpellCheck') { - $trfm = new InlineTransformer; + $trfm = new InlineTransformer(); } if ($basepage) { @@ -1357,7 +1357,7 @@ static $trfm; if (empty($trfm)) { - $trfm = new LinkTransformer; + $trfm = new LinkTransformer(); } if ($basepage) { @@ -1374,7 +1374,7 @@ static $trfm; if (empty($trfm)) { - $trfm = new NowikiTransformer; + $trfm = new NowikiTransformer(); } if ($basepage) { return new CacheableMarkup($trfm->parse($text), $basepage); Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/Request.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -48,8 +48,8 @@ break; } - $this->session = new Request_SessionVars; - $this->cookies = new Request_CookieVars; + $this->session = new Request_SessionVars(); + $this->cookies = new Request_CookieVars(); if (ACCESS_LOG or ACCESS_LOG_SQL) { $this->_accesslog = new Request_AccessLog(ACCESS_LOG, ACCESS_LOG_SQL); Modified: trunk/lib/RssWriter091.php =================================================================== --- trunk/lib/RssWriter091.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/RssWriter091.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -80,7 +80,7 @@ function format($changes) { // include_once('lib/RssWriter.php'); - $rss = new RssWriter091; + $rss = new RssWriter091(); $rss->channel($this->channel_properties()); Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/TextSearchQuery.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -107,7 +107,7 @@ $this->_regex_modifier = ($case_exact ? '' : 'i') . 'sS'; $this->_case_exact = $case_exact; if ($regex != 'pcre') { - $parser = new TextSearchQuery_Parser; + $parser = new TextSearchQuery_Parser(); $this->_tree = $parser->parse($search_query, $case_exact, $this->_regex); $this->optimize(); // broken under certain circumstances: "word -word -word" if (defined("FULLTEXTSEARCH_STOPLIST")) Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/WikiDB/backend/PearDB.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -36,7 +36,7 @@ // TODO: apparently some Pear::Db version adds LIMIT 1,0 to getOne(), // which is invalid for "select version()" if (!in_array($name, get_class_methods("DB_common"))) { - $finder = new FileFinder; + $finder = new FileFinder(); $dir = dirname(__FILE__) . "/../../pear"; $finder->_prepend_to_include_path($dir); include_once("$dir/DB/common.php"); // use our version instead. Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/WikiPluginCached.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -482,7 +482,7 @@ if (!class_exists('Cache')) { // uuh, pear not in include_path! should print a warning. // search some possible pear paths. - $pearFinder = new PearFileFinder; + $pearFinder = new PearFileFinder(); if ($lib = $pearFinder->findFile('Cache.php', 'missing_ok')) require_once($lib); else // fall back to our own copy Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/WikiTheme.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -240,8 +240,8 @@ $this->_default_theme = new WikiTheme('default', true); $this->_parents[] = $this->_default_theme; } elseif ($parent) { - $this->_parents[] = new WikiTheme - (preg_replace("/^WikiTheme_/i", "", $parent), true); + $this->_parents[] = new WikiTheme( + preg_replace("/^WikiTheme_/i", "", $parent), true); } } } Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/WikiUser.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -711,7 +711,7 @@ global $request; if (empty($this->_prefs)) - $this->_prefs = new UserPreferences; + $this->_prefs = new UserPreferences(); $UserName = $this->UserName(); // Try to read deprecated 1.3.x style cookies @@ -774,7 +774,7 @@ // initializeTheme() needs at least an empty object /* if (empty($this->_prefs)) - $this->_prefs = new UserPreferences; + $this->_prefs = new UserPreferences(); */ return $this->_prefs; } Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/editpage.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -215,7 +215,7 @@ $pagelink = WikiLink($this->page); } - $title = new FormattedText ($title_fs, $pagelink); + $title = new FormattedText($title_fs, $pagelink); // not for dumphtml or viewsource if (defined('ENABLE_WYSIWYG') and ENABLE_WYSIWYG and $template == 'editpage') { $WikiTheme->addMoreHeaders($this->WysiwygEdit->Head()); @@ -519,7 +519,7 @@ _("Versions are identical"))); } else { // New CSS formatted unified diffs - $fmt = new HtmlUnifiedDiffFormatter; + $fmt = new HtmlUnifiedDiffFormatter(); $html->pushContent($fmt->format($diff)); } return $html; Modified: trunk/lib/imagecache.php =================================================================== --- trunk/lib/imagecache.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/imagecache.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -93,7 +93,7 @@ */ function mainImageCache() { - $request = new Request; + $request = new Request(); // normalize pagename $request->setArg('pagename', deducePagename($request)); $pagename = $request->getArg('pagename'); @@ -111,7 +111,7 @@ $id = $request->getArg('id'); $args = $request->getArg('args'); $request->setArg('action', 'imagecache'); - $cache = new WikiPluginCached; + $cache = new WikiPluginCached(); if ($id) { // this indicates a direct call (script wasn't called as Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/loadsave.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -1516,7 +1516,7 @@ $dbi =& $request->_dbi; // Ensure that all mandatory pages are loaded - $finder = new FileFinder; + $finder = new FileFinder(); $mandatory = array('SandBox', 'Template/Category', Modified: trunk/lib/pdf.php =================================================================== --- trunk/lib/pdf.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/pdf.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -40,7 +40,7 @@ array_unshift($pagelist->_pages, $request->_dbi->getPage($pagename)); require_once 'lib/WikiPluginCached.php'; - $cache = new WikiPluginCached; + $cache = new WikiPluginCached(); $cache->newCache(); $tmpfile = $cache->tempnam(); $tmpdir = dirname($tmpfile); @@ -83,7 +83,7 @@ $request->discardOutput(); $request->buffer_output(false /*'nocompress'*/); require_once 'lib/WikiPluginCached.php'; - $cache = new WikiPluginCached; + $cache = new WikiPluginCached(); $cache->newCache(); $tmpfile = $cache->tempnam('pdf.html'); $fp = fopen($tmpfile, "wb"); Modified: trunk/lib/plugin/Diff.php =================================================================== --- trunk/lib/plugin/Diff.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/plugin/Diff.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -193,7 +193,7 @@ _(" was created because: "), $new->get('summary'))); } } else { - $fmt = new HtmlUnifiedDiffFormatter; + $fmt = new HtmlUnifiedDiffFormatter(); $html->pushContent($fmt->format($diff)); } } Modified: trunk/lib/plugin/FoafViewer.php =================================================================== --- trunk/lib/plugin/FoafViewer.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/plugin/FoafViewer.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -134,7 +134,7 @@ return HTML(HTML::p(_("Resource isn't available: Something went wrong, probably a 404!"))); } // Create new Parser object - $parser = new XML_FOAF_Parser; + $parser = new XML_FOAF_Parser(); // Parser FOAF into $foaffile $parser->parseFromMem($foaffile); $a = $parser->toArray(); Modified: trunk/lib/plugin/LikePages.php =================================================================== --- trunk/lib/plugin/LikePages.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/plugin/LikePages.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -94,7 +94,7 @@ if ($search) $query = new TextSearchQuery(join(' OR ', $search)); else - $query = new NullTextSearchQuery; // matches nothing + $query = new NullTextSearchQuery(); // matches nothing $match_re = '/' . join('|', $match) . '/'; Modified: trunk/lib/plugin/RecentChanges.php =================================================================== --- trunk/lib/plugin/RecentChanges.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/plugin/RecentChanges.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -841,7 +841,7 @@ { include_once 'lib/RssWriter.php'; - $rss = new RssWriter; + $rss = new RssWriter(); $rss->channel($this->channel_properties()); if (($props = $this->image_properties())) @@ -959,7 +959,7 @@ function format($changes) { include_once 'lib/RssWriter2.php'; - $rss = new RssWriter2; + $rss = new RssWriter2(); $rss->channel($this->channel_properties()); if (($props = $this->cloud_properties())) @@ -1031,7 +1031,7 @@ { global $request; include_once 'lib/RssWriter.php'; - $rss = new AtomFeed; + $rss = new AtomFeed(); // "channel" is called "feed" in atom $rc_url = WikiURL($request->getArg('pagename'), array(), 'absurl'); Modified: trunk/lib/plugin/SpellCheck.php =================================================================== --- trunk/lib/plugin/SpellCheck.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/plugin/SpellCheck.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -143,7 +143,7 @@ $args .= " --lang=" . $lang; // use -C or autosplit wikiwords in the text $commandLine = ASPELL_EXE . " -a -C $args "; - $cache = new WikiPluginCached; + $cache = new WikiPluginCached(); $code = $cache->filterThroughCmd($source, $commandLine); if (empty($code)) return $this->error(fmt("Couldn't start commandline “%s”", $commandLine)); Modified: trunk/lib/plugin/WikiAdminRename.php =================================================================== --- trunk/lib/plugin/WikiAdminRename.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/plugin/WikiAdminRename.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -129,13 +129,12 @@ /*if ($next_action == 'verify') { $args['info'] = "checkbox,pagename,renamed_pagename"; }*/ - $pagelist = new PageList_Selectable - ( + $pagelist = new PageList_Selectable( $args['info'], $args['exclude'], array('types' => array('renamed_pagename' => new _PageList_Column_renamed_pagename('rename', _("Rename to")), - ))); + ))); $pagelist->addPageList($pages); $header = HTML::div(); Modified: trunk/lib/prepend.php =================================================================== --- trunk/lib/prepend.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/prepend.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -104,7 +104,7 @@ } } -$RUNTIMER = new DebugTimer; +$RUNTIMER = new DebugTimer(); require_once(dirname(__FILE__) . '/ErrorManager.php'); require_once(dirname(__FILE__) . '/WikiCallback.php'); Modified: trunk/lib/upgrade.php =================================================================== --- trunk/lib/upgrade.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/lib/upgrade.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -990,8 +990,8 @@ { echo "<h2>", sprintf(_("Check for necessary %s updates"), "config.ini"), "</h2>\n"; - $entry = new UpgradeConfigEntry - ($this, array('key' => 'cache_control_none', + $entry = new UpgradeConfigEntry($this, + array('key' => 'cache_control_none', 'fixed_with' => 1012.0, 'header' => sprintf(_("Check for %s"), "CACHE_CONTROL = NONE"), 'applicable_args' => 'CACHE_CONTROL', @@ -1000,8 +1000,8 @@ $entry->setApplicableCb(new WikiMethodCb($entry, '_applicable_defined_and_empty')); $this->_configUpdates[] = $entry; - $entry = new UpgradeConfigEntry - ($this, array('key' => 'group_method_none', + $entry = new UpgradeConfigEntry($this, + array('key' => 'group_method_none', 'fixed_with' => 1012.0, 'header' => sprintf(_("Check for %s"), "GROUP_METHOD = NONE"), 'applicable_args' => 'GROUP_METHOD', @@ -1010,8 +1010,8 @@ $entry->setApplicableCb(new WikiMethodCb($entry, '_applicable_defined_and_empty')); $this->_configUpdates[] = $entry; - $entry = new UpgradeConfigEntry - ($this, array('key' => 'blog_empty_default_prefix', + $entry = new UpgradeConfigEntry($this, + array('key' => 'blog_empty_default_prefix', 'fixed_with' => 1013.0, 'header' => sprintf(_("Check for %s"), "BLOG_EMPTY_DEFAULT_PREFIX"), 'applicable_args' => 'BLOG_EMPTY_DEFAULT_PREFIX', Modified: trunk/themes/Sidebar/themeinfo.php =================================================================== --- trunk/themes/Sidebar/themeinfo.php 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/themes/Sidebar/themeinfo.php 2016-07-19 14:29:46 UTC (rev 9886) @@ -204,7 +204,7 @@ require_once 'lib/wikilens/CustomPrefs.php'; require_once 'lib/wikilens/PageListColumns.php'; //require_once("lib/plugin/RateIt.php"); - $plugin = new WikiPlugin_RateIt; + $plugin = new WikiPlugin_RateIt(); // add parent to current theme to find the RateIt images // $WikiTheme->addParent('wikilens', 'noinit'); $WikiTheme->_parents[] = new WikiTheme('wikilens', 'noinit'); Modified: trunk/themes/wikilens/templates/head.tmpl =================================================================== --- trunk/themes/wikilens/templates/head.tmpl 2016-07-19 14:28:36 UTC (rev 9885) +++ trunk/themes/wikilens/templates/head.tmpl 2016-07-19 14:29:46 UTC (rev 9886) @@ -89,7 +89,7 @@ <?php } ?> <?php require_once("lib/plugin/RateIt.php"); - $plugin = new WikiPlugin_RateIt; + $plugin = new WikiPlugin_RateIt(); $plugin->head(); ?> <?php echo $WikiTheme->getMoreHeaders() ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |