[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Add pageviews info to New translation dialog
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378252 ) Change subject: Add pageviews info to New translation dialog .. Add pageviews info to New translation dialog - Add box shadow to New translation dialog. - Add icon next to selected item title in New translation dialog, indicating that article can be opened in new tab. - Add pageviews info to selected item in New translation dialog. Restyle selected item with following applied: - Reduce the article image size to 48px, and the distance between the image and the text to 8px. - Reduce the article name font size to 18px. - Reduce the language indicator font size to 14px and color to Base30. - Reduce the min-height to make the top text to align with the top of the image and the bottom text with the bottom of it. - Increase the distance between the X and the language selector. Bug: T111094 Change-Id: I07ab03de98ead3fd758a76bc8d17edc76f1225df --- M extension.json M i18n/en.json M i18n/qqq.json M modules/source/ext.cx.source.selector.js A modules/source/images/newwindow.png A modules/source/images/newwindow.svg M modules/source/styles/ext.cx.source.selector.less 7 files changed, 165 insertions(+), 63 deletions(-) Approvals: jenkins-bot: Verified Nikerabbit: Checked; Looks good to me, approved diff --git a/extension.json b/extension.json index 9c506e3..7c5978c 100644 --- a/extension.json +++ b/extension.json @@ -387,7 +387,9 @@ "ext.uls.mediawiki", "jquery.suggestions", "jquery.throttle-debounce", + "mediawiki.jqueryMsg", "mediawiki.storage", + "mediawiki.language", "mediawiki.ui.button", "mw.cx.ui.PageSelectorWidget", "mw.cx.util", @@ -405,6 +407,7 @@ "cx-sourceselector-dialog-error-page-exists", "cx-sourceselector-dialog-error-title-in-use", "cx-sourceselector-dialog-error-no-source-article", + "cx-sourceselector-embedded-selected-item-pageviews", "cx-license-agreement", "cx-error-server-connection" ] diff --git a/i18n/en.json b/i18n/en.json index 89a02a4..c60e152 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -98,6 +98,7 @@ "cx-sourceselector-dialog-error-title-in-use": "The title for the new page is [$1 already in use]", "cx-sourceselector-dialog-error-no-source-article": "The page to translate does not exist in $1", "cx-sourceselector-missing-in-target-language": "Missing in $1", + "cx-sourceselector-embedded-selected-item-pageviews": "{{PLURAL:$1|$1 visit per|$1 visits per|0=No visits this}} week", "cx-mt-abuse-warning-title": "Your translation {{PLURAL:$1|contains}} $1% of unmodified machine-translated text", "cx-mt-abuse-warning-text": "Machine translation is provided only as a starting point. You need to make sure that the content is accurate and reads naturally in your language.", "cx-publish-captcha-title": "Security question", diff --git a/i18n/qqq.json b/i18n/qqq.json index 75efdff..9ff38e6 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -107,6 +107,7 @@ "cx-sourceselector-dialog-error-title-in-use": "Error that indicates there is already a page in the target wiki with the same title as the proposed target title.\n\nParameters:\n* $1 - link to target page with same title", "cx-sourceselector-dialog-error-no-source-article": "Error that indicates there is no page with the specified title in the source language to translate.\n\nParameters:\n* $1 - the source language", "cx-sourceselector-missing-in-target-language": "Label appended to search result in Special:ContentTranslation when using the \"Start new article\" feature, which indicates that matching article is missing in target language.\n\nParameters:\n* $1 - The autonym of the language", + "cx-sourceselector-embedded-selected-item-pageviews": "Label appended to selected item in New translation embedded dialog on Content Translation dashboard, used for representing number of page visits in the last week.\n$1 - number of visits per week", "cx-mt-abuse-warning-title": "Title text shown in machine translation abuse card.\n* $1: Percentage of machine translation", "cx-mt-abuse-warning-text": "Detailed explanation of machine translation abuse.", "cx-publish-captcha-title": "Title of captcha form while publishing the translation", diff --git a/modules/source/ext.cx.source.selector.js b/modules/source/ext.cx.source.selector.js index eac283c..f56c223 100644 ---
[MediaWiki-commits] [Gerrit] mediawiki...Wikisource[master]: Adds all the MediaWiki extensions usual boilerplate
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/373597 ) Change subject: Adds all the MediaWiki extensions usual boilerplate .. Adds all the MediaWiki extensions usual boilerplate Change-Id: Ie08909f4e20155649de7f95452b67f9d5f7a5d10 --- A .eslintrc.json A .gitignore A .jscsrc A .jshintignore A .jshintrc A .stylelintrc A CODE_OF_CONDUCT.md A COPYING A Gruntfile.js A composer.json A extension.json A i18n/en.json A i18n/qqq.json A includes/Hooks.php A package.json A phpcs.xml 16 files changed, 533 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Tpt: Looks good to me, approved diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000..bf3d404 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,16 @@ +{ + "extends": "wikimedia", + "env": { + "browser": true, + "jquery": true + }, + "globals": { + "OO": false, + "mediaWiki": false, + "mw": false, + "ve": false + }, + "rules": { + "dot-notation": [ "error", { "allowKeywords": true } ] + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..21db03c --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*~ +*.kate-swp +.*.swp +.htaccess +/node_modules/ +/vendor/ +/composer.lock diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 000..023541b --- /dev/null +++ b/.jscsrc @@ -0,0 +1,21 @@ +{ + "preset": "wikimedia", + + "jsDoc": { + "checkAnnotations": { + "preset": "jsduck5", + "extra": { + "this": "some", + "source": "some", + "see": "some" + } + }, + "checkTypes": "strictNativeCase", + "checkParamNames": true, + "checkRedundantAccess": true, + "checkRedundantReturns": true, + "requireNewlineAfterDescription": true, + "requireParamTypes": true, + "requireReturnTypes": true + } +} diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..4513972 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,3 @@ +modules/jquery/** +node_modules/** +vendor/** diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..1a54bf2 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,21 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": true, + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + + // Environment + "jquery": true, + "browser": true, + + "globals": { + "mw": false, + "OO": false, + "ve": false + } +} diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 000..2c90730 --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,3 @@ +{ + "extends": "stylelint-config-wikimedia" +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000..d8e5d08 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1 @@ +The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct). diff --git a/COPYING b/COPYING new file mode 100644 index 000..d159169 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ +GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Remove unmaintained debian directory
KartikMistry has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379172 ) Change subject: Remove unmaintained debian directory .. Remove unmaintained debian directory Debian directory is quickly becoming outdated and not used anywhere. We can bring it back if needed. Change-Id: Ica065fdd3922ea8550746274799b7199133a81b0 --- D debian/.gitignore D debian/README.Debian D debian/changelog D debian/compat D debian/config.dev.yaml D debian/config.yaml D debian/control D debian/copyright D debian/cxserver.default D debian/cxserver.init D debian/cxserver.install D debian/cxserver.logrotate D debian/cxserver.postinst D debian/cxserver.postrm D debian/cxserver.service D debian/docs D debian/gbp.conf D debian/registry.yaml D debian/rules D debian/source/format D debian/upstart/cxserver.conf 21 files changed, 0 insertions(+), 1,699 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver/deploy refs/changes/72/379172/1 diff --git a/debian/.gitignore b/debian/.gitignore deleted file mode 100644 index 1c23cf1..000 --- a/debian/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.log -*.debhelper -*.substvars -cxserver -files diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index 1101b10..000 --- a/debian/README.Debian +++ /dev/null @@ -1,4 +0,0 @@ -Node.js dependency -== - -cxserver depends on node.js >= 4.3 starting with 0.2 release. diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index fc7ebda..000 --- a/debian/changelog +++ /dev/null @@ -1,18 +0,0 @@ -cxserver (0.3) unstable; urgency=low - - * Updated for new config format. - * Fixed cxserver.install. - - -- Kartik Mistry Thu, 03 Nov 2016 15:09:29 +0530 - -cxserver (0.2) unstable; urgency=low - - * Update as per cxserver's service-runner migration. - - -- Kartik Mistry Mon, 22 Feb 2016 10:43:47 +0530 - -cxserver (0.1) unstable; urgency=low - - * Initial release based on Parsoid Debian package. - - -- Kartik Mistry Tue, 17 Jun 2014 10:30:07 +0530 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec63514..000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/config.dev.yaml b/debian/config.dev.yaml deleted file mode 100644 index f17e684..000 --- a/debian/config.dev.yaml +++ /dev/null @@ -1,71 +0,0 @@ - -# Set to 0 to run everything in a single process without clustering. -# Use ncpu to run as many workers as there are CPU units -num_workers: 0 - -# Log error messages and gracefully restart a worker if v8 reports that it -# uses more heap (note: not RSS) than this many megabytes. -worker_heap_limit_mb: 250 - -# Logger info -logging: - level: trace -# streams: -# # Use gelf-stream -> logstash -#- type: gelf -#host: logstash1003.eqiad.wmnet -#port: 12201 - -# Statsd metrics reporter -metrics: - type: log - #host: localhost - #port: 8125 - -services: - - name: cxserver -# a relative path or the name of an npm package, if different from name -module: ./app.js -# optionally, a version constraint of the npm package -# version: ^0.4.0 -# per-service config -conf: - port: 8080 - # interface: localhost # uncomment to only listen on localhost - # More per-service config settings - # The location of the spec, defaults to spec.yaml if not specified - # spec: ./spec.yaml - # allow cross-domain requests to the API (default *) - cors: '*' - # to disable use: - # cors: false - # to restrict to a particular domain, use: - # cors: restricted.domain.org - # URL of the outbound proxy to use (complete with protocol) - # proxy: http://my.proxy.org:8080 - # the list of domains for which not to use the proxy defined above - # no_proxy_list: - # - domain1.com - # - domain2.org - user_agent: cxserver - restbase_req: -method: '{{request.method}}' -uri: https://{{domain}}/api/rest_v1/{+path} -query: '{{ default(request.query, {}) }}' -headers: '{{request.headers}}' -body: '{{request.body}}' - jwt: -secret: '' -algorithms: - - HS256 - mt: -# Apertium web API URL -apertium: - api: http://apertium.wmflabs.org -yandex: - api: https://translate.yandex.net - key: null -youdao: - api: https://fanyi.youdao.com/paidapi/fanyiapi - key: null - registry: ./registry.yaml diff --git a/debian/config.yaml b/debian/config.yaml deleted file mode 12 index c11eec8..000 --- a/debian/config.yaml +++ /dev/null @@ -1 +0,0 @@ -config.dev.yaml \ No newline at end of file diff --git a/debian/control b/debian/control deleted file mode 100644 index 1ab5ecf..000 --- a/debian/control +++ /dev/null @@ -1,24 +0,0 @@ -Source: cxserver -Section: web -Priority:
[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Use ::class syntax
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379168 ) Change subject: Use ::class syntax .. Use ::class syntax Change-Id: I7ae3827b971022ada4073b617ec1b4beb8af5824 --- M includes/index/IndexContentHandler.php M includes/page/PageContentHandler.php 2 files changed, 7 insertions(+), 7 deletions(-) Approvals: jenkins-bot: Verified Tpt: Looks good to me, approved diff --git a/includes/index/IndexContentHandler.php b/includes/index/IndexContentHandler.php index 2b1f606..c8c64e9 100644 --- a/includes/index/IndexContentHandler.php +++ b/includes/index/IndexContentHandler.php @@ -123,8 +123,8 @@ */ public function getActionOverrides() { return [ - 'edit' => '\ProofreadPage\Index\IndexEditAction', - 'submit' => '\ProofreadPage\Index\IndexSubmitAction' + 'edit' => IndexEditAction::class, + 'submit' => IndexSubmitAction::class, ]; } @@ -132,7 +132,7 @@ * @see ContentHandler::getDiffEngineClass */ protected function getDiffEngineClass() { - return '\ProofreadPage\Index\IndexDifferenceEngine'; + return IndexDifferenceEngine::class; } /** diff --git a/includes/page/PageContentHandler.php b/includes/page/PageContentHandler.php index d86cf58..be7ab6b 100644 --- a/includes/page/PageContentHandler.php +++ b/includes/page/PageContentHandler.php @@ -205,9 +205,9 @@ */ public function getActionOverrides() { return [ - 'edit' => '\ProofreadPage\Page\PageEditAction', - 'submit' => '\ProofreadPage\Page\PageSubmitAction', - 'view' => '\ProofreadPage\Page\PageViewAction' + 'edit' => PageEditAction::class, + 'submit' => PageSubmitAction::class, + 'view' => PageViewAction::class, ]; } @@ -215,7 +215,7 @@ * @see ContentHandler::getDiffEngineClass */ protected function getDiffEngineClass() { - return '\ProofreadPage\Page\PageDifferenceEngine'; + return PageDifferenceEngine::class; } /** -- To view, visit https://gerrit.wikimedia.org/r/379168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ae3827b971022ada4073b617ec1b4beb8af5824 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Tpt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...production-images[master]: Makefile: make "clean" fault-tolerant
Giuseppe Lavagetto has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378953 ) Change subject: Makefile: make "clean" fault-tolerant .. Makefile: make "clean" fault-tolerant Change-Id: I5f4718037e29b63024d2e1d80f9c707749b419e9 --- M Makefile 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/Makefile b/Makefile index a790203..2a49868 100644 --- a/Makefile +++ b/Makefile @@ -38,13 +38,13 @@ clean-artifacts: ifeq ($(DOCKER), 1) -docker rmi production-images-build:latest - rm production-image.created + -rm production-image.created endif - rm -rf .artifacts + -rm -rf .artifacts clean: clean-artifacts clean-dev - rm -rf .venv - rm -rf frozen-requirements.txt + -rm -rf .venv + -rm -rf frozen-requirements.txt clean-dev: rm -rf .venv-dev -- To view, visit https://gerrit.wikimedia.org/r/378953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f4718037e29b63024d2e1d80f9c707749b419e9 Gerrit-PatchSet: 1 Gerrit-Project: operations/docker-images/production-images Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...production-images[master]: Fixes to the build script:
Giuseppe Lavagetto has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378952 ) Change subject: Fixes to the build script: .. Fixes to the build script: * Change the working directory to the one where the Dockerfile template is located * Allow defining apt options in the config (for things like proxies) Change-Id: If1f3c3a765819f96798e4ad8de2fd5a60558a4ce --- M build M config.yaml 2 files changed, 41 insertions(+), 23 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/build b/build index a7b18c4..50c5dba 100755 --- a/build +++ b/build @@ -2,7 +2,7 @@ import argparse import os -from io import BytesIO +from contextlib import contextmanager import docker import docker.errors @@ -14,6 +14,14 @@ known_images = {} +@contextmanager +def pushd(dirname): +cur_dir = os.getcwd() +os.chdir(dirname) +yield +os.chdir(cur_dir) + + def find_image_tag(image_name): if image_name not in known_images: print('WARNING: image {name} not found'.format(name=image_name)) @@ -22,22 +30,26 @@ return "{}:{}".format(image.name, image.tag) -def apt_install(pkgs): -return """ -RUN apt-get update && \ -DEBIAN_FRONTEND=noninteractive \ -apt-get install --yes {packages} --no-install-recommends \ -&& apt-get clean && rm -rf /var/lib/apt/lists/* """.format(packages=pkgs) +def apt_installer(opts): +def apt_install(pkgs): +return """ +RUN apt-get update \ +&& DEBIAN_FRONTEND=noninteractive \ +apt-get install {apt_options} --yes {packages} --no-install-recommends \ +&& apt-get clean && rm -rf /var/lib/apt/lists/* """.format( +apt_options=opts, +packages=pkgs +) +return apt_install class DockerImage(object): -def __init__(self, path, config, base): -if not base.endswith('/'): -base += '/' +def __init__(self, path, config): +self.path = path env = Environment(loader=FileSystemLoader(path)) env.filters['image_tag'] = find_image_tag -env.filters['apt_install'] = apt_install +env.filters['apt_install'] = apt_installer(config['apt_options']) self.tpl = env.get_template('Dockerfile.template') self.config = config with open(os.path.join(path, 'changelog'), 'rb') as fh: @@ -53,17 +65,18 @@ print('===') print(dockerfile) print('===') -return BytesIO(bytes(dockerfile, 'utf8')) +return dockerfile class DockerBuilder(object): def __init__(self, directory, configfile): -self.base_directory = directory +self.base_directory = os.path.join(os.getcwd(), directory) self.config = { 'registry': 'docker-registry.wikimedia.org', 'username': None, 'password': None, -'seed_image': 'wikimedia-stretch' +'seed_image': 'wikimedia-stretch:latest', +'apt_options': '', } self.config.update(self._read_config(configfile)) self.client = docker.from_env(version='auto') @@ -84,7 +97,7 @@ print( 'Processing the dockerfile template in {base}'.format(base=root) ) -yield DockerImage(root, self.config, self.base_directory) +yield DockerImage(root, self.config) def image_exists(self, image): try: @@ -95,14 +108,19 @@ def build(self, image): print('Building image {name}:{version}'.format(name=image.name, version=image.tag)) +print('Build context: {path}'.format(path=image.path)) image_ref = "{name}:{tag}".format(name=image.name, tag=image.tag) -self.client.images.build( -fileobj=image.dockerfile, -tag=image_ref, -nocache=True, -rm=True, -pull=False, -) +with pushd(image.path): +with open('Dockerfile', 'w') as fh: +fh.write(image.dockerfile) +self.client.images.build( +path='.', +tag=image_ref, +nocache=True, +rm=True, +pull=False, +) +os.remove('Dockerfile') print("Image built.") fullname = os.path.join(self.config['registry'], image.name) for tag in [image.tag, 'latest']: diff --git a/config.yaml b/config.yaml index f75608c..fe1370b 100644 --- a/config.yaml +++ b/config.yaml @@ -1,2 +1,2 @@ registry: docker-registry.wikimedia.org -seed_image: wikimedia-jessie:latest +seed_image: wikimedia-stretch:latest -- To view, visit https://gerrit.wikimedia.org/r/378952 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1f3c3a765819f96798e4ad8de2fd5a60558a4ce Gerrit-PatchSet: 1 Gerrit-Project: operations/docker
[MediaWiki-commits] [Gerrit] mediawiki...GlobalCssJs[master]: Avoid using EditPage::$isCssJsSubpage and related variables
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379171 ) Change subject: Avoid using EditPage::$isCssJsSubpage and related variables .. Avoid using EditPage::$isCssJsSubpage and related variables These are being deprecated in Ie374a5cd4c9255b5. Change-Id: I54b15fbc135090f7323bddc89febaee51a46b8a2 --- M GlobalCssJs.hooks.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalCssJs refs/changes/71/379171/1 diff --git a/GlobalCssJs.hooks.php b/GlobalCssJs.hooks.php index 8491a77..66724a7 100644 --- a/GlobalCssJs.hooks.php +++ b/GlobalCssJs.hooks.php @@ -118,16 +118,17 @@ $gcssjsConfig = self::getConfig()->get( 'GlobalCssJsConfig' ); $config = $output->getConfig(); $user = $output->getUser(); + $title = $editPage->getTitle(); if ( $gcssjsConfig['wiki'] === wfWikiID() && $user->isLoggedIn() - && $editPage->formtype == 'initial' && $editPage->isCssJsSubpage + && $editPage->formtype == 'initial' && $title->isCssJsSubpage() ) { $title = $editPage->getTitle(); $name = $user->getName(); - if ( $config->get( 'AllowUserJs' ) && $editPage->isJsSubpage && + if ( $config->get( 'AllowUserJs' ) && $title->isJsSubpage() && $title->getText() == $name . '/global.js' ) { $msg = 'globalcssjs-warning-js'; - } elseif ( $config->get( 'AllowUserCss' ) && $editPage->isCssSubpage && + } elseif ( $config->get( 'AllowUserCss' ) && $title->isCssSubpage() && $title->getText() == $name . '/global.css' ) { $msg = 'globalcssjs-warning-css'; -- To view, visit https://gerrit.wikimedia.org/r/379171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54b15fbc135090f7323bddc89febaee51a46b8a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalCssJs Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Deprecate public isCssJsSubpage related member var...
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379170 ) Change subject: EditPage: Deprecate public isCssJsSubpage related member variables .. EditPage: Deprecate public isCssJsSubpage related member variables Just use the functions directly. Change-Id: Ie374a5cd4c9255b595ff4a88025738720434a802 --- M includes/EditPage.php 1 file changed, 25 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/70/379170/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index 7750b10..267feb1 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -220,16 +220,28 @@ /** @var bool */ public $isConflict = false; - /** @var bool */ + /** +* @deprecated since 1.30 use Title::isCssJsSubpage() +* @var bool +*/ public $isCssJsSubpage = false; - /** @var bool */ + /** +* @deprecated since 1.30 use Title::isCssSubpage() +* @var bool +*/ public $isCssSubpage = false; - /** @var bool */ + /** +* @deprecated since 1.30 use Title::isJsSubpage() +* @var bool +*/ public $isJsSubpage = false; - /** @var bool */ + /** +* @deprecated since 1.30 +* @var bool +*/ public $isWrongCaseCssJsPage = false; /** @var bool New page or new section */ @@ -612,10 +624,11 @@ $this->isConflict = false; // css / js subpages of user pages get a special treatment + // The following member variables are deprecated since 1.30, + // the functions should be used instead. $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage(); $this->isCssSubpage = $this->mTitle->isCssSubpage(); $this->isJsSubpage = $this->mTitle->isJsSubpage(); - // @todo FIXME: Silly assignment. $this->isWrongCaseCssJsPage = $this->isWrongCaseCssJsPage(); # Show applicable editing introductions @@ -2768,7 +2781,7 @@ $out->addHTML( $this->editFormTextBeforeContent ); - if ( !$this->isCssJsSubpage && $showToolbar && $user->getOption( 'showtoolbar' ) ) { + if ( !$this->mTitle->isCssJsSubpage() && $showToolbar && $user->getOption( 'showtoolbar' ) ) { $out->addHTML( self::getEditToolbar( $this->mTitle ) ); } @@ -3008,27 +3021,28 @@ ); } } else { - if ( $this->isCssJsSubpage ) { + if ( $this->mTitle->isCssJsSubpage() ) { # Check the skin exists - if ( $this->isWrongCaseCssJsPage ) { + if ( $this->isWrongCaseCssJsPage() ) { $out->wrapWikiMsg( "\n$1\n", [ 'userinvalidcssjstitle', $this->mTitle->getSkinFromCssJsSubpage() ] ); } if ( $this->getTitle()->isSubpageOf( $user->getUserPage() ) ) { + $isCssSubpage = $this->mTitle->isCssSubpage(); $out->wrapWikiMsg( '$1', - $this->isCssSubpage ? 'usercssispublic' : 'userjsispublic' + $isCssSubpage ? 'usercssispublic' : 'userjsispublic' ); if ( $this->formtype !== 'preview' ) { - if ( $this->isCssSubpage && $wgAllowUserCss ) { + if ( $isCssSubpage && $wgAllowUserCss ) { $out->wrapWikiMsg( "\n$1\n", [ 'usercssyoucanpreview' ] ); } - if ( $this->isJsSubpage && $wgAllowUserJs ) { + if ( $this->mTitle->isJsSubpage() && $wgAllowUserJs ) { $out->wrapWikiMsg( "\n$1\n", [ 'userjsyoucanpreview' ] -- To view, visit https://gerrit.wikimedia.org/r/379170 To unsubscribe, visit https://gerrit.wikimedia.org/r/
[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Remove call codeMirror.save()
Fomafix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379169 ) Change subject: Remove call codeMirror.save() .. Remove call codeMirror.save() codeMirror.toTextArea() already calls codeMirror.save(). Change-Id: Ifeb8c482149540832d6389a9337baffbf9ec03fb --- M resources/ext.CodeMirror.js 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror refs/changes/69/379169/1 diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js index d5d4c3e..2cf1099 100644 --- a/resources/ext.CodeMirror.js +++ b/resources/ext.CodeMirror.js @@ -334,7 +334,6 @@ if ( codeMirror ) { scrollTop = codeMirror.getScrollInfo().top; setCodeEditorPreference( false ); - codeMirror.save(); codeMirror.toTextArea(); codeMirror = null; $.fn.textSelection = origTextSelection; -- To view, visit https://gerrit.wikimedia.org/r/379169 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifeb8c482149540832d6389a9337baffbf9ec03fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeMirror Gerrit-Branch: master Gerrit-Owner: Fomafix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Use ::class syntax
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379168 ) Change subject: Use ::class syntax .. Use ::class syntax Change-Id: I7ae3827b971022ada4073b617ec1b4beb8af5824 --- M includes/index/IndexContentHandler.php M includes/page/PageContentHandler.php 2 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/68/379168/1 diff --git a/includes/index/IndexContentHandler.php b/includes/index/IndexContentHandler.php index 2b1f606..c8c64e9 100644 --- a/includes/index/IndexContentHandler.php +++ b/includes/index/IndexContentHandler.php @@ -123,8 +123,8 @@ */ public function getActionOverrides() { return [ - 'edit' => '\ProofreadPage\Index\IndexEditAction', - 'submit' => '\ProofreadPage\Index\IndexSubmitAction' + 'edit' => IndexEditAction::class, + 'submit' => IndexSubmitAction::class, ]; } @@ -132,7 +132,7 @@ * @see ContentHandler::getDiffEngineClass */ protected function getDiffEngineClass() { - return '\ProofreadPage\Index\IndexDifferenceEngine'; + return IndexDifferenceEngine::class; } /** diff --git a/includes/page/PageContentHandler.php b/includes/page/PageContentHandler.php index d86cf58..be7ab6b 100644 --- a/includes/page/PageContentHandler.php +++ b/includes/page/PageContentHandler.php @@ -205,9 +205,9 @@ */ public function getActionOverrides() { return [ - 'edit' => '\ProofreadPage\Page\PageEditAction', - 'submit' => '\ProofreadPage\Page\PageSubmitAction', - 'view' => '\ProofreadPage\Page\PageViewAction' + 'edit' => PageEditAction::class, + 'submit' => PageSubmitAction::class, + 'view' => PageViewAction::class, ]; } @@ -215,7 +215,7 @@ * @see ContentHandler::getDiffEngineClass */ protected function getDiffEngineClass() { - return '\ProofreadPage\Page\PageDifferenceEngine'; + return PageDifferenceEngine::class; } /** -- To view, visit https://gerrit.wikimedia.org/r/379168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ae3827b971022ada4073b617ec1b4beb8af5824 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ParserMigration[master]: MigrationEditPage: Avoid using wfMessage()
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379167 ) Change subject: MigrationEditPage: Avoid using wfMessage() .. MigrationEditPage: Avoid using wfMessage() Change-Id: I25c2050739b970af67a9e28b89d32ed57b05fbd5 --- M includes/MigrationEditPage.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserMigration refs/changes/67/379167/1 diff --git a/includes/MigrationEditPage.php b/includes/MigrationEditPage.php index d936caa..2480fff 100644 --- a/includes/MigrationEditPage.php +++ b/includes/MigrationEditPage.php @@ -39,8 +39,8 @@ $outputs[1]->setEditSectionTokens( false ); $previewHTML = "\n" . - "" . wfMessage( 'parsermigration-current' )->parse() . "\n" . - "" . wfMessage( 'parsermigration-new' )->parse() . "\n" . + "" . $this->context->msg( 'parsermigration-current' )->parse() . "\n" . + "" . $this->context->msg( 'parsermigration-new' )->parse() . "\n" . "\n" . "\n\n" . $outputs[0]->getText() . -- To view, visit https://gerrit.wikimedia.org/r/379167 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25c2050739b970af67a9e28b89d32ed57b05fbd5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ParserMigration Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do not run tests that depend on curl if it is not loaded
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378837 ) Change subject: Do not run tests that depend on curl if it is not loaded .. Do not run tests that depend on curl if it is not loaded Bug: T176193 Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed --- M tests/phpunit/includes/http/HttpTest.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/http/HttpTest.php b/tests/phpunit/includes/http/HttpTest.php index 3693a27..3790e3a 100644 --- a/tests/phpunit/includes/http/HttpTest.php +++ b/tests/phpunit/includes/http/HttpTest.php @@ -497,6 +497,10 @@ * @dataProvider provideCurlConstants */ public function testCurlConstants( $value ) { + if ( !extension_loaded( 'curl' ) ) { + $this->markTestSkipped( "PHP extension 'curl' is not loaded, skipping." ); + } + $this->assertTrue( defined( $value ), $value . ' not defined' ); } } -- To view, visit https://gerrit.wikimedia.org/r/378837 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Huji Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Try to avoid using $wgTitle
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379166 ) Change subject: EditPage: Try to avoid using $wgTitle .. EditPage: Try to avoid using $wgTitle The most common code path is from EditAction, so make sure EditPage::setContextTitle() is called in that case. Log any uses that fallback to $wgTitle in the GlobalTitleFail log group. Bug: T144366 Change-Id: Ie6c7dfbaa432239389d210051372427b8fa045b4 --- M includes/EditPage.php M includes/actions/EditAction.php 2 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/66/379166/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index 6bcf293..7750b10 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -469,6 +469,10 @@ */ public function getContextTitle() { if ( is_null( $this->mContextTitle ) ) { + wfDebugLog( + 'GlobalTitleFail', + __METHOD__ . ' called by ' . wfGetAllCallers( 5 ) . ' with no title set.' + ); global $wgTitle; return $wgTitle; } else { diff --git a/includes/actions/EditAction.php b/includes/actions/EditAction.php index acfd72e..f0bc8bf 100644 --- a/includes/actions/EditAction.php +++ b/includes/actions/EditAction.php @@ -56,6 +56,7 @@ if ( Hooks::run( 'CustomEditor', [ $page, $user ] ) ) { $editor = new EditPage( $page ); + $editor->setContextTitle( $this->getTitle() ); $editor->edit(); } } -- To view, visit https://gerrit.wikimedia.org/r/379166 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6c7dfbaa432239389d210051372427b8fa045b4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage::getCheckboxes: Stop respecting wgUseMediaWikiUIEve...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378346 ) Change subject: EditPage::getCheckboxes: Stop respecting wgUseMediaWikiUIEverywhere .. EditPage::getCheckboxes: Stop respecting wgUseMediaWikiUIEverywhere Change-Id: Ie61c523290c0eef324870f82a90fa852a57aac23 --- M includes/EditPage.php 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/EditPage.php b/includes/EditPage.php index 12966e5..248378c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -4185,8 +4185,6 @@ * @return array */ public function getCheckboxes( &$tabindex, $checked ) { - global $wgUseMediaWikiUIEverywhere; - $checkboxes = []; $checkboxesDef = $this->getCheckboxesDefinition( $checked ); @@ -4220,10 +4218,6 @@ Xml::check( $name, $options['default'], $attribs ) . ' ' . Xml::tags( 'label', $labelAttribs, $label ); - - if ( $wgUseMediaWikiUIEverywhere ) { - $checkboxHtml = Html::rawElement( 'div', [ 'class' => 'mw-ui-checkbox' ], $checkboxHtml ); - } $checkboxes[ $legacyName ] = $checkboxHtml; } -- To view, visit https://gerrit.wikimedia.org/r/378346 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie61c523290c0eef324870f82a90fa852a57aac23 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Tpt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Remove vars covered by WikimediaUI Base
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379165 ) Change subject: Remove vars covered by WikimediaUI Base .. Remove vars covered by WikimediaUI Base Remove vars already covered by WikimediaUI Base and rename `opacity--disabled` to `opacity-base--disabled` in the course. Bug: T165650 Change-Id: I875cd6aa8797324af4431089519ddac966287b88 --- M src/themes/wikimediaui/common.less M src/themes/wikimediaui/elements.less M src/themes/wikimediaui/widgets.less 3 files changed, 8 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/65/379165/1 diff --git a/src/themes/wikimediaui/common.less b/src/themes/wikimediaui/common.less index 46babdd..3e498d0 100644 --- a/src/themes/wikimediaui/common.less +++ b/src/themes/wikimediaui/common.less @@ -25,7 +25,6 @@ // Disabled Widgets @background-color-base--disabled: #eaecf0; @background-color-filled--disabled: #c8ccd1; -@opacity--disabled: 0.51; // `0.51` equals `#7d7d7d` on background-color `#fff`, HSB 0°/0%/49% @opacity-filled--disabled: 1; @opacity-indicator--disabled: 0.15; // equals `#c7c8cc` on background-color `#fff` @opacity-tool--disabled: 0.34; // equals `#a9a9a9` on background-color `#fff` @@ -140,8 +139,6 @@ @padding-start-menu-icon-label: 38 / @oo-ui-font-size-browser / @oo-ui-font-size-base; @padding-end-tagitem-close: 21 / @oo-ui-font-size-browser / @oo-ui-font-size-base; // equals `1.640625em`≈`21px`; -@box-shadow-dialog: 0 2px 2px 0 rgba( 0, 0, 0, 0.25 ); -@box-shadow-menu: @box-shadow-dialog; @box-shadow-toolbar-top: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 ); @box-shadow-toolbar-bottom: 0 -1px 1px 0 rgba( 0, 0, 0, 0.1 ); @box-shadow-widget: inset 0 0 0 1px transparent; @@ -151,7 +148,6 @@ @box-shadow-action--focus: @box-shadow-widget--focus, 0 0 0 1px @color-progressive; @box-shadow-input-binary--active: inset 0 0 0 1px @color-progressive--active; @box-shadow-erroneous--focus: inset 0 0 0 1px @color-erroneous; -@box-shadow-filled--disabled: inset 0 0 0 1px @color-filled--disabled; @font-size-fieldset-header: 1.15em; // equals `16.1px` at base `font-size: 12.8px`. Todo: Not able to get unified `16px` due to T @@ -163,10 +159,6 @@ @line-height-widget-multiline: 1.275; @line-height-widget-singleline: 1.172em; // Firefox needs a value, Chrome the unit; equals `15px` at base `font-size: 12.8px` @line-height-tagmultiselect-input: 1.563em; // equals `20px` at base `font-size: 12.8px` - -@opacity-icon-base: 0.87; // equals `#222` on background-color `#fff` -@opacity-icon-base--hover: 0.73; // equals `#454545` on background-color `#fff`, closest to `#444` -@opacity-icon-base--selected: 1; // Transition variables // Some of these values are duplicated in OO.ui.WikimediaUITheme diff --git a/src/themes/wikimediaui/elements.less b/src/themes/wikimediaui/elements.less index 6b7e967..237244f 100644 --- a/src/themes/wikimediaui/elements.less +++ b/src/themes/wikimediaui/elements.less @@ -260,7 +260,7 @@ > .oo-ui-iconElement-icon, > .oo-ui-indicatorElement-indicator { - opacity: @opacity--disabled; + opacity: @opacity-base--disabled; } } } diff --git a/src/themes/wikimediaui/widgets.less b/src/themes/wikimediaui/widgets.less index 4a9bed7..ad8973d 100644 --- a/src/themes/wikimediaui/widgets.less +++ b/src/themes/wikimediaui/widgets.less @@ -314,7 +314,7 @@ background-color: @background-color-base--disabled; > .oo-ui-iconElement-icon { - opacity: @opacity--disabled; + opacity: @opacity-base--disabled; } > .oo-ui-indicatorElement-indicator { @@ -550,7 +550,7 @@ &.oo-ui-widget-disabled { .oo-ui-iconElement-icon, .oo-ui-indicatorElement-indicator { - opacity: @opacity--disabled; + opacity: @opacity-base--disabled; } } } @@ -744,7 +744,7 @@ line-height: 2.5; &.oo-ui-widget-disabled { - opacity: @opacity--disabled; + opacity: @opacity-base--disabled; } } @@ -753,7 +753,7 @@ margin: @size-indicator / 2; &.oo-ui-widget-disabled { - opacity: @opacity--disabled; + opacity: @opacity-base--disabled; } } @@ -1477,7 +1477,7 @@ text-shadow: @text-shadow-base--disabled; > .oo-ui-iconElement-icon { - opacity: @opacity--disabled; + opacity: @opacity-base--disabled; } > .oo-ui-indicatorElement-indicator { @@ -1754
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: test_search_where_title: Also look into redirect titles
Dalba has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379164 ) Change subject: test_search_where_title: Also look into redirect titles .. test_search_where_title: Also look into redirect titles Bug: T176297 Change-Id: If75126526aaec6408462b500ca828d2e0bb96333 --- M tests/site_tests.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/64/379164/1 diff --git a/tests/site_tests.py b/tests/site_tests.py index 996389d..3adc9ee 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1487,7 +1487,11 @@ get_redirects=True, where='title'): self.assertIsInstance(hit, pywikibot.Page) self.assertEqual(hit.namespace(), 0) -self.assertIn('wiki', hit.title().lower()) +try: +self.assertIn('wiki', hit.title().lower()) +except AssertionError: +self.assertTrue(any('wiki' in r.title().lower() for r in +hit.getReferences(redirectsOnly=True))) except pywikibot.data.api.APIError as e: if e.code in ('search-title-disabled', 'gsrsearch-title-disabled'): raise unittest.SkipTest( -- To view, visit https://gerrit.wikimedia.org/r/379164 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If75126526aaec6408462b500ca828d2e0bb96333 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Dalba ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Don't use $wgRequest
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379163 ) Change subject: EditPage: Don't use $wgRequest .. EditPage: Don't use $wgRequest Bug: T144366 Change-Id: I392e165a6ba3c913ce6e415dbfcfb3cd51178a4e --- M includes/EditPage.php 1 file changed, 22 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/63/379163/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index 12966e5..ca19e3e 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -527,7 +527,6 @@ * the newly-edited page. */ public function edit() { - global $wgRequest; // Allow extensions to modify/prevent this form or submission if ( !Hooks::run( 'AlternateEdit', [ $this ] ) ) { return; @@ -535,13 +534,14 @@ wfDebug( __METHOD__ . ": enter\n" ); + $request = $this->context->getRequest(); // If they used redlink=1 and the page exists, redirect to the main article - if ( $wgRequest->getBool( 'redlink' ) && $this->mTitle->exists() ) { + if ( $request->getBool( 'redlink' ) && $this->mTitle->exists() ) { $this->context->getOutput()->redirect( $this->mTitle->getFullURL() ); return; } - $this->importFormData( $wgRequest ); + $this->importFormData( $request ); $this->firsttime = false; if ( wfReadOnly() && $this->save ) { @@ -700,10 +700,8 @@ * @throws PermissionsError */ protected function displayPermissionsError( array $permErrors ) { - global $wgRequest; - $out = $this->context->getOutput(); - if ( $wgRequest->getBool( 'redlink' ) ) { + if ( $this->context->getRequest()->getBool( 'redlink' ) ) { // The edit page was reached via a red link. // Redirect to the article page and let them click the edit tab if // they really want a permission error. @@ -785,17 +783,18 @@ * @return bool */ protected function previewOnOpen() { - global $wgRequest, $wgPreviewOnOpenNamespaces; - if ( $wgRequest->getVal( 'preview' ) == 'yes' ) { + global $wgPreviewOnOpenNamespaces; + $request = $this->context->getRequest(); + if ( $request->getVal( 'preview' ) == 'yes' ) { // Explicit override from request return true; - } elseif ( $wgRequest->getVal( 'preview' ) == 'no' ) { + } elseif ( $request->getVal( 'preview' ) == 'no' ) { // Explicit override from request return false; } elseif ( $this->section == 'new' ) { // Nothing *to* preview for new sections return false; - } elseif ( ( $wgRequest->getVal( 'preload' ) !== null || $this->mTitle->exists() ) + } elseif ( ( $request->getVal( 'preload' ) !== null || $this->mTitle->exists() ) && $this->context->getUser()->getOption( 'previewonfirst' ) ) { // Standard preference behavior @@ -1120,11 +1119,12 @@ * @since 1.21 */ protected function getContentObject( $def_content = null ) { - global $wgRequest, $wgContLang; + global $wgContLang; $content = false; $user = $this->context->getUser(); + $request = $this->context->getRequest(); // For message page not locally set, use the i18n message. // For other non-existent articles, use preload text if any. if ( !$this->mTitle->exists() || $this->section == 'new' ) { @@ -1136,10 +1136,10 @@ } if ( $content === false ) { # If requested, preload some text. - $preload = $wgRequest->getVal( 'preload', + $preload = $request->getVal( 'preload', // Custom preload text for new sections $this->section === 'new' ? 'MediaWiki:addsection-preload' : '' ); - $params = $wgRequest->getArray( 'preloadparams', [] ); + $params = $request->getArray( 'preloadparams', [] ); $content = $this->getPreloadedContent( $preload, $params ); } @@ -1154,8 +1154,8 @@ $content = $def_content;
[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Restrict `opacity` to non-flagged icons only
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379162 ) Change subject: demos: Restrict `opacity` to non-flagged icons only .. demos: Restrict `opacity` to non-flagged icons only Also make opacity follow base text color. Change-Id: I60532da11bcb52de314dc7f750c192839b0f31f6 --- M demos/styles/demo.css 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/62/379162/1 diff --git a/demos/styles/demo.css b/demos/styles/demo.css index 76cebb1..a3837b5 100644 --- a/demos/styles/demo.css +++ b/demos/styles/demo.css @@ -281,9 +281,9 @@ margin-right: 0; } -.demo-icons .oo-ui-fieldLayout .oo-ui-iconElement, +.demo-icons .oo-ui-fieldLayout .oo-ui-iconElement:not( .oo-ui-image-progressive ):not( .oo-ui-image-destructive ), .demo-icons .oo-ui-fieldLayout .oo-ui-indicatorElement { - opacity: 0.8; /* brings icons/indicators closer to text color */ + opacity: 0.87; /* brings icons/indicators closer to text color */ } .demo-icons .oo-ui-fieldLayout:hover .oo-ui-labelElement-label { @@ -291,7 +291,7 @@ } .demo-icons .oo-ui-fieldLayout:hover .oo-ui-iconElement, .demo-icons .oo-ui-fieldLayout:hover .oo-ui-indicatorElement { - opacity: 1; + opacity: 1 !important; /* stylelint-disable-line declaration-no-important */ } /* Widgets demo */ -- To view, visit https://gerrit.wikimedia.org/r/379162 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60532da11bcb52de314dc7f750c192839b0f31f6 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update Omnimail Recipient.load to support offset & limit
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379161 ) Change subject: Update Omnimail Recipient.load to support offset & limit .. Update Omnimail Recipient.load to support offset & limit Change-Id: Iecf88cd36b0cd2a0d12e9eb5093cc0f6ffb32d66 --- M sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php M sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php M sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php M sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnirecipient/Load.php M sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php 5 files changed, 76 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/61/379161/1 diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php index e58be97..bf2077b 100644 --- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php @@ -46,11 +46,8 @@ $startTimestamp = self::getStartTimestamp($params, $this->jobSettings); $this->endTimeStamp = self::getEndTimestamp(CRM_Utils_Array::value('end_date', $params), $settings, $startTimestamp); -if (isset($this->jobSettings['retrieval_parameters'])) { - if (!empty($params['end_date']) || !empty($params['start_date'])) { -throw new API_Exception('A prior retrieval is in progress. Do not pass in dates to complete a retrieval'); - } - $request->setRetrievalParameters($this->jobSettings['retrieval_parameters']); +if ($this->getRetrievalParameters()) { + $request->setRetrievalParameters($this->getRetrievalParameters()); } elseif ($startTimestamp) { $request->setStartTimeStamp($startTimestamp); diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php index 72aba34..981a757 100644 --- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php @@ -45,10 +45,19 @@ * CRM_Omnimail_Omnimail constructor. * * @param array $params + * + * @throws \API_Exception */ public function __construct($params) { $this->setJobSettings($params); $this->setOffset($params); + $this->setRetrievalParameters(CRM_Utils_Array::value('retrieval_parameters', $this->jobSettings)); + +if ($this->getRetrievalParameters()) { + if (!empty($params['end_date']) || !empty($params['start_date'])) { +throw new API_Exception('A prior retrieval is in progress. Do not pass in dates to complete a retrieval'); + } +} } /** diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php index 24a7c36..f03cb21 100644 --- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php @@ -37,15 +37,13 @@ /** @var Omnimail\Silverpop\Requests\RawRecipientDataExportRequest $request */ $request = Omnimail::create($params['mail_provider'], $mailerCredentials)->getRecipients(); +$request->setOffset($this->offset); $startTimestamp = self::getStartTimestamp($params, $this->jobSettings); $this->endTimeStamp = self::getEndTimestamp(CRM_Utils_Array::value('end_date', $params), $settings, $startTimestamp); -if (isset($this->jobSettings['retrieval_parameters'])) { - if (!empty($params['end_date']) || !empty($params['start_date'])) { -throw new API_Exception('A prior retrieval is in progress. Do not pass in dates to complete a retrieval'); - } - $request->setRetrievalParameters($this->jobSettings['retrieval_parameters']); +if ($this->getRetrievalParameters()) { + $request->setRetrievalParameters($this->getRetrievalParameters()); } elseif ($startTimestamp) { if ($this->endTimeStamp < $startTimestamp) { @@ -56,6 +54,7 @@ } $result = $request->getResponse(); +$this->setRetrievalParameters($result->getRetrievalParameters()); for ($i = 0; $i < $settings['omnimail_job_retry_number']; $i++) { if ($result->isCompleted()) { $data = $result->getData(); @@ -66,7 +65,7 @@ } } throw new CRM_Omnimail_IncompleteDownloadException('Download incomplete', 0, arra
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Improve populateIpChanges.php reporting
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379160 ) Change subject: Improve populateIpChanges.php reporting .. Improve populateIpChanges.php reporting Instead of just the rows we attempted to insert, also count actually inserted ones. Change-Id: Ie747cb41873640776281794a90dbe3b6b8e3fa84 --- M maintenance/populateIpChanges.php 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/60/379160/1 diff --git a/maintenance/populateIpChanges.php b/maintenance/populateIpChanges.php index f7bcc12..2b2a2b4 100644 --- a/maintenance/populateIpChanges.php +++ b/maintenance/populateIpChanges.php @@ -72,7 +72,8 @@ ? $maxRevId : $dbw->selectField( 'revision', 'MAX(rev_id)', false, __METHOD__ ); $blockStart = $start; - $revCount = 0; + $attempted = 0; + $inserted = 0; $this->output( "Copying IP revisions to ip_changes, from rev_id $start to rev_id $end\n" ); @@ -105,7 +106,7 @@ 'ipc_hex' => IP::toHex( $row->rev_user_text ), ]; - $revCount++; + $attempted++; } } @@ -116,13 +117,15 @@ 'IGNORE' ); + $inserted += $dbw->affectedRows(); + $lbFactory->waitForReplication(); usleep( $throttle * 1000 ); $blockStart = $blockEnd + 1; } - $this->output( "$revCount IP revisions copied.\n" ); + $this->output( "Attempted to insert $attempted IP revisions, $inserted actually done.\n" ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/379160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie747cb41873640776281794a90dbe3b6b8e3fa84 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MaxSem ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: [WIP] Add cclike operator to normalize and compare a string ...
Dmaza has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379159 ) Change subject: [WIP] Add cclike operator to normalize and compare a string to a list .. [WIP] Add cclike operator to normalize and compare a string to a list cclike operator will normalize the left operand and compare against the normalized version of each of the elements in the right operand Bug: T65242 Change-Id: I4034c0054a6849babbf2d96ea13dc97d3660d5b4 --- M i18n/en.json M includes/AbuseFilter.class.php M includes/parser/AFPData.php M includes/parser/AbuseFilterParser.php M includes/parser/AbuseFilterTokenizer.php A tests/parserTests/cclike.r A tests/parserTests/cclike.t 7 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/59/379159/1 diff --git a/i18n/en.json b/i18n/en.json index 0d32b9f..b526401 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -220,6 +220,7 @@ "abusefilter-edit-builder-misc-stringlit": "String literal (\"\")", "abusefilter-edit-builder-misc-tern": "Ternary operator (X ? Y : Z)", "abusefilter-edit-builder-misc-cond": "Conditional (if X then Y else Z)", + "abusefilter-edit-builder-misc-cclike": "Normalize string and compare against list", "abusefilter-edit-builder-group-funcs": "Functions", "abusefilter-edit-builder-funcs-length": "String length (length)", "abusefilter-edit-builder-funcs-lcase": "To lower case (lcase)", diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php index 3ce5cdb..6eac7db 100644 --- a/includes/AbuseFilter.class.php +++ b/includes/AbuseFilter.class.php @@ -56,6 +56,7 @@ ], 'misc' => [ 'in' => 'in', + 'cclike' => 'cclike', 'contains' => 'contains', 'like' => 'like', '""' => 'stringlit', diff --git a/includes/parser/AFPData.php b/includes/parser/AFPData.php index d5a0069..66f6a5e 100644 --- a/includes/parser/AFPData.php +++ b/includes/parser/AFPData.php @@ -156,6 +156,31 @@ } /** +* Normalizes operands and compares if they are equal +* +* @param $a AFPData +* @param $b AFPData +* @return AFPData +*/ + public static function keywordCclike( $a, $b ) { + $a = $a->toString(); + $b = $b->toList(); + + if ( $a == '' || !$b ) { + return new AFPData( self::DBOOL, false ); + } + + $a = AbuseFilterParser::ccnorm( $a ); + foreach ( $b as $val ) { + if ( $a === AbuseFilterParser::ccnorm( $val->toString() ) ) { + return new AFPData( self::DBOOL, true ); + } + } + + return new AFPData( self::DBOOL, false ); + } + + /** * @param $a AFPData * @param $b AFPData * @return AFPData diff --git a/includes/parser/AbuseFilterParser.php b/includes/parser/AbuseFilterParser.php index f9bd15b..e94732f 100644 --- a/includes/parser/AbuseFilterParser.php +++ b/includes/parser/AbuseFilterParser.php @@ -48,7 +48,8 @@ 'contains' => 'keywordContains', 'rlike' => 'keywordRegex', 'irlike' => 'keywordRegexInsensitive', - 'regex' => 'keywordRegex' + 'regex' => 'keywordRegex', + 'cclike' => 'keywordCclike' ]; public static $funcCache = []; @@ -1105,7 +1106,7 @@ * @param $s * @return mixed */ - protected function ccnorm( $s ) { + public static function ccnorm( $s ) { if ( is_callable( 'AntiSpoof::normalizeString' ) ) { $s = AntiSpoof::normalizeString( $s ); } else { diff --git a/includes/parser/AbuseFilterTokenizer.php b/includes/parser/AbuseFilterTokenizer.php index 025314e..0ce1969 100644 --- a/includes/parser/AbuseFilterTokenizer.php +++ b/includes/parser/AbuseFilterTokenizer.php @@ -54,7 +54,7 @@ public static $keywords = [ 'in', 'like', 'true', 'false', 'null', 'contains', 'matches', - 'rlike', 'irlike', 'regex', 'if', 'then', 'else', 'end', + 'rlike', 'irlike', 'regex', 'if', 'then', 'else', 'end', 'cclike', ]; /** diff --git a/tests/parserTests/cclike.r b/tests/parserTests/cclike.r new file mode 100644 index 000..4736e08 --- /dev/null +++ b/tests/parserTests/cclike.r @@ -0,0 +1 @@ +MATCH diff --git a/tests/parserTests/cclike.t b/tests/parserTests/cclike.t new file mode 100644 index 000..70646cd --- /dev/null +++ b/tests/parserTests/cclike.t @@ -0,0 +1 @@ +"4any0ne" cclike ["FOO", "AANYONE"] -- To view, visit https://gerrit.wikimedi
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update Omnimail vendor dir to support offset on recipients.
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379158 ) Change subject: Update Omnimail vendor dir to support offset on recipients. .. Update Omnimail vendor dir to support offset on recipients. Bug: T176255 Change-Id: If69008533ea2fd41a8f5b9b0c45ed6868389d0a8 --- M composer.lock M sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/58/379158/1 diff --git a/composer.lock b/composer.lock index 9ed29b5..d8d5255 100644 --- a/composer.lock +++ b/composer.lock @@ -2153,7 +2153,7 @@ "source": { "type": "git", "url": "https://github.com/eileenmcnaughton/omnimail-silverpop.git";, -"reference": "313ef51cc3990238438f5dc5207b25cb132ea131" +"reference": "288f2602952468a4fd5874b11b1bd8da5b0dfb7b" }, "require": { "league/csv": "^8.0", @@ -2192,7 +2192,7 @@ "omnimail", "silverpop" ], -"time": "2017-09-12T23:04:53+00:00" +"time": "2017-09-20 02:50:06" }, { "name": "wikimedia/smash-pig", diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock b/sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock index b7d59a5..4289602 100644 --- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock @@ -707,7 +707,7 @@ "source": { "type": "git", "url": "https://github.com/eileenmcnaughton/omnimail-silverpop.git";, -"reference": "313ef51cc3990238438f5dc5207b25cb132ea131" +"reference": "288f2602952468a4fd5874b11b1bd8da5b0dfb7b" }, "require": { "league/csv": "^8.0", @@ -746,7 +746,7 @@ "omnimail", "silverpop" ], -"time": "2017-09-19 01:57:49" +"time": "2017-09-20 02:50:06" } ], "packages-dev": [ -- To view, visit https://gerrit.wikimedia.org/r/379158 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If69008533ea2fd41a8f5b9b0c45ed6868389d0a8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Change progressive action to full opacity
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379157 ) Change subject: Change progressive action to full opacity .. Change progressive action to full opacity Changing progressive icon signified action over to align to OOUI icon behavior. Change-Id: I0d338aa2dea0e25d992f04fb5c9072b66689e5c9 --- M modules/styles/board/topic/watchlist.less 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/57/379157/1 diff --git a/modules/styles/board/topic/watchlist.less b/modules/styles/board/topic/watchlist.less index 185b058..a1cc833 100644 --- a/modules/styles/board/topic/watchlist.less +++ b/modules/styles/board/topic/watchlist.less @@ -61,6 +61,10 @@ } } + .flow-unwatch.mw-ui-icon-unStar-progressive { + opacity: 1; + } + // Correct positioning for ltr/rtl content direction .mw-content-ltr & { /* @noflip */ -- To view, visit https://gerrit.wikimedia.org/r/379157 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d338aa2dea0e25d992f04fb5c9072b66689e5c9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Align added to watchlist tooltip to style guide and replace ...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379154 ) Change subject: Align added to watchlist tooltip to style guide and replace deprecated icon .. Align added to watchlist tooltip to style guide and replace deprecated icon Aligning “This topic has been added to your watchlist.” tooltip to style guide by: - removing `opacity` of tooltip - aligning `padding` with popups elsewhere - limiting icon size to `32px` as it shouldn't be bigger than f.e. “Browse topics” icon and - aligning `box-shadow`. Also exchanging deprecated 'watchlist' icon with 'unStar' icon & using `strong` instead of CSS in preparation of screenreader usage. Bug: T176296 Depends-on: I7e1cd4898d30a03da09defbb76e2fbe3be374b6f Change-Id: Ibb79740462a9c9a880cc71fbea70207ef47525bf --- M handlebars/flow_subscribed.partial.handlebars M modules/styles/board/topic/titlebar.less M modules/styles/mediawiki.ui/tooltips.less 3 files changed, 24 insertions(+), 16 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/handlebars/flow_subscribed.partial.handlebars b/handlebars/flow_subscribed.partial.handlebars index 26a5947..cacf489 100644 --- a/handlebars/flow_subscribed.partial.handlebars +++ b/handlebars/flow_subscribed.partial.handlebars @@ -1,7 +1,9 @@ - + - {{!-- flow-topic-notification-subscribe-title and flow-board-notification-subscribe-title --}} - {{l10n (concat "flow-" type "-notification-subscribe-title") user }} + + {{!-- flow-topic-notification-subscribe-title and flow-board-notification-subscribe-title --}} + {{l10n (concat "flow-" type "-notification-subscribe-title") user }} + {{!-- flow-topic-notification-subscribe-description and flow-board-notification-subscribe-description --}} diff --git a/modules/styles/board/topic/titlebar.less b/modules/styles/board/topic/titlebar.less index 0097310..fb7ffc3 100644 --- a/modules/styles/board/topic/titlebar.less +++ b/modules/styles/board/topic/titlebar.less @@ -94,17 +94,25 @@ .flow-notification-tooltip-topicsub { width: 15em; } -.flow-notification-tooltip-icon { - font-size: 2.5em; - text-align: center; +.flow-notification-tooltip-icon { .mw-ui-icon { - display: inline-block; + display: block; + margin-left: auto; + margin-right: auto; + + &.mw-ui-icon-star { // Overwrite default `.mw-ui-icon` properties + min-width: 32px; + width: 32px; + max-width: 32px; + min-height: 32px; + font-size: 32px; + line-height: 1; + } } } .flow-notification-tooltip-title { font-size: 1em; - font-weight: bold; } .flow-undo { diff --git a/modules/styles/mediawiki.ui/tooltips.less b/modules/styles/mediawiki.ui/tooltips.less index 01f3dfa..9259ee2 100644 --- a/modules/styles/mediawiki.ui/tooltips.less +++ b/modules/styles/mediawiki.ui/tooltips.less @@ -16,16 +16,16 @@ Styleguide 4.0. */ .flow-ui-tooltip { + background-color: #fff; + color: @colorText; position: relative; top: 1px; display: inline-block; - padding: 0.5em; - background: #fff; - color: @colorText; - word-wrap: break-word; border-radius: @borderRadius; - .box-shadow( ~'0 2px 0 0 @{colorGray12}, 0 0 1px 0 @{colorGray12}' ); - opacity: 0.9; + padding: 0.571em 0.857em; // equals to ~8px ~12px with base `font-size` + .box-shadow( ~'0 2px 2px 0 rgba(0, 0, 0, 0.25)' ); + font-size: 0.875em; // not inherited from div#bodyContent, as we insert at body + word-wrap: break-word; z-index: 99; a { @@ -34,8 +34,6 @@ color: #fff !important; /* stylelint-disable-line declaration-no-important */ font-weight: bold; } - - font-size: 0.875em; // not inherited from div#bodyContent, as we insert at body #bodyContent & { /* stylelint-disable-line selector-no-id */ font-size: 1em; -- To view, visit https://gerrit.wikimedia.org/r/379154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb79740462a9c9a880cc71fbea70207ef47525bf Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Align icon opacity to text color
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379155 ) Change subject: Align icon opacity to text color .. Align icon opacity to text color Similar to OOUI, we're aligning icon opacity of black SVGs to be close to base text color of `#222`. Change-Id: I7e1cd4898d30a03da09defbb76e2fbe3be374b6f --- M modules/styles/common.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/styles/common.less b/modules/styles/common.less index 7a69551..6e34c40 100644 --- a/modules/styles/common.less +++ b/modules/styles/common.less @@ -303,7 +303,7 @@ /* stylelint-enable selector-no-id */ span.mw-ui-icon { - opacity: 0.7; + opacity: 0.87; // equals `#222` on background-color `#fff` } span.mw-ui-icon.mw-ui-icon-before:before { -- To view, visit https://gerrit.wikimedia.org/r/379155 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7e1cd4898d30a03da09defbb76e2fbe3be374b6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Minor refactor on Omnimail classes.
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379156 ) Change subject: Minor refactor on Omnimail classes. .. Minor refactor on Omnimail classes. These classes have gotten a bit out of sync / duplicatey. This is a minor commit to add a constructor & to start doing shared wrangling in the constructor. Preliminary to changes to support offset. Bug: T176255 Change-Id: I1974f8b2bc41ea2f1fd708cb8a365d0921395c74 --- M sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php M sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php M sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php 3 files changed, 65 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/56/379156/1 diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php index 3e8c48f..e58be97 100644 --- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php @@ -31,7 +31,6 @@ * @throws \API_Exception */ public function getResult($params) { -$jobSettings = self::getJobSettings($params); $settings = CRM_Omnimail_Helper::getSettings(); $mailerCredentials = CRM_Omnimail_Helper::getCredentials($params); @@ -40,23 +39,18 @@ $jobParameters['exportType'] = 'OPT_IN'; } +/* @var \Omnimail\Silverpop\Requests\ExportListRequest $request */ $request = Omnimail::create($params['mail_provider'], $mailerCredentials)->getGroupMembers($jobParameters); -$offset = CRM_Utils_Array::value('offset', $jobSettings, 0); -if (isset($params['options']['offset'])) { - $offset = $params['options']['offset']; -} -if ($offset) { - $request->setOffset((int) $offset); -} +$request->setOffset((int) $this->offset); -$startTimestamp = self::getStartTimestamp($params, $jobSettings); +$startTimestamp = self::getStartTimestamp($params, $this->jobSettings); $this->endTimeStamp = self::getEndTimestamp(CRM_Utils_Array::value('end_date', $params), $settings, $startTimestamp); -if (isset($jobSettings['retrieval_parameters'])) { +if (isset($this->jobSettings['retrieval_parameters'])) { if (!empty($params['end_date']) || !empty($params['start_date'])) { throw new API_Exception('A prior retrieval is in progress. Do not pass in dates to complete a retrieval'); } - $request->setRetrievalParameters($jobSettings['retrieval_parameters']); + $request->setRetrievalParameters($this->jobSettings['retrieval_parameters']); } elseif ($startTimestamp) { $request->setStartTimeStamp($startTimestamp); @@ -129,6 +123,5 @@ } return $value; } - } diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php index 04a548f..6712965 100644 --- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php @@ -26,11 +26,30 @@ */ public $endTimeStamp; + /** + * @var int + */ + protected $offset; + + /** + * @var array + */ + protected $jobSettings = array(); /** * @var array */ protected $retrievalParameters; + + /** + * CRM_Omnimail_Omnimail constructor. + * + * @param array $params + */ + public function __construct($params) { +$this->setJobSettings($params); +$this->setOffset($params); + } /** * @return array @@ -95,9 +114,42 @@ * @return array */ public function getJobSettings($params) { +if (empty($this->jobSettings)) { + $this->setJobSettings($params); +} +return $this->jobSettings; + } + + /** + * @return int + */ + public function getOffset() { +return $this->offset; + } + + /** + * Set the offset to start loading from. + * + * This is the row in the csv file to start from in csv jobs. + * + * @param array $params + * @param \Omnimail\Silverpop\Requests\SilverpopBaseRequest $request + * + * @return mixed + */ + protected function setOffset($params, $request) { +$this->offset = CRM_Utils_Array::value('offset', $this->jobSettings, 0); +if (isset($params['options']['offset'])) { + $this->offset = $params['options']['offset']; +} + } + + /** + * @param $params + */ + protected function setJobSettings($params) { $settings = CRM_Omnimail_Helper::getSettings(); -$jobSettings = CRM_Utils_Array::value($params['mail_provider'], $settings['o
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Don't remove mw-changeslist-line-prefix in enhanc...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379121 ) Change subject: RCFilters: Don't remove mw-changeslist-line-prefix in enhanced mode .. RCFilters: Don't remove mw-changeslist-line-prefix in enhanced mode It contains the 'x' buttons to unwatch pages when the relevant preference is enabled, so we shouldn't remove it. To make the table still work, we have to add an extra to the nested rows, and start the highlight one row later. Bug: T176264 Change-Id: Ie8eb913d55165ad2c548230cd61cd9ee189d9504 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js 2 files changed, 11 insertions(+), 8 deletions(-) Approvals: jenkins-bot: Verified Mooeypoo: Looks good to me, approved diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less index b4e3b0e..6c8ebac 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less @@ -51,7 +51,7 @@ .mw-rcfilters-ui-changesListWrapperWidget li&, .mw-rcfilters-ui-changesListWrapperWidget & tr:first-child, .mw-rcfilters-ui-changesListWrapperWidget tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-toplevel:not(.mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey) td:not( :nth-child( -n+2 ) ), - .mw-rcfilters-ui-changesListWrapperWidget tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-nested:not(.mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey) td:not( :nth-child( -n+3 ) ) { + .mw-rcfilters-ui-changesListWrapperWidget tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-nested:not(.mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey) td:not( :nth-child( -n+4 ) ) { background-color: @bgcolor; } } diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js index f331f75..b0550b2 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js @@ -312,14 +312,17 @@ ); // We are adding and changing cells in a table that, despite having nested rows, - // is actually all one big table. To do that right, we want to remove the 'placeholder' - // cell from the top row, because we're actually adding that placeholder in the children - // with the highlights. - $content.find( 'table.mw-enhanced-rc tr:first-child td.mw-changeslist-line-prefix' ) - .detach(); + // is actually all one big table. To prevent the highlights cell in the "nested" + // rows from stretching out the cell with the flags and timestamp in the top row, + // we give the latter colspan=2. Then to make things line up again, we add + // an empty to the "nested" rows. + + // Set colspan=2 on cell with flags and timestamp in top row $content.find( 'table.mw-enhanced-rc tr:first-child td.mw-enhanced-rc' ) .prop( 'colspan', '2' ); - + // Add empty to nested rows to compensate + $enhancedNestedPagesCell.parent().prepend( $( '' ) ); + // Add highlights cell to nested rows $enhancedNestedPagesCell .before( $( '' ) @@ -329,7 +332,7 @@ // We need to target the nested rows differently than the top rows so that the // LESS rules applies correctly. In top rows, the rule should highlight all but // the first 2 cells td:not( :nth-child( -n+2 ) and the nested rows, the rule - // should highlight all but the first 3 cells td:not( :nth-child( -n+3 ) + // should highlight all but the first 4 cells td:not( :nth-child( -n+4 ) $enhancedNestedPagesCell .closest( 'tr' ) .addClass( 'mw-rcfilters-ui-changesListWrapperWidget-enhanced-nested' ); -- To view, visit https://gerrit.wikimedia.org/r/379121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8eb913d55165ad2c548230cd61cd9ee189d9504 Gerrit-PatchSet: 2 Gerrit-Project: mediawi
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Align icon opacity to text color
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379155 ) Change subject: Align icon opacity to text color .. Align icon opacity to text color Similar to OOUI, we're aligning icon opacity of black SVGs to be close to base text color of `#222`. Change-Id: I7e1cd4898d30a03da09defbb76e2fbe3be374b6f --- M modules/styles/common.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/55/379155/1 diff --git a/modules/styles/common.less b/modules/styles/common.less index 7a69551..6e34c40 100644 --- a/modules/styles/common.less +++ b/modules/styles/common.less @@ -303,7 +303,7 @@ /* stylelint-enable selector-no-id */ span.mw-ui-icon { - opacity: 0.7; + opacity: 0.87; // equals `#222` on background-color `#fff` } span.mw-ui-icon.mw-ui-icon-before:before { -- To view, visit https://gerrit.wikimedia.org/r/379155 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e1cd4898d30a03da09defbb76e2fbe3be374b6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Provide base href in Echo's HTML emails
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379151 ) Change subject: Provide base href in Echo's HTML emails .. Provide base href in Echo's HTML emails While working on my own Echo notifications for CategoryWatch, I came across this bug. I was happy to see that someone else identified this a while back. Wikitext-to-html production for the body of Echo messages does not fully qualify urls. This means that links are created pointing to, for example, "/w/index.php..." instead of "http://example.com/w/index.php...";. Supplying a base URL in the html for the message fixes this problem. Bug: T141521 Change-Id: Icfb9f3be58b83d2a441972adb58fef1169169d7c --- M includes/formatters/EchoHtmlEmailFormatter.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/formatters/EchoHtmlEmailFormatter.php b/includes/formatters/EchoHtmlEmailFormatter.php index 5cf41cd..4c28fe6 100644 --- a/includes/formatters/EchoHtmlEmailFormatter.php +++ b/includes/formatters/EchoHtmlEmailFormatter.php @@ -51,6 +51,7 @@ $iconImgSrc = Sanitizer::encodeAttribute( $emailIcon ); + global $wgCanonicalServer; return <<< EOF @@ -60,6 +61,7 @@ table[id="email-container"]{max-width:600px !important; width:100% !important;} } + -- To view, visit https://gerrit.wikimedia.org/r/379151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icfb9f3be58b83d2a441972adb58fef1169169d7c Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: MarkAHershberger Gerrit-Reviewer: Catrope Gerrit-Reviewer: MarkAHershberger Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Redo the way spinners and ready/loading states ar...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379143 ) Change subject: RCFilters: Redo the way spinners and ready/loading states are managed .. RCFilters: Redo the way spinners and ready/loading states are managed The mw-rcfilters-ui-ready class was being set on no fewer than 4 elements, all with different meanings, and some with no relevant styling at all. It also did not distinguish between "the UI is initializing" and "we are loading new results". Remove mw-rcfilters-ui-ready completely (and remove some code that added or removed it pointlessly), and create two new CSS classes on the . mw-rcfilters-ui-initialized is added when the UI has initialized, and is used to hide the old UI and display a spinner while the UI loads. mw-rcfilters-ui-loading is added when we start loading new results and removed when they arrive; it's used to grey out the results area and add a spinner. Bonus: make the spinner appear in a different place depending on why it's being shown: when initializing, it's shown in the place where the UI will soon appear; when loading, it's shown near the top of the changes list. Change-Id: Ib5c8a36654ba44880823fdade8cad52ffa59ed69 --- M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js 6 files changed, 37 insertions(+), 28 deletions(-) Approvals: jenkins-bot: Verified Mooeypoo: Looks good to me, approved diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js index 83e5796..13da97f 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js @@ -50,8 +50,9 @@ filtersModel, changesListModel, controller, $( 'fieldset.cloptions' ) ); $( '.rcfilters-container' ).append( filtersWidget.$element ); - $( 'body' ).append( $overlay ); - $( '.rcfilters-head' ).addClass( 'mw-rcfilters-ui-ready' ); + $( 'body' ) + .append( $overlay ) + .addClass( 'mw-rcfilters-ui-initialized' ); $( 'a.mw-helplink' ).attr( 'href', diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index cc5ecd4..0ab2c01 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -1,6 +1,9 @@ @import 'mediawiki.mixins.animation'; @import 'mw.rcfilters.mixins'; +@rcfilters-spinner-width: 70px; +@rcfilters-head-min-height: 200px; + // Corrections for the standard special page .client-js { .cloptions { @@ -8,15 +11,14 @@ } .rcfilters-head { - min-height: 200px; + min-height: @rcfilters-head-min-height; + } + body:not( .mw-rcfilters-ui-initialized ) .rcfilters-head { + opacity: 0.5; + pointer-events: none; - &:not( .mw-rcfilters-ui-ready ) { - opacity: 0.5; - pointer-events: none; - - .cloptions { - display: none; - } + .cloptions { + display: none; } } @@ -32,22 +34,23 @@ // message of our own display: none; } + } - &:not( .mw-rcfilters-ui-ready ) { - opacity: 0.5; - } + body:not( .mw-rcfilters-ui-initialized ) .mw-changeslist, + body.mw-rcfilters-ui-loading .mw-changeslist { + opacity: 0.5; } .rcfilters-spinner { - margin: -2em auto 0; - width: 70px; - opacity: 0.8; display: none; - white-space: nowrap; + position: absolute; + left: 50%; + width: @rcfilters-spinner-width; + // Make sure the middle of the spinner is centered, rather than its left edge + margin-left: -@rcfilters-spinner-width/2; - &:not( .mw-rcfilters-ui-ready ) { - display: block; - } + opacity: 0.8; + white-space: nowrap; & .rcfilters-spinner-bo
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Align added to watchlist tooltip to style guide and replace ...
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379154 ) Change subject: Align added to watchlist tooltip to style guide and replace deprecated icon .. Align added to watchlist tooltip to style guide and replace deprecated icon Aligning “This topic has been added to your watchlist.” tooltip to style guide by: - removing `opacity` of tooltip - aligning `padding` with popups elsewhere - make icon same color as surrounding text - limiting icon size to `32px` as it shouldn't be bigger than f.e. “Browse topics” icon Also exchanging deprecated 'watchlist' icon with 'unStar' icon. Bug: T176296 Change-Id: Ibb79740462a9c9a880cc71fbea70207ef47525bf --- M handlebars/flow_subscribed.partial.handlebars M modules/styles/board/topic/titlebar.less M modules/styles/mediawiki.ui/tooltips.less 3 files changed, 23 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/54/379154/1 diff --git a/handlebars/flow_subscribed.partial.handlebars b/handlebars/flow_subscribed.partial.handlebars index 26a5947..ed0c051 100644 --- a/handlebars/flow_subscribed.partial.handlebars +++ b/handlebars/flow_subscribed.partial.handlebars @@ -1,7 +1,9 @@ - + + {{!-- flow-topic-notification-subscribe-title and flow-board-notification-subscribe-title --}} {{l10n (concat "flow-" type "-notification-subscribe-title") user }} + {{!-- flow-topic-notification-subscribe-description and flow-board-notification-subscribe-description --}} diff --git a/modules/styles/board/topic/titlebar.less b/modules/styles/board/topic/titlebar.less index 0097310..4abc566 100644 --- a/modules/styles/board/topic/titlebar.less +++ b/modules/styles/board/topic/titlebar.less @@ -94,17 +94,26 @@ .flow-notification-tooltip-topicsub { width: 15em; } -.flow-notification-tooltip-icon { - font-size: 2.5em; - text-align: center; +.flow-notification-tooltip-icon { .mw-ui-icon { - display: inline-block; + display: block; + margin-left: auto; + margin-right: auto; + opacity: 0.87; // equals `#222` on background-color `#fff` + + &.mw-ui-icon-star { // Overwrite default `.mw-ui-icon` properties + min-width: 32px; + width: 32px; + max-width: 32px; + min-height: 32px; + font-size: 32px; + line-height: 1; + } } } .flow-notification-tooltip-title { font-size: 1em; - font-weight: bold; } .flow-undo { diff --git a/modules/styles/mediawiki.ui/tooltips.less b/modules/styles/mediawiki.ui/tooltips.less index 01f3dfa..9259ee2 100644 --- a/modules/styles/mediawiki.ui/tooltips.less +++ b/modules/styles/mediawiki.ui/tooltips.less @@ -16,16 +16,16 @@ Styleguide 4.0. */ .flow-ui-tooltip { + background-color: #fff; + color: @colorText; position: relative; top: 1px; display: inline-block; - padding: 0.5em; - background: #fff; - color: @colorText; - word-wrap: break-word; border-radius: @borderRadius; - .box-shadow( ~'0 2px 0 0 @{colorGray12}, 0 0 1px 0 @{colorGray12}' ); - opacity: 0.9; + padding: 0.571em 0.857em; // equals to ~8px ~12px with base `font-size` + .box-shadow( ~'0 2px 2px 0 rgba(0, 0, 0, 0.25)' ); + font-size: 0.875em; // not inherited from div#bodyContent, as we insert at body + word-wrap: break-word; z-index: 99; a { @@ -34,8 +34,6 @@ color: #fff !important; /* stylelint-disable-line declaration-no-important */ font-weight: bold; } - - font-size: 0.875em; // not inherited from div#bodyContent, as we insert at body #bodyContent & { /* stylelint-disable-line selector-no-id */ font-size: 1em; -- To view, visit https://gerrit.wikimedia.org/r/379154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb79740462a9c9a880cc71fbea70207ef47525bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ParsoidBatchAPI[master]: Pass revid to parse request
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/377940 ) Change subject: Pass revid to parse request .. Pass revid to parse request * Ports the changes from core commit af3bd08f Change-Id: I54d38ce423d702dbf4e446ee902fe55df08846cb --- M includes/ApiParsoidBatch.php 1 file changed, 23 insertions(+), 5 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiParsoidBatch.php b/includes/ApiParsoidBatch.php index 76643ce..7bbf4e9 100644 --- a/includes/ApiParsoidBatch.php +++ b/includes/ApiParsoidBatch.php @@ -123,11 +123,28 @@ $this->dieUsage( "Invalid title ($itemIndex)", 'invalid_title' ); } } + $revid = null; + if ( isset( $itemParams['revid'] ) ) { + $revid = intval( $itemParams['revid'] ); + $rev = Revision::newFromId( $revid ); + if ( !$rev ) { + if ( is_callable( [ $this, 'dieWithError' ] ) ) { + $this->dieWithError( [ 'apierror-nosuchrevid', $revid ] ); + } else { + $this->dieUsage( "There is no revision ID $revid", 'missingrev' ); + } + } + $pTitle = $title; + $title = $rev->getTitle(); + if ( !$title->equals( $pTitle ) ) { + $this->addWarning( [ 'apierror-revwrongpage', $rev->getId(), + wfEscapeWikiText( $pTitle->getPrefixedText() ) ] ); + } + } $text = $itemParams['text']; - $revid = isset( $itemParams['revid'] ) ? intval( $itemParams['revid'] ) : false; switch ( $action ) { case 'parse': - $itemResult = $this->parse( $text, $title ); + $itemResult = $this->parse( $text, $title, $revid ); break; case 'preprocess': $itemResult = $this->preprocess( $text, $title, $revid ); @@ -212,12 +229,13 @@ /** * @param string $text * @param Title $title +* @param int|null $revid * * @return array * @throws MWException * @throws MWUnknownContentModelException */ - protected function parse( $text, Title $title ) { + protected function parse( $text, Title $title, $revid ) { global $wgParser; $contentHandler = ContentHandler::getForModelID( CONTENT_MODEL_WIKITEXT ); @@ -226,7 +244,7 @@ if ( is_callable( [ $options, 'setWrapOutputClass' ] ) ) { $options->setWrapOutputClass( false ); // Parsoid doesn't want the output wrapper } - $out = $wgParser->parse( $text, $title, $options ); + $out = $wgParser->parse( $text, $title, $options, true, true, $revid ); return [ 'text' => $out->getText(), 'modules' => array_values( array_unique( $out->getModules() ) ), @@ -239,7 +257,7 @@ /** * @param string $text * @param Title $title -* @param int|bool $revid +* @param int|null $revid * * @return array * @throws MWException -- To view, visit https://gerrit.wikimedia.org/r/377940 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54d38ce423d702dbf4e446ee902fe55df08846cb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ParsoidBatchAPI Gerrit-Branch: master Gerrit-Owner: Arlolra Gerrit-Reviewer: Anomie Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Update diff test results
BearND has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379152 ) Change subject: Update diff test results .. Update diff test results Another Parsoid deployment changed out HTML. Now reference lists s are wrapped in a new : Change-Id: Idef751c256a2bb8c7d037f28150f3f657a3b5629 --- M test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json M test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section25-text.html M test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json M test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding/section3-text.html M test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json M test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section25-text.html M test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json M test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding/section3-text.html 8 files changed, 61 insertions(+), 53 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/52/379152/1 diff --git "a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" "b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" index 3bea40b..b734a70 100644 --- "a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" +++ "b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" @@ -190,7 +190,7 @@ }, { "id": 25, -"text": "\n\n↑ This sequence has been in place since at least http://en.wikipedia.org/w/index.php?title=Wikipedia:Layout&oldid=2166480\";>2003 (when \"See also\" was called \"Related topics\"). See, for example, Wikipedia:Perennial proposals#Changes to standard appendices. The original rationale for this ordering is that, with the exception of Works, sections which contain material outside Wikipedia (including Further reading and External links) should come after sections that contain Wikipedia material (including See also) to help keep the distinction clear. The sections containing notes and references often contain both kinds of material and, consequently, appear after the See also section (if any) and before the Further reading section (if any). Whatever the validity of the original rationale, there is now the additional factor that readers have come to expect the appendices to appear in this order.↑ While categories are entered on the editing page ahead of stub templates, they appear on the visual page in a separate box after the stub templates. One of the reasons this happens is that every stub template generates a stub category, and those stub categories appear after the \"main\" categories. Another is that certain bots and scripts are set up to expect the categories, stubs and interlanguage links to appear in that order, and will reposition them if they don't. Therefore, any manual attempt to change the order is futile unless the bots and scripts are also altered.↑ For example, skipping heading levels, such as jumping from ==Heading 2== to Heading 4 without ===Heading 3=== in the middle, violates Wikipedia:Accessibility as it reduces usability for readers on screen readers who use heading levels to navigate pages.↑ Syntax:\n\n==See also==\n* [[Wikipedia:How to edit a page]]\n* [[Wikipedia:Manual of Style]]\n\n\nWhich produces:\n\nSee also\n Wikipedia:How to edit a page\n Wikipedia:Manual of Style\n↑ The rationale for not printing navigation boxes is that these templates contain wikilinks that are of no use to print readers.[1] There are two problems with this rationale: First, other wikilink content does print, for example See also and succession boxes. Second, some navigation boxes contain useful information regarding the relationship of the article to the subjects of related articles.\n\n\n\n", +"text": "\n\n↑ This sequence has been in place since at least http://en.wikipedia.org/w/index.php?title=Wikipedia:Layout&oldid=2166480\";>2003 (when \"See also\" was called \"Related topics\"). See, for example, Wikipedia:Perennial proposals#Changes to standard appendices. The original rationale for this ordering is that, with the exception of Works, sections which contain material outside Wikipedia (including Further reading and External links) should come after sections that contain Wikipedia material (including See also) to help keep the distinction clear. The sections containing notes and references often contain both kinds of material and, consequently, appear after the
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Provide base href in Echo's HTML emails
MarkAHershberger has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379151 ) Change subject: Provide base href in Echo's HTML emails .. Provide base href in Echo's HTML emails While working on my own Echo notifications for CategoryWatch, I came across this bug. I was happy to see that someone else identified this a while back. Wikitext-to-html production for the body of Echo messages does not fully qualify urls. This means that links are created pointing to, for example, "/w/index.php..." instead of "http://example.com/w/index.php";. Supplying a base URL in the html for the message fixes this problem. Bug: T141521 Change-Id: Icfb9f3be58b83d2a441972adb58fef1169169d7c --- M includes/formatters/EchoHtmlEmailFormatter.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/51/379151/1 diff --git a/includes/formatters/EchoHtmlEmailFormatter.php b/includes/formatters/EchoHtmlEmailFormatter.php index 5cf41cd..b1aae7d 100644 --- a/includes/formatters/EchoHtmlEmailFormatter.php +++ b/includes/formatters/EchoHtmlEmailFormatter.php @@ -51,6 +51,7 @@ $iconImgSrc = Sanitizer::encodeAttribute( $emailIcon ); + global $wgServer; return <<< EOF @@ -60,6 +61,7 @@ table[id="email-container"]{max-width:600px !important; width:100% !important;} } + -- To view, visit https://gerrit.wikimedia.org/r/379151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icfb9f3be58b83d2a441972adb58fef1169169d7c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: MarkAHershberger ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update OOjs UI to v0.23.1
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379149 ) Change subject: Update OOjs UI to v0.23.1 .. Update OOjs UI to v0.23.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1 Depends-on: If38f5a074d655542c5704a9b17617d299ee17921 Change-Id: Iac39c51049266b302d66658bf1ea6b67c1bb4c8c --- M composer.json M resources/lib/oojs-ui/i18n/ais.json M resources/lib/oojs-ui/i18n/hu.json M resources/lib/oojs-ui/i18n/ja.json M resources/lib/oojs-ui/i18n/nb.json M resources/lib/oojs-ui/i18n/roa-tara.json A resources/lib/oojs-ui/i18n/tay.json M resources/lib/oojs-ui/i18n/uk.json M resources/lib/oojs-ui/oojs-ui-apex.js M resources/lib/oojs-ui/oojs-ui-core-apex.css M resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-core.js M resources/lib/oojs-ui/oojs-ui-core.js.map M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css M resources/lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-toolbars.js M resources/lib/oojs-ui/oojs-ui-widgets-apex.css M resources/lib/oojs-ui/oojs-ui-widgets-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-widgets.js M resources/lib/oojs-ui/oojs-ui-widgets.js.map M resources/lib/oojs-ui/oojs-ui-wikimediaui.js M resources/lib/oojs-ui/oojs-ui-windows-apex.css M resources/lib/oojs-ui/oojs-ui-windows-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-windows.js M resources/lib/oojs-ui/themes/apex/icons-interactions.json M resources/lib/oojs-ui/themes/wikimediaui/icons-interactions.json 26 files changed, 242 insertions(+), 188 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/379149 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac39c51049266b302d66658bf1ea6b67c1bb4c8c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Update OOjs UI to v0.23.1
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379147 ) Change subject: Update OOjs UI to v0.23.1 .. Update OOjs UI to v0.23.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1 Change-Id: If38f5a074d655542c5704a9b17617d299ee17921 --- M composer.json M composer.lock M composer/installed.json M oojs/oojs-ui/History.md M oojs/oojs-ui/demos/pages/icons.js M oojs/oojs-ui/demos/pages/widgets.js M oojs/oojs-ui/demos/styles/demo.css M oojs/oojs-ui/i18n/ais.json M oojs/oojs-ui/i18n/hu.json M oojs/oojs-ui/i18n/ja.json M oojs/oojs-ui/i18n/nb.json M oojs/oojs-ui/i18n/roa-tara.json A oojs/oojs-ui/i18n/tay.json M oojs/oojs-ui/i18n/uk.json M oojs/oojs-ui/package.json M oojs/oojs-ui/php/HtmlSnippet.php 16 files changed, 127 insertions(+), 28 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/composer.json b/composer.json index 51a50db..e6dd1a3 100644 --- a/composer.json +++ b/composer.json @@ -45,7 +45,7 @@ "monolog/monolog": "1.22.1", "mustangostang/spyc": "0.6.2", "nmred/kafka-php": "0.1.5", - "oojs/oojs-ui": "0.23.0", + "oojs/oojs-ui": "0.23.1", "oyejorge/less.php": "1.7.0.14", "pear/console_getopt": "1.4.1", "pear/mail": "1.4.1", diff --git a/composer.lock b/composer.lock index bed8429..7822ac2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";, "This file is @generated automatically" ], -"content-hash": "fea6db0235342e7a6b24285277ac6f12", +"content-hash": "1129c0e8cd3e4bfcdd6c36f6a6fef8f0", "packages": [ { "name": "composer/semver", @@ -516,16 +516,16 @@ }, { "name": "oojs/oojs-ui", -"version": "v0.23.0", +"version": "v0.23.1", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git";, -"reference": "c1309b72963f618586d7577acf6119e6f387b8af" +"reference": "78a763891cab6e5af620e891f340141e75ceef84" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/c1309b72963f618586d7577acf6119e6f387b8af";, -"reference": "c1309b72963f618586d7577acf6119e6f387b8af", +"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/78a763891cab6e5af620e891f340141e75ceef84";, +"reference": "78a763891cab6e5af620e891f340141e75ceef84", "shasum": "" }, "require": { @@ -591,7 +591,7 @@ ], "description": "Provides library of common widgets, layouts, and windows.", "homepage": "https://www.mediawiki.org/wiki/OOjs_UI";, -"time": "2017-09-05T21:04:47+00:00" +"time": "2017-09-20T00:13:22+00:00" }, { "name": "oyejorge/less.php", diff --git a/composer/installed.json b/composer/installed.json index 26d7e22..d327ab5 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -2326,17 +2326,17 @@ }, { "name": "oojs/oojs-ui", -"version": "v0.23.0", -"version_normalized": "0.23.0.0", +"version": "v0.23.1", +"version_normalized": "0.23.1.0", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git";, -"reference": "c1309b72963f618586d7577acf6119e6f387b8af" +"reference": "78a763891cab6e5af620e891f340141e75ceef84" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/c1309b72963f618586d7577acf6119e6f387b8af";, -"reference": "c1309b72963f618586d7577acf6119e6f387b8af", +"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/78a763891cab6e5af620e891f340141e75ceef84";, +"reference": "78a763891cab6e5af620e891f340141e75ceef84", "shasum": "" }, "require": { @@ -2348,7 +2348,7 @@ "mediawiki/mediawiki-codesniffer": "0.12.0", "phpunit/phpunit": "4.8.21" }, -"time": "2017-09-05T21:04:47+00:00", +"time": "2017-09-20T00:13:22+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md index 478480b..7c4e6b3 100644 --- a/oojs/oojs-ui/History.md +++ b/oojs/oojs-ui/History.md @@ -1,4 +1,29 @@ # OOjs UI Release History +## v0.23.1 / 2017-09-19 +### Deprecations +* [DEPRECATING CHANGE] SelectWidg
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Update OOjs UI to v0.23.1
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379146 ) Change subject: Update OOjs UI to v0.23.1 .. Update OOjs UI to v0.23.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1 Change-Id: Ifc549bccfe69d2995628df8fa50ca55c59a02137 --- M .jsduck/eg-iframe.html M demos/ve/desktop-dist.html M demos/ve/desktop.html M demos/ve/mobile-dist.html M demos/ve/mobile.html M lib/oojs-ui/i18n/ais.json M lib/oojs-ui/i18n/hu.json M lib/oojs-ui/i18n/ja.json M lib/oojs-ui/i18n/nb.json M lib/oojs-ui/i18n/roa-tara.json A lib/oojs-ui/i18n/tay.json M lib/oojs-ui/i18n/uk.json M lib/oojs-ui/oojs-ui-apex-icons-accessibility.css M lib/oojs-ui/oojs-ui-apex-icons-accessibility.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-alerts.css M lib/oojs-ui/oojs-ui-apex-icons-alerts.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-content.css M lib/oojs-ui/oojs-ui-apex-icons-content.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.css M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-core.css M lib/oojs-ui/oojs-ui-apex-icons-editing-core.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-list.css M lib/oojs-ui/oojs-ui-apex-icons-editing-list.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.css M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-interactions.css M lib/oojs-ui/oojs-ui-apex-icons-interactions.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-layout.css M lib/oojs-ui/oojs-ui-apex-icons-layout.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-media.css M lib/oojs-ui/oojs-ui-apex-icons-media.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-moderation.css M lib/oojs-ui/oojs-ui-apex-icons-moderation.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-movement.css M lib/oojs-ui/oojs-ui-apex-icons-movement.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-user.css M lib/oojs-ui/oojs-ui-apex-icons-user.rtl.css M lib/oojs-ui/oojs-ui-apex.css M lib/oojs-ui/oojs-ui-apex.js M lib/oojs-ui/oojs-ui-apex.rtl.css M lib/oojs-ui/oojs-ui-core-apex.css M lib/oojs-ui/oojs-ui-core-apex.rtl.css M lib/oojs-ui/oojs-ui-core-mediawiki.css M lib/oojs-ui/oojs-ui-core-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-core-wikimediaui.css M lib/oojs-ui/oojs-ui-core-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-core.js M lib/oojs-ui/oojs-ui-core.js.map M lib/oojs-ui/oojs-ui-images-apex.css M lib/oojs-ui/oojs-ui-images-apex.rtl.css M lib/oojs-ui/oojs-ui-images-wikimediaui.css M lib/oojs-ui/oojs-ui-images-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-mediawiki-icons-location.css M lib/oojs-ui/oojs-ui-mediawiki-icons-location.rtl.css M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.css M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.rtl.css M lib/oojs-ui/oojs-ui-mediawiki.css M lib/oojs-ui/oojs-ui-mediawiki.js M lib/oojs-ui/oojs-ui-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-toolbars-apex.css M lib/oojs-ui/oojs-ui-toolbars-apex.rtl.css M lib/oojs-ui/oojs-ui-toolbars-mediawiki.css M lib/oojs-ui/oojs-ui-toolbars-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-toolbars.js M lib/oojs-ui/oojs-ui-widgets-apex.css M lib/oojs-ui/oojs-ui-widgets-apex.rtl.css M lib/oojs-ui/oojs-ui-widgets-mediawiki.css M lib/oojs-ui/oojs-ui-widgets-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-widgets-wikimediaui.css M lib/oojs-ui/oojs-ui-widgets-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-widgets.js M lib/oojs-ui/oojs-ui-widgets.js.map M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-movement
[MediaWiki-commits] [Gerrit] wikimedia...wetzel[develop]: [WIP] Add maplink & mapframe prevalence graphs and modularize
Bearloga has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379150 ) Change subject: [WIP] Add maplink & mapframe prevalence graphs and modularize .. [WIP] Add maplink & mapframe prevalence graphs and modularize - Splits up server.R into modules (like Search & Portal dashboards) - Adds maplink & mapframe prevalence graphs - Overall prevalence - Language-project breakdown of prevalence Bug: T170022 Change-Id: If1f1efa619037ce8adea873c148f9a1f78376506 --- M CHANGELOG.md A modules/feature_usage.R A modules/geographic_breakdown.R A modules/kartographer/language-project_breakdown.R A modules/kartographer/overall_prevalence.R A modules/kartotherian.R M server.R A tab_documentation/overall_prevalence.md A tab_documentation/prevalence_langproj.md M tab_documentation/tiles_summary.md M ui.R M utils.R 12 files changed, 536 insertions(+), 161 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/wetzel refs/changes/50/379150/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 208e2ab..f3e77ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log (Patch Notes) All notable changes to this project will be documented in this file. +## 2017/09/18 +- Modularized the dashboard source code +- Added maplink & mapframe prevalence graphs ([T170022](https://phabricator.wikimedia.org/T170022)) + ## 2017/06/20 - Added licensing info ([T167930](https://phabricator.wikimedia.org/T167930)) diff --git a/modules/feature_usage.R b/modules/feature_usage.R new file mode 100644 index 000..ec2460e --- /dev/null +++ b/modules/feature_usage.R @@ -0,0 +1,55 @@ +output$users_per_platform <- renderDygraph({ + user_data %>% +polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_users_per_platform)) %>% +polloi::make_dygraph("Date", "Events", "Unique users by platform, by day") %>% +dyAxis("y", logscale = input$users_per_platform_logscale) %>% +dyLegend(labelsDiv = "users_per_platform_legend", show = "always") %>% +dyRangeSelector %>% +dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>% +dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") %>% +dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") +}) + +output$geohack_feature_usage <- renderDygraph({ + usage_data$GeoHack %>% +polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_geohack_feature_usage)) %>% +polloi::make_dygraph("Date", "Events", "Feature usage for GeoHack") %>% +dyRangeSelector %>% +dyAxis("y", logscale = input$geohack_feature_usage_logscale) %>% +dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>% +dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") %>% +dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") +}) + +output$wikiminiatlas_feature_usage <- renderDygraph({ + usage_data$WikiMiniAtlas %>% +polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_wikiminiatlas_feature_usage)) %>% +polloi::make_dygraph("Date", "Events", "Feature usage for WikiMiniAtlas") %>% +dyRangeSelector %>% +dyAxis("y", logscale = input$wikiminiatlas_feature_usage_logscale) %>% +dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>% +dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") %>% +dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") +}) + +output$wikivoyage_feature_usage <- renderDygraph({ + usage_data$Wikivoyage %>% +polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_wikivoyage_feature_usage)) %>% +polloi::make_dygraph("Date", "Events", "Feature usage for Wikivoyage") %>% +dyRangeSelector %>% +dyAxis("y", logscale = input$wikivoyage_feature_usage_logscale) %>% +dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>% +dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") %>% +dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") +}) + +output$wiwosm_feature_usage <- renderDygraph({ + usage_data$WIWOSM %>% +polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_wiwosm_feature_usage)) %>% +polloi::make_dygraph("Date", "Events", "Feature usage for WIWOSM") %>% +dyRangeSelector %>% +dyAxis("y", logscale = input$wiwosm_feature_usage_logscale) %>% +dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>% +dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") %>% +dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") +}) diff --git a/modules/geographic_breakdown.R b/modules/geographic_breakdown.
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Mark various skin/OutputPage hooks as unabortable
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/372595 ) Change subject: Mark various skin/OutputPage hooks as unabortable .. Mark various skin/OutputPage hooks as unabortable Follows-up I94c7ab656bd1a04. An initial pass of marking various hooks as unabortable. * BeforePageDisplay (T173411) * OutputPageParserOutput * AfterFinalPageOutput * SkinTemplateNavigation (T107980) * SkinTemplateNavigation::SpecialPage (T107980) * SkinTemplateNavigation::Universal * PersonalUrls Bug: T173615 Change-Id: I0cb333dd5ff74f7dca725ff210200a0779a9a360 --- M includes/OutputPage.php M includes/skins/SkinTemplate.php 2 files changed, 12 insertions(+), 8 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified Jdlrobson: Looks good to me, but someone else must approve diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 5216146..7c463b6 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1852,7 +1852,7 @@ // Avoid PHP 7.1 warning of passing $this by reference $outputPage = $this; Hooks::run( 'LanguageLinks', [ $this->getTitle(), &$this->mLanguageLinks, &$linkFlags ] ); - Hooks::run( 'OutputPageParserOutput', [ &$outputPage, $parserOutput ] ); + Hooks::runWithoutAbort( 'OutputPageParserOutput', [ &$outputPage, $parserOutput ] ); // This check must be after 'OutputPageParserOutput' runs in addParserOutputMetadata // so that extensions may modify ParserOutput to toggle TOC. @@ -1890,7 +1890,7 @@ $text = $parserOutput->getText(); // Avoid PHP 7.1 warning of passing $this by reference $outputPage = $this; - Hooks::run( 'OutputPageBeforeHTML', [ &$outputPage, &$text ] ); + Hooks::runWithoutAbort( 'OutputPageBeforeHTML', [ &$outputPage, &$text ] ); $this->addHTML( $text ); } @@ -2436,7 +2436,7 @@ $outputPage = $this; // Hook that allows last minute changes to the output page, e.g. // adding of CSS or Javascript by extensions. - Hooks::run( 'BeforePageDisplay', [ &$outputPage, &$sk ] ); + Hooks::runWithoutAbort( 'BeforePageDisplay', [ &$outputPage, &$sk ] ); try { $sk->outputPage(); @@ -2448,7 +2448,7 @@ try { // This hook allows last minute changes to final overall output by modifying output buffer - Hooks::run( 'AfterFinalPageOutput', [ $this ] ); + Hooks::runWithoutAbort( 'AfterFinalPageOutput', [ $this ] ); } catch ( Exception $e ) { ob_end_clean(); // bug T129657 throw $e; diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 4fcc865..0690f03 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -729,7 +729,7 @@ } } - Hooks::run( 'PersonalUrls', [ &$personal_urls, &$title, $this ] ); + Hooks::runWithoutAbort( 'PersonalUrls', [ &$personal_urls, &$title, $this ] ); return $personal_urls; } @@ -1095,7 +1095,10 @@ // Avoid PHP 7.1 warning of passing $this by reference $skinTemplate = $this; - Hooks::run( 'SkinTemplateNavigation', [ &$skinTemplate, &$content_navigation ] ); + Hooks::runWithoutAbort( + 'SkinTemplateNavigation', + [ &$skinTemplate, &$content_navigation ] + ); if ( $userCanRead && !$wgDisableLangConversion ) { $pageLang = $title->getPageLanguage(); @@ -1139,14 +1142,15 @@ // Avoid PHP 7.1 warning of passing $this by reference $skinTemplate = $this; - Hooks::run( 'SkinTemplateNavigation::SpecialPage', + Hooks::runWithoutAbort( 'SkinTemplateNavigation::SpecialPage', [ &$skinTemplate, &$content_navigation ] ); } // Avoid PHP 7.1 warning of passing $this by reference $skinTemplate = $this; // Equiv to SkinTemplateContentActions - Hooks::run( 'SkinTemplateNavigation::Universal', [ &$skinTemplate, &$content_navigation ] ); + Hooks::runWithoutAbort( 'SkinTemplateNavigation::Universal', + [ &$skinTemplate, &$content_navigation ] ); // Setup xml ids and tooltip
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update OOjs UI to v0.23.1
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379149 ) Change subject: Update OOjs UI to v0.23.1 .. Update OOjs UI to v0.23.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1 Depends-on: If38f5a074d655542c5704a9b17617d299ee17921 Change-Id: Iac39c51049266b302d66658bf1ea6b67c1bb4c8c --- M composer.json M resources/lib/oojs-ui/i18n/ais.json M resources/lib/oojs-ui/i18n/hu.json M resources/lib/oojs-ui/i18n/ja.json M resources/lib/oojs-ui/i18n/nb.json M resources/lib/oojs-ui/i18n/roa-tara.json A resources/lib/oojs-ui/i18n/tay.json M resources/lib/oojs-ui/i18n/uk.json M resources/lib/oojs-ui/oojs-ui-apex.js M resources/lib/oojs-ui/oojs-ui-core-apex.css M resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-core.js M resources/lib/oojs-ui/oojs-ui-core.js.map M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css M resources/lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-toolbars.js M resources/lib/oojs-ui/oojs-ui-widgets-apex.css M resources/lib/oojs-ui/oojs-ui-widgets-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-widgets.js M resources/lib/oojs-ui/oojs-ui-widgets.js.map M resources/lib/oojs-ui/oojs-ui-wikimediaui.js M resources/lib/oojs-ui/oojs-ui-windows-apex.css M resources/lib/oojs-ui/oojs-ui-windows-wikimediaui.css M resources/lib/oojs-ui/oojs-ui-windows.js M resources/lib/oojs-ui/themes/apex/icons-interactions.json M resources/lib/oojs-ui/themes/wikimediaui/icons-interactions.json 26 files changed, 242 insertions(+), 188 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/379149/1 -- To view, visit https://gerrit.wikimedia.org/r/379149 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac39c51049266b302d66658bf1ea6b67c1bb4c8c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Don't grey out results area when initializing, un...
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379148 ) Change subject: RCFilters: Don't grey out results area when initializing, unless there's a default saved query .. RCFilters: Don't grey out results area when initializing, unless there's a default saved query Check whether there is a default saved query on the server side, and if there is, add a CSS class. Also centralize the code related to the saved query preferences. Bug: T173533 Change-Id: I4138fde22bdd8cc55c65846b91184c3ad3057244 --- M includes/specialpage/ChangesListSpecialPage.php M includes/specials/SpecialRecentchanges.php M includes/specials/SpecialWatchlist.php M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 5 files changed, 29 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/379148/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 98b7aa1..020fcbf 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -32,6 +32,12 @@ * @ingroup SpecialPage */ abstract class ChangesListSpecialPage extends SpecialPage { + /** +* Preference name for saved queries. Subclasses that use saved queries should override this. +* @var string +*/ + protected static $savedQueriesPreferenceName; + /** @var string */ protected $rcSubpage; @@ -602,6 +608,7 @@ 'wgStructuredChangeFiltersEnableExperimentalViews', $experimentalStructuredChangeFilters ); + $out->addJsConfigVars( 'wgRCFiltersChangeTags', $this->buildChangeTagList() @@ -616,6 +623,19 @@ 'daysDefault' => $this->getDefaultDays(), ] ); + + if ( static::$savedQueriesPreferenceName ) { + $savedQueries = FormatJson::decode( + $this->getUser()->getOption( static::$savedQueriesPreferenceName ) + ); + if ( $savedQueries && isset( $savedQueries->default ) ) { + $out->addBodyClasses( 'mw-rcfilters-ui-default-saved-query' ); + } + $out->addJsConfigVars( + 'wgStructuredChangeFiltersSavedQueriesPreferenceName', + static::$savedQueriesPreferenceName + ); + } } else { $out->addBodyClasses( 'mw-rcfilters-disabled' ); } diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 15c05ee..40834cb 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -32,6 +32,8 @@ */ class SpecialRecentChanges extends ChangesListSpecialPage { + protected static $savedQueriesPreferenceName = 'rcfilters-saved-queries'; + private $watchlistFilterGroupDefinition; // @codingStandardsIgnoreStart Needed "useless" override to change parameters. @@ -165,10 +167,6 @@ if ( $this->isStructuredFilterUiEnabled() ) { $out->addJsConfigVars( 'wgStructuredChangeFiltersLiveUpdateSupported', true ); - $out->addJsConfigVars( - 'wgStructuredChangeFiltersSavedQueriesPreferenceName', - 'rcfilters-saved-queries' - ); } } diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 8418865..4f4570e 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -32,6 +32,8 @@ * @ingroup SpecialPage */ class SpecialWatchlist extends ChangesListSpecialPage { + protected static $savedQueriesPreferenceName = 'rcfilters-wl-saved-queries'; + private $maxDays; public function __construct( $page = 'Watchlist', $restriction = 'viewmywatchlist' ) { @@ -100,10 +102,6 @@ $output->addModuleStyles( [ 'mediawiki.rcfilters.highlightCircles.seenunseen.styles' ] ); $output->addJsConfigVars( 'wgStructuredChangeFiltersLiveUpdateSupported', false ); - $output->addJsConfigVars( - 'wgStructuredChangeFiltersSavedQueriesPreferenceName', -
[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Update OOjs UI to v0.23.1
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379147 ) Change subject: Update OOjs UI to v0.23.1 .. Update OOjs UI to v0.23.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1 Change-Id: If38f5a074d655542c5704a9b17617d299ee17921 --- M composer.json M composer.lock M composer/installed.json M oojs/oojs-ui/History.md M oojs/oojs-ui/demos/pages/icons.js M oojs/oojs-ui/demos/pages/widgets.js M oojs/oojs-ui/demos/styles/demo.css M oojs/oojs-ui/i18n/ais.json M oojs/oojs-ui/i18n/hu.json M oojs/oojs-ui/i18n/ja.json M oojs/oojs-ui/i18n/nb.json M oojs/oojs-ui/i18n/roa-tara.json A oojs/oojs-ui/i18n/tay.json M oojs/oojs-ui/i18n/uk.json M oojs/oojs-ui/package.json M oojs/oojs-ui/php/HtmlSnippet.php 16 files changed, 127 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor refs/changes/47/379147/1 diff --git a/composer.json b/composer.json index 51a50db..e6dd1a3 100644 --- a/composer.json +++ b/composer.json @@ -45,7 +45,7 @@ "monolog/monolog": "1.22.1", "mustangostang/spyc": "0.6.2", "nmred/kafka-php": "0.1.5", - "oojs/oojs-ui": "0.23.0", + "oojs/oojs-ui": "0.23.1", "oyejorge/less.php": "1.7.0.14", "pear/console_getopt": "1.4.1", "pear/mail": "1.4.1", diff --git a/composer.lock b/composer.lock index bed8429..7822ac2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";, "This file is @generated automatically" ], -"content-hash": "fea6db0235342e7a6b24285277ac6f12", +"content-hash": "1129c0e8cd3e4bfcdd6c36f6a6fef8f0", "packages": [ { "name": "composer/semver", @@ -516,16 +516,16 @@ }, { "name": "oojs/oojs-ui", -"version": "v0.23.0", +"version": "v0.23.1", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git";, -"reference": "c1309b72963f618586d7577acf6119e6f387b8af" +"reference": "78a763891cab6e5af620e891f340141e75ceef84" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/c1309b72963f618586d7577acf6119e6f387b8af";, -"reference": "c1309b72963f618586d7577acf6119e6f387b8af", +"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/78a763891cab6e5af620e891f340141e75ceef84";, +"reference": "78a763891cab6e5af620e891f340141e75ceef84", "shasum": "" }, "require": { @@ -591,7 +591,7 @@ ], "description": "Provides library of common widgets, layouts, and windows.", "homepage": "https://www.mediawiki.org/wiki/OOjs_UI";, -"time": "2017-09-05T21:04:47+00:00" +"time": "2017-09-20T00:13:22+00:00" }, { "name": "oyejorge/less.php", diff --git a/composer/installed.json b/composer/installed.json index 26d7e22..d327ab5 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -2326,17 +2326,17 @@ }, { "name": "oojs/oojs-ui", -"version": "v0.23.0", -"version_normalized": "0.23.0.0", +"version": "v0.23.1", +"version_normalized": "0.23.1.0", "source": { "type": "git", "url": "https://github.com/wikimedia/oojs-ui.git";, -"reference": "c1309b72963f618586d7577acf6119e6f387b8af" +"reference": "78a763891cab6e5af620e891f340141e75ceef84" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/c1309b72963f618586d7577acf6119e6f387b8af";, -"reference": "c1309b72963f618586d7577acf6119e6f387b8af", +"url": "https://api.github.com/repos/wikimedia/oojs-ui/zipball/78a763891cab6e5af620e891f340141e75ceef84";, +"reference": "78a763891cab6e5af620e891f340141e75ceef84", "shasum": "" }, "require": { @@ -2348,7 +2348,7 @@ "mediawiki/mediawiki-codesniffer": "0.12.0", "phpunit/phpunit": "4.8.21" }, -"time": "2017-09-05T21:04:47+00:00", +"time": "2017-09-20T00:13:22+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md index 478480b..7c4e6b3 100644 --- a/oojs/oojs-ui/History.md +++ b/oojs/oojs-ui/History.md @@ -1,4 +1,29 @@ # OOjs UI Release History +## v0.23.1 / 2017-09-19 +### Deprecations +* [DEPRECATING CHANGE] SelectWidget
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Yet another attempt to fix the populateIpChanges script
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379142 ) Change subject: Yet another attempt to fix the populateIpChanges script .. Yet another attempt to fix the populateIpChanges script It would seem we'd need to update $blockStart if there are no results for a given block, and more importantly, continue and not break! Bug: T175962 Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b954e064 --- M maintenance/populateIpChanges.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/populateIpChanges.php b/maintenance/populateIpChanges.php index 17f49ee..f7bcc12 100644 --- a/maintenance/populateIpChanges.php +++ b/maintenance/populateIpChanges.php @@ -88,7 +88,8 @@ $numRows = $rows->numRows(); if ( !$rows || $numRows === 0 ) { - break; + $blockStart = $blockEnd + 1; + continue; } $this->output( "...checking $numRows revisions for IP edits that need copying, " . -- To view, visit https://gerrit.wikimedia.org/r/379142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b954e064 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MusikAnimal Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Update OOjs UI to v0.23.1
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379146 ) Change subject: Update OOjs UI to v0.23.1 .. Update OOjs UI to v0.23.1 Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1 Change-Id: Ifc549bccfe69d2995628df8fa50ca55c59a02137 --- M .jsduck/eg-iframe.html M demos/ve/desktop-dist.html M demos/ve/desktop.html M demos/ve/mobile-dist.html M demos/ve/mobile.html M lib/oojs-ui/i18n/ais.json M lib/oojs-ui/i18n/hu.json M lib/oojs-ui/i18n/ja.json M lib/oojs-ui/i18n/nb.json M lib/oojs-ui/i18n/roa-tara.json A lib/oojs-ui/i18n/tay.json M lib/oojs-ui/i18n/uk.json M lib/oojs-ui/oojs-ui-apex-icons-accessibility.css M lib/oojs-ui/oojs-ui-apex-icons-accessibility.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-alerts.css M lib/oojs-ui/oojs-ui-apex-icons-alerts.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-content.css M lib/oojs-ui/oojs-ui-apex-icons-content.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.css M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-core.css M lib/oojs-ui/oojs-ui-apex-icons-editing-core.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-list.css M lib/oojs-ui/oojs-ui-apex-icons-editing-list.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.css M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-interactions.css M lib/oojs-ui/oojs-ui-apex-icons-interactions.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-layout.css M lib/oojs-ui/oojs-ui-apex-icons-layout.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-media.css M lib/oojs-ui/oojs-ui-apex-icons-media.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-moderation.css M lib/oojs-ui/oojs-ui-apex-icons-moderation.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-movement.css M lib/oojs-ui/oojs-ui-apex-icons-movement.rtl.css M lib/oojs-ui/oojs-ui-apex-icons-user.css M lib/oojs-ui/oojs-ui-apex-icons-user.rtl.css M lib/oojs-ui/oojs-ui-apex.css M lib/oojs-ui/oojs-ui-apex.js M lib/oojs-ui/oojs-ui-apex.rtl.css M lib/oojs-ui/oojs-ui-core-apex.css M lib/oojs-ui/oojs-ui-core-apex.rtl.css M lib/oojs-ui/oojs-ui-core-mediawiki.css M lib/oojs-ui/oojs-ui-core-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-core-wikimediaui.css M lib/oojs-ui/oojs-ui-core-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-core.js M lib/oojs-ui/oojs-ui-core.js.map M lib/oojs-ui/oojs-ui-images-apex.css M lib/oojs-ui/oojs-ui-images-apex.rtl.css M lib/oojs-ui/oojs-ui-images-wikimediaui.css M lib/oojs-ui/oojs-ui-images-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-mediawiki-icons-location.css M lib/oojs-ui/oojs-ui-mediawiki-icons-location.rtl.css M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.css M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.rtl.css M lib/oojs-ui/oojs-ui-mediawiki.css M lib/oojs-ui/oojs-ui-mediawiki.js M lib/oojs-ui/oojs-ui-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-toolbars-apex.css M lib/oojs-ui/oojs-ui-toolbars-apex.rtl.css M lib/oojs-ui/oojs-ui-toolbars-mediawiki.css M lib/oojs-ui/oojs-ui-toolbars-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-toolbars.js M lib/oojs-ui/oojs-ui-widgets-apex.css M lib/oojs-ui/oojs-ui-widgets-apex.rtl.css M lib/oojs-ui/oojs-ui-widgets-mediawiki.css M lib/oojs-ui/oojs-ui-widgets-mediawiki.rtl.css M lib/oojs-ui/oojs-ui-widgets-wikimediaui.css M lib/oojs-ui/oojs-ui-widgets-wikimediaui.rtl.css M lib/oojs-ui/oojs-ui-widgets.js M lib/oojs-ui/oojs-ui-widgets.js.map M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.rtl.css M lib/oojs-ui/oojs-ui-wikimediaui-icons-movement.css M lib/o
[MediaWiki-commits] [Gerrit] mediawiki...Wikispeech[master]: Add lexicon tool special page in Wikispeech extension
Eugene233 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379145 ) Change subject: Add lexicon tool special page in Wikispeech extension .. Add lexicon tool special page in Wikispeech extension Added to the special page of the extension, the Wikispeech lexicon tool comes in as another special page which sits on the extension. This page is what the user will use as a basis of interraction with the tool in order to add suggested words to the Wikispeech lexicon. Bug: T175810 Change-Id: I3a43633ae500af49d7ef3a05fef97ab2c55df0f4 --- M extension.json M i18n/en.json M i18n/qqq.json A specials/SpecialWikispeechLexiconTool.php 4 files changed, 43 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikispeech refs/changes/45/379145/1 diff --git a/extension.json b/extension.json index 6f7cebb..b519ff8 100644 --- a/extension.json +++ b/extension.json @@ -17,6 +17,7 @@ }, "AutoloadClasses": { "SpecialWikispeech": "specials/SpecialWikispeech.php", + "SpecialWikispeechLexiconTool": "specials/SpecialWikispeechLexiconTool.php", "WikispeechHooks": "Hooks.php", "CleanedText": "includes/CleanedContent.php", "SegmentBreak": "includes/CleanedContent.php", @@ -52,7 +53,8 @@ "remoteExtPath": "Wikispeech/modules" }, "SpecialPages": { - "Wikispeech": "SpecialWikispeech" + "Wikispeech": "SpecialWikispeech", + "WikispeechLexiconTool": "SpecialWikispeechLexiconTool" }, "ExtensionMessagesFiles": { "WikispeechAlias": "Wikispeech.alias.php" diff --git a/i18n/en.json b/i18n/en.json index fb98d2b..a4837b8 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,5 +17,8 @@ "apihelp-wikispeech-param-removetags": "The tags that should be removed completely during cleaning, as a JSON object of the format:\n{\n \"tagName1\": true,\n \"tagName2\": \"cssClass\"\n}\nwhere tagName1 is always removed and tagName2 is only removed if it also has the CSS class cssClass.", "apihelp-wikispeech-param-segmentbreakingtags": "The tag names for tags that should add segment breaks.", "apihelp-wikispeech-example-1": "Get segments for the Wikispeech extension. The tag sup is removed and so is div when it has the class toc. The tags h1 and h2 break segments.", - "apihelp-wikispeech-example-2": "Get original HTML content and cleaned text." + "apihelp-wikispeech-example-2": "Get original HTML content and cleaned text.", + "wikispeechlexicontool": "Wikispeech Lexicon Tool", + "special-wikispeech-lexicon-tool-intro": "Wikispeech Lexicon Tool", + "special-wikispeech-lexicon-tool-title": "The tool used to add suggested words into the Wikispeech lexicon." } diff --git a/i18n/qqq.json b/i18n/qqq.json index 17b1b58..14d25d4 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -5,9 +5,12 @@ ] }, "wikispeech": "The name of the extension", + "wikispeechlexicontool": "The name of the tool which is used to add words to the lexicon", "wikispeech-desc": "{{desc|name=Wikispeech|url=https://www.mediawiki.org/wiki/Extension:Wikispeech}}";, "special-wikispeech-intro": "Description appearing on top of Special:{{ll|Wikispeech}}.", + "special-wikispeech-lexicon-tool-intro": "Description appearing on top of Special:{{ll|WikispeechLexiconTool}}.", "special-wikispeech-title": "Title of the special page Special:Wikispeech", + "special-wikispeech-lexicon-tool-title": "Title of the special page Special:WikispeechLexiconTool", "apihelp-wikispeech-summary": "{{doc-apihelp-summary|wikispeech}}", "apihelp-wikispeech-param-page": "{{doc-apihelp-param|wikispeech|page}}", "apihelp-wikispeech-param-output": "{{doc-apihelp-param|wikispeech|output}}", diff --git a/specials/SpecialWikispeechLexiconTool.php b/specials/SpecialWikispeechLexiconTool.php new file mode 100644 index 000..147f4fa --- /dev/null +++ b/specials/SpecialWikispeechLexiconTool.php @@ -0,0 +1,33 @@ +getOutput(); + $out->setPageTitle( $this->msg( 'special-wikispeech-lexicon-tool-title' ) ); + $out->addHelpLink( 'How to become a MediaWiki hacker' ); + $out->addWikiMsg( 'special-wikispeech-lexicon-tool-intro' ); + } + + /** +* @see SpecialPage::getGroupName +* +* @return string +*/ + protected function getGroupName() { + return 'pagetools'; + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/379145 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a43633ae500af49d7ef3a05fef97ab2c55df0f4 Gerrit-PatchSet: 1 Gerrit-Project: media
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Tag v0.23.1
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379144 ) Change subject: Tag v0.23.1 .. Tag v0.23.1 Change-Id: I0ec2bb33feafbbc113a6604b65a2f450b0537db5 --- M History.md M package.json 2 files changed, 26 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/History.md b/History.md index 478480b..7c4e6b3 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,29 @@ # OOjs UI Release History +## v0.23.1 / 2017-09-19 +### Deprecations +* [DEPRECATING CHANGE] SelectWidget: Rename `getFirstSelectableItem` to `findFirstSelectableItem` (Prateek Saxena) +* [DEPRECATING CHANGE] SelectWidget: Rename `getHighlightedItem` to `findHighlightedItem` (Prateek Saxena) +* [DEPRECATING CHANGE] SelectWidget: Rename `getRelativeSelectableItem` to `findRelativeSelectableItem` (Prateek Saxena) +* [DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as to be removed (Volker E.) + +### Styles +* RadioOptionWidget, CheckboxMultioptionWidget: Support very long labels (Bartosz Dziewoński) +* WikimediaUI theme: Harmonize toolbar icon/indicator opacity (Volker E.) +* WikimediaUI theme: Improve ListToolGroup's color and opacity handling (Volker E.) +* WikimediaUI theme: Simplify disabled tool opacity rules (Volker E.) + +### Code +* BookletLayout#getClosestPage: Fix version number of deprecation (Prateek Saxena) +* HtmlSnippet: Throw exception if given non-string content (Bartosz Dziewoński) +* Use `findFirstSelectableItem` instead of `getFirstSelectableItem` (Prateek Saxena) +* Use `findHighlightedItem` instead of `getHighlightedItem` (Prateek Saxena) +* Use `findRelativeSelectableItem` instead of `getRelativeSelectableItem` (Prateek Saxena) +* WikimediaUI theme: Concatenate constructive & progressive selectors (Volker E.) +* WikimediaUI theme: Remove unnecessary properties (Volker E.) +* demos: Add examples of FieldLayout with very long labels (Bartosz Dziewoński) +* demos: Avoid menu's `box-shadow` from lurkin into toolbar (Volker E.) + + ## v0.23.0 / 2017-09-05 ### Breaking changes * [BREAKING CHANGE] Remove CardLayout and references in IndexLayout (Volker E.) diff --git a/package.json b/package.json index 808e454..c06d083 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oojs-ui", - "version": "0.23.0", + "version": "0.23.1", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", -- To view, visit https://gerrit.wikimedia.org/r/379144 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ec2bb33feafbbc113a6604b65a2f450b0537db5 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Tag v0.23.1
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379144 ) Change subject: Tag v0.23.1 .. Tag v0.23.1 Change-Id: I0ec2bb33feafbbc113a6604b65a2f450b0537db5 --- M History.md M package.json 2 files changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/44/379144/1 diff --git a/History.md b/History.md index 478480b..7c4e6b3 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,29 @@ # OOjs UI Release History +## v0.23.1 / 2017-09-19 +### Deprecations +* [DEPRECATING CHANGE] SelectWidget: Rename `getFirstSelectableItem` to `findFirstSelectableItem` (Prateek Saxena) +* [DEPRECATING CHANGE] SelectWidget: Rename `getHighlightedItem` to `findHighlightedItem` (Prateek Saxena) +* [DEPRECATING CHANGE] SelectWidget: Rename `getRelativeSelectableItem` to `findRelativeSelectableItem` (Prateek Saxena) +* [DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as to be removed (Volker E.) + +### Styles +* RadioOptionWidget, CheckboxMultioptionWidget: Support very long labels (Bartosz Dziewoński) +* WikimediaUI theme: Harmonize toolbar icon/indicator opacity (Volker E.) +* WikimediaUI theme: Improve ListToolGroup's color and opacity handling (Volker E.) +* WikimediaUI theme: Simplify disabled tool opacity rules (Volker E.) + +### Code +* BookletLayout#getClosestPage: Fix version number of deprecation (Prateek Saxena) +* HtmlSnippet: Throw exception if given non-string content (Bartosz Dziewoński) +* Use `findFirstSelectableItem` instead of `getFirstSelectableItem` (Prateek Saxena) +* Use `findHighlightedItem` instead of `getHighlightedItem` (Prateek Saxena) +* Use `findRelativeSelectableItem` instead of `getRelativeSelectableItem` (Prateek Saxena) +* WikimediaUI theme: Concatenate constructive & progressive selectors (Volker E.) +* WikimediaUI theme: Remove unnecessary properties (Volker E.) +* demos: Add examples of FieldLayout with very long labels (Bartosz Dziewoński) +* demos: Avoid menu's `box-shadow` from lurkin into toolbar (Volker E.) + + ## v0.23.0 / 2017-09-05 ### Breaking changes * [BREAKING CHANGE] Remove CardLayout and references in IndexLayout (Volker E.) diff --git a/package.json b/package.json index 808e454..c06d083 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oojs-ui", - "version": "0.23.0", + "version": "0.23.1", "description": "User interface classes built on the OOjs framework.", "keywords": [ "oojs-plugin", -- To view, visit https://gerrit.wikimedia.org/r/379144 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ec2bb33feafbbc113a6604b65a2f450b0537db5 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Redo the way spinners and ready/loading states ar...
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379143 ) Change subject: RCFilters: Redo the way spinners and ready/loading states are managed .. RCFilters: Redo the way spinners and ready/loading states are managed The mw-rcfilters-ui-ready class was being set on no fewer than 4 elements, all with different meanings, and some with no relevant styling at all. It also did not distinguish between "the UI is initializing" and "we are loading new results". Remove mw-rcfilters-ui-ready completely (and remove some code that added or removed it pointlessly), and create two new CSS classes on the . mw-rcfilters-ui-initialized is added when the UI has initialized, and is used to hide the old UI and display a spinner while the UI loads. mw-rcfilters-ui-loading is added when we start loading new results and removed when they arrive; it's used to grey out the results area and add a spinner. Bonus: make the spinner appear in a different place depending on why it's being shown: when initializing, it's shown in the place where the UI will soon appear; when loading, it's shown near the top of the changes list. Change-Id: Ib5c8a36654ba44880823fdade8cad52ffa59ed69 --- M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js 6 files changed, 37 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/43/379143/1 diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js index 83e5796..13da97f 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js @@ -50,8 +50,9 @@ filtersModel, changesListModel, controller, $( 'fieldset.cloptions' ) ); $( '.rcfilters-container' ).append( filtersWidget.$element ); - $( 'body' ).append( $overlay ); - $( '.rcfilters-head' ).addClass( 'mw-rcfilters-ui-ready' ); + $( 'body' ) + .append( $overlay ) + .addClass( 'mw-rcfilters-ui-initialized' ); $( 'a.mw-helplink' ).attr( 'href', diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index cc5ecd4..0ab2c01 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -1,6 +1,9 @@ @import 'mediawiki.mixins.animation'; @import 'mw.rcfilters.mixins'; +@rcfilters-spinner-width: 70px; +@rcfilters-head-min-height: 200px; + // Corrections for the standard special page .client-js { .cloptions { @@ -8,15 +11,14 @@ } .rcfilters-head { - min-height: 200px; + min-height: @rcfilters-head-min-height; + } + body:not( .mw-rcfilters-ui-initialized ) .rcfilters-head { + opacity: 0.5; + pointer-events: none; - &:not( .mw-rcfilters-ui-ready ) { - opacity: 0.5; - pointer-events: none; - - .cloptions { - display: none; - } + .cloptions { + display: none; } } @@ -32,22 +34,23 @@ // message of our own display: none; } + } - &:not( .mw-rcfilters-ui-ready ) { - opacity: 0.5; - } + body:not( .mw-rcfilters-ui-initialized ) .mw-changeslist, + body.mw-rcfilters-ui-loading .mw-changeslist { + opacity: 0.5; } .rcfilters-spinner { - margin: -2em auto 0; - width: 70px; - opacity: 0.8; display: none; - white-space: nowrap; + position: absolute; + left: 50%; + width: @rcfilters-spinner-width; + // Make sure the middle of the spinner is centered, rather than its left edge + margin-left: -@rcfilters-spinner-width/2; - &:not( .mw-rcfilters-ui-ready ) { - display: block; - } + opacity: 0.8; + white-space: nowrap; & .rcfilters-spinner-boun
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Yet another attempt to fix the populateIpChanges script
MusikAnimal has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379142 ) Change subject: Yet another attempt to fix the populateIpChanges script .. Yet another attempt to fix the populateIpChanges script It appears we'd need to update if there are no results for the given block. Bug: T175962 Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b954e064 --- M maintenance/populateIpChanges.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/42/379142/1 diff --git a/maintenance/populateIpChanges.php b/maintenance/populateIpChanges.php index 17f49ee..859c089 100644 --- a/maintenance/populateIpChanges.php +++ b/maintenance/populateIpChanges.php @@ -88,6 +88,7 @@ $numRows = $rows->numRows(); if ( !$rows || $numRows === 0 ) { + $blockStart = $blockEnd + 1; break; } -- To view, visit https://gerrit.wikimedia.org/r/379142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b954e064 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MusikAnimal ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Update AUTHORS.txt
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378839 ) Change subject: Update AUTHORS.txt .. Update AUTHORS.txt Change-Id: Ifbd66135a8e91a910d5ea6554c56f0d6f75a089c --- M .mailmap M AUTHORS.txt 2 files changed, 8 insertions(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/.mailmap b/.mailmap index 1b4ff47..890b6ca 100644 --- a/.mailmap +++ b/.mailmap @@ -39,8 +39,9 @@ Jeroen De Dauw Joel Sahleen Jon Robson -Lucie Kaffee Katie Filbert +Lucie Kaffee +Mainframe98 Marko Obrovac Mhutti1 Moritz Schubotz diff --git a/AUTHORS.txt b/AUTHORS.txt index 78d66e3..3a448c2 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -30,6 +30,7 @@ Darian Anthony Patrick David Causse Diederik van Liere +Dmitry Brant Douglas Gardner Dylan Grafmyre Ebrahim Byagowi @@ -60,12 +61,15 @@ Kunal Mehta Lucie Kaffee Luke Faraone +Mainframe98 Marcel Ruiz Forns Mark A. Hershberger Mark Holmquist Marko Obrovac Matthew Flaschen +Matthias Mullie Max Semenik +Merlijn van Deen Mhutti1 Michael Holloway Moriel Schottlender @@ -82,12 +86,14 @@ Pavel Astakhov Peter Hedenskog Petr Pchelko +Prateek Saxena Rainer Rillke Roan Kattouw Rob Moen S Page Sage Ross Sam Reed +Sam Smith Sergey Leschina Stanislav Malyshev Stephane Bisson -- To view, visit https://gerrit.wikimedia.org/r/378839 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifbd66135a8e91a910d5ea6554c56f0d6f75a089c Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavis Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Mainframe98 Gerrit-Reviewer: Matthias Mullie Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Phuedx Gerrit-Reviewer: Prtksxna Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: [DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as ...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378988 ) Change subject: [DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as to be removed .. [DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as to be removed Change-Id: I94cc0379b5ef138556cecae2a41cea8621d1b397 --- M demos/pages/icons.js M src/themes/apex/icons-interactions.json M src/themes/wikimediaui/icons-interactions.json 3 files changed, 7 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/demos/pages/icons.js b/demos/pages/icons.js index dbb266c..75a9f85 100644 --- a/demos/pages/icons.js +++ b/demos/pages/icons.js @@ -67,8 +67,7 @@ 'printer', 'search', 'settings', - 'subtract', - 'watchlist' + 'subtract' ], moderation: [ 'block', diff --git a/src/themes/apex/icons-interactions.json b/src/themes/apex/icons-interactions.json index c1695a7..8aa804e 100644 --- a/src/themes/apex/icons-interactions.json +++ b/src/themes/apex/icons-interactions.json @@ -66,6 +66,8 @@ "watchlist": { "file": { "ltr": "images/icons/watchlist-ltr.svg", "rtl": "images/icons/watchlist-rtl.svg" - } } + }, + "deprecated": "This will be removed in v0.24.0." + } } } diff --git a/src/themes/wikimediaui/icons-interactions.json b/src/themes/wikimediaui/icons-interactions.json index ab0ecef..1fb333a 100644 --- a/src/themes/wikimediaui/icons-interactions.json +++ b/src/themes/wikimediaui/icons-interactions.json @@ -89,6 +89,8 @@ "watchlist": { "file": { "ltr": "images/icons/watchlist-ltr.svg", "rtl": "images/icons/watchlist-rtl.svg" - } } + }, + "deprecated": "This will be removed in v0.24.0." + } } } -- To view, visit https://gerrit.wikimedia.org/r/378988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94cc0379b5ef138556cecae2a41cea8621d1b397 Gerrit-PatchSet: 2 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Pginer Gerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Toolbar: Merge two selectors with same property
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379139 ) Change subject: Toolbar: Merge two selectors with same property .. Toolbar: Merge two selectors with same property Change-Id: Ia18d2e905906682f598c9f86ac1e2c27ae1f818a --- M src/styles/Toolbar.less 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/src/styles/Toolbar.less b/src/styles/Toolbar.less index 10a4d21..13ec632 100644 --- a/src/styles/Toolbar.less +++ b/src/styles/Toolbar.less @@ -17,10 +17,7 @@ display: inline; white-space: nowrap; - .oo-ui-toolbar-narrow & { - white-space: normal; - } - + .oo-ui-toolbar-narrow &, // Tools like PopupToolGroup can have a lot of content, which should be wrapped normally .oo-ui-tool { white-space: normal; -- To view, visit https://gerrit.wikimedia.org/r/379139 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia18d2e905906682f598c9f86ac1e2c27ae1f818a Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.30.0-wmf.19]: ApiVisualEditor: Fix checkbox label message handling with Me...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378991 ) Change subject: ApiVisualEditor: Fix checkbox label message handling with Message objects .. ApiVisualEditor: Fix checkbox label message handling with Message objects Follow-up to df9e564b735a96cb7bcc75eca83530bef312cc14. Eh, this is hacky. I did not think this through when making the original change. Bug: T176249 Change-Id: Ieff2c3174479831797bd37a6b1d0df44ed6ce0df (cherry picked from commit 9c8eded5d9f1f05064220efec345e82a4adb1063) --- M ApiVisualEditor.php 1 file changed, 22 insertions(+), 10 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index 89e43e3..ec9fff4 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -477,20 +477,32 @@ $user->isWatched( $title ), ]; $checkboxesDef = $editPage->getCheckboxesDefinition( $states ); - $checkboxesMessages = []; - foreach ( $checkboxesDef as $name => $options ) { + $checkboxesMessagesList = []; + foreach ( $checkboxesDef as $name => &$options ) { if ( isset( $options['tooltip'] ) ) { - $checkboxesMessages[ "accesskey-{$options['tooltip']}" ] = - $this->msg( "accesskey-{$options['tooltip']}" )->plain(); - $checkboxesMessages[ "tooltip-{$options['tooltip']}" ] = - $this->msg( "tooltip-{$options['tooltip']}" )->plain(); + $checkboxesMessagesList[] = "accesskey-{$options['tooltip']}"; + $checkboxesMessagesList[] = "tooltip-{$options['tooltip']}"; } if ( isset( $options['title-message'] ) ) { - $checkboxesMessages[ $options['title-message'] ] = - $this->msg( $options['title-message'] )->plain(); + $checkboxesMessagesList[] = $options['title-message']; + if ( !is_string( $options['title-message'] ) ) { + // Extract only the key. Any parameters are included in the fake message definition + // passed via $checkboxesMessages. (This changes $checkboxesDef by reference.) + $options['title-message'] = $this->msg( $options['title-message'] )->getKey(); + } } - $checkboxesMessages[ $options['label-message'] ] = - $this->msg( $options['label-message'] )->plain(); + $checkboxesMessagesList[] = $options['label-message']; + if ( !is_string( $options['label-message'] ) ) { + // Extract only the key. Any parameters are included in the fake message definition + // passed via $checkboxesMessages. (This changes $checkboxesDef by reference.) + $options['label-message'] = $this->msg( $options['label-message'] )->getKey(); + } + } + $checkboxesMessages = []; + foreach ( $checkboxesMessagesList as $messageSpecifier ) { + // $messageSpecifier may be a string or a Message object + $message = $this->msg( $messageSpecifier ); + $checkboxesMessages[ $message->getKey() ] = $message->plain(); } $templates = $editPage->makeTemplatesOnThisPageList( $editPage->getTemplates() ); -- To view, visit https://gerrit.wikimedia.org/r/378991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieff2c3174479831797bd37a6b1d0df44ed6ce0df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: Jforrester Gerrit-Reviewer: Bartosz Dzi
[MediaWiki-commits] [Gerrit] labs...heritage[master]: [WIP]Group unused images per source page
Lokal Profil has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379141 ) Change subject: [WIP]Group unused images per source page .. [WIP]Group unused images per source page Also ensures that all candidates for a given monuments id are always displayed even if this brings us over the max threshold. WIP because: * needs testing * look over if more info can be sent to stats * possibly integrate with T176200 update Bug: T117327 Change-Id: Ifd1915eb7ce810d1ecfa0d6ce98007726593d1eb --- M erfgoedbot/unused_monument_images.py 1 file changed, 56 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage refs/changes/41/379141/1 diff --git a/erfgoedbot/unused_monument_images.py b/erfgoedbot/unused_monument_images.py index 07676d5..5f60e80 100644 --- a/erfgoedbot/unused_monument_images.py +++ b/erfgoedbot/unused_monument_images.py @@ -24,30 +24,9 @@ _logger = "unused_images" -def processCountry(countrycode, lang, countryconfig, conn, cursor, conn2, cursor2, local_write): -''' -Work on a single country. -''' -if not countryconfig.get('unusedImagesPage'): -# unusedImagesPage not set, just skip silently. -return False - -unusedImagesPage = countryconfig.get('unusedImagesPage') -project = countryconfig.get('project', u'wikipedia') -commonsTrackerCategory = countryconfig.get( -'commonsTrackerCategory').replace(u' ', u'_') - -withoutPhoto = getMonumentsWithoutPhoto(countrycode, lang, conn, cursor) -photos = getMonumentPhotos(commonsTrackerCategory, conn2, cursor2) - -pywikibot.log(u'withoutPhoto %s elements' % (len(withoutPhoto),)) -pywikibot.log(u'photos %s elements' % (len(photos),)) - -# People can add a /header template for with more info -text = u'{{#ifexist:{{FULLPAGENAME}}/header | {{/header}} }}\n' -text += u'\n' -totalImages = 0 -maxImages = 1000 +def group_unused_images_by_source(photos, withoutPhoto, countryconfig): +"""Identify all unused images and group them by source page and id.""" +unused_images = {} for catSortKey in sorted(photos.keys()): try: @@ -74,24 +53,68 @@ try: source_link = common.get_source_link( withoutPhoto.get(monumentId), -countryconfig.get('type'), -monumentId) +countryconfig.get('type')) +if source_link not in unused_images: +unused_images[source_link] = {} except ValueError: pywikibot.warning( u'Could not find wikiSourceList for %s (%s)' % ( monumentId, withoutPhoto.get(monumentId))) continue imageName = photos.get(catSortKey) -# pywikibot.output(u'Key %s returned a result' % (monumentId,)) -# pywikibot.output(imageName) -if totalImages <= maxImages: -text += u'File:{0}|{1}\n'.format( -unicode(imageName, 'utf-8'), source_link) -totalImages += 1 + +if monumentId not in unused_images[source_link]: +unused_images[source_link][monumentId] = [] + +unused_images[source_link][monumentId].append(imageName) except ValueError: pywikibot.warning(u'Got value error for %s' % (monumentId,)) -text += u'' +return unused_images + + +#TODO send more stats back to main +def processCountry(countrycode, lang, countryconfig, conn, cursor, conn2, cursor2, local_write): +''' +Work on a single country. +''' +if not countryconfig.get('unusedImagesPage'): +# unusedImagesPage not set, just skip silently. +return False + +unusedImagesPage = countryconfig.get('unusedImagesPage') +project = countryconfig.get('project', u'wikipedia') +commonsTrackerCategory = countryconfig.get( +'commonsTrackerCategory').replace(u' ', u'_') + +withoutPhoto = getMonumentsWithoutPhoto(countrycode, lang, conn, cursor) +photos = getMonumentPhotos(commonsTrackerCategory, conn2, cursor2) + +pywikibot.log(u'withoutPhoto %s elements' % (len(withoutPhoto),)) +pywikibot.log(u'photos %s elements' % (len(photos),)) + +# People can add a /header template for with more info +text = u'{{#ifexist:{{FULLPAGENAME}}/header | {{/header}} }}\n' +totalImages = 0 +maxImages = 1000 + +unused_images = group_unused_images_by_source( +photos, withoutPhoto, countryconfig) + +for source_page, value in unused_images.iteritems(): +if totalImages <= maxImages: +text += u'=== {0} ===\n'.format(source_page) +text += u'\n' +for monument_id, candidates in value.iteritems(): +
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.30.0-wmf.18]: ApiVisualEditor: Fix checkbox label message handling with Me...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378990 ) Change subject: ApiVisualEditor: Fix checkbox label message handling with Message objects .. ApiVisualEditor: Fix checkbox label message handling with Message objects Follow-up to df9e564b735a96cb7bcc75eca83530bef312cc14. Eh, this is hacky. I did not think this through when making the original change. Bug: T176249 Change-Id: Ieff2c3174479831797bd37a6b1d0df44ed6ce0df (cherry picked from commit 9c8eded5d9f1f05064220efec345e82a4adb1063) --- M ApiVisualEditor.php 1 file changed, 22 insertions(+), 10 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index 1fee911..1a5d4f5 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -452,20 +452,32 @@ $checkboxes = method_exists( $editPage, 'getCheckboxes' ) ? $editPage->getCheckboxes( $tabindex, $states ) : ''; $checkboxesDef = $editPage->getCheckboxesDefinition( $states ); - $checkboxesMessages = []; - foreach ( $checkboxesDef as $name => $options ) { + $checkboxesMessagesList = []; + foreach ( $checkboxesDef as $name => &$options ) { if ( isset( $options['tooltip'] ) ) { - $checkboxesMessages[ "accesskey-{$options['tooltip']}" ] = - $this->msg( "accesskey-{$options['tooltip']}" )->plain(); - $checkboxesMessages[ "tooltip-{$options['tooltip']}" ] = - $this->msg( "tooltip-{$options['tooltip']}" )->plain(); + $checkboxesMessagesList[] = "accesskey-{$options['tooltip']}"; + $checkboxesMessagesList[] = "tooltip-{$options['tooltip']}"; } if ( isset( $options['title-message'] ) ) { - $checkboxesMessages[ $options['title-message'] ] = - $this->msg( $options['title-message'] )->plain(); + $checkboxesMessagesList[] = $options['title-message']; + if ( !is_string( $options['title-message'] ) ) { + // Extract only the key. Any parameters are included in the fake message definition + // passed via $checkboxesMessages. (This changes $checkboxesDef by reference.) + $options['title-message'] = $this->msg( $options['title-message'] )->getKey(); + } } - $checkboxesMessages[ $options['label-message'] ] = - $this->msg( $options['label-message'] )->plain(); + $checkboxesMessagesList[] = $options['label-message']; + if ( !is_string( $options['label-message'] ) ) { + // Extract only the key. Any parameters are included in the fake message definition + // passed via $checkboxesMessages. (This changes $checkboxesDef by reference.) + $options['label-message'] = $this->msg( $options['label-message'] )->getKey(); + } + } + $checkboxesMessages = []; + foreach ( $checkboxesMessagesList as $messageSpecifier ) { + // $messageSpecifier may be a string or a Message object + $message = $this->msg( $messageSpecifier ); + $checkboxesMessages[ $message->getKey() ] = $message->plain(); } $templates = $editPage->makeTemplatesOnThisPageList( $editPage->getTemplates() ); -- To view, visit https://gerrit.wikimedia.org/r/378990 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieff2c3174479831797bd37a6b1d0df44ed6ce0df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Bran
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.19]: Javascript timestamps are in ms, not s
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379119 ) Change subject: Javascript timestamps are in ms, not s .. Javascript timestamps are in ms, not s The timeout was intended to be set to 2 days, but due to a mixup between millis and seconds it was only set to about 3 minutes. Additionally add an early exit for navigator.doNotTrack, as event logging won't send the events anyways. Bug: T174106 Change-Id: I58517c23416822790d93ed714140b6294a8880ad (cherry picked from commit a3d63b999c3e1c15db66f524548dcddec85db998) --- M modules/ext.wikimediaEvents.humanSearchRelevance.js 1 file changed, 12 insertions(+), 1 deletion(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js b/modules/ext.wikimediaEvents.humanSearchRelevance.js index 5515399..0861666 100644 --- a/modules/ext.wikimediaEvents.humanSearchRelevance.js +++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js @@ -19,6 +19,17 @@ return options[ Math.floor( parsed / step ) ]; } + // See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack + // Taken from https://www.npmjs.com/package/dnt-polyfill + if ( window.doNotTrack === '1' || + window.navigator && ( + window.navigator.doNotTrack === '1' || + window.navigator.doNotTrack === 'yes' || + window.navigator.msDoNotTrack === '1' + ) ) { + return; + } + // Page is not part of this test if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) { return; @@ -93,7 +104,7 @@ } // If we can't record that the survey shouldn't be duplicated, just // opt them out of the survey all together. - if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) { + if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/379119 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: EBernhardson Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.18]: Javascript timestamps are in ms, not s
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379118 ) Change subject: Javascript timestamps are in ms, not s .. Javascript timestamps are in ms, not s The timeout was intended to be set to 2 days, but due to a mixup between millis and seconds it was only set to about 3 minutes. Additionally add an early exit for navigator.doNotTrack, as event logging won't send the events anyways. Bug: T174106 Change-Id: I58517c23416822790d93ed714140b6294a8880ad (cherry picked from commit a3d63b999c3e1c15db66f524548dcddec85db998) --- M modules/ext.wikimediaEvents.humanSearchRelevance.js 1 file changed, 12 insertions(+), 1 deletion(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js b/modules/ext.wikimediaEvents.humanSearchRelevance.js index 5515399..0861666 100644 --- a/modules/ext.wikimediaEvents.humanSearchRelevance.js +++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js @@ -19,6 +19,17 @@ return options[ Math.floor( parsed / step ) ]; } + // See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack + // Taken from https://www.npmjs.com/package/dnt-polyfill + if ( window.doNotTrack === '1' || + window.navigator && ( + window.navigator.doNotTrack === '1' || + window.navigator.doNotTrack === 'yes' || + window.navigator.msDoNotTrack === '1' + ) ) { + return; + } + // Page is not part of this test if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) { return; @@ -93,7 +104,7 @@ } // If we can't record that the survey shouldn't be duplicated, just // opt them out of the survey all together. - if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) { + if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/379118 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: wmf/1.30.0-wmf.18 Gerrit-Owner: EBernhardson Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.19]: SpecialRecentchangeslinked: Unconditionally join on the page...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378972 ) Change subject: SpecialRecentchangeslinked: Unconditionally join on the page table .. SpecialRecentchangeslinked: Unconditionally join on the page table As we do on SpecialRecentchanges and SpecialWatchlist already, because the last revision filter needs it. Bug: T176228 Change-Id: I65f0f971df24853999ca445f968dd49fb0640066 (cherry picked from commit b0897c3dee75b50b9dbf87dfd0651a43c9e905f7) --- M includes/specials/SpecialRecentchangeslinked.php 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index e353f0c..a13af55 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -98,11 +98,11 @@ 'wl_namespace=rc_namespace' ] ]; } - if ( $this->getUser()->isAllowed( 'rollback' ) ) { - $tables[] = 'page'; - $join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ]; - $select[] = 'page_latest'; - } + + // JOIN on page, used for 'last revision' filter highlight + $tables[] = 'page'; + $join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ]; + $select[] = 'page_latest'; $tagFilter = $opts['tagfilter'] ? explode( '|', $opts['tagfilter'] ) : []; ChangeTags::modifyDisplayQuery( -- To view, visit https://gerrit.wikimedia.org/r/378972 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I65f0f971df24853999ca445f968dd49fb0640066 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.18]: SpecialRecentchangeslinked: Unconditionally join on the page...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378973 ) Change subject: SpecialRecentchangeslinked: Unconditionally join on the page table .. SpecialRecentchangeslinked: Unconditionally join on the page table As we do on SpecialRecentchanges and SpecialWatchlist already, because the last revision filter needs it. Bug: T176228 Change-Id: I65f0f971df24853999ca445f968dd49fb0640066 (cherry picked from commit b0897c3dee75b50b9dbf87dfd0651a43c9e905f7) --- M includes/specials/SpecialRecentchangeslinked.php 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index e353f0c..a13af55 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -98,11 +98,11 @@ 'wl_namespace=rc_namespace' ] ]; } - if ( $this->getUser()->isAllowed( 'rollback' ) ) { - $tables[] = 'page'; - $join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ]; - $select[] = 'page_latest'; - } + + // JOIN on page, used for 'last revision' filter highlight + $tables[] = 'page'; + $join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ]; + $select[] = 'page_latest'; $tagFilter = $opts['tagfilter'] ? explode( '|', $opts['tagfilter'] ) : []; ChangeTags::modifyDisplayQuery( -- To view, visit https://gerrit.wikimedia.org/r/378973 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I65f0f971df24853999ca445f968dd49fb0640066 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.30.0-wmf.18 Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: DB_SLAVE -> DB_REPLICA
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378894 ) Change subject: DB_SLAVE -> DB_REPLICA .. DB_SLAVE -> DB_REPLICA Timeless requires MW 1.29 or newer anyway, so this is perfectly fine, given that DB_SLAVE is deprecated in modern versions of MW in favor of the new DB_REPLICA constant (which was even backported to MW 1.27 branch). Change-Id: I96635a042a7b149cc024f44f3383421a7c7fb721 --- M TimelessTemplate.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: SamanthaNguyen: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/TimelessTemplate.php b/TimelessTemplate.php index 5e4ad4f..bee568c 100644 --- a/TimelessTemplate.php +++ b/TimelessTemplate.php @@ -724,7 +724,7 @@ } } if ( count( $allCats ) > 0 ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( [ 'page', 'page_props' ], [ 'page_id', 'page_title' ], -- To view, visit https://gerrit.wikimedia.org/r/378894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I96635a042a7b149cc024f44f3383421a7c7fb721 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Timeless Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: Isarra Gerrit-Reviewer: MaxSem Gerrit-Reviewer: SamanthaNguyen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable jQuery 3 on meta.wikimedia.org
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378802 ) Change subject: Enable jQuery 3 on meta.wikimedia.org .. Enable jQuery 3 on meta.wikimedia.org Bug: T124742 Change-Id: Ie7531a88e0351b60e5f80423767e5acbf400d552 --- M wmf-config/InitialiseSettings.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 18062b1..0df27d7 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -14930,14 +14930,15 @@ 'mediawikiwiki' => true, // opt-in (T124742) - 'plwiki' => true, // @MatmaRex - 'svwiki' => true, // @Nirmos + 'metawiki' => true, // @Krinkle 'nlwiki' => true, // @Krinkle 'nlwikibooks' => true, // @Krinkle 'nlwikinews' => true, // @Krinkle 'nlwikiquote' => true, // @Krinkle 'nlwikisource' => true, // @Krinkle 'nlwiktionary' => true, // @Krinkle + 'plwiki' => true, // @MatmaRex + 'svwiki' => true, // @Nirmos ], 'wgCiteResponsiveReferences' => [ -- To view, visit https://gerrit.wikimedia.org/r/378802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7531a88e0351b60e5f80423767e5acbf400d552 Gerrit-PatchSet: 4 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Catrope Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikiCategoryTagCloud[master]: DB_SLAVE -> DB_REPLICA
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378892 ) Change subject: DB_SLAVE -> DB_REPLICA .. DB_SLAVE -> DB_REPLICA Change-Id: I6a6d5a6c31912041ae812d2997d52d806988ccaa --- M WikiCategoryTagCloud.class.php M extension.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: SamanthaNguyen: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/WikiCategoryTagCloud.class.php b/WikiCategoryTagCloud.class.php index 81658e9..021437f 100644 --- a/WikiCategoryTagCloud.class.php +++ b/WikiCategoryTagCloud.class.php @@ -71,7 +71,7 @@ // Add CSS into the output via ResourceLoader $parser->getOutput()->addModuleStyles( 'ext.wikicategorytagcloud' ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $cloudStyle = ( isset( $params['style'] ) ? Sanitizer::checkCss( $params['style'] ) : '' ); $cloudClasses = preg_split( '/\s+/', ( isset( $params['class'] ) ? htmlspecialchars( $params['class'], ENT_QUOTES ) : '' ) ); diff --git a/extension.json b/extension.json index 2ab5bfc..21bb1c2 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "Wiki Category Tag Cloud", - "version": "1.3.2", + "version": "1.3.3", "author": [ "[http://danf.ca/mw/ Daniel Friesen]", "Jack Phoenix" -- To view, visit https://gerrit.wikimedia.org/r/378892 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a6d5a6c31912041ae812d2997d52d806988ccaa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiCategoryTagCloud Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: MaxSem Gerrit-Reviewer: SamanthaNguyen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WhosOnline[master]: DB_SLAVE -> DB_REPLICA
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378893 ) Change subject: DB_SLAVE -> DB_REPLICA .. DB_SLAVE -> DB_REPLICA Change-Id: I3a1b7719a8333b5237a5a8a61047cb6f8c9757bb --- M WhosOnlineSpecialPage.php M extension.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: SamanthaNguyen: Looks good to me, approved jenkins-bot: Verified diff --git a/WhosOnlineSpecialPage.php b/WhosOnlineSpecialPage.php index 910bd58..aae2f84 100644 --- a/WhosOnlineSpecialPage.php +++ b/WhosOnlineSpecialPage.php @@ -105,7 +105,7 @@ // get list of logged-in users being online protected function getAnonsOnline() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $row = $dbr->selectRow( 'online', diff --git a/extension.json b/extension.json index 77f54eb..b7b1de8 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "WhosOnline", - "version": "1.7.1", + "version": "1.7.2", "author": [ "Maciej Brencz" ], -- To view, visit https://gerrit.wikimedia.org/r/378893 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a1b7719a8333b5237a5a8a61047cb6f8c9757bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WhosOnline Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: SamanthaNguyen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...RandomImageByCategory[master]: DB_SLAVE -> DB_REPLICA
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378891 ) Change subject: DB_SLAVE -> DB_REPLICA .. DB_SLAVE -> DB_REPLICA Change-Id: Ifb4023ef0fb88356e71efc7bbb9d7f411a89a29a --- M RandomImageByCategory.class.php M extension.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: SamanthaNguyen: Looks good to me, approved jenkins-bot: Verified diff --git a/RandomImageByCategory.class.php b/RandomImageByCategory.class.php index c6fec14..01ce7a7 100644 --- a/RandomImageByCategory.class.php +++ b/RandomImageByCategory.class.php @@ -65,7 +65,7 @@ $params['LIMIT'] = $limit; } - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( array( 'page', 'categorylinks' ), array( 'page_title' ), diff --git a/extension.json b/extension.json index 1d1c96a..5d3479d 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "RandomImageByCategory", - "version": "1.3", + "version": "1.3.1", "author": [ "Aaron Wright", "David Pean", -- To view, visit https://gerrit.wikimedia.org/r/378891 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifb4023ef0fb88356e71efc7bbb9d7f411a89a29a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RandomImageByCategory Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: SamanthaNguyen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Update systemd script
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379136 ) Change subject: Gerrit: Update systemd script .. Gerrit: Update systemd script Change-Id: I8577db4e09171e95b297ab5ab0b5aec392a7ef52 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/379136/1 -- To view, visit https://gerrit.wikimedia.org/r/379136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8577db4e09171e95b297ab5ab0b5aec392a7ef52 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Define a constant to allow switching dbs for phpunit
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/359174 ) Change subject: Define a constant to allow switching dbs for phpunit .. Define a constant to allow switching dbs for phpunit Change-Id: I449b0fb8a430c4f42db1095975aa1de9989501ae --- M sites/default/bootstrap-phpunit.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/sites/default/bootstrap-phpunit.php b/sites/default/bootstrap-phpunit.php index 310d531..833e14c 100644 --- a/sites/default/bootstrap-phpunit.php +++ b/sites/default/bootstrap-phpunit.php @@ -1,5 +1,6 @@ https://gerrit.wikimedia.org/r/359174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I449b0fb8a430c4f42db1095975aa1de9989501ae Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Katie Horn Gerrit-Reviewer: Mepps Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...heritage[master]: Make all erfgoedbot scripts respect the skipping mechanisms.
Lokal Profil has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379140 ) Change subject: Make all erfgoedbot scripts respect the skipping mechanisms. .. Make all erfgoedbot scripts respect the skipping mechanisms. The skipping mechanisms (introduced through the merging of the Wikidata branch) consist of the `skip` field in the config and the `-skip_wd` command line argument. Also: set nl-wd_(nl) to skip Change-Id: I68f345cf09e555e2ea37c4db0197ccc11954abc1 --- M erfgoedbot/add_coord_to_articles.py M erfgoedbot/add_object_location_monuments.py M erfgoedbot/categorize_images.py M erfgoedbot/images_of_monuments_without_id.py M erfgoedbot/missing_commonscat_links.py M erfgoedbot/monuments_config/nl-wd_nl.json M erfgoedbot/populate_image_table.py M erfgoedbot/unused_monument_images.py M erfgoedbot/update_id_dump.py 9 files changed, 65 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage refs/changes/40/379140/1 diff --git a/erfgoedbot/add_coord_to_articles.py b/erfgoedbot/add_coord_to_articles.py index 5a9950e..58fa56e 100644 --- a/erfgoedbot/add_coord_to_articles.py +++ b/erfgoedbot/add_coord_to_articles.py @@ -291,6 +291,7 @@ def main(): countrycode = u'' lang = u'' +skip_wd = False connMon = None cursorMon = None @@ -302,10 +303,12 @@ countrycode = value elif option == '-langcode': lang = value +elif option == '-skip_wd': +skip_wd = True else: raise Exception( -u'Bad parameters. Expected "-countrycode", "-langcode" or ' -u'pywikibot args. Found "{}"'.format(option)) +u'Bad parameters. Expected "-countrycode", "-langcode", ' +u'"-skip_wd" or pywikibot args. Found "{}"'.format(option)) if countrycode and lang: if not mconfig.countries.get((countrycode, lang)): @@ -318,6 +321,9 @@ u'be used together.') else: for (countrycode, lang), countryconfig in mconfig.countries.iteritems(): +if (countryconfig.get('skip') or +(skip_wd and (countryconfig.get('type') == 'sparql'))): +continue pywikibot.output(u'Working on countrycode "%s" in language "%s"' % (countrycode, lang)) processCountry(countrycode, lang, countryconfig, wikiData.get(lang), connMon, cursorMon) diff --git a/erfgoedbot/add_object_location_monuments.py b/erfgoedbot/add_object_location_monuments.py index 25816f4..ae780d9 100644 --- a/erfgoedbot/add_object_location_monuments.py +++ b/erfgoedbot/add_object_location_monuments.py @@ -206,6 +206,7 @@ def main(): countrycode = u'' lang = u'' +skip_wd = False local_write = None # Connect database, we need that @@ -218,12 +219,15 @@ countrycode = value elif option == '-langcode': lang = value +elif option == '-skip_wd': +skip_wd = True elif option == '-local_write': local_write = value else: raise Exception( u'Bad parameters. Expected "-countrycode", "-langcode", ' -u'"-local_write" or pywikibot args. Found "{}"'.format(option)) +u'"-skip_wd", "-local_write" or pywikibot args. ' +u'Found "{}"'.format(option)) pywikibot.setSite(pywikibot.getSite(u'commons', u'commons')) @@ -241,6 +245,9 @@ u'be used together.') else: for (countrycode, lang), countryconfig in mconfig.countries.iteritems(): +if (countryconfig.get('skip') or +(skip_wd and (countryconfig.get('type') == 'sparql'))): +continue if not countryconfig.get('autoGeocode'): pywikibot.output( u'"%s" in language "%s" is not supported in auto geocode mode (yet).' % (countrycode, lang)) diff --git a/erfgoedbot/categorize_images.py b/erfgoedbot/categorize_images.py index 06c7b71..746dc59 100644 --- a/erfgoedbot/categorize_images.py +++ b/erfgoedbot/categorize_images.py @@ -531,6 +531,7 @@ countrycode = u'' lang = u'' overridecat = u'' +skip_wd = False local_write = None conn = None cursor = None @@ -545,13 +546,15 @@ lang = value elif option == '-overridecat': overridecat = value +elif option == '-skip_wd': +skip_wd = True elif option == '-local_write': local_write = value else: raise Exception( u'Bad parameters. Expected "-countrycode", "-langcode", ' -u'"-overridecat", "-local_write" or pywikibot args. ' -u'Found "{}"'.format(option)) +u'"-overridecat", "-skip_wd", "-local_write" or pywikibot ' +
[MediaWiki-commits] [Gerrit] mediawiki...EventLogging[master]: Update DNT check to support IE 11 and Safari 7
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379129 ) Change subject: Update DNT check to support IE 11 and Safari 7 .. Update DNT check to support IE 11 and Safari 7 Change-Id: Ie2341ffe6a596e8e16abb64d0587b788656894cf --- M modules/ext.eventLogging.core.js 1 file changed, 11 insertions(+), 1 deletion(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js index 1cb4b98..b5a1086 100644 --- a/modules/ext.eventLogging.core.js +++ b/modules/ext.eventLogging.core.js @@ -243,10 +243,20 @@ * If the user expressed a preference not to be tracked, or if * $wgEventLoggingBaseUri is unset, this method is a no-op. * +* See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack +* * @param {string} url URL to request from the server. * @return undefined */ - sendBeacon: ( /1|yes/.test( navigator.doNotTrack ) || !baseUrl ) + sendBeacon: ( + // Support: Firefox < 32 (yes/no) + /1|yes/.test( navigator.doNotTrack ) || + // Support: IE 11, Safari 7.1.3+ (window.doNotTrack) + window.doNotTrack === '1' || + // Support: IE 9, IE 10 (navigator.msDoNotTrack) + navigator.msDoNotTrack === '1' || + !baseUrl + ) ? $.noop : navigator.sendBeacon ? function ( url ) { try { navigator.sendBeacon( url ); } catch ( e ) {} } -- To view, visit https://gerrit.wikimedia.org/r/379129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie2341ffe6a596e8e16abb64d0587b788656894cf Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/EventLogging Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Nuria Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Toolbar: Merge two selectors with same property
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379139 ) Change subject: Toolbar: Merge two selectors with same property .. Toolbar: Merge two selectors with same property Change-Id: Ia18d2e905906682f598c9f86ac1e2c27ae1f818a --- M src/styles/Toolbar.less 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/39/379139/1 diff --git a/src/styles/Toolbar.less b/src/styles/Toolbar.less index 10a4d21..13ec632 100644 --- a/src/styles/Toolbar.less +++ b/src/styles/Toolbar.less @@ -17,10 +17,7 @@ display: inline; white-space: nowrap; - .oo-ui-toolbar-narrow & { - white-space: normal; - } - + .oo-ui-toolbar-narrow &, // Tools like PopupToolGroup can have a lot of content, which should be wrapped normally .oo-ui-tool { white-space: normal; -- To view, visit https://gerrit.wikimedia.org/r/379139 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia18d2e905906682f598c9f86ac1e2c27ae1f818a Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix empty( $thing->doStuff() ) use
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379138 ) Change subject: Fix empty( $thing->doStuff() ) use .. Fix empty( $thing->doStuff() ) use Change-Id: Ibe97a3874f11f00eed950c527c3ddcdfe49a1de4 --- M gateway_common/GatewayPage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/38/379138/1 diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php index 49520f1..da3bf0f 100644 --- a/gateway_common/GatewayPage.php +++ b/gateway_common/GatewayPage.php @@ -499,7 +499,7 @@ 'ffname' => $form, ) ); $this->displayForm(); - } elseif ( !empty( $result->getErrors() ) ) { + } elseif ( count( $result->getErrors() ) ) { $this->displayForm(); } else { // Success. -- To view, visit https://gerrit.wikimedia.org/r/379138 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe97a3874f11f00eed950c527c3ddcdfe49a1de4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: [WIP] Removing instrumentation for outdated schemas
Nuria has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379137 ) Change subject: [WIP] Removing instrumentation for outdated schemas .. [WIP] Removing instrumentation for outdated schemas Data provided by these schemas is avilable as part of EventBus and also as part of the edit data lake created from mediawiki edit reconstruction: Edit Data Lake: https://wikitech.wikimedia.org/wiki/Analytics/Data_Lake/Edits EventBus: https://wikitech.wikimedia.org/wiki/EventBus#MediaWiki Removing events for: https://meta.wikimedia.org/wiki/Schema:PageCreation https://meta.wikimedia.org/wiki/Schema:PageDeletion https://meta.wikimedia.org/wiki/Schema:PageMove https://meta.wikimedia.org/wiki/Schema:PageRestoration Bug: T171629 Change-Id: Ia4d916761d29cf9e91a15956531ebca0f00ad95f --- M WikimediaEventsHooks.php 1 file changed, 0 insertions(+), 133 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/37/379137/1 diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php index d70b94f..ee71f06 100644 --- a/WikimediaEventsHooks.php +++ b/WikimediaEventsHooks.php @@ -253,139 +253,6 @@ return true; } - /** -* Logs article deletions using the PageDeletion schema. -* -* @see https://www.mediawiki.org/wiki/Manual:Hooks/ArticleDeleteComplete -* @see https://meta.wikimedia.org/wiki/Schema:PageDeletion -* @param WikiPage $article The article that was deleted -* @param User $user The user that deleted the article -* @param string $reason The reason that the article was deleted -* @param int $id The ID of the article that was deleted -* @return true -*/ - public static function onArticleDeleteComplete( WikiPage $article, User $user, $reason, $id ) { - $title = $article->getTitle(); - EventLogging::logEvent( 'PageDeletion', 7481655, [ - 'userId' => $user->getId(), - 'userText' => $user->getName(), - 'pageId' => $id, - 'namespace' => $title->getNamespace(), - 'title' => $title->getDBkey(), - 'comment' => $reason, - ] ); - return true; - } - - /** -* Logs article undelete using pageRestored schema -* -* @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleUndelete -* @see https://meta.wikimedia.org/wiki/Schema:PageRestoration -* @param Title $title Title of article restored -* @param bool $created whether the revision created the page (default false) -* @param string $comment Reason for undeleting the page -* @param int $oldPageId The ID of the article that was deleted -*/ - public static function onArticleUndelete( $title, $created, $comment, $oldPageId ) { - global $wgUser; - EventLogging::logEvent( 'PageRestoration', 7758372, [ - 'userId' => $wgUser->getId(), - 'userText' => $wgUser->getName(), - 'oldPageId' => $oldPageId, - 'newPageId' => $title->getArticleID(), - 'namespace' => $title->getNamespace(), - 'title' => $title->getDBkey(), - 'comment' => $comment, - ] ); - } - - /** -* Logs a page creation event, based on the given parameters. -* -* Currently, this is either a normal page creation, or an automatic creation -* of a redirect when a page is moved. -* -* @see https://meta.wikimedia.org/wiki/Schema:PageCreation -* -* @param User $user user creating the page -* @param int $pageId page ID of new page -* @param Title $title title of created page -* @param int $revId revision ID of first revision of created page -*/ - protected static function logPageCreation( User $user, $pageId, Title $title, - $revId ) { - EventLogging::logEvent( 'PageCreation', 7481635, [ - 'userId' => $user->getId(), - 'userText' => $user->getName(), - 'pageId' => $pageId, - 'namespace' => $title->getNamespace(), - 'title' => $title->getDBkey(), - 'revId' => $revId, - ] ); - } - - /** -* Logs title moves with the PageMove schema. -* -* @see https://www.mediawiki.org/wiki/Manual:Hooks/TitleMoveComplete -* @see https://meta.wikimedia.or
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.18]: Don't attempt to copy to ip_changes in PageArchive class.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379133 ) Change subject: Don't attempt to copy to ip_changes in PageArchive class. .. Don't attempt to copy to ip_changes in PageArchive class. This actually happens in Revision::insertOn, so the code is redundant, but also shouldn't ever execute because it erroneously was checking for ar_rev_id=0 and not ar_user=0. This is sometimes causing errors in production, in the rare cases where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0. Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 --- M includes/page/PageArchive.php 1 file changed, 1 insertion(+), 10 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php index c98d4f7..af936cc 100644 --- a/includes/page/PageArchive.php +++ b/includes/page/PageArchive.php @@ -734,17 +734,8 @@ 'deleted' => $unsuppress ? 0 : $row->ar_deleted ] ); + // This will also copy the revision to ip_changes if it was an IP edit. $revision->insertOn( $dbw ); - - // Also restore reference to the revision in ip_changes if it was an IP edit. - if ( (int)$row->ar_rev_id === 0 && IP::isValid( $row->ar_user_text ) ) { - $ipcRow = [ - 'ipc_rev_id' => $row->ar_rev_id, - 'ipc_rev_timestamp' => $row->ar_timestamp, - 'ipc_hex' => IP::toHex( $row->ar_user_text ), - ]; - $dbw->insert( 'ip_changes', $ipcRow, __METHOD__ ); - } $restored++; -- To view, visit https://gerrit.wikimedia.org/r/379133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.30.0-wmf.18 Gerrit-Owner: MaxSem Gerrit-Reviewer: MaxSem Gerrit-Reviewer: MusikAnimal Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Use strings in container.slave
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379134 ) Change subject: Gerrit: Use strings in container.slave .. Gerrit: Use --slave in systemd script if using slave Change-Id: Idc207af7c1b17ff9e75073a08bdd0dab9c896a63 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/34/379134/1 -- To view, visit https://gerrit.wikimedia.org/r/379134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc207af7c1b17ff9e75073a08bdd0dab9c896a63 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.19]: Don't attempt to copy to ip_changes in PageArchive class.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379132 ) Change subject: Don't attempt to copy to ip_changes in PageArchive class. .. Don't attempt to copy to ip_changes in PageArchive class. This actually happens in Revision::insertOn, so the code is redundant, but also shouldn't ever execute because it erroneously was checking for ar_rev_id=0 and not ar_user=0. This is sometimes causing errors in production, in the rare cases where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0. Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 --- M includes/page/PageArchive.php 1 file changed, 1 insertion(+), 10 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php index c98d4f7..af936cc 100644 --- a/includes/page/PageArchive.php +++ b/includes/page/PageArchive.php @@ -734,17 +734,8 @@ 'deleted' => $unsuppress ? 0 : $row->ar_deleted ] ); + // This will also copy the revision to ip_changes if it was an IP edit. $revision->insertOn( $dbw ); - - // Also restore reference to the revision in ip_changes if it was an IP edit. - if ( (int)$row->ar_rev_id === 0 && IP::isValid( $row->ar_user_text ) ) { - $ipcRow = [ - 'ipc_rev_id' => $row->ar_rev_id, - 'ipc_rev_timestamp' => $row->ar_timestamp, - 'ipc_hex' => IP::toHex( $row->ar_user_text ), - ]; - $dbw->insert( 'ip_changes', $ipcRow, __METHOD__ ); - } $restored++; -- To view, visit https://gerrit.wikimedia.org/r/379132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: MaxSem Gerrit-Reviewer: MaxSem Gerrit-Reviewer: MusikAnimal Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't attempt to copy to ip_changes in PageArchive class.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379131 ) Change subject: Don't attempt to copy to ip_changes in PageArchive class. .. Don't attempt to copy to ip_changes in PageArchive class. This actually happens in Revision::insertOn, so the code is redundant, but also shouldn't ever execute because it erroneously was checking for ar_rev_id=0 and not ar_user=0. This is sometimes causing errors in production, in the rare cases where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0. Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 --- M includes/page/PageArchive.php 1 file changed, 1 insertion(+), 10 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php index c98d4f7..af936cc 100644 --- a/includes/page/PageArchive.php +++ b/includes/page/PageArchive.php @@ -734,17 +734,8 @@ 'deleted' => $unsuppress ? 0 : $row->ar_deleted ] ); + // This will also copy the revision to ip_changes if it was an IP edit. $revision->insertOn( $dbw ); - - // Also restore reference to the revision in ip_changes if it was an IP edit. - if ( (int)$row->ar_rev_id === 0 && IP::isValid( $row->ar_user_text ) ) { - $ipcRow = [ - 'ipc_rev_id' => $row->ar_rev_id, - 'ipc_rev_timestamp' => $row->ar_timestamp, - 'ipc_hex' => IP::toHex( $row->ar_user_text ), - ]; - $dbw->insert( 'ip_changes', $ipcRow, __METHOD__ ); - } $restored++; -- To view, visit https://gerrit.wikimedia.org/r/379131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MusikAnimal Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: [WIP] Add add form summary
Aleksey Bekh-Ivanov (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379135 ) Change subject: [WIP] Add add form summary .. [WIP] Add add form summary Change-Id: I921f9e7356645ef9fb5dce4c6c1c771900c36cb4 TODO: Add message --- M src/Api/AddForm.php A src/Api/AddFormSummary.php 2 files changed, 78 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme refs/changes/35/379135/1 diff --git a/src/Api/AddForm.php b/src/Api/AddForm.php index 74df872..708024a 100644 --- a/src/Api/AddForm.php +++ b/src/Api/AddForm.php @@ -101,9 +101,7 @@ //FIXME: Module description message //FIXME: Parameters messages //FIXME: Examples - //FIXME: Serialize nextFormId //FIXME: Response structure? - Added form - //FIXME: Don't show nextFormId in response $params = $this->extractRequestParams(); $parserResult = $this->requestParser->parse( $params ); @@ -126,7 +124,8 @@ $lexemeId = $request->getLexemeId(); $lexeme = $this->entitySavingHelper->loadEntity( $lexemeId ); $newForm = $request->addFormTo( $lexeme ); - $status = $this->entitySavingHelper->attemptSaveEntity( $lexeme, new Summary() ); + $summary = new AddFormSummary( $lexemeId, $newForm ); + $status = $this->entitySavingHelper->attemptSaveEntity( $lexeme, $summary ); $apiResult = $this->getResult(); @@ -151,9 +150,6 @@ self::PARAM_REQUIRED => true, ], 'token' => null, - 'baserevid' => [ - self::PARAM_TYPE => 'integer', - ], 'bot' => [ self::PARAM_TYPE => 'boolean', self::PARAM_DFLT => false, diff --git a/src/Api/AddFormSummary.php b/src/Api/AddFormSummary.php new file mode 100644 index 000..e8eba16 --- /dev/null +++ b/src/Api/AddFormSummary.php @@ -0,0 +1,76 @@ +lexemeId = $lexemeId; + $this->addedForm = $addedForm; + } + + public function getUserSummary() { + return null; + } + + public function getLanguageCode() { + return null; + } + + public function getMessageKey() { + return 'add-form'; + } + + public function getCommentArgs() { + return [ $this->addedForm->getId()->getSerialization() ]; + } + + public function getAutoSummaryArgs() { + return array_values( $this->addedForm->getRepresentations()->toTextArray() ); + } + + public function getModuleName() { + throw new \LogicException( "Should not be called" ); + } + + public function getActionName() { + throw new \LogicException( "Should not be called" ); + } + + public function addAutoCommentArgs( $args /*...*/ ) { + throw new \LogicException( "Should not be called" ); + } + + public function addAutoSummaryArgs( $args /*...*/ ) { + throw new \LogicException( "Should not be called" ); + } + + public function setUserSummary( $summary = null ) { + throw new \LogicException( "Should not be called" ); + } + + public function setLanguage( $languageCode = null ) { + throw new \LogicException( "Should not be called" ); + } + + public function setModuleName( $name ) { + throw new \LogicException( "Should not be called" ); + } + + public function setAction( $name ) { + throw new \LogicException( "Should not be called" ); + } + +} -- To view, visit https://gerrit.wikimedia.org/r/379135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I921f9e7356645ef9fb5dce4c6c1c771900c36cb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseLexeme Gerrit-Branch: master Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.18]: Don't attempt to copy to ip_changes in PageArchive class.
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379133 ) Change subject: Don't attempt to copy to ip_changes in PageArchive class. .. Don't attempt to copy to ip_changes in PageArchive class. This actually happens in Revision::insertOn, so the code is redundant, but also shouldn't ever execute because it erroneously was checking for ar_rev_id=0 and not ar_user=0. This is sometimes causing errors in production, in the rare cases where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0. Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 --- M includes/page/PageArchive.php 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/33/379133/1 diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php index c98d4f7..af936cc 100644 --- a/includes/page/PageArchive.php +++ b/includes/page/PageArchive.php @@ -734,17 +734,8 @@ 'deleted' => $unsuppress ? 0 : $row->ar_deleted ] ); + // This will also copy the revision to ip_changes if it was an IP edit. $revision->insertOn( $dbw ); - - // Also restore reference to the revision in ip_changes if it was an IP edit. - if ( (int)$row->ar_rev_id === 0 && IP::isValid( $row->ar_user_text ) ) { - $ipcRow = [ - 'ipc_rev_id' => $row->ar_rev_id, - 'ipc_rev_timestamp' => $row->ar_timestamp, - 'ipc_hex' => IP::toHex( $row->ar_user_text ), - ]; - $dbw->insert( 'ip_changes', $ipcRow, __METHOD__ ); - } $restored++; -- To view, visit https://gerrit.wikimedia.org/r/379133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.30.0-wmf.18 Gerrit-Owner: MaxSem Gerrit-Reviewer: MusikAnimal ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.19]: Don't attempt to copy to ip_changes in PageArchive class.
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379132 ) Change subject: Don't attempt to copy to ip_changes in PageArchive class. .. Don't attempt to copy to ip_changes in PageArchive class. This actually happens in Revision::insertOn, so the code is redundant, but also shouldn't ever execute because it erroneously was checking for ar_rev_id=0 and not ar_user=0. This is sometimes causing errors in production, in the rare cases where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0. Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 --- M includes/page/PageArchive.php 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/379132/1 diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php index c98d4f7..af936cc 100644 --- a/includes/page/PageArchive.php +++ b/includes/page/PageArchive.php @@ -734,17 +734,8 @@ 'deleted' => $unsuppress ? 0 : $row->ar_deleted ] ); + // This will also copy the revision to ip_changes if it was an IP edit. $revision->insertOn( $dbw ); - - // Also restore reference to the revision in ip_changes if it was an IP edit. - if ( (int)$row->ar_rev_id === 0 && IP::isValid( $row->ar_user_text ) ) { - $ipcRow = [ - 'ipc_rev_id' => $row->ar_rev_id, - 'ipc_rev_timestamp' => $row->ar_timestamp, - 'ipc_hex' => IP::toHex( $row->ar_user_text ), - ]; - $dbw->insert( 'ip_changes', $ipcRow, __METHOD__ ); - } $restored++; -- To view, visit https://gerrit.wikimedia.org/r/379132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: MaxSem Gerrit-Reviewer: MusikAnimal ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Fix last vendor commit
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379128 ) Change subject: Fix last vendor commit .. Fix last vendor commit It used my version of the submodule update, not the actual merged one Change-Id: Id277963d2e5aa6c61343fad7f075c8c6b0abffa0 --- M vendor 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/vendor b/vendor index c2ecf63..16e33f1 16 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit c2ecf633ab8a51c06419102bde1a8d519e6d3f70 +Subproject commit 16e33f174720fdeccf6c840cf2340ba8ce29a59b -- To view, visit https://gerrit.wikimedia.org/r/379128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id277963d2e5aa6c61343fad7f075c8c6b0abffa0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't attempt to copy to ip_changes in PageArchive class.
MusikAnimal has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379131 ) Change subject: Don't attempt to copy to ip_changes in PageArchive class. .. Don't attempt to copy to ip_changes in PageArchive class. This actually happens in Revision::insertOn, so the code is redundant, but also shouldn't ever execute because it erroneously was checking for ar_rev_id=0 and not ar_user=0. This is sometimes causing errors in production, in the rare cases where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0. Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 --- M includes/page/PageArchive.php 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/379131/1 diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php index c98d4f7..af936cc 100644 --- a/includes/page/PageArchive.php +++ b/includes/page/PageArchive.php @@ -734,17 +734,8 @@ 'deleted' => $unsuppress ? 0 : $row->ar_deleted ] ); + // This will also copy the revision to ip_changes if it was an IP edit. $revision->insertOn( $dbw ); - - // Also restore reference to the revision in ip_changes if it was an IP edit. - if ( (int)$row->ar_rev_id === 0 && IP::isValid( $row->ar_user_text ) ) { - $ipcRow = [ - 'ipc_rev_id' => $row->ar_rev_id, - 'ipc_rev_timestamp' => $row->ar_timestamp, - 'ipc_hex' => IP::toHex( $row->ar_user_text ), - ]; - $dbw->insert( 'ip_changes', $ipcRow, __METHOD__ ); - } $restored++; -- To view, visit https://gerrit.wikimedia.org/r/379131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MusikAnimal ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...EventLogging[master]: Update doNotTrack handling for IE 9-11 and Safari > 7.1.3
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379130 ) Change subject: Update doNotTrack handling for IE 9-11 and Safari > 7.1.3 .. Update doNotTrack handling for IE 9-11 and Safari > 7.1.3 Per MDN docs various browser expose doNotTrack in slightly different manners. Update our code to respect doNotTrack on mentioned browsers. Change-Id: Ic8f18000c4935087f1623a524cc40c74777d73e5 --- M modules/ext.eventLogging.core.js 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging refs/changes/30/379130/1 diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js index 1cb4b98..0f8e704 100644 --- a/modules/ext.eventLogging.core.js +++ b/modules/ext.eventLogging.core.js @@ -243,11 +243,16 @@ * If the user expressed a preference not to be tracked, or if * $wgEventLoggingBaseUri is unset, this method is a no-op. * +* See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack +* for how various browsers expose doNotTrack is slightly different ways. +* * @param {string} url URL to request from the server. * @return undefined */ - sendBeacon: ( /1|yes/.test( navigator.doNotTrack ) || !baseUrl ) - ? $.noop + sendBeacon: ( + /1|yes/.test( navigator.doNotTrack ) || !baseUrl + || window.doNotTrack === '1' || navigator.msDoNotTrack === '1' + ) ? $.noop : navigator.sendBeacon ? function ( url ) { try { navigator.sendBeacon( url ); } catch ( e ) {} } : function ( url ) { document.createElement( 'img' ).src = url; }, -- To view, visit https://gerrit.wikimedia.org/r/379130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8f18000c4935087f1623a524cc40c74777d73e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EventLogging Gerrit-Branch: master Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Fix last vendor commit
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379128 ) Change subject: Fix last vendor commit .. Fix last vendor commit It used my version of the submodule update, not the actual merged one Change-Id: Id277963d2e5aa6c61343fad7f075c8c6b0abffa0 --- M vendor 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/28/379128/1 diff --git a/vendor b/vendor index c2ecf63..16e33f1 16 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit c2ecf633ab8a51c06419102bde1a8d519e6d3f70 +Subproject commit 16e33f174720fdeccf6c840cf2340ba8ce29a59b -- To view, visit https://gerrit.wikimedia.org/r/379128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id277963d2e5aa6c61343fad7f075c8c6b0abffa0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...EventLogging[master]: Update DNT check to support IE 11 and Safari 7
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379129 ) Change subject: Update DNT check to support IE 11 and Safari 7 .. Update DNT check to support IE 11 and Safari 7 Change-Id: Ie2341ffe6a596e8e16abb64d0587b788656894cf --- M modules/ext.eventLogging.core.js 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging refs/changes/29/379129/1 diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js index 1cb4b98..41b8aca 100644 --- a/modules/ext.eventLogging.core.js +++ b/modules/ext.eventLogging.core.js @@ -243,10 +243,20 @@ * If the user expressed a preference not to be tracked, or if * $wgEventLoggingBaseUri is unset, this method is a no-op. * +* See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack +* * @param {string} url URL to request from the server. * @return undefined */ - sendBeacon: ( /1|yes/.test( navigator.doNotTrack ) || !baseUrl ) + sendBeacon: ( + // Support: IE 11, Safari 7.1.3+ (window.doNotTrack) + // Support: Firefox < 32 (yes/no) + // Support: IE 9, IE 10 (navigator.msDoNotTrack) + /1|yes/.test( + navigator.doNotTrack || + window.doNotTrack || + navigator.msDoNotTrack + ) || !baseUrl ) ? $.noop : navigator.sendBeacon ? function ( url ) { try { navigator.sendBeacon( url ); } catch ( e ) {} } -- To view, visit https://gerrit.wikimedia.org/r/379129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2341ffe6a596e8e16abb64d0587b788656894cf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EventLogging Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Vendor submodule update
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379127 ) Change subject: Vendor submodule update .. Vendor submodule update Vendor updates, Omnimail, SmashPig, Donation interface, minfraud Change-Id: Ie1e17b5c41812e645c8b39b6ae831a6b2481496f --- M vendor 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/vendor b/vendor index 05a1435..c2ecf63 16 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit 05a14356a3e580c649301e5b705154c2cfe761f6 +Subproject commit c2ecf633ab8a51c06419102bde1a8d519e6d3f70 -- To view, visit https://gerrit.wikimedia.org/r/379127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1e17b5c41812e645c8b39b6ae831a6b2481496f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen Gerrit-Reviewer: Eileen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Vendor submodule update
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379127 ) Change subject: Vendor submodule update .. Vendor submodule update Vendor updates, Omnimail, SmashPig, Donation interface, minfraud Change-Id: Ie1e17b5c41812e645c8b39b6ae831a6b2481496f --- M vendor 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/27/379127/1 diff --git a/vendor b/vendor index 05a1435..c2ecf63 16 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit 05a14356a3e580c649301e5b705154c2cfe761f6 +Subproject commit c2ecf633ab8a51c06419102bde1a8d519e6d3f70 -- To view, visit https://gerrit.wikimedia.org/r/379127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie1e17b5c41812e645c8b39b6ae831a6b2481496f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Dont reach through window to access navigator
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379125 ) Change subject: Dont reach through window to access navigator .. Dont reach through window to access navigator Avoid accessing navigator via window. (Causes errors to be missed by ESLint static analysis, e.g. in case of typos it would normally produce an lint warning for unknown global but now will not). The check is also redundant given all browsers implement this global and have for a long time. Change-Id: I4a66b1cb34c48c2f507e3c3689b611874777e8d1 --- M modules/ext.wikimediaEvents.humanSearchRelevance.js 1 file changed, 4 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js b/modules/ext.wikimediaEvents.humanSearchRelevance.js index 0861666..9e36352 100644 --- a/modules/ext.wikimediaEvents.humanSearchRelevance.js +++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js @@ -22,11 +22,10 @@ // See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack // Taken from https://www.npmjs.com/package/dnt-polyfill if ( window.doNotTrack === '1' || - window.navigator && ( - window.navigator.doNotTrack === '1' || - window.navigator.doNotTrack === 'yes' || - window.navigator.msDoNotTrack === '1' - ) ) { + navigator.doNotTrack === '1' || + navigator.doNotTrack === 'yes' || + navigator.msDoNotTrack === '1' + ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/379125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a66b1cb34c48c2f507e3c3689b611874777e8d1 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...heritage[master]: Harvest the source page of unknown fields
Lokal Profil has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379126 ) Change subject: Harvest the source page of unknown fields .. Harvest the source page of unknown fields The UnknownFields report is as of now not actionable as it is very hard to track down the location of the error. This stores all pages that have a given field, and displays a subset of these as wikilinks on the report in a third column. Bug: T117330 Change-Id: Iad3517c0bce961317e493ffad8b34ee5c6f8e363 --- M erfgoedbot/update_database.py M requirements-test.txt M tests/test_update_database.py 3 files changed, 104 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage refs/changes/26/379126/1 diff --git a/erfgoedbot/update_database.py b/erfgoedbot/update_database.py index 11a8f83..08fc4d5 100755 --- a/erfgoedbot/update_database.py +++ b/erfgoedbot/update_database.py @@ -141,9 +141,10 @@ def unknownFieldsStatistics(countryconfig, unknownFields, local_write): """ -Produce some unknown field statistics to debug. +Outputs a list of any unknown fields as a wikitext table. -This is still very raw data. Should be formatted and more information. +The table contains the name and frequency of the field and a sample of +source pages where this field was encountered. """ site = pywikibot.Site(u'commons', u'commons') page = pywikibot.Page( @@ -152,15 +153,42 @@ summary = u'Updating the list of unknown fields' text = u'{| class="wikitable sortable"\n' -text += u'! Field !! Count\n' +text += u'! Field !! Count !! Sources\n' for key, value in unknownFields.items(): text += u'|-\n' -text += u'| %s || %s\n' % (key, value) +text += u'| {0} || {1} || {2}\n'.format( +key, value['count'], format_source_field(value['sources'], site)) text += u'|}\n' text += u'[[Category:Commons:Monuments database/Unknown fields]]' common.save_to_wiki_or_local(page, summary, text, local_path=local_write) + + +def format_source_field(sources, site, sample_size=4): +""" +Format a list of source pages to fit in the statistics field. + +@param sources: set of pywikibot.Page objects +@param site: the site to which the output should be written (commons) +@param sample_size: the number of source pages to output +""" +source_text = '' +if len(sources) == 1: +source_page = list(sources)[0] +source_text = source_page.title( +asLink=True, forceInterwiki=True, insite=site) +else: +source_slice = list(sources)[:sample_size] +remaining = len(sources) - len(source_slice) +for source_page in source_slice: +source_text += u'\n* {0}'.format( +source_page.title( +asLink=True, forceInterwiki=True, insite=site)) +if remaining: +source_text += u'\n* and {0} more page(s)'.format(remaining) + +return source_text def updateMonument(contents, source, countryconfig, conn, cursor, sourcePage): @@ -338,8 +366,12 @@ title, field, value), _logger) if field not in unknownFields: -unknownFields[field] = 0 -unknownFields[field] += 1 +unknownFields[field] = { +'count': 0, +'sources': set() +} +unknownFields[field]['count'] += 1 +unknownFields[field]['sources'].add(sourcePage) # time.sleep(5) # If we truncate we don't have to check for primkey (it's a made up one) diff --git a/requirements-test.txt b/requirements-test.txt index 9f90b1c..ddd621b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -5,3 +5,4 @@ nose-cov coverage yamllint +orderedset diff --git a/tests/test_update_database.py b/tests/test_update_database.py index 1145984..7435094 100644 --- a/tests/test_update_database.py +++ b/tests/test_update_database.py @@ -3,6 +3,7 @@ import mock import unittest import pywikibot +from orderedset import OrderedSet from erfgoedbot import update_database @@ -49,13 +50,21 @@ self.assertEqual(unknown_fields, {}) def test_processMonument_with_one_unknown_param_correctly_returns_unknown_fields(self): -params = [u'id=1234', u'name=A Monument Name', u'some_unknown_field=An unknown field value'] +params = [ +u'id=1234', +u'name=A Monument Name', +u'some_unknown_field=An unknown field value' +] unknown_fields = {} +expected_unknown = {'count': 1, 'sources': set([self.mock_page])} with self.assertRaises(update_database.NoPrimkeyException): update_database.processMonument( params, self.source, self.country_co
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379124 ) Change subject: Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment .. Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment + 9c66737cbd02e1cc343897e500d1ce7ec4b774ab Fix date miscalculation on retrieving mailings. + 75db28743331c41026431effaad77eca7d8d592f CiviCRM submodule update - 30eb051 CRM-21011 Sort out tag descriptions when displaying better Change-Id: I299ca2535c92d60c8a33f547877656136174a01b --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/379124 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I299ca2535c92d60c8a33f547877656136174a01b Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen Gerrit-Reviewer: Eileen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: Follow-up I1e0ae39: Set isResponsive on new ref lists
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378998 ) Change subject: Follow-up I1e0ae39: Set isResponsive on new ref lists .. Follow-up I1e0ae39: Set isResponsive on new ref lists Change-Id: Icd51637b28b44963eddd5d43323dbda329c6a2fc --- M modules/ve-cite/ve.ui.MWReferencesListCommand.js 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/modules/ve-cite/ve.ui.MWReferencesListCommand.js b/modules/ve-cite/ve.ui.MWReferencesListCommand.js index 1e42344..eac79ea 100644 --- a/modules/ve-cite/ve.ui.MWReferencesListCommand.js +++ b/modules/ve-cite/ve.ui.MWReferencesListCommand.js @@ -34,8 +34,7 @@ * @inheritdoc */ ve.ui.MWReferencesListCommand.prototype.execute = function ( surface ) { - var - fragment = surface.getModel().getFragment(), + var fragment = surface.getModel().getFragment(), selectedNode = fragment.getSelectedNode(), isReflistNodeSelected = selectedNode && selectedNode instanceof ve.dm.MWReferencesListNode; @@ -47,7 +46,8 @@ type: 'mwReferencesList', attributes: { listGroup: 'mwReference/', - refGroup: '' + refGroup: '', + isResponsive: mw.config.get( 'wgCiteResponsiveReferences' ) } }, { type: '/mwReferencesList' } -- To view, visit https://gerrit.wikimedia.org/r/378998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icd51637b28b44963eddd5d43323dbda329c6a2fc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Dont reach through window to access navigator
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379125 ) Change subject: Dont reach through window to access navigator .. Dont reach through window to access navigator Avoid accessing navigator via window. (Causes errors to be missed by ESLint static analysis, e.g. in case of typos it would normally produce an lint warning for unknown global but now will not). The check is also redundant given all browsers implement this global and have for a long time. Change-Id: I4a66b1cb34c48c2f507e3c3689b611874777e8d1 --- M modules/ext.wikimediaEvents.humanSearchRelevance.js 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/25/379125/1 diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js b/modules/ext.wikimediaEvents.humanSearchRelevance.js index 0861666..a7a8e8d 100644 --- a/modules/ext.wikimediaEvents.humanSearchRelevance.js +++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js @@ -22,10 +22,10 @@ // See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack // Taken from https://www.npmjs.com/package/dnt-polyfill if ( window.doNotTrack === '1' || - window.navigator && ( - window.navigator.doNotTrack === '1' || - window.navigator.doNotTrack === 'yes' || - window.navigator.msDoNotTrack === '1' + navigator && ( + navigator.doNotTrack === '1' || + navigator.doNotTrack === 'yes' || + navigator.msDoNotTrack === '1' ) ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/379125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a66b1cb34c48c2f507e3c3689b611874777e8d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379124 ) Change subject: Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment .. Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment + 9c66737cbd02e1cc343897e500d1ce7ec4b774ab Fix date miscalculation on retrieving mailings. + 75db28743331c41026431effaad77eca7d8d592f CiviCRM submodule update - 30eb051 CRM-21011 Sort out tag descriptions when displaying better Change-Id: I299ca2535c92d60c8a33f547877656136174a01b --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/24/379124/1 -- To view, visit https://gerrit.wikimedia.org/r/379124 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I299ca2535c92d60c8a33f547877656136174a01b Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Start to use deb packages to install elastic plugins
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/377248 ) Change subject: Start to use deb packages to install elastic plugins .. Start to use deb packages to install elastic plugins Bug: T164367 Change-Id: Ic84345b89ebb9694621d813ed482740e35d4dd89 --- D puppet/modules/elasticsearch/files/mwv-elasticsearch-plugin M puppet/modules/elasticsearch/manifests/init.pp D puppet/modules/elasticsearch/manifests/plugin.pp M puppet/modules/role/manifests/cirrussearch.pp 4 files changed, 5 insertions(+), 198 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/elasticsearch/files/mwv-elasticsearch-plugin b/puppet/modules/elasticsearch/files/mwv-elasticsearch-plugin deleted file mode 100644 index 53f627b..000 --- a/puppet/modules/elasticsearch/files/mwv-elasticsearch-plugin +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -set -e - -ES_VERSION=$(dpkg -l elasticsearch 2>/dev/null | awk '$2 == "elasticsearch" { print $3 }') -if [ -z "$ES_VERSION" ]; then - echo "Elasticsearch not installed" - exit 1 -fi - -ACTION="$1" -PLUGIN_NAME="$2" -if [ -z "$3" ]; then - INSTALL_ARGS="$PLUGIN_NAME" -else - # Magic up a url to maven central that will download the appropriate version of the plugin - PLUGIN_GROUP="$3" - PLUGIN_ARTIFACT="$4" - INSTALL_ARGS="https://repo1.maven.org/maven2/${PLUGIN_GROUP//.//}/${PLUGIN_ARTIFACT}/${ES_VERSION}/${PLUGIN_ARTIFACT}-${ES_VERSION}.zip"; -fi - -PLUGIN_DIR="/usr/share/elasticsearch/plugins/${PLUGIN_NAME}" -if [ -d "$PLUGIN_DIR" ]; then - PLUGIN_INSTALLED="yes" - PLUGIN_VERSION=$(awk -F '=' '$1 == "elasticsearch.version" { print $2 }' < "$PLUGIN_DIR/plugin-descriptor.properties") -else - PLUGIN_INSTALLED="no" - PLUGIN_VERSION="" -fi - - -case "$ACTION" in - check) -# Check if install is required, used as the 'unless' case in puppet exec -if [ "$PLUGIN_INSTALLED" = "yes" -a "$ES_VERSION" = "$PLUGIN_VERSION" ]; then - exit 0 -else - exit 1 -fi -;; - - install) -if [ "$PLUGIN_INSTALLED" = "yes" -a "$ES_VERSION" = "$PLUGIN_VERSION" ]; then - echo "$PLUGIN_NAME already installed with version $PLUGIN_VERSION" -else - if [ "$PLUGIN_INSTALLED" = "yes" ]; then -echo "Pruning old version ($PLUGIN_VERSION) of $PLUGIN_NAME" -/usr/share/elasticsearch/bin/elasticsearch-plugin remove "$PLUGIN_NAME" - fi - - # We need to delete all old plugins before trying to install a new - # one, "bin/elasticsearch-plugin install" will simply fail if an unsupported one - # is found in the plugins directory. - find /usr/share/elasticsearch/plugins -mindepth 1 -maxdepth 1 -type d \ -'!' '(' -exec test -e '{}/plugin-descriptor.properties' ';' -a \ --exec egrep -q "^elasticsearch.version=${ES_VERSION}" \ - '{}/plugin-descriptor.properties' ';' \ -')' \ --exec sh -c '/usr/share/elasticsearch/bin/elasticsearch-plugin remove `basename {}`' ';' - - echo "Installing elasticsearch plugin: $INSTALL_ARGS" - /usr/share/elasticsearch/bin/elasticsearch-plugin install "$INSTALL_ARGS" -fi -;; - - uninstall) -if [ "$PLUGIN_INSTALLED" = "yes" ]; then - echo "Removing version $PLUGIN_VERSION of $PLUGIN_NAME" - /usr/share/elasticsearch/bin/elasticsearch-plugin remove "$PLUGIN_NAME" -else - echo "$PLUGIN_NAME not installed, doing nothing" -fi -;; - - *) -echo "Unknown action provided. Use [check|install|uninstall]" -exit 1 -;; - -esac - diff --git a/puppet/modules/elasticsearch/manifests/init.pp b/puppet/modules/elasticsearch/manifests/init.pp index 8ec14c6..3525d9a 100644 --- a/puppet/modules/elasticsearch/manifests/init.pp +++ b/puppet/modules/elasticsearch/manifests/init.pp @@ -20,13 +20,6 @@ require => Package['elasticsearch'], } -file { '/usr/local/bin/mwv-elasticsearch-plugin': -source => 'puppet:///modules/elasticsearch/mwv-elasticsearch-plugin', -owner => 'root', -group => 'root', -mode => '0555', -} - service { 'elasticsearch': ensure => running, enable => true, diff --git a/puppet/modules/elasticsearch/manifests/plugin.pp b/puppet/modules/elasticsearch/manifests/plugin.pp deleted file mode 100644 index d4d86d5..000 --- a/puppet/modules/elasticsearch/manifests/plugin.pp +++ /dev/null @@ -1,78 +0,0 @@ -# == Define: elasticsearch::plugin -# -# An Elasticsearch plugin. -# -# === Parameters -# -# [*title*] -# Name of the plugin (artifact). Examples: -# experimental-highlighter-elasticsearch-plugin -# analysis-icu -# -# [*group*] -# Group of the plugin. Examples: -# org.wikimedia.search.highlighter -# -# [*esname*] -# Name of the plugin seen by elasticsearch -# -# [*core*] -# Set to true for plugins distributed by elastic
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Remove old test harness
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379123 ) Change subject: Remove old test harness .. Remove old test harness Hasn't been touched since 2013, no longer does its job. Change-Id: I1214a3302769724487b53ae3f7f1158b97347718 --- D tests/phpunit/unittest.conf.dist D tests/phpunit/unittest.sh 2 files changed, 0 insertions(+), 387 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/23/379123/1 diff --git a/tests/phpunit/unittest.conf.dist b/tests/phpunit/unittest.conf.dist deleted file mode 100644 index 174c558..000 --- a/tests/phpunit/unittest.conf.dist +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/sh - -# -# Wikimedia Foundation -# -# LICENSE -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# -# @categoryUnitTesting -# @package Fundraising_Miscellaneous -# @license http://www.gnu.org/copyleft/gpl.html GNU GENERAL PUBLIC LICENSE -# @since r462 -# @author Jeremy Postlethwaite -# - -# -# This is the distributed configuration file. If you need to make changes to -# these settings, copy this file to this directory and remove the ".dist" -# extension. -# - -# -# @var string $UNITTEST_HOSTNAME The hostname to the webserver. -# -: ${UNITTEST_HOSTNAME:="localhost"} -# -# @var string $UNITTEST_URLThe url to the webserver. You need the trailing -# slash. -# -: ${UNITTEST_URL:="http://localhost/queue_handling/tests/"} -# -# @var string $PHPUNIT If phpunit.php is not within your shell $PATH, you may -# specify the full path here. -# -: ${PHPUNIT:="phpunit.php"} -# -# @var string $PHPUNIT_OPTSBy default, all testing will be run in verbose mode. -# -: ${PHPUNIT_OPTS:="--verbose"} -# -# @var string $PHPUNIT_LIST_GROUPS Specify the relative path to the file in -# which you want to list groups designated by the doctag @group -# -: ${PHPUNIT_LIST_GROUPS:"=AllTests.php"} -# -# @var string $PHPUNIT_FILESpecify the relative path to the test in which you -# want to run. You need to omit the ".php" extension. -# -: ${PHPUNIT_FILE:="AllTests"} -# -# @var string $PHPUNIT_COVERAGE_HTML The relative path to the code coverage -# html directory -# -# This is where code coverage will be saved if the flag -ch is passed. If you wish to specify a full path, use: -# --coverage-html "/some/absolute/path" -# -# These directories will need to exist, they will not be created. -# -: ${PHPUNIT_COVERAGE_HTML:="logs/coverage/html"} -# -# @var string $PHPUNIT_COVERAGE_CLOVER The relative path to the code coverage -# clover directory -# -# This is where code coverage will be saved if the flag -ch is passed. If you wish to specify a full path, use: -# --coverage-clover "/some/absolute/path" -# -# These directories will need to exist, they will not be created. -# -: ${PHPUNIT_COVERAGE_CLOVER:="logs/coverage/clover/index.xml"} -# -# @var string $PHPUNIT_TESTDOX_HTMLThe relative path to the testdox output html -# directory. It is okay to put this the same directory as html coverage. -# -# This is where testdox will be saved if the flag -tdh is passed. If you wish to specify a full path, use: -# --testdox-html "/some/absolute/path" -# -# These directories will need to exist, they will not be created. -# -: ${PHPUNIT_TESTDOX_HTML:="logs/coverage/html/testdox.html"} - diff --git a/tests/phpunit/unittest.sh b/tests/phpunit/unittest.sh deleted file mode 100755 index f124229..000 --- a/tests/phpunit/unittest.sh +++ /dev/null @@ -1,297 +0,0 @@ -#!/bin/bash - -# -# Wikimedia Foundation -# -# LICENSE -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# -# @category
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Adding a list of bogus ifNames
Ayounsi has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379122 ) Change subject: Adding a list of bogus ifNames .. Adding a list of bogus ifNames Starting on 15.1X49-D110, Junos SRX have an interface named "vlan" that shows as up/down and can't be disabled, commented, etc which triggers our monitorings. Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a1 --- M modules/nagios_common/files/check_commands/check_ifstatus_nomon 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/379122/1 diff --git a/modules/nagios_common/files/check_commands/check_ifstatus_nomon b/modules/nagios_common/files/check_commands/check_ifstatus_nomon index 9e2becc..a9b912d 100755 --- a/modules/nagios_common/files/check_commands/check_ifstatus_nomon +++ b/modules/nagios_common/files/check_commands/check_ifstatus_nomon @@ -100,7 +100,7 @@ my @unused_ports ; my %session_opts; - +my @ignoredIfNames = ["vlan"]; @@ -175,7 +175,7 @@ # check only if interface is administratively up if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) { # check only if interface type is not listed in %excluded - if (!defined $excluded{$ifStatus{$key}{$snmpIfType}} && (!defined $ifXTable || $ifStatus{$key}{$snmpIfAlias} !~ /\bno-mon\b/)) { + if (!defined $excluded{$ifStatus{$key}{$snmpIfType}} && (!defined $ifXTable || $ifStatus{$key}{$snmpIfAlias} !~ /\bno-mon\b/) && !($ifStatus{$key}{$snmpIfName} ~~ @ignoredIfNames)) { if ($ifStatus{$key}{$snmpIfOperStatus} == 1 ) { $ifup++ ;} if ($ifStatus{$key}{$snmpIfOperStatus} == 2 ) { $ifdown++ ; -- To view, visit https://gerrit.wikimedia.org/r/379122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ayounsi ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Don't hide mw-changeslist-line-prefix in enhanced...
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379121 ) Change subject: RCFilters: Don't hide mw-changeslist-line-prefix in enhanced mode .. RCFilters: Don't hide mw-changeslist-line-prefix in enhanced mode It contains the 'x' buttons to unwatch pages when the relevant preference is enabled. Bug: T176264 Change-Id: Ie8eb913d55165ad2c548230cd61cd9ee189d9504 --- M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js 1 file changed, 0 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/379121/1 diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js index f331f75..913f9a2 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js @@ -311,15 +311,6 @@ .append( $highlights.clone() ) ); - // We are adding and changing cells in a table that, despite having nested rows, - // is actually all one big table. To do that right, we want to remove the 'placeholder' - // cell from the top row, because we're actually adding that placeholder in the children - // with the highlights. - $content.find( 'table.mw-enhanced-rc tr:first-child td.mw-changeslist-line-prefix' ) - .detach(); - $content.find( 'table.mw-enhanced-rc tr:first-child td.mw-enhanced-rc' ) - .prop( 'colspan', '2' ); - $enhancedNestedPagesCell .before( $( '' ) -- To view, visit https://gerrit.wikimedia.org/r/379121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8eb913d55165ad2c548230cd61cd9ee189d9504 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Don't send empty or '0' address fields to minFraud
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379120 ) Change subject: Don't send empty or '0' address fields to minFraud .. Don't send empty or '0' address fields to minFraud Change-Id: I8eb56ab704c1966349a23bd444e6228c578ca765 --- M extras/custom_filters/filters/minfraud/minfraud.body.php 1 file changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/20/379120/1 diff --git a/extras/custom_filters/filters/minfraud/minfraud.body.php b/extras/custom_filters/filters/minfraud/minfraud.body.php index 828986e..e2f83cd 100644 --- a/extras/custom_filters/filters/minfraud/minfraud.body.php +++ b/extras/custom_filters/filters/minfraud/minfraud.body.php @@ -209,13 +209,19 @@ } protected function getBillingParams( $data ) { - return [ - 'city' => $data['city'], - // FIXME: region should use the ISO 3166-2 code - 'region' => $data['state_province'], - 'postal' => $data['postal_code'], - 'country' => $data['country'], + $map = [ + 'city' => 'city', + 'region' => 'state_province', + 'postal' => 'postal_code', + 'country' => 'country' ]; + $billingParams = []; + foreach ( $map as $theirs => $ours ) { + if ( !empty( $data[$ours] ) && $data[$ours] !== '0' ) { + $billingParams[$theirs] = $data[$ours]; + } + } + return $billingParams; } protected function getEventParams( $data ) { -- To view, visit https://gerrit.wikimedia.org/r/379120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8eb56ab704c1966349a23bd444e6228c578ca765 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.19]: Javascript timestamps are in ms, not s
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379119 ) Change subject: Javascript timestamps are in ms, not s .. Javascript timestamps are in ms, not s The timeout was intended to be set to 2 days, but due to a mixup between millis and seconds it was only set to about 3 minutes. Additionally add an early exit for navigator.doNotTrack, as event logging won't send the events anyways. Bug: T174106 Change-Id: I58517c23416822790d93ed714140b6294a8880ad (cherry picked from commit a3d63b999c3e1c15db66f524548dcddec85db998) --- M modules/ext.wikimediaEvents.humanSearchRelevance.js 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/19/379119/1 diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js b/modules/ext.wikimediaEvents.humanSearchRelevance.js index 5515399..0861666 100644 --- a/modules/ext.wikimediaEvents.humanSearchRelevance.js +++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js @@ -19,6 +19,17 @@ return options[ Math.floor( parsed / step ) ]; } + // See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack + // Taken from https://www.npmjs.com/package/dnt-polyfill + if ( window.doNotTrack === '1' || + window.navigator && ( + window.navigator.doNotTrack === '1' || + window.navigator.doNotTrack === 'yes' || + window.navigator.msDoNotTrack === '1' + ) ) { + return; + } + // Page is not part of this test if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) { return; @@ -93,7 +104,7 @@ } // If we can't record that the survey shouldn't be duplicated, just // opt them out of the survey all together. - if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) { + if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/379119 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.18]: Javascript timestamps are in ms, not s
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379118 ) Change subject: Javascript timestamps are in ms, not s .. Javascript timestamps are in ms, not s The timeout was intended to be set to 2 days, but due to a mixup between millis and seconds it was only set to about 3 minutes. Additionally add an early exit for navigator.doNotTrack, as event logging won't send the events anyways. Bug: T174106 Change-Id: I58517c23416822790d93ed714140b6294a8880ad (cherry picked from commit a3d63b999c3e1c15db66f524548dcddec85db998) --- M modules/ext.wikimediaEvents.humanSearchRelevance.js 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/18/379118/1 diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js b/modules/ext.wikimediaEvents.humanSearchRelevance.js index 5515399..0861666 100644 --- a/modules/ext.wikimediaEvents.humanSearchRelevance.js +++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js @@ -19,6 +19,17 @@ return options[ Math.floor( parsed / step ) ]; } + // See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack + // Taken from https://www.npmjs.com/package/dnt-polyfill + if ( window.doNotTrack === '1' || + window.navigator && ( + window.navigator.doNotTrack === '1' || + window.navigator.doNotTrack === 'yes' || + window.navigator.msDoNotTrack === '1' + ) ) { + return; + } + // Page is not part of this test if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) { return; @@ -93,7 +104,7 @@ } // If we can't record that the survey shouldn't be duplicated, just // opt them out of the survey all together. - if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) { + if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/379118 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: wmf/1.30.0-wmf.18 Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Javascript timestamps are in ms, not s
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378950 ) Change subject: Javascript timestamps are in ms, not s .. Javascript timestamps are in ms, not s The timeout was intended to be set to 2 days, but due to a mixup between millis and seconds it was only set to about 3 minutes. Additionally add an early exit for navigator.doNotTrack, as event logging won't send the events anyways. Bug: T174106 Change-Id: I58517c23416822790d93ed714140b6294a8880ad --- M modules/ext.wikimediaEvents.humanSearchRelevance.js 1 file changed, 12 insertions(+), 1 deletion(-) Approvals: Tjones: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js b/modules/ext.wikimediaEvents.humanSearchRelevance.js index 5515399..0861666 100644 --- a/modules/ext.wikimediaEvents.humanSearchRelevance.js +++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js @@ -19,6 +19,17 @@ return options[ Math.floor( parsed / step ) ]; } + // See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack + // Taken from https://www.npmjs.com/package/dnt-polyfill + if ( window.doNotTrack === '1' || + window.navigator && ( + window.navigator.doNotTrack === '1' || + window.navigator.doNotTrack === 'yes' || + window.navigator.msDoNotTrack === '1' + ) ) { + return; + } + // Page is not part of this test if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) { return; @@ -93,7 +104,7 @@ } // If we can't record that the survey shouldn't be duplicated, just // opt them out of the survey all together. - if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) { + if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/378950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: DCausse Gerrit-Reviewer: Jdrewniak Gerrit-Reviewer: TheDJ Gerrit-Reviewer: Tjones Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Lazy creation for heavy menu
Eranroz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379117 ) Change subject: Lazy creation for heavy menu .. Lazy creation for heavy menu Assumptions: * Generally if we have a model we don't need UI * UI can be created lazy if it is not shown to user Bug: T176250 Change-Id: Iba7f889d8610de2eb3056248cd1c664b0cd90940 --- M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js 2 files changed, 30 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/17/379117/1 diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js index 83e5796..0c82f84 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js @@ -90,7 +90,13 @@ } }; - $( rcfilters.init ); + // Early execute of init + if ( document.readyState === 'interactive' || document.readyState === 'complete' ) { + rcfilters.init(); + } else { + + $( rcfilters.init ); + } module.exports = rcfilters; diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js index 07d4506..4a6b131 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js @@ -32,6 +32,7 @@ this.views = {}; this.userSelecting = false; + this.menuInitialized = false; this.inputValue = ''; this.$overlay = config.$overlay || this.$element; this.$body = $( '' ).addClass( 'mw-rcfilters-ui-menuSelectWidget-body' ); @@ -128,10 +129,22 @@ this.switchView( this.model.getCurrentView() ); }; + /** -* Respond to model initialize event. Populate the menu from the model +* Respond to toggle, popule the menu if not created yet */ - mw.rcfilters.ui.MenuSelectWidget.prototype.onModelInitialize = function () { + mw.rcfilters.ui.MenuSelectWidget.prototype.toggle = function ( show ) { + this.lazyMenuCreation(); + mw.rcfilters.ui.MenuSelectWidget.parent.prototype.toggle.call( this, show ); + } + + /** +* lazy creation of the menu +*/ + mw.rcfilters.ui.MenuSelectWidget.prototype.lazyMenuCreation = function () { + if ( this.menuInitialized ) return; + this.menuInitialized = true; + var widget = this, viewGroupCount = {}, groups = this.model.getFilterGroups(); @@ -188,6 +201,14 @@ } ); this.switchView( this.model.getCurrentView() ); + + } + + /** +* Respond to model initialize event. Populate the menu from the model +*/ + mw.rcfilters.ui.MenuSelectWidget.prototype.onModelInitialize = function () { + this.menuInitialized = false; }; /** -- To view, visit https://gerrit.wikimedia.org/r/379117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba7f889d8610de2eb3056248cd1c664b0cd90940 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Eranroz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits