From: jenkins-bot Date: Fri, 25 Aug 2017 19:56:52 +0000 (+0000) Subject: Merge "WLFilters: Fix seen/unseen filters" X-Git-Tag: 1.31.0-rc.0~2297 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=5bb2ceb7e9678bbe0f202dd05f857007b6101f8e;hp=aeae96ef951509df9a5298b8cf910f9cac520bb6;p=lhc%2Fweb%2Fwiklou.git Merge "WLFilters: Fix seen/unseen filters" --- diff --git a/.gitignore b/.gitignore index 388f354010..b991e115a3 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ sftp-config.json /StartProfiler.php # Building & testing +npm-debug.log node_modules/ /tests/phpunit/phpunit.phar diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index d07136baca..5d95964e93 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -755,6 +755,8 @@ $wgCopyUploadProxy = false; * timeout longer than the default $wgHTTPTimeout. False means fallback * to default. * + * @var int|bool + * * @since 1.22 */ $wgCopyUploadTimeout = false; @@ -8271,6 +8273,7 @@ $wgShellLocale = 'C.UTF-8'; /** * Timeout for HTTP requests done internally, in seconds. + * @var int */ $wgHTTPTimeout = 25; diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php index 88cc510219..0f0118ce00 100644 --- a/includes/http/MWHttpRequest.php +++ b/includes/http/MWHttpRequest.php @@ -33,8 +33,12 @@ use Psr\Log\NullLogger; class MWHttpRequest implements LoggerAwareInterface { const SUPPORTS_FILE_POSTS = false; - protected $content; + /** + * @var int|string + */ protected $timeout = 'default'; + + protected $content; protected $headersOnly = null; protected $postData = null; protected $proxy = null; diff --git a/includes/specials/SpecialPageLanguage.php b/includes/specials/SpecialPageLanguage.php index 78a453e7b1..a68f08fd9a 100644 --- a/includes/specials/SpecialPageLanguage.php +++ b/includes/specials/SpecialPageLanguage.php @@ -49,12 +49,20 @@ class SpecialPageLanguage extends FormSpecialPage { protected function getFormFields() { // Get default from the subpage of Special page $defaultName = $this->par; + $title = $defaultName ? Title::newFromText( $defaultName ) : null; + if ( $title ) { + $defaultPageLanguage = + ContentHandler::getForTitle( $title )->getPageLanguage( $title ); + $hasCustomLanguageSet = !$defaultPageLanguage->equals( $title->getPageLanguage() ); + } else { + $hasCustomLanguageSet = false; + } $page = []; $page['pagename'] = [ 'type' => 'title', 'label-message' => 'pagelang-name', - 'default' => $defaultName, + 'default' => $title ? $title->getPrefixedText() : $defaultName, 'autofocus' => $defaultName === null, 'exists' => true, ]; @@ -68,7 +76,7 @@ class SpecialPageLanguage extends FormSpecialPage { 'id' => 'mw-pl-options', 'type' => 'radio', 'options' => $selectoptions, - 'default' => 1 + 'default' => $hasCustomLanguageSet ? 2 : 1 ]; // Building a language selector @@ -86,7 +94,9 @@ class SpecialPageLanguage extends FormSpecialPage { 'type' => 'select', 'options' => $options, 'label-message' => 'pagelang-language', - 'default' => $this->getConfig()->get( 'LanguageCode' ), + 'default' => $title ? + $title->getPageLanguage()->getCode() : + $this->getConfig()->get( 'LanguageCode' ), ]; // Allow user to enter a comment explaining the change diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index a17f118c1c..cecc182f72 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -411,6 +411,10 @@ class SpecialWatchlist extends ChangesListSpecialPage { $this->runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts ); + if ( $this->areFiltersInConflict() ) { + return false; + } + return $dbr->select( $tables, $fields,