From 9e6c7cc8efda090a5fa292b37eb20ba7c2ad0c87 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 30 Aug 2010 16:52:51 +0000 Subject: [PATCH] Get rid of PHP4-style constructors --- includes/EditPage.php | 2 +- includes/Exif.php | 2 +- includes/Export.php | 24 +++++++++---------- includes/HistoryBlob.php | 4 ++-- includes/Licenses.php | 2 +- includes/LinksUpdate.php | 2 +- includes/Revision.php | 2 +- includes/SpecialPage.php | 10 ++++---- includes/User.php | 2 +- includes/WikiError.php | 4 ++-- includes/ZhClient.php | 2 +- includes/db/Database.php | 4 ++-- includes/db/DatabasePostgres.php | 2 +- includes/diff/DifferenceEngine.php | 22 ++++++++--------- includes/filerepo/ArchivedFile.php | 2 +- includes/json/Services_JSON.php | 2 +- includes/media/MediaTransformOutput.php | 2 +- includes/parser/DateFormatter.php | 2 +- includes/parser/ParserOutput.php | 2 +- includes/search/SearchEngine.php | 2 +- includes/search/SearchMySQL.php | 2 +- includes/search/SearchSqlite.php | 2 +- includes/search/SearchUpdate.php | 2 +- .../specials/SpecialFileDuplicateSearch.php | 2 +- includes/specials/SpecialMIMEsearch.php | 2 +- .../SpecialUncategorizedcategories.php | 2 +- includes/specials/SpecialUserlogin.php | 2 +- includes/specials/SpecialWantedpages.php | 2 +- languages/Language.php | 2 +- maintenance/importDump.php | 2 +- maintenance/rebuildImages.php | 2 +- profileinfo.php | 2 +- 32 files changed, 60 insertions(+), 60 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 4aeb8e02e4..e3c8b621c5 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -96,7 +96,7 @@ class EditPage { * @todo document * @param $article */ - function EditPage( $article ) { + function __construct( $article ) { $this->mArticle =& $article; $this->mTitle = $article->getTitle(); $this->action = 'submit'; diff --git a/includes/Exif.php b/includes/Exif.php index 50a336120a..630821c34b 100644 --- a/includes/Exif.php +++ b/includes/Exif.php @@ -620,7 +620,7 @@ class FormatExif { * @param $exif Array: the Exif data to format ( as returned by * Exif::getFilteredData() ) */ - function FormatExif( $exif ) { + function __construct( $exif ) { $this->mExif = $exif; } diff --git a/includes/Export.php b/includes/Export.php index daeadc53b8..2342817093 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -663,7 +663,7 @@ class DumpOutput { class DumpFileOutput extends DumpOutput { var $handle; - function DumpFileOutput( $file ) { + function __construct( $file ) { $this->handle = fopen( $file, "wt" ); } @@ -679,7 +679,7 @@ class DumpFileOutput extends DumpOutput { * @ingroup Dump */ class DumpPipeOutput extends DumpFileOutput { - function DumpPipeOutput( $command, $file = null ) { + function __construct( $command, $file = null ) { if( !is_null( $file ) ) { $command .= " > " . wfEscapeShellArg( $file ); } @@ -692,8 +692,8 @@ class DumpPipeOutput extends DumpFileOutput { * @ingroup Dump */ class DumpGZipOutput extends DumpPipeOutput { - function DumpGZipOutput( $file ) { - parent::DumpPipeOutput( "gzip", $file ); + function __construct( $file ) { + parent::__construct( "gzip", $file ); } } @@ -702,8 +702,8 @@ class DumpGZipOutput extends DumpPipeOutput { * @ingroup Dump */ class DumpBZip2Output extends DumpPipeOutput { - function DumpBZip2Output( $file ) { - parent::DumpPipeOutput( "bzip2", $file ); + function __construct( $file ) { + parent::__construct( "bzip2", $file ); } } @@ -712,12 +712,12 @@ class DumpBZip2Output extends DumpPipeOutput { * @ingroup Dump */ class Dump7ZipOutput extends DumpPipeOutput { - function Dump7ZipOutput( $file ) { + function __construct( $file ) { $command = "7za a -bd -si " . wfEscapeShellArg( $file ); // Suppress annoying useless crap from p7zip // Unfortunately this could suppress real error messages too $command .= ' >' . wfGetNull() . ' 2>&1'; - parent::DumpPipeOutput( $command ); + parent::__construct( $command ); } } @@ -730,7 +730,7 @@ class Dump7ZipOutput extends DumpPipeOutput { * @ingroup Dump */ class DumpFilter { - function DumpFilter( &$sink ) { + function __construct( &$sink ) { $this->sink =& $sink; } @@ -793,8 +793,8 @@ class DumpNamespaceFilter extends DumpFilter { var $invert = false; var $namespaces = array(); - function DumpNamespaceFilter( &$sink, $param ) { - parent::DumpFilter( $sink ); + function __construct( &$sink, $param ) { + parent::__construct( $sink ); $constants = array( "NS_MAIN" => NS_MAIN, @@ -879,7 +879,7 @@ class DumpLatestFilter extends DumpFilter { * @ingroup Dump */ class DumpMultiWriter { - function DumpMultiWriter( $sinks ) { + function __construct( $sinks ) { $this->sinks = $sinks; $this->count = count( $sinks ); } diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index 13bf1672a6..fe2b48bf4f 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -157,7 +157,7 @@ class HistoryBlobStub { * @param $hash Strng: the content hash of the text * @param $oldid Integer: the old_id for the CGZ object */ - function HistoryBlobStub( $hash = '', $oldid = 0 ) { + function __construct( $hash = '', $oldid = 0 ) { $this->mHash = $hash; } @@ -253,7 +253,7 @@ class HistoryBlobCurStub { /** * @param $curid Integer: the cur_id pointed to */ - function HistoryBlobCurStub( $curid = 0 ) { + function __construct( $curid = 0 ) { $this->mCurId = $curid; } diff --git a/includes/Licenses.php b/includes/Licenses.php index 33325d2e8c..96ee124d0a 100644 --- a/includes/Licenses.php +++ b/includes/Licenses.php @@ -166,7 +166,7 @@ class License { * * @param $str String: license name?? */ - function License( $str ) { + function __construct( $str ) { list( $text, $template ) = explode( '|', strrev( $str ), 2 ); $this->template = strrev( $template ); diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index af05746f75..7092d3dc4d 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -30,7 +30,7 @@ class LinksUpdate { * @param $parserOutput ParserOutput: output from a full parse of this page * @param $recursive Boolean: queue jobs for recursive updates? */ - function LinksUpdate( $title, $parserOutput, $recursive = true ) { + function __construct( $title, $parserOutput, $recursive = true ) { global $wgAntiLockFlags; if ( $wgAntiLockFlags & ALF_NO_LINK_LOCK ) { diff --git a/includes/Revision.php b/includes/Revision.php index 31814fe6c5..54709de5a8 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -290,7 +290,7 @@ class Revision { * @param $row Mixed: either a database row or an array * @access private */ - function Revision( $row ) { + function __construct( $row ) { if( is_object( $row ) ) { $this->mId = intval( $row->rev_id ); $this->mPage = intval( $row->rev_page ); diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index e273f28f27..e3174db86e 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -703,7 +703,7 @@ class SpecialPage { * @param $file String: file which is included by execute(). It is also constructed from $name by default * @param $includable Boolean: whether the page can be included in normal pages */ - function SpecialPage( $name = '', $restriction = '', $listed = true, $function = false, $file = 'default', $includable = false ) { + function __construct( $name = '', $restriction = '', $listed = true, $function = false, $file = 'default', $includable = false ) { $this->mName = $name; $this->mRestriction = $restriction; $this->mListed = $listed; @@ -914,8 +914,8 @@ class SpecialPage { */ class UnlistedSpecialPage extends SpecialPage { - function UnlistedSpecialPage( $name, $restriction = '', $function = false, $file = 'default' ) { - parent::SpecialPage( $name, $restriction, false, $function, $file ); + function __construct( $name, $restriction = '', $function = false, $file = 'default' ) { + parent::__construct( $name, $restriction, false, $function, $file ); } } @@ -925,8 +925,8 @@ class UnlistedSpecialPage extends SpecialPage */ class IncludableSpecialPage extends SpecialPage { - function IncludableSpecialPage( $name, $restriction = '', $listed = true, $function = false, $file = 'default' ) { - parent::SpecialPage( $name, $restriction, $listed, $function, $file, true ); + function __construct( $name, $restriction = '', $listed = true, $function = false, $file = 'default' ) { + parent::__construct( $name, $restriction, $listed, $function, $file, true ); } } diff --git a/includes/User.php b/includes/User.php index 675ccfd36a..bb981757bb 100644 --- a/includes/User.php +++ b/includes/User.php @@ -178,7 +178,7 @@ class User { * @see newFromSession() * @see newFromRow() */ - function User() { + function __construct() { $this->clearInstanceCache( 'defaults' ); } diff --git a/includes/WikiError.php b/includes/WikiError.php index 726a79c20d..adda36b915 100644 --- a/includes/WikiError.php +++ b/includes/WikiError.php @@ -73,7 +73,7 @@ class WikiErrorMsg extends WikiError { * @param $message String: wiki message name * @param ... parameters to pass to wfMsg() */ - function WikiErrorMsg( $message/*, ... */ ) { + function __construct( $message/*, ... */ ) { $args = func_get_args(); array_shift( $args ); $this->mMessage = wfMsgReal( $message, $args, true ); @@ -102,7 +102,7 @@ class WikiXmlError extends WikiError { * @param $context * @param $offset Int */ - function WikiXmlError( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) { + function __construct( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) { $this->mXmlError = xml_get_error_code( $parser ); $this->mColumn = xml_get_current_column_number( $parser ); $this->mLine = xml_get_current_line_number( $parser ); diff --git a/includes/ZhClient.php b/includes/ZhClient.php index a029be1528..729213e82b 100644 --- a/includes/ZhClient.php +++ b/includes/ZhClient.php @@ -12,7 +12,7 @@ class ZhClient { * * @access private */ - function ZhClient($host, $port) { + function __construct($host, $port) { $this->mHost = $host; $this->mPort = $port; $this->mConnected = $this->connect(); diff --git a/includes/db/Database.php b/includes/db/Database.php index 642b4b6a45..42bd7d079f 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2278,7 +2278,7 @@ abstract class DatabaseBase implements DatabaseType { class DBObject { public $mData; - function DBObject($data) { + function __construct($data) { $this->mData = $data; } @@ -2635,7 +2635,7 @@ class ResultWrapper implements Iterator { /** * Create a new result object from a result resource and a Database object */ - function ResultWrapper( $database, $result ) { + function __construct( $database, $result ) { $this->db = $database; if ( $result instanceof ResultWrapper ) { $this->result = $result->result; diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index e6c1cc2ee7..88535e73d4 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -96,7 +96,7 @@ class DatabasePostgres extends DatabaseBase { var $numeric_version = null; var $mAffectedRows = null; - function DatabasePostgres($server = false, $user = false, $password = false, $dbName = false, + function __construct($server = false, $user = false, $password = false, $dbName = false, $failFunction = false, $flags = 0 ) { diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 1c9c2c9a2c..a1f5276c6d 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -41,7 +41,7 @@ class _DiffOp { class _DiffOp_Copy extends _DiffOp { var $type = 'copy'; - function _DiffOp_Copy ($orig, $closing = false) { + function __construct ($orig, $closing = false) { if (!is_array($closing)) $closing = $orig; $this->orig = $orig; @@ -61,7 +61,7 @@ class _DiffOp_Copy extends _DiffOp { class _DiffOp_Delete extends _DiffOp { var $type = 'delete'; - function _DiffOp_Delete ($lines) { + function __construct ($lines) { $this->orig = $lines; $this->closing = false; } @@ -79,7 +79,7 @@ class _DiffOp_Delete extends _DiffOp { class _DiffOp_Add extends _DiffOp { var $type = 'add'; - function _DiffOp_Add ($lines) { + function __construct ($lines) { $this->closing = $lines; $this->orig = false; } @@ -97,7 +97,7 @@ class _DiffOp_Add extends _DiffOp { class _DiffOp_Change extends _DiffOp { var $type = 'change'; - function _DiffOp_Change ($orig, $closing) { + function __construct ($orig, $closing) { $this->orig = $orig; $this->closing = $closing; } @@ -568,7 +568,7 @@ class Diff * (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); //$this->_check($from_lines, $to_lines); @@ -720,14 +720,14 @@ class MappedDiff extends Diff * @param $mapped_to_lines array This array should * have the same number of elements as $to_lines. */ - function MappedDiff($from_lines, $to_lines, + function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { wfProfileIn( __METHOD__ ); assert(sizeof($from_lines) == sizeof($mapped_from_lines)); assert(sizeof($to_lines) == sizeof($mapped_to_lines)); - $this->Diff($mapped_from_lines, $mapped_to_lines); + parent::__construct($mapped_from_lines, $mapped_to_lines); $xi = $yi = 0; for ($i = 0; $i < sizeof($this->edits); $i++) { @@ -992,7 +992,7 @@ define('NBSP', ' '); // iso-8859-x non-breaking space. * @ingroup DifferenceEngine */ class _HWLDF_WordAccumulator { - function _HWLDF_WordAccumulator () { + function __construct () { $this->_lines = array(); $this->_line = ''; $this->_group = ''; @@ -1055,13 +1055,13 @@ class _HWLDF_WordAccumulator { class WordLevelDiff extends MappedDiff { const MAX_LINE_LENGTH = 10000; - function WordLevelDiff ($orig_lines, $closing_lines) { + function __construct ($orig_lines, $closing_lines) { wfProfileIn( __METHOD__ ); list ($orig_words, $orig_stripped) = $this->_split($orig_lines); list ($closing_words, $closing_stripped) = $this->_split($closing_lines); - $this->MappedDiff($orig_words, $closing_words, + parent::__construct($orig_words, $closing_words, $orig_stripped, $closing_stripped); wfProfileOut( __METHOD__ ); } @@ -1136,7 +1136,7 @@ class WordLevelDiff extends MappedDiff { * @ingroup DifferenceEngine */ class TableDiffFormatter extends DiffFormatter { - function TableDiffFormatter() { + function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; } diff --git a/includes/filerepo/ArchivedFile.php b/includes/filerepo/ArchivedFile.php index 368a561edf..d26810e578 100644 --- a/includes/filerepo/ArchivedFile.php +++ b/includes/filerepo/ArchivedFile.php @@ -29,7 +29,7 @@ class ArchivedFile /**#@-*/ - function ArchivedFile( $title, $id=0, $key='' ) { + function __construct( $title, $id=0, $key='' ) { $this->id = -1; $this->title = false; $this->name = false; diff --git a/includes/json/Services_JSON.php b/includes/json/Services_JSON.php index 3407dd6c07..a0433b015d 100644 --- a/includes/json/Services_JSON.php +++ b/includes/json/Services_JSON.php @@ -132,7 +132,7 @@ class Services_JSON * bubble up with an error, so all return values * from encode() should be checked with isError() */ - function Services_JSON($use = 0) + function __construct($use = 0) { $this->use = $use; } diff --git a/includes/media/MediaTransformOutput.php b/includes/media/MediaTransformOutput.php index 927db9292a..276d254415 100644 --- a/includes/media/MediaTransformOutput.php +++ b/includes/media/MediaTransformOutput.php @@ -115,7 +115,7 @@ class ThumbnailImage extends MediaTransformOutput { * @param $page Integer: page number, for multipage files * @private */ - function ThumbnailImage( $file, $url, $width, $height, $path = false, $page = false ) { + function __construct( $file, $url, $width, $height, $path = false, $page = false ) { $this->file = $file; $this->url = $url; # These should be integers when they get here. diff --git a/includes/parser/DateFormatter.php b/includes/parser/DateFormatter.php index c1b07db7f2..a6fb7dfbda 100644 --- a/includes/parser/DateFormatter.php +++ b/includes/parser/DateFormatter.php @@ -34,7 +34,7 @@ class DateFormatter /** * @todo document */ - function DateFormatter() { + function __construct() { global $wgContLang; $this->monthNames = $this->getMonthRegex(); diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index dc9b124804..6b84c22239 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -123,7 +123,7 @@ class ParserOutput extends CacheTime $mTOCHTML = ''; # HTML of the TOC private $mIndexPolicy = ''; # 'index' or 'noindex'? Any other value will result in no change. - function ParserOutput( $text = '', $languageLinks = array(), $categoryLinks = array(), + function __construct( $text = '', $languageLinks = array(), $categoryLinks = array(), $containsOldMagic = false, $titletext = '' ) { $this->mText = $text; diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 188512ca05..635fbff303 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -847,7 +847,7 @@ class SearchNearMatchResultSet extends SearchResultSet { class SearchHighlighter { var $mCleanWikitext = true; - function SearchHighlighter( $cleanupWikitext = true ) { + function __construct( $cleanupWikitext = true ) { $this->mCleanWikitext = $cleanupWikitext; } diff --git a/includes/search/SearchMySQL.php b/includes/search/SearchMySQL.php index 8ff0be9ea6..bb079c058e 100644 --- a/includes/search/SearchMySQL.php +++ b/includes/search/SearchMySQL.php @@ -402,7 +402,7 @@ class SearchMySQL extends SearchEngine { * @ingroup Search */ class MySQLSearchResultSet extends SqlSearchResultSet { - function MySQLSearchResultSet( $resultSet, $terms, $totalHits=null ) { + function __construct( $resultSet, $terms, $totalHits=null ) { parent::__construct( $resultSet, $terms ); $this->mTotalHits = $totalHits; } diff --git a/includes/search/SearchSqlite.php b/includes/search/SearchSqlite.php index ea2aa8feeb..a7c09badf0 100644 --- a/includes/search/SearchSqlite.php +++ b/includes/search/SearchSqlite.php @@ -323,7 +323,7 @@ class SearchSqlite extends SearchEngine { * @ingroup Search */ class SqliteSearchResultSet extends SqlSearchResultSet { - function SqliteSearchResultSet( $resultSet, $terms, $totalHits=null ) { + function __construct( $resultSet, $terms, $totalHits=null ) { parent::__construct( $resultSet, $terms ); $this->mTotalHits = $totalHits; } diff --git a/includes/search/SearchUpdate.php b/includes/search/SearchUpdate.php index 0379bb218e..2467725aac 100644 --- a/includes/search/SearchUpdate.php +++ b/includes/search/SearchUpdate.php @@ -18,7 +18,7 @@ class SearchUpdate { /* private */ var $mId = 0, $mNamespace, $mTitle, $mText; /* private */ var $mTitleWords; - function SearchUpdate( $id, $title, $text = false ) { + function __construct( $id, $title, $text = false ) { $nt = Title::newFromText( $title ); if( $nt ) { $this->mId = $id; diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index df0cb9579e..06b096f4b6 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -31,7 +31,7 @@ class FileDuplicateSearchPage extends QueryPage { var $hash, $filename; - function FileDuplicateSearchPage( $hash, $filename ) { + function __construct( $hash, $filename ) { $this->hash = $hash; $this->filename = $filename; } diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index 459057a49e..77ce2e823e 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -30,7 +30,7 @@ class MIMEsearchPage extends QueryPage { var $major, $minor; - function MIMEsearchPage( $major, $minor ) { + function __construct( $major, $minor ) { $this->major = $major; $this->minor = $minor; } diff --git a/includes/specials/SpecialUncategorizedcategories.php b/includes/specials/SpecialUncategorizedcategories.php index bea916ba25..9574af7018 100644 --- a/includes/specials/SpecialUncategorizedcategories.php +++ b/includes/specials/SpecialUncategorizedcategories.php @@ -27,7 +27,7 @@ * @ingroup SpecialPage */ class UncategorizedCategoriesPage extends UncategorizedPagesPage { - function UncategorizedCategoriesPage() { + function __construct() { $this->requestedNamespace = NS_CATEGORY; } diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 5e41e3ff7f..5e5f6a6864 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -68,7 +68,7 @@ class LoginForm { * @param $request WebRequest: a WebRequest object passed by reference * @param $par String: subpage parameter */ - function LoginForm( &$request, $par = '' ) { + function __construct( &$request, $par = '' ) { global $wgAuth, $wgHiddenPrefs, $wgEnableEmail, $wgRedirectOnLogin; $this->mType = ( $par == 'signup' ) ? $par : $request->getText( 'type' ); # Check for [[Special:Userlogin/signup]] diff --git a/includes/specials/SpecialWantedpages.php b/includes/specials/SpecialWantedpages.php index fb988b7947..4e1611bce4 100644 --- a/includes/specials/SpecialWantedpages.php +++ b/includes/specials/SpecialWantedpages.php @@ -29,7 +29,7 @@ class WantedPagesPage extends WantedQueryPage { var $nlinks; - function WantedPagesPage( $inc = false, $nlinks = true ) { + function __construct( $inc = false, $nlinks = true ) { $this->setListoutput( $inc ); $this->nlinks = $nlinks; } diff --git a/languages/Language.php b/languages/Language.php index 71793e20bf..74cdb757b3 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -38,7 +38,7 @@ if ( function_exists( 'mb_strtoupper' ) ) { */ class FakeConverter { var $mLang; - function FakeConverter( $langobj ) { $this->mLang = $langobj; } + function __construct( $langobj ) { $this->mLang = $langobj; } function autoConvertToAllVariants( $text ) { return array( $this->mLang->getCode() => $text ); } function convert( $t ) { return $t; } function convertTitle( $t ) { return $t->getPrefixedText(); } diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 17c040448f..030962b8b8 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -38,7 +38,7 @@ class BackupReader { var $debug = false; var $uploads = false; - function BackupReader() { + function __construct() { $this->stderr = fopen( "php://stderr", "wt" ); } diff --git a/maintenance/rebuildImages.php b/maintenance/rebuildImages.php index 9cfec70059..1fbd186409 100644 --- a/maintenance/rebuildImages.php +++ b/maintenance/rebuildImages.php @@ -36,7 +36,7 @@ require_once( dirname( __FILE__ ) . '/commandLine.inc' ); require_once( 'FiveUpgrade.inc' ); class ImageBuilder extends FiveUpgrade { - function ImageBuilder( $dryrun = false ) { + function __construct( $dryrun = false ) { parent::FiveUpgrade(); $this->maxLag = 10; # if slaves are lagged more than 10 secs, wait diff --git a/profileinfo.php b/profileinfo.php index 0b3609af01..2329f6a41e 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -83,7 +83,7 @@ class profile_point { var $time; var $children; - function profile_point( $name, $count, $time, $memory ) { + function __construct( $name, $count, $time, $memory ) { $this->name = $name; $this->count = $count; $this->time = $time; -- 2.20.1