* Some extensions had their ResourceLoader modules depend on the "mediawiki"
and "jquery" modules. In the past, this behavior was undefined, now it will
throw an error.
+* Removed BagOStuff::replace(). (deprecated since 1.23)
==== Renamed classes ====
* CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
# Generates CSS of mediawiki.ui and mediawiki.ui.button using ResourceLoader, then applies it to the
# KSS style guide
$(eval KSS_RL_TMP := $(shell mktemp /tmp/tmp.XXXXXXXXXX))
- @curl -sG "${MEDIAWIKI_LOAD_URL}?modules=mediawiki.ui.anchor|mediawiki.ui.checkbox|mediawiki.ui.input|mediawiki.legacy.shared|mediawiki.legacy.commonPrint|mediawiki.ui|mediawiki.ui.button&only=styles" > $(KSS_RL_TMP)
+# Keep module names in strict alphabetical order, so CSS loads in the same order as ResourceLoader's addModuleStyles does; this can affect rendering.
+# See OutputPage::makeResourceLoaderLink.
+ @curl -sG "${MEDIAWIKI_LOAD_URL}?modules=mediawiki.legacy.commonPrint|mediawiki.legacy.shared|mediawiki.ui|mediawiki.ui.anchor|mediawiki.ui.button|mediawiki.ui.checkbox|mediawiki.ui.input&only=styles" > $(KSS_RL_TMP)
@node_modules/.bin/kss-node ../../resources/src/mediawiki.ui static/ --css $(KSS_RL_TMP) -t styleguide-template
@rm $(KSS_RL_TMP)
public $limit;
/** @var array */
- protected $from;
+ public $from;
/** @var array */
- protected $until;
+ public $until;
/** @var string[] */
public $articles;
public $articles_start_char;
/** @var array */
- protected $children;
+ public $children;
/** @var array */
- protected $children_start_char;
+ public $children_start_char;
/** @var bool */
- protected $showGallery;
+ public $showGallery;
/** @var array */
- protected $imgsNoGallery_start_char;
+ public $imgsNoGallery_start_char;
/** @var array */
- protected $imgsNoGallery;
+ public $imgsNoGallery;
/** @var array */
- protected $nextPage;
+ public $nextPage;
/** @var array */
protected $prevPage;
/** @var array */
- protected $flip;
+ public $flip;
/** @var Title */
- protected $title;
+ public $title;
/** @var Collation */
- protected $collation;
+ public $collation;
/** @var ImageGallery */
- protected $gallery;
+ public $gallery;
/** @var Category Category object for this page. */
private $cat;
private $mContextTitle = null;
/** @var string */
- protected $action = 'submit';
+ public $action = 'submit';
/** @var bool */
public $isConflict = false;
public $isJsSubpage = false;
/** @var bool */
- protected $isWrongCaseCssJsPage = false;
+ public $isWrongCaseCssJsPage = false;
/** @var bool New page or new section */
- protected $isNew = false;
+ public $isNew = false;
/** @var bool */
- protected $deletedSinceEdit;
+ public $deletedSinceEdit;
/** @var string */
public $formtype;
public $firsttime;
/** @var bool|stdClass */
- protected $lastDelete;
+ public $lastDelete;
- /** @var bool
- * This is public because SemanticForms uses it (bug 67522).
- * However, please consider using this property publicly
- * to be deprecated.
- * @protected
- */
+ /** @var bool */
public $mTokenOk = false;
/** @var bool */
- protected $mTokenOkExceptSuffix = false;
+ public $mTokenOkExceptSuffix = false;
/** @var bool */
- protected $mTriedSave = false;
+ public $mTriedSave = false;
/** @var bool */
- protected $incompleteForm = false;
+ public $incompleteForm = false;
/** @var bool */
- protected $tooBig = false;
+ public $tooBig = false;
/** @var bool */
- protected $kblength = false;
+ public $kblength = false;
/** @var bool */
- protected $missingComment = false;
+ public $missingComment = false;
/** @var bool */
- protected $missingSummary = false;
+ public $missingSummary = false;
/** @var bool */
- protected $allowBlankSummary = false;
+ public $allowBlankSummary = false;
/** @var bool */
protected $blankArticle = false;
protected $allowBlankArticle = false;
/** @var string */
- protected $autoSumm = '';
+ public $autoSumm = '';
/** @var string */
public $hookError = '';
/** @var ParserOutput */
- protected $mParserOutput;
+ public $mParserOutput;
/** @var bool Has a summary been preset using GET parameter &summary= ? */
- protected $hasPresetSummary = false;
+ public $hasPresetSummary = false;
/** @var bool */
- protected $mBaseRevision = false;
+ public $mBaseRevision = false;
/** @var bool */
public $mShowSummaryField = true;
public $preview = false;
/** @var bool */
- protected $diff = false;
+ public $diff = false;
/** @var bool */
public $minoredit = false;
/** @var bool */
- protected $watchthis = false;
+ public $watchthis = false;
/** @var bool */
- protected $recreate = false;
+ public $recreate = false;
/** @var string */
public $textbox1 = '';
public $summary = '';
/** @var bool */
- protected $nosummary = false;
+ public $nosummary = false;
/** @var string */
public $edittime = '';
public $sectiontitle = '';
/** @var string */
- protected $starttime = '';
+ public $starttime = '';
/** @var int */
public $oldid = 0;
/** @var string */
- protected $editintro = '';
+ public $editintro = '';
/** @var null */
public $scrolltop = null;
public $dumpUploadFileContents = false;
/** @var string */
- protected $author_list = "";
+ public $author_list = "";
const FULL = 1;
const CURRENT = 2;
const STUB = 1;
/** @var int */
- protected $buffer;
+ public $buffer;
/** @var int */
- protected $text;
+ public $text;
/** @var DumpOutput */
- protected $sink;
+ public $sink;
/**
* Returns the export schema version.
*/
class DumpNamespaceFilter extends DumpFilter {
/** @var bool */
- protected $invert = false;
+ public $invert = false;
/** @var array */
- protected $namespaces = array();
+ public $namespaces = array();
/**
* @param DumpOutput $sink
* @ingroup Dump
*/
class DumpLatestFilter extends DumpFilter {
- protected $page;
+ public $page;
- protected $pageString;
+ public $pageString;
- protected $rev;
+ public $rev;
- protected $revString;
+ public $revString;
/**
* @param object $page
*/
class FeedItem {
/** @var Title */
- protected $title;
+ public $title;
- protected $description;
+ public $description;
- protected $url;
+ public $url;
- protected $date;
+ public $date;
- protected $author;
+ public $author;
- protected $uniqueId;
+ public $uniqueId;
- protected $comments;
+ public $comments;
public $rssIsPermalink = false;
*/
class DiffHistoryBlob implements HistoryBlob {
/** @var array Uncompressed item cache */
- protected $mItems = array();
+ public $mItems = array();
/** @var int Total uncompressed size */
- protected $mSize = 0;
+ public $mSize = 0;
/**
* @var array Array of diffs. If a diff D from A to B is notated D = B - A,
* diff[i] = {
* { item[map[i]] - Z where i = 0
*/
- protected $mDiffs;
+ public $mDiffs;
/** @var array The diff map, see above */
- protected $mDiffMap;
+ public $mDiffMap;
/** @var int The key for getText()
*/
- protected $mDefaultKey;
+ public $mDefaultKey;
/** @var string Compressed storage */
public $mCompressed;
/** @var bool True if the object is locked against further writes */
- protected $mFrozen = false;
+ public $mFrozen = false;
/**
* @var int The maximum uncompressed size before the object becomes sad
/** This is a horrible hack used to keep source compatibility */
class UploadSourceAdapter {
/** @var array */
- private static $sourceRegistrations = array();
+ public static $sourceRegistrations = array();
/** @var string */
private $mSource;
*/
class WikiRevision {
/** @todo Unused? */
- private $importer = null;
+ public $importer = null;
/** @var Title */
public $title = null;
/** @var int */
- private $id = 0;
+ public $id = 0;
/** @var string */
public $timestamp = "20010115000000";
public $user_text = "";
/** @var string */
- protected $model = null;
+ public $model = null;
/** @var string */
- protected $format = null;
+ public $format = null;
/** @var string */
public $text = "";
protected $size;
/** @var Content */
- protected $content = null;
+ public $content = null;
/** @var ContentHandler */
protected $contentHandler = null;
public $comment = "";
/** @var bool */
- protected $minor = false;
+ public $minor = false;
/** @var string */
- protected $type = "";
+ public $type = "";
/** @var string */
- protected $action = "";
+ public $action = "";
/** @var string */
- protected $params = "";
+ public $params = "";
/** @var string */
- protected $fileSrc = '';
+ public $fileSrc = '';
/** @var bool|string */
- protected $sha1base36 = false;
+ public $sha1base36 = false;
/**
* @var bool
* @todo Unused?
*/
- private $isTemp = false;
+ public $isTemp = false;
/** @var string */
- protected $archiveName = '';
+ public $archiveName = '';
protected $filename;
protected $src;
/** @todo Unused? */
- private $fileIsTemp;
+ public $fileIsTemp;
/** @var bool */
private $mNoUpdates = false;
return $tooltip;
}
- private static $accesskeycache;
+ public static $accesskeycache;
/**
* Given the id of an interface element, constructs the appropriate
* @ingroup Database
*/
class LoadBalancer {
- private $mServers, $mConns, $mLoads, $mGroupLoads;
+ /** @var array Map of (server index => server config array) */
+ private $mServers;
+ /** @var array Map of (local/foreignUsed/foreignFree => server index => DatabaseBase array) */
+ private $mConns;
+ /** @var array Map of (server index => weight) */
+ private $mLoads;
+ /** @var array Map of (group => server index => weight) */
+ private $mGroupLoads;
+ /** @var bool Whether to disregard slave lag as a factor in slave selection */
+ private $mAllowLagged;
+ /** @var integer Seconds to spend waiting on slave lag to resolve */
+ private $mWaitTimeout;
+
+ /** @var array LBFactory information */
+ private $mParentInfo;
+ /** @var string The LoadMonitor subclass name */
+ private $mLoadMonitorClass;
+ /** @var LoadMonitor */
+ private $mLoadMonitor;
/** @var bool|DatabaseBase Database connection that caused a problem */
private $mErrorConnection;
- private $mReadIndex, $mAllowLagged;
-
+ /** @var integer The generic (not query grouped) slave index (of $mServers) */
+ private $mReadIndex;
/** @var bool|DBMasterPos False if not set */
private $mWaitForPos;
-
- private $mWaitTimeout;
- private $mLaggedSlaveMode, $mLastError = 'Unknown error';
- private $mParentInfo, $mLagTimes;
- private $mLoadMonitorClass, $mLoadMonitor;
+ /** @var bool Whether the generic reader fell back to a lagged slave */
+ private $mLaggedSlaveMode;
+ /** @var string The last DB selection or connection error */
+ private $mLastError = 'Unknown error';
+ /** @var array Process cache of LoadMonitor::getLagTimes() */
+ private $mLagTimes;
/**
* @param array $params Array with keys:
if ( !$id ) {
throw new MWException( __METHOD__ . ': no insert ID' );
}
- if ( $dbw->getFlag( DBO_TRX ) ) {
- $dbw->commit( __METHOD__ );
- }
return "DB://$cluster/$id";
}
wfDebug( "writable external store\n" );
}
- return $lb->getConnection( DB_SLAVE, array(), $wiki );
+ $db = $lb->getConnection( DB_SLAVE, array(), $wiki );
+ $db->clearFlag( DBO_TRX ); // sanity
+
+ return $db;
}
/**
$wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
$lb = $this->getLoadBalancer( $cluster );
- return $lb->getConnection( DB_MASTER, array(), $wiki );
+ $db = $lb->getConnection( DB_MASTER, array(), $wiki );
+ $db->clearFlag( DBO_TRX ); // sanity
+
+ return $db;
}
/**
}
}
+ /**
+ * @param string $url
+ * @return array
+ */
protected function parseURL( $url ) {
$path = explode( '/', $url );
* @var Content Content of the revision we are working on
* @since 1.21
*/
- protected $mContentObject;
+ public $mContentObject;
/** @var bool Is the content ($mContent) already loaded? */
- protected $mContentLoaded = false;
+ public $mContentLoaded = false;
/** @var int|null The oldid of the article that is to be shown, 0 for the current revision */
- protected $mOldId;
+ public $mOldId;
/** @var Title Title from which we were redirected here */
- protected $mRedirectedFrom = null;
+ public $mRedirectedFrom = null;
/** @var string|bool URL to redirect to or false if none */
- protected $mRedirectUrl = false;
+ public $mRedirectUrl = false;
/** @var int Revision ID of revision we are working on */
- protected $mRevIdFetched = 0;
+ public $mRevIdFetched = 0;
/** @var Revision Revision we are working on */
- protected $mRevision = null;
+ public $mRevision = null;
/** @var ParserOutput */
public $mParserOutput;
return $result;
}
- /**
- * Return a new SearchResult and initializes it with a row.
- *
- * @param object $row
- * @return SearchResult
- */
- public static function newFromRow( $row ) {
- $result = new self();
- $result->initFromRow( $row );
- return $result;
- }
-
- public function __construct( $row = null ) {
- if ( !is_null( $row ) ) {
- // Backwards compatibility with pre-1.17 callers
- $this->initFromRow( $row );
- }
- }
-
- /**
- * Initialize from a database row. Makes a Title and passes that to
- * initFromTitle.
- *
- * @param object $row
- */
- protected function initFromRow( $row ) {
- $this->initFromTitle( Title::makeTitle( $row->page_namespace, $row->page_title ) );
- }
-
/**
* Initialize from a Title and if possible initializes a corresponding
* Revision and File.
return false;
}
- return SearchResult::newFromRow( $row );
+ return SearchResult::newFromTitle(
+ Title::makeTitle( $row->page_namespace, $row->page_title )
+ );
}
function free() {
* @return Title|null Title or null if there is no such alias
*/
static function getTitleForAlias( $alias ) {
- $name = self::resolveAlias( $alias );
- if ( $name ) {
- return SpecialPage::getTitleFor( $name );
+ list( $name, $subpage ) = self::resolveAlias( $alias );
+ if ( $name != null ) {
+ return SpecialPage::getTitleFor( $name, $subpage );
} else {
return null;
}
+++ /dev/null
--- The Great Restructuring of October 2004
--- Creates 'page', 'revision' tables and transforms the classic
--- cur+old into a separate page+revision+text structure.
---
--- The pre-conversion 'old' table is renamed to 'text' and used
--- without internal restructuring to avoid rebuilding the entire
--- table. (This can be done separately if desired.)
---
--- The pre-conversion 'cur' table is now redundant and can be
--- discarded when done.
-
-CREATE TABLE /*$wgDBprefix*/page (
- page_id int unsigned NOT NULL auto_increment,
- page_namespace tinyint NOT NULL,
- page_title varchar(255) binary NOT NULL,
- page_restrictions tinyblob NOT NULL,
- page_counter bigint unsigned NOT NULL default '0',
- page_is_redirect tinyint unsigned NOT NULL default '0',
- page_is_new tinyint unsigned NOT NULL default '0',
- page_random real unsigned NOT NULL,
- page_touched binary(14) NOT NULL default '',
- page_latest int unsigned NOT NULL,
- page_len int unsigned NOT NULL,
-
- PRIMARY KEY page_id (page_id),
- UNIQUE INDEX name_title (page_namespace,page_title),
- INDEX (page_random),
- INDEX (page_len)
-);
-
-CREATE TABLE /*$wgDBprefix*/revision (
- rev_id int unsigned NOT NULL auto_increment,
- rev_page int unsigned NOT NULL,
- rev_comment tinyblob NOT NULL,
- rev_user int unsigned NOT NULL default '0',
- rev_user_text varchar(255) binary NOT NULL default '',
- rev_timestamp binary(14) NOT NULL default '',
- rev_minor_edit tinyint unsigned NOT NULL default '0',
- rev_deleted tinyint unsigned NOT NULL default '0',
-
- PRIMARY KEY rev_page_id (rev_page, rev_id),
- UNIQUE INDEX rev_id (rev_id),
- INDEX rev_timestamp (rev_timestamp),
- INDEX page_timestamp (rev_page,rev_timestamp),
- INDEX user_timestamp (rev_user,rev_timestamp),
- INDEX usertext_timestamp (rev_user_text,rev_timestamp)
-);
-
--- If creating new 'text' table it would look like this:
---
--- CREATE TABLE /*$wgDBprefix*/text (
--- old_id int(8) unsigned NOT NULL auto_increment,
--- old_text mediumtext NOT NULL,
--- old_flags tinyblob NOT NULL,
---
--- PRIMARY KEY old_id (old_id)
--- );
-
-
--- Lock!
-LOCK TABLES /*$wgDBprefix*/page WRITE, /*$wgDBprefix*/revision WRITE, /*$wgDBprefix*/old WRITE, /*$wgDBprefix*/cur WRITE;
-
--- Save the last old_id value for later
-SELECT (@maxold:=MAX(old_id)) FROM /*$wgDBprefix*/old;
-
--- First, copy all current entries into the old table.
-INSERT
- INTO /*$wgDBprefix*/old
- (old_namespace,
- old_title,
- old_text,
- old_comment,
- old_user,
- old_user_text,
- old_timestamp,
- old_minor_edit,
- old_flags)
- SELECT
- cur_namespace,
- cur_title,
- cur_text,
- cur_comment,
- cur_user,
- cur_user_text,
- cur_timestamp,
- cur_minor_edit,
- ''
- FROM /*$wgDBprefix*/cur;
-
--- Now, copy all old data except the text into revisions
-INSERT
- INTO /*$wgDBprefix*/revision
- (rev_id,
- rev_page,
- rev_comment,
- rev_user,
- rev_user_text,
- rev_timestamp,
- rev_minor_edit)
- SELECT
- old_id,
- cur_id,
- old_comment,
- old_user,
- old_user_text,
- old_timestamp,
- old_minor_edit
- FROM /*$wgDBprefix*/old,/*$wgDBprefix*/cur
- WHERE old_namespace=cur_namespace
- AND old_title=cur_title;
-
--- And, copy the cur data into page
-INSERT
- INTO /*$wgDBprefix*/page
- (page_id,
- page_namespace,
- page_title,
- page_restrictions,
- page_counter,
- page_is_redirect,
- page_is_new,
- page_random,
- page_touched,
- page_latest)
- SELECT
- cur_id,
- cur_namespace,
- cur_title,
- cur_restrictions,
- cur_counter,
- cur_is_redirect,
- cur_is_new,
- cur_random,
- cur_touched,
- rev_id
- FROM /*$wgDBprefix*/cur,/*$wgDBprefix*/revision
- WHERE cur_id=rev_page
- AND rev_timestamp=cur_timestamp
- AND rev_id > @maxold;
-
-UNLOCK TABLES;
-
--- Keep the old table around as the text store.
--- Its extra fields will be ignored, but trimming them is slow
--- so we won't bother doing it for now.
-ALTER TABLE /*$wgDBprefix*/old RENAME TO /*$wgDBprefix*/text;