* (bug 39284) jquery.tablesorter should not consider "."" or "?"" to be a currency.
* (bug 39273) "Show changes" should not be incorrectly displayed in the Live Preview state.
* Made body-content lang attribute honor the variant language when it is set.
+* (bug 36761) "Mark pages as visited" now submits previously established filter options.
+* (bug 39635) PostgreSQL LOCK IN SHARE MODE option is a syntax error.
+* (bug 36329) Accesskey tooltips for Firefox 14 on Mac should use "ctrl-option-" prefix.
=== API changes in 1.20 ===
* (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
* (bug 34927) Output media_type for list=filearchive.
* (bug 28814) add properties to output of action=parse.
* (bug 33224) add variants of content language to meta=siteinfo.
-* (bug 36761) "Mark pages as visited" now submits previously established filter options.
* (bug 32643) action=purge with forcelinkupdate no longer crashes when ratelimit is reached.
* The paraminfo module now also contains result properties for most modules.
* (bug 32348) Allow descending order for list=alllinks.
* (bug 38904) prop=revisions&rvstart=... no longer blows up when continuing.
* (bug 39032) ApiQuery generates help in constructor.
* (bug 11142) Improve file extension blacklist error reporting in API upload.
-* (bug 39635) PostgreSQL LOCK IN SHARE MODE option is a syntax error.
-* (bug 36329) Accesskey tooltips for Firefox 14 on Mac should use "ctrl-option-" prefix.
+* (bug 39665) Cache AllowedGenerator array so it doesn't autoload all query classes
+ on every request.
=== Languages updated in 1.20 ===
* @return String: valid dotted quad IPv4 address or null
*/
public static function canonicalize( $addr ) {
+ $addr = preg_replace( '/\%.*/','', $addr ); // remove zone info (bug 35738)
if ( self::isValid( $addr ) ) {
return $addr;
}
}
// Move the page
+ $toTitleExists = $toTitle->exists();
$retval = $fromTitle->moveTo( $toTitle, true, $params['reason'], !$params['noredirect'] );
if ( $retval !== true ) {
$this->dieUsageMsg( reset( $retval ) );
if ( !$params['noredirect'] || !$user->isAllowed( 'suppressredirect' ) ) {
$r['redirectcreated'] = '';
}
+ if( $toTitleExists ) {
+ $r['moveoverredirect'] = '';
+ }
// Move the talk page
if ( $params['movetalk'] && $fromTalk->exists() && !$fromTitle->isTalkPage() ) {
+ $toTalkExists = $toTalk->exists();
$retval = $fromTalk->moveTo( $toTalk, true, $params['reason'], !$params['noredirect'] );
if ( $retval === true ) {
$r['talkfrom'] = $fromTalk->getPrefixedText();
$r['talkto'] = $toTalk->getPrefixedText();
+ if( $toTalkExists ) {
+ $r['talkmoveoverredirect'] = '';
+ }
} else {
// We're not gonna dieUsage() on failure, since we already changed something
$parsed = $this->parseMsg( reset( $retval ) );
'to' => 'string',
'reason' => 'string',
'redirectcreated' => 'boolean',
+ 'moveoverredirect' => 'boolean',
'talkfrom' => array(
ApiBase::PROP_TYPE => 'string',
ApiBase::PROP_NULLABLE => true
ApiBase::PROP_TYPE => 'string',
ApiBase::PROP_NULLABLE => true
),
+ 'talkmoveoverredirect' => 'boolean',
'talkmove-error-code' => array(
ApiBase::PROP_TYPE => 'string',
ApiBase::PROP_NULLABLE => true
parent::__construct( $main, $action );
// Allow custom modules to be added in LocalSettings.php
- global $wgAPIPropModules, $wgAPIListModules, $wgAPIMetaModules;
+ global $wgAPIPropModules, $wgAPIListModules, $wgAPIMetaModules,
+ $wgMemc, $wgAPICacheHelpTimeout;
self::appendUserModules( $this->mQueryPropModules, $wgAPIPropModules );
self::appendUserModules( $this->mQueryListModules, $wgAPIListModules );
self::appendUserModules( $this->mQueryMetaModules, $wgAPIMetaModules );
$this->mListModuleNames = array_keys( $this->mQueryListModules );
$this->mMetaModuleNames = array_keys( $this->mQueryMetaModules );
+ // Get array of query generators from cache if present
+ $key = wfMemcKey( 'apiquerygenerators', SpecialVersion::getVersion( 'nodb' ) );
+
+ if ( $wgAPICacheHelpTimeout > 0 ) {
+ $cached = $wgMemc->get( $key );
+ if ( $cached ) {
+ $this->mAllowedGenerators = $cached;
+ return;
+ }
+ }
$this->makeGeneratorList( $this->mQueryPropModules );
$this->makeGeneratorList( $this->mQueryListModules );
+
+ if ( $wgAPICacheHelpTimeout > 0 ) {
+ $wgMemc->set( $key, $this->mAllowedGenerators, $wgAPICacheHelpTimeout );
+ }
}
/**
/**
* List log type for which the target is a user
* Thus if the given target is in NS_MAIN we can alter it to be an NS_USER
- * Title user instead.
+ * Title user instead.
*/
private $typeOnUser = array(
'block',
public function execute( $par ) {
global $wgLogRestrictions;
-
+
$this->setHeaders();
$this->outputHeader();
// Set values
$opts->fetchValuesFromRequest( $this->getRequest() );
- if ( $par ) {
+ if ( $par !== null ) {
$this->parseParams( $opts, (string)$par );
}