Merge "Fix: numFields wrong for sqlite"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 21 May 2014 17:49:27 +0000 (17:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 21 May 2014 17:49:27 +0000 (17:49 +0000)
RELEASE-NOTES-1.23
RELEASE-NOTES-1.24
includes/changes/EnhancedChangesList.php
resources/src/mediawiki/mediawiki.searchSuggest.js
resources/src/mediawiki/mediawiki.user.js
tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js

index d010358..baf69c5 100644 (file)
@@ -9,9 +9,9 @@ MediaWiki 1.23 is an alpha-quality branch and is not recommended for use in
 production.
 
 === Configuration changes in 1.23 ===
-* Introduced $wgPagePropsHaveSortkey as a backwards-compatibility switch,
-  for using the old schema of the page_props table, in case the respective
-  schema update was not applied.
+* (bug 13250) Restored method for clearing a watchlist in web UI
+  so that users with large watchlists don't have to perform
+  contortions to clear them.
 * When $wgJobRunRate is higher that zero, jobs are now executed via an
   asynchronous HTTP request to a MediaWiki entry point. This may require
   increasing the number of server worker threads. $wgRunJobsAsync has been
@@ -110,9 +110,6 @@ production.
   'user' or 'bot'. The API will throw an error if the user is not logged
   in (user) or does not have the 'bot' userright (bot). Based off of the
   AssertEdit extension by Steve Sanbeg.
-* WikitextContent will now render redirects with the expected "redirect"
-  header, rather than as an ordered list. Code calling Article::viewRedirect
-  can probably be changed to no longer special-case redirects.
 * [[Special:Diff]] was added, allowing users to create internal links to
   revision comparison pages using syntax such as [[Special:Diff/12345]],
   [[Special:Diff/12345/prev]] or [[Special:Diff/12345/98765]].
@@ -147,7 +144,7 @@ production.
 * Added BaseTemplateAfterPortlet hook to allow injecting html after portlets in skins.
 * Support has been added for a JSON based localisation file format. The
   installer has been updated to use it.
-* Changes to content typography (fonts, line-height, etc.). See
+* Changes to content typography (colors, line-height etc.). See
   https://www.mediawiki.org/wiki/Typography_refresh for further information.
 * The Vector skin's visual treatment of external links has been simplified to a
   single icon (from nine). This should not affect local rules unless they were
@@ -190,8 +187,6 @@ production.
   the JavaScript evaluator were updated to support the new format. Plural rules
   for some languages have changed, most notably Russian. Affected software
   messages have been updated and marked for review at translatewiki.net.
-* (bug 14323) Redirect pages, when viewed with redirect=no, no longer hide the
-  remaining page content.
 * (bug 23542) imagelinks now stores both the redirect and target (as
   templatelinks does).
 * (bug 58167) The web installer no longer throws an exception when PHP is
@@ -210,6 +205,7 @@ production.
   warnings to be printed on Windows due to large path length.
 * (bug 48084) Fixed a bug in the installer that could cause $wgLogo to hold
   the wrong path to the placeholder logo (skins/common/images/wiki.png).
+* (bug 64289) jquery.textSelection: Don't throw errors on empty collections.
 
 === Web API changes in 1.23 ===
 * (bug 54884) action=parse&prop=categories now indicates hidden and missing
@@ -278,9 +274,6 @@ changes to languages because of Bugzilla reports.
 * Support was added for Northern Luri (lrc).
 
 === Other changes in 1.23 ===
-* Added pp_sortkey column to page_props table, so pages can be efficiently
-  queried and sorted by property value (bug 58032).
-  See $wgPagePropsHaveSortkey if you want to postpone the schema change.
 * The rc_type field in the recentchanges table has been superseded by a new
   rc_source field.  The rc_source field is a string representation of the
   change type where rc_type was a numeric constant.  This field is not yet
index 72a9982..439420b 100644 (file)
@@ -11,6 +11,9 @@ production.
 === Configuration changes in 1.24 ===
 * The server's canonical hostname is available as $wgServerName, which is
   exposed in both mw.config and ApiQuerySiteInfo.
+* Introduced $wgPagePropsHaveSortkey as a backwards-compatibility switch,
+  for using the old schema of the page_props table, in case the respective
+  schema update was not applied.
 
 === New features in 1.24 ===
 * Added a new hook, "WhatLinksHereProps", to allow extensions to annotate
@@ -30,6 +33,11 @@ production.
   jQuery.cookie so that getting/setting a cookie is syntactically and functionally
   similar to using the WebRequest#getCookie/WebResponse#setcookie methods.
 * (bug 44740) jQuery upgraded from 1.8.3 to 1.11.1.
+* Changes to content typography (fonts, etc.). See
+  https://www.mediawiki.org/wiki/Typography_refresh for further information.
+* WikitextContent will now render redirects with the expected "redirect"
+  header, rather than as an ordered list. Code calling Article::viewRedirect
+  can probably be changed to no longer special-case redirects.
 
 === Bug fixes in 1.24 ===
 * (bug 49116) Footer copyright notice is now always displayed in user language
@@ -44,6 +52,8 @@ production.
 * (bug 890) Links in Special:RecentChanges and Special:Watchlist no longer
   follow redirects to their target pages.
 * Parser now dies early if called recursively, instead of producing subtle bugs.
+* (bug 14323) Redirect pages, when viewed with redirect=no, no longer hide the
+  remaining page content.
 
 === Web API changes in 1.24 ===
 * action=parse API now supports prop=modules, which provides the list of
@@ -68,6 +78,9 @@ changes to languages because of Bugzilla reports.
 * mediawiki.util.$content no longer supports old versions of the Vector,
   Monobook, Modern and CologneBlue skins that don't yet implement the "mw-body"
   and/or "mw-body-primary" class name in their html.
+* Added pp_sortkey column to page_props table, so pages can be efficiently
+  queried and sorted by property value (bug 58032).
+  See $wgPagePropsHaveSortkey if you want to postpone the schema change.
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
index 6c42601..7307c69 100644 (file)
@@ -90,7 +90,6 @@ class EnhancedChangesList extends ChangesList {
        public function recentChangesLine( &$baseRC, $watched = false ) {
                wfProfileIn( __METHOD__ );
 
-               # If it's a new day, add the headline and flush the cache
                $date = $this->getLanguage()->userDate(
                        $baseRC->mAttribs['rc_timestamp'],
                        $this->getUser()
@@ -98,6 +97,7 @@ class EnhancedChangesList extends ChangesList {
 
                $ret = '';
 
+               # If it's a new day, add the headline and flush the cache
                if ( $date != $this->lastdate ) {
                        # Process current cache
                        $ret = $this->recentChangesBlock();
@@ -121,28 +121,41 @@ class EnhancedChangesList extends ChangesList {
         * @param RCCacheEntry $cacheEntry
         */
        protected function addCacheEntry( RCCacheEntry $cacheEntry ) {
+               $cacheGroupingKey = $this->makeCacheGroupingKey( $cacheEntry );
+
+               if ( !isset( $this->rc_cache[$cacheGroupingKey] ) ) {
+                       $this->rc_cache[$cacheGroupingKey] = array();
+               }
+
+               array_push( $this->rc_cache[$cacheGroupingKey], $cacheEntry );
+       }
+
+       /**
+        * @todo use rc_source to group, if set; fallback to rc_type
+        *
+        * @param RCCacheEntry $cacheEntry
+        *
+        * @return string
+        */
+       protected function makeCacheGroupingKey( RCCacheEntry $cacheEntry ) {
                $title = $cacheEntry->getTitle();
-               $secureName = $title->getPrefixedDBkey();
+               $cacheGroupingKey = $title->getPrefixedDBkey();
 
                $type = $cacheEntry->mAttribs['rc_type'];
 
+               // @todo remove handling for RC_MOVE and RC_MOVE_OVER_REDIRECT (bug 63755)
                if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
-                       # Use an @ character to prevent collision with page names
-                       $this->rc_cache['@@' . ( $this->rcMoveIndex++ )] = array( $cacheEntry );
-               } else {
-                       # Logs are grouped by type
-                       if ( $type == RC_LOG ) {
-                               $secureName = SpecialPage::getTitleFor(
-                                       'Log',
-                                       $cacheEntry->mAttribs['rc_log_type']
-                               )->getPrefixedDBkey();
-                       }
-                       if ( !isset( $this->rc_cache[$secureName] ) ) {
-                               $this->rc_cache[$secureName] = array();
-                       }
-
-                       array_push( $this->rc_cache[$secureName], $cacheEntry );
+                       // Use an # character to prevent collision with page names
+                       $cacheGroupingKey = '##' . ( $this->rcMoveIndex++ );
+               } elseif ( $type == RC_LOG ) {
+                       // Group by log type
+                       $cacheGroupingKey = SpecialPage::getTitleFor(
+                               'Log',
+                               $cacheEntry->mAttribs['rc_log_type']
+                       )->getPrefixedDBkey();
                }
+
+               return $cacheGroupingKey;
        }
 
        /**
index cbdf666..c2c70b0 100644 (file)
@@ -3,7 +3,7 @@
  */
 ( function ( mw, $ ) {
        $( function () {
-               var map, resultRenderCache, searchboxesSelectors,
+               var api, map, resultRenderCache, searchboxesSelectors,
                        // Region where the suggestions box will appear directly below
                        // (using the same width). Can be a container element or the input
                        // itself, depending on what suits best in the environment.
                $( searchboxesSelectors.join( ', ' ) )
                        .suggestions( {
                                fetch: function ( query ) {
-                                       var $el;
-
-                                       if ( query.length !== 0 ) {
-                                               $el = $( this );
-                                               $el.data( 'request', ( new mw.Api() ).get( {
-                                                       action: 'opensearch',
-                                                       search: query,
-                                                       namespace: 0,
-                                                       suggest: ''
-                                               } ).done( function ( data ) {
-                                                       $el.suggestions( 'suggestions', data[1] );
-                                               } ) );
-                                       }
+                                       var $textbox = this,
+                                               node = this[0];
+
+                                       api = api || new mw.Api();
+
+                                       $.data( node, 'request', api.get( {
+                                               action: 'opensearch',
+                                               search: query,
+                                               namespace: 0,
+                                               suggest: ''
+                                       } ).done( function ( data ) {
+                                               $textbox.suggestions( 'suggestions', data[1] );
+                                       } ) );
                                },
                                cancel: function () {
-                                       var apiPromise = $( this ).data( 'request' );
-                                       // If the delay setting has caused the fetch to have not even happened
-                                       // yet, the apiPromise object will have never been set.
-                                       if ( apiPromise && $.isFunction( apiPromise.abort ) ) {
-                                               apiPromise.abort();
-                                               $( this ).removeData( 'request' );
+                                       var node = this[0],
+                                               request = $.data( node, 'request' );
+
+                                       if ( request ) {
+                                               request.abort();
+                                               $.removeData( node, 'request' );
                                        }
                                },
                                result: {
                                        render: renderFunction,
                                        select: function () {
-                                               return true; // allow the form to be submitted
+                                               // allow the form to be submitted
+                                               return true;
                                        }
                                },
                                delay: 120,
index fd9690b..c5694b7 100644 (file)
         * @inheritdoc #getName
         * @deprecated since 1.20 Use #getName instead
         */
-       mw.log.deprecate( user, 'name', user.getName );
+       mw.log.deprecate( user, 'name', user.getName, 'Use mw.user.getName instead.' );
 
        /**
         * @method anonymous
         * @inheritdoc #isAnon
         * @deprecated since 1.20 Use #isAnon instead
         */
-       mw.log.deprecate( user, 'anonymous', user.isAnon );
+       mw.log.deprecate( user, 'anonymous', user.isAnon, 'Use mw.user.isAnon instead.' );
 
 }( mediaWiki, jQuery ) );
index 3f856b9..e43516b 100644 (file)
@@ -1,5 +1,10 @@
 ( function ( mw, $ ) {
-       QUnit.module( 'mediawiki.toc', QUnit.newMwEnvironment() );
+       QUnit.module( 'mediawiki.toc', QUnit.newMwEnvironment( {
+               setup: function () {
+                       // Prevent live cookies like mw_hidetoc=1 from interferring with the test
+                       this.stub( $, 'cookie' ).returns( null );
+               }
+       } ) );
 
        QUnit.asyncTest( 'toggleToc', 4, function ( assert ) {
                var tocHtml, $toggleLink, $tocList;