[MediaWiki-commits] [Gerrit] Remove comment about deprecated Title::escapeFullURL - change (mediawiki...Video)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142784 Change subject: Remove comment about deprecated Title::escapeFullURL .. Remove comment about deprecated Title::escapeFullURL Change-Id: I11a70e1e797a77465a4a2334ab999a0f16609179 --- M VideoHooks.php 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Video refs/changes/84/142784/1 diff --git a/VideoHooks.php b/VideoHooks.php index 2fcdf1d..2aec312 100644 --- a/VideoHooks.php +++ b/VideoHooks.php @@ -88,8 +88,6 @@ if( !$video->exists() ) { global $wgOut; $wgOut->redirect( - // escapeFullURL() converts & to & which causes the - // destName parameter not to work correctly $addTitle->getFullURL( 'wpTitle=' . $video->getName() ) ); } -- To view, visit https://gerrit.wikimedia.org/r/142784 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11a70e1e797a77465a4a2334ab999a0f16609179 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Video Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL call - change (mediawiki...Commentbox)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142783 Change subject: Replace deprecated Title::escapeFullURL call .. Replace deprecated Title::escapeFullURL call Change-Id: I47621fe518da49482684c0a4156567ee9bfffe47 --- M Commentbox.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Commentbox refs/changes/83/142783/1 diff --git a/Commentbox.php b/Commentbox.php index 58c5ea6..7879425 100644 --- a/Commentbox.php +++ b/Commentbox.php @@ -62,7 +62,7 @@ if ( !is_null( $wgRequest->getVal( 'diff' ) ) ) return true; - $newaction = Title::newFromText( 'AddComment', NS_SPECIAL )->escapeFullURL(); + $newaction = htmlspecialchars( Title::newFromText( 'AddComment', NS_SPECIAL )->getFullURL() ); $name = ''; if ( !$wgUser->isLoggedIn() ) { $namecomment = wfMsgExt( 'commentbox-name-explanation', 'parseinline' ); -- To view, visit https://gerrit.wikimedia.org/r/142783 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47621fe518da49482684c0a4156567ee9bfffe47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Commentbox Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL call - change (mediawiki...RandomUsersWithAvatars)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142782 Change subject: Replace deprecated Title::escapeFullURL call .. Replace deprecated Title::escapeFullURL call Change-Id: If3d3301ad59852366263788d955a166a7af2b6d3 --- M RandomUsersWithAvatars.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RandomUsersWithAvatars refs/changes/82/142782/1 diff --git a/RandomUsersWithAvatars.php b/RandomUsersWithAvatars.php index 7f89cf0..bc16c2a 100644 --- a/RandomUsersWithAvatars.php +++ b/RandomUsersWithAvatars.php @@ -101,7 +101,7 @@ $avatar = new wAvatar( $user_id, 'ml' ); $user_link = Title::makeTitle( NS_USER, $user_name ); - $output .= '' . $avatar->getAvatarURL() . ''; + $output .= '' . $avatar->getAvatarURL() . ''; if( $x == $count || $x != 1 && $x%$per_row == 0 ) { $output .= ''; -- To view, visit https://gerrit.wikimedia.org/r/142782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3d3301ad59852366263788d955a166a7af2b6d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RandomUsersWithAvatars Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL call - change (mediawiki...RandomImageByCategory)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142781 Change subject: Replace deprecated Title::escapeFullURL call .. Replace deprecated Title::escapeFullURL call Change-Id: I3b1c2cb3973dc1058af823c5143a593a4edf52bb --- M RandomImageByCategory.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RandomImageByCategory refs/changes/81/142781/1 diff --git a/RandomImageByCategory.php b/RandomImageByCategory.php index 9244f68..8228939 100644 --- a/RandomImageByCategory.php +++ b/RandomImageByCategory.php @@ -111,7 +111,7 @@ $render_image = wfFindFile( $random_image ); $thumb_image = $render_image->transform( array( 'width' => $width ) ); - $thumbnail = "escapeFullURL()}\">{$thumb_image->toHtml()}"; + $thumbnail = "getFullURL() )}\">{$thumb_image->toHtml()}"; } wfProfileOut( __METHOD__ ); -- To view, visit https://gerrit.wikimedia.org/r/142781 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b1c2cb3973dc1058af823c5143a593a4edf52bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RandomImageByCategory Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...RandomFeaturedUser)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142780 Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: Ic675e3002e21ec4955d84d202bd6796e7958cd4f --- M RandomFeaturedUser.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RandomFeaturedUser refs/changes/80/142780/1 diff --git a/RandomFeaturedUser.php b/RandomFeaturedUser.php index 5313744..75f0f01 100644 --- a/RandomFeaturedUser.php +++ b/RandomFeaturedUser.php @@ -138,11 +138,11 @@ $avatar = new wAvatar( $random_user['user_id'], 'ml' ); $avatarImage = $avatar->getAvatarURL(); - $output .= "escapeFullURL()}\">{$avatarImage}\n"; + $output .= "getFullURL() )}\">{$avatarImage}\n"; } $output .= " - escapeFullURL()}\">" . + getFullURL() )}\">" . wordwrap( $random_user['user_name'], 12, "\n", true ) . " $points " . wfMsg( "random-user-points-{$period}" ) . -- To view, visit https://gerrit.wikimedia.org/r/142780 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic675e3002e21ec4955d84d202bd6796e7958cd4f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RandomFeaturedUser Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL call - change (mediawiki...VoteNY)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142779 Change subject: Replace deprecated Title::escapeFullURL call .. Replace deprecated Title::escapeFullURL call Change-Id: Ib5cf73ca6ecb1ea10ddbebf9cec6ee9973c72a7a --- M VoteClass.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VoteNY refs/changes/79/142779/1 diff --git a/VoteClass.php b/VoteClass.php index 250c7c3..d641ff6 100644 --- a/VoteClass.php +++ b/VoteClass.php @@ -224,7 +224,7 @@ // not require them to log in! $login = SpecialPage::getTitleFor( 'Userlogin' ); $output .= '' . + htmlspecialchars( $login->getFullURL() ) . '" rel="nofollow">' . wfMsg( 'voteny-link' ) . ''; } else { if( !wfReadOnly() ) { -- To view, visit https://gerrit.wikimedia.org/r/142779 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5cf73ca6ecb1ea10ddbebf9cec6ee9973c72a7a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VoteNY Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL call - change (mediawiki...NewUsersList)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142778 Change subject: Replace deprecated Title::escapeFullURL call .. Replace deprecated Title::escapeFullURL call Change-Id: If5e464675cac7ab056560e433b0e3ac7098e1ea3 --- M NewUsersList.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NewUsersList refs/changes/78/142778/1 diff --git a/NewUsersList.php b/NewUsersList.php index ad83fd5..436500e 100644 --- a/NewUsersList.php +++ b/NewUsersList.php @@ -121,7 +121,7 @@ $avatar = new wAvatar( $user['user_id'], 'ml' ); $userLink = Title::makeTitle( NS_USER, $user['user_name'] ); - $output .= 'getFullURL() ) . '" rel="nofollow">' . $avatar->getAvatarURL() . ''; if ( ( $x == $count ) || ( $x != 1 ) && ( $x % $per_row == 0 ) ) { -- To view, visit https://gerrit.wikimedia.org/r/142778 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5e464675cac7ab056560e433b0e3ac7098e1ea3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/NewUsersList Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...Phalanx)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142777 Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: I3951c066b4dc2766ebf949cb292cc8b592a40e8a --- M PhalanxHelper.class.php M SpecialPhalanx.body.php 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Phalanx refs/changes/77/142777/1 diff --git a/PhalanxHelper.class.php b/PhalanxHelper.class.php index 5245e04..ab5083e 100644 --- a/PhalanxHelper.class.php +++ b/PhalanxHelper.class.php @@ -359,8 +359,8 @@ $statsLink = wfMessage( 'phalanx-link-stats' )->plain(); foreach ( $data[$module] as $match ) { - // uses escapeFullURL() for XHTML compliance (encoded ampersands) - $phalanxUrl = SpecialPage::getTitleFor( 'Phalanx' )->escapeFullURL( array( 'id' => $match['id'] ) ); + // uses htmlspecialchars() for XHTML compliance (encoded ampersands) + $phalanxUrl = htmlspecialchars( SpecialPage::getTitleFor( 'Phalanx' )->getFullURL( array( 'id' => $match['id'] ) ) ); $statsUrl = SpecialPage::getTitleFor( 'PhalanxStats', $match['id'] )->getFullURL(); $line = htmlspecialchars( $match['text'] ) . ' • ' . diff --git a/SpecialPhalanx.body.php b/SpecialPhalanx.body.php index f2bdb7e..6c9d81c 100644 --- a/SpecialPhalanx.body.php +++ b/SpecialPhalanx.body.php @@ -176,8 +176,8 @@ $author = User::newFromId( $row->p_author_id ); $authorName = $author->getName(); - // uses escapeFullURL() for XHTML compliance (encoded ampersands) - $phalanxUrl = SpecialPage::getTitleFor( 'Phalanx' )->escapeFullURL( array( 'id' => $row->p_id ) ); + // uses htmlspecialchars() for XHTML compliance (encoded ampersands) + $phalanxUrl = htmlspecialchars( SpecialPage::getTitleFor( 'Phalanx' )->getFullURL( array( 'id' => $row->p_id ) ) ); $statsUrl = SpecialPage::getTitleFor( 'PhalanxStats', $row->p_id )->getFullURL(); $html = ''; -- To view, visit https://gerrit.wikimedia.org/r/142777 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3951c066b4dc2766ebf949cb292cc8b592a40e8a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Phalanx Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...QuizGame)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142776 Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: I83b99e57701768e051fe14cf47ae2cbbc17214d2 --- M QuestionGameHome.body.php M ViewQuizzes.php 2 files changed, 22 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuizGame refs/changes/76/142776/1 diff --git a/QuestionGameHome.body.php b/QuestionGameHome.body.php index 74f5486..8220bb4 100644 --- a/QuestionGameHome.body.php +++ b/QuestionGameHome.body.php @@ -410,7 +410,7 @@ - ' . + ' . $this->msg( 'quizgame-admin-back' )->text() . ' @@ -601,11 +601,11 @@ + ) ) ) ) . '"> '; @@ -615,9 +615,9 @@ + ) ) ) ) . '"> '; } @@ -667,7 +667,7 @@ $output .= " getPageTitle()->escapeFullURL( 'questionGameAction=completeEdit' ) . + htmlspecialchars( $this->getPageTitle()->getFullURL( 'questionGameAction=completeEdit' ) ) . '"> @@ -729,7 +729,7 @@ msg( 'quizgame-save-page-button' )->text() . "\" onclick=\"javascript:document.quizGameEditForm.submit()\"/> msg( 'quizgame-cancel-button' )->text() . "\" onclick=\"javascript:document.location='" . - $this->getPageTitle()->escapeFullURL( 'questionGameAction=launchGame' ) . '\'" /> + htmlspecialchars( $this->getPageTitle()->getFullURL( 'questionGameAction=launchGame' ) ) . '\'" /> '; @@ -746,10 +746,10 @@ $output .= ' + htmlspecialchars( Title::newMainPage()->getFullURL() ) . '\'" /> + htmlspecialchars( SpecialPage::getTitleFor( 'Userlogin' )->getFullURL() ) . '\'" /> '; $this->getOutput()->addHTML( $output ); } @@ -768,7 +768,7 @@ $output .= ' '; @@ -790,7 +790,7 @@ function renderStart() { $this->getOutput()->setPageTitle( $this->msg( 'quizgame-title' )->text() ); - $url = $this->getPageTitle()->escapeFullURL( 'questionGameAction=launchGame' ); + $url = htmlspecialchars( $this->getPageTitle()->getFullURL( 'questionGameAction=launchGame' ) ); $output = $this->msg( 'quizgame-intro' )->parse() . ' ' . $this->msg( 'quizgame-introlink' )->text() . ''; $this->getOutput()->addHTML( $output ); @@ -1098,7 +1098,7 @@ $output .= '' . $this->msg( 'quizgame-skip' )->text() . ''; } else { - $output .= '' . + $output .= '' . $this->msg( 'quizgame-next' )->text() . ''; } $output .= ''; @@ -1110,7 +1110,7 @@ ' . $this->msg( 'quizgame-last-question' )->text() . ' - getPageTitle()->getFullURL( "questionGameAction=renderPermalink&permalinkID={$prev_question['id']}" ) ) . "\">{$prev_question['text']} " . $this->msg( 'quizgame-times-answered', $prev_question['answer_count'] )->parse() . @@ -1168,7 +1168,7 @@ - getPageTitle()->escapeFullURL( 'questionGameAction=createForm' ) . '">' +
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...PictureGame)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142775 Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: Ib2fca529e77591f05579ffd39fd532b33594a63a --- M PictureGameHome.body.php 1 file changed, 43 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PictureGame refs/changes/75/142775/1 diff --git a/PictureGameHome.body.php b/PictureGameHome.body.php index 35aadee..e3e2c1c 100644 --- a/PictureGameHome.body.php +++ b/PictureGameHome.body.php @@ -356,18 +356,18 @@ $output .= ' + htmlspecialchars( $this->getPageTitle()->getFullURL( 'picGameAction=completeEdit' ) ) . '"> ' . $this->msg( 'picturegame-submittedby' )->plain() . ' - + - escapeFullURL() . "\">{$user_name} + getFullURL() ) . "\">{$user_name} @@ -434,7 +434,7 @@ getPageTitle()->escapeFullURL( "picGameAction=renderPermalink&id={$imgID}" ) . "'\" value=\"" . + htmlspecialchars( $this->getPageTitle()->getFullURL( "picGameAction=renderPermalink&id={$imgID}" ) ) . "'\" value=\"" . $this->msg( 'picturegame-buttoncancel' )->plain() . "\"/> @@ -465,7 +465,7 @@ $out->setPageTitle( $this->msg( 'picturegame-adminpaneltitle' )->text() ); $output .= ' -' . +' . $this->msg( 'picturegame-adminpanelbacktogame' )->text() . ' @@ -733,88 +733,88 @@ if( $type == 'votes' && $direction == 'most' ) { $output .= '' . $this->msg( 'picturegame-most' )->text() . ' ' . $this->msg( 'picturegame-mostvotes' )->text() . ' - getFullURL( array( 'picGameAction' => 'gallery', 'type' => 'heat', 'direction' => 'most' - ) ) . '">' . $this->msg( 'picturegame-mostheat' )->text() . ' + ) ) ) . '">' . $this->msg( 'picturegame-mostheat' )->text() . ' ' . $this->msg( 'picturegame-least' )->text() . ' - getFullURL( array( 'picGameAction' => 'gallery', 'type' => 'votes', 'direction' => 'least' - ) ) . '">' . $this->msg( 'picturegame-leastvotes' )->text() . ' - ' . $this->msg( 'picturegame-leastvotes' )->text() . ' + ' . $this->msg( 'picturegame-leastheat' )->text() . ''; + ) ) ) . '">' . $this->msg( 'picturegame-leastheat' )->text() . ''; } if( $type == 'votes' && $direction == 'least' ) { $output .= '' . $this->msg( 'picturegame-most' )->text() . ' - getFullURL( array( 'picGameAction' => 'gallery', 'type' => 'votes', 'direction' => 'most' - ) ) . '">' . $this->msg( 'picturegame-mostvotes' )->text() . ' - ' . $this->msg( 'picturegame-mostvotes' )->text() . ' + ' . $this->msg( 'picturegame-mostheat' )->text() . ' + ) ) ) . '">' . $this->msg( 'picturegame-mostheat' )->text() . ' ' . $this->msg( 'picturegame-least' )->text() . '
[MediaWiki-commits] [Gerrit] Add $wgUserMergeEnableDelete configuration option - change (mediawiki...UserMerge)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/142774 Change subject: Add $wgUserMergeEnableDelete configuration option .. Add $wgUserMergeEnableDelete configuration option Allows a wiki to disable the functionality of user deletion, while still allowing users to be merged. Change-Id: I63a410cb317b66ac7b03a5c9473bc9f5159155b6 --- M SpecialUserMerge.php M UserMerge.php 2 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UserMerge refs/changes/74/142774/1 diff --git a/SpecialUserMerge.php b/SpecialUserMerge.php index ac763fc..fb08bd4 100644 --- a/SpecialUserMerge.php +++ b/SpecialUserMerge.php @@ -82,7 +82,8 @@ * @return bool|string true if valid, a string of the error's message key if validation failed */ public function validateNewUser( $val ) { - if ( $val === 'Anonymous' ) { + global $wgUserMergeEnableDelete; + if ( $wgUserMergeEnableDelete && $val === 'Anonymous' ) { return true; // Special case } $newUser = User::newFromName( $val ); @@ -106,11 +107,12 @@ * @return Status */ public function onSubmit( array $data ) { + global $wgUserMergeEnableDelete; // Most of the data has been validated using callbacks // still need to check if the users are different $newUser = User::newFromName( $data['newuser'] ); // Handle "Anonymous" as a special case for user deletion - if ( $data['newuser'] === 'Anonymous' ) { + if ( $wgUserMergeEnableDelete && $data['newuser'] === 'Anonymous' ) { $newUser->mId = 0; } diff --git a/UserMerge.php b/UserMerge.php index 2848613..a417eac 100644 --- a/UserMerge.php +++ b/UserMerge.php @@ -40,6 +40,19 @@ 'version'=> '1.9.0' ); +// Configuration options: + +/** + * Whether to allow users to delete other users + * If false, users with the "usermerge" right + * will only be able to merge other users. + * + * @var bool + */ + +$wgUserMergeEnableDelete = true; + + $wgAvailableRights[] = 'usermerge'; # $wgGroupPermissions['bureaucrat']['usermerge'] = true; -- To view, visit https://gerrit.wikimedia.org/r/142774 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63a410cb317b66ac7b03a5c9473bc9f5159155b6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UserMerge Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...PollNY)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142773 Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: Iaebbe2cf05149adcd6342707669118df2de0cec5 --- M PollNYHooks.php M PollPage.php M SpecialAdminPoll.php M SpecialUpdatePoll.php M SpecialViewPoll.php M create-poll.tmpl.php 6 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PollNY refs/changes/73/142773/1 diff --git a/PollNYHooks.php b/PollNYHooks.php index 109b17e..fea0a9d 100644 --- a/PollNYHooks.php +++ b/PollNYHooks.php @@ -286,7 +286,7 @@ 'poll-based-on-votes', $poll_info['votes'] )->parse() . ')'; - $output .= '' . + $output .= '' . wfMessage( 'poll-discuss' )->text() . ''; $output .= '' . wfMessage( 'poll-createdago', Poll::getTimeAgo( $poll_info['timestamp'] ) )->parse() . diff --git a/PollPage.php b/PollPage.php index 86e30ac..3d1036e 100644 --- a/PollPage.php +++ b/PollPage.php @@ -75,7 +75,7 @@ // Show the "create a poll" link to registered users if( $wgUser->isLoggedIn() ) { $output .= ' - + ' . wfMessage( 'poll-create' )->text() . ' @@ -107,7 +107,7 @@ - escapeFullURL( 'user=' . $poll_info['user_name'] ) . '">' + getFullURL( 'user=' . $poll_info['user_name'] ) ) . '">' . wfMessage( 'poll-view-all-by', $user_name_short, $poll_info['user_name'] )->parse() . ' '; diff --git a/SpecialAdminPoll.php b/SpecialAdminPoll.php index c79cd6d..d73a2b1 100644 --- a/SpecialAdminPoll.php +++ b/SpecialAdminPoll.php @@ -75,7 +75,7 @@ foreach( $nav as $status => $title ) { $output .= ''; if( $current_status != $status ) { - $output .= '{$title}"; + $output .= '{$title}"; } else { $output .= "{$title}"; } @@ -179,7 +179,7 @@ getAvatarImage()}\" alt=\"\" /> {$user_create} - escapeFullURL()}\">{$poll_title} + getFullURL() )}\">{$poll_title} "; foreach( $poll_choices as $choice ) { $output .= "{$choice['choice']}"; diff --git a/SpecialUpdatePoll.php b/SpecialUpdatePoll.php index 82c58cf..d225d1a 100644 --- a/SpecialUpdatePoll.php +++ b/SpecialUpdatePoll.php @@ -189,7 +189,7 @@ escapeFullURL( 'wpThumbWidth=75' ) . '"> + htmlspecialchars( SpecialPage::getTitleFor( 'PollAjaxUpload' )->getFullURL( 'wpThumbWidth=75' ) ) . '"> diff --git a/SpecialViewPoll.php b/SpecialViewPoll.php index b7b6d57..c29a34a 100644 --- a/SpecialViewPoll.php +++ b/SpecialViewPoll.php @@ -58,7 +58,7 @@ $output = ' - ' . + ' . $this->msg( 'poll-take-button' )->text() . ' @@ -152,9 +152,9 @@ $title = Title::makeTitle( NS_POLL, $poll_title ); if( ( $x < $dbr->numRows( $res ) ) && ( $x % $per_page != 0 ) ) { - $output .= "escapeFullURL()}'\">"; + $output .= "getFullURL() )}'\">"; } else { - $output .= "escapeFullURL()}'\">"; + $output .= "getFullURL() )}'\">"; } $output .= "{$x}. diff --git a/create-poll.tmpl.php b/create-poll.tmpl.php index cb32294..2cd481d 100644 --- a/create-poll.tmpl.php +++ b/create-poll.tmpl.php @@ -56,7 +56,7 @@ -
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...RandomGameUnit)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142772 Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: Iff551d84245e702c934d68ff16858447951b4228 --- M RandomGameUnit.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RandomGameUnit refs/changes/72/142772/1 diff --git a/RandomGameUnit.php b/RandomGameUnit.php index d2fdd9b..19be4ed 100644 --- a/RandomGameUnit.php +++ b/RandomGameUnit.php @@ -203,9 +203,9 @@ $output .= ''; foreach( $poll['choices'] as $choice ) { - $output .= ' + $output .= ' ' . $choice['choice'] . + htmlspecialchars( $poll_link->getFullURL() ) . '\'" /> ' . $choice['choice'] . ''; } $output .= ' @@ -220,7 +220,7 @@ $quiz_title = SpecialPage::getTitleFor( 'QuizGameHome' ); $output = ' ' . wfMsg( 'game-unit-quiz-title' ) . ' - ' . $quiz['text'] . ''; + ' . $quiz['text'] . ''; if( $quiz['image'] ) { $quiz_image_width = $wgRandomImageSize; @@ -234,7 +234,7 @@ $width = $quiz_image->getWidth(); } } - $quiz_image_tag = ' + $quiz_image_tag = ' '; $output .= '' . $quiz_image_tag . ''; } @@ -294,10 +294,10 @@ ' . $title_text . ' - ' . $imgOne . ' + ' . $imgOne . ' - ' . $imgTwo . ' + ' . $imgTwo . ' -- To view, visit https://gerrit.wikimedia.org/r/142772 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff551d84245e702c934d68ff16858447951b4228 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RandomGameUnit Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...UserStatus)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142771 Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: I0581d6d87df50fef8681f9a3719037c817937dac --- M ApiUserStatus.php M SpecialFanUpdates.php M SpecialViewThought.php M UserStatusClass.php 4 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UserStatus refs/changes/71/142771/1 diff --git a/ApiUserStatus.php b/ApiUserStatus.php index 422c552..d564207 100644 --- a/ApiUserStatus.php +++ b/ApiUserStatus.php @@ -228,7 +228,7 @@ $output .= " {$avatar->getAvatarURL()} - escapeFullURL()}\">{$db_user_name} {$db_status_text} + getFullURL() )}\">{$db_user_name} {$db_status_text} " . wfMessage( 'userstatus-just-added' )->text() . ' diff --git a/SpecialFanUpdates.php b/SpecialFanUpdates.php index 132cef1..a1f19cf 100644 --- a/SpecialFanUpdates.php +++ b/SpecialFanUpdates.php @@ -50,13 +50,13 @@ $output .= 'escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::newMainPage()->getFullURL() ) . "'\"/>"; /* removed because I was too lazy to port the error message over :P if ( $user->isLoggedIn() ) { $output .= ' getName() )->escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::makeTitle( NS_USER, $wgUser->getName() )->getFullURL() ) . "'\"/>"; } */ $output .= ''; diff --git a/SpecialViewThought.php b/SpecialViewThought.php index 298ada3..997e652 100644 --- a/SpecialViewThought.php +++ b/SpecialViewThought.php @@ -54,7 +54,7 @@ $output .= 'escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::newMainPage()->getFullURL() ) . "'\"/>"; $output .= ''; $out->addHTML( $output ); diff --git a/UserStatusClass.php b/UserStatusClass.php index 89ef4a7..a97dc74 100644 --- a/UserStatusClass.php +++ b/UserStatusClass.php @@ -536,7 +536,7 @@ static function getUserUpdatesURL( $user_name ) { $title = SpecialPage::getTitleFor( 'UserStatus' ); - return $title->escapeFullURL( "user=$user_name" ); + return htmlspecialchars( $title->getFullURL( "user=$user_name" ) ); } public static function dateDifference( $date1, $date2 ) { -- To view, visit https://gerrit.wikimedia.org/r/142771 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0581d6d87df50fef8681f9a3719037c817937dac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UserStatus Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...SiteMetrics)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142770 Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: I189719b95f8832a80348e54c2f266bf93edcf657 --- M SpecialSiteMetrics.php 1 file changed, 31 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SiteMetrics refs/changes/70/142770/1 diff --git a/SpecialSiteMetrics.php b/SpecialSiteMetrics.php index 41c07d9..04c68d0 100644 --- a/SpecialSiteMetrics.php +++ b/SpecialSiteMetrics.php @@ -203,33 +203,33 @@ $output .= ' ' . wfMsg( 'sitemetrics-content-header' ) . ' - ' . wfMsg( 'sitemetrics-edits' ) . ' - ' . wfMsg( 'sitemetrics-main-ns' ) . ' - ' . wfMsg( 'sitemetrics-new-articles' ) . ''; + ' . wfMsg( 'sitemetrics-edits' ) . ' + ' . wfMsg( 'sitemetrics-main-ns' ) . ' + ' . wfMsg( 'sitemetrics-new-articles' ) . ''; // On March 26, 2010: these stats don't seem to be existing and // will only be confusing to end users, so I'm disabling them for now. - // ' . wfMsg( 'sitemetrics-greater-5-edits' ) . ' - // ' . wfMsg( 'sitemetrics-greater-100-edits' ) . ' - $output .= '' . wfMsg( 'sitemetrics-anon-edits' ) . ' - ' . wfMsg( 'sitemetrics-images' ) . ''; + // ' . wfMsg( 'sitemetrics-greater-5-edits' ) . ' + // ' . wfMsg( 'sitemetrics-greater-100-edits' ) . ' + $output .= '' . wfMsg( 'sitemetrics-anon-edits' ) . ' + ' . wfMsg( 'sitemetrics-images' ) . ''; if ( class_exists( 'Video' ) ) { - $output .= '' . wfMsg( 'sitemetrics-video' ) . ''; + $output .= '' . wfMsg( 'sitemetrics-video' ) . ''; } $output .= '' . wfMsg( 'sitemetrics-user-social-header' ) . ' - ' . wfMsg( 'sitemetrics-new-users' ) . ' - ' . wfMsg( 'sitemetrics-avatars' ) . ' - ' . wfMsg( 'sitemetrics-profile-updates' ) . ' - ' . wfMsg( 'sitemetrics-user-page-edits' ) . ' - ' . wfMsg( 'sitemetrics-friendships' ) . ' - ' . wfMsg( 'sitemetrics-foeships' ) . ' - ' . wfMsg( 'sitemetrics-gifts' ) . ' - ' . wfMsg( 'sitemetrics-wall-messages' ) . ' - ' . wfMsg( 'sitemetrics-talk-messages' ) . ' + ' . wfMsg( 'sitemetrics-new-users' ) . ' + ' . wfMsg( 'sitemetrics-avatars' ) . ' + ' . wfMsg( 'sitemetrics-profile-updates' ) . ' + ' . wfMsg( 'sitemetrics-user-page-edits' ) . ' + ' . wfMsg( 'sitemetrics-friendships' ) . ' + ' . wfMsg( 'sitemetrics-foeships' ) . ' + ' . wfMsg( 'sitemetrics-gifts' ) . ' + ' . wfMsg( 'sitemetrics-wall-messages' ) . ' + ' . wfMsg( 'sitemetrics-talk-messages' ) . ' ' . wfMsg( 'sitemetrics-point-stats-header' ) . ' - ' . wfMsg( 'sitemetrics-awards' ) . ' - ' . wfMsg( 'sitemetrics-honorifics' ) . ''; + ' . wfMsg( 'sitemetrics-awards' ) . ' + ' . wfMsg( 'sitemetrics-honorifics' ) . ''; // Only display links to casual game statistics if said extensions are // installed... @@ -241,16 +241,16 @@ { $output .= '' . wfMsg( 'sitemetrics-casual-game-stats' ) . ''; if ( class_exists( 'Poll' ) ) { - $output .= '' . wfMsg( 'sitemetrics-polls-created' ) . ' - ' . wfMsg( 'sitemetrics-polls-taken' ) . ''; + $output .= '' . wfMsg( 'sitemetrics-polls-created' ) . ' + ' . wfMsg( 'sitemetrics-polls-taken' ) . ''; } if ( class_exists( 'PictureGameHome' ) ) { - $output .= '' . wfMsg( 'sitemetrics-picgames-created' ) . ' - ' . wfMsg( 'sitemetrics-picgames-taken' ) . ''; + $output .= ''
[MediaWiki-commits] [Gerrit] Tweaks to Parsoid CSS styles for citations. - change (mediawiki/core)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/142769 Change subject: Tweaks to Parsoid CSS styles for citations. .. Tweaks to Parsoid CSS styles for citations. * This brings Parsoid rendering quite close to PHP rendered output. Change-Id: I22e1fad26e917a84a24193c53bf9522b383b849d --- M resources/src/mediawiki.skinning/content.parsoid.less 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/69/142769/1 diff --git a/resources/src/mediawiki.skinning/content.parsoid.less b/resources/src/mediawiki.skinning/content.parsoid.less index 775b249..ebd6b92 100644 --- a/resources/src/mediawiki.skinning/content.parsoid.less +++ b/resources/src/mediawiki.skinning/content.parsoid.less @@ -32,10 +32,14 @@ */ span.reference { font-size: smaller; - line-height: normal; + line-height: 1; vertical-align: super; } +sup, sub { + line-height: 1; +} + /** * Block media items */ -- To view, visit https://gerrit.wikimedia.org/r/142769 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I22e1fad26e917a84a24193c53bf9522b383b849d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop setting owner/group on files in /vagrant/settings.d - change (mediawiki/vagrant)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/142768 Change subject: Stop setting owner/group on files in /vagrant/settings.d .. Stop setting owner/group on files in /vagrant/settings.d When using the host NFS server to export file systems to the client VM, there can be issues with uid/gid mapping that prevent setting file ownership. Bug: 67231 Change-Id: I3228ab4038cbf38befa1e6cc1a317a1ec03463ea --- M puppet/modules/multiwiki/manifests/init.pp M puppet/modules/multiwiki/manifests/wiki.pp 2 files changed, 6 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/68/142768/1 diff --git a/puppet/modules/multiwiki/manifests/init.pp b/puppet/modules/multiwiki/manifests/init.pp index c118984..425edaa 100644 --- a/puppet/modules/multiwiki/manifests/init.pp +++ b/puppet/modules/multiwiki/manifests/init.pp @@ -13,11 +13,6 @@ $docroot = '/srv/multiwiki' $upload_dir= $::role::mediawiki::upload_dir -File { -owner => 'vagrant', -group => 'www-data', -} - file { $settings_root: ensure => directory, mode=> '0755', @@ -45,18 +40,24 @@ mode=> '0755', source => 'puppet:///modules/multiwiki/docroot', recurse => true, +owner => 'vagrant', +group => 'www-data', } file { "${docroot}/dblist.php": ensure => present, mode=> '0644', content => template('multiwiki/docroot/dblist.php.erb'), +owner => 'vagrant', +group => 'www-data', } file { "${docroot}/defines.php": ensure => present, mode=> '0644', content => template('multiwiki/docroot/defines.php.erb'), +owner => 'vagrant', +group => 'www-data', } file { "${docroot}/extensions": diff --git a/puppet/modules/multiwiki/manifests/wiki.pp b/puppet/modules/multiwiki/manifests/wiki.pp index b0f1e6e..f63 100644 --- a/puppet/modules/multiwiki/manifests/wiki.pp +++ b/puppet/modules/multiwiki/manifests/wiki.pp @@ -58,15 +58,10 @@ file { $multiwiki_dir: ensure => directory, -owner => 'vagrant', -group => 'www-data', -mode => '0755', } file { "${multiwiki_dir}/wgConf.php": ensure => present, -owner => 'vagrant', -group => 'www-data', mode=> '0644', content => template('multiwiki/wgConf.php.erb'), require => File[$multiwiki_dir], @@ -74,8 +69,6 @@ file { "${multiwiki_dir}/dbConf.php": ensure => present, -owner => 'vagrant', -group => 'www-data', mode=> '0644', content => template('multiwiki/dbConf.php.erb'), require => File[$multiwiki_dir], @@ -83,16 +76,12 @@ file { $settings_dir: ensure => directory, -owner => 'vagrant', -group => 'www-data', mode=> '0755', require => File[$multiwiki_dir], } file { "${settings_dir}/puppet-managed": ensure => directory, -owner => 'vagrant', -group => 'www-data', mode=> undef, recurse => true, purge => true, -- To view, visit https://gerrit.wikimedia.org/r/142768 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3228ab4038cbf38befa1e6cc1a317a1ec03463ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove 'Wikipedia' from pywikibot.Error docstring - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/142767 Change subject: Remove 'Wikipedia' from pywikibot.Error docstring .. Remove 'Wikipedia' from pywikibot.Error docstring Change-Id: I99e9cd43a7541b0e726a326cf8638b79f29620cb --- M pywikibot/exceptions.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/67/142767/1 diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py index fa0469e..75c363b 100644 --- a/pywikibot/exceptions.py +++ b/pywikibot/exceptions.py @@ -18,7 +18,7 @@ class Error(UnicodeMixin, Exception): -"""Wikipedia error""" +"""Pywikibot error""" # NOTE: UnicodeMixin must be the first object Error class is derived from. def __init__(self, arg): self.unicode = arg -- To view, visit https://gerrit.wikimedia.org/r/142767 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99e9cd43a7541b0e726a326cf8638b79f29620cb Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Lint Obsolete HTML tags - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Lint Obsolete HTML tags .. Lint Obsolete HTML tags Change-Id: I9d38b610d1c3617f5afc35c92b456ab36da14dad --- M lib/dom.linter.js 1 file changed, 25 insertions(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/dom.linter.js b/lib/dom.linter.js index 7c50274..e59a87d 100644 --- a/lib/dom.linter.js +++ b/lib/dom.linter.js @@ -5,7 +5,9 @@ * 1. Tree Builder Fixups * 2. Fostered Content * 3. Ignored table attributes -* 4. Mixed Templates +* 4. Multi Templates +* 5. Mixed Content +* 6. Obsolete HTML Tags */ "use strict"; @@ -162,12 +164,30 @@ return nextSibling; } + +/* +* +* Log Obsolete HTML Tags like BIG, CENTER, FONT, STRIKE, and TT +* See - http://www.w3.org/TR/html5/obsolete.html#non-conforming-features +* +*/ +function logObsoleteHTMLTags(env, c) { + +var dsr = DU.getDataParsoid(c).dsr; +var re = /^(BIG|CENTER|FONT|STRIKE|TT)$/; + +if (re.test(c.nodeName)) { +env.log('lint/ObsoleteTag', env.page.src, dsr); +} +} + function logWikitextFixups(node, env) { var c = node.firstChild; while (c) { var nextSibling = c.nextSibling; + if (DU.isTplElementNode(env, c)) { // Log transclusions with more than one part @@ -194,6 +214,10 @@ // Process subtree logWikitextFixups(c, env); } + +// Log obsolete HTML tags +logObsoleteHTMLTags(env, c); + } c = nextSibling; -- To view, visit https://gerrit.wikimedia.org/r/142744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d38b610d1c3617f5afc35c92b456ab36da14dad Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Hardikj Gerrit-Reviewer: Hardikj Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support different RL sources in OutputPage::makeResourceLoad... - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/142766 Change subject: Support different RL sources in OutputPage::makeResourceLoaderLink() .. Support different RL sources in OutputPage::makeResourceLoaderLink() ResourceLoader::makeLoaderURL() now takes a $source parameter, which points to the ResourceLoader source to use, with the default being 'local' for the current wiki. Change-Id: I961c641ab953153057be3e3b8cf6c07435e9a0b0 --- M includes/OutputPage.php M includes/resourceloader/ResourceLoader.php M includes/resourceloader/ResourceLoaderModule.php 3 files changed, 138 insertions(+), 128 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/66/142766/1 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 2a96891..4a6ec4d 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2746,8 +2746,8 @@ $extraQuery['target'] = $this->mTarget; } - // Create keyed-by-group list of module objects from modules list - $groups = array(); + // Create keyed-by-source and then keyed-by-group list of module objects from modules list + $sortedModules = array(); $resourceLoader = $this->getResourceLoader(); foreach ( $modules as $name ) { $module = $resourceLoader->getModule( $name ); @@ -2762,136 +2762,135 @@ continue; } - $group = $module->getGroup(); - if ( !isset( $groups[$group] ) ) { - $groups[$group] = array(); - } - $groups[$group][$name] = $module; + $sortedModules[$module->getSource()][$module->getGroup()][$name] = $module; } - foreach ( $groups as $group => $grpModules ) { - // Special handling for user-specific groups - $user = null; - if ( ( $group === 'user' || $group === 'private' ) && $this->getUser()->isLoggedIn() ) { - $user = $this->getUser()->getName(); - } - - // Create a fake request based on the one we are about to make so modules return - // correct timestamp and emptiness data - $query = ResourceLoader::makeLoaderQuery( - array(), // modules; not determined yet - $this->getLanguage()->getCode(), - $this->getSkin()->getSkinName(), - $user, - null, // version; not determined yet - ResourceLoader::inDebugMode(), - $only === ResourceLoaderModule::TYPE_COMBINED ? null : $only, - $this->isPrintable(), - $this->getRequest()->getBool( 'handheld' ), - $extraQuery - ); - $context = new ResourceLoaderContext( $resourceLoader, new FauxRequest( $query ) ); - - // Extract modules that know they're empty - foreach ( $grpModules as $key => $module ) { - // Inline empty modules: since they're empty, just mark them as 'ready' (bug 46857) - // If we're only getting the styles, we don't need to do anything for empty modules. - if ( $module->isKnownEmpty( $context ) ) { - unset( $grpModules[$key] ); - if ( $only !== ResourceLoaderModule::TYPE_STYLES ) { - $links['states'][$key] = 'ready'; - } + foreach ( $sortedModules as $source => $groups ) { + foreach ( $groups as $group => $grpModules ) { + // Special handling for user-specific groups + $user = null; + if ( ( $group === 'user' || $group === 'private' ) && $this->getUser()->isLoggedIn() ) { + $user = $this->getUser()->getName(); } - } - // If there are no non-empty modules, skip this group - if ( count( $grpModules ) === 0 ) { - continue; - } + // Create a fake request based on the one we are about to make so modules return + // correct
[MediaWiki-commits] [Gerrit] Fix Labs URL for ZeroBanner. Prod noop. - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Fix Labs URL for ZeroBanner. Prod noop. .. Fix Labs URL for ZeroBanner. Prod noop. Can be reverted once this gets merged: Id46774ea217d9d44bf8c1dcce4fa7a56bbc891d6 Change-Id: Ib81fdfb13ae2e2d85fcfa2e7eb50e1d96921b33f --- M wmf-config/mobile-labs.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php index 1078005..edfcdb0 100644 --- a/wmf-config/mobile-labs.php +++ b/wmf-config/mobile-labs.php @@ -7,6 +7,9 @@ require_once( __DIR__ . '/mobile.php' ); if ( $wmgMobileFrontend ) { + if ( $wmgZeroBanner && !$wmgZeroPortal ) { + $wgJsonConfigs['JsonZeroConfig']['remote']['url'] = 'http://zero.wikimedia.beta.wmflabs.org/w/api.php'; + } } $wgMFForceSecureLogin = false; -- To view, visit https://gerrit.wikimedia.org/r/142765 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib81fdfb13ae2e2d85fcfa2e7eb50e1d96921b33f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Yurik Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Labs URL for ZeroBanner. Prod noop. - change (operations/mediawiki-config)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/142765 Change subject: Fix Labs URL for ZeroBanner. Prod noop. .. Fix Labs URL for ZeroBanner. Prod noop. Can be reverted once this gets merged: Id46774ea217d9d44bf8c1dcce4fa7a56bbc891d6 Change-Id: Ib81fdfb13ae2e2d85fcfa2e7eb50e1d96921b33f --- M wmf-config/mobile-labs.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/65/142765/1 diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php index 1078005..edfcdb0 100644 --- a/wmf-config/mobile-labs.php +++ b/wmf-config/mobile-labs.php @@ -7,6 +7,9 @@ require_once( __DIR__ . '/mobile.php' ); if ( $wmgMobileFrontend ) { + if ( $wmgZeroBanner && !$wmgZeroPortal ) { + $wgJsonConfigs['JsonZeroConfig']['remote']['url'] = 'http://zero.wikimedia.beta.wmflabs.org/w/api.php'; + } } $wgMFForceSecureLogin = false; -- To view, visit https://gerrit.wikimedia.org/r/142765 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib81fdfb13ae2e2d85fcfa2e7eb50e1d96921b33f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Yurik ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix LABS url for Zero portal. Ready to commit any time. - change (operations/mediawiki-config)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/142764 Change subject: Fix LABS url for Zero portal. Ready to commit any time. .. Fix LABS url for Zero portal. Ready to commit any time. This patch fixes the broken zero portal to use beta portal. This patch can be commited at any time, and should not affect production. Change-Id: Id46774ea217d9d44bf8c1dcce4fa7a56bbc891d6 --- M wmf-config/mobile.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/64/142764/1 diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php index 87b6da8..058d827 100644 --- a/wmf-config/mobile.php +++ b/wmf-config/mobile.php @@ -38,7 +38,9 @@ require_once( "$IP/extensions/ZeroBanner/ZeroBanner.php" ); $wgJsonConfigs['JsonZeroConfig']['remote'] = array( - 'url' => 'https://zero.wikimedia.org/w/api.php', + 'url' => ( $wmfRealm === 'labs' + ? 'http://zero.wikimedia.beta.wmflabs.org/w/api.php' + : 'https://zero.wikimedia.org/w/api.php' ), 'username' => $wmgZeroPortalApiUserName, 'password' => $wmgZeroPortalApiPassword, ); -- To view, visit https://gerrit.wikimedia.org/r/142764 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id46774ea217d9d44bf8c1dcce4fa7a56bbc891d6 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Yurik ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make AdminLinks installable via Composer - change (mediawiki...AdminLinks)
Jamesmontalvo3 has uploaded a new change for review. https://gerrit.wikimedia.org/r/142763 Change subject: Make AdminLinks installable via Composer .. Make AdminLinks installable via Composer * Update global vars in AdminLinks.php to use $GLOBALS... * Create composer.json * Bump version number in README Change-Id: If64794baf817fbeafa61b04b7a3e89c5d586a16a --- M AdminLinks.php M README A composer.json 3 files changed, 43 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AdminLinks refs/changes/63/142763/1 diff --git a/AdminLinks.php b/AdminLinks.php index 5732500..0a62bb8 100644 --- a/AdminLinks.php +++ b/AdminLinks.php @@ -8,28 +8,28 @@ if ( !defined( 'MEDIAWIKI' ) ) die(); // credits -$wgExtensionCredits['specialpage'][] = array( +$GLOBALS['wgExtensionCredits']['specialpage'][] = array( 'path' => __FILE__, 'name' => 'Admin Links', - 'version' => '0.2', + 'version' => '0.3.0', 'author' => 'Yaron Koren', 'url' => 'https://www.mediawiki.org/wiki/Extension:Admin_Links', 'descriptionmsg' => 'adminlinks-desc', ); -$wgAdminLinksIP = __DIR__ . '/'; -$wgMessagesDirs['AdminLinks'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['AdminLinks'] = $wgAdminLinksIP . 'AdminLinks.i18n.php'; -$wgExtensionMessagesFiles['AdminLinksAlias'] = $wgAdminLinksIP . 'AdminLinks.alias.php'; -$wgSpecialPages['AdminLinks'] = 'AdminLinks'; -$wgSpecialPageGroups['AdminLinks'] = 'users'; -$wgHooks['PersonalUrls'][] = 'AdminLinks::addURLToUserLinks'; -$wgAvailableRights[] = 'adminlinks'; +$GLOBALS['wgAdminLinksIP'] = __DIR__ . '/'; +$GLOBALS['wgMessagesDirs']['AdminLinks'] = __DIR__ . '/i18n'; +$GLOBALS['wgExtensionMessagesFiles']['AdminLinks'] = $GLOBALS['wgAdminLinksIP'] . 'AdminLinks.i18n.php'; +$GLOBALS['wgExtensionMessagesFiles']['AdminLinksAlias'] = $GLOBALS['wgAdminLinksIP'] . 'AdminLinks.alias.php'; +$GLOBALS['wgSpecialPages']['AdminLinks'] = 'AdminLinks'; +$GLOBALS['wgSpecialPageGroups']['AdminLinks'] = 'users'; +$GLOBALS['wgHooks']['PersonalUrls'][] = 'AdminLinks::addURLToUserLinks'; +$GLOBALS['wgAvailableRights'][] = 'adminlinks'; // by default, sysops see the link to this page -$wgGroupPermissions['sysop']['adminlinks'] = true; -$wgAutoloadClasses['AdminLinks'] - = $wgAutoloadClasses['ALTree'] - = $wgAutoloadClasses['ALSection'] - = $wgAutoloadClasses['ALRow'] - = $wgAutoloadClasses['ALItem'] - = $wgAdminLinksIP . 'AdminLinks_body.php'; +$GLOBALS['wgGroupPermissions']['sysop']['adminlinks'] = true; +$GLOBALS['wgAutoloadClasses']['AdminLinks'] + = $GLOBALS['wgAutoloadClasses']['ALTree'] + = $GLOBALS['wgAutoloadClasses']['ALSection'] + = $GLOBALS['wgAutoloadClasses']['ALRow'] + = $GLOBALS['wgAutoloadClasses']['ALItem'] + = $GLOBALS['wgAdminLinksIP'] . 'AdminLinks_body.php'; diff --git a/README b/README index 13696fa..bdb1d8e 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ Admin Links extension -Version 0.2 +Version 0.3 Yaron Koren This is free software licensed under the GNU General Public License. Please diff --git a/composer.json b/composer.json new file mode 100644 index 000..c60a3e3 --- /dev/null +++ b/composer.json @@ -0,0 +1,25 @@ +{ + "name": "enterprisemediawiki/admin-links", + "type": "mediawiki-extension", + "description": "A MediaWiki special page holding special convenience links for sysops", + "keywords": [ + "MediaWiki" + ], + "homepage": "https://www.mediawiki.org/wiki/Extension:AdminLinks";, + "license": "GPL-2.0+", + "authors": [ + { + "name": "Yaron Koren", + "role": "Author" + } + ], + "support": { + "issues": "https://bugzilla.wikimedia.org/"; + }, + "require": { + "composer/installers": ">=1.0.1" + }, + "autoload": { + "files": ["AdminLinks.php"] + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/142763 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If64794baf817fbeafa61b04b7a3e89c5d586a16a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AdminLinks Gerrit-Branch: master Gerrit-Owner: Jamesmontalvo3 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup - change (mediawiki...JsonConfig)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/142762 Change subject: Cleanup .. Cleanup * Refactored dup field checking & name normalization in JCObjContent * Proper error handling if settings object does not exist * better warnings, hides passwords from logs * better remote api execution and error handling Change-Id: I04faec1a2bfd02ba9a0861ae85580ae824a85d1e --- M includes/JCCache.php M includes/JCObjContent.php M includes/JCSingleton.php M includes/JCUtils.php 4 files changed, 141 insertions(+), 107 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JsonConfig refs/changes/62/142762/1 diff --git a/includes/JCCache.php b/includes/JCCache.php index 2f94d34..d67f80b 100644 --- a/includes/JCCache.php +++ b/includes/JCCache.php @@ -153,57 +153,63 @@ */ private function loadRemote() { wfProfileIn( __METHOD__ ); - $remote = $this->conf->remote; - $req = JCUtils::initApiRequestObj( $remote->url, $remote->username, $remote->password ); - $ns = $this->conf->nsName - ? $this->conf->nsName - : MWNamespace::getCanonicalName( $this->titleValue->getNamespace() ); - $articleName = $ns . ':' . $this->titleValue->getText(); - $flrevs = $this->conf->flaggedRevs; - if ( $flrevs === false ) { - $query = array( - 'format' => 'json', - 'action' => 'query', - 'titles' => $articleName, - 'prop' => 'revisions', - 'rvprop' => 'content', - ); - $result = $this->getPageFromApi( $articleName, $req, $query ); - } else { - $query = array( - 'format' => 'json', - 'action' => 'query', - 'titles' => $articleName, - 'prop' => 'info|flagged', - ); - $result = $this->getPageFromApi( $articleName, $req, $query ); - if ( $result !== false && - ( $flrevs === null || array_key_exists( 'flagged', $result ) ) - ) { - // If there is a stable flagged revision present, use it, - // otherwise use the latest revision that exists (unless flaggedRevs is true) - $revId = array_key_exists( 'flagged', $result ) ? - $result['flagged']['stable_revid'] : - $result['lastrevid']; + do { + $result = false; + $remote = $this->conf->remote; + $req = JCUtils::initApiRequestObj( $remote->url, $remote->username, $remote->password ); + if ( !$req ) { + break; + } + $ns = + $this->conf->nsName ? $this->conf->nsName + : MWNamespace::getCanonicalName( $this->titleValue->getNamespace() ); + $articleName = $ns . ':' . $this->titleValue->getText(); + $flrevs = $this->conf->flaggedRevs; + if ( $flrevs === false ) { $query = array( - 'format' => 'json', 'action' => 'query', - 'revids' => $revId, + 'titles' => $articleName, 'prop' => 'revisions', 'rvprop' => 'content', ); - $result = $this->getPageFromApi( $articleName, $req, $query ); - } - } - if ( $result !== false ) { - if ( isset( $result['revisions'][0]['*'] ) ) { - $result = $result['revisions'][0]['*']; + $res = $this->getPageFromApi( $articleName, $req, $query ); } else { - $result = false; - JCUtils::warn( 'Unable to get config content', - array( 'title' => $articleName, 'result' => $result ) ); + $query = array( + 'action' => 'query', + 'titles' => $articleName, +
[MediaWiki-commits] [Gerrit] version update - change (mediawiki...GWToolset)
jenkins-bot has submitted this change and it was merged. Change subject: version update .. version update Change-Id: I84774cb1f3df022a76c553ce06cdb446c1324d3f --- M HISTORY M RELEASE-NOTES M includes/Constants.php 3 files changed, 34 insertions(+), 12 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/HISTORY b/HISTORY index fed127e..c984958 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,6 @@ == GWToolset 0.2.4 == MediaWiki_1.24/wmf8 -scheduled deployed: Tuesday, 10 June 2014 +scheduled deploy: Tuesday, 10 June 2014 https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf8#GWToolset === Max title length === @@ -11,7 +11,7 @@ == GWToolset 0.2.3 == MediaWiki_1.24/wmf7 -scheduled deployed: Tuesday, 03 June 2014 +scheduled deploy: Tuesday, 03 June 2014 https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf7#GWToolset === version update === @@ -21,7 +21,7 @@ == GWToolset 0.2.3 == MediaWiki_1.24/wmf6 -scheduled deployed: Tuesday, 27 May 2014 +scheduled deploy: Tuesday, 27 May 2014 https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf6#GWToolset === Set initial page to Step 1: Metadata detection === @@ -32,7 +32,7 @@ == GWToolset 0.2.2 == MediaWiki_1.24/wmf5 -scheduled deployed: Tuesday, 20 May 2014 +scheduled deploy: Tuesday, 20 May 2014 https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf5#GWToolset === Added more credits to the English i18n file === @@ -64,7 +64,7 @@ == GWToolset 0.2.1 == MediaWiki_1.24/wmf4 -deployed: Tuesday, 13 May 2014 +deploy: Tuesday, 13 May 2014 https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf4#GWToolset === Do not expect return value from JobQueueGroup::push() === @@ -78,7 +78,7 @@ == GWToolset 0.2.0 == MediaWiki_1.24/wmf3 -deployed: Tuesday, 6 May 2014 +deploy: Tuesday, 6 May 2014 https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf3#GWToolset === version update === @@ -88,7 +88,7 @@ == GWToolset 0.2.0 == MediaWiki_1.24/wmf2 -deployed: Tuesday, 29 April 2014 +deploy: Tuesday, 29 April 2014 https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf2#GWToolset === fix MediawikiTemplate::getTitle() method === @@ -110,7 +110,7 @@ == GWToolset 0.1.5 == MediaWiki_1.24/wmf1 -deployed: Tuesday, 22 April 2014 +deploy: Tuesday, 22 April 2014 https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf1#GWToolset === version update === @@ -124,7 +124,7 @@ == GWToolset 0.1.4 == MediaWiki_1.23/wmf22 -deployed: Tuesday, 15 April 2014 +deploy: Tuesday, 15 April 2014 https://www.mediawiki.org/wiki/MediaWiki_1.23/wmf22#GWToolset === fix inconsistency in GWToolset directory reference === @@ -140,7 +140,7 @@ == GWToolset 0.1.3 == MediaWiki_1.23/wmf21 -deployed: Tuesday, 08 April 2014 +deploy: Tuesday, 08 April 2014 https://www.mediawiki.org/wiki/MediaWiki_1.23/wmf21#GWToolset === Add two Commons templates to GWToolset === @@ -170,7 +170,7 @@ == GWToolset 0.1.2 == MediaWiki_1.23/wmf20 -deployed: Tuesday, 01 April 2014 +deploy: Tuesday, 01 April 2014 https://www.mediawiki.org/wiki/MediaWiki_1.23/wmf20#GWToolset === Fix various inconsistencies in messages === diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8b13789..dd53150 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1 +1,23 @@ +== GWToolset 0.3.0 == +MediaWiki_1.24/wmf10 +scheduled deploy: Tuesday, 24 June 2014 +https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf10#GWToolset +== Allow for custom templates == +https://gerrit.wikimedia.org/r/#/c/133684/ +https://bugzilla.wikimedia.org/show_bug.cgi?id=63889 + +== complex categories == +https://gerrit.wikimedia.org/r/#/c/139410/ +https://bugzilla.wikimedia.org/show_bug.cgi?id=65620 + +== Improved the punctuation and the readability of some messages == +https://gerrit.wikimedia.org/r/#/c/140339/ + +== Make template wrapping optional == +https://gerrit.wikimedia.org/r/#/c/133476/ +https://bugzilla.wikimedia.org/show_bug.cgi?id=64060 +https://bugzilla.wikimedia.org/show_bug.cgi?id=65248 + +== version update == +https://gerrit.wikimedia.org/r/#/c/139339/ diff --git a/includes/Constants.php b/includes/Constants.php index da8fbd9..565eb25 100644 --- a/includes/Constants.php +++ b/includes/Constants.php @@ -12,7 +12,7 @@ class Constants { const EXTENSION_NAME = 'GWToolset'; - const EXTENSION_VERSION = '0.2.4'; + const EXTENSION_VERSION = '0.3.0'; const REQUIRED_MEDIAWIKI_VERSION = '1.23c'; const USE_FILEBACKEND = true; -- To view, visit https://gerrit.wikimedia.org/r/142203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84774cb1f3df022a76c553ce06cdb446c1324d3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GWToolset Gerrit-Branch: master Gerrit-Owner: Dan-nl Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Gilles Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: jenkins-bot <> ___ MediaW
[MediaWiki-commits] [Gerrit] RTL positioning tweaks - change (mediawiki...MultimediaViewer)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/142761 Change subject: RTL positioning tweaks .. RTL positioning tweaks * partially undo the RTL fix from mingle #512 which looks bad, and use four-value syyntax for background-position instead. * use noflip on :before rule as :before itself is not flipped * handle better the uncertainty resulting from image name usually not being RTL Change-Id: If4aa7240e9bee5c0a06f1785edb9c72964dfc60f --- M resources/mmv/ui/mmv.ui.metadataPanel.less 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/61/142761/1 diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.less b/resources/mmv/ui/mmv.ui.metadataPanel.less index 3e4d847..786874f 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.less +++ b/resources/mmv/ui/mmv.ui.metadataPanel.less @@ -137,7 +137,12 @@ background-image: url(img/repo.svg); background-repeat: no-repeat; background-size: auto @icon-size; + // icon should be positioned with consistent padding, but using absolute lengths is not RTL-compatible + // so we use percentages (looks a bit off) for older browsers and four-value syntax for newer ones; + // MediaWiki flips 'left' keywords automatically background-position: 2% center; + background-position: left @padding center; + background-color: @info-box-color; line-height: 1.3; @@ -150,6 +155,7 @@ padding-left: @icon-size + 2 * @padding; background-size: auto @icon-size; background-position: 3% center; + background-position: left @padding+4px center; } .mw-mmv-repo, @@ -173,7 +179,7 @@ .mw-mmv-license { color: #88; font-size: 0.9em; - padding-left: 10px; + padding: 0 10px; // pad both sides; depending on the language of the image name, this might end up on either side &.empty { display: none; @@ -188,7 +194,7 @@ height: 20px; width: 20px; content: ' '; - margin-right: 5px; + /* @noflip */ margin-right: 5px; // :before is not flipped either } } -- To view, visit https://gerrit.wikimedia.org/r/142761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4aa7240e9bee5c0a06f1785edb9c72964dfc60f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gergő Tisza ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support overriding the default claimTTL/attempts settings - change (mediawiki...jobrunner)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/142760 Change subject: Support overriding the default claimTTL/attempts settings .. Support overriding the default claimTTL/attempts settings Change-Id: I95e2c042c70f2c42a5ffc76ad960aa99e6919c7d --- M redisJobRunnerService 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/jobrunner refs/changes/60/142760/1 diff --git a/redisJobRunnerService b/redisJobRunnerService index b65db3b..20563af 100755 --- a/redisJobRunnerService +++ b/redisJobRunnerService @@ -192,6 +192,7 @@ if ( isset( $config['password'] ) ) { $this->password = $config['password']; } + $this->claimTTLMap['*'] = 3600; // default if ( isset( $config['claimTTL'] ) ) { $tuples = explode( ',', $config['claimTTL'] ); foreach ( $tuples as $tuple ) { @@ -199,6 +200,7 @@ $this->claimTTLMap[$type] = (int)$value; } } + $this->attemptsMap['*'] = 3; // default if ( isset( $config['attempts'] ) ) { $tuples = explode( ',', $config['attempts'] ); foreach ( $tuples as $tuple ) { @@ -562,8 +564,12 @@ $paramsByQueue = array(); foreach ( $types as $type ) { - $ttl = isset( $this->claimTTLMap[$type] ) ? $this->claimTTLMap[$type] : 3600; - $attempts = isset( $this->attemptsMap[$type] ) ? $this->attemptsMap[$type] : 3; + $ttl = isset( $this->claimTTLMap[$type] ) + ? $this->claimTTLMap[$type] + : $this->claimTTLMap['*']; + $attempts = isset( $this->attemptsMap[$type] ) + ? $this->attemptsMap[$type] + : $this->attemptsMap['*']; foreach ( $wikiIds as $wikiId ) { $paramsByQueue[] = array( 'queue' => array( $type, $wikiId ), -- To view, visit https://gerrit.wikimedia.org/r/142760 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95e2c042c70f2c42a5ffc76ad960aa99e6919c7d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/jobrunner Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move border-bottom out of .overlay-header-container - change (mediawiki...MobileFrontend)
JGonera has uploaded a new change for review. https://gerrit.wikimedia.org/r/142759 Change subject: Move border-bottom out of .overlay-header-container .. Move border-bottom out of .overlay-header-container It will help with styling mobile context when it gets here. Change-Id: I3d49f2b6c4ae3cfbcd8815ccef3d06a0f80721da --- M less/common/Overlay.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/59/142759/1 diff --git a/less/common/Overlay.less b/less/common/Overlay.less index c2f50e8..d49b4e2 100644 --- a/less/common/Overlay.less +++ b/less/common/Overlay.less @@ -178,6 +178,7 @@ border-spacing: 0; border-collapse: collapse; white-space: nowrap; + border-bottom: 1px solid @grayLight; .overlay-title { // Expand the title as wide as possible to limit the size of the @@ -260,7 +261,6 @@ .overlay-header-container { width: 100%; - border-bottom: 1px solid @grayLight; background: #fff; // needed for _fixIosHeader method to work properly position: absolute; -- To view, visit https://gerrit.wikimedia.org/r/142759 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d49f2b6c4ae3cfbcd8815ccef3d06a0f80721da Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JGonera ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow creation of redirects via EntityStore - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Allow creation of redirects via EntityStore .. Allow creation of redirects via EntityStore Bug: 66073 Change-Id: Ie07228b77c49922fc331ce7985d31a830d44a147 --- M lib/includes/store/EntityStore.php M lib/includes/store/EntityStoreWatcher.php M lib/includes/store/sql/CachingEntityRevisionLookup.php M lib/tests/phpunit/MockRepository.php M lib/tests/phpunit/store/CachingEntityRevisionLookupTest.php M repo/Wikibase.hooks.php M repo/includes/store/DispatchingEntityStoreWatcher.php M repo/includes/store/sql/WikiPageEntityStore.php M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php 9 files changed, 279 insertions(+), 87 deletions(-) Approvals: WikidataJenkins: Verified Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/store/EntityStore.php b/lib/includes/store/EntityStore.php index b1d782b..3f3c489 100644 --- a/lib/includes/store/EntityStore.php +++ b/lib/includes/store/EntityStore.php @@ -42,6 +42,15 @@ /** * Saves the given Entity to some underlying storage mechanism. * +* @note: If the item does not have an ID yet (i.e. it was not yet created in the database), +*saveEntity() will fail with a edit-gone-missing message unless the EDIT_NEW bit is +*set in $flags. If EDIT_NEW is set and the Entity does not yet have an ID, a new ID +*is assigned using assignFreshId(). +* +* @note: if the save is triggered by any kind of user interaction, consider using +*EditEntity::attemptSave(), which automatically handles edit conflicts, permission +*checks, etc. +* * @param Entity $entity the entity to save. * @param string $summary the edit summary for the new revision. * @param User $user the user to whom to attribute the edit @@ -59,6 +68,27 @@ public function saveEntity( Entity $entity, $summary, User $user, $flags = 0, $baseRevId = false ); /** +* Saves the given EntityRedirect to some underlying storage mechanism. +* +* @since 0.5 +* +* @param EntityRedirect $redirect the redirect to save. +* @param string $summary the edit summary for the new revision. +* @param User $user the user to whom to attribute the edit +* @param int $flags EDIT_XXX flags, as defined for WikiPage::doEditContent. +* @param int|bool $baseRevId the revision ID $entity is based on. Saving should fail if +* $baseRevId is no longer the current revision. +* +* @see WikiPage::doEditContent +* +* @return int The new revision ID +* +* @throws StorageException +* @throws PermissionsError +*/ + public function saveRedirect( EntityRedirect $redirect, $summary, User $user, $flags = 0, $baseRevId = false ); + + /** * Deletes the given entity in some underlying storage mechanism. * * @param EntityId $entityId diff --git a/lib/includes/store/EntityStoreWatcher.php b/lib/includes/store/EntityStoreWatcher.php index c6be6f5..dbb356c 100644 --- a/lib/includes/store/EntityStoreWatcher.php +++ b/lib/includes/store/EntityStoreWatcher.php @@ -15,7 +15,29 @@ */ interface EntityStoreWatcher { + /** +* Called when an entity is updated, created, or replaces a redirect. +* This is not called when an entity is deleted or replaced by a redirect. +* +* @param EntityRevision $entityRevision +*/ public function entityUpdated( EntityRevision $entityRevision ); + + /** +* Called when a redirect is updated, created, or replaces an entity. +* Not called when a redirect is deleted or replaced by an entity. +* +* @param EntityRedirect $entityRedirect +* @param int $revisionId +*/ + public function redirectUpdated( EntityRedirect $entityRedirect, $revisionId ); + + /** +* Called when an entity or redirect is deleted. +* This is not called when an entity is replaced by a redirect or vice versa. +* +* @param EntityId $entityId +*/ public function entityDeleted( EntityId $entityId ); } diff --git a/lib/includes/store/sql/CachingEntityRevisionLookup.php b/lib/includes/store/sql/CachingEntityRevisionLookup.php index 3533115..f482ad3 100644 --- a/lib/includes/store/sql/CachingEntityRevisionLookup.php +++ b/lib/includes/store/sql/CachingEntityRevisionLookup.php @@ -224,7 +224,7 @@ } /** -* Notifies the cache that an entity was updated. +* Notifies the cache that an Entity was created or updated. * * @param EntityRevision $entityRevision */ @@ -234,7 +234,19 @@ }
[MediaWiki-commits] [Gerrit] Separate the back arrow from the toolbar in mobile VisualEditor - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Separate the back arrow from the toolbar in mobile VisualEditor .. Separate the back arrow from the toolbar in mobile VisualEditor Change-Id: I5de6142ae2f6d44bc0387bcf797b97395be5c3aa --- M less/modules/editor/VisualEditorOverlay.less 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: JGonera: Looks good to me, approved jenkins-bot: Verified diff --git a/less/modules/editor/VisualEditorOverlay.less b/less/modules/editor/VisualEditorOverlay.less index 5c92a3e..02017c5 100644 --- a/less/modules/editor/VisualEditorOverlay.less +++ b/less/modules/editor/VisualEditorOverlay.less @@ -75,6 +75,7 @@ .overlay-header-container { .overlay-header { > .toolbar { + border-left: 1px solid @grayLight; // Expand the toolbar as wide as possible to limit the size of the // overlay-action. (Both are displayed as table-cells.) width: 100%; -- To view, visit https://gerrit.wikimedia.org/r/142441 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5de6142ae2f6d44bc0387bcf797b97395be5c3aa Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Kaldari Gerrit-Reviewer: JGonera 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 Article Title to PageTitle - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Add Article Title to PageTitle .. Add Article Title to PageTitle If article exists, add article title in front of languages message in title of Special:MobileLanguages. Added message key mobile-frontend-languages-header-page. Bug: 66591 Change-Id: I9b9ed601cc047148d09b1427da9afaa2b9003316 --- M i18n/en.json M i18n/qqq.json M includes/specials/SpecialMobileLanguages.php 3 files changed, 6 insertions(+), 1 deletion(-) Approvals: JGonera: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 0616a3b..636b357 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -123,6 +123,7 @@ "mobile-frontend-languages-404-desc": "A valid title must be specified.", "mobile-frontend-languages-404-title": "Languages error", "mobile-frontend-languages-header": "Languages", +"mobile-frontend-languages-header-page": "$1 - Languages", "mobile-frontend-languages-nonexistent-title": "The page \"$1\" does not exist.", "mobile-frontend-languages-text": "$1 is available in $2 {{PLURAL:$2|language|languages}}.", "mobile-frontend-languages-variant-header": "{{#language:{{CONTENTLANG variants", diff --git a/i18n/qqq.json b/i18n/qqq.json index 45fc7d7..e57fceb 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -147,6 +147,7 @@ "mobile-frontend-languages-404-desc": "The title for this message is {{msg-mw|Mobile-frontend-languages-404-title}}.", "mobile-frontend-languages-404-title": "Used as title for the description {{msg-mw|Mobile-frontend-languages-404-desc}}.", "mobile-frontend-languages-header": "{{Identical|Language}}", + "mobile-frontend-languages-header-page": "Header used for list of alternate languages that a page is available in.\n* $1 - The name of the page\n{{Related|Mobile-frontend-languages-header}}", "mobile-frontend-languages-nonexistent-title": "Shown as error message on [[Special:MobileLanguages]] when the title parameter given does not map to an existing page.\n\nParameters:\n* $1 - page title", "mobile-frontend-languages-text": "Parameters:\n* $1 - page title\n* $2 - number of languages\nSee also:\n* {{msg-mw|Mobile-frontend-languages-header|page title}}", "mobile-frontend-languages-variant-header": "See also:\n* {{msg-mw|Mobile-frontend-language-variant-header}}", diff --git a/includes/specials/SpecialMobileLanguages.php b/includes/specials/SpecialMobileLanguages.php index a853e4b..6389529 100755 --- a/includes/specials/SpecialMobileLanguages.php +++ b/includes/specials/SpecialMobileLanguages.php @@ -130,11 +130,12 @@ $this->title = Title::newFromText( $pagename ); $output = $this->getOutput(); - $output->setPageTitle( $this->msg( 'mobile-frontend-languages-header' )->text() ); $html = Html::openElement( 'div', array( 'class' => 'content' ) ); if ( $this->title && $this->title->exists() ) { + $pageTitle = $this->msg( 'mobile-frontend-languages-header-page', + $this->title->getText() )->text(); $titlename = $this->title->getPrefixedText(); $languages = $this->getLanguages(); $variants = $this->getLanguageVariants(); @@ -184,12 +185,14 @@ } } } else { + $pageTitle = $this->msg( 'mobile-frontend-languages-header' )->text(); $html .= Html::element( 'p', array(), $this->msg( 'mobile-frontend-languages-nonexistent-title' )->params( $pagename )->text() ); } $html .= Html::closeElement( 'div' ); + $output->setPageTitle( $pageTitle ); $output->addHTML( $html ); wfProfileOut( __METHOD__ ); } -- To view, visit https://gerrit.wikimedia.org/r/139790 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b9ed601cc047148d09b1427da9afaa2b9003316 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow Gerrit-Reviewer: Awjrichards Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: JGonera Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Kaldari Gerrit-Reviewer: Liangent Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add article title and an editing indication in VE - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Add article title and an editing indication in VE .. Add article title and an editing indication in VE Change-Id: I3182d375b9eaba6af573f84e069e2c5ef668041f --- M i18n/en.json M i18n/qqq.json M includes/Resources.php M javascripts/modules/editor/EditorOverlay.js M javascripts/modules/editor/EditorOverlayBase.js M javascripts/modules/editor/VisualEditorOverlay.js M less/modules/editor/VisualEditorOverlay.less M less/tablet/common.less M templates/modules/editor/VisualEditorOverlay.html 9 files changed, 30 insertions(+), 8 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 0a6df27..18364df 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -55,6 +55,7 @@ "mobile-frontend-editor-cta": "Help improve this page!", "mobile-frontend-editor-disabled": "This page is protected to prevent vandalism.", "mobile-frontend-editor-edit": "Edit", +"mobile-frontend-editor-editing": "Editing", "mobile-frontend-editor-editing-page": "Editing $1", "mobile-frontend-editor-error": "Error, edit not saved.", "mobile-frontend-editor-error-conflict": "Error, another user has edited this page.", diff --git a/i18n/qqq.json b/i18n/qqq.json index 3f24b63..cddebd7 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -79,6 +79,7 @@ "mobile-frontend-editor-cta": "Caption for call to action when an anonymous user clicks on edit icon. (Note the mobile site currently doesn't allow anonymous editing.)\n{{Identical|Help improve this page}}", "mobile-frontend-editor-disabled": "Toast message that appears when a user is unable to edit a page and clicks edit icon.", "mobile-frontend-editor-edit": "Caption for the link showing edit form.\n{{Identical|Edit}}", + "mobile-frontend-editor-editing": "A heading indicating that the user is currently editing.", "mobile-frontend-editor-editing-page": "A heading saying what page is being edited. All text should be wrapped in a STRONG tag except the page title itself.\n\nParameters:\n* $1 - page title\n{{Related|Mobile-frontend-editor-page}}", "mobile-frontend-editor-error": "Text that displays when there have been errors when saving a page edit.\n\nUsed as \"toast\" error message.", "mobile-frontend-editor-error-conflict": "Text that displays when there has been edit conflict when saving a page edit.\n\nUsed as \"toast\" error message.", diff --git a/includes/Resources.php b/includes/Resources.php index 428a1d3..b68dc8e 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -333,6 +333,7 @@ ), 'messages' => array( 'mobile-frontend-page-saving', + 'mobile-frontend-editor-editing', ), ), diff --git a/javascripts/modules/editor/EditorOverlay.js b/javascripts/modules/editor/EditorOverlay.js index 1fb5898..b5289b8 100644 --- a/javascripts/modules/editor/EditorOverlay.js +++ b/javascripts/modules/editor/EditorOverlay.js @@ -41,6 +41,12 @@ if ( isVisualEditorEnabled ) { this.initializeSwitcher(); } + if ( this.readOnly ) { + options.readOnly = true; + options.editingMsg = mw.msg( 'mobile-frontend-editor-viewing-source-page', options.title ); + } else { + options.editingMsg = mw.msg( 'mobile-frontend-editor-editing-page', options.title ); + } }, postRender: function( options ) { diff --git a/javascripts/modules/editor/EditorOverlayBase.js b/javascripts/modules/editor/EditorOverlayBase.js index 0e5e389..66766b6 100644 --- a/javascripts/modules/editor/EditorOverlayBase.js +++ b/javascripts/modules/editor/EditorOverlayBase.js @@ -126,12 +126,6 @@ this.hide( true ); }, initialize: function( options ) { - if ( this.readOnly ) { - options.readOnly = true; - options.editingMsg = mw.msg( 'mobile-frontend-editor-viewing-source-page', options.title ); - } else { - options.editingMsg = mw.msg( 'mobile-frontend-editor-editing-page', options.title ); - } if ( !options.previewingMsg ) { options.previewingMsg = mw.msg( 'mobile-frontend-editor-previewing-page', options.title ); } diff --git a/javascripts/modules/editor/VisualEditorOverlay.js b/javascripts/modules/editor/VisualEditorOverlay.js index 413c2b5..27c1631 100644 --- a/javascripts/
[MediaWiki-commits] [Gerrit] Fix release notes - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix release notes .. Fix release notes Reference to a more appropriate bug in the release notes for I0f82b146fbe948f917c1c5d29f7469644d797e80 Change-Id: I1c7fe2e3244cb509fdd72539632d0a8440d454e7 --- M RELEASE-NOTES-1.24 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: SPQRobin: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 041f657..a923701 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -96,7 +96,7 @@ for Template:! for purposes such as passing pipes inside of parameters. * (bug 20790) The block log snippet on Special:Contributions and while editing user and user talk pages now works for IP range blocks. -* (bug 35489) Added ability to change the page language for MediaWiki pages using +* (bug 9360) Added ability to change the page language for MediaWiki pages using Special:PageLanguage. All pages are set to wiki language by default. The feature needs to be enabled with $wgPageLanguageUseDB=true and permission needs to be set for 'pagelang'. -- To view, visit https://gerrit.wikimedia.org/r/142758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c7fe2e3244cb509fdd72539632d0a8440d454e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: SPQRobin Gerrit-Reviewer: SPQRobin 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 release notes - change (mediawiki/core)
SPQRobin has uploaded a new change for review. https://gerrit.wikimedia.org/r/142758 Change subject: Fix release notes .. Fix release notes Reference to a more appropriate bug in the release notes for I0f82b146fbe948f917c1c5d29f7469644d797e80 Change-Id: I1c7fe2e3244cb509fdd72539632d0a8440d454e7 --- M RELEASE-NOTES-1.24 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/142758/1 diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 041f657..a923701 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -96,7 +96,7 @@ for Template:! for purposes such as passing pipes inside of parameters. * (bug 20790) The block log snippet on Special:Contributions and while editing user and user talk pages now works for IP range blocks. -* (bug 35489) Added ability to change the page language for MediaWiki pages using +* (bug 9360) Added ability to change the page language for MediaWiki pages using Special:PageLanguage. All pages are set to wiki language by default. The feature needs to be enabled with $wgPageLanguageUseDB=true and permission needs to be set for 'pagelang'. -- To view, visit https://gerrit.wikimedia.org/r/142758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c7fe2e3244cb509fdd72539632d0a8440d454e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: SPQRobin ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hide spammy output behind --verbose flag - change (mediawiki...jobrunner)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/142757 Change subject: Hide spammy output behind --verbose flag .. Hide spammy output behind --verbose flag Change-Id: Idb4d2fbe17a7a97088c690ce4b1e8cd91aea2a69 --- M redisJobRunnerService 1 file changed, 39 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/jobrunner refs/changes/57/142757/1 diff --git a/redisJobRunnerService b/redisJobRunnerService index b65db3b..e535a61 100755 --- a/redisJobRunnerService +++ b/redisJobRunnerService @@ -44,7 +44,8 @@ RedisJobRunnerService::init( getopt( '', array( 'aggrSrvs:', 'queueSrvs:', 'runners:', - 'timeout::', 'config-file::', 'wrapper::', 'claimTTL::', 'attempts::' + 'timeout::', 'config-file::', 'wrapper::', 'claimTTL::', 'attempts::', + 'verbose' ) ) )->main(); @@ -96,6 +97,8 @@ /** @var string Redis password */ protected $password; + /** @var bool */ + protected $verbose; /** @var string MediaWiki script wrapper */ protected $wrapper; /** @var Map of (id => (job type list,count) */ @@ -206,13 +209,14 @@ $this->attemptsMap[$type] = (int)$value; } } + $this->verbose = isset( $config['verbose'] ); } /** * Entry point method that starts the service in earnest and keeps running */ public function main() { - print "Starting jobs loops...\n"; + $this->notice( "Starting jobs loops..." ); $prioMap = array(); // map of (id => (current priority, since)) $procMap = array(); // map of (id => slot # => proc_open handle, descriptors) @@ -221,7 +225,7 @@ $procMap[$id][$i] = array( 'hande' => false, 'pipes' => array() ); $prioMap[$id] = array( 'high' => true, 'since' => time() ); } - print "Initialized loop $id with {$info['runners']} runners.\n"; + $this->notice( "Initialized loop $id with {$info['runners']} runners." ); } while ( true ) { @@ -231,31 +235,31 @@ // Do periodic queue tasks on all queues every 5 minutes $count = $this->executeReadyPeriodicTasks(); if ( is_int( $count ) ) { - print "Updated the state of $count jobs (recycle/undelay/abandon).\n"; + $this->notice( "Updated the state of $count jobs (recycle/undelay/abandon)." ); } // Get the list of ready queues $pending = $this->getReadyQueueMap(); if ( !count( $pending ) ) { - print "No jobs available...\n\n"; + $this->notice( "No jobs available...\n" ); sleep( 5 ); // no jobs continue; } // Spawn new runners as slots become available foreach ( $procMap as $id => &$procSlots ) { - print "Checking runner loop $id...\n"; + $this->debug( "Checking runner loop $id..." ); // Implement high/low priority via time-sharing if ( $prioMap[$id]['high'] && ( time() - $prioMap[$id]['since'] ) > $this->lpMaxDelay ) { $prioMap[$id]['high'] = false; $prioMap[$id]['since'] = time(); - print "Runner loop $id now in low priority.\n"; + $this->debug( "Runner loop $id now in low priority." ); } elseif ( !$prioMap[$id]['high'] && ( time() - $prioMap[$id]['since'] ) > $this->hpMaxDelay ) { $prioMap[$id]['high'] = true; $prioMap[$id]['since'] = time(); - print "Runner loop $id now in high priority.\n"; + $this->debug( "Runner loop $id now in high priority." ); } // Get the free slots and replace them foreach ( $procSlots as $slot => &$procSlot ) { @@ -266,8 +270,8 @@ continue;
[MediaWiki-commits] [Gerrit] Fix typo - change (mediawiki...UrlShortener)
Legoktm has submitted this change and it was merged. Change subject: Fix typo .. Fix typo Change-Id: I7252180bd0f520acd8aa8f4b1bf01aac6c31075e --- M UrlShortener.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Verified; Looks good to me, approved diff --git a/UrlShortener.hooks.php b/UrlShortener.hooks.php index 0cc9311..c9eadb4 100644 --- a/UrlShortener.hooks.php +++ b/UrlShortener.hooks.php @@ -31,7 +31,7 @@ */ public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $du ) { $base = __DIR__ . '/schemas'; - $du->addExtensionTable( 'urlshortcoddes', "$base/urlshortcodes.sql" ); + $du->addExtensionTable( 'urlshortcodes', "$base/urlshortcodes.sql" ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/142755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7252180bd0f520acd8aa8f4b1bf01aac6c31075e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UrlShortener Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Close process handles after they fail instead of just on slo... - change (mediawiki...jobrunner)
Aaron Schulz has submitted this change and it was merged. Change subject: Close process handles after they fail instead of just on slot respawn .. Close process handles after they fail instead of just on slot respawn * This avoids spamming the failure notice to the output if there are no jobs available to take the slot yet. Change-Id: I2db9111e82cbf954612487afc26dcc79070d1fd7 --- M redisJobRunnerService 1 file changed, 18 insertions(+), 6 deletions(-) Approvals: Ori.livneh: Looks good to me, approved Aaron Schulz: Verified diff --git a/redisJobRunnerService b/redisJobRunnerService index 77e9f6e..10e0244 100755 --- a/redisJobRunnerService +++ b/redisJobRunnerService @@ -267,6 +267,7 @@ $error = stream_get_contents( $pipes[2] ); print "Runner loop $id process in slot $slot " . "gave status '{$status['exitcode']}':\n\t$error.\n"; + $this->closeProcess( $id, $slot, $proc, $pipes ); } ++$free; $queue = $this->selectQueue( $id, $slot, $prioMap, $pending ); @@ -360,6 +361,21 @@ /** * @param integer $id * @param integer $slot +* @param resource|bool $proc +* @param array $pipes +*/ + protected function closeProcess( $id, $slot, &$proc, array &$pipes ) { + if ( $proc ) { + print "Closing process in loop $id at slot $slot\n"; + fclose( $pipes[1] ); + fclose( $pipes[2] ); + proc_close( $proc ); + } + } + + /** +* @param integer $id +* @param integer $slot * @param bool $highPrio * @param array $queue * @param resource|bool $proc @@ -369,12 +385,8 @@ protected function trySpawnRunner( $id, $slot, $highPrio, array $queue, &$proc, array &$pipes ) { - if ( $proc ) { - print "Closing process in loop $id at slot $slot\n"; - fclose( $pipes[1] ); - fclose( $pipes[2] ); - proc_close( $proc ); - } + // Clean up the old process handles + $this->closeProcess( $id, $slot, $proc, $pipes ); // Pick a random queue list( $type, $db ) = $queue; -- To view, visit https://gerrit.wikimedia.org/r/142716 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2db9111e82cbf954612487afc26dcc79070d1fd7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/jobrunner Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo - change (mediawiki...UrlShortener)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/142755 Change subject: Fix typo .. Fix typo Change-Id: I7252180bd0f520acd8aa8f4b1bf01aac6c31075e --- M UrlShortener.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UrlShortener refs/changes/55/142755/1 diff --git a/UrlShortener.hooks.php b/UrlShortener.hooks.php index 0cc9311..c9eadb4 100644 --- a/UrlShortener.hooks.php +++ b/UrlShortener.hooks.php @@ -31,7 +31,7 @@ */ public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $du ) { $base = __DIR__ . '/schemas'; - $du->addExtensionTable( 'urlshortcoddes', "$base/urlshortcodes.sql" ); + $du->addExtensionTable( 'urlshortcodes', "$base/urlshortcodes.sql" ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/142755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7252180bd0f520acd8aa8f4b1bf01aac6c31075e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UrlShortener Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up I81663929: Use grunt git-build to ensure we get th... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Follow-up I81663929: Use grunt git-build to ensure we get the hash .. Follow-up I81663929: Use grunt git-build to ensure we get the hash Change-Id: Idd140a9027ad4f1891e139c83b19de33f4a19d23 --- M maintenance/resources/update-oojs-ui.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/resources/update-oojs-ui.sh b/maintenance/resources/update-oojs-ui.sh index b91e48f..ca9572f 100755 --- a/maintenance/resources/update-oojs-ui.sh +++ b/maintenance/resources/update-oojs-ui.sh @@ -64,7 +64,7 @@ fi # Build the distribution -npm install || exit 1 +npm install && grunt git-build || exit 1 # Get the list of changes NEWCHANGES=$(git log $OLDHASH.. --oneline --no-merges --reverse --color=never) -- To view, visit https://gerrit.wikimedia.org/r/142752 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd140a9027ad4f1891e139c83b19de33f4a19d23 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Move source map option from git-build to pre-test - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: build: Move source map option from git-build to pre-test .. build: Move source map option from git-build to pre-test Follows-up 0dafebd which moved the source map option from being always enabled to being only enabled in git-build. However when a user wants to distribute pre release, they run 'git-build'. But still, they wouldn't want source maps (which would be just as broken as for a stable release). Instead move it around into a 'pre-test' task. Also renamed 'git-build' to 'pre-git-build' and redefined 'git-build' as alias for 'pre-git-build' and 'build'. This allows users to invoke "grunt git-build" instead of having to "grunt git-build build". Change-Id: I15281deb32da7cf32d13d341853201703ec1 --- M Gruntfile.js D build/tasks/git-build.js 2 files changed, 24 insertions(+), 30 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js index 35cecf8..01505ce 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -122,7 +122,30 @@ } } ); + grunt.registerTask( 'pre-test', function () { + // Only create Source maps when doing a git-build for testing and local + // development. Distributions for export should not, as the map would + // be pointing at "../src". + grunt.config.set( 'concat.js.options.sourceMap', true ); + grunt.config.set( 'concat.js.options.sourceMapStyle', 'link' ); + } ); + + grunt.registerTask( 'pre-git-build', function () { + var done = this.async(); + require( 'child_process' ).exec( 'git rev-parse HEAD', function ( err, stout, stderr ) { + if ( !stout || err || stderr ) { + grunt.log.err( err || stderr ); + done( false ); + return; + } + grunt.config.set( 'pkg.version', grunt.config( 'pkg.version' ) + '-pre (' + stout.substr( 0, 10 ) + ')' ); + grunt.verbose.writeln( 'Added git HEAD to pgk.version' ); + done(); + } ); + } ); + grunt.registerTask( 'build', [ 'clean', 'recess', 'concat', 'copy' ] ); - grunt.registerTask( 'test', [ 'git-build', 'build', 'jshint', 'jscs', 'csslint', 'banana', 'qunit' ] ); + grunt.registerTask( 'git-build', [ 'pre-git-build', 'build' ] ); + grunt.registerTask( 'test', [ 'pre-test', 'git-build', 'jshint', 'jscs', 'csslint', 'banana', 'qunit' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/build/tasks/git-build.js b/build/tasks/git-build.js deleted file mode 100644 index c769ea6..000 --- a/build/tasks/git-build.js +++ /dev/null @@ -1,29 +0,0 @@ -/*! - * Change the in-memory package version to contain the git HEAD - */ - -/*jshint node:true */ -module.exports = function ( grunt ) { - - grunt.registerTask( 'git-build', function () { - var done = this.async(); - - // Only create Source maps when doing a git-build for testing and local - // development. Distributions for export should not, as the map would - // be pointing at "../src". - grunt.config.set( 'concat.js.options.sourceMap', true ); - grunt.config.set( 'concat.js.options.sourceMapStyle', 'link' ); - - require( 'child_process' ).exec( 'git rev-parse HEAD', function ( err, stout, stderr ) { - if ( !stout || err || stderr ) { - grunt.log.err( err || stderr ); - done( false ); - return; - } - grunt.config.set( 'pkg.version', grunt.config( 'pkg.version' ) + '-pre (' + stout.substr( 0, 10 ) + ')' ); - grunt.verbose.writeln( 'Added git HEAD to pgk.version' ); - done(); - } ); - } ); - -}; -- To view, visit https://gerrit.wikimedia.org/r/142753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I15281deb32da7cf32d13d341853201703ec1 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up I81663929: Use grunt git-build to ensure we get th... - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Follow-up I81663929: Use grunt git-build to ensure we get the hash .. Follow-up I81663929: Use grunt git-build to ensure we get the hash Change-Id: I92a85fb79d7fecc2c16818d2270e0ed0e885b812 --- M bin/update-oojs-ui.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/update-oojs-ui.sh b/bin/update-oojs-ui.sh index 943815b..690e06e 100755 --- a/bin/update-oojs-ui.sh +++ b/bin/update-oojs-ui.sh @@ -64,7 +64,7 @@ fi # Build the distribution -npm install || exit 1 +npm install && grunt git-build || exit 1 # Get the list of changes NEWCHANGES=$(git log $OLDHASH.. --oneline --no-merges --reverse --color=never) -- To view, visit https://gerrit.wikimedia.org/r/142754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I92a85fb79d7fecc2c16818d2270e0ed0e885b812 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up I81663929: Use grunt git-build to ensure we get th... - change (VisualEditor/VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/142754 Change subject: Follow-up I81663929: Use grunt git-build to ensure we get the hash .. Follow-up I81663929: Use grunt git-build to ensure we get the hash Change-Id: I92a85fb79d7fecc2c16818d2270e0ed0e885b812 --- M bin/update-oojs-ui.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/54/142754/1 diff --git a/bin/update-oojs-ui.sh b/bin/update-oojs-ui.sh index 943815b..690e06e 100755 --- a/bin/update-oojs-ui.sh +++ b/bin/update-oojs-ui.sh @@ -64,7 +64,7 @@ fi # Build the distribution -npm install || exit 1 +npm install && grunt git-build || exit 1 # Get the list of changes NEWCHANGES=$(git log $OLDHASH.. --oneline --no-merges --reverse --color=never) -- To view, visit https://gerrit.wikimedia.org/r/142754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92a85fb79d7fecc2c16818d2270e0ed0e885b812 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Move source map option from git-build to pre-test - change (oojs/ui)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/142753 Change subject: build: Move source map option from git-build to pre-test .. build: Move source map option from git-build to pre-test Follows-up 0dafebd which moved the source map option from being always enabled to being only enabled in git-build. However when a user wants to distribute pre release, they run 'git-build'. But still, they wouldn't want source maps (which would be just as broken as for a stable release). Instead move it around into a 'pre-test' task. Also renamed 'git-build' to 'pre-git-build' and redefined 'git-build' as alias for 'pre-git-build' and 'build'. This allows users to invoke "grunt git-build" instead of having to "grunt git-build build". Change-Id: I15281deb32da7cf32d13d341853201703ec1 --- M Gruntfile.js D build/tasks/git-build.js 2 files changed, 24 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/53/142753/1 diff --git a/Gruntfile.js b/Gruntfile.js index 35cecf8..01505ce 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -122,7 +122,30 @@ } } ); + grunt.registerTask( 'pre-test', function () { + // Only create Source maps when doing a git-build for testing and local + // development. Distributions for export should not, as the map would + // be pointing at "../src". + grunt.config.set( 'concat.js.options.sourceMap', true ); + grunt.config.set( 'concat.js.options.sourceMapStyle', 'link' ); + } ); + + grunt.registerTask( 'pre-git-build', function () { + var done = this.async(); + require( 'child_process' ).exec( 'git rev-parse HEAD', function ( err, stout, stderr ) { + if ( !stout || err || stderr ) { + grunt.log.err( err || stderr ); + done( false ); + return; + } + grunt.config.set( 'pkg.version', grunt.config( 'pkg.version' ) + '-pre (' + stout.substr( 0, 10 ) + ')' ); + grunt.verbose.writeln( 'Added git HEAD to pgk.version' ); + done(); + } ); + } ); + grunt.registerTask( 'build', [ 'clean', 'recess', 'concat', 'copy' ] ); - grunt.registerTask( 'test', [ 'git-build', 'build', 'jshint', 'jscs', 'csslint', 'banana', 'qunit' ] ); + grunt.registerTask( 'git-build', [ 'pre-git-build', 'build' ] ); + grunt.registerTask( 'test', [ 'pre-test', 'git-build', 'jshint', 'jscs', 'csslint', 'banana', 'qunit' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/build/tasks/git-build.js b/build/tasks/git-build.js deleted file mode 100644 index c769ea6..000 --- a/build/tasks/git-build.js +++ /dev/null @@ -1,29 +0,0 @@ -/*! - * Change the in-memory package version to contain the git HEAD - */ - -/*jshint node:true */ -module.exports = function ( grunt ) { - - grunt.registerTask( 'git-build', function () { - var done = this.async(); - - // Only create Source maps when doing a git-build for testing and local - // development. Distributions for export should not, as the map would - // be pointing at "../src". - grunt.config.set( 'concat.js.options.sourceMap', true ); - grunt.config.set( 'concat.js.options.sourceMapStyle', 'link' ); - - require( 'child_process' ).exec( 'git rev-parse HEAD', function ( err, stout, stderr ) { - if ( !stout || err || stderr ) { - grunt.log.err( err || stderr ); - done( false ); - return; - } - grunt.config.set( 'pkg.version', grunt.config( 'pkg.version' ) + '-pre (' + stout.substr( 0, 10 ) + ')' ); - grunt.verbose.writeln( 'Added git HEAD to pgk.version' ); - done(); - } ); - } ); - -}; -- To view, visit https://gerrit.wikimedia.org/r/142753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15281deb32da7cf32d13d341853201703ec1 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up I81663929: Use grunt git-build to ensure we get th... - change (mediawiki/core)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/142752 Change subject: Follow-up I81663929: Use grunt git-build to ensure we get the hash .. Follow-up I81663929: Use grunt git-build to ensure we get the hash Change-Id: Idd140a9027ad4f1891e139c83b19de33f4a19d23 --- M maintenance/resources/update-oojs-ui.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/142752/1 diff --git a/maintenance/resources/update-oojs-ui.sh b/maintenance/resources/update-oojs-ui.sh index b91e48f..ca9572f 100755 --- a/maintenance/resources/update-oojs-ui.sh +++ b/maintenance/resources/update-oojs-ui.sh @@ -64,7 +64,7 @@ fi # Build the distribution -npm install || exit 1 +npm install && grunt git-build || exit 1 # Get the list of changes NEWCHANGES=$(git log $OLDHASH.. --oneline --no-merges --reverse --color=never) -- To view, visit https://gerrit.wikimedia.org/r/142752 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd140a9027ad4f1891e139c83b19de33f4a19d23 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] First version of Page Language selector - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: First version of Page Language selector .. First version of Page Language selector Special page PageLanguage to set the page language of a page. To enable the feature, set $wgPageLanguageUseDB to true and assign the 'pagelang' user right to a user group. Bug: 35489 Change-Id: I0f82b146fbe948f917c1c5d29f7469644d797e80 --- M RELEASE-NOTES-1.24 M includes/AutoLoader.php M includes/DefaultSettings.php M includes/Setup.php M includes/Title.php M includes/User.php M includes/actions/InfoAction.php M includes/installer/MssqlUpdater.php M includes/installer/MysqlUpdater.php M includes/installer/OracleUpdater.php M includes/installer/PostgresUpdater.php M includes/installer/SqliteUpdater.php A includes/logging/PageLangLogFormatter.php M includes/page/WikiPage.php M includes/specialpage/SpecialPageFactory.php A includes/specials/SpecialPageLanguage.php M languages/i18n/en.json M languages/i18n/qqq.json M languages/messages/MessagesEn.php A maintenance/archives/patch-page_lang.sql A maintenance/mssql/archives/patch-page_page_lang.sql M maintenance/mssql/tables.sql A maintenance/oracle/archives/patch-page-page_lang.sql M maintenance/oracle/tables.sql M maintenance/postgres/tables.sql A maintenance/sqlite/archives/patch-page-page_lang.sql M maintenance/tables.sql M resources/Resources.php A resources/src/mediawiki.special/mediawiki.special.pageLanguage.js 29 files changed, 361 insertions(+), 9 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 349b7b2..041f657 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -96,6 +96,10 @@ for Template:! for purposes such as passing pipes inside of parameters. * (bug 20790) The block log snippet on Special:Contributions and while editing user and user talk pages now works for IP range blocks. +* (bug 35489) Added ability to change the page language for MediaWiki pages using + Special:PageLanguage. All pages are set to wiki language by default. + The feature needs to be enabled with $wgPageLanguageUseDB=true and + permission needs to be set for 'pagelang'. === Bug fixes in 1.24 === * (bug 49116) Footer copyright notice is now always displayed in user language diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 3ac4722..56a0134 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -717,6 +717,7 @@ 'ManualLogEntry' => 'includes/logging/LogEntry.php', 'MoveLogFormatter' => 'includes/logging/MoveLogFormatter.php', 'NewUsersLogFormatter' => 'includes/logging/NewUsersLogFormatter.php', + 'PageLangLogFormatter' => 'includes/logging/PageLangLogFormatter.php', 'PatrolLog' => 'includes/logging/PatrolLog.php', 'PatrolLogFormatter' => 'includes/logging/PatrolLogFormatter.php', 'RCDatabaseLogEntry' => 'includes/logging/LogEntry.php', @@ -1017,6 +1018,7 @@ 'SpecialMyuploads' => 'includes/specials/SpecialMyRedirectPages.php', 'SpecialNewFiles' => 'includes/specials/SpecialNewimages.php', 'SpecialNewpages' => 'includes/specials/SpecialNewpages.php', + 'SpecialPageLanguage' => 'includes/specials/SpecialPageLanguage.php', 'SpecialPasswordReset' => 'includes/specials/SpecialPasswordReset.php', 'SpecialPagesWithProp' => 'includes/specials/SpecialPagesWithProp.php', 'SpecialPermanentLink' => 'includes/specials/SpecialPermanentLink.php', diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a28f216..4f170f3 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4352,6 +4352,7 @@ $wgGroupPermissions['sysop']['movefile'] = true; $wgGroupPermissions['sysop']['unblockself'] = true; $wgGroupPermissions['sysop']['suppressredirect'] = true; +#$wgGroupPermissions['sysop']['pagelang'] = true; #$wgGroupPermissions['sysop']['upload_by_url'] = true; #$wgGroupPermissions['sysop']['mergehistory'] = true; @@ -7099,6 +7100,14 @@ $wgHKDFAlgorithm = 'sha256'; /** + * Enable page language feature + * Allows setting page language in database + * @var bool + * @since 1.24 + */ +$wgPageLanguageUseDB = false; + +/** * For really cool vim folding this needs to be at the end: * vim: foldmarker=@{,@} foldmethod=marker * @} diff --git a/includes/Setup.php b/includes/Setup.php index 6003305..783ef3f 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -388,6 +388,11 @@ $wgLogActionsHandlers['newusers/autocreate'] = 'NewUsersLogFormatter'; } +if ( $wgPageLanguageUseDB ) { + $wgLogTypes[] = 'pagelang'; + $wgLogActionsHandlers['pagelang/pagelang'] = 'PageLangLogFormatter'; +} + if ( $wgCookieSecure === 'detect' ) { $wgCookieSecure = ( WebRequest::detectProtocol() === 'https' ); } diff --git a/includes/Title.php b/includes/T
[MediaWiki-commits] [Gerrit] Fix double tap/click bug in search overlay - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fix double tap/click bug in search overlay .. Fix double tap/click bug in search overlay Give browser a few more ms to update the browsing history after closing the search overlay. Bug: 65676 Change-Id: I91cdddb1be8fec0dd3948c6ccdb272305e2d0f91 --- M javascripts/modules/search/search.js 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/modules/search/search.js b/javascripts/modules/search/search.js index cbf5aa0..b12ee5e 100644 --- a/javascripts/modules/search/search.js +++ b/javascripts/modules/search/search.js @@ -25,12 +25,13 @@ M.on( 'search-results', function( overlay ) { overlay.$( '.results a' ).on( 'click', function() { var href = $( this ).attr( 'href' ); - window.history.back(); + M.router.back(); - // give browser a tick to update its history and redirect + // give browser a few ms after M.router.back() to update its history + // and then redirect setTimeout( function() { window.location.href = href; - }, 0 ); + }, 10 ); // Prevent the link from working and prevent the closing of the overlay // by an event upstream which would trigger browser back on the clicked link return false; -- To view, visit https://gerrit.wikimedia.org/r/142743 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91cdddb1be8fec0dd3948c6ccdb272305e2d0f91 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JGonera Gerrit-Reviewer: Jdlrobson 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 editor switcher to cog icon and move to right side - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Change editor switcher to cog icon and move to right side .. Change editor switcher to cog icon and move to right side Also add a drop-down indicator and a line next to the close button. Change-Id: I938b7fe673ef68378529711848c0931262fbf352 --- M less/common/icons.less M less/modules/editor/editor.less A less/modules/editor/images/editToggle.svg A less/modules/editor/images/editToggleActive.svg M templates/modules/editor/EditorOverlayHeader.html M templates/modules/editor/VisualEditorOverlayHeader.html 6 files changed, 20 insertions(+), 18 deletions(-) Approvals: JGonera: Looks good to me, approved jenkins-bot: Verified diff --git a/less/common/icons.less b/less/common/icons.less index 5c81a27..9a11d97 100644 --- a/less/common/icons.less +++ b/less/common/icons.less @@ -258,7 +258,6 @@ .background-image('images/close-button-beta.png'); } - .icon-photo { .background-image('images/camera.png') !important; } diff --git a/less/modules/editor/editor.less b/less/modules/editor/editor.less index 767abe1..a89913f 100644 --- a/less/modules/editor/editor.less +++ b/less/modules/editor/editor.less @@ -42,13 +42,20 @@ .overlay-header { .switcher-container { // Have to set an explicit width since we're using display:table-cell - width: 4em; + width: @headerHeight; vertical-align: middle; position: relative; } .icon.editor-switcher { - margin: 0 0 0 1em; + margin: 0; + background-image: embed( 'images/editToggle.svg' ); + background-size: 44px 32px; + margin-right: 1em; + + &.selected { + background-image: embed( 'images/editToggleActive.svg' ); + } } .icon.editor-switcher:focus { @@ -59,23 +66,19 @@ display: none; position: absolute; top: @headerHeight; + right: -1px; // Needs to float above any elements in the toolbar z-index: 1; box-shadow: 0 .1em .2em rgba(0, 0, 0, .2); - // We have to use margin-left instead of left due to a rendering bug in - // Firefox. Firefox sets the wrong horizontal positioning frame for - // children of elements with position:relative and display:table-cell. - margin-left: -1px; border: 1px solid @grayLight; white-space: nowrap; // FIXME: change class when mediawiki.ui has proper tabs/toggle buttons > .mw-ui-button { - display: inline-block; + display: block; border: none; - border-right: 1px solid @grayLight; border-radius: 0; - padding: 0 2em 0 1em; + padding: 0 1.5em 0 .5em; .icon { display: inline-block; diff --git a/less/modules/editor/images/editToggle.svg b/less/modules/editor/images/editToggle.svg new file mode 100644 index 000..69de380 --- /dev/null +++ b/less/modules/editor/images/editToggle.svg @@ -0,0 +1 @@ +http://www.w3.org/2000/svg"; width="850" height="606.667" viewBox="2.5 791.5 850.1 606.667" enable-background="new 2.5 791.5 606.667 606.667"> \ No newline at end of file diff --git a/less/modules/editor/images/editToggleActive.svg b/less/modules/editor/images/editToggleActive.svg new file mode 100644 index 000..26d9b72 --- /dev/null +++ b/less/modules/editor/images/editToggleActive.svg @@ -0,0 +1 @@ +http://www.w3.org/2000/svg"; width="850" height="606.667" viewBox="2.5 791.5 850.1 606.667" enable-background="new 2.5 791.5 606.667 606.667"> \ No newline at end of file diff --git a/templates/modules/editor/EditorOverlayHeader.html b/templates/modules/editor/EditorOverlayHeader.html index 6ecc915..08da4c4 100644 --- a/templates/modules/editor/EditorOverlayHeader.html +++ b/templates/modules/editor/EditorOverlayHeader.html @@ -2,18 +2,18 @@ {{closeMsg}} + + {{{editingMsg}}} + {{#editSwitcher}} - {{switchMsg}} + {{switchMsg}} {{visualEditorMsg}}{{sourceEditorMsg}} {{/editSwitcher}} -
[MediaWiki-commits] [Gerrit] build: Only include source maps for test builds - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: build: Only include source maps for test builds .. build: Only include source maps for test builds Change-Id: I279f3313ffc524a53c2c987e292afa87c10690d5 --- M Gruntfile.js M build/tasks/git-build.js 2 files changed, 7 insertions(+), 4 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js index 3894f74..35cecf8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -62,10 +62,6 @@ files: concatCssFiles }, js: { - options: { - sourceMap: true, - sourceMapStyle: 'link' - }, dest: 'dist/oojs-ui.js', src: modules['oojs-ui'].scripts } diff --git a/build/tasks/git-build.js b/build/tasks/git-build.js index 6053b5c..c769ea6 100644 --- a/build/tasks/git-build.js +++ b/build/tasks/git-build.js @@ -7,6 +7,13 @@ grunt.registerTask( 'git-build', function () { var done = this.async(); + + // Only create Source maps when doing a git-build for testing and local + // development. Distributions for export should not, as the map would + // be pointing at "../src". + grunt.config.set( 'concat.js.options.sourceMap', true ); + grunt.config.set( 'concat.js.options.sourceMapStyle', 'link' ); + require( 'child_process' ).exec( 'git rev-parse HEAD', function ( err, stout, stderr ) { if ( !stout || err || stderr ) { grunt.log.err( err || stderr ); -- To view, visit https://gerrit.wikimedia.org/r/142746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I279f3313ffc524a53c2c987e292afa87c10690d5 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] maintenance: Simpler OOjs UI pullthrough-script - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: maintenance: Simpler OOjs UI pullthrough-script .. maintenance: Simpler OOjs UI pullthrough-script No need to run grunt test, given that the grunt build from npm install will suffice for our needs. Change-Id: I816639290874e4962d5dac7d580d314e3bd1cb16 --- M bin/update-oojs-ui.sh 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/update-oojs-ui.sh b/bin/update-oojs-ui.sh index 663d913..943815b 100755 --- a/bin/update-oojs-ui.sh +++ b/bin/update-oojs-ui.sh @@ -63,10 +63,8 @@ exit 0 fi -# Build the distribution (using grunt-test instead of grunt-build, because we -# want to run unit tests first, and because grunt-build is for a release build -# and wouldn't put a git hash in the file headers) -npm install && grunt test || exit 1 +# Build the distribution +npm install || exit 1 # Get the list of changes NEWCHANGES=$(git log $OLDHASH.. --oneline --no-merges --reverse --color=never) -- To view, visit https://gerrit.wikimedia.org/r/142749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I816639290874e4962d5dac7d580d314e3bd1cb16 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] maintenance: Simpler OOjs UI pullthrough-script - change (VisualEditor/VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/142749 Change subject: maintenance: Simpler OOjs UI pullthrough-script .. maintenance: Simpler OOjs UI pullthrough-script No need to run grunt test, given that the grunt build from npm install will suffice for our needs. Change-Id: I816639290874e4962d5dac7d580d314e3bd1cb16 --- M bin/update-oojs-ui.sh 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/49/142749/1 diff --git a/bin/update-oojs-ui.sh b/bin/update-oojs-ui.sh index 663d913..943815b 100755 --- a/bin/update-oojs-ui.sh +++ b/bin/update-oojs-ui.sh @@ -63,10 +63,8 @@ exit 0 fi -# Build the distribution (using grunt-test instead of grunt-build, because we -# want to run unit tests first, and because grunt-build is for a release build -# and wouldn't put a git hash in the file headers) -npm install && grunt test || exit 1 +# Build the distribution +npm install || exit 1 # Get the list of changes NEWCHANGES=$(git log $OLDHASH.. --oneline --no-merges --reverse --color=never) -- To view, visit https://gerrit.wikimedia.org/r/142749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I816639290874e4962d5dac7d580d314e3bd1cb16 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Check for http:// in JWT issuer check - change (phabricator/libphutil)
Rush has submitted this change and it was merged. Change subject: Check for http:// in JWT issuer check .. Check for http:// in JWT issuer check If MediaWiki has $wgSecureLogin enabled, and OAuth is using the https url, MediaWiki returns the canonical http:// url in the issuer value of the JWT, and the base url won't match. Allow this exception. Change-Id: I60af0bc6c72c1346d394fb0565f150284c564638 --- M src/auth/PhutilAuthAdapterOAuthMediaWiki.php 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Rush: Verified; Looks good to me, approved diff --git a/src/auth/PhutilAuthAdapterOAuthMediaWiki.php b/src/auth/PhutilAuthAdapterOAuthMediaWiki.php index bcfb744..cc9e821 100644 --- a/src/auth/PhutilAuthAdapterOAuthMediaWiki.php +++ b/src/auth/PhutilAuthAdapterOAuthMediaWiki.php @@ -108,7 +108,9 @@ $expected_connonical_server = $this->mediaWikiBaseURI; $now = time(); -if ($identity->iss !== $expected_connonical_server) { +if ($identity->iss !== $expected_connonical_server + && $identity->iss !== preg_replace( "!^https://!i";, 'http://', $expected_connonical_server ) +) { throw new Exception( "OAuth JWT iss didn't match expected server name"); } -- To view, visit https://gerrit.wikimedia.org/r/142748 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60af0bc6c72c1346d394fb0565f150284c564638 Gerrit-PatchSet: 1 Gerrit-Project: phabricator/libphutil Gerrit-Branch: master Gerrit-Owner: CSteipp Gerrit-Reviewer: Rush ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Check for http:// in JWT issuer check - change (phabricator/libphutil)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/142748 Change subject: Check for http:// in JWT issuer check .. Check for http:// in JWT issuer check If MediaWiki has $wgSecureLogin enabled, and OAuth is using the https url, MediaWiki returns the canonical http:// url in the issuer value of the JWT, and the base url won't match. Allow this exception. Change-Id: I60af0bc6c72c1346d394fb0565f150284c564638 --- M src/auth/PhutilAuthAdapterOAuthMediaWiki.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/phabricator/libphutil refs/changes/48/142748/1 diff --git a/src/auth/PhutilAuthAdapterOAuthMediaWiki.php b/src/auth/PhutilAuthAdapterOAuthMediaWiki.php index bcfb744..cc9e821 100644 --- a/src/auth/PhutilAuthAdapterOAuthMediaWiki.php +++ b/src/auth/PhutilAuthAdapterOAuthMediaWiki.php @@ -108,7 +108,9 @@ $expected_connonical_server = $this->mediaWikiBaseURI; $now = time(); -if ($identity->iss !== $expected_connonical_server) { +if ($identity->iss !== $expected_connonical_server + && $identity->iss !== preg_replace( "!^https://!i";, 'http://', $expected_connonical_server ) +) { throw new Exception( "OAuth JWT iss didn't match expected server name"); } -- To view, visit https://gerrit.wikimedia.org/r/142748 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60af0bc6c72c1346d394fb0565f150284c564638 Gerrit-PatchSet: 1 Gerrit-Project: phabricator/libphutil Gerrit-Branch: master Gerrit-Owner: CSteipp ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add generic currency fallback with optional notification - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Add generic currency fallback with optional notification .. Add generic currency fallback with optional notification Add FallbackCurrency and NotifyOnConvert gateway globals to enable converting unsupported currencies to a default and optionally notfying the donor. Moved the conversion logic from PaypalGateway to new GatewayForm method fallbackToDefaultCurrency. GatewayForm::validateForm calls this and notifies if conversion has occurred and either notification is enabled or any other form error exist. Change-Id: I370391e7f20f5f3783acfc00f3ec94430ba87e77 --- M DonationInterface.php M gateway_common/GatewayForm.php M paypal_gateway/paypal_gateway.body.php M tests/AllTests.php A tests/GatewayFormTestCase.php M tests/includes/test_gateway/test.adapter.php 6 files changed, 288 insertions(+), 38 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/DonationInterface.php b/DonationInterface.php index da5ddf1..a76f22e 100644 --- a/DonationInterface.php +++ b/DonationInterface.php @@ -244,6 +244,20 @@ $wgDonationInterfaceDefaultForm = 'RapidHtml'; /** + * If set to a currency code, gateway forms will try to convert amounts + * in unsupported currencies to the fallback instead of just showing + * an unsupported currency error. + */ +$wgDonationInterfaceFallbackCurrency = false; + +/** + * When this is true and an unsupported currency has been converted to the + * fallback (see above), we show an interstitial page notifying the user + * of the conversion before sending the donation to the gateway. + */ +$wgDonationInterfaceNotifyOnConvert = true; + +/** * A string or array of strings for making tokens more secure * * Please set this! If you do not, tokens are easy to get around, which can diff --git a/gateway_common/GatewayForm.php b/gateway_common/GatewayForm.php index 17a0b6b..41b32a7 100644 --- a/gateway_common/GatewayForm.php +++ b/gateway_common/GatewayForm.php @@ -116,8 +116,22 @@ } $check_not_empty = array_merge( $check_not_empty, $add_checks ); } - + $validated_ok = $this->adapter->revalidate( $check_not_empty ); + + $converted = $this->fallbackToDefaultCurrency(); + if ( $converted ) { + $validated_ok = $this->adapter->revalidate( $check_not_empty ); + $notify = $this->adapter->getGlobal( 'NotifyOnConvert' ); + + if ( $notify || !$validated_ok ) { + $this->adapter->addManualError( array( + 'general' => $this->msg( 'donate_interface-fallback-currency-notice', + $this->adapter->getGlobal( 'FallbackCurrency' ) )->text() + ) ); + $validated_ok = false; + } + } return !$validated_ok; } @@ -305,6 +319,58 @@ return $this->displayForm(); } + /** +* If a currency code error exists and fallback currency conversion is +* enabled for this adapter, convert intended amount to default currency. +* +* @return boolean whether currency conversion was performed +*/ + protected function fallbackToDefaultCurrency() { + $defaultCurrency = $this->adapter->getGlobal( 'FallbackCurrency' ); + if ( !$defaultCurrency ) { + return false; + } + $form_errors = $this->adapter->getValidationErrors(); + if ( !$form_errors || !array_key_exists( 'currency_code', $form_errors ) ) { + return false; + } + // If the currency is invalid, fallback to default. + // Our conversion rates are all relative to USD, so use that as an + // intermediate currency if converting between two others. + $oldCurrency = $this->adapter->getData_Unstaged_Escaped( 'currency_code' ); + if ( $oldCurrency === $defaultCurrency ) { + $adapterClass = $this->adapter->getGatewayAdapterClass(); + throw new MWException( __FUNCTION__ . " Unsupported currency $defaultCurrency set as fallback for $adapterClass." ); + } + $oldAmount = $this->adapter->getData_Unstaged_Escaped( 'amount' ); + $usdAmount = 0.0; + $newAmount = 0; + + require_once( __DIR__ . '/../gateway_common/currencyRates.inc' ); + $conversionRates = getCurrencyRates(); + if ( $oldCurrency === 'USD' ) { + $usdA
[MediaWiki-commits] [Gerrit] maintenance: Simpler OOjs UI pullthrough-script - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: maintenance: Simpler OOjs UI pullthrough-script .. maintenance: Simpler OOjs UI pullthrough-script No need to run grunt test, given that the grunt build from npm install will suffice for our needs. Change-Id: I816639290874e4962d5dac7d580d314e3bd1cb16 --- M maintenance/resources/update-oojs-ui.sh 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/resources/update-oojs-ui.sh b/maintenance/resources/update-oojs-ui.sh index cc5988c..b91e48f 100755 --- a/maintenance/resources/update-oojs-ui.sh +++ b/maintenance/resources/update-oojs-ui.sh @@ -63,10 +63,8 @@ exit 0 fi -# Build the distribution (using grunt-test instead of grunt-build, because we -# want to run unit tests first, and because grunt-build is for a release build -# and wouldn't put a git hash in the file headers) -npm install && grunt test || exit 1 +# Build the distribution +npm install || exit 1 # Get the list of changes NEWCHANGES=$(git log $OLDHASH.. --oneline --no-merges --reverse --color=never) -- To view, visit https://gerrit.wikimedia.org/r/142747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I816639290874e4962d5dac7d580d314e3bd1cb16 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] maintenance: Simpler OOjs UI pullthrough-script - change (mediawiki/core)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/142747 Change subject: maintenance: Simpler OOjs UI pullthrough-script .. maintenance: Simpler OOjs UI pullthrough-script No need to run grunt test, given that the grunt build from npm install will suffice for our needs. Change-Id: I816639290874e4962d5dac7d580d314e3bd1cb16 --- M maintenance/resources/update-oojs-ui.sh 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/142747/1 diff --git a/maintenance/resources/update-oojs-ui.sh b/maintenance/resources/update-oojs-ui.sh index cc5988c..e1296f9 100755 --- a/maintenance/resources/update-oojs-ui.sh +++ b/maintenance/resources/update-oojs-ui.sh @@ -63,10 +63,8 @@ exit 0 fi -# Build the distribution (using grunt-test instead of grunt-build, because we -# want to run unit tests first, and because grunt-build is for a release build -# and wouldn't put a git hash in the file headers) -npm install && grunt test || exit 1 +# Build the distribution via npm install's implicit grunt build +npm install || exit 1 # Get the list of changes NEWCHANGES=$(git log $OLDHASH.. --oneline --no-merges --reverse --color=never) -- To view, visit https://gerrit.wikimedia.org/r/142747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I816639290874e4962d5dac7d580d314e3bd1cb16 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Only include source maps for test builds - change (oojs/ui)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/142746 Change subject: build: Only include source maps for test builds .. build: Only include source maps for test builds Change-Id: I279f3313ffc524a53c2c987e292afa87c10690d5 --- M Gruntfile.js M build/tasks/git-build.js 2 files changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/46/142746/1 diff --git a/Gruntfile.js b/Gruntfile.js index 3894f74..35cecf8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -62,10 +62,6 @@ files: concatCssFiles }, js: { - options: { - sourceMap: true, - sourceMapStyle: 'link' - }, dest: 'dist/oojs-ui.js', src: modules['oojs-ui'].scripts } diff --git a/build/tasks/git-build.js b/build/tasks/git-build.js index 6053b5c..c769ea6 100644 --- a/build/tasks/git-build.js +++ b/build/tasks/git-build.js @@ -7,6 +7,13 @@ grunt.registerTask( 'git-build', function () { var done = this.async(); + + // Only create Source maps when doing a git-build for testing and local + // development. Distributions for export should not, as the map would + // be pointing at "../src". + grunt.config.set( 'concat.js.options.sourceMap', true ); + grunt.config.set( 'concat.js.options.sourceMapStyle', 'link' ); + require( 'child_process' ).exec( 'git rev-parse HEAD', function ( err, stout, stderr ) { if ( !stout || err || stderr ) { grunt.log.err( err || stderr ); -- To view, visit https://gerrit.wikimedia.org/r/142746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I279f3313ffc524a53c2c987e292afa87c10690d5 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix parserTest setup: siteinfo API returns '' to indicate true. - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Fix parserTest setup: siteinfo API returns '' to indicate true. .. Fix parserTest setup: siteinfo API returns '' to indicate true. Follow-up patch to I26444e309400e3a6b1ca3ccade125800e2fa0e77. Bug: 66723 Change-Id: Ia17297ccf4f13d2aac005aa95cd0f147fe573d9d --- M tests/parserTests.js 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parserTests.js b/tests/parserTests.js index e1009e2..d115301 100755 --- a/tests/parserTests.js +++ b/tests/parserTests.js @@ -1868,38 +1868,38 @@ prefix: 'zh', url: 'http://zh.wikipedia.org/wiki/$1', language: '\u4e2d\u6587', - protorel: true + protorel: '' }, es: { prefix: 'es', url: 'http://es.wikipedia.org/wiki/$1', language: 'espa\u00f1ol', - protorel: true + protorel: '' }, fr: { prefix: 'fr', url: 'http://fr.wikipedia.org/wiki/$1', language: 'fran\u00e7ais', - protorel: true + protorel: '' }, ru: { prefix: 'ru', url: 'http://ru.wikipedia.org/wiki/$1', language: '\u0440\u0443\u0441\u0441\u043a\u0438\u0439', - protorel: true + protorel: '' }, // not in PHP setupInterwikis(), but needed en: { prefix: 'en', url: 'http://en.wikipedia.org/wiki/$1', language: 'English', - protorel: true + protorel: '' }, ko: { prefix: 'ko', url: 'http://ko.wikipedia.org/wiki/$1', language: '\ud55c\uad6d\uc5b4', - protorel: true + protorel: '' } }; Object.keys(iwl).forEach(function(key) { -- To view, visit https://gerrit.wikimedia.org/r/142444 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia17297ccf4f13d2aac005aa95cd0f147fe573d9d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: GWicke Gerrit-Reviewer: Subramanya Sastry Gerrit-
[MediaWiki-commits] [Gerrit] Update OAuth to fix logins - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update OAuth to fix logins .. Update OAuth to fix logins Change-Id: I74dfd5aa870e3c67ae923dd41f5e806ce2b73a60 --- M extensions/OAuth 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: CSteipp: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/OAuth b/extensions/OAuth index 5b6ff7e..eaa7f8b 16 --- a/extensions/OAuth +++ b/extensions/OAuth -Subproject commit 5b6ff7ec59be9694e9080b49b31dae269fdf9f9a +Subproject commit eaa7f8b4e77461916865da468466f4bf1d26d0b2 -- To view, visit https://gerrit.wikimedia.org/r/142745 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I74dfd5aa870e3c67ae923dd41f5e806ce2b73a60 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.24wmf11 Gerrit-Owner: CSteipp Gerrit-Reviewer: CSteipp 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 OAuth to fix logins - change (mediawiki/core)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/142745 Change subject: Update OAuth to fix logins .. Update OAuth to fix logins Change-Id: I74dfd5aa870e3c67ae923dd41f5e806ce2b73a60 --- M extensions/OAuth 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/45/142745/1 diff --git a/extensions/OAuth b/extensions/OAuth index 5b6ff7e..eaa7f8b 16 --- a/extensions/OAuth +++ b/extensions/OAuth -Subproject commit 5b6ff7ec59be9694e9080b49b31dae269fdf9f9a +Subproject commit eaa7f8b4e77461916865da468466f4bf1d26d0b2 -- To view, visit https://gerrit.wikimedia.org/r/142745 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74dfd5aa870e3c67ae923dd41f5e806ce2b73a60 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.24wmf11 Gerrit-Owner: CSteipp ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Split Mixed Template into Multi Template and Mixed Content - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Split Mixed Template into Multi Template and Mixed Content .. Split Mixed Template into Multi Template and Mixed Content Change-Id: I1fa9f6c59c5f1b67044be6442d3e4da8fb1151bf --- M lib/dom.linter.js M lib/linter.js 2 files changed, 6 insertions(+), 4 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/dom.linter.js b/lib/dom.linter.js index c4d18f5..7c50274 100644 --- a/lib/dom.linter.js +++ b/lib/dom.linter.js @@ -30,9 +30,12 @@ if (DU.getDataMw(c)) { var dmw = DU.getDataMw(c); +var dsr = DU.getDataParsoid(c).dsr; if (dmw.parts) { var parts = dmw.parts; -if (parts.length > 1) { +if (typeof parts[0] === 'string' || typeof parts[parts.length - 1] === 'string') { +env.log("lint/Mixed-content", env.page.src, dsr); +} else if (parts.length > 1) { var targets = [], t = null; dmw.parts.forEach(function(a) { @@ -41,8 +44,7 @@ } }); if (targets.length > 1) { -var dp = DU.getDataParsoid(c).dsr; -env.log("lint/Mixed-template", targets, dp); +env.log("lint/Multi-template", targets, dsr); } } } diff --git a/lib/linter.js b/lib/linter.js index c417e1d..36d4f25 100644 --- a/lib/linter.js +++ b/lib/linter.js @@ -55,7 +55,7 @@ msg.dsr = dsr; } -if (logType === 'lint/fostered' || logType === 'lint/Mixed-template') { +if (logType === 'lint/fostered' || logType === 'lint/Multi-template') { msg.src = src; } else if (dsr) { msg.src = src.substring(dsr[0], dsr[1]); -- To view, visit https://gerrit.wikimedia.org/r/142723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1fa9f6c59c5f1b67044be6442d3e4da8fb1151bf Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Hardikj Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Port browser test for Math extension from the /qa/browsertes... - change (mediawiki...Math)
Physikerwelt has submitted this change and it was merged. Change subject: Port browser test for Math extension from the /qa/browsertest repo .. Port browser test for Math extension from the /qa/browsertest repo From an earlier discussion with physikerwelt. This is one step toward retiring the /qa/browsertest repo entirely. Change-Id: I804f32d2a5a984c8eb0dfc50c8ab50a7f1035256 --- A tests/browser/Gemfile A tests/browser/Gemfile.lock A tests/browser/features/math.feature A tests/browser/features/step_definitions/math_steps.rb A tests/browser/features/support/env.rb A tests/browser/features/support/pages/does_not_exist_page.rb A tests/browser/features/support/pages/edit_page.rb 7 files changed, 182 insertions(+), 0 deletions(-) Approvals: Cmcmahon: Looks good to me, approved Physikerwelt: Verified; Looks good to me, but someone else must approve diff --git a/tests/browser/Gemfile b/tests/browser/Gemfile new file mode 100755 index 000..d3d93be --- /dev/null +++ b/tests/browser/Gemfile @@ -0,0 +1,6 @@ +#ruby=ruby-2.1.1 +#ruby-gemset=browsertests + +source "https://rubygems.org"; + +gem "mediawiki_selenium" diff --git a/tests/browser/Gemfile.lock b/tests/browser/Gemfile.lock new file mode 100644 index 000..6b29163 --- /dev/null +++ b/tests/browser/Gemfile.lock @@ -0,0 +1,64 @@ +GEM + remote: https://rubygems.org/ + specs: +builder (3.2.2) +childprocess (0.5.2) + ffi (~> 1.0, >= 1.0.11) +cucumber (1.3.14) + builder (>= 2.1.2) + diff-lcs (>= 1.1.3) + gherkin (~> 2.12) + multi_json (>= 1.7.5, < 2.0) + multi_test (>= 0.1.1) +data_magic (0.18) + faker (>= 1.1.2) + yml_reader (>= 0.2) +diff-lcs (1.2.5) +faker (1.3.0) + i18n (~> 0.5) +ffi (1.9.3) +gherkin (2.12.2) + multi_json (~> 1.3) +headless (1.0.1) +i18n (0.6.9) +json (1.8.1) +mediawiki_selenium (0.2.20) + cucumber (~> 1.3, >= 1.3.10) + headless (~> 1.0, >= 1.0.1) + json (~> 1.8, >= 1.8.1) + net-http-persistent (~> 2.9, >= 2.9.1) + page-object (~> 0.9, >= 0.9.5) + rest-client (~> 1.6, >= 1.6.7) + rspec-expectations (~> 2.14, >= 2.14.4) + syntax (~> 1.2, >= 1.2.0) +mime-types (2.2) +multi_json (1.9.2) +multi_test (0.1.1) +net-http-persistent (2.9.4) +page-object (0.9.8) + page_navigation (>= 0.9) + selenium-webdriver (>= 2.40.0) + watir-webdriver (>= 0.6.8) +page_navigation (0.9) + data_magic (>= 0.14) +rest-client (1.6.7) + mime-types (>= 1.16) +rspec-expectations (2.14.5) + diff-lcs (>= 1.1.3, < 2.0) +rubyzip (1.1.3) +selenium-webdriver (2.41.0) + childprocess (>= 0.5.0) + multi_json (~> 1.0) + rubyzip (~> 1.0) + websocket (~> 1.0.4) +syntax (1.2.0) +watir-webdriver (0.6.9) + selenium-webdriver (>= 2.18.0) +websocket (1.0.7) +yml_reader (0.2) + +PLATFORMS + ruby + +DEPENDENCIES + mediawiki_selenium diff --git a/tests/browser/features/math.feature b/tests/browser/features/math.feature new file mode 100644 index 000..1b5db83 --- /dev/null +++ b/tests/browser/features/math.feature @@ -0,0 +1,23 @@ +# +# This file is subject to the license terms in the LICENSE file found in the +# qa-browsertests top-level directory and at +# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of +# qa-browsertests, including this file, may be copied, modified, propagated, or +# distributed except according to the terms contained in the LICENSE file. +# +# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the +# qa-browsertests top-level directory and at +# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS +# +@chrome @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_6 @internet_explorer_7 @internet_explorer_8 @internet_explorer_9 @internet_explorer_10 @login @phantomjs @test2.wikipedia.org +Feature: Math + + Scenario: Display simple math +Given I am logged in + And I am at page that does not exist + And I click link Create source +When I type 3 + 2 + And I click Preview +Then the page should contain an img tag + And alt for that img should be 3 + 2 + And src for that img should come from //upload diff --git a/tests/browser/features/step_definitions/math_steps.rb b/tests/browser/features/step_definitions/math_steps.rb new file mode 100644 index 000..6bb9456 --- /dev/null +++ b/tests/browser/features/step_definitions/math_steps.rb @@ -0,0 +1,40 @@ +# +# This file is subject to the license terms in the LICENSE file found in the +# qa-browsertests top-level directory and at +# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of +# qa-browsertests, including this file, may be copied, modified, propagated, or +# distributed except according to the terms contained in the LICENSE file. +# +# Copyright 2012-2014 by the Med
[MediaWiki-commits] [Gerrit] Lint Obsolute HTML tags - change (mediawiki...parsoid)
Hardikj has uploaded a new change for review. https://gerrit.wikimedia.org/r/142744 Change subject: Lint Obsolute HTML tags .. Lint Obsolute HTML tags Change-Id: I9d38b610d1c3617f5afc35c92b456ab36da14dad --- M lib/dom.linter.js 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/44/142744/1 diff --git a/lib/dom.linter.js b/lib/dom.linter.js index 7c50274..035e9ef 100644 --- a/lib/dom.linter.js +++ b/lib/dom.linter.js @@ -162,12 +162,29 @@ return nextSibling; } + +/* +* +* Log Obsolute HTML Tags like BIG, CENTER, FONT, S, STRIKE, TT and U +* +*/ +function logObsoluteHTMLTags(env, c) { + +var dsr = DU.getDataParsoid(c).dsr; +var re = /BIG|CENTER|FONT|STRIKE|TT/; + +if (re.test(c.nodeName)) { +env.log('lint/ObsoluteTag', env.page.src, dsr); +} +} + function logWikitextFixups(node, env) { var c = node.firstChild; while (c) { var nextSibling = c.nextSibling; + if (DU.isTplElementNode(env, c)) { // Log transclusions with more than one part @@ -194,6 +211,10 @@ // Process subtree logWikitextFixups(c, env); } + +// Log obsolute HTML tags +logObsoluteHTMLTags(env, c); + } c = nextSibling; -- To view, visit https://gerrit.wikimedia.org/r/142744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d38b610d1c3617f5afc35c92b456ab36da14dad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Hardikj ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop hiding some CSS classes - change (mediawiki...GlobalUserPage)
Jack Phoenix has submitted this change and it was merged. Change subject: Stop hiding some CSS classes .. Stop hiding some CSS classes Now that we're overriding Article's output, these items are no longer being added to the output text. Change-Id: I36ecea6e6524e5456d376d380d4020d35f9a54c3 --- M ext.GlobalUserpage.css 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/ext.GlobalUserpage.css b/ext.GlobalUserpage.css index 9ad6e3f..b3ffee3 100644 --- a/ext.GlobalUserpage.css +++ b/ext.GlobalUserpage.css @@ -1,5 +1,3 @@ -.noarticletext, -.mw-editsection, -.mw-warning-with-logexcerpt /* "This page has been previously deleted" */ { +.mw-editsection /* Only needed for pre-1.24 wikis */ { display: none; -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/142740 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36ecea6e6524e5456d376d380d4020d35f9a54c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalUserPage Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use new "disableeditsection" parameter to action=parse - change (mediawiki...GlobalUserPage)
Jack Phoenix has submitted this change and it was merged. Change subject: Use new "disableeditsection" parameter to action=parse .. Use new "disableeditsection" parameter to action=parse Introduced in I499c4bb0cd85, for 1.24 wikis we don't need to use a CSS hack to hide the edit section links. For backwards-compatability though, we'll still load the CSS. For pre-1.24 wikis, this won't do anything. Change-Id: Iaff55ae328015365e2e11c6eb8640a1753dbab9e --- M GlobalUserpage.body.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/GlobalUserpage.body.php b/GlobalUserpage.body.php index e1da746..c5bd04f 100644 --- a/GlobalUserpage.body.php +++ b/GlobalUserpage.body.php @@ -121,7 +121,8 @@ protected static function parseWikiText( $title ) { $params = array( 'action' => 'parse', - 'page' => $title + 'page' => $title, + 'disableeditsection' => 1, ); $data = self::makeAPIRequest( $params ); return $data['parse']['text']['*']; -- To view, visit https://gerrit.wikimedia.org/r/142738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaff55ae328015365e2e11c6eb8640a1753dbab9e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalUserPage Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only allow 'globaluserpage' preference to be set on Special:... - change (mediawiki...GlobalUserPage)
Jack Phoenix has submitted this change and it was merged. Change subject: Only allow 'globaluserpage' preference to be set on Special:GlobalPreferences .. Only allow 'globaluserpage' preference to be set on Special:GlobalPreferences Change-Id: Ia2fe0a950cc4e0a1db71d5256790aa32dcad6d9a --- M GlobalUserpage.hooks.php 1 file changed, 12 insertions(+), 9 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/GlobalUserpage.hooks.php b/GlobalUserpage.hooks.php index b625aa4..230018c 100644 --- a/GlobalUserpage.hooks.php +++ b/GlobalUserpage.hooks.php @@ -2,18 +2,21 @@ class GlobalUserpageHooks { /** -* Adds the user option for using GlobalUserpage to Special:Preferences. +* Adds the user option for using GlobalUserpage to Special:GlobalPreferences. * -* @param $user User -* @param $preferences Array: Preference descriptions +* @param User $user +* @param array $preferences Preference descriptions * @return bool */ - public static function onGetPreferences( $user, &$preferences ) { - $preferences['globaluserpage'] = array( - 'type' => 'toggle', - 'label-message' => 'globaluserpage-preferences', - 'section' => 'personal/info', // not the best place for it, but eh - ); + public static function onGetPreferences( User $user, &$preferences ) { + if ( class_exists( 'GlobalPreferences' ) && GlobalPreferences::onGlobalPrefsPage() ) { + $preferences['globaluserpage'] = array( + 'type' => 'toggle', + 'label-message' => 'globaluserpage-preferences', + 'section' => 'personal/info', // not the best place for it, but eh + ); + } + return true; } -- To view, visit https://gerrit.wikimedia.org/r/141272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2fe0a950cc4e0a1db71d5256790aa32dcad6d9a Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/GlobalUserPage Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix double tap/click bug in search overlay - change (mediawiki...MobileFrontend)
JGonera has uploaded a new change for review. https://gerrit.wikimedia.org/r/142743 Change subject: Fix double tap/click bug in search overlay .. Fix double tap/click bug in search overlay Give browser a few more ms to update the browsing history after closing the search overlay. Bug: 65676 Change-Id: I91cdddb1be8fec0dd3948c6ccdb272305e2d0f91 --- M javascripts/modules/search/search.js 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/43/142743/1 diff --git a/javascripts/modules/search/search.js b/javascripts/modules/search/search.js index cbf5aa0..b12ee5e 100644 --- a/javascripts/modules/search/search.js +++ b/javascripts/modules/search/search.js @@ -25,12 +25,13 @@ M.on( 'search-results', function( overlay ) { overlay.$( '.results a' ).on( 'click', function() { var href = $( this ).attr( 'href' ); - window.history.back(); + M.router.back(); - // give browser a tick to update its history and redirect + // give browser a few ms after M.router.back() to update its history + // and then redirect setTimeout( function() { window.location.href = href; - }, 0 ); + }, 10 ); // Prevent the link from working and prevent the closing of the overlay // by an event upstream which would trigger browser back on the clicked link return false; -- To view, visit https://gerrit.wikimedia.org/r/142743 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91cdddb1be8fec0dd3948c6ccdb272305e2d0f91 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JGonera ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] JWT namespace - change (mediawiki...OAuth)
jenkins-bot has submitted this change and it was merged. Change subject: JWT namespace .. JWT namespace One more namespace update Change-Id: I23e236cdbbff5f3d787ad37ba47901e10ea9d023 (cherry picked from commit ee59be9fcdfa4ffd328d97f4a5ef221dad309938) --- M frontend/specialpages/SpecialMWOAuth.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: CSteipp: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index e2576c6..6c7a056 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -250,7 +250,7 @@ $statement['grants'] = $access->get( 'grants' ); } - $JWT = JWT::encode( $statement, $consumer->secret ); + $JWT = \JWT::encode( $statement, $consumer->secret ); $this->showResponse( $JWT, $format ); } -- To view, visit https://gerrit.wikimedia.org/r/142742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23e236cdbbff5f3d787ad37ba47901e10ea9d023 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: wmf/1.24wmf11 Gerrit-Owner: CSteipp Gerrit-Reviewer: CSteipp Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] JWT namespace - change (mediawiki...OAuth)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/142742 Change subject: JWT namespace .. JWT namespace One more namespace update Change-Id: I23e236cdbbff5f3d787ad37ba47901e10ea9d023 (cherry picked from commit ee59be9fcdfa4ffd328d97f4a5ef221dad309938) --- M frontend/specialpages/SpecialMWOAuth.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/42/142742/1 diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index e2576c6..6c7a056 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -250,7 +250,7 @@ $statement['grants'] = $access->get( 'grants' ); } - $JWT = JWT::encode( $statement, $consumer->secret ); + $JWT = \JWT::encode( $statement, $consumer->secret ); $this->showResponse( $JWT, $format ); } -- To view, visit https://gerrit.wikimedia.org/r/142742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23e236cdbbff5f3d787ad37ba47901e10ea9d023 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: wmf/1.24wmf11 Gerrit-Owner: CSteipp ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add feature $wgGoogleAllowedDomains to restrict E-Maildomains - change (mediawiki...GoogleLogin)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/142741 Change subject: Add feature $wgGoogleAllowedDomains to restrict E-Maildomains .. Add feature $wgGoogleAllowedDomains to restrict E-Maildomains Enable the restriction of access via GoogleLogin to allowed E-Maildomains. Introducing $wgGoogleAllowedDomains as config array in LocalSettings.php to specify those allowed E-Maildomains. (subdomains aren't allowed). Bug: 67220 Change-Id: I00b9cb9b844d5fbebe3bcb12f101d91ff609014c --- M SpecialGoogleLogin.php M i18n/de.json M i18n/en.json M i18n/qqq.json 4 files changed, 61 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin refs/changes/41/142741/1 diff --git a/SpecialGoogleLogin.php b/SpecialGoogleLogin.php index 4196e58..a3e9ac8 100644 --- a/SpecialGoogleLogin.php +++ b/SpecialGoogleLogin.php @@ -92,32 +92,72 @@ $request = $this->getRequest(); $user = $this->getUser(); $googleIdExists = $db->GoogleIdExists( $userInfo['id'] ); - if ( !$googleIdExists ) { - if ( !$user->isLoggedIn() ) { - $this->createGoogleUserForm( $userInfo, $db ); - } else { - $this->GoogleUserForm( 'Merge' ); - } - } else { - if ( $user->isLoggedIn() ) { - if ( $user->getId() != $googleIdExists['id'] ) { - $out->addWikiMsg( 'googlelogin-link-other' ); + if ( $this->isValidDomain( $userInfo['emails'][0]['value'] ) ) { + if ( !$googleIdExists ) { + if ( !$user->isLoggedIn() ) { + $this->createGoogleUserForm( $userInfo, $db ); } else { - if ( $request->getVal( 'code' ) !== null ) { - // if user logged into google account and is already logged in and linked, - // show the whole special page, not only a button - bug 67486 - $out->redirect( $this->getPageTitle()->getLocalUrl() ); - } else { - $this->GoogleUserForm( 'Unlink' ); - } + $this->GoogleUserForm( 'Merge' ); } } else { - $this->loginGoogleUser( $googleIdExists['id'] ); + if ( $user->isLoggedIn() ) { + if ( $user->getId() != $googleIdExists['id'] ) { + $out->addWikiMsg( 'googlelogin-link-other' ); + } else { + if ( $request->getVal( 'code' ) !== null ) { + // if user logged into google account and is already logged in and linked, + // show the whole special page, not only a button - bug 67486 + $out->redirect( $this->getPageTitle()->getLocalUrl() ); + } else { + $this->GoogleUserForm( 'Unlink' ); + } + } + } else { + $this->loginGoogleUser( $googleIdExists['id'] ); + } } + } else { + $out->addWikiMsg( + 'googlelogin-unallowed-domain', + $this->getDomainFromMail( $userInfo['emails'][0]['value'] ) + ); } } /** +* Returns the domain and tld (without subdomains) of the provided E-Mailadress +* @param string $mailAdress The E-Mailadress to extract the domain and tld from +* @return string The Tld an
[MediaWiki-commits] [Gerrit] Don't unserialize integer reply from Redis incrBy - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Don't unserialize integer reply from Redis incrBy .. Don't unserialize integer reply from Redis incrBy It does not work with unserialize because RedisBagOStuff->unserialize expects either strings of digits, or serialized strings. A plain integer is neither. incr docs were incorrect, so fix and expand by copying from parent class. Change-Id: Ifc9c7a36f221b251ceea0d9a79ae6c3ce5753dd4 --- M includes/objectcache/RedisBagOStuff.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php index 825c77b..c7d2f13 100644 --- a/includes/objectcache/RedisBagOStuff.php +++ b/includes/objectcache/RedisBagOStuff.php @@ -298,9 +298,9 @@ * command. But we are constrained by the memcached-like interface to * return null in that case. Once the key exists, further increments are * atomic. -* @param string $key -* @param int $value -* @param bool|mixed +* @param string $key Key to increase +* @param int $value Value to add to $key (Default 1) +* @return int|bool New value or false on failure */ public function incr( $key, $value = 1 ) { $section = new ProfileSection( __METHOD__ ); @@ -313,7 +313,7 @@ return null; } try { - $result = $this->unserialize( $conn->incrBy( $key, $value ) ); + $result = $conn->incrBy( $key, $value ); } catch ( RedisException $e ) { $result = false; $this->handleException( $conn, $e ); -- To view, visit https://gerrit.wikimedia.org/r/142734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc9c7a36f221b251ceea0d9a79ae6c3ce5753dd4 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Close tipsies when closing interface - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Close tipsies when closing interface .. Close tipsies when closing interface This could probably be aggregated and done more cleanly, but for now this will do. Change-Id: I1918a61a29f753f7249d9c5afbe0658f4faf4d23 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/740 --- M resources/mmv/mmv.lightboxinterface.js M resources/mmv/ui/mmv.ui.canvasButtons.js M resources/mmv/ui/mmv.ui.metadataPanel.js M resources/mmv/ui/mmv.ui.stripeButtons.js 4 files changed, 20 insertions(+), 0 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/mmv.lightboxinterface.js b/resources/mmv/mmv.lightboxinterface.js index ddcfd5e..3d34ba2 100644 --- a/resources/mmv/mmv.lightboxinterface.js +++ b/resources/mmv/mmv.lightboxinterface.js @@ -202,6 +202,8 @@ this.canvas.unattach(); + this.buttons.unattach(); + this.panel.fileReuse.closeDialog(); this.clearEvents(); diff --git a/resources/mmv/ui/mmv.ui.canvasButtons.js b/resources/mmv/ui/mmv.ui.canvasButtons.js index 8750fd7..48769ee 100644 --- a/resources/mmv/ui/mmv.ui.canvasButtons.js +++ b/resources/mmv/ui/mmv.ui.canvasButtons.js @@ -192,5 +192,14 @@ } }; + /** +* Removes all UI things from the DOM, or hides them +*/ + CBP.unattach = function () { + this.$viewFile.tipsy( 'hide' ); + this.$close.tipsy( 'hide' ); + this.$fullscreen.tipsy( 'hide' ); + }; + mw.mmv.ui.CanvasButtons = CanvasButtons; }( mediaWiki, jQuery, OO ) ); diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index f2ce95f..b04cbdf 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.js +++ b/resources/mmv/ui/mmv.ui.metadataPanel.js @@ -60,6 +60,11 @@ }; MPP.unattach = function() { + this.$title.tipsy( 'hide' ); + this.$mmvOptOutLink.tipsy( 'hide' ); + this.$titleAndCredit.find( '.mw-mmv-author' ).tipsy( 'hide' ); + this.$titleAndCredit.find( '.mw-mmv-source' ).tipsy( 'hide' ); + this.scroller.unattach(); this.buttons.unattach(); this.fileReuse.unattach(); diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js b/resources/mmv/ui/mmv.ui.stripeButtons.js index f0ad23b..7bd51c8 100644 --- a/resources/mmv/ui/mmv.ui.stripeButtons.js +++ b/resources/mmv/ui/mmv.ui.stripeButtons.js @@ -417,6 +417,10 @@ this.buttons.$reuse.off( 'click.mmv-stripeButtons' ); this.clearTimer( 'feedbackTooltip.show' ); + + $.each( this.buttons, function ( name, $button ) { + $button.tipsy( 'hide' ); + } ); }; mw.mmv.ui.StripeButtons = StripeButtons; -- To view, visit https://gerrit.wikimedia.org/r/142633 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1918a61a29f753f7249d9c5afbe0658f4faf4d23 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: MarkTraceur Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop hiding some CSS classes - change (mediawiki...GlobalUserPage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/142740 Change subject: Stop hiding some CSS classes .. Stop hiding some CSS classes Now that we're overriding Article's output, these items are no longer being added to the output text. Change-Id: I36ecea6e6524e5456d376d380d4020d35f9a54c3 --- M ext.GlobalUserpage.css 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage refs/changes/40/142740/1 diff --git a/ext.GlobalUserpage.css b/ext.GlobalUserpage.css index 9ad6e3f..b3ffee3 100644 --- a/ext.GlobalUserpage.css +++ b/ext.GlobalUserpage.css @@ -1,5 +1,3 @@ -.noarticletext, -.mw-editsection, -.mw-warning-with-logexcerpt /* "This page has been previously deleted" */ { +.mw-editsection /* Only needed for pre-1.24 wikis */ { display: none; -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/142740 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36ecea6e6524e5456d376d380d4020d35f9a54c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalUserPage Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix MathDatabaseTest - change (mediawiki...Math)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/142739 Change subject: Fix MathDatabaseTest .. Fix MathDatabaseTest The test used an unnecessary call to setupTestDB. This might have caused that the unittest_math table was deleted twice during the setup routine of the unittest. Bug: 67148 Change-Id: I4a414900c1c2d97b759ef1755e53e82c5c2e8e14 --- M tests/MathDatabaseTest.php 1 file changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/39/142739/1 diff --git a/tests/MathDatabaseTest.php b/tests/MathDatabaseTest.php index be913af..ea496a0 100644 --- a/tests/MathDatabaseTest.php +++ b/tests/MathDatabaseTest.php @@ -1,10 +1,11 @@ tablesUsed[] = 'math'; +*$this->tablesUsed[] = 'math'; * } * was not sufficient. */ @@ -33,8 +34,8 @@ // Create a new instance of MathSource $this->renderer = new MathTexvc( self::SOME_TEX ); $this->tablesUsed[] = 'math'; - self::setupTestDB( $this->db, "mathtest" ); -} + } + /** * Checks the tex and hash functions * @covers MathRenderer::getInputHash() @@ -52,8 +53,9 @@ $this->renderer->setTex( self::SOME_TEX ); $this->renderer->setMathml( self::SOME_MATHML ); $this->renderer->setHtml( self::SOME_HTML ); - $this->renderer->setOutputHash( self::SOME_OUTPUTHASH); + $this->renderer->setOutputHash( self::SOME_OUTPUTHASH ); } + /** * Checks database access. Writes an entry and reads it back. * @covers MathRenderer::writeDatabaseEntry() @@ -71,7 +73,6 @@ } - /** * Checks the creation of the math table without debugging enabled. * @covers MathHooks::onLoadExtensionSchemaUpdates @@ -86,7 +87,7 @@ $this->renderer->writeToDatabase(); $res = $this->db->select( "math", "*" ); $row = $res->fetchRow(); - $this->assertEquals( 10, sizeof( $row ) ); + $this->assertEquals( 10, sizeof( $row ) ); } /* @@ -98,10 +99,9 @@ $inputHash = $this->renderer->getInputHash(); $this->assertTrue( $this->renderer->isChanged() ); $this->assertTrue( $this->renderer->writeCache(), "Write new entry" ); - $res = $this->db->selectField( "math", "math_inputhash", - array( "math_inputhash" => $inputHash ) ); - $this->assertTrue( $res !== false , "Check database entry"); - $this->assertTrue( $this->renderer->readFromDatabase() , "Read entry from database"); + $res = $this->db->selectField( "math", "math_inputhash", array( "math_inputhash" => $inputHash ) ); + $this->assertTrue( $res !== false, "Check database entry" ); + $this->assertTrue( $this->renderer->readFromDatabase(), "Read entry from database" ); $this->assertFalse( $this->renderer->isChanged() ); // modify the database entry manually $this->db->delete( "math", array( "math_inputhash" => $inputHash ) ); -- To view, visit https://gerrit.wikimedia.org/r/142739 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a414900c1c2d97b759ef1755e53e82c5c2e8e14 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Physikerwelt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use new "disableeditsection" parameter to action=parse - change (mediawiki...GlobalUserPage)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/142738 Change subject: Use new "disableeditsection" parameter to action=parse .. Use new "disableeditsection" parameter to action=parse Introduced in I499c4bb0cd85, for 1.24 wikis we don't need to use a CSS hack to hide the edit section links. For backwards-compatability though, we'll still load the CSS. For pre-1.24 wikis, this won't do anything. Change-Id: Iaff55ae328015365e2e11c6eb8640a1753dbab9e --- M GlobalUserpage.body.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage refs/changes/38/142738/1 diff --git a/GlobalUserpage.body.php b/GlobalUserpage.body.php index e1da746..c5bd04f 100644 --- a/GlobalUserpage.body.php +++ b/GlobalUserpage.body.php @@ -121,7 +121,8 @@ protected static function parseWikiText( $title ) { $params = array( 'action' => 'parse', - 'page' => $title + 'page' => $title, + 'disableeditsection' => 1, ); $data = self::makeAPIRequest( $params ); return $data['parse']['text']['*']; -- To view, visit https://gerrit.wikimedia.org/r/142738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaff55ae328015365e2e11c6eb8640a1753dbab9e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalUserPage Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prevent blocked users from signing petitions - change (mediawiki...Petition)
Pcoombe has uploaded a new change for review. https://gerrit.wikimedia.org/r/142737 Change subject: Prevent blocked users from signing petitions .. Prevent blocked users from signing petitions Bug: 65850 Change-Id: I0abf485799a8c7bfbbca4526e86a76f69ffa0785 --- M SpecialPetition.php M i18n/en.json M i18n/qqq.json 3 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Petition refs/changes/37/142737/1 diff --git a/SpecialPetition.php b/SpecialPetition.php index 1058f7b..26c92ef 100755 --- a/SpecialPetition.php +++ b/SpecialPetition.php @@ -19,6 +19,12 @@ $this->setHeaders(); $this->outputHeader(); + $user = $this->getUser(); + if ( $user->isBlocked() ) { + $out->addHtml( wfMessage('petition-form-blocked')->escaped() ); + return; + } + $out->addModules( 'ext.Petition' ); $countries = SpecialPetition::getCountryArray( $this->getLanguage()->getCode() ); diff --git a/i18n/en.json b/i18n/en.json index 270ea6c..5644822 100755 --- a/i18n/en.json +++ b/i18n/en.json @@ -15,6 +15,7 @@ "petition-num-signatures" : "$1 {{PLURAL:$1|person has|people have}} signed already", "petition-form-submit": "Sign", "petition-form-required" : "This field is required", +"petition-form-blocked" : "You can not sign this petition because you are currently blocked.", "petition-done" : "Thank you. Your signature has been added.", "petitiondata": "Petition data download", "petition-data-intro" : "Here you can download petition signatures as a CSV file. Note that this contains private info such as names and email addresses, and must be treated in accordance with the Wikimedia Foundation non-disclosure agreement.", diff --git a/i18n/qqq.json b/i18n/qqq.json index 5b39516..016217b 100755 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -15,6 +15,7 @@ "petition-num-signatures" : "Message including the total number of signatures on this petition so far.\nParameters:\n* $1 - number of signatures", "petition-form-submit": "Button to submit signature", "petition-form-required" : "Message displayed to a user if a field is required, but not filled out when they try to submit.", +"petition-form-blocked" : "Message displayed in place of the form if user is blocked", "petition-done" : "Message which appears in place of the form once a user's signature has been submitted successfully.", "petitiondata": "Title for the Special:PetitionData page, where authorised users can download a list of all signatures.", "petition-data-intro" : "Explanation and warning which appears on Special:PetitionData.", -- To view, visit https://gerrit.wikimedia.org/r/142737 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0abf485799a8c7bfbbca4526e86a76f69ffa0785 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Petition Gerrit-Branch: master Gerrit-Owner: Pcoombe ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correct various things in rangy-position to make it work in IE - change (VisualEditor/VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/142736 Change subject: Correct various things in rangy-position to make it work in IE .. Correct various things in rangy-position to make it work in IE * Add semicolons at the end of statements where they were missing * Do not conditionally define createDocumentBoundaryPosGetter(), jshint doesn't like that and the function is used outside of the block where it is defined Fixing these things makes confusing errors in IE go away. Change-Id: I18cc0abe23f649515e555cd9318f88bf91fc7ac1 --- M lib/rangy/rangy-position-1.3.js 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/36/142736/1 diff --git a/lib/rangy/rangy-position-1.3.js b/lib/rangy/rangy-position-1.3.js index eb60b7b..426cae7 100644 --- a/lib/rangy/rangy-position-1.3.js +++ b/lib/rangy/rangy-position-1.3.js @@ -132,7 +132,7 @@ } function pointIsInOrAboveRect(x, y, rect) { -console.log("pointIsInOrAboveRect", x, y, Math.floor(rect.top), Math.floor(rect.right), Math.floor(rect.bottom), Math.floor(rect.left)) +console.log("pointIsInOrAboveRect", x, y, Math.floor(rect.top), Math.floor(rect.right), Math.floor(rect.bottom), Math.floor(rect.left)); return y < rect.bottom && x >= rect.left && x <= rect.right; } @@ -372,7 +372,7 @@ && this.startOffset < this.startContainer.childNodes.length) { var n = this.startContainer.childNodes[this.startOffset]; if (n.getClientRects) { -console.log(n, n.getClientRects(), this.startContainer.getClientRects()) +console.log(n, n.getClientRects(), this.startContainer.getClientRects()); } } @@ -390,7 +390,7 @@ throw module.createError("Cannot get position for range " + this.inspect()); } }; -} +}; } } else { var getElementBoundingClientRect = elementSupportsGetBoundingClientRect ? @@ -448,7 +448,7 @@ for (var i = 0, len = elements.length; i < len; ++i) { rects.push(getElementBoundingClientRect(elements[i])); } -rect = mergeRects(rects) +rect = mergeRects(rects); } // Clean up @@ -460,15 +460,15 @@ return getRectFromBoundaries(createWrappedRange(range)); }; } +} -function createDocumentBoundaryPosGetter(isStart) { + function createDocumentBoundaryPosGetter(isStart) { return function() { var pos = this["get" + (isStart ? "Start" : "End") + "ClientPos"](); var scrollPos = getScrollPosition( dom.getWindow(this.startContainer) ); return { x: pos.x + scrollPos.x, y: pos.y + scrollPos.y }; }; } -} util.extend(rangeProto, { getBoundingDocumentRect: function() { -- To view, visit https://gerrit.wikimedia.org/r/142736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18cc0abe23f649515e555cd9318f88bf91fc7ac1 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Site: add canonical namespaces for non built-in ns - change (pywikibot/core)
Mpaa has uploaded a new change for review. https://gerrit.wikimedia.org/r/142735 Change subject: Site: add canonical namespaces for non built-in ns .. Site: add canonical namespaces for non built-in ns Add Site._canonical_namespaces and related functions: - canonical_namespaces(): Return dict of valid canonical namespaces - canonical_namespace(): Return string with name of canonical namespace Needed to identify which namespaces can be acessed by an Extension. E.g. Proofread Page works on Page and Index namespaces, which keep the same name as canonical namespaces but are translated as local ns. Preparation for ProofreadPage class. Change-Id: I58d67501e00ff9f1afdbdde97ac43bd7aeb40963 --- M pywikibot/site.py M tests/site_tests.py 2 files changed, 75 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/35/142735/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index 5f5ba7e..c61481d 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -634,6 +634,7 @@ if LV(self.version()) >= LV("1.14"): self._namespaces[6] = [u"File"] self._namespaces[7] = [u"File talk"] +self._canonical_namespaces = {} self._msgcache = {} self._loginstatus = LoginStatus.NOT_ATTEMPTED return @@ -1133,16 +1134,25 @@ assert 'namespaces' in sidata, \ "API siteinfo response lacks 'namespaces' key" self._siteinfo = sidata['general'] + nsdata = sidata['namespaces'] for nskey in nsdata: ns = int(nskey) if ns in self._namespaces: -if nsdata[nskey]["*"] in self._namespaces[ns]: -continue -# this is the preferred form so it goes at front of list -self._namespaces[ns].insert(0, nsdata[nskey]["*"]) +if not nsdata[nskey]["*"] in self._namespaces[ns]: +# this is the preferred form so it goes at front of list +self._namespaces[ns].insert(0, nsdata[nskey]["*"]) else: self._namespaces[ns] = [nsdata[nskey]["*"]] + +if 'canonical' not in nsdata[nskey].keys(): +continue +if ns in self._canonical_namespaces: +if not nsdata[nskey]['canonical'] in self._canonical_namespaces[ns]: +self._canonical_namespaces[ns].insert(0, nsdata[nskey]['canonical']) +else: +self._canonical_namespaces[ns] = [nsdata[nskey]['canonical']] + if 'namespacealiases' in sidata: aliasdata = sidata['namespacealiases'] for item in aliasdata: @@ -1150,6 +1160,7 @@ continue # this is a less preferred form so it goes at the end self._namespaces[int(item['id'])].append(item["*"]) + if 'extensions' in sidata: self._extensions = sidata['extensions'] else: @@ -1265,6 +1276,24 @@ return self.namespaces()[num] return self.namespaces()[num][0] +def canonical_namespaces(self): +"""Return dict of valid canonical namespaces on this wiki.""" + +if not hasattr(self, "_siteinfo"): +self._getsiteinfo() +return self._canonical_namespaces + +def canonical_namespace(self, num, all=False): +"""Return string containing local name of canonical namespace 'num'. + +If optional argument 'all' is true, return a list of all recognized +values for this namespace. + +""" +if all: +return self.canonical_namespaces()[num] +return self.canonical_namespaces()[num][0] + def live_version(self, force=False): """Return the 'real' version number found on [[Special:Version]] diff --git a/tests/site_tests.py b/tests/site_tests.py index cbce977..8216158 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -129,6 +129,48 @@ for key in ns for item in mysite.namespace(key, True))) +def testCanonicalNamespaceMethods(self): +"""Test cases for methods manipulating namespace names""" + +builtins = { +'Talk': 1, # these should work in any MW wiki +'User': 2, +'User talk': 3, +'Project': 4, +'Project talk': 5, +'Image': 6, +'Image talk': 7, +'MediaWiki': 8, +'MediaWiki talk': 9, +'Template': 10, +'Template talk': 11, +'Help': 12, +'Help talk': 13, +'Category': 14, +'Category talk': 15, +} +self.assertTrue(all(mysite.ns_index(b) == builtins[b] +for b in builtins)) +ns = mysite.canonical_namespaces() +self.assertType(ns, dict)
[MediaWiki-commits] [Gerrit] DonationData: cleanup of basic data retrieval - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: DonationData: cleanup of basic data retrieval .. DonationData: cleanup of basic data retrieval I was having an empty string explosion problem. This makes sure that all the data that comes out of DonationData was... you know, actually represented somewhere in the current donation flow. THIS IS POTENTIALLY DANGEROUS: The difference between an empty key and a missing one, is that all XML going out of DonationInterface will no longer populate empty nodes for data that we don't really have (this is good): Instead they will be left off the outgoing request XML entirely. Much live sandbox testing will need to happen. Change-Id: I750995710901ce1f2b9f341f244d5883a947ff00 --- M gateway_common/DonationData.php M tests/DonationDataTestCase.php 2 files changed, 130 insertions(+), 133 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php index 0d0ed10..26807d4 100644 --- a/gateway_common/DonationData.php +++ b/gateway_common/DonationData.php @@ -50,72 +50,88 @@ //I don't care if you're a test or not. At all. $this->normalized = $external_data; } else { - $this->normalized = array( - 'amount' => $wgRequest->getText( 'amount', null ), - 'amountGiven' => $wgRequest->getText( 'amountGiven', null ), - 'amountOther' => $wgRequest->getText( 'amountOther', null ), - 'email' => $wgRequest->getText( 'email' ), - 'emailAdd' => $wgRequest->getText( 'emailAdd' ), //@TODO: Kill this legacy field for increased happiness. Er, once production does the same. - 'fname' => $wgRequest->getText( 'fname' ), - 'lname' => $wgRequest->getText( 'lname' ), - 'street' => $wgRequest->getText( 'street' ), - 'street_supplemental' => $wgRequest->getText( 'street_supplemental' ), - 'city' => $wgRequest->getText( 'city' ), - 'state' => $wgRequest->getText( 'state' ), - 'zip' => $wgRequest->getText( 'zip' ), - 'country' => $wgRequest->getText( 'country' ), - 'premium_language' => $wgRequest->getText( 'premium_language', null ), - 'card_num' => str_replace( ' ', '', $wgRequest->getText( 'card_num' ) ), - 'card_type' => $wgRequest->getText( 'card_type' ), - 'expiration' => $wgRequest->getText( 'expiration' ), - 'cvv' => $wgRequest->getText( 'cvv' ), - //Leave both of the currencies here, in case something external didn't get the memo. - 'currency' => $wgRequest->getVal( 'currency' ), - 'currency_code' => $wgRequest->getVal( 'currency_code' ), - 'payment_method' => $wgRequest->getText( 'payment_method', null ), // NOTE: If things are breaking because session data is overwriting this; please fix elsewhere! - 'payment_submethod' => $wgRequest->getText( 'payment_submethod', null ), // Used by GlobalCollect for payment types - 'paymentmethod' => $wgRequest->getText( 'paymentmethod', null ), //used by the FormChooser (and the newest banners) for some reason. - 'submethod' => $wgRequest->getText( 'submethod', null ), //same as above. Ideally, the newer banners would stop using these vars and go back to the old ones... - 'issuer_id' => $wgRequest->getText( 'issuer_id' ), - 'order_id' => $wgRequest->getText( 'order_id', null ), - 'referrer' => ( $wgRequest->getVal( 'referrer' ) ) ? $wgRequest->getVal( 'referrer' ) : $wgRequest->getHeader( 'referer' ), - 'utm_source' => $wgRequest->getText( 'utm_source' ), - 'utm_source_id' => $wgRequest->getVal( 'utm_source_id', null ), - 'utm_medium' => $wgRequest->getText( 'utm_medium' ), - 'utm_campaign' => $wgRequest->getText( 'utm_campaign' ), - 'utm_key' => $wgRequest->getText( 'utm_key' ), - // Pull both of these here. We can logic out which one to use in the normalize bits. - 'language' => $wgRequest->getText( 'language', nul
[MediaWiki-commits] [Gerrit] Accept Redis integer replies without unserialize error - change (mediawiki/core)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/142734 Change subject: Accept Redis integer replies without unserialize error .. Accept Redis integer replies without unserialize error Change-Id: Ifc9c7a36f221b251ceea0d9a79ae6c3ce5753dd4 --- M includes/objectcache/RedisBagOStuff.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/34/142734/1 diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php index 825c77b..39ff4ef 100644 --- a/includes/objectcache/RedisBagOStuff.php +++ b/includes/objectcache/RedisBagOStuff.php @@ -337,6 +337,11 @@ * @return mixed */ protected function unserialize( $data ) { + // Redis has integer replies for some commands, e.g. INCRBY + if ( is_int( $data ) ) { + return $data; + } + return ctype_digit( $data ) ? intval( $data ) : unserialize( $data ); } -- To view, visit https://gerrit.wikimedia.org/r/142734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc9c7a36f221b251ceea0d9a79ae6c3ce5753dd4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Apply opacity styling to highlights directly, not to their c... - change (VisualEditor/VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/142733 Change subject: Apply opacity styling to highlights directly, not to their containers .. Apply opacity styling to highlights directly, not to their containers Applying opacity to a container doesn't work in Internet Explorer if the container's children are absolutely positioned. See http://jsfiddle.net/PDt23/1/ for an example. This causes a bug where highlights are fully opaque in IE. It's easy to work around by applying the opacity rule slightly differently, so let's do that. Change-Id: I99ab47094a4eda2024d86defaaee7ffb245bb309 --- M modules/ve/ce/styles/nodes/ve.ce.FocusableNode.css 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/33/142733/1 diff --git a/modules/ve/ce/styles/nodes/ve.ce.FocusableNode.css b/modules/ve/ce/styles/nodes/ve.ce.FocusableNode.css index 57497f6..c127650 100644 --- a/modules/ve/ce/styles/nodes/ve.ce.FocusableNode.css +++ b/modules/ve/ce/styles/nodes/ve.ce.FocusableNode.css @@ -5,11 +5,11 @@ * @license The MIT License (MIT); see LICENSE.txt */ -.ve-ce-surface-highlights-focused .ve-ce-focusableNode-highlights { +.ve-ce-surface-highlights-focused .ve-ce-focusableNode-highlight { opacity: 0.5; } -.ve-ce-surface-highlights-blurred .ve-ce-focusableNode-highlights { +.ve-ce-surface-highlights-blurred .ve-ce-focusableNode-highlight { opacity: 0.15; } -- To view, visit https://gerrit.wikimedia.org/r/142733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99ab47094a4eda2024d86defaaee7ffb245bb309 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki_singlenode: apache 2.4 compat - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: mediawiki_singlenode: apache 2.4 compat .. mediawiki_singlenode: apache 2.4 compat Add guards to the mediawiki_singlenode Apache site configuration that use the new Require directives to setup access rather than the old Allow / Deny directives. Change-Id: Icad1070cf781168f434437d33d6ddd13d33196f5 --- M modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb 1 file changed, 16 insertions(+), 3 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb b/modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb index 83e6be2..b2a753d 100644 --- a/modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb +++ b/modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb @@ -6,17 +6,30 @@ Options FollowSymLinks AllowOverride None += 2.4> +Require all granted + > Options Indexes FollowSymLinks MultiViews AllowOverride None -Order allow,deny -allow from all += 2.4> +Require all granted + + +Order allow,deny +allow from all + /orig> -Deny from all += 2.4> +Require all denied + + +Deny from all + RewriteEngine On -- To view, visit https://gerrit.wikimedia.org/r/142730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icad1070cf781168f434437d33d6ddd13d33196f5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki_singlenode: apache 2.4 compat - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/142730 Change subject: mediawiki_singlenode: apache 2.4 compat .. mediawiki_singlenode: apache 2.4 compat Add guards to the mediawiki_singlenode Apache site configuration that use the new Require directives to setup access rather than the old Allow / Deny directives. Change-Id: Icad1070cf781168f434437d33d6ddd13d33196f5 --- M modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb 1 file changed, 16 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/30/142730/1 diff --git a/modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb b/modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb index 83e6be2..b2a753d 100644 --- a/modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb +++ b/modules/mediawiki_singlenode/templates/mediawiki_singlenode.erb @@ -6,17 +6,30 @@ Options FollowSymLinks AllowOverride None += 2.4> +Require all granted + > Options Indexes FollowSymLinks MultiViews AllowOverride None -Order allow,deny -allow from all += 2.4> +Require all granted + + +Order allow,deny +allow from all + /orig> -Deny from all += 2.4> +Require all denied + + +Deny from all + RewriteEngine On -- To view, visit https://gerrit.wikimedia.org/r/142730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icad1070cf781168f434437d33d6ddd13d33196f5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] dynamicproxy: Enable diamond collector for nginx - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/142732 Change subject: dynamicproxy: Enable diamond collector for nginx .. dynamicproxy: Enable diamond collector for nginx Change-Id: I9e5f76f96747b67e39a3de3e95d3196dd30a09cd --- M modules/dynamicproxy/manifests/init.pp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/142732/1 diff --git a/modules/dynamicproxy/manifests/init.pp b/modules/dynamicproxy/manifests/init.pp index f42e033..abd49cd 100644 --- a/modules/dynamicproxy/manifests/init.pp +++ b/modules/dynamicproxy/manifests/init.pp @@ -81,4 +81,6 @@ require => File['/etc/nginx/lua/resty'], source => 'puppet:///modules/dynamicproxy/redis.lua', } + +include diamond::collector::nginx } -- To view, visit https://gerrit.wikimedia.org/r/142732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e5f76f96747b67e39a3de3e95d3196dd30a09cd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DonationData: cleanup of basic data retrieval - change (mediawiki...DonationInterface)
Katie Horn has uploaded a new change for review. https://gerrit.wikimedia.org/r/142731 Change subject: DonationData: cleanup of basic data retrieval .. DonationData: cleanup of basic data retrieval I was having an empty string explosion problem. This makes sure that all the data that comes out of DonationData was... you know, actually represented somewhere in the current donation flow. THIS IS POTENTIALLY DANGEROUS: The difference between an empty key and a missing one, is that all XML going out of DonationInterface will no longer populate empty nodes for data that we don't really have (this is good): Instead they will be left off the outgoing request XML entirely. Much live sandbox testing will need to happen. Change-Id: I750995710901ce1f2b9f341f244d5883a947ff00 --- M gateway_common/DonationData.php M tests/DonationDataTestCase.php 2 files changed, 130 insertions(+), 133 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/31/142731/1 diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php index 0d0ed10..26807d4 100644 --- a/gateway_common/DonationData.php +++ b/gateway_common/DonationData.php @@ -50,72 +50,88 @@ //I don't care if you're a test or not. At all. $this->normalized = $external_data; } else { - $this->normalized = array( - 'amount' => $wgRequest->getText( 'amount', null ), - 'amountGiven' => $wgRequest->getText( 'amountGiven', null ), - 'amountOther' => $wgRequest->getText( 'amountOther', null ), - 'email' => $wgRequest->getText( 'email' ), - 'emailAdd' => $wgRequest->getText( 'emailAdd' ), //@TODO: Kill this legacy field for increased happiness. Er, once production does the same. - 'fname' => $wgRequest->getText( 'fname' ), - 'lname' => $wgRequest->getText( 'lname' ), - 'street' => $wgRequest->getText( 'street' ), - 'street_supplemental' => $wgRequest->getText( 'street_supplemental' ), - 'city' => $wgRequest->getText( 'city' ), - 'state' => $wgRequest->getText( 'state' ), - 'zip' => $wgRequest->getText( 'zip' ), - 'country' => $wgRequest->getText( 'country' ), - 'premium_language' => $wgRequest->getText( 'premium_language', null ), - 'card_num' => str_replace( ' ', '', $wgRequest->getText( 'card_num' ) ), - 'card_type' => $wgRequest->getText( 'card_type' ), - 'expiration' => $wgRequest->getText( 'expiration' ), - 'cvv' => $wgRequest->getText( 'cvv' ), - //Leave both of the currencies here, in case something external didn't get the memo. - 'currency' => $wgRequest->getVal( 'currency' ), - 'currency_code' => $wgRequest->getVal( 'currency_code' ), - 'payment_method' => $wgRequest->getText( 'payment_method', null ), // NOTE: If things are breaking because session data is overwriting this; please fix elsewhere! - 'payment_submethod' => $wgRequest->getText( 'payment_submethod', null ), // Used by GlobalCollect for payment types - 'paymentmethod' => $wgRequest->getText( 'paymentmethod', null ), //used by the FormChooser (and the newest banners) for some reason. - 'submethod' => $wgRequest->getText( 'submethod', null ), //same as above. Ideally, the newer banners would stop using these vars and go back to the old ones... - 'issuer_id' => $wgRequest->getText( 'issuer_id' ), - 'order_id' => $wgRequest->getText( 'order_id', null ), - 'referrer' => ( $wgRequest->getVal( 'referrer' ) ) ? $wgRequest->getVal( 'referrer' ) : $wgRequest->getHeader( 'referer' ), - 'utm_source' => $wgRequest->getText( 'utm_source' ), - 'utm_source_id' => $wgRequest->getVal( 'utm_source_id', null ), - 'utm_medium' => $wgRequest->getText( 'utm_medium' ), - 'utm_campaign' => $wgRequest->getText( 'utm_campaign' ), - 'utm_key' => $wgRequest->getText( 'utm_key' ), - // Pull both of these here. We can logic out which one to use in the normalize bits. -
[MediaWiki-commits] [Gerrit] Handle Exceptions more stable - change (mediawiki...GoogleLogin)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/142729 Change subject: Handle Exceptions more stable .. Handle Exceptions more stable Don't run into unexpected non-MW exceptions, catch the exceptions at main points, where they occur mostly and output a generic error with error message of exception. Bug: 67185 Change-Id: I0ceff2c2393424053a1aefa8e7620f6102d68959 --- M SpecialGoogleLogin.php M i18n/de.json M i18n/en.json M i18n/qqq.json 4 files changed, 54 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin refs/changes/29/142729/1 diff --git a/SpecialGoogleLogin.php b/SpecialGoogleLogin.php index 4196e58..0e3e689 100644 --- a/SpecialGoogleLogin.php +++ b/SpecialGoogleLogin.php @@ -10,6 +10,9 @@ */ function execute( $par ) { global $wgScriptDir; + // first set our own handler for catchable fatal errors + set_error_handler( 'SpecialGoogleLogin::catchableFatalHandler', E_RECOVERABLE_ERROR ); + $this->setHeaders(); $request = $this->getRequest(); $out = $this->getOutput(); @@ -20,12 +23,21 @@ $plus = $this->prepareClient( $client ); if ( $request->getVal( 'code' ) !== null ) { - $client->authenticate( $request->getVal( 'code' ) ); - $request->setSessionData( 'access_token', $client->getAccessToken() ); - $userInfo = $plus->people->get("me"); - $this->createOrMerge( $userInfo, $db ); + try { + $client->authenticate( $request->getVal( 'code' ) ); + $request->setSessionData( 'access_token', $client->getAccessToken() ); + try { + $userInfo = $plus->people->get("me1"); + } catch ( Google_Service_Exception $e ) { + $this->createError( $e->getMessage() ); + return; + } + $this->createOrMerge( $userInfo, $db ); + } catch( Google_Auth_Exception $e ) { + $this->createError( $e->getMessage() ); + } } elseif ( $request->getVal( 'error' ) !== null ) { - $out->addWikiMsg( 'googlelogin-unexpected-error' ); + $this->createError( 'Authentication failed' ); $out->addHtml( Html::element( 'br' ) . Html::element( 'a', @@ -45,7 +57,12 @@ if ( !empty( $par ) ) { $this->finishAction( $par, $client, $plus, $db ); } else { - $userInfo = $plus->people->get("me"); + try { + $userInfo = $plus->people->get("me"); + } catch ( Google_Service_Exception $e ) { + $this->createError( $e->getMessage() ); + return; + } $googleIdExists = $db->GoogleIdExists( $userInfo['id'] ); $buildTable = array( array( @@ -80,6 +97,21 @@ $out->redirect( $authUrl ); } } + } + + public static function catchableFatalHandler($errorNo, $errorString, $errorFile, $errorLine) { + global $wgOut; + $wgOut->addWikiMsg( 'googlelogin-generic-error', $errorString ); + return true; + } + + /** +* Creates a generic error message with further information in $errorMessage. +* @param string $errorMessage short description or further information to the error +*/ + private function createError( $errorMessage ) { + $out = $this->getOutput(); + $out
[MediaWiki-commits] [Gerrit] Added more tolerance for config whitespace - change (mediawiki...jobrunner)
Ori.livneh has submitted this change and it was merged. Change subject: Added more tolerance for config whitespace .. Added more tolerance for config whitespace * This can also make the config file prettier Change-Id: I7f2a927b3d860ead1710a057096d1e396354e93a --- M redisJobRunnerService 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/redisJobRunnerService b/redisJobRunnerService index 77e9f6e..0e5f4dc 100755 --- a/redisJobRunnerService +++ b/redisJobRunnerService @@ -166,12 +166,13 @@ } foreach ( explode( '|', $config['runners'] ) as $loop ) { - list( $runners, $types ) = explode( ':', $loop ); + list( $runners, $types ) = explode( ':', trim( $loop ) ); if ( !ctype_digit( $runners ) || $runners < 1 ) { throw new Exception( "Invalid number of job runners '$runners'." ); } $types = explode( ',', $types ); foreach ( $types as $type ) { + $type = trim( $type ); if ( !preg_match( '/^[-~]?[a-zA-Z0-9]+|\*$/', $type ) ) { throw new Exception( "Invalid job type '$type'." ); } @@ -194,14 +195,14 @@ if ( isset( $config['claimTTL'] ) ) { $tuples = explode( ',', $config['claimTTL'] ); foreach ( $tuples as $tuple ) { - list( $type, $value ) = explode( ':', $tuple ); + list( $type, $value ) = explode( ':', trim( $tuple ) ); $this->claimTTLMap[$type] = (int)$value; } } if ( isset( $config['attempts'] ) ) { $tuples = explode( ',', $config['attempts'] ); foreach ( $tuples as $tuple ) { - list( $type, $value ) = explode( ':', $tuple ); + list( $type, $value ) = explode( ':', trim( $tuple ) ); $this->attemptsMap[$type] = (int)$value; } } -- To view, visit https://gerrit.wikimedia.org/r/142722 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f2a927b3d860ead1710a057096d1e396354e93a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/jobrunner Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Also annotate metadata in TransactionProcessor - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Also annotate metadata in TransactionProcessor .. Also annotate metadata in TransactionProcessor Annotation transactions weren't taking metadata into account at all. This caused nasty issues when annotating across a mix of data and metadata. Changed applyAnnotations() to apply annotations to metadata as well as data. To be safe and conservative, I only applied this to metadata offsets entirely inside the range, not to the offsets on the edges. This means annotations with comments at the end will still cause problems. We may be able to fix that by making annotations smarter and having them make themselves disappear when only applied to metadata. Alternatively, reunifying data and metadata into a single band will resolve this ambiguity. Also factored out common code into a helper function and cleaned up applyAnnotations() while I was in there, removing unneeded variables in favor of calls to ElementLinearData methods. Bug: 52127 Change-Id: Ie93fe50a46b13c240a6f56a25a989e0c978b663f --- M modules/ve/dm/lineardata/ve.dm.MetaLinearData.js M modules/ve/dm/ve.dm.TransactionProcessor.js M modules/ve/test/dm/ve.dm.TransactionProcessor.test.js 3 files changed, 162 insertions(+), 18 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/dm/lineardata/ve.dm.MetaLinearData.js b/modules/ve/dm/lineardata/ve.dm.MetaLinearData.js index 3d54b6d..c6d2531 100644 --- a/modules/ve/dm/lineardata/ve.dm.MetaLinearData.js +++ b/modules/ve/dm/lineardata/ve.dm.MetaLinearData.js @@ -106,3 +106,50 @@ } return n; }; + +/** + * Get annotations' store indexes covered by an offset and index. + * + * @method + * @param {number} offset Offset to get annotations for + * @param {number} index Index to get annotations for + * @returns {number[]} An array of annotation store indexes the offset is covered by + */ +ve.dm.MetaLinearData.prototype.getAnnotationIndexesFromOffsetAndIndex = function ( offset, index ) { + var item = this.getData( offset, index ); + return item && item.annotations || []; +}; + +/** + * Get annotations covered by an offset. + * + * The returned AnnotationSet is a clone of the one in the data. + * + * @method + * @param {number} offset Offset to get annotations for + * @param {number} index Index to get annotations for + * @returns {ve.dm.AnnotationSet} A set of all annotation objects offset is covered by + */ +ve.dm.MetaLinearData.prototype.getAnnotationsFromOffsetAndIndex = function ( offset, index ) { + return new ve.dm.AnnotationSet( this.getStore(), this.getAnnotationIndexesFromOffsetAndIndex( offset, index ) ); +}; + +/** + * Set annotations of data at a specified offset. + * + * Cleans up data structure if annotation set is empty. + * + * @method + * @param {number} offset Offset to set annotations at + * @param {number} metadataOffset Index to set annotations at + * @param {ve.dm.AnnotationSet} annotations Annotations to set + */ +ve.dm.MetaLinearData.prototype.setAnnotationsAtOffsetAndIndex = function ( offset, index, annotations ) { + var item = this.getData( offset, index ); + if ( annotations.isEmpty() ) { + // Clean up + delete item.annotations; + } else { + item.annotations = this.getStore().indexes( annotations.get() ); + } +}; diff --git a/modules/ve/dm/ve.dm.TransactionProcessor.js b/modules/ve/dm/ve.dm.TransactionProcessor.js index 809ebf3..7f41da4 100644 --- a/modules/ve/dm/ve.dm.TransactionProcessor.js +++ b/modules/ve/dm/ve.dm.TransactionProcessor.js @@ -114,13 +114,25 @@ * @throws {Error} Annotation to be cleared is not set */ ve.dm.TransactionProcessor.prototype.applyAnnotations = function ( to ) { - var item, isElement, annotated, annotations, i, range, selection, - store = this.document.getStore(); + function setAndClear( anns, set, clear ) { + if ( anns.containsAnyOf( set ) ) { + throw new Error( 'Invalid transaction, annotation to be set is already set' ); + } else { + anns.addSet( set ); + } + if ( !anns.containsAllOf( clear ) ) { + throw new Error( 'Invalid transaction, annotation to be cleared is not set' ); + } else { + anns.removeSet( clear ); + } + } + + var isElement, annotations, i, j, jlen, range, selection; if ( this.set.isEmpty() && this.clear.isEmpty() ) { return; } + // Set/clear annotations on data for ( i = this.cursor; i < to; i++ ) { - item = this.document.data.getData( i ); isElement = this.document.data.isElementData( i ); if ( isElement ) {
[MediaWiki-commits] [Gerrit] phutil oauth adapter for mediawiki oauth1 - change (phabricator/libphutil)
Rush has submitted this change and it was merged. Change subject: phutil oauth adapter for mediawiki oauth1 .. phutil oauth adapter for mediawiki oauth1 Summary: This is based on @csteipp's proof of concept implementation and also borrows from the JIRA adapter in libphutil. Test Plan: created a consumer in mediawiki and approved the registration. Then added the provider in phabricator and provided the keys from mediawiki. Proceeded to link my phabricator account to a mediawiki login. Reviewers: qgil, epriestley, csteipp, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9202 Change-Id: I7c996145b8ce2f0453b52f9fd1fbc08e5f2b7408 --- M src/__phutil_library_map__.php A src/auth/PhutilAuthAdapterOAuthMediaWiki.php 2 files changed, 174 insertions(+), 0 deletions(-) Approvals: CSteipp: Looks good to me, but someone else must approve Rush: Verified; Looks good to me, approved diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 492e003..07a4512 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -104,6 +104,7 @@ 'PhutilAuthAdapterOAuthGitHub' => 'auth/PhutilAuthAdapterOAuthGitHub.php', 'PhutilAuthAdapterOAuthGoogle' => 'auth/PhutilAuthAdapterOAuthGoogle.php', 'PhutilAuthAdapterOAuthJIRA' => 'auth/PhutilAuthAdapterOAuthJIRA.php', +'PhutilAuthAdapterOAuthMediaWiki' => 'auth/PhutilAuthAdapterOAuthMediaWiki.php', 'PhutilAuthAdapterOAuthTwitch' => 'auth/PhutilAuthAdapterOAuthTwitch.php', 'PhutilAuthAdapterOAuthTwitter' => 'auth/PhutilAuthAdapterOAuthTwitter.php', 'PhutilAuthAdapterOAuthWordPress' => 'auth/PhutilAuthAdapterOAuthWordPress.php', @@ -533,6 +534,7 @@ 'PhutilAuthAdapterOAuthGitHub' => 'PhutilAuthAdapterOAuth', 'PhutilAuthAdapterOAuthGoogle' => 'PhutilAuthAdapterOAuth', 'PhutilAuthAdapterOAuthJIRA' => 'PhutilAuthAdapterOAuth1', +'PhutilAuthAdapterOAuthMediaWiki' => 'PhutilAuthAdapterOAuth1', 'PhutilAuthAdapterOAuthTwitch' => 'PhutilAuthAdapterOAuth', 'PhutilAuthAdapterOAuthTwitter' => 'PhutilAuthAdapterOAuth1', 'PhutilAuthAdapterOAuthWordPress' => 'PhutilAuthAdapterOAuth', diff --git a/src/auth/PhutilAuthAdapterOAuthMediaWiki.php b/src/auth/PhutilAuthAdapterOAuthMediaWiki.php new file mode 100644 index 000..bcfb744 --- /dev/null +++ b/src/auth/PhutilAuthAdapterOAuthMediaWiki.php @@ -0,0 +1,172 @@ +https://www.mediawiki.org'; + + public function getAccountID() { +$this->getHandshakeData(); +return idx($this->getUserInfo(), 'userid'); + } + + public function getAccountName() { +return idx($this->getUserInfo(), 'username'); + } + + public function getAccountURI() { +$name = $this->getAccountName(); +if (strlen($name)) { + return $this->mediaWikiBaseURI.'/wiki/User:'.$name; +} +return null; + } + + public function getAccountImageURI() { +$info = $this->getUserInfo(); +return idx($info, 'profile_image_url'); + } + + public function getAccountRealName() { +$info = $this->getUserInfo(); +return idx($info, 'name'); + } + + public function getAdapterType() { +return 'mediawiki'; + } + + public function getAdapterDomain() { +return $this->domain; + } + + /* mediawiki oauth needs the callback uri to be "oob" + (out of band callback) */ + public function getCallbackURI() { +return 'oob'; + } + + protected function getRequestTokenURI() { +return $this->mediaWikiBaseURI.'/w/index.php?title=Special:OAuth/initiate'; + } + + protected function getAuthorizeTokenURI() { +return $this->mediaWikiBaseURI.'/wiki/Special:OAuth/authorize'; + } + + public function setAdapterDomain($domain) { +$this->domain = $domain; +return $this; + } + + public function setMediaWikiBaseURI($uri) { +$this->mediaWikiBaseURI = $uri; +return $this; + } + + public function getClientRedirectURI() { +$p = parent::getClientRedirectURI(); +$token = $this->getToken(); +$token_secret = $this->getTokenSecret(); + +// MediaWiki requires the call to /authorize be signed with the temp +// secret. This also forces the connected app to prevent CSRF. +setcookie('mwoauth', "$token:$token_secret"); +return $p."&oauth_consumer_key={$this->getConsumerKey()}"; + } + + protected function getValidateTokenURI() { +return $this->mediaWikiBaseURI.'/w/index.php?title=Special:OAuth/token'; + } + + private function getUserInfo() { +if ($this->userinfo === null) { + $uri = new PhutilURI($this->mediaWikiBaseURI. + '/w/index.php?title=Special:OAuth/identify&format=json'); + // We gen this so we can check for replay below: + $nonce = Filesystem::readRandomCharacters(32); + list($body) = $this->newOAuth1Future($uri) +->setMethod('GET') +->setNonce($nonce) +->resolve
[MediaWiki-commits] [Gerrit] Initial proof of concept implementation of MediaWiki OAuth p... - change (phabricator/phabricator)
Rush has submitted this change and it was merged. Change subject: Initial proof of concept implementation of MediaWiki OAuth provider .. Initial proof of concept implementation of MediaWiki OAuth provider This is now configurable to work with a user-specified mediawiki url. Borrowed some code from the JIRA provider to implement stored provider configuration. This depends on the libphutil change I7c996145b8ce2f0453b52f9fd1fbc08e5f2b7408. Summary: The second part of T5096, see also D9202 for the libphutil oauth adaptor Test Plan: enable mediawiki oauth, attempt to log in via mediawiki labs account Reviewers: #blessed_reviewers, epriestley, csteipp Subscribers: bd808, csteipp, greggrossmeier, epriestley, Korvin Maniphest Tasks: T5096 Differential Revision: https://secure.phabricator.com/D9203 Change-Id: Ia87baa1440c3b3d3a772660c6849547bf68a5c2a --- M resources/celerity/map.php M src/__phutil_library_map__.php M src/applications/auth/provider/PhabricatorAuthProvider.php A src/applications/auth/provider/PhabricatorAuthProviderOAuth1MediaWiki.php M webroot/rsrc/css/sprite-login.css M webroot/rsrc/image/sprite-login-X2.png M webroot/rsrc/image/sprite-login.png 7 files changed, 285 insertions(+), 13 deletions(-) Approvals: CSteipp: Looks good to me, but someone else must approve Rush: Verified; Looks good to me, approved diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 3753b03..7b8c8ec 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -150,7 +150,7 @@ 'rsrc/css/sprite-conpherence.css' => '3b4a0487', 'rsrc/css/sprite-docs.css' => '5f65d0da', 'rsrc/css/sprite-gradient.css' => '4aec2401', -'rsrc/css/sprite-login.css' => '67ff30b2', +'rsrc/css/sprite-login.css' => '7779bf1c', 'rsrc/css/sprite-main-header.css' => '92720ee2', 'rsrc/css/sprite-menu.css' => '28281e16', 'rsrc/css/sprite-minicons.css' => 'df4f76fe', @@ -312,8 +312,8 @@ 'rsrc/image/sprite-docs-X2.png' => '6dc1adad', 'rsrc/image/sprite-docs.png' => '4636297f', 'rsrc/image/sprite-gradient.png' => '7c71fb29', -'rsrc/image/sprite-login-X2.png' => '5f75d60b', -'rsrc/image/sprite-login.png' => 'efe40ddb', +'rsrc/image/sprite-login-X2.png' => '90e6409f', +'rsrc/image/sprite-login.png' => '09256f7d', 'rsrc/image/sprite-main-header.png' => '83521873', 'rsrc/image/sprite-menu-X2.png' => '39d78f97', 'rsrc/image/sprite-menu.png' => '259dab45', @@ -798,7 +798,7 @@ 'sprite-conpherence-css' => '3b4a0487', 'sprite-docs-css' => '5f65d0da', 'sprite-gradient-css' => '4aec2401', -'sprite-login-css' => '67ff30b2', +'sprite-login-css' => '7779bf1c', 'sprite-main-header-css' => '92720ee2', 'sprite-menu-css' => '28281e16', 'sprite-minicons-css' => 'df4f76fe', @@ -1254,11 +1254,6 @@ 2 => 'javelin-util', 3 => 'phabricator-shaped-request', ), -'7319e029' => -array( - 0 => 'javelin-behavior', - 1 => 'javelin-dom', -), '62e18640' => array( 0 => 'javelin-install', @@ -1331,6 +1326,11 @@ 1 => 'javelin-stratcom', 2 => 'javelin-dom', ), +'7319e029' => +array( + 0 => 'javelin-behavior', + 1 => 'javelin-dom', +), '76f4ebed' => array( 0 => 'javelin-install', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 77cd6aa..4c67760 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1273,6 +1273,7 @@ 'PhabricatorAuthProviderOAuth' => 'applications/auth/provider/PhabricatorAuthProviderOAuth.php', 'PhabricatorAuthProviderOAuth1' => 'applications/auth/provider/PhabricatorAuthProviderOAuth1.php', 'PhabricatorAuthProviderOAuth1JIRA' => 'applications/auth/provider/PhabricatorAuthProviderOAuth1JIRA.php', +'PhabricatorAuthProviderOAuth1MediaWiki' => 'applications/auth/provider/PhabricatorAuthProviderOAuth1MediaWiki.php', 'PhabricatorAuthProviderOAuth1Twitter' => 'applications/auth/provider/PhabricatorAuthProviderOAuth1Twitter.php', 'PhabricatorAuthProviderOAuth2' => 'applications/auth/provider/PhabricatorAuthProviderOAuth2.php', 'PhabricatorAuthProviderOAuthAmazon' => 'applications/auth/provider/PhabricatorAuthProviderOAuthAmazon.php', @@ -4060,6 +4061,7 @@ 'PhabricatorAuthProviderOAuth' => 'PhabricatorAuthProvider', 'PhabricatorAuthProviderOAuth1' => 'PhabricatorAuthProviderOAuth', 'PhabricatorAuthProviderOAuth1JIRA' => 'PhabricatorAuthProviderOAuth1', +'PhabricatorAuthProviderOAuth1MediaWiki' => 'PhabricatorAuthProviderOAuth1', 'PhabricatorAuthProviderOAuth1Twitter' => 'PhabricatorAuthProviderOAuth1', 'PhabricatorAuthProviderOAuth2' => 'PhabricatorAuthProviderOAuth', 'PhabricatorAuthProviderOAuthAmazon' => 'PhabricatorAuthProviderOAuth2', diff --git a/src/applications/auth/provider/Phabricator
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: cc0bf26..4be59a0 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/142728 Change subject: Syncronize VisualEditor: cc0bf26..4be59a0 .. Syncronize VisualEditor: cc0bf26..4be59a0 Change-Id: I6fb9565b33d2b9f645c9fe4beb94736594844836 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/28/142728/1 diff --git a/VisualEditor b/VisualEditor index cc0bf26..4be59a0 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit cc0bf2628413264e6f478cfc4878b4ff754205e3 +Subproject commit 4be59a00c12580e24e2de673c14e082bf714ee9c -- To view, visit https://gerrit.wikimedia.org/r/142728 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6fb9565b33d2b9f645c9fe4beb94736594844836 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: cc0bf26..4be59a0 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: cc0bf26..4be59a0 .. Syncronize VisualEditor: cc0bf26..4be59a0 Change-Id: I6fb9565b33d2b9f645c9fe4beb94736594844836 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index cc0bf26..4be59a0 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit cc0bf2628413264e6f478cfc4878b4ff754205e3 +Subproject commit 4be59a00c12580e24e2de673c14e082bf714ee9c -- To view, visit https://gerrit.wikimedia.org/r/142728 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6fb9565b33d2b9f645c9fe4beb94736594844836 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VE core submodule to master (a014302) - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Update VE core submodule to master (a014302) .. Update VE core submodule to master (a014302) New changes: 5f2dd5c Update OOjs to v1.0.10 49fae55 Always refocus the paste target when a node is selected Change-Id: I7647ee189ce5df1e748f660bb2f43c160d7729f9 --- M lib/ve 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/ve b/lib/ve index aaa8547..a014302 16 --- a/lib/ve +++ b/lib/ve -Subproject commit aaa8547394aad145a8d4abbe50e7d54b29b1710d +Subproject commit a014302f441dda5c4805d378f4ccb67bc1d5e566 -- To view, visit https://gerrit.wikimedia.org/r/142727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7647ee189ce5df1e748f660bb2f43c160d7729f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...FanBoxes)
Jack Phoenix has submitted this change and it was merged. Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: I1703e2cc452a87b1ea821fb709a5293eebeb674d --- M FanBoxPage.php M SpecialFanBoxes.php M SpecialTopFanBoxes.php M SpecialViewFanBoxes.php M UserBoxesHook.php 5 files changed, 13 insertions(+), 13 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/FanBoxPage.php b/FanBoxPage.php index 6d7de94..4023d98 100644 --- a/FanBoxPage.php +++ b/FanBoxPage.php @@ -141,7 +141,7 @@ $userftuserid = $fanboxHolder['userft_user_id']; $userTitle = Title::makeTitle( NS_USER, $fanboxHolder['userft_user_name'] ); $avatar = new wAvatar( $fanboxHolder['userft_user_id'], 'ml' ); - $output .= "escapeFullURL() . "\"> + $output .= "getFullURL() ) . "\"> {$avatar->getAvatarURL()} "; } diff --git a/SpecialFanBoxes.php b/SpecialFanBoxes.php index 058986b..baf7f7e 100644 --- a/SpecialFanBoxes.php +++ b/SpecialFanBoxes.php @@ -191,7 +191,7 @@ escapeFullURL() . '"> + htmlspecialchars( SpecialPage::getTitleFor( 'FanBoxAjaxUpload' )->getFullURL() ) . '"> '; @@ -299,7 +299,7 @@ + scrolling="no" frameborder="0" src="' . htmlspecialchars( SpecialPage::getTitleFor( 'FanBoxAjaxUpload' )->getFullURL() ) . '"> '; diff --git a/SpecialTopFanBoxes.php b/SpecialTopFanBoxes.php index fd57041..9afde88 100644 --- a/SpecialTopFanBoxes.php +++ b/SpecialTopFanBoxes.php @@ -53,9 +53,9 @@ // Make top right navigation bar $output .= ' ' . $this->msg( 'fanbox-nav-header' )->plain() . " - getPageTitle()->escapeFullURL()}\">" . + getPageTitle()->getFullURL() )}\">" . $this->msg( 'top-fanboxes-link' )->plain() . ' - ' . + ' . $this->msg( 'most-recent-fanboxes-link' )->plain() . ' '; @@ -139,7 +139,7 @@ - escapeFullURL() . "\" title=\"{$topfanbox['fantag_title']}\">" . $this->msg( 'fanbox-perma' )->plain() . " + getFullURL() ) . "\" title=\"{$topfanbox['fantag_title']}\">" . $this->msg( 'fanbox-perma' )->plain() . " " . $fantag_leftside . " @@ -210,7 +210,7 @@ - ' . + ' . $this->msg( 'fanbox-members' )->numParams( @@ -294,7 +294,7 @@ - escapeFullURL() . "\" title=\"{$categoryfanbox['fantag_title']}\">" . $this->msg( 'fanbox-perma' )->plain() . " + getFullURL() ) . "\" title=\"{$categoryfanbox['fantag_title']}\">" . $this->msg( 'fanbox-perma' )->plain() . " " . $fantag_leftside . " @@ -365,7 +365,7 @@ ' . $this->msg( 'fanbox-created-by' )->parse() . ' - + {$avatar->getA
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...LinkFilter)
Jack Phoenix has submitted this change and it was merged. Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: I430049c2b48b20542a623fecc88d7f5f3ee05f14 --- M LinkClass.php M LinkFilterHooks.php M LinkPage.php M SpecialLinksHome.php 4 files changed, 17 insertions(+), 17 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/LinkClass.php b/LinkClass.php index 0087952..260a06d 100644 --- a/LinkClass.php +++ b/LinkClass.php @@ -27,17 +27,17 @@ public static function getSubmitLinkURL() { $title = SpecialPage::getTitleFor( 'LinkSubmit' ); - return $title->escapeFullURL(); + return htmlspecialchars( $title->getFullURL() ); } public static function getLinkAdminURL() { $title = SpecialPage::getTitleFor( 'LinkApprove' ); - return $title->escapeFullURL(); + return htmlspecialchars( $title->getFullURL() ); } public static function getHomeLinkURL() { $title = SpecialPage::getTitleFor( 'LinksHome' ); - return $title->escapeFullURL(); + return htmlspecialchars( $title->getFullURL() ); } /** @@ -344,7 +344,7 @@ 'type_name' => Link::getLinkType( $row->link_type ), 'user_id' => $row->link_submitter_user_id, 'user_name' => $row->link_submitter_user_name, - 'wiki_page' => ( ( $linkPage ) ? $linkPage->escapeFullURL() : null ), + 'wiki_page' => ( ( $linkPage ) ? htmlspecialchars( $linkPage->getFullURL() ) : null ), 'comments' => ( ( $row->link_comment_count ) ? $row->link_comment_count : 0 ) ); } diff --git a/LinkFilterHooks.php b/LinkFilterHooks.php index 2332e2c..01c0f37 100644 --- a/LinkFilterHooks.php +++ b/LinkFilterHooks.php @@ -144,9 +144,9 @@ $output = ' - ' . + ' . wfMessage( 'linkfilter-submit' )->plain() . - ' / ' . + ' / ' . wfMessage( 'linkfilter-all' )->plain() . ''; // Show a link to the link administration panel for privileged users diff --git a/LinkPage.php b/LinkPage.php index 65afc66..7e01556 100644 --- a/LinkPage.php +++ b/LinkPage.php @@ -114,10 +114,10 @@ true ); $linkRedirect = SpecialPage::getTitleFor( 'LinkRedirect' ); - $url = $linkRedirect->escapeFullURL( array( + $url = htmlspecialchars( $linkRedirect->getFullURL( array( 'link' => 'true', 'url' => $this->link['url'] - ) ); + ) ) ); $output = ' ' @@ -200,11 +200,11 @@ $output = '' . wfMessage( 'linkfilter-about-submitter' )->text() . ''; $output .= " - escapeFullURL() . "\" rel=\"nofollow\"> + getFullURL() ) . "\" rel=\"nofollow\"> {$avatar->getAvatarURL()} - escapeFullURL() . "\" rel=\"nofollow\">{$authorUserName} + getFullURL() ) . "\" rel=\"nofollow\">{$authorUserName} "; if ( $profileData['about'] ) { $output .= $wgOut->parse( $profileData['about'], false ); @@ -297,7 +297,7 @@ foreach ( $links as $link ) { $output .= ' - {$link['title']} "; } @@ -412,7 +412,7 @@ } $output .= ''; $output .= '' . $comment['plus_count'] . ' '; - $output .= " escapeFullURL()}#comment-{$comment['comment_id']}\" title=\"{$pageTitle->getText()}\" >{$commentText}"; + $output .= " getFullURL() )}#comment-{$comment['comment_id']}\" title=\"{$pageTitle->getText()}\" >{$commentText}"; $output .= ''; } diff --git a/SpecialLinksHome.php b/SpecialLinksHome.php index a082084..1b87e66 100644 --- a/SpecialLinksHome.php +++ b/SpecialLinksHome.php @@ -79,7 +79,7 @@ foreach ( $popular
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...BlogPage)
Jack Phoenix has submitted this change and it was merged. Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: Ib3067e135554d7e626435e7b1909e27c7de982b8 --- M BlogHooks.php M BlogPage.php M SpecialArticleLists.php M SpecialArticlesHome.php M SpecialCreateBlogPost.php 5 files changed, 25 insertions(+), 25 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/BlogHooks.php b/BlogHooks.php index 540389f..9b056d6 100644 --- a/BlogHooks.php +++ b/BlogHooks.php @@ -270,7 +270,7 @@ '; if( $articleCount > 5 ) { - $output .= 'getFullURL() ) . '" rel="nofollow">' . wfMsg( 'user-view-all' ) . ''; } $output .= ' @@ -313,7 +313,7 @@ ' - getFullURL() ) . "\">{$articleTitle->getText()} " . wfMsgExt( diff --git a/BlogPage.php b/BlogPage.php index b9bfe58..13ca2a2 100644 --- a/BlogPage.php +++ b/BlogPage.php @@ -228,7 +228,7 @@ $authors .= wfMsg( 'word-separator' ) . wfMsg( 'blog-and' ) . wfMsg( 'word-separator' ); } - $authors .= "escapeFullURL()}\">{$author['user_name']}"; + $authors .= "getFullURL() )}\">{$author['user_name']}"; } $output .= $authors; @@ -259,7 +259,7 @@ $authors .= wfMsg( 'word-separator' ) . wfMsg( 'blog-and' ) . wfMsg( 'word-separator' ); } - $authors .= "escapeFullURL()}\">{$author['user_name']}"; + $authors .= "getFullURL() )}\">{$author['user_name']}"; } $output = '' . @@ -310,11 +310,11 @@ } $output = "\t\t\t\t\t - escapeFullURL() . "\" rel=\"nofollow\"> + getFullURL() ) . "\" rel=\"nofollow\"> {$avatar->getAvatarURL()} - escapeFullURL() . + getFullURL() ) . '" rel="nofollow">' . wordwrap( $author_user_name, 12, "\n", true ) . ' @@ -418,7 +418,7 @@ $articleTitle = Title::makeTitle( NS_BLOG, $article['page_title'] ); $output .= ' - {$articleTitle->getText()} + {$articleTitle->getText()} " . wfMsgExt( 'blog-author-votes', @@ -437,7 +437,7 @@ } $output .= ' - ' . + ' . wfMsg( 'blog-view-archive-link' ) . ' @@ -528,7 +528,7 @@ $avatar = new wAvatar( $editor['user_id'], 'm' ); $userTitle = Title::makeTitle( NS_USER, $editor['user_name'] ); - $output .= 'getFullURL() ) . "\">getAvatarImage()}\" alt=\"" . $userTitle->getText() . '" border="0" />'; } @@ -620,7 +620,7 @@ $userTitle = Title::makeTitle( NS_USER, $voter['user_name'] ); $avatar = new wAvatar( $voter['user_id'], 'm' ); - $output .= 'getFullURL() ) . "\">{$avatar->getAvatarURL()}"; } @@ -783,7 +783,7 @@
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeLocalURL/escapeFullURL calls - change (mediawiki...Nimbus)
Jack Phoenix has submitted this change and it was merged. Change subject: Replace deprecated Title::escapeLocalURL/escapeFullURL calls .. Replace deprecated Title::escapeLocalURL/escapeFullURL calls Change-Id: Ib2404e266b7fc68c51b3eee4a2f5830d015bcab0 --- M Nimbus.skin.php 1 file changed, 14 insertions(+), 14 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/Nimbus.skin.php b/Nimbus.skin.php index cefeb06..d93d00c 100644 --- a/Nimbus.skin.php +++ b/Nimbus.skin.php @@ -153,18 +153,18 @@ echo "\t\t\t" . '' . wfMessage( 'nimbus-welcome', '' . $user->getName() . '' )->parse() . ' - ' . wfMessage( 'nimbus-profile' )->plain() . ' - ' . wfMessage( 'nimbus-logout' )->plain() . ''; + ' . wfMessage( 'nimbus-profile' )->plain() . ' + ' . wfMessage( 'nimbus-logout' )->plain() . ''; } else { - echo '' . wfMessage( 'nimbus-signup' )->plain() . ' - ' . wfMessage( 'nimbus-login' )->plain() . ''; + echo '' . wfMessage( 'nimbus-signup' )->plain() . ' + ' . wfMessage( 'nimbus-login' )->plain() . ''; } ?> - + @@ -187,7 +187,7 @@ escapeFullURL() . '">' . wfMessage( 'topusers' )->plain() . ''; + echo '' . wfMessage( 'topusers' )->plain() . ''; } echo Linker::link( @@ -220,8 +220,8 @@ '' . "\n"; } ?> - plain() ?> - plain() ?> + plain() ?> + plain() ?> @@ -1019,7 +1019,7 @@ $avatar = new wAvatar( $editor['user_id'], 'm' ); $user_title = Title::makeTitle( NS_USER, $editor['user_name'] ); - $footer .= ''; + $footer .= ''; $footer .= $avatar->getAvatarURL( array( 'alt' => htmlspecialchars( $editor['user_name'] ), 'title' => htmlspecialchars( $editor['user_name'] ) @@ -1041,11 +1041,11 @@ } $footer .= ' - ' . wfMessage( 'mainpage' )->plain() . ' - ' . wfMessage( 'about' )->parse() . ' - ' . wfMessage( 'specialpages' )->plain() . ' - ' . wfMessage( 'help' )->plain() . ' - ' . wfMessage( 'disclaimers' )->plain() . ''; + ' . wfMessage( 'mainpage' )->plain() . ' + ' . wfMessage( 'about' )->parse() . ' + ' . wfMessage( 'specialpages' )->plain() . ' + ' . wfMessage( 'help' )->plain() . ' + ' . wfMessage( 'disclaimers' )->plain() . ''; // "Advertise" link on the footer, but only if a URL has been specified // in the MediaWiki:Nimbus-advertise-url system message -- To view, visit https://gerrit.wikimedia.org/r/142559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib2404e266b7fc68c51b3eee4a2f5830d015bcab0 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/Nimbus Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated Title::escapeFullURL calls - change (mediawiki...SportsTeams)
Jack Phoenix has submitted this change and it was merged. Change subject: Replace deprecated Title::escapeFullURL calls .. Replace deprecated Title::escapeFullURL calls Change-Id: Ic67f85bd6d368e7d6d6038a354c1e7a32dfc --- M SpecialAddFan.php M SpecialFanHome.php M SpecialRemoveFan.php M SpecialSportsManagerLogo.php M SpecialSportsTeamsManager.php M SpecialSportsTeamsManagerLogo.php M SpecialTopNetworks.php M SpecialUpdateFavoriteTeams.php M SpecialViewFans.php M SportsTeamsClass.php M SportsTeamsUserProfile.php 11 files changed, 51 insertions(+), 51 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/SpecialAddFan.php b/SpecialAddFan.php index 5cdef7a..f57aa67 100644 --- a/SpecialAddFan.php +++ b/SpecialAddFan.php @@ -45,12 +45,12 @@ $output .= 'escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::newMainPage()->getFullURL() ) . "'\"/>"; if ( $user->isLoggedIn() ) { $output .= ' getName() )->escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::makeTitle( NS_USER, $user->getName() )->getFullURL() ) . "'\"/>"; } $output .= ''; $out->addHTML( $output ); @@ -104,12 +104,12 @@ $output .= "msg( 'sportsteams-network-main-page' )->text() . "\" onclick=\"window.location='" . - Title::newMainPage()->escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::newMainPage()->getFullURL() ) . "'\"/>"; if ( $user->isLoggedIn() ) { $output .= ' getName() )->escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::makeTitle( NS_USER, $user->getName() )->getFullURL() ) . "'\"/>"; } $output .= ''; $out->addHTML( $output ); diff --git a/SpecialFanHome.php b/SpecialFanHome.php index 82cd173..dc4d05b 100644 --- a/SpecialFanHome.php +++ b/SpecialFanHome.php @@ -58,12 +58,12 @@ $output .= 'escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::newMainPage()->getFullURL() ) . "'\"/>"; if ( $user->isLoggedIn() ) { $output .= ' getName() )->escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::makeTitle( NS_USER, $user->getName() )->getFullURL() ) . "'\"/>"; } $output .= ''; $out->addHTML( $output ); @@ -235,7 +235,7 @@ $tfr = SpecialPage::getTitleFor( 'TopUsersRecent' ); /* $output .= " - escapeFullURL( 'period=weekly' ) . '">' . + getFullURL( 'period=weekly' ) ). '">' . $this->msg( 'sportsteams-network-top-fans-week' )->text() . " - getFullURL( array( 'sport_id' => $sport_id, 'team_id' => $team_id ))}\">" . @@ -579,7 +579,7 @@ )->parse() . ' - ' . + ' . $titleObj->getText() . ' diff --git a/SpecialRemoveFan.php b/SpecialRemoveFan.php index f15ca5c..ef13953 100644 --- a/SpecialRemoveFan.php +++ b/SpecialRemoveFan.php @@ -44,12 +44,12 @@ $output .= ''; $output .= 'escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::newMainPage()->getFullURL() ) . "'\"/>"; if ( $user->isLoggedIn() ) { $output .= ' getName() )->escapeFullURL() . "'\"/>"; + htmlspecialchars( Title::makeTitle( NS_USER, $user->getName() )->getFullURL() ) . "'\"/>"; } $output .= ''; $out->addHTML( $output ); @@ -83,11 +83,11 @@ escapeFullURL() . "'\"/> + htmlspecialchars( Title::newMainPage()->getFullURL() ) . "'\"/> msg( 'sportsteams-network-your-profile' )->text() . "\" onclick=\"window.location='" . - Title::makeTitle( NS_USER, $user->getName() )->escapeFullURL() .
[MediaWiki-commits] [Gerrit] build: Clean up npmignore - change (oojs/core)
jenkins-bot has submitted this change and it was merged. Change subject: build: Clean up npmignore .. build: Clean up npmignore * npm specific stuff like node_modules and npm-debug.log don't need to be listed. They are ignored by default: https://www.npmjs.org/doc/misc/npm-developers.html * Add dist/.jshintrc to npmignore so that it won't be published in the tarball and cleanly copy dist/ from the npm repository. * Remove redundant gitignore file in dist/. This existed to ensure the directory was maintained by Git (Git doesn't support empty directories, it would've simply not been committed). However there is a jshint file there now. Change-Id: I9651a1f9641253bd176481ef0515f87385758342 --- M .gitignore M .npmignore D dist/.gitignore 3 files changed, 3 insertions(+), 4 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 80dedeb..a06d721 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ /dist/* -docs/ +/docs node_modules npm-debug.log diff --git a/.npmignore b/.npmignore index f154f46..323481d 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,2 @@ -docs/ -node_modules -npm-debug.log +dist/.* +docs diff --git a/dist/.gitignore b/dist/.gitignore deleted file mode 100644 index e69de29..000 --- a/dist/.gitignore +++ /dev/null -- To view, visit https://gerrit.wikimedia.org/r/142466 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9651a1f9641253bd176481ef0515f87385758342 Gerrit-PatchSet: 2 Gerrit-Project: oojs/core Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VE core submodule to master (a014302) - change (mediawiki...VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/142727 Change subject: Update VE core submodule to master (a014302) .. Update VE core submodule to master (a014302) New changes: 5f2dd5c Update OOjs to v1.0.10 49fae55 Always refocus the paste target when a node is selected Change-Id: I7647ee189ce5df1e748f660bb2f43c160d7729f9 --- M lib/ve 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/27/142727/1 diff --git a/lib/ve b/lib/ve index aaa8547..a014302 16 --- a/lib/ve +++ b/lib/ve -Subproject commit aaa8547394aad145a8d4abbe50e7d54b29b1710d +Subproject commit a014302f441dda5c4805d378f4ccb67bc1d5e566 -- To view, visit https://gerrit.wikimedia.org/r/142727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7647ee189ce5df1e748f660bb2f43c160d7729f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits