Merge "Remove Media namespace from the list of RCFilters"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 1 Nov 2017 15:58:01 +0000 (15:58 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 1 Nov 2017 15:58:01 +0000 (15:58 +0000)
includes/Revision.php
includes/changes/RecentChange.php
includes/filerepo/file/LocalFile.php
includes/filerepo/file/OldLocalFile.php
includes/page/WikiPage.php
includes/user/User.php
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js

index f9810a0..518360c 100644 (file)
@@ -426,6 +426,7 @@ class Revision implements IDBAccessObject {
         * @return array
         */
        public static function userJoinCond() {
+               wfDeprecated( __METHOD__, '1.31' );
                return [ 'LEFT JOIN', [ 'rev_user != 0', 'user_id = rev_user' ] ];
        }
 
@@ -437,6 +438,7 @@ class Revision implements IDBAccessObject {
         * @return array
         */
        public static function pageJoinCond() {
+               wfDeprecated( __METHOD__, '1.31' );
                return [ 'INNER JOIN', [ 'page_id = rev_page' ] ];
        }
 
@@ -449,6 +451,8 @@ class Revision implements IDBAccessObject {
        public static function selectFields() {
                global $wgContentHandlerUseDB;
 
+               wfDeprecated( __METHOD__, '1.31' );
+
                $fields = [
                        'rev_id',
                        'rev_page',
@@ -481,6 +485,9 @@ class Revision implements IDBAccessObject {
         */
        public static function selectArchiveFields() {
                global $wgContentHandlerUseDB;
+
+               wfDeprecated( __METHOD__, '1.31' );
+
                $fields = [
                        'ar_id',
                        'ar_page_id',
@@ -513,6 +520,7 @@ class Revision implements IDBAccessObject {
         * @return array
         */
        public static function selectTextFields() {
+               wfDeprecated( __METHOD__, '1.31' );
                return [
                        'old_text',
                        'old_flags'
@@ -525,6 +533,7 @@ class Revision implements IDBAccessObject {
         * @return array
         */
        public static function selectPageFields() {
+               wfDeprecated( __METHOD__, '1.31' );
                return [
                        'page_namespace',
                        'page_title',
@@ -541,6 +550,7 @@ class Revision implements IDBAccessObject {
         * @return array
         */
        public static function selectUserFields() {
+               wfDeprecated( __METHOD__, '1.31' );
                return [ 'user_name' ];
        }
 
index bb24120..a471865 100644 (file)
@@ -210,6 +210,7 @@ class RecentChange {
         * @return array
         */
        public static function selectFields() {
+               wfDeprecated( __METHOD__, '1.31' );
                return [
                        'rc_id',
                        'rc_timestamp',
index 0b730f6..44c90af 100644 (file)
@@ -200,6 +200,7 @@ class LocalFile extends File {
         * @return array
         */
        static function selectFields() {
+               wfDeprecated( __METHOD__, '1.31' );
                return [
                        'img_name',
                        'img_size',
index 6833a38..69e6896 100644 (file)
@@ -110,6 +110,7 @@ class OldLocalFile extends LocalFile {
         * @return array
         */
        static function selectFields() {
+               wfDeprecated( __METHOD__, '1.31' );
                return [
                        'oi_name',
                        'oi_archive_name',
index 946c7f0..1047a93 100644 (file)
@@ -286,6 +286,8 @@ class WikiPage implements Page, IDBAccessObject {
        public static function selectFields() {
                global $wgContentHandlerUseDB, $wgPageLanguageUseDB;
 
+               wfDeprecated( __METHOD__, '1.31' );
+
                $fields = [
                        'page_id',
                        'page_namespace',
index d397962..854ebbd 100644 (file)
@@ -5508,6 +5508,7 @@ class User implements IDBAccessObject {
         * @return array
         */
        public static function selectFields() {
+               wfDeprecated( __METHOD__, '1.31' );
                return [
                        'user_id',
                        'user_name',
index d940321..2b5d020 100644 (file)
         * Get a prefixed label
         *
         * @param {boolean} inverted This item should be considered inverted
-        * @return {string} Prefixed label
+        * @return {string} Prefixed label (HTML)
         */
        mw.rcfilters.dm.ItemModel.prototype.getPrefixedLabel = function ( inverted ) {
+               var escapedLabel = mw.html.escape( this.getLabel() );
                if ( this.labelPrefixKey ) {
                        if ( typeof this.labelPrefixKey === 'string' ) {
-                               return mw.message( this.labelPrefixKey, this.getLabel() ).parse();
+                               return mw.message( this.labelPrefixKey, escapedLabel ).parse();
                        } else {
                                return mw.message(
                                        this.labelPrefixKey[
                                                inverted && this.isSelected() ?
                                                        'inverted' : 'default'
                                        ],
-                                       this.getLabel()
+                                       escapedLabel
                                ).parse();
                        }
                } else {
-                       return this.getLabel();
+                       return escapedLabel;
                }
        };