From 93cbd177f5c09c46a808a66f8552edd33338c291 Mon Sep 17 00:00:00 2001 From: vargenau Date: Wed, 29 May 2013 07:32:07 +0000 Subject: [PATCH] var --> public git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@8789 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/AtomParser.php | 56 +++++++++++------------ lib/BlockParser.php | 70 ++++++++++++++--------------- lib/DbSession/ADODB.php | 2 +- lib/DbSession/PDO.php | 2 +- lib/DbSession/SQL.php | 2 +- lib/DbSession/dba.php | 2 +- lib/ErrorManager.php | 8 ++-- lib/ExternalReferrer.php | 2 +- lib/FileFinder.php | 2 +- lib/Google.php | 6 +-- lib/HtmlParser.php | 2 +- lib/HttpClient.php | 56 +++++++++++------------ lib/InlineParser.php | 70 ++++++++++++++--------------- lib/PageList.php | 28 ++++++------ lib/PagePerm.php | 2 +- lib/PageType.php | 8 ++-- lib/Request.php | 2 +- lib/RssParser.php | 24 +++++----- lib/SemanticWeb.php | 2 +- lib/TextSearchQuery.php | 50 ++++++++++----------- lib/WikiDB.php | 2 +- lib/WikiDB/backend/ADODB_oci8po.php | 2 +- lib/WikiDB/backend/PearDB.php | 2 +- lib/WikiDB/backend/cvs.php | 16 +++---- lib/WikiDB/backend/file.php | 10 ++--- lib/WikiDB/cvs.php | 2 +- lib/WikiGroup.php | 12 ++--- lib/WikiPlugin.php | 2 +- lib/WikiPluginCached.php | 2 +- lib/WikiTheme.php | 22 ++++----- lib/WikiUser.php | 8 ++-- lib/WikiUser/AdoDb.php | 2 +- lib/WikiUser/BogoLogin.php | 2 +- lib/WikiUser/Db.php | 2 +- lib/WikiUser/File.php | 2 +- lib/WikiUser/FusionForge.php | 2 +- lib/WikiUser/PdoDb.php | 2 +- lib/WikiUser/PearDb.php | 2 +- lib/WikiUser/PersonalPage.php | 2 +- lib/WikiUserNew.php | 20 ++++----- lib/WysiwygEdit.php | 4 +- lib/XmlParser.php | 2 +- lib/diff3.php | 4 +- lib/difflib.php | 20 ++++----- lib/main.php | 2 +- lib/plugin/PageDump.php | 2 +- lib/plugin/PageTrail.php | 2 +- lib/plugin/RateIt.php | 2 +- lib/plugin/RecentChanges.php | 6 +-- lib/plugin/SiteMap.php | 2 +- lib/plugin/SqlResult.php | 2 +- lib/plugin/TeX2png.php | 8 ++-- lib/plugin/UpLoad.php | 4 +- lib/plugin/UserPreferences.php | 2 +- lib/plugin/WikiPoll.php | 2 +- lib/stdlib.php | 10 ++--- lib/upgrade.php | 2 +- lib/wikilens/CustomPrefs.php | 8 ++-- lib/wikilens/PageListColumns.php | 28 +++++------- lib/wikilens/RatingsUser.php | 12 ++--- 60 files changed, 315 insertions(+), 321 deletions(-) diff --git a/lib/AtomParser.php b/lib/AtomParser.php index ac50a7d96..ccc2b69b9 100644 --- a/lib/AtomParser.php +++ b/lib/AtomParser.php @@ -31,41 +31,41 @@ class AtomParser extends XmlParser { // Feed - var $feed = array(); - var $feed_title = ''; - var $feed_links = array(); - var $feed_subtitle = ''; - var $feed_id = ''; - var $feed_updated = ''; - var $feed_authors = array(); - var $feed_contributors = array(); - var $generator = ''; - var $icon = ''; - var $rights = ''; - var $logo = ''; + public $feed = array(); + public $feed_title = ''; + public $feed_links = array(); + public $feed_subtitle = ''; + public $feed_id = ''; + public $feed_updated = ''; + public $feed_authors = array(); + public $feed_contributors = array(); + public $generator = ''; + public $icon = ''; + public $rights = ''; + public $logo = ''; - var $categories = array(); + public $categories = array(); - var $authors = array(); - var $contributors = array(); + public $authors = array(); + public $contributors = array(); // Author, Contributor - var $name = ''; - var $email = ''; - var $uri = ''; + public $name = ''; + public $email = ''; + public $uri = ''; // Entries - var $entries = array(); - var $inside_entry = false; - var $title = ''; - var $updated = ''; - var $published = ''; - var $id = ''; - var $links = array(); - var $summary = ''; + public $entries = array(); + public $inside_entry = false; + public $title = ''; + public $updated = ''; + public $published = ''; + public $id = ''; + public $links = array(); + public $summary = ''; - var $inside_content = false; - var $content = ''; + public $inside_content = false; + public $content = ''; function tag_open($parser, $name, $attrs = '') { diff --git a/lib/BlockParser.php b/lib/BlockParser.php index 7c7bb48ce..6bcb0ad34 100644 --- a/lib/BlockParser.php +++ b/lib/BlockParser.php @@ -54,17 +54,17 @@ class AnchoredRegexpSet_match /** * The matched text. */ - var $match; + public $match; /** * The text following the matched text. */ - var $postmatch; + public $postmatch; /** * Index of the regular expression which matched. */ - var $regexp_ind; + public $regexp_ind; } /** @@ -504,7 +504,7 @@ class TightSubBlock extends SubBlock class BlockMarkup { - var $_re; + public $_re; function _match(&$input, $match) { @@ -528,8 +528,8 @@ class BlockMarkup class Block_blockquote extends BlockMarkup { - var $_depth; - var $_re = '\ +(?=\S)'; + public $_depth; + public $_re = '\ +(?=\S)'; function _match(&$input, $m) { @@ -555,15 +555,15 @@ class Block_blockquote extends BlockMarkup class Block_list extends BlockMarkup { - //var $_tag = 'ol' or 'ul'; - var $_re = '\ {0,4} + //public $_tag = 'ol' or 'ul'; + public $_re = '\ {0,4} (?: \+ | \\#\ (?!\[.*\]) | -(?!-) | [o](?=\ ) | [*]\ (?!(?=\S)[^*]*(?<=\S)[*](?:\\s|[-)}>"\'\\/:.,;!?_*=]) ) )\ *(?=\S)'; - var $_content = array(); + public $_content = array(); function _match(&$input, $m) { @@ -610,7 +610,7 @@ class Block_list extends BlockMarkup class Block_dl extends Block_list { - var $_tag = 'dl'; + public $_tag = 'dl'; function Block_dl() { @@ -663,8 +663,8 @@ class Block_dl extends Block_list class Block_table_dl_defn extends XmlContent { - var $nrows; - var $ncols; + public $nrows; + public $ncols; function Block_table_dl_defn($term, $defn) { @@ -816,7 +816,7 @@ class Block_table_dl_defn extends XmlContent class Block_table_dl extends Block_dl { - var $_tag = 'dl-table'; // phony. + public $_tag = 'dl-table'; // phony. function Block_table_dl() { @@ -860,8 +860,8 @@ class Block_table_dl extends Block_dl class Block_oldlists extends Block_list { - //var $_tag = 'ol', 'ul', or 'dl'; - var $_re = '(?: [*]\ (?!(?=\S)[^*]*(?<=\S)[*](?:\\s|[-)}>"\'\\/:.,;!?_*=])) + //public $_tag = 'ol', 'ul', or 'dl'; + public $_re = '(?: [*]\ (?!(?=\S)[^*]*(?<=\S)[*](?:\\s|[-)}>"\'\\/:.,;!?_*=])) | [#]\ (?! \[ .*? \] ) | ; .*? : ) .*? (?=\S)'; @@ -915,7 +915,7 @@ class Block_oldlists extends Block_list class Block_pre extends BlockMarkup { - var $_re = '<(?:pre|verbatim|nowiki|noinclude)>'; + public $_re = '<(?:pre|verbatim|nowiki|noinclude)>'; function _match(&$input, $m) { @@ -960,7 +960,7 @@ class Block_pre extends BlockMarkup // <<>> class Block_placeholder extends BlockMarkup { - var $_re = '<<<'; + public $_re = '<<<'; function _match(&$input, $m) { @@ -987,7 +987,7 @@ class Block_placeholder extends BlockMarkup class Block_nowiki_wikicreole extends BlockMarkup { - var $_re = '{{{'; + public $_re = '{{{'; function _match(&$input, $m) { @@ -1013,7 +1013,7 @@ class Block_nowiki_wikicreole extends BlockMarkup class Block_plugin extends Block_pre { - var $_re = '<\?plugin(?:-form)?(?!\S)'; + public $_re = '<\?plugin(?:-form)?(?!\S)'; // FIXME: /* 'mail-style-quote'); - var $_re = '>\ ?'; + public $_attr = array('class' => 'mail-style-quote'); + public $_re = '>\ ?'; function _match(&$input, $m) { @@ -1241,8 +1241,8 @@ class Block_email_blockquote extends BlockMarkup class Block_wikicreole_indented extends BlockMarkup { - var $_attr = array('style' => 'margin-left:2em'); - var $_re = ':\ ?'; + public $_attr = array('style' => 'margin-left:2em'); + public $_re = ':\ ?'; function _match(&$input, $m) { @@ -1255,7 +1255,7 @@ class Block_wikicreole_indented extends BlockMarkup class Block_hr extends BlockMarkup { - var $_re = '-{4,}\s*$'; + public $_re = '-{4,}\s*$'; function _match(&$input, $m) { @@ -1267,7 +1267,7 @@ class Block_hr extends BlockMarkup class Block_heading extends BlockMarkup { - var $_re = '!{1,3}'; + public $_re = '!{1,3}'; function _match(&$input, $m) { @@ -1283,7 +1283,7 @@ class Block_heading extends BlockMarkup class Block_heading_wikicreole extends BlockMarkup { - var $_re = '={2,6}'; + public $_re = '={2,6}'; function _match(&$input, $m) { @@ -1303,9 +1303,9 @@ class Block_heading_wikicreole extends BlockMarkup class Block_p extends BlockMarkup { - var $_tag = 'p'; - var $_re = '\S.*'; - var $_text = ''; + public $_tag = 'p'; + public $_re = '\S.*'; + public $_text = ''; function _match(&$input, $m) { @@ -1342,7 +1342,7 @@ class Block_p extends BlockMarkup class Block_divspan extends BlockMarkup { - var $_re = '<(?im)(?: div|span)(?:[^>]*)?>'; + public $_re = '<(?im)(?: div|span)(?:[^>]*)?>'; function _match(&$input, $m) { diff --git a/lib/DbSession/ADODB.php b/lib/DbSession/ADODB.php index 708ecd1fd..65a24c8cd 100644 --- a/lib/DbSession/ADODB.php +++ b/lib/DbSession/ADODB.php @@ -27,7 +27,7 @@ class DbSession_ADODB extends DbSession { - var $_backend_type = "ADODB"; + public $_backend_type = "ADODB"; function DbSession_ADODB($dbh, $table) { diff --git a/lib/DbSession/PDO.php b/lib/DbSession/PDO.php index 2c167990e..be0083ef4 100644 --- a/lib/DbSession/PDO.php +++ b/lib/DbSession/PDO.php @@ -8,7 +8,7 @@ class DbSession_PDO extends DbSession { - var $_backend_type = "PDO"; + public $_backend_type = "PDO"; function DbSession_PDO($dbh, $table) { diff --git a/lib/DbSession/SQL.php b/lib/DbSession/SQL.php index ab460b95d..8e1d845ee 100644 --- a/lib/DbSession/SQL.php +++ b/lib/DbSession/SQL.php @@ -13,7 +13,7 @@ class DbSession_SQL extends DbSession { - var $_backend_type = "SQL"; + public $_backend_type = "SQL"; function DbSession_SQL(&$dbh, $table) { diff --git a/lib/DbSession/dba.php b/lib/DbSession/dba.php index bb10f58b0..3be8eae75 100644 --- a/lib/DbSession/dba.php +++ b/lib/DbSession/dba.php @@ -13,7 +13,7 @@ class DbSession_dba extends DbSession { - var $_backend_type = "dba"; + public $_backend_type = "dba"; function DbSession_dba(&$dbh, $table) { diff --git a/lib/ErrorManager.php b/lib/ErrorManager.php index 1a71517d3..3ac1aaa0e 100644 --- a/lib/ErrorManager.php +++ b/lib/ErrorManager.php @@ -412,22 +412,22 @@ class PhpError /** * The PHP errno */ - //var $errno; + public $errno; /** * The PHP error message. */ - //var $errstr; + public $errstr; /** * The source file where the error occurred. */ - //var $errfile; + public $errfile; /** * The line number (in $this->errfile) where the error occured. */ - //var $errline; + public $errline; /** * Construct a new PhpError. diff --git a/lib/ExternalReferrer.php b/lib/ExternalReferrer.php index 749116ebd..9c5d0e637 100644 --- a/lib/ExternalReferrer.php +++ b/lib/ExternalReferrer.php @@ -24,7 +24,7 @@ if (!function_exists('isExternalReferrer')) { // also defined in stdlib.php class SearchEngines { - var $searchEngines = + public $searchEngines = array( "search.sli.sympatico.ca/" => array("engine" => "Sympatico", "query1" => "query=", "query2" => "", "url" => "http://www1.sympatico.ca/"), "www.search123.com/cgi-bin/" => array("engine" => "Search123", "query1" => "query=", "query2" => "", "url" => "http://www.search123.com/"), diff --git a/lib/FileFinder.php b/lib/FileFinder.php index 0b95c49ee..745e353b7 100644 --- a/lib/FileFinder.php +++ b/lib/FileFinder.php @@ -13,7 +13,7 @@ require_once(dirname(__FILE__) . '/stdlib.php'); */ class FileFinder { - //var $_pathsep, $_path; + public $_pathsep, $_path; /** * Constructor. diff --git a/lib/Google.php b/lib/Google.php index 80aa5aa16..2a1f2f9fd 100644 --- a/lib/Google.php +++ b/lib/Google.php @@ -86,8 +86,8 @@ class GoogleSearchResults { - var $_fields = "documentFiltering,searchComments,estimatedTotalResultsCount,estimateIsExact,searchQuery,startIndex,endIndex,searchTips,directoryCategories,searchTime,resultElements"; - var $resultElements, $results; + public $_fields = "documentFiltering,searchComments,estimatedTotalResultsCount,estimateIsExact,searchQuery,startIndex,endIndex,searchTips,directoryCategories,searchTime,resultElements"; + public $resultElements, $results; function GoogleSearchResults($result) { @@ -145,7 +145,7 @@ class GoogleSearchResults */ class GoogleSearchResult { - var $_fields = "summary,URL,snippet,title,cachedSize,relatedInformationPresent,hostName,directoryCategory,directoryTitle"; + public $_fields = "summary,URL,snippet,title,cachedSize,relatedInformationPresent,hostName,directoryCategory,directoryTitle"; function GoogleSearchResult($result) { diff --git a/lib/HtmlParser.php b/lib/HtmlParser.php index a1edb3fee..1ee1517f7 100644 --- a/lib/HtmlParser.php +++ b/lib/HtmlParser.php @@ -43,7 +43,7 @@ require_once 'lib/XmlParser.php'; class HtmlParser extends XmlParser { - var $dialect, $_handlers, $root; + public $dialect, $_handlers, $root; /** * dialect: "PhpWiki2", "PhpWiki" diff --git a/lib/HttpClient.php b/lib/HttpClient.php index fec498741..e237b8b4a 100644 --- a/lib/HttpClient.php +++ b/lib/HttpClient.php @@ -14,40 +14,40 @@ Todo: proxy support class HttpClient { // Request vars - var $host; - var $port; - var $path; - var $method; - var $postdata = ''; - var $cookies = array(); - var $referer; - var $accept = 'text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,image/jpeg,image/gif,*/*'; - var $accept_encoding = 'gzip'; - var $accept_language = 'en-us'; - var $user_agent = 'Incutio HttpClient v1.0'; - var $boundary = "xYzZY"; // FIXME: check if this string doesn't occur in the data + public $host; + public $port; + public $path; + public $method; + public $postdata = ''; + public $cookies = array(); + public $referer; + public $accept = 'text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,image/jpeg,image/gif,*/*'; + public $accept_encoding = 'gzip'; + public $accept_language = 'en-us'; + public $user_agent = 'Incutio HttpClient v1.0'; + public $boundary = "xYzZY"; // FIXME: check if this string doesn't occur in the data // Options - var $timeout = 10; - var $use_gzip = true; - var $persist_cookies = true; // If true, received cookies are placed in the $this->cookies array ready for the next request + public $timeout = 10; + public $use_gzip = true; + public $persist_cookies = true; // If true, received cookies are placed in the $this->cookies array ready for the next request // Note: This currently ignores the cookie path (and time) completely. Time is not important, // but path could possibly lead to security problems. - var $persist_referers = true; // For each request, sends path of last request as referer - var $debug = false; - var $handle_redirects = true; // Auaomtically redirect if Location or URI header is found - var $max_redirects = 5; - var $headers_only = false; // If true, stops receiving once headers have been read. + public $persist_referers = true; // For each request, sends path of last request as referer + public $debug = false; + public $handle_redirects = true; // Auaomtically redirect if Location or URI header is found + public $max_redirects = 5; + public $headers_only = false; // If true, stops receiving once headers have been read. // Basic authorization variables - var $username; - var $password; + public $username; + public $password; // Response vars - var $status; - var $headers = array(); - var $content = ''; - var $errormsg; + public $status; + public $headers = array(); + public $content = ''; + public $errormsg; // Tracker variables - var $redirect_count = 0; - var $cookie_host = ''; + public $redirect_count = 0; + public $cookie_host = ''; function HttpClient($host = 'localhost', $port = 80) { diff --git a/lib/InlineParser.php b/lib/InlineParser.php index a54c05b00..df4f85d9f 100644 --- a/lib/InlineParser.php +++ b/lib/InlineParser.php @@ -57,19 +57,19 @@ class RegexpSet_match /** * The text leading up the the next match. */ - var $prematch; + public $prematch; /** * The matched text. */ - var $match; + public $match; /** * The text following the matched text. */ - var $postmatch; + public $postmatch; /** * Index of the regular expression which matched. */ - var $regexp_ind; + public $regexp_ind; } /** @@ -237,7 +237,7 @@ class RegexpSet */ class SimpleMarkup { - var $_match_regexp; + public $_match_regexp; /** Get regexp. * @@ -268,7 +268,7 @@ class SimpleMarkup */ class BalancedMarkup { - var $_start_regexp; + public $_start_regexp; /** Get the starting regexp for this rule. * @@ -521,7 +521,7 @@ function LinkBracketLink($bracketlink) class Markup_wikicreolebracketlink extends SimpleMarkup { - var $_match_regexp = "\\#? \\[\\[ .*? [^]\\s] .*? \\]\\]"; + public $_match_regexp = "\\#? \\[\\[ .*? [^]\\s] .*? \\]\\]"; function markup($match) { @@ -533,7 +533,7 @@ class Markup_wikicreolebracketlink extends SimpleMarkup class Markup_bracketlink extends SimpleMarkup { - var $_match_regexp = "\\#? \\[ .*? [^]\\s] .*? \\]"; + public $_match_regexp = "\\#? \\[ .*? [^]\\s] .*? \\]"; function markup($match) { @@ -621,7 +621,7 @@ class Markup_semanticlink extends SimpleMarkup // For :: (relations) only words, no comma, // but for := (attributes) comma and dots are allowed. Units with groupsep. // Ending dots or comma are not part of the link. - var $_match_regexp = "(?: \w+:=\S+(? | <\s*(?:br|BR)\s*\/\s*> )"; + public $_match_regexp = "(?: (? | <\s*(?:br|BR)\s*\/\s*> )"; function markup($match) { @@ -680,7 +680,7 @@ class Markup_linebreak extends SimpleMarkup class Markup_wikicreole_italics extends BalancedMarkup { - var $_start_regexp = "\\/\\/"; + public $_start_regexp = "\\/\\/"; function getEndRegexp($match) { @@ -696,7 +696,7 @@ class Markup_wikicreole_italics extends BalancedMarkup class Markup_wikicreole_bold extends BalancedMarkup { - var $_start_regexp = "\\*\\*"; + public $_start_regexp = "\\*\\*"; function getEndRegexp($match) { @@ -712,7 +712,7 @@ class Markup_wikicreole_bold extends BalancedMarkup class Markup_wikicreole_monospace extends BalancedMarkup { - var $_start_regexp = "\\#\\#"; + public $_start_regexp = "\\#\\#"; function getEndRegexp($match) { @@ -727,7 +727,7 @@ class Markup_wikicreole_monospace extends BalancedMarkup class Markup_wikicreole_underline extends BalancedMarkup { - var $_start_regexp = "\\_\\_"; + public $_start_regexp = "\\_\\_"; function getEndRegexp($match) { @@ -743,7 +743,7 @@ class Markup_wikicreole_underline extends BalancedMarkup class Markup_wikicreole_superscript extends BalancedMarkup { - var $_start_regexp = "\\^\\^"; + public $_start_regexp = "\\^\\^"; function getEndRegexp($match) { @@ -759,7 +759,7 @@ class Markup_wikicreole_superscript extends BalancedMarkup class Markup_wikicreole_subscript extends BalancedMarkup { - var $_start_regexp = ",,"; + public $_start_regexp = ",,"; function getEndRegexp($match) { @@ -775,7 +775,7 @@ class Markup_wikicreole_subscript extends BalancedMarkup class Markup_old_emphasis extends BalancedMarkup { - var $_start_regexp = "''"; + public $_start_regexp = "''"; function getEndRegexp($match) { @@ -850,7 +850,7 @@ class Markup_nestled_emphasis extends BalancedMarkup class Markup_html_emphasis extends BalancedMarkup { - var $_start_regexp = + public $_start_regexp = "<(?: b|big|i|small|tt|em|strong|cite|code|dfn|kbd|samp|s|strike|del|var|sup|sub )>"; function getEndRegexp($match) @@ -867,7 +867,7 @@ class Markup_html_emphasis extends BalancedMarkup class Markup_html_divspan extends BalancedMarkup { - var $_start_regexp = + public $_start_regexp = "<(?: div|span )(?: \s[^>]*)?>"; function getEndRegexp($match) @@ -899,7 +899,7 @@ class Markup_html_abbr extends BalancedMarkup { //rurban: abbr|acronym need an optional title tag. //sf.net bug #728595 - var $_start_regexp = "<(?: abbr|acronym )(?: [^>]*)?>"; + public $_start_regexp = "<(?: abbr|acronym )(?: [^>]*)?>"; function getEndRegexp($match) { @@ -936,8 +936,8 @@ class Markup_html_abbr extends BalancedMarkup class Markup_color extends BalancedMarkup { // %color=blue% blue text %% and back to normal - var $_start_regexp = "%color=(?: [^%]*)%"; - var $_end_regexp = "%%"; + public $_start_regexp = "%color=(?: [^%]*)%"; + public $_end_regexp = "%%"; function markup($match, $body) { @@ -984,7 +984,7 @@ class Markup_color extends BalancedMarkup // <<>> class Markup_placeholder extends SimpleMarkup { - var $_match_regexp = '<<<.*?>>>'; + public $_match_regexp = '<<<.*?>>>'; function markup($match) { @@ -996,7 +996,7 @@ class Markup_placeholder extends SimpleMarkup // class Markup_html_comment extends SimpleMarkup { - var $_match_regexp = ''; + public $_match_regexp = ''; function markup($match) { @@ -1008,7 +1008,7 @@ class Markup_html_comment extends SimpleMarkup // like: '< ?plugin PopularNearby ? >' class Markup_plugin extends SimpleMarkup { - var $_match_regexp = '<\?plugin(?:-form)?\s[^\n]+?\?>'; + public $_match_regexp = '<\?plugin(?:-form)?\s[^\n]+?\?>'; function markup($match) { @@ -1019,7 +1019,7 @@ class Markup_plugin extends SimpleMarkup // Special version for single-line Wikicreole plugins formatting. class Markup_plugin_wikicreole extends SimpleMarkup { - var $_match_regexp = '<<[^\n]+?>>'; + public $_match_regexp = '<<[^\n]+?>>'; function markup($match) { @@ -1034,7 +1034,7 @@ class Markup_plugin_wikicreole extends SimpleMarkup // PLUGIN_MARKUP_MAP = "html:RawHtml dot:GraphViz toc:CreateToc amath:AsciiMath richtable:RichTable include:IncludePage tex:TexToPng" class Markup_xml_plugin extends BalancedMarkup { - //var $_start_regexp = "<(?: ".join('|',PLUGIN_MARKUP_MAP)." )(?: \s[^>]*)>"; + //public $_start_regexp = "<(?: ".join('|',PLUGIN_MARKUP_MAP)." )(?: \s[^>]*)>"; function getStartRegexp() { @@ -1076,7 +1076,7 @@ class Markup_xml_plugin extends BalancedMarkup */ class Markup_nowiki extends SimpleMarkup { - var $_match_regexp = '.*?<\/nowiki>'; + public $_match_regexp = '.*?<\/nowiki>'; function markup($match) { @@ -1092,7 +1092,7 @@ class Markup_nowiki extends SimpleMarkup */ class Markup_wikicreole_preformatted extends SimpleMarkup { - var $_match_regexp = '\{\{\{.*?\}\}\}'; + public $_match_regexp = '\{\{\{.*?\}\}\}'; function markup($match) { @@ -1116,7 +1116,7 @@ class Markup_wikicreole_preformatted extends SimpleMarkup class Markup_template_plugin extends SimpleMarkup { // patch #1732793: allow \n, mult. {{ }} in one line, and single letters - var $_match_regexp = '\{\{.*?\}\}'; + public $_match_regexp = '\{\{.*?\}\}'; function markup($match) { @@ -1213,7 +1213,7 @@ class Markup_template_plugin extends SimpleMarkup class Markup_html_entities extends SimpleMarkup { - //var $_match_regexp = '(: \.\.\.|\-\-|\-\-\-|\(C\) )'; + //public $_match_regexp = '(: \.\.\.|\-\-|\-\-\-|\(C\) )'; function Markup_html_entities() { @@ -1238,7 +1238,7 @@ class Markup_html_entities extends SimpleMarkup class Markup_isonumchars extends SimpleMarkup { - var $_match_regexp = '\&\#\d{2,5};'; + public $_match_regexp = '\&\#\d{2,5};'; function markup($match) { @@ -1249,7 +1249,7 @@ class Markup_isonumchars extends SimpleMarkup class Markup_isohexchars extends SimpleMarkup { // hexnums, like ¤ <=> ¤ - var $_match_regexp = '\&\#x[0-9a-fA-F]{2,4};'; + public $_match_regexp = '\&\#x[0-9a-fA-F]{2,4};'; function markup($match) { @@ -1261,8 +1261,8 @@ class Markup_isohexchars extends SimpleMarkup class InlineTransformer { - var $_regexps = array(); - var $_markup = array(); + public $_regexps = array(); + public $_markup = array(); function InlineTransformer($markup_types = false) { diff --git a/lib/PageList.php b/lib/PageList.php index 90e513a48..3fbeb77b2 100644 --- a/lib/PageList.php +++ b/lib/PageList.php @@ -50,7 +50,7 @@ */ class _PageList_Column_base { - var $_tdattr = array(); + public $_tdattr = array(); function _PageList_Column_base($default_heading, $align = false) { @@ -532,7 +532,7 @@ class _PageList_Column_creator extends _PageList_Column_author class _PageList_Column_pagename extends _PageList_Column_base { - var $_field = 'pagename'; + public $_field = 'pagename'; function _PageList_Column_pagename() { @@ -598,18 +598,18 @@ class _PageList_Column_acl extends _PageList_Column class PageList { - var $_group_rows = 3; - var $_columns = array(); - var $_columnsMap = array(); // Maps column name to column number. - var $_excluded_pages = array(); - var $_pages = array(); - var $_caption = ""; - var $_pagename_seen = false; - var $_types = array(); - var $_options = array(); - var $_selected = array(); - var $_sortby = array(); - var $_maxlen = 0; + public $_group_rows = 3; + public $_columns = array(); + public $_columnsMap = array(); // Maps column name to column number. + public $_excluded_pages = array(); + public $_pages = array(); + public $_caption = ""; + public $_pagename_seen = false; + public $_types = array(); + public $_options = array(); + public $_selected = array(); + public $_sortby = array(); + public $_maxlen = 0; function PageList($columns = false, $exclude = false, $options = false) { diff --git a/lib/PagePerm.php b/lib/PagePerm.php index 43053c856..d2ce62ca2 100644 --- a/lib/PagePerm.php +++ b/lib/PagePerm.php @@ -353,7 +353,7 @@ function getAccessDescription($access) */ class PagePermission { - var $perm; + public $perm; function PagePermission($hash = array()) { diff --git a/lib/PageType.php b/lib/PageType.php index 137a50e06..1d18fb061 100644 --- a/lib/PageType.php +++ b/lib/PageType.php @@ -465,7 +465,7 @@ class FakePageRevision // abstract base class class PageFormatter_attach extends PageFormatter { - var $type, $prefix; + public $type, $prefix; // Display templated contents for wikiblog, comment and wikiforum function format($text) @@ -491,17 +491,17 @@ class PageFormatter_attach extends PageFormatter class PageFormatter_wikiblog extends PageFormatter_attach { - var $type = 'wikiblog', $prefix = "BLOG"; + public $type = 'wikiblog', $prefix = "BLOG"; } class PageFormatter_comment extends PageFormatter_attach { - var $type = 'comment', $prefix = "COMMENT"; + public $type = 'comment', $prefix = "COMMENT"; } class PageFormatter_wikiforum extends PageFormatter_attach { - var $type = 'wikiforum', $prefix = "FORUM"; + public $type = 'wikiforum', $prefix = "FORUM"; } /** wikiabuse for htmlarea editing. not yet used. diff --git a/lib/Request.php b/lib/Request.php index 945c98631..fcf01b2ae 100644 --- a/lib/Request.php +++ b/lib/Request.php @@ -22,7 +22,7 @@ class Request { - var $args = array(); + public $args = array(); function Request() { diff --git a/lib/RssParser.php b/lib/RssParser.php index 37f47bf8c..b8105816f 100644 --- a/lib/RssParser.php +++ b/lib/RssParser.php @@ -45,18 +45,18 @@ class RSSParser extends XmlParser { - var $title = ""; - var $author = ""; - var $pubDate = ""; - var $link = ""; - var $description = ""; - var $inside_item = false; - var $list_items = false; - var $item = array(); - var $items; - var $channel; - var $divers = ""; - var $date = ""; + public $title = ""; + public $author = ""; + public $pubDate = ""; + public $link = ""; + public $description = ""; + public $inside_item = false; + public $list_items = false; + public $item = array(); + public $items; + public $channel; + public $divers = ""; + public $date = ""; function tag_open($parser, $name, $attrs = '') { diff --git a/lib/SemanticWeb.php b/lib/SemanticWeb.php index 09dc5696a..849b98a2c 100644 --- a/lib/SemanticWeb.php +++ b/lib/SemanticWeb.php @@ -286,7 +286,7 @@ class SemanticAttributeSearchQuery extends NumericSearchQuery { /* - var $base_units = array('m' => explode(',','km,miles,cm,dm,mm,ft,inch,inches,meter'), + public $base_units = array('m' => explode(',','km,miles,cm,dm,mm,ft,inch,inches,meter'), 'm^2' => explode(',','km^2,ha,cm^2,mi^2'), 'm^3' => explode(',','km^3,lit,cm^3,dm^3,gallons'), ); diff --git a/lib/TextSearchQuery.php b/lib/TextSearchQuery.php index eeb588fa3..c84fa8a4e 100644 --- a/lib/TextSearchQuery.php +++ b/lib/TextSearchQuery.php @@ -670,8 +670,8 @@ class NumericSearchQuery */ class TextSearchQuery_node { - var $op = 'VOID'; - var $_op = 0; + public $op = 'VOID'; + public $_op = 0; /** * Optimize this node. @@ -718,8 +718,8 @@ class TextSearchQuery_node class TextSearchQuery_node_word extends TextSearchQuery_node { - var $op = "WORD"; - var $_op = TSQ_TOK_WORD; + public $op = "WORD"; + public $_op = TSQ_TOK_WORD; function TextSearchQuery_node_word($word) { @@ -745,8 +745,8 @@ class TextSearchQuery_node_word class TextSearchQuery_node_all extends TextSearchQuery_node { - var $op = "ALL"; - var $_op = TSQ_TOK_ALL; + public $op = "ALL"; + public $_op = TSQ_TOK_ALL; function regexp() { @@ -762,8 +762,8 @@ class TextSearchQuery_node_all class TextSearchQuery_node_starts_with extends TextSearchQuery_node_word { - var $op = "STARTS_WITH"; - var $_op = TSQ_TOK_STARTS_WITH; + public $op = "STARTS_WITH"; + public $_op = TSQ_TOK_STARTS_WITH; function regexp() { @@ -789,8 +789,8 @@ class TextSearchQuery_phrase_starts_with class TextSearchQuery_node_ends_with extends TextSearchQuery_node_word { - var $op = "ENDS_WITH"; - var $_op = TSQ_TOK_ENDS_WITH; + public $op = "ENDS_WITH"; + public $_op = TSQ_TOK_ENDS_WITH; function regexp() { @@ -816,8 +816,8 @@ class TextSearchQuery_phrase_ends_with class TextSearchQuery_node_exact extends TextSearchQuery_node_word { - var $op = "EXACT"; - var $_op = TSQ_TOK_EXACT; + public $op = "EXACT"; + public $_op = TSQ_TOK_EXACT; function regexp() { @@ -833,8 +833,8 @@ class TextSearchQuery_node_exact class TextSearchQuery_node_regex // posix regex. FIXME! extends TextSearchQuery_node_word { - var $op = "REGEX"; // using REGEXP or ~ extension - var $_op = TSQ_TOK_REGEX; + public $op = "REGEX"; // using REGEXP or ~ extension + public $_op = TSQ_TOK_REGEX; function regexp() { @@ -850,8 +850,8 @@ class TextSearchQuery_node_regex // posix regex. FIXME! class TextSearchQuery_node_regex_glob extends TextSearchQuery_node_regex { - var $op = "REGEX_GLOB"; - var $_op = TSQ_TOK_REGEX_GLOB; + public $op = "REGEX_GLOB"; + public $_op = TSQ_TOK_REGEX_GLOB; function regexp() { @@ -862,8 +862,8 @@ class TextSearchQuery_node_regex_glob class TextSearchQuery_node_regex_pcre // how to handle pcre modifiers? /i extends TextSearchQuery_node_regex { - var $op = "REGEX_PCRE"; - var $_op = TSQ_TOK_REGEX_PCRE; + public $op = "REGEX_PCRE"; + public $_op = TSQ_TOK_REGEX_PCRE; function regexp() { @@ -874,8 +874,8 @@ class TextSearchQuery_node_regex_pcre // how to handle pcre modifiers? /i class TextSearchQuery_node_regex_sql extends TextSearchQuery_node_regex { - var $op = "REGEX_SQL"; // using LIKE - var $_op = TSQ_TOK_REGEX_SQL; + public $op = "REGEX_SQL"; // using LIKE + public $_op = TSQ_TOK_REGEX_SQL; function regexp() { @@ -894,8 +894,8 @@ class TextSearchQuery_node_regex_sql class TextSearchQuery_node_not extends TextSearchQuery_node { - var $op = "NOT"; - var $_op = TSQ_TOK_NOT; + public $op = "NOT"; + public $_op = TSQ_TOK_NOT; function TextSearchQuery_node_not($leaf) { @@ -929,7 +929,7 @@ class TextSearchQuery_node_not class TextSearchQuery_node_binop extends TextSearchQuery_node { - var $_op = TSQ_TOK_BINOP; + public $_op = TSQ_TOK_BINOP; function TextSearchQuery_node_binop($leaves) { @@ -976,7 +976,7 @@ class TextSearchQuery_node_binop class TextSearchQuery_node_and extends TextSearchQuery_node_binop { - var $op = "AND"; + public $op = "AND"; function optimize() { @@ -1028,7 +1028,7 @@ class TextSearchQuery_node_and class TextSearchQuery_node_or extends TextSearchQuery_node_binop { - var $op = "OR"; + public $op = "OR"; function regexp() { diff --git a/lib/WikiDB.php b/lib/WikiDB.php index 4f17e206b..210addce6 100644 --- a/lib/WikiDB.php +++ b/lib/WikiDB.php @@ -1548,7 +1548,7 @@ class WikiDB_Page */ class WikiDB_PageRevision { - //var $_transformedContent = false; // set by WikiDB_Page::save() + public $_transformedContent = false; // set by WikiDB_Page::save() function WikiDB_PageRevision(&$wikidb, $pagename, $version, $versiondata = false) diff --git a/lib/WikiDB/backend/ADODB_oci8po.php b/lib/WikiDB/backend/ADODB_oci8po.php index b06876d8d..6ec96c184 100644 --- a/lib/WikiDB/backend/ADODB_oci8po.php +++ b/lib/WikiDB/backend/ADODB_oci8po.php @@ -10,7 +10,7 @@ require_once 'lib/WikiDB/backend/ADODB.php'; class WikiDB_backend_ADODB_oci8po extends WikiDB_backend_ADODB { - var $_prefix; + public $_prefix; /** * Constructor. diff --git a/lib/WikiDB/backend/PearDB.php b/lib/WikiDB/backend/PearDB.php index 05ec49e34..605459996 100644 --- a/lib/WikiDB/backend/PearDB.php +++ b/lib/WikiDB/backend/PearDB.php @@ -5,7 +5,7 @@ require_once 'lib/WikiDB/backend.php'; class WikiDB_backend_PearDB extends WikiDB_backend { - var $_dbh; + public $_dbh; function WikiDB_backend_PearDB($dbparams) { diff --git a/lib/WikiDB/backend/cvs.php b/lib/WikiDB/backend/cvs.php index 2ca52ccab..1cc7a3b2b 100644 --- a/lib/WikiDB/backend/cvs.php +++ b/lib/WikiDB/backend/cvs.php @@ -39,10 +39,10 @@ define('CVS_MR_FILE', '.most_recent'); class WikiDB_backend_cvs extends WikiDB_backend { - var $_docDir; - var $_repository; - var $_module_name; - var $_debug_file; + public $_docDir; + public $_repository; + public $_module_name; + public $_debug_file; /** * In the following parameters should be defined in dbparam: @@ -924,7 +924,7 @@ class WikiDB_backend_cvs class Cvs_Backend_Array_Iterator extends WikiDB_backend_iterator { - var $_array; + public $_array; function Cvs_Backend_Iterator($arrayValue = Array()) { @@ -953,8 +953,8 @@ class Cvs_Backend_Array_Iterator class Cvs_Backend_Full_Search_Iterator extends Cvs_Backend_Array_Iterator { - var $_searchString = ''; - var $_docDir = ""; + public $_searchString = ''; + public $_docDir = ""; function Cvs_Backend_Title_Search_Iterator($arrayValue = Array(), $searchString = "", @@ -1000,7 +1000,7 @@ class Cvs_Backend_Full_Search_Iterator class Cvs_Backend_Title_Search_Iterator extends Cvs_Backend_Array_Iterator { - var $_searchString = ''; + public $_searchString = ''; function Cvs_Backend_Title_Search_Iterator($arrayValue = Array(), $searchString = "") diff --git a/lib/WikiDB/backend/file.php b/lib/WikiDB/backend/file.php index c7556b893..a8ead154d 100644 --- a/lib/WikiDB/backend/file.php +++ b/lib/WikiDB/backend/file.php @@ -46,12 +46,12 @@ require_once 'lib/ErrorManager.php'; class WikiDB_backend_file extends WikiDB_backend { - var $data_dir; - var $_dir_names; + public $data_dir; + public $_dir_names; - var $_page_data; // temporarily stores the pagedata (via _loadPageData) - var $_page_version_data; // temporarily stores the versiondata (via _loadVersionData) - var $_latest_versions; // temporarily stores the latest version-numbers (for every pagename) + public $_page_data; // temporarily stores the pagedata (via _loadPageData) + public $_page_version_data; // temporarily stores the versiondata (via _loadVersionData) + public $_latest_versions; // temporarily stores the latest version-numbers (for every pagename) function WikiDB_backend_file($dbparam) { diff --git a/lib/WikiDB/cvs.php b/lib/WikiDB/cvs.php index 432bb9fd3..43c7a2fc8 100644 --- a/lib/WikiDB/cvs.php +++ b/lib/WikiDB/cvs.php @@ -15,7 +15,7 @@ require_once 'lib/WikiDB/backend/cvs.php'; class WikiDB_cvs extends WikiDB { - var $_backend; + public $_backend; /** * Constructor requires the DB parameters. diff --git a/lib/WikiGroup.php b/lib/WikiGroup.php index b2f314967..919d0835f 100644 --- a/lib/WikiGroup.php +++ b/lib/WikiGroup.php @@ -59,15 +59,15 @@ define('GROUP_CREATOR', _("Creator")); class WikiGroup { /** User name */ - var $username = ''; + public $username = ''; /** User object if different from current user */ - var $user; + public $user; /** The global WikiRequest object */ - //var $request; + //public $request; /** Array of groups $username is confirmed to belong to */ - var $membership; + public $membership; /** boolean if not the current user */ - var $not_current = false; + public $not_current = false; /** * Initializes a WikiGroup object which should never happen. Use: @@ -629,7 +629,7 @@ class GroupWikiPage extends WikiGroup class GroupDb extends WikiGroup { - var $_is_member, $_group_members, $_user_groups; + public $_is_member, $_group_members, $_user_groups; /** * Constructor diff --git a/lib/WikiPlugin.php b/lib/WikiPlugin.php index f1b7b1dba..402769b15 100644 --- a/lib/WikiPlugin.php +++ b/lib/WikiPlugin.php @@ -433,7 +433,7 @@ class WikiPlugin class WikiPluginLoader { - var $_errors; + public $_errors; function expandPI($pi, &$request, &$markup, $basepage = false) { diff --git a/lib/WikiPluginCached.php b/lib/WikiPluginCached.php index 3248d6252..069b552d5 100644 --- a/lib/WikiPluginCached.php +++ b/lib/WikiPluginCached.php @@ -58,7 +58,7 @@ define('PLUGIN_CACHED_STATIC', 128); // make it available via /uploads/, not via */ class WikiPluginCached extends WikiPlugin { - var $_static; + public $_static; /** * Produces URL and id number from plugin arguments which later on, diff --git a/lib/WikiTheme.php b/lib/WikiTheme.php index 47e613d09..d3ec53c11 100644 --- a/lib/WikiTheme.php +++ b/lib/WikiTheme.php @@ -179,8 +179,8 @@ function Button($action, $label = false, $page_or_rev = false, $options = false) class WikiTheme { - var $HTML_DUMP_SUFFIX = ''; - var $DUMP_MODE = false, $dumped_images, $dumped_css; + public $HTML_DUMP_SUFFIX = ''; + public $DUMP_MODE = false, $dumped_images, $dumped_css; /** * noinit: Do not initialize unnecessary items in default_theme fallback twice. @@ -316,10 +316,10 @@ class WikiTheme // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_strftime.2c_.wcsftime.asp // As a result, we have to use %d, and strip out leading zeros ourselves. - var $_dateFormat = "%B %d, %Y"; - var $_timeFormat = "%I:%M %p"; + public $_dateFormat = "%B %d, %Y"; + public $_timeFormat = "%I:%M %p"; - var $_showModTime = true; + public $_showModTime = true; /** * Set format string used for dates. @@ -566,7 +566,7 @@ class WikiTheme // //////////////////////////////////////////////////////////////// - var $_autosplitWikiWords = false; + public $_autosplitWikiWords = false; function setAutosplitWikiWords($autosplit = true) { @@ -581,7 +581,7 @@ class WikiTheme return $wikiword; } - var $_anonEditUnknownLinks = true; + public $_anonEditUnknownLinks = true; function setAnonEditUnknownLinks($anonedit = true) { @@ -707,7 +707,7 @@ class WikiTheme // Images and Icons // //////////////////////////////////////////////////////////////// - var $_imageAliases = array(); + public $_imageAliases = array(); /** * @@ -772,7 +772,7 @@ class WikiTheme return false; } - var $_linkIcon = 'front'; // or 'after' or 'no'. + public $_linkIcon = 'front'; // or 'after' or 'no'. // maybe also 'spanall': there is a scheme currently in effect with front, which // spans the icon only to the first, to let the next words wrap on line breaks // see stdlib.php:PossiblyGlueIconToText() @@ -1076,7 +1076,7 @@ class WikiTheme } //---------------------------------------------------------------- - var $_buttonSeparator = "\n | "; + public $_buttonSeparator = "\n | "; function setButtonSeparator($separator) { @@ -1834,7 +1834,7 @@ class SidebarBox class PluginSidebarBox extends SidebarBox { - var $_plugin, $_args = false, $_basepage = false; + public $_plugin, $_args = false, $_basepage = false; function PluginSidebarBox($name, $args = false, $basepage = false) { diff --git a/lib/WikiUser.php b/lib/WikiUser.php index 55b5d6b1d..a5286d285 100644 --- a/lib/WikiUser.php +++ b/lib/WikiUser.php @@ -66,10 +66,10 @@ function UpgradeUser($olduser, $user) */ class WikiUser { - var $_userid = false; - var $_level = false; - var $_request, $_dbi, $_authdbi, $_homepage; - var $_authmethod = '', $_authhow = ''; + public $_userid = false; + public $_level = false; + public $_request, $_dbi, $_authdbi, $_homepage; + public $_authmethod = '', $_authhow = ''; /** * Constructor. diff --git a/lib/WikiUser/AdoDb.php b/lib/WikiUser/AdoDb.php index 2f1bdcb5c..6d175de94 100644 --- a/lib/WikiUser/AdoDb.php +++ b/lib/WikiUser/AdoDb.php @@ -36,7 +36,7 @@ class _AdoDbPassUser * @tables: user */ { - var $_authmethod = 'AdoDb'; + public $_authmethod = 'AdoDb'; function _AdoDbPassUser($UserName = '', $prefs = false) { diff --git a/lib/WikiUser/BogoLogin.php b/lib/WikiUser/BogoLogin.php index f075c48dc..2a8371aab 100644 --- a/lib/WikiUser/BogoLogin.php +++ b/lib/WikiUser/BogoLogin.php @@ -26,7 +26,7 @@ class _BogoLoginPassUser extends _PassUser { - var $_authmethod = 'BogoLogin'; + public $_authmethod = 'BogoLogin'; function userExists() { diff --git a/lib/WikiUser/Db.php b/lib/WikiUser/Db.php index 7f1a7e7f3..e2fbca99e 100644 --- a/lib/WikiUser/Db.php +++ b/lib/WikiUser/Db.php @@ -45,7 +45,7 @@ class _DbPassUser extends _PassUser { - var $_authselect, $_authupdate, $_authcreate; + public $_authselect, $_authupdate, $_authcreate; // This can only be called from _PassUser, because the parent class // sets the auth_dbi and pref methods, before this class is initialized. diff --git a/lib/WikiUser/File.php b/lib/WikiUser/File.php index c2e18f475..9049db46f 100644 --- a/lib/WikiUser/File.php +++ b/lib/WikiUser/File.php @@ -29,7 +29,7 @@ class _FilePassUser * Preferences are handled in _PassUser */ { - var $_file, $_may_change; + public $_file, $_may_change; // This can only be called from _PassUser, because the parent class // sets the pref methods, before this class is initialized. diff --git a/lib/WikiUser/FusionForge.php b/lib/WikiUser/FusionForge.php index e31b6bd2a..142dcf219 100644 --- a/lib/WikiUser/FusionForge.php +++ b/lib/WikiUser/FusionForge.php @@ -26,7 +26,7 @@ class _FusionForgePassUser extends _PassUser { - var $_is_external = 0; + public $_is_external = 0; function _FusionForgePassUser($UserName = '', $prefs = false) { diff --git a/lib/WikiUser/PdoDb.php b/lib/WikiUser/PdoDb.php index 72063b82a..30a0e366a 100644 --- a/lib/WikiUser/PdoDb.php +++ b/lib/WikiUser/PdoDb.php @@ -33,7 +33,7 @@ class _PdoDbPassUser * @tables: pref */ { - var $_authmethod = 'PDODb'; + public $_authmethod = 'PDODb'; function _PdoDbPassUser($UserName = '', $prefs = false) { diff --git a/lib/WikiUser/PearDb.php b/lib/WikiUser/PearDb.php index f7c74bd6b..118bd8292 100644 --- a/lib/WikiUser/PearDb.php +++ b/lib/WikiUser/PearDb.php @@ -31,7 +31,7 @@ class _PearDbPassUser * @tables: pref */ { - var $_authmethod = 'PearDb'; + public $_authmethod = 'PearDb'; function _PearDbPassUser($UserName = '', $prefs = false) { diff --git a/lib/WikiUser/PersonalPage.php b/lib/WikiUser/PersonalPage.php index 88be726b2..61e3b6a88 100644 --- a/lib/WikiUser/PersonalPage.php +++ b/lib/WikiUser/PersonalPage.php @@ -27,7 +27,7 @@ class _PersonalPagePassUser extends _PassUser { - var $_authmethod = 'PersonalPage'; + public $_authmethod = 'PersonalPage'; /* Very loose checking, since we properly quote the PageName. Just trim spaces, ... See lib/stdlib.php diff --git a/lib/WikiUserNew.php b/lib/WikiUserNew.php index 5c7eb3ca5..bb9741f6d 100644 --- a/lib/WikiUserNew.php +++ b/lib/WikiUserNew.php @@ -367,10 +367,10 @@ function UserExists($UserName) */ class _WikiUser { - var $_userid = ''; - var $_level = WIKIAUTH_ANON; - var $_prefs = false; - var $_HomePagehandle = false; + public $_userid = ''; + public $_level = WIKIAUTH_ANON; + public $_prefs = false; + public $_HomePagehandle = false; // constructor function _WikiUser($UserName = '', $prefs = false) @@ -721,7 +721,7 @@ class _WikiUser class _AnonUser extends _WikiUser { - var $_level = WIKIAUTH_ANON; // var in php-5.0.0RC1 deprecated + public $_level = WIKIAUTH_ANON; /** Anon only gets to load and save prefs in a cookie, that's it. */ @@ -870,7 +870,7 @@ class _AnonUser class _ForbiddenUser extends _AnonUser { - var $_level = WIKIAUTH_FORBIDDEN; + public $_level = WIKIAUTH_FORBIDDEN; function checkPass($submitted_password) { @@ -931,8 +931,8 @@ class _PassUser * @tables: pref */ { - var $_auth_dbi, $_prefs; - var $_current_method, $_current_index; + public $_auth_dbi, $_prefs; + public $_current_method, $_current_index; // check and prepare the auth and pref methods only once function _PassUser($UserName = '', $prefs = false) @@ -1483,7 +1483,7 @@ class _AdminUser class _UserPreference { - var $default_value; + public $default_value; function _UserPreference($default_value) { @@ -1928,7 +1928,7 @@ function ValidateMail($email, $noconnect = false) */ class UserPreferences { - var $notifyPagesAll; + public $notifyPagesAll; function UserPreferences($saved_prefs = false) { diff --git a/lib/WysiwygEdit.php b/lib/WysiwygEdit.php index 1ee24d8b9..8e0554b7f 100644 --- a/lib/WysiwygEdit.php +++ b/lib/WysiwygEdit.php @@ -102,7 +102,7 @@ class Markup_html_simple_tag extends Markup_html_emphasis class Markup_html_p extends BalancedMarkup { - var $_start_regexp = "<(?:p|P)( class=\".*\")?>"; + public $_start_regexp = "<(?:p|P)( class=\".*\")?>"; function getEndRegexp($match) { @@ -118,7 +118,7 @@ class Markup_html_p extends BalancedMarkup //'text' => '*text*' class Markup_html_spanbold extends BalancedMarkup { - var $_start_regexp = "<(?:span|SPAN) style=\"FONT-WEIGHT: bold\">"; + public $_start_regexp = "<(?:span|SPAN) style=\"FONT-WEIGHT: bold\">"; function getEndRegexp($match) { diff --git a/lib/XmlParser.php b/lib/XmlParser.php index 3424bacea..b1eb7c9af 100644 --- a/lib/XmlParser.php +++ b/lib/XmlParser.php @@ -50,7 +50,7 @@ class XmlParser { - var $_parser, $root, $current, $previous, $parent; + public $_parser, $root, $current, $previous, $parent; function XmlParser($encoding = '') { // "ISO-8859-1" diff --git a/lib/diff3.php b/lib/diff3.php index f3df54d7f..c8535222d 100644 --- a/lib/diff3.php +++ b/lib/diff3.php @@ -12,7 +12,7 @@ require_once 'lib/difflib.php'; class _Diff3_Block { - var $type = 'diff3'; + public $type = 'diff3'; function _Diff3_Block($orig = false, $final1 = false, $final2 = false) { @@ -42,7 +42,7 @@ class _Diff3_Block class _Diff3_CopyBlock extends _Diff3_Block { - var $type = 'copy'; + public $type = 'copy'; function _Diff3_CopyBlock($lines = false) { diff --git a/lib/difflib.php b/lib/difflib.php index 209168bdd..5fddb09bc 100644 --- a/lib/difflib.php +++ b/lib/difflib.php @@ -10,9 +10,9 @@ class _DiffOp { - var $type; - var $orig; - var $final; + public $type; + public $orig; + public $final; function reverse() { @@ -32,7 +32,7 @@ class _DiffOp class _DiffOp_Copy extends _DiffOp { - var $type = 'copy'; + public $type = 'copy'; function _DiffOp_Copy($orig, $final = false) { @@ -50,7 +50,7 @@ class _DiffOp_Copy extends _DiffOp class _DiffOp_Delete extends _DiffOp { - var $type = 'delete'; + public $type = 'delete'; function _DiffOp_Delete($lines) { @@ -66,7 +66,7 @@ class _DiffOp_Delete extends _DiffOp class _DiffOp_Add extends _DiffOp { - var $type = 'add'; + public $type = 'add'; function _DiffOp_Add($lines) { @@ -82,7 +82,7 @@ class _DiffOp_Add extends _DiffOp class _DiffOp_Change extends _DiffOp { - var $type = 'change'; + public $type = 'change'; function _DiffOp_Change($orig, $final) { @@ -505,7 +505,7 @@ class _DiffEngine */ class Diff { - var $edits; + public $edits; /** * Constructor. @@ -713,7 +713,7 @@ class DiffFormatter * This should be left at zero for this class, but subclasses * may want to set this to other values. */ - var $leading_context_lines = 0; + public $leading_context_lines = 0; /** * Number of trailing context "lines" to preserve. @@ -721,7 +721,7 @@ class DiffFormatter * This should be left at zero for this class, but subclasses * may want to set this to other values. */ - var $trailing_context_lines = 0; + public $trailing_context_lines = 0; /** * Format a diff. diff --git a/lib/main.php b/lib/main.php index 294519864..8d81d6907 100644 --- a/lib/main.php +++ b/lib/main.php @@ -50,7 +50,7 @@ function mayAccessPage($access, $pagename) class WikiRequest extends Request { - var $_dbi; + public $_dbi; function WikiRequest() { diff --git a/lib/plugin/PageDump.php b/lib/plugin/PageDump.php index ec5cd86fc..65189417c 100644 --- a/lib/plugin/PageDump.php +++ b/lib/plugin/PageDump.php @@ -50,7 +50,7 @@ class WikiPlugin_PageDump extends WikiPlugin { - var $MessageId; + public $MessageId; function getName() { diff --git a/lib/plugin/PageTrail.php b/lib/plugin/PageTrail.php index 66cb296c3..11b783b98 100644 --- a/lib/plugin/PageTrail.php +++ b/lib/plugin/PageTrail.php @@ -38,7 +38,7 @@ if (!defined('PAGETRAIL_ARROW')) class WikiPlugin_PageTrail extends WikiPlugin { - var $def_numberlinks = 5; + public $def_numberlinks = 5; function getName() { diff --git a/lib/plugin/RateIt.php b/lib/plugin/RateIt.php index 7d22a160c..7a4d8ff4d 100644 --- a/lib/plugin/RateIt.php +++ b/lib/plugin/RateIt.php @@ -85,7 +85,7 @@ class WikiPlugin_RateIt extends WikiPlugin { static $toBeUniq = 1; - var $idTop = ''; + public $idTop = ''; function getName() { diff --git a/lib/plugin/RecentChanges.php b/lib/plugin/RecentChanges.php index 5021a939c..06f63bae9 100644 --- a/lib/plugin/RecentChanges.php +++ b/lib/plugin/RecentChanges.php @@ -25,8 +25,8 @@ include_once 'lib/WikiPlugin.php'; class _RecentChanges_Formatter { - var $_absurls = false; - var $action = "RecentChanges"; + public $_absurls = false; + public $action = "RecentChanges"; function _RecentChanges_Formatter($rc_args) { @@ -817,7 +817,7 @@ class _RecentChanges_BoxFormatter class _RecentChanges_RssFormatter extends _RecentChanges_Formatter { - var $_absurls = true; + public $_absurls = true; function time($rev) { diff --git a/lib/plugin/SiteMap.php b/lib/plugin/SiteMap.php index ca0673779..a5d42414b 100644 --- a/lib/plugin/SiteMap.php +++ b/lib/plugin/SiteMap.php @@ -45,7 +45,7 @@ require_once 'lib/PageList.php'; class WikiPlugin_SiteMap extends WikiPlugin { - var $_pagename; + public $_pagename; function getName() { diff --git a/lib/plugin/SqlResult.php b/lib/plugin/SqlResult.php index 992bd1777..af481a4f3 100644 --- a/lib/plugin/SqlResult.php +++ b/lib/plugin/SqlResult.php @@ -61,7 +61,7 @@ require_once 'lib/PageList.php'; class WikiPlugin_SqlResult extends WikiPlugin { - var $_args; + public $_args; function getName() { diff --git a/lib/plugin/TeX2png.php b/lib/plugin/TeX2png.php index 85960ebbe..dd90e4bca 100644 --- a/lib/plugin/TeX2png.php +++ b/lib/plugin/TeX2png.php @@ -36,10 +36,10 @@ class WikiPlugin_TeX2png extends WikiPlugin { - var $imagepath = 'images/tex'; - var $latexbin = '/usr/bin/latex'; - var $dvipsbin = '/usr/bin/dvips'; - var $pstoimgbin = '/usr/bin/pstoimg'; + public $imagepath = 'images/tex'; + public $latexbin = '/usr/bin/latex'; + public $dvipsbin = '/usr/bin/dvips'; + public $pstoimgbin = '/usr/bin/pstoimg'; function getName() { diff --git a/lib/plugin/UpLoad.php b/lib/plugin/UpLoad.php index 5dc44f0bc..6931bf79f 100644 --- a/lib/plugin/UpLoad.php +++ b/lib/plugin/UpLoad.php @@ -36,9 +36,9 @@ class WikiPlugin_UpLoad extends WikiPlugin { - var $disallowed_extensions; + public $disallowed_extensions; // TODO: use PagePerms instead - var $only_authenticated = true; // allow only authenticated users may upload. + public $only_authenticated = true; // allow only authenticated users may upload. function getName() { diff --git a/lib/plugin/UserPreferences.php b/lib/plugin/UserPreferences.php index 798a923d5..af978a7b3 100644 --- a/lib/plugin/UserPreferences.php +++ b/lib/plugin/UserPreferences.php @@ -33,7 +33,7 @@ class WikiPlugin_UserPreferences extends WikiPlugin { - var $bool_args; + public $bool_args; function getName() { diff --git a/lib/plugin/WikiPoll.php b/lib/plugin/WikiPoll.php index b734d3ac1..e2a2eb984 100644 --- a/lib/plugin/WikiPoll.php +++ b/lib/plugin/WikiPoll.php @@ -54,7 +54,7 @@ answer[5][4]="1.3.14" class WikiPlugin_WikiPoll extends WikiPlugin { - var $_args; + public $_args; function getName() { diff --git a/lib/stdlib.php b/lib/stdlib.php index 518f6517b..ffc7bcac4 100644 --- a/lib/stdlib.php +++ b/lib/stdlib.php @@ -682,8 +682,6 @@ function ImgObject($img, $url) class Stack { - - // var in php5 deprecated function Stack() { $this->items = array(); @@ -808,19 +806,19 @@ class WikiPageName * This is the value of $name passed to the constructor. * (For use, e.g. as a default label for links to the page.) */ - //var $shortName; + public $shortName; /** The full page name. * * This is the full name of the page (without anchor). */ - //var $name; + public $name; /** The anchor. * * This is the referenced anchor within the page, or the empty string. */ - //var $anchor; + public $anchor; /** Constructor * @@ -1667,7 +1665,7 @@ class fileSet // expands a list containing regex's to its matching entries class ListRegexExpand { - //var $match, $list, $index, $case_sensitive; + public $match, $list, $index, $case_sensitive; function ListRegexExpand(&$list, $match, $case_sensitive = true) { $this->match = $match; diff --git a/lib/upgrade.php b/lib/upgrade.php index 19923b6dc..6d9615eb3 100644 --- a/lib/upgrade.php +++ b/lib/upgrade.php @@ -1200,7 +1200,7 @@ class UpgradePluginEntry extends UpgradeEntry /** * check all pages for a plugin match */ - var $silent_skip = 1; + public $silent_skip = 1; function default_method(&$args) { diff --git a/lib/wikilens/CustomPrefs.php b/lib/wikilens/CustomPrefs.php index a47113c1a..24d2e59d5 100644 --- a/lib/wikilens/CustomPrefs.php +++ b/lib/wikilens/CustomPrefs.php @@ -13,8 +13,8 @@ class _UserPreference_recengine // recommendation engine method extends _UserPreference { - var $valid_values = array('php', 'mysuggest', 'mymovielens', 'mycluto'); - var $default_value = 'php'; + public $valid_values = array('php', 'mysuggest', 'mymovielens', 'mycluto'); + public $default_value = 'php'; function sanify($value) { @@ -26,14 +26,14 @@ class _UserPreference_recengine // recommendation engine method class _UserPreference_recalgo // recommendation engine algorithm extends _UserPreference { - var $valid_values = array + public $valid_values = array ( 'itemCos', // Item-based Top-N recommendation algorithm with cosine-based similarity function 'itemProb', // Item-based Top-N recommendation algorithm with probability-based similarity function. // This algorithms tends to outperform the rest. 'userCos', // User-based Top-N recommendation algorithm with cosine-based similarity function. 'bayes'); // Naïve Bayesian Classifier - var $default_value = 'itemProb'; + public $default_value = 'itemProb'; function sanify($value) { diff --git a/lib/wikilens/PageListColumns.php b/lib/wikilens/PageListColumns.php index f4b43f6c3..ea6b53615 100644 --- a/lib/wikilens/PageListColumns.php +++ b/lib/wikilens/PageListColumns.php @@ -147,13 +147,15 @@ class _PageList_Column_averagerating extends _PageList_Column_custom */ class _PageList_Column_ratingvalue extends _PageList_Column { - var $_user; - var $_dimension; + public $_user; + public $_dimension; function _PageList_Column_ratingvalue($params) { $this->_pagelist =& $params[3]; $this->_user =& $params[4]; //$this->_pagelist->getOption('user'); + if (empty($this->_user)) + $this->_user =& RatingsUserFactory::getUser($GLOBALS['request']->_user->_userid); $this->_PageList_Column($params[0], $params[1], $params[2]); $this->_dimension = $this->_pagelist->getOption('dimension'); if (!$this->_dimension) $this->_dimension = 0; @@ -161,8 +163,6 @@ class _PageList_Column_ratingvalue extends _PageList_Column function format($pagelist, $page_handle, &$revision_handle) { - if (empty($this->_user)) - $this->_user =& RatingsUserFactory::getUser($GLOBALS['request']->_user->_userid); assert(!empty($this->_user)); $rating = $this->_getValue($page_handle, $revision_handle); $mean = $this->_user->mean_rating($this->_dimension); @@ -229,7 +229,7 @@ class _PageList_Column_ratingwidget extends _PageList_Column_custom { $plugin = new WikiPlugin_RateIt(); $widget = $plugin->RatingWidgetHtml($page_handle->getName(), "", - "Star", $this->_dimension, "small"); + "BStar", $this->_dimension, "small"); $td = HTML::td($widget); $td->setAttr('nowrap', 'nowrap'); return $td; @@ -237,14 +237,10 @@ class _PageList_Column_ratingwidget extends _PageList_Column_custom function _getValue($page_handle, &$revision_handle) { - global $request; - + // Returns average rating of a page $pagename = $page_handle->getName(); - $active_user = $request->getUser(); - $active_userid = $active_user->_userid; - - $tu = & RatingsUserFactory::getUser($active_userid); - return $tu->get_rating($pagename, $this->_dimension); + $rdbi = RatingsDb::getTheRatingsDb(); + return $rdbi->getAvg($pagename, $this->_dimension); } function _getSortableValue($page_handle, &$revision_handle) @@ -255,8 +251,8 @@ class _PageList_Column_ratingwidget extends _PageList_Column_custom class _PageList_Column_prediction extends _PageList_Column { - var $_active_ratings_user; - var $_users; + public $_active_ratings_user; + public $_users; function _PageList_Column_prediction($params) { @@ -307,8 +303,8 @@ class _PageList_Column_prediction extends _PageList_Column class _PageList_Column_top3recs extends _PageList_Column_custom { - var $_active_ratings_user; - var $_users; + public $_active_ratings_user; + public $_users; function _PageList_Column_top3recs($params) { diff --git a/lib/wikilens/RatingsUser.php b/lib/wikilens/RatingsUser.php index ccf5c025b..f37e34bca 100644 --- a/lib/wikilens/RatingsUser.php +++ b/lib/wikilens/RatingsUser.php @@ -49,12 +49,12 @@ class RatingsUserFactory */ class RatingsUser { - var $_userid; - var $_ratings_loaded; - var $_ratings; - var $_num_ratings; - var $_mean_ratings; - var $_pearson_sims; + public $_userid; + public $_ratings_loaded; + public $_ratings; + public $_num_ratings; + public $_mean_ratings; + public $_pearson_sims; function RatingsUser($userid) { -- 2.42.0