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. |