* (bug 8701) Check database lock status when blocking/unblocking users
* ParserOptions and ParserOutput classes are now in their own files
* (bug 8708) Namespace translations for Zealandic language
+* Renamed constructor methods to PHP5 __construct reserved name
== Languages updated ==
var $func_name;
var $args;
- function AjaxDispatcher() {
+ function __construct() {
wfProfileIn( __METHOD__ );
$this->mode = "";
<?php
+if( !defined( 'MEDIAWIKI' ) ) {
+ die( 1 );
+}
-if( !defined( 'MEDIAWIKI' ) )
- die( 1 );
-
+/** @todo document */
class AjaxResponse {
var $mCacheDuration;
var $mVary;
var $mLastModified;
var $mContentType;
- function AjaxResponse( $text = NULL ) {
+ function __construct( $text = NULL ) {
$this->mCacheDuration = NULL;
$this->mVary = NULL;
* @param $title Reference to a Title object.
* @param $oldId Integer revision ID, null to fetch from request, zero for current
*/
- function Article( &$title, $oldId = null ) {
+ function __construct( &$title, $oldId = null ) {
$this->mTitle =& $title;
$this->mOldId = $oldId;
$this->clear();
class BagOStuff {
var $debugmode;
- function BagOStuff() {
+ function __construct() {
$this->set_debug( false );
}
const EB_FOR_UPDATE = 2;
const EB_RANGE_ONLY = 4;
- function Block( $address = '', $user = 0, $by = 0, $reason = '',
+ function __construct( $address = '', $user = 0, $by = 0, $reason = '',
$timestamp = '' , $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0, $enableAutoblock = 0 )
{
$this->mId = 0;
/**
* Constructor (currently empty).
*/
- function Categoryfinder () {
+ function __construct() {
}
/**
var $curlink , $difflink, $lastlink , $usertalklink , $versionlink ;
var $userlink, $timestamp, $watched;
- function newFromParent( $rc )
- {
+ function newFromParent( $rc ) {
$rc2 = new RCCacheEntry;
$rc2->mAttribs = $rc->mAttribs;
$rc2->mExtra = $rc->mExtra;
#
/** @todo document */
- function ChangesList( &$skin ) {
+ function __construct( &$skin ) {
$this->skin =& $skin;
$this->preCacheMessages();
}
*
* @param $file String: filename.
*/
- function Exif( $file ) {
+ function __construct( $file ) {
/**
* Page numbers here refer to pages in the EXIF 2.2 standard
*
* dir: "asc" or "desc" timestamp order
* @param int $buffer one of WikiExporter::BUFFER or WikiExporter::STREAM
*/
- function WikiExporter( &$db, $history = WikiExporter::CURRENT,
+ function __construct( &$db, $history = WikiExporter::CURRENT,
$buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) {
$this->db =& $db;
$this->history = $history;
class ExternalEdit {
- function ExternalEdit ( $article, $mode ) {
+ function __construct( $article, $mode ) {
global $wgInputEncoding;
$this->mArticle =& $article;
$this->mTitle =& $article->mTitle;
/**#@+
* @todo document
*/
- function FeedItem( $Title, $Description, $Url, $Date = '', $Author = '', $Comments = '' ) {
+ function __construct( $Title, $Description, $Url, $Date = '', $Author = '', $Comments = '' ) {
$this->Title = $Title;
$this->Description = $Description;
$this->Url = $Url;
/**
* Create a new image gallery object.
*/
- function ImageGallery( ) {
+ function __construct( ) {
$this->mImages = array();
$this->mShowBytes = true;
$this->mShowFilename = true;
/**#@-*/
/**
- * Constrictor
+ * Constructor
*
* @param $str String: the string to build the licenses member from, will use
* wfMsgForContent( 'licenses' ) if null (default: null)
*/
- function Licenses( $str = null ) {
+ function __construct( $str = null ) {
// PHP sucks, this should be possible in the constructor
$this->msg = is_null( $str ) ? wfMsgForContent( 'licenses' ) : $str;
$this->html = '';
*/
var $data = array();
- function LinkBatch( $arr = array() ) {
+ function __construct( $arr = array() ) {
foreach( $arr as $item ) {
$this->addObj( $item );
}
return $instance;
}
- function LinkCache() {
+ function __construct() {
$this->mForUpdate = false;
$this->mPageLinks = array();
$this->mGoodLinks = array();
* @package MediaWiki
*/
class Linker {
- function Linker() {}
+ function __construct() {}
/**
* @deprecated
*/
const AVG_STATUS_POLL = 2000;
- function LoadBalancer( $servers, $failFunction = false, $waitTimeout = 10, $waitForMasterNow = false )
+ function __construct( $servers, $failFunction = false, $waitTimeout = 10, $waitForMasterNow = false )
{
$this->mServers = $servers;
$this->mFailFunction = $failFunction;
* 'upload', 'move'
* @param bool $rc Whether to update recent changes as well as the logging table
*/
- function LogPage( $type, $rc = true ) {
+ function __construct( $type, $rc = true ) {
$this->type = $type;
$this->updateRecentChanges = $rc;
}
*/
class MacBinary {
- function MacBinary( $filename ) {
+ function __construct( $filename ) {
$this->open( $filename );
$this->loadHeader();
}
}
}
-?>
\ No newline at end of file
+?>
/**#@-*/
- function MagicWord($id = 0, $syn = '', $cs = false) {
+ function __construct($id = 0, $syn = '', $cs = false) {
$this->mId = $id;
$this->mSynonyms = (array)$syn;
$this->mCaseSensitive = $cs;
var $mathml = '';
var $conservativeness = 0;
- function MathRenderer( $tex ) {
+ function __construct( $tex ) {
$this->tex = $tex;
}
*
* This constructor parses the mime.types and mime.info files and build internal mappings.
*/
- function MimeMagic() {
+ function __construct() {
/*
* --- load mime.types ---
*/
* Constructor
* Initialise private variables
*/
- function OutputPage() {
+ function __construct() {
$this->mMetatags = $this->mKeywords = $this->mLinktags = array();
$this->mHTMLtitle = $this->mPagetitle = $this->mBodytext =
$this->mRedirect = $this->mLastModified =
* @param Article $article
* @returns nothing
*/
- function PageHistory($article) {
+ function __construct($article) {
global $wgUser;
$this->mArticle =& $article;
*
* @param object $memCached
*/
- function ParserCache( &$memCached ) {
+ function __construct( &$memCached ) {
$this->mMemc =& $memCached;
}
function setMaxIncludeSize( $x ) { return wfSetVar( $this->mMaxIncludeSize, $x ); }
function setRemoveComments( $x ) { return wfSetVar( $this->mRemoveComments, $x ); }
- function ParserOptions( $user = null ) {
+ function __construct( $user = null ) {
$this->initialiseFromUser( $user );
}
var $mStack = array (), $mWorkStack = array (), $mCollated = array ();
var $mCalls = array (), $mTotals = array ();
- function Profiler()
- {
+ function __construct() {
// Push an entry for the pre-profile setup time onto the stack
global $wgRequestTime;
if ( !empty( $wgRequestTime ) ) {
} else {
$this->profileIn( '-total' );
}
-
}
function profileIn($functionname) {
var $mMinimumTime = 0;
var $mProfileID = false;
- function ProfilerSimple() {
+ function __construct() {
global $wgRequestTime,$wgRUstart;
if (!empty($wgRequestTime) && !empty($wgRUstart)) {
$this->mWorkStack[] = array( '-total', 0, $wgRequestTime,$this->getCpuTime($wgRUstart));
if (!is_array($entry)) {
$entry = array('cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0);
$this->mCollated["-setup"] =& $entry;
-
}
$entry['cpu'] += $elapsedcpu;
$entry['cpu_sq'] += $elapsedcpu*$elapsedcpu;
if ($wgDebugFunctionEntry) {
$this->debug(str_repeat(' ', count($this->mWorkStack)).'Entering '.$functionname."\n");
}
- $this->mWorkStack[] = array($functionname, count( $this->mWorkStack ), microtime(true), $this->getCpuTime());
+ $this->mWorkStack[] = array($functionname, count( $this->mWorkStack ), microtime(true), $this->getCpuTime());
}
function profileOut($functionname) {
if (!is_array($entry)) {
$entry = array('cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0);
$this->mCollated[$functionname] =& $entry;
-
}
$entry['cpu'] += $elapsedcpu;
$entry['cpu_sq'] += $elapsedcpu*$elapsedcpu;
# Less than minimum, ignore
return;
}
-
-
+
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$plength=0;
$packet="";
var $mReason = '';
var $mCascade = false;
- function ProtectionForm( &$article ) {
+ function __construct( &$article ) {
global $wgRequest, $wgUser;
global $wgRestrictionTypes, $wgRestrictionLevels;
$this->mArticle =& $article;
function buildCascadeInput() {
$id = 'mwProtect-cascade';
$ci = wfCheckLabel( wfMsg( 'protect-cascade' ), $id, $id, $this->mCascade, $this->disabledAttrib);
-
+
return $ci;
}
}
}
-
?>
* @var bool
*/
var $listoutput = false;
-
+
/**
* The offset and limit in use, as passed to the query() function
*
var $mSmaxage, $mMaxage;
var $mContentType, $mExpandTemplates;
- function RawPage( &$article, $request = false ) {
+ function __construct( &$article, $request = false ) {
global $wgRequest, $wgInputEncoding, $wgSquidMaxage, $wgJsMimeType;
global $wgUser;
$maxage = $this->mRequest->getInt( 'maxage', $wgSquidMaxage );
$this->mExpandTemplates = $this->mRequest->getVal( 'templates' ) === 'expand';
$this->mUseMessageCache = $this->mRequest->getBool( 'usemsgcache' );
-
+
$oldid = $this->mRequest->getInt( 'oldid' );
switch ( $wgRequest->getText( 'direction' ) ) {
case 'next':
var $mViews, $mEdits, $mGood, $mPages, $mUsers;
- function SiteStatsUpdate( $views, $edits, $good, $pages = 0, $users = 0 ) {
+ function __construct( $views, $edits, $good, $pages = 0, $users = 0 ) {
$this->mViews = $views;
$this->mEdits = $edits;
$this->mGood = $good;
/**#@-*/
/** Constructor, call parent constructor */
- function Skin() { parent::Linker(); }
+ function Skin() { parent::__construct(); }
/**
* Fetch the set of available skins.
class SquidUpdate {
var $urlArr, $mMaxTitles;
- function SquidUpdate( $urlArr = Array(), $maxTitles = false ) {
+ function __construct( $urlArr = Array(), $maxTitles = false ) {
global $wgMaxSquidPurgeTitles;
if ( $maxTitles === false ) {
$this->mMaxTitles = $wgMaxSquidPurgeTitles;
* Constructor
* @private
*/
- /* private */ function Title() {
+ /* private */ function __construct() {
$this->mInterwiki = $this->mUrlform =
$this->mTextform = $this->mDbkeyform = '';
$this->mArticleID = -1;
* @param mixed $address String with an email address, or a User object
* @param string $name Human-readable name if a string address is given
*/
- function MailAddress( $address, $name=null ) {
+ function __construct( $address, $name=null ) {
if( is_object( $address ) && $address instanceof User ) {
$this->address = $address->getEmail();
$this->name = $address->getName();
}
class WebRequest {
- function WebRequest() {
+ function __construct() {
$this->checkMagicQuotes();
global $wgUsePathInfo;
if ( $wgUsePathInfo ) {
var $GET; /* Stores the $_GET variables at time of creation, can be changed */
var $params = array();
- /**
- * Constructor
- */
- function MediaWiki () {
+ /** Constructor. It just save the $_GET variable */
+ function __construct() {
$this->GET = $_GET;
}
/**
* @param string $message
*/
- function WikiError( $message ) {
+ function __construct( $message ) {
$this->mMessage = $message;
}