Merge "SpecialContributions: Username input is not really required"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 19 Jan 2017 21:39:32 +0000 (21:39 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 19 Jan 2017 21:39:33 +0000 (21:39 +0000)
50 files changed:
includes/OutputPage.php
includes/api/ApiFeedWatchlist.php
includes/api/ApiUpload.php
includes/htmlform/fields/HTMLTextField.php
includes/installer/Installer.php
includes/libs/StringUtils.php
includes/libs/rdbms/lbfactory/LBFactory.php
includes/libs/xmp/XMP.php
includes/parser/DateFormatter.php
includes/specials/pagers/MergeHistoryPager.php
includes/tidy/Balancer.php
languages/messages/MessagesBe.php
languages/messages/MessagesBe_tarask.php
languages/messages/MessagesBr.php
languages/messages/MessagesCy.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
languages/messages/MessagesEt.php
languages/messages/MessagesFr.php
languages/messages/MessagesFrp.php
languages/messages/MessagesHe.php
languages/messages/MessagesHy.php
languages/messages/MessagesId.php
languages/messages/MessagesNb.php
languages/messages/MessagesNds.php
languages/messages/MessagesNn.php
languages/messages/MessagesOc.php
languages/messages/MessagesRu.php
languages/messages/MessagesSk.php
languages/messages/MessagesTyv.php
languages/messages/MessagesUk.php
languages/messages/MessagesYue.php
languages/messages/MessagesZh_hans.php
maintenance/generateJsonI18n.php
maintenance/rebuildtextindex.php
resources/lib/oojs-ui/oojs-ui-apex.js
resources/lib/oojs-ui/oojs-ui-core-apex.css
resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
resources/lib/oojs-ui/oojs-ui-core.js
resources/lib/oojs-ui/oojs-ui-mediawiki.js
resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
resources/lib/oojs-ui/oojs-ui-toolbars.js
resources/lib/oojs-ui/oojs-ui-widgets-apex.css
resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
resources/lib/oojs-ui/oojs-ui-widgets.js
resources/lib/oojs-ui/oojs-ui-windows-apex.css
resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
resources/lib/oojs-ui/oojs-ui-windows.js
tests/phan/config.php

index 8fe1285..922960f 100644 (file)
@@ -3562,7 +3562,6 @@ class OutputPage extends ContextSource {
        protected function buildExemptModules() {
                global $wgContLang;
 
-               $resourceLoader = $this->getResourceLoader();
                $chunks = [];
                // Things that go after the ResourceLoaderDynamicStyles marker
                $append = [];
index b9bb761..7f349bc 100644 (file)
@@ -52,6 +52,7 @@ class ApiFeedWatchlist extends ApiBase {
        public function execute() {
                $config = $this->getConfig();
                $feedClasses = $config->get( 'FeedClasses' );
+               $params = [];
                try {
                        $params = $this->extractRequestParams();
 
index f821374..6b38302 100644 (file)
@@ -637,7 +637,8 @@ class ApiUpload extends ApiBase {
                                break;
 
                        case UploadBase::HOOK_ABORTED:
-                               $this->dieWithError( $params, 'hookaborted', [ 'details' => $verification['error'] ] );
+                               $msg = $verification['error'] === '' ? 'hookaborted' : $verification['error'];
+                               $this->dieWithError( $msg, 'hookaborted', [ 'details' => $verification['error'] ] );
                                break;
                        default:
                                $this->dieWithError( 'apierror-unknownerror-nocode', 'unknown-error',
index c3da746..b0b66ca 100644 (file)
@@ -187,6 +187,7 @@ class HTMLTextField extends HTMLFormField {
                        'name' => $this->mName,
                        'value' => $value,
                        'type' => $type,
+                       'dir' => $this->mDir,
                ] + $attribs );
        }
 
index 9dc8032..d887a13 100644 (file)
@@ -1421,6 +1421,7 @@ abstract class Installer {
                $wgAutoloadClasses += $data['autoload'];
 
                $hooksWeWant = isset( $wgHooks['LoadExtensionSchemaUpdates'] ) ?
+                       /** @suppress PhanUndeclaredVariable $wgHooks is set by DefaultSettings */
                        $wgHooks['LoadExtensionSchemaUpdates'] : [];
 
                if ( isset( $data['globals']['wgHooks']['LoadExtensionSchemaUpdates'] ) ) {
index 26f3c4a..cffb5a3 100644 (file)
@@ -168,6 +168,7 @@ class StringUtils {
        ) {
                $inputPos = 0;
                $outputPos = 0;
+               $contentPos = 0;
                $output = '';
                $foundStart = false;
                $encStart = preg_quote( $startDelim, '!' );
index 15a5c0d..77d4aa9 100644 (file)
@@ -100,7 +100,7 @@ abstract class LBFactory implements ILBFactory {
                                trigger_error( E_USER_WARNING, get_class( $e ) . ': ' . $e->getMessage() );
                        };
 
-               $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null;
+               $this->profiler = isset( $conf['profiler'] ) ? $conf['profiler'] : null;
                $this->trxProfiler = isset( $conf['trxProfiler'] )
                        ? $conf['trxProfiler']
                        : new TransactionProfiler();
@@ -111,9 +111,9 @@ abstract class LBFactory implements ILBFactory {
                        'ChronologyProtection' => 'true'
                ];
 
-               $this->cliMode = isset( $params['cliMode'] ) ? $params['cliMode'] : PHP_SAPI === 'cli';
+               $this->cliMode = isset( $conf['cliMode'] ) ? $conf['cliMode'] : PHP_SAPI === 'cli';
                $this->hostname = isset( $conf['hostname'] ) ? $conf['hostname'] : gethostname();
-               $this->agent = isset( $params['agent'] ) ? $params['agent'] : '';
+               $this->agent = isset( $conf['agent'] ) ? $conf['agent'] : '';
 
                $this->ticket = mt_rand();
        }
index a657a33..0d171f5 100644 (file)
@@ -1086,7 +1086,7 @@ class XMPReader implements LoggerAwareInterface {
                                }
                        } else {
                                array_unshift( $this->mode, self::MODE_IGNORE );
-                               array_unshift( $this->curItem, $elm );
+                               array_unshift( $this->curItem, $ns . ' ' . $tag );
 
                                return;
                        }
index 40da368..0653725 100644 (file)
@@ -217,15 +217,17 @@ class DateFormatter {
                        }
                }
 
-               return $this->formatDate( $bits, $linked );
+               return $this->formatDate( $bits, $matches[0], $linked );
        }
 
        /**
         * @param array $bits
+        * @param string $orig Original input string, to be returned
+        *  on formatting failure.
         * @param bool $link
         * @return string
         */
-       public function formatDate( $bits, $link = true ) {
+       private function formatDate( $bits, $orig, $link = true ) {
                $format = $this->targets[$this->mTarget];
 
                if ( !$link ) {
@@ -300,8 +302,9 @@ class DateFormatter {
                        }
                }
                if ( $fail ) {
-                       /** @todo FIXME: $matches doesn't exist here, what's expected? */
-                       $text = $matches[0];
+                       // This occurs when parsing a date with day or month outside the bounds
+                       // of possibilities.
+                       $text = $orig;
                }
 
                $isoBits = [];
index 56229b3..bbf97e1 100644 (file)
@@ -54,15 +54,17 @@ class MergeHistoryPager extends ReverseChronologicalPager {
                $batch = new LinkBatch();
                # Give some pointers to make (last) links
                $this->mForm->prevId = [];
+               $rev_id = null;
                foreach ( $this->mResult as $row ) {
                        $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) );
                        $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) );
 
-                       $rev_id = isset( $rev_id ) ? $rev_id : $row->rev_id;
-                       if ( $rev_id > $row->rev_id ) {
-                               $this->mForm->prevId[$rev_id] = $row->rev_id;
-                       } elseif ( $rev_id < $row->rev_id ) {
-                               $this->mForm->prevId[$row->rev_id] = $rev_id;
+                       if ( isset( $rev_id ) ) {
+                               if ( $rev_id > $row->rev_id ) {
+                                       $this->mForm->prevId[$rev_id] = $row->rev_id;
+                               } elseif ( $rev_id < $row->rev_id ) {
+                                       $this->mForm->prevId[$row->rev_id] = $rev_id;
+                               }
                        }
 
                        $rev_id = $row->rev_id;
index 1346e1c..95cbe09 100644 (file)
@@ -1410,6 +1410,7 @@ class BalanceActiveFormattingElements {
        private $noahTableStack = [ [] ];
 
        public function __destruct() {
+               $next = null;
                for ( $node = $this->head; $node; $node = $next ) {
                        $next = $node->nextAFE;
                        $node->prevAFE = $node->nextAFE = $node->nextNoah = null;
index 9fe2e0c..ea807fd 100644 (file)
@@ -46,7 +46,7 @@ $magicWords = [
 
 $bookstoreList = [
        'OZ.by' => 'http://oz.by/search.phtml?what=books&isbn=$1',
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
 $datePreferences = [
index b184d94..a6fd58a 100644 (file)
@@ -215,7 +215,7 @@ $magicWords = [
 
 $bookstoreList = [
        'OZ.by' => 'http://oz.by/search.phtml?what=books&isbn=$1',
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
 $datePreferences = [
index 29d423c..a2a7e7d 100644 (file)
@@ -146,7 +146,7 @@ $magicWords = [
 ];
 
 $bookstoreList = [
-       'Amazon.fr'    => 'http://www.amazon.fr/exec/obidos/ISBN=$1',
+       'Amazon.fr'    => 'https://www.amazon.fr/exec/obidos/ISBN=$1',
        'alapage.fr'   => 'http://www.alapage.com/mx/?tp=F&type=101&l_isbn=$1&donnee_appel=ALASQ&devise=&',
        'fnac.com'     => 'http://www3.fnac.com/advanced/book.do?isbn=$1',
        'chapitre.com' => 'http://www.chapitre.com/frame_rec.asp?isbn=$1',
index 096eb33..2fec9fc 100644 (file)
@@ -98,8 +98,8 @@ $defaultDateFormat = 'dmy';
 $bookstoreList = [
        "AddALL" => "http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN",
        "Barnes & Noble" => "http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1",
-       "Amazon.com" => "http://www.amazon.com/exec/obidos/ISBN=$1",
-       "Amazon.co.uk" => "http://www.amazon.co.uk/exec/obidos/ISBN=$1"
+       "Amazon.com" => "https://www.amazon.com/exec/obidos/ISBN=$1",
+       "Amazon.co.uk" => "https://www.amazon.co.uk/exec/obidos/ISBN=$1"
 ];
 
 $linkTrail = "/^([àáâèéêìíîïòóôûŵŷa-z]+)(.*)$/sDu";
index 760f23c..160f57d 100644 (file)
@@ -344,7 +344,7 @@ $dateFormats = [
 $capitalizeAllNouns = true;
 $bookstoreList = [
        'abebooks.de' => 'http://www.abebooks.de/servlet/BookSearchPL?ph=2&isbn=$1',
-       'amazon.de' => 'http://www.amazon.de/gp/search/field-isbn=$1',
+       'amazon.de' => 'https://www.amazon.de/gp/search/field-isbn=$1',
        'buch.de' => 'http://www.buch.de/shop/home/suche/?sswg=BUCH&sq=$1',
        'Karlsruher Virtueller Katalog (KVK)' => 'http://www.ubka.uni-karlsruhe.de/kvk.html?SB=$1',
        'Lehmanns Fachbuchhandlung' => 'http://www.lob.de/cgi-bin/work/suche?flag=new&stich1=$1'
index 99d3f64..689586b 100644 (file)
@@ -187,7 +187,7 @@ $dateFormats = [
 $bookstoreList = [
        'AddALL' => 'http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN',
        'Barnes & Noble' => 'http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1',
-       'Amazon.com' => 'http://www.amazon.com/gp/search/?field-isbn=$1'
+       'Amazon.com' => 'https://www.amazon.com/gp/search/?field-isbn=$1'
 ];
 
 /**
index ec165ab..28c69df 100644 (file)
@@ -146,7 +146,7 @@ $bookstoreList = [
        'Raamatukoi' => 'http://www.raamatukoi.ee/cgi-bin/index?valik=otsing&paring=$1',
        'AddALL' => 'http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN',
        'Barnes & Noble' => 'http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1',
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
 $magicWords = [
index 9e233de..3e3cf80 100644 (file)
@@ -294,7 +294,7 @@ $magicWords = [
 ];
 
 $bookstoreList = [
-       'Amazon.fr'    => 'http://www.amazon.fr/exec/obidos/ISBN=$1',
+       'Amazon.fr'    => 'https://www.amazon.fr/exec/obidos/ISBN=$1',
        'alapage.fr'   => 'http://www.alapage.com/mx/?tp=F&type=101&l_isbn=$1&donnee_appel=ALASQ&devise=&',
        'fnac.com'     => 'http://www3.fnac.com/advanced/book.do?isbn=$1',
        'chapitre.com' => 'http://www.chapitre.com/frame_rec.asp?isbn=$1',
index 88eafdf..0ac1caf 100644 (file)
@@ -11,7 +11,7 @@
 $fallback = 'fr';
 
 $bookstoreList = [
-       'Amazon.fr'    => 'http://www.amazon.fr/exec/obidos/ISBN=$1',
+       'Amazon.fr'    => 'https://www.amazon.fr/exec/obidos/ISBN=$1',
        'alapage.fr'   => 'http://www.alapage.com/mx/?tp=F&type=101&l_isbn=$1&donnee_appel=ALASQ&devise=&',
        'fnac.com'     => 'http://www3.fnac.com/advanced/book.do?isbn=$1',
        'chapitre.com' => 'http://www.chapitre.com/frame_rec.asp?isbn=$1',
index 46c4080..19f8232 100644 (file)
@@ -343,5 +343,5 @@ $bookstoreList = [
        'מיתוס'          => 'http://www.mitos.co.il/',
        'iBooks'         => 'http://www.ibooks.co.il/',
        'Barnes & Noble' => 'http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1',
-       'Amazon.com'     => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.com'     => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
index 065b4fb..9a5a809 100644 (file)
@@ -76,7 +76,7 @@ $dateFormats = [
 ];
 
 $bookstoreList = [
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
 $magicWords = [
index b57c03e..2107e7d 100644 (file)
@@ -43,7 +43,7 @@ $namespaceAliases = [
 
 $bookstoreList = [
        'AddALL' => 'http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN',
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1',
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1',
        'Barnes & Noble' => 'http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1',
        'Bhinneka.com bookstore' => 'http://www.bhinneka.com/Buku/Engine/search.asp?fisbn=$1',
        'Gramedia Cyberstore (via Google)' => 'http://www.google.com/search?q=%22ISBN+:+$1%22+%22product_detail%22+site:www.gramediacyberstore.com+OR+site:www.gramediaonline.com+OR+site:www.kompas.com&hl=id',
index d33075e..66f0527 100644 (file)
@@ -55,7 +55,7 @@ $bookstoreList = [
        'Bibsys' => 'http://ask.bibsys.no/ask/action/result?cmd=&kilde=biblio&fid=isbn&term=$1&op=and&fid=bd&term=&arstall=&sortering=sortdate-&treffPrSide=50',
        'Akademika' => 'http://www.akademika.no/sok.php?ts=4&sok=$1',
        'Haugenbok' => 'http://www.haugenbok.no/resultat.cfm?st=extended&isbn=$1',
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
 $namespaceNames = [
index 49ea249..10d0a83 100644 (file)
@@ -88,7 +88,7 @@ $magicWords = [
 $bookstoreList = [
        'Verteken vun leverbore Böker'  => 'http://www.buchhandel.de/sixcms/list.php?page=buchhandel_profisuche_frameset&suchfeld=isbn&suchwert=$1=0&y=0',
        'abebooks.de'                   => 'http://www.abebooks.de/servlet/BookSearchPL?ph=2&isbn=$1',
-       'Amazon.de'                     => 'http://www.amazon.de/exec/obidos/ISBN=$1',
+       'Amazon.de'                     => 'https://www.amazon.de/exec/obidos/ISBN=$1',
        'Lehmanns Fachbuchhandlung'     => 'http://www.lob.de/cgi-bin/work/suche?flag=new&stich1=$1',
 ];
 
index 2776847..7572c67 100644 (file)
@@ -96,9 +96,9 @@ $bookstoreList = [
        'Haugenbok'    => 'http://www.haugenbok.no/resultat.cfm?st=hurtig&isbn=$1',
        'Akademika'    => 'http://www.akademika.no/sok.php?isbn=$1',
        'Gnist'        => 'http://www.gnist.no/sok.php?isbn=$1',
-       'Amazon.co.uk' => 'http://www.amazon.co.uk/exec/obidos/ISBN=$1',
-       'Amazon.de'    => 'http://www.amazon.de/exec/obidos/ISBN=$1',
-       'Amazon.com'   => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.co.uk' => 'https://www.amazon.co.uk/exec/obidos/ISBN=$1',
+       'Amazon.de'    => 'https://www.amazon.de/exec/obidos/ISBN=$1',
+       'Amazon.com'   => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
 $magicWords = [
index 3f84517..1de22bd 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 $bookstoreList = [
-       'Amazon.fr' => 'http://www.amazon.fr/exec/obidos/ISBN=$1'
+       'Amazon.fr' => 'https://www.amazon.fr/exec/obidos/ISBN=$1'
 ];
 
 $namespaceNames = [
index cb44ce9..3041abd 100644 (file)
@@ -413,7 +413,7 @@ $bookstoreList = [
        'Яндекс.Маркет' => 'http://market.yandex.ru/search.xml?text=$1',
        'ОЗОН' => 'http://www.ozon.ru/?context=advsearch_book&isbn=$1',
        'Books.Ru' => 'http://www.books.ru/shop/search?query=$1',
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
 /**
index 75cf114..0399bfa 100644 (file)
@@ -177,9 +177,9 @@ $bookstoreList = [
        'Haugenbok' => 'http://www.haugenbok.no/searchresults.cfm?searchtype=simple&isbn=$1',
        'Akademika' => 'http://www.akademika.no/sok.php?isbn=$1',
        'Gnist' => 'http://www.gnist.no/sok.php?isbn=$1',
-       'Amazon.co.uk' => 'http://www.amazon.co.uk/exec/obidos/ISBN=$1',
-       'Amazon.de' => 'http://www.amazon.de/exec/obidos/ISBN=$1',
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.co.uk' => 'https://www.amazon.co.uk/exec/obidos/ISBN=$1',
+       'Amazon.de' => 'https://www.amazon.de/exec/obidos/ISBN=$1',
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
 $magicWords = [
index d222639..01254e7 100644 (file)
@@ -116,7 +116,7 @@ $bookstoreList = [
        'ОЗОН' => 'http://www.ozon.ru/?context=advsearch_book&isbn=$1',
        'Books.Ru' => 'http://www.books.ru/shop/search/advanced?as%5Btype%5D=books&as%5Bname%5D=&as%5Bisbn%5D=$1&as%5Bauthor%5D=&as%5Bmaker%5D=&as%5Bcontents%5D=&as%5Binfo%5D=&as%5Bdate_after%5D=&as%5Bdate_before%5D=&as%5Bprice_less%5D=&as%5Bprice_more%5D=&as%5Bstrict%5D=%E4%E0&as%5Bsub%5D=%E8%F1%EA%E0%F2%FC&x=22&y=8',
        'Яндекс.Маркет' => 'http://market.yandex.ru/search.xml?text=$1',
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1',
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1',
        'AddALL' => 'http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN',
        'Barnes & Noble' => 'http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1'
 ];
index 0c381e5..480d94f 100644 (file)
@@ -121,7 +121,7 @@ $dateFormats = [
 ];
 
 $bookstoreList = [
-       'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1'
+       'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
 // Russian names are kept for backwards compatibility
index 4915680..58024d2 100644 (file)
@@ -193,7 +193,7 @@ $specialPageAliases = [
 $bookstoreList = [
        'AddALL' => 'http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN',
        'Barnes & Noble' => 'http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1',
-       '亞馬遜' => 'http://www.amazon.com/exec/obidos/ISBN=$1',
+       '亞馬遜' => 'https://www.amazon.com/exec/obidos/ISBN=$1',
        '博客來書店' => 'http://www.books.com.tw/exep/prod/booksfile.php?item=$1',
        '三民書店' => 'http://www.sanmin.com.tw/page-qsearch.asp?ct=search_isbn&qu=$1',
        '天下書店' => 'http://www.cwbook.com.tw/search/result1.jsp?field=2&keyWord=$1',
index b7be658..7a0dbb6 100644 (file)
@@ -425,8 +425,8 @@ $dateFormats = [
 $bookstoreList = [
        'AddALL' => 'http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN',
        'Barnes & Noble' => 'http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1',
-       '亚马逊' => 'http://www.amazon.com/exec/obidos/ISBN=$1',
-       '卓越亚马逊' => 'http://www.amazon.cn/mn/advancedSearchApp?isbn=$1',
+       '亚马逊' => 'https://www.amazon.com/exec/obidos/ISBN=$1',
+       '卓越亚马逊' => 'https://www.amazon.cn/mn/advancedSearchApp?isbn=$1',
        '当当网' => 'http://search.dangdang.com/search.aspx?key=$1',
        '博客来书店' => 'http://www.books.com.tw/exep/prod/booksfile.php?item=$1',
        '三民书店' => 'http://www.sanmin.com.tw/page-qsearch.asp?ct=search_isbn&qu=$1',
index d3041d9..a84f2ae 100644 (file)
@@ -108,6 +108,7 @@ class GenerateJsonI18n extends Maintenance {
                if ( !is_readable( $phpfile ) ) {
                        $this->error( "Error reading $phpfile", 1 );
                }
+               $messages = null;
                include $phpfile;
                $phpfileContents = file_get_contents( $phpfile );
 
index 37636c8..b7f0762 100644 (file)
@@ -108,9 +108,8 @@ class RebuildTextIndex extends Maintenance {
                        );
 
                        foreach ( $res as $s ) {
+                               $title = Title::makeTitle( $s->page_namespace, $s->page_title );
                                try {
-                                       $title = Title::makeTitle( $s->page_namespace, $s->page_title );
-
                                        $rev = new Revision( $s );
                                        $content = $rev->getContent();
 
index 870f605..b93d59e 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:07Z
+ * Date: 2017-01-19T20:22:26Z
  */
 ( function ( OO ) {
 
@@ -41,3 +41,5 @@ OO.ui.ApexTheme.prototype.getDialogTransitionDuration = function () {
 OO.ui.theme = new OO.ui.ApexTheme();
 
 }( OO ) );
+
+//# sourceMappingURL=oojs-ui-apex.js.map
\ No newline at end of file
index 842ddfd..2bee712 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:12Z
+ * Date: 2017-01-19T20:22:32Z
  */
 .oo-ui-element-hidden {
   display: none !important;
@@ -417,10 +417,10 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
   color: inherit;
   display: inline-table;
   box-sizing: border-box;
-  max-width: 100%;
   padding: 0;
   white-space: normal;
   float: left;
+  width: 100%;
 }
 .oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-fieldsetLayout-header > .oo-ui-labelElement-label:empty {
   display: none;
@@ -439,7 +439,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
   line-height: 1.4;
 }
 .oo-ui-fieldsetLayout .oo-ui-fieldsetLayout-header {
-  width: 50em;
+  max-width: 50em;
 }
 .oo-ui-fieldsetLayout + .oo-ui-fieldsetLayout,
 .oo-ui-fieldsetLayout + .oo-ui-formLayout {
index 89b2164..632c085 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:12Z
+ * Date: 2017-01-19T20:22:32Z
  */
 .oo-ui-element-hidden {
   display: none !important;
@@ -558,10 +558,10 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
   color: inherit;
   display: inline-table;
   box-sizing: border-box;
-  max-width: 100%;
   padding: 0;
   white-space: normal;
   float: left;
+  width: 100%;
 }
 .oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-fieldsetLayout-header > .oo-ui-labelElement-label:empty {
   display: none;
@@ -580,7 +580,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
   line-height: 1.4;
 }
 .oo-ui-fieldsetLayout .oo-ui-fieldsetLayout-header {
-  width: 50em;
+  max-width: 50em;
 }
 .oo-ui-fieldsetLayout + .oo-ui-fieldsetLayout,
 .oo-ui-fieldsetLayout + .oo-ui-formLayout {
index 1542c4b..5dc78ab 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:07Z
+ * Date: 2017-01-19T20:22:26Z
  */
 ( function ( OO ) {
 
@@ -68,7 +68,7 @@ OO.ui.elementId = 0;
  */
 OO.ui.generateElementId = function () {
        OO.ui.elementId++;
-       return 'ooui-' + OO.ui.elementId;
+       return 'oojsui-' + OO.ui.elementId;
 };
 
 /**
@@ -10586,3 +10586,5 @@ OO.inheritClass( OO.ui.HorizontalLayout, OO.ui.Layout );
 OO.mixinClass( OO.ui.HorizontalLayout, OO.ui.mixin.GroupElement );
 
 }( OO ) );
+
+//# sourceMappingURL=oojs-ui-core.js.map
\ No newline at end of file
index 96f6ebb..32daabd 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:07Z
+ * Date: 2017-01-19T20:22:26Z
  */
 ( function ( OO ) {
 
@@ -82,3 +82,5 @@ OO.ui.MediaWikiTheme.prototype.getDialogTransitionDuration = function () {
 OO.ui.theme = new OO.ui.MediaWikiTheme();
 
 }( OO ) );
+
+//# sourceMappingURL=oojs-ui-mediawiki.js.map
\ No newline at end of file
index 1fa8c8d..d781e68 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:12Z
+ * Date: 2017-01-19T20:22:32Z
  */
 .oo-ui-popupTool .oo-ui-popupWidget-popup,
 .oo-ui-popupTool .oo-ui-popupWidget-anchor {
index 88b2c7c..9860240 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:12Z
+ * Date: 2017-01-19T20:22:32Z
  */
 .oo-ui-tool.oo-ui-widget-enabled {
   -webkit-transition: background-color 100ms;
index 422704b..0b8a7f6 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:07Z
+ * Date: 2017-01-19T20:22:26Z
  */
 ( function ( OO ) {
 
@@ -2329,3 +2329,5 @@ OO.ui.MenuToolGroup.prototype.onUpdateState = function () {
 };
 
 }( OO ) );
+
+//# sourceMappingURL=oojs-ui-toolbars.js.map
\ No newline at end of file
index 7e7d89c..ec581c1 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:12Z
+ * Date: 2017-01-19T20:22:32Z
  */
 .oo-ui-draggableElement-handle,
 .oo-ui-draggableElement-handle.oo-ui-widget {
index 11ebd2c..aced25b 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:12Z
+ * Date: 2017-01-19T20:22:32Z
  */
 .oo-ui-draggableElement-handle,
 .oo-ui-draggableElement-handle.oo-ui-widget {
index e26e203..4bf461f 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:07Z
+ * Date: 2017-01-19T20:22:26Z
  */
 ( function ( OO ) {
 
@@ -4329,7 +4329,7 @@ OO.ui.CapsuleMultiselectWidget.prototype.focus = function () {
 OO.ui.CapsuleMultiSelectWidget = function OoUiCapsuleMultiSelectWidget() {
        OO.ui.warnDeprecation( 'CapsuleMultiSelectWidget is deprecated. Use the CapsuleMultiselectWidget instead.' );
        // Parent constructor
-       OO.ui.TextInputMenuSelectWidget.parent.apply( this, arguments );
+       OO.ui.CapsuleMultiSelectWidget.parent.apply( this, arguments );
 };
 
 OO.inheritClass( OO.ui.CapsuleMultiSelectWidget, OO.ui.CapsuleMultiselectWidget );
@@ -5345,3 +5345,5 @@ OO.ui.NumberInputWidget.prototype.setDisabled = function ( disabled ) {
 };
 
 }( OO ) );
+
+//# sourceMappingURL=oojs-ui-widgets.js.map
\ No newline at end of file
index f29a03c..2fc4cc8 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:12Z
+ * Date: 2017-01-19T20:22:32Z
  */
 .oo-ui-actionWidget.oo-ui-pendingElement-pending {
   background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
index ba47634..c643c28 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:12Z
+ * Date: 2017-01-19T20:22:32Z
  */
 .oo-ui-window {
   background: transparent;
index fc8beb2..ab83a55 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.4
+ * OOjs UI v0.18.4-fix (d4045dee45)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-01-18T00:07:07Z
+ * Date: 2017-01-19T20:22:26Z
  */
 ( function ( OO ) {
 
@@ -3168,7 +3168,9 @@ OO.ui.ProcessDialog.prototype.getActionWidgets = function ( actions ) {
 
        for ( i = 0, len = actions.length; i < len; i++ ) {
                config = $.extend( { framed: !OO.ui.isMobile() }, actions[ i ] );
-               if ( isMobile && ( config.flags === 'back' || config.flags.indexOf( 'back' ) !== -1 ) ) {
+               if ( isMobile &&
+                       ( config.flags === 'back' || ( Array.isArray( config.flags ) && config.flags.indexOf( 'back' ) !== -1 ) )
+               ) {
                        $.extend( config, {
                                icon: 'previous',
                                label: ''
@@ -3494,3 +3496,5 @@ OO.ui.prompt = function ( text, options ) {
 };
 
 }( OO ) );
+
+//# sourceMappingURL=oojs-ui-windows.js.map
\ No newline at end of file
index cef03ee..17c1fb8 100644 (file)
@@ -203,7 +203,7 @@ return [
         * with complicated cross-file globals that you have no
         * hope of fixing.
         */
-       'ignore_undeclared_variables_in_global_scope' => false,
+       'ignore_undeclared_variables_in_global_scope' => true,
 
        /**
         * Set to true in order to attempt to detect dead
@@ -339,8 +339,6 @@ return [
                "PhanUndeclaredProperty",
                // approximate error count: 3
                "PhanUndeclaredStaticMethod",
-               // approximate error count: 79
-               "PhanUndeclaredVariable",
        ],
 
        /**