reverted r108850 as patch should be introduced after code freeze
authorRob Moen <rmoen@users.mediawiki.org>
Fri, 13 Jan 2012 21:57:52 +0000 (21:57 +0000)
committerRob Moen <rmoen@users.mediawiki.org>
Fri, 13 Jan 2012 21:57:52 +0000 (21:57 +0000)
RELEASE-NOTES-1.19
includes/ChangeTags.php
includes/actions/HistoryAction.php
includes/specials/SpecialContributions.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialRecentchanges.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php

index 66e854f..4b005bd 100644 (file)
@@ -119,7 +119,6 @@ production.
 * mediawiki.js Message object constructor is now publicly available as mw.Message.
 * (bug 29309) allow CSS class per tooltip (tipsy)
 * (bug 33565) Add accesskey/tooltip to submit buttons on Special:EditWatchlist.
-* (bug 25909) Add a drop-down list for the tags in Recentchanges and Newpages
 
 === Bug fixes in 1.19 ===
 * $wgUploadNavigationUrl should be used for file redlinks if.
index 97d12a4..c8e522d 100644 (file)
@@ -26,7 +26,7 @@ class ChangeTags {
 
        static function tagDescription( $tag ) {
                $msg = wfMessage( "tag-$tag" );
-               return $msg->exists() ? $msg->parse() : htmlspecialchars( $tag );
+               return $msg->exists() ? $msg->parse() : htmlspecialchars( $tag ); 
        }
 
        ## Basic utility method to add tags to a particular change, given its rc_id, rev_id and/or log_id.
@@ -109,10 +109,7 @@ class ChangeTags {
                global $wgRequest, $wgUseTagFilter;
 
                if( $filter_tag === false ) {
-                       $filter_tag = $wgRequest->getVal( 'tagfilterdropdown', '' );
-                       if ( $filter_tag === '' || $filter_tag === 'other' ) {
-                               $filter_tag = $wgRequest->getVal( 'tagfilter' );
-                       }
+                       $filter_tag = $wgRequest->getVal( 'tagfilter' );
                }
 
                // Figure out which conditions can be done.
@@ -180,45 +177,6 @@ class ChangeTags {
                return $html;
        }
 
-       /**
-        * Build a text box and a dropdown list to select a change tag
-        *
-        * @param $msgkey String: message key for the message where a (newline delimited)
-        *        list of tags can be specified. These tags will be put in the dropdown list.
-        *        If the specified message is empty, only the text field will be returned.
-        * @param $selectedtxt String: tag to put in text box
-        * @param $selecteddropdown String: tag to select in dropdown
-        * @return Array of html fragments of which the first element is the label
-        *         If $wgUseTagFilter is false or there are no defined tags, an empty array is returned
-        */
-       public static function buildTagFilterWithDropdown( $msgkey, $selectedtxt = '', $selecteddropdown = 'other' ) {
-
-               global $wgUseTagFilter;
-
-               $definedtags = self::listDefinedTags();
-
-               if ( !$wgUseTagFilter || !count( $definedtags ) ) {
-                       // no tag filter if there are no tags defined or $wgUseTagFilter is false
-                       return array();
-               }
-
-               // Extract tags from message: one tag per line
-               $tags = preg_split( "/\n/", wfMsgForContent( $msgkey ), -1, PREG_SPLIT_NO_EMPTY);
-
-               $data[] = Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMsgExt( 'tag-filter', 'parseinline' ) );
-
-               if ( count( $tags ) ) {
-                       // Add dropdown list only when message $msgkey contains at least one tag
-                       $data[] = Xml::listDropDown( 'tagfilterdropdown', implode( "\n", $tags ),
-                               wfMsgForContent( 'tag-filter-dropdown-other' ), $selecteddropdown );
-               }
-
-               $data[] = Xml::input( 'tagfilter', 20, $selectedtxt );
-
-               return  $data;
-
-       }
-
        /**
         *Basically lists defined tags which count even if they aren't applied to anything
         *
index 29b4eb9..c463eed 100644 (file)
@@ -136,13 +136,7 @@ class HistoryAction extends FormlessAction {
                $year        = $request->getInt( 'year' );
                $month       = $request->getInt( 'month' );
                $tagFilter   = $request->getVal( 'tagfilter' );
-               $tagFilterDropdown = $request->getVal( 'tagfilterdropdown' );
-               $tagSelector = ChangeTags::buildTagFilterWithDropdown(
-                       'tag-filter-dropdown-list',
-                       $tagFilter,
-                       $tagFilterDropdown
-               );
-               $tagSelector = implode( '&#160;', $tagSelector );
+               $tagSelector = ChangeTags::buildTagFilterSelector( $tagFilter );
 
                /**
                 * Option to show only revisions that have been (partially) hidden via RevisionDelete
@@ -167,26 +161,14 @@ class HistoryAction extends FormlessAction {
                        Html::hidden( 'title', $this->getTitle()->getPrefixedDBKey() ) . "\n" .
                        Html::hidden( 'action', 'history' ) . "\n" .
                        Xml::dateMenu( $year, $month ) . '&#160;' .
-                       Html::rawElement(
-                               'span',
-                               array( 'style' => 'white-space: nowrap' ),
-                               ( $tagSelector ? ( $tagSelector . '&#160;' ) : '' )
-                       ) .
-                       Html::rawElement(
-                               'span',
-                               array( 'style' => 'white-space: nowrap' ),
-                               $checkDeleted
-                       ) .
+                       ( $tagSelector ? ( implode( '&#160;', $tagSelector ) . '&#160;' ) : '' ) .
+                       $checkDeleted .
                        Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "\n" .
                        '</fieldset></form>'
                );
 
                wfRunHooks( 'PageHistoryBeforeList', array( &$this->page ) );
 
-               if ( $tagFilterDropdown !== '' && $tagFilterDropdown !== 'other' ) {
-                       $tagFilter = $tagFilterDropdown;
-               }
-
                // Create and output the list.
                $pager = new HistoryPager( $this, $year, $month, $tagFilter, $conds );
                $out->addHTML(
index a048204..865295b 100644 (file)
@@ -103,7 +103,6 @@ class SpecialContributions extends SpecialPage {
                $this->opts['nsInvert'] = (bool) $request->getVal( 'nsInvert' );
 
                $this->opts['tagfilter'] = (string) $request->getVal( 'tagfilter' );
-               $this->opts['tagfilterdropdown'] = (string) $request->getVal( 'tagfilterdropdown' );
 
                // Allows reverts to have the bot flag in recent changes. It is just here to
                // be passed in the form at the top of the page
@@ -139,9 +138,6 @@ class SpecialContributions extends SpecialPage {
                        if ( $this->opts['tagfilter'] !== '' ) {
                                $apiParams['tagfilter'] = $this->opts['tagfilter'];
                        }
-                       if ( $this->opts['tagfilterdropdown'] !== '' && $this->opts['tagfilterdropdown'] !== 'other' ) {
-                               $apiParams['tagfilter'] = $this->opts['tagfilterdropdown'];
-                       }
                        if ( $this->opts['namespace'] !== '' ) {
                                $apiParams['namespace'] = $this->opts['namespace'];
                        }
@@ -403,11 +399,7 @@ class SpecialContributions extends SpecialPage {
                        $form .= "\t" . Html::hidden( $name, $value ) . "\n";
                }
 
-               $tagFilter = ChangeTags::buildTagFilterWithDropdown(
-                       'tag-filter-dropdown-list',
-                       $this->opts['tagfilter'],
-                       $this->opts['tagfilterdropdown']
-               );
+               $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );
 
                if ( $tagFilter ) {
                        $filterSelection =
index 8fa0501..ecec87d 100644 (file)
@@ -59,7 +59,6 @@ class SpecialNewpages extends IncludableSpecialPage {
                $opts->add( 'username', '' );
                $opts->add( 'feed', '' );
                $opts->add( 'tagfilter', '' );
-               $opts->add( 'tagfilterdropdown', '' );
 
                $this->customFilters = array();
                wfRunHooks( 'SpecialNewPagesFilters', array( $this, &$this->customFilters ) );
@@ -212,7 +211,6 @@ class SpecialNewpages extends IncludableSpecialPage {
                $namespace = $this->opts->consumeValue( 'namespace' );
                $username = $this->opts->consumeValue( 'username' );
                $tagFilterVal = $this->opts->consumeValue( 'tagfilter' );
-               $tagFilterDropdownVal = $this->opts->consumeValue( 'tagfilterdropdown' );
 
                // Check username input validity
                $ut = Title::makeTitleSafe( NS_USER, $username );
@@ -225,14 +223,9 @@ class SpecialNewpages extends IncludableSpecialPage {
                }
                $hidden = implode( "\n", $hidden );
 
-               $tagFilter = ChangeTags::buildTagFilterWithDropdown(
-                       'tag-filter-newpages-dropdown-list',
-                       $tagFilterVal,
-                       $tagFilterDropdownVal
-               );
+               $tagFilter = ChangeTags::buildTagFilterSelector( $tagFilterVal );
                if ( $tagFilter ) {
-                       $tagFilterLabel = array_shift( $tagFilter );
-                       $tagFilterSelector = implode( '&#160;', $tagFilter );
+                       list( $tagFilterLabel, $tagFilterSelector ) = $tagFilter;
                }
 
                $form = Xml::openElement( 'form', array( 'action' => $wgScript ) ) .
@@ -540,7 +533,8 @@ class NewPagesPager extends ReverseChronologicalPager {
                        $fields,
                        $info['conds'],
                        $info['join_conds'],
-                       $info['options']
+                       $info['options'],
+                       $this->opts['tagfilter']
                );
 
                return $info;
index 19c1bd9..067a956 100644 (file)
@@ -60,7 +60,6 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                $opts->add( 'categories', '' );
                $opts->add( 'categories_any', false );
                $opts->add( 'tagfilter', '' );
-               $opts->add( 'tagfilterdropdown', '' );
                return $opts;
        }
 
@@ -401,7 +400,8 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                        // Tag stuff.
                        // Doesn't work when transcluding. See bug 23293
                        ChangeTags::modifyDisplayQuery(
-                               $tables, $fields, $conds, $join_conds, $query_options
+                               $tables, $fields, $conds, $join_conds, $query_options,
+                               $opts['tagfilter']
                        );
                }
 
@@ -554,7 +554,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                $nondefaults = $opts->getChangedValues();
                $opts->consumeValues( array(
                        'namespace', 'invert', 'associated', 'tagfilter',
-                       'categories', 'categories_any', 'tagfilterdropdown'
+                       'categories', 'categories_any'
                ) );
 
                $panel = array();
@@ -616,10 +616,9 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                        $extraOpts['category'] = $this->categoryFilterForm( $opts );
                }
 
-               $tagFilter = ChangeTags::buildTagFilterWithDropdown( 'tag-filter-dropdown-list',
-                       $opts['tagfilter'], $opts['tagfilterdropdown'] );
+               $tagFilter = ChangeTags::buildTagFilterSelector( $opts['tagfilter'] );
                if ( count( $tagFilter ) ) {
-                       $extraOpts['tagfilter'] = implode( '&#160;', $tagFilter );
+                       $extraOpts['tagfilter'] = $tagFilter;
                }
 
                wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
index 64fb829..68f60cd 100644 (file)
@@ -4634,9 +4634,6 @@ Images are shown in full resolution, other file types are started with their ass
 'tags-hitcount-header'    => 'Tagged changes',
 'tags-edit'               => 'edit',
 'tags-hitcount'           => '$1 {{PLURAL:$1|change|changes}}',
-'tag-filter-dropdown-other' => 'Other:',
-'tag-filter-dropdown-list' => '',
-'tag-filter-newpages-dropdown-list' => '',
 
 # Special:ComparePages
 'comparepages'                => 'Compare pages',
index afe8df1..c1e5744 100644 (file)
@@ -4428,12 +4428,6 @@ Used on [[Special:Tags]]. Verb. Used as display text on a link to create/edit a
 'tags-hitcount'           => 'Shown in the “Tagged changes” column in [[Special:Tags]]. For more information on tags see [//www.mediawiki.org/wiki/Manual:Tags Mediawiki].
 
 * <code>$1</code> is the number of changes marked with the tag',
-'tag-filter-dropdown-list' => 'A list of change tags to put in a dropdown list for selecting a tag to filter by.',
-'tag-filter-newpages-dropdown-list' => 'A list of change tags to put in a dropdown list for selecting a tag to filter by on [[Special:NewPages]].',
-'tag-filter-dropdown-other' => 'The "other" option in the dropdown list for selecting a tag to filter by. When a user selects this, he can type any tag in the text field next to it.
-
-{{Identical|Other}}
-',
 
 # Special:ComparePages
 'comparepages'     => 'The title of [[Special:ComparePages]]',