* The "jquery.json" module has been deprecated. Use the "json" module instead.
* Removed HTMLForm::addJS(). (deprecated since 1.18)
* Removed LogEventsList::showHeader(). (deprecated since 1.19)
+* Removed ImageGalleryBase::useSkin(). (deprecated since 1.18)
+* Removed DatabaseMysqlBase::getLagFromProcesslist(). (deprecated since 1.19)
+* Removed LoadBalancer::closeConnecton(). (deprecated since 1.18)
==== Renamed classes ====
* CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
$wgDeferredUpdateList = array();
// Enable default skins.
-// This is hacky and bad, but it will go away before 1.24 release (or so I hope).
-// These lines should eventually be placed in skins' meta definition files, and loaded by a
-// require_once for each skin file generated by the installer and placed in LocalSettings.php.
+// This is hacky and bad, the require_once calls should eventually be generated by the installer
+// and placed in LocalSettings.php.
require_once "$wgStyleDirectory/MonoBook/MonoBook.php";
require_once "$wgStyleDirectory/Vector/Vector.php";
}
}
- /**
- * @deprecated since 1.19, use getLagFromSlaveStatus
- *
- * @return bool|int
- */
- function getLagFromProcesslist() {
- wfDeprecated( __METHOD__, '1.19' );
- $res = $this->query( 'SHOW PROCESSLIST', __METHOD__ );
- if ( !$res ) {
- return false;
- }
- # Find slave SQL thread
- foreach ( $res as $row ) {
- /* This should work for most situations - when default db
- * for thread is not specified, it had no events executed,
- * and therefore it doesn't know yet how lagged it is.
- *
- * Relay log I/O thread does not select databases.
- */
- if ( $row->User == 'system user' &&
- $row->State != 'Waiting for master to send event' &&
- $row->State != 'Connecting to master' &&
- $row->State != 'Queueing master event to the relay log' &&
- $row->State != 'Waiting for master update' &&
- $row->State != 'Requesting binlog dump' &&
- $row->State != 'Waiting to reconnect after a failed master event read' &&
- $row->State != 'Reconnecting after a failed master event read' &&
- $row->State != 'Registering slave on master'
- ) {
- # This is it, return the time (except -ve)
- if ( $row->Time > 0x7fffffff ) {
- return false;
- } else {
- return $row->Time;
- }
- }
- }
-
- return false;
- }
-
/**
* Wait for the slave to catch up to a given master position.
* @todo Return values for this and base class are rubbish
);
}
- /**
- * Deprecated function, typo in function name
- *
- * @deprecated since 1.18
- * @param DatabaseBase $conn
- */
- function closeConnecton( $conn ) {
- wfDeprecated( __METHOD__, '1.18' );
- $this->closeConnection( $conn );
- }
-
/**
* Close a connection
* Using this function makes sure the LoadBalancer knows the connection is closed.
public function setAdditionalOptions( $options ) {
}
- /**
- * Instruct the class to use a specific skin for rendering
- *
- * @param Skin $skin
- * @deprecated since 1.18 Not used anymore
- */
- function useSkin( $skin ) {
- wfDeprecated( __METHOD__, '1.18' );
- /* no op */
- }
-
/**
* Add an image to the gallery.
*
);
$divCssClasses = array( "mw-htmlform-field-$fieldType", $this->mClass, $errorClass );
if ( $this->mParent->isVForm() ) {
- $divCssClasses[] = 'mw-ui-vform-div';
+ $divCssClasses[] = 'mw-ui-vform-field';
}
$wrapperAttributes = array(
$this->getEntryPointInfo()
);
$out->addHtml(
+ $this->getSkinCredits() .
$this->getExtensionCredits() .
$this->getParserTags() .
$this->getParserFunctionHooks()
}
}
+ $this->firstExtOpened = false;
// Loop through the extension categories to display their extensions in the list.
foreach ( $extensionTypes as $type => $message ) {
- if ( $type != 'other' ) {
+ // Skins have a separate section
+ if ( $type !== 'other' && $type !== 'skin' ) {
$out .= $this->getExtensionCategory( $type, $message );
}
}
return $out;
}
+ /**
+ * Generate wikitext showing skins name, URL, author and description.
+ *
+ * @return string Wikitext
+ */
+ function getSkinCredits() {
+ $out = Xml::element(
+ 'h2',
+ array( 'id' => 'mw-version-skin' ),
+ $this->msg( 'version-skins' )->text()
+ ) .
+ Xml::openElement( 'table', array( 'class' => 'wikitable plainlinks', 'id' => 'sv-skin' ) );
+
+ $this->firstExtOpened = false;
+ $out .= $this->getExtensionCategory( 'skin', null );
+
+ $out .= Xml::closeElement( 'table' );
+
+ return $out;
+ }
+
/**
* Obtains a list of installed parser tags and the associated H2 header
*
}
}
- private function openExtType( $text, $name = null ) {
+ private function openExtType( $text = null, $name = null ) {
$out = '';
$opt = array( 'colspan' => 5 );
$opt['id'] = "sv-$name";
}
- $out .= Html::rawElement( 'tr', array(),
- Html::element( 'th', $opt, $text )
- );
+ if ( $text !== null ) {
+ $out .= Html::rawElement( 'tr', array(),
+ Html::element( 'th', $opt, $text )
+ );
+ }
+ $firstHeadingMsg = ( $name === 'credits-skin' )
+ ? 'version-skin-colheader-name'
+ : 'version-ext-colheader-name';
$out .= Html::openElement( 'tr' );
$out .= Html::element( 'th', array( 'class' => 'mw-version-ext-col-label' ),
- $this->msg( 'version-ext-colheader-name' )->text() );
+ $this->msg( $firstHeadingMsg )->text() );
$out .= Html::element( 'th', array( 'class' => 'mw-version-ext-col-label' ),
$this->msg( 'version-ext-colheader-version' )->text() );
$out .= Html::element( 'th', array( 'class' => 'mw-version-ext-col-label' ),
<?php } ?>
</div>
- <div>
+ <div class="mw-ui-vform-field">
<label for='wpName2'>
<?php $this->msg( 'userlogin-yourname' ); ?>
?>
</div>
- <div>
+ <div class="mw-ui-vform-field">
<?php if ( $this->data['createemail'] ) { ?>
<label class="mw-ui-checkbox-label">
<input name="wpCreateaccountMail" type="checkbox" value="1" id="wpCreateaccountMail" tabindex="2"
<?php } ?>
</div>
- <div class="mw-row-password">
+ <div class="mw-ui-vform-field mw-row-password">
<label for='wpPassword2'><?php $this->msg( 'userlogin-yourpassword' ); ?></label>
<?php
echo Html::input( 'wpPassword', null, 'password', array(
$select->addOption( $dom );
}
?>
- <div id="mw-user-domain-section">
+ <div class="mw-ui-vform-field" id="mw-user-domain-section">
<label for="wpDomain"><?php $this->msg( 'yourdomainname' ); ?></label>
<div class="mw-input">
<?php echo $select->getHTML(); ?>
</div>
<?php } ?>
- <div class="mw-row-password">
+ <div class="mw-ui-vform-field mw-row-password">
<label for='wpRetype'><?php $this->msg( 'createacct-yourpasswordagain' ); ?></label>
<?php
echo Html::input( 'wpRetype', null, 'password', array(
?>
</div>
- <div>
+ <div class="mw-ui-vform-field">
<?php if ( $this->data['useemail'] ) { ?>
<label for='wpEmail'>
<?php
</div>
<?php if ( $this->data['userealname'] ) { ?>
- <div>
+ <div class="mw-ui-vform-field">
<label for='wpRealName'><?php $this->msg( 'createacct-realname' ); ?></label>
<input type='text' class='mw-input loginText' name="wpRealName" id="wpRealName"
tabindex="7"
<?php } ?>
<?php if ( $this->data['usereason'] ) { ?>
- <div>
+ <div class="mw-ui-vform-field">
<label for='wpReason'><?php $this->msg( 'createacct-reason' ); ?></label>
<?php echo Html::input( 'wpReason', $this->data['reason'], 'text', array(
'class' => 'mw-input loginText',
$tabIndex = 9;
if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) {
foreach ( $this->data['extraInput'] as $inputItem ) { ?>
- <div>
+ <div class="mw-ui-vform-field">
<?php
// If it's a checkbox, output the whole thing (assume it has a msg).
if ( $inputItem['type'] == 'checkbox' ) {
// so skip one index.
$tabIndex++;
?>
- <div class="mw-submit">
+ <div class="mw-ui-vform-field mw-submit">
<?php
echo Html::input(
'wpCreateaccount',
</div>
<?php } ?>
- <div>
+ <div class="mw-ui-vform-field">
<label for='wpName1'>
<?php
$this->msg( 'userlogin-yourname' );
?>
</div>
- <div>
+ <div class="mw-ui-vform-field">
<label for='wpPassword1'>
<?php
$this->msg( 'userlogin-yourpassword' );
$select->addOption( $dom );
}
?>
- <div id="mw-user-domain-section">
+ <div class="mw-ui-vform-field" id="mw-user-domain-section">
<label for='wpDomain'><?php $this->msg( 'yourdomainname' ); ?></label>
<?php echo $select->getHTML(); ?>
</div>
}
?>
- <div>
+ <div class="mw-ui-vform-field">
<?php if ( $this->data['canremember'] ) { ?>
<label class="mw-ui-checkbox-label">
<input name="wpRemember" type="checkbox" value="1" id="wpRemember" tabindex="4"
<?php } ?>
</div>
- <div>
+ <div class="mw-ui-vform-field">
<?php
echo Html::input( 'wpLoginAttempt', $this->getMsg( 'pt-login-button' )->text(), 'submit', array(
'id' => 'wpLoginAttempt',
) );
?>
</div>
- <div id="mw-userlogin-help">
+
+ <div class="mw-ui-vform-field" id="mw-userlogin-help">
<?php
echo Html::element(
'a',
);
?>
</div>
+
<?php if ( $this->haveData( 'createOrLoginHref' ) ) { ?>
<?php if ( $this->data['loggedin'] ) { ?>
<div id="mw-createaccount-another">
"version": "Version",
"version-summary": "",
"version-extensions": "Installed extensions",
+ "version-skins": "Installed skins",
"version-specialpages": "Special pages",
"version-parserhooks": "Parser hooks",
"version-variables": "Variables",
"version-antispam": "Spam prevention",
- "version-skins": "Skins",
"version-api": "API",
"version-other": "Other",
"version-mediahandlers": "Media handlers",
"version-license": "MediaWiki License",
"version-ext-license": "License",
"version-ext-colheader-name": "Extension",
+ "version-skin-colheader-name": "Skin",
"version-ext-colheader-version": "Version",
"version-ext-colheader-license": "License",
"version-ext-colheader-description": "Description",
"version": "{{doc-special|Version}}\n{{Identical|Version}}",
"version-summary": "{{doc-specialpagesummary|version}}",
"version-extensions": "Header on [[Special:Version]].",
+ "version-skins": "Header on [[Special:Version]].",
"version-specialpages": "Part of [[Special:Version]].\n{{Identical|Special page}}",
"version-parserhooks": "This message is a heading at [[Special:Version]] for extensions that modifies the parser of wikitext.",
"version-variables": "{{Identical|Variable}}",
"version-antispam": "Part of [[Special:Version]].\nThis message is followed by the list of SPAM prevention extensions.",
- "version-skins": "{{Identical|Skin}}",
"version-api": "{{optional}}",
"version-other": "{{Identical|Other}}",
"version-mediahandlers": "Used in [[Special:Version]]. It is the title of a section for media handler extensions (e.g. [[mw:Extension:OggHandler]]).\nThere are no such extensions here, so look at [[wikipedia:Special:Version]] for an example.",
"version-license": "Used specifically for the MediaWiki software.\n\nUsed as heading in [[Special:Version]].",
"version-ext-license": "Used in [[Special:Version]].\n\nUsed as label for the link pointing to the extension's license page. e.g. [[Special:Version/License/Maps]]\n{{Identical|License}}",
"version-ext-colheader-name": "Column header for the name of an extension.\n{{Identical|Extension}}",
+ "version-skin-colheader-name": "Column header for the name of a skin.\n{{Identical|Skin}}",
"version-ext-colheader-version": "Column header for describing an extensions version.\n{{Identical|Version}}",
"version-ext-colheader-license": "Column header for describing an extensions license.\n{{Identical|License}}",
"version-ext-colheader-description": "Column header for the description of an extension.\n{{Identical|Description}}",
//
// Markup:
// <form class="mw-ui-vform">
-// <div class="mw-ui-vform-div">This is a form example.</div>
-// <div class="mw-ui-vform-div">
+// <div class="mw-ui-vform-field">This is a form example.</div>
+// <div class="mw-ui-vform-field">
// <label>Username </label>
// <input value="input">
// </div>
-// <div>
+// <div class="mw-ui-vform-field">
// <button class="mw-ui-button mw-ui-constructive">Button in vform</button>
// </div>
// </form>
width: @defaultFormWidth;
- // Immediate divs in a vform are block and spaced-out.
- // XXX: We shouldn't depend on the tag name here...
- & > div {
- display: block;
- margin: 0 0 15px 0;
- padding: 0;
- width: 100%;
- }
-
// MW currently doesn't use the type attribute everywhere on inputs.
input,
select,
// <div class="error">
// <ul><li>There are problems with some of your input.</li></ul>
// </div>
- // <div class="mw-ui-vform-div">
+ // <div class="mw-ui-vform-field">
// <input type="text" value="input" class="mw-ui-input">
// </div>
- // <div class="mw-ui-vform-div">
+ // <div class="mw-ui-vform-field">
// <select>
// <option value="1">Option 1</option>
// <option value="2">Option 2</option>
// </select>
// <span class="error">The value you specified is not a valid option.</span>
// </div>
- // <div>
+ // <div class="mw-ui-vform-field">
// <button class="mw-ui-button">Button in vform</button>
// </div>
// </form>
// This specifies styling for individual field validation error messages.
// Show them below the fields to prevent line break glitches, and leave
// some space between the field and the error message box.
- .mw-ui-vform-div .error {
+ .mw-ui-vform-div .error, /* for backwards-compatibility, remove before 1.24 */
+ .mw-ui-vform-field .error {
display: block;
margin-top: 5px;
}
// Elements
// --------------------------------------------------------------------------
-// Apply this to individual elements to style them.
-// You generally don't need to use this class on divs within an Agora
-// form container such as mw-ui-vform
-// XXX DRY: This repeats earlier styling, use an @include agora-div-styling ?
-// XXX: What is this even for?
-.mw-ui-vform-div {
+// A wrapper for a single form field: the <input> / <select> / <button> element,
+// help text, labels, associated error/warning/success messages, and so on.
+// Elements with this class are generated by HTMLFormField in core MediaWiki.
+//
+// (We use a broad definition of 'field' here: a purely textual information
+// block is also a "field".)
+.mw-ui-vform-div, /* for backwards-compatibility, remove before 1.24 */
+.mw-ui-vform-field {
display: block;
margin: 0 0 15px;
padding: 0;