From: <var...@us...> - 2014-07-18 09:44:46
|
Revision: 8986 http://sourceforge.net/p/phpwiki/code/8986 Author: vargenau Date: 2014-07-18 09:44:34 +0000 (Fri, 18 Jul 2014) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/BlockParser.php trunk/lib/CachedMarkup.php trunk/lib/DbSession/ADODB.php trunk/lib/DbSession/PDO.php trunk/lib/DbSession/SQL.php trunk/lib/DbSession/dba.php trunk/lib/HtmlParser.php trunk/lib/InlineParser.php trunk/lib/PageList.php trunk/lib/RSSWriter091.php trunk/lib/RssWriter.php trunk/lib/RssWriter2.php trunk/lib/SemanticWeb.php trunk/lib/TextSearchQuery.php trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PDO_mysql.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiDB/backend/PearDB_ffpgsql.php trunk/lib/WikiDB/backend/PearDB_pgsql.php trunk/lib/WikiDB/backend/cvs.php trunk/lib/WikiDB/backend/dba.php trunk/lib/WikiDB/backend/dbaBase.php trunk/lib/WikiDB/backend/dumb/BackLinkIter.php trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php trunk/lib/WikiDB/backend/dumb/MostPopularIter.php trunk/lib/WikiDB/backend/dumb/MostRecentIter.php trunk/lib/WikiDB/backend/dumb/TextSearchIter.php trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php trunk/lib/WikiDB/backend/file.php trunk/lib/WikiUser.php trunk/lib/WysiwygEdit/FCKeditor.php trunk/lib/WysiwygEdit/Wikiwyg.php trunk/lib/WysiwygEdit/tinymce.php trunk/lib/XmlElement.php trunk/lib/XmlRpcServer.php trunk/lib/diff.php trunk/lib/diff3.php trunk/lib/difflib.php trunk/lib/loadsave.php trunk/lib/main.php trunk/themes/Sidebar/themeinfo.php trunk/themes/blog/themeinfo.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/BlockParser.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -253,7 +253,7 @@ class BlockParser_InputSubBlock extends BlockParser_Input { - function BlockParser_InputSubBlock(&$input, $prefix_re, $initial_prefix = false) + function __construct(&$input, $prefix_re, $initial_prefix = false) { $this->_input = &$input; $this->_prefix_pat = "/$prefix_re|\\s*\$/Ax"; @@ -486,8 +486,8 @@ */ class TightSubBlock extends SubBlock { - function TightSubBlock(&$input, $indent_re, $initial_indent = false, - $tag = 'div', $attr = false) + function __construct(&$input, $indent_re, $initial_indent = false, + $tag = 'div', $attr = false) { $this->SubBlock($input, $indent_re, $initial_indent, $tag, $attr); @@ -611,7 +611,7 @@ { public $_tag = 'dl'; - function Block_dl() + function __construct() { $this->_re = '\ {0,4}\S.*(?<!' . ESCAPE_CHAR . '):\s*$'; } @@ -665,7 +665,7 @@ public $nrows; public $ncols; - function Block_table_dl_defn($term, $defn) + function __construct($term, $defn) { $this->XmlContent(); if (!is_array($defn)) @@ -817,7 +817,7 @@ { public $_tag = 'dl-table'; // phony. - function Block_table_dl() + function __construct() { $this->_re = '\ {0,4} (?:\S.*)? (?<!' . ESCAPE_CHAR . ') \| \s* $'; } Modified: trunk/lib/CachedMarkup.php =================================================================== --- trunk/lib/CachedMarkup.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/CachedMarkup.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -26,7 +26,7 @@ class CacheableMarkup extends XmlContent { - function CacheableMarkup($content, $basepage) + function __construct($content, $basepage) { $this->_basepage = $basepage; $this->_buf = ''; @@ -354,7 +354,7 @@ class Cached_WikiLink extends Cached_Link { - function Cached_WikiLink($page, $label = false, $anchor = false) + function __construct($page, $label = false, $anchor = false) { $this->_page = $page; /* ":DontStoreLink" */ @@ -442,7 +442,7 @@ class Cached_WikiLinkIfKnown extends Cached_WikiLink { - function Cached_WikiLinkIfKnown($moniker) + function __construct($moniker) { $this->_page = $moniker; } @@ -460,7 +460,7 @@ class Cached_SpellCheck extends Cached_WikiLink { - function Cached_SpellCheck($word, $suggs) + function __construct($word, $suggs) { $this->_page = $word; $this->suggestions = $suggs; @@ -478,7 +478,7 @@ class Cached_PhpwikiURL extends Cached_DynamicContent { - function Cached_PhpwikiURL($url, $label) + function __construct($url, $label) { $this->_url = $url; if ($label) @@ -529,7 +529,7 @@ class Cached_SemanticLink extends Cached_WikiLink { - function Cached_SemanticLink($url, $label = false) + function __construct($url, $label = false) { $this->_url = $url; if ($label && $label != $url) @@ -665,7 +665,7 @@ */ class Cached_SearchHighlight extends Cached_DynamicContent { - function Cached_SearchHighlight($word, $engine) + function __construct($word, $engine) { $this->_word = $word; $this->engine = $engine; @@ -682,7 +682,7 @@ class Cached_ExternalLink extends Cached_Link { - function Cached_ExternalLink($url, $label = false) + function __construct($url, $label = false) { $this->_url = $url; if ($label && $label != $url) @@ -728,7 +728,7 @@ class Cached_InterwikiLink extends Cached_ExternalLink { - function Cached_InterwikiLink($link, $label = false) + function __construct($link, $label = false) { $this->_link = $link; if ($label) @@ -822,7 +822,7 @@ class Cached_PluginInvocation extends Cached_DynamicContent { - function Cached_PluginInvocation($pi) + function __construct($pi) { $this->_pi = $pi; $loader = $this->_getLoader(); Modified: trunk/lib/DbSession/ADODB.php =================================================================== --- trunk/lib/DbSession/ADODB.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/DbSession/ADODB.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -29,9 +29,8 @@ { public $_backend_type = "ADODB"; - function DbSession_ADODB($dbh, $table) + function __construct($dbh, $table) { - $this->_dbh = $dbh; $this->_table = $table; @@ -43,7 +42,6 @@ array(&$this, 'write'), array(&$this, 'destroy'), array(&$this, 'gc')); - return $this; } function & _connect() Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/DbSession/PDO.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -10,9 +10,8 @@ { public $_backend_type = "PDO"; - function DbSession_PDO($dbh, $table) + function __construct($dbh, $table) { - $this->_dbh = $dbh; $this->_table = $table; @@ -24,7 +23,6 @@ array(&$this, 'write'), array(&$this, 'destroy'), array(&$this, 'gc')); - return $this; } function & _connect() Modified: trunk/lib/DbSession/SQL.php =================================================================== --- trunk/lib/DbSession/SQL.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/DbSession/SQL.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -15,7 +15,7 @@ { public $_backend_type = "SQL"; - function DbSession_SQL(&$dbh, $table) + function __construct(&$dbh, $table) { $this->_dbh = $dbh; Modified: trunk/lib/DbSession/dba.php =================================================================== --- trunk/lib/DbSession/dba.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/DbSession/dba.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -15,7 +15,7 @@ { public $_backend_type = "dba"; - function DbSession_dba(&$dbh, $table) + function __construct(&$dbh, $table) { $this->_dbh = $dbh; ini_set('session.save_handler', 'user'); @@ -26,7 +26,6 @@ array(&$this, 'write'), array(&$this, 'destroy'), array(&$this, 'gc')); - return $this; } function quote($str) Modified: trunk/lib/HtmlParser.php =================================================================== --- trunk/lib/HtmlParser.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/HtmlParser.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -49,7 +49,7 @@ * dialect: "PhpWiki2", "PhpWiki" * possible more dialects: MediaWiki, kwiki, c2 */ - function HtmlParser($dialect = "PhpWiki2", $encoding = '') + function __construct($dialect = "PhpWiki2", $encoding = '') { $classname = "HtmlParser_" . $dialect; if (class_exists($classname)) @@ -225,7 +225,7 @@ class HtmlParser_PhpWiki2 extends HtmlParser { - function HtmlParser_PhpWiki2() + function __construct() { $this->_handlers = array('html' => '', Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/InlineParser.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -543,7 +543,7 @@ class Markup_spellcheck extends SimpleMarkup { - function Markup_spellcheck() + function __construct() { $this->suggestions = $GLOBALS['request']->getArg('suggestions'); } @@ -566,7 +566,7 @@ class Markup_searchhighlight extends SimpleMarkup { - function Markup_searchhighlight() + function __construct() { $result = $GLOBALS['request']->_searchhighlight; require_once 'lib/TextSearchQuery.php'; @@ -1214,7 +1214,7 @@ { //public $_match_regexp = '(: \.\.\.|\-\-|\-\-\-|\(C\) )'; - function Markup_html_entities() + function __construct() { $this->_entities = array('...' => '…', '--' => '–', @@ -1414,9 +1414,9 @@ class LinkTransformer extends InlineTransformer { - function LinkTransformer() + function __construct() { - $this->InlineTransformer(array('escape', 'wikicreolebracketlink', 'bracketlink', 'url', + parent::__construct(array('escape', 'wikicreolebracketlink', 'bracketlink', 'url', 'semanticlink', 'interwiki', 'wikiword', )); } @@ -1424,9 +1424,9 @@ class NowikiTransformer extends InlineTransformer { - function NowikiTransformer() + function __construct() { - $this->InlineTransformer + parent::__construct (array('linebreak', 'html_emphasis', 'html_abbr', 'plugin', 'plugin_wikicreole', 'isonumchars', 'isohexchars', /*'html_entities',*/ Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/PageList.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -171,9 +171,9 @@ class _PageList_Column extends _PageList_Column_base { - function _PageList_Column($field, $default_heading, $align = false) + function __construct($field, $default_heading, $align = false) { - $this->_PageList_Column_base($default_heading, $align); + parent::__construct($default_heading, $align); $this->_need_rev = substr($field, 0, 4) == 'rev:'; $this->_iscustom = substr($field, 0, 7) == 'custom:'; @@ -214,10 +214,10 @@ */ class _PageList_Column_custom extends _PageList_Column { - function _PageList_Column_custom($params) + function __construct($params) { $this->_pagelist =& $params[3]; - $this->_PageList_Column($params[0], $params[1], $params[2]); + parent::__construct($params[0], $params[1], $params[2]); } } @@ -261,9 +261,9 @@ class _PageList_Column_bool extends _PageList_Column { - function _PageList_Column_bool($field, $default_heading, $text = 'yes') + function __construct($field, $default_heading, $text = 'yes') { - $this->_PageList_Column($field, $default_heading, 'center'); + parent::__construct($field, $default_heading, 'center'); $this->_textIfTrue = $text; $this->_textIfFalse = new RawXml('—'); //mdash } @@ -278,7 +278,7 @@ class _PageList_Column_checkbox extends _PageList_Column { - function _PageList_Column_checkbox($field, $default_heading, $name = 'p') + function __construct($field, $default_heading, $name = 'p') { $this->_name = $name; $heading = HTML::input(array('type' => 'button', @@ -287,7 +287,7 @@ 'value' => $default_heading, 'onclick' => "flipAll(this.form)" )); - $this->_PageList_Column($field, $heading, 'center'); + parent::__construct($field, $heading, 'center'); } function _getValuePageList($pagelist, $page_handle, &$revision_handle) @@ -325,22 +325,22 @@ class _PageList_Column_time extends _PageList_Column { - function _PageList_Column_time($field, $default_heading) + function __construct($field, $default_heading) { - $this->_PageList_Column($field, $default_heading, 'right'); + parent::__construct($field, $default_heading, 'right'); global $WikiTheme; $this->WikiTheme = &$WikiTheme; } function _getValue($page_handle, &$revision_handle) { - $time = _PageList_Column::_getValue($page_handle, $revision_handle); + $time = parent::_getValue($page_handle, $revision_handle); return $this->WikiTheme->formatDateTime($time); } function _getSortableValue($page_handle, &$revision_handle) { - return _PageList_Column::_getValue($page_handle, $revision_handle); + return parent::_getValue($page_handle, $revision_handle); } } @@ -359,8 +359,8 @@ // (PHP memory limit exceeded) class _PageList_Column_content extends _PageList_Column { - function _PageList_Column_content($field, $default_heading, $align = false, - $search = false, $hilight_re = false) + function __construct($field, $default_heading, $align = false, + $search = false, $hilight_re = false) { $this->_PageList_Column($field, $default_heading, $align); $this->bytes = 50; @@ -459,9 +459,9 @@ class _PageList_Column_author extends _PageList_Column { - function _PageList_Column_author($field, $default_heading, $align = false) + function __construct($field, $default_heading, $align = false) { - _PageList_Column::_PageList_Column($field, $default_heading, $align); + parent::__construct($field, $default_heading, $align); $this->dbi =& $GLOBALS['request']->getDbh(); } @@ -493,7 +493,7 @@ function _getSortableValue($page_handle, &$revision_handle) { - return _PageList_Column::_getValue($page_handle, $revision_handle); + return parent::_getValue($page_handle, $revision_handle); } } @@ -595,7 +595,7 @@ public $_sortby = array(); public $_maxlen = 0; - function PageList($columns = false, $exclude = false, $options = false) + function __construct($columns = false, $exclude = false, $options = false) { // unique id per pagelist on each page. if (!isset($GLOBALS['request']->_pagelist)) @@ -1830,7 +1830,7 @@ extends PageList { - function PageList_Selectable($columns = false, $exclude = '', $options = false) + function __construct($columns = false, $exclude = '', $options = false) { if ($columns) { if (!is_array($columns)) @@ -1840,7 +1840,7 @@ } else { $columns = array('checkbox', 'pagename'); } - $this->PageList($columns, $exclude, $options); + parent::__construct($columns, $exclude, $options); } function addPageList($array) @@ -1861,7 +1861,7 @@ extends PageList { - function PageList_Unselectable($columns = false, $exclude = '', $options = false) + function __construct($columns = false, $exclude = '', $options = false) { if ($columns) { if (!is_array($columns)) @@ -1869,7 +1869,7 @@ } else { $columns = array('pagename'); } - $this->PageList($columns, $exclude, $options); + parent::__construct($columns, $exclude, $options); } function addPageList($array) Modified: trunk/lib/RSSWriter091.php =================================================================== --- trunk/lib/RSSWriter091.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/RSSWriter091.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -24,7 +24,7 @@ include_once 'lib/RssWriter.php'; class RSSWriter091 extends RSSWriter { - function RSSWriter091() + function __construct() { $this->XmlElement('rss', array('version' => "0.91")); $this->_items = array(); Modified: trunk/lib/RssWriter.php =================================================================== --- trunk/lib/RssWriter.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/RssWriter.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -11,7 +11,7 @@ */ class RssWriter extends XmlElement { - function RssWriter() + function __construct() { $this->XmlElement('rdf:RDF', array('xmlns' => "http://purl.org/rss/1.0/", Modified: trunk/lib/RssWriter2.php =================================================================== --- trunk/lib/RssWriter2.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/RssWriter2.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -17,7 +17,7 @@ */ class RssWriter2 extends RssWriter { - function RssWriter2() + function __construct() { $this->XmlElement('rss', array('version' => "2.0")); Modified: trunk/lib/SemanticWeb.php =================================================================== --- trunk/lib/SemanticWeb.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/SemanticWeb.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -115,7 +115,7 @@ */ class RdfWriter extends RssWriter // in fact it should be rewritten to be other way round. { - function RdfWriter(&$request, &$pagelist) + function __construct(&$request, &$pagelist) { $this->_request =& $request; $this->_pagelist =& $pagelist; @@ -296,7 +296,7 @@ * We need to detect units from the freetext query: * population > 1 million */ - function SemanticAttributeSearchQuery($search_query, $placeholders, $unit = '') + function __construct($search_query, $placeholders, $unit = '') { $this->NumericSearchQuery($search_query, $placeholders); $this->_units = new Units(); Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/TextSearchQuery.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -304,7 +304,7 @@ * * @see TextSearchQuery */ - function NullTextSearchQuery() + function __construct() { } @@ -648,7 +648,7 @@ public $op = "WORD"; public $_op = TSQ_TOK_WORD; - function TextSearchQuery_node_word($word) + function __construct($word) { $this->word = $word; } @@ -858,7 +858,7 @@ { public $_op = TSQ_TOK_BINOP; - function TextSearchQuery_node_binop($leaves) + function __construct($leaves) { $this->leaves = $leaves; } Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/ADODB.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -71,7 +71,7 @@ extends WikiDB_backend { - function WikiDB_backend_ADODB($dbparams) + function __construct($dbparams) { $parsed = parseDSN($dbparams['dsn']); $this->_dbparams = $dbparams; @@ -1329,7 +1329,7 @@ class WikiDB_backend_ADODB_generic_iter extends WikiDB_backend_iterator { - function WikiDB_backend_ADODB_generic_iter($backend, $query_result, $field_list = NULL) + function __construct($backend, $query_result, $field_list = NULL) { $this->_backend = &$backend; $this->_result = $query_result; Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/PDO.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -30,7 +30,7 @@ extends WikiDB_backend { - function WikiDB_backend_PDO($dbparams) + function __construct($dbparams) { $this->_dbparams = $dbparams; if (strstr($dbparams['dsn'], "://")) { // pear DB syntax @@ -1326,7 +1326,7 @@ class WikiDB_backend_PDO_generic_iter extends WikiDB_backend_iterator { - function WikiDB_backend_PDO_generic_iter($backend, $query_result, $field_list = NULL) + function __construct($backend, $query_result, $field_list = NULL) { $this->_backend = &$backend; $this->_result = $query_result; Modified: trunk/lib/WikiDB/backend/PDO_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_mysql.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/PDO_mysql.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -28,11 +28,10 @@ class WikiDB_backend_PDO_mysql extends WikiDB_backend_PDO { - function WikiDB_backend_PDO_mysql($dbparams) + function __construct($dbparams) { + parent::__construct($dbparams); - $this->WikiDB_backend_PDO($dbparams); - if (!empty($this->_serverinfo['version'])) { $arr = explode('.', $this->_serverinfo['version']); $this->_serverinfo['version'] = (string)(($arr[0] * 100) + $arr[1]) . "." . (integer)$arr[2]; Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/PearDB.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -7,7 +7,7 @@ { public $_dbh; - function WikiDB_backend_PearDB($dbparams) + function __construct($dbparams) { // Find and include PEAR's DB.php. maybe we should force our private version again... // if DB would have exported its version number, it would be easier. @@ -1214,7 +1214,7 @@ class WikiDB_backend_PearDB_generic_iter extends WikiDB_backend_iterator { - function WikiDB_backend_PearDB_generic_iter($backend, $query_result, $field_list = NULL) + function __construct($backend, $query_result, $field_list = NULL) { if (DB::isError($query_result)) { // This shouldn't happen, I thought. Modified: trunk/lib/WikiDB/backend/PearDB_ffpgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -49,10 +49,10 @@ class WikiDB_backend_PearDB_ffpgsql extends WikiDB_backend_PearDB_pgsql { - function WikiDB_backend_PearDB_ffpgsql($dbparams) + function __construct($dbparams) { $dbparams['dsn'] = str_replace('ffpgsql:', 'pgsql:', $dbparams['dsn']); - parent::WikiDB_backend_PearDB_pgsql($dbparams); + parent::__construct($dbparams); $p = strlen(PAGE_PREFIX) + 1; $page_tbl = $this->_table_names['page_tbl']; Modified: trunk/lib/WikiDB/backend/PearDB_pgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_pgsql.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/PearDB_pgsql.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -17,7 +17,7 @@ class WikiDB_backend_PearDB_pgsql extends WikiDB_backend_PearDB { - function WikiDB_backend_PearDB_pgsql($dbparams) + function __construct($dbparams) { // The pgsql handler of (at least my version of) the PEAR::DB // library generates three warnings when a database is opened: Modified: trunk/lib/WikiDB/backend/cvs.php =================================================================== --- trunk/lib/WikiDB/backend/cvs.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/cvs.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -72,7 +72,7 @@ * repository or assumed to exist. If on the other hand the parameter * already exists, then it is not overwritten. */ - function WikiDB_backend_cvs($dbparam) + function __construct($dbparam) { // setup all the instance values. $this->_docDir = $dbparam{CVS_DOC_DIR}; @@ -956,9 +956,9 @@ public $_searchString = ''; public $_docDir = ""; - function Cvs_Backend_Title_Search_Iterator($arrayValue = Array(), - $searchString = "", - $documentDir = ".") + function __construct($arrayValue = array(), + $searchString = "", + $documentDir = ".") { $this->Cvs_Backend_Array_Iterator($arrayValue); $_searchString = $searchString; @@ -1002,10 +1002,10 @@ { public $_searchString = ''; - function Cvs_Backend_Title_Search_Iterator($arrayValue = Array(), - $searchString = "") + function __construct($arrayValue = array(), + $searchString = "") { - $this->Cvs_Backend_Array_Iterator($arrayValue); + parent::__construct($arrayValue); $_searchString = $searchString; } Modified: trunk/lib/WikiDB/backend/dba.php =================================================================== --- trunk/lib/WikiDB/backend/dba.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/dba.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -6,7 +6,7 @@ class WikiDB_backend_dba extends WikiDB_backend_dbaBase { - function WikiDB_backend_dba($dbparams) + function __construct($dbparams) { $directory = '/tmp'; $prefix = 'wiki_'; Modified: trunk/lib/WikiDB/backend/dbaBase.php =================================================================== --- trunk/lib/WikiDB/backend/dbaBase.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/dbaBase.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -44,7 +44,7 @@ class WikiDB_backend_dbaBase extends WikiDB_backend { - function WikiDB_backend_dbaBase(&$dba) + function __construct(&$dba) { $this->_db = &$dba; // TODO: page and version tables should be in their own files, probably. @@ -658,7 +658,7 @@ extends WikiDB_backend_iterator { // fixed for linkrelations - function WikiDB_backend_dbaBase_pageiter(&$backend, &$pages, $options = false) + function __construct(&$backend, &$pages, $options = false) { $this->_backend = $backend; $this->_options = $options; Modified: trunk/lib/WikiDB/backend/dumb/BackLinkIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/BackLinkIter.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/dumb/BackLinkIter.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -11,7 +11,7 @@ class WikiDB_backend_dumb_BackLinkIter extends WikiDB_backend_iterator { - function WikiDB_backend_dumb_BackLinkIter(&$backend, &$all_pages, $pagename) + function __construct(&$backend, &$all_pages, $pagename) { $this->_pages = $all_pages; $this->_backend = &$backend; Modified: trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -38,8 +38,8 @@ class WikiDB_backend_dumb_LinkSearchIter extends WikiDB_backend_iterator { - function WikiDB_backend_dumb_LinkSearchIter(&$backend, &$pageiter, $search, $linktype, - $relation = false, $options = array()) + function __construct(&$backend, &$pageiter, $search, $linktype, + $relation = false, $options = array()) { $this->_backend = &$backend; $this->_pages = $pageiter; Modified: trunk/lib/WikiDB/backend/dumb/MostPopularIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/MostPopularIter.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/dumb/MostPopularIter.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -11,7 +11,7 @@ class WikiDB_backend_dumb_MostPopularIter extends WikiDB_backend_iterator { - function WikiDB_backend_dumb_MostPopularIter($backend, &$all_pages, $limit) + function __construct($backend, &$all_pages, $limit) { $this->_pages = array(); $pages = &$this->_pages; Modified: trunk/lib/WikiDB/backend/dumb/MostRecentIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/MostRecentIter.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/dumb/MostRecentIter.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -9,7 +9,7 @@ class WikiDB_backend_dumb_MostRecentIter extends WikiDB_backend_iterator { - function WikiDB_backend_dumb_MostRecentIter(&$backend, &$pages, $params) + function __construct(&$backend, &$pages, $params) { $limit = false; extract($params); Modified: trunk/lib/WikiDB/backend/dumb/TextSearchIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/TextSearchIter.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/dumb/TextSearchIter.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -2,8 +2,8 @@ class WikiDB_backend_dumb_TextSearchIter extends WikiDB_backend_iterator { - function WikiDB_backend_dumb_TextSearchIter(&$backend, &$pages, $search, $fulltext = false, - $options = array()) + function __construct(&$backend, &$pages, $search, $fulltext = false, + $options = array()) { $this->_backend = &$backend; $this->_pages = $pages; Modified: trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -8,7 +8,7 @@ class WikiDB_backend_dumb_WantedPagesIter extends WikiDB_backend_iterator { - function WikiDB_backend_dumb_WantedPagesIter(&$backend, &$all_pages, $exclude = '', $sortby = '', $limit = '') + function __construct(&$backend, &$all_pages, $exclude = '', $sortby = '', $limit = '') { $this->_allpages = $all_pages; $this->_allpages_array = $all_pages->asArray(); Modified: trunk/lib/WikiDB/backend/file.php =================================================================== --- trunk/lib/WikiDB/backend/file.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiDB/backend/file.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -53,7 +53,7 @@ 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) + function __construct($dbparam) { $this->data_dir = $dbparam['directory']; if (file_exists($this->data_dir) and is_file($this->data_dir)) @@ -728,7 +728,7 @@ class WikiDB_backend_file_iter extends WikiDB_backend_iterator { - function WikiDB_backend_file_iter(&$backend, &$query_result, $options = array()) + function __construct(&$backend, &$query_result, $options = array()) { $this->_backend = &$backend; $this->_result = $query_result; Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WikiUser.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -613,10 +613,9 @@ class _UserPreference_numeric extends _UserPreference { - function _UserPreference_numeric($default, $minval = false, - $maxval = false) + function __construct($default, $minval = false, $maxval = false) { - $this->_UserPreference((double)$default); + parent::__construct((double)$default); $this->_minval = (double)$minval; $this->_maxval = (double)$maxval; } @@ -635,10 +634,9 @@ class _UserPreference_int extends _UserPreference_numeric { - function _UserPreference_int($default, $minval = false, $maxval = false) + function __construct($default, $minval = false, $maxval = false) { - $this->_UserPreference_numeric((int)$default, (int)$minval, - (int)$maxval); + parent::__construct((int)$default, (int)$minval, (int)$maxval); } function sanify($value) @@ -650,9 +648,9 @@ class _UserPreference_bool extends _UserPreference { - function _UserPreference_bool($default = false) + function __construct($default = false) { - $this->_UserPreference((bool)$default); + parent::__construct((bool)$default); } function sanify($value) @@ -680,9 +678,9 @@ class _UserPreference_language extends _UserPreference { - function _UserPreference_language($default = DEFAULT_LANGUAGE) + function __construct($default = DEFAULT_LANGUAGE) { - $this->_UserPreference($default); + parent::__construct($default); } // FIXME: check for valid locale @@ -700,9 +698,9 @@ class _UserPreference_theme extends _UserPreference { - function _UserPreference_theme($default = THEME) + function __construct($default = THEME) { - $this->_UserPreference($default); + parent::__construct($default); } function sanify($value) Modified: trunk/lib/WysiwygEdit/FCKeditor.php =================================================================== --- trunk/lib/WysiwygEdit/FCKeditor.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WysiwygEdit/FCKeditor.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -18,7 +18,7 @@ class WysiwygEdit_FCKeditor extends WysiwygEdit { - function WysiwygEdit_FCKeditor() + function __construct() { global $LANG; $this->_transformer_tags = false; Modified: trunk/lib/WysiwygEdit/Wikiwyg.php =================================================================== --- trunk/lib/WysiwygEdit/Wikiwyg.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WysiwygEdit/Wikiwyg.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -18,7 +18,7 @@ class WysiwygEdit_Wikiwyg extends WysiwygEdit { - function WysiwygEdit_Wikiwyg() + function __construct() { global $request, $LANG; $this->_transformer_tags = false; Modified: trunk/lib/WysiwygEdit/tinymce.php =================================================================== --- trunk/lib/WysiwygEdit/tinymce.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/WysiwygEdit/tinymce.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -19,7 +19,7 @@ class WysiwygEdit_tinymce extends WysiwygEdit { - function WysiwygEdit_tinymce() + function __construct() { $this->_transformer_tags = false; $this->BasePath = DATA_PATH . '/themes/default/tiny_mce/'; Modified: trunk/lib/XmlElement.php =================================================================== --- trunk/lib/XmlElement.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/XmlElement.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -206,10 +206,9 @@ */ class XmlElement extends XmlContent { - function XmlElement($tagname /* , $attr_or_content , ...*/) + function __construct($tagname /* , $attr_or_content , ...*/) { - //FIXME: php5 incompatible - $this->XmlContent(); + parent::__construct(); $this->_init(func_get_args()); } Modified: trunk/lib/XmlRpcServer.php =================================================================== --- trunk/lib/XmlRpcServer.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/XmlRpcServer.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -939,7 +939,7 @@ */ class XmlRpcServer extends xmlrpc_server { - function XmlRpcServer($request = false) + function __construct($request = false) { global $wiki_dmap; foreach ($wiki_dmap as $name => $val) { Modified: trunk/lib/diff.php =================================================================== --- trunk/lib/diff.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/diff.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -70,7 +70,7 @@ class WordLevelDiff extends MappedDiff { - function WordLevelDiff($orig_lines, $final_lines) + function __construct($orig_lines, $final_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); list ($final_words, $final_stripped) = $this->_split($final_lines); @@ -129,9 +129,9 @@ */ class HtmlUnifiedDiffFormatter extends UnifiedDiffFormatter { - function HtmlUnifiedDiffFormatter($context_lines = 4) + function __construct($context_lines = 4) { - $this->UnifiedDiffFormatter($context_lines); + parent::__construct($context_lines); } function _start_diff() Modified: trunk/lib/diff3.php =================================================================== --- trunk/lib/diff3.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/diff3.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -44,7 +44,7 @@ { public $type = 'copy'; - function _Diff3_CopyBlock($lines = false) + function __construct($lines = false) { $this->orig = $lines ? $lines : array(); $this->final1 = &$this->orig; @@ -64,7 +64,7 @@ class _Diff3_BlockBuilder { - function _Diff3_BlockBuilder() + function __construct() { $this->_init(); } @@ -116,7 +116,7 @@ class Diff3 { - function Diff3($orig, $final1, $final2) + function __construct($orig, $final1, $final2) { $eng = new _DiffEngine; $this->ConflictingBlocks = 0; //Conflict counter Modified: trunk/lib/difflib.php =================================================================== --- trunk/lib/difflib.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/difflib.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -34,7 +34,7 @@ { public $type = 'copy'; - function _DiffOp_Copy($orig, $final = false) + function __construct($orig, $final = false) { if (!is_array($final)) $final = $orig; @@ -52,7 +52,7 @@ { public $type = 'delete'; - function _DiffOp_Delete($lines) + function __construct($lines) { $this->orig = $lines; $this->final = false; @@ -68,7 +68,7 @@ { public $type = 'add'; - function _DiffOp_Add($lines) + function __construct($lines) { $this->final = $lines; $this->orig = false; @@ -84,7 +84,7 @@ { public $type = 'change'; - function _DiffOp_Change($orig, $final) + function __construct($orig, $final) { $this->orig = $orig; $this->final = $final; @@ -670,7 +670,6 @@ function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { - assert(sizeof($from_lines) == sizeof($mapped_from_lines)); assert(sizeof($to_lines) == sizeof($mapped_to_lines)); @@ -863,7 +862,7 @@ */ class UnifiedDiffFormatter extends DiffFormatter { - function UnifiedDiffFormatter($context_lines = 4) + function __construct($context_lines = 4) { $this->leading_context_lines = $context_lines; $this->trailing_context_lines = $context_lines; @@ -908,7 +907,7 @@ */ class BlockDiffFormatter extends DiffFormatter { - function BlockDiffFormatter($context_lines = 4) + function __construct($context_lines = 4) { $this->leading_context_lines = $context_lines; $this->trailing_context_lines = $context_lines; Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/loadsave.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -1363,7 +1363,7 @@ class LimitedFileSet extends FileSet { - function LimitedFileSet($dirname, $_include, $exclude) + function __construct($dirname, $_include, $exclude) { $this->_includefiles = $_include; $this->_exclude = $exclude; Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/lib/main.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -52,7 +52,7 @@ { public $_dbi; - function WikiRequest() + function __construct() { $this->_dbi = WikiDB::open($GLOBALS['DBParams']); // first mysql request costs [958ms]! [670ms] is mysql_connect() Modified: trunk/themes/Sidebar/themeinfo.php =================================================================== --- trunk/themes/Sidebar/themeinfo.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/themes/Sidebar/themeinfo.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -34,7 +34,7 @@ class WikiTheme_Sidebar extends WikiTheme_MonoBook { - function WikiTheme_Sidebar($theme_name = 'Sidebar') + function __construct($theme_name = 'Sidebar') { $this->WikiTheme($theme_name); //$this->calendarInit(true); Modified: trunk/themes/blog/themeinfo.php =================================================================== --- trunk/themes/blog/themeinfo.php 2014-07-17 17:03:59 UTC (rev 8985) +++ trunk/themes/blog/themeinfo.php 2014-07-18 09:44:34 UTC (rev 8986) @@ -46,7 +46,7 @@ class WikiTheme_blog extends WikiTheme { - function WikiTheme_blog($theme_name = 'blog') + function __construct($theme_name = 'blog') { $this->WikiTheme($theme_name); $this->calendarInit(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |