Merge "Set visibility for class property of RegexlikeReplacer"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 7 Nov 2013 23:49:01 +0000 (23:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 7 Nov 2013 23:49:01 +0000 (23:49 +0000)
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialSearch.php
includes/specials/SpecialWatchlist.php
includes/utils/ZipDirectoryReader.php
skins/common/wikibits.js

index 501552e..ca2daaf 100644 (file)
@@ -36,7 +36,8 @@
  */
 class SpecialEditWatchlist extends UnlistedSpecialPage {
        /**
-        * Editing modes
+        * Editing modes. EDIT_CLEAR is no longer used; the "Clear" link scared people
+        * too much. Now it's passed on to the raw editor, from which it's very easy to clear.
         */
        const EDIT_CLEAR = 1;
        const EDIT_RAW = 2;
@@ -95,10 +96,6 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                $mode = self::getMode( $this->getRequest(), $mode );
 
                switch ( $mode ) {
-                       case self::EDIT_CLEAR:
-                               // The "Clear" link scared people too much.
-                               // Pass on to the raw editor, from which it's very easy to clear.
-
                        case self::EDIT_RAW:
                                $out->setPageTitle( $this->msg( 'watchlistedit-raw-title' ) );
                                $form = $this->getRawForm();
@@ -638,7 +635,6 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                switch ( $mode ) {
                        case 'clear':
                        case self::EDIT_CLEAR:
-                               return self::EDIT_CLEAR;
                        case 'raw':
                        case self::EDIT_RAW:
                                return self::EDIT_RAW;
index d5a6b29..8c8de8e 100644 (file)
@@ -318,13 +318,12 @@ class SpecialSearch extends SpecialPage {
                        )
                );
                $out->addHtml(
-                       Xml::openElement( 'table', array( 'id' => 'mw-search-top-table', 'cellpadding' => 0, 'cellspacing' => 0 ) ) .
-                       Xml::openElement( 'tr' ) .
-                       Xml::openElement( 'td' ) . "\n" .
+                       # This is an awful awful ID name. It's not a table, but we
+                       # named it poorly from when this was a table so now we're
+                       # stuck with it
+                       Xml::openElement( 'div', array( 'id' => 'mw-search-top-table' ) ) .
                        $this->shortDialog( $term ) .
-                       Xml::closeElement( 'td' ) .
-                       Xml::closeElement( 'tr' ) .
-                       Xml::closeElement( 'table' )
+                       Xml::closeElement( 'div' )
                );
 
                // Sometimes the search engine knows there are too many hits
index 4afa279..336b05b 100644 (file)
@@ -74,18 +74,12 @@ class SpecialWatchlist extends SpecialPage {
 
                $mode = SpecialEditWatchlist::getMode( $request, $par );
                if ( $mode !== false ) {
-                       # TODO: localise?
-                       switch ( $mode ) {
-                               case SpecialEditWatchlist::EDIT_CLEAR:
-                                       $mode = 'clear';
-                                       break;
-                               case SpecialEditWatchlist::EDIT_RAW:
-                                       $mode = 'raw';
-                                       break;
-                               default:
-                                       $mode = null;
+                       if ( $mode === SpecialEditWatchlist::EDIT_RAW ) {
+                               $title = SpecialPage::getTitleFor( 'EditWatchlist', 'raw' );
+                       } else {
+                               $title = SpecialPage::getTitleFor( 'EditWatchlist' );
                        }
-                       $title = SpecialPage::getTitleFor( 'EditWatchlist', $mode );
+
                        $output->redirect( $title->getLocalURL() );
                        return;
                }
index 5c92525..1419bbb 100644 (file)
@@ -93,27 +93,27 @@ class ZipDirectoryReader {
        }
 
        /** The file name */
-       var $fileName;
+       protected $fileName;
 
        /** The opened file resource */
-       var $file;
+       protected $file;
 
        /** The cached length of the file, or null if it has not been loaded yet. */
-       var $fileLength;
+       protected $fileLength;
 
        /** A segmented cache of the file contents */
-       var $buffer;
+       protected $buffer;
 
        /** The file data callback */
-       var $callback;
+       protected $callback;
 
        /** The ZIP64 mode */
-       var $zip64 = false;
+       protected $zip64 = false;
 
        /** Stored headers */
-       var $eocdr, $eocdr64, $eocdr64Locator;
+       protected $eocdr, $eocdr64, $eocdr64Locator;
 
-       var $data;
+       protected $data;
 
        /** The "extra field" ID for ZIP64 central directory entries */
        const ZIP64_EXTRA_HEADER = 0x0001;
@@ -704,7 +704,7 @@ class ZipDirectoryReader {
  * Internal exception class. Will be caught by private code.
  */
 class ZipDirectoryReaderError extends Exception {
-       var $errorCode;
+       protected $errorCode;
 
        function __construct( $code ) {
                $this->errorCode = $code;
index 65db555..d28ca0a 100644 (file)
@@ -89,17 +89,17 @@ mw.log.deprecate( win, 'ie6_bugs', false, msg );
 msg = 'Use jQuery instead';
 
 // Ignored dummy values
-mw.log.deprecate( win, 'doneOnloadHook', undefined );
-mw.log.deprecate( win, 'onloadFuncts', [] );
-mw.log.deprecate( win, 'runOnloadHook', $.noop );
-mw.log.deprecate( win, 'changeText', $.noop );
-mw.log.deprecate( win, 'killEvt', $.noop );
-mw.log.deprecate( win, 'addHandler', $.noop );
-mw.log.deprecate( win, 'hookEvent', $.noop );
-mw.log.deprecate( win, 'addClickHandler', $.noop );
-mw.log.deprecate( win, 'removeHandler', $.noop );
-mw.log.deprecate( win, 'getElementsByClassName', function () { return []; } );
-mw.log.deprecate( win, 'getInnerText', function () { return ''; } );
+mw.log.deprecate( win, 'doneOnloadHook', undefined, msg );
+mw.log.deprecate( win, 'onloadFuncts', [], msg );
+mw.log.deprecate( win, 'runOnloadHook', $.noop, msg );
+mw.log.deprecate( win, 'changeText', $.noop, msg );
+mw.log.deprecate( win, 'killEvt', $.noop, msg );
+mw.log.deprecate( win, 'addHandler', $.noop, msg );
+mw.log.deprecate( win, 'hookEvent', $.noop, msg );
+mw.log.deprecate( win, 'addClickHandler', $.noop, msg );
+mw.log.deprecate( win, 'removeHandler', $.noop, msg );
+mw.log.deprecate( win, 'getElementsByClassName', function () { return []; }, msg );
+mw.log.deprecate( win, 'getInnerText', function () { return ''; }, msg );
 
 // Run a function after the window onload event is fired
 mw.log.deprecate( win, 'addOnloadHook', function ( hookFunct ) {
@@ -110,7 +110,7 @@ mw.log.deprecate( win, 'addOnloadHook', function ( hookFunct ) {
                // run immediately instead of queueing.
                hookFunct();
        }
-} );
+}, msg );
 
 $( win ).on( 'load', function () {
        var i, functs;
@@ -198,7 +198,7 @@ mw.log.deprecate( win, 'tooltipAccessKeyPrefix', 'alt-', msg );
 mw.log.deprecate( win, 'tooltipAccessKeyRegexp', /\[(alt-)?(.)\]$/, msg );
 mw.log.deprecate( win, 'updateTooltipAccessKeys', mw.util.updateTooltipAccessKeys, msg );
 mw.log.deprecate( win, 'addPortletLink', mw.util.addPortletLink, msg );
-mw.log.deprecate( win, 'appendCSS', mw.util.addCSS );
+mw.log.deprecate( win, 'appendCSS', mw.util.addCSS, msg );
 
 /**
  * Wikipage import methods