[MediaWiki-commits] [Gerrit] Use `not-allowed` cursor on disabled UI elements in MediaWik... - change (oojs/ui)
VolkerE has uploaded a new change for review. https://gerrit.wikimedia.org/r/263214 Change subject: Use `not-allowed` cursor on disabled UI elements in MediaWiki theme .. Use `not-allowed` cursor on disabled UI elements in MediaWiki theme Applying `cursor: not-allowed` on disabled UI elements to better distinguish the enabled from non-disabled elements. Bug: T123183 Change-Id: I993ed112425f7eb7c89ecf4b74a3f6facd065d33 --- M src/themes/mediawiki/common.less M src/themes/mediawiki/elements.less M src/themes/mediawiki/widgets.less 3 files changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/14/263214/1 diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less index 22c3d90..4908ce5 100644 --- a/src/themes/mediawiki/common.less +++ b/src/themes/mediawiki/common.less @@ -46,6 +46,8 @@ @box-shadow-menu: @box-shadow-dialog; @box-shadow-popup: @box-shadow-dialog; +@cursor-disabled: not-allowed; + @icon-size: unit( 24 / 16 / 0.8, em ); @indicator-size: unit( 12 / 16 / 0.8, em ); diff --git a/src/themes/mediawiki/elements.less b/src/themes/mediawiki/elements.less index e00cf81..cc556c2 100644 --- a/src/themes/mediawiki/elements.less +++ b/src/themes/mediawiki/elements.less @@ -7,6 +7,9 @@ font-weight: bold; text-decoration: none; } + &.oo-ui-widget-disabled > .oo-ui-buttonElement-button { + cursor: @cursor-disabled; + } &.oo-ui-iconElement > .oo-ui-buttonElement-button { > .oo-ui-iconElement-icon { diff --git a/src/themes/mediawiki/widgets.less b/src/themes/mediawiki/widgets.less index 6598d8c..4d77019 100644 --- a/src/themes/mediawiki/widgets.less +++ b/src/themes/mediawiki/widgets.less @@ -238,6 +238,8 @@ } &.oo-ui-widget-disabled { + cursor: @cursor-disabled; + .oo-ui-selectFileWidget-info { color: #ccc; text-shadow: 0 1px 1px #fff; @@ -330,6 +332,7 @@ text-shadow: 0 1px 1px #fff; border-color: #ddd; background-color: #f3f3f3; + cursor: @cursor-disabled; } } } @@ -766,7 +769,7 @@ text-shadow: 0 1px 1px #fff; border-color: #ddd; background-color: #f3f3f3; - cursor: default; + cursor: @cursor-disabled; > .oo-ui-iconElement-icon, > .oo-ui-indicatorElement-indicator { @@ -1292,6 +1295,7 @@ background: @disabled-background; border-color: @disabled-background; outline: 0; + cursor: @cursor-disabled; .oo-ui-toggleSwitchWidget-grip { background: @disabled-framed-text; -- To view, visit https://gerrit.wikimedia.org/r/263214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I993ed112425f7eb7c89ecf4b74a3f6facd065d33 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] Another fix for formHTML() -> SFFormField refactor - change (mediawiki...SemanticForms)
Yaron Koren has submitted this change and it was merged. Change subject: Another fix for formHTML() -> SFFormField refactor .. Another fix for formHTML() -> SFFormField refactor Change-Id: I7a9dfd9d862b5351d6874733e1d9f40250b0b75e --- M includes/SF_FormField.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SF_FormField.php b/includes/SF_FormField.php index 659b725..91e27b4 100644 --- a/includes/SF_FormField.php +++ b/includes/SF_FormField.php @@ -137,7 +137,7 @@ } static function newFromFormFieldTag( $tag_components, $template_name, $all_fields, $form_is_disabled, $allow_multiple, $strict_parsing ) { - global $wgParser; + global $wgParser, $wgUser; $field_name = trim( $tag_components[1] ); // See if this field matches one of the fields defined for this -- To view, visit https://gerrit.wikimedia.org/r/263213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a9dfd9d862b5351d6874733e1d9f40250b0b75e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren Gerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Another fix for formHTML() -> SFFormField refactor - change (mediawiki...SemanticForms)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/263213 Change subject: Another fix for formHTML() -> SFFormField refactor .. Another fix for formHTML() -> SFFormField refactor Change-Id: I7a9dfd9d862b5351d6874733e1d9f40250b0b75e --- M includes/SF_FormField.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/13/263213/1 diff --git a/includes/SF_FormField.php b/includes/SF_FormField.php index 659b725..91e27b4 100644 --- a/includes/SF_FormField.php +++ b/includes/SF_FormField.php @@ -137,7 +137,7 @@ } static function newFromFormFieldTag( $tag_components, $template_name, $all_fields, $form_is_disabled, $allow_multiple, $strict_parsing ) { - global $wgParser; + global $wgParser, $wgUser; $field_name = trim( $tag_components[1] ); // See if this field matches one of the fields defined for this -- To view, visit https://gerrit.wikimedia.org/r/263213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a9dfd9d862b5351d6874733e1d9f40250b0b75e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not use addModuleStyles in ext.flow.mediawiki.ui.tooltips... - change (mediawiki...Flow)
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/263212 Change subject: Do not use addModuleStyles in ext.flow.mediawiki.ui.tooltips and ext.flow.mediawiki.ui.modal .. Do not use addModuleStyles in ext.flow.mediawiki.ui.tooltips and ext.flow.mediawiki.ui.modal Bug: T97467 Change-Id: Ia592ee3132249665a565fc2fcdedd0810d741b10 --- M includes/View.php 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/12/263212/1 diff --git a/includes/View.php b/includes/View.php index fc24dab..bc164de 100644 --- a/includes/View.php +++ b/includes/View.php @@ -97,9 +97,7 @@ 'mediawiki.ui.icon', 'mediawiki.ui.text', 'ext.flow.styles.base' , - 'ext.flow.mediawiki.ui.tooltips', 'ext.flow.mediawiki.ui.form', - 'ext.flow.mediawiki.ui.modal', 'ext.flow.mediawiki.ui.text', 'oojs-ui.styles.icons', 'oojs-ui.styles.icons-layout', -- To view, visit https://gerrit.wikimedia.org/r/263212 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia592ee3132249665a565fc2fcdedd0810d741b10 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: MtDu ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prevent from being destroyed - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Prevent from being destroyed .. Prevent from being destroyed Use raw string tag to prevent \1 from being treated as chr(1) Bug: T123104 Change-Id: I89dbf5bbf5f5bcde67247bb44177671e3dde2f0c --- M scripts/noreferences.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/noreferences.py b/scripts/noreferences.py index e2d793d..7f49df5 100755 --- a/scripts/noreferences.py +++ b/scripts/noreferences.py @@ -529,7 +529,7 @@ r'< */?\s*references */? *>', re.DOTALL) if pattern.search(oldText): pywikibot.output('Repairing references tag') -return re.sub(pattern, '\1', oldText) +return re.sub(pattern, r'\1', oldText) # Repair single unclosed references tag pattern = re.compile(r'< *references *>') if pattern.search(oldText): -- To view, visit https://gerrit.wikimedia.org/r/263208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89dbf5bbf5f5bcde67247bb44177671e3dde2f0c Gerrit-PatchSet: 3 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: MtDu Gerrit-Reviewer: Aklapper Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prevent from being destroyed - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/263211 Change subject: Prevent from being destroyed .. Prevent from being destroyed Use raw string tag to prevent \1 from being treated as chr(1) Bug: T123104 Change-Id: I89dbf5bbf5f5bcde67247bb44177671e3dde2f0c --- M scripts/noreferences.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/11/263211/1 diff --git a/scripts/noreferences.py b/scripts/noreferences.py index bd32bb1..10d49f4 100755 --- a/scripts/noreferences.py +++ b/scripts/noreferences.py @@ -541,7 +541,7 @@ r'< */?\s*references */? *>', re.DOTALL) if pattern.search(oldText): pywikibot.output('Repairing references tag') -return re.sub(pattern, '\1', oldText) +return re.sub(pattern, r'\1', oldText) # Repair single unclosed references tag pattern = re.compile(r'< *references *>') if pattern.search(oldText): -- To view, visit https://gerrit.wikimedia.org/r/263211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89dbf5bbf5f5bcde67247bb44177671e3dde2f0c Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John Vandenberg Gerrit-Reviewer: MtDu ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preferences: Use session data instead of URL parameter for s... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Preferences: Use session data instead of URL parameter for success .. Preferences: Use session data instead of URL parameter for success The session data gets set in the POST and gets deleted in the GET. This change avoids changing the URL for the success message. A reload of the page does not show the success message again. The URL manipulation in mediawiki.special.preferences.js is superfluous. Bug: T26700 Change-Id: I1c2b011e7a66b2b9379dd4a3fdcc6f978dd43b52 --- M includes/Preferences.php M includes/specials/SpecialPreferences.php M resources/src/mediawiki.special/mediawiki.special.preferences.js 3 files changed, 14 insertions(+), 9 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Preferences.php b/includes/Preferences.php index ad25fa8..5f37e3f 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1470,7 +1470,7 @@ $res = self::tryFormSubmit( $formData, $form ); if ( $res ) { - $urlOptions = array( 'success' => 1 ); + $urlOptions = array(); if ( $res === 'eauth' ) { $urlOptions['eauth'] = 1; @@ -1480,7 +1480,11 @@ $url = $form->getTitle()->getFullURL( $urlOptions ); - $form->getContext()->getOutput()->redirect( $url ); + $context = $form->getContext(); + // Set session data for the success message + $context->getRequest()->setSessionData( 'specialPreferencesSaveSuccess', 1 ); + + $context->getOutput()->redirect( $url ); } return Status::newGood(); diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index b45946f..3fa5fd5 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -49,7 +49,11 @@ $out->addModules( 'mediawiki.special.preferences' ); $out->addModuleStyles( 'mediawiki.special.preferences.styles' ); - if ( $this->getRequest()->getCheck( 'success' ) ) { + $request = $this->getRequest(); + if ( $request->getSessionData( 'specialPreferencesSaveSuccess' ) ) { + // Remove session data for the success message + $request->setSessionData( 'specialPreferencesSaveSuccess', null ); + $out->wrapWikiMsg( Html::rawElement( 'div', @@ -132,8 +136,10 @@ $user->resetOptions( 'all', $this->getContext() ); $user->saveSettings(); - $url = $this->getPageTitle()->getFullURL( 'success' ); + // Set session data for the success message + $this->getRequest()->setSessionData( 'specialPreferencesSaveSuccess', 1 ); + $url = $this->getPageTitle()->getFullURL(); $this->getOutput()->redirect( $url ); return true; diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js b/resources/src/mediawiki.special/mediawiki.special.preferences.js index c2b9a4f..92064a6 100644 --- a/resources/src/mediawiki.special/mediawiki.special.preferences.js +++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js @@ -94,11 +94,6 @@ notif = null; } } ); - - // Remove now-unnecessary success=1 querystring to prevent reappearance of notification on reload - if ( history.replaceState ) { - history.replaceState( {}, document.title, location.href.replace( /&?success=1/, '' ) ); - } } } -- To view, visit https://gerrit.wikimedia.org/r/261033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c2b011e7a66b2b9379dd4a3fdcc6f978dd43b52 Gerrit-PatchSet: 8 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Fomafix Gerrit-Reviewer: Gerrit Patch Uploader Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Sn1per Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add GENDER to some Newsletter messages - change (mediawiki...Newsletter)
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/263210 Change subject: Add GENDER to some Newsletter messages .. Add GENDER to some Newsletter messages Added 'name' parameter in SpecialNewsletter Deleted unused parameter from flyout message Added GENDER to flyout, email-batch-body, and title messages Change-Id: Iedb7e40e1fc839c082aaa4c3a1bb7e95c521f387 --- M Newsletter.hooks.php M i18n/en.json M i18n/qqq.json M includes/specials/SpecialNewsletter.php 4 files changed, 11 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/10/263210/1 diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php index 0b231b7..380f503 100755 --- a/Newsletter.hooks.php +++ b/Newsletter.hooks.php @@ -35,13 +35,14 @@ 'presentation-model' => 'EchoNewsletterPresentationModel', 'formatter-class' => 'EchoNewsletterFormatter', 'title-message' => 'newsletter-notification-title', - 'title-params' => array( 'newsletter', 'title', 'agent' ), + 'title-params' => array( 'newsletter', 'title', 'agent', 'name' ), 'flyout-message' => 'newsletter-notification-flyout', + 'flyout-params' => array( 'newsletter', 'agent', 'name' ), 'payload' => array( 'summary' ), 'email-subject-message' => 'newsletter-email-subject', 'email-subject-params' => array( 'newsletter' ), 'email-body-batch-message' => 'newsletter-email-batch-body', - 'email-body-batch-params' => array( 'newsletter' , 'agent' ), + 'email-body-batch-params' => array( 'newsletter', 'agent', 'name' ), ); return true; diff --git a/i18n/en.json b/i18n/en.json index 007a6ad..b0e8a11 100755 --- a/i18n/en.json +++ b/i18n/en.json @@ -83,12 +83,12 @@ "newsletter-list-search-none-found": "No newsletters match your query.", "echo-category-title-newsletter": "Newsletters", "echo-pref-tooltip-newsletter": "Notify me when any of the newsletters to which I have subscribed to announces a new issue.", - "newsletter-notification-title": "[[User:$3|$3]] has announced a [[$2|new issue]] of \"$1\".", - "newsletter-notification-flyout": "$3 has announced a new issue of $1.", + "newsletter-notification-title": "[[User:$3|$3]] {{GENDER:$4|has announced}} a [[$2|new issue]] of \"$1\".", + "newsletter-notification-flyout": "$2 {{GENDER:$3|has announced}} a new issue of $1.", "newsletter-notification-link-text-new-issue": "View new issue", "newsletter-notification-link-text-view-newsletter": "View newsletter", "newsletter-email-subject": "A new issue of $1 has been announced.", - "newsletter-email-batch-body": "$2 has announced a new issue of $1.", + "newsletter-email-batch-body": "$2 {{GENDER:$3|has announced}} a new issue of $1.", "newsletter-header-name": "Name of newsletter", "newsletter-header-description": "Description", "newsletter-header-action": "Subscribed?", diff --git a/i18n/qqq.json b/i18n/qqq.json index 775d00a..4df3bd8 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -87,12 +87,12 @@ "newsletter-list-search-none-found": "Error message shown on [[Special:Newsletters]] if no newsletters found after user searches the table using filters", "echo-category-title-newsletter": "Title of the notification category used by Newsletter extension.\n{{Related|Echo-category-title}}\n{{Identical|Newsletter}}", "echo-pref-tooltip-newsletter": "Short description of the newsletter notification category.\n{{Related|Echo-pref-tooltip}}", - "newsletter-notification-title": "Header text for a notification when a new issue of a newsletter is announced. Parameters:\n* $1 is the name of the newsletter.\n* $2 is title of the issue page.\n* $3 is the username of the user who announced the new issue.", - "newsletter-notification-flyout": "Used as a Echo notification flyout message when a new issue of a newsletter is announced. \n* $1 is the name of the newsletter.\n* $2 is title of the issue page.\n* $3 is the username of the user who announced the new issue.", + "newsletter-notification-title": "Header text for a notification when a new issue of a newsletter is announced. Parameters:\n* $1 is the name of the newsletter.\n* $2 is title of the issue page.\n* $3 is the username of the user who announced the new issue, not used for GENDER\n* $4 is the username of the user who announced the issue, used for GENDER", + "newsletter-notification-flyout": "Used as a Echo notification flyout message when a new issue of a newsletter is announced. \n* $1 is the
[MediaWiki-commits] [Gerrit] Use Title::getRootText() to get a user's name from Title - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: Use Title::getRootText() to get a user's name from Title .. Use Title::getRootText() to get a user's name from Title getBaseText just removes the last subpage, so for something with 2 subpage parts, it would be wrong. Change-Id: Ia7cb2a3a4ce66c39115d7b7c3b44886ede0d7353 --- M includes/job/MassMessageJob.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Wctaiwan: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/job/MassMessageJob.php b/includes/job/MassMessageJob.php index f563f20..beee3d5 100644 --- a/includes/job/MassMessageJob.php +++ b/includes/job/MassMessageJob.php @@ -145,7 +145,7 @@ // If we're sending to a User:/User talk: page, make sure the user exists. // Redirects are automatically followed in getLocalTargets if ( $title->getNamespace() === NS_USER || $title->getNamespace() === NS_USER_TALK ) { - $user = User::newFromName( $title->getBaseText() ); + $user = User::newFromName( $title->getRootText() ); if ( !$user || !$user->getId() ) { // Does not exist $this->logLocalSkip( 'skipnouser' ); return true; -- To view, visit https://gerrit.wikimedia.org/r/263204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7cb2a3a4ce66c39115d7b7c3b44886ede0d7353 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Wctaiwan Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Unbreak tests following MediaWiki core change - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: Unbreak tests following MediaWiki core change .. Unbreak tests following MediaWiki core change 4555d1b482816 made it so that the RequestContext instance now holds $wgRequest instead of making it global state. This means using a new RequestContext object will not use the same request as $wgRequest. Work around this in tests by using RequestContext::getMain(). Change-Id: Ib11da7a500589e267543a69600a5a35d60294843 --- M tests/content/MassMessageContentHandlerTest.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Wctaiwan: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/content/MassMessageContentHandlerTest.php b/tests/content/MassMessageContentHandlerTest.php index fae0d52..dd5d2d0 100644 --- a/tests/content/MassMessageContentHandlerTest.php +++ b/tests/content/MassMessageContentHandlerTest.php @@ -41,7 +41,7 @@ 'description', $targets, 'summary', - new RequestContext + RequestContext::getMain() ); $this->assertTrue( $result->isGood() ); $rev = Revision::newFromTitle( $title ); -- To view, visit https://gerrit.wikimedia.org/r/263209 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib11da7a500589e267543a69600a5a35d60294843 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Wctaiwan Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Unbreak tests following MediaWiki core change - change (mediawiki...MassMessage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263209 Change subject: Unbreak tests following MediaWiki core change .. Unbreak tests following MediaWiki core change 4555d1b482816 made it so that the RequestContext instance now holds $wgRequest instead of making it global state. This means using a new RequestContext object will not use the same request as $wgRequest. Work around this in tests by using RequestContext::getMain(). Change-Id: Ib11da7a500589e267543a69600a5a35d60294843 --- M tests/content/MassMessageContentHandlerTest.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage refs/changes/09/263209/1 diff --git a/tests/content/MassMessageContentHandlerTest.php b/tests/content/MassMessageContentHandlerTest.php index fae0d52..dd5d2d0 100644 --- a/tests/content/MassMessageContentHandlerTest.php +++ b/tests/content/MassMessageContentHandlerTest.php @@ -41,7 +41,7 @@ 'description', $targets, 'summary', - new RequestContext + RequestContext::getMain() ); $this->assertTrue( $result->isGood() ); $rev = Revision::newFromTitle( $title ); -- To view, visit https://gerrit.wikimedia.org/r/263209 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib11da7a500589e267543a69600a5a35d60294843 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage 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] Prevent nonreferences.py from being destroyed - change (pywikibot/core)
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/263208 Change subject: Prevent nonreferences.py from being destroyed .. Prevent nonreferences.py from being destroyed Use raw string tag to prevent \1 from being treated as chr(1) Change-Id: I89dbf5bbf5f5bcde67247bb44177671e3dde2f0c --- M scripts/noreferences.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/08/263208/1 diff --git a/scripts/noreferences.py b/scripts/noreferences.py index e2d793d..7f49df5 100755 --- a/scripts/noreferences.py +++ b/scripts/noreferences.py @@ -529,7 +529,7 @@ r'< */?\s*references */? *>', re.DOTALL) if pattern.search(oldText): pywikibot.output('Repairing references tag') -return re.sub(pattern, '\1', oldText) +return re.sub(pattern, r'\1', oldText) # Repair single unclosed references tag pattern = re.compile(r'< *references *>') if pattern.search(oldText): -- To view, visit https://gerrit.wikimedia.org/r/263208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89dbf5bbf5f5bcde67247bb44177671e3dde2f0c Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: MtDu ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "RequestContext: Load the request object for getReque... - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263207 Change subject: Revert "RequestContext: Load the request object for getRequest on first call" .. Revert "RequestContext: Load the request object for getRequest on first call" I *think* this is making the MassMessage tests fail. Investigating. This reverts commit 4555d1b482816730b25e6956444ca6a3155dd2cd. Change-Id: I691c85ae7c4440b37a2d7d059d2e6a64cb79d9e2 --- M includes/Setup.php M includes/context/RequestContext.php 2 files changed, 7 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/263207/1 diff --git a/includes/Setup.php b/includes/Setup.php index f72f5ca..bd20ac3 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -614,13 +614,15 @@ $wgDBerrorLogTZ = $wgLocaltimezone; } -// initialize the request object in $wgRequest -$wgRequest = RequestContext::getMain()->getRequest(); // BackCompat - // Useful debug output if ( $wgCommandLineMode ) { + $wgRequest = new FauxRequest( array() ); + wfDebug( "\n\nStart command line script $self\n" ); } else { + // Can't stub this one, it sets up $_GET and $_REQUEST in its constructor + $wgRequest = new WebRequest; + $debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n"; if ( $wgDebugPrintHttpHeaders ) { diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php index 8c13e97..4f8e65d 100644 --- a/includes/context/RequestContext.php +++ b/includes/context/RequestContext.php @@ -121,13 +121,8 @@ */ public function getRequest() { if ( $this->request === null ) { - global $wgCommandLineMode; - // create the WebRequest object on the fly - if ( $wgCommandLineMode ) { - $this->request = new FauxRequest( array() ); - } else { - $this->request = new WebRequest(); - } + global $wgRequest; # fallback to $wg till we can improve this + $this->request = $wgRequest; } return $this->request; -- To view, visit https://gerrit.wikimedia.org/r/263207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I691c85ae7c4440b37a2d7d059d2e6a64cb79d9e2 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] Fix typo in upload-target message - change (mediawiki...NSFileRepo)
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/263206 Change subject: Fix typo in upload-target message .. Fix typo in upload-target message Bug: T123157 Change-Id: I2feae168e31ea03894be1c2decaab00ef3851ade --- M i18n/nsfilerepo/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NSFileRepo refs/changes/06/263206/1 diff --git a/i18n/nsfilerepo/en.json b/i18n/nsfilerepo/en.json index 3c97601..b635a78 100644 --- a/i18n/nsfilerepo/en.json +++ b/i18n/nsfilerepo/en.json @@ -6,6 +6,6 @@ ] }, "nsfilerepo-desc": "Provide namespace based features to uploaded files", - "nsfilerepo-upload-target" : "Target file name in namspace", + "nsfilerepo-upload-target" : "Target file name in namespace", "nsfilerepo-nsmain" : "(Main)" } -- To view, visit https://gerrit.wikimedia.org/r/263206 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2feae168e31ea03894be1c2decaab00ef3851ade Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/NSFileRepo Gerrit-Branch: master Gerrit-Owner: MtDu ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix exception in Import, when import of a revision fails - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix exception in Import, when import of a revision fails .. Fix exception in Import, when import of a revision fails A 'notice' is thrown when an import fails, for some reason, such as the user does not have permission, and the reason is reported to the user. In this case, $title is false and not a Title object, as needed by the beforeImportPage callback (which calls WikiPage::factory). As well, $pageInfo['_title'] is undefined, in pageOutCallback, which also calls WikiPage::factory via finishImportPage. Bug: T108544 Bug: T123166 Change-Id: I55042fdf305cd1198d3a4b28a0ebb5ce31b76a1f (cherry picked from commit 9442adf96d61579a15821248fd0b7560bfadb77c) --- M RELEASE-NOTES-1.26 M includes/Import.php 2 files changed, 21 insertions(+), 5 deletions(-) Approvals: TTO: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26 index e617f00..76d99cd 100644 --- a/RELEASE-NOTES-1.26 +++ b/RELEASE-NOTES-1.26 @@ -1,6 +1,14 @@ Security reminder: If you have PHP's register_globals option set, you must turn it off. MediaWiki will not work with it enabled. +== MediaWiki 1.26.3 == + +This is a maintenance release of the MediaWiki 1.26 branch. + +== Changes since 1.26.2 == +* (T123166) Fix fatal error when importing pages to titles which cannot be + created, such as invalid titles or titles the user is not allowed to edit. + == MediaWiki 1.26.2 == This is a maintenance release of the MediaWiki 1.26 branch. diff --git a/includes/Import.php b/includes/Import.php index 6a0bfd0..db4a6b2 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -728,13 +728,14 @@ $title = $this->processTitle( $pageInfo['title'], isset( $pageInfo['ns'] ) ? $pageInfo['ns'] : null ); - if ( !$title ) { + // $title is either an array of two titles or false. + if ( is_array( $title ) ) { + $this->pageCallback( $title ); + list( $pageInfo['_title'], $foreignTitle ) = $title; + } else { $badTitle = true; $skip = true; } - - $this->pageCallback( $title ); - list( $pageInfo['_title'], $foreignTitle ) = $title; } if ( $title ) { @@ -750,10 +751,17 @@ } } - $this->pageOutCallback( $pageInfo['_title'], $foreignTitle, + // @note $pageInfo is only set if a valid $title is processed above with + // no error. If we have a valid $title, then pageCallback is called + // above, $pageInfo['title'] is set and we do pageOutCallback here. + // If $pageInfo['_title'] is not set, then $foreignTitle is also not + // set since they both come from $title above. + if ( array_key_exists( '_title', $pageInfo ) ) { + $this->pageOutCallback( $pageInfo['_title'], $foreignTitle, $pageInfo['revisionCount'], $pageInfo['successfulRevisionCount'], $pageInfo ); + } } /** -- To view, visit https://gerrit.wikimedia.org/r/263202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55042fdf305cd1198d3a4b28a0ebb5ce31b76a1f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_26 Gerrit-Owner: TTO Gerrit-Reviewer: Aude Gerrit-Reviewer: Chad Gerrit-Reviewer: TTO Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix exception in Import, when import of a revision fails - change (mediawiki/core)
TTO has uploaded a new change for review. https://gerrit.wikimedia.org/r/263205 Change subject: Fix exception in Import, when import of a revision fails .. Fix exception in Import, when import of a revision fails A 'notice' is thrown when an import fails, for some reason, such as the user does not have permission, and the reason is reported to the user. In this case, $title is false and not a Title object, as needed by the beforeImportPage callback (which calls WikiPage::factory). As well, $pageInfo['_title'] is undefined, in pageOutCallback, which also calls WikiPage::factory via finishImportPage. Bug: T108544 Change-Id: I55042fdf305cd1198d3a4b28a0ebb5ce31b76a1f (cherry picked from commit 9442adf96d61579a15821248fd0b7560bfadb77c) --- M includes/Import.php 1 file changed, 13 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/263205/1 diff --git a/includes/Import.php b/includes/Import.php index d31be43..31f783d 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -717,13 +717,14 @@ $title = $this->processTitle( $pageInfo['title'], isset( $pageInfo['ns'] ) ? $pageInfo['ns'] : null ); - if ( !$title ) { + // $title is either an array of two titles or false. + if ( is_array( $title ) ) { + $this->pageCallback( $title ); + list( $pageInfo['_title'], $foreignTitle ) = $title; + } else { $badTitle = true; $skip = true; } - - $this->pageCallback( $title ); - list( $pageInfo['_title'], $foreignTitle ) = $title; } if ( $title ) { @@ -739,10 +740,17 @@ } } - $this->pageOutCallback( $pageInfo['_title'], $foreignTitle, + // @note $pageInfo is only set if a valid $title is processed above with + // no error. If we have a valid $title, then pageCallback is called + // above, $pageInfo['title'] is set and we do pageOutCallback here. + // If $pageInfo['_title'] is not set, then $foreignTitle is also not + // set since they both come from $title above. + if ( array_key_exists( '_title', $pageInfo ) ) { + $this->pageOutCallback( $pageInfo['_title'], $foreignTitle, $pageInfo['revisionCount'], $pageInfo['successfulRevisionCount'], $pageInfo ); + } } /** -- To view, visit https://gerrit.wikimedia.org/r/263205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55042fdf305cd1198d3a4b28a0ebb5ce31b76a1f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_25 Gerrit-Owner: TTO Gerrit-Reviewer: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use Title::getRootText() to get a user's name from Title - change (mediawiki...MassMessage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263204 Change subject: Use Title::getRootText() to get a user's name from Title .. Use Title::getRootText() to get a user's name from Title getBaseText just removes the last subpage, so for something with 2 subpage parts, it would be wrong. Change-Id: Ia7cb2a3a4ce66c39115d7b7c3b44886ede0d7353 --- M includes/job/MassMessageJob.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage refs/changes/04/263204/1 diff --git a/includes/job/MassMessageJob.php b/includes/job/MassMessageJob.php index f563f20..beee3d5 100644 --- a/includes/job/MassMessageJob.php +++ b/includes/job/MassMessageJob.php @@ -145,7 +145,7 @@ // If we're sending to a User:/User talk: page, make sure the user exists. // Redirects are automatically followed in getLocalTargets if ( $title->getNamespace() === NS_USER || $title->getNamespace() === NS_USER_TALK ) { - $user = User::newFromName( $title->getBaseText() ); + $user = User::newFromName( $title->getRootText() ); if ( !$user || !$user->getId() ) { // Does not exist $this->logLocalSkip( 'skipnouser' ); return true; -- To view, visit https://gerrit.wikimedia.org/r/263204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7cb2a3a4ce66c39115d7b7c3b44886ede0d7353 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage 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] Clarify and document some OpenStackManager messages - change (mediawiki...OpenStackManager)
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/263203 Change subject: Clarify and document some OpenStackManager messages .. Clarify and document some OpenStackManager messages Update documentation in failedeletedomainduplicates message https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Openstackmanager-failedeletedomainduplicates/es Update documentation in failedeletedomainnotfound message Clarify 'cloudadmin' in hiera-noadmin message https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Openstackmanager-hiera-noadmin/en Change-Id: Ieabed0425385f7e75a5521293b21fab9821a2dd3 --- M i18n/en.json M i18n/qqq.json 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager refs/changes/03/263203/1 diff --git a/i18n/en.json b/i18n/en.json index 817d932..c4ab682 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -66,7 +66,7 @@ "openstackmanager-addadditionaldomain": "Add another domain.", "openstackmanager-deleteddomain": "Successfully deleted domain.", "openstackmanager-failedeletedomain": "Failed to delete domain.", - "openstackmanager-failedeletedomainduplicates": "Unable to delete domain as it has subentries.", + "openstackmanager-failedeletedomainduplicates": "Unable to delete domain as it has subdomains.", "openstackmanager-failedeletedomainnotfound": "Failed to delete domain; domain not found.", "openstackmanager-domainname": "Domain name", "openstackmanager-fqdn": "Fully qualified domain name", diff --git a/i18n/qqq.json b/i18n/qqq.json index 4ff2be2..0b3578e 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -80,8 +80,8 @@ "openstackmanager-addadditionaldomain": "Used as link title in Special:NovaDomain.", "openstackmanager-deleteddomain": "Used as success message in Special:NovaDomain.\n\nThis message indicates the domain has been deleted successfully.", "openstackmanager-failedeletedomain": "Failure message when a DNS domain cannot be deleted", - "openstackmanager-failedeletedomainduplicates": "Failure message when a DNS domain cannot be deleted", - "openstackmanager-failedeletedomainnotfound": "Failure message when a DNS domain cannot be deleted", + "openstackmanager-failedeletedomainduplicates": "Failure message when a DNS domain has subdomains and therefore cannot be deleted", + "openstackmanager-failedeletedomainnotfound": "Failure message when a DNS domain cannot be found and therefore cannot be deleted", "openstackmanager-domainname": "Used as label for input box and as heading cell in \"resource\" table, in Special:NovaDomain.", "openstackmanager-fqdn": "Used as label for input box and as heading cell in \"resource\" table, in Special:NovaDomain.", "openstackmanager-location": "Used as label for an input box in Special:NovaDomain. \"Location\" here is meant as a virtual area, where certain rules apply (e.g. for DNS).\n\nThe help message for this input box is:\n* {{msg-mw|Openstackmanager-location-help}}\n{{Identical|Location}}", @@ -421,7 +421,7 @@ "openstackmanager-email-body": "An instance is a virtual machine. In this particular case, a clone of an image for a virtual machine. [http://docs.openstack.org/diablo/openstack-compute/starter/content/Introduction-d1e2084.html More on OpenStack].", "openstackmanager-twofactorrequired": "A page title that will be shown on error when two factor auth is not enabled", "openstackmanager-twofactorrequired2": "Text shown on error when two factor auth is not enabled", - "openstackmanager-hiera-noadmin": "Error message shown if you try to edit the configuration for a project you are not an administrator of, nor are you cloudadmin.\n\n$1 is the name of the project you must be an administrator of.", + "openstackmanager-hiera-noadmin": "Error message shown if you try to edit the configuration for a project you are not an administrator of, nor are you a cloudadmin, which is a global nova admin role.\n\n$1 is the name of the project you must be an administrator of.", "right-manageproject": "{{doc-right|manageproject}}\n\nThis is about OpenStack roles.", "action-manageproject": "{{doc-action|manageproject}}\n\nThis is about OpenStack roles.", "right-loginviashell": "{{doc-right|loginviashell}}\n\nThis is a right needed to be added to a project.", -- To view, visit https://gerrit.wikimedia.org/r/263203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieabed0425385f7e75a5521293b21fab9821a2dd3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OpenStackManager Gerrit-Branch: master Gerrit-Owner: MtDu ___ MediaWiki-commits mailing list MediaWiki-
[MediaWiki-commits] [Gerrit] Fix exception in Import, when import of a revision fails - change (mediawiki/core)
TTO has uploaded a new change for review. https://gerrit.wikimedia.org/r/263202 Change subject: Fix exception in Import, when import of a revision fails .. Fix exception in Import, when import of a revision fails A 'notice' is thrown when an import fails, for some reason, such as the user does not have permission, and the reason is reported to the user. In this case, $title is false and not a Title object, as needed by the beforeImportPage callback (which calls WikiPage::factory). As well, $pageInfo['_title'] is undefined, in pageOutCallback, which also calls WikiPage::factory via finishImportPage. Bug: T108544 Change-Id: I55042fdf305cd1198d3a4b28a0ebb5ce31b76a1f (cherry picked from commit 9442adf96d61579a15821248fd0b7560bfadb77c) --- M includes/Import.php 1 file changed, 13 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/02/263202/1 diff --git a/includes/Import.php b/includes/Import.php index 6a0bfd0..db4a6b2 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -728,13 +728,14 @@ $title = $this->processTitle( $pageInfo['title'], isset( $pageInfo['ns'] ) ? $pageInfo['ns'] : null ); - if ( !$title ) { + // $title is either an array of two titles or false. + if ( is_array( $title ) ) { + $this->pageCallback( $title ); + list( $pageInfo['_title'], $foreignTitle ) = $title; + } else { $badTitle = true; $skip = true; } - - $this->pageCallback( $title ); - list( $pageInfo['_title'], $foreignTitle ) = $title; } if ( $title ) { @@ -750,10 +751,17 @@ } } - $this->pageOutCallback( $pageInfo['_title'], $foreignTitle, + // @note $pageInfo is only set if a valid $title is processed above with + // no error. If we have a valid $title, then pageCallback is called + // above, $pageInfo['title'] is set and we do pageOutCallback here. + // If $pageInfo['_title'] is not set, then $foreignTitle is also not + // set since they both come from $title above. + if ( array_key_exists( '_title', $pageInfo ) ) { + $this->pageOutCallback( $pageInfo['_title'], $foreignTitle, $pageInfo['revisionCount'], $pageInfo['successfulRevisionCount'], $pageInfo ); + } } /** -- To view, visit https://gerrit.wikimedia.org/r/263202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55042fdf305cd1198d3a4b28a0ebb5ce31b76a1f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_26 Gerrit-Owner: TTO Gerrit-Reviewer: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add jsonlint to 'npm test' - change (mediawiki...Babel)
jenkins-bot has submitted this change and it was merged. Change subject: Add jsonlint to 'npm test' .. Add jsonlint to 'npm test' Change-Id: Id021bb07f98017c88a57f6af38d5a4f9e566879b --- M Gruntfile.js M package.json 2 files changed, 9 insertions(+), 1 deletion(-) Approvals: Paladox: Looks good to me, but someone else must approve Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js index 95f763f..a3a6130 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,12 +7,19 @@ /*jshint node:true */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.initConfig( { banana: { all: ["i18n/"] + }, + jsonlint: { + all: [ + "**/*.json", + "!node_modules/**" + ] } } ); - grunt.registerTask( 'test', [ 'banana' ] ); + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/package.json b/package.json index 17b2cae..53f5214 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "devDependencies": { "grunt": "0.4.5", "grunt-cli": "0.1.13", +"grunt-jsonlint": "1.0.7", "grunt-banana-checker": "0.4.0" } } -- To view, visit https://gerrit.wikimedia.org/r/263048 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id021bb07f98017c88a57f6af38d5a4f9e566879b Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Babel Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2016-01-09T10:00:01+0000 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New Wikidata Build - 2016-01-09T10:00:01+ .. New Wikidata Build - 2016-01-09T10:00:01+ Change-Id: Ia2f335d5e7a49e6d29bd83ee67ce4135a2128570 --- M composer.lock M extensions/Constraints/specials/SpecialConstraintReport.php M extensions/Quality/Gruntfile.js M extensions/Quality/package.json M extensions/Wikibase/client/i18n/lki.json A extensions/Wikibase/client/i18n/my.json M extensions/Wikibase/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php M extensions/Wikibase/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php M extensions/Wikibase/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php M extensions/Wikibase/client/tests/phpunit/includes/LangLinkHandlerTest.php M extensions/Wikibase/client/tests/phpunit/includes/OtherProjectsSitesGeneratorTest.php M extensions/Wikibase/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php M extensions/Wikibase/client/tests/phpunit/includes/WikibaseClientTest.php M extensions/Wikibase/lib/i18n/bg.json A extensions/Wikibase/lib/i18n/my.json D extensions/Wikibase/lib/tests/phpunit/MockSiteStore.php M extensions/Wikibase/lib/tests/phpunit/sites/SitesBuilderTest.php M extensions/Wikibase/repo/i18n/bg.json M extensions/Wikibase/repo/i18n/is.json A extensions/Wikibase/repo/i18n/my.json M extensions/Wikibase/repo/includes/specials/SpecialListProperties.php M extensions/Wikibase/repo/includes/specials/SpecialWikibaseQueryPage.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/ChangeOpFactoryProviderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/MergeChangeOpsFactoryTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Diff/DiffViewTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Diff/EntityDiffVisualizerTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/MergeItemsTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/ResultBuilderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php M extensions/Wikibase/repo/tests/phpunit/includes/specials/SpecialMergeItemsTest.php M extensions/Wikibase/repo/tests/phpunit/includes/specials/SpecialWikibaseRepoPageTestBase.php M extensions/Wikibase/repo/tests/phpunit/maintenance/dumpRdfTest.php M extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.js M vendor/composer/autoload_classmap.php M vendor/composer/installed.json 41 files changed, 170 insertions(+), 218 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index c503ca3..7f7f267 100644 --- a/composer.lock +++ b/composer.lock @@ -919,7 +919,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityConstraints";, -"reference": "e98aa427ba1669243da460d8c0ddcae0cd75d617" +"reference": "77334ca29da34a6022c233376ae575a3b552fc15" }, "require": { "php": ">=5.3.0", @@ -965,7 +965,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/1202/"; }, -"time": "2015-12-18 22:39:37" +"time": "2016-01-08 01:36:43" }, { "name": "wikibase/data-model", @@ -1355,7 +1355,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQuality";, -"reference": "7738ef8d9b07d7bab7a84de571e98b75f6b7479d" +"reference": "d26ec9d03eef9e7b882ab7e22e0b0e373204d02c" }, "require": { "php": ">=5.3.0", @@ -1399,7 +1399,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/989/"; }, -"time": "2016-01-07 19:19:06" +"time": "2016-01-09 07:24:54" }, { "name": "wikibase/serialization-javascript", @@ -1448,12 +1448,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";, -"reference": "
[MediaWiki-commits] [Gerrit] Set logos for mobile login page for Wikidata and Wikivoyage - change (operations/mediawiki-config)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/263201 Change subject: Set logos for mobile login page for Wikidata and Wikivoyage .. Set logos for mobile login page for Wikidata and Wikivoyage Changes the logo to the Wikidata and Wikivoyage logos, respectively, from the default Wikimedia logo on the mobile login page. (also sorted the list of site groups for this setting, so it's easier to notice ones missing) Bug: T123175 Change-Id: Ic9b15987c01aa6611bbd30f95885f10c0020c1e2 --- A images/mobile/wikidata.png A images/mobile/wikivoyage.png M wmf-config/InitialiseSettings.php 3 files changed, 11 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/01/263201/1 diff --git a/images/mobile/wikidata.png b/images/mobile/wikidata.png new file mode 100644 index 000..74f6e68 --- /dev/null +++ b/images/mobile/wikidata.png Binary files differ diff --git a/images/mobile/wikivoyage.png b/images/mobile/wikivoyage.png new file mode 100644 index 000..80c0bbd --- /dev/null +++ b/images/mobile/wikivoyage.png Binary files differ diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 2ab01b0..37acfeb 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13548,18 +13548,21 @@ 'wmgMobileFrontendLogo' => array( 'default' => '/images/mobile/wikimedia.png', - 'mediawikiwiki' => '/images/mobile/mediawiki.png', - 'wikipedia' => '/images/mobile/W.png', - 'wikinews' => '/images/mobile/wikinews.png', - 'wiktionary' => '/images/mobile/wiktionary.png', - 'wikibooks' => '/images/mobile/wikibooks.png', - 'wikiversity' => '/images/mobile/wikiversity.png', - 'specieswiki' => '/images/mobile/wikispecies.png', 'commonswiki' => '/images/mobile/commons.png', - 'wikiquote' => '/images/mobile/wikiquote.png', + 'mediawikiwiki' => '/images/mobile/mediawiki.png', 'metawiki' => '/images/mobile/meta.png', + 'specieswiki' => '/images/mobile/wikispecies.png', + 'wikibooks' => '/images/mobile/wikibooks.png', + 'wikidata' => '/images/mobile/wikidata.png', + 'wikinews' => '/images/mobile/wikinews.png', + 'wikipedia' => '/images/mobile/W.png', + 'wikiquote' => '/images/mobile/wikiquote.png', 'wikisource' => '/images/mobile/wikisource.png', + 'wikiversity' => '/images/mobile/wikiversity.png', + 'wikivoyage' => '/images/mobile/wikivoyage.png', + 'wiktionary' => '/images/mobile/wiktionary.png', ), + 'wmgMobileUrlTemplate' => array( 'default' => '%h0.m.%h1.%h2', 'foundationwiki' => 'm.%h0.%h1', -- To view, visit https://gerrit.wikimedia.org/r/263201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic9b15987c01aa6611bbd30f95885f10c0020c1e2 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix errors - change (mediawiki...Comments)
jenkins-bot has submitted this change and it was merged. Change subject: Fix errors .. Fix errors GetFullURL was being called on a non-object. Not sure how that was happening, but this should fix it. Change-Id: Ib9058d798a3ce663dd906e81cf88190e7e5c6979 --- M CommentClass.php M Comments.php 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/CommentClass.php b/CommentClass.php index 3f465bb..500894d 100644 --- a/CommentClass.php +++ b/CommentClass.php @@ -762,8 +762,10 @@ $output .= $this->getText(); $output .= '' . "\n"; $output .= '' . "\n"; - $output .= 'id}\" rel=\"nofollow\">" . + if ( $this->page->title ) { // for some reason doesn't always exist + $output .= 'id}\" rel=\"nofollow\">" . $this->msg( 'comments-permalink' )->plain() . ' '; + } if ( $replyRow || $dlt ) { $output .= "{$replyRow} {$dlt}" . "\n"; } diff --git a/Comments.php b/Comments.php index 7a18ba5..556a66c 100644 --- a/Comments.php +++ b/Comments.php @@ -24,7 +24,7 @@ $wgExtensionCredits['parserhook'][] = array( 'path' => __FILE__, 'name' => 'Comments', - 'version' => '4.1.0', + 'version' => '4.1.1', 'author' => array( 'David Pean', 'Misza', 'Jack Phoenix', 'Adam Carter/UltrasonicNXT' ), 'descriptionmsg' => 'comments-desc', 'url' => 'https://www.mediawiki.org/wiki/Extension:Comments' -- To view, visit https://gerrit.wikimedia.org/r/263194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib9058d798a3ce663dd906e81cf88190e7e5c6979 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Comments Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [MoodBar] Replace duplicate jsonlint with jshint - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/263200 Change subject: [MoodBar] Replace duplicate jsonlint with jshint .. [MoodBar] Replace duplicate jsonlint with jshint There was double jsonlint test for this extension. It was meant to be one jsonlint and one jshint. Change-Id: I7be24ecd639d8e77c36b6f6b10de074f35e8b3e5 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/00/263200/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index b117bcb..ae2c998 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -3718,7 +3718,7 @@ - name: npm check: - jsonlint - - jsonlint + - jshint - name: mediawiki/extensions/MultiMaps template: -- To view, visit https://gerrit.wikimedia.org/r/263200 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7be24ecd639d8e77c36b6f6b10de074f35e8b3e5 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Empty PHP entry point - change (mediawiki...Elastica)
jenkins-bot has submitted this change and it was merged. Change subject: Empty PHP entry point .. Empty PHP entry point Change-Id: I58ed6d518abd735f9ab2d0fa8bc7e9a9b62eaf9f --- D Elastica.i18n.php M Elastica.php 2 files changed, 12 insertions(+), 57 deletions(-) Approvals: Florianschmidtwelzow: Looks good to me, approved jenkins-bot: Verified diff --git a/Elastica.i18n.php b/Elastica.i18n.php deleted file mode 100644 index db61e5f..000 --- a/Elastica.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShimf4d4d92a12ba4b65' ) ) { - function wfJsonI18nShimf4d4d92a12ba4b65( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimf4d4d92a12ba4b65'; -} diff --git a/Elastica.php b/Elastica.php index adfb30c..9b0d74e 100644 --- a/Elastica.php +++ b/Elastica.php @@ -19,25 +19,15 @@ * http://www.gnu.org/copyleft/gpl.html */ -$wgExtensionCredits['other'][] = array( - 'path' => __FILE__, - 'name' => 'Elastica', - 'author' => array( 'Nik Everett', 'Chad Horohoe' ), - 'descriptionmsg' => 'elastica-desc', - 'url'=> 'https://www.mediawiki.org/wiki/Extension:Elastica', - 'version'=> '1.3.0.0' -); - -/** - * Classes - */ -$wgAutoloadClasses['ElasticaConnection'] = __DIR__ . '/ElasticaConnection.php'; -$wgAutoloadClasses['ElasticaHttpTransportCloser'] = __DIR__ . '/ElasticaConnection.php'; -$wgAutoloadClasses['ElasticaHooks'] = __DIR__ . '/Elastica.hooks.php'; - -ElasticaHooks::onRegistration(); -/** - * i18n - */ -$wgMessagesDirs['Elastica'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['Elastica'] = __DIR__ . '/Elastica.i18n.php'; +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'Elastica' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['Elastica'] = __DIR__ . '/i18n'; + /* wfWarn( + 'Deprecated PHP entry point used for Elastica extension. Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); */ + return true; +} else { + die( 'This version of the Elastica extension requires MediaWiki 1.25+' ); +} -- To view, visit https://gerrit.wikimedia.org/r/263198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58ed6d518abd735f9ab2d0fa8bc7e9a9b62eaf9f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Elastica Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Empty PHP entry point - change (mediawiki...Elastica)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263198 Change subject: Empty PHP entry point .. Empty PHP entry point Change-Id: I58ed6d518abd735f9ab2d0fa8bc7e9a9b62eaf9f --- D Elastica.i18n.php M Elastica.php 2 files changed, 12 insertions(+), 57 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Elastica refs/changes/98/263198/1 diff --git a/Elastica.i18n.php b/Elastica.i18n.php deleted file mode 100644 index db61e5f..000 --- a/Elastica.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShimf4d4d92a12ba4b65' ) ) { - function wfJsonI18nShimf4d4d92a12ba4b65( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimf4d4d92a12ba4b65'; -} diff --git a/Elastica.php b/Elastica.php index adfb30c..9b0d74e 100644 --- a/Elastica.php +++ b/Elastica.php @@ -19,25 +19,15 @@ * http://www.gnu.org/copyleft/gpl.html */ -$wgExtensionCredits['other'][] = array( - 'path' => __FILE__, - 'name' => 'Elastica', - 'author' => array( 'Nik Everett', 'Chad Horohoe' ), - 'descriptionmsg' => 'elastica-desc', - 'url'=> 'https://www.mediawiki.org/wiki/Extension:Elastica', - 'version'=> '1.3.0.0' -); - -/** - * Classes - */ -$wgAutoloadClasses['ElasticaConnection'] = __DIR__ . '/ElasticaConnection.php'; -$wgAutoloadClasses['ElasticaHttpTransportCloser'] = __DIR__ . '/ElasticaConnection.php'; -$wgAutoloadClasses['ElasticaHooks'] = __DIR__ . '/Elastica.hooks.php'; - -ElasticaHooks::onRegistration(); -/** - * i18n - */ -$wgMessagesDirs['Elastica'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['Elastica'] = __DIR__ . '/Elastica.i18n.php'; +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'Elastica' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['Elastica'] = __DIR__ . '/i18n'; + /* wfWarn( + 'Deprecated PHP entry point used for Elastica extension. Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); */ + return true; +} else { + die( 'This version of the Elastica extension requires MediaWiki 1.25+' ); +} -- To view, visit https://gerrit.wikimedia.org/r/263198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58ed6d518abd735f9ab2d0fa8bc7e9a9b62eaf9f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Elastica 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] Set load_composer_autoloader: true - change (mediawiki...Elastica)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263199 Change subject: Set load_composer_autoloader: true .. Set load_composer_autoloader: true Change-Id: I1954d35b93bf5ca8018890a466060a3d01859d90 Depends-On: Ib031bef17c8a7d708a5c7878e74967d19217bbc8 --- D Elastica.hooks.php M extension.json 2 files changed, 5 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Elastica refs/changes/99/263199/1 diff --git a/Elastica.hooks.php b/Elastica.hooks.php deleted file mode 100644 index 68a749f..000 --- a/Elastica.hooks.php +++ /dev/null @@ -1,13 +0,0 @@ -https://www.mediawiki.org/wiki/Extension:Elastica";, "descriptionmsg": "elastica-desc", "type": "other", + "require": { + "MediaWiki": ">= 1.27" + }, "MessagesDirs": { "Elastica": [ "i18n" @@ -15,9 +18,8 @@ }, "AutoloadClasses": { "ElasticaConnection": "ElasticaConnection.php", - "ElasticaHttpTransportCloser": "ElasticaConnection.php", - "ElasticaHooks": "Elastica.hooks.php" + "ElasticaHttpTransportCloser": "ElasticaConnection.php" }, - "callback": "ElasticaHooks::onRegistration", + "load_composer_autoloader": true, "manifest_version": 1 } -- To view, visit https://gerrit.wikimedia.org/r/263199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1954d35b93bf5ca8018890a466060a3d01859d90 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Elastica 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] Use load_composer_autoloader - change (mediawiki...SyntaxHighlight_GeSHi)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263197 Change subject: Use load_composer_autoloader .. Use load_composer_autoloader Change-Id: If7fff2476382853426fa61b5c878f0c6f6b9d0a8 Depends-On: Ib031bef17c8a7d708a5c7878e74967d19217bbc8 --- M SyntaxHighlight_GeSHi.class.php M extension.json 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SyntaxHighlight_GeSHi refs/changes/97/263197/1 diff --git a/SyntaxHighlight_GeSHi.class.php b/SyntaxHighlight_GeSHi.class.php index 1f6cb9f..ee7b7a6 100644 --- a/SyntaxHighlight_GeSHi.class.php +++ b/SyntaxHighlight_GeSHi.class.php @@ -48,10 +48,6 @@ if ( $wgPygmentizePath === false ) { $wgPygmentizePath = __DIR__ . '/pygments/pygmentize'; } - - if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { - require_once __DIR__ . '/vendor/autoload.php'; - } } /** diff --git a/extension.json b/extension.json index 670ae1e..5611851 100644 --- a/extension.json +++ b/extension.json @@ -13,6 +13,9 @@ "descriptionmsg": "syntaxhighlight-desc", "license-name": "GPL-2.0+", "type": "parserhook", + "require": { + "MediaWiki": ">= 1.27" + }, "MessagesDirs": { "SyntaxHighlight_GeSHi": [ "i18n" @@ -101,5 +104,6 @@ "ParserTestFiles": [ "tests/parserTests.txt" ], + "load_composer_autoloader": true, "manifest_version": 1 } -- To view, visit https://gerrit.wikimedia.org/r/263197 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7fff2476382853426fa61b5c878f0c6f6b9d0a8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi 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] Add link to extension/skin's page in ExtensionDistributor - change (mediawiki...ExtensionDistributor)
Victorbarbu has uploaded a new change for review. https://gerrit.wikimedia.org/r/263196 Change subject: Add link to extension/skin's page in ExtensionDistributor .. Add link to extension/skin's page in ExtensionDistributor Added link to either extension's or skin's MediaWiki page. Bug: T31661 Change-Id: I4953e87e85aa5073e547e3664d6c79f889b303b2 --- M i18n/en.json M i18n/qqq.json M includes/specials/SpecialBaseDistributor.php 3 files changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExtensionDistributor refs/changes/96/263196/1 diff --git a/i18n/en.json b/i18n/en.json index 9bdc2c0..c8ca50f 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -36,5 +36,7 @@ "apihelp-query+extdistbranches-description": "Returns the list of branches for a repository supported by ExtensionDistributor", "apihelp-query+extdistbranches-param-skins": "Skins to get branches for", "apihelp-query+extdistbranches-param-exts": "Extensions to get branches for", - "apihelp-query+extdistbranches-example-1": "Get branches for the ExtensionDistributor extension" + "apihelp-query+extdistbranches-example-1": "Get branches for the ExtensionDistributor extension", + "extdist-goto-extensions-page": "Go to $1 extension page", + "extdist-goto-skins-page": "Go to $1 skin page" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 7d27877..b7d513a 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -35,6 +35,8 @@ "extdist-created-skins": "Followed by the link text {{msg-mw|Extdist-want-more-skins}}.\n\nIn the expression \"skins directory\", \"skins\" is the name of an actual directory and should not be translated.\n\nParameters:\n* $1 - skin name\n* $2 - revision number (SHA1, 7 characters)\n* $3 - branch name. e.g. master, REL1_21, REL1_20\n* $4 - URL which points to the .tar.gz file\n* $5 - filename of the .tar.gz file", "extdist-want-more-extensions": "Used as link text in [[Special:ExtensionDistributor]].\n\nThis message follows the Download icon.", "extdist-want-more-skins": "Used as link text in [[Special:SkinDistributor]].\n\nThis message follows the Download icon.", + "extdist-goto-extensions-page": "Used as link text in [[Special:ExtensionDistributor]].\n\nThis message precedes the \"Want more\" message.", + "extdist-goto-skins-page": "Used as link text in [[Special:SkinDistributor]].\n\nThis message precedes the \"Want more\" message.", "extdist-tar-error": "Used as error message in [[Special:ExtensionDistributor]], when downloading an extension.", "extdist-no-branches": "Error message shown if it can't find any information about any branches", "extdist-popular-extensions": "Message shown before a list of popular extensions. $1 is the number of items in the list.", diff --git a/includes/specials/SpecialBaseDistributor.php b/includes/specials/SpecialBaseDistributor.php index f424efa..9c0b35a 100644 --- a/includes/specials/SpecialBaseDistributor.php +++ b/includes/specials/SpecialBaseDistributor.php @@ -285,6 +285,19 @@ // extdist-created-extensions, extdist-created-skins $this->getOutput()->addWikiMsg( $this->msgKey( 'extdist-created-$TYPE' ), $extension, $sha1, $version, $url, $fileName ); + // add link to the extension/skin's page + $link = 'https://www.mediawiki.org/wiki/' + . ( $this->type === ExtDistProvider::EXTENSIONS ? 'Extension:' : 'Skin:' ) + . $extension; + $this->getOutput()->addHTML( + Xml::openElement( 'p' ) . + Html::rawElement( + 'a', + array( 'href' => $link ), + $this->msg( "extdist-goto-{$this->type}-page", $extension )->plain() + ) . + Xml::closeElement( 'p' ) . "\n" + ); $this->getOutput()->addHTML( Xml::openElement( 'p', array( 'style' => 'font-size:150%' ) ) . Linker::link( $this->getPageTitle(), -- To view, visit https://gerrit.wikimedia.org/r/263196 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4953e87e85aa5073e547e3664d6c79f889b303b2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ExtensionDistributor Gerrit-Branch: master Gerrit-Owner: Victorbarbu ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add cc test for replaceDeprecatedTemplates - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/263195 Change subject: Add cc test for replaceDeprecatedTemplates .. Add cc test for replaceDeprecatedTemplates Change-Id: I0a5bed50f4d6f972635baff2525769c44ff55a49 --- M tests/cosmetic_changes_tests.py 1 file changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/95/263195/1 diff --git a/tests/cosmetic_changes_tests.py b/tests/cosmetic_changes_tests.py index c937f20..82895ac 100644 --- a/tests/cosmetic_changes_tests.py +++ b/tests/cosmetic_changes_tests.py @@ -42,12 +42,6 @@ self.assertEqual('[[en:Foo bar]]', self.cct.fixSelfInterwiki('[[en:Foo bar]]')) -def test_standardizePageFooter(self): -"""Test standardizePageFooter method.""" -self.assertEqual('Foo\n{{link fa}}\n\n[[Category:Foo]]', - self.cct.standardizePageFooter( - 'Foo [[category:foo]] {{link fa}}')) - def test_resolveHtmlEntities(self): """Test resolveHtmlEntities method.""" self.assertEqual( @@ -99,6 +93,20 @@ self.assertEqual(':* Foo bar', self.cct.putSpacesInLists(':*Foo bar')) +def test_replaceDeprecatedTemplates(self): +"""Test replaceDeprecatedTemplates method.""" +self.assertEqual( +'{{Quellen fehlen }}' +'{{Belege fehlen| }}' +'{{Belege fehlen|foo}}' +'{{Quellen_fehlen|foo}}', +self.cct.replaceDeprecatedTemplates( +'{{Quellen fehlen }}' +'{{Quellen fehlen| }}' +'{{Quellen fehlen|foo}}' +'{{Quellen_fehlen|foo}}' +)) + def test_fixSyntaxSave(self): """Test fixSyntaxSave method.""" # necessary as the fixer needs the article path to fix it -- To view, visit https://gerrit.wikimedia.org/r/263195 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a5bed50f4d6f972635baff2525769c44ff55a49 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] API: Flag "user" parameters in various modules as type 'user' - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: API: Flag "user" parameters in various modules as type 'user' .. API: Flag "user" parameters in various modules as type 'user' The API 'user' type accepts both user names and IP addresses, and applies normalization but not canonicalization. We should be using this on basically every user parameter to ensure that e.g. IPv6 usernames get uppercased. Bug: T122803 Change-Id: Ic67fb54061ac311e54f325b2a1a4658f43b8fef4 --- M includes/api/ApiBase.php M includes/api/ApiBlock.php M includes/api/ApiQueryBlocks.php M includes/api/ApiQueryLogEvents.php M includes/api/ApiQueryUserContributions.php M includes/api/ApiQueryUsers.php M includes/api/ApiRollback.php M includes/api/ApiUserrights.php 8 files changed, 11 insertions(+), 6 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 56a8a7a..5f67a22 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -79,7 +79,7 @@ * - timestamp: A timestamp in any format recognized by MWTimestamp, or the * string 'now' representing the current timestamp. Will be returned in * TS_MW format. -* - user: A MediaWiki username. Will be returned normalized but not canonicalized. +* - user: A MediaWiki username or IP. Will be returned normalized but not canonicalized. * - upload: An uploaded file. Will be returned as a WebRequestUpload object. * Cannot be used with PARAM_ISMULTI. */ diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index 636baa7..e3d73a2 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -141,7 +141,7 @@ public function getAllowedParams() { return array( 'user' => array( - ApiBase::PARAM_TYPE => 'string', + ApiBase::PARAM_TYPE => 'user', ApiBase::PARAM_REQUIRED => true ), 'expiry' => 'never', diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index d004020..229e3d1 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -273,6 +273,7 @@ ApiBase::PARAM_ISMULTI => true ), 'users' => array( + ApiBase::PARAM_TYPE => 'user', ApiBase::PARAM_ISMULTI => true ), 'ip' => array( diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 38be99a..a76012a 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -165,7 +165,7 @@ if ( $userid ) { $this->addWhereFld( 'log_user', $userid ); } else { - $this->addWhereFld( 'log_user_text', IP::sanitizeIP( $user ) ); + $this->addWhereFld( 'log_user_text', $user ); } } @@ -430,7 +430,9 @@ ), ApiBase::PARAM_HELP_MSG => 'api-help-param-direction', ), - 'user' => null, + 'user' => array( + ApiBase::PARAM_TYPE => 'user', + ), 'title' => null, 'namespace' => array( ApiBase::PARAM_TYPE => 'namespace' diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index 1ef0f35..27a28e1 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -461,6 +461,7 @@ ApiBase::PARAM_HELP_MSG => 'api-help-param-continue', ), 'user' => array( + ApiBase::PARAM_TYPE => 'user', ApiBase::PARAM_ISMULTI => true ), 'userprefix' => null, diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index db5fb65..ea9d48d 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -317,6 +317,7 @@ ), 'attachedwiki' => null, 'users' => array( + ApiBase::PARAM_TYPE => 'user', ApiBase::PARAM_ISMULTI => true ), 'token' => array( diff --git a/includes/api/ApiRollback.php
[MediaWiki-commits] [Gerrit] Fix errors - change (mediawiki...Comments)
UltrasonicNXT has uploaded a new change for review. https://gerrit.wikimedia.org/r/263194 Change subject: Fix errors .. Fix errors GetFullURL was being called on a non-object. Not sure how that was happening, but this should fix it. Change-Id: Ib9058d798a3ce663dd906e81cf88190e7e5c6979 --- M CommentClass.php M Comments.php 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Comments refs/changes/94/263194/1 diff --git a/CommentClass.php b/CommentClass.php index 3f465bb..500894d 100644 --- a/CommentClass.php +++ b/CommentClass.php @@ -762,8 +762,10 @@ $output .= $this->getText(); $output .= '' . "\n"; $output .= '' . "\n"; - $output .= 'id}\" rel=\"nofollow\">" . + if ( $this->page->title ) { // for some reason doesn't always exist + $output .= 'id}\" rel=\"nofollow\">" . $this->msg( 'comments-permalink' )->plain() . ' '; + } if ( $replyRow || $dlt ) { $output .= "{$replyRow} {$dlt}" . "\n"; } diff --git a/Comments.php b/Comments.php index 7a18ba5..556a66c 100644 --- a/Comments.php +++ b/Comments.php @@ -24,7 +24,7 @@ $wgExtensionCredits['parserhook'][] = array( 'path' => __FILE__, 'name' => 'Comments', - 'version' => '4.1.0', + 'version' => '4.1.1', 'author' => array( 'David Pean', 'Misza', 'Jack Phoenix', 'Adam Carter/UltrasonicNXT' ), 'descriptionmsg' => 'comments-desc', 'url' => 'https://www.mediawiki.org/wiki/Extension:Comments' -- To view, visit https://gerrit.wikimedia.org/r/263194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9058d798a3ce663dd906e81cf88190e7e5c6979 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Comments Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow ^C'ing to work - change (labs...extdist)
jenkins-bot has submitted this change and it was merged. Change subject: Allow ^C'ing to work .. Allow ^C'ing to work Change-Id: Iab5203b89aa425750f8e04e2493d8c7603d0 --- M nightly.py 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/nightly.py b/nightly.py index 4f6fb8d..85ad040 100644 --- a/nightly.py +++ b/nightly.py @@ -257,6 +257,9 @@ for repo in repos: try: self.update_extension(repo) +except KeyboardInterrupt: +logging.error(traceback.format_exc()) +sys.exit(1) except: logging.error(traceback.format_exc()) logging.error('Updating %s failed, skipping' % repo) -- To view, visit https://gerrit.wikimedia.org/r/263193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab5203b89aa425750f8e04e2493d8c7603d0 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/extdist Gerrit-Branch: master Gerrit-Owner: Legoktm 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] Allow ^C'ing to work - change (labs...extdist)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263193 Change subject: Allow ^C'ing to work .. Allow ^C'ing to work Change-Id: Iab5203b89aa425750f8e04e2493d8c7603d0 --- M nightly.py 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/extdist refs/changes/93/263193/1 diff --git a/nightly.py b/nightly.py index 4f6fb8d..85ad040 100644 --- a/nightly.py +++ b/nightly.py @@ -257,6 +257,9 @@ for repo in repos: try: self.update_extension(repo) +except KeyboardInterrupt: +logging.error(traceback.format_exc()) +sys.exit(1) except: logging.error(traceback.format_exc()) logging.error('Updating %s failed, skipping' % repo) -- To view, visit https://gerrit.wikimedia.org/r/263193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab5203b89aa425750f8e04e2493d8c7603d0 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/extdist 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] Use pywikibot.logging.error - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/263192 Change subject: Use pywikibot.logging.error .. Use pywikibot.logging.error Replaces pywikibot.error with the same method in new logging layer. pywikibot.tools should not import from the top level of pywikibot so that the tools subpackage is only dependent on the logging layer. Change-Id: I088bc3dd001dc8555c90268edb4c2b056d40e30d --- M pywikibot/tools/djvu.py 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/92/263192/1 diff --git a/pywikibot/tools/djvu.py b/pywikibot/tools/djvu.py index 6fb23cc..e659a43 100644 --- a/pywikibot/tools/djvu.py +++ b/pywikibot/tools/djvu.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """Wrapper around djvulibre to access djvu files properties and content.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2016 # # Distributed under the terms of the MIT license. # @@ -13,7 +13,7 @@ import os.path import subprocess -import pywikibot +from pywikibot.logging import error class DjVuFile(object): @@ -47,7 +47,7 @@ stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdoutdata, stderrdata) = dp.communicate() if dp.returncode != 0: -pywikibot.error('djvulibre library error!\n%s' % stderrdata) +error('djvulibre library error!\n%s' % stderrdata) self._image_count = int(stdoutdata) return self._image_count @@ -58,7 +58,7 @@ stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdoutdata, stderrdata) = dp.communicate() if dp.returncode != 0: -pywikibot.error('djvulibre library error!\n%s' % stderrdata) +error('djvulibre library error!\n%s' % stderrdata) txt = stdoutdata.decode('utf-8') self._has_text = 'TXTz' in txt return self._has_text @@ -91,5 +91,5 @@ stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdoutdata, stderrdata) = dp.communicate() if dp.returncode != 0: -pywikibot.error('djvulibre library error!\n%s' % stderrdata) +error('djvulibre library error!\n%s' % stderrdata) return self._remove_control_chars(stdoutdata) -- To view, visit https://gerrit.wikimedia.org/r/263192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I088bc3dd001dc8555c90268edb4c2b056d40e30d Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix some errors - change (mediawiki...WikiForum)
UltrasonicNXT has submitted this change and it was merged. Change subject: Fix some errors .. Fix some errors Was getting errors in the logs about style location... Change-Id: Ie32246fef9690afd97c8087d28e8066aace4ff31 --- M WikiForum.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: UltrasonicNXT: Verified; Looks good to me, approved diff --git a/WikiForum.php b/WikiForum.php index 5c9f793..085f31e 100644 --- a/WikiForum.php +++ b/WikiForum.php @@ -35,7 +35,7 @@ 'path' => __FILE__, 'name' => 'WikiForum', 'author' => array( 'Michael Chlebek', 'Jack Phoenix', 'Adam Carter (UltrasonicNXT)' ), - 'version' => '2.2.2', + 'version' => '2.2.3', 'url' => 'https://www.mediawiki.org/wiki/Extension:WikiForum', 'descriptionmsg' => 'wikiforum-desc' ); @@ -93,6 +93,7 @@ 'styles' => 'styles.css', 'localBasePath' => __DIR__, 'remoteExtPath' => 'WikiForum', + 'position' => 'top' ); // Hooked functions -- To view, visit https://gerrit.wikimedia.org/r/263191 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie32246fef9690afd97c8087d28e8066aace4ff31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiForum Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT Gerrit-Reviewer: UltrasonicNXT ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix some errors - change (mediawiki...WikiForum)
UltrasonicNXT has uploaded a new change for review. https://gerrit.wikimedia.org/r/263191 Change subject: Fix some errors .. Fix some errors Was getting errors in the logs about style location... Change-Id: Ie32246fef9690afd97c8087d28e8066aace4ff31 --- M WikiForum.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiForum refs/changes/91/263191/1 diff --git a/WikiForum.php b/WikiForum.php index 5c9f793..085f31e 100644 --- a/WikiForum.php +++ b/WikiForum.php @@ -35,7 +35,7 @@ 'path' => __FILE__, 'name' => 'WikiForum', 'author' => array( 'Michael Chlebek', 'Jack Phoenix', 'Adam Carter (UltrasonicNXT)' ), - 'version' => '2.2.2', + 'version' => '2.2.3', 'url' => 'https://www.mediawiki.org/wiki/Extension:WikiForum', 'descriptionmsg' => 'wikiforum-desc' ); @@ -93,6 +93,7 @@ 'styles' => 'styles.css', 'localBasePath' => __DIR__, 'remoteExtPath' => 'WikiForum', + 'position' => 'top' ); // Hooked functions -- To view, visit https://gerrit.wikimedia.org/r/263191 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie32246fef9690afd97c8087d28e8066aace4ff31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiForum Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass -x to git clean to get rid of everything - change (labs...extdist)
jenkins-bot has submitted this change and it was merged. Change subject: Pass -x to git clean to get rid of everything .. Pass -x to git clean to get rid of everything Change-Id: Ie171d083f608a1289b73eb518634dcc5866dfb07 --- M nightly.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/nightly.py b/nightly.py index f704c8c..4f6fb8d 100644 --- a/nightly.py +++ b/nightly.py @@ -157,7 +157,7 @@ # Could fail if repo is empty self.shell_exec(['git', 'reset', '--hard', 'origin/master']) # Reset everything! -self.shell_exec(['git', 'clean', '-ffd']) +self.shell_exec(['git', 'clean', '-ffdx']) # Checkout the branch self.shell_exec(['git', 'checkout', 'origin/%s' % branch]) except subprocess.CalledProcessError: -- To view, visit https://gerrit.wikimedia.org/r/263190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie171d083f608a1289b73eb518634dcc5866dfb07 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/extdist Gerrit-Branch: master Gerrit-Owner: Legoktm 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] convertExtensionToRegistration.php: die on global functions - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: convertExtensionToRegistration.php: die on global functions .. convertExtensionToRegistration.php: die on global functions Bug: T122952 Change-Id: I0fca5457aba3a7237ad7aeb96f3f6636d73863d3 --- M maintenance/convertExtensionToRegistration.php 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/convertExtensionToRegistration.php b/maintenance/convertExtensionToRegistration.php index 2de2e22..3113533 100644 --- a/maintenance/convertExtensionToRegistration.php +++ b/maintenance/convertExtensionToRegistration.php @@ -151,6 +151,12 @@ "Please move your extension function somewhere else.", 1 ); } + // check if $func exists in the global scope + if ( function_exists( $func ) ) { + $this->error( "Error: Global functions cannot be converted to JSON. " . + "Please move your extension function ($func) into a class.", 1 + ); + } } $this->json[$realName] = $value; @@ -217,6 +223,12 @@ "Please move the handler for $hookName somewhere else.", 1 ); } + // Check if $func exists in the global scope + if ( function_exists( $func ) ) { + $this->error( "Error: Global functions cannot be converted to JSON. " . + "Please move the handler for $hookName inside a class.", 1 + ); + } } } $this->json[$realName] = $value; -- To view, visit https://gerrit.wikimedia.org/r/263182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0fca5457aba3a7237ad7aeb96f3f6636d73863d3 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Victorbarbu Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: Reedy Gerrit-Reviewer: Victorbarbu Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass -x to git clean to get rid of everything - change (labs...extdist)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263190 Change subject: Pass -x to git clean to get rid of everything .. Pass -x to git clean to get rid of everything Change-Id: Ie171d083f608a1289b73eb518634dcc5866dfb07 --- M nightly.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/extdist refs/changes/90/263190/1 diff --git a/nightly.py b/nightly.py index f704c8c..4f6fb8d 100644 --- a/nightly.py +++ b/nightly.py @@ -157,7 +157,7 @@ # Could fail if repo is empty self.shell_exec(['git', 'reset', '--hard', 'origin/master']) # Reset everything! -self.shell_exec(['git', 'clean', '-ffd']) +self.shell_exec(['git', 'clean', '-ffdx']) # Checkout the branch self.shell_exec(['git', 'checkout', 'origin/%s' % branch]) except subprocess.CalledProcessError: -- To view, visit https://gerrit.wikimedia.org/r/263190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie171d083f608a1289b73eb518634dcc5866dfb07 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/extdist 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] Add wfMessage('parentheses'). - change (mediawiki...Flow)
IoannisKydonis has uploaded a new change for review. https://gerrit.wikimedia.org/r/263189 Change subject: Add wfMessage('parentheses'). .. Add wfMessage('parentheses'). Change-Id: I59bf75b07f3be9ee8f72b69ace43572ebad8a26b --- M includes/Formatter/ContributionsFormatter.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/89/263189/1 diff --git a/includes/Formatter/ContributionsFormatter.php b/includes/Formatter/ContributionsFormatter.php index 4212b3e..c2852dc 100644 --- a/includes/Formatter/ContributionsFormatter.php +++ b/includes/Formatter/ContributionsFormatter.php @@ -78,7 +78,7 @@ if ( isset( $data['actions']['hide'] ) ) { $key = 'hide'; // flow-post-action-hide-post, flow-post-action-hide-topic - $msg = "flow-$type-action-hide-$type"; + $msg = wfMessage( 'parentheses' )->params("flow-$type-action-hide-$type"); } elseif ( isset( $data['actions']['unhide'] ) ) { $key = 'unhide'; // flow-topic-action-restore-topic, flow-post-action-restore-post -- To view, visit https://gerrit.wikimedia.org/r/263189 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59bf75b07f3be9ee8f72b69ace43572ebad8a26b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: IoannisKydonis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow specifying repos via --repo= - change (labs...extdist)
jenkins-bot has submitted this change and it was merged. Change subject: Allow specifying repos via --repo= .. Allow specifying repos via --repo= Change-Id: I03365d5434405d1152e97f0f312b01c0e44518e2 --- M nightly.py 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/nightly.py b/nightly.py index 66e6c1f..f704c8c 100644 --- a/nightly.py +++ b/nightly.py @@ -250,7 +250,7 @@ def run(self, repos=None): self.init() -if repos is None: +if not repos: repos = self.repo_list logging.info('Processing %s %s' % (len(repos), self.REPO_TYPE)) logging.info('Starting update of all %s...' % self.REPO_TYPE) @@ -279,11 +279,14 @@ print('extdist is not configured properly.') quit() if '--all' in sys.argv: -repos = None +repos = [] elif skins: repos = ['Vector'] else: repos = ['VisualEditor'] +for arg in sys.argv: +if arg.startswith('--repo'): +repos.append(arg.split('=', 1)[1]) repo_type = 'skins' if skins else 'extensions' force = '--force' in sys.argv generator = TarballGenerator(conf, repo_type=repo_type, force=force) -- To view, visit https://gerrit.wikimedia.org/r/263188 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03365d5434405d1152e97f0f312b01c0e44518e2 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/extdist Gerrit-Branch: master Gerrit-Owner: Legoktm 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] Allow specifying repos via --repo= - change (labs...extdist)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263188 Change subject: Allow specifying repos via --repo= .. Allow specifying repos via --repo= Change-Id: I03365d5434405d1152e97f0f312b01c0e44518e2 --- M nightly.py 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/extdist refs/changes/88/263188/1 diff --git a/nightly.py b/nightly.py index 66e6c1f..f704c8c 100644 --- a/nightly.py +++ b/nightly.py @@ -250,7 +250,7 @@ def run(self, repos=None): self.init() -if repos is None: +if not repos: repos = self.repo_list logging.info('Processing %s %s' % (len(repos), self.REPO_TYPE)) logging.info('Starting update of all %s...' % self.REPO_TYPE) @@ -279,11 +279,14 @@ print('extdist is not configured properly.') quit() if '--all' in sys.argv: -repos = None +repos = [] elif skins: repos = ['Vector'] else: repos = ['VisualEditor'] +for arg in sys.argv: +if arg.startswith('--repo'): +repos.append(arg.split('=', 1)[1]) repo_type = 'skins' if skins else 'extensions' force = '--force' in sys.argv generator = TarballGenerator(conf, repo_type=repo_type, force=force) -- To view, visit https://gerrit.wikimedia.org/r/263188 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03365d5434405d1152e97f0f312b01c0e44518e2 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/extdist 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] Don't install dev dependencies via composer - change (labs...extdist)
jenkins-bot has submitted this change and it was merged. Change subject: Don't install dev dependencies via composer .. Don't install dev dependencies via composer Change-Id: Ia76c838e9a2f5922da8a9206fd11d857a95df978 --- M nightly.py 1 file changed, 9 insertions(+), 6 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/nightly.py b/nightly.py index 84b128f..66e6c1f 100644 --- a/nightly.py +++ b/nightly.py @@ -177,12 +177,15 @@ logging.debug('No updates to branch, tarball already exists.') continue if self.COMPOSER and os.path.exists('composer.json'): -logging.debug('Running composer install for %s' % ext) -try: -self.shell_exec([self.COMPOSER, 'install']) -except subprocess.CalledProcessError: -logging.error(traceback.format_exc()) -logging.error('composer install failed') +with open('composer.json') as f_composer: +d_composer = json.load(f_composer) +if 'require' in d_composer: +logging.debug('Running composer install for %s' % ext) +try: +self.shell_exec([self.COMPOSER, 'install', '--no-dev']) +except subprocess.CalledProcessError: +logging.error(traceback.format_exc()) +logging.error('composer install failed') # Create gitinfo.json to be read/displayed by Special:Version git_info = {} with open('.git/HEAD') as f_head: -- To view, visit https://gerrit.wikimedia.org/r/263187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia76c838e9a2f5922da8a9206fd11d857a95df978 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/extdist Gerrit-Branch: master Gerrit-Owner: Legoktm 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] Don't install dev dependencies via composer - change (labs...extdist)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/263187 Change subject: Don't install dev dependencies via composer .. Don't install dev dependencies via composer Change-Id: Ia76c838e9a2f5922da8a9206fd11d857a95df978 --- M nightly.py 1 file changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/extdist refs/changes/87/263187/1 diff --git a/nightly.py b/nightly.py index 84b128f..66e6c1f 100644 --- a/nightly.py +++ b/nightly.py @@ -177,12 +177,15 @@ logging.debug('No updates to branch, tarball already exists.') continue if self.COMPOSER and os.path.exists('composer.json'): -logging.debug('Running composer install for %s' % ext) -try: -self.shell_exec([self.COMPOSER, 'install']) -except subprocess.CalledProcessError: -logging.error(traceback.format_exc()) -logging.error('composer install failed') +with open('composer.json') as f_composer: +d_composer = json.load(f_composer) +if 'require' in d_composer: +logging.debug('Running composer install for %s' % ext) +try: +self.shell_exec([self.COMPOSER, 'install', '--no-dev']) +except subprocess.CalledProcessError: +logging.error(traceback.format_exc()) +logging.error('composer install failed') # Create gitinfo.json to be read/displayed by Special:Version git_info = {} with open('.git/HEAD') as f_head: -- To view, visit https://gerrit.wikimedia.org/r/263187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia76c838e9a2f5922da8a9206fd11d857a95df978 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/extdist 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] Fix errors with Captcha - change (mediawiki...WikiForum)
UltrasonicNXT has submitted this change and it was merged. Change subject: Fix errors with Captcha .. Fix errors with Captcha Apparently you need to pass an OutputPage to getForm Change-Id: I64e76b707fcd9a3f7068311aaa73053940c2c63b --- M WikiForum.php M WikiForumClass.php M WikiForumGui.php 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: UltrasonicNXT: Verified; Looks good to me, approved diff --git a/WikiForum.php b/WikiForum.php index 1a8522c..5c9f793 100644 --- a/WikiForum.php +++ b/WikiForum.php @@ -35,7 +35,7 @@ 'path' => __FILE__, 'name' => 'WikiForum', 'author' => array( 'Michael Chlebek', 'Jack Phoenix', 'Adam Carter (UltrasonicNXT)' ), - 'version' => '2.2.1', + 'version' => '2.2.2', 'url' => 'https://www.mediawiki.org/wiki/Extension:WikiForum', 'descriptionmsg' => 'wikiforum-desc' ); diff --git a/WikiForumClass.php b/WikiForumClass.php index d6d60b9..6910793 100644 --- a/WikiForumClass.php +++ b/WikiForumClass.php @@ -348,14 +348,14 @@ * * @return string */ - public static function getCaptcha() { + public static function getCaptcha( $out ) { wfSetupSession(); // NOTE: make sure we have a session. May be required for CAPTCHAs to work. $output = wfMessage( "captcha-sendemail" )->parseAsBlock(); $captcha = ConfirmEditHooks::getInstance(); $captcha->trigger = 'wikiforum'; $captcha->action = 'post'; - $output .= $captcha->getForm(); + $output .= $captcha->getForm( $out ); return $output; } diff --git a/WikiForumGui.php b/WikiForumGui.php index 4d5dd96..a85f936 100644 --- a/WikiForumGui.php +++ b/WikiForumGui.php @@ -252,7 +252,7 @@ ' . $text_prev . ' '; if ( WikiForumClass::useCaptcha() ) { - $output .= '' . WikiForumClass::getCaptcha() . ''; + $output .= '' . WikiForumClass::getCaptcha( $wgOut ) . ''; } $output .= ' -- To view, visit https://gerrit.wikimedia.org/r/263186 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64e76b707fcd9a3f7068311aaa73053940c2c63b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiForum Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT Gerrit-Reviewer: UltrasonicNXT ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix errors with Captcha - change (mediawiki...WikiForum)
UltrasonicNXT has uploaded a new change for review. https://gerrit.wikimedia.org/r/263186 Change subject: Fix errors with Captcha .. Fix errors with Captcha Apparently you need to pass an OutputPage to getForm Change-Id: I64e76b707fcd9a3f7068311aaa73053940c2c63b --- M WikiForum.php M WikiForumClass.php M WikiForumGui.php 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiForum refs/changes/86/263186/1 diff --git a/WikiForum.php b/WikiForum.php index 1a8522c..5c9f793 100644 --- a/WikiForum.php +++ b/WikiForum.php @@ -35,7 +35,7 @@ 'path' => __FILE__, 'name' => 'WikiForum', 'author' => array( 'Michael Chlebek', 'Jack Phoenix', 'Adam Carter (UltrasonicNXT)' ), - 'version' => '2.2.1', + 'version' => '2.2.2', 'url' => 'https://www.mediawiki.org/wiki/Extension:WikiForum', 'descriptionmsg' => 'wikiforum-desc' ); diff --git a/WikiForumClass.php b/WikiForumClass.php index d6d60b9..6910793 100644 --- a/WikiForumClass.php +++ b/WikiForumClass.php @@ -348,14 +348,14 @@ * * @return string */ - public static function getCaptcha() { + public static function getCaptcha( $out ) { wfSetupSession(); // NOTE: make sure we have a session. May be required for CAPTCHAs to work. $output = wfMessage( "captcha-sendemail" )->parseAsBlock(); $captcha = ConfirmEditHooks::getInstance(); $captcha->trigger = 'wikiforum'; $captcha->action = 'post'; - $output .= $captcha->getForm(); + $output .= $captcha->getForm( $out ); return $output; } diff --git a/WikiForumGui.php b/WikiForumGui.php index 4d5dd96..a85f936 100644 --- a/WikiForumGui.php +++ b/WikiForumGui.php @@ -252,7 +252,7 @@ ' . $text_prev . ' '; if ( WikiForumClass::useCaptcha() ) { - $output .= '' . WikiForumClass::getCaptcha() . ''; + $output .= '' . WikiForumClass::getCaptcha( $wgOut ) . ''; } $output .= ' -- To view, visit https://gerrit.wikimedia.org/r/263186 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64e76b707fcd9a3f7068311aaa73053940c2c63b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiForum Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] test - change (mediawiki...UploadWizard)
Ananay has uploaded a new change for review. https://gerrit.wikimedia.org/r/263185 Change subject: test .. test Change-Id: I415d624a209d93cf37176215c2cbd272a5db4b2d --- M i18n/en.json M resources/details/uw.DescriptionDetailsWidget.js 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/85/263185/1 diff --git a/i18n/en.json b/i18n/en.json index e45198c..6e6c565 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -204,8 +204,8 @@ "mwe-upwiz-error-signature-bad-chars": "Your signature contains symbols that are not allowed.\nPlease do not use wikitext or HTML here, just your username or real name.", "mwe-upwiz-error-blank": "This field is required.", "mwe-upwiz-error-nologin": "You must be [{{fullurl:{{#Special:UserLogin}}|returnto=$1}} logged in] to upload files.", - "mwe-upwiz-error-too-long": "This entry is too long.\nPlease make this entry shorter than $1 {{PLURAL:$1|character|characters}}.", - "mwe-upwiz-error-too-short": "This entry is too short.\nPlease make this entry longer than $1 {{PLURAL:$1|character|characters}}.", + "mwe-upwiz-error-too-long": "This entry is too long.\nPlease make this entry is at most $1 {{PLURAL:$1|character|characters}}.", + "mwe-upwiz-error-too-short": "This entry is too short.\nPlease make this entry is at least $1 {{PLURAL:$1|character|characters}}.", "mwe-upwiz-error-bad-descriptions": "There are problems with some of the descriptions.", "mwe-upwiz-error-bad-chars": "This entry contains symbols that are not allowed.\nPlease do not use wikitext or HTML here.", "mwe-upwiz-error-title-blacklisted": "This title contains some undesirable text. Please revise it.", diff --git a/resources/details/uw.DescriptionDetailsWidget.js b/resources/details/uw.DescriptionDetailsWidget.js index a5189b4..f867361 100644 --- a/resources/details/uw.DescriptionDetailsWidget.js +++ b/resources/details/uw.DescriptionDetailsWidget.js @@ -127,10 +127,10 @@ if ( descriptionText.length !== 0 && descriptionText.length < minLength ) { // Empty description is allowed - errors.push( mw.message( 'mwe-upwiz-error-too-short', minLength - 1 ) ); + errors.push( mw.message( 'mwe-upwiz-error-too-short', minLength ) ); } if ( descriptionText.length > maxLength ) { - errors.push( mw.message( 'mwe-upwiz-error-too-long', maxLength + 1 ) ); + errors.push( mw.message( 'mwe-upwiz-error-too-long', maxLength ) ); } return $.Deferred().resolve( errors ).promise(); -- To view, visit https://gerrit.wikimedia.org/r/263185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I415d624a209d93cf37176215c2cbd272a5db4b2d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Ananay ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update .gitignore - change (mediawiki...MsUpload)
jenkins-bot has submitted this change and it was merged. Change subject: Update .gitignore .. Update .gitignore git ignore npm/composer related files Change-Id: I521bd8243ded44f86e70b54b9b7bdc53bcfce93b --- M .gitignore 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 199a494..bb262be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ -.svn *~ *.kate-swp .*.swp -.DS_Store \ No newline at end of file +.DS_Store +/composer.lock +/node_modules/ +/vendor/ -- To view, visit https://gerrit.wikimedia.org/r/241600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I521bd8243ded44f86e70b54b9b7bdc53bcfce93b Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/MsUpload Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Hashar Gerrit-Reviewer: Paladox Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add onOldChangesListRecentChangesLine hook - change (mediawiki...ORES)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/263184 Change subject: Add onOldChangesListRecentChangesLine hook .. Add onOldChangesListRecentChangesLine hook It allows us enable ORES for watchlist and old-style RC. This hook is a mess by design, I think it's the most robust way to implement it. Tested and it was okay Bug: T122535 Bug: T122766 Change-Id: I1921395d622cec0b0ac7ad4b10c74012ae6d4ef5 --- M extension.json M includes/Hooks.php 2 files changed, 48 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/84/263184/1 diff --git a/extension.json b/extension.json index 6b057ab..aee13d5 100644 --- a/extension.json +++ b/extension.json @@ -32,6 +32,9 @@ ], "EnhancedChangesListModifyLineData": [ "ORES\\Hooks::onEnhancedChangesListModifyLineData" + ], + "OldChangesListRecentChangesLine": [ + "ORES\\Hooks::onOldChangesListRecentChangesLine" ] }, "ResourceFileModulePaths": { diff --git a/includes/Hooks.php b/includes/Hooks.php index 6fe9992..cfa7fe8 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -9,7 +9,7 @@ use Html; use JobQueueGroup; use MediaWiki\Logger\LoggerFactory; -use OldChangesList; +use ChangesList; use RCCacheEntry; use RecentChange; @@ -17,7 +17,6 @@ * TODO: * - Fix mw-core EnhancedChangesList::recentChangesBlockGroup to rollup * extension recentChangesFlags into the top-level grouped line. - * - Fix mw-core "old" recent changes view to respect recentChangesFlags. */ class Hooks { /** @@ -41,6 +40,7 @@ 'revid' => $rc->getAttribute( 'rc_this_oldid' ), ) ); JobQueueGroup::singleton()->push( $job ); + $logger->debug( 'Job pushed...' ); } return true; @@ -126,14 +126,56 @@ } /** +* Hook for formatting recent changes linkes +* @see https://www.mediawiki.org/wiki/Manual:Hooks/OldChangesListRecentChangesLine +* +* @since 0.2 +* +* @param ChangesList $changesList +* @param string $s +* @param RecentChange $rc +* @param string[] &$classes +* +* @return bool +*/ + public static function onOldChangesListRecentChangesLine( ChangesList &$changesList, &$s, + $rc, &$classes = array() ) { + $damaging = self::getScoreRecentChangesList($rc); + if ($damaging) { + $seperator = ' . . '; + if ( strpos( $s, $seperator ) === false ) { + return false; + } + $classes[] = 'damaging'; + $parts = explode($seperator, $s); + $parts[1] = $changesList->flag('damaging') . $parts[1]; + $s = implode($seperator, $parts); + } + + return true; + } + + /** * Internal helper to label matching rows */ protected static function processRecentChangesList( RCCacheEntry $rcObj, array &$data ) { + $damaging = self::getScoreRecentChangesList($rcObj); + if ( $damaging ) { + $data['recentChangesFlags']['damaging'] = true; + } + } + + /** +* Another internal helper to label matching rows +*/ + protected static function getScoreRecentChangesList( $rcObj) { global $wgOresDamagingThreshold; $score = $rcObj->getAttribute( 'ores_probability' ); if ( $score && $score >= $wgOresDamagingThreshold ) { - $data['recentChangesFlags']['damaging'] = true; + return true; + } else { + return false; } } } -- To view, visit https://gerrit.wikimedia.org/r/263184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1921395d622cec0b0ac7ad4b10c74012ae6d4ef5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Ladsgroup ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add jsonlint to 'npm test' - change (mediawiki...AntiSpoof)
jenkins-bot has submitted this change and it was merged. Change subject: Add jsonlint to 'npm test' .. Add jsonlint to 'npm test' Change-Id: Id021bb07f98017c88a57f6af38d5a4f9e566879b --- M Gruntfile.js M package.json 2 files changed, 9 insertions(+), 1 deletion(-) Approvals: Paladox: Looks good to me, but someone else must approve Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js index ca899de..44c7d56 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,12 +7,19 @@ /*jshint node:true */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.initConfig( { banana: { all: ["i18n/"] + }, + jsonlint: { + all: [ + "**/*.json", + "!node_modules/**" + ] } } ); - grunt.registerTask( 'test', [ 'banana' ] ); + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/package.json b/package.json index 8efa2ef..7fc7b79 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "devDependencies": { "grunt": "0.4.5", "grunt-cli": "0.1.13", +"grunt-jsonlint": "1.0.7", "grunt-banana-checker": "0.4.0" } } -- To view, visit https://gerrit.wikimedia.org/r/263047 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id021bb07f98017c88a57f6af38d5a4f9e566879b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/AntiSpoof Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] i18n: missing metadata block in aeb-arab - change (mediawiki...AntiSpoof)
jenkins-bot has submitted this change and it was merged. Change subject: i18n: missing metadata block in aeb-arab .. i18n: missing metadata block in aeb-arab Change-Id: I8f674cda82e0721166dd5a465e34fafdcdfc510c --- M i18n/aeb-arab.json 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/aeb-arab.json b/i18n/aeb-arab.json index 563d957..aaf18c3 100644 --- a/i18n/aeb-arab.json +++ b/i18n/aeb-arab.json @@ -1,4 +1,8 @@ { + "@metadata": { + "authors": [ + ] + }, "antispoof-desc": "يمنع إنشاء الحسابات بسكريبت مختلط، وبأسماء مشابهة ومربكة", "antispoof-conflict-top": "الاسم \"$1\" شديد الشبه ب{{PLURAL:$2|الحساب الموجود|ال$2 حساب التالية}}:", "antispoof-conflict-bottom": "من فضلك اختر اسما آخر.", -- To view, visit https://gerrit.wikimedia.org/r/263049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f674cda82e0721166dd5a465e34fafdcdfc510c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AntiSpoof Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: Paladox Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move listpages.Formatter class to pywikibot.tools.formatter.py - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/263183 Change subject: Move listpages.Formatter class to pywikibot.tools.formatter.py .. Move listpages.Formatter class to pywikibot.tools.formatter.py - move script Formatter class to tools library. This enables to reuse it e.g. for templatescount script later. - add some tests to tools_formatter_tests Also made bugfixes for Formatter.output method: - fmt default parameter must be a string, not a integer - use '3' as default option. Otherwise the method fails if num parameter isn't set. Change-Id: Ie7dcdd45b3c339ab23b00cf04e44608b057fb33f --- M pywikibot/tools/formatter.py M scripts/listpages.py M tests/tools_formatter_tests.py 3 files changed, 89 insertions(+), 68 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/83/263183/1 diff --git a/pywikibot/tools/formatter.py b/pywikibot/tools/formatter.py index a571ee4..939bcd1 100644 --- a/pywikibot/tools/formatter.py +++ b/pywikibot/tools/formatter.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Module containing various formatting related utilities.""" # -# (C) Pywikibot team, 2015 +# (C) Pywikibot team, 2015-2016 # # Distributed under the terms of the MIT license. # @@ -63,6 +63,70 @@ output(self.format_list()) +class PagelistFormatter(object): + +"""Structure with Page attributes exposed for formatting from cmd line.""" + +fmt_options = { +'1': u"{num:4d} {page.title}", +'2': u"{num:4d} [[{page.title}]]", +'3': u"{page.title}", +'4': u"[[{page.title}]]", +'5': u"{num:4d} \03{{lightred}}{page.loc_title:<40}\03{{default}}", +'6': u"{num:4d} {page.loc_title:<40} {page.can_title:<40}", +'7': u"{num:4d} {page.loc_title:<40} {page.trs_title:<40}", +} + +# Identify which formats need outputlang +fmt_need_lang = [k for k, v in fmt_options.items() if 'trs_title' in v] + +def __init__(self, page, outputlang=None, default='**'): +""" +Constructor. + +@param page: the page to be formatted. +@type page: Page object. +@param outputlang: language code in which namespace before title should +be translated. + +Page ns will be searched in Site(outputlang, page.site.family) +and, if found, its custom name will be used in page.title(). + +@type outputlang: str or None, if no translation is wanted. +@param default: default string to be used if no corresponding +namespace is found when outputlang is not None. + +""" +self.site = page._link.site +self.title = page._link.title +self.loc_title = page._link.canonical_title() +self.can_title = page._link.ns_title() +self.outputlang = outputlang +if outputlang is not None: +# Cache onsite in case of translations. +if not hasattr(self, "onsite"): +self.onsite = pywikibot.Site(outputlang, self.site.family) +try: +self.trs_title = page._link.ns_title(onsite=self.onsite) +# Fallback if no corresponding namespace is found in onsite. +except pywikibot.Error: +self.trs_title = u'%s:%s' % (default, page._link.title) + +def output(self, num=None, fmt='3'): +"""Output formatted string.""" +fmt = self.fmt_options.get(fmt, fmt) +# If selected format requires trs_title, outputlang must be set. +if (fmt in self.fmt_need_lang or +'trs_title' in fmt and +self.outputlang is None): +raise ValueError( +u"Required format code needs 'outputlang' parameter set.") +if num is None: +return fmt.format(page=self) +else: +return fmt.format(num=num, page=self) + + class _ColorFormatter(Formatter): """Special string formatter which skips colors.""" diff --git a/scripts/listpages.py b/scripts/listpages.py index 8c3c8f7..4f35ba6 100755 --- a/scripts/listpages.py +++ b/scripts/listpages.py @@ -83,7 +83,7 @@ ¶ms; """ # -# (C) Pywikibot team, 2008-2014 +# (C) Pywikibot team, 2008-2016 # # Distributed under the terms of the MIT license. # @@ -98,72 +98,9 @@ import pywikibot from pywikibot import config2 as config, i18n from pywikibot.pagegenerators import GeneratorFactory, parameterHelp +from pywikibot.tools.formatter import PagelistFormatter docuReplacements = {'¶ms;': parameterHelp} - - -class Formatter(object): - -"""Structure with Page attributes exposed for formatting from cmd line.""" - -fmt_options = { -'1': u"{num:4d} {page.title}", -'2': u"{num:4d} [[{page.title}]]", -'3': u"{page.title}", -'4': u"[[{page.title}]]", -'5': u"{num:4d} \03{{lightred}}{page.loc_title:<40}\03{{default}}", -'6': u"{num:4d} {
[MediaWiki-commits] [Gerrit] Make convertExtensionToRegistration.php die on global functions - change (mediawiki/core)
Victorbarbu has uploaded a new change for review. https://gerrit.wikimedia.org/r/263182 Change subject: Make convertExtensionToRegistration.php die on global functions .. Make convertExtensionToRegistration.php die on global functions Made convertExtensionToRegistration.php die when meeting global functions. Bug: T122952 Change-Id: I0fca5457aba3a7237ad7aeb96f3f6636d73863d3 --- M maintenance/convertExtensionToRegistration.php 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/82/263182/1 diff --git a/maintenance/convertExtensionToRegistration.php b/maintenance/convertExtensionToRegistration.php index 2de2e22..0de5b2f 100644 --- a/maintenance/convertExtensionToRegistration.php +++ b/maintenance/convertExtensionToRegistration.php @@ -151,6 +151,12 @@ "Please move your extension function somewhere else.", 1 ); } + // check if $func exists in the global scope + if ( function_exists( $func ) ) { + $this->error( "Error: Global functions cannot be converted to JSON. " . + "Please move your function into a class.", 1 + ); + } } $this->json[$realName] = $value; @@ -217,6 +223,12 @@ "Please move the handler for $hookName somewhere else.", 1 ); } + // Check if $func exists in the global scope + if ( function_exists( $func ) ) { + $this->error( "Error: Global functions cannot be converted to JSON. " . + "Please move the handler for $hookName inside a class.", 1 + ); + } } } $this->json[$realName] = $value; -- To view, visit https://gerrit.wikimedia.org/r/263182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fca5457aba3a7237ad7aeb96f3f6636d73863d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Victorbarbu ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [DOC] Add doc strings to methods - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [DOC] Add doc strings to methods .. [DOC] Add doc strings to methods Change-Id: Ic28b614b5cd7fb4d484f5352469fdbb838115951 --- M scripts/templatecount.py 1 file changed, 52 insertions(+), 5 deletions(-) Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/templatecount.py b/scripts/templatecount.py index 7f50cfe..f402d94 100755 --- a/scripts/templatecount.py +++ b/scripts/templatecount.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- """ -This script will display the list of pages transcluding a given list of templates. +Display the list of pages transcluding a given list of templates. It can also be used to simply count the number of pages (rather than listing each individually). @@ -31,8 +31,8 @@ """ # -# (C) Pywikibot team, 2006-2014 -# (C) xqt, 2009-2014 +# (C) Pywikibot team, 2006-2016 +# (C) xqt, 2009-2016 # # Distributed under the terms of the MIT license. # @@ -53,6 +53,17 @@ @classmethod def countTemplates(cls, templates, namespaces): +""" +Display number of transclusions for a list of templates. + +Displays the number of transcluded page in the given 'namespaces' for +each template given by 'templates' list. + +@param templates: list of template names +@type templates: list +@param namespaces: list of namespace numbers +@type namespaces: list +""" templateDict = cls.template_dict(templates, namespaces) pywikibot.output(u'\nNumber of transclusions per template', toStdout=True) @@ -70,6 +81,17 @@ @classmethod def listTemplates(cls, templates, namespaces): +""" +Display transcluded pages for a list of templates. + +Displays each transcluded page in the given 'namespaces' for +each template given by 'templates' list. + +@param templates: list of template names +@type templates: list +@param namespaces: list of namespace numbers +@type namespaces: list +""" templateDict = cls.template_dict(templates, namespaces) pywikibot.output(u'\nList of pages transcluding templates:', toStdout=True) @@ -88,6 +110,19 @@ @classmethod def template_dict(cls, templates, namespaces): +""" +Create a dict of templates and its transcluded pages. + +The names of the templates are the keys, and lists of pages +transcluding templates in the given namespaces are the values. + +@param templates: list of template names +@type templates: list +@param namespaces: list of namespace numbers +@type namespaces: list + +@rtype: dict +""" gen = cls.template_dict_generator(templates, namespaces) templateDict = {} for template, transcludingArray in gen: @@ -96,9 +131,21 @@ @staticmethod def template_dict_generator(templates, namespaces): +""" +Yield transclusions of each template in 'templates'. + +For each template in 'templates', yield a tuple +(template, transclusions), where 'transclusions' is a list of all pages +in 'namespaces' where the template has been transcluded. + +@param templates: list of template names +@type templates: list +@param namespaces: list of namespace numbers +@type namespaces: list + +@rtype: generator +""" mysite = pywikibot.Site() -# The names of the templates are the keys, and lists of pages -# transcluding templates are the values. mytpl = mysite.namespaces.TEMPLATE for template in templates: transcludingArray = [] -- To view, visit https://gerrit.wikimedia.org/r/263175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic28b614b5cd7fb4d484f5352469fdbb838115951 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add 'array' to merge strategy - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/263181 Change subject: Add 'array' to merge strategy .. Add 'array' to merge strategy This will allow us to merge an array. For example you could do "EX": [ "E", "J" ], "_merge_strategy": "array" Change-Id: Ia3430508587290ad3a1120578cd95496bc8ef244 --- M includes/registration/ExtensionRegistry.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/81/263181/1 diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 86be86b..9c42135 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -265,6 +265,9 @@ case 'array_plus': $GLOBALS[$key] += $val; break; + case 'array': + $GLOBALS[$key] = $val; + break; case 'array_merge': $GLOBALS[$key] = array_merge( $val, $GLOBALS[$key] ); break; -- To view, visit https://gerrit.wikimedia.org/r/263181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3430508587290ad3a1120578cd95496bc8ef244 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix array_plus_2d in extension registration - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/263180 Change subject: Fix array_plus_2d in extension registration .. Fix array_plus_2d in extension registration This fixes array_plus_2d so that it can look through all the arrays instead of the fist one. Without this patch grouppermision is not working with double arrays such as "GroupPermissions": { "*": { "createaccount": false }, "user": { "createaccount": false }, "bureaucrat": { "confirmaccount": true, "requestips": true, "lookupcredentials": true } }, So it would look in * and posibly user but not bureaucrat because it has more then one param in it. Change-Id: Ied18e6fc4b4dcd8cfc6ce9a02a7656566cb57302 --- M includes/registration/ExtensionRegistry.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/80/263180/1 diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 86be86b..c3cac1c 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -260,7 +260,7 @@ $GLOBALS[$key] = array_merge_recursive( $GLOBALS[$key], $val ); break; case 'array_plus_2d': - $GLOBALS[$key] = wfArrayPlus2d( $GLOBALS[$key], $val ); + $GLOBALS[$key] = wfArrayPlus2d( $val, $GLOBALS[$key] ); break; case 'array_plus': $GLOBALS[$key] += $val; -- To view, visit https://gerrit.wikimedia.org/r/263180 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied18e6fc4b4dcd8cfc6ce9a02a7656566cb57302 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix docstring issues by prepending 'Return' - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix docstring issues by prepending 'Return' .. Fix docstring issues by prepending 'Return' Change-Id: I9c1205fbe12f8738d2c08e62b3988a5709c6b7c7 --- M pywikibot/bot_choice.py M pywikibot/comms/threadedhttp.py M pywikibot/logentries.py 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py index 194ac53..af5bc28 100755 --- a/pywikibot/bot_choice.py +++ b/pywikibot/bot_choice.py @@ -202,12 +202,12 @@ @property def minimum(self): -"""Return the minimum value.""" +"""Return the lower bound of the range of allowed values.""" return self._min @property def maximum(self): -"""Return the maximum value.""" +"""Return the upper bound of the range of allowed values.""" return self._max def format(self, default): diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py index 5075663..2c3be33 100644 --- a/pywikibot/comms/threadedhttp.py +++ b/pywikibot/comms/threadedhttp.py @@ -106,7 +106,7 @@ @property def status(self): -"""HTTP response status. +"""Return the HTTP response status. @rtype: int """ diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 654ce80..5d013e5 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -257,7 +257,7 @@ def page(self): """ -FilePage on which action was performed. +Return FilePage on which action was performed. Note: title may be missing in data dict e.g. by oversight action to hide the title. In that case a KeyError exception will raise -- To view, visit https://gerrit.wikimedia.org/r/263176 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c1205fbe12f8738d2c08e62b3988a5709c6b7c7 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mehtab98 Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [PEP8] update doc strings - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/263179 Change subject: [PEP8] update doc strings .. [PEP8] update doc strings - replace @return by @rtype identifier if the line describes the type - add some @rtype contents - Start with new line for multiple line doc string - remove empty line on bottom of doc string - replace @exception identifier by @raise Change-Id: I3f15785417c94c1a9ffc8ef43579db13d615193c --- M pywikibot/page.py M pywikibot/site.py 2 files changed, 411 insertions(+), 290 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/79/263179/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index ac4c426..d4c1977 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -79,18 +79,19 @@ class BasePage(UnicodeMixin, ComparableMixin): -"""BasePage: Base object for a MediaWiki page. +""" +BasePage: Base object for a MediaWiki page. This object only implements internally methods that do not require reading from or writing to the wiki. All other methods are delegated to the Site object. Will be subclassed by Page, WikibasePage, and FlowPage. - """ def __init__(self, source, title=u"", ns=0): -"""Instantiate a Page object. +""" +Instantiate a Page object. Three calling formats are supported: @@ -118,7 +119,6 @@ @param ns: namespace number; required if source is a Site, ignored otherwise @type ns: int - """ if title is None: raise ValueError(u'Title cannot be None.') @@ -150,7 +150,8 @@ return self._link.site def version(self): -"""Return MediaWiki version number of the page site. +""" +Return MediaWiki version number of the page site. This is needed to use @need_version() decorator for methods of Page objects. @@ -168,7 +169,8 @@ return self.site.data_repository() def namespace(self): -"""Return the number of the namespace of the page. +""" +Return the number of the namespace of the page. @return: namespace of the page @rtype: int @@ -183,7 +185,8 @@ @property def content_model(self): -"""Return the content model for this page. +""" +Return the content model for this page. If it cannot be reliably determined via the API, None is returned. @@ -212,7 +215,8 @@ withSection=True, asUrl=False, asLink=False, allowInterwiki=True, forceInterwiki=False, textlink=False, as_filename=False, insite=None): -"""Return the title of this Page, as a Unicode string. +""" +Return the title of this Page, as a Unicode string. @param underscore: (not used with asLink) if true, replace all ' ' characters with '_' @@ -234,7 +238,7 @@ @param insite: (only used if asLink is true) a site object where the title is to be shown. default is the current family/lang given by -family and -lang option i.e. config.family and config.mylang - +@rtype: unicode """ title = self._link.canonical_title() label = self._link.title @@ -289,11 +293,13 @@ @remove_last_args(('decode', 'underscore')) def section(self): -"""Return the name of the section this Page refers to. +""" +Return the name of the section this Page refers to. The section is the part of the title following a '#' character, if any. If no section is present, return None. +@rtype: unicode """ return self._link.section @@ -339,14 +345,14 @@ self.title(asUrl=True)) def autoFormat(self): -"""Return L{date.getAutoFormat} dictName and value, if any. +""" +Return L{date.getAutoFormat} dictName and value, if any. Value can be a year, date, etc., and dictName is 'YearBC', 'Year_December', or another dictionary name. Please note that two entries may have exactly the same autoFormat, but be in two different namespaces, as some sites have categories with the same names. Regular titles return (None, None). - """ if not hasattr(self, '_autoFormat'): from pywikibot import date @@ -364,7 +370,8 @@ change_edit_time=None, expandtemplates=None) def get(self, force=False, get_redirect=False, sysop=False): -"""Return the wiki-text of the page. +""" +Return the wiki-text of the page. This will retrieve the page from the server if it has not been retrieved yet, or if force is True. This can raise the following @@ -383,6 +390,7 @@ @param sysop: if the
[MediaWiki-commits] [Gerrit] Add missing break statement - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/263178 Change subject: Add missing break statement .. Add missing break statement Change-Id: I74d19eeb706210d1f99a0925f3730bfdf8f32756 --- M includes/registration/ExtensionRegistry.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/263178/1 diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 86be86b..7f10009 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -270,6 +270,7 @@ break; default: throw new UnexpectedValueException( "Unknown merge strategy '$mergeStrategy'" ); + break; } } -- To view, visit https://gerrit.wikimedia.org/r/263178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74d19eeb706210d1f99a0925f3730bfdf8f32756 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix when no merge strategy is used - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/263177 Change subject: Fix when no merge strategy is used .. Fix when no merge strategy is used When no merge strategy is used it wont merge the config if it is used in localsettings.php causing the config extenison.json to work but not in localsettings.php. Change-Id: I69f2f2f87ce3e80181aebafe8eaa1a94a560b17a --- M includes/registration/ExtensionRegistry.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/77/263177/1 diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 86be86b..4b11c7e 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -266,7 +266,7 @@ $GLOBALS[$key] += $val; break; case 'array_merge': - $GLOBALS[$key] = array_merge( $val, $GLOBALS[$key] ); + $GLOBALS[$key] = array_merge( $GLOBALS[$key], $val ); break; default: throw new UnexpectedValueException( "Unknown merge strategy '$mergeStrategy'" ); -- To view, visit https://gerrit.wikimedia.org/r/263177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69f2f2f87ce3e80181aebafe8eaa1a94a560b17a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Post-document hook AfterBuildFeedLinks - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Post-document hook AfterBuildFeedLinks .. Post-document hook AfterBuildFeedLinks Follow up: If48bd07a0e7e67fd1c1a94ebaa28ca9dae146c55 Change-Id: I9080a150354b978098b8bf4e279f26fdc2ac7c8e --- M docs/hooks.txt 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/hooks.txt b/docs/hooks.txt index 83ce62e..135a113 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -308,6 +308,11 @@ $loginForm: the LoginForm used &$result: associative array for API result data +'AfterBuildFeedLinks': Executed in OutputPage.php after all feed links (atom, rss,...) +are created. Can be used to omit specific feeds from being outputted. You must not use +this hook to add feeds, use OutputPage::addFeedLink() instead. +&$feedLinks: Array of created feed links + 'AfterFinalPageOutput': Nearly at the end of OutputPage::output() but before OutputPage::sendCacheControl() and final ob_end_flush() which will send the buffered output to the client. This allows for last-minute -- To view, visit https://gerrit.wikimedia.org/r/263173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9080a150354b978098b8bf4e279f26fdc2ac7c8e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Reedy Gerrit-Reviewer: Waldir Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix docstring issues by prepending 'Return' - change (pywikibot/core)
Mehtab98 has uploaded a new change for review. https://gerrit.wikimedia.org/r/263176 Change subject: Fix docstring issues by prepending 'Return' .. Fix docstring issues by prepending 'Return' Change-Id: I9c1205fbe12f8738d2c08e62b3988a5709c6b7c7 --- M pywikibot/bot_choice.py M pywikibot/comms/threadedhttp.py M pywikibot/logentries.py 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/76/263176/1 diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py index 194ac53..af5bc28 100755 --- a/pywikibot/bot_choice.py +++ b/pywikibot/bot_choice.py @@ -202,12 +202,12 @@ @property def minimum(self): -"""Return the minimum value.""" +"""Return the lower bound of the range of allowed values.""" return self._min @property def maximum(self): -"""Return the maximum value.""" +"""Return the upper bound of the range of allowed values.""" return self._max def format(self, default): diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py index 5075663..2c3be33 100644 --- a/pywikibot/comms/threadedhttp.py +++ b/pywikibot/comms/threadedhttp.py @@ -106,7 +106,7 @@ @property def status(self): -"""HTTP response status. +"""Return the HTTP response status. @rtype: int """ diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 654ce80..5d013e5 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -257,7 +257,7 @@ def page(self): """ -FilePage on which action was performed. +Return FilePage on which action was performed. Note: title may be missing in data dict e.g. by oversight action to hide the title. In that case a KeyError exception will raise -- To view, visit https://gerrit.wikimedia.org/r/263176 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c1205fbe12f8738d2c08e62b3988a5709c6b7c7 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mehtab98 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix case of some first words - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix case of some first words .. Fix case of some first words Bug: T121365 Change-Id: I047ca83e445c32b230e6d6a10263d2e71916cefd --- M pywikibot/bot_choice.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py index 17c799d..194ac53 100755 --- a/pywikibot/bot_choice.py +++ b/pywikibot/bot_choice.py @@ -202,12 +202,12 @@ @property def minimum(self): -"""return the minimum value.""" +"""Return the minimum value.""" return self._min @property def maximum(self): -"""return the maximum value.""" +"""Return the maximum value.""" return self._max def format(self, default): @@ -301,7 +301,7 @@ @property def maximum(self): -"""return the maximum value.""" +"""Return the maximum value.""" return len(self._list) def result(self, value): -- To view, visit https://gerrit.wikimedia.org/r/263174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I047ca83e445c32b230e6d6a10263d2e71916cefd Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mehtab98 Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [DOC] Add doc strings to methods - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/263175 Change subject: [DOC] Add doc strings to methods .. [DOC] Add doc strings to methods Change-Id: Ic28b614b5cd7fb4d484f5352469fdbb838115951 --- M scripts/templatecount.py 1 file changed, 18 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/75/263175/1 diff --git a/scripts/templatecount.py b/scripts/templatecount.py index 7f50cfe..1793233 100755 --- a/scripts/templatecount.py +++ b/scripts/templatecount.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- """ -This script will display the list of pages transcluding a given list of templates. +Display the list of pages transcluding a given list of templates. It can also be used to simply count the number of pages (rather than listing each individually). @@ -31,8 +31,8 @@ """ # -# (C) Pywikibot team, 2006-2014 -# (C) xqt, 2009-2014 +# (C) Pywikibot team, 2006-2016 +# (C) xqt, 2009-2016 # # Distributed under the terms of the MIT license. # @@ -53,6 +53,7 @@ @classmethod def countTemplates(cls, templates, namespaces): +"""Display number of transclusions for a list of templates.""" templateDict = cls.template_dict(templates, namespaces) pywikibot.output(u'\nNumber of transclusions per template', toStdout=True) @@ -70,6 +71,7 @@ @classmethod def listTemplates(cls, templates, namespaces): +"""Display transcluded pages for a list of templates.""" templateDict = cls.template_dict(templates, namespaces) pywikibot.output(u'\nList of pages transcluding templates:', toStdout=True) @@ -88,6 +90,14 @@ @classmethod def template_dict(cls, templates, namespaces): +""" +Create a dict of templates and its transcluded pages. + +The names of the templates are the keys, and lists of pages +transcluding templates are the values. + +@rtype: dict +""" gen = cls.template_dict_generator(templates, namespaces) templateDict = {} for template, transcludingArray in gen: @@ -96,9 +106,12 @@ @staticmethod def template_dict_generator(templates, namespaces): +""" +Yield templates and a list of transcluded pages. + +@rtype: generator +""" mysite = pywikibot.Site() -# The names of the templates are the keys, and lists of pages -# transcluding templates are the values. mytpl = mysite.namespaces.TEMPLATE for template in templates: transcludingArray = [] -- To view, visit https://gerrit.wikimedia.org/r/263175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic28b614b5cd7fb4d484f5352469fdbb838115951 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed verification-error due to incorrect timeout handling - change (mediawiki...GWToolset)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed verification-error due to incorrect timeout handling .. Fixed verification-error due to incorrect timeout handling Passed timeout variable from config directly into fetchFile method and removed the redundant timeout code from WikiChecks. Bug: T119053 Change-Id: Ib57f74cd69864d3419120d4e4e862934f18862e2 --- M includes/Handlers/UploadHandler.php M includes/Helpers/WikiChecks.php 2 files changed, 3 insertions(+), 38 deletions(-) Approvals: Kelson: Looks good to me, but someone else must approve Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Handlers/UploadHandler.php b/includes/Handlers/UploadHandler.php index 2191d4b..7df5d2a 100644 --- a/includes/Handlers/UploadHandler.php +++ b/includes/Handlers/UploadHandler.php @@ -864,7 +864,6 @@ ) { // Initialize the upload object $upload = new UploadFromUrl(); - WikiChecks::increaseHTTPTimeout(); $upload->initialize( $Title->getBaseText(), @@ -872,8 +871,10 @@ false ); + $httpOptions['timeout'] = Config::$http_timeout; + // Fetch the file - returns a Status Object - $status = $upload->fetchFile(); + $status = $upload->fetchFile( $httpOptions ); if ( !$status->isOk() ) { $upload->cleanupTempFile(); return $status; diff --git a/includes/Helpers/WikiChecks.php b/includes/Helpers/WikiChecks.php index e771c40..b930e2d 100644 --- a/includes/Helpers/WikiChecks.php +++ b/includes/Helpers/WikiChecks.php @@ -24,11 +24,6 @@ class WikiChecks { /** -* @var {int} -*/ - public static $wgHTTPTimeout; - - /** * Checks if the given user (identified by an object) can execute this * special page (as defined by $mRestriction) sent to the SpecialPage * constructor @@ -172,28 +167,6 @@ } /** -* UploadFromUrl & Api->upload timeout on large files that take a long time -* to upload without this setting -* -* wiki default is 25 seconds -* e.g., http://academia.lndb.lv/xmlui/bitstream/handle/1/231/k_001_ktl1-1-27.jpg -* @todo: what is this limit set to on production? -* @todo: does ui need a notice to user about this limitation? -*/ - public static function increaseHTTPTimeout( $timeout = 0 ) { - global $wgHTTPTimeout; - - if ( empty( $timeout ) ) { - $timeout = Config::$http_timeout; - } - - if ( $wgHTTPTimeout < $timeout ) { - self::$wgHTTPTimeout = $wgHTTPTimeout; - $wgHTTPTimeout = $timeout; - } - } - - /** * @param {SpecialPage} $SpecialPage * @return {Status} */ @@ -281,15 +254,6 @@ return $Status; } - public static function restoreHTTPTimeout() { - global $wgHTTPTimeout; - - if ( !empty( self::$wgHTTPTimeout ) - && $wgHTTPTimeout !== self::$wgHTTPTimeout - ) { - $wgHTTPTimeout = self::$wgHTTPTimeout; // 20 minutes, 25 seconds default - } - } /** * @return {Status} -- To view, visit https://gerrit.wikimedia.org/r/263142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib57f74cd69864d3419120d4e4e862934f18862e2 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/GWToolset Gerrit-Branch: master Gerrit-Owner: Mhutti1 Gerrit-Reviewer: Aklapper Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Kelson Gerrit-Reviewer: Mhutti1 Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix case of some first words - change (pywikibot/core)
Mehtab98 has uploaded a new change for review. https://gerrit.wikimedia.org/r/263174 Change subject: Fix case of some first words .. Fix case of some first words Bug: T121365 Change-Id: I047ca83e445c32b230e6d6a10263d2e71916cefd --- M pywikibot/bot_choice.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/74/263174/1 diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py index 17c799d..194ac53 100755 --- a/pywikibot/bot_choice.py +++ b/pywikibot/bot_choice.py @@ -202,12 +202,12 @@ @property def minimum(self): -"""return the minimum value.""" +"""Return the minimum value.""" return self._min @property def maximum(self): -"""return the maximum value.""" +"""Return the maximum value.""" return self._max def format(self, default): @@ -301,7 +301,7 @@ @property def maximum(self): -"""return the maximum value.""" +"""Return the maximum value.""" return len(self._list) def result(self, value): -- To view, visit https://gerrit.wikimedia.org/r/263174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I047ca83e445c32b230e6d6a10263d2e71916cefd Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mehtab98 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Post-document hook AfterBuildFeedLinks - change (mediawiki/core)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/263173 Change subject: Post-document hook AfterBuildFeedLinks .. Post-document hook AfterBuildFeedLinks Follow up: If48bd07a0e7e67fd1c1a94ebaa28ca9dae146c55 Change-Id: I9080a150354b978098b8bf4e279f26fdc2ac7c8e --- M docs/hooks.txt 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/73/263173/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 83ce62e..39d592f 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -308,6 +308,11 @@ $loginForm: the LoginForm used &$result: associative array for API result data +'AfterBuildFeedLinks: Executed in OutputPage.php after all feed links (atom, rss,...) +are created. Can be used to omit specific feeds from being outputted. You must not use +this hook to add feeds, use OutputPage::addFeedLink() instead. +&$feedLinks: Array of created feed links + 'AfterFinalPageOutput': Nearly at the end of OutputPage::output() but before OutputPage::sendCacheControl() and final ob_end_flush() which will send the buffered output to the client. This allows for last-minute -- To view, visit https://gerrit.wikimedia.org/r/263173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9080a150354b978098b8bf4e279f26fdc2ac7c8e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refine design on New Talk overlay (MobileFrontend) - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Refine design on New Talk overlay (MobileFrontend) .. Refine design on New Talk overlay (MobileFrontend) Changed some paddings and margins for fields and panels on New Talk overlay from Mobile Frontend. Bug: T104836 Change-Id: I691de9834f116cbe6c2c3c4c79509ba419752ebf --- M includes/Resources.php A resources/mobile.talk.overlays/TalkOverlay.less M resources/mobile.talk.overlays/talkSectionAdd.hogan 3 files changed, 23 insertions(+), 3 deletions(-) Approvals: Florianschmidtwelzow: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index d4af611..005772b 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -661,6 +661,9 @@ 'resources/mobile.talk.overlays/TalkSectionAddOverlay.js', 'resources/mobile.talk.overlays/TalkOverlay.js', ), + 'styles' => array( + 'resources/mobile.talk.overlays/TalkOverlay.less', + ), 'templates' => array( // talk.js 'content.hogan' => 'resources/mobile.talk.overlays/content.hogan', diff --git a/resources/mobile.talk.overlays/TalkOverlay.less b/resources/mobile.talk.overlays/TalkOverlay.less new file mode 100644 index 000..1490496 --- /dev/null +++ b/resources/mobile.talk.overlays/TalkOverlay.less @@ -0,0 +1,17 @@ +.talk-overlay { + .panel.save-panel { + padding: 1em; + } + + .panel { + padding: 0; + + input, + textarea { + padding: 16px 1em; + margin: 0; + border-radius: 0; + border: 0; + } + } +} \ No newline at end of file diff --git a/resources/mobile.talk.overlays/talkSectionAdd.hogan b/resources/mobile.talk.overlays/talkSectionAdd.hogan index e95e1c8..b3a496b 100644 --- a/resources/mobile.talk.overlays/talkSectionAdd.hogan +++ b/resources/mobile.talk.overlays/talkSectionAdd.hogan @@ -3,14 +3,14 @@ {{>saveHeader}} - + {{{licenseMsg}}} - + - + \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/263143 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I691de9834f116cbe6c2c3c4c79509ba419752ebf Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Victorbarbu Gerrit-Reviewer: Bmansurov Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: TTO Gerrit-Reviewer: Victorbarbu Gerrit-Reviewer: Violetto 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] Fix undefined index error, when WikidataPageBanner isn't ins... - change (mediawiki...MobileFrontend)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/263172 Change subject: Fix undefined index error, when WikidataPageBanner isn't installed .. Fix undefined index error, when WikidataPageBanner isn't installed Bug: T123169 Change-Id: If69946ba437b649e8cd61daeba0f8d16f56679be --- M includes/MobileFrontend.hooks.php 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/72/263172/1 diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 9ab887c..a949fb5 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -698,7 +698,11 @@ $mfMobileUrlTemplate = $context->getMobileUrlTemplate(); $tabletSize = $config->get( 'MFDeviceWidthTablet' ); - if ( $context->isBetaGroupMember() ) { + // show banners using WikidataPageBanner, if installed and all pre-conditions fulfilled + if ( + ExtensionRegistry::getInstance()->isLoaded( 'WikidataPageBanner' ) && + $context->isBetaGroupMember() + ) { // turn default banners on $wgWPBEnableDefaultBanner = true; // Turn on the banner experiment -- To view, visit https://gerrit.wikimedia.org/r/263172 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If69946ba437b649e8cd61daeba0f8d16f56679be Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added a config variable $wgWhosOnlineTimeout to set the time... - change (mediawiki...WhosOnline)
jenkins-bot has submitted this change and it was merged. Change subject: Added a config variable $wgWhosOnlineTimeout to set the timeout period before WhosOnline decides a user has gone offline. Defaults to the original value of 3600 seconds. .. Added a config variable $wgWhosOnlineTimeout to set the timeout period before WhosOnline decides a user has gone offline. Defaults to the original value of 3600 seconds. Change-Id: I2338bd3e06a87cf3ed5d778ee2013b34bc7b1c23 --- M WhosOnline.php M WhosOnlineSpecialPage.php M extension.json 3 files changed, 14 insertions(+), 5 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/WhosOnline.php b/WhosOnline.php index d8a8bd5..11f0607 100644 --- a/WhosOnline.php +++ b/WhosOnline.php @@ -15,7 +15,7 @@ $wgExtensionCredits['specialpage'][] = array( 'path' => __FILE__, 'name' => 'WhosOnline', - 'version' => '1.6.0', + 'version' => '1.7.0', 'author' => 'Maciej Brencz', 'descriptionmsg' => 'whosonline-desc', 'url' => 'https://www.mediawiki.org/wiki/Extension:WhosOnline', @@ -28,6 +28,9 @@ // By default, only show usernames rather than user full names. $wgWhosOnlineShowRealName = false; +// Timeout before WhosOnline decides a use has gone offline. Default 3600s (1h). +$wgWhosOnlineTimeout = 3600; + $wgMessagesDirs['WhosOnline'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['WhosOnlineAlias'] = __DIR__ . '/WhosOnline.alias.php'; diff --git a/WhosOnlineSpecialPage.php b/WhosOnlineSpecialPage.php index 040fec7..910bd58 100644 --- a/WhosOnlineSpecialPage.php +++ b/WhosOnlineSpecialPage.php @@ -120,11 +120,16 @@ } public function execute( $para ) { - global $wgDBname; + global $wgDBname, $wgWhosOnlineTimeout; + + $timeout = 3600; + if ( is_numeric( $wgWhosOnlineTimeout ) ) { + $timeout = $wgWhosOnlineTimeout; + } $db = wfGetDB( DB_MASTER ); $db->selectDB( $wgDBname ); - $old = wfTimestamp( TS_MW, time() - 3600 ); + $old = wfTimestamp( TS_MW, time() - $timeout ); $db->delete( 'online', array( 'timestamp < "' . $old . '"' ), __METHOD__ ); $this->setHeaders(); diff --git a/extension.json b/extension.json index 46febe1..63276f6 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "WhosOnline", - "version": "1.6.0", + "version": "1.7.0", "author": [ "Maciej Brencz" ], @@ -10,7 +10,8 @@ "type": "specialpage", "config": { "WhosOnlineShowAnons": false, - "WhosOnlineShowRealName": false + "WhosOnlineShowRealName": false, + "WhosOnlineTimeout": 3600 }, "MessagesDirs": { "WhosOnline": [ -- To view, visit https://gerrit.wikimedia.org/r/259527 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2338bd3e06a87cf3ed5d778ee2013b34bc7b1c23 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/WhosOnline Gerrit-Branch: master Gerrit-Owner: Jason.ji Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Jason.ji Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add to getExtraAutoloaderPaths extractInfo - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/263171 Change subject: Add to getExtraAutoloaderPaths extractInfo .. Add to getExtraAutoloaderPaths extractInfo Without adding getExtraAutoloaderPaths to extractInfo it would not have worked. Change-Id: Ib2de046af2756a65bf8508fc42e114adf61d4ff2 --- M includes/registration/ExtensionProcessor.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/71/263171/1 diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index 6ac25e8..3dc3584 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -153,9 +153,10 @@ * @return array */ public function extractInfo( $path, array $info, $version ) { + $dir = dirname( $path ); + $this->getExtraAutoloaderPaths( $dir, $info ); $this->extractConfig( $info ); $this->extractHooks( $info ); - $dir = dirname( $path ); $this->extractExtensionMessagesFiles( $dir, $info ); $this->extractMessagesDirs( $dir, $info ); $this->extractNamespaces( $info ); -- To view, visit https://gerrit.wikimedia.org/r/263171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2de046af2756a65bf8508fc42e114adf61d4ff2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added wfMessage('parentheses'). - change (mediawiki...Flow)
IoannisKydonis has uploaded a new change for review. https://gerrit.wikimedia.org/r/263170 Change subject: Added wfMessage('parentheses'). .. Added wfMessage('parentheses'). Change-Id: Ib6e675705ac6c8236461812ff967620444ca05ca --- M includes/UrlGenerator.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/70/263170/1 diff --git a/includes/UrlGenerator.php b/includes/UrlGenerator.php index 3c58f1a..7940667 100644 --- a/includes/UrlGenerator.php +++ b/includes/UrlGenerator.php @@ -723,7 +723,7 @@ */ public function hidePostAction( Title $title = null, UUID $workflowId, UUID $postId ) { return new Anchor( - wfMessage( 'flow-post-action-hide-post' ), + wfMessage( 'parentheses' )->params( 'flow-post-action-hide-post' ), $this->resolveTitle( $title, $workflowId ), array( 'action' => 'moderate-post', -- To view, visit https://gerrit.wikimedia.org/r/263170 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6e675705ac6c8236461812ff967620444ca05ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: IoannisKydonis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use flake8-print - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Use flake8-print .. Use flake8-print Replace print with pywikibot methods where appropriate. Add tests.unittest_print for minor usage of print function in test modules. Ignore print function in generate_family_file.py, pwb.py and two scripts where better rewrites are planned. Change-Id: Ie8cf4b78aaad3b1bf5233636b7ea87e320f863ed --- M pywikibot/comms/http.py M pywikibot/userinterfaces/gui.py M pywikibot/userinterfaces/terminal_interface_base.py M pywikibot/userinterfaces/win32_unicode.py M scripts/blockreview.py M scripts/catall.py M scripts/flickrripper.py M scripts/harvest_template.py M scripts/imagecopy_self.py M scripts/maintenance/cache.py M scripts/panoramiopicker.py M scripts/weblinkchecker.py M tests/__init__.py M tests/logentry_tests.py M tests/site_tests.py M tests/tools_ip_tests.py M tox.ini 17 files changed, 59 insertions(+), 40 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 8db7213..42f48d8 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -11,7 +11,7 @@ - URL-encoding all data - Basic HTTP error handling """ -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals # # (C) Pywikibot team, 2007-2015 @@ -88,7 +88,7 @@ message = 'Closing network session.' if hasattr(sys, 'last_type'): # we quit because of an exception -print(sys.last_type) +print(sys.last_type) # noqa: print critical(message) else: log(message) diff --git a/pywikibot/userinterfaces/gui.py b/pywikibot/userinterfaces/gui.py index 2186e71..cce5a42 100644 --- a/pywikibot/userinterfaces/gui.py +++ b/pywikibot/userinterfaces/gui.py @@ -378,7 +378,6 @@ if highlight: self.find_all(highlight) if jumpIndex: -print(jumpIndex) # lines are indexed starting at 1 line = text[:jumpIndex].count('\n') + 1 column = jumpIndex - (text[:jumpIndex].rfind('\n') + 1) diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py index 4540e2c..5c75351 100755 --- a/pywikibot/userinterfaces/terminal_interface_base.py +++ b/pywikibot/userinterfaces/terminal_interface_base.py @@ -428,7 +428,7 @@ try: from pywikibot.userinterfaces import gui except ImportError as e: -print('Could not load GUI modules: %s' % e) +pywikibot.warning('Could not load GUI modules: {0}'.format(e)) return text editor = gui.EditBoxWindow() return editor.edit(text, jumpIndex=jumpIndex, highlight=highlight) diff --git a/pywikibot/userinterfaces/win32_unicode.py b/pywikibot/userinterfaces/win32_unicode.py index 74b60c3..2ae926a 100755 --- a/pywikibot/userinterfaces/win32_unicode.py +++ b/pywikibot/userinterfaces/win32_unicode.py @@ -173,7 +173,8 @@ # So be paranoid about catching errors and reporting them to original_stderr, # so that we can at least see them. def _complain(message): -print(isinstance(message, str) and message or repr(message), file=original_stderr) +print(isinstance(message, str) and message or repr(message), + file=original_stderr) # noqa: print def register_cp65001(): diff --git a/scripts/blockreview.py b/scripts/blockreview.py index 599e1d0..37e315a 100755 --- a/scripts/blockreview.py +++ b/scripts/blockreview.py @@ -152,7 +152,7 @@ elif self.site.sitename == 'wikipedia:pt': gen = pg.PreloadingGenerator(self.SysopGenerator()) for sysop in gen: -print(sysop.title()) +pywikibot.output(sysop.title()) talkText = talkText.replace(u'{{%s}}' % unblock_tpl, u'{{%s|2}}' % unblock_tpl) diff --git a/scripts/catall.py b/scripts/catall.py index c87ae30..5ddd6d7 100755 --- a/scripts/catall.py +++ b/scripts/catall.py @@ -39,7 +39,7 @@ done = False length = 1000 # TODO: → input_choice -print("""Give the new categories, one per line. +pywikibot.output("""Give the new categories, one per line. Empty line: if the first, don't change. Otherwise: Ready. -: I made a mistake, let me start over. ?: Give the text of the page with GUI. @@ -110,8 +110,8 @@ cats = p.categories() if not cats: pywikibot.output(u"== %s ==" % p.title()) -print("No categories") -print("-" * 40) +pywikibot.output('No categories') +
[MediaWiki-commits] [Gerrit] Reducing the number of parameters passed to functions - change (operations...dcat)
Lokal Profil has uploaded a new change for review. https://gerrit.wikimedia.org/r/263169 Change subject: Reducing the number of parameters passed to functions .. Reducing the number of parameters passed to functions This also means accepting hardcoded ids (thereby closing https://github.com/lokal-profil/DCAT/issues/2 ) Change-Id: Ie1e8537968a7e61b39b7e3d2380d06fdc7746267 --- M DCAT.php 1 file changed, 59 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/dcat refs/changes/69/263169/1 diff --git a/DCAT.php b/DCAT.php index 8d2bc6d..ce7e6e2 100644 --- a/DCAT.php +++ b/DCAT.php @@ -122,16 +122,19 @@ } $i18n = makeI18nBlob( $langs, $config ); - // hardcoded ids (for now at least) - // https://github.com/lokal-profil/DCAT/issues/2 + // hardcoded ids $ids = array( 'publisher' => '_n42', 'contactPoint' => '_n43', - 'liveDataset' => 'liveData', - 'dumpDatasetPrefix' => 'dumpData', - 'liveDistribLD' => 'liveDataLD', - 'liveDistribAPI' => 'liveDataAPI', - 'dumpDistribPrefix' => 'dumpDist', + 'dataset' => array( + 'live' => 'liveData', + 'dump' => 'dumpData', + ), + 'distribution' => array( + 'ld' => 'liveDataLD', + 'api' => 'liveDataAPI', + 'dump' => 'dumpDist', + ), ); // stick loaded data into blob @@ -149,15 +152,14 @@ * Complement to writeDistribution() * * @param XmlWriter $xml XML stream to write to - * @param array $data data-blob of i18n and config variables - * @param string|null $dumpDate the date of the dumpfile, null for live data - * @param string $dumpKey the key for the corresponding dump file + * @param array $dump the metadata on the dump being described + * @param string $accessURL the url prefix for the filename */ -function dumpDistributionExtras( XMLWriter $xml, array $data, $dumpDate, $dumpKey ) { +function dumpDistributionExtras( XMLWriter $xml, array $dump, $accessURL ) { $url = str_replace( '$1', - $dumpDate . '/' . $data['dumps'][$dumpDate][$dumpKey]['filename'], - $data['config']['dump-info']['accessURL'] + $dump['filename'], + $accessURL ); $xml->startElementNS( 'dcat', 'accessURL', null ); @@ -171,13 +173,13 @@ $xml->startElementNS( 'dcterms', 'issued', null ); $xml->writeAttributeNS( 'rdf', 'datatype', null, 'http://www.w3.org/2001/XMLSchema#date' ); - $xml->text( $data['dumps'][$dumpDate][$dumpKey]['timestamp'] ); + $xml->text( $dump['timestamp'] ); $xml->endElement(); $xml->startElementNS( 'dcat', 'byteSize', null ); $xml->writeAttributeNS( 'rdf', 'datatype', null, 'http://www.w3.org/2001/XMLSchema#decimal' ); - $xml->text( $data['dumps'][$dumpDate][$dumpKey]['byteSize'] ); + $xml->text( $dump['byteSize'] ); $xml->endElement(); } @@ -186,18 +188,17 @@ * * @param XmlWriter $xml XML stream to write to * @param array $data data-blob of i18n and config variables - * @param bool $isDump whether this is a dump distribution - * @param string $prefix the type of distribution, one of ld, api or dump - * @param string $format the file format, if dump - * @param string $compression the compression format, if dump + * @param string $prefix the type of distribution, one of 'ld', 'api' or 'dump' + * @param string $format the file format, only used for dumps + * @param string $compression the compression format, only used for dumps */ -function writeDistributionI18n( XMLWriter $xml, array $data, $isDump, - $prefix, $format, $compression ) { +function writeDistributionI18n( XMLWriter $xml, array $data, $prefix, + $format, $compression ) { foreach ( $data['i18n'] as $langCode => $langData ) { if ( array_key_exists( "distribution-$prefix-description", $langData ) ) { $formatDescription = $langData["distribution-$prefix-description"]; - if ( $isDump ) { + if ( $prefix === 'dump' ) { $formatDescription = str_replace( '$1', $format, @@ -224,14 +225,13 @@ * * @param XmlWriter $xml XML stream to write to * @param array $data data-blob of i18n and config variables - * @param string $distribId id for the distribution - * @param string $prefix prefix for corresponding entry in config file + * @param string $prefix the type of distribution, one of 'ld', 'api' or 'dump' * @param string|null $dumpDate the date of the dumpfile,
[MediaWiki-commits] [Gerrit] Export: Exporting now includes custom tags - change (mediawiki/core)
Georggi199 has uploaded a new change for review. https://gerrit.wikimedia.org/r/263168 Change subject: Export: Exporting now includes custom tags .. Export: Exporting now includes custom tags Bug: T22691 Change-Id: I61f77df1a443e15c92f709a1811b207ae125d3fd --- M includes/export/WikiExporter.php M includes/export/XmlDumpWriter.php M maintenance/backup.inc M maintenance/dumpBackup.php 4 files changed, 28 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/68/263168/1 diff --git a/includes/export/WikiExporter.php b/includes/export/WikiExporter.php index ab2632d..6cdccd0 100644 --- a/includes/export/WikiExporter.php +++ b/includes/export/WikiExporter.php @@ -40,6 +40,9 @@ /** @var bool */ public $dumpUploadFileContents = false; + /** @var bool */ + public $changetags = false; + /** @var string */ public $author_list = ""; @@ -366,6 +369,11 @@ $join['text'] = array( 'INNER JOIN', 'rev_text_id=old_id' ); } + $fields = array( '*' ); + if ( $this->changetags ) { + ChangeTags::modifyDisplayQuery($tables, $fields, $cond, $join, $opts); + } + if ( $this->buffer == WikiExporter::STREAM ) { $prev = $this->db->bufferResults( false ); } @@ -376,7 +384,7 @@ array( $this->db, &$tables, &$cond, &$opts, &$join ) ); # Do the query! - $result = $this->db->select( $tables, '*', $cond, __METHOD__, $opts, $join ); + $result = $this->db->select( $tables, $fields, $cond, __METHOD__, $opts, $join ); # Output dump results $this->outputPageStream( $result ); diff --git a/includes/export/XmlDumpWriter.php b/includes/export/XmlDumpWriter.php index 3bd4c96..580d721 100644 --- a/includes/export/XmlDumpWriter.php +++ b/includes/export/XmlDumpWriter.php @@ -223,6 +223,21 @@ $out .= " " . Xml::elementClean( 'comment', array(), strval( $row->rev_comment ) ) . "\n"; } + if ( isset( $row->ts_tags ) && !is_null( $row->ts_tags ) ){ + $indent = " "; + $out .= $indent . "\n"; + if ( strpos($row->ts_tags, ',') ) { + $tags = explode(',' ,$row->ts_tags); + //I could do it as separate function if you say so + foreach($tags as $tag){ + $out .= $indent . " " . Xml::element( 'tag', null, $tag ) . "\n"; + } + } else { + $out .= $indent . " " . Xml::element( 'tag', null, $row->ts_tags ) . "\n"; + } + $out .= $indent . "\n"; + } + if ( isset( $row->rev_content_model ) && !is_null( $row->rev_content_model ) ) { $content_model = strval( $row->rev_content_model ); } else { diff --git a/maintenance/backup.inc b/maintenance/backup.inc index 9af9604..616eb97 100644 --- a/maintenance/backup.inc +++ b/maintenance/backup.inc @@ -41,6 +41,7 @@ public $revEndId = 0; public $dumpUploads = false; public $dumpUploadFileContents = false; + public $changetags = false; protected $reportingInterval = 100; protected $pageCount = 0; @@ -254,6 +255,7 @@ $exporter = new WikiExporter( $db, $history, WikiExporter::STREAM, $text ); $exporter->dumpUploads = $this->dumpUploads; $exporter->dumpUploadFileContents = $this->dumpUploadFileContents; + $exporter->changetags = $this->changetags; $wrapper = new ExportProgressFilter( $this->sink, $this ); $exporter->setOutputSink( $wrapper ); diff --git a/maintenance/dumpBackup.php b/maintenance/dumpBackup.php index 18737a4..f9550d8 100644 --- a/maintenance/dumpBackup.php +++ b/maintenance/dumpBackup.php @@ -61,6 +61,7 @@ $this->addOption( 'stub', 'Don\'t perform old_text lookups; for 2-pass dump' ); $this->addOption( 'uploads', 'Include upload records without files' ); $this->addOption( 'include-files', 'Include files within the XML stream' ); + $this->addOption( 'change-tags', 'Export change tags for each revision' ); if ( $args ) { $this->loadWithArgv( $args ); @@ -120,6 +121,7 @@ $this->revEndId = intva
[MediaWiki-commits] [Gerrit] Enable flake8 rules P102 and P103 - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Enable flake8 rules P102 and P103 .. Enable flake8 rules P102 and P103 Use flake8-putty to disable these rules only in three files and only on lines matching a regex. Change-Id: I36355923991c3c63d1cd8f2feca73505da987c44 --- M tox.ini 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/tox.ini b/tox.ini index da06347..ec6bc95 100644 --- a/tox.ini +++ b/tox.ini @@ -95,7 +95,7 @@ # E402: module level import not at top of file; see T87409 # H201: Except: format # P102,P103: string does contain unindexed parameters; see I36355923 -ignore = E402,D105,D211,FI10,FI12,FI13,FI15,FI5,H101,H201,H236,H301,H404,H405,I100,I101,P102,P103 +ignore = E402,D105,D211,FI10,FI12,FI13,FI15,FI5,H101,H201,H236,H301,H404,H405,I100,I101 exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/* max_line_length = 130 accept-encodings = utf-8 @@ -112,6 +112,9 @@ scripts/archivebot.py,scripts/casechecker.py,scripts/commons_link.py,scripts/cfd.py,scripts/featured.py,scripts/imagecopy.py,scripts/imagecopy_self.py,scripts/interwiki.py,scripts/replicate_wiki.py,scripts/solve_disambiguation.py,scripts/maintenance/compat2core.py : +D102, D103 scripts/checkimages.py,scripts/freebasemappingupload.py,scripts/imagetransfer.py,scripts/lonelypages.py,scripts/movepages.py,scripts/nowcommons.py,scripts/redirect.py,scripts/isbn.py,scripts/reflinks.py,scripts/script_wui.py,scripts/templatecount.py,scripts/revertbot.py,scripts/weblinkchecker.py,scripts/welcome.py : +D102 scripts/catall.py,scripts/imageharvest.py,scripts/makecat.py,scripts/maintenance/cache.py,scripts/maintenance/wikimedia_sites.py : +D103 +scripts/interwiki.py,/""/ : +P102 +pywikibot/__init__.py,/link_regex/ : +P103 +tests/textlib_tests.py,/self.assert.*{{/ : +P103 [pep8] # see explanations above -- To view, visit https://gerrit.wikimedia.org/r/247079 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36355923991c3c63d1cd8f2feca73505da987c44 Gerrit-PatchSet: 9 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Inserted wfMessage("Parentheses"); Change-Id: I13798e5eed58a... - change (mediawiki...Flow)
IoannisKydonis has uploaded a new change for review. https://gerrit.wikimedia.org/r/263167 Change subject: Inserted wfMessage("Parentheses"); Change-Id: I13798e5eed58aa650306ba3e3202f90016ca3113 .. Inserted wfMessage("Parentheses"); Change-Id: I13798e5eed58aa650306ba3e3202f90016ca3113 --- M Resources.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/67/263167/1 diff --git a/Resources.php b/Resources.php index 2432f64..995a130 100644 --- a/Resources.php +++ b/Resources.php @@ -120,7 +120,7 @@ 'flow-post-action-edit-post', 'flow-post-action-edit-post-submit', 'flow-post-action-edit-post-submit-anonymously', - 'flow-post-action-hide-post', + wfMessage('flow-post-action-hide-post'), 'flow-post-action-unhide-post', 'flow-post-action-post-history', 'flow-post-action-view', -- To view, visit https://gerrit.wikimedia.org/r/263167 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13798e5eed58aa650306ba3e3202f90016ca3113 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: IoannisKydonis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable flake8 error E731 - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Enable flake8 error E731 .. Enable flake8 error E731 Remove assigned lambda, or use noqa to ignore the error. Change-Id: I7b3db838f070087151cfc17dbf24b364f1b2bcc8 --- M pywikibot/date.py M pywikibot/pagegenerators.py M pywikibot/site.py M scripts/flickrripper.py M scripts/interwiki.py M tox.ini 6 files changed, 12 insertions(+), 15 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/date.py b/pywikibot/date.py index 6e9e8ee..b6bf551 100644 --- a/pywikibot/date.py +++ b/pywikibot/date.py @@ -2006,7 +2006,7 @@ """ if makeUpperCase is None: -f = lambda s: s +return [pattern % monthName(lang, m) for m in range(1, 13)] elif makeUpperCase: f = first_upper else: diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index d3a15a9..a55125d 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -2451,8 +2451,6 @@ xmlFilename = filename xmlStart = start -if text_predicate is None: -text_predicate = lambda text: True self.text_predicate = text_predicate self.xmlStart = xmlStart @@ -2478,7 +2476,7 @@ if not self.namespaces == []: if page.namespace() not in self.namespaces: continue -if self.text_predicate(entry.text): +if not self.text_predicate or self.text_predicate(entry.text): page.text = entry.text return page diff --git a/pywikibot/site.py b/pywikibot/site.py index 0bbf596..a4ac378 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -885,7 +885,7 @@ return getattr(self.__class__, attr) try: method = getattr(self.family, attr) -f = lambda *args, **kwargs: method(self.code, *args, **kwargs) +f = functools.partial(method, self.code) if hasattr(method, "__doc__"): f.__doc__ = method.__doc__ return f @@ -5608,8 +5608,8 @@ 3) if isinstance(ignore_warnings, Iterable): ignored_warnings = ignore_warnings -ignore_warnings = lambda warnings: all(w.code in ignored_warnings - for w in warnings) +ignore_warnings = lambda warnings: all( # noqa: E731 +w.code in ignored_warnings for w in warnings) ignore_all_warnings = not callable(ignore_warnings) and ignore_warnings if text is None: text = filepage.text diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py index b486602..b67b56d 100755 --- a/scripts/flickrripper.py +++ b/scripts/flickrripper.py @@ -355,7 +355,7 @@ user_id=user_id, tags=tags, per_page='100', page='1') pages = photos.find('photos').attrib['pages'] -gen = lambda i: flickr.groups_pools_getPhotos( +gen = lambda i: flickr.groups_pools_getPhotos( # noqa: E731 group_id=group_id, user_id=user_id, tags=tags, per_page='100', page=i ).find('photos').getchildren() @@ -365,7 +365,7 @@ photos = flickr.photosets_getPhotos(photoset_id=photoset_id, per_page='100', page='1') pages = photos.find('photoset').attrib['pages'] -gen = lambda i: flickr.photosets_getPhotos( +gen = lambda i: flickr.photosets_getPhotos( # noqa: E731 photoset_id=photoset_id, per_page='100', page=i ).find('photoset').getchildren() # https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html @@ -374,7 +374,7 @@ photos = flickr.people_getPublicPhotos(user_id=user_id, per_page='100', page='1') pages = photos.find('photos').attrib['pages'] -gen = lambda i: flickr.people_getPublicPhotos( +gen = lambda i: flickr.people_getPublicPhotos( # noqa: E731 user_id=user_id, per_page='100', page=i ).find('photos').getchildren() for i in range(1, int(pages) + 1): diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 5bf3dee..8887c5b 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -2379,10 +2379,10 @@ if not globalvar.summary and \ len(adding) + len(removing) + len(modifying) <= 3: # Use an extended format for the string linking to all added pages. -fmt = lambda d, site: unicode(d[site]) +fmt = lambda d, site: unicode(d[site]) # noqa: E731 else: # Use short format, just the language code -fmt = lambda
[MediaWiki-commits] [Gerrit] starsList tests - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: starsList tests .. starsList tests Bug: T123150 Change-Id: I7cd2546caa2523971de554f40877501764ad5219 --- M tests/__init__.py A tests/add_text_tests.py M tests/cosmetic_changes_tests.py 3 files changed, 57 insertions(+), 0 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/__init__.py b/tests/__init__.py index 8d768ba..4fb3698 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -128,6 +128,7 @@ 'pwb', 'script', 'l10n', +'add_text', 'archivebot', 'category_bot', 'checkimages', diff --git a/tests/add_text_tests.py b/tests/add_text_tests.py new file mode 100644 index 000..9c90ef6 --- /dev/null +++ b/tests/add_text_tests.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +"""Test add_text bot module.""" +# +# (C) Pywikibot team, 2016 +# +# Distributed under the terms of the MIT license. +# +from __future__ import absolute_import, unicode_literals + +__version__ = '$Id$' + +import pywikibot + +from scripts.add_text import add_text + +from tests.aspects import unittest, TestCase + + +class TestStarList(TestCase): + +"""Test starlist.""" + +family = 'wikipedia' +code = 'en' + +dry = True + +def test_basic(self): +"""Test adding text before {{linkfa}} without parameters.""" +page = pywikibot.Page(self.site, 'foo') +(text, newtext, always) = add_text( +page, 'bar', putText=False, +oldTextGiven='foo\n{{linkfa}}') +self.assertEqual( +'foo\n{{linkfa}}\nbar', +newtext) + +def test_with_params(self): +"""Test adding text before {{linkfa|...}}.""" +page = pywikibot.Page(self.site, 'foo') +(text, newtext, always) = add_text( +page, 'bar', putText=False, +oldTextGiven='foo\n{{linkfa|...}}') +self.assertEqual( +'foo\nbar\n\n{{linkfa|...}}\n', +newtext) + + +if __name__ == "__main__": +unittest.main() diff --git a/tests/cosmetic_changes_tests.py b/tests/cosmetic_changes_tests.py index 17e270d..c937f20 100644 --- a/tests/cosmetic_changes_tests.py +++ b/tests/cosmetic_changes_tests.py @@ -42,6 +42,12 @@ self.assertEqual('[[en:Foo bar]]', self.cct.fixSelfInterwiki('[[en:Foo bar]]')) +def test_standardizePageFooter(self): +"""Test standardizePageFooter method.""" +self.assertEqual('Foo\n{{link fa}}\n\n[[Category:Foo]]', + self.cct.standardizePageFooter( + 'Foo [[category:foo]] {{link fa}}')) + def test_resolveHtmlEntities(self): """Test resolveHtmlEntities method.""" self.assertEqual( -- To view, visit https://gerrit.wikimedia.org/r/263161 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7cd2546caa2523971de554f40877501764ad5219 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add PLURAL support to some messages - change (mediawiki...CentralAuth)
PranavK has uploaded a new change for review. https://gerrit.wikimedia.org/r/263166 Change subject: Add PLURAL support to some messages .. Add PLURAL support to some messages Bug: T111096 Change-Id: Ib5925bfab29e05f9235523270c4314259a52f75c --- M i18n/en.json M i18n/qqq.json M includes/CentralAuthHooks.php 3 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/66/263166/1 diff --git a/i18n/en.json b/i18n/en.json index ad9fc35..ddb375a 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -217,8 +217,8 @@ "centralauth-account-unattached-exists": "Cannot create account: The username is already in use. Please pick another name.", "centralauth-account-rename-exists": "Cannot create account: The username is already in use. Please pick another name.", "centralauth-account-exists-reset": "The username $1 is not registered on this wiki, but you can reset its password on [[Special:CentralAuth/$1|a wiki where it is]].", - "centralauth-login-progress": "Logging you in to wikis of {{int:Centralauth-groupname}}:", - "centralauth-logout-progress": "Logging you out from other wikis of {{int:Centralauth-groupname}}:", + "centralauth-login-progress": "Logging you in to {{PLURAL:$2|wikis}} of {{int:Centralauth-groupname}}:", + "centralauth-logout-progress": "Logging you out from other {{PLURAL:$2|wikis}} of {{int:Centralauth-groupname}}:", "centralauth-login-no-others": "You have been automatically logged into other projects of {{int:Centralauth-groupname}}.", "centralauth-logout-no-others": "You have been automatically logged out of other projects of {{int:Centralauth-groupname}}.", "centralauth-hidden-blockreason": "globally hidden by $1 at $2 with following reason: $3", @@ -244,7 +244,7 @@ "centralauth-rightslog-entry-groupperms3": "changed group restricted wikis set for $1 from $2 to $3", "centralauth-rightslog-entry-grouprename": "renamed group $2 to $1", "centralauth-rightslog-header": "This log contains operations on global groups: membership and permissions changes", - "centralauth-rightslog-entry-newset": "created $2 wiki set $1 with following wikis: $3", + "centralauth-rightslog-entry-newset": "created $2 wiki set $1 with following {{PLURAL:$3|wiki|wikis}}: $3", "centralauth-rightslog-entry-setrename": "renamed wiki set \"$2\" to \"$1\"", "centralauth-rightslog-entry-setnewtype": "changed type of \"$1\" from $2 to $3", "centralauth-rightslog-entry-setchange": "changed wikis in \"$1\": added: $2; removed: $3", diff --git a/i18n/qqq.json b/i18n/qqq.json index 1296405..8ea1b90 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -233,8 +233,8 @@ "centralauth-account-unattached-exists": "Used as error message.", "centralauth-account-rename-exists": "Used as error message.", "centralauth-account-exists-reset": "Used as error message.\n\nParameters:\n* $1 - global user's name", - "centralauth-login-progress": "{{gender}}\nRefers to {{msg-mw|Centralauth-groupname}}.\n\nParameters:\n* $1 - (Optional) the user name of the logged in user\nSee also:\n* {{msg-mw|Centralauth-logout-progress}}", - "centralauth-logout-progress": "{{gender}}\nRefers to {{msg-mw|Centralauth-groupname}}.\n\nParameters:\n* $1 - (Optional) the user name of the logged out user\nSee also:\n* {{msg-mw|Centralauth-login-progress}}", + "centralauth-login-progress": "{{gender}}\nRefers to {{msg-mw|Centralauth-groupname}}.\n\nParameters:\n* $1 - (Optional) the user name of the logged in user\n $2 the number of wikis, used for PLURAL support\nSee also:\n* {{msg-mw|Centralauth-logout-progress}}", + "centralauth-logout-progress": "{{gender}}\nRefers to {{msg-mw|Centralauth-groupname}}.\n\nParameters:\n* $1 - (Optional) the user name of the logged out user\n $2 the number of wikis, used for PLURAL support\nSee also:\n* {{msg-mw|Centralauth-login-progress}}", "centralauth-login-no-others": "Refers to {{msg-mw|Centralauth-groupname}}.\n\nSee also:\n* {{msg-mw|Centralauth-logout-no-others}}", "centralauth-logout-no-others": "Refers to {{msg-mw|Centralauth-groupname}}.\n\nSee also:\n* {{msg-mw|Centralauth-login-no-others}}", "centralauth-hidden-blockreason": "Unused at this time. Parameters:\n* $1 - username\n* $2 - ...\n* $3 - reason", @@ -260,7 +260,7 @@ "centralauth-rightslog-entry-groupperms3": "A log entry when a user changes the wiki set where the specified global group is applied.\n\nParameters:\n* $1 - the name of the group being changed\n* $2 - the name of the previous wiki set\n* $3 - the name of the new wiki set", "centralauth-rightslog-entry-grouprename": "A log entry when a user renames a global group. Parameters:\n* $1 - the title of the new
[MediaWiki-commits] [Gerrit] importImages.php: Run input file names through UTF8 normaliz... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: importImages.php: Run input file names through UTF8 normalization .. importImages.php: Run input file names through UTF8 normalization Bug: T78060 Change-Id: I545ea8f28ff3a1aac03c29d27355c0371632ef4d --- M maintenance/importImages.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Sumit: Looks good to me, but someone else must approve TTO: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/importImages.php b/maintenance/importImages.php index a040248..701af62 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -136,7 +136,7 @@ if ( $count > 0 ) { foreach ( $files as $file ) { - $base = wfBaseName( $file ); + $base = UtfNormal\Validator::cleanUp( wfBaseName( $file ) ); # Validate a title $title = Title::makeTitleSafe( NS_FILE, $base ); -- To view, visit https://gerrit.wikimedia.org/r/263153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I545ea8f28ff3a1aac03c29d27355c0371632ef4d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ananay Gerrit-Reviewer: Aklapper Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: Reedy Gerrit-Reviewer: Sumit Gerrit-Reviewer: TTO Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2016-01-09T10:00:01+0000 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/263165 Change subject: New Wikidata Build - 2016-01-09T10:00:01+ .. New Wikidata Build - 2016-01-09T10:00:01+ Change-Id: Ia2f335d5e7a49e6d29bd83ee67ce4135a2128570 --- M composer.lock M extensions/Constraints/specials/SpecialConstraintReport.php M extensions/Quality/Gruntfile.js M extensions/Quality/package.json M extensions/Wikibase/client/i18n/lki.json A extensions/Wikibase/client/i18n/my.json M extensions/Wikibase/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php M extensions/Wikibase/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php M extensions/Wikibase/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php M extensions/Wikibase/client/tests/phpunit/includes/LangLinkHandlerTest.php M extensions/Wikibase/client/tests/phpunit/includes/OtherProjectsSitesGeneratorTest.php M extensions/Wikibase/client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php M extensions/Wikibase/client/tests/phpunit/includes/WikibaseClientTest.php M extensions/Wikibase/lib/i18n/bg.json A extensions/Wikibase/lib/i18n/my.json D extensions/Wikibase/lib/tests/phpunit/MockSiteStore.php M extensions/Wikibase/lib/tests/phpunit/sites/SitesBuilderTest.php M extensions/Wikibase/repo/i18n/bg.json M extensions/Wikibase/repo/i18n/is.json A extensions/Wikibase/repo/i18n/my.json M extensions/Wikibase/repo/includes/specials/SpecialListProperties.php M extensions/Wikibase/repo/includes/specials/SpecialWikibaseQueryPage.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/ChangeOpFactoryProviderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php M extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/MergeChangeOpsFactoryTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Diff/DiffViewTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Diff/EntityDiffVisualizerTest.php M extensions/Wikibase/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php M extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/MergeItemsTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/ResultBuilderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php M extensions/Wikibase/repo/tests/phpunit/includes/specials/SpecialMergeItemsTest.php M extensions/Wikibase/repo/tests/phpunit/includes/specials/SpecialWikibaseRepoPageTestBase.php M extensions/Wikibase/repo/tests/phpunit/maintenance/dumpRdfTest.php M extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.js M vendor/composer/autoload_classmap.php M vendor/composer/installed.json 41 files changed, 170 insertions(+), 218 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/65/263165/1 diff --git a/composer.lock b/composer.lock index c503ca3..7f7f267 100644 --- a/composer.lock +++ b/composer.lock @@ -919,7 +919,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityConstraints";, -"reference": "e98aa427ba1669243da460d8c0ddcae0cd75d617" +"reference": "77334ca29da34a6022c233376ae575a3b552fc15" }, "require": { "php": ">=5.3.0", @@ -965,7 +965,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/1202/"; }, -"time": "2015-12-18 22:39:37" +"time": "2016-01-08 01:36:43" }, { "name": "wikibase/data-model", @@ -1355,7 +1355,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQuality";, -"reference": "7738ef8d9b07d7bab7a84de571e98b75f6b7479d" +"reference": "d26ec9d03eef9e7b882ab7e22e0b0e373204d02c" }, "require": { "php": ">=5.3.0", @@ -1399,7 +1399,7 @@ "support": { "issues": "https://phabricator.wikimedia.org/project/profile/989/"; }, -"time": "2016-01-07 19:19:06" +"time": "2016-01-09 07:24:54" }, { "name": "wikibase/serialization-javascript", @@ -1448,12 +1448,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/me
[MediaWiki-commits] [Gerrit] Remove excess newlines at the end of files - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove excess newlines at the end of files .. Remove excess newlines at the end of files All of them added with commit 6d55397e7cb6f2001f8635dee7c2a78d6ad1a23e Change-Id: I09822b8c2a32832b1875028739091dd893900783 --- M includes/installer/WebInstallerComplete.php M includes/installer/WebInstallerCopying.php M includes/installer/WebInstallerDBConnect.php M includes/installer/WebInstallerDBSettings.php M includes/installer/WebInstallerDocument.php M includes/installer/WebInstallerExistingWiki.php M includes/installer/WebInstallerInstall.php M includes/installer/WebInstallerLanguage.php M includes/installer/WebInstallerName.php M includes/installer/WebInstallerOptions.php M includes/installer/WebInstallerReadme.php M includes/installer/WebInstallerReleaseNotes.php M includes/installer/WebInstallerRestart.php M includes/installer/WebInstallerUpgrade.php M includes/installer/WebInstallerUpgradeDoc.php M includes/installer/WebInstallerWelcome.php 16 files changed, 0 insertions(+), 22 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/installer/WebInstallerComplete.php b/includes/installer/WebInstallerComplete.php index a54264c..f443db4 100644 --- a/includes/installer/WebInstallerComplete.php +++ b/includes/installer/WebInstallerComplete.php @@ -55,5 +55,3 @@ } } - - diff --git a/includes/installer/WebInstallerCopying.php b/includes/installer/WebInstallerCopying.php index c539ed2..36fec86 100644 --- a/includes/installer/WebInstallerCopying.php +++ b/includes/installer/WebInstallerCopying.php @@ -29,4 +29,3 @@ } } - diff --git a/includes/installer/WebInstallerDBConnect.php b/includes/installer/WebInstallerDBConnect.php index bf1787f..7a0825e 100644 --- a/includes/installer/WebInstallerDBConnect.php +++ b/includes/installer/WebInstallerDBConnect.php @@ -119,5 +119,3 @@ } } - - diff --git a/includes/installer/WebInstallerDBSettings.php b/includes/installer/WebInstallerDBSettings.php index 9b95c0a..f214663 100644 --- a/includes/installer/WebInstallerDBSettings.php +++ b/includes/installer/WebInstallerDBSettings.php @@ -52,5 +52,3 @@ } } - - diff --git a/includes/installer/WebInstallerDocument.php b/includes/installer/WebInstallerDocument.php index 2b35bc6..fc1c33f 100644 --- a/includes/installer/WebInstallerDocument.php +++ b/includes/installer/WebInstallerDocument.php @@ -47,4 +47,3 @@ } } - diff --git a/includes/installer/WebInstallerExistingWiki.php b/includes/installer/WebInstallerExistingWiki.php index ebe0ead..2c08c9c 100644 --- a/includes/installer/WebInstallerExistingWiki.php +++ b/includes/installer/WebInstallerExistingWiki.php @@ -182,5 +182,3 @@ } } - - diff --git a/includes/installer/WebInstallerInstall.php b/includes/installer/WebInstallerInstall.php index 261a661..51a58ae 100644 --- a/includes/installer/WebInstallerInstall.php +++ b/includes/installer/WebInstallerInstall.php @@ -93,4 +93,3 @@ } } - diff --git a/includes/installer/WebInstallerLanguage.php b/includes/installer/WebInstallerLanguage.php index ba2745c..cfd4a86 100644 --- a/includes/installer/WebInstallerLanguage.php +++ b/includes/installer/WebInstallerLanguage.php @@ -119,4 +119,3 @@ } } - diff --git a/includes/installer/WebInstallerName.php b/includes/installer/WebInstallerName.php index 7d0073c..717d67b 100644 --- a/includes/installer/WebInstallerName.php +++ b/includes/installer/WebInstallerName.php @@ -247,5 +247,3 @@ } } - - diff --git a/includes/installer/WebInstallerOptions.php b/includes/installer/WebInstallerOptions.php index 30ea10e..fb8e35b 100644 --- a/includes/installer/WebInstallerOptions.php +++ b/includes/installer/WebInstallerOptions.php @@ -458,4 +458,3 @@ } } - diff --git a/includes/installer/WebInstallerReadme.php b/includes/installer/WebInstallerReadme.php index 36bc306..97c9f83 100644 --- a/includes/installer/WebInstallerReadme.php +++ b/includes/installer/WebInstallerReadme.php @@ -29,4 +29,3 @@ } } - diff --git a/includes/installer/WebInstallerReleaseNotes.php b/includes/installer/WebInstallerReleaseNotes.php index e185876..c0a8d71 100644 --- a/includes/installer/WebInstallerReleaseNotes.php +++ b/includes/installer/WebInstallerReleaseNotes.php @@ -36,4 +36,3 @@ } } - diff --git a/includes/installer/WebInstallerRestart.php b/includes/installer/WebInstallerRestart.php index 8717cb8..be55c32 100644 --- a/includes/installer/WebInstallerRestart.php +++ b/includes/installer/WebInstallerRestart.php @@ -44,4 +44,3 @@ } } - diff --git a/includes/installer/WebInstallerUpgrade.php b/includes/installer/WebInstallerUpgrade.php index 7136120..72973e7 100644 --- a/includes/installer/WebInstallerUpgrade.php +++ b/includes/installer/WebInstallerUpgrade.php @@ -108,4
[MediaWiki-commits] [Gerrit] Remove excess newlines at the end of files - change (mediawiki/core)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/263164 Change subject: Remove excess newlines at the end of files .. Remove excess newlines at the end of files All of them added with commit 6d55397e7cb6f2001f8635dee7c2a78d6ad1a23e Change-Id: I09822b8c2a32832b1875028739091dd893900783 --- M includes/installer/WebInstallerComplete.php M includes/installer/WebInstallerCopying.php M includes/installer/WebInstallerDBConnect.php M includes/installer/WebInstallerDBSettings.php M includes/installer/WebInstallerDocument.php M includes/installer/WebInstallerExistingWiki.php M includes/installer/WebInstallerInstall.php M includes/installer/WebInstallerLanguage.php M includes/installer/WebInstallerName.php M includes/installer/WebInstallerOptions.php M includes/installer/WebInstallerReadme.php M includes/installer/WebInstallerReleaseNotes.php M includes/installer/WebInstallerRestart.php M includes/installer/WebInstallerUpgrade.php M includes/installer/WebInstallerUpgradeDoc.php M includes/installer/WebInstallerWelcome.php 16 files changed, 0 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/263164/1 diff --git a/includes/installer/WebInstallerComplete.php b/includes/installer/WebInstallerComplete.php index a54264c..f443db4 100644 --- a/includes/installer/WebInstallerComplete.php +++ b/includes/installer/WebInstallerComplete.php @@ -55,5 +55,3 @@ } } - - diff --git a/includes/installer/WebInstallerCopying.php b/includes/installer/WebInstallerCopying.php index c539ed2..36fec86 100644 --- a/includes/installer/WebInstallerCopying.php +++ b/includes/installer/WebInstallerCopying.php @@ -29,4 +29,3 @@ } } - diff --git a/includes/installer/WebInstallerDBConnect.php b/includes/installer/WebInstallerDBConnect.php index bf1787f..7a0825e 100644 --- a/includes/installer/WebInstallerDBConnect.php +++ b/includes/installer/WebInstallerDBConnect.php @@ -119,5 +119,3 @@ } } - - diff --git a/includes/installer/WebInstallerDBSettings.php b/includes/installer/WebInstallerDBSettings.php index 9b95c0a..f214663 100644 --- a/includes/installer/WebInstallerDBSettings.php +++ b/includes/installer/WebInstallerDBSettings.php @@ -52,5 +52,3 @@ } } - - diff --git a/includes/installer/WebInstallerDocument.php b/includes/installer/WebInstallerDocument.php index 2b35bc6..fc1c33f 100644 --- a/includes/installer/WebInstallerDocument.php +++ b/includes/installer/WebInstallerDocument.php @@ -47,4 +47,3 @@ } } - diff --git a/includes/installer/WebInstallerExistingWiki.php b/includes/installer/WebInstallerExistingWiki.php index ebe0ead..2c08c9c 100644 --- a/includes/installer/WebInstallerExistingWiki.php +++ b/includes/installer/WebInstallerExistingWiki.php @@ -182,5 +182,3 @@ } } - - diff --git a/includes/installer/WebInstallerInstall.php b/includes/installer/WebInstallerInstall.php index 261a661..51a58ae 100644 --- a/includes/installer/WebInstallerInstall.php +++ b/includes/installer/WebInstallerInstall.php @@ -93,4 +93,3 @@ } } - diff --git a/includes/installer/WebInstallerLanguage.php b/includes/installer/WebInstallerLanguage.php index ba2745c..cfd4a86 100644 --- a/includes/installer/WebInstallerLanguage.php +++ b/includes/installer/WebInstallerLanguage.php @@ -119,4 +119,3 @@ } } - diff --git a/includes/installer/WebInstallerName.php b/includes/installer/WebInstallerName.php index 7d0073c..717d67b 100644 --- a/includes/installer/WebInstallerName.php +++ b/includes/installer/WebInstallerName.php @@ -247,5 +247,3 @@ } } - - diff --git a/includes/installer/WebInstallerOptions.php b/includes/installer/WebInstallerOptions.php index 30ea10e..fb8e35b 100644 --- a/includes/installer/WebInstallerOptions.php +++ b/includes/installer/WebInstallerOptions.php @@ -458,4 +458,3 @@ } } - diff --git a/includes/installer/WebInstallerReadme.php b/includes/installer/WebInstallerReadme.php index 36bc306..97c9f83 100644 --- a/includes/installer/WebInstallerReadme.php +++ b/includes/installer/WebInstallerReadme.php @@ -29,4 +29,3 @@ } } - diff --git a/includes/installer/WebInstallerReleaseNotes.php b/includes/installer/WebInstallerReleaseNotes.php index e185876..c0a8d71 100644 --- a/includes/installer/WebInstallerReleaseNotes.php +++ b/includes/installer/WebInstallerReleaseNotes.php @@ -36,4 +36,3 @@ } } - diff --git a/includes/installer/WebInstallerRestart.php b/includes/installer/WebInstallerRestart.php index 8717cb8..be55c32 100644 --- a/includes/installer/WebInstallerRestart.php +++ b/includes/installer/WebInstallerRestart.php @@ -44,4 +44,3 @@ } } - diff --git a/includes/installer/WebInstallerUpgrade.php b/includes/installer/WebInstallerUpgrade.php index 7136120..72973e7 100644 --- a/includes/installer/WebInstallerUpgrade.php +++ b/includes/installer