[MediaWiki-commits] [Gerrit] Add Special:CiteThisPage to the 'pagetools' group of Special... - change (mediawiki...CiteThisPage)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/169555 Change subject: Add Special:CiteThisPage to the 'pagetools' group of Special:SpecialPages .. Add Special:CiteThisPage to the 'pagetools' group of Special:SpecialPages Change-Id: I00edb18c0e3b4938b6f0fbb5758f77be9621952b --- M CiteThisPage.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CiteThisPage refs/changes/55/169555/1 diff --git a/CiteThisPage.php b/CiteThisPage.php index 4a3d67a..e6393da 100644 --- a/CiteThisPage.php +++ b/CiteThisPage.php @@ -30,6 +30,7 @@ $wgHooks['SkinTemplateToolboxEnd'][] = 'efSpecialCiteThisPageToolbox'; $wgSpecialPages['CiteThisPage'] = 'SpecialCiteThisPage'; +$wgSpecialPageGroups['CiteThisPage'] = 'pagetools'; $wgAutoloadClasses['SpecialCiteThisPage'] = __DIR__ . '/SpecialCiteThisPage.php'; // Resources -- To view, visit https://gerrit.wikimedia.org/r/169555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00edb18c0e3b4938b6f0fbb5758f77be9621952b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CiteThisPage Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace == with isset - change (mediawiki...Cite)
jenkins-bot has submitted this change and it was merged. Change subject: Replace == with isset .. Replace == with isset The coding conventions suggest avoiding ==, and for this condition definedness is actually more relevant than whether the string has any text. Change-Id: I15b422d3345bf4522e68a17dce9682ff28484559 --- M Cite_body.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/Cite_body.php b/Cite_body.php index b2ec7cc..c28f3f8 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -720,7 +720,7 @@ $this-referencesKey( $val['follow'] ), $text )-inContentLanguage()-plain(); - } elseif ( $val['text'] == '' ) { + } elseif ( !isset( $val['text'] ) ) { return wfMessage( 'cite_references_link_one', $this-referencesKey( $key ), -- To view, visit https://gerrit.wikimedia.org/r/164085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I15b422d3345bf4522e68a17dce9682ff28484559 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org 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 mistaken name - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix mistaken name .. Fix mistaken name Change-Id: Id0eaef59b0987ae885756a0c55e2190e4d0aca21 --- M includes/Search/ResultsType.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Search/ResultsType.php b/includes/Search/ResultsType.php index 0513792..b0b29aa 100644 --- a/includes/Search/ResultsType.php +++ b/includes/Search/ResultsType.php @@ -159,7 +159,7 @@ if ( isset( $highlights[ redirect.title.$this-matchedAnalyzer ] ) ) { $redirectHighlights = $highlights[ redirect.title.$this-matchedAnalyzer ]; } - if ( isset( $highlights[ redirect.title.$this-matchedAnalyzer ] ) ) { + if ( isset( $highlights[ redirect.title.{$this-matchedAnalyzer}_asciifolding ] ) ) { $redirectHighlights = array_merge( $redirectHighlights, $highlights[ redirect.title.{$this-matchedAnalyzer}_asciifolding ] ); } -- To view, visit https://gerrit.wikimedia.org/r/169554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id0eaef59b0987ae885756a0c55e2190e4d0aca21 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org 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 mistaken name - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/169556 Change subject: Fix mistaken name .. Fix mistaken name Change-Id: Id0eaef59b0987ae885756a0c55e2190e4d0aca21 (cherry picked from commit 661056b113996ebe09e279623c0faf02e3baf772) --- M includes/Search/ResultsType.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/56/169556/1 diff --git a/includes/Search/ResultsType.php b/includes/Search/ResultsType.php index fea4d6a..9182a3a 100644 --- a/includes/Search/ResultsType.php +++ b/includes/Search/ResultsType.php @@ -159,7 +159,7 @@ if ( isset( $highlights[ redirect.title.$this-matchedAnalyzer ] ) ) { $redirectHighlights = $highlights[ redirect.title.$this-matchedAnalyzer ]; } - if ( isset( $highlights[ redirect.title.$this-matchedAnalyzer ] ) ) { + if ( isset( $highlights[ redirect.title.{$this-matchedAnalyzer}_asciifolding ] ) ) { $redirectHighlights = array_merge( $redirectHighlights, $highlights[ redirect.title.{$this-matchedAnalyzer}_asciifolding ] ); } -- To view, visit https://gerrit.wikimedia.org/r/169556 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0eaef59b0987ae885756a0c55e2190e4d0aca21 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace == with test for isset and empty string - change (mediawiki...Cite)
jenkins-bot has submitted this change and it was merged. Change subject: Replace == with test for isset and empty string .. Replace == with test for isset and empty string The coding conventions suggest avoiding ==, and for this condition definedness is actually more relevant than whether the string has any text, but since the string can also be '0', checking for !$text doesn't work. Similar to I15b422d3345bf4522e68a17dce9682ff28484559 . Change-Id: Ib823678b639bf4f1a92dffcd9e41c780b56ab128 --- M Cite_body.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved Thiemo Mättig (WMDE): Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/Cite_body.php b/Cite_body.php index c28f3f8..8cb406f 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -779,7 +779,7 @@ * @return String */ function referenceText( $key, $text ) { - if ( $text == '' ) { + if ( !isset( $text ) || $text === '' ) { return $this-error( 'cite_error_references_no_text', $key, 'noparse' ); } return 'span class=reference-text' . rtrim( $text, \n ) . /span\n; -- To view, visit https://gerrit.wikimedia.org/r/164086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib823678b639bf4f1a92dffcd9e41c780b56ab128 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de 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 retries of failed jobs for 30 minutes. - change (mediawiki...ocg-collection)
Arlolra has submitted this change and it was merged. Change subject: Prevent retries of failed jobs for 30 minutes. .. Prevent retries of failed jobs for 30 minutes. Depends on Id7a0e02220a3d69a0b67b6628cd26eb57213558e. Change-Id: I6b3c2022836be6b1c0a8f3c4d1dce31ce229fc2f --- M LocalSettings.js 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Arlolra: Verified; Looks good to me, approved diff --git a/LocalSettings.js b/LocalSettings.js index 2ac1ef5..7c238cc 100644 --- a/LocalSettings.js +++ b/LocalSettings.js @@ -19,6 +19,8 @@ Object.keys(config.backend.writers).forEach(function(w) { config.backend.writers[w].max_execution_time = CPU_LIMIT_SECS; }); + // DoS prevention: don't immediately allow retries of failed jobs. + config.frontend.failed_job_lockout_time = 30 * 60 /* 30 minutes, in seconds */; // console gets logged to /var/log/upstart/ocg.log. //config.logging[winston/transports/Console] = { level: debug }; -- To view, visit https://gerrit.wikimedia.org/r/169536 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b3c2022836be6b1c0a8f3c4d1dce31ce229fc2f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ocg-collection Gerrit-Branch: wmf-deploy Gerrit-Owner: Cscott canan...@wikimedia.org Gerrit-Reviewer: Arlolra abrea...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix mistaken name - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix mistaken name .. Fix mistaken name Change-Id: Id0eaef59b0987ae885756a0c55e2190e4d0aca21 (cherry picked from commit 661056b113996ebe09e279623c0faf02e3baf772) --- M includes/Search/ResultsType.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Search/ResultsType.php b/includes/Search/ResultsType.php index fea4d6a..9182a3a 100644 --- a/includes/Search/ResultsType.php +++ b/includes/Search/ResultsType.php @@ -159,7 +159,7 @@ if ( isset( $highlights[ redirect.title.$this-matchedAnalyzer ] ) ) { $redirectHighlights = $highlights[ redirect.title.$this-matchedAnalyzer ]; } - if ( isset( $highlights[ redirect.title.$this-matchedAnalyzer ] ) ) { + if ( isset( $highlights[ redirect.title.{$this-matchedAnalyzer}_asciifolding ] ) ) { $redirectHighlights = array_merge( $redirectHighlights, $highlights[ redirect.title.{$this-matchedAnalyzer}_asciifolding ] ); } -- To view, visit https://gerrit.wikimedia.org/r/169556 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id0eaef59b0987ae885756a0c55e2190e4d0aca21 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update CirrusSearch - change (mediawiki/core)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/169557 Change subject: Update CirrusSearch .. Update CirrusSearch Picks up Id0eaef59b0987ae885756a0c55e2190e4d0aca21 Change-Id: Ibee60a2b01132ce89879a4e68430e9c407eae4e7 --- M extensions/CirrusSearch 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/57/169557/1 diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch index 4c12cf3..1093a9f 16 --- a/extensions/CirrusSearch +++ b/extensions/CirrusSearch -Subproject commit 4c12cf36204c3a8e9e758833fe985c9d4695398d +Subproject commit 1093a9f6a3ceb0a39314a23077650b80ee7cf71f -- To view, visit https://gerrit.wikimedia.org/r/169557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibee60a2b01132ce89879a4e68430e9c407eae4e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update CirrusSearch - change (mediawiki/core)
Reedy has submitted this change and it was merged. Change subject: Update CirrusSearch .. Update CirrusSearch Picks up Id0eaef59b0987ae885756a0c55e2190e4d0aca21 Change-Id: Ibee60a2b01132ce89879a4e68430e9c407eae4e7 --- M extensions/CirrusSearch 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Reedy: Verified; Looks good to me, approved diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch index 4c12cf3..1093a9f 16 --- a/extensions/CirrusSearch +++ b/extensions/CirrusSearch -Subproject commit 4c12cf36204c3a8e9e758833fe985c9d4695398d +Subproject commit 1093a9f6a3ceb0a39314a23077650b80ee7cf71f -- To view, visit https://gerrit.wikimedia.org/r/169557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibee60a2b01132ce89879a4e68430e9c407eae4e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update style to accommodate Lead Images. - change (mediawiki...MobileApp)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/169558 Change subject: Update style to accommodate Lead Images. .. Update style to accommodate Lead Images. Change-Id: I139155ad4822ff3c1fd30405b3d2bb517bf7d253 --- M less/issues.less 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileApp refs/changes/58/169558/1 diff --git a/less/issues.less b/less/issues.less index 5237119..2063aa4 100644 --- a/less/issues.less +++ b/less/issues.less @@ -1,7 +1,7 @@ div.issues_container { -margin-top: -0.5em; /* a bit hacky that it assumes it's right below an h1 heading */ -margin-bottom: 3.5em; -padding: 0px; +margin-top: 1em; +margin-bottom: 2em; +padding: 2px; width: 100%; display: block; font-size: .95em; -- To view, visit https://gerrit.wikimedia.org/r/169558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I139155ad4822ff3c1fd30405b3d2bb517bf7d253 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileApp Gerrit-Branch: master Gerrit-Owner: Dbrant dbr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use MovePageIsValidMove hook if possible - change (mediawiki...EducationProgram)
jenkins-bot has submitted this change and it was merged. Change subject: Use MovePageIsValidMove hook if possible .. Use MovePageIsValidMove hook if possible Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 --- M EducationProgram.hooks.php M EducationProgram.php 2 files changed, 17 insertions(+), 6 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php index b422066..db23831 100644 --- a/EducationProgram.hooks.php +++ b/EducationProgram.hooks.php @@ -383,6 +383,17 @@ return true; } + public static function onMovePageIsValidMove( Title $oldTitle, Title $newTitle, \Status $status ) { + $nss = array( EP_NS, EP_NS_TALK ); + $allowed = !in_array( $oldTitle-getNamespace(), $nss ) !in_array( $newTitle-getNamespace(), $nss ); + + if ( !$allowed ) { + $status-fatal( 'ep-move-error' ); + } + + return $allowed; + } + /** * Allows canceling the move of one title to another. * @see https://www.mediawiki.org/wiki/Manual:Hooks/AbortMove @@ -398,14 +409,13 @@ * @return boolean */ public static function onAbortMove( Title $oldTitle, Title $newTitle, User $user, $error, $reason ) { - $nss = array( EP_NS, EP_NS_TALK ); - $allowed = !in_array( $oldTitle-getNamespace(), $nss ) !in_array( $newTitle-getNamespace(), $nss ); - - if ( !$allowed ) { - $error = wfMessage( 'ep-move-error' )-text(); + $status = new \Status(); + self::onMovePageIsValidMove( $oldTitle, $newTitle, $status ); + if ( !$status-isOK() ) { + $error = $status-getHTML(); } - return $allowed; + return $status-isOK(); } /** diff --git a/EducationProgram.php b/EducationProgram.php index 113198e..ab6cad3 100644 --- a/EducationProgram.php +++ b/EducationProgram.php @@ -268,6 +268,7 @@ $wgHooks['ArticleFromTitle'][] = 'EducationProgram\Hooks::onArticleFromTitle'; $wgHooks['CanonicalNamespaces'][] = 'EducationProgram\Hooks::onCanonicalNamespaces'; $wgHooks['TitleIsAlwaysKnown'][] = 'EducationProgram\Hooks::onTitleIsAlwaysKnown'; +$wgHooks['MovePageIsValidMove'][] = 'EducationProgram\Hooks::onMovePageIsValidMove'; $wgHooks['AbortMove'][] = 'EducationProgram\Hooks::onAbortMove'; $wgHooks['NewRevisionFromEditComplete'][] = 'EducationProgram\Hooks::onNewRevisionFromEditComplete'; $wgHooks['NamespaceIsMovable'][] = 'EducationProgram\Hooks::onNamespaceIsMovable'; -- To view, visit https://gerrit.wikimedia.org/r/169021 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/EducationProgram Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: AndyRussG andrew.green...@gmail.com Gerrit-Reviewer: Awight awi...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use MovePageIsValidMove hook if possible - change (mediawiki...WikimediaIncubator)
jenkins-bot has submitted this change and it was merged. Change subject: Use MovePageIsValidMove hook if possible .. Use MovePageIsValidMove hook if possible Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 --- M WikimediaIncubator.class.php M WikimediaIncubator.php 2 files changed, 15 insertions(+), 3 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/WikimediaIncubator.class.php b/WikimediaIncubator.class.php index c7cbef5..a658b6c 100644 --- a/WikimediaIncubator.class.php +++ b/WikimediaIncubator.class.php @@ -397,15 +397,26 @@ return $action != 'edit'; } + public static function onMovePageIsValidMove( Title $oldTitle, Title $newTitle, Status $status ) { + if ( self::shouldWeShowUnprefixedError( $newTitle ) ) { + # there should be an error with the new page title + $status-fatal( 'wminc-error-move-unprefixed' ); + return false; + } + + return true; + } + /** * Return an error if the user wants to move * an existing page to an unprefixed title * @return Boolean */ static function checkPrefixMovePermissions( $oldtitle, $newtitle, $user, $error ) { - if ( self::shouldWeShowUnprefixedError( $newtitle ) ) { - # there should be an error with the new page title - $error = wfMessage( 'wminc-error-move-unprefixed' )-parse(); + $status = new Status(); + self::onMovePageIsValidMove( $oldtitle, $newtitle, $status ); + if ( !$status-isOK() ) { + $error = $status-getHTML(); return false; } return true; diff --git a/WikimediaIncubator.php b/WikimediaIncubator.php index a273ad5..a637bc7 100644 --- a/WikimediaIncubator.php +++ b/WikimediaIncubator.php @@ -102,6 +102,7 @@ /* Create/move page permissions */ $wgHooks['getUserPermissionsErrors'][] = 'WikimediaIncubator::onGetUserPermissionsErrors'; +$wgHooks['MovePageIsValidMove'][] = 'WikimediaIncubator::onMovePageIsValidMove'; $wgHooks['AbortMove'][] = 'WikimediaIncubator::checkPrefixMovePermissions'; /* Recent Changes */ -- To view, visit https://gerrit.wikimedia.org/r/169037 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaIncubator Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use MovePageIsValidMove hook if possible - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Use MovePageIsValidMove hook if possible .. Use MovePageIsValidMove hook if possible Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 --- M Flow.php M Hooks.php 2 files changed, 14 insertions(+), 2 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/Flow.php b/Flow.php index 8334468..f126d64 100644 --- a/Flow.php +++ b/Flow.php @@ -86,6 +86,7 @@ $wgHooks['WatchArticle'][] = 'FlowHooks::onWatchArticle'; $wgHooks['UnwatchArticle'][] = 'FlowHooks::onWatchArticle'; $wgHooks['CanonicalNamespaces'][] = 'FlowHooks::onCanonicalNamespaces'; +$wgHooks['MovePageIsValidMove'][] = 'FlowHooks::onMovePageIsValidMove'; $wgHooks['AbortMove'][] = 'FlowHooks::onAbortMove'; $wgHooks['TitleSquidURLs'][] = 'FlowHooks::onTitleSquidURLs'; $wgHooks['WatchlistEditorBuildRemoveLine'][] = 'FlowHooks::onWatchlistEditorBuildRemoveLine'; diff --git a/Hooks.php b/Hooks.php index a7bceb9..e53c155 100644 --- a/Hooks.php +++ b/Hooks.php @@ -899,6 +899,15 @@ return true; } + public static function onMovePageIsValidMove( Title $oldTitle, Title $newTitle, Status $status ) { + if ( self::$occupationController-isTalkpageOccupied( $oldTitle ) ) { + $status-fatal( 'flow-error-move' ); + return false; + } + + return true; + } + /** * Moving a Flow page is not yet supported; make sure it can't be done. * @@ -910,8 +919,10 @@ * @return bool */ public static function onAbortMove( $oldTitle, $newTitle, $user, $error, $reason ) { - if ( self::$occupationController-isTalkpageOccupied( $oldTitle ) ) { - $error = wfMessage( 'flow-error-move' )-escaped(); + $status = new Status(); + self::onMovePageIsValidMove( $oldTitle, $newTitle, $status ); + if ( !$status-isOK() ) { + $error = $status-getHTML(); return false; } -- To view, visit https://gerrit.wikimedia.org/r/169029 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: SG shah...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fetch image title from CommonsMetadata - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Fetch image title from CommonsMetadata .. Fetch image title from CommonsMetadata Change-Id: Id7d256150aedb4351778f6ad60fd7d85399b58c5 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589 --- M resources/mmv/model/mmv.model.Image.js M resources/mmv/provider/mmv.provider.ImageInfo.js M tests/qunit/mmv/mmv.EmbedFileFormatter.test.js M tests/qunit/mmv/model/mmv.model.Image.test.js M tests/qunit/mmv/provider/mmv.provider.ImageInfo.test.js 5 files changed, 37 insertions(+), 21 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/model/mmv.model.Image.js b/resources/mmv/model/mmv.model.Image.js index e8d7696..8781aa5 100644 --- a/resources/mmv/model/mmv.model.Image.js +++ b/resources/mmv/model/mmv.model.Image.js @@ -23,6 +23,7 @@ * @class mw.mmv.model.Image * @constructor * @param {mw.Title} title +* @param {string} name Image name (e.g. title of the artwork) or human-readable file if there is no better title * @param {number} size Filesize in bytes of the original image * @param {number} width Width of the original image * @param {number} height Height of the original image @@ -43,6 +44,7 @@ */ function Image( title, + name, size, width, height, @@ -63,6 +65,9 @@ ) { /** @property {mw.Title} title The title of the image file */ this.title = title; + + /** @property {string} name Image name (e.g. title of the artwork) or human-readable file if there is no better title */ + this.name = name; /** @property {number} size The filesize, in bytes, of the original image */ this.size = size; @@ -133,23 +138,16 @@ * @returns {mw.mmv.model.Image} */ Image.newFromImageInfo = function ( title, imageInfo ) { - var uploadDateTime, creationDateTime, imageData, + var name, uploadDateTime, creationDateTime, imageData, description, source, author, license, permission, latitude, longitude, innerInfo = imageInfo.imageinfo[0], extmeta = innerInfo.extmetadata; if ( extmeta ) { - creationDateTime = extmeta.DateTimeOriginal; - uploadDateTime = extmeta.DateTime; - - if ( uploadDateTime ) { - uploadDateTime = uploadDateTime.value.replace( /.*?/g, '' ); - } - - if ( creationDateTime ) { - creationDateTime = creationDateTime.value.replace( /.*?/g, '' ); - } + creationDateTime = this.parseExtmeta( extmeta.DateTimeOriginal, 'plaintext' ); + uploadDateTime = this.parseExtmeta( extmeta.DateTime, 'plaintext' ); + name = this.parseExtmeta( extmeta.ObjectName, 'plaintext' ); description = this.parseExtmeta( extmeta.ImageDescription, 'string' ); source = this.parseExtmeta( extmeta.Credit, 'string' ); @@ -170,8 +168,13 @@ longitude = this.parseExtmeta( extmeta.GPSLongitude, 'float' ); } + if ( !name ) { + name = title.getNameText(); + } + imageData = new Image( title, + name, innerInfo.size, innerInfo.width, innerInfo.height, @@ -204,13 +207,15 @@ /** * Reads and parses a value from the imageinfo API extmetadata field. * @param {Array} data -* @param {string} type one of 'string', 'float', 'list' +* @param {string} type one of 'plaintext', 'string', 'float', 'list' * @return {string|number|Array} value or undefined if it is missing */ Image.parseExtmeta = function ( data, type ) { var value = data data.value; if ( value === null || value === undefined ) { return undefined; + } else if ( type === 'plaintext' ) { + return value.toString().replace( /.*?/g, '' ); } else if ( type === 'string' ) { return value.toString(); } else if ( type === 'float' ) { diff --git a/resources/mmv/provider/mmv.provider.ImageInfo.js b/resources/mmv/provider/mmv.provider.ImageInfo.js index e24f26a..294db0a 100644 ---
[MediaWiki-commits] [Gerrit] Add persistent anonymized WikiGrok user token - change (mediawiki...MobileFrontend)
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/169559 Change subject: Add persistent anonymized WikiGrok user token .. Add persistent anonymized WikiGrok user token Change-Id: If995661b53b1da30a4271782f12248ec9435f7c2 --- M includes/skins/SkinMinervaBeta.php M javascripts/loggingSchemas/mobileWebWikiGrok.js M javascripts/modules/wikigrok/WikiGrokDialog.js M javascripts/modules/wikigrok/wikigrok.js 4 files changed, 29 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/59/169559/1 diff --git a/includes/skins/SkinMinervaBeta.php b/includes/skins/SkinMinervaBeta.php index 1017af0..51072a1 100644 --- a/includes/skins/SkinMinervaBeta.php +++ b/includes/skins/SkinMinervaBeta.php @@ -43,15 +43,11 @@ * @return array */ public function getSkinConfigVariables() { - global $wgMFEnableWikiGrok; $vars = parent::getSkinConfigVariables(); // Kill this when we fix the functionality in PageApi.js $user = $this-getUser(); if ( $user-isLoggedIn() ) { $vars['wgMFUserGender'] = $this-getUser()-getOption( 'gender' ); - if ( $wgMFEnableWikiGrok ) { - $vars['wgMFUserNameHash'] = hash( 'sha256', $user-getName() ); - } } else { $vars['wgMFUserGender'] = 'unknown'; } diff --git a/javascripts/loggingSchemas/mobileWebWikiGrok.js b/javascripts/loggingSchemas/mobileWebWikiGrok.js index 43e213f..0d30f9f 100644 --- a/javascripts/loggingSchemas/mobileWebWikiGrok.js +++ b/javascripts/loggingSchemas/mobileWebWikiGrok.js @@ -9,7 +9,6 @@ // If the user is logged in, record username and edit count if ( !user.isAnon() ) { options.userEditCount = user.getEditCount(); - options.userToken = mw.config.get( 'wgMFUserNameHash' ); } return M.log( 'MobileWebWikiGrok', $.extend( options, data ) ); } diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js b/javascripts/modules/wikigrok/WikiGrokDialog.js index 49c5d48..af4c71c 100644 --- a/javascripts/modules/wikigrok/WikiGrokDialog.js +++ b/javascripts/modules/wikigrok/WikiGrokDialog.js @@ -62,6 +62,7 @@ action: action, taskType: 'version ' + this.version, taskToken: this.defaults.taskToken, + userToken: this.options.userToken, // the position of the top of the widget in viewports (as a unit) widgetOffset: ( this.$el.offset().top / $window.height() ).toFixed( 2 ), // top of the document - top of the viewport in viewports (as a unit) diff --git a/javascripts/modules/wikigrok/wikigrok.js b/javascripts/modules/wikigrok/wikigrok.js index f4dcd1e..a0e05d2 100644 --- a/javascripts/modules/wikigrok/wikigrok.js +++ b/javascripts/modules/wikigrok/wikigrok.js @@ -6,6 +6,33 @@ rlModuleName = useDialogB ? 'mobile.wikigrok.dialog.b' : 'mobile.wikigrok.dialog', idOverride; + /** +* Gets the user's token from 'cookie prefix' + -wikiGrokUserToken +* cookie. If the cookie isn't set, then a token is generated, +* stored in the cookie for 90 days, and then returned. +* +* @return {string} +*/ + function getUserToken () { + var cookieName = mw.config.get( 'wgCookiePrefix' ) + '-wikiGrokUserToken', + storedToken = $.cookie( cookieName ), + generatedToken; + + if ( storedToken ) { + return storedToken; + } + + generatedToken = mw.user.generateRandomSessionId(); + + $.cookie( cookieName, generatedToken, { + expires: 90, // (days) + path: '/' + } ); + + return generatedToken; + } + + // Allow query string override for testing, for example, '?wikidataid=Q508703' if ( !wikidataID ) { idOverride = window.location.search.match( /wikidataid=([^]*)/ ); @@ -49,6 +76,7 @@ function init() { var dialog = new WikiGrokDialog( { itemId: wikidataID, title: mw.config.get( 'wgTitle' ), + userToken: getUserToken(), testing: ( idOverride ) ? true : false } ); if ( $( '.toc-mobile' ).length ) { -- To
[MediaWiki-commits] [Gerrit] Use MovePageIsValidMove hook if possible - change (mediawiki...JsonConfig)
jenkins-bot has submitted this change and it was merged. Change subject: Use MovePageIsValidMove hook if possible .. Use MovePageIsValidMove hook if possible Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 --- M JsonConfig.php M includes/JCSingleton.php 2 files changed, 17 insertions(+), 4 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/JsonConfig.php b/JsonConfig.php index 9525934..b6f1974 100644 --- a/JsonConfig.php +++ b/JsonConfig.php @@ -128,6 +128,7 @@ 'CodeEditorGetPageLanguage', 'EditFilterMergedContent', 'BeforePageDisplay', + 'MovePageIsValidMove', 'AbortMove', 'ArticleDeleteComplete', 'ArticleUndelete', diff --git a/includes/JCSingleton.php b/includes/JCSingleton.php index de69b05..07d6042 100644 --- a/includes/JCSingleton.php +++ b/includes/JCSingleton.php @@ -517,19 +517,31 @@ return true; } - public static function onAbortMove( /** @noinspection PhpUnusedParameterInspection */ Title $title, Title $newTitle, $wgUser, $err, $reason ) { - $conf = self::getMetadata( $title-getTitleValue() ); + public static function onMovePageIsValidMove( Title $oldTitle, Title $newTitle, \Status $status ) { + $conf = self::getMetadata( $oldTitle-getTitleValue() ); if ( $conf ) { $newConf = self::getMetadata( $newTitle-getTitleValue() ); if ( !$newConf ) { // @todo: is parse() the right func to use here? - $err = wfMessage( 'jsonconfig-move-aborted-ns' )-parse(); + $status-fatal( 'jsonconfig-move-aborted-ns' ); return false; } elseif ( $conf-model !== $newConf-model ) { - $err = wfMessage( 'jsonconfig-move-aborted-model', $conf-model, $newConf-model )-parse(); + $status-fatal( 'jsonconfig-move-aborted-model', $conf-model, $newConf-model ); return false; } } + + return true; + } + + public static function onAbortMove( /** @noinspection PhpUnusedParameterInspection */ Title $title, Title $newTitle, $wgUser, $err, $reason ) { + $status = new \Status(); + self::onMovePageIsValidMove( $title, $newTitle, $status ); + if ( !$status-isOK() ) { + $err = $status-getHTML(); + return false; + } + return true; } -- To view, visit https://gerrit.wikimedia.org/r/169034 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/JsonConfig Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hhvm::packages: add graphviz and gv, for pprof --pdf/--svg c. - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: hhvm::packages: add graphviz and gv, for pprof --pdf/--svg c. .. hhvm::packages: add graphviz and gv, for pprof --pdf/--svg c. Change-Id: I1098eeb07d343b16843600d61fb08793881503b0 --- M modules/hhvm/manifests/packages.pp 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/modules/hhvm/manifests/packages.pp b/modules/hhvm/manifests/packages.pp index a6a1271..bbd5fd3 100644 --- a/modules/hhvm/manifests/packages.pp +++ b/modules/hhvm/manifests/packages.pp @@ -52,6 +52,8 @@ package { [ 'google-perftools', +'graphviz', +'gv', ]: ensure = present, } -- To view, visit https://gerrit.wikimedia.org/r/169545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1098eeb07d343b16843600d61fb08793881503b0 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hhvm: fix ganglia memory reporter - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/169560 Change subject: hhvm: fix ganglia memory reporter .. hhvm: fix ganglia memory reporter Change-Id: I6c55cf24f6cae2961eaf7581407d167e21eb69a7 --- A modules/admin/files/home/ori/.binned/mw M modules/hhvm/files/monitoring/hhvm_mem.py M modules/hhvm/files/monitoring/hhvm_mem.pyconf 3 files changed, 65 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/60/169560/1 diff --git a/modules/admin/files/home/ori/.binned/mw b/modules/admin/files/home/ori/.binned/mw new file mode 100755 index 000..b6aced6 --- /dev/null +++ b/modules/admin/files/home/ori/.binned/mw @@ -0,0 +1,14 @@ +#!/usr/bin/env php +?php + +list( $__script, $__wiki ) = array_slice( $argv, 1 ); +if ( strpos( $__script, '.php' ) === false ) { + list( $__wiki, $__script ) = array( $__script, $__wiki ); +} + +require_once '/srv/mediawiki/multiversion/MWVersion.php'; +require_once getMediaWiki( 'maintenance/commandLine.inc', $__wiki ?: 'enwiki' ); +require_once $__script ?: $IP . '/maintenance/eval.php'; + +unset( $__script ); +unset( $__wiki ); diff --git a/modules/hhvm/files/monitoring/hhvm_mem.py b/modules/hhvm/files/monitoring/hhvm_mem.py index 93f28e7..f63ccf4 100644 --- a/modules/hhvm/files/monitoring/hhvm_mem.py +++ b/modules/hhvm/files/monitoring/hhvm_mem.py @@ -45,7 +45,7 @@ url = params.get('url', 'http://localhost:9002/memory.json') stats = MemoryStats(url) return [{ -'name': key, +'name': str(key), 'value_type': 'uint', 'format': '%u', 'units': 'count' if 'count' in key.lower() else 'bytes', diff --git a/modules/hhvm/files/monitoring/hhvm_mem.pyconf b/modules/hhvm/files/monitoring/hhvm_mem.pyconf index 32f8cd9..2856f02 100644 --- a/modules/hhvm/files/monitoring/hhvm_mem.pyconf +++ b/modules/hhvm/files/monitoring/hhvm_mem.pyconf @@ -4,10 +4,6 @@ module { name = hhvm_mem language = python - -param url { -value = 'http://localhost:9002/memory.json' -} } } @@ -16,8 +12,56 @@ time_threshold = 60 metric { -name_match = HHVM.(.+) -title = \\1 +name= HHVM.Process_Stats_bytes.Shared +title = Memory - Process - Shared +value_threshold = 1.0 +} + +metric { +name= HHVM.Process_Stats_bytes.TextCode +title = Memory - Process - TextCode +value_threshold = 1.0 +} + +metric { +name= HHVM.Process_Stats_bytes.Data +title = Memory - Process - Data +value_threshold = 1.0 +} + +metric { +name= HHVM.Process_Stats_bytes.VmRss +title = Memory - Process - VmRss +value_threshold = 1.0 +} + +metric { +name= HHVM.Breakdown.Static_Strings.Bytes +title = Memory - Static Strings +value_threshold = 1.0 +} + +metric { +name= HHVM.Process_Stats_bytes.VmSize +title = Memory - VmSize +value_threshold = 1.0 +} + +metric { +name= HHVM.Breakdown.Unknown +title = Memory - Unknown +value_threshold = 1.0 +} + +metric { +name= HHVM.Breakdown.Code.Bytes +title = Memory - Code +value_threshold = 1.0 +} + +metric { +name= HHVM.Breakdown.Static_Strings.Count +title = Memory - Static Strings Count value_threshold = 1.0 } } -- To view, visit https://gerrit.wikimedia.org/r/169560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c55cf24f6cae2961eaf7581407d167e21eb69a7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] webserver - replace firewall rules with ferm - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/169561 Change subject: webserver - replace firewall rules with ferm .. webserver - replace firewall rules with ferm use the ferm classes for firewalling, like we do in other places, do not use the older firewall class anymore, so eventually we can delete misc/firewall.pp Change-Id: I72ad0e33f7f06d4c98bd28129d63d409bb2d0f2c --- M modules/webserver/manifests/static.pp 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/169561/1 diff --git a/modules/webserver/manifests/static.pp b/modules/webserver/manifests/static.pp index a66e2a9..c7cc139 100644 --- a/modules/webserver/manifests/static.pp +++ b/modules/webserver/manifests/static.pp @@ -2,7 +2,6 @@ # with default config, which serves /var/www class webserver::static { include webserver::sysctl_settings -include firewall #TODO: declare this class as incompatible with the other webserver classes. @@ -27,11 +26,13 @@ } # Firewall -firewall::open_port { http-${::hostname}: -port = 80, +ferm::service { http-${::hostname}: +proto = 'tcp', +port = 80, } -firewall::open_port { https-${::hostname}: -port = 443, +ferm::service { https-${::hostname}: +proto = 'tcp', +port = 443, } } -- To view, visit https://gerrit.wikimedia.org/r/169561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I72ad0e33f7f06d4c98bd28129d63d409bb2d0f2c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use MovePageIsValidMove hook if possible - change (mediawiki...LiquidThreads)
jenkins-bot has submitted this change and it was merged. Change subject: Use MovePageIsValidMove hook if possible .. Use MovePageIsValidMove hook if possible Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 --- M LiquidThreads.php M classes/Hooks.php 2 files changed, 7 insertions(+), 2 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/LiquidThreads.php b/LiquidThreads.php index 6aac2d9..e6ca056 100644 --- a/LiquidThreads.php +++ b/LiquidThreads.php @@ -146,6 +146,7 @@ // Moving $wgHooks['SpecialMovepageAfterMove'][] = 'LqtHooks::onArticleMoveComplete'; $wgHooks['AbortMove'][] = 'LqtHooks::onArticleMove'; +$wgHooks['MovePageIsValidMove'][] = 'LqtHooks::onMovePageIsValidMove'; // Search $wgHooks['ShowSearchHitTitle'][] = 'LqtHooks::customiseSearchResultTitle'; diff --git a/classes/Hooks.php b/classes/Hooks.php index 2e64d9b..41adf08 100644 --- a/classes/Hooks.php +++ b/classes/Hooks.php @@ -430,14 +430,18 @@ return true; } - static function onArticleMove( $ot, $nt, $user, $err, $reason ) { + static function onMovePageIsValidMove( Title $oldTitle ) { // Synchronise article data so that moving the article doesn't break any // article association. - Threads::synchroniseArticleData( new Article( $ot, 0 ) ); + Threads::synchroniseArticleData( new Article( $oldTitle, 0 ) ); return true; } + static function onArticleMove( $ot, $nt, $user, $err, $reason ) { + return self::onMovePageIsValidMove( $ot ); + } + /** * @param $user User * @param $title Title -- To view, visit https://gerrit.wikimedia.org/r/169035 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LiquidThreads Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hhvm: fix ganglia memory reporter - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: hhvm: fix ganglia memory reporter .. hhvm: fix ganglia memory reporter Change-Id: I6c55cf24f6cae2961eaf7581407d167e21eb69a7 --- A modules/admin/files/home/ori/.binned/mw M modules/hhvm/files/monitoring/hhvm_mem.py M modules/hhvm/files/monitoring/hhvm_mem.pyconf 3 files changed, 65 insertions(+), 7 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/modules/admin/files/home/ori/.binned/mw b/modules/admin/files/home/ori/.binned/mw new file mode 100755 index 000..b6aced6 --- /dev/null +++ b/modules/admin/files/home/ori/.binned/mw @@ -0,0 +1,14 @@ +#!/usr/bin/env php +?php + +list( $__script, $__wiki ) = array_slice( $argv, 1 ); +if ( strpos( $__script, '.php' ) === false ) { + list( $__wiki, $__script ) = array( $__script, $__wiki ); +} + +require_once '/srv/mediawiki/multiversion/MWVersion.php'; +require_once getMediaWiki( 'maintenance/commandLine.inc', $__wiki ?: 'enwiki' ); +require_once $__script ?: $IP . '/maintenance/eval.php'; + +unset( $__script ); +unset( $__wiki ); diff --git a/modules/hhvm/files/monitoring/hhvm_mem.py b/modules/hhvm/files/monitoring/hhvm_mem.py index 93f28e7..f63ccf4 100644 --- a/modules/hhvm/files/monitoring/hhvm_mem.py +++ b/modules/hhvm/files/monitoring/hhvm_mem.py @@ -45,7 +45,7 @@ url = params.get('url', 'http://localhost:9002/memory.json') stats = MemoryStats(url) return [{ -'name': key, +'name': str(key), 'value_type': 'uint', 'format': '%u', 'units': 'count' if 'count' in key.lower() else 'bytes', diff --git a/modules/hhvm/files/monitoring/hhvm_mem.pyconf b/modules/hhvm/files/monitoring/hhvm_mem.pyconf index 32f8cd9..2856f02 100644 --- a/modules/hhvm/files/monitoring/hhvm_mem.pyconf +++ b/modules/hhvm/files/monitoring/hhvm_mem.pyconf @@ -4,10 +4,6 @@ module { name = hhvm_mem language = python - -param url { -value = 'http://localhost:9002/memory.json' -} } } @@ -16,8 +12,56 @@ time_threshold = 60 metric { -name_match = HHVM.(.+) -title = \\1 +name= HHVM.Process_Stats_bytes.Shared +title = Memory - Process - Shared +value_threshold = 1.0 +} + +metric { +name= HHVM.Process_Stats_bytes.TextCode +title = Memory - Process - TextCode +value_threshold = 1.0 +} + +metric { +name= HHVM.Process_Stats_bytes.Data +title = Memory - Process - Data +value_threshold = 1.0 +} + +metric { +name= HHVM.Process_Stats_bytes.VmRss +title = Memory - Process - VmRss +value_threshold = 1.0 +} + +metric { +name= HHVM.Breakdown.Static_Strings.Bytes +title = Memory - Static Strings +value_threshold = 1.0 +} + +metric { +name= HHVM.Process_Stats_bytes.VmSize +title = Memory - VmSize +value_threshold = 1.0 +} + +metric { +name= HHVM.Breakdown.Unknown +title = Memory - Unknown +value_threshold = 1.0 +} + +metric { +name= HHVM.Breakdown.Code.Bytes +title = Memory - Code +value_threshold = 1.0 +} + +metric { +name= HHVM.Breakdown.Static_Strings.Count +title = Memory - Static Strings Count value_threshold = 1.0 } } -- To view, visit https://gerrit.wikimedia.org/r/169560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c55cf24f6cae2961eaf7581407d167e21eb69a7 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore book title - change (mediawiki...CommonsMetadata)
jenkins-bot has submitted this change and it was merged. Change subject: Ignore book title .. Ignore book title Titles parsed from {{Book}} templates are usually irrelevant and should be ignored (we don't want to show the title of some book containing the image instead of the name of the image). Book templates will have to be ignored completely anyway (#937) so this commit is really just about cleaning up the template parser configuration. Also add test for extracting the title. Change-Id: I27879afbaefe40a879a34eccdf7515a6f9bbe3e2 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589 --- M TemplateParser.php M tests/phpunit/ParserTestHelper.php M tests/phpunit/TemplateParserTest.php 3 files changed, 16 insertions(+), 1 deletion(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/TemplateParser.php b/TemplateParser.php index e667752..0e37366 100644 --- a/TemplateParser.php +++ b/TemplateParser.php @@ -51,7 +51,6 @@ # of source than Source does. 'fileinfotpl_src' = 'Credit', 'fileinfotpl_art_title' = 'ObjectName', - 'fileinfotpl_book_title' = 'ObjectName', 'fileinfotpl_perm' = 'Permission', 'fileinfotpl_credit' = 'Attribution', ); diff --git a/tests/phpunit/ParserTestHelper.php b/tests/phpunit/ParserTestHelper.php index e765b59..ec7e51d 100644 --- a/tests/phpunit/ParserTestHelper.php +++ b/tests/phpunit/ParserTestHelper.php @@ -34,6 +34,10 @@ 'manylang' = 'File_Sikh_pilgrim_at_the_Golden_Temple_(Harmandir_Sahib)_in_Amritsar,_India.jpg', // an image with a relatively long description 'big' = 'File_Askaris_im_Warschauer_Getto_-_1943.jpg', + // information-like template with a title field + 'title' = 'File_Askaris_im_Warschauer_Getto_-_1943.jpg', + // Book + Photograph templates + 'book' = 'File_Askaris_im_Warschauer_Getto_-_1943.jpg', ); /** diff --git a/tests/phpunit/TemplateParserTest.php b/tests/phpunit/TemplateParserTest.php index e6c11fc..b14e0ae 100644 --- a/tests/phpunit/TemplateParserTest.php +++ b/tests/phpunit/TemplateParserTest.php @@ -2,6 +2,8 @@ use CommonsMetadata\TemplateParser; +require_once __DIR__ . /ParserTestHelper.php; + /** * @covers CommonsMetadata\TemplateParser * @group Extensions/CommonsMetadata @@ -178,6 +180,16 @@ $data, TemplateParser::INFORMATION_FIELDS_KEY ); } + /** +* Some templates (such as {{Photograph}}) have a title field +*/ + public function testTitle() { + $data = $this-parseTestHTML( 'title' ); + $this-assertFieldEquals( 'ObjectName', 'span class=fnspan style=font-size:0.9emGerman: ' + . 'iAskaris, die mit eingesetzt waren/i/spanspan style=font-weight:boldbr' + . 'iAskaris used during the operation/i/span/span', $data, TemplateParser::INFORMATION_FIELDS_KEY ); + } + // license tests -- To view, visit https://gerrit.wikimedia.org/r/169334 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I27879afbaefe40a879a34eccdf7515a6f9bbe3e2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CommonsMetadata Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Cite] Re-point i18n directory per I6ae358b6 - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: [Cite] Re-point i18n directory per I6ae358b6 .. [Cite] Re-point i18n directory per I6ae358b6 Change-Id: I18724628b779c07c366570cce643962cbec7c0ba --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index a947b14..aea5058 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -516,7 +516,7 @@ Cirrus Search Cite -file = Cite/i18n/core/%CODE%.json +file = Cite/i18n/%CODE%.json optional = cite_reference_link_key_with_num, cite_reference_link_prefix, cite_reference_link_suffix, cite_references_link_prefix optional = cite_references_link_suffix, cite_reference_link, cite_references_link_one, cite_references_link_many optional = cite_references_link_many_format, cite_references_link_many_format_backlink_labels, cite_references_link_many_sep, cite_references_link_many_and -- To view, visit https://gerrit.wikimedia.org/r/158116 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18724628b779c07c366570cce643962cbec7c0ba Gerrit-PatchSet: 3 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use MovePageCheckPermissions hook if possible - change (mediawiki...TitleBlacklist)
jenkins-bot has submitted this change and it was merged. Change subject: Use MovePageCheckPermissions hook if possible .. Use MovePageCheckPermissions hook if possible Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 --- M TitleBlacklist.hooks.php M TitleBlacklist.php 2 files changed, 42 insertions(+), 13 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/TitleBlacklist.hooks.php b/TitleBlacklist.hooks.php index 78379a3..6050641 100644 --- a/TitleBlacklist.hooks.php +++ b/TitleBlacklist.hooks.php @@ -68,7 +68,36 @@ } /** -* AbortMove hook +* MovePageCheckPermissions hook (1.25+) +* +* @param Title $oldTitle +* @param Title $newTitle +* @param User $user +* @param $reason +* @param Status $status +* @return bool +*/ + public static function onMovePageCheckPermissions( Title $oldTitle, Title $newTitle, User $user, $reason, Status $status ) { + $titleBlacklist = TitleBlacklist::singleton(); + $blacklisted = $titleBlacklist-userCannot( $newTitle, $user, 'move' ); + if ( !$blacklisted ) { + $blacklisted = $titleBlacklist-userCannot( $oldTitle, $user, 'edit' ); + } + if ( $blacklisted instanceof TitleBlacklistEntry ) { + $status-fatal( $blacklisted-getErrorMessage( 'move' ), + $blacklisted-getRaw(), + $oldTitle-getFullText(), + $newTitle-getFullText() ); + return false; + } + + return true; + } + + /** +* AbortMove hook (1.24) +* +* @todo: Remove once 1.24 support is dropped * * @param $old Title * @param $nt Title @@ -76,20 +105,19 @@ * @param $err * @return bool */ - public static function abortMove( $old, $nt, $user, $err ) { - $titleBlacklist = TitleBlacklist::singleton(); - $blacklisted = $titleBlacklist-userCannot( $nt, $user, 'move' ); - if ( !$blacklisted ) { - $blacklisted = $titleBlacklist-userCannot( $old, $user, 'edit' ); + public static function abortMove( $old, $nt, $user, $err, $reason ) { + if ( method_exists( 'MovePage', 'checkPermissions' ) ) { + // Don't use this hook, use MovePageCheckPermissions instead + return true; } - if ( $blacklisted instanceof TitleBlacklistEntry ) { - $err = wfMessage( $blacklisted-getErrorMessage( 'move' ), - $blacklisted-getRaw(), - $old-getFullText(), - $nt-getFullText() )-parse(); - return false; + + $status = new Status(); + self::onMovePageCheckPermissions( $old, $nt, $user, $reason, $status ); + if ( !$status-isOK() ) { + $err = $status-getHTML(); } - return true; + + return $status-isOK(); } /** diff --git a/TitleBlacklist.php b/TitleBlacklist.php index 7b5c67d..f07bb0b 100644 --- a/TitleBlacklist.php +++ b/TitleBlacklist.php @@ -78,6 +78,7 @@ $wgHooks['getUserPermissionsErrorsExpensive'][] = 'TitleBlacklistHooks::userCan'; $wgHooks['TitleGetEditNotices'][] = 'TitleBlacklistHooks::displayBlacklistOverrideNotice'; $wgHooks['AbortMove'][] = 'TitleBlacklistHooks::abortMove'; +$wgHooks['MovePageCheckPermissions'][] = 'TitleBlacklistHooks::onMovePageCheckPermissions'; $wgHooks['AbortNewAccount'][] = 'TitleBlacklistHooks::abortNewAccount'; $wgHooks['AbortAutoAccount'][] = 'TitleBlacklistHooks::abortNewAccount'; $wgHooks['EditFilter'][] = 'TitleBlacklistHooks::validateBlacklist'; -- To view, visit https://gerrit.wikimedia.org/r/169017 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/TitleBlacklist Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] moved setup function into class - change (mediawiki...SemanticDependency)
Cicalese has uploaded a new change for review. https://gerrit.wikimedia.org/r/169562 Change subject: moved setup function into class .. moved setup function into class Change-Id: I58aa81a90e30b759f8bd4f8f27ac034184ffeb8d --- M SemanticDependency.class.php M SemanticDependency.php 2 files changed, 21 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticDependency refs/changes/62/169562/1 diff --git a/SemanticDependency.class.php b/SemanticDependency.class.php index 4ee1826..52c3ce2 100644 --- a/SemanticDependency.class.php +++ b/SemanticDependency.class.php @@ -27,6 +27,25 @@ /** * @since 1.0 * +* @param Parser $parser +*/ + public static function setup( $parser ) { + + if ( !isset( $GLOBALS['SemanticDependency_Properties'] ) ) { + $GLOBALS['SemanticDependency_Properties'] = array(); + } + + if ( !isset( $GLOBALS['SemanticDependency_JobThreshold'] ) ) { + $GLOBALS['SemanticDependency_JobThreshold'] = 1; + } + + return true; + + } + + /** +* @since 1.0 +* * @param Store $store * @param SemanticData $semanticData */ diff --git a/SemanticDependency.php b/SemanticDependency.php index 25ef4dc..00365bd 100644 --- a/SemanticDependency.php +++ b/SemanticDependency.php @@ -40,20 +40,10 @@ $GLOBALS['wgAutoloadClasses']['SemanticDependency'] = __DIR__ . '/SemanticDependency.class.php'; -$GLOBALS['wgHooks']['ParserFirstCallInit'][] = - 'efSemanticDependencyParserFunction_Setup'; +$GLOBALS['wgHooks']['ParserFirstCallInit'][] = 'SemanticDependency::setup'; $GLOBALS['wgHooks']['SMWStore::updateDataAfter'][] = 'SemanticDependency::updateDataAfter'; + $GLOBALS['wgMessagesDirs']['SemanticDependency'] = __DIR__ . '/i18n'; $GLOBALS['wgExtensionMessagesFiles']['SemanticDependency'] = __DIR__ . '/SemanticDependency.i18n.php'; - -function efSemanticDependencyParserFunction_Setup ( $parser ) { - if ( !isset( $GLOBALS['SemanticDependency_Properties'] ) ) { - $GLOBALS['SemanticDependency_Properties'] = array(); - } - if ( !isset( $GLOBALS['SemanticDependency_JobThreshold'] ) ) { - $GLOBALS['SemanticDependency_JobThreshold'] = 1; - } - return true; -} -- To view, visit https://gerrit.wikimedia.org/r/169562 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58aa81a90e30b759f8bd4f8f27ac034184ffeb8d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticDependency Gerrit-Branch: master Gerrit-Owner: Cicalese cical...@mitre.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] moved setup function into class - change (mediawiki...SemanticDependency)
Cicalese has submitted this change and it was merged. Change subject: moved setup function into class .. moved setup function into class Change-Id: I58aa81a90e30b759f8bd4f8f27ac034184ffeb8d --- M SemanticDependency.class.php M SemanticDependency.php 2 files changed, 21 insertions(+), 12 deletions(-) Approvals: Cicalese: Verified; Looks good to me, approved diff --git a/SemanticDependency.class.php b/SemanticDependency.class.php index 4ee1826..52c3ce2 100644 --- a/SemanticDependency.class.php +++ b/SemanticDependency.class.php @@ -27,6 +27,25 @@ /** * @since 1.0 * +* @param Parser $parser +*/ + public static function setup( $parser ) { + + if ( !isset( $GLOBALS['SemanticDependency_Properties'] ) ) { + $GLOBALS['SemanticDependency_Properties'] = array(); + } + + if ( !isset( $GLOBALS['SemanticDependency_JobThreshold'] ) ) { + $GLOBALS['SemanticDependency_JobThreshold'] = 1; + } + + return true; + + } + + /** +* @since 1.0 +* * @param Store $store * @param SemanticData $semanticData */ diff --git a/SemanticDependency.php b/SemanticDependency.php index 25ef4dc..00365bd 100644 --- a/SemanticDependency.php +++ b/SemanticDependency.php @@ -40,20 +40,10 @@ $GLOBALS['wgAutoloadClasses']['SemanticDependency'] = __DIR__ . '/SemanticDependency.class.php'; -$GLOBALS['wgHooks']['ParserFirstCallInit'][] = - 'efSemanticDependencyParserFunction_Setup'; +$GLOBALS['wgHooks']['ParserFirstCallInit'][] = 'SemanticDependency::setup'; $GLOBALS['wgHooks']['SMWStore::updateDataAfter'][] = 'SemanticDependency::updateDataAfter'; + $GLOBALS['wgMessagesDirs']['SemanticDependency'] = __DIR__ . '/i18n'; $GLOBALS['wgExtensionMessagesFiles']['SemanticDependency'] = __DIR__ . '/SemanticDependency.i18n.php'; - -function efSemanticDependencyParserFunction_Setup ( $parser ) { - if ( !isset( $GLOBALS['SemanticDependency_Properties'] ) ) { - $GLOBALS['SemanticDependency_Properties'] = array(); - } - if ( !isset( $GLOBALS['SemanticDependency_JobThreshold'] ) ) { - $GLOBALS['SemanticDependency_JobThreshold'] = 1; - } - return true; -} -- To view, visit https://gerrit.wikimedia.org/r/169562 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58aa81a90e30b759f8bd4f8f27ac034184ffeb8d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticDependency Gerrit-Branch: master Gerrit-Owner: Cicalese cical...@mitre.org Gerrit-Reviewer: Cicalese cical...@mitre.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] firewall: nitpicks - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: firewall: nitpicks .. firewall: nitpicks Change-Id: I2e572e7aa5f60987f5e5329baf1c827aca45d3fd --- M manifests/misc/firewall.pp 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/misc/firewall.pp b/manifests/misc/firewall.pp index af9213e..107d8bc 100644 --- a/manifests/misc/firewall.pp +++ b/manifests/misc/firewall.pp @@ -22,7 +22,7 @@ } -class firewall { +class firewall { # for each inbound ACL create an exported file on the main server # This is the definition called from all service manifests, e.g. @@ -30,9 +30,9 @@ define open_port( $port, -$hostname = $::hostname, -$ip_address= $::ipaddress, -$protocol = 'tcp', +$hostname = $::hostname, +$ip_address = $::ipaddress, +$protocol = 'tcp', ) { @@exported_acl_rule { $title: hostname = $hostname, -- To view, visit https://gerrit.wikimedia.org/r/169340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e572e7aa5f60987f5e5329baf1c827aca45d3fd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya mata...@foss.co.il Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ZeroPortal setRawResult lua mode - change (mediawiki...ZeroPortal)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/169563 Change subject: ZeroPortal setRawResult lua mode .. ZeroPortal setRawResult lua mode This replaces the very hacky (and partially escaping broken) mode where lua module decides to output data in the raw format. Now, lua can set raw output data directly with mw.zeroportal.setRawResult(text) This function is only enabled when used from Special:ZeroPortal. Eventually, we might want to port this to the scribunto ext. A second patch will remove current raw=1 code once code is fixed. Change-Id: Ibb97523f6b3164268eaa80d94ddb001e7f6a6088 --- M ZeroPortal.php A includes/LuaLibrary.lua A includes/LuaLibrary.php M includes/PortalSpecialPage.php 4 files changed, 136 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroPortal refs/changes/63/169563/1 diff --git a/ZeroPortal.php b/ZeroPortal.php index 611d611..5f7056b 100644 --- a/ZeroPortal.php +++ b/ZeroPortal.php @@ -40,6 +40,7 @@ foreach ( array( 'ApiZeroPortal', 'ConfigPageHooks', + 'LuaLibrary', 'PortalSpecialPage', 'ZeroConfigView', ) as $key = $class ) { @@ -64,6 +65,7 @@ $wgAPIModules['zeroportal'] = 'ZeroPortal\ApiZeroPortal'; $wgHooks['BeforePageDisplay'][] = 'ZeroPortal\ConfigPageHooks::onBeforePageDisplay'; +$wgHooks['ScribuntoExternalLibraries'][] = 'ZeroPortal\LuaLibrary::onScribuntoExternalLibraries'; // Set our own view class for the JsonZeroConfig model, and configure local storage $wgJsonConfigModels['JsonZeroConfig']['view'] = 'ZeroPortal\ZeroConfigView'; diff --git a/includes/LuaLibrary.lua b/includes/LuaLibrary.lua new file mode 100644 index 000..2917e19 --- /dev/null +++ b/includes/LuaLibrary.lua @@ -0,0 +1,21 @@ +local p = {} +local php + +function p.setupInterface( options ) +-- Boilerplate +p.setupInterface = nil +php = mw_interface +mw_interface = nil + +-- Register this library in the mw global +mw = mw or {} +mw.zeroportal = p + +package.loaded['mw.zeroportal'] = p +end + +function p.setRawResult( result ) +return php.setRawResult( result ) +end + +return p diff --git a/includes/LuaLibrary.php b/includes/LuaLibrary.php new file mode 100644 index 000..d4a8e87 --- /dev/null +++ b/includes/LuaLibrary.php @@ -0,0 +1,103 @@ +?php + +namespace ZeroPortal; + +use Scribunto_LuaError; +use Scribunto_LuaLibraryBase; +use IContextSource; + +class LuaLibrary extends Scribunto_LuaLibraryBase { + + const luaNamespace = 'mw.zeroportal.'; + + /** @var IContextSource */ + private static $context = null; + + /** @var mixed */ + private static $result = null; + + /** +* Add Lua library if the current title is our special module +* @param string $engine +* @param string[] $extraLibraries +* @return bool +*/ + public static function onScribuntoExternalLibraries( $engine, array $extraLibraries ) { + if ( $engine == 'lua' ) { + $extraLibraries['mw.zeroportal'] = 'ZeroPortal\LuaLibrary'; + } + return true; + } + + /** +* @param IContextSource $context +*/ + public static function setContext( $context ) { + self::$context = $context; + } + + /** +* @return IContextSource +* @throws Scribunto_LuaError +*/ + public static function getContext() { + if ( !self::$context ) { + // Something is seriously wrong - it shouldn't even be possible to call this function + throw new Scribunto_LuaError( 'This function is only available in Special:ZeroPortal' ); + } + return self::$context; + } + + /** +* Finishes up the invocation, clean up context, and overrides output if needed +*/ + public static function endInvoke() { + $ctx = self::getContext(); + $out = $ctx-getOutput(); + $req = $ctx-getRequest(); + $resp = $req-response(); + self::setContext( null ); // Ensure that subsequent lua invocations don't permit + + if ( !$req-wasPosted() ) { + $expiryUnixTime = time() + 300; // default 300 seconds caching + $resp-header( 'Expires: ' . wfTimestamp( TS_RFC2822, $expiryUnixTime ) ); + + $cacheMode = $ctx-getUser()-isAnon() ? 'public' : 'private'; + $resp-header( 'Cache-Control: ' . $cacheMode . ', must-revalidate, max-age=0' ); + } + + if ( self::$result ) { + $out-disable(); + $resp-header( 'Content-Type: text/plain;
[MediaWiki-commits] [Gerrit] Fix namespaced CiviMailing exceptions - change (wikimedia...crm)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/169564 Change subject: Fix namespaced CiviMailing exceptions .. Fix namespaced CiviMailing exceptions Change-Id: I9ebc921c951b1ab14cc506ff7b9a77d7c1f1d1e7 --- M sites/all/modules/thank_you/thank_you.module 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/64/169564/1 diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 60380a0..55719a2 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -1,6 +1,9 @@ ?php use wmf_communication\CiviMailStore; +use wmf_communication\CiviMailingInsertException; +use wmf_communication\CiviMailingMissingException; +use wmf_communication\CiviQueueInsertException; use wmf_communication\Mailer; use wmf_communication\Templating; use wmf_communication\Translation; -- To view, visit https://gerrit.wikimedia.org/r/169564 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ebc921c951b1ab14cc506ff7b9a77d7c1f1d1e7 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg eeggles...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Backend for picking questions - change (mediawiki...WikiGrok)
MaxSem has submitted this change and it was merged. Change subject: Backend for picking questions .. Backend for picking questions Change-Id: Ia8a1fdb3cd6f3dbccc8409d57f6be57d6db2813d --- M WikiGrok.php A includes/Campaign.php A includes/ConfirmationCampaign.php A includes/Hooks.php A includes/LinkedPropsCampaign.php A includes/QuestionPicker.php A includes/WikibaseConnector.php 7 files changed, 715 insertions(+), 3 deletions(-) Approvals: MaxSem: Verified; Looks good to me, approved Kaldari: Looks good to me, approved diff --git a/WikiGrok.php b/WikiGrok.php index 6fce74c..c71e032 100644 --- a/WikiGrok.php +++ b/WikiGrok.php @@ -14,16 +14,69 @@ ); $autoloadClasses = array( - 'WikiGrok\Api\ApiResponse' = 'api/ApiResponse', - 'WikiGrok\EventLogger' = 'EventLogger', + 'Api\ApiResponse' = 'api/ApiResponse', + 'Campaign' = 'Campaign', + 'ConfirmationCampaign' = 'ConfirmationCampaign', + 'EventLogger' = 'EventLogger', + 'Hooks' = 'Hooks', + 'LinkedPropsCampaign' = 'LinkedPropsCampaign', + 'QuestionPicker' = 'QuestionPicker', + 'WikibaseConnector' = 'WikibaseConnector', ); foreach ( $autoloadClasses as $className = $classFilename ) { - $wgAutoloadClasses[$className] = __DIR__ . /includes/$classFilename.php; + $wgAutoloadClasses[WikiGrok\\$className] = __DIR__ . /includes/$classFilename.php; } $wgAPIModules['wikigrokresponse'] = 'WikiGrok\Api\ApiResponse'; +$wgHooks['ParserBeforeTidy'][] = 'WikiGrok\Hooks::onParserBeforeTidy'; +$wgHooks['OutputPageParserOutput'][] = 'WikiGrok\Hooks::onOutputPageParserOutput'; $wgHooks['UnitTestsList'][] = function ( $files ) { $files[] = __DIR__ . '/tests/phpunit/api/ApiResponseTest.php'; }; + +$wgConfigRegistry['wikigrok'] = 'GlobalVarConfig::newInstance'; + + +/** + * Configuration settings + */ + +/** + * Slow question campaigns, updated on page save only + * TESTING ONLY, DON'T ENABLE IN PRODUCTION + */ +$wgWikiGrokSlowCampaigns = array( +// Example: +// 'occupation' = array( +// 'type' = 'LinkedProps', +// 'property' = 'P4'/* occupation */, +// 'if' = array( 'P7'/* instance of */ = 'Q10'/* human */ ), +// //'ifNot' = array( 'P1', 'P2' ), +// 'searchLinks' = array( +// 'P7'/* instance of */ = 'Q3'/* profession */, +// /* OR */ +// 'P5'/* subclass of */ = 'Q5'/* occupation */, +// ), +// 'numLinks' = 10, +// ), +); + +/** + * Fast question campaigns, updated on page views + */ +$wgWikiGrokFastCampaigns = array( +// //Example: +// 'occupation_confirm' = array( +// 'type' = 'Confirmation', +// 'property' = 'P4'/* occupation */, +// //'if' = array( ... ), +// //'ifNot' = array( ... ), +// ), +); + +/** + * Fast campaign cache expiry in seconds + */ +$wgWikiGrokFastCampaignsCacheTime = 60 * 60 * 24; // 1 day \ No newline at end of file diff --git a/includes/Campaign.php b/includes/Campaign.php new file mode 100644 index 000..4e7cbe1 --- /dev/null +++ b/includes/Campaign.php @@ -0,0 +1,151 @@ +?php + +namespace WikiGrok; + +use Wikibase\DataModel\Entity\EntityIdValue; + +/** + * Base class for picking questions + */ +abstract class Campaign { + /** @var array */ + protected $options; + /** @var QuestionPicker */ + protected $picker; + + private static $classes = array( + 'LinkedProps' = 'LinkedPropsCampaign', + 'Confirmation' = 'ConfirmationCampaign', + ); + + /** +* Instantiates compaign of a given type +* +* @param array $options +* @param QuestionPicker $picker +* @return Campaign +*/ + public static function create( array $options, QuestionPicker $picker ) { + $type = $options['type']; + if ( !isset( self::$classes[$type] ) ) { + throw new \MWException( Unknown campaign type '$type' ); + } + $class = 'WikiGrok\\' . self::$classes[$type]; + return new $class( $options, $picker ); + } + + /** +* @param array $options +* @param QuestionPicker $picker +*/ + public function __construct( array $options, QuestionPicker $picker ) { + $this-options = $options; + $this-picker = $picker; + } + + /** +* @return string ID of the property this campaign asks about +*/ + public function getProperty() { + return $this-options['property']; + } + + /** +* @return int Number of page links needed to analyze a page for this campaign +*/ + public function getNumLinks() { + return isset( $this-options['numLinks'] ) ? $this-options['numLinks'] : 0; + }
[MediaWiki-commits] [Gerrit] Move linebreaking back into Mailer::normalizeContent - change (wikimedia...crm)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/169565 Change subject: Move linebreaking back into Mailer::normalizeContent .. Move linebreaking back into Mailer::normalizeContent Breaking the lines in thank_you_render was adding newlines inside the template info comment, making it impossible to add CiviMail records for thank you templates. Change-Id: Id842dcfde654c1dbd64d3de5b8b5fcd19cbe4ea6 --- M sites/all/modules/thank_you/thank_you.module M sites/all/modules/wmf_communication/Mailer.php 2 files changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/65/169565/1 diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 55719a2..30a7fcf 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -724,7 +724,6 @@ $page_content = $template-render( 'html' ); $page_content = str_replace( 'p/p', '', $page_content ); -$page_content = wordwrap( $page_content, 100 ); return $page_content; } diff --git a/sites/all/modules/wmf_communication/Mailer.php b/sites/all/modules/wmf_communication/Mailer.php index 94b2739..647bfdd 100644 --- a/sites/all/modules/wmf_communication/Mailer.php +++ b/sites/all/modules/wmf_communication/Mailer.php @@ -122,7 +122,7 @@ protected function normalizeContent( $email ) { $converter = new Html2Text( $email['html'], false, array( 'do_links' = 'table' ) ); -$email['plaintext'] = $converter-get_text(); +$email['plaintext'] = wordwrap( $converter-get_text(), 100 ); if ( $email['plaintext'] === false ) { watchdog( 'thank_you', Text rendering of template failed in {$email['locale']}., array(), WATCHDOG_ERROR ); -- To view, visit https://gerrit.wikimedia.org/r/169565 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id842dcfde654c1dbd64d3de5b8b5fcd19cbe4ea6 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg eeggles...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] initial commit - change (mediawiki...DebugMode)
tosfos has submitted this change and it was merged. Change subject: initial commit .. initial commit Change-Id: I476316318acc5c2d711375daf681f65991764955 --- A .gitignore A .jshintrc A DebugMode.class.php A DebugMode.php A DebugMode.utils.php A README A VarSetters/GlobalVarSetter.php A VarSetters/PhpFunctionVarSetter.php A VarSetters/PhpIniVarSetter.php A VarSetters/VarSetter.php A i18n/en.json A i18n/qqq.json 12 files changed, 521 insertions(+), 0 deletions(-) Approvals: tosfos: Verified; Looks good to me, approved diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..ccd8aa7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +## NetBeans +nbproject* +project.index diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..4cd914b --- /dev/null +++ b/.jshintrc @@ -0,0 +1,8 @@ +{ + predef: [ + mediaWiki, + jQuery + ], + browser: true, + smarttabs: true +} diff --git a/DebugMode.class.php b/DebugMode.class.php new file mode 100644 index 000..5f1c47a --- /dev/null +++ b/DebugMode.class.php @@ -0,0 +1,199 @@ +?php +/* + * Copyright (C) 2014 Ike Hecht + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * Puts wiki into debug mode + * + * @author Ike Hecht + */ +class DebugMode { + /* Debug levels */ + const DEBUG_MODE_NONE = 0; + const DEBUG_MODE_INI = 1; + const DEBUG_MODE_PHP = 2; + const DEBUG_MODE_VERBOSE = 4; //Settings which change page output even without any errors + const DEBUG_MODE_CACHE = 8; + const DEBUG_MODE_RESOURCE_LOADER = 16; + const DEBUG_MODE_INSECURE = 32;/** @todo label appropriately and display warning if set */ + const DEBUG_MODE_ALL = 63; + /** +* Which debug modes are set +* +* @var int +*/ + private $mode; + + /** +* Array of variable settings to be ignored +* These can be variable settings of any type - ini, php, global +* +* @var array +*/ + private $ignoreVars; + + public function getMode() { + return $this-mode; + } + + public function getIgnoreVars() { + return $this-ignoreVars; + } + + public function setMode( $mode ) { + $this-mode = $mode; + } + + public function setIgnoreVars( $ignoreVars ) { + $this-ignoreVars = $ignoreVars; + } + + public function __construct( $mode, $ignoreVars ) { + $this-mode = $mode; + $this-ignoreVars = $ignoreVars; + } + + /** +* Set all settings +*/ + public function setAll() { + /** @todo Move all variables and mode requirements to an array */ + if ( $this-getMode() == self::DEBUG_MODE_NONE ) { + return; + } + if ( $this-isModeSet( self::DEBUG_MODE_INI ) ) { + $this-setPhpIniVars(); + } + if ( $this-isModeSet( self::DEBUG_MODE_PHP ) ) { + $this-setPhpFunctionVars(); + } + $this-setGlobalVars(); + } + + /** +* Set php.ini variables +*/ + private function setPhpIniVars() { + $phpIniVarSetter = new PhpIniVarSetter( $this-getIgnoreVars() ); + $phpIniVarSetter-setVars( $this-getPhpIniVars() ); + } + + /** +* Get an array of ini variables with desired settings +* +* @return array +*/ + private function getPhpIniVars() { + return array( 'display_errors' = 1 ); + } + + /** +* Set php settings using a php function +*/ + public function setPhpFunctionVars() { + $phpFunctionVarSetter = new PhpFunctionVarSetter( $this-getIgnoreVars() ); + $phpFunctionVarSetter-setVars( $this-getPhpFunctionVars() ); + } + + /** +* Get an array of php setting functions and parameters +* +* @return array +*/ + private function getPhpFunctionVars() { + return array( 'error_reporting' = -1 ); +
[MediaWiki-commits] [Gerrit] Fix MF documentation part 1 - change (mediawiki...MobileFrontend)
Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/169567 Change subject: Fix MF documentation part 1 .. Fix MF documentation part 1 Bug: 72341 Change-Id: I20caef5b48b2dc1c023580252f5ae563b4039717 --- M javascripts/Page.js M javascripts/PageApi.js M javascripts/Router.js M javascripts/api.js M javascripts/application.js M javascripts/modules/PageList.js M javascripts/modules/uploads/PhotoApi.js M javascripts/modules/watchstar/WatchstarApi.js 8 files changed, 49 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/67/169567/1 diff --git a/javascripts/Page.js b/javascripts/Page.js index 521b20a..a5da3e4 100644 --- a/javascripts/Page.js +++ b/javascripts/Page.js @@ -6,6 +6,8 @@ Page; /** +* Mobile page view object +* * @class Page * @extends View */ @@ -32,6 +34,10 @@ editLabel: mw.msg( 'mobile-frontend-editor-edit' ), languageLabel: mw.msg( 'mobile-frontend-language-article-heading' ) }, + + /** +* @inheritDoc +*/ initialize: function ( options ) { // Fallback if no displayTitle provided options.displayTitle = options.displayTitle || options.title; diff --git a/javascripts/PageApi.js b/javascripts/PageApi.js index 17f753a..bfa6fc3 100644 --- a/javascripts/PageApi.js +++ b/javascripts/PageApi.js @@ -6,6 +6,9 @@ * Add child to listOfSections if the level of child is the same as the last * child of listOfSections, otherwise add it to the children of the last * section of listOfSections. If listOfSections is empty, just add child to it. +* @method +* @private +* @member PageApi * @param {Array} listOfSections * @param {Object} child - Section to be added to listOfSections */ @@ -28,6 +31,9 @@ /** * Order sections hierarchically +* @method +* @private +* @member PageApi * @param {Array} sections * @returns {Array} */ diff --git a/javascripts/Router.js b/javascripts/Router.js index 41e846f..5dc713f 100644 --- a/javascripts/Router.js +++ b/javascripts/Router.js @@ -13,6 +13,7 @@ } /** +* Provides navigation routing and location information * @class Router */ function Router() { @@ -136,6 +137,7 @@ }; /** +* Determine if current browser supports onhashchange event * @method * @return {Boolean} */ diff --git a/javascripts/api.js b/javascripts/api.js index 49e1b25..33978e0 100644 --- a/javascripts/api.js +++ b/javascripts/api.js @@ -18,7 +18,7 @@ useJsonp: false, /** -* @method +* @inheritdoc */ initialize: function () { mw.Api.apply( this, arguments ); diff --git a/javascripts/application.js b/javascripts/application.js index 847f454..3e86e29 100644 --- a/javascripts/application.js +++ b/javascripts/application.js @@ -1,6 +1,7 @@ // FIXME: make this an object with a constructor to facilitate testing // (see https://bugzilla.wikimedia.org/show_bug.cgi?id=44264) /** + * mobileFrontend namespace * @class mw.mobileFrontend * @singleton */ @@ -38,6 +39,7 @@ // https://github.com/Modernizr/Modernizr/issues/167 // http://mobilehtml5.org/ /** +* Detect if fixed position is supported in browser * @method * @param {String} userAgent User agent to test against. * @return {Boolean} @@ -62,6 +64,7 @@ } /** +* Detect if browser supports geolocation * @method * @return {Boolean} */ @@ -132,8 +135,8 @@ } } - // TODO: separate main menu navigation code into separate module /** +* Initialize viewport * @method */ function init() { @@ -267,6 +270,7 @@ } /** +* Tidy up a page title * @method * @return {String} */ @@ -337,7 +341,7 @@ } /** -* +* Determine if a device has a widescreen. * @method * @return {Boolean} */ @@ -348,8 +352,9 @@ } /** -* +* Determine if current page is in a specified namespace * @method +* @param {string} namespace Name of namespace * @return {Boolean} */ function inNamespace( namespace ) { @@ -357,6 +362,7 @@ } /** +* Get current page view object * * @method * @return {Page} @@ -417,20 +423,24 @@
[MediaWiki-commits] [Gerrit] remove catrope from ops admin group - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/169566 Change subject: remove catrope from ops admin group .. remove catrope from ops admin group apparently Roan doesn't want root anymore, so for that we should remove him from the ops admin group, see ticket: Change-Id: I21864c1742580758bf37fb48460323e04df38c4a RT: 8686 --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/66/169566/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index b735c86..e1e179e 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -9,7 +9,7 @@ ops: gid: 700 description: include everywhere ops folks -members: [filippo, jgreen, bblack, andrew, faidon, rush, marc, oblivian, laner, catrope, +members: [filippo, jgreen, bblack, andrew, faidon, rush, marc, oblivian, laner, dzahn, akosiaris, springle, mark, gage, ariel, cmjohnson, otto, robh, tstarling, ori] privs: ['ALL = (ALL) NOPASSWD: ALL'] parsoid-roots: -- To view, visit https://gerrit.wikimedia.org/r/169566 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I21864c1742580758bf37fb48460323e04df38c4a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CoreTagHooks: Use parse() for output to HTML rather than text() - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/169568 Change subject: CoreTagHooks: Use parse() for output to HTML rather than text() .. CoreTagHooks: Use parse() for output to HTML rather than text() Change-Id: I9f28afe185a24883fb575dd6df8a23c4ab233b64 --- M includes/parser/CoreTagHooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/68/169568/1 diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php index 3ffa16c..df868ea 100644 --- a/includes/parser/CoreTagHooks.php +++ b/includes/parser/CoreTagHooks.php @@ -135,7 +135,7 @@ public static function indicator( $content, array $attributes, Parser $parser, PPFrame $frame ) { if ( !isset( $attributes['name'] ) || trim( $attributes['name'] ) === '' ) { return 'span class=error' . - wfMessage( 'invalid-indicator-name' )-inContentLanguage()-text() . + wfMessage( 'invalid-indicator-name' )-inContentLanguage()-parse() . '/span'; } -- To view, visit https://gerrit.wikimedia.org/r/169568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f28afe185a24883fb575dd6df8a23c4ab233b64 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restore the place on Nearby for back button - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/169569 Change subject: Restore the place on Nearby for back button .. Restore the place on Nearby for back button Bug: 72566 Change-Id: I1e17918e218b999dc124b0568e200d60e2f27ca1 --- M javascripts/modules/nearby/Nearby.js 1 file changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/69/169569/1 diff --git a/javascripts/modules/nearby/Nearby.js b/javascripts/modules/nearby/Nearby.js index 948057a..963de4d 100644 --- a/javascripts/modules/nearby/Nearby.js +++ b/javascripts/modules/nearby/Nearby.js @@ -150,10 +150,26 @@ this._postRenderLinks(); }, _postRenderLinks: function () { - this.$( 'a' ).on( 'click', function () { + var offset, + hash = window.location.hash; + + this.$( 'a' ).each( function ( i ) { + // FIXME: not unique if multiple Nearby objects on same page + $( this ).attr( 'id', 'nearby-page-list-item-' + i ); + } ).on( 'tap', function () { + window.location.hash = $( this ).attr( 'id' ); // name funnel for watchlists to catch subsequent uploads $.cookie( 'mwUploadsFunnel', 'nearby', { expires: new Date( new Date().getTime() + 6) } ); } ); + + // Restore the offset + if ( hash.indexOf( '/' ) === -1 ) { + offset = $( window.location.hash ).offset(); + if ( offset ) { + // Don't reset the hash here as we don't want to trigger another Route + $( window ).scrollTop( offset.top ); + } + } } } ); -- To view, visit https://gerrit.wikimedia.org/r/169569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e17918e218b999dc124b0568e200d60e2f27ca1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Normalize windows line endings in cohort csvs - change (analytics/wikimetrics)
jenkins-bot has submitted this change and it was merged. Change subject: Normalize windows line endings in cohort csvs .. Normalize windows line endings in cohort csvs When uploaded cohort csv files come from windows machines they have the \r\n line endings. These were normalized in a way that a blank line was inserted. This fix prevents the blank line insertion. Bug: 72581 Change-Id: I1f87b27bf667da76440929664da5b3c3ffa3d13e --- M tests/test_controllers/test_cohort_upload.py M wikimetrics/forms/cohort_upload.py 2 files changed, 7 insertions(+), 4 deletions(-) Approvals: Nuria: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/test_controllers/test_cohort_upload.py b/tests/test_controllers/test_cohort_upload.py index 9caf521..f37cd98 100644 --- a/tests/test_controllers/test_cohort_upload.py +++ b/tests/test_controllers/test_cohort_upload.py @@ -35,14 +35,15 @@ def test_normalize_newlines(self): stream = [ 'blahblah\r', -'blahblahblahnor', +'blahblahblah\r\n', +'blahblahblahnormal', 'blahblah1\rblahblah2', ] lines = list(normalize_newlines(stream)) assert_equal(len(lines), 5) assert_equal(lines[0], 'blahblah') -assert_equal(lines[1], '') -assert_equal(lines[2], 'blahblahblahnor') +assert_equal(lines[1], 'blahblahblah') +assert_equal(lines[2], 'blahblahblahnormal') assert_equal(lines[3], 'blahblah1') assert_equal(lines[4], 'blahblah2') diff --git a/wikimetrics/forms/cohort_upload.py b/wikimetrics/forms/cohort_upload.py index 63ef404..36c9687 100644 --- a/wikimetrics/forms/cohort_upload.py +++ b/wikimetrics/forms/cohort_upload.py @@ -105,7 +105,9 @@ for line in lines: if '\r' in line: for tok in line.split('\r'): -yield tok +tok = tok.strip() +if tok != '': +yield tok else: yield line -- To view, visit https://gerrit.wikimedia.org/r/169223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f87b27bf667da76440929664da5b3c3ffa3d13e Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikimetrics Gerrit-Branch: master Gerrit-Owner: Mforns mfo...@wikimedia.org Gerrit-Reviewer: Milimetric dandree...@wikimedia.org Gerrit-Reviewer: Nuria nu...@wikimedia.org 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 nationalities label in WikiGrok v B - change (mediawiki...MobileFrontend)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/169570 Change subject: Fix nationalities label in WikiGrok v B .. Fix nationalities label in WikiGrok v B Bug: 72631 Change-Id: I3ba9567e808d67ddac7f0642581b87d2a4974fee --- M javascripts/modules/wikigrok/WikiGrokDialogB.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/70/169570/1 diff --git a/javascripts/modules/wikigrok/WikiGrokDialogB.js b/javascripts/modules/wikigrok/WikiGrokDialogB.js index 47d41b5..a1eedba 100644 --- a/javascripts/modules/wikigrok/WikiGrokDialogB.js +++ b/javascripts/modules/wikigrok/WikiGrokDialogB.js @@ -43,7 +43,7 @@ i18n = { dob: 'Born on:', dod: 'Died on:', - nationality: 'Home country:', + nationalities: 'Home country:', occupations: 'Profession:' }; -- To view, visit https://gerrit.wikimedia.org/r/169570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ba9567e808d67ddac7f0642581b87d2a4974fee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Kaldari rkald...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't expose fragment-specific action items when searching. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Don't expose fragment-specific action items when searching. .. Don't expose fragment-specific action items when searching. Bug: 72605 Change-Id: Ib204a186fa2a19be79a0b690e04954a77929c3ae --- M wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java M wikipedia/src/main/java/org/wikipedia/nearby/NearbyFragment.java M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java M wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesFragment.java 5 files changed, 43 insertions(+), 4 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java b/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java index 152b116..b20bbe7 100644 --- a/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java @@ -23,6 +23,7 @@ import org.wikipedia.R; import org.wikipedia.WikipediaApp; import org.wikipedia.events.NewWikiPageNavigationEvent; +import org.wikipedia.page.PageActivity; import org.wikipedia.pageimages.PageImage; import java.text.DateFormat; @@ -227,18 +228,24 @@ @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { +if (((PageActivity)getActivity()).isSearching()) { +return; +} inflater.inflate(R.menu.menu_history, menu); app.adjustDrawableToTheme(menu.findItem(R.id.menu_clear_all_history).getIcon()); } @Override public void onPrepareOptionsMenu(Menu menu) { +super.onPrepareOptionsMenu(menu); if (historyEntryList == null) { // in API10 this may be called before onCreateView... return; } +if (((PageActivity)getActivity()).isSearching()) { +return; +} menu.findItem(R.id.menu_clear_all_history).setEnabled(historyEntryList.getCount() 0); -super.onPrepareOptionsMenu(menu); } @Override diff --git a/wikipedia/src/main/java/org/wikipedia/nearby/NearbyFragment.java b/wikipedia/src/main/java/org/wikipedia/nearby/NearbyFragment.java index 936fbd0..8a969b9 100644 --- a/wikipedia/src/main/java/org/wikipedia/nearby/NearbyFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/nearby/NearbyFragment.java @@ -8,6 +8,8 @@ import org.wikipedia.events.NewWikiPageNavigationEvent; import org.wikipedia.history.HistoryEntry; import org.mediawiki.api.json.ApiException; +import org.wikipedia.page.PageActivity; + import com.squareup.picasso.Picasso; import de.keyboardsurfer.android.widget.crouton.Crouton; import de.keyboardsurfer.android.widget.crouton.Style; @@ -491,6 +493,9 @@ @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { +if (((PageActivity)getActivity()).isSearching()) { +return; +} inflater.inflate(R.menu.menu_nearby, menu); app.adjustDrawableToTheme(menu.findItem(R.id.menu_refresh_nearby).getIcon()); menu.findItem(R.id.menu_metric_imperial).setTitle(showImperial @@ -500,11 +505,14 @@ @Override public void onPrepareOptionsMenu(Menu menu) { +super.onPrepareOptionsMenu(menu); +if (((PageActivity)getActivity()).isSearching()) { +return; +} menu.findItem(R.id.menu_refresh_nearby).setEnabled(!refreshing); menu.findItem(R.id.menu_metric_imperial).setTitle(showImperial ? getString(R.string.nearby_set_metric) : getString(R.string.nearby_set_imperial)); -super.onPrepareOptionsMenu(menu); } @Override diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java b/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java index 6a1b66c..72a18df 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java @@ -258,7 +258,7 @@ @Override public boolean onCreateOptionsMenu(Menu menu) { -if (searchFragment != null !searchFragment.isSearchActive()) { +if (searchFragment != null !isSearching()) { getMenuInflater().inflate(R.menu.menu_main, menu); } @@ -325,6 +325,17 @@ } /** + * Returns whether we're currently in a searching state (i.e. the search fragment is shown). + * @return True if currently searching, false otherwise. + */ +public boolean isSearching() { +if (searchFragment == null) { +return false; +} +return searchFragment.isSearchActive(); +} + +/** * Add a new fragment to the top of the activity's backstack. * @param f New fragment to place on top.
[MediaWiki-commits] [Gerrit] Fix nationalities label in WikiGrok v B - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fix nationalities label in WikiGrok v B .. Fix nationalities label in WikiGrok v B Bug: 72631 Change-Id: I3ba9567e808d67ddac7f0642581b87d2a4974fee --- M javascripts/modules/wikigrok/WikiGrokDialogB.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/modules/wikigrok/WikiGrokDialogB.js b/javascripts/modules/wikigrok/WikiGrokDialogB.js index 47d41b5..a1eedba 100644 --- a/javascripts/modules/wikigrok/WikiGrokDialogB.js +++ b/javascripts/modules/wikigrok/WikiGrokDialogB.js @@ -43,7 +43,7 @@ i18n = { dob: 'Born on:', dod: 'Died on:', - nationality: 'Home country:', + nationalities: 'Home country:', occupations: 'Profession:' }; -- To view, visit https://gerrit.wikimedia.org/r/169570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ba9567e808d67ddac7f0642581b87d2a4974fee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] firewall: remove, unused - change (operations/puppet)
Matanya has uploaded a new change for review. https://gerrit.wikimedia.org/r/169571 Change subject: firewall: remove, unused .. firewall: remove, unused Change-Id: Ie987ec2312c5e9d167ae4bcb0a955d2b95b5ad1b --- D manifests/misc/firewall.pp 1 file changed, 0 insertions(+), 78 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/71/169571/1 diff --git a/manifests/misc/firewall.pp b/manifests/misc/firewall.pp deleted file mode 100644 index af9213e..000 --- a/manifests/misc/firewall.pp +++ /dev/null @@ -1,78 +0,0 @@ -class firewall::builder { - -package { ['fwconfigtool', 'python-argparse'] : - ensure = latest, -} -file { '/var/lib/fwconfigtool': -ensure = directory, -owner = 'root', -group = 'root', -mode = '0755', -} - -file { '/var/lib/fwconfigtool/machineports': -ensure = directory, -owner = 'root', -group = 'root', -mode = '0755', -} - -# collect all fw definitions -Exported_acl_rule | | - -} - -class firewall { -# for each inbound ACL create an exported file on the main server - -# This is the definition called from all service manifests, e.g. -# open_port { mail: port = 25 } - -define open_port( -$port, -$hostname = $::hostname, -$ip_address= $::ipaddress, -$protocol = 'tcp', -) { -@@exported_acl_rule { $title: -hostname = $hostname, -ip_address = $ip_address, -protocol = $protocol, -port = $port, -} -} - -define exported_acl_rule( -$port, -$hostname = $::hostname, -$ip_address = $::ipaddress, -$protocol = 'tcp', -) { -file { /var/lib/fwconfigtool/machineports/${ip_address}-${port}: -ensure = present, -content = ${hostname},${ip_address},${protocol},${port}\n, -owner = 'root', -group = 'root', -tag = 'inboundacl', -} -} - -} - -class testcase1 { -include firewall -firewall::open_port { 'testbox': -port = 80, -} -firewall::open_port { 'test2': -port = 443, -} -} - -class testcase2 { -include firewall -firewall::inboundacl { 'test2': -ip_address = '2.3.4.5', -port = 80, -} -} -- To view, visit https://gerrit.wikimedia.org/r/169571 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie987ec2312c5e9d167ae4bcb0a955d2b95b5ad1b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya mata...@foss.co.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Gruntfile cleanup - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Gruntfile cleanup .. Gruntfile cleanup Change-Id: I43604998687200f046e2a74bfa205df77c164371 --- R .jscsrc M Gruntfile.js M Makefile 3 files changed, 4 insertions(+), 8 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/.jscs.json b/.jscsrc similarity index 74% rename from .jscs.json rename to .jscsrc index 84b7fd4..b5e995c 100644 --- a/.jscs.json +++ b/.jscsrc @@ -9,5 +9,5 @@ checkRedundantParams: true }, validateIndentation: \t, - excludeFiles: [javascripts/externals/*,javascripts/externals/*/*, javascripts/README.md] + excludeFiles: [javascripts/externals/**/*.js, javascripts/README.md] } diff --git a/Gruntfile.js b/Gruntfile.js index 87b90a7..58ee11f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,12 +14,11 @@ grunt.loadNpmTasks('grunt-contrib-watch'); grunt.initConfig( { - pkg: grunt.file.readJSON( 'package.json' ), URL: process.env.URL || 'http://127.0.0.1:8080/w/index.php/', QUNIT_FILTER: (process.env.QUNIT_FILTER 'filter='+process.env.QUNIT_FILTER) || '', files: { js: 'javascripts/**/*.js', - jsTests: 'tests/qunit/**/*.js', + jsTests: 'tests/qunit/**/*.js' }, jshint: { options: { @@ -31,10 +30,7 @@ ] }, jscs: { - src: '%= jshint.all %', - options: { - config: '.jscs.json' - } + src: '%= jshint.all %' }, qunit: { all: { diff --git a/Makefile b/Makefile index f360c1f..f2245de 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ @find javascripts -type f -name *.js -not -path **externals** -exec node_modules/.bin/js-beautify -r {} \; jscs: nodecheck## Check the JavaScript coding style - @node_modules/.bin/jscs javascripts/* --config .jscs.json + @node_modules/.bin/jscs javascripts/* --config .jscsrc jshinttests: nodecheck ## Lint the QUnit tests @node_modules/.bin/jshint tests/qunit/* --config .jshintrc -- To view, visit https://gerrit.wikimedia.org/r/169548 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43604998687200f046e2a74bfa205df77c164371 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Robmoen rm...@wikimedia.org Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Document incomplete methods and classes. - change (mediawiki...Mantle)
jenkins-bot has submitted this change and it was merged. Change subject: Document incomplete methods and classes. .. Document incomplete methods and classes. Change-Id: I4d9249b5a16b7ea1e415fe89e06b2775e3658ca7 --- M javascripts/common/Class.js M javascripts/common/View.js M javascripts/common/eventemitter.js M javascripts/common/main.js 4 files changed, 11 insertions(+), 1 deletion(-) Approvals: Robmoen: Looks good to me, approved Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/common/Class.js b/javascripts/common/Class.js index 82885cd..0448ac8 100644 --- a/javascripts/common/Class.js +++ b/javascripts/common/Class.js @@ -6,7 +6,7 @@ /** * Extends a class with new methods and member properties. * -* @param {Object} prototype +* @param {Object} prototype Prototype that should be incorporated into the new Class. * @method * @return {Class} */ @@ -25,6 +25,11 @@ return Child; } + /** +* An extensible program-code-template for creating objects +* +* @class Class +*/ function Class() { this.initialize.apply( this, arguments ); } diff --git a/javascripts/common/View.js b/javascripts/common/View.js index c929a00..4534a89 100644 --- a/javascripts/common/View.js +++ b/javascripts/common/View.js @@ -47,6 +47,7 @@ */ View = EventEmitter.extend( { /** +* Name of tag that contains the rendered template * @type String */ tagName: 'div', @@ -83,6 +84,7 @@ defaults: {}, /** +* Run once during construction to set up the View * @method * @param {Object} options Object passed to the constructor. */ diff --git a/javascripts/common/eventemitter.js b/javascripts/common/eventemitter.js index b7eebec..84b0a66 100644 --- a/javascripts/common/eventemitter.js +++ b/javascripts/common/eventemitter.js @@ -7,6 +7,7 @@ // and Mantle's different OO models get along, // and we need to alias one() to once(). /** +* A base class with support for event emitting. * @class EventEmitter * @extends Class * @uses OO.EventEmitter diff --git a/javascripts/common/main.js b/javascripts/common/main.js index 36ca30b..6c7db17 100644 --- a/javascripts/common/main.js +++ b/javascripts/common/main.js @@ -1,4 +1,6 @@ /** + * A wrapper for methods and utility functions who's code is not yet stable enough to be incorporated + * into MediaWiki core. * @singleton * @class mw.mantle */ -- To view, visit https://gerrit.wikimedia.org/r/169234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d9249b5a16b7ea1e415fe89e06b2775e3658ca7 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Mantle Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Robmoen rm...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Parse 'upload_source_url' message on SpecialUpload - change (mediawiki/core)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/169572 Change subject: Parse 'upload_source_url' message on SpecialUpload .. Parse 'upload_source_url' message on SpecialUpload Commons wants to use wikitext over there: https://commons.wikimedia.org/wiki/MediaWiki:Upload_source_url Change-Id: I7625fb58388de901b93744aa6d21de433f671483 --- M includes/specials/SpecialUpload.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/72/169572/1 diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 51dd7bd..2850843 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -903,7 +903,7 @@ $this-getContext()-getLanguage()-formatSize( $this-mMaxUploadSize['url'] ) )-parse() . $this-msg( 'word-separator' )-escaped() . - $this-msg( 'upload_source_url' )-escaped(), + $this-msg( 'upload_source_url' )-parse(), 'checked' = $selectedSourceType == 'url', ); } -- To view, visit https://gerrit.wikimedia.org/r/169572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7625fb58388de901b93744aa6d21de433f671483 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix visibility of dismiss button in ToC tutorial - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/169573 Change subject: Fix visibility of dismiss button in ToC tutorial .. Fix visibility of dismiss button in ToC tutorial The @dimen/wrap_content hack doesn't work on all devices. Using fixed value instead. Ideally, the image should be exactly square. In a later patch the image could be adjusted from 130x128 to 128x128. Bug: 72595 Change-Id: I02e87782988205ab6e2f8d2ccd8bc0d54858503b --- M wikipedia/res/values-h480dp/dimens.xml M wikipedia/res/values/dimens.xml 2 files changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/73/169573/1 diff --git a/wikipedia/res/values-h480dp/dimens.xml b/wikipedia/res/values-h480dp/dimens.xml index 901e9bc..02c73e5 100644 --- a/wikipedia/res/values-h480dp/dimens.xml +++ b/wikipedia/res/values-h480dp/dimens.xml @@ -3,7 +3,7 @@ !-- ToC Intro -- -dimen name=toc_intro_image_size@dimen/wrap_content/dimen +dimen name=toc_intro_image_size128dp/dimen dimen name=toc_intro_image_marginTop16dp/dimen dimen name=toc_intro_image_marginBottom48dp/dimen diff --git a/wikipedia/res/values/dimens.xml b/wikipedia/res/values/dimens.xml index 72b807f..2828a86 100644 --- a/wikipedia/res/values/dimens.xml +++ b/wikipedia/res/values/dimens.xml @@ -1,9 +1,5 @@ resources -!-- trick to be able to use match_parent and wrap_content in dimen resources -- -dimen name=match_parent-1dp/dimen -dimen name=wrap_content-2dp/dimen - !-- Default screen margins, per the Android Design guidelines. -- dimen name=activity_horizontal_margin16dp/dimen dimen name=activity_vertical_margin16dp/dimen -- To view, visit https://gerrit.wikimedia.org/r/169573 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02e87782988205ab6e2f8d2ccd8bc0d54858503b Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND bsitzm...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing documentation - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Add missing documentation .. Add missing documentation Add missing documentation for: Page.js PageApi.js Router.js api.js application.js PageList.js PhotoApi.js WatchstarApi.js Bug: 72341 Change-Id: I20caef5b48b2dc1c023580252f5ae563b4039717 --- M javascripts/Page.js M javascripts/PageApi.js M javascripts/Router.js M javascripts/api.js M javascripts/application.js M javascripts/modules/PageList.js M javascripts/modules/uploads/PhotoApi.js M javascripts/modules/watchstar/WatchstarApi.js 8 files changed, 43 insertions(+), 11 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/Page.js b/javascripts/Page.js index d98bc2b..a447ffd 100644 --- a/javascripts/Page.js +++ b/javascripts/Page.js @@ -6,6 +6,8 @@ Page; /** +* Mobile page view object +* * @class Page * @uses Section * @extends View @@ -33,6 +35,10 @@ editLabel: mw.msg( 'mobile-frontend-editor-edit' ), languageLabel: mw.msg( 'mobile-frontend-language-article-heading' ) }, + + /** +* @inheritDoc +*/ initialize: function ( options ) { // Fallback if no displayTitle provided options.displayTitle = options.displayTitle || options.title; diff --git a/javascripts/PageApi.js b/javascripts/PageApi.js index 2e5c606..33d4f29 100644 --- a/javascripts/PageApi.js +++ b/javascripts/PageApi.js @@ -2,10 +2,12 @@ var Api = M.require( 'api' ).Api, PageApi, sectionTemplate = M.template.get( 'Section.hogan' ); - /** + /* * Add child to listOfSections if the level of child is the same as the last * child of listOfSections, otherwise add it to the children of the last * section of listOfSections. If listOfSections is empty, just add child to it. +* @method +* @private * @param {Array} listOfSections * @param {Object} child - Section to be added to listOfSections */ @@ -26,8 +28,10 @@ } } - /** + /* * Order sections hierarchically +* @method +* @private * @param {Array} sections * @returns {Array} */ diff --git a/javascripts/Router.js b/javascripts/Router.js index 41e846f..5dc713f 100644 --- a/javascripts/Router.js +++ b/javascripts/Router.js @@ -13,6 +13,7 @@ } /** +* Provides navigation routing and location information * @class Router */ function Router() { @@ -136,6 +137,7 @@ }; /** +* Determine if current browser supports onhashchange event * @method * @return {Boolean} */ diff --git a/javascripts/api.js b/javascripts/api.js index 49e1b25..33978e0 100644 --- a/javascripts/api.js +++ b/javascripts/api.js @@ -18,7 +18,7 @@ useJsonp: false, /** -* @method +* @inheritdoc */ initialize: function () { mw.Api.apply( this, arguments ); diff --git a/javascripts/application.js b/javascripts/application.js index 847f454..3e86e29 100644 --- a/javascripts/application.js +++ b/javascripts/application.js @@ -1,6 +1,7 @@ // FIXME: make this an object with a constructor to facilitate testing // (see https://bugzilla.wikimedia.org/show_bug.cgi?id=44264) /** + * mobileFrontend namespace * @class mw.mobileFrontend * @singleton */ @@ -38,6 +39,7 @@ // https://github.com/Modernizr/Modernizr/issues/167 // http://mobilehtml5.org/ /** +* Detect if fixed position is supported in browser * @method * @param {String} userAgent User agent to test against. * @return {Boolean} @@ -62,6 +64,7 @@ } /** +* Detect if browser supports geolocation * @method * @return {Boolean} */ @@ -132,8 +135,8 @@ } } - // TODO: separate main menu navigation code into separate module /** +* Initialize viewport * @method */ function init() { @@ -267,6 +270,7 @@ } /** +* Tidy up a page title * @method * @return {String} */ @@ -337,7 +341,7 @@ } /** -* +* Determine if a device has a widescreen. * @method * @return {Boolean} */ @@ -348,8 +352,9 @@ } /** -* +* Determine if current page is in a specified namespace * @method +* @param {string} namespace Name of namespace * @return {Boolean} */
[MediaWiki-commits] [Gerrit] Add category pages and tags. - change (mediawiki...GraphViz)
jenkins-bot has submitted this change and it was merged. Change subject: Add category pages and tags. .. Add category pages and tags. This change adds a category for all pages generated by the GraphViz extension. There is one root category for GraphViz and a subcategory for each renderer (dot, neato, fdp, sfdp, circo, twopi and mscgen). This makes it easy to find graph images created by the extension. Change-Id: I942f703614165d7cadcf501b1312139e265bf5f0 --- M GraphRenderParms.php M GraphViz_body.php M RELEASE-NOTES.md M i18n/en.json M i18n/qqq.json 5 files changed, 131 insertions(+), 17 deletions(-) Approvals: Welterkj: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/GraphRenderParms.php b/GraphRenderParms.php index a0d4c8f..f6d21ce 100644 --- a/GraphRenderParms.php +++ b/GraphRenderParms.php @@ -159,12 +159,16 @@ return $this-getGraphName( $userSpecific ) . '.src'; } + public function getImageBaseName( $userSpecific ) { + return $this-getGraphName( $userSpecific ) . '_' . $this-getRenderer(); + } + public function getImageFileName( $userSpecific ) { - return $this-getGraphName( $userSpecific ) . '.' . $this-imageType; + return $this-getImageBaseName( $userSpecific ) . '.' . $this-imageType; } public function getMapFileName( $userSpecific ) { - return $this-getGraphName( $userSpecific ) . '.map'; + return $this-getImageBaseName( $userSpecific ) . '.map'; } public function getSourcePath( $userSpecific ) { diff --git a/GraphViz_body.php b/GraphViz_body.php index 95634c4..c051374 100644 --- a/GraphViz_body.php +++ b/GraphViz_body.php @@ -104,7 +104,7 @@ * * @var string IMAGE_DUMMY */ - const IMAGE_DUMMY = File_graph_GraphVizExtensionDummy; + const IMAGE_DUMMY = File_graph_GraphVizExtensionDummy_dot; /** * Used as an array key in GraphViz::$graphTypes and other arrays. @@ -121,6 +121,27 @@ * @var integer MSCGEN */ const MSCGEN = 1; + + /** +* The name of the root category containing pages created by this extension. +* +* @var integer ROOT_CATEGORY +*/ + const ROOT_CATEGORY = GraphViz; + + /** +* Subcategories of pages created by this extension. +* @var array $subCategories +*/ + private static $subCategories = array( + 'mscgen', + 'dot', + 'neato', + 'fdp', + 'sfdp', + 'circo', + 'twopi' + ); /** * A list of dot attributes that are forbidden. @@ -260,6 +281,50 @@ } /** +* Create a category page for GraphViz::ROOT_CATEGORY and subcategory pages for GraphViz::$subCategories. +* @author Keith Welter +*/ + public static function createCategoryPages() { + $rootCategoryName = self::ROOT_CATEGORY; + $rootCategoryDesc = wfMessage( 'graphviz-category-desc', [[:Category:$rootCategoryName]] )-text(); + self::createCategoryPage( $rootCategoryName, $rootCategoryDesc, ); + + foreach( self::$subCategories as $subCategory ) { + $subCategoryName = $rootCategoryName . ' ' . $subCategory; + $subCategoryDesc = wfMessage( 'graphviz-subcategory-desc', [[:Category:$subCategoryName]], $subCategory )-text(); + $subCategoryDesc .= [[Category:$rootCategoryName]]; + self::createCategoryPage( $subCategoryName, $subCategoryDesc, ); + } + } + + public static function getCategoryTags( $renderer ) { + $rootCategoryName = self::ROOT_CATEGORY; + return [[Category:$rootCategoryName]][[Category:$rootCategoryName $renderer]]; + } + + /** +* Create a category page with the given name if it does not already exist. +* @param[in] string $name is the name to use for the new category page. +* @param[in] string $pageText is the page text to supply. +* @param[in] string $comment is the comment to supply for the edit. +* @author Keith Welter +*/ + public static function createCategoryPage( $name, $pageText, $comment ) { + $title = Title::newFromText( Category: . $name ); + + if ( !$title-exists() ) { + $wikiPage = new WikiPage( $title ); + $flags = EDIT_NEW; + $status = self::doEditContent( $wikiPage, $title, $pageText, $comment, $flags, null ); + if ( $status-isOK() ) { + wfDebug( __METHOD__ .
[MediaWiki-commits] [Gerrit] Release version 1.5.0. - change (mediawiki...GraphViz)
Welterkj has uploaded a new change for review. https://gerrit.wikimedia.org/r/169574 Change subject: Release version 1.5.0. .. Release version 1.5.0. Change-Id: I9c145b77646c2fde8bbe68fb5ccf6274db5070c5 --- M GraphViz.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GraphViz refs/changes/74/169574/1 diff --git a/GraphViz.php b/GraphViz.php index d32fc01..4192f75 100644 --- a/GraphViz.php +++ b/GraphViz.php @@ -33,7 +33,7 @@ if ( !defined( 'MEDIAWIKI' ) ) die(); -define( 'GraphViz_VERSION', '1.4.1' ); +define( 'GraphViz_VERSION', '1.5.0' ); /** * The GraphViz settings class. -- To view, visit https://gerrit.wikimedia.org/r/169574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c145b77646c2fde8bbe68fb5ccf6274db5070c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GraphViz Gerrit-Branch: master Gerrit-Owner: Welterkj welterkj+...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Release version 1.5.0. - change (mediawiki...GraphViz)
jenkins-bot has submitted this change and it was merged. Change subject: Release version 1.5.0. .. Release version 1.5.0. Change-Id: I9c145b77646c2fde8bbe68fb5ccf6274db5070c5 --- M GraphViz.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Welterkj: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/GraphViz.php b/GraphViz.php index d32fc01..4192f75 100644 --- a/GraphViz.php +++ b/GraphViz.php @@ -33,7 +33,7 @@ if ( !defined( 'MEDIAWIKI' ) ) die(); -define( 'GraphViz_VERSION', '1.4.1' ); +define( 'GraphViz_VERSION', '1.5.0' ); /** * The GraphViz settings class. -- To view, visit https://gerrit.wikimedia.org/r/169574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c145b77646c2fde8bbe68fb5ccf6274db5070c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GraphViz Gerrit-Branch: master Gerrit-Owner: Welterkj welterkj+...@gmail.com Gerrit-Reviewer: Welterkj welterkj+...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CoreTagHooks: Use parse() for output to HTML rather than text() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: CoreTagHooks: Use parse() for output to HTML rather than text() .. CoreTagHooks: Use parse() for output to HTML rather than text() Change-Id: I9f28afe185a24883fb575dd6df8a23c4ab233b64 --- M includes/parser/CoreTagHooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jackmcbarn: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php index 3ffa16c..df868ea 100644 --- a/includes/parser/CoreTagHooks.php +++ b/includes/parser/CoreTagHooks.php @@ -135,7 +135,7 @@ public static function indicator( $content, array $attributes, Parser $parser, PPFrame $frame ) { if ( !isset( $attributes['name'] ) || trim( $attributes['name'] ) === '' ) { return 'span class=error' . - wfMessage( 'invalid-indicator-name' )-inContentLanguage()-text() . + wfMessage( 'invalid-indicator-name' )-inContentLanguage()-parse() . '/span'; } -- To view, visit https://gerrit.wikimedia.org/r/169568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f28afe185a24883fb575dd6df8a23c4ab233b64 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Cscott canan...@wikimedia.org Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com 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 parser tests for lang/category/wiki links (wt2wt and htm... - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: New parser tests for lang/category/wiki links (wt2wt and html2wt modes) .. New parser tests for lang/category/wiki links (wt2wt and html2wt modes) * Added new tests to catch regressions and document serialization behavior for new links from clients. * We have one newly failing test because of bug 70960. * We also have a newly failing selser test: Interlanguage link variations [3,2,2,0,1,2,1,3,0] This seems to be a selser bug where it isn't able to track the deleted newline between the two link tags (or it seems to be carrying over a newline separator from the previous nodes). This is not a serious bug. Separator handling is tricky in general, and this is one of those failing scenarios. Bug: 70894 Bug: 70960 Change-Id: I92deb78fb8f4d7746bfe6d657e50a875c3675ab6 --- M tests/parserTests-blacklist.js M tests/parserTests.txt 2 files changed, 72 insertions(+), 2 deletions(-) Approvals: Arlolra: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index 46d89c1..e36d642 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -1799,6 +1799,7 @@ add(html2wt, Empty TR followed by mixed-ws-comment line should RT correctly, {|\n\n\n !--c--|-\n!--c-- !--d--\n|}\n); add(html2wt, Multi-line image caption generated by templates with/without trailing newlines, div class=\thumb tright\div class=\thumbinner\ style=\width:182px;\[/index.php?title=Special:UploadwpDestFile=Foo.jpg File:Foo.jpg] div class=\thumbcaption\foo\\nA\\nB\\nC/div/div/div\ndiv class=\thumb tright\div class=\thumbinner\ style=\width:182px;\[/index.php?title=Special:UploadwpDestFile=Foo.jpg File:Foo.jpg] div class=\thumbcaption\foo\\nA\\nB\\nC\\n\\n/div/div/div\n); add(html2wt, Improperly nested inline or quotes tags with whitespace in between, span sx/s/spans /s\n''' ''x'nowiki/'' ''\n); +add(html2wt, New wiki links (content string variations), [[Foo_bar]]\n[[Foo bar]]\n[[MediaWiki:Badtitletext]]); add(html2wt, Image: Block level image should have \\n before and after, 123\n[[File:Foobar.png|right|thumb|150x150px]]\n456\n); add(html2wt, Image: upright option (parsoid), [[File:Foobar.jpg|thumb|caption]]\n[[File:Foobar.jpg|thumb|caption]]\n[[File:Foobar.jpg|thumb|500x500px|caption]]\n); add(html2wt, Image: upright option is ignored on inline and frame images (parsoid), [[File:Foobar.jpg|500x500px|caption]]\n); @@ -2203,6 +2204,7 @@ add(selser, Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [3,4,2,2,2,0,4], q9c5unenvqtihpvi\n\nk8q51d5k1t7w4s4i\n\n[[Foo| ''bar'']]\n\nl31jajvwag36jemi\n\np43tgo0r9n23ayvi\n\n[http://wp.org foo]\n\nwffmswrjps0pb9\n); add(selser, Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [0,2,1,3,[[4]],3,0], [[Foo| bar]]\n\ncpt8orwf0l26s9k9\n\n[[Foo| ''bar'']]\n\n[http://wp.org e15bwsd59u73c8fr]\n\n[http://wp.org ''foo'']); add(selser, Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [3,4,4,2,2,4,0], o3awmbfvt9fnu3di\n\nj0e1avrz9scvunmi\n\npvsdo8qneqe8w7b9\n\nou4krycgek8uayvi\n\n[http://wp.org foo]\n\nu9e32ytur700ms4i\n\n[http://wp.org ''foo'']); +add(selser, Interlanguage link variations [3,2,2,0,1,2,1,3,0], pzmy6p9svhen4s4i\n\nqzc7qhlkpbbuik9[[ es :Spanish]]\n[[ ZH :Chinese]]3ql21qt70gam7vi\n[[es:Foo_bar]]\n[[es:Foo bar]]); add(selser, Handling html with a div self-closing tag [0,0,4,0,1], div title /\na2lmqbelulg6tj4i\ndiv data-foobar=\myfxsa4q14jf9a4i\ title/\ndiv title=\bar\ /\ndiv title=\bar\ /\ndiv title=\bar/\); add(selser, Handling html with a div self-closing tag [0,2,3,0,1], div title /hsvg8qvys3q8h0k9\n\ndiv data-foobar=\pmcyv89r6fq7iudi\ title/\ndiv title=\bar\ /\ndiv title=\bar\ /\ndiv title=\bar/\); add(selser, Handling html with a div self-closing tag [0,2,0,2,[0,1,2,4,3,1]], div title /hrkbg93g91mdkj4i\ndiv title/d24otck8en4s4i\ndiv title/\ndiv title=\bar\ data-foobar=\m3try3iqp9fi529\ /40lnev3wvt4t2o6r\n5cg171a8bz7aatt9div title=\bar/\ data-foobar=\ht3kiuub2yv6lxr\); diff --git a/tests/parserTests.txt b/tests/parserTests.txt index e4f2ee8..890e440 100644 --- a/tests/parserTests.txt +++ b/tests/parserTests.txt @@ -6911,6 +6911,8 @@ !! test Interlanguage link +!! options +parsoid=wt2html,wt2wt,html2html !! wikitext Blah blah blah [[zh:Chinese]] @@ -6939,6 +6941,8 @@ !! test Double interlanguage link +!! options +parsoid=wt2html,wt2wt,html2html !! wikitext Blah blah blah [[es:Spanish]] @@ -6954,17 +6958,23 @@ !! test Interlanguage link variations +!! options +parsoid=wt2html,wt2wt,html2html !! wikitext Blah blah blah [[ es :Spanish]] [[ ZH :Chinese]] +[[es:Foo_bar]] +[[es:Foo bar]] !! html/php pBlah blah blah /p !! html/parsoid pBlah blah blah/p -link rel=mw:PageProp/Language
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into HEAD - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/169575 Change subject: Merge remote-tracking branch 'origin/master' into HEAD .. Merge remote-tracking branch 'origin/master' into HEAD ccdc575553c4fefca2192d5064be0f8cab7639f0 Don't do contribution tracking in batch mode a1835811e452bbdcc0fca01af3c623e06286fc3b Localisation updates from https://translatewiki.net. 3586ec960c9ee9ea025c94161b46125705d06ced Form width/label height now fit w/mediawiki update 76d82ba416503c96cf4f34e33de91110cfa1737d Localisation updates from https://translatewiki.net. 858bc2f8d542ad738e906c83a592e3b63990f5a6 Put state placeholder in state dropdown 2f4fdff108997ca6a72d82b0400a1e145c924cc9 Make state field wider, zip smaller to compensate e5cbd42a8e0efd953a50be2c82c071d3ebef6e24 Localisation updates from https://translatewiki.net. Change-Id: I26ff4f1648190cb50aa180e0eb20d904922fd2ec --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/75/169575/1 -- To view, visit https://gerrit.wikimedia.org/r/169575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26ff4f1648190cb50aa180e0eb20d904922fd2ec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: deployment Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix visibility of dismiss button in ToC tutorial - change (apps...wikipedia)
Dbrant has submitted this change and it was merged. Change subject: Fix visibility of dismiss button in ToC tutorial .. Fix visibility of dismiss button in ToC tutorial The @dimen/wrap_content hack doesn't work on all devices. Using fixed value instead. Ideally, the image should be exactly square. In a later patch the image could be adjusted from 130x128 to 128x128. Bug: 72595 Change-Id: I02e87782988205ab6e2f8d2ccd8bc0d54858503b --- M wikipedia/res/values-h480dp/dimens.xml M wikipedia/res/values/dimens.xml 2 files changed, 1 insertion(+), 5 deletions(-) Approvals: Dbrant: Looks good to me, approved diff --git a/wikipedia/res/values-h480dp/dimens.xml b/wikipedia/res/values-h480dp/dimens.xml index 901e9bc..02c73e5 100644 --- a/wikipedia/res/values-h480dp/dimens.xml +++ b/wikipedia/res/values-h480dp/dimens.xml @@ -3,7 +3,7 @@ !-- ToC Intro -- -dimen name=toc_intro_image_size@dimen/wrap_content/dimen +dimen name=toc_intro_image_size128dp/dimen dimen name=toc_intro_image_marginTop16dp/dimen dimen name=toc_intro_image_marginBottom48dp/dimen diff --git a/wikipedia/res/values/dimens.xml b/wikipedia/res/values/dimens.xml index 72b807f..2828a86 100644 --- a/wikipedia/res/values/dimens.xml +++ b/wikipedia/res/values/dimens.xml @@ -1,9 +1,5 @@ resources -!-- trick to be able to use match_parent and wrap_content in dimen resources -- -dimen name=match_parent-1dp/dimen -dimen name=wrap_content-2dp/dimen - !-- Default screen margins, per the Android Design guidelines. -- dimen name=activity_horizontal_margin16dp/dimen dimen name=activity_vertical_margin16dp/dimen -- To view, visit https://gerrit.wikimedia.org/r/169573 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02e87782988205ab6e2f8d2ccd8bc0d54858503b Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into HEAD - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Merge remote-tracking branch 'origin/master' into HEAD .. Merge remote-tracking branch 'origin/master' into HEAD ccdc575553c4fefca2192d5064be0f8cab7639f0 Don't do contribution tracking in batch mode a1835811e452bbdcc0fca01af3c623e06286fc3b Localisation updates from https://translatewiki.net. 3586ec960c9ee9ea025c94161b46125705d06ced Form width/label height now fit w/mediawiki update 76d82ba416503c96cf4f34e33de91110cfa1737d Localisation updates from https://translatewiki.net. 858bc2f8d542ad738e906c83a592e3b63990f5a6 Put state placeholder in state dropdown 2f4fdff108997ca6a72d82b0400a1e145c924cc9 Make state field wider, zip smaller to compensate e5cbd42a8e0efd953a50be2c82c071d3ebef6e24 Localisation updates from https://translatewiki.net. Change-Id: I26ff4f1648190cb50aa180e0eb20d904922fd2ec --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/169575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I26ff4f1648190cb50aa180e0eb20d904922fd2ec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: deployment Gerrit-Owner: Awight awi...@wikimedia.org Gerrit-Reviewer: Awight awi...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update DonationInterface submodule - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/169576 Change subject: update DonationInterface submodule .. update DonationInterface submodule Change-Id: I0de1f42fd4082af7f7c039b5670cc67270206e02 --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/76/169576/1 diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 56cbad5..5357ab1 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 56cbad55768eab251e2a4b84cb852a5dcb2a1fb8 +Subproject commit 5357ab18a1c564f64112e55d21ce89a72c5c126f -- To view, visit https://gerrit.wikimedia.org/r/169576 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0de1f42fd4082af7f7c039b5670cc67270206e02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_23 Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update DonationInterface submodule - change (mediawiki/core)
Awight has submitted this change and it was merged. Change subject: update DonationInterface submodule .. update DonationInterface submodule Change-Id: I0de1f42fd4082af7f7c039b5670cc67270206e02 --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Awight: Verified; Looks good to me, approved diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 56cbad5..5357ab1 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 56cbad55768eab251e2a4b84cb852a5dcb2a1fb8 +Subproject commit 5357ab18a1c564f64112e55d21ce89a72c5c126f -- To view, visit https://gerrit.wikimedia.org/r/169576 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0de1f42fd4082af7f7c039b5670cc67270206e02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_23 Gerrit-Owner: Awight awi...@wikimedia.org Gerrit-Reviewer: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Temporarily make jslint non-voting in fundraising/dash - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/169577 Change subject: Revert Temporarily make jslint non-voting in fundraising/dash .. Revert Temporarily make jslint non-voting in fundraising/dash The change has not been deployed on gallium nor has it been properly reviewed. As a safe move I am reverting it for now. This reverts commit 7c2fbf4d6dbc8e56e6fcd4a4a7cba38a85d52683. Change-Id: I905b1d76606ca85a129a61ea74f51ba8c6979939 --- M zuul/layout.yaml 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/77/169577/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 79c2677..e4e22f0 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2526,13 +2526,11 @@ - wikimedia-bugzilla-wikibugs-perllint - name: wikimedia/fundraising/dash -check-only: - - wikimedia-fundraising-dash-jslint check-voter: - #- wikimedia-fundraising-dash-jslint + - wikimedia-fundraising-dash-jslint - wikimedia-fundraising-dash-npm gate-and-submit: - #- wikimedia-fundraising-dash-jslint + - wikimedia-fundraising-dash-jslint - wikimedia-fundraising-dash-npm - name: wikimedia/fundraising/tools -- To view, visit https://gerrit.wikimedia.org/r/169577 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I905b1d76606ca85a129a61ea74f51ba8c6979939 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing documentation - change (mediawiki...MobileFrontend)
Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/169578 Change subject: Add missing documentation .. Add missing documentation Add missing documentation for: Overlay.js Page.js PageApi.js Panel.js modes.js Change-Id: I61900a88fdab81e1923fe0e1f97000b607f08095 --- M javascripts/Overlay.js M javascripts/Page.js M javascripts/PageApi.js M javascripts/Panel.js M javascripts/modes.js 5 files changed, 31 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/78/169578/1 diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js index 8533e2e..ca29145 100644 --- a/javascripts/Overlay.js +++ b/javascripts/Overlay.js @@ -8,6 +8,7 @@ Overlay; /** +* Mobile modal * @class Overlay * @extends View */ @@ -23,6 +24,7 @@ */ closeOnBack: false, /** +* Is overlay fullscreen * @type {Boolean} */ fullScreen: true, @@ -35,6 +37,7 @@ appendTo: '#mw-mf-viewport', /** +* Default classname * @type {String} */ className: 'overlay', @@ -55,6 +58,7 @@ fixedHeader: true }, /** +* Flag overlay to close on content tap * @type {Boolean} */ closeOnContentTap: false, @@ -122,6 +126,7 @@ }, /** +* Attach overlay to current view * @method */ show: function () { diff --git a/javascripts/Page.js b/javascripts/Page.js index a447ffd..3cba68c 100644 --- a/javascripts/Page.js +++ b/javascripts/Page.js @@ -47,6 +47,7 @@ }, /** +* Determines if content model is wikitext * @method * @return {Boolean} */ @@ -55,6 +56,7 @@ }, /** +* Checks whether the current page is the main page * @method * @return {Boolean} */ @@ -95,6 +97,7 @@ }, /** +* Return page title * @method * @return {string} */ @@ -103,6 +106,7 @@ }, /** +* Return page id * @method * @return {Number} */ @@ -111,6 +115,7 @@ }, /** +* return namespace id * @method * @return {Number} namespace Number */ @@ -125,6 +130,7 @@ }, /** +* Determines if current page is a talk page * @method * @return {Boolean} Whether the page is a talk page or not */ @@ -134,6 +140,9 @@ return ns 0 ns % 2 === 1; }, + /** +* @inheritDoc +*/ preRender: function ( options ) { var self = this; this.sections = []; @@ -149,6 +158,7 @@ }, /** +* Return reference section * @method */ getReferenceSection: function () { diff --git a/javascripts/PageApi.js b/javascripts/PageApi.js index 33d4f29..86367b5 100644 --- a/javascripts/PageApi.js +++ b/javascripts/PageApi.js @@ -8,7 +8,8 @@ * section of listOfSections. If listOfSections is empty, just add child to it. * @method * @private -* @param {Array} listOfSections +* @member PageApi +* @param {Array} listOfSections - Array of section ids * @param {Object} child - Section to be added to listOfSections */ function assignToParent( listOfSections, child ) { @@ -32,7 +33,8 @@ * Order sections hierarchically * @method * @private -* @param {Array} sections +* @member PageApi +* @param {Array} sections Array of section objects created from response HTML * @returns {Array} */ function transformSections( sections ) { @@ -80,7 +82,8 @@ } /** -* @class PageApi +* API for providing Page data +* @class PageAp * @extends Api */ PageApi = Api.extend( { diff --git a/javascripts/Panel.js b/javascripts/Panel.js index 34e01e5..f7b9795 100644 --- a/javascripts/Panel.js +++ b/javascripts/Panel.js @@ -28,6 +28,7 @@ }, /** +*
[MediaWiki-commits] [Gerrit] Tests: Compare en.json and qqq.json message keys - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/169579 Change subject: Tests: Compare en.json and qqq.json message keys .. Tests: Compare en.json and qqq.json message keys Bug: 35942 Change-Id: Ieb7759057867b73b368749202610370fb3b18811 --- A tests/phpunit/structure/MessageKeyTest.php 1 file changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/79/169579/1 diff --git a/tests/phpunit/structure/MessageKeyTest.php b/tests/phpunit/structure/MessageKeyTest.php new file mode 100644 index 000..8748f13 --- /dev/null +++ b/tests/phpunit/structure/MessageKeyTest.php @@ -0,0 +1,40 @@ +?php + +class MessageKeyTest extends MediaWikiTestCase { + /** +* Assert that there for each english message key a message key in the qqq file exists, +* which contains a message documentation for translators. +* It can also use templates from translatewiki.net +*/ + public function testMessageKeys() { + global $wgMessagesDirs; + + $lcache = Language::getLocalisationCache(); + $messageKeysEn = array(); + $messageKeysQqq = array(); + foreach ( $wgMessagesDirs as $dirs ) { + foreach ( (array)$dirs as $dir ) { + $dataEn = $lcache-readJSONFile( $dir/en.json ); + $messageKeysEn = array_merge( $messageKeysEn, $dataEn['messages'] ); + + $dataQqq = $lcache-readJSONFile( $dir/qqq.json ); + $messageKeysQqq = array_merge( $messageKeysQqq, $dataQqq['messages'] ); + } + } + + // Remove all the same keys to make the assertEquals output nicer/smaller + foreach ( $messageKeysEn as $key = $data ) { + if ( isset( $messageKeysQqq[$key] ) ) { + unset( $messageKeysEn[$key] ); + unset( $messageKeysQqq[$key] ); + } + } + + // Not using assertEmpty to get all the keys as a diff + $this-assertEquals( + array_keys( $messageKeysEn ), + array_keys( $messageKeysQqq ), + 'Each english message should have a message documentation in language file \'qqq\'' + ); + } +} -- To view, visit https://gerrit.wikimedia.org/r/169579 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb7759057867b73b368749202610370fb3b18811 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove catrope from ops, add to -oid-roots - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: remove catrope from ops, add to -oid-roots .. remove catrope from ops, add to -oid-roots apparently Roan doesn't want root anymore, so for that we should remove him from the ops admin group, see ticket RT 8686 since ops gave him global access, we now add him to relevant groups he should still keep, which are basically all services ending in -oid, remove: ops add: parsoid-roots, gerrit-root, deployment, mathoid-roots/admins, citoid-roots this is still removing a bunch of access Change-Id: I21864c1742580758bf37fb48460323e04df38c4a RT: 8686 --- M modules/admin/data/data.yaml 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: Andrew Bogott: Looks good to me, but someone else must approve Rush: Looks good to me, but someone else must approve Catrope: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index b735c86..fc4d3ce 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -9,13 +9,13 @@ ops: gid: 700 description: include everywhere ops folks -members: [filippo, jgreen, bblack, andrew, faidon, rush, marc, oblivian, laner, catrope, +members: [filippo, jgreen, bblack, andrew, faidon, rush, marc, oblivian, laner, dzahn, akosiaris, springle, mark, gage, ariel, cmjohnson, otto, robh, tstarling, ori] privs: ['ALL = (ALL) NOPASSWD: ALL'] parsoid-roots: gid: 701 description: RT 5934 -members: [gwicke] +members: [gwicke, catrope] privs: ['ALL = (parsoid) NOPASSWD: ALL'] parsoid-admin: gid: 702 @@ -28,7 +28,7 @@ gerrit-root: gid: 703 description: manage gerrit server -members: [demon] +members: [demon, catrope] privs: ['ALL = NOPASSWD: ALL'] gerrit-admin: gid: 704 @@ -42,7 +42,7 @@ gjg, gwicke, halfak, hashar, hoo, kaldari, kartik, khorn, krinkle, manybubbles, maxsem, mattflaschen, marktraceur, milimetric, mlitn, nikerabbit, phuedx, reedy, rmoen, robla, spage, ssastry, tomasz, yurik, - tgr, ssmith, bsimmers, ejegg, twentyafterfour, legoktm] + tgr, ssmith, bsimmers, ejegg, twentyafterfour, legoktm, catrope] restricted: gid: 706 description: access to terbium, fluorine (private data) and bastion hosts @@ -180,12 +180,12 @@ mathoid-roots: gid: 729 description: root rights for mathoid -members: [gwicke] +members: [gwicke, catrope] privs: ['ALL = (mathoid) NOPASSWD: ALL'] mathoid-admin: gid: 730 description: group of mathoid admins -members: [gwicke] +members: [gwicke, catrope] privs: ['ALL = (root) NOPASSWD: /usr/sbin/service mathoid stop', 'ALL = (root) NOPASSWD: /usr/sbin/service mathoid start', 'ALL = (root) NOPASSWD: /usr/sbin/service mathoid restart', @@ -228,12 +228,12 @@ citoid-roots: gid: 735 description: root rights for citoid -members: [gwicke] +members: [gwicke, catrope] privs: ['ALL = (citoid) NOPASSWD: ALL'] citoid-admin: gid: 736 description: group of citoid admins -members: [gwicke] +members: [gwicke, catrope] privs: ['ALL = (root) NOPASSWD: /usr/sbin/service citoid stop', 'ALL = (root) NOPASSWD: /usr/sbin/service citoid start', 'ALL = (root) NOPASSWD: /usr/sbin/service citoid restart', -- To view, visit https://gerrit.wikimedia.org/r/169566 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I21864c1742580758bf37fb48460323e04df38c4a Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: John F. Lewis johnflewi...@gmail.com Gerrit-Reviewer: RobH r...@wikimedia.org Gerrit-Reviewer: Rush r...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Temporarily make jslint non-voting in fundraising/dash - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Revert Temporarily make jslint non-voting in fundraising/dash .. Revert Temporarily make jslint non-voting in fundraising/dash The change has not been deployed on gallium nor has it been properly reviewed. As a safe move I am reverting it for now. This reverts commit 7c2fbf4d6dbc8e56e6fcd4a4a7cba38a85d52683. Change-Id: I905b1d76606ca85a129a61ea74f51ba8c6979939 --- M zuul/layout.yaml 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 79c2677..e4e22f0 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2526,13 +2526,11 @@ - wikimedia-bugzilla-wikibugs-perllint - name: wikimedia/fundraising/dash -check-only: - - wikimedia-fundraising-dash-jslint check-voter: - #- wikimedia-fundraising-dash-jslint + - wikimedia-fundraising-dash-jslint - wikimedia-fundraising-dash-npm gate-and-submit: - #- wikimedia-fundraising-dash-jslint + - wikimedia-fundraising-dash-jslint - wikimedia-fundraising-dash-npm - name: wikimedia/fundraising/tools -- To view, visit https://gerrit.wikimedia.org/r/169577 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I905b1d76606ca85a129a61ea74f51ba8c6979939 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Add WP form tests for button copy - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/169580 Change subject: Revert Add WP form tests for button copy .. Revert Add WP form tests for button copy This reverts commit f764fbda0f82642ce167db951803bcacc40b13dc. Change-Id: I36f34c0452f8c82013092ed2981d6017786c2ece --- M DonationInterfaceFormSettings.php 1 file changed, 0 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/80/169580/1 diff --git a/DonationInterfaceFormSettings.php b/DonationInterfaceFormSettings.php index 454a226..4431b14 100644 --- a/DonationInterfaceFormSettings.php +++ b/DonationInterfaceFormSettings.php @@ -493,20 +493,6 @@ 'payment_methods' = array( 'cc' = 'ALL' ), 'selection_weight' = 0 ); - - /* -* WorldPay Form Tests * -*/ - - $worldpay_test_spec = array( - 'file' = $form_dirs['worldpay'] . '/worldpay-test.html', - ) + $forms_whitelist['worldpay']; - - $forms_whitelist['wp-sn'] = $worldpay_test_spec; - $forms_whitelist['wp-sw'] = $worldpay_test_spec; - $forms_whitelist['wp-fud'] = $worldpay_test_spec; - $forms_whitelist['wp-btnb'] = $worldpay_test_spec; - $forms_whitelist['wp-btng'] = $worldpay_test_spec; } /* * *** -- To view, visit https://gerrit.wikimedia.org/r/169580 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36f34c0452f8c82013092ed2981d6017786c2ece Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_23 Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rewrite getPhotos function in flickerripper - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Rewrite getPhotos function in flickerripper .. Rewrite getPhotos function in flickerripper It has been done to avoid using duplicate codes. See https://scrutinizer-ci.com/g/wikimedia/pywikibot-core/indices/373851/duplications/23725239 Change-Id: I4f000ed09d688f375b3681536d3ca214c2457e60 --- M scripts/flickrripper.py 1 file changed, 28 insertions(+), 69 deletions(-) Approvals: XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py index 0f5302d..514a15b 100644 --- a/scripts/flickrripper.py +++ b/scripts/flickrripper.py @@ -424,87 +424,46 @@ user_id=user_id, tags=tags, per_page='100', page='1') pages = photos.find('photos').attrib['pages'] - -for i in range(1, int(pages) + 1): -gotPhotos = False -while not gotPhotos: -try: -for photo in flickr.groups_pools_getPhotos( -group_id=group_id, user_id=user_id, tags=tags, -per_page='100', page=i -).find('photos').getchildren(): -gotPhotos = True -if photo.attrib['id'] == start_id: -found_start_id = True -if found_start_id: -if photo.attrib['id'] == end_id: -pywikibot.output('Found end_id') -return -else: -yield photo.attrib['id'] - -except flickrapi.exceptions.FlickrError: -gotPhotos = False -pywikibot.output(u'Flickr api problem, sleeping') -time.sleep(30) - +gen = lambda i: flickr.groups_pools_getPhotos( +group_id=group_id, user_id=user_id, tags=tags, +per_page='100', page=i +).find('photos').getchildren() # https://www.flickr.com/services/api/flickr.photosets.getPhotos.html # Get the photos in a photoset elif photoset_id: photos = flickr.photosets_getPhotos(photoset_id=photoset_id, per_page='100', page='1') pages = photos.find('photoset').attrib['pages'] - -for i in range(1, int(pages) + 1): -gotPhotos = False -while not gotPhotos: -try: -for photo in flickr.photosets_getPhotos( -photoset_id=photoset_id, per_page='100', page=i -).find('photoset').getchildren(): -gotPhotos = True -if photo.attrib['id'] == start_id: -found_start_id = True -if found_start_id: -if photo.attrib['id'] == end_id: -pywikibot.output('Found end_id') -return -else: -yield photo.attrib['id'] - -except flickrapi.exceptions.FlickrError: -gotPhotos = False -pywikibot.output(u'Flickr api problem, sleeping') -time.sleep(30) - +gen = lambda i: flickr.photosets_getPhotos( +photoset_id=photoset_id, per_page='100', page=i +).find('photoset').getchildren() # https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html # Get the (public) photos uploaded by a user elif user_id: photos = flickr.people_getPublicPhotos(user_id=user_id, per_page='100', page='1') pages = photos.find('photos').attrib['pages'] -# flickrapi.exceptions.FlickrError -for i in range(1, int(pages) + 1): -gotPhotos = False -while not gotPhotos: -try: -for photo in flickr.people_getPublicPhotos( -user_id=user_id, per_page='100', page=i -).find('photos').getchildren(): -gotPhotos = True -if photo.attrib['id'] == start_id: -found_start_id = True -if found_start_id: -if photo.attrib['id'] == end_id: -pywikibot.output('Found end_id') -return -else: -yield photo.attrib['id'] - -except flickrapi.exceptions.FlickrError: -gotPhotos = False -pywikibot.output(u'Flickr api problem,
[MediaWiki-commits] [Gerrit] Revert Add WP form tests for button copy - change (mediawiki/core)
Awight has submitted this change and it was merged. Change subject: Revert Add WP form tests for button copy .. Revert Add WP form tests for button copy This reverts commit f764fbda0f82642ce167db951803bcacc40b13dc. Change-Id: I36f34c0452f8c82013092ed2981d6017786c2ece --- M DonationInterfaceFormSettings.php 1 file changed, 0 insertions(+), 14 deletions(-) Approvals: Awight: Verified; Looks good to me, approved diff --git a/DonationInterfaceFormSettings.php b/DonationInterfaceFormSettings.php index 454a226..4431b14 100644 --- a/DonationInterfaceFormSettings.php +++ b/DonationInterfaceFormSettings.php @@ -493,20 +493,6 @@ 'payment_methods' = array( 'cc' = 'ALL' ), 'selection_weight' = 0 ); - - /* -* WorldPay Form Tests * -*/ - - $worldpay_test_spec = array( - 'file' = $form_dirs['worldpay'] . '/worldpay-test.html', - ) + $forms_whitelist['worldpay']; - - $forms_whitelist['wp-sn'] = $worldpay_test_spec; - $forms_whitelist['wp-sw'] = $worldpay_test_spec; - $forms_whitelist['wp-fud'] = $worldpay_test_spec; - $forms_whitelist['wp-btnb'] = $worldpay_test_spec; - $forms_whitelist['wp-btng'] = $worldpay_test_spec; } /* * *** -- To view, visit https://gerrit.wikimedia.org/r/169580 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36f34c0452f8c82013092ed2981d6017786c2ece Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_23 Gerrit-Owner: Awight awi...@wikimedia.org Gerrit-Reviewer: Awight awi...@wikimedia.org 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 WikiGrok - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Add WikiGrok .. Add WikiGrok Change-Id: I0472dcd0ae258d330e4c13334125cd3a29b5b86d --- M jjb/mediawiki-extensions.yaml M zuul/layout.yaml 2 files changed, 7 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml index 43b4033..0a06faa 100644 --- a/jjb/mediawiki-extensions.yaml +++ b/jjb/mediawiki-extensions.yaml @@ -974,6 +974,8 @@ - WikidataEntitySuggester - WikiEditor - WikiForum + - WikiGrok: +dependencies: 'MobileFrontend,Mantle' - wikihiero - WikiLexicalData - Wikilog @@ -1419,4 +1421,3 @@ bundlecommand: - rubocop - '{name}-ruby1.9.3lint' - diff --git a/zuul/layout.yaml b/zuul/layout.yaml index e4e22f0..c7b207b 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -5672,6 +5672,11 @@ template: - name: extension-unittests + - name: mediawiki/extensions/WikiGrok +template: + - name: extension-unittests + - name: extension-phpcs + - name: mediawiki/extensions/WikiObjectModel template: - name: extension-unittests -- To view, visit https://gerrit.wikimedia.org/r/169551 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0472dcd0ae258d330e4c13334125cd3a29b5b86d Gerrit-PatchSet: 5 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Krinkle krinklem...@gmail.com 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 namespaced CiviMailing exceptions - change (wikimedia...crm)
Awight has submitted this change and it was merged. Change subject: Fix namespaced CiviMailing exceptions .. Fix namespaced CiviMailing exceptions Change-Id: I9ebc921c951b1ab14cc506ff7b9a77d7c1f1d1e7 --- M sites/all/modules/thank_you/thank_you.module 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Awight: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 60380a0..55719a2 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -1,6 +1,9 @@ ?php use wmf_communication\CiviMailStore; +use wmf_communication\CiviMailingInsertException; +use wmf_communication\CiviMailingMissingException; +use wmf_communication\CiviQueueInsertException; use wmf_communication\Mailer; use wmf_communication\Templating; use wmf_communication\Translation; -- To view, visit https://gerrit.wikimedia.org/r/169564 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ebc921c951b1ab14cc506ff7b9a77d7c1f1d1e7 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: Awight awi...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Trigger tap events on phones where both touch and mouse are ... - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/169581 Change subject: Trigger tap events on phones where both touch and mouse are supported .. Trigger tap events on phones where both touch and mouse are supported Bug: 72566 Change-Id: I24dcb20291e909ed4a12ee21f6844d801c916c81 --- M javascripts/externals/micro.tap.js 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/81/169581/1 diff --git a/javascripts/externals/micro.tap.js b/javascripts/externals/micro.tap.js index a3f05b7..8b9f3c5 100644 --- a/javascripts/externals/micro.tap.js +++ b/javascripts/externals/micro.tap.js @@ -33,9 +33,11 @@ moved = true; }). on('touchend', handleTap); - } else { -// FIXME: jQuery's on() doesn't allow useCapture argument (last argument, true) -window.addEventListener('mouseup', handleTap, true); } + + // Unconditionally register the mouseup as certain devices may support both touch + // and mouse events e.g. BlackBerry Bold 9900 + // FIXME: jQuery's on() doesn't allow useCapture argument (last argument, true) + window.addEventListener('mouseup', handleTap, true); }(jQuery)); -- To view, visit https://gerrit.wikimedia.org/r/169581 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24dcb20291e909ed4a12ee21f6844d801c916c81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move linebreaking back into Mailer::normalizeContent - change (wikimedia...crm)
Awight has submitted this change and it was merged. Change subject: Move linebreaking back into Mailer::normalizeContent .. Move linebreaking back into Mailer::normalizeContent Breaking the lines in thank_you_render was adding newlines inside the template info comment, making it impossible to add CiviMail records for thank you templates. Change-Id: Id842dcfde654c1dbd64d3de5b8b5fcd19cbe4ea6 --- M sites/all/modules/thank_you/thank_you.module M sites/all/modules/wmf_communication/Mailer.php 2 files changed, 1 insertion(+), 2 deletions(-) Approvals: Awight: Verified; Looks good to me, approved diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 55719a2..30a7fcf 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -724,7 +724,6 @@ $page_content = $template-render( 'html' ); $page_content = str_replace( 'p/p', '', $page_content ); -$page_content = wordwrap( $page_content, 100 ); return $page_content; } diff --git a/sites/all/modules/wmf_communication/Mailer.php b/sites/all/modules/wmf_communication/Mailer.php index 94b2739..647bfdd 100644 --- a/sites/all/modules/wmf_communication/Mailer.php +++ b/sites/all/modules/wmf_communication/Mailer.php @@ -122,7 +122,7 @@ protected function normalizeContent( $email ) { $converter = new Html2Text( $email['html'], false, array( 'do_links' = 'table' ) ); -$email['plaintext'] = $converter-get_text(); +$email['plaintext'] = wordwrap( $converter-get_text(), 100 ); if ( $email['plaintext'] === false ) { watchdog( 'thank_you', Text rendering of template failed in {$email['locale']}., array(), WATCHDOG_ERROR ); -- To view, visit https://gerrit.wikimedia.org/r/169565 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id842dcfde654c1dbd64d3de5b8b5fcd19cbe4ea6 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: Awight awi...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change above-the-fold layout - step 1 - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Change above-the-fold layout - step 1 .. Change above-the-fold layout - step 1 * remove chevron * adjust colors Change-Id: I443fd757f5df18d099e42a81f1f323fadea77987 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833 --- M MultimediaViewer.php M i18n/en.json M resources/mmv/mmv.lightboxinterface.less D resources/mmv/ui/img/drag-active.svg D resources/mmv/ui/img/drag.svg M resources/mmv/ui/mmv.ui.metadataPanel.less M resources/mmv/ui/mmv.ui.metadataPanelScroller.js M resources/mmv/ui/mmv.ui.metadataPanelScroller.less M tests/qunit/mmv/ui/mmv.ui.metadataPanelScroller.test.js 9 files changed, 13 insertions(+), 216 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 46bffd5..200b0c7 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -590,8 +590,6 @@ 'multimediaviewer-credit-popup-text', 'multimediaviewer-title-popup-text-more', 'multimediaviewer-credit-popup-text-more', - 'multimediaviewer-panel-open-popup-text', - 'multimediaviewer-panel-close-popup-text', ), ), diff --git a/i18n/en.json b/i18n/en.json index 9dbccdc..7bc3d7e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1,8 +1,8 @@ { @metadata: { - authors: [ - Mark Holmquist mtrac...@member.fsf.org - ] + authors: [ + Mark Holmquist mtrac...@member.fsf.org + ] }, multimediaviewer-desc: Expand thumbnails in a larger size in a fullscreen interface., multimediaviewer-desc-nil: No description available., @@ -108,8 +108,6 @@ multimediaviewer-credit-popup-text: Author and source information, multimediaviewer-title-popup-text-more: Click to show full file name, multimediaviewer-credit-popup-text-more: Click to show full author and source, - multimediaviewer-panel-open-popup-text: More details, - multimediaviewer-panel-close-popup-text: Fewer details, multimediaviewer-download-attribution-cta-header: You need to attribute the author, multimediaviewer-download-attribution-cta: Show me how, multimediaviewer-attr-plain: Plain, diff --git a/resources/mmv/mmv.lightboxinterface.less b/resources/mmv/mmv.lightboxinterface.less index 40690af..06741a4 100644 --- a/resources/mmv/mmv.lightboxinterface.less +++ b/resources/mmv/mmv.lightboxinterface.less @@ -69,7 +69,7 @@ // Javascript to get the default height. min-height: @metadatabar-above-fold-height; position: relative; - border-bottom: 1px solid #dd; + border-bottom: 1px solid #eee; .jq-fullscreened { height: @metadatabar-above-fold-fullscreen-height; diff --git a/resources/mmv/ui/img/drag-active.svg b/resources/mmv/ui/img/drag-active.svg deleted file mode 100644 index 5843f00..000 --- a/resources/mmv/ui/img/drag-active.svg +++ /dev/null @@ -1,24 +0,0 @@ -?xml version=1.0 encoding=UTF-8 standalone=no? -!-- Created with Inkscape (http://www.inkscape.org/) -- - -svg - xmlns:dc=http://purl.org/dc/elements/1.1/; - xmlns:cc=http://creativecommons.org/ns#; - xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; - xmlns:svg=http://www.w3.org/2000/svg; - xmlns=http://www.w3.org/2000/svg; - version=1.1 - width=100% - height=100% - viewBox=0 0 30 16 - id=Layer_1 - xml:space=preservemetadata - id=metadata9rdf:RDFcc:Work - rdf:about=dc:formatimage/svg+xml/dc:formatdc:type - rdf:resource=http://purl.org/dc/dcmitype/StillImage; /dc:title/dc:title/cc:Work/rdf:RDF/metadatadefs - id=defs7 / -path - d=m 24.5,12.2 c -0.2,0 -0.4,0 -0.5,-0.1 L 15,6.9 6,12.1 C 5.8,12.2 5.7,12.2 5.5,12.2 5.1,12.2 4.8,12 4.6,11.7 L 4.2,11 C 4,10.8 4,10.5 4.1,10.2 4.2,9.9 4.3,9.7 4.6,9.6 l 10.1,-5.8 0.4,0 0.1,0 h 0.2 l 0.2,0.1 9.9,5.7 c 0.2,0.1 0.4,0.4 0.5,0.6 0.1,0.3 0,0.5 -0.1,0.8 l -0.4,0.7 c -0.3,0.3 -0.6,0.5 -1,0.5 z - id=path3 - style=fill:#ff / -/svg \ No newline at end of file diff --git a/resources/mmv/ui/img/drag.svg b/resources/mmv/ui/img/drag.svg deleted file mode 100644 index c116cf4..000 --- a/resources/mmv/ui/img/drag.svg +++ /dev/null @@ -1,24 +0,0 @@ -?xml version=1.0 encoding=UTF-8 standalone=no? -!-- Created with Inkscape (http://www.inkscape.org/) -- - -svg - xmlns:dc=http://purl.org/dc/elements/1.1/; - xmlns:cc=http://creativecommons.org/ns#; - xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; - xmlns:svg=http://www.w3.org/2000/svg; - xmlns=http://www.w3.org/2000/svg; - version=1.1 - width=100% - height=100% - viewBox=0 0 30 16 - id=Layer_1 - xml:space=preservemetadata -
[MediaWiki-commits] [Gerrit] Tap code be gone! - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/169582 Change subject: Tap code be gone! .. Tap code be gone! ios8 [1] has no need for it, neither does Chrome mobile [2] The existing code doesn't work on IE8 or Blackberry touch/mouse wheel devices [1] https://github.com/ftlabs/fastclick/issues/262#issuecomment-56023175 [2] http://updates.html5rocks.com/2013/12/300ms-tap-delay-gone-away Bug: 72566 Bug: 72645 Change-Id: I049f9ec51f972f595bb6555c5528debb21e4c489 --- M includes/Resources.php M javascripts/Drawer.js M javascripts/Overlay.js D javascripts/externals/micro.tap.js M javascripts/loggingSchemas/MobileWebClickTracking.js M javascripts/loggingSchemas/mobileWebCta.js M javascripts/mainmenu.js M javascripts/modules/editor/EditorOverlay.js M javascripts/modules/editor/EditorOverlayBase.js M javascripts/modules/editor/editor.js M javascripts/modules/languages/languages.js M javascripts/modules/mediaViewer/init.js M javascripts/modules/notifications/notifications.js M javascripts/modules/search/SearchOverlay.js M javascripts/modules/search/search.js M javascripts/modules/talk/TalkSectionAddOverlay.js M javascripts/modules/talk/TalkSectionOverlay.js M javascripts/modules/toc/toc.js M javascripts/modules/toggling/toggle.js M javascripts/modules/tutorials/newbieEditor.js M javascripts/modules/uploads/PhotoUploadOverlay.js M javascripts/modules/uploads/PhotoUploadProgress.js M javascripts/modules/uploads/UploadTutorial.js M tests/qunit/modules/toggling/test_toggle.js 24 files changed, 38 insertions(+), 81 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/82/169582/1 diff --git a/includes/Resources.php b/includes/Resources.php index 59b8b34..d9e095b 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -624,7 +624,6 @@ 'ctaDrawer.hogan', ), 'scripts' = array( - 'javascripts/externals/micro.tap.js', 'javascripts/modules/routes.js', 'javascripts/Drawer.js', 'javascripts/CtaDrawer.js', diff --git a/javascripts/Drawer.js b/javascripts/Drawer.js index 6716ce1..ccf0572 100644 --- a/javascripts/Drawer.js +++ b/javascripts/Drawer.js @@ -33,7 +33,7 @@ } ); // Allow the drawer itself to be clickable (e.g. for copying and pasting references / clicking links in reference) - this.$el.on( 'tap', function ( ev ) { + this.$el.on( 'click', function ( ev ) { ev.stopPropagation(); } ); } diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js index 8533e2e..d9bd5a1 100644 --- a/javascripts/Overlay.js +++ b/javascripts/Overlay.js @@ -68,7 +68,7 @@ // Truncate any text inside in the overlay header. this.$( '.overlay-header h2 span' ).addClass( 'truncated-text' ); // FIXME: Remove .initial-header selector when bug 71203 resolved. - this.$( '.cancel, .confirm, .initial-header .back' ).on( 'tap', function ( ev ) { + this.$( '.cancel, .confirm, .initial-header .back' ).on( 'click', function ( ev ) { ev.preventDefault(); ev.stopPropagation(); if ( self.closeOnBack ) { @@ -79,7 +79,7 @@ } ); // stop clicks in the overlay from propagating to the page // (prevents non-fullscreen overlays from being closed when they're tapped) - this.$el.on( 'tap', function ( ev ) { + this.$el.on( 'click', function ( ev ) { ev.stopPropagation(); } ); @@ -142,7 +142,7 @@ } if ( this.closeOnContentTap ) { - $( '#mw-mf-page-center' ).one( 'tap', $.proxy( this, 'hide' ) ); + $( '#mw-mf-page-center' ).one( 'click', $.proxy( this, 'hide' ) ); } // prevent scrolling and bouncing outside of .overlay-content diff --git a/javascripts/externals/micro.tap.js b/javascripts/externals/micro.tap.js deleted file mode 100644 index a3f05b7..000 --- a/javascripts/externals/micro.tap.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * micro.tap - * Makes tap event available in jQuery. - * This can be used to beat the 300ms delay that plagues iOS Safari. - * @see https://developers.google.com/mobile/articles/fast_buttons - * Note: Surplus in Chrome 32 (http://updates.html5rocks.com/2013/12/300ms-tap-delay-gone-away) - *
[MediaWiki-commits] [Gerrit] Add persistent anonymized WikiGrok user token - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Add persistent anonymized WikiGrok user token .. Add persistent anonymized WikiGrok user token Change-Id: If995661b53b1da30a4271782f12248ec9435f7c2 --- M includes/skins/SkinMinervaBeta.php M javascripts/loggingSchemas/mobileWebWikiGrok.js M javascripts/modules/wikigrok/WikiGrokDialog.js M javascripts/modules/wikigrok/wikigrok.js 4 files changed, 29 insertions(+), 5 deletions(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/skins/SkinMinervaBeta.php b/includes/skins/SkinMinervaBeta.php index 1017af0..51072a1 100644 --- a/includes/skins/SkinMinervaBeta.php +++ b/includes/skins/SkinMinervaBeta.php @@ -43,15 +43,11 @@ * @return array */ public function getSkinConfigVariables() { - global $wgMFEnableWikiGrok; $vars = parent::getSkinConfigVariables(); // Kill this when we fix the functionality in PageApi.js $user = $this-getUser(); if ( $user-isLoggedIn() ) { $vars['wgMFUserGender'] = $this-getUser()-getOption( 'gender' ); - if ( $wgMFEnableWikiGrok ) { - $vars['wgMFUserNameHash'] = hash( 'sha256', $user-getName() ); - } } else { $vars['wgMFUserGender'] = 'unknown'; } diff --git a/javascripts/loggingSchemas/mobileWebWikiGrok.js b/javascripts/loggingSchemas/mobileWebWikiGrok.js index 43e213f..0d30f9f 100644 --- a/javascripts/loggingSchemas/mobileWebWikiGrok.js +++ b/javascripts/loggingSchemas/mobileWebWikiGrok.js @@ -9,7 +9,6 @@ // If the user is logged in, record username and edit count if ( !user.isAnon() ) { options.userEditCount = user.getEditCount(); - options.userToken = mw.config.get( 'wgMFUserNameHash' ); } return M.log( 'MobileWebWikiGrok', $.extend( options, data ) ); } diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js b/javascripts/modules/wikigrok/WikiGrokDialog.js index 49c5d48..af4c71c 100644 --- a/javascripts/modules/wikigrok/WikiGrokDialog.js +++ b/javascripts/modules/wikigrok/WikiGrokDialog.js @@ -62,6 +62,7 @@ action: action, taskType: 'version ' + this.version, taskToken: this.defaults.taskToken, + userToken: this.options.userToken, // the position of the top of the widget in viewports (as a unit) widgetOffset: ( this.$el.offset().top / $window.height() ).toFixed( 2 ), // top of the document - top of the viewport in viewports (as a unit) diff --git a/javascripts/modules/wikigrok/wikigrok.js b/javascripts/modules/wikigrok/wikigrok.js index f4dcd1e..a0e05d2 100644 --- a/javascripts/modules/wikigrok/wikigrok.js +++ b/javascripts/modules/wikigrok/wikigrok.js @@ -6,6 +6,33 @@ rlModuleName = useDialogB ? 'mobile.wikigrok.dialog.b' : 'mobile.wikigrok.dialog', idOverride; + /** +* Gets the user's token from 'cookie prefix' + -wikiGrokUserToken +* cookie. If the cookie isn't set, then a token is generated, +* stored in the cookie for 90 days, and then returned. +* +* @return {string} +*/ + function getUserToken () { + var cookieName = mw.config.get( 'wgCookiePrefix' ) + '-wikiGrokUserToken', + storedToken = $.cookie( cookieName ), + generatedToken; + + if ( storedToken ) { + return storedToken; + } + + generatedToken = mw.user.generateRandomSessionId(); + + $.cookie( cookieName, generatedToken, { + expires: 90, // (days) + path: '/' + } ); + + return generatedToken; + } + + // Allow query string override for testing, for example, '?wikidataid=Q508703' if ( !wikidataID ) { idOverride = window.location.search.match( /wikidataid=([^]*)/ ); @@ -49,6 +76,7 @@ function init() { var dialog = new WikiGrokDialog( { itemId: wikidataID, title: mw.config.get( 'wgTitle' ), + userToken: getUserToken(), testing: ( idOverride ) ? true : false } ); if ( $( '.toc-mobile' ).length ) { -- To view, visit https://gerrit.wikimedia.org/r/169559 To
[MediaWiki-commits] [Gerrit] Change above-the-fold layout - step 2 - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Change above-the-fold layout - step 2 .. Change above-the-fold layout - step 2 * move license and terms link from title area to attribution area * remove some ineffective styling for elements which have already been removed in earlier changes Change-Id: I5bd41e337a4c8133bfa27e4c4d03162b2d6e35bb Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833 --- M resources/mmv/ui/mmv.ui.metadataPanel.js M resources/mmv/ui/mmv.ui.metadataPanel.less M tests/browser/features/support/pages/e2e_test_page.rb M tests/qunit/mmv/ui/mmv.ui.metadataPanel.test.js 4 files changed, 86 insertions(+), 171 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index 6a1afee..2a9c117 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.js +++ b/resources/mmv/ui/mmv.ui.metadataPanel.js @@ -89,9 +89,6 @@ MPP.empty = function () { this.scroller.empty(); - this.$license.empty().addClass( 'empty' ); - this.$permissionLink.hide(); - this.buttons.empty(); this.description.empty(); @@ -101,6 +98,10 @@ this.$title.empty().removeClass( 'error' ); this.$authorAndSource.empty(); this.$credit.addClass( 'empty' ); + + this.$license.empty().prop( 'href', '#' ); + this.$licenseLi.addClass( 'empty' ); + this.$permissionLink.hide(); this.$username.empty(); this.$usernameLi.addClass( 'empty' ); @@ -135,29 +136,7 @@ this.$container.append( this.$aboveFold ); this.initializeButtons(); // float, needs to be on top - this.initializeTitleAndCredit(); - this.initializeLicense(); - }; - - /** -* Initializes the title and credit elements. -*/ - MPP.initializeTitleAndCredit = function () { - var self = this; - - this.$titleAndCredit = $( 'div' ) - .addClass( 'mw-mmv-title-credit' ) - // Since these elements are created dynamically, we listen this way for logging purposes - .on( 'click', '.mw-mmv-author a', function ( e ) { - self.trackLinkClick.call( this, 'author-page', e ); - } ) - .on( 'click', '.mw-mmv-source a', function ( e ) { - self.trackLinkClick.call( this, 'source-page', e ); - } ) - .appendTo( this.$titleDiv ); - this.initializeTitle(); - this.initializeCredit(); }; /** @@ -166,7 +145,7 @@ MPP.initializeTitle = function () { this.$titlePara = $( 'p' ) .addClass( 'mw-mmv-title-para' ) - .appendTo( this.$titleAndCredit ); + .appendTo( this.$aboveFold ); this.$title = $( 'span' ) .tipsy( { @@ -182,62 +161,8 @@ ); }; - /** -* Initializes the credit elements. -*/ - MPP.initializeCredit = function () { - this.$credit = $( 'p' ) - .addClass( 'mw-mmv-credit empty' ) - .appendTo( this.$titleAndCredit ); - - // we need an inline container for tipsy, otherwise it would be centered weirdly - this.$authorAndSource = $( 'span' ) - .addClass( 'mw-mmv-source-author' ) - .tipsy( { - delayIn: mw.config.get( 'wgMultimediaViewer' ).tooltipDelay, - gravity: this.correctEW( 'sw' ) - } ); - - this.creditField = new mw.mmv.ui.TruncatableTextField( - this.$credit, - this.$authorAndSource, - { max: 200, small: 160 } - ); - - this.creditField.setTitle( - mw.message( 'multimediaviewer-credit-popup-text' ), - mw.message( 'multimediaviewer-credit-popup-text-more' ) - ); - }; - - /** -* Initializes the license elements. -*/ - MPP.initializeLicense = function () { - var panel = this; - - this.$license = $( 'a' ) - .addClass( 'mw-mmv-license empty' ) - .prop( 'href', '#' ) - .appendTo( this.$titlePara ) - .on( 'click', function( e ) { -
[MediaWiki-commits] [Gerrit] Add missing documentation - change (mediawiki...MobileFrontend)
Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/169583 Change subject: Add missing documentation .. Add missing documentation Add missing documentation for: Section.js ContentOverlay.js settings.js uploads.js toast.js user.js Change-Id: Iab9585daafd9c8fe4becd6e0f480b38fe8a5b293 --- M javascripts/Section.js M javascripts/modules/tutorials/ContentOverlay.js M javascripts/settings.js M javascripts/specials/uploads.js M javascripts/toast.js M javascripts/user.js 6 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/83/169583/1 diff --git a/javascripts/Section.js b/javascripts/Section.js index 7103e13..912105f 100644 --- a/javascripts/Section.js +++ b/javascripts/Section.js @@ -5,6 +5,7 @@ Section; /** +* Builds a section of a page * @class Section * @extends View */ diff --git a/javascripts/modules/tutorials/ContentOverlay.js b/javascripts/modules/tutorials/ContentOverlay.js index 25d4d04..89db1fb 100644 --- a/javascripts/modules/tutorials/ContentOverlay.js +++ b/javascripts/modules/tutorials/ContentOverlay.js @@ -10,14 +10,17 @@ ContentOverlay = Overlay.extend( { className: 'overlay content-overlay', /** +* @inheritDoc * @type Boolean */ fullScreen: false, /** +* @inheritDoc * @type Boolean */ closeOnContentTap: true, /** +* @inheritDoc * @type String */ appendTo: '#mw-mf-page-center', @@ -45,6 +48,8 @@ this.addPointerArrow( $( target ) ); }, /** +* Position the overlay under a specified element +* @private * @param {jQuery.Object} $pa An element that should be pointed at by the overlay */ _position: function ( $pa ) { @@ -54,6 +59,8 @@ this.$el.css( 'top', paOffset.top + h ); }, /** +* Position overlay and add pointer arrow +** so that it points at specified element * @method * @param {jQuery.Object} $pa An element that should be pointed at by the overlay */ diff --git a/javascripts/settings.js b/javascripts/settings.js index b138ee7..d1a2b9a 100644 --- a/javascripts/settings.js +++ b/javascripts/settings.js @@ -1,4 +1,5 @@ /** + * Initialize settings * @class mw.mobileFrontend.settings * @singleton */ diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js index 4b4d380..1e1cd82 100644 --- a/javascripts/specials/uploads.js +++ b/javascripts/specials/uploads.js @@ -13,6 +13,7 @@ UserGalleryApi, PhotoItem, PhotoList; /** +* API for retrieving gallery photos * @class UserGalleryApi * @extends Api */ @@ -67,6 +68,7 @@ } ); /** +* Single photo item in gallery * @class PhotoItem * @extends View */ @@ -76,7 +78,9 @@ } ); /** +* Creates a list of photo items * @class PhotoList +* @uses UserGalleryApi * @extends View */ PhotoList = View.extend( { diff --git a/javascripts/toast.js b/javascripts/toast.js index 317d6c6..6206fc9 100644 --- a/javascripts/toast.js +++ b/javascripts/toast.js @@ -10,9 +10,10 @@ className: 'toast position-fixed', minHideDelay: 1000, /** +* Init and show notification * @method -* @param {String} content -* @param {String} className +* @param {String} content Content to be placed in element +* @param {String} className class to add to elemenet */ show: function ( content, className ) { this.$el. diff --git a/javascripts/user.js b/javascripts/user.js index 3fe1616..f452e13 100644 --- a/javascripts/user.js +++ b/javascripts/user.js @@ -2,6 +2,7 @@ var user; /** +* Class representing current MediaWiki user * @class user * @singleton */ -- To view, visit https://gerrit.wikimedia.org/r/169583 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab9585daafd9c8fe4becd6e0f480b38fe8a5b293 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Robmoen rm...@wikimedia.org ___ MediaWiki-commits
[MediaWiki-commits] [Gerrit] Delete obsolete require_once lines - change (wikimedia...crm)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/169584 Change subject: Delete obsolete require_once lines .. Delete obsolete require_once lines Moved to settings.php Change-Id: I82060c47d1202ea4601b84cc8d8e2a9445d5496a --- M sites/all/modules/donor_review/DedupeDiff.php M sites/all/modules/wmf_communication/Templating.php M sites/all/modules/wmf_communication/wmf_communication.module 3 files changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/84/169584/1 diff --git a/sites/all/modules/donor_review/DedupeDiff.php b/sites/all/modules/donor_review/DedupeDiff.php index 3a533e0..f0e28a2 100644 --- a/sites/all/modules/donor_review/DedupeDiff.php +++ b/sites/all/modules/donor_review/DedupeDiff.php @@ -38,8 +38,6 @@ * @return string HTML rendering of diff */ static function charDiff( $str1, $str2 ) { -# FIXME -require_once DRUPAL_ROOT . /../vendor/autoload.php; $matcher = new DiffMatcher(); $renderer = new HtmlDiffRenderer(); $opcodes = $matcher-getOpcodes( $str1, $str2 ); diff --git a/sites/all/modules/wmf_communication/Templating.php b/sites/all/modules/wmf_communication/Templating.php index b1f176b..4d9efaf 100644 --- a/sites/all/modules/wmf_communication/Templating.php +++ b/sites/all/modules/wmf_communication/Templating.php @@ -52,9 +52,6 @@ } static function twig_from_directory( $template_dir ) { -# FIXME: Autoload in settings.php rather than assuming dir structure here. -require_once DRUPAL_ROOT . '/../vendor/autoload.php'; - $loader = new Twig_Loader_Filesystem( $template_dir ); return Templating::twig_from_loader( $loader ); } @@ -164,8 +161,6 @@ * TODO: clean up interface */ static function renderStringTemplate( $template, $params ) { -require_once DRUPAL_ROOT . '/../vendor/autoload.php'; - $loader = new Twig_Loader_String(); $twig = Templating::twig_from_loader( $loader ); diff --git a/sites/all/modules/wmf_communication/wmf_communication.module b/sites/all/modules/wmf_communication/wmf_communication.module index dc2abfa..9066755 100644 --- a/sites/all/modules/wmf_communication/wmf_communication.module +++ b/sites/all/modules/wmf_communication/wmf_communication.module @@ -84,7 +84,6 @@ */ function wmf_communication_silverpop_import_mailings( $days ) { require_once __DIR__ . '/Silverpop/lib/Engage.php'; - require_once DRUPAL_ROOT . '/../vendor/autoload.php'; civicrm_initialize(); $username = variable_get('wmf_communication_silverpop_username', ''); -- To view, visit https://gerrit.wikimedia.org/r/169584 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82060c47d1202ea4601b84cc8d8e2a9445d5496a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg eeggles...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deprecate internal ORMTable::unprefixFieldName(s) - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Deprecate internal ORMTable::unprefixFieldName(s) .. Deprecate internal ORMTable::unprefixFieldName(s) unprefixFieldNames is not used anywhere outside of the class. Why should it? unprefixFieldName became unused in I19194f1, but I did not removed it because it is public. The fact that both methods are public is a mistake as far as I can tell. I can't think of a good reason to do that. Change-Id: Iafc527b5d534648a962a8c2015d21403362bb573 --- M includes/db/IORMTable.php M includes/db/ORMTable.php 2 files changed, 24 insertions(+), 5 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/db/IORMTable.php b/includes/db/IORMTable.php index 4dc693a..6e262e8 100644 --- a/includes/db/IORMTable.php +++ b/includes/db/IORMTable.php @@ -442,10 +442,11 @@ * Takes an array of field names with prefix and returns the unprefixed equivalent. * * @since 1.20 +* @deprecated since 1.25, will be removed * -* @param array $fieldNames +* @param string[] $fieldNames * -* @return array +* @return string[] */ public function unprefixFieldNames( array $fieldNames ); @@ -453,6 +454,7 @@ * Takes a field name with prefix and returns the unprefixed equivalent. * * @since 1.20 +* @deprecated since 1.25, will be removed * * @param string $fieldName * diff --git a/includes/db/ORMTable.php b/includes/db/ORMTable.php index 31f32e5..1868073 100644 --- a/includes/db/ORMTable.php +++ b/includes/db/ORMTable.php @@ -778,12 +778,26 @@ * Takes an array of field names with prefix and returns the unprefixed equivalent. * * @since 1.20 +* @deprecated since 1.25, will be removed * -* @param array $fieldNames +* @param string[] $fieldNames * -* @return array +* @return string[] */ public function unprefixFieldNames( array $fieldNames ) { + wfDeprecated( __METHOD__, '1.25' ); + + return $this-stripFieldPrefix( $fieldNames ); + } + + /** +* Takes an array of field names with prefix and returns the unprefixed equivalent. +* +* @param string[] $fieldNames +* +* @return string[] +*/ + private function stripFieldPrefix( array $fieldNames ) { $start = strlen( $this-fieldPrefix ); return array_map( function( $fieldName ) use ( $start ) { @@ -795,12 +809,15 @@ * Takes a field name with prefix and returns the unprefixed equivalent. * * @since 1.20 +* @deprecated since 1.25, will be removed * * @param string $fieldName * * @return string */ public function unprefixFieldName( $fieldName ) { + wfDeprecated( __METHOD__, '1.25' ); + return substr( $fieldName, strlen( $this-fieldPrefix ) ); } @@ -837,7 +854,7 @@ $result = (array)$result; $rawFields = array_combine( - $this-unprefixFieldNames( array_keys( $result ) ), + $this-stripFieldPrefix( array_keys( $result ) ), array_values( $result ) ); -- To view, visit https://gerrit.wikimedia.org/r/166568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iafc527b5d534648a962a8c2015d21403362bb573 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phab: add monitoring class, monitor TaskMaster - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/169585 Change subject: phab: add monitoring class, monitor TaskMaster .. phab: add monitoring class, monitor TaskMaster add a monitoring class and include it add process monitoring of PhabricatorTaskmasterDaemon currently we have around 20 processes running that match this setting it to warn under 10 and over 40, crit under 1 and over 50. let me know if you think i should change these numbers also, want me to additionally monitor processes matching these? PhabricatorGarbageCollectorDaemon PhabricatorRepositoryPullLocalDaemon Change-Id: Ibde3f548c7de34c038346ed62abf213b5d9384c2 --- M modules/phabricator/manifests/init.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/169585/1 diff --git a/modules/phabricator/manifests/init.pp b/modules/phabricator/manifests/init.pp index 3613591..98ce553 100644 --- a/modules/phabricator/manifests/init.pp +++ b/modules/phabricator/manifests/init.pp @@ -82,6 +82,7 @@ ) { include phabricator::migration +include phabricator::monitoring #A combination of static and dynamic conf parameters must be merged $module_path = get_module_path($module_name) -- To view, visit https://gerrit.wikimedia.org/r/169585 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibde3f548c7de34c038346ed62abf213b5d9384c2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Jenkins job validation (DO NOT SUBMIT) - change (mediawiki...WikiGrok)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/169586 Change subject: Jenkins job validation (DO NOT SUBMIT) .. Jenkins job validation (DO NOT SUBMIT) Change-Id: I0472dcd0ae258d330e4c13334125cd3a29b5b86d --- A JENKINS A jenkins-testfile.py A jenkins.erb A jenkins.js A jenkins.php A jenkins.pp A jenkins.rb 7 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiGrok refs/changes/86/169586/1 diff --git a/JENKINS b/JENKINS new file mode 100644 index 000..e69de29 --- /dev/null +++ b/JENKINS diff --git a/jenkins-testfile.py b/jenkins-testfile.py new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins-testfile.py diff --git a/jenkins.erb b/jenkins.erb new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.erb diff --git a/jenkins.js b/jenkins.js new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.js diff --git a/jenkins.php b/jenkins.php new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.php diff --git a/jenkins.pp b/jenkins.pp new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.pp diff --git a/jenkins.rb b/jenkins.rb new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.rb -- To view, visit https://gerrit.wikimedia.org/r/169586 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0472dcd0ae258d330e4c13334125cd3a29b5b86d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiGrok Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into deployment - change (wikimedia...crm)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/169587 Change subject: Merge remote-tracking branch 'origin/master' into deployment .. Merge remote-tracking branch 'origin/master' into deployment 115ac58 Move linebreaking back into Mailer::normalizeContent 5806528 Fix namespaced CiviMailing exceptions 055474e Got rid of the unused RGC test_url b02d13e Wean remaining usages of legacy DonationInterface checkout Change-Id: I47c58f6b4005da63ea3821d3e3ad358352793553 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/87/169587/1 -- To view, visit https://gerrit.wikimedia.org/r/169587 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47c58f6b4005da63ea3821d3e3ad358352793553 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Ejegg eeggles...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a request timeout before the cpu timeout - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Add a request timeout before the cpu timeout .. Add a request timeout before the cpu timeout Change-Id: If4a4208830fe0041994b5cfb9df5a87ef83c8807 --- M api/routes.js 1 file changed, 61 insertions(+), 43 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/api/routes.js b/api/routes.js index c7cd818..3214573 100644 --- a/api/routes.js +++ b/api/routes.js @@ -35,6 +35,16 @@ // Helpers +// Should be less than the CPU_TIMEOUT +var REQ_TIMEOUT = 4 * 60 * 1000; // 4 minutes +function timeoutResp( env, err ) { + if ( err instanceof Promise.TimeoutError ) { + err = new Error(Request timed out.); + err.stack = null; + } + env.log(fatal/request, err); +} + var CPU_TIMEOUT = 5 * 60 * 1000; // 5 minutes var cpuTimeout = function( p, res ) { return new Promise(function( resolve, reject ) { @@ -72,6 +82,12 @@ } }); }); +}; + +var rtResponse = function( env, req, res, data ) { + apiUtils.setHeader( res, env, 'X-Parsoid-Performance', env.getPerformanceHeader() ); + apiUtils.renderResponse( res, env, roundtrip, data ); + env.log( info, completed parsing in, env.performance.duration, ms ); }; var roundTripDiff = function( env, req, res, selser, doc ) { @@ -115,19 +131,13 @@ var patch = Diff.convertChangesToXML( Diff.diffLines(src, out) ); - apiUtils.setHeader(res, env, 'X-Parsoid-Performance', env.getPerformanceHeader()); - - apiUtils.renderResponse(res, env, roundtrip, { + return { headers: headNodes, bodyNodes: bodyNodes, htmlSpeChars: htmlSpeChars, patch: patch, reqUrl: req.url - }); - - env.log(info, completed parsing in, env.performance.duration, ms); - }).catch(function( err ) { - env.log(fatal/request, err); + }; }); }; @@ -178,8 +188,6 @@ return Promise.promisify( pipeline.parse, false, pipeline )( env, env.page.src, expansions ); - }).catch(function( err ) { - env.log(fatal/request, err); }); }; @@ -191,7 +199,7 @@ // allow cross-domain requests (CORS) so that parsoid service // can be used by third-party sites apiUtils.setHeader(res, env, 'Access-Control-Allow-Origin', - env.conf.parsoid.allowCORS ); + env.conf.parsoid.allowCORS ); } var out = []; @@ -217,14 +225,13 @@ return Promise.promisify( serializer.serializeDOM, false, serializer )( doc.body, function( chunk ) { out.push( chunk ); }, false ); - }).then(function() { + }).timeout( REQ_TIMEOUT ).then(function() { apiUtils.setHeader(res, env, 'Content-Type', 'text/x-mediawiki; charset=UTF-8'); apiUtils.setHeader(res, env, 'X-Parsoid-Performance', env.getPerformanceHeader()); apiUtils.endResponse(res, env, out.join('')); }); - return cpuTimeout(p, res).catch(function( err ) { - env.log(fatal/request, err); - }); + return cpuTimeout( p, res ) + .catch( timeoutResp.bind(null, env) ); }; var wt2html = function( req, res, wt, v2 ) { @@ -275,20 +282,22 @@ resolve( doc ); }); parser.processToplevelDoc( wt ); - }).then( sendRes ); + }); } function parsePageWithOldid() { - if ( !req.headers.cookie ) { - apiUtils.setHeader(res, env, 'Cache-Control', 's-maxage=2592000'); - } else { - // Don't cache requests with a session - apiUtils.setHeader(res, env, 'Cache-Control', 'private,no-cache,s-maxage=0'); - } - // Indicate the MediaWiki revision in a header as well for - // ease of extraction in clients. - apiUtils.setHeader(res, env, 'content-revision-id', oldid); - return parse( env, req, res ).then( sendRes ); + return parse( env, req, res ).then(function( doc ) { + if ( !req.headers.cookie ) { + apiUtils.setHeader(res, env, 'Cache-Control', 's-maxage=2592000'); + } else { + // Don't cache requests with a session + apiUtils.setHeader(res,
[MediaWiki-commits] [Gerrit] Add address to IP (s/IP/IP address) - change (apps...wikipedia)
Southparkfan has uploaded a new change for review. https://gerrit.wikimedia.org/r/169588 Change subject: Add address to IP (s/IP/IP address) .. Add address to IP (s/IP/IP address) Thanks to Siebrand for reporting this, https://translatewiki.net/wiki/Thread:Support/About_Wikimedia:Wikipedia-android-strings-create_account_blocked_anon_error/en. Change-Id: I0b20bedc181af173170a4a7173b5f28c4c76d7f7 --- M wikipedia/res/values-qq/strings.xml M wikipedia/res/values/strings.xml 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/88/169588/1 diff --git a/wikipedia/res/values-qq/strings.xml b/wikipedia/res/values-qq/strings.xml index 23a5e31..97c6752 100644 --- a/wikipedia/res/values-qq/strings.xml +++ b/wikipedia/res/values-qq/strings.xml @@ -175,7 +175,7 @@ string name=create_account_noname_errorUsed as an error message during account creation when the account creation failed because username that was provided is invalid./string string name=create_account_invalid_email_errorUsed as an error message during account creation when the account creation failed because the email that was provided is invalid./string string name=create_account_password_too_short_errorUsed as an error message during account creation when the account creation failed because the password that was entered is too short./string - string name=create_account_blocked_anon_errorUsed as an error message during account creation when the account creation failed because their IP is blocked. + string name=create_account_blocked_anon_errorUsed as an error message during account creation when the account creation failed because their IP address is blocked. See also: * {{msg-wm|Wikipedia-android-strings-create account blocked error}}/string diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml index 9f5d8be..f3fe603 100644 --- a/wikipedia/res/values/strings.xml +++ b/wikipedia/res/values/strings.xml @@ -134,7 +134,7 @@ string name=create_account_noname_errorThe username you provided is invalid. Please provide another username./string string name=create_account_invalid_email_errorThe email address you provided is invalid./string string name=create_account_password_too_short_errorThe password you provided is too short./string -string name=create_account_blocked_anon_errorYou cannot create an account because your IP is blocked./string +string name=create_account_blocked_anon_errorYou cannot create an account because your IP address is blocked./string string name=create_account_blocked_errorYou cannot create an account because your account is blocked./string string name=create_account_password_name_match_errorYour username and your password must be different./string string name=create_account_generic_errorCould not create account/string -- To view, visit https://gerrit.wikimedia.org/r/169588 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b20bedc181af173170a4a7173b5f28c4c76d7f7 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Southparkfan southparkfan...@hotmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove font-size: 0.8em; rule for OOUI change - change (VisualEditor/VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/169589 Change subject: Remove font-size: 0.8em; rule for OOUI change .. Remove font-size: 0.8em; rule for OOUI change Compensates for Id25907c4c4 in oojs-ui. Change-Id: I13791f55bf8acf1b00f5b5d8ebe779f82eb5a1ef (cherry picked from commit 56c30cb6a1b334da57e506ff29ad66c73aca8215) --- M demos/ve/demo.css 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/89/169589/1 diff --git a/demos/ve/demo.css b/demos/ve/demo.css index a571c0c..1911524 100644 --- a/demos/ve/demo.css +++ b/demos/ve/demo.css @@ -62,10 +62,6 @@ margin-right: 1em; } -.ve-demo-languageSearchDialogManager { - font-size: 0.8em; -} - .ve-demo-menu .oo-ui-textInputWidget { width: 4em; } -- To view, visit https://gerrit.wikimedia.org/r/169589 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13791f55bf8acf1b00f5b5d8ebe779f82eb5a1ef Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added node-uuid to the repo - change (mediawiki...deploy)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/169590 Change subject: Added node-uuid to the repo .. Added node-uuid to the repo Change-Id: Id630eb24e19dae2d285e11ffd8a418076e6a873f --- A node_modules/node-uuid/.npmignore A node_modules/node-uuid/LICENSE.md A node_modules/node-uuid/README.md A node_modules/node-uuid/benchmark/README.md A node_modules/node-uuid/benchmark/bench.gnu A node_modules/node-uuid/benchmark/bench.sh A node_modules/node-uuid/benchmark/benchmark-native.c A node_modules/node-uuid/benchmark/benchmark.js A node_modules/node-uuid/component.json A node_modules/node-uuid/package.json A node_modules/node-uuid/test/compare_v1.js A node_modules/node-uuid/test/test.html A node_modules/node-uuid/test/test.js A node_modules/node-uuid/uuid.js 14 files changed, 1,196 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy refs/changes/90/169590/1 diff --git a/node_modules/node-uuid/.npmignore b/node_modules/node-uuid/.npmignore new file mode 100644 index 000..fd4f2b0 --- /dev/null +++ b/node_modules/node-uuid/.npmignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store diff --git a/node_modules/node-uuid/LICENSE.md b/node_modules/node-uuid/LICENSE.md new file mode 100644 index 000..f039427 --- /dev/null +++ b/node_modules/node-uuid/LICENSE.md @@ -0,0 +1,2 @@ +Copyright (c) 2010-2012 Robert Kieffer +MIT License - http://opensource.org/licenses/mit-license.php diff --git a/node_modules/node-uuid/README.md b/node_modules/node-uuid/README.md new file mode 100644 index 000..e436a89 --- /dev/null +++ b/node_modules/node-uuid/README.md @@ -0,0 +1,207 @@ +# node-uuid + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Generate RFC4122 version 1 or version 4 UUIDs +* Runs in node.js and all browsers. +* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). +* Cryptographically strong random # generation on supporting platforms +* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) +* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) + +## Getting Started + +Install it in your browser: + +```html +script src=uuid.js/script +``` + +Or in node.js: + +``` +npm install node-uuid +``` + +```javascript +var uuid = require('node-uuid'); +``` + +Then create some ids ... + +```javascript +// Generate a v1 (time-based) id +uuid.v1(); // - '6c84fb90-12c4-11e1-840d-7b25c5ee775a' + +// Generate a v4 (random) id +uuid.v4(); // - '110ec58a-a0f2-4ac4-8393-c866d813b8d1' +``` + +## API + +### uuid.v1([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Notes: + +1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v1({ + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}); // - 710b962e-041c-11e1-9234-0123456789ab +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +var arr = new Array(32); // - [] +uuid.v1(null, arr, 0); // - [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] +uuid.v1(null, arr, 16); // - [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] + +// Optionally use uuid.unparse() to get stringify the ids +uuid.unparse(buffer);// - '02a2ce90-1432-11e1-8558-0b488e4fc115' +uuid.unparse(buffer, 16) // - '02a31cb0-1432-11e1-8558-0b488e4fc115' +``` + +### uuid.v4([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may
[MediaWiki-commits] [Gerrit] Refactor SprintReportBurndownView - change (phabricator...Sprint)
Christopher Johnson (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/169591 Change subject: Refactor SprintReportBurndownView .. Refactor SprintReportBurndownView Change-Id: I29dd2804e76e3e91f173c235e19d0c1d294fff6c --- M src/view/BurndownDataView.php M src/view/SprintReportBurndownView.php 2 files changed, 70 insertions(+), 76 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint refs/changes/91/169591/1 diff --git a/src/view/BurndownDataView.php b/src/view/BurndownDataView.php index 4ad5323..ac8817b 100644 --- a/src/view/BurndownDataView.php +++ b/src/view/BurndownDataView.php @@ -105,7 +105,7 @@ $transposed_array = array(); if ($array) { foreach ($array as $row_key = $row) { -if (is_array($row) !empty($row)) { //check to see if there is a second dimension +if (is_array($row) !empty($row)) { foreach ($row as $column_key = $element) { $transposed_array[$column_key][$row_key] = $element; } @@ -144,29 +144,37 @@ case task-add: // A task was added to the sprint $operator = +; -$this-changeTasksAddedToday($date, $operator); -$this-changePointsAddedToday($date, $task_phid, $operator); +$stat = tasks_added_today; +$pstat = points_added_today; +$this-changeTasksToday($date, $operator, $stat); +$this-changePointsToday($date, $task_phid, $operator, $pstat); $this-changeTaskInSprint($task_phid, $operator); break; case task-remove: // A task was removed from the sprint $operator = -; -$this-changeTasksAddedToday($date, $operator); -$this-changePointsAddedToday($date, $task_phid, $operator); +$stat = tasks_closed_today; +$pstat = points_closed_today; +$this-changeTasksToday($date, $operator, $stat); +$this-changePointsToday($date, $task_phid, $operator, $pstat); $this-changeTaskInSprint($task_phid, $operator); break; case close: // A task was closed, mark it as done $operator = +; -$this-changeTasksClosedToday($date, $operator); -$this-changePointsClosedToday($date, $task_phid, $operator); +$stat = tasks_closed_today; +$pstat = points_closed_today; +$this-changeTasksToday($date, $operator, $stat); +$this-changePointsToday($date, $task_phid, $operator, $pstat); $this-changeTaskStatuses($task_phid, $operator); break; case reopen: // A task was reopened, subtract from done $operator = -; -$this-changeTasksClosedToday($date, $operator); -$this-changePointsClosedToday($date, $task_phid, $operator); +$stat = tasks_added_today; +$pstat = points_closed_today; +$this-changeTasksToday($date, $operator, $stat); +$this-changePointsToday($date, $task_phid, $operator, $pstat); $this-changeTaskStatuses($task_phid, $operator); break; case points: @@ -177,28 +185,28 @@ } } - private function changeTasksAddedToday($date, $operator) { + private function changeTasksToday($date, $operator, $stat) { switch ($operator) { case +: return -$this-dates[$date]-tasks_added_today += 1; +$this-dates[$date]-$stat += 1; case -: return -$this-dates[$date]-tasks_added_today -= 1; +$this-dates[$date]-$stat -= 1; default: return true; } } - private function changePointsAddedToday($date, $task_phid, $operator) { + private function changePointsToday($date, $task_phid, $operator, $pstat) { if (isset($this-task_points[$task_phid]) == $task_phid) { switch ($operator) { case +: return - $this-dates[$date]-points_added_today += $this-task_points[$task_phid]; + $this-dates[$date]-$pstat += $this-task_points[$task_phid]; case -: return - $this-dates[$date]-points_added_today -= $this-task_points[$task_phid]; + $this-dates[$date]-$pstat -= $this-task_points[$task_phid]; default: return true; } @@ -213,32 +221,6 @@ case -: return $this-task_in_sprint[$task_phid] = 0; - default: - return true; -} - } - - private function changeTasksClosedToday($date, $operator) { -switch ($operator) { - case +: -return -$this-dates[$date]-tasks_closed_today += 1; - case -: -return -$this-dates[$date]-tasks_closed_today -= 1; - default: - return true; -} - } - -
[MediaWiki-commits] [Gerrit] Refactor SprintReportBurndownView - change (phabricator...Sprint)
Christopher Johnson (WMDE) has submitted this change and it was merged. Change subject: Refactor SprintReportBurndownView .. Refactor SprintReportBurndownView Change-Id: I29dd2804e76e3e91f173c235e19d0c1d294fff6c --- M src/view/BurndownDataView.php M src/view/SprintReportBurndownView.php 2 files changed, 70 insertions(+), 76 deletions(-) Approvals: Christopher Johnson (WMDE): Verified; Looks good to me, approved diff --git a/src/view/BurndownDataView.php b/src/view/BurndownDataView.php index 4ad5323..ac8817b 100644 --- a/src/view/BurndownDataView.php +++ b/src/view/BurndownDataView.php @@ -105,7 +105,7 @@ $transposed_array = array(); if ($array) { foreach ($array as $row_key = $row) { -if (is_array($row) !empty($row)) { //check to see if there is a second dimension +if (is_array($row) !empty($row)) { foreach ($row as $column_key = $element) { $transposed_array[$column_key][$row_key] = $element; } @@ -144,29 +144,37 @@ case task-add: // A task was added to the sprint $operator = +; -$this-changeTasksAddedToday($date, $operator); -$this-changePointsAddedToday($date, $task_phid, $operator); +$stat = tasks_added_today; +$pstat = points_added_today; +$this-changeTasksToday($date, $operator, $stat); +$this-changePointsToday($date, $task_phid, $operator, $pstat); $this-changeTaskInSprint($task_phid, $operator); break; case task-remove: // A task was removed from the sprint $operator = -; -$this-changeTasksAddedToday($date, $operator); -$this-changePointsAddedToday($date, $task_phid, $operator); +$stat = tasks_closed_today; +$pstat = points_closed_today; +$this-changeTasksToday($date, $operator, $stat); +$this-changePointsToday($date, $task_phid, $operator, $pstat); $this-changeTaskInSprint($task_phid, $operator); break; case close: // A task was closed, mark it as done $operator = +; -$this-changeTasksClosedToday($date, $operator); -$this-changePointsClosedToday($date, $task_phid, $operator); +$stat = tasks_closed_today; +$pstat = points_closed_today; +$this-changeTasksToday($date, $operator, $stat); +$this-changePointsToday($date, $task_phid, $operator, $pstat); $this-changeTaskStatuses($task_phid, $operator); break; case reopen: // A task was reopened, subtract from done $operator = -; -$this-changeTasksClosedToday($date, $operator); -$this-changePointsClosedToday($date, $task_phid, $operator); +$stat = tasks_added_today; +$pstat = points_closed_today; +$this-changeTasksToday($date, $operator, $stat); +$this-changePointsToday($date, $task_phid, $operator, $pstat); $this-changeTaskStatuses($task_phid, $operator); break; case points: @@ -177,28 +185,28 @@ } } - private function changeTasksAddedToday($date, $operator) { + private function changeTasksToday($date, $operator, $stat) { switch ($operator) { case +: return -$this-dates[$date]-tasks_added_today += 1; +$this-dates[$date]-$stat += 1; case -: return -$this-dates[$date]-tasks_added_today -= 1; +$this-dates[$date]-$stat -= 1; default: return true; } } - private function changePointsAddedToday($date, $task_phid, $operator) { + private function changePointsToday($date, $task_phid, $operator, $pstat) { if (isset($this-task_points[$task_phid]) == $task_phid) { switch ($operator) { case +: return - $this-dates[$date]-points_added_today += $this-task_points[$task_phid]; + $this-dates[$date]-$pstat += $this-task_points[$task_phid]; case -: return - $this-dates[$date]-points_added_today -= $this-task_points[$task_phid]; + $this-dates[$date]-$pstat -= $this-task_points[$task_phid]; default: return true; } @@ -213,32 +221,6 @@ case -: return $this-task_in_sprint[$task_phid] = 0; - default: - return true; -} - } - - private function changeTasksClosedToday($date, $operator) { -switch ($operator) { - case +: -return -$this-dates[$date]-tasks_closed_today += 1; - case -: -return -$this-dates[$date]-tasks_closed_today -= 1; - default: - return true; -} - } - - private function changePointsClosedToday($date,
[MediaWiki-commits] [Gerrit] Update and add missing documentation - change (mediawiki...MobileFrontend)
Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/169592 Change subject: Update and add missing documentation .. Update and add missing documentation Updated documentation for Icon.js Change-Id: I974b98997bb168d2db956316f80a9e20865e177f --- M javascripts/Icon.js M javascripts/LoadingOverlay.js M javascripts/modules/editor/VisualEditorOverlay.js M javascripts/modules/issues/CleanupOverlay.js M javascripts/modules/languages/LanguageOverlay.js M javascripts/modules/mediaViewer/ImageApi.js M javascripts/modules/mediaViewer/ImageOverlay.js M javascripts/modules/nearby/Nearby.js M javascripts/modules/nearby/NearbyApi.js M javascripts/modules/notifications/NotificationsOverlay.js M javascripts/modules/references/references.js M javascripts/modules/search/SearchApi.js M javascripts/modules/search/SearchOverlay.js M javascripts/modules/talk/TalkOverlay.js M javascripts/modules/talk/TalkSectionAddOverlay.js M javascripts/modules/talk/TalkSectionOverlay.js M javascripts/modules/toc/toc.js M javascripts/modules/tutorials/PageActionOverlay.js M javascripts/modules/uploads/LeadPhoto.js M javascripts/modules/uploads/LeadPhotoUploaderButton.js M javascripts/modules/uploads/PhotoUploadOverlay.js M javascripts/modules/uploads/PhotoUploadProgress.js M javascripts/modules/uploads/UploadTutorial.js M javascripts/specials/mobileoptions.js 24 files changed, 28 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/92/169592/1 diff --git a/javascripts/Icon.js b/javascripts/Icon.js index 69e21a4..007c1e7 100644 --- a/javascripts/Icon.js +++ b/javascripts/Icon.js @@ -6,8 +6,8 @@ /** * A {@link View} that pops up from the bottom of the screen. -* @class Drawer -* @extends Panel +* @class Icon +* @extends View */ Icon = View.extend( { defaults: { diff --git a/javascripts/LoadingOverlay.js b/javascripts/LoadingOverlay.js index 8cda9f3..4e9dcf0 100644 --- a/javascripts/LoadingOverlay.js +++ b/javascripts/LoadingOverlay.js @@ -2,6 +2,7 @@ var Overlay = M.require( 'Overlay' ), LoadingOverlay; /** +* Overlay for loader * @class LoadingOverlay * @extends Overlay */ diff --git a/javascripts/modules/editor/VisualEditorOverlay.js b/javascripts/modules/editor/VisualEditorOverlay.js index 7ab3392..1228aa2 100644 --- a/javascripts/modules/editor/VisualEditorOverlay.js +++ b/javascripts/modules/editor/VisualEditorOverlay.js @@ -3,6 +3,7 @@ VisualEditorOverlay; /** +* Overlay for VisualEditor view * @class VisualEditorOverlay * @extends EditorOverlayBase */ diff --git a/javascripts/modules/issues/CleanupOverlay.js b/javascripts/modules/issues/CleanupOverlay.js index a4bb547..6264d8f 100644 --- a/javascripts/modules/issues/CleanupOverlay.js +++ b/javascripts/modules/issues/CleanupOverlay.js @@ -4,6 +4,7 @@ icon = new Icon( { name: 'cleanup-gray', additionalClassNames: 'issue-notice', hasText: true } ), /** +* Overlay for displaying page issues * @class CleanupOverlay * @extends Overlay */ diff --git a/javascripts/modules/languages/LanguageOverlay.js b/javascripts/modules/languages/LanguageOverlay.js index 771a3e5..c65ca4c 100644 --- a/javascripts/modules/languages/LanguageOverlay.js +++ b/javascripts/modules/languages/LanguageOverlay.js @@ -4,6 +4,7 @@ LanguageOverlay; /** +* Overlay displaying list of languages for a page * @class LanguageOverlay * @extends Overlay */ diff --git a/javascripts/modules/mediaViewer/ImageApi.js b/javascripts/modules/mediaViewer/ImageApi.js index 72ce944..cae3dbe 100644 --- a/javascripts/modules/mediaViewer/ImageApi.js +++ b/javascripts/modules/mediaViewer/ImageApi.js @@ -15,6 +15,7 @@ } /** +* API for retrieving image thumbnail * @class ImageApi * @extends Api */ diff --git a/javascripts/modules/mediaViewer/ImageOverlay.js b/javascripts/modules/mediaViewer/ImageOverlay.js index 7c66bda..bae8fc2 100644 --- a/javascripts/modules/mediaViewer/ImageOverlay.js +++ b/javascripts/modules/mediaViewer/ImageOverlay.js @@ -6,6 +6,7 @@ api = new ImageApi(); /** +* Overlay for media viewer image * @class ImageOverlay * @extends Overlay */ diff --git a/javascripts/modules/nearby/Nearby.js b/javascripts/modules/nearby/Nearby.js index 948057a..eabea91 100644 --- a/javascripts/modules/nearby/Nearby.js +++ b/javascripts/modules/nearby/Nearby.js @@ -4,6 +4,7 @@ Nearby; /** +* List of nearby pages * @extends View * @class Nearby */ @@ -59,6 +60,9 @@ }
[MediaWiki-commits] [Gerrit] Remove edit token from conflict detection - change (mediawiki...OAuth)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/169593 Change subject: Remove edit token from conflict detection .. Remove edit token from conflict detection The edit conflict detection in OAuth's approval form used an edit token generated with getEditToken(). Since Ic4cf148cc1fa9d0561aac0bd2d68a09c7851896d a different token is returned on each call, so the OAuth conflict detection always fails. Since we check for CSRF on the form already, we just use the user's id to check for edit conflicts. Bug: 72634 Change-Id: I10b9b63936b63a8332107577ef952d5b1078 --- M backend/MWOAuthDAO.php 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/93/169593/1 diff --git a/backend/MWOAuthDAO.php b/backend/MWOAuthDAO.php index 229905f..a01eab7 100644 --- a/backend/MWOAuthDAO.php +++ b/backend/MWOAuthDAO.php @@ -409,8 +409,11 @@ $map[$field] = null; // don't convey this information } } - return hash_hmac( 'sha1', serialize( $map ), - $context-getUser()-getEditToken( $this-getIdValue(), $context-getRequest() ) ); + return hash_hmac( + 'sha1', + serialize( $map ), + $context-getUser()-getId() . $this-getIdValue() + ); } /** -- To view, visit https://gerrit.wikimedia.org/r/169593 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10b9b63936b63a8332107577ef952d5b1078 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: master Gerrit-Owner: CSteipp cste...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix field name in UserMerge hook - change (mediawiki...Oversight)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/169594 Change subject: Fix field name in UserMerge hook .. Fix field name in UserMerge hook Change-Id: I70cbd88659db9b0092f2b9bd7080592e63cbb351 --- M HideRevision.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Oversight refs/changes/94/169594/1 diff --git a/HideRevision.hooks.php b/HideRevision.hooks.php index 563fb01..ea05332 100644 --- a/HideRevision.hooks.php +++ b/HideRevision.hooks.php @@ -96,7 +96,7 @@ public static function onUserMergeAccountFields( array $updateFields ) { // This table stores info on two different users, so it'll require two passes $updateFields[] = array( 'hidden', 'hidden_user', 'hidden_user_text' ); - $updateFields[] = array( 'hidden', 'hidden_by' ); + $updateFields[] = array( 'hidden', 'hidden_by_user' ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/169594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70cbd88659db9b0092f2b9bd7080592e63cbb351 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Oversight Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: kill fake post_moderation_state i18n message - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/169595 Change subject: Hygiene: kill fake post_moderation_state i18n message .. Hygiene: kill fake post_moderation_state i18n message Change-Id: Ia2f4a89575ccbdcb2b414b6b8fbc733f9a79e08e --- M handlebars/compiled/flow_block_topic.handlebars.php M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php M handlebars/compiled/flow_block_topiclist.handlebars.php M handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php M handlebars/compiled/flow_post.handlebars.php M handlebars/flow_post_inner.handlebars M handlebars/flow_topic_titlebar_content.handlebars M includes/TemplateHelper.php M modules/engine/misc/flow-handlebars.js 10 files changed, 119 insertions(+), 130 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/95/169595/1 diff --git a/handlebars/compiled/flow_block_topic.handlebars.php b/handlebars/compiled/flow_block_topic.handlebars.php index df49524..706a79f 100644 --- a/handlebars/compiled/flow_block_topic.handlebars.php +++ b/handlebars/compiled/flow_block_topic.handlebars.php @@ -15,6 +15,7 @@ 'html' = 'Flow\TemplateHelper::htmlHelper', 'post' = 'Flow\TemplateHelper::post', 'l10nParse' = 'Flow\TemplateHelper::l10nParse', +'concat' = 'Flow\TemplateHelper::concat', 'linkWithReturnTo' = 'Flow\TemplateHelper::linkWithReturnTo', 'escapeContent' = 'Flow\TemplateHelper::escapeContent', 'plaintextSnippet' = 'Flow\TemplateHelper::plaintextSnippet', @@ -80,9 +81,9 @@ ').' /div '.((LCRun3::ifvar($cx, ((is_array($in) isset($in['isModerated'])) ? $in['isModerated'] : null))) ? ' - div class=flow-moderated-topic-title flow-ui-text-truncated'.htmlentities(((is_array($in) isset($in['noop'])) ? $in['noop'] : null), ENT_QUOTES, 'UTF-8').'span class=wikiglyph'.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'===','lock'),Array()), $in, function($cx, $in) {return ' wikiglyph-lock';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'===','hide'),Array()), $in, function($cx, $in) {return ' wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'===','delete'),Array()), $in, function($cx, $in) {return ' wikiglyph-trash';}).'/span - - '.LCRun3::ch($cx, 'l10n', Array(Array('post_moderation_state',((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) isset($in['replyToId'])) ? $in['replyToId'] : null),((is_array($in['moderator']) isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 'encq').'/div + div class=flow-moderated-topic-title flow-ui-text-truncated'.htmlentities(((is_array($in) isset($in['noop'])) ? $in['noop'] : null), ENT_QUOTES, 'UTF-8').'span class=wikiglyph'.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'===','lock'),Array()), $in, function($cx, $in) {return ' wikiglyph-lock';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'===','hide'),Array()), $in, function($cx, $in) {return ' wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'===','delete'),Array()), $in, function($cx, $in) {return ' wikiglyph-trash';}).'/span'.((LCRun3::ifvar($cx, ((is_array($in) isset($in['replyToId'])) ? $in['replyToId'] : null))) ? ''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'-post-content'),Array()), 'raw'),((is_array($in['moderator']) isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 'encq').' + ' : ''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((is_array($in) isset($in['moderateState'])) ? $in['moderateState'] : null),'-title-content'),Array()), 'raw'),((is_array($in['moderator']) isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 'encq').' + ').'/div div class=flow-moderated-topic-reason '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-moderated-reason-prefix'),Array()), 'encq').' '.LCRun3::ch($cx, 'escapeContent', Array(Array(((is_array($in['moderateReason']) isset($in['moderateReason']['format'])) ? $in['moderateReason']['format'] : null),((is_array($in['moderateReason'])
[MediaWiki-commits] [Gerrit] Convert javacript time handling to moment.js - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/169596 Change subject: Convert javacript time handling to moment.js .. Convert javacript time handling to moment.js Change-Id: I255e3d0e3cb2dd9ee61098230ac9f234db479e66 --- M .jshintrc M Resources.php M handlebars/compiled/flow_block_topic.handlebars.php M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php M handlebars/compiled/flow_block_topiclist.handlebars.php M handlebars/compiled/flow_post.handlebars.php M handlebars/compiled/timestamp.handlebars.php M handlebars/flow_post_meta_actions.handlebars M handlebars/flow_topic_titlebar_content.handlebars A handlebars/foo M handlebars/timestamp.handlebars M i18n/en.json M i18n/qqq.json M includes/TemplateHelper.php M modules/engine/components/board/base/flow-board-load-events.js M modules/engine/misc/flow-handlebars.js M tests/qunit/engine/misc/test_flow-handlebars.js 18 files changed, 103 insertions(+), 288 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/96/169596/1 diff --git a/.jshintrc b/.jshintrc index 055b010..85b889e 100644 --- a/.jshintrc +++ b/.jshintrc @@ -14,7 +14,8 @@ ve: true, Handlebars: true, initStorer: true, - OO: true + OO: true, + moment: true }, browser: true, // document, navigator, etc. curly:true, // requres curly braces around loops and conditionals diff --git a/Resources.php b/Resources.php index 08365c8..bd767ec 100644 --- a/Resources.php +++ b/Resources.php @@ -19,7 +19,10 @@ $wgResourceModules += array( 'ext.flow.templating' = $flowTemplatingResourceTemplate + array( 'class' = 'ResourceLoaderTemplateModule', - 'dependencies' = 'ext.mantle.handlebars', + 'dependencies' = array( + 'ext.mantle.handlebars', + 'moment', + ), 'localTemplateBasePath' = $dir . 'handlebars', 'templates' = array( 'flow_anon_warning.handlebars', @@ -276,28 +279,6 @@ 'ext.flow.handlebars' = $flowResourceTemplate + array( 'scripts' = array( 'engine/misc/flow-handlebars.js', - ), - 'messages' = array( - 'flow-time-ago-second', - 'flow-time-ago-minute', - 'flow-time-ago-hour', - 'flow-time-ago-day', - 'flow-time-ago-week', - 'flow-active-ago-second', - 'flow-active-ago-minute', - 'flow-active-ago-hour', - 'flow-active-ago-day', - 'flow-active-ago-week', - 'flow-started-ago-second', - 'flow-started-ago-minute', - 'flow-started-ago-hour', - 'flow-started-ago-day', - 'flow-started-ago-week', - 'flow-edited-ago-second', - 'flow-edited-ago-minute', - 'flow-edited-ago-hour', - 'flow-edited-ago-day', - 'flow-edited-ago-week', ), 'dependencies' = array( 'ext.mantle.handlebars', diff --git a/handlebars/compiled/flow_block_topic.handlebars.php b/handlebars/compiled/flow_block_topic.handlebars.php index 706a79f..3c90c2a 100644 --- a/handlebars/compiled/flow_block_topic.handlebars.php +++ b/handlebars/compiled/flow_block_topic.handlebars.php @@ -68,16 +68,17 @@ a href='.htmlentities(((is_array($in['actions']['reply']) isset($in['actions']['reply']['url'])) ? $in['actions']['reply']['url'] : null), ENT_QUOTES, 'UTF-8').' title='.htmlentities(((is_array($in['actions']['reply']) isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : null), ENT_QUOTES, 'UTF-8').' class=mw-ui-anchor mw-ui-progressive mw-ui-quiet - data-flow-interactive-handler=activateForm'.htmlentities(((is_array($in['actions']['reply']) isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : null), ENT_QUOTES, 'UTF-8').'/a + data-flow-interactive-handler=activateForm + '.htmlentities(((is_array($in['actions']['reply']) isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : null), ENT_QUOTES, 'UTF-8').'/a bull; ' : '').' '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-comments',((is_array($in) isset($in['reply_count'])) ?
[MediaWiki-commits] [Gerrit] K2: Timestamps - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/169597 Change subject: K2: Timestamps .. K2: Timestamps Change-Id: I6080979e3f64a7dca7b3c88d8e8c6973a845282b --- M Resources.php M handlebars/compiled/flow_block_header_edit.handlebars.php M handlebars/compiled/flow_block_topic_lock.handlebars.php M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php M handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php M handlebars/compiled/flow_block_topicsummary_edit.handlebars.php M handlebars/compiled/flow_form_buttons.handlebars.php M handlebars/compiled/flow_post.handlebars.php M handlebars/compiled/timestamp.handlebars.php M handlebars/flow_post_meta_actions.handlebars M handlebars/timestamp.handlebars M i18n/en.json M i18n/qqq.json M includes/Formatter/RevisionFormatter.php M modules/styles/board/timestamps.less 16 files changed, 261 insertions(+), 193 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/97/169597/1 diff --git a/Resources.php b/Resources.php index bd767ec..c6d6331 100644 --- a/Resources.php +++ b/Resources.php @@ -284,6 +284,7 @@ 'ext.mantle.handlebars', // the timestamp helper uses the timestamp template 'ext.flow.templating', + 'moment', ), ) + $mobile, 'ext.flow' = $flowResourceTemplate + array( diff --git a/handlebars/compiled/flow_block_header_edit.handlebars.php b/handlebars/compiled/flow_block_header_edit.handlebars.php index 575eef7..36cf521 100644 --- a/handlebars/compiled/flow_block_header_edit.handlebars.php +++ b/handlebars/compiled/flow_block_header_edit.handlebars.php @@ -46,20 +46,18 @@ class=mw-ui-button mw-ui-constructive data-flow-interactive-handler=apiRequest data-flow-api-handler=submitHeader'.LCRun3::ch($cx, 'l10n', Array(Array('flow-edit-header-submit'),Array()), 'encq').'/button - '.' - button data-flow-api-handler=preview - data-flow-api-target= form textarea - name=preview - data-role=action - class=mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right flow-js - '.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 'encq').'/button + button data-flow-api-handler=preview +data-flow-api-target= form textarea +name=preview +data-role=action +class=mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right flow-js +'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 'encq').'/button - button data-flow-interactive-handler=cancelForm - data-role=cancel - type=reset - class=mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right flow-js - '.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 'encq').'/button -'.' +button data-flow-interactive-handler=cancelForm +data-role=cancel +type=reset +class=mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right flow-js +'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 'encq').'/button small class=flow-terms-of-use plainlinks'.LCRun3::ch($cx, 'l10nParse', Array(Array('flow-terms-of-use-edit'),Array()), 'encq').'/small /div diff --git a/handlebars/compiled/flow_block_topic_lock.handlebars.php b/handlebars/compiled/flow_block_topic_lock.handlebars.php index bb58920..c721025 100644 --- a/handlebars/compiled/flow_block_topic_lock.handlebars.php +++ b/handlebars/compiled/flow_block_topic_lock.handlebars.php @@ -56,20 +56,18 @@ '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-lock-topic'),Array()), 'encq').' ').' /button - '.' - button data-flow-api-handler=preview - data-flow-api-target= form textarea - name=preview - data-role=action - class=mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right flow-js - '.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 'encq').'/button + button data-flow-api-handler=preview +data-flow-api-target= form textarea +name=preview +data-role=action +class=mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right flow-js +'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 'encq').'/button - button
[MediaWiki-commits] [Gerrit] Show WikiGrok to readers in alpha/beta - change (mediawiki...MobileFrontend)
Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/169598 Change subject: Show WikiGrok to readers in alpha/beta .. Show WikiGrok to readers in alpha/beta Logged out users can see wikigrok versions a b now. User tokens can be differenciated from anonymous tokens based on a prefix Change-Id: I6af487ad3d87f9639c5575b5902ee27efd4a4b18 --- M javascripts/modules/wikigrok/wikigrok.js 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/98/169598/1 diff --git a/javascripts/modules/wikigrok/wikigrok.js b/javascripts/modules/wikigrok/wikigrok.js index a0e05d2..7e8ba25 100644 --- a/javascripts/modules/wikigrok/wikigrok.js +++ b/javascripts/modules/wikigrok/wikigrok.js @@ -13,16 +13,19 @@ * * @return {string} */ - function getUserToken () { - var cookieName = mw.config.get( 'wgCookiePrefix' ) + '-wikiGrokUserToken', + function getUserToken() { + var anonymousCookieName = mw.config.get( 'wgCookiePrefix' ) + '-wikiGrokAnonymousUserToken', + loggedInCookieName = mw.config.get( 'wgCookiePrefix' ) + '-wikiGrokUserToken', + cookieName = mw.user.isAnon() ? anonymousCookieName : loggedInCookieName, storedToken = $.cookie( cookieName ), + tokenPrefix = mw.user.isAnon() ? 'anon-' : 'user-', generatedToken; if ( storedToken ) { return storedToken; } - generatedToken = mw.user.generateRandomSessionId(); + generatedToken = tokenPrefix + mw.user.generateRandomSessionId(); $.cookie( cookieName, generatedToken, { expires: 90, // (days) @@ -31,7 +34,6 @@ return generatedToken; } - // Allow query string override for testing, for example, '?wikidataid=Q508703' if ( !wikidataID ) { @@ -50,8 +52,6 @@ if ( // WikiGrok is enabled mw.config.get( 'wgMFEnableWikiGrok' ) - // User is logged in - !mw.user.isAnon() // We're not on the Main Page !mw.config.get( 'wgIsMainPage' ) // Permitted on this device -- To view, visit https://gerrit.wikimedia.org/r/169598 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6af487ad3d87f9639c5575b5902ee27efd4a4b18 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing WikiGrok documentation - change (mediawiki...MobileFrontend)
Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/169599 Change subject: Add missing WikiGrok documentation .. Add missing WikiGrok documentation Change-Id: I9ef081a0519075aa0cd15c1c058d2cfdd163e773 --- M javascripts/modules/wikigrok/WikiDataApi.js M javascripts/modules/wikigrok/WikiGrokDialog.js M javascripts/modules/wikigrok/WikiGrokDialogB.js M javascripts/modules/wikigrok/WikiGrokMoreInfo.js M javascripts/modules/wikigrok/WikiGrokResponseApi.js M javascripts/modules/wikigrok/WikiGrokSuggestionApi.js 6 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/99/169599/1 diff --git a/javascripts/modules/wikigrok/WikiDataApi.js b/javascripts/modules/wikigrok/WikiDataApi.js index c0d3fe0..866d3a6 100644 --- a/javascripts/modules/wikigrok/WikiDataApi.js +++ b/javascripts/modules/wikigrok/WikiDataApi.js @@ -1,6 +1,7 @@ ( function ( M, $ ) { var Api = M.require( 'api' ).Api, WikiDataApi; /** +* API class for retrieving WikiData * @class WikiDataApi * @extends Api */ diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js b/javascripts/modules/wikigrok/WikiGrokDialog.js index a02e7fc..67bab97 100644 --- a/javascripts/modules/wikigrok/WikiGrokDialog.js +++ b/javascripts/modules/wikigrok/WikiGrokDialog.js @@ -11,6 +11,7 @@ $window = $( window ); /** +* WikiGrok Dialog class * @class WikiGrokDialog * @extends Panel * THIS IS AN EXPERIMENTAL FEATURE THAT MAY BE MOVED TO A SEPARATE EXTENSION. diff --git a/javascripts/modules/wikigrok/WikiGrokDialogB.js b/javascripts/modules/wikigrok/WikiGrokDialogB.js index 4d0f86a..4de3826 100644 --- a/javascripts/modules/wikigrok/WikiGrokDialogB.js +++ b/javascripts/modules/wikigrok/WikiGrokDialogB.js @@ -5,6 +5,7 @@ WikiGrokDialogB; /** +* @inheritDoc * @class WikiGrokDialogB * @extends WikiGrokDialog * THIS IS AN EXPERIMENTAL FEATURE THAT MAY BE MOVED TO A SEPARATE EXTENSION. diff --git a/javascripts/modules/wikigrok/WikiGrokMoreInfo.js b/javascripts/modules/wikigrok/WikiGrokMoreInfo.js index 625c1c2..033ccbd 100644 --- a/javascripts/modules/wikigrok/WikiGrokMoreInfo.js +++ b/javascripts/modules/wikigrok/WikiGrokMoreInfo.js @@ -5,6 +5,7 @@ WikiGrokMoreInfo; /** +* Overlay for WikiGrok info * @class WikiGrokMoreInfo * @extends Overlay */ diff --git a/javascripts/modules/wikigrok/WikiGrokResponseApi.js b/javascripts/modules/wikigrok/WikiGrokResponseApi.js index 5ba1ca3..332ead7 100644 --- a/javascripts/modules/wikigrok/WikiGrokResponseApi.js +++ b/javascripts/modules/wikigrok/WikiGrokResponseApi.js @@ -2,6 +2,7 @@ ( function ( M ) { var Api = M.require( 'api' ).Api, WikiGrokResponseApi; /** +* API class for submitting WikiGrok responses * @class WikiGrokResponseApi * @extends Api */ diff --git a/javascripts/modules/wikigrok/WikiGrokSuggestionApi.js b/javascripts/modules/wikigrok/WikiGrokSuggestionApi.js index e36d696..1930621 100644 --- a/javascripts/modules/wikigrok/WikiGrokSuggestionApi.js +++ b/javascripts/modules/wikigrok/WikiGrokSuggestionApi.js @@ -2,6 +2,7 @@ ( function ( M ) { var Api = M.require( 'api' ).Api, WikiGrokSuggestionApi; /** +* API class for retrieving WikiGrok suggestions * @class WikiGrokSuggestionApi * @extends Api */ -- To view, visit https://gerrit.wikimedia.org/r/169599 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ef081a0519075aa0cd15c1c058d2cfdd163e773 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Robmoen rm...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix field name in UserMerge hook - change (mediawiki...Oversight)
jenkins-bot has submitted this change and it was merged. Change subject: Fix field name in UserMerge hook .. Fix field name in UserMerge hook Change-Id: I70cbd88659db9b0092f2b9bd7080592e63cbb351 --- M HideRevision.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/HideRevision.hooks.php b/HideRevision.hooks.php index 563fb01..ea05332 100644 --- a/HideRevision.hooks.php +++ b/HideRevision.hooks.php @@ -96,7 +96,7 @@ public static function onUserMergeAccountFields( array $updateFields ) { // This table stores info on two different users, so it'll require two passes $updateFields[] = array( 'hidden', 'hidden_user', 'hidden_user_text' ); - $updateFields[] = array( 'hidden', 'hidden_by' ); + $updateFields[] = array( 'hidden', 'hidden_by_user' ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/169594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70cbd88659db9b0092f2b9bd7080592e63cbb351 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Oversight Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into deployment - change (wikimedia...crm)
Ejegg has submitted this change and it was merged. Change subject: Merge remote-tracking branch 'origin/master' into deployment .. Merge remote-tracking branch 'origin/master' into deployment 115ac58 Move linebreaking back into Mailer::normalizeContent 5806528 Fix namespaced CiviMailing exceptions 055474e Got rid of the unused RGC test_url b02d13e Wean remaining usages of legacy DonationInterface checkout Change-Id: I47c58f6b4005da63ea3821d3e3ad358352793553 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Ejegg: Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/169587 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47c58f6b4005da63ea3821d3e3ad358352793553 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Fix jscs errors - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/169600 Change subject: Hygiene: Fix jscs errors .. Hygiene: Fix jscs errors Baha use the pre-commit hook! Change-Id: I256618a14d239a7c07631ebee337eda098ea8300 --- M javascripts/modules/wikigrok/wikigrok.js 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/00/169600/1 diff --git a/javascripts/modules/wikigrok/wikigrok.js b/javascripts/modules/wikigrok/wikigrok.js index a0e05d2..6899914 100644 --- a/javascripts/modules/wikigrok/wikigrok.js +++ b/javascripts/modules/wikigrok/wikigrok.js @@ -13,7 +13,7 @@ * * @return {string} */ - function getUserToken () { + function getUserToken() { var cookieName = mw.config.get( 'wgCookiePrefix' ) + '-wikiGrokUserToken', storedToken = $.cookie( cookieName ), generatedToken; @@ -31,7 +31,6 @@ return generatedToken; } - // Allow query string override for testing, for example, '?wikidataid=Q508703' if ( !wikidataID ) { -- To view, visit https://gerrit.wikimedia.org/r/169600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I256618a14d239a7c07631ebee337eda098ea8300 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't let users merge themselves - change (mediawiki...CentralAuth)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/169601 Change subject: Don't let users merge themselves .. Don't let users merge themselves Change-Id: Idb92ec8bc0ab20d4c1036dfdad69cfb876a2813a --- M i18n/en.json M i18n/qqq.json M includes/specials/SpecialGlobalUserMerge.php 3 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/01/169601/1 diff --git a/i18n/en.json b/i18n/en.json index fe52581..87ae88c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -401,6 +401,7 @@ centralauth-usermerge-queued: Merges for $1 into $2 have been queued.\n\nView the progress at [[Special:GlobalRenameProgress/$3]]., centralauth-usermerge-invalid: There is no global account with the name \$1\., centralauth-usermerge-already: There is already a global rename or merge in progress for $1., + centralauth-usermerge-noself: You cannot merge accounts with yourself., action-centralauth-usermerge: globally merge multiple users, right-centralauth-usermerge: Globally merge multiple users, centralauth-usermerge-confirm: Do you really want to globally merge these users?, diff --git a/i18n/qqq.json b/i18n/qqq.json index 1b6d508..5ccdb05 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -411,6 +411,7 @@ centralauth-usermerge-queued: Message shown after successfully submitting the form. Parameters:\n* $1 - a comma-separated list of users who are being merged into\n* $2 - a link to the final username's [[Special:CentralAuth]] page\n* $3 - the raw final username, centralauth-usermerge-invalid: Error message shown if the user enters invalid input. Parameters:\n* $1 - the invalid input, centralauth-usermerge-already: Error message if a user is already being globally renamed or merged.\n\nParmaeters:\n* $1 - the user's username, + centralauth-usermerge-noself: Error message shown if a user tries merging accounts with themselves., action-centralauth-usermerge: {{doc-action|centralauth-usermerge}}, right-centralauth-usermerge: {{doc-right|centralauth-usermerge}}, centralauth-usermerge-confirm: Confirmation message displayed in a JavaScript alert before the form is submitted.\n\nSee also:\n* {{msg-mw|Centralauth-rename-confirm}}, diff --git a/includes/specials/SpecialGlobalUserMerge.php b/includes/specials/SpecialGlobalUserMerge.php index cab88fd..feff05e 100644 --- a/includes/specials/SpecialGlobalUserMerge.php +++ b/includes/specials/SpecialGlobalUserMerge.php @@ -90,6 +90,11 @@ if ( !$name ) { return $this-msg( 'centralauth-usermerge-invalid', $name )-escaped(); } + + if ( $name === $this-getUser()-getName() ) { + return $this-msg( 'centralauth-usermerge-noself' )-escaped(); + } + $caUser = new CentralAuthUser( $name ); if ( !$caUser-exists() ) { return $this-msg( 'centralauth-usermerge-invalid', $name )-escaped(); @@ -139,7 +144,7 @@ foreach ( $data['usernames'] as $field ) { if ( $field['name'] ) { - $this-oldCAUsers[] = new CentralAuthUser( $field['name'] ); + $this-oldCAUsers[] = new CentralAuthUser( User::getCanonicalName( $field['name'] ) ); } } -- To view, visit https://gerrit.wikimedia.org/r/169601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb92ec8bc0ab20d4c1036dfdad69cfb876a2813a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Fix jscs errors - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Fix jscs errors .. Hygiene: Fix jscs errors Baha use the pre-commit hook! Change-Id: I256618a14d239a7c07631ebee337eda098ea8300 --- M javascripts/modules/wikigrok/wikigrok.js 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/modules/wikigrok/wikigrok.js b/javascripts/modules/wikigrok/wikigrok.js index a0e05d2..6899914 100644 --- a/javascripts/modules/wikigrok/wikigrok.js +++ b/javascripts/modules/wikigrok/wikigrok.js @@ -13,7 +13,7 @@ * * @return {string} */ - function getUserToken () { + function getUserToken() { var cookieName = mw.config.get( 'wgCookiePrefix' ) + '-wikiGrokUserToken', storedToken = $.cookie( cookieName ), generatedToken; @@ -31,7 +31,6 @@ return generatedToken; } - // Allow query string override for testing, for example, '?wikidataid=Q508703' if ( !wikidataID ) { -- To view, visit https://gerrit.wikimedia.org/r/169600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I256618a14d239a7c07631ebee337eda098ea8300 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] LocalPageMoveJob: Use MovePage - change (mediawiki...CentralAuth)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/169602 Change subject: LocalPageMoveJob: Use MovePage .. LocalPageMoveJob: Use MovePage This probably depends upon Ic502638 in MediaWiki core. Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02 --- M includes/LocalRenameJob/LocalPageMoveJob.php 1 file changed, 16 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/02/169602/1 diff --git a/includes/LocalRenameJob/LocalPageMoveJob.php b/includes/LocalRenameJob/LocalPageMoveJob.php index 8d7acf2..e798fb3 100644 --- a/includes/LocalRenameJob/LocalPageMoveJob.php +++ b/includes/LocalRenameJob/LocalPageMoveJob.php @@ -5,14 +5,9 @@ */ class LocalPageMoveJob extends Job { /** -* @var bool +* @var User */ - private $setAFOverride; - - /** -* @var bool -*/ - private $setTBOverride; + private $user; /** * @param array $params @@ -29,7 +24,7 @@ // Need to set $wgUser so the move log is attributed correctly. global $wgUser; $oldUser = $wgUser; - $wgUser = User::newFromName( $this-params['renamer'] ); + $this-user = User::newFromName( $this-params['renamer'] ); foreach ( $this-params['pages'] as $current = $target ) { $this-movePage( Title::newFromText( $current ), @@ -42,58 +37,21 @@ } protected function movePage( Title $oldPage, Title $newPage ) { - if ( $newPage-exists() !$oldPage-isValidMoveTarget( $newPage ) ) { - wfDebugLog( 'CentralAuthRename', Could not move $oldPage to $newPage ); - // @todo log this somewhere publicly? - } else { - $msg = wfMessage( 'centralauth-rename-movelog' ) - -params( $this-params['from'], $this-params['to'] ) - -inContentLanguage() - -text(); - $errors = $oldPage-moveTo( $newPage, false, $msg, !$this-params['suppressredirects'] ); - if ( is_array( $errors ) ) { - // AbuseFilter or TitleBlacklist might be interfering, bug 67875 - if ( $errors[0][0] === 'hookaborted' ) { - wfDebugLog( 'CentralAuthRename', Page move prevented by hook: {$oldPage-getPrefixedText()} - {$newPage-getPrefixedText()} ); - $this-disableMoveBlockingThings(); - // Do it again - $oldPage-moveTo( $newPage, false, $msg, !$this-params['suppressredirects'] ); - $this-enableMoveBlockingThings(); - } - } + $mp = new MovePage( $oldPage, $newPage ); + $valid = $mp-isValidMove(); + if ( !$valid-isOK() ) { + wfDebugLog( 'CentralAuthRename', Invalid page move: {$oldPage-getPrefixedText()} - {$newPage-getPrefixedText()} ); + return; } - } + $msg = wfMessage( 'centralauth-rename-movelog' ) + -params( $this-params['from'], $this-params['to'] ) + -inContentLanguage() + -text(); - /** -* FIXME: on a of scale one to evil, this is super evil -*/ - private function disableMoveBlockingThings() { - global $wgUser; - if ( !$wgUser-isAllowed( 'abusefilter-bypass' ) ) { - $wgUser-mRights[] = 'abusefilter-bypass'; - $this-setAFOverride = true; - } - - if ( !$wgUser-isAllowed( 'tboverride' ) ) { - $wgUser-mRights[] = 'tboverride'; - $this-setTBOverride = true; + $status = $mp-move( $this-user, $msg, true ); + if ( !$status-isOK() ) { + wfDebugLog( 'CentralAuthRename', Page move failed: {$oldPage-getPrefixedText()} - {$newPage-getPrefixedText()} ); } } - - private function enableMoveBlockingThings() { - global $wgUser; - $rights = array(); - if ( $this-setAFOverride ) { - $rights[] = 'abusefilter-bypass'; - $this-setAFOverride = false; - } - if ( $this-setTBOverride ) { - $rights[] = 'tboverride'; - $this-setTBOverride = false; - } - - $wgUser-mRights = array_diff(
[MediaWiki-commits] [Gerrit] Use alias_method when aliasing macro-defined attributes - change (mediawiki...api)
Dduvall has submitted this change and it was merged. Change subject: Use alias_method when aliasing macro-defined attributes .. Use alias_method when aliasing macro-defined attributes Note this does not implement checks banning use of `alias` altogether. Bug: 63307 Change-Id: I97191e9b6449d7220fde84e3367f939e6053fc4d --- M lib/mediawiki_api/client.rb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Dduvall: Looks good to me, approved diff --git a/lib/mediawiki_api/client.rb b/lib/mediawiki_api/client.rb index 2758cbc..44516db 100644 --- a/lib/mediawiki_api/client.rb +++ b/lib/mediawiki_api/client.rb @@ -11,7 +11,7 @@ attr_accessor :logged_in -alias logged_in? logged_in +alias_method :logged_in?, :logged_in def initialize(url, log = false) @conn = Faraday.new(url: url) do |faraday| -- To view, visit https://gerrit.wikimedia.org/r/168279 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97191e9b6449d7220fde84e3367f939e6053fc4d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/ruby/api Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Introducing getTitle() in MWTitleInputWidget - change (mediawiki...VisualEditor)
SuchetaG has uploaded a new change for review. https://gerrit.wikimedia.org/r/169603 Change subject: Introducing getTitle() in MWTitleInputWidget .. Introducing getTitle() in MWTitleInputWidget A method for getTitle() is added which can return the valid title, or, it can return null, in case the value isn't a valid title Bug: 72468 Change-Id: I8a13afc9a66c167fe25010743c0d9e1424133d96 --- M modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/03/169603/1 diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js index 84bd330..fad55c1 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js @@ -125,3 +125,19 @@ return items; }; + +/** +* Get template title +* +* @returns {string} Template title if valid or null +**/ +ve.ui.MWTitleInputWidget.prototype.getTitle = function () { + var titleObj; + title = this.getValue(); + + if ( title ) { + titleObj = mw.Title.newFromText( title ); + } + + return titleObj; +}; -- To view, visit https://gerrit.wikimedia.org/r/169603 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a13afc9a66c167fe25010743c0d9e1424133d96 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: SuchetaG sucheta.ghos...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits