You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(43) |
Nov
(73) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(34) |
Feb
(110) |
Mar
(24) |
Apr
(44) |
May
(37) |
Jun
(22) |
Jul
(20) |
Aug
(28) |
Sep
(50) |
Oct
(11) |
Nov
(132) |
Dec
(595) |
2002 |
Jan
(1099) |
Feb
(579) |
Mar
(63) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(125) |
Sep
(101) |
Oct
(25) |
Nov
(34) |
Dec
(47) |
2003 |
Jan
(82) |
Feb
(182) |
Mar
(71) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(14) |
Oct
(6) |
Nov
(124) |
Dec
(68) |
2004 |
Jan
(64) |
Feb
(191) |
Mar
(199) |
Apr
(298) |
May
(252) |
Jun
(426) |
Jul
(134) |
Aug
(13) |
Sep
(96) |
Oct
(75) |
Nov
(232) |
Dec
(171) |
2005 |
Jan
(205) |
Feb
(165) |
Mar
(8) |
Apr
(74) |
May
(21) |
Jun
(19) |
Jul
(37) |
Aug
(69) |
Sep
(141) |
Oct
(118) |
Nov
(31) |
Dec
(7) |
2006 |
Jan
(5) |
Feb
(10) |
Mar
(35) |
Apr
(24) |
May
(34) |
Jun
(29) |
Jul
(5) |
Aug
(38) |
Sep
(30) |
Oct
(37) |
Nov
(30) |
Dec
(86) |
2007 |
Jan
(414) |
Feb
(40) |
Mar
(18) |
Apr
(10) |
May
(66) |
Jun
(60) |
Jul
(105) |
Aug
(55) |
Sep
(64) |
Oct
(7) |
Nov
(11) |
Dec
(5) |
2008 |
Jan
(26) |
Feb
(28) |
Mar
(79) |
Apr
(34) |
May
(61) |
Jun
(24) |
Jul
(29) |
Aug
(160) |
Sep
(62) |
Oct
(70) |
Nov
(32) |
Dec
(14) |
2009 |
Jan
(140) |
Feb
(135) |
Mar
(153) |
Apr
(53) |
May
(24) |
Jun
(138) |
Jul
(90) |
Aug
(46) |
Sep
(72) |
Oct
(84) |
Nov
(32) |
Dec
(4) |
2010 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(55) |
May
(89) |
Jun
(131) |
Jul
(41) |
Aug
(38) |
Sep
(42) |
Oct
(11) |
Nov
(27) |
Dec
(54) |
2011 |
Jan
(127) |
Feb
(16) |
Mar
(71) |
Apr
(52) |
May
(32) |
Jun
(31) |
Jul
(4) |
Aug
|
Sep
(45) |
Oct
(26) |
Nov
(36) |
Dec
(10) |
2012 |
Jan
(23) |
Feb
(6) |
Mar
(13) |
Apr
(18) |
May
(1) |
Jun
(4) |
Jul
(3) |
Aug
(12) |
Sep
(57) |
Oct
(96) |
Nov
(163) |
Dec
(124) |
2013 |
Jan
(11) |
Feb
(17) |
Mar
(7) |
Apr
(48) |
May
(15) |
Jun
(29) |
Jul
(12) |
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
(3) |
2014 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(8) |
Jun
(90) |
Jul
(104) |
Aug
(12) |
Sep
(81) |
Oct
(139) |
Nov
(111) |
Dec
(64) |
2015 |
Jan
(46) |
Feb
(74) |
Mar
(56) |
Apr
(61) |
May
(3) |
Jun
(7) |
Jul
(11) |
Aug
(5) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
(15) |
2016 |
Jan
(25) |
Feb
(33) |
Mar
(24) |
Apr
(4) |
May
(24) |
Jun
(3) |
Jul
(75) |
Aug
|
Sep
(2) |
Oct
(38) |
Nov
(4) |
Dec
(18) |
2017 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(14) |
Jun
|
Jul
(5) |
Aug
(9) |
Sep
|
Oct
(23) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(9) |
Apr
(60) |
May
(1) |
Jun
|
Jul
(13) |
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(15) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
2021 |
Jan
(24) |
Feb
(33) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(64) |
Jul
(71) |
Aug
(114) |
Sep
(82) |
Oct
(32) |
Nov
(76) |
Dec
(86) |
2022 |
Jan
(162) |
Feb
(41) |
Mar
(11) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
2023 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2024 |
Jan
(7) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
(90) |
Mar
(19) |
Apr
|
May
(6) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <var...@us...> - 2014-07-18 10:11:40
|
Revision: 8987 http://sourceforge.net/p/phpwiki/code/8987 Author: vargenau Date: 2014-07-18 10:11:37 +0000 (Fri, 18 Jul 2014) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/PageList.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2014-07-18 09:44:34 UTC (rev 8986) +++ trunk/lib/PageList.php 2014-07-18 10:11:37 UTC (rev 8987) @@ -52,7 +52,7 @@ { public $_tdattr = array(); - function _PageList_Column_base($default_heading, $align = false) + function __construct($default_heading, $align = false) { $this->_heading = $default_heading; @@ -271,7 +271,7 @@ function _getValue($page_handle, &$revision_handle) { //FIXME: check if $this is available in the parent (->need_rev) - $val = _PageList_Column::_getValue($page_handle, $revision_handle); + $val = parent::_getValue($page_handle, $revision_handle); return $val ? $this->_textIfTrue : $this->_textIfFalse; } } @@ -362,7 +362,7 @@ function __construct($field, $default_heading, $align = false, $search = false, $hilight_re = false) { - $this->_PageList_Column($field, $default_heading, $align); + parent::__construct($field, $default_heading, $align); $this->bytes = 50; $this->search = $search; $this->hilight_re = $hilight_re; @@ -453,7 +453,7 @@ return $page_handle->score; elseif (is_array($page_handle) and !empty($page_handle['score'])) return $page_handle['score']; else - return substr(_PageList_Column::_getValue($page_handle, $revision_handle), 0, 50); + return substr(parent::_getValue($page_handle, $revision_handle), 0, 50); } } @@ -467,7 +467,7 @@ function _getValue($page_handle, &$revision_handle) { - $author = _PageList_Column::_getValue($page_handle, $revision_handle); + $author = parent::_getValue($page_handle, $revision_handle); if ($this->dbi->isWikiPage($author)) return WikiLink($author); else @@ -476,7 +476,7 @@ function _getSortableValue($page_handle, &$revision_handle) { - return _PageList_Column::_getValue($page_handle, $revision_handle); + return parent::_getValue($page_handle, $revision_handle); } } @@ -510,7 +510,7 @@ function _getSortableValue($page_handle, &$revision_handle) { - return _PageList_Column::_getValue($page_handle, $revision_handle); + return parent::_getValue($page_handle, $revision_handle); } } @@ -518,9 +518,9 @@ { public $_field = 'pagename'; - function _PageList_Column_pagename() + function __construct() { - $this->_PageList_Column_base(_("Page Name")); + parent::__construct(_("Page Name")); global $request; $this->dbi = &$request->getDbh(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <var...@us...> - 2014-07-17 17:04:07
|
Revision: 8985 http://sourceforge.net/p/phpwiki/code/8985 Author: vargenau Date: 2014-07-17 17:03:59 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/WikiDB/ADODB.php trunk/lib/WikiDB/PDO.php trunk/lib/WikiDB/SQL.php trunk/lib/WikiDB/dba.php trunk/lib/WikiDB/file.php trunk/lib/WikiDB/flatfile.php Modified: trunk/lib/WikiDB/ADODB.php =================================================================== --- trunk/lib/WikiDB/ADODB.php 2014-07-17 16:58:49 UTC (rev 8984) +++ trunk/lib/WikiDB/ADODB.php 2014-07-17 17:03:59 UTC (rev 8985) @@ -12,7 +12,7 @@ */ class WikiDB_ADODB extends WikiDB { - function WikiDB_ADODB($dbparams) + function __construct($dbparams) { $backend = 'ADODB'; if (is_array($dbparams['dsn'])) @@ -35,7 +35,7 @@ $backend_class = "WikiDB_backend_" . $backend; $backend = new $backend_class($dbparams); if (!$backend->_dbh->_connectionID) return false; - $this->WikiDB($backend, $dbparams); + parent::__construct($backend, $dbparams); } /** Modified: trunk/lib/WikiDB/PDO.php =================================================================== --- trunk/lib/WikiDB/PDO.php 2014-07-17 16:58:49 UTC (rev 8984) +++ trunk/lib/WikiDB/PDO.php 2014-07-17 17:03:59 UTC (rev 8985) @@ -18,7 +18,7 @@ */ class WikiDB_PDO extends WikiDB { - function WikiDB_PDO($dbparams) + function __construct($dbparams) { if (is_array($dbparams['dsn'])) $backend = $dbparams['dsn']['phptype']; @@ -33,7 +33,7 @@ include_once("lib/WikiDB/backend/$backend.php"); $backend_class = "WikiDB_backend_$backend"; $backend = new $backend_class($dbparams); - $this->WikiDB($backend, $dbparams); + parent::__construct($backend, $dbparams); } /** Modified: trunk/lib/WikiDB/SQL.php =================================================================== --- trunk/lib/WikiDB/SQL.php 2014-07-17 16:58:49 UTC (rev 8984) +++ trunk/lib/WikiDB/SQL.php 2014-07-17 17:03:59 UTC (rev 8985) @@ -1,12 +1,7 @@ <?php require_once 'lib/WikiDB.php'; -//require_once('lib/WikiDB/backend/PearDB.php'); -//require_once('DB.php'); // Always favor use our local pear copy -/** - * - */ class WikiDB_SQL extends WikiDB { function __construct($dbparams) Modified: trunk/lib/WikiDB/dba.php =================================================================== --- trunk/lib/WikiDB/dba.php 2014-07-17 16:58:49 UTC (rev 8984) +++ trunk/lib/WikiDB/dba.php 2014-07-17 17:03:59 UTC (rev 8985) @@ -2,15 +2,13 @@ require_once 'lib/WikiDB.php'; require_once 'lib/WikiDB/backend/dba.php'; -/** - * - */ + class WikiDB_dba extends WikiDB { - function WikiDB_dba($dbparams) + function __construct($dbparams) { $backend = new WikiDB_backend_dba($dbparams); - $this->WikiDB($backend, $dbparams); + parent::__construct($backend, $dbparams); if (empty($dbparams['directory']) || preg_match('@^/tmp\b@', $dbparams['directory']) Modified: trunk/lib/WikiDB/file.php =================================================================== --- trunk/lib/WikiDB/file.php 2014-07-17 16:58:49 UTC (rev 8984) +++ trunk/lib/WikiDB/file.php 2014-07-17 17:03:59 UTC (rev 8985) @@ -34,7 +34,7 @@ function __construct($dbparams) { $backend = new WikiDB_backend_file($dbparams); - $this->WikiDB($backend, $dbparams); + parent::__construct($backend, $dbparams); if (empty($dbparams['directory']) || preg_match('@^/tmp\b@', $dbparams['directory']) Modified: trunk/lib/WikiDB/flatfile.php =================================================================== --- trunk/lib/WikiDB/flatfile.php 2014-07-17 16:58:49 UTC (rev 8984) +++ trunk/lib/WikiDB/flatfile.php 2014-07-17 17:03:59 UTC (rev 8985) @@ -34,7 +34,7 @@ { $backend = new WikiDB_backend_flatfile($dbparams); $backend->_wikidb =& $this; - $this->WikiDB($backend, $dbparams); + parent::__construct($backend, $dbparams); if (empty($dbparams['directory']) || preg_match('@^/tmp\b@', $dbparams['directory']) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 16:58:57
|
Revision: 8984 http://sourceforge.net/p/phpwiki/code/8984 Author: vargenau Date: 2014-07-17 16:58:49 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/ErrorManager.php trunk/lib/WikiDB/SQL.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2014-07-17 16:52:49 UTC (rev 8983) +++ trunk/lib/ErrorManager.php 2014-07-17 16:58:49 UTC (rev 8984) @@ -593,11 +593,10 @@ */ class PhpErrorOnce extends PhpError { - - function PhpErrorOnce($errno, $errstr, $errfile, $errline) + function __construct($errno, $errstr, $errfile, $errline) { $this->_count = 1; - $this->PhpError($errno, $errstr, $errfile, $errline); + parent::__construct($errno, $errstr, $errfile, $errline); } function _sameError($error) Modified: trunk/lib/WikiDB/SQL.php =================================================================== --- trunk/lib/WikiDB/SQL.php 2014-07-17 16:52:49 UTC (rev 8983) +++ trunk/lib/WikiDB/SQL.php 2014-07-17 16:58:49 UTC (rev 8984) @@ -9,7 +9,7 @@ */ class WikiDB_SQL extends WikiDB { - function WikiDB_SQL($dbparams) + function __construct($dbparams) { $backend = 'PearDB'; if (is_array($dbparams['dsn'])) @@ -25,7 +25,7 @@ $backend_class = "WikiDB_backend_PearDB_" . $backend; $backend = new $backend_class($dbparams); if (DB::isError($backend->_dbh)) return; - $this->WikiDB($backend, $dbparams); + parent::__construct($backend, $dbparams); } function view_dsn($dsn = false) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 16:52:53
|
Revision: 8983 http://sourceforge.net/p/phpwiki/code/8983 Author: vargenau Date: 2014-07-17 16:52:49 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/AccessLog.php trunk/lib/BlockParser.php trunk/lib/DbSession.php trunk/lib/ErrorManager.php trunk/lib/FileFinder.php trunk/lib/InlineParser.php trunk/lib/PageType.php trunk/lib/Request.php trunk/lib/WikiCallback.php trunk/lib/WikiDB/backend/ADODB_mssql.php trunk/lib/WikiDB/backend/ADODB_mssqlnative.php trunk/lib/WikiDB/backend/ADODB_mysql.php trunk/lib/WikiDB/backend/ADODB_oci8po.php trunk/lib/WikiDB/backend/ADODB_postgres7.php trunk/lib/WikiDB/backend/ADODB_sqlite.php trunk/lib/WikiDB/backend/PearDB_mysql.php trunk/lib/WikiDB/backend/PearDB_oci8.php trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php trunk/lib/WikiDB/cvs.php trunk/lib/WikiDB/file.php trunk/lib/WikiDB/flatfile.php trunk/lib/WikiDB.php trunk/lib/WikiGroup.php trunk/lib/WikiTheme.php trunk/lib/WikiUser.php trunk/lib/difflib.php trunk/lib/plugin/RecentChanges.php trunk/lib/stdlib.php Modified: trunk/lib/AccessLog.php =================================================================== --- trunk/lib/AccessLog.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/AccessLog.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -218,8 +218,6 @@ class Request_AccessLogEntry { /** - * Constructor. - * * The log entry will be automatically appended to the log file or * SQL table when the current request terminates. * @@ -234,9 +232,8 @@ * $log_entry->push($request); * </pre> * - * */ - function Request_AccessLogEntry(&$accesslog) + function __construct(&$accesslog) { $this->_accesslog = $accesslog; $this->logfile = $accesslog->logfile; Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/BlockParser.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -74,14 +74,13 @@ */ class AnchoredRegexpSet { - /** Constructor - * + /** * @param $regexps array A list of regular expressions. The * regular expressions should not include any sub-pattern groups * "(...)". (Anonymous groups, like "(?:...)", as well as * look-ahead and look-behind assertions are fine.) */ - function AnchoredRegexpSet($regexps) + function __construct($regexps) { $this->_regexps = $regexps; $this->_re = "/((" . join(")|(", $regexps) . "))/Ax"; Modified: trunk/lib/DbSession.php =================================================================== --- trunk/lib/DbSession.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/DbSession.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -15,8 +15,6 @@ class DbSession { /** - * Constructor - * * @param mixed $dbh * DB handle, or WikiDB object (from which the DB handle will * be extracted. @@ -25,7 +23,7 @@ * @return bool|DbSession * Name of SQL table containing session data. */ - function DbSession(&$dbh, $table = 'session') + function __construct(&$dbh, $table = 'session') { // Check for existing DbSession handler $db_type = $dbh->getParam('dbtype'); Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/ErrorManager.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -45,11 +45,9 @@ class ErrorManager { /** - * Constructor. - * * As this is a singleton class, you should never call this. */ - public function ErrorManager() + function __construct() { $this->_handlers = array(); $this->_fatal_handler = false; @@ -415,13 +413,12 @@ public $errline; /** - * Construct a new PhpError. * @param int $errno * @param string $errstr * @param string $errfile * @param int $errline */ - function PhpError($errno, $errstr, $errfile, $errline) + function __construct($errno, $errstr, $errfile, $errline) { $this->errno = $errno; $this->errstr = $errstr; @@ -571,15 +568,14 @@ class PhpWikiError extends PhpError { /** - * Construct a new PhpError. * @param int $errno * @param string $errstr * @param string $errfile * @param int $errline */ - function PhpWikiError($errno, $errstr, $errfile, $errline) + function __construct($errno, $errstr, $errfile, $errline) { - $this->PhpError($errno, $errstr, $errfile, $errline); + parent::__construct($errno, $errstr, $errfile, $errline); } function _getDetail() Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/FileFinder.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -16,11 +16,9 @@ public $_pathsep, $_path; /** - * Constructor. - * * @param $path array A list of directories in which to search for files. */ - function FileFinder($path = array()) + function __construct($path = array()) { $this->_pathsep = $this->_get_syspath_separator(); if (!isset($this->_path) and $path === false) @@ -361,15 +359,13 @@ extends FileFinder { /** - * Constructor. - * * @param $path array Where to look for PEAR library code. * A good set of defaults is provided, so you can probably leave * this parameter blank. */ - function PearFileFinder($path = array()) + function __construct($path = array()) { - $this->FileFinder(array_merge( + parent::__construct(array_merge( $path, array('/usr/share/php', '/usr/lib/php', @@ -395,10 +391,7 @@ class LocalizedFileFinder extends FileFinder { - /** - * Constructor. - */ - function LocalizedFileFinder() + function __construct() { $this->_pathsep = $this->_get_syspath_separator(); $include_path = $this->_get_include_path(); @@ -433,10 +426,7 @@ class LocalizedButtonFinder extends FileFinder { - /** - * Constructor. - */ - function LocalizedButtonFinder() + function __construct() { global $WikiTheme; $this->_pathsep = $this->_get_syspath_separator(); Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/InlineParser.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -79,14 +79,13 @@ */ class RegexpSet { - /** Constructor - * + /** * @param array $regexps A list of regular expressions. The * regular expressions should not include any sub-pattern groups * "(...)". (Anonymous groups, like "(?:...)", as well as * look-ahead and look-behind assertions are okay.) */ - function RegexpSet($regexps) + function __construct($regexps) { assert($regexps); $this->_regexps = array_unique($regexps); Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/PageType.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -26,15 +26,14 @@ */ class TransformedText extends CacheableMarkup { - /** Constructor. - * + /** * @param WikiDB_Page $page * @param string $text The packed page revision content. * @param array $meta The version meta-data. * @param string $type_override For markup of page using a different * pagetype than that specified in its version meta-data. */ - function TransformedText($page, $text, $meta, $type_override = '') + function __construct($page, $text, $meta, $type_override = '') { $pagetype = false; if ($type_override) @@ -42,8 +41,8 @@ elseif (isset($meta['pagetype'])) $pagetype = $meta['pagetype']; $this->_type = PageType::GetPageType($pagetype); - $this->CacheableMarkup($this->_type->transform($page, $text, $meta), - $page->getName()); + parent::__construct($this->_type->transform($page, $text, $meta), + $page->getName()); } function getType() @@ -362,12 +361,11 @@ */ class PageFormatter { - /** Constructor. - * + /** * @param WikiDB_Page $page * @param hash $meta Version meta-data. */ - function PageFormatter(&$page, $meta) + function __construct(&$page, $meta) { $this->_page = $page; $this->_meta = $meta; Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/Request.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -1044,8 +1044,6 @@ class Request_AccessLogEntry { /** - * Constructor. - * * The log entry will be automatically appended to the log file or * SQL table when the current request terminates. * @@ -1060,9 +1058,8 @@ * $log_entry->push($request); * </pre> * - * */ - function Request_AccessLogEntry(&$accesslog) + function __construct(&$accesslog) { $this->_accesslog = $accesslog; $this->logfile = $accesslog->logfile; Modified: trunk/lib/WikiCallback.php =================================================================== --- trunk/lib/WikiCallback.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiCallback.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -80,11 +80,9 @@ extends WikiCallback { /** - * Constructor - * * @param $functionName string Name of global function to call. */ - public function WikiFunctionCb($functionName) + public function __construct($functionName) { $this->functionName = $functionName; } @@ -107,12 +105,10 @@ extends WikiCallback { /** - * Constructor - * * @param $object object Object on which to invoke method. * @param $methodName string Name of method to call. */ - public function WikiMethodCb(&$object, $methodName) + function __construct(&$object, $methodName) { $this->object = &$object; $this->methodName = $methodName; @@ -137,13 +133,11 @@ extends WikiCallback { /** - * Constructor - * * @param $args string Argument declarations * @param $code string Function body * @see create_function(). */ - public function WikiAnonymousCb($args, $code) + function __construct($args, $code) { $this->function = create_function($args, $code); } Modified: trunk/lib/WikiDB/backend/ADODB_mssql.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_mssql.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/backend/ADODB_mssql.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -9,16 +9,13 @@ class WikiDB_backend_ADODB_mssql extends WikiDB_backend_ADODB { - /** - * Constructor. - */ - function WikiDB_backend_ADODB_mssql($dbparams) + function __construct($dbparams) { // Lowercase Assoc arrays define('ADODB_ASSOC_CASE', 0); // Backend constructor - $this->WikiDB_backend_ADODB($dbparams); + parent::__construct($dbparams); // Empty strings in MSSQL? NULLS? $this->_expressions['notempty'] = "NOT LIKE ''"; Modified: trunk/lib/WikiDB/backend/ADODB_mssqlnative.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_mssqlnative.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/backend/ADODB_mssqlnative.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -8,16 +8,13 @@ class WikiDB_backend_ADODB_mssqlnative extends WikiDB_backend_ADODB { - /** - * Constructor. - */ - function WikiDB_backend_ADODB_mssqlnative($dbparams) + function __construct($dbparams) { // Lowercase Assoc arrays define('ADODB_ASSOC_CASE', 0); // Backend constructor - $this->WikiDB_backend_ADODB($dbparams); + parent::__construct($dbparams); // Empty strings in MSSQL? NULLS? $this->_expressions['notempty'] = "NOT LIKE ''"; Modified: trunk/lib/WikiDB/backend/ADODB_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_mysql.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/backend/ADODB_mysql.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -29,12 +29,9 @@ class WikiDB_backend_ADODB_mysql extends WikiDB_backend_ADODB { - /** - * Constructor. - */ - function WikiDB_backend_ADODB_mysql($dbparams) + function __construct($dbparams) { - $this->WikiDB_backend_ADODB($dbparams); + parent::__construct($dbparams); if (!$this->_dbh->_connectionID) return; $this->_serverinfo = $this->_dbh->ServerInfo(); Modified: trunk/lib/WikiDB/backend/ADODB_oci8po.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_oci8po.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/backend/ADODB_oci8po.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -12,16 +12,13 @@ { public $_prefix; - /** - * Constructor. - */ - function WikiDB_backend_ADODB_oci8po($dbparams) + function __construct($dbparams) { // Lowercase Assoc arrays define('ADODB_ASSOC_CASE', 0); // Backend constructor - $this->WikiDB_backend_ADODB($dbparams); + parent::__construct($dbparams); // Empty strings are NULLS in Oracle $this->_expressions['notempty'] = "IS NOT NULL"; Modified: trunk/lib/WikiDB/backend/ADODB_postgres7.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_postgres7.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/backend/ADODB_postgres7.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -17,12 +17,9 @@ class WikiDB_backend_ADODB_postgres7 extends WikiDB_backend_ADODB { - /** - * Constructor. - */ - function WikiDB_backend_ADODB_postgres7($dbparams) + function __construct($dbparams) { - $this->WikiDB_backend_ADODB($dbparams); + parent::__construct($dbparams); if (!$this->_dbh->_connectionID) return; $this->_serverinfo = $this->_dbh->ServerInfo(); Modified: trunk/lib/WikiDB/backend/ADODB_sqlite.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_sqlite.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/backend/ADODB_sqlite.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -11,10 +11,7 @@ class WikiDB_backend_ADODB_sqlite extends WikiDB_backend_ADODB { - /** - * Constructor. - */ - function WikiDB_backend_ADODB_sqlite($dbparams) + function __construct($dbparams) { $parsed = parseDSN($dbparams['dsn']); if (!file_exists($parsed['database'])) { Modified: trunk/lib/WikiDB/backend/PearDB_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_mysql.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/backend/PearDB_mysql.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -9,12 +9,9 @@ class WikiDB_backend_PearDB_mysql extends WikiDB_backend_PearDB { - /** - * Constructor. - */ - function WikiDB_backend_PearDB_mysql($dbparams) + function __construct($dbparams) { - $this->WikiDB_backend_PearDB($dbparams); + parent::__construct($dbparams); if (DB::isError($this->_dbh)) return; //$this->_serverinfo = $this->_dbh->ServerInfo(); $row = $this->_dbh->GetOne("SELECT version()"); Modified: trunk/lib/WikiDB/backend/PearDB_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_oci8.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/backend/PearDB_oci8.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -10,13 +10,10 @@ class WikiDB_backend_PearDB_oci8 extends WikiDB_backend_PearDB_pgsql { - /** - * Constructor - */ - function WikiDB_backend_PearDB_oci8($dbparams) + function __construct($dbparams) { // Backend constructor - $this->WikiDB_backend_PearDB($dbparams); + parent::__construct($dbparams); if (DB::isError($this->_dbh)) return; // Empty strings are NULLS Modified: trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -10,12 +10,10 @@ extends WikiDB_backend_iterator { /** - * Constructor. - * * @param $backend object A WikiDB_backend. * @param $pagename string Page whose revisions to get. */ - public function WikiDB_backend_dumb_AllRevisionsIter(&$backend, $pagename) + function __construct(&$backend, $pagename) { $this->_backend = &$backend; $this->_pagename = $pagename; Modified: trunk/lib/WikiDB/cvs.php =================================================================== --- trunk/lib/WikiDB/cvs.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/cvs.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -17,10 +17,7 @@ { public $_backend; - /** - * Constructor requires the DB parameters. - */ - function WikiDB_cvs($dbparams) + function __construct($dbparams) { if (loadPhpExtension('cvsclient')) $this->_backend = new WikiDB_backend_cvsclient($dbparams); Modified: trunk/lib/WikiDB/file.php =================================================================== --- trunk/lib/WikiDB/file.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/file.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -31,10 +31,7 @@ */ class WikiDB_file extends WikiDB { - /** - * Constructor requires the DB parameters. - */ - function WikiDB_file($dbparams) + function __construct($dbparams) { $backend = new WikiDB_backend_file($dbparams); $this->WikiDB($backend, $dbparams); Modified: trunk/lib/WikiDB/flatfile.php =================================================================== --- trunk/lib/WikiDB/flatfile.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB/flatfile.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -30,10 +30,7 @@ */ class WikiDB_flatfile extends WikiDB { - /** - * Constructor requires the DB parameters. - */ - function WikiDB_flatfile($dbparams) + function __construct($dbparams) { $backend = new WikiDB_backend_flatfile($dbparams); $backend->_wikidb =& $this; Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiDB.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -106,11 +106,9 @@ } /** - * Constructor. - * * @see open() */ - public function WikiDB(&$backend, $dbparams) + function __construct(&$backend, $dbparams) { $this->_backend =& $backend; // don't do the following with the auth_dsn! Modified: trunk/lib/WikiGroup.php =================================================================== --- trunk/lib/WikiGroup.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiGroup.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -422,11 +422,7 @@ */ class GroupNone extends WikiGroup { - - /** - * Constructor - */ - function GroupNone() + function __construct() { return; } @@ -482,13 +478,10 @@ */ class GroupWikiPage extends WikiGroup { - /** - * Constructor - * * Initializes the three superclass instance variables */ - function GroupWikiPage() + function __construct() { //$this->request = &$GLOBALS['request']; $this->username = $this->_getUserName(); @@ -624,10 +617,7 @@ public $_is_member, $_group_members, $_user_groups; - /** - * Constructor - */ - function GroupDb() + function __construct() { global $DBAuthParams, $DBParams; //$this->request = &$GLOBALS['request']; @@ -854,11 +844,7 @@ */ class GroupFile extends WikiGroup { - - /** - * Constructor - */ - function GroupFile() + function __construct() { //$this->request = &$GLOBALS['request']; $this->username = $this->_getUserName(); @@ -970,11 +956,7 @@ */ class GroupLdap extends WikiGroup { - - /** - * Constructor - */ - function GroupLdap() + function __construct() { //$this->request = &$GLOBALS['request']; $this->username = $this->_getUserName(); Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiTheme.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -1680,14 +1680,13 @@ */ class Button extends HtmlElement { - /** Constructor - * + /** * @param string $text The text for the button. * @param string $url The url (href) for the button. * @param string $class The CSS class for the button. * @param array $options Additional attributes for the <input> tag. */ - function Button($text, $url, $class = '', $options = array()) + function __construct($text, $url, $class = '', $options = array()) { global $request; $this->_init('a', array('href' => $url)); @@ -1714,17 +1713,16 @@ */ class ImageButton extends Button { - /** Constructor - * + /** * @param $text string The text for the button. * @param $url string The url (href) for the button. * @param $class string The CSS class for the button. * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function ImageButton($text, $url, $class, $img_url, $img_attr = array()) + function __construct($text, $url, $class, $img_url, $img_attr = array()) { - $this->__construct('a', array('href' => $url)); + parent::__construct('a', array('href' => $url)); if ($class) $this->setAttr('class', $class); // Google honors this @@ -1747,8 +1745,7 @@ */ class SubmitButton extends HtmlElement { - /** Constructor - * + /** * @param $text string The text for the button. * @param $name string The name of the form field. * @param $class string The CSS class for the button. @@ -1756,8 +1753,7 @@ */ function SubmitButton($text, $name = '', $class = '', $options = array()) { - $this->__construct('input', array('type' => 'submit', - 'value' => $text)); + parent::__construct('input', array('type' => 'submit', 'value' => $text)); if ($name) $this->setAttr('name', $name); if ($class) @@ -1775,17 +1771,16 @@ */ class SubmitImageButton extends SubmitButton { - /** Constructor - * + /** * @param $text string The text for the button. * @param $name string The name of the form field. * @param $class string The CSS class for the button. * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function SubmitImageButton($text, $name = '', $class = '', $img_url, $img_attr = array()) + function __construct($text, $name = '', $class = '', $img_url, $img_attr = array()) { - $this->__construct('input', array('type' => 'image', + parent::__construct('input', array('type' => 'image', 'src' => $img_url, 'alt' => $text)); if ($name) Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/WikiUser.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -61,9 +61,6 @@ } } -/** - * - */ class WikiUser { public $_userid = false; @@ -72,15 +69,13 @@ public $_authmethod = '', $_authhow = ''; /** - * Constructor. - * * Populates the instance variables and calls $this->_ok() * to ensure that the parameters are valid. * @param Request $request * @param mixed $userid String of username or WikiUser object. * @param int|bool $authlevel Authorization level. */ - function WikiUser(&$request, $userid = false, $authlevel = false) + function __construct(&$request, $userid = false, $authlevel = false) { $this->_request =& $request; $this->_dbi =& $this->_request->getDbh(); Modified: trunk/lib/difflib.php =================================================================== --- trunk/lib/difflib.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/difflib.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -508,14 +508,13 @@ public $edits; /** - * Constructor. * Computes diff between sequences of strings. * * @param $from_lines array An array of strings. * (Typically these are lines from a file.) * @param $to_lines array An array of strings. */ - function Diff($from_lines, $to_lines) + function __construct($from_lines, $to_lines) { $eng = new _DiffEngine; $this->edits = $eng->diff($from_lines, $to_lines); @@ -648,8 +647,6 @@ extends Diff { /** - * Constructor. - * * Computes diff between sequences of strings. * * This can be used to compute things like @@ -670,8 +667,8 @@ * @param $mapped_to_lines array This array should * have the same number of elements as $to_lines. */ - function MappedDiff($from_lines, $to_lines, - $mapped_from_lines, $mapped_to_lines) + function __construct($from_lines, $to_lines, + $mapped_from_lines, $mapped_to_lines) { assert(sizeof($from_lines) == sizeof($mapped_from_lines)); Modified: trunk/lib/plugin/RecentChanges.php =================================================================== --- trunk/lib/plugin/RecentChanges.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/plugin/RecentChanges.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -1088,13 +1088,12 @@ */ class NonDeletedRevisionIterator extends WikiDB_PageRevisionIterator { - /** Constructor - * + /** * @param $revisions object a WikiDB_PageRevisionIterator. * @param bool $check_current_revision * @return void */ - function NonDeletedRevisionIterator($revisions, $check_current_revision = true) + function __construct($revisions, $check_current_revision = true) { $this->_revisions = $revisions; $this->_check_current_revision = $check_current_revision; @@ -1124,11 +1123,10 @@ */ class NewPageRevisionIterator extends WikiDB_PageRevisionIterator { - /** Constructor - * + /** * @param $revisions object a WikiDB_PageRevisionIterator. */ - function NewPageRevisionIterator($revisions) + function __construct($revisions) { $this->_revisions = $revisions; } @@ -1455,9 +1453,9 @@ class OptionsButtonBars extends HtmlElement { - function OptionsButtonBars($plugin_args) + function __construct($plugin_args) { - $this->__construct('fieldset', array('class' => 'wiki-rc-action')); + parent::__construct('fieldset', array('class' => 'wiki-rc-action')); // Add ShowHideFolder button $icon = $GLOBALS['WikiTheme']->_findData('images/folderArrowOpen.png'); Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-07-17 16:12:36 UTC (rev 8982) +++ trunk/lib/stdlib.php 2014-07-17 16:52:49 UTC (rev 8983) @@ -812,8 +812,7 @@ */ public $anchor; - /** Constructor - * + /** * @param mixed $name Page name. * WikiDB_Page, WikiDB_PageRevision, or string. * This can be a relative subpage name (like '/SubPage'), @@ -824,7 +823,7 @@ * * @param mixed $anchor For links to anchors in page. */ - function WikiPageName($name, $basename = false, $anchor = false) + function __construct($name, $basename = false, $anchor = false) { if (is_string($name)) { $this->shortName = $name; @@ -1724,14 +1723,13 @@ */ class Alert { - /** Constructor - * + /** * @param mixed $head Header ("title") for alert box. * @param mixed $body The text in the alert box. * @param array $buttons An array mapping button labels to URLs. * The default is a single "Okay" button pointing to $request->getURLtoSelf(). */ - function Alert($head, $body, $buttons = array()) + function __construct($head, $body, $buttons = array()) { if (is_array($body)) { $html = HTML::ol(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 16:12:39
|
Revision: 8982 http://sourceforge.net/p/phpwiki/code/8982 Author: vargenau Date: 2014-07-17 16:12:36 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use public when needed Modified Paths: -------------- trunk/lib/DbSession/ADODB.php trunk/lib/DbSession/PDO.php trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/file.php Modified: trunk/lib/DbSession/ADODB.php =================================================================== --- trunk/lib/DbSession/ADODB.php 2014-07-17 15:47:03 UTC (rev 8981) +++ trunk/lib/DbSession/ADODB.php 2014-07-17 16:12:36 UTC (rev 8982) @@ -86,7 +86,7 @@ * @return boolean true just a variable to notify PHP that everything * is good. */ - private function open($save_path, $session_name) + public function open($save_path, $session_name) { //$this->log("_open($save_path, $session_name)"); return true; @@ -100,7 +100,7 @@ * @return boolean true just a variable to notify PHP that everything * is good. */ - private function close() + public function close() { //$this->log("_close()"); return true; @@ -112,7 +112,7 @@ * @param string $id an id of current session * @return string */ - private function read($id) + public function read($id) { //$this->log("_read($id)"); $dbh = $this->_connect(); @@ -150,7 +150,7 @@ * @return boolean true if data saved successfully and false * otherwise. */ - private function write($id, $sess_data) + public function write($id, $sess_data) { if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; @@ -199,7 +199,7 @@ * @param string $id * @return boolean true */ - private function destroy($id) + public function destroy($id) { $dbh = $this->_connect(); $table = $this->_table; @@ -217,7 +217,7 @@ * @param int $maxlifetime session's time to live. * @return boolean true */ - private function gc($maxlifetime) + public function gc($maxlifetime) { $dbh = $this->_connect(); $table = $this->_table; Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2014-07-17 15:47:03 UTC (rev 8981) +++ trunk/lib/DbSession/PDO.php 2014-07-17 16:12:36 UTC (rev 8982) @@ -64,7 +64,7 @@ * @return boolean true just a variable to notify PHP that everything * is good. */ - private function open($save_path, $session_name) + public function open($save_path, $session_name) { //$this->log("_open($save_path, $session_name)"); return true; @@ -78,7 +78,7 @@ * @return boolean true just a variable to notify PHP that everything * is good. */ - private function close() + public function close() { //$this->log("_close()"); return true; @@ -90,7 +90,7 @@ * @param string $id an id of current session * @return string */ - private function read($id) + public function read($id) { //$this->log("_read($id)"); $dbh = $this->_connect(); @@ -133,7 +133,7 @@ * @return boolean true if data saved successfully and false * otherwise. */ - private function write($id, $sess_data) + public function write($id, $sess_data) { if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; @@ -196,7 +196,7 @@ * @param string $id * @return boolean true */ - private function destroy($id) + public function destroy($id) { $table = $this->_table; $dbh = $this->_connect(); @@ -213,7 +213,7 @@ * @param int $maxlifetime session's time to live. * @return boolean true */ - private function gc($maxlifetime) + public function gc($maxlifetime) { $table = $this->_table; $threshold = time() - $maxlifetime; Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2014-07-17 15:47:03 UTC (rev 8981) +++ trunk/lib/WikiDB/backend/ADODB.php 2014-07-17 16:12:36 UTC (rev 8982) @@ -1208,7 +1208,7 @@ * Calls can be nested. The tables won't be unlocked until * _unlock_database() is called as many times as _lock_database(). */ - protected function lock($tables, $write_lock = true) + public function lock($tables, $write_lock = true) { $this->_dbh->StartTrans(); if ($this->_lock_count++ == 0) { @@ -1233,7 +1233,7 @@ * * @see _lock_database */ - protected function unlock($tables = false, $force = false) + public function unlock($tables = false, $force = false) { if ($this->_lock_count == 0) { $this->_current_lock = false; Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2014-07-17 15:47:03 UTC (rev 8981) +++ trunk/lib/WikiDB/backend/PDO.php 2014-07-17 16:12:36 UTC (rev 8982) @@ -1165,7 +1165,7 @@ * Calls can be nested. The tables won't be unlocked until * _unlock_database() is called as many times as _lock_database(). */ - protected function lock($tables, $write_lock = true) + public function lock($tables, $write_lock = true) { if ($this->_lock_count++ == 0) { $this->_current_lock = $tables; @@ -1194,7 +1194,7 @@ * * @see _lock_database */ - protected function unlock($tables = false, $force = false) + public function unlock($tables = false, $force = false) { if ($this->_lock_count == 0) { $this->_current_lock = false; Modified: trunk/lib/WikiDB/backend/file.php =================================================================== --- trunk/lib/WikiDB/backend/file.php 2014-07-17 15:47:03 UTC (rev 8981) +++ trunk/lib/WikiDB/backend/file.php 2014-07-17 16:12:36 UTC (rev 8982) @@ -400,7 +400,7 @@ /** * Rename all files for this page */ - protected function rename_page($pagename, $to) + public function rename_page($pagename, $to) { $version = _getLatestVersion($pagename); foreach ($this->_dir_names as $type => $path) { @@ -590,7 +590,7 @@ * * @return object A WikiDB_backend_iterator. */ - protected function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = '') + public function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = '') { require_once 'lib/PageList.php'; $this->_loadLatestVersions(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 15:47:10
|
Revision: 8981 http://sourceforge.net/p/phpwiki/code/8981 Author: vargenau Date: 2014-07-17 15:47:03 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use public when needed Modified Paths: -------------- trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php Modified: trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php 2014-07-17 15:42:59 UTC (rev 8980) +++ trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php 2014-07-17 15:47:03 UTC (rev 8981) @@ -15,7 +15,7 @@ * @param $backend object A WikiDB_backend. * @param $pagename string Page whose revisions to get. */ - protected function WikiDB_backend_dumb_AllRevisionsIter(&$backend, $pagename) + public function WikiDB_backend_dumb_AllRevisionsIter(&$backend, $pagename) { $this->_backend = &$backend; $this->_pagename = $pagename; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 15:43:07
|
Revision: 8980 http://sourceforge.net/p/phpwiki/code/8980 Author: vargenau Date: 2014-07-17 15:42:59 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use public when needed Modified Paths: -------------- trunk/lib/DbSession/SQL.php Modified: trunk/lib/DbSession/SQL.php =================================================================== --- trunk/lib/DbSession/SQL.php 2014-07-17 15:34:47 UTC (rev 8979) +++ trunk/lib/DbSession/SQL.php 2014-07-17 15:42:59 UTC (rev 8980) @@ -71,7 +71,7 @@ * @return boolean true just a variable to notify PHP that everything * is good. */ - private function open($save_path, $session_name) + public function open($save_path, $session_name) { //$this->log("_open($save_path, $session_name)"); return true; @@ -85,7 +85,7 @@ * @return boolean true just a variable to notify PHP that everything * is good. */ - private function close() + public function close() { //$this->log("_close()"); return true; @@ -97,7 +97,7 @@ * @param string $id an id of current session * @return string */ - private function read($id) + public function read($id) { //$this->log("_read($id)"); $dbh = $this->_connect(); @@ -136,7 +136,7 @@ * @return boolean true if data saved successfully and false * otherwise. */ - private function write($id, $sess_data) + public function write($id, $sess_data) { if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; @@ -186,7 +186,7 @@ * @param string $id * @return boolean true */ - private function destroy($id) + public function destroy($id) { $dbh = $this->_connect(); $table = $this->_table; @@ -204,7 +204,7 @@ * @param int $maxlifetime session's time to live. * @return boolean true */ - private function gc($maxlifetime) + public function gc($maxlifetime) { $dbh = $this->_connect(); $table = $this->_table; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 15:34:50
|
Revision: 8979 http://sourceforge.net/p/phpwiki/code/8979 Author: vargenau Date: 2014-07-17 15:34:47 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use public when needed Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2014-07-17 15:27:35 UTC (rev 8978) +++ trunk/lib/FileFinder.php 2014-07-17 15:34:47 UTC (rev 8979) @@ -142,7 +142,7 @@ * @param string $path * @return string path_separator. */ - private function _use_path_separator($path) + public function _use_path_separator($path) { if (isWindows95()) { if (empty($path)) return "\\"; @@ -158,7 +158,7 @@ * @param $path string Path. * @return bool True if path is absolute. */ - private function _is_abs($path) + public function _is_abs($path) { if (substr($path, 0, 1) == '/') { return true; @@ -177,7 +177,7 @@ * @param $path string Path. * @return bool New path (destructive) */ - private function _strip_last_pathchar(&$path) + public function _strip_last_pathchar(&$path) { if (substr($path, -1) == '/' or substr($path, -1) == "\\") $path = substr($path, 0, -1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 15:27:37
|
Revision: 8978 http://sourceforge.net/p/phpwiki/code/8978 Author: vargenau Date: 2014-07-17 15:27:35 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use public when needed Modified Paths: -------------- trunk/lib/WikiDB/backend/PearDB.php Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2014-07-17 15:18:20 UTC (rev 8977) +++ trunk/lib/WikiDB/backend/PearDB.php 2014-07-17 15:27:35 UTC (rev 8978) @@ -1071,7 +1071,7 @@ * * @param A PEAR_error object. */ - protected function _pear_error_callback($error) + public function _pear_error_callback($error) { if ($this->_is_false_error($error)) return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 15:18:27
|
Revision: 8977 http://sourceforge.net/p/phpwiki/code/8977 Author: vargenau Date: 2014-07-17 15:18:20 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use public when needed Modified Paths: -------------- trunk/lib/WikiPluginCached.php Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2014-07-17 15:16:21 UTC (rev 8976) +++ trunk/lib/WikiPluginCached.php 2014-07-17 15:18:20 UTC (rev 8977) @@ -479,7 +479,7 @@ * * @return Cache copy of the cache object */ - static protected function newCache() + static public function newCache() { static $staticcache; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 15:16:30
|
Revision: 8976 http://sourceforge.net/p/phpwiki/code/8976 Author: vargenau Date: 2014-07-17 15:16:21 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use public when needed Modified Paths: -------------- trunk/lib/WikiPluginCached.php Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2014-07-17 14:32:09 UTC (rev 8975) +++ trunk/lib/WikiPluginCached.php 2014-07-17 15:16:21 UTC (rev 8976) @@ -134,7 +134,7 @@ * @see #getImage * @see #getMap */ - protected function run($dbi, $argstr, &$request, $basepage) + public function run($dbi, $argstr, &$request, $basepage) { $cache = $this->newCache(); //$cacheparams = $GLOBALS['CacheParams']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 14:32:16
|
Revision: 8975 http://sourceforge.net/p/phpwiki/code/8975 Author: vargenau Date: 2014-07-17 14:32:09 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Use public when needed Modified Paths: -------------- trunk/lib/ErrorManager.php trunk/lib/FileFinder.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiDB.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2014-07-17 14:14:29 UTC (rev 8974) +++ trunk/lib/ErrorManager.php 2014-07-17 14:32:09 UTC (rev 8975) @@ -49,7 +49,7 @@ * * As this is a singleton class, you should never call this. */ - private function ErrorManager() + public function ErrorManager() { $this->_handlers = array(); $this->_fatal_handler = false; Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2014-07-17 14:14:29 UTC (rev 8974) +++ trunk/lib/FileFinder.php 2014-07-17 14:32:09 UTC (rev 8975) @@ -226,7 +226,7 @@ * * @return string path_separator. */ - private function _get_ini_separator() + public function _get_ini_separator() { return isWindows() ? ';' : ':'; // return preg_match('/^Windows/', php_uname()) @@ -258,7 +258,7 @@ * * @param $dir string Directory to add. */ - private function _append_to_include_path($dir) + public function _append_to_include_path($dir) { $dir = $this->slashifyPath($dir); if (!in_array($dir, $this->_path)) { @@ -286,7 +286,7 @@ * * @param $dir string Directory to add. */ - private function _prepend_to_include_path($dir) + public function _prepend_to_include_path($dir) { $dir = $this->slashifyPath($dir); // remove duplicates Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2014-07-17 14:14:29 UTC (rev 8974) +++ trunk/lib/WikiDB/backend/PearDB.php 2014-07-17 14:32:09 UTC (rev 8975) @@ -1006,7 +1006,7 @@ * Calls can be nested. The tables won't be unlocked until * _unlock_database() is called as many times as _lock_database(). */ - protected function lock($tables = false, $write_lock = true) + public function lock($tables = false, $write_lock = true) { if ($this->_lock_count++ == 0) $this->_lock_tables($write_lock); @@ -1028,7 +1028,7 @@ * * @see _lock_database */ - protected function unlock($tables = false, $force = false) + public function unlock($tables = false, $force = false) { if ($this->_lock_count == 0) return; Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-07-17 14:14:29 UTC (rev 8974) +++ trunk/lib/WikiDB.php 2014-07-17 14:32:09 UTC (rev 8975) @@ -110,7 +110,7 @@ * * @see open() */ - private function WikiDB(&$backend, $dbparams) + public function WikiDB(&$backend, $dbparams) { $this->_backend =& $backend; // don't do the following with the auth_dsn! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 14:14:40
|
Revision: 8974 http://sourceforge.net/p/phpwiki/code/8974 Author: vargenau Date: 2014-07-17 14:14:29 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Add public/protected/private Modified Paths: -------------- trunk/lib/DbSession/ADODB.php trunk/lib/DbSession/PDO.php trunk/lib/DbSession/SQL.php trunk/lib/ErrorManager.php trunk/lib/FileFinder.php trunk/lib/HtmlElement.php trunk/lib/SemanticWeb.php trunk/lib/Template.php trunk/lib/TextSearchQuery.php trunk/lib/WikiCallback.php trunk/lib/WikiDB/adodb/adodb.inc.php trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiDB/backend/dbaBase.php trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php trunk/lib/WikiDB/backend/file.php trunk/lib/WikiDB/backend.php trunk/lib/WikiDB.php trunk/lib/WikiGroup.php trunk/lib/WikiPluginCached.php trunk/lib/WikiUser/LDAP.php trunk/lib/main.php trunk/lib/plugin/PopularNearby.php trunk/lib/plugin/Transclude.php trunk/lib/plugin/VisualWiki.php trunk/lib/upgrade.php trunk/lib/wikilens/RatingsDb.php Modified: trunk/lib/DbSession/ADODB.php =================================================================== --- trunk/lib/DbSession/ADODB.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/DbSession/ADODB.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -85,9 +85,8 @@ * @param string $session_name a name of the concrete file * @return boolean true just a variable to notify PHP that everything * is good. - * @access private */ - function open($save_path, $session_name) + private function open($save_path, $session_name) { //$this->log("_open($save_path, $session_name)"); return true; @@ -100,9 +99,8 @@ * * @return boolean true just a variable to notify PHP that everything * is good. - * @access private */ - function close() + private function close() { //$this->log("_close()"); return true; @@ -113,9 +111,8 @@ * * @param string $id an id of current session * @return string - * @access private */ - function read($id) + private function read($id) { //$this->log("_read($id)"); $dbh = $this->_connect(); @@ -152,9 +149,8 @@ * @param string $sess_data * @return boolean true if data saved successfully and false * otherwise. - * @access private */ - function write($id, $sess_data) + private function write($id, $sess_data) { if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; @@ -202,9 +198,8 @@ * * @param string $id * @return boolean true - * @access private */ - function destroy($id) + private function destroy($id) { $dbh = $this->_connect(); $table = $this->_table; @@ -221,9 +216,8 @@ * * @param int $maxlifetime session's time to live. * @return boolean true - * @access private */ - function gc($maxlifetime) + private function gc($maxlifetime) { $dbh = $this->_connect(); $table = $this->_table; Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/DbSession/PDO.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -63,9 +63,8 @@ * @param string $session_name a name of the concrete file * @return boolean true just a variable to notify PHP that everything * is good. - * @access private */ - function open($save_path, $session_name) + private function open($save_path, $session_name) { //$this->log("_open($save_path, $session_name)"); return true; @@ -78,9 +77,8 @@ * * @return boolean true just a variable to notify PHP that everything * is good. - * @access private */ - function close() + private function close() { //$this->log("_close()"); return true; @@ -91,9 +89,8 @@ * * @param string $id an id of current session * @return string - * @access private */ - function read($id) + private function read($id) { //$this->log("_read($id)"); $dbh = $this->_connect(); @@ -135,9 +132,8 @@ * @param string $sess_data * @return boolean true if data saved successfully and false * otherwise. - * @access private */ - function write($id, $sess_data) + private function write($id, $sess_data) { if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; @@ -199,9 +195,8 @@ * * @param string $id * @return boolean true - * @access private */ - function destroy($id) + private function destroy($id) { $table = $this->_table; $dbh = $this->_connect(); @@ -217,9 +212,8 @@ * * @param int $maxlifetime session's time to live. * @return boolean true - * @access private */ - function gc($maxlifetime) + private function gc($maxlifetime) { $table = $this->_table; $threshold = time() - $maxlifetime; Modified: trunk/lib/DbSession/SQL.php =================================================================== --- trunk/lib/DbSession/SQL.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/DbSession/SQL.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -70,9 +70,8 @@ * @param string $session_name a name of the concrete file * @return boolean true just a variable to notify PHP that everything * is good. - * @access private */ - function open($save_path, $session_name) + private function open($save_path, $session_name) { //$this->log("_open($save_path, $session_name)"); return true; @@ -85,9 +84,8 @@ * * @return boolean true just a variable to notify PHP that everything * is good. - * @access private */ - function close() + private function close() { //$this->log("_close()"); return true; @@ -98,9 +96,8 @@ * * @param string $id an id of current session * @return string - * @access private */ - function read($id) + private function read($id) { //$this->log("_read($id)"); $dbh = $this->_connect(); @@ -138,9 +135,8 @@ * @param string $sess_data * @return boolean true if data saved successfully and false * otherwise. - * @access private */ - function write($id, $sess_data) + private function write($id, $sess_data) { if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; @@ -189,9 +185,8 @@ * * @param string $id * @return boolean true - * @access private */ - function destroy($id) + private function destroy($id) { $dbh = $this->_connect(); $table = $this->_table; @@ -208,9 +203,8 @@ * * @param int $maxlifetime session's time to live. * @return boolean true - * @access private */ - function gc($maxlifetime) + private function gc($maxlifetime) { $dbh = $this->_connect(); $table = $this->_table; Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/ErrorManager.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -48,9 +48,8 @@ * Constructor. * * As this is a singleton class, you should never call this. - * @access private */ - function ErrorManager() + private function ErrorManager() { $this->_handlers = array(); $this->_fatal_handler = false; @@ -62,10 +61,9 @@ /** * Get mask indicating which errors are currently being postponed. - * @access public * @return int The current postponed error mask. */ - function getPostponedErrorMask() + public function getPostponedErrorMask() { return $this->_postpone_mask; } @@ -78,10 +76,9 @@ * When you set this mask, any queue errors which do not match the new * mask are reported. * - * @access public * @param $newmask int The new value for the mask. */ - function setPostponedErrorMask($newmask) + public function setPostponedErrorMask($newmask) { $this->_postpone_mask = $newmask; if (function_exists('PrintXML')) @@ -93,9 +90,8 @@ /** * Report any queued error messages. - * @access public */ - function flushPostponedErrors() + public function flushPostponedErrors() { if (function_exists('PrintXML')) PrintXML($this->_flush_errors()); @@ -106,9 +102,8 @@ /** * Get rid of all pending error messages in case of all non-html * - pdf or image - output. - * @access public */ - function destroyPostponedErrors() + public function destroyPostponedErrors() { $this->_postponed_errors = array(); } @@ -181,19 +176,17 @@ * handler. This allows the handler to * "adjust" the error message. * </dl> - * @access public * @param $handler WikiCallback Handler to call. */ - function pushErrorHandler($handler) + public function pushErrorHandler($handler) { array_unshift($this->_handlers, $handler); } /** * Pop an error handler off the handler stack. - * @access public */ - function popErrorHandler() + public function popErrorHandler() { return array_shift($this->_handlers); } @@ -205,10 +198,9 @@ * gets passed one argument: a PhpError object describing the * fatal error. * - * @access public * @param $handler WikiCallback Callback to call on fatal errors. */ - function setFatalHandler($handler) + public function setFatalHandler($handler) { $this->_fatal_handler = $handler; } @@ -219,10 +211,9 @@ * The error is passed through any registered error handlers, and * then either reported or postponed. * - * @access public * @param $error object A PhpError object. */ - function handleError($error) + public function handleError($error) { static $in_handler; @@ -317,10 +308,7 @@ $this->handleError(new PhpWikiError($errno, $msg, '?', '?')); } - /** - * @access private - */ - function _die($error) + private function _die($error) { global $WikiTheme; //echo "\n\n<html><body>"; @@ -333,10 +321,7 @@ } } - /** - * @access private - */ - function _flush_errors($keep_mask = 0) + private function _flush_errors($keep_mask = 0) { $errors = &$this->_postponed_errors; if (empty($errors)) return ''; Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/FileFinder.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -119,10 +119,9 @@ * Windows95: \ * Mac: : * - * @access private * @return string path_separator. */ - function _get_syspath_separator() + private function _get_syspath_separator() { if (!empty($this->_pathsep)) return $this->_pathsep; elseif (isWindowsNT()) return "/"; // we can safely use '/' @@ -141,10 +140,9 @@ * or use '\' for ours. * * @param string $path - * @access private * @return string path_separator. */ - function _use_path_separator($path) + private function _use_path_separator($path) { if (isWindows95()) { if (empty($path)) return "\\"; @@ -157,11 +155,10 @@ /** * Determine if path is absolute. * - * @access private * @param $path string Path. * @return bool True if path is absolute. */ - function _is_abs($path) + private function _is_abs($path) { if (substr($path, 0, 1) == '/') { return true; @@ -177,11 +174,10 @@ /** * Strip ending '/' or '\' from path. * - * @access private * @param $path string Path. * @return bool New path (destructive) */ - function _strip_last_pathchar(&$path) + private function _strip_last_pathchar(&$path) { if (substr($path, -1) == '/' or substr($path, -1) == "\\") $path = substr($path, 0, -1); @@ -191,11 +187,10 @@ /** * Report a "file not found" error. * - * @access private * @param $file string Name of missing file. * @return bool false. */ - function _not_found($file) + private function _not_found($file) { trigger_error(sprintf(_("%s: file not found"), $file), E_USER_ERROR); return false; @@ -204,12 +199,11 @@ /** * Search our path for a file. * - * @access private * @param $file string File to find. * @return string Directory which contains $file, or false. * [5x,44ms] */ - function _search_path($file) + private function _search_path($file) { foreach ($this->_path as $dir) { // ensure we use the same pathsep @@ -230,10 +224,9 @@ * Fixme: * On Mac it cannot be : because this is the seperator there! * - * @access private * @return string path_separator. */ - function _get_ini_separator() + private function _get_ini_separator() { return isWindows() ? ';' : ':'; // return preg_match('/^Windows/', php_uname()) @@ -242,10 +235,9 @@ /** * Get the value of PHP's include_path. * - * @access private * @return array Include path. */ - function _get_include_path() + private function _get_include_path() { if (defined("INCLUDE_PATH")) $path = INCLUDE_PATH; @@ -264,10 +256,9 @@ * The directory is appended only if it is not already listed in * the include_path. * - * @access private * @param $dir string Directory to add. */ - function _append_to_include_path($dir) + private function _append_to_include_path($dir) { $dir = $this->slashifyPath($dir); if (!in_array($dir, $this->_path)) { @@ -293,10 +284,9 @@ * * The directory is prepended, and removed from the tail if already existing. * - * @access private * @param $dir string Directory to add. */ - function _prepend_to_include_path($dir) + private function _prepend_to_include_path($dir) { $dir = $this->slashifyPath($dir); // remove duplicates @@ -326,10 +316,9 @@ /** * Try to figure out the appropriate value for $LANG. * - * @access private * @return string The value of $LANG. */ - function _get_lang() + private function _get_lang() { if (!empty($GLOBALS['LANG'])) return $GLOBALS['LANG']; Modified: trunk/lib/HtmlElement.php =================================================================== --- trunk/lib/HtmlElement.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/HtmlElement.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -44,10 +44,9 @@ } /** - * @access protected * This is used by the static factory methods is class HTML. */ - function _init2($args) + protected function _init2($args) { if ($args) { if (is_array($args[0])) Modified: trunk/lib/SemanticWeb.php =================================================================== --- trunk/lib/SemanticWeb.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/SemanticWeb.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -309,12 +309,11 @@ * This version unifies the attribute values from the database to a * numeric basevalue before comparison. (area:=963.6km^2 => 9.366e+08 m^2) * - * @access private * @param $value number A numerical value: integer, float or string. * @param $x string The variable name to be replaced in the query. * @return string */ - function _bind($value, $x) + private function _bind($value, $x) { $ori_value = $value; $value = preg_replace("/,/", "", $value); Modified: trunk/lib/Template.php =================================================================== --- trunk/lib/Template.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/Template.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -118,7 +118,6 @@ * Substitute HTML replacement text for tokens in template. * * Constructs a new WikiTemplate based upon the named template. - * @access public * @param string $varname Name of token to substitute for. * @param string $value Replacement HTML text. */ Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/TextSearchQuery.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -363,12 +363,11 @@ * So always when the placeholder is an array, the names of the target struct must match * and all vars be defined. Use the method can_match($struct) therefore. * - * @access public * @param $search_query string A numerical query with placeholders as variable. * @param $placeholders array or string All placeholders in the query must be defined * here, and will be replaced by the matcher. */ - function NumericSearchQuery($search_query, $placeholders) + public function NumericSearchQuery($search_query, $placeholders) { // added some basic security checks against user input $this->_query = $search_query; @@ -492,7 +491,6 @@ * Strip non-numeric chars from the variable (as the groupseperator) and replace * it in the symbolic query for evaluation. * - * @access private * @param $value number A numerical value: integer, float or string. * @param $x string The variable name to be replaced in the query. * @return string @@ -520,12 +518,11 @@ * With an array of placeholders we need a hash to check against, if all required names are given. * Purpose: Be silent about missing vars, just return false. `* - * @access public * @param string $variables string or hash of name => value The keys must satisfy all placeholders in the definition. * We want the full hash and not just the keys because a hash check is faster than the array of keys check. * @return boolean */ - function can_match(&$variables) + public function can_match(&$variables) { if (empty($this->_query)) return false; @@ -548,11 +545,10 @@ * With one placeholder we need just a number. * With an array of placeholders we need a hash. * - * @access public * @param $variable number or array of name => value The keys must satisfy all placeholders in the definition. * @return boolean */ - function match(&$variable) + public function match(&$variable) { $p =& $this->_placeholders; $this->workquery = $this->_query; Modified: trunk/lib/WikiCallback.php =================================================================== --- trunk/lib/WikiCallback.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiCallback.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -24,9 +24,8 @@ * the first element should contain (a reference to) the object, the second * element should be a string containing the name of the method to be invoked. * @return object Returns the appropriate subclass of WikiCallback. - * @access public */ - function callback($pearCb) + public function callback($pearCb) { if (is_string($pearCb)) return new WikiFunctionCb($pearCb); @@ -43,9 +42,8 @@ * @param ? mixed This method takes a variable number of arguments (zero or more). * The callback function is called with the specified arguments. * @return mixed The return value of the callback. - * @access public */ - function call() + public function call() { return $this->call_array(func_get_args()); } @@ -56,9 +54,8 @@ * @param $args array Contains the arguments to be passed to the callback. * @return mixed The return value of the callback. * @see call_user_func_array. - * @access public */ - function call_array($args) + public function call_array($args) { trigger_error('pure virtual', E_USER_ERROR); } @@ -69,9 +66,8 @@ * @return string The name of the callback function. * (This value is suitable for passing as the callback parameter * to a number of different Pear functions and methods.) - * @access public */ - function toPearCb() + public function toPearCb() { trigger_error('pure virtual', E_USER_ERROR); } @@ -87,9 +83,8 @@ * Constructor * * @param $functionName string Name of global function to call. - * @access public */ - function WikiFunctionCb($functionName) + public function WikiFunctionCb($functionName) { $this->functionName = $functionName; } @@ -116,9 +111,8 @@ * * @param $object object Object on which to invoke method. * @param $methodName string Name of method to call. - * @access public */ - function WikiMethodCb(&$object, $methodName) + public function WikiMethodCb(&$object, $methodName) { $this->object = &$object; $this->methodName = $methodName; @@ -148,9 +142,8 @@ * @param $args string Argument declarations * @param $code string Function body * @see create_function(). - * @access public */ - function WikiAnonymousCb($args, $code) + public function WikiAnonymousCb($args, $code) { $this->function = create_function($args, $code); } Modified: trunk/lib/WikiDB/adodb/adodb.inc.php =================================================================== --- trunk/lib/WikiDB/adodb/adodb.inc.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiDB/adodb/adodb.inc.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -2142,10 +2142,9 @@ * @param mixed $primkeyArr * @param array $extra Query extras: limit, offset... * @param mixed $relations Associative array: table's foreign name, "hasMany", "belongsTo" - * @access public * @return void */ - function GetActiveRecordsClass( + public function GetActiveRecordsClass( $class, $table,$whereOrderBy=false,$bindarr=false, $primkeyArr=false, $extra=array(), $relations=array()) Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiDB/backend/ADODB.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -1207,10 +1207,8 @@ * * Calls can be nested. The tables won't be unlocked until * _unlock_database() is called as many times as _lock_database(). - * - * @access protected */ - function lock($tables, $write_lock = true) + protected function lock($tables, $write_lock = true) { $this->_dbh->StartTrans(); if ($this->_lock_count++ == 0) { @@ -1230,14 +1228,12 @@ /** * Release a write lock on the tables in the SQL database. * - * @access protected - * * @param $force boolean Unlock even if not every call to lock() has been matched * by a call to unlock(). * * @see _lock_database */ - function unlock($tables = false, $force = false) + protected function unlock($tables = false, $force = false) { if ($this->_lock_count == 0) { $this->_current_lock = false; Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiDB/backend/PDO.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -1164,10 +1164,8 @@ * * Calls can be nested. The tables won't be unlocked until * _unlock_database() is called as many times as _lock_database(). - * - * @access protected */ - function lock($tables, $write_lock = true) + protected function lock($tables, $write_lock = true) { if ($this->_lock_count++ == 0) { $this->_current_lock = $tables; @@ -1191,14 +1189,12 @@ /** * Release a write lock on the tables in the SQL database. * - * @access protected - * * @param $force boolean Unlock even if not every call to lock() has been matched * by a call to unlock(). * * @see _lock_database */ - function unlock($tables = false, $force = false) + protected function unlock($tables = false, $force = false) { if ($this->_lock_count == 0) { $this->_current_lock = false; Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiDB/backend/PearDB.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -1005,10 +1005,8 @@ * * Calls can be nested. The tables won't be unlocked until * _unlock_database() is called as many times as _lock_database(). - * - * @access protected */ - function lock($tables = false, $write_lock = true) + protected function lock($tables = false, $write_lock = true) { if ($this->_lock_count++ == 0) $this->_lock_tables($write_lock); @@ -1025,14 +1023,12 @@ /** * Release a write lock on the tables in the SQL database. * - * @access protected - * * @param $force boolean Unlock even if not every call to lock() has been matched * by a call to unlock(). * * @see _lock_database */ - function unlock($tables = false, $force = false) + protected function unlock($tables = false, $force = false) { if ($this->_lock_count == 0) return; @@ -1073,11 +1069,9 @@ /** * Callback for PEAR (DB) errors. * - * @access protected - * * @param A PEAR_error object. */ - function _pear_error_callback($error) + protected function _pear_error_callback($error) { if ($this->_is_false_error($error)) return; @@ -1095,10 +1089,9 @@ * return any data. (So when a "LOCK" command doesn't return any data, * DB reports it as an error, when in fact, it's not.) * - * @access private * @return bool True iff error is not really an error. */ - function _is_false_error($error) + private function _is_false_error($error) { if ($error->getCode() != DB_ERROR) return false; @@ -1148,9 +1141,8 @@ * errors and notices. This is an error callback (for use with * ErrorManager which will filter out those spurious messages.) * @see _is_false_error, ErrorManager - * @access private */ - function _pear_notice_filter($err) + private function _pear_notice_filter($err) { return ($err->isNotice() && preg_match('|DB[/\\\\]common.php$|', $err->errfile) Modified: trunk/lib/WikiDB/backend/dbaBase.php =================================================================== --- trunk/lib/WikiDB/backend/dbaBase.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiDB/backend/dbaBase.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -398,12 +398,10 @@ } /** - * @access public - * * @return array of all linkrelations * Faster than the dumb WikiDB method. */ - function list_relations($also_attributes = false, + public function list_relations($also_attributes = false, $only_attributes = false, $sorted = true) { Modified: trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -12,11 +12,10 @@ /** * Constructor. * - * @access protected * @param $backend object A WikiDB_backend. * @param $pagename string Page whose revisions to get. */ - function WikiDB_backend_dumb_AllRevisionsIter(&$backend, $pagename) + protected function WikiDB_backend_dumb_AllRevisionsIter(&$backend, $pagename) { $this->_backend = &$backend; $this->_pagename = $pagename; Modified: trunk/lib/WikiDB/backend/file.php =================================================================== --- trunk/lib/WikiDB/backend/file.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiDB/backend/file.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -399,10 +399,8 @@ /** * Rename all files for this page - * - * @access protected Via WikiDB */ - function rename_page($pagename, $to) + protected function rename_page($pagename, $to) { $version = _getLatestVersion($pagename); foreach ($this->_dir_names as $type => $path) { @@ -581,8 +579,6 @@ * Pages should be returned in alphabetical order if that is * feasable. * - * @access protected - * * @param $include_defaulted boolean * If set, even pages with no content will be returned * --- but still only if they have at least one revision (not @@ -594,7 +590,7 @@ * * @return object A WikiDB_backend_iterator. */ - function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = '') + protected function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = '') { require_once 'lib/PageList.php'; $this->_loadLatestVersions(); Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiDB/backend.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -329,8 +329,6 @@ * Pages should be returned in alphabetical order if that is * feasable. * - * @access protected - * * @param bool $include_defaulted * If set, even pages with no content will be returned * --- but still only if they have at least one revision (not @@ -345,7 +343,7 @@ * @param string $exclude * @return object A WikiDB_backend_iterator. */ - function get_all_pages($include_defaulted, $orderby = false, $limit = '', $exclude = '') + protected function get_all_pages($include_defaulted, $orderby = false, $limit = '', $exclude = '') { trigger_error("virtual", E_USER_ERROR); } @@ -356,8 +354,6 @@ * Pages should be returned in alphabetical order if that is * feasible. * - * @access protected - * * @param object $search object A TextSearchQuery object describing the parsed query string, * with efficient methods for SQL and PCRE match. * @@ -372,7 +368,7 @@ * * @see WikiDB::titleSearch */ - function text_search($search, $fulltext = false, $sortby = '', + protected function text_search($search, $fulltext = false, $sortby = '', $limit = '', $exclude = '') { // This method implements a simple linear search @@ -390,7 +386,6 @@ /** * - * @access protected * @param object $pages A TextSearchQuery object. * @param object $linkvalue A TextSearchQuery object for the link values * (linkto, relation or backlinks or attribute values). @@ -400,7 +395,7 @@ * @return object A WikiDB_backend_iterator. * @see WikiDB::linkSearch */ - function link_search($pages, $linkvalue, $linktype, $relation = false, $options = array()) + protected function link_search($pages, $linkvalue, $linktype, $relation = false, $options = array()) { include_once 'lib/WikiDB/backend/dumb/LinkSearchIter.php'; $pageiter = $this->text_search($pages); @@ -413,12 +408,11 @@ * Find the pages with the highest hit counts. The pages should * be returned in reverse order by hit count. * - * @access protected * @param int $limit No more than this many pages * @param string $sortby * @return object A WikiDB_backend_iterator. */ - function most_popular($limit, $sortby = '-hits') + protected function most_popular($limit, $sortby = '-hits') { // This is method fetches all pages, then // sorts them by hit count. @@ -434,13 +428,12 @@ /** * Find recent changes. * - * @access protected * @param object $params hash See WikiDB::mostRecent for a description * of parameters which can be included in this hash. * @return object A WikiDB_backend_iterator. * @see WikiDB::mostRecent */ - function most_recent($params) + protected function most_recent($params) { // This method is very inefficient and searches through // all pages for the most recent changes. Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiDB.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -47,8 +47,6 @@ * arguments to determine the proper subclass of WikiDB to * instantiate, and then it instantiates it. * - * @access public - * * @param hash $dbparams Database configuration parameters. * Some pertinent parameters are: * <dl> @@ -98,7 +96,7 @@ * * @return WikiDB A WikiDB object. **/ - function open($dbparams) + public function open($dbparams) { $dbtype = $dbparams{'dbtype'}; include_once("lib/WikiDB/$dbtype.php"); @@ -110,10 +108,9 @@ /** * Constructor. * - * @access private * @see open() */ - function WikiDB(&$backend, $dbparams) + private function WikiDB(&$backend, $dbparams) { $this->_backend =& $backend; // don't do the following with the auth_dsn! @@ -142,10 +139,8 @@ * Closing a WikiDB invalidates all <tt>WikiDB_Page</tt>s, * <tt>WikiDB_PageRevision</tt>s and <tt>WikiDB_PageIterator</tt>s * which have been obtained from it. - * - * @access public */ - function close() + public function close() { $this->_backend->close(); $this->_cache->close(); @@ -157,11 +152,10 @@ * A {@link WikiDB} consists of the (infinite) set of all possible pages, * therefore this method never fails. * - * @access public * @param string $pagename Which page to get. * @return WikiDB_Page The requested WikiDB_Page. */ - function getPage($pagename) + public function getPage($pagename) { static $error_displayed = false; $pagename = (string)$pagename; @@ -195,12 +189,11 @@ * however isWikiPage may be implemented in a more efficient * manner in certain back-ends. * - * @access public * @param string $pagename string Which page to check. * @return boolean True if the page actually exists with * non-default contents in the WikiDataBase. */ - function isWikiPage($pagename) + public function isWikiPage($pagename) { $page = $this->getPage($pagename); return ($page and $page->exists()); @@ -214,12 +207,11 @@ * * Note: purgePage() effectively destroys all revisions of the page from the WikiDB. * - * @access public * @param string $pagename Name of page to delete. * @see purgePage * @return mixed */ - function deletePage($pagename) + public function deletePage($pagename) { if (!empty($this->readonly)) { trigger_error("readonly database", E_USER_WARNING); @@ -252,11 +244,10 @@ /** * Completely remove the page from the WikiDB, without undo possibility. - * @access public * @param string $pagename Name of page to delete. * @see deletePage */ - function purgePage($pagename) + public function purgePage($pagename) { if (!empty($this->readonly)) { trigger_error("readonly database", E_USER_WARNING); @@ -272,8 +263,6 @@ * * Gets the set of all pages with non-default contents. * - * @access public - * * @param bool $include_empty Optional. Normally pages whose most * recent revision has empty content are considered to be * non-existant. Unless $include_defaulted is set to true, those @@ -287,7 +276,7 @@ * @return WikiDB_PageIterator A WikiDB_PageIterator which contains all pages * in the WikiDB which have non-default contents. */ - function getAllPages($include_empty = false, $sortby = '', $limit = '', $exclude = '') + public function getAllPages($include_empty = false, $sortby = '', $limit = '', $exclude = '') { $result = $this->_backend->get_all_pages($include_empty, $sortby, $limit, $exclude); @@ -299,15 +288,13 @@ } /** - * @access public - * * @param boolean $include_empty If true include also empty pages * @param string $exclude: comma-separated list of pagenames. * TBD: array of pagenames * @return integer * */ - function numPages($include_empty = false, $exclude = '') + public function numPages($include_empty = false, $exclude = '') { if (method_exists($this->_backend, 'numPages')) // FIXME: currently are all args ignored. @@ -331,7 +318,6 @@ * practical to do so. * TODO: Sort by ranking. Only postgresql with tsearch2 can do ranking so far. * - * @access public * @param TextSearchQuery $search A TextSearchQuery object * @param string $sortby Optional. "+-column,+-column2". * If false the result is faster in natural order. @@ -341,7 +327,7 @@ * @return WikiDB_PageIterator A WikiDB_PageIterator containing the matching pages. * @see TextSearchQuery */ - function titleSearch($search, $sortby = 'pagename', $limit = '', $exclude = '') + public function titleSearch($search, $sortby = 'pagename', $limit = '', $exclude = '') { $result = $this->_backend->text_search($search, false, $sortby, $limit, $exclude); $options = array('exclude' => $exclude, @@ -361,8 +347,6 @@ * practical to do so. * TODO: Sort by ranking. Only postgresql with tsearch2 can do ranking so far. * - * @access public - * * @param TextSearchQuery $search A TextSearchQuery object. * @param string $sortby Optional. "+-column,+-column2". * If false the result is faster in natural order. @@ -372,7 +356,7 @@ * @return WikiDB_PageIterator A WikiDB_PageIterator containing the matching pages. * @see TextSearchQuery */ - function fullSearch($search, $sortby = 'pagename', $limit = '', $exclude = '') + public function fullSearch($search, $sortby = 'pagename', $limit = '', $exclude = '') { $result = $this->_backend->text_search($search, true, $sortby, $limit, $exclude); return new WikiDB_PageIterator($this, $result, @@ -387,8 +371,6 @@ * * Pages are returned in reverse order by hit count. * - * @access public - * * @param int $limit The maximum number of pages to return. * Set $limit to zero to return all pages. If $limit < 0, pages will * be sorted in decreasing order of popularity. @@ -398,7 +380,7 @@ * @return WikiDB_PageIterator A WikiDB_PageIterator containing the matching * pages. */ - function mostPopular($limit = 20, $sortby = '-hits') + public function mostPopular($limit = 20, $sortby = '-hits') { $result = $this->_backend->most_popular($limit, $sortby); return new WikiDB_PageIterator($this, $result); @@ -409,8 +391,6 @@ * * Revisions are returned in reverse order by creation time. * - * @access public - * * @param array $params This hash is used to specify various optional * parameters: * <dl> @@ -433,15 +413,13 @@ * @return WikiDB_PageRevisionIterator A WikiDB_PageRevisionIterator * containing the matching revisions. */ - function mostRecent($params = array()) + public function mostRecent($params = array()) { $result = $this->_backend->most_recent($params); return new WikiDB_PageRevisionIterator($this, $result); } /** - * @access public - * * @param string $exclude_from * @param string $exclude * @param string $sortby Optional. "+-column,+-column2". @@ -451,7 +429,7 @@ * @return Iterator A generic iterator containing rows of * (duplicate) pagename, wantedfrom. */ - function wantedPages($exclude_from = '', $exclude = '', $sortby = '', $limit = '') + public function wantedPages($exclude_from = '', $exclude = '', $sortby = '', $limit = '') { return $this->_backend->wanted_pages($exclude_from, $exclude, $sortby, $limit); } @@ -460,8 +438,6 @@ * Generic interface to the link table. Esp. useful to search for rdf triples as in * SemanticSearch and ListRelations. * - * @access public - * * @param object $pages A TextSearchQuery object. * @param object $search A TextSearchQuery object. * @param string $linktype One of "linkto", "linkfrom", "relation", "attribute". @@ -482,7 +458,7 @@ * @return Iterator A generic iterator containing links to pages or values. * hash of "pagename", "linkname", "linkvalue. */ - function linkSearch($pages, $search, $linktype, $relation = false) + public function linkSearch($pages, $search, $linktype, $relation = false) { return $this->_backend->link_search($pages, $search, $linktype, $relation); } @@ -491,13 +467,12 @@ * Return a simple list of all defined relations (and attributes), mainly * for the SemanticSearch autocompletion. * - * @access public * @param bool $also_attributes * @param bool $only_attributes * @param bool $sorted * @return array of strings */ - function listRelations($also_attributes = false, $only_attributes = false, $sorted = true) + public function listRelations($also_attributes = false, $only_attributes = false, $sorted = true) { if (method_exists($this->_backend, "list_relations")) return $this->_backend->list_relations($also_attributes, $only_attributes, $sorted); @@ -525,13 +500,12 @@ /** * Call the appropriate backend method. * - * @access public * @param string $from Page to rename * @param string $to New name * @param boolean $updateWikiLinks If the text in all pages should be replaced. * @return boolean true or false */ - function renamePage($from, $to, $updateWikiLinks = false) + public function renamePage($from, $to, $updateWikiLinks = false) { if (!empty($this->readonly)) { trigger_error("readonly database", E_USER_WARNING); @@ -647,8 +621,6 @@ * NOTE: this is currently implemented in a hackish and * not very efficient manner. * - * @access public - * * @param string $key Which meta data to get. * Some reserved meta-data keys are: * <dl> @@ -658,7 +630,7 @@ * @return scalar The requested value, or false if the requested data * is not set. */ - function get($key) + public function get($key) { if (!$key || $key[0] == '%') return false; @@ -682,12 +654,11 @@ * not very efficient manner. * * @see get - * @access public * * @param string $key Meta-data key to set. * @param string $newval New value. */ - function set($key, $newval) + public function set($key, $newval) { if (!empty($this->readonly)) { trigger_error("readonly database", E_USER_WARNING); @@ -795,11 +766,9 @@ /** * Get the name of the wiki page. * - * @access public - * * @return string The page name. */ - function getName() + public function getName() { return $this->_pagename; } @@ -821,12 +790,10 @@ * Deletes the specified revision of the page. * It is a fatal error to attempt to delete the current revision. * - * @access public - * * @param integer $version Which revision to delete. (You can also * use a WikiDB_PageRevision object here.) */ - function deleteRevision($version) + public function deleteRevision($version) { if ($this->_wikidb->readonly) { trigger_error("readonly database", E_USER_WARNING); @@ -932,8 +899,6 @@ /** * Create a new revision of a {@link WikiDB_Page}. * - * @access public - * * @param int $version Version number for new revision. * To ensure proper serialization of edits, $version must be * exactly one higher than the current latest version. @@ -950,7 +915,7 @@ * @return WikiDB_PageRevision Returns the new WikiDB_PageRevision object. If * $version was incorrect, returns false */ - function createRevision($version, &$content, $metadata, $links) + public function createRevision($version, &$content, $metadata, $links) { if ($this->_wikidb->readonly) { trigger_error("readonly database", E_USER_WARNING); @@ -1107,11 +1072,10 @@ /** * Get the most recent revision of a page. * - * @access public * @param bool $need_content * @return WikiDB_PageRevision The current WikiDB_PageRevision object. */ - function getCurrentRevision($need_content = true) + public function getCurrentRevision($need_content = true) { $backend = &$this->_wikidb->_backend; $cache = &$this->_wikidb->_cache; @@ -1135,15 +1099,13 @@ /** * Get a specific revision of a WikiDB_Page. * - * @access public - * * @param int $version Which revision to get. * @param bool $need_content * @return WikiDB_PageRevision The requested WikiDB_PageRevision object, or * false if the requested revision does not exist in the {@link WikiDB}. * Note that version zero of any page always exists. */ - function getRevision($version, $need_content = true) + public function getRevision($version, $need_content = true) { $cache = &$this->_wikidb->_cache; $pagename = &$this->_pagename; @@ -1167,8 +1129,6 @@ * This method find the most recent revision before a specified * version. * - * @access public - * * @param bool|int $version Find most recent revision before this version. * You can also use a WikiDB_PageRevision object to specify the $version. * @@ -1179,7 +1139,7 @@ * unless $version is greater than zero, a revision (perhaps version zero, * the default revision) will always be found. */ - function getRevisionBefore($version = false, $need_content = true) + public function getRevisionBefore($version = false, $need_content = true) { $backend = &$this->_wikidb->_backend; $pagename = &$this->_pagename; @@ -1221,8 +1181,6 @@ * as 'linkrelation' key as pagename. See WikiDB_PageIterator::next * if (isset($next['linkrelation'])) * - * @access public - * * @param bool $reversed Which links to find: true for backlinks (default). * @param bool $include_empty * @param string $sortby @@ -1233,7 +1191,7 @@ * @return WikiDB_PageIterator A WikiDB_PageIterator containing * all matching pages. */ - function getLinks($reversed = true, $include_empty = false, $sortby = '', + public function getLinks($reversed = true, $include_empty = false, $sortby = '', $limit = '', $exclude = '', $want_relations = false) { $backend = &$this->_wikidb->_backend; @@ -1318,8 +1276,6 @@ /** * Access WikiDB_Page non version-specific meta-data. * - * @access public - * * @param string $key Which meta data to get. * Some reserved meta-data keys are: * <dl> @@ -1341,7 +1297,7 @@ * @return scalar The requested value, or false if the requested data * is not set. */ - function get($key) + public function get($key) { $cache = &$this->_wikidb->_cache; $backend = &$this->_wikidb->_backend; @@ -1381,12 +1337,11 @@ * Set page meta-data. * * @see get - * @access public * * @param string $key Meta-data key to set. * @param string $newval New value. */ - function set($key, $newval) + public function set($key, $newval) { $cache = &$this->_wikidb->_cache; $backend = &$this->_wikidb->_backend; @@ -1436,10 +1391,8 @@ * * Note that this method may be implemented in more efficient ways * in certain backends. - * - * @access public */ - function increaseHitCount() + public function increaseHitCount() { if ($this->_wikidb->readonly) { trigger_error("readonly database", E_USER_NOTICE); @@ -1458,11 +1411,9 @@ * * This is really only for debugging. * - * @access public - * * @return string Printable representation of the WikiDB_Page. */ - function asString() + public function asString() { ob_start(); printf("[%s:%s\n", get_class($this), $this->getName()); @@ -1474,13 +1425,12 @@ } /** - * @access private * @param int|object $version_or_pagerevision * Takes either the version number (and int) or a WikiDB_PageRevision * object. * @return integer The version number. */ - function _coerce_to_version($version_or_pagerevision) + private function _coerce_to_version($version_or_pagerevision) { if (method_exists($version_or_pagerevision, "getContent")) $version = $version_or_pagerevision->getVersion(); @@ -1578,11 +1528,9 @@ /** * Get the WikiDB_Page which this revision belongs to. * - * @access public - * * @return WikiDB_Page The WikiDB_Page which this revision belongs to. */ - function getPage() + public function getPage() { return new WikiDB_Page($this->_wikidb, $this->_pagename); } @@ -1590,11 +1538,9 @@ /** * Get the version number of this revision. * - * @access public - * * @return integer The version number of this revision. */ - function getVersion() + public function getVersion() { return $this->_version; } @@ -1609,11 +1555,9 @@ * Describe [ThisPage] here. * </pre> * - * @access public - * * @return boolean Returns true if the page has default content. */ - function hasDefaultContents() + public function hasDefaultContents() { $data = &$this->_data; if (!isset($data['%content'])) return true; @@ -1624,12 +1568,10 @@ /** * Get the content as an array of lines. * - * @access public - * * @return array An array of lines. * The lines should contain no trailing white space. */ - function getContent() + public function getContent() { return explode("\n", $this->getPackedContent()); } @@ -1637,11 +1579,9 @@ /** * Get the pagename of the revision. * - * @access public - * * @return string pagename. */ - function getPageName() + public function getPageName() { return $this->_pagename; } @@ -1654,11 +1594,9 @@ /** * Determine whether revision is the latest. * - * @access public - * * @return boolean True iff the revision is the latest (most recent) one. */ - function isCurrent() + public function isCurrent() { if (!isset($this->_iscurrent)) { $page = $this->getPage(); @@ -1736,12 +1674,10 @@ /** * Get the content as a string. * - * @access public - * * @return string The page content. * Lines are separated by new-lines. */ - function getPackedContent() + public function getPackedContent() { $data = &$this->_data; @@ -1815,9 +1751,6 @@ /** * Get meta-data for this revision. * - * - * @access public - * * @param string $key Which meta-data to access. * * Some reserved revision meta-data keys are: @@ -1854,7 +1787,7 @@ * @return string The requested value, or false if the requested value * is not defined. */ - function get($key) + public function get($key) { if (!$key || $key[0] == '%') return false; @@ -1882,11 +1815,9 @@ * * This is really only for debugging. * - * @access public - * * @return string Printable representation of the WikiDB_Page. */ - function asString() + public function asString() { ob_start(); printf("[%s:%d\n", get_class($this), $this->get('version')); @@ -1927,11 +1858,9 @@ /** * Get next WikiDB_Page in sequence. * - * @access public - * * @return WikiDB_Page The next WikiDB_Page in the sequence. */ - function next() + public function next() { if (!($next = $this->_iter->next())) { return false; @@ -1978,10 +1907,8 @@ * (I.e. if you iterate through all the pages in the sequence, * you do not need to call free() --- you only need to call it * if you stop before the end of the iterator is reached.) - * - * @access public */ - function free() + public function free() { // $this->_iter->free(); } @@ -2074,12 +2001,10 @@ /** * Get next WikiDB_PageRevision in sequence. * - * @access public - * * @return WikiDB_PageRevision * The next WikiDB_PageRevision in the sequence. */ - function next() + public function next() { if (!($next = $this->_revisions->next())) return false; @@ -2121,10 +2046,8 @@ * (I.e. if you iterate through all the revisions in the sequence, * you do not need to call free() --- you only need to call it * if you stop before the end of the iterator is reached.) - * - * @access public */ - function free() + public function free() { $this->_revisions->free(); } Modified: trunk/lib/WikiGroup.php =================================================================== --- trunk/lib/WikiGroup.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiGroup.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -531,9 +531,8 @@ * @param object $group_page WikiDB_Page object for the group's page * @param bool $strict * @return boolean True if user is a member, else false. - * @access private */ - function _inGroupPage($group_page, $strict = false) + private function _inGroupPage($group_page, $strict = false) { $group_revision = $group_page->getCurrentRevision(); if ($group_revision->hasDefaultContents()) { Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2014-07-17 12:51:09 UTC (rev 8973) +++ trunk/lib/WikiPluginCached.php 2014-07-17 14:14:29 UTC (rev 8974) @@ -69,12 +69,11 @@ * @param array $argarray all parameters (including those set to * default values) of the plugin call to be * prepared - * @access private * @return array(id,url) * * TODO: check if args is needed at all (on lost cache) */ - function genUrl($cache, $argarray) + private function genUrl($cache, $argarray) { global $request; //$cacheparams = $GLOBALS['CacheParams']; @@ -125,7 +124,6 @@ * Have a close look on the arguments and required return values, * however. </b> * - * @access protected * @param WikiDB $dbi database abstraction class * @param string $argstr plugin arguments in the call from PhpWiki * @param Request $request @@ -136,7 +134,7 @@ * @see #getImage * @see #getMap */ - function run($dbi, $argstr, &$request, $basepage) + protected function run($dbi, $argstr, &$request, $basepage) { $cache = $this->newCache(); //$cacheparams = $GLOBALS['CacheParams']; @@ -262,7 +260,6 @@ * Sets the type of the plugin to html, image or map * production * - * @access protected * @return int determines the plugin to produce either html, * an image or an image map; uses on of the * following predefined values @@ -273,7 +270,7 @@ * <li>PLUGIN_CACHED_MAP</li> * </ul> */ - function getPluginType() + protected function getPluginType() { return PLUGIN_CACHED_IMG_ONDEMAND; } @@ -284,7 +281,6 @@ * <code>getPluginType</code> is set to * PLUGIN_CACHED_IMG_INLINE or PLUGIN_CACHED_IMG_ONDEMAND. * - * @access protected pure virtual * @param WikiDB $dbi database abstraction class * @param array $argarray complete (!) arguments to produce * image. It is not necessary to call @@ -293,7 +289,7 @@ * @return mixed imagehandle image handle if successful * false if an error occured */ - function getImage($dbi, $argarray, $request) + protected function getImage($dbi, $argarray, $request) { trigger_error('WikiPluginCached::getImage: pure virtual function in file ' . __FILE__ . ' line ' . __LINE__, E_USER_ERROR); @@ -308,7 +304,6 @@ * sufficient, the expire time is ignored and removing * is determined by the last "touch" of the entry. * - * @access protected virtual * @param WikiDB $dbi database abstraction class * @param array $argarray complete (!) arguments. It is * not necessary to call @@ -317,7 +312,7 @@ * @return string format: '+seconds' * '0' never expires */ - function getExpire($dbi, $argarray, $request) + protected function getExpire($dbi, $argarray, $request) { return '0'; // persist forever } @@ -326,7 +321,6 @@ * Decides the image type of an image output. * Always used unless plugin type is PLUGIN_CACHED_HTML. * - * @access protected virtual * @param WikiDB $dbi database abstraction class * @param array $argarray complete (!) arguments. It is * not necessary to call @@ -334,7 +328,7 @@ * @param Request $request * @return string 'png', 'jpeg' or 'gif' */ - function getImageType(&$dbi, $argarray, &$request) + protected function getImageType(&$dbi, $argarray, &$request) { if (in_array($argarray['imgtype'], preg_split('/\s*:\s*/', PLUGIN_CACHED_IMGTYPES))) return $argarray['imgtype']; @@ -346,7 +340,6 @@ * Produces the alt text for an image. * <code> &l... [truncated message content] |
From: <var...@us...> - 2014-07-17 12:51:12
|
Revision: 8973 http://sourceforge.net/p/phpwiki/code/8973 Author: vargenau Date: 2014-07-17 12:51:09 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Fix PDO Modified Paths: -------------- trunk/lib/DbSession/PDO.php Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2014-07-17 12:26:03 UTC (rev 8972) +++ trunk/lib/DbSession/PDO.php 2014-07-17 12:51:09 UTC (rev 8973) @@ -36,7 +36,7 @@ $this->_dbh =& $db->_dbh; $this->_backend =& $db; } - return $dbh->_dbh; + return $dbh; } function query($sql) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 12:26:07
|
Revision: 8972 http://sourceforge.net/p/phpwiki/code/8972 Author: vargenau Date: 2014-07-17 12:26:03 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Update PHP Doc Modified Paths: -------------- trunk/lib/WikiDB/backend.php Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2014-07-17 09:33:21 UTC (rev 8971) +++ trunk/lib/WikiDB/backend.php 2014-07-17 12:26:03 UTC (rev 8972) @@ -292,12 +292,18 @@ /** * Find pages which link to or are linked from a page. * - * @param $pagename string Page name. - * @param $reversed boolean True to get backlinks. + * @param string $pagename Page name. + * @param bool $reversed True to get backlinks. + * @param bool $include_empty + * @param string $sortby + * @param string $limit + * @param string $exclude + * @param bool $want_relations * * FIXME: array or iterator? * @return object A WikiDB_backend_iterator. */ + function get_links($pagename, $reversed, $include_empty = false, $sortby = '', $limit = '', $exclude = '') { @@ -325,7 +331,7 @@ * * @access protected * - * @param $include_defaulted boolean + * @param bool $include_defaulted * If set, even pages with no content will be returned * --- but still only if they have at least one revision (not * counting the default revision 0) entered in the database. @@ -334,6 +340,9 @@ * are not returned as these pages are considered to be * non-existing. * + * @param bool $orderby + * @param string $limit + * @param string $exclude * @return object A WikiDB_backend_iterator. */ function get_all_pages($include_defaulted, $orderby = false, $limit = '', $exclude = '') @@ -345,16 +354,20 @@ * Title or full text search. * * Pages should be returned in alphabetical order if that is - * feasable. + * feasible. * * @access protected * - * @param $search object A TextSearchQuery object describing the parsed query string, + * @param object $search object A TextSearchQuery object describing the parsed query string, * with efficient methods for SQL and PCRE match. * - * @param $fullsearch boolean If true, a full text search is performed, + * @param bool $fulltext If true, a full text search is performed, * otherwise a title search is performed. * + * @param string $sortby + * @param string $limit + * @param string $exclude + * * @return object A WikiDB_backend_iterator. * * @see WikiDB::titleSearch @@ -378,12 +391,12 @@ /** * * @access protected - * @param $pages object A TextSearchQuery object. - * @param $linkvalue object A TextSearchQuery object for the linkvalues + * @param object $pages A TextSearchQuery object. + * @param object $linkvalue A TextSearchQuery object for the link values * (linkto, relation or backlinks or attribute values). - * @param $linktype string One of the 4 linktypes. - * @param $relation object A TextSearchQuery object or false. - * @param $options array Currently ignored. hash of sortby, limit, exclude. + * @param string $linktype One of the 4 link types. + * @param object|bool $relation A TextSearchQuery object or false. + * @param array $options Currently ignored. hash of sortby, limit, exclude. * @return object A WikiDB_backend_iterator. * @see WikiDB::linkSearch */ @@ -401,7 +414,8 @@ * be returned in reverse order by hit count. * * @access protected - * @param integer $limit No more than this many pages + * @param int $limit No more than this many pages + * @param string $sortby * @return object A WikiDB_backend_iterator. */ function most_popular($limit, $sortby = '-hits') @@ -421,7 +435,7 @@ * Find recent changes. * * @access protected - * @param $params hash See WikiDB::mostRecent for a description + * @param object $params hash See WikiDB::mostRecent for a description * of parameters which can be included in this hash. * @return object A WikiDB_backend_iterator. * @see WikiDB::mostRecent @@ -505,6 +519,7 @@ * trigger_error("Message goes here.", E_USER_WARNING); * </pre> * + * @param bool $args * @return boolean True iff database is in a consistent state. */ function check($args = false) @@ -518,6 +533,7 @@ * This should put the database into a consistent state. * (I.e. rebuild indexes, etc...) * + * @param bool $args * @return boolean True iff successful. */ function rebuild($args = false) @@ -671,7 +687,6 @@ function write_accesslog(&$entry) { - global $request; if (!$this->isSQL()) return; $dbh = &$this->_dbh; $log_tbl = $entry->_accesslog->logtable; @@ -865,6 +880,7 @@ { // force word-style %word% for fulltext search $dbh = &$this->_dbh; + $word = strtolower($node->word); $word = '%' . $dbh->escapeSimple($word) . '%'; // eliminate stoplist words if ($this->isStoplisted($node)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 09:33:29
|
Revision: 8971 http://sourceforge.net/p/phpwiki/code/8971 Author: vargenau Date: 2014-07-17 09:33:21 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Add braces Modified Paths: -------------- trunk/lib/DbSession/PDO.php Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2014-07-17 09:11:09 UTC (rev 8970) +++ trunk/lib/DbSession/PDO.php 2014-07-17 09:33:21 UTC (rev 8971) @@ -100,17 +100,23 @@ $table = $this->_table; $sth = $dbh->prepare("SELECT sess_data FROM $table WHERE sess_id=?"); $sth->bindParam(1, $id, PDO::PARAM_STR, 32); - if ($sth->execute()) $res = $sth->fetchColumn(); - else $res = ''; + if ($sth->execute()) { + $res = $sth->fetchColumn(); + } else { + $res = ''; + } $this->_disconnect(); - if (!empty($res) and isa($dbh, 'ADODB_postgres64')) + if (!empty($res) and isa($dbh, 'ADODB_postgres64')) { $res = base64_decode($res); + } if (strlen($res) > 4000) { trigger_error("Overlarge session data! " . strlen($res) . " gt. 4000", E_USER_WARNING); $res = preg_replace('/s:6:"_cache";O:12:"WikiDB_cache".+}$/', "", $res); $res = preg_replace('/s:12:"_cached_html";s:.+",s:4:"hits"/', 's:4:"hits"', $res); - if (strlen($res) > 4000) $res = ''; + if (strlen($res) > 4000) { + $res = ''; + } } return $res; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 09:11:17
|
Revision: 8970 http://sourceforge.net/p/phpwiki/code/8970 Author: vargenau Date: 2014-07-17 09:11:09 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Add return argument Modified Paths: -------------- trunk/lib/DbSession/ADODB.php trunk/lib/DbSession/PDO.php trunk/lib/DbSession/SQL.php trunk/lib/DbSession/dba.php Modified: trunk/lib/DbSession/ADODB.php =================================================================== --- trunk/lib/DbSession/ADODB.php 2014-07-17 09:02:29 UTC (rev 8969) +++ trunk/lib/DbSession/ADODB.php 2014-07-17 09:11:09 UTC (rev 8970) @@ -156,7 +156,7 @@ */ function write($id, $sess_data) { - if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return; + if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; $dbh = $this->_connect(); $table = $this->_table; Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2014-07-17 09:02:29 UTC (rev 8969) +++ trunk/lib/DbSession/PDO.php 2014-07-17 09:11:09 UTC (rev 8970) @@ -133,7 +133,7 @@ */ function write($id, $sess_data) { - if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return; + if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; $dbh = $this->_connect(); $table = $this->_table; Modified: trunk/lib/DbSession/SQL.php =================================================================== --- trunk/lib/DbSession/SQL.php 2014-07-17 09:02:29 UTC (rev 8969) +++ trunk/lib/DbSession/SQL.php 2014-07-17 09:11:09 UTC (rev 8970) @@ -142,7 +142,7 @@ */ function write($id, $sess_data) { - if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return; + if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; $dbh = $this->_connect(); //$dbh->unlock(false,1); Modified: trunk/lib/DbSession/dba.php =================================================================== --- trunk/lib/DbSession/dba.php 2014-07-17 09:02:29 UTC (rev 8969) +++ trunk/lib/DbSession/dba.php 2014-07-17 09:11:09 UTC (rev 8970) @@ -94,7 +94,7 @@ function write($id, $sess_data) { - if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return; + if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false; $dbh = $this->_connect(); $time = time(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 09:02:38
|
Revision: 8969 http://sourceforge.net/p/phpwiki/code/8969 Author: vargenau Date: 2014-07-17 09:02:29 +0000 (Thu, 17 Jul 2014) Log Message: ----------- PDO_FETCH_NUM --> PDO::FETCH_NUM; PDO uses class constants since PHP 5.1. Prior releases use global constants in the form PDO_PARAM_BOOL Modified Paths: -------------- trunk/lib/WikiDB/PDO.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PDO_mysql.php trunk/lib/WikiDB/backend/PDO_oci8.php trunk/lib/WikiUser/PdoDb.php Modified: trunk/lib/WikiDB/PDO.php =================================================================== --- trunk/lib/WikiDB/PDO.php 2014-07-17 08:38:53 UTC (rev 8968) +++ trunk/lib/WikiDB/PDO.php 2014-07-17 09:02:29 UTC (rev 8969) @@ -83,7 +83,7 @@ // SQL result: for simple select or create/update queries // returns the database specific resource type - function genericSqlQuery($sql, $args = false) + function genericSqlQuery($sql, $args = array()) { try { $sth = $this->_backend->_dbh->prepare($sql); @@ -93,7 +93,7 @@ } } if ($sth->execute()) - $result = $sth->fetch(PDO_FETCH_BOTH); + $result = $sth->fetch(PDO::FETCH_BOTH); else return false; } catch (PDOException $e) { Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2014-07-17 08:38:53 UTC (rev 8968) +++ trunk/lib/WikiDB/backend/PDO.php 2014-07-17 09:02:29 UTC (rev 8969) @@ -95,9 +95,9 @@ $this->_dbh = new PDO($dbparams['dsn'], $this->_parsedDSN['username'], $this->_parsedDSN['password'], - array(PDO_ATTR_AUTOCOMMIT => true, - PDO_ATTR_TIMEOUT => DATABASE_TIMEOUT, - PDO_ATTR_PERSISTENT => !empty($parsed['persistent']) + array(PDO::ATTR_AUTOCOMMIT => true, + PDO::ATTR_TIMEOUT => DATABASE_TIMEOUT, + PDO::ATTR_PERSISTENT => !empty($parsed['persistent']) or DATABASE_PERSISTENT )); } catch (PDOException $e) { @@ -118,7 +118,7 @@ } $this->_dsn = $dbparams['dsn']; $this->_dbh->databaseType = $driver; - $this->_dbh->setAttribute(PDO_ATTR_CASE, PDO_CASE_NATURAL); + $this->_dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); // Use the faster FETCH_NUM, with some special ASSOC based exceptions. $this->_hasTransactions = true; @@ -190,7 +190,7 @@ { $sth = $this->_dbh->prepare($sql); if ($sth->execute()) - return $sth->fetch(PDO_FETCH_BOTH); + return $sth->fetch(PDO::FETCH_BOTH); else return false; } @@ -223,7 +223,7 @@ . " FROM $nonempty_tbl, $page_tbl" . " WHERE $nonempty_tbl.id=$page_tbl.id" . " AND pagename=?"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); if ($sth->execute()) return $sth->fetchColumn(); else @@ -238,7 +238,7 @@ . " FROM $nonempty_tbl, $page_tbl" . " WHERE $nonempty_tbl.id=$page_tbl.id" . " LIMIT 1"); - return $sth->fetchAll(PDO_FETCH_NUM); + return $sth->fetchAll(PDO::FETCH_NUM); } function numPages($filter = false, $exclude = '') @@ -258,7 +258,7 @@ $sth = $dbh->prepare("UPDATE $page_tbl SET hits=hits+1" . " WHERE pagename=?" . " LIMIT 1"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); $sth->execute(); } @@ -271,9 +271,9 @@ $page_tbl = $this->_table_names['page_tbl']; $sth = $dbh->prepare("SELECT id,pagename,hits,pagedata FROM $page_tbl" . " WHERE pagename=? LIMIT 1"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); $sth->execute(); - $row = $sth->fetch(PDO_FETCH_NUM); + $row = $sth->fetch(PDO::FETCH_NUM); return $row ? $this->_extract_page_data($row[3], $row[2]) : false; } @@ -296,8 +296,8 @@ // have a record in the page table. Since it's just the // hit count, who cares? $sth = $dbh->prepare("UPDATE $page_tbl SET hits=? WHERE pagename=? LIMIT 1"); - $sth->bindParam(1, $newdata['hits'], PDO_PARAM_INT); - $sth->bindParam(2, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $newdata['hits'], PDO::PARAM_INT); + $sth->bindParam(2, $pagename, PDO::PARAM_STR, 100); $sth->execute(); return; } @@ -323,9 +323,9 @@ . " SET hits=?, pagedata=?" . " WHERE pagename=?" . " LIMIT 1"); - $sth->bindParam(1, $hits, PDO_PARAM_INT); - $sth->bindParam(2, $this->_serialize($data), PDO_PARAM_LOB); - $sth->bindParam(3, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $hits, PDO::PARAM_INT); + $sth->bindParam(2, $this->_serialize($data), PDO::PARAM_LOB); + $sth->bindParam(3, $pagename, PDO::PARAM_STR, 100); if ($sth->execute()) { $this->commit(); return true; @@ -340,9 +340,9 @@ $dbh = &$this->_dbh; $page_tbl = $this->_table_names['page_tbl']; $sth = $dbh->prepare("SELECT cached_html FROM $page_tbl WHERE pagename=? LIMIT 1"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); $sth->execute(); - return $sth->fetchColumn(PDO_FETCH_NUM); + return $sth->fetchColumn(PDO::FETCH_NUM); } function set_cached_html($pagename, $data) @@ -354,8 +354,8 @@ . " SET cached_html=?" . " WHERE pagename=?" . " LIMIT 1"); - $sth->bindParam(1, $data, PDO_PARAM_STR); - $sth->bindParam(2, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $data, PDO::PARAM_STR); + $sth->bindParam(2, $pagename, PDO::PARAM_STR, 100); $sth->execute(); } @@ -376,7 +376,7 @@ $dbh = &$this->_dbh; $page_tbl = $this->_table_names['page_tbl']; $sth = $dbh->prepare("SELECT id FROM $page_tbl WHERE pagename=? LIMIT 1"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); $id = $sth->fetchColumn(); if (!$create_if_missing) { return $id; @@ -388,7 +388,7 @@ $sth = $dbh->prepare("INSERT INTO $page_tbl" . " (id,pagename)" . " VALUES (NULL,?)"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); $sth->execute(); $id = $dbh->lastInsertId(); } else { @@ -400,8 +400,8 @@ . " (id,pagename,hits)" . " VALUES (?,?,0)"); $id++; - $sth->bindParam(1, $id, PDO_PARAM_INT); - $sth->bindParam(2, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $id, PDO::PARAM_INT); + $sth->bindParam(2, $pagename, PDO::PARAM_STR, 100); if ($sth->execute()) $this->commit(); else @@ -421,7 +421,7 @@ . " WHERE $page_tbl.id=$recent_tbl.id" . " AND pagename=?" . " LIMIT 1"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); $sth->execute(); return $sth->fetchColumn(); } @@ -437,8 +437,8 @@ . " AND version < ?" . " ORDER BY version DESC" . " LIMIT 1"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); - $sth->bindParam(2, $version, PDO_PARAM_INT); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); + $sth->bindParam(2, $version, PDO::PARAM_INT); $sth->execute(); return $sth->fetchColumn(); } @@ -476,10 +476,10 @@ . " AND pagename=?" . " AND version=?" . " LIMIT 1"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); - $sth->bindParam(2, $version, PDO_PARAM_INT); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); + $sth->bindParam(2, $version, PDO::PARAM_INT); $sth->execute(); - $row = $sth->fetch(PDO_FETCH_NUM); + $row = $sth->fetch(PDO::FETCH_NUM); return $row ? $this->_extract_version_data_num($row, $want_content) : false; } @@ -552,28 +552,28 @@ $sth = $dbh->prepare("REPLACE INTO $version_tbl" . " (id,version,mtime,minor_edit,content,versiondata)" . " VALUES(?,?,?,?,?,?)"); - $sth->bindParam(1, $id, PDO_PARAM_INT); - $sth->bindParam(2, $version, PDO_PARAM_INT); - $sth->bindParam(3, $mtime, PDO_PARAM_INT); - $sth->bindParam(4, $minor_edit, PDO_PARAM_INT); - $sth->bindParam(5, $content, PDO_PARAM_STR, 100); - $sth->bindParam(6, $this->_serialize($data), PDO_PARAM_STR, 100); + $sth->bindParam(1, $id, PDO::PARAM_INT); + $sth->bindParam(2, $version, PDO::PARAM_INT); + $sth->bindParam(3, $mtime, PDO::PARAM_INT); + $sth->bindParam(4, $minor_edit, PDO::PARAM_INT); + $sth->bindParam(5, $content, PDO::PARAM_STR, 100); + $sth->bindParam(6, $this->_serialize($data), PDO::PARAM_STR, 100); $rs = $sth->execute(); } else { $sth = $dbh->prepare("DELETE FROM $version_tbl" . " WHERE id=? AND version=?"); - $sth->bindParam(1, $id, PDO_PARAM_INT); - $sth->bindParam(2, $version, PDO_PARAM_INT); + $sth->bindParam(1, $id, PDO::PARAM_INT); + $sth->bindParam(2, $version, PDO::PARAM_INT); $sth->execute(); $sth = $dbh->prepare("INSERT INTO $version_tbl" . " (id,version,mtime,minor_edit,content,versiondata)" . " VALUES(?,?,?,?,?,?)"); - $sth->bindParam(1, $id, PDO_PARAM_INT); - $sth->bindParam(2, $version, PDO_PARAM_INT); - $sth->bindParam(3, $mtime, PDO_PARAM_INT); - $sth->bindParam(4, $minor_edit, PDO_PARAM_INT); - $sth->bindParam(5, $content, PDO_PARAM_STR, 100); - $sth->bindParam(6, $this->_serialize($data), PDO_PARAM_STR, 100); + $sth->bindParam(1, $id, PDO::PARAM_INT); + $sth->bindParam(2, $version, PDO::PARAM_INT); + $sth->bindParam(3, $mtime, PDO::PARAM_INT); + $sth->bindParam(4, $minor_edit, PDO::PARAM_INT); + $sth->bindParam(5, $content, PDO::PARAM_STR, 100); + $sth->bindParam(6, $this->_serialize($data), PDO::PARAM_STR, 100); $rs = $sth->execute(); } $this->_update_recent_table($id); @@ -636,12 +636,12 @@ $insert = $dbh->prepare("INSERT INTO $version_tbl" . " (id,version,mtime,minor_edit,content,versiondata)" . " VALUES(?,?,?,?,?,?)"); - $insert->bindParam(1, $id, PDO_PARAM_INT); - $insert->bindParam(2, $version + 1, PDO_PARAM_INT); - $insert->bindParam(3, $mtime, PDO_PARAM_INT); - $insert->bindParam(4, 0, PDO_PARAM_INT); - $insert->bindParam(5, '', PDO_PARAM_STR, 100); - $insert->bindParam(6, $this->_serialize($meta), PDO_PARAM_STR, 100); + $insert->bindParam(1, $id, PDO::PARAM_INT); + $insert->bindParam(2, $version + 1, PDO::PARAM_INT); + $insert->bindParam(3, $mtime, PDO::PARAM_INT); + $insert->bindParam(4, 0, PDO::PARAM_INT); + $insert->bindParam(5, '', PDO::PARAM_STR, 100); + $insert->bindParam(6, $this->_serialize($meta), PDO::PARAM_STR, 100); if ($insert->execute() and $dbh->query("DELETE FROM $nonempty_tbl WHERE id=$id") and $this->set_links($pagename, false) @@ -724,7 +724,7 @@ $sth = $dbh->prepare("SELECT $link_tbl.linkto as id FROM $link_tbl" . " WHERE linkfrom=$pageid"); $sth->execute(); - foreach ($sth->fetchAll(PDO_FETCH_NUM) as $id) { + foreach ($sth->fetchAll(PDO::FETCH_NUM) as $id) { // ...check if the page is empty and has no version $sth1 = $dbh->prepare("SELECT $page_tbl.id FROM $page_tbl" . " LEFT JOIN $nonempty_tbl USING (id) " @@ -779,9 +779,9 @@ . $exclude . $orderby . $limit); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); $sth->execute(); - $result = $sth->fetch(PDO_FETCH_BOTH); + $result = $sth->fetch(PDO::FETCH_BOTH); return new WikiDB_backend_PDO_iter($this, $result, $this->page_tbl_field_list); } @@ -802,8 +802,8 @@ . " WHERE linkfrom=linker.id AND linkto=linkee.id" . " AND $have.pagename=?" . " AND $want.pagename=?"); - $sth->bindParam(1, $pagename, PDO_PARAM_STR, 100); - $sth->bindParam(2, $link, PDO_PARAM_STR, 100); + $sth->bindParam(1, $pagename, PDO::PARAM_STR, 100); + $sth->bindParam(2, $link, PDO::PARAM_STR, 100); $sth->execute(); return $sth->fetchColumn(); } @@ -857,7 +857,7 @@ } $sth = $dbh->prepare($sql . $limit); $sth->execute(); - $result = $sth->fetch(PDO_FETCH_BOTH); + $result = $sth->fetch(PDO::FETCH_BOTH); return new WikiDB_backend_PDO_iter($this, $result, $this->page_tbl_field_list); } @@ -899,7 +899,7 @@ . $orderby . $limit); $sth->execute(); - $result = $sth->fetch(PDO_FETCH_NUM); + $result = $sth->fetch(PDO::FETCH_NUM); $iter = new WikiDB_backend_PDO_iter($this, $result, $field_list); $iter->stoplisted = $searchobj->stoplisted; return $iter; @@ -952,7 +952,7 @@ $sth = $dbh->prepare($sql); } $sth->execute(); - $result = $sth->fetch(PDO_FETCH_NUM); + $result = $sth->fetch(PDO::FETCH_NUM); return new WikiDB_backend_PDO_iter($this, $result, $this->page_tbl_field_list); } @@ -1023,7 +1023,7 @@ $sth = $dbh->prepare($sql); } $sth->execute(); - $result = $sth->fetch(PDO_FETCH_NUM); + $result = $sth->fetch(PDO::FETCH_NUM); return new WikiDB_backend_PDO_iter($this, $result, array_merge($this->page_tbl_field_list, $this->version_tbl_field_list)); } @@ -1066,7 +1066,7 @@ $sth = $dbh->prepare($sql); } $sth->execute(); - $result = $sth->fetch(PDO_FETCH_NUM); + $result = $sth->fetch(PDO::FETCH_NUM); return new WikiDB_backend_PDO_iter($this, $result, array('pagename', 'wantedfrom')); } @@ -1093,8 +1093,8 @@ $dbh->query("UPDATE $link_tbl SET linkto=$id WHERE linkto=$new"); } $sth = $dbh->prepare("UPDATE $page_tbl SET pagename=? WHERE id=?"); - $sth->bindParam(1, $to, PDO_PARAM_STR, 100); - $sth->bindParam(2, $id, PDO_PARAM_INT); + $sth->bindParam(1, $to, PDO::PARAM_STR, 100); + $sth->bindParam(2, $id, PDO::PARAM_INT); $sth->execute(); } $this->unlock(array('page')); @@ -1309,20 +1309,20 @@ . "request_file,request_uri,request_time,status,bytes_sent,referer,agent,request_duration)" . " VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)"); // Either use unixtime as %d (long), or the native timestamp format. - $sth->bindParam(1, $entry->time, PDO_PARAM_INT); - $sth->bindParam(2, $entry->host, PDO_PARAM_STR, 100); - $sth->bindParam(3, $entry->user, PDO_PARAM_STR, 50); - $sth->bindParam(4, $entry->request_method, PDO_PARAM_STR, 10); - $sth->bindParam(5, $entry->request, PDO_PARAM_STR, 255); - $sth->bindParam(6, $entry->request_args, PDO_PARAM_STR, 255); - $sth->bindParam(7, $entry->request_uri, PDO_PARAM_STR, 255); - $sth->bindParam(8, $entry->_ncsa_time($entry->time), PDO_PARAM_STR, 28); - $sth->bindParam(9, $entry->time, PDO_PARAM_INT); - $sth->bindParam(10, $entry->status, PDO_PARAM_INT); - $sth->bindParam(11, $entry->size, PDO_PARAM_INT); - $sth->bindParam(12, $entry->referer, PDO_PARAM_STR, 255); - $sth->bindParam(13, $entry->user_agent, PDO_PARAM_STR, 255); - $sth->bindParam(14, $entry->duration, PDO_PARAM_FLOAT); + $sth->bindParam(1, $entry->time, PDO::PARAM_INT); + $sth->bindParam(2, $entry->host, PDO::PARAM_STR, 100); + $sth->bindParam(3, $entry->user, PDO::PARAM_STR, 50); + $sth->bindParam(4, $entry->request_method, PDO::PARAM_STR, 10); + $sth->bindParam(5, $entry->request, PDO::PARAM_STR, 255); + $sth->bindParam(6, $entry->request_args, PDO::PARAM_STR, 255); + $sth->bindParam(7, $entry->request_uri, PDO::PARAM_STR, 255); + $sth->bindParam(8, $entry->_ncsa_time($entry->time), PDO::PARAM_STR, 28); + $sth->bindParam(9, $entry->time, PDO::PARAM_INT); + $sth->bindParam(10, $entry->status, PDO::PARAM_INT); + $sth->bindParam(11, $entry->size, PDO::PARAM_INT); + $sth->bindParam(12, $entry->referer, PDO::PARAM_STR, 255); + $sth->bindParam(13, $entry->user_agent, PDO::PARAM_STR, 255); + $sth->bindParam(14, $entry->duration, PDO::PARAM_FLOAT); $sth->execute(); } } @@ -1352,7 +1352,7 @@ if (!is_object($result)) { return false; } - return $result->fetch(PDO_FETCH_BOTH); + return $result->fetch(PDO::FETCH_BOTH); } function free() @@ -1373,7 +1373,7 @@ return false; } $this->_backend = &$backend; - $rec = $result->fetch(PDO_FETCH_ASSOC); + $rec = $result->fetch(PDO::FETCH_ASSOC); if (isset($rec['pagedata'])) $rec['pagedata'] = $backend->_extract_page_data($rec['pagedata'], $rec['hits']); Modified: trunk/lib/WikiDB/backend/PDO_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_mysql.php 2014-07-17 08:38:53 UTC (rev 8968) +++ trunk/lib/WikiDB/backend/PDO_mysql.php 2014-07-17 09:02:29 UTC (rev 8969) @@ -61,7 +61,7 @@ if (empty($this->_dbparams['timeout'])) return; $sth = $this->_dbh->prepare("SHOW processlist"); if ($sth->execute()) - while ($row = $sth->fetch(PDO_FETCH_ASSOC)) { + while ($row = $sth->fetch(PDO::FETCH_ASSOC)) { if ($row["db"] == $this->_dsn['database'] and $row["User"] == $this->_dsn['username'] and $row["Time"] > $this->_dbparams['timeout'] @@ -90,7 +90,7 @@ $sth = $this->_dbh->prepare("SHOW TABLES"); $sth->execute(); $tables = array(); - while ($row = $sth->fetch(PDO_FETCH_NUM)) { + while ($row = $sth->fetch(PDO::FETCH_NUM)) { $tables[] = $row[0]; } return $tables; @@ -118,7 +118,7 @@ $sth = $conn->prepare("SHOW COLUMNS FROM $table"); $sth->execute(); $field_list = array(); - while ($row = $sth->fetch(PDO_FETCH_NUM)) { + while ($row = $sth->fetch(PDO::FETCH_NUM)) { $field_list[] = $row[0]; } if ($database != $old_db) { Modified: trunk/lib/WikiDB/backend/PDO_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_oci8.php 2014-07-17 08:38:53 UTC (rev 8968) +++ trunk/lib/WikiDB/backend/PDO_oci8.php 2014-07-17 09:02:29 UTC (rev 8969) @@ -73,19 +73,19 @@ . " VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)"); // Either use unixtime as %d (long), or the native timestamp format. $sth->bindParam(1, date('d-M-Y H:i:s', $entry->time)); - $sth->bindParam(2, $entry->host, PDO_PARAM_STR, 100); - $sth->bindParam(3, $entry->user, PDO_PARAM_STR, 50); - $sth->bindParam(4, $entry->request_method, PDO_PARAM_STR, 10); - $sth->bindParam(5, $entry->request, PDO_PARAM_STR, 255); - $sth->bindParam(6, $entry->request_args, PDO_PARAM_STR, 255); - $sth->bindParam(7, $entry->request_uri, PDO_PARAM_STR, 255); - $sth->bindParam(8, $entry->_ncsa_time($entry->time), PDO_PARAM_STR, 28); - $sth->bindParam(9, $entry->time, PDO_PARAM_INT); - $sth->bindParam(10, $entry->status, PDO_PARAM_INT); - $sth->bindParam(11, $entry->size, PDO_PARAM_INT); - $sth->bindParam(12, $entry->referer, PDO_PARAM_STR, 255); - $sth->bindParam(13, $entry->user_agent, PDO_PARAM_STR, 255); - $sth->bindParam(14, $entry->duration, PDO_PARAM_FLOAT); + $sth->bindParam(2, $entry->host, PDO::PARAM_STR, 100); + $sth->bindParam(3, $entry->user, PDO::PARAM_STR, 50); + $sth->bindParam(4, $entry->request_method, PDO::PARAM_STR, 10); + $sth->bindParam(5, $entry->request, PDO::PARAM_STR, 255); + $sth->bindParam(6, $entry->request_args, PDO::PARAM_STR, 255); + $sth->bindParam(7, $entry->request_uri, PDO::PARAM_STR, 255); + $sth->bindParam(8, $entry->_ncsa_time($entry->time), PDO::PARAM_STR, 28); + $sth->bindParam(9, $entry->time, PDO::PARAM_INT); + $sth->bindParam(10, $entry->status, PDO::PARAM_INT); + $sth->bindParam(11, $entry->size, PDO::PARAM_INT); + $sth->bindParam(12, $entry->referer, PDO::PARAM_STR, 255); + $sth->bindParam(13, $entry->user_agent, PDO::PARAM_STR, 255); + $sth->bindParam(14, $entry->duration, PDO::PARAM_FLOAT); $sth->execute(); } } Modified: trunk/lib/WikiUser/PdoDb.php =================================================================== --- trunk/lib/WikiUser/PdoDb.php 2014-07-17 08:38:53 UTC (rev 8968) +++ trunk/lib/WikiUser/PdoDb.php 2014-07-17 09:02:29 UTC (rev 8969) @@ -64,7 +64,7 @@ $dbh =& $this->_auth_dbi; $db_result = $dbh->query(sprintf($this->_prefs->_select, $dbh->quote($this->_userid))); // patched by fre...@pa... - $prefs = $db_result->fetch(PDO_FETCH_BOTH); + $prefs = $db_result->fetch(PDO::FETCH_BOTH); $prefs_blob = @$prefs["prefs"]; if ($restored_from_db = $this->_prefs->retrieve($prefs_blob)) { $this->_prefs->updatePrefs($restored_from_db); @@ -138,7 +138,7 @@ and $this->_authselect ) { try { - $this->_authselect->bindParam("userid", $this->_userid, PDO_PARAM_STR, 48); + $this->_authselect->bindParam("userid", $this->_userid, PDO::PARAM_STR, 48); $this->_authselect->execute(); } catch (PDOException $e) { trigger_error("SQL Error: " . $e->getMessage(), E_USER_WARNING); @@ -151,7 +151,7 @@ trigger_error(fmt("%s is missing", 'DBAUTH_AUTH_USER_EXISTS'), E_USER_WARNING); $this->_authcheck = $dbh->prepare($dbi->getAuthParam('auth_check')); - $this->_authcheck->bindParam("userid", $this->_userid, PDO_PARAM_STR, 48); + $this->_authcheck->bindParam("userid", $this->_userid, PDO::PARAM_STR, 48); $this->_authcheck->execute(); if ($this->_authcheck->fetchColumn()) return true; @@ -174,8 +174,8 @@ ) { $passwd = $GLOBALS['HTTP_POST_VARS']['auth']['passwd']; try { - $this->_authcreate->bindParam("userid", $this->_userid, PDO_PARAM_STR, 48); - $this->_authcreate->bindParam("password", $passwd, PDO_PARAM_STR, 48); + $this->_authcreate->bindParam("userid", $this->_userid, PDO::PARAM_STR, 48); + $this->_authcreate->bindParam("password", $passwd, PDO::PARAM_STR, 48); $rs = $this->_authselect->execute(); } catch (PDOException $e) { trigger_error("SQL Error: " . $e->getMessage(), E_USER_WARNING); @@ -210,9 +210,9 @@ //NOTE: for auth_crypt_method='crypt' defined('ENCRYPTED_PASSWD',true) must be set if ($this->_auth_crypt_method == 'crypt') { try { - $this->_authselect->bindParam("userid", $this->_userid, PDO_PARAM_STR, 48); + $this->_authselect->bindParam("userid", $this->_userid, PDO::PARAM_STR, 48); $this->_authselect->execute(); - $rs = $this->_authselect->fetch(PDO_FETCH_BOTH); + $rs = $this->_authselect->fetch(PDO::FETCH_BOTH); } catch (PDOException $e) { trigger_error("SQL Error: " . $e->getMessage(), E_USER_WARNING); return false; @@ -221,10 +221,10 @@ $result = $this->_checkPass($submitted_password, $stored_password); } else { try { - $this->_authselect->bindParam("password", $submitted_password, PDO_PARAM_STR, 48); - $this->_authselect->bindParam("userid", $this->_userid, PDO_PARAM_STR, 48); + $this->_authselect->bindParam("password", $submitted_password, PDO::PARAM_STR, 48); + $this->_authselect->bindParam("userid", $this->_userid, PDO::PARAM_STR, 48); $this->_authselect->execute(); - $rs = $this->_authselect->fetch(PDO_FETCH_BOTH); + $rs = $this->_authselect->fetch(PDO::FETCH_BOTH); } catch (PDOException $e) { trigger_error("SQL Error: " . $e->getMessage(), E_USER_WARNING); return false; @@ -277,8 +277,8 @@ $submitted_password = crypt($submitted_password); } try { - $this->_authupdate->bindParam("password", $submitted_password, PDO_PARAM_STR, 48); - $this->_authupdate->bindParam("userid", $this->_userid, PDO_PARAM_STR, 48); + $this->_authupdate->bindParam("password", $submitted_password, PDO::PARAM_STR, 48); + $this->_authupdate->bindParam("userid", $this->_userid, PDO::PARAM_STR, 48); $this->_authupdate->execute(); } catch (PDOException $e) { trigger_error("SQL Error: " . $e->getMessage(), E_USER_WARNING); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 08:39:01
|
Revision: 8968 http://sourceforge.net/p/phpwiki/code/8968 Author: vargenau Date: 2014-07-17 08:38:53 +0000 (Thu, 17 Jul 2014) Log Message: ----------- PDO_FETCH_NUM --> PDO::FETCH_NUM; PDO uses class constants since PHP 5.1. Prior releases use global constants in the form PDO_PARAM_BOOL Modified Paths: -------------- trunk/lib/DbSession/PDO.php Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2014-07-17 08:33:04 UTC (rev 8967) +++ trunk/lib/DbSession/PDO.php 2014-07-17 08:38:53 UTC (rev 8968) @@ -99,7 +99,7 @@ $dbh = $this->_connect(); $table = $this->_table; $sth = $dbh->prepare("SELECT sess_data FROM $table WHERE sess_id=?"); - $sth->bindParam(1, $id, PDO_PARAM_STR, 32); + $sth->bindParam(1, $id, PDO::PARAM_STR, 32); if ($sth->execute()) $res = $sth->fetchColumn(); else $res = ''; $this->_disconnect(); @@ -153,10 +153,10 @@ $sth = $dbh->prepare("INSERT INTO $table" . " (sess_id, sess_data, sess_date, sess_ip)" . " VALUES (?, ?, ?, ?)"); - $sth->bindParam(1, $id, PDO_PARAM_STR, 32); - $sth->bindParam(2, $sess_data, PDO_PARAM_LOB); - $sth->bindParam(3, $time, PDO_PARAM_INT); - $sth->bindParam(4, $GLOBALS['request']->get('REMOTE_ADDR'), PDO_PARAM_STR, 15); + $sth->bindParam(1, $id, PDO::PARAM_STR, 32); + $sth->bindParam(2, $sess_data, PDO::PARAM_LOB); + $sth->bindParam(3, $time, PDO::PARAM_INT); + $sth->bindParam(4, $GLOBALS['request']->get('REMOTE_ADDR'), PDO::PARAM_STR, 15); if ($result = $sth->execute()) { $this->_backend->commit(); } else { @@ -166,19 +166,19 @@ $sth = $dbh->prepare("UPDATE $table" . " SET sess_data=?, sess_date=?, sess_ip=?" . " WHERE sess_id=?"); - $sth->bindParam(1, $sess_data, PDO_PARAM_LOB); - $sth->bindParam(2, $time, PDO_PARAM_INT); - $sth->bindParam(3, $GLOBALS['request']->get('REMOTE_ADDR'), PDO_PARAM_STR, 15); - $sth->bindParam(4, $id, PDO_PARAM_STR, 32); + $sth->bindParam(1, $sess_data, PDO::PARAM_LOB); + $sth->bindParam(2, $time, PDO::PARAM_INT); + $sth->bindParam(3, $GLOBALS['request']->get('REMOTE_ADDR'), PDO::PARAM_STR, 15); + $sth->bindParam(4, $id, PDO::PARAM_STR, 32); $result = $sth->execute(); // implicit affected rows if ($result === false or $result < 1) { // false or int > 0 $sth = $dbh->prepare("INSERT INTO $table" . " (sess_id, sess_data, sess_date, sess_ip)" . " VALUES (?, ?, ?, ?)"); - $sth->bindParam(1, $id, PDO_PARAM_STR, 32); - $sth->bindParam(2, $sess_data, PDO_PARAM_LOB); - $sth->bindParam(3, $time, PDO_PARAM_INT); - $sth->bindParam(4, $GLOBALS['request']->get('REMOTE_ADDR'), PDO_PARAM_STR, 15); + $sth->bindParam(1, $id, PDO::PARAM_STR, 32); + $sth->bindParam(2, $sess_data, PDO::PARAM_LOB); + $sth->bindParam(3, $time, PDO::PARAM_INT); + $sth->bindParam(4, $GLOBALS['request']->get('REMOTE_ADDR'), PDO::PARAM_STR, 15); $result = $sth->execute(); } } @@ -200,7 +200,7 @@ $table = $this->_table; $dbh = $this->_connect(); $sth = $dbh->prepare("DELETE FROM $table WHERE sess_id=?"); - $sth->bindParam(1, $id, PDO_PARAM_STR, 32); + $sth->bindParam(1, $id, PDO::PARAM_STR, 32); $sth->execute(); $this->_disconnect(); return true; @@ -219,7 +219,7 @@ $threshold = time() - $maxlifetime; $dbh = $this->_connect(); $sth = $dbh->prepare("DELETE FROM $table WHERE sess_date < ?"); - $sth->bindParam(1, $threshold, PDO_PARAM_INT); + $sth->bindParam(1, $threshold, PDO::PARAM_INT); $sth->execute(); $this->_disconnect(); return true; @@ -236,7 +236,7 @@ if (!$sth->execute()) { return $sessions; } - while ($row = $sth->fetch(PDO_FETCH_NUM)) { + while ($row = $sth->fetch(PDO::FETCH_NUM)) { $data = $row[0]; $date = $row[1]; $ip = $row[2]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-17 08:33:06
|
Revision: 8967 http://sourceforge.net/p/phpwiki/code/8967 Author: vargenau Date: 2014-07-17 08:33:04 +0000 (Thu, 17 Jul 2014) Log Message: ----------- Fix variable names Modified Paths: -------------- trunk/lib/DbSession/PDO.php Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2014-07-16 16:06:31 UTC (rev 8966) +++ trunk/lib/DbSession/PDO.php 2014-07-17 08:33:04 UTC (rev 8967) @@ -46,7 +46,7 @@ function quote($string) { - return $this->_backend->quote($sql); + return $this->_backend->quote($string); } function _disconnect() @@ -143,13 +143,13 @@ if (isa($dbh, 'ADODB_postgres64')) $sess_data = base64_encode($sess_data); - /* AffectedRows with sessions seems to be instable on certain platforms. + /* AffectedRows with sessions seems to be unstable on certain platforms. * Enable the safe and slow USE_SAFE_DBSESSION then. */ if (USE_SAFE_DBSESSION) { $this->_backend->beginTransaction(); $rs = $this->query("DELETE FROM $table" - . " WHERE sess_id=$qid"); + . " WHERE sess_id=$id"); $sth = $dbh->prepare("INSERT INTO $table" . " (sess_id, sess_data, sess_date, sess_ip)" . " VALUES (?, ?, ?, ?)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-16 16:06:39
|
Revision: 8966 http://sourceforge.net/p/phpwiki/code/8966 Author: vargenau Date: 2014-07-16 16:06:31 +0000 (Wed, 16 Jul 2014) Log Message: ----------- Escape string to search Modified Paths: -------------- trunk/lib/WikiDB/backend/PearDB_mysql.php trunk/lib/WikiDB/backend.php Modified: trunk/lib/WikiDB/backend/PearDB_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_mysql.php 2014-07-16 14:00:21 UTC (rev 8965) +++ trunk/lib/WikiDB/backend/PearDB_mysql.php 2014-07-16 16:06:31 UTC (rev 8966) @@ -215,6 +215,8 @@ function _pagename_match_clause($node) { $word = $node->sql(); + $dbh = &$this->_dbh; + $word = $dbh->escapeSimple($word); if ($node->op == 'REGEX') { // posix regex extensions return "pagename REGEXP '$word'"; } else { Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2014-07-16 14:00:21 UTC (rev 8965) +++ trunk/lib/WikiDB/backend.php 2014-07-16 16:06:31 UTC (rev 8966) @@ -864,15 +864,17 @@ function _fulltext_match_clause($node) { // force word-style %word% for fulltext search - $word = '%' . $node->sql_quote($node->word) . '%'; + $dbh = &$this->_dbh; + $word = '%' . $dbh->escapeSimple($word) . '%'; // eliminate stoplist words - if ($this->isStoplisted($node)) + if ($this->isStoplisted($node)) { return "1=1"; // and (pagename or 1) => and 1 - else + } else { return $this->_pagename_match_clause($node) // probably convert this MATCH AGAINST or SUBSTR/POSITION without wildcards . ($this->_case_exact ? " OR content LIKE '$word'" : " OR LOWER(content) LIKE '$word'"); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-16 14:00:24
|
Revision: 8965 http://sourceforge.net/p/phpwiki/code/8965 Author: vargenau Date: 2014-07-16 14:00:21 +0000 (Wed, 16 Jul 2014) Log Message: ----------- Make <?plugin-form FullTextSearch ?> work Modified Paths: -------------- trunk/lib/plugin/FullTextSearch.php trunk/pgsrc/Help%2FFullTextSearchPlugin Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2014-07-16 13:53:10 UTC (rev 8964) +++ trunk/lib/plugin/FullTextSearch.php 2014-07-16 14:00:21 UTC (rev 8965) @@ -49,8 +49,8 @@ function getDefaultArguments() { - return array_merge - ( + // All PageList::supportedArgs, except 'pagename' + $args = array_merge( PageList::supportedArgs(), // paging and more. array('s' => false, 'hilight' => true, @@ -60,6 +60,8 @@ 'noheader' => false, 'exclude' => false, // comma-separated list of glob 'quiet' => true)); // be less verbose + unset($args['pagename']); + return $args; } function run($dbi, $argstr, &$request, $basepage) Modified: trunk/pgsrc/Help%2FFullTextSearchPlugin =================================================================== --- trunk/pgsrc/Help%2FFullTextSearchPlugin 2014-07-16 13:53:10 UTC (rev 8964) +++ trunk/pgsrc/Help%2FFullTextSearchPlugin 2014-07-16 14:00:21 UTC (rev 8965) @@ -1,4 +1,4 @@ -Date: Fri, 11 Jan 2013 11:16:51 +0000 +Date: Wed, 16 Jul 2014 15:48:13 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0) Content-Type: application/x-phpwiki; pagename=Help%2FFullTextSearchPlugin; @@ -15,7 +15,8 @@ == Arguments == -All [[Help:PageList|PageList]] arguments, plus the following ones: +All [[Help:PageList|PageList]] arguments (except //paganame//), +plus the following ones: {| class="bordered" |- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-16 13:53:13
|
Revision: 8964 http://sourceforge.net/p/phpwiki/code/8964 Author: vargenau Date: 2014-07-16 13:53:10 +0000 (Wed, 16 Jul 2014) Log Message: ----------- Make <?plugin-form TitleSearch ?> work Modified Paths: -------------- trunk/lib/plugin/TitleSearch.php trunk/pgsrc/Help%2FTitleSearchPlugin Modified: trunk/lib/plugin/TitleSearch.php =================================================================== --- trunk/lib/plugin/TitleSearch.php 2014-07-15 16:37:05 UTC (rev 8963) +++ trunk/lib/plugin/TitleSearch.php 2014-07-16 13:53:10 UTC (rev 8964) @@ -47,8 +47,8 @@ function getDefaultArguments() { - return array_merge - ( + // All PageList::supportedArgs, except 'pagename' + $args = array_merge( PageList::supportedArgs(), // paging and more. array('s' => false, 'auto_redirect' => false, @@ -59,6 +59,8 @@ 'regex' => 'auto', 'format' => false, )); + unset($args['pagename']); + return $args; } // info arg allows multiple columns @@ -72,6 +74,10 @@ return HTML(); } + if (empty($args['sortby'])) { + $args['sortby'] = ''; + } + // ^S != S* ^ matches only beginning of phrase, not of word. // x* matches any word beginning with x $query = new TextSearchQuery($args['s'], $args['case_exact'], $args['regex']); Modified: trunk/pgsrc/Help%2FTitleSearchPlugin =================================================================== --- trunk/pgsrc/Help%2FTitleSearchPlugin 2014-07-15 16:37:05 UTC (rev 8963) +++ trunk/pgsrc/Help%2FTitleSearchPlugin 2014-07-16 13:53:10 UTC (rev 8964) @@ -1,4 +1,4 @@ -Date: Fri, 7 Dec 2012 14:58:45 +0000 +Date: Wed, 16 Jul 2014 15:48:13 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0) Content-Type: application/x-phpwiki; pagename=Help%2FTitleSearchPlugin; @@ -18,7 +18,8 @@ == Arguments == -All [[Help:PageList|PageList]] arguments, plus the following ones: +All [[Help:PageList|PageList]] arguments (except //paganame//), +plus the following ones: {| class="bordered" |- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-15 16:37:08
|
Revision: 8963 http://sourceforge.net/p/phpwiki/code/8963 Author: vargenau Date: 2014-07-15 16:37:05 +0000 (Tue, 15 Jul 2014) Log Message: ----------- Add braces Modified Paths: -------------- trunk/lib/TextSearchQuery.php Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2014-07-15 12:28:16 UTC (rev 8962) +++ trunk/lib/TextSearchQuery.php 2014-07-15 16:37:05 UTC (rev 8963) @@ -96,10 +96,11 @@ */ function TextSearchQuery($search_query, $case_exact = false, $regex = 'auto') { - if ($regex == 'none' or !$regex) + if ($regex == 'none' or !$regex) { $this->_regex = 0; - elseif (defined("TSQ_REGEX_" . strtoupper($regex))) - $this->_regex = constant("TSQ_REGEX_" . strtoupper($regex)); else { + } elseif (defined("TSQ_REGEX_" . strtoupper($regex))) { + $this->_regex = constant("TSQ_REGEX_" . strtoupper($regex)); + } else { trigger_error(fmt("Unsupported argument: %s=%s", 'regex', $regex)); $this->_regex = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |