From: <var...@us...> - 2013-03-20 20:53:19
|
Revision: 8734 http://sourceforge.net/p/phpwiki/code/8734 Author: vargenau Date: 2013-03-20 20:53:15 +0000 (Wed, 20 Mar 2013) Log Message: ----------- Remove unused variables Modified Paths: -------------- trunk/lib/WikiDB/backend/PDO_mysql.php trunk/lib/WikiDB/backend/PDO_oci8.php trunk/lib/plugin/BlogArchives.php trunk/lib/plugin/BlogJournal.php trunk/lib/plugin/Calendar.php trunk/lib/plugin/CalendarList.php trunk/lib/plugin/Diff.php trunk/lib/plugin/DynamicIncludePage.php trunk/lib/plugin/FullTextSearch.php trunk/lib/plugin/GraphViz.php trunk/lib/plugin/HtmlConverter.php trunk/lib/plugin/LinkSearch.php trunk/lib/plugin/PhpWeather.php trunk/lib/plugin/RandomPage.php trunk/lib/plugin/RecentChanges.php trunk/lib/plugin/SearchHighlight.php trunk/lib/plugin/SemanticSearch.php trunk/lib/plugin/SyncWiki.php trunk/lib/plugin/VisualWiki.php trunk/themes/MacOSX/themeinfo.php trunk/themes/Portland/themeinfo.php trunk/themes/Wordpress/themeinfo.php trunk/themes/alphatest.php trunk/themes/blog/themeinfo.php Modified: trunk/lib/WikiDB/backend/PDO_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_mysql.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/WikiDB/backend/PDO_mysql.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -87,7 +87,6 @@ */ function optimize() { - $dbh = &$this->_dbh; $this->_timeout(); foreach ($this->_table_names as $table) { $this->query("OPTIMIZE TABLE $table"); Modified: trunk/lib/WikiDB/backend/PDO_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_oci8.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/WikiDB/backend/PDO_oci8.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -65,7 +65,6 @@ function write_accesslog(&$entry) { - global $request; $dbh = &$this->_dbh; $log_tbl = $entry->_accesslog->logtable; $sth = $dbh->prepare("INSERT INTO $log_tbl" Modified: trunk/lib/plugin/BlogArchives.php =================================================================== --- trunk/lib/plugin/BlogArchives.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/BlogArchives.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -87,7 +87,6 @@ //if (!is_array('pagename'), explode(',', $info)) // unset($pagelist->_columns['pagename']); - $sp = HTML::Raw('· '); if (!empty($args['month'])) { $prefix = $parent . $this->_blogPrefix('wikiblog') . SUBPAGE_SEPARATOR . $args['month']; $pages = $dbi->titleSearch(new TextSearchQuery("^" . $prefix, true, 'posix')); Modified: trunk/lib/plugin/BlogJournal.php =================================================================== --- trunk/lib/plugin/BlogJournal.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/BlogJournal.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -79,7 +79,6 @@ } $parent = (empty($args['user']) ? '' : $args['user'] . SUBPAGE_SEPARATOR); - $sp = HTML::Raw('· '); $prefix = $base = $parent . $this->_blogPrefix('wikiblog'); if ($args['month']) $prefix .= (SUBPAGE_SEPARATOR . $args['month']); Modified: trunk/lib/plugin/Calendar.php =================================================================== --- trunk/lib/plugin/Calendar.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/Calendar.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -194,7 +194,6 @@ 1, // mday (1-31) $args['year']); - $colnum = $args['display_weeknum'] ? 8 : 7; $cal = HTML::table(array('cellspacing' => 0, 'cellpadding' => 2, 'class' => 'cal'), Modified: trunk/lib/plugin/CalendarList.php =================================================================== --- trunk/lib/plugin/CalendarList.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/CalendarList.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -126,10 +126,7 @@ $date_string = strftime($args['date_format'], $time); $page_for_date = $args['prefix'] . SUBPAGE_SEPARATOR . $date_string; - $t = localtime($time, 1); - $td = HTML::td(array('align' => 'center')); - if ($dbi->isWikiPage($page_for_date)) { // Extract the page contents for this date $p = $dbi->getPage($page_for_date); Modified: trunk/lib/plugin/Diff.php =================================================================== --- trunk/lib/plugin/Diff.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/Diff.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -57,7 +57,7 @@ function PageInfoRow($label, $rev, &$request) { - global $WikiTheme, $WikiNameRegexp; + global $WikiTheme; $row = HTML::tr(HTML::td(array('align' => 'right'), $label)); if ($rev) { Modified: trunk/lib/plugin/DynamicIncludePage.php =================================================================== --- trunk/lib/plugin/DynamicIncludePage.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/DynamicIncludePage.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -66,7 +66,6 @@ } else { $html = WikiPlugin_IncludePage::run($dbi, $argstr, $request, $basepage); } - $header = $html->_content[0]; $body = $html->_content[1]; $id = 'DynInc-' . MangleXmlIdentifier($page); $body->setAttr('id', $id . '-body'); Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/FullTextSearch.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -79,7 +79,6 @@ $query = new TextSearchQuery($s, $case_exact, $regex); $pages = $dbi->fullSearch($query, $sortby, $limit, $exclude); - $lines = array(); $hilight_re = $hilight ? $query->getHighlightRegexp() : false; $count = 0; @@ -166,7 +165,6 @@ function _getValue(&$page, $revision_handle) { - $html = false; $pagename = $page->getName(); $count = count($this->parentobj->_wpagelist[$pagename]); return LinkURL(WikiURL($page, array('action' => 'BackLinks'), false), Modified: trunk/lib/plugin/GraphViz.php =================================================================== --- trunk/lib/plugin/GraphViz.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/GraphViz.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -283,7 +283,6 @@ if (empty($source)) return $this->error(fmt("No dot graph given")); if (isWindows()) { - $ok = $tempfiles; $dotfile = $this->createDotFile($tempfiles . '.dot', $argarray); $args = "-T$gif $dotfile -o $outfile"; $cmdline = "$dotbin $args"; Modified: trunk/lib/plugin/HtmlConverter.php =================================================================== --- trunk/lib/plugin/HtmlConverter.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/HtmlConverter.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -140,7 +140,6 @@ $ascii = '[\x00-\x7F]'; $euc = '[\xA1-\xFE][\xA1-\xFE]'; - $character = "$ascii|$euc"; $this->_processA($file); $this->_processIMG($file); Modified: trunk/lib/plugin/LinkSearch.php =================================================================== --- trunk/lib/plugin/LinkSearch.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/LinkSearch.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -130,7 +130,6 @@ function run($dbi, $argstr, &$request, $basepage) { - global $WikiTheme; $args = $this->getArgs($argstr, $request); if (empty($args['page'])) Modified: trunk/lib/plugin/PhpWeather.php =================================================================== --- trunk/lib/plugin/PhpWeather.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/PhpWeather.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -71,7 +71,6 @@ function getDefaultArguments() { - global $LANG; return array('icao' => 'EKAH', 'cc' => 'DK', 'language' => 'en', Modified: trunk/lib/plugin/RandomPage.php =================================================================== --- trunk/lib/plugin/RandomPage.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/RandomPage.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -66,7 +66,6 @@ // fix deprecated arg if (is_integer($pages)) { $numpages = $pages; - $pages = false; // fix new pages handling in arg preprozessor. } elseif (is_array($pages)) { $numpages = (int)$pages[0]; Modified: trunk/lib/plugin/RecentChanges.php =================================================================== --- trunk/lib/plugin/RecentChanges.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/RecentChanges.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -111,7 +111,7 @@ function authorHasPage($author) { - global $WikiNameRegexp, $request; + global $request; $dbi = $request->getDbh(); return isWikiWord($author) && $dbi->isWikiPage($author); } @@ -438,7 +438,6 @@ extract($this->_args); $pagetitle = $show_minor ? _("RecentEdits") : _("RecentChanges"); - global $request; $sidebarurl = WikiURL($pagetitle, array('format' => 'sidebar'), 'absurl'); $addsidebarjsfunc = @@ -801,10 +800,7 @@ function format($changes) { include_once 'lib/InlineParser.php'; - $last_date = ''; $first = true; - $html = HTML::ul(); - $counter = 1; while ($rev = $changes->next()) { // enforce view permission if (mayAccessPage('view', $rev->_pagename)) { @@ -1039,12 +1035,7 @@ // "channel" is called "feed" in atom $rc_url = WikiURL($request->getArg('pagename'), false, 'absurl'); extract($this->_args); - $title = WIKI_NAME; $description = $this->title(); - if ($category) - $title = $category; - elseif ($pagematch) - $title = $pagematch; $feed_props = array('title' => $description, 'link' => array('rel' => "alternate", 'type' => "text/html", Modified: trunk/lib/plugin/SearchHighlight.php =================================================================== --- trunk/lib/plugin/SearchHighlight.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/SearchHighlight.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -77,7 +77,6 @@ } if ($hits) { $query = new TextSearchQuery($s, $case_exact, $regex); - $lines = array(); $hilight_re = $query->getHighlightRegexp(); $page = $request->getPage(); $html->pushContent($this->showhits($page, $hilight_re)); Modified: trunk/lib/plugin/SemanticSearch.php =================================================================== --- trunk/lib/plugin/SemanticSearch.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/SemanticSearch.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -88,7 +88,6 @@ function showForm(&$dbi, &$request, $args) { - global $WikiTheme; $action = $request->getPostURL(); $hiddenfield = HiddenInputs($request->getArgs(), '', array('action', 'page', 's', 'semsearch', @@ -275,8 +274,6 @@ function run($dbi, $argstr, &$request, $basepage) { - global $WikiTheme; - $this->_supported_operators = array(':=', '<', '<=', '>', '>=', '!=', '==', '=~'); $this->_text_operators = array(':=', '==', '=~', '!='); $args = $this->getArgs($argstr, $request); Modified: trunk/lib/plugin/SyncWiki.php =================================================================== --- trunk/lib/plugin/SyncWiki.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/SyncWiki.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -89,7 +89,6 @@ function _do_syncwiki(&$request, $args) { - global $charset; longer_timeout(240); if (!function_exists('wiki_xmlrpc_post')) { @@ -289,7 +288,6 @@ // TODO: store log or checkpoint for restauration? function _import($args, $our, $extdate = null) { - global $request; $reaction = 'import '; if ($args['noimport']) return ($reaction . _("skipped")); //$userid = $request->_user->_userid; @@ -343,7 +341,6 @@ // TODO: store log or checkpoint for restauration? function _upload($args, $path, $timeout) { - global $request; $reaction = 'upload '; if ($args['noupload']) return ($reaction . _("skipped")); Modified: trunk/lib/plugin/VisualWiki.php =================================================================== --- trunk/lib/plugin/VisualWiki.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/lib/plugin/VisualWiki.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -463,7 +463,6 @@ $dot .= "node [fontname=$fontname,shape=$shape,fontsize=$fontsize];\n"; } $dot .= "\n"; - $i = 0; foreach ($names as $name) { $url = rawurlencode($name); Modified: trunk/themes/MacOSX/themeinfo.php =================================================================== --- trunk/themes/MacOSX/themeinfo.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/themes/MacOSX/themeinfo.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -64,8 +64,6 @@ function linkUnknownWikiWord($wikiword, $linktext = '') { - global $request; - // Get rid of anchors on unknown wikiwords if (isa($wikiword, 'WikiPageName')) { $default_text = $wikiword->shortName; Modified: trunk/themes/Portland/themeinfo.php =================================================================== --- trunk/themes/Portland/themeinfo.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/themes/Portland/themeinfo.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -17,7 +17,6 @@ function linkUnknownWikiWord($wikiword, $linktext = '') { - global $request; if (isa($wikiword, 'WikiPageName')) { $default_text = $wikiword->shortName; $wikiword = $wikiword->name; Modified: trunk/themes/Wordpress/themeinfo.php =================================================================== --- trunk/themes/Wordpress/themeinfo.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/themes/Wordpress/themeinfo.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -19,7 +19,6 @@ function linkUnknownWikiWord($wikiword, $linktext = '') { - global $request; if (isa($wikiword, 'WikiPageName')) { $default_text = $wikiword->shortName; $wikiword = $wikiword->name; Modified: trunk/themes/alphatest.php =================================================================== --- trunk/themes/alphatest.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/themes/alphatest.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -29,7 +29,6 @@ function find_pngs($dir) { - $file_list = ''; $stack[] = $dir; while ($stack) { $current_dir = array_pop($stack); Modified: trunk/themes/blog/themeinfo.php =================================================================== --- trunk/themes/blog/themeinfo.php 2013-02-15 16:26:30 UTC (rev 8733) +++ trunk/themes/blog/themeinfo.php 2013-03-20 20:53:15 UTC (rev 8734) @@ -97,7 +97,6 @@ /* TODO: use the blog summary as label instead of the pagename */ function linkExistingWikiWord($wikiword, $linktext = '', $version = false) { - global $request; if ($version !== false and !$this->HTML_DUMP_SUFFIX) $url = WikiURL($wikiword, array('version' => $version)); else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |