[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...Wikilog)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106197 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I78e0668b22f2ce7f772be08c87b7ff11a4c2bc7b --- M WikilogComment.php M WikilogCommentsPage.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikilog refs/changes/97/106197/1 diff --git a/WikilogComment.php b/WikilogComment.php index 1aaced0..3772741 100644 --- a/WikilogComment.php +++ b/WikilogComment.php @@ -869,7 +869,7 @@ ); } if ( $this-mAllowModeration $comment-mStatus == WikilogComment::S_PENDING ) { - $token = $wgUser-editToken(); + $token = $wgUser-getEditToken(); $tools['approve'] = $this-mSkin-link( $comment-mCommentTitle, wfMsg( 'wikilog-approve-lc' ), array( 'title' = wfMsg( 'wikilog-comment-approve' ) ), diff --git a/WikilogCommentsPage.php b/WikilogCommentsPage.php index 39988d5..0028fa0 100644 --- a/WikilogCommentsPage.php +++ b/WikilogCommentsPage.php @@ -315,7 +315,7 @@ $form = Html::hidden( 'title', $this-getTitle()-getPrefixedText() ) . Html::hidden( 'action', 'wikilog' ) . - Html::hidden( 'wpEditToken', $wgUser-editToken() ) . + Html::hidden( 'wpEditToken', $wgUser-getEditToken() ) . ( $parent ? Html::hidden( 'wlParent', $parent-mID ) : '' ); $fields = array(); -- To view, visit https://gerrit.wikimedia.org/r/106197 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78e0668b22f2ce7f772be08c87b7ff11a4c2bc7b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikilog Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...Video)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106198 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I67c68fc20efc1c73683920b4eb315161e0fb59bc --- M VideoPage.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Video refs/changes/98/106198/1 diff --git a/VideoPage.php b/VideoPage.php index 8fd31b7..2871411 100644 --- a/VideoPage.php +++ b/VideoPage.php @@ -48,7 +48,7 @@ $out-addHTML( $this-video-getEmbedCode() ); // Force embed this code to have width of 300 - $this-video-setWidth( 300 ); + $this-video-setWidth( 300 ); $out-addHTML( $this-getEmbedThisTag() ); $this-videoHistory(); @@ -221,7 +221,7 @@ global $wgUser, $wgOut; $sk = $wgUser-getSkin(); - + $wgOut-addHTML( 'br /ul' ); // Upload a new version of this video link @@ -273,7 +273,7 @@ $rlink = $cur; } else { if( $wgUser-getID() != 0 $wgTitle-userCan( 'edit' ) ) { - $token = urlencode( $wgUser-editToken( $video ) ); + $token = urlencode( $wgUser-getEditToken( $video ) ); $rlink = $this-skin-makeKnownLinkObj( $wgTitle, wfMsgHtml( 'video-revert' ), @@ -289,7 +289,7 @@ $userlink = $this-skin-userLink( $user_id, $user_name ) . $this-skin-userToolLinks( $user_id, $user_name ); - + $style = $this-skin-getInternalLinkAttributes( $url, $datetime ); $s = li({$rlink}) a href=\{$url}\{$style}{$datetime}/a . . ({$type}) . . {$userlink}; -- To view, visit https://gerrit.wikimedia.org/r/106198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67c68fc20efc1c73683920b4eb315161e0fb59bc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Video Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...RDFIO)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106199 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: Ic4fa2e491277552bfa5980f83a9b733ef14e6687 --- M specials/SpecialSPARQLEndpoint_body.php 1 file changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RDFIO refs/changes/99/106199/1 diff --git a/specials/SpecialSPARQLEndpoint_body.php b/specials/SpecialSPARQLEndpoint_body.php index 02421f7..a55d37a 100644 --- a/specials/SpecialSPARQLEndpoint_body.php +++ b/specials/SpecialSPARQLEndpoint_body.php @@ -8,7 +8,7 @@ protected $user; -// TODO: Really keep the below ones as class variables? +// TODO: Really keep the below ones as class variables? function __construct() { parent::__construct( 'SPARQLEndpoint' ); @@ -89,27 +89,27 @@ /** * Execute method for SPARQL queries that only queries and returns results, but * does not modify, add or delete triples. - */ + */ function executeNonEditSparqlQuery() { -global $wgOut; +global $wgOut; $output = $this-passSparqlToARC2AndGetAsPhpSerialization(); $outputtype = $this-determineOutputType(); if ( $outputtype == 'rdfxml' ) { -# Here the results should be RDF/XML triples, +# Here the results should be RDF/XML triples, # not just plain XML SPARQL result set $output_structure = unserialize( $output ); $tripleindex = $output_structure['result']; $triples = ARC2::getTriplesFromIndex( $tripleindex ); - + if ( $this-requestdata-outputequivuris ) { // FIXME: Why is this uncommented??? # $triples = $this-complementTriplesWithEquivURIsForProperties( $triples ); $triples = $this-complementTriplesWithEquivURIs( $triples ); } $output = $this-triplesToRDFXML( $triples ); -# Using echo instead of $wgOut-addHTML() here, since output format is not HTML +# Using echo instead of $wgOut-addHTML() here, since output format is not HTML echo $output; } else { // TODO: Add some kind of check that the output is really an object @@ -123,7 +123,7 @@ $output = $this-sparqlResultToHTML( $output_structure ); $wgOut-addHTML( $output ); } else { -# Using echo instead of $wgOut-addHTML() here, since output format is not HTML +# Using echo instead of $wgOut-addHTML() here, since output format is not HTML $output = $this-sparqlendpoint-getSPARQLXMLSelectResultDoc( $output_structure ); echo $output; } @@ -139,7 +139,7 @@ } function passSparqlToARC2AndGetAsPhpSerialization() { -# Make sure ARC2 returns a PHP serialization, so that we +# Make sure ARC2 returns a PHP serialization, so that we # can do stuff with it programmatically $this-setOutputTypeInPost( 'php_ser' ); $this-sparqlendpoint-handleRequest(); @@ -295,7 +295,7 @@ } /** - * Detect whether the edit token is not correct, even though remote editing is not permitted + * Detect whether the edit token is not correct, even though remote editing is not permitted * (in which case this check will not be done). */ function wrongEditTokenDetected() { @@ -303,7 +303,7 @@ if ( $rdfiogAllowRemoteEdit == '' ) { $rdfiogAllowRemoteEdit = false; } -return ( ! $rdfiogAllowRemoteEdit +return ( ! $rdfiogAllowRemoteEdit ! $this-user-editTokenIsCorrect( $wgRequest-getText( 'token' ) ) ); } @@ -375,7 +375,7 @@ $html .= tr; foreach ( $variables as $variable ) { -$html .= th width='34%''$variable/th; +$html .= th width='34%''$variable/th; } $html .= /tr; @@ -400,7 +400,7 @@ function importTriplesInQuery() { if ( $this-checkAllowInsert() ) { $triples = $this-requestdata-query_parsed['query']['construct_triples']; - + $rdfImporter = new RDFIORDFImporter(); $rdfImporter-importTriples( $triples ); } @@ -499,8 +499,8 @@ } /** - * Replace URI:s with an accompanying Equivalent URI with that one. If - * there are móre than one Equivalent URI for a given URI, the others than + * Replace URI:s with an accompanying Equivalent URI with that one. If + * there are móre than one Equivalent URI for a given URI, the others than *
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...BlogPage)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106200 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I60142d3779f86d3f31cb75f5b5a027033a09d04d --- M SpecialCreateBlogPost.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage refs/changes/00/106200/1 diff --git a/SpecialCreateBlogPost.php b/SpecialCreateBlogPost.php index 50f60d1..ad561b2 100644 --- a/SpecialCreateBlogPost.php +++ b/SpecialCreateBlogPost.php @@ -312,7 +312,7 @@ input type=hidden value= name=wpSection / input type=hidden value= name=wpEdittime / input type=hidden value= name=wpTextbox1 id=wpTextbox1 / - input type=hidden value=' . htmlspecialchars( $wgUser-editToken() ) . + input type=hidden value=' . htmlspecialchars( $wgUser-getEditToken() ) . ' name=wpEditToken /'; $output .= \n . '/form' . \n; @@ -345,4 +345,4 @@ return 'OK'; } } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/106200 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60142d3779f86d3f31cb75f5b5a027033a09d04d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlogPage Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...CloseWikis)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106201 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: Ic9b584fe2e53be25c70058735a24ca9de7c2dbd5 --- M SpecialCloseWiki.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CloseWikis refs/changes/01/106201/1 diff --git a/SpecialCloseWiki.php b/SpecialCloseWiki.php index 82d762a..d6de3fd 100644 --- a/SpecialCloseWiki.php +++ b/SpecialCloseWiki.php @@ -102,7 +102,7 @@ $form['closewikis-page-close-dreason'] = Xml::textarea( 'wpcDisplayReason', $defaultDisplayReason ); $form['closewikis-page-close-reason'] = Xml::input( 'wpcReason', false, $defaultReason ); $wgOut-addHTML( Xml::buildForm( $form, 'closewikis-page-close-submit' ) ); - $wgOut-addHTML( Html::hidden( 'wpcEdittoken', $wgUser-editToken() ) ); + $wgOut-addHTML( Html::hidden( 'wpcEdittoken', $wgUser-getEditToken() ) ); $wgOut-addHTML( /form/fieldset ); } @@ -145,7 +145,7 @@ $form['closewikis-page-reopen-wiki'] = $this-buildSelect( CloseWikis::getList(), 'wprWiki', $defaultWiki ); $form['closewikis-page-reopen-reason'] = Xml::input( 'wprReason', false, $defaultReason ); $wgOut-addHTML( Xml::buildForm( $form, 'closewikis-page-reopen-submit' ) ); - $wgOut-addHTML( Html::hidden( 'wprEdittoken', $wgUser-editToken() ) ); + $wgOut-addHTML( Html::hidden( 'wprEdittoken', $wgUser-getEditToken() ) ); $wgOut-addHTML( /form/fieldset ); } } -- To view, visit https://gerrit.wikimedia.org/r/106201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic9b584fe2e53be25c70058735a24ca9de7c2dbd5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CloseWikis Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...Commentbox)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106202 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I055c2971eec74b73b1e7d48fdb1a2ba1ebd5c4cc --- M SpecialAddComment_body.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Commentbox refs/changes/02/106202/1 diff --git a/SpecialAddComment_body.php b/SpecialAddComment_body.php index 977b8da..18bb40b 100644 --- a/SpecialAddComment_body.php +++ b/SpecialAddComment_body.php @@ -74,7 +74,7 @@ $reqArr = array( 'wpTextbox1' = $text, 'wpSummary' = wfMsgForContent( 'commentbox-log' ), - 'wpEditToken' = $wgUser-editToken(), + 'wpEditToken' = $wgUser-getEditToken(), 'wpIgnoreBlankSummary' = '', 'wpStarttime' = wfTimestampNow(), 'wpEdittime' = $article-getTimestamp(), -- To view, visit https://gerrit.wikimedia.org/r/106202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I055c2971eec74b73b1e7d48fdb1a2ba1ebd5c4cc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Commentbox Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...SemanticForms)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106203 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I96bbb903639a9a7acccb727c4067fc350e6f37b0 --- M includes/SF_AutoeditAPI.php M includes/SF_Utils.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/03/106203/1 diff --git a/includes/SF_AutoeditAPI.php b/includes/SF_AutoeditAPI.php index 77a3dc0..5ea1972 100644 --- a/includes/SF_AutoeditAPI.php +++ b/includes/SF_AutoeditAPI.php @@ -355,7 +355,7 @@ 'wpSummary' = '', 'wpStarttime' = wfTimestampNow(), 'wpEdittime' = '', - 'wpEditToken' = $wgUser-isLoggedIn() ? $wgUser-editToken() : EDIT_TOKEN_SUFFIX, + 'wpEditToken' = $wgUser-isLoggedIn() ? $wgUser-getEditToken() : EDIT_TOKEN_SUFFIX, 'action' = 'submit', ), $this-mOptions diff --git a/includes/SF_Utils.php b/includes/SF_Utils.php index b083d30..1f064d4 100644 --- a/includes/SF_Utils.php +++ b/includes/SF_Utils.php @@ -236,7 +236,7 @@ $form_body .= Html::hidden( 'wpSummary', $edit_summary ); $form_body .= Html::hidden( 'wpStarttime', $start_time ); $form_body .= Html::hidden( 'wpEdittime', $edit_time ); - $form_body .= Html::hidden( 'wpEditToken', $wgUser-isLoggedIn() ? $wgUser-editToken() : EDIT_TOKEN_SUFFIX ); + $form_body .= Html::hidden( 'wpEditToken', $wgUser-isLoggedIn() ? $wgUser-getEditToken() : EDIT_TOKEN_SUFFIX ); $form_body .= Html::hidden( $action, null ); if ( $is_minor_edit ) { -- To view, visit https://gerrit.wikimedia.org/r/106203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I96bbb903639a9a7acccb727c4067fc350e6f37b0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...SemanticDrilldown)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106204 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: Ic11279ba25a3f29dc77e5050b653bac336038ecb --- M includes/SD_Utils.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticDrilldown refs/changes/04/106204/1 diff --git a/includes/SD_Utils.php b/includes/SD_Utils.php index 59a773d..e065e8b 100644 --- a/includes/SD_Utils.php +++ b/includes/SD_Utils.php @@ -31,13 +31,13 @@ /** * Helper function to handle getPropertyValues() in both SMW 1.6 * and earlier versions. -* +* * @param SMWStore $store * @param string $pageName * @param integer $pageNamespace * @param string $propID * @param null|SMWRequestOptions $requestOptions -* +* * @return array of SMWDataItem */ public static function getSMWPropertyValues( SMWStore $store, $pageName, $pageNamespace, $propID, $requestOptions = null ) { @@ -421,7 +421,7 @@ $edittime = $article-getTimestamp(); global $wgUser; if ( $wgUser-isLoggedIn() ) - $token = htmlspecialchars( $wgUser-editToken() ); + $token = htmlspecialchars( $wgUser-getEditToken() ); else $token = EDIT_TOKEN_SUFFIX; -- To view, visit https://gerrit.wikimedia.org/r/106204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic11279ba25a3f29dc77e5050b653bac336038ecb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticDrilldown Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...CommunityVoice)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106206 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: Ia7e60b5c7198f0d046edcdacdcc360adb1f6215c --- M Modules/Ratings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CommunityVoice refs/changes/06/106206/1 diff --git a/Modules/Ratings.php b/Modules/Ratings.php index 478bcb4..5c3d69f 100644 --- a/Modules/Ratings.php +++ b/Modules/Ratings.php @@ -279,7 +279,7 @@ ); // Builds list of hidden fields $hiddenFields = array( - 'token' = $wgUser-editToken(), + 'token' = $wgUser-getEditToken(), 'module' = 'Ratings', 'action' = 'ScaleVoteSubmission', 'scale[article]' = $title-getPrefixedText(), -- To view, visit https://gerrit.wikimedia.org/r/106206 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7e60b5c7198f0d046edcdacdcc360adb1f6215c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CommunityVoice Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...RefreshSpecial)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106205 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I7ce2901aac0c03e52621c68febb11084793a9d3e --- M RefreshSpecial.body.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RefreshSpecial refs/changes/05/106205/1 diff --git a/RefreshSpecial.body.php b/RefreshSpecial.body.php index be721ca..f0c7550 100644 --- a/RefreshSpecial.body.php +++ b/RefreshSpecial.body.php @@ -78,7 +78,7 @@ function showForm( $err ) { global $wgOut, $wgUser, $wgRequest, $wgScriptPath, $wgQueryPages; - $token = htmlspecialchars( $wgUser-editToken() ); + $token = htmlspecialchars( $wgUser-getEditToken() ); $titleObj = SpecialPage::getTitleFor( 'RefreshSpecial' ); $action = htmlspecialchars( $titleObj-getLocalURL( 'action=submit' ) ); -- To view, visit https://gerrit.wikimedia.org/r/106205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ce2901aac0c03e52621c68febb11084793a9d3e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RefreshSpecial Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...MsUpload)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106207 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I5a5c28f61fa045cda3924726074602223a2828a6 --- M msupload.body.php 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MsUpload refs/changes/07/106207/1 diff --git a/msupload.body.php b/msupload.body.php index 333a458..ba6623e 100644 --- a/msupload.body.php +++ b/msupload.body.php @@ -1,8 +1,8 @@ ?php /** * Body file for extension MsUpload. - * - * @author Martin Schwindl martin.schwi...@ratin.de + * + * @author Martin Schwindl martin.schwi...@ratin.de * @copyright � 2012 by Martin Schwindl * * @licence GNU General Public Licence 2.0 or later @@ -17,19 +17,19 @@ function wfMsUploadSaveKat($name,$kat) { global $wgContLang,$wgUser; - + $mediaString = strtolower( $wgContLang-getNsText( NS_FILE ) ); - + $title = $mediaString.':'.$name; $text = \n[[.$kat.]]; -$wgEnableWriteAPI = true; +$wgEnableWriteAPI = true; $params = new FauxRequest(array ( 'action' = 'edit', 'section'= 'new', 'title' = $title, 'text' = $text, - 'token' = $wgUser-editToken(),//$token.%2B%5C, + 'token' = $wgUser-getEditToken(),//$token.%2B%5C, ), true, $_SESSION ); $enableWrite = true; // This is set to false by default, in the ApiMain constructor @@ -37,6 +37,6 @@ #$api = new ApiMain($params); $api-execute(); $data = $api-getResultData(); - + return $mediaString; -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/106207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a5c28f61fa045cda3924726074602223a2828a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MsUpload Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...CloseWikis)
Hydriz has submitted this change and it was merged. Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: Ic9b584fe2e53be25c70058735a24ca9de7c2dbd5 --- M SpecialCloseWiki.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Hydriz: Verified; Looks good to me, approved diff --git a/SpecialCloseWiki.php b/SpecialCloseWiki.php index 82d762a..d6de3fd 100644 --- a/SpecialCloseWiki.php +++ b/SpecialCloseWiki.php @@ -102,7 +102,7 @@ $form['closewikis-page-close-dreason'] = Xml::textarea( 'wpcDisplayReason', $defaultDisplayReason ); $form['closewikis-page-close-reason'] = Xml::input( 'wpcReason', false, $defaultReason ); $wgOut-addHTML( Xml::buildForm( $form, 'closewikis-page-close-submit' ) ); - $wgOut-addHTML( Html::hidden( 'wpcEdittoken', $wgUser-editToken() ) ); + $wgOut-addHTML( Html::hidden( 'wpcEdittoken', $wgUser-getEditToken() ) ); $wgOut-addHTML( /form/fieldset ); } @@ -145,7 +145,7 @@ $form['closewikis-page-reopen-wiki'] = $this-buildSelect( CloseWikis::getList(), 'wprWiki', $defaultWiki ); $form['closewikis-page-reopen-reason'] = Xml::input( 'wprReason', false, $defaultReason ); $wgOut-addHTML( Xml::buildForm( $form, 'closewikis-page-reopen-submit' ) ); - $wgOut-addHTML( Html::hidden( 'wprEdittoken', $wgUser-editToken() ) ); + $wgOut-addHTML( Html::hidden( 'wprEdittoken', $wgUser-getEditToken() ) ); $wgOut-addHTML( /form/fieldset ); } } -- To view, visit https://gerrit.wikimedia.org/r/106201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic9b584fe2e53be25c70058735a24ca9de7c2dbd5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CloseWikis Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Hydriz ad...@alphacorp.tk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...Collection)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106211 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I69835a74d1e35d94e2a02698a51d80e139c46e59 --- M Collection.templates.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/11/106211/1 diff --git a/Collection.templates.php b/Collection.templates.php index d602f86..b95d2b4 100644 --- a/Collection.templates.php +++ b/Collection.templates.php @@ -179,7 +179,7 @@ trtd#160;/tdtd id=collection-save-button input id=saveButton type=submit value=?php $this-msg( 'coll-save_collection' ) ??php if ( count( $this-data['collection']['items'] ) == 0 ) { ? disabled=disabled?php } ? / /tr/tbody/table - input name=token type=hidden value=?php echo htmlspecialchars( $GLOBALS['wgUser']-editToken() ) ? / + input name=token type=hidden value=?php echo htmlspecialchars( $GLOBALS['wgUser']-getEditToken() ) ? / input name=bookcmd type=hidden value=save_collection / /form @@ -333,7 +333,7 @@ input name=pcollname type=hidden value=?php echo htmlspecialchars( $this-data['pcollname'] ) ? / input name=ccollname type=hidden value=?php echo htmlspecialchars( $this-data['ccollname'] ) ? / input name=colltype type=hidden value=?php echo htmlspecialchars( $this-data['colltype'] ) ? / - input name=token type=hidden value=?php echo htmlspecialchars( $GLOBALS['wgUser']-editToken() ) ? / + input name=token type=hidden value=?php echo htmlspecialchars( $GLOBALS['wgUser']-getEditToken() ) ? / input name=bookcmd type=hidden value=save_collection / /form -- To view, visit https://gerrit.wikimedia.org/r/106211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69835a74d1e35d94e2a02698a51d80e139c46e59 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add simple RL module with current pagestyles from Android app - change (mediawiki...MobileApp)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/106212 Change subject: Add simple RL module with current pagestyles from Android app .. Add simple RL module with current pagestyles from Android app Change-Id: Ic88b1925d231c195337b84f10903fcbe49fea5bb --- A MobileApp.php A less/common.less 2 files changed, 106 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileApp refs/changes/12/106212/1 diff --git a/MobileApp.php b/MobileApp.php new file mode 100644 index 000..b9c0121 --- /dev/null +++ b/MobileApp.php @@ -0,0 +1,24 @@ +?php +if ( !defined( 'MEDIAWIKI' ) ) { + echo( This is an extension to the MediaWiki package and cannot be run standalone.\n ); + die( -1 ); +} + +// Extension credits that will show up on Special:Version +$wgExtensionCredits['other'][] = array( + 'path' = __FILE__, + 'name' = 'MobileApp', + 'author' = array( 'Yuvi Panda' ), + 'url' = 'https://www.mediawiki.org/wiki/Extension:MobileApp' +); + +// List of less files included for both iOS and Android +$commonStyles = array( + 'extensions/MobileApp/less/common.less' +); + +$wgResourceModules = array_merge( $wgResourceModules, array( + 'mobile.app' = array( + 'styles' = $commonStyles + ) +) ); diff --git a/less/common.less b/less/common.less new file mode 100644 index 000..25f8a38 --- /dev/null +++ b/less/common.less @@ -0,0 +1,82 @@ +/* Should be moved out to the MobileApp extension at some point */ +body { +background-color: #FAFAFA; +color: #333; +font-family: sans-serif; +font-size: 16px; +line-height: 24px; +margin: 0; +padding: 0; +margin-top: 48px; +} + +#content { +padding: 8px 24px; +} + +a { +color: #347BFF; +text-decoration: none; +} + +/* Headers */ +h1 { +font-family: serif; +color: #064AAD; +font-size: 24px; +line-height: 36px; +margin-bottom: 24px; +font-weight: bold; +} + +h2, h3, h4, h5, h6 { +font-family: serif; +} + +/* Basic Thumbnails */ +.thumb { +/* Don't stick thumbnails to the text above and below it */ +margin: 8px 0px; +/* Align everything inside a thumbnail to be centered */ +text-align: center; +} + +.thumb .thumbinner { +/* Make sure that thumb takes up full width */ +width: 100% !important; +} + +.thumb .magnify { +display: none; /* Our parser is STUPID */ +} + +.thumb .noresize { +overflow-x: auto; /* Scrollbars for images that shouldn't be squished */ +} + +/* Makes sure that we don't have horizontal scrollbars for the entire page because + an image is too wide to fit in to the current viewport */ +img { +max-width: 100% !important; +height: auto !important; +} + +/* Basic tables */ +table { +width: 100% !important; +overflow-x: auto; +display: block; +border: 1px solid #ccc; +margin-top: 4px; +margin-bottom: 4px; +} + +/* Last updated info */ +#attribution { +border-top: 1px solid #ccc; +padding: 8px; +text-align: center; +color: #888; +font-size: 80%; +} + -- To view, visit https://gerrit.wikimedia.org/r/106212 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic88b1925d231c195337b84f10903fcbe49fea5bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileApp Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106213 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: Ic845c2a62488ea44a306c83652b503fa2c862d8c --- M includes/specials/SpecialUserlogin.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/13/106213/1 diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 3e67d56..8e5ef58 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -1298,7 +1298,7 @@ */ public static function setLoginToken() { global $wgRequest; - // Generate a token directly instead of using $user-editToken() + // Generate a token directly instead of using $user-getEditToken() // because the latter reuses $_SESSION['wsEditToken'] $wgRequest-setSessionData( 'wsLoginToken', MWCryptRand::generateHex( 32 ) ); } -- To view, visit https://gerrit.wikimedia.org/r/106213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic845c2a62488ea44a306c83652b503fa2c862d8c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...CreateRedirect)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106210 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: Ib9e8e57f3b4e1dafd6bf0b7d7a18129c243857c1 --- M CreateRedirect.body.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CreateRedirect refs/changes/10/106210/1 diff --git a/CreateRedirect.body.php b/CreateRedirect.body.php index fd749c9..adbbc00 100644 --- a/CreateRedirect.body.php +++ b/CreateRedirect.body.php @@ -75,7 +75,7 @@ $wpTextbox1 = #REDIRECT [[$crRedirectTitle]]\r\n; // POST var wpTextbox1 stores the content that's actually going to be written. This is where we write the #REDIRECT [[Article]] stuff. We plug in $crRedirectTitle here. $wpSave = 1; $wpMinoredit = 1; // TODO: Decide on this; should this really be marked and hardcoded as a minor edit, or not? Or should we provide an option? --Digi 11/4/07 - $wpEditToken = htmlspecialchars( $wgUser-editToken() ); + $wpEditToken = htmlspecialchars( $wgUser-getEditToken() ); // 3. Put together the params that we'll use in FauxRequest into a single array. $crRequestParams = array( @@ -178,7 +178,7 @@ $msgPageTitle = wfMsgHtml( 'createredirect-page-title' ); $msgRedirectTo = wfMsgHtml( 'createredirect-redirect-to' ); $msgSave = wfMsgHtml( 'createredirect-save' ); - + // 2. Start rendering the output! The output is entirely the form. // It's all HTML, and may be self-explanatory. $wgOut-addHTML( wfMsgHtml( 'createredirect-instructions' ) ); -- To view, visit https://gerrit.wikimedia.org/r/106210 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9e8e57f3b4e1dafd6bf0b7d7a18129c243857c1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CreateRedirect Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...Duplicator)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106209 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I0fbcae89a3d980dcb231dc78f82567d89a4c49b3 --- M Duplicator.page.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Duplicator refs/changes/09/106209/1 diff --git a/Duplicator.page.php b/Duplicator.page.php index 28eaded..424d944 100644 --- a/Duplicator.page.php +++ b/Duplicator.page.php @@ -58,7 +58,7 @@ */ public function execute( $title ) { global $wgUser, $wgOut, $wgRequest, $wgLang, $wgDuplicatorRevisionLimit; - + $this-setHeaders(); # Check permissions @@ -212,7 +212,7 @@ $form .= 'td' . Xml::submitButton( wfMsg( 'duplicator-submit' ) ) . '/td'; $form .= '/tr'; $form .= '/table'; - $form .= Html::Hidden( 'token', $wgUser-editToken( 'duplicator' ) ); + $form .= Html::Hidden( 'token', $wgUser-getEditToken( 'duplicator' ) ); $form .= '/fieldset/form'; return $form; } -- To view, visit https://gerrit.wikimedia.org/r/106209 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fbcae89a3d980dcb231dc78f82567d89a4c49b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Duplicator Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated User::editToken with User::getEditToken (... - change (mediawiki...LogEntry)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/106208 Change subject: Replace deprecated User::editToken with User::getEditToken (1.19) .. Replace deprecated User::editToken with User::getEditToken (1.19) Change-Id: I61221beb02b22d30cc41773ab8140c1bdcca9229 --- M LogEntry.hooks.php 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LogEntry refs/changes/08/106208/1 diff --git a/LogEntry.hooks.php b/LogEntry.hooks.php index dd9d55a..698560a 100644 --- a/LogEntry.hooks.php +++ b/LogEntry.hooks.php @@ -10,24 +10,24 @@ class LogEntryHooks { /* Functions */ - + // Initialization public static function register( $parser ) { // Register the hook with the parser $parser-setHook( 'logentry', 'LogEntryHooks::render' ); - + // Continue return true; } - + // Render the entry form public static function render( $input, $args, $parser ) { global $wgUser; global $egLogEntryMultiLine, $egLogEntryMultiLineRows; - + // Don't cache since we are passing the token in the form $parser-disableCache(); - + // Build HTML $htmlResult = Xml::openElement( 'form', array( @@ -85,11 +85,11 @@ array( 'type' = 'hidden', 'name' = 'token', - 'value' = $wgUser-editToken() + 'value' = $wgUser-getEditToken() ) ); $htmlResult .= Xml::closeElement( 'form' ); - + // Return HTML output return $htmlResult; } -- To view, visit https://gerrit.wikimedia.org/r/106208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61221beb02b22d30cc41773ab8140c1bdcca9229 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LogEntry Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add simple RL module with current pagestyles from Android app - change (mediawiki...MobileApp)
Legoktm has submitted this change and it was merged. Change subject: Add simple RL module with current pagestyles from Android app .. Add simple RL module with current pagestyles from Android app Change-Id: Ic88b1925d231c195337b84f10903fcbe49fea5bb --- A MobileApp.php A less/common.less 2 files changed, 119 insertions(+), 0 deletions(-) Approvals: Legoktm: Verified; Looks good to me, approved diff --git a/MobileApp.php b/MobileApp.php new file mode 100644 index 000..34c8e86 --- /dev/null +++ b/MobileApp.php @@ -0,0 +1,38 @@ +?php +/** + * Extension MobileApp + * + * @file + * @ingroup Extensions + * @author Yuvi Panda + * @copyright © 2014 Yuvi Panda + * @licence GNU General Public Licence 2.0 or later + */ +if ( !defined( 'MEDIAWIKI' ) ) { + echo( This is an extension to the MediaWiki package and cannot be run standalone.\n ); + die( -1 ); +} + +$localBasePath = dirname( __DIR__ ); +$remoteExtPath = 'MobileApp'; + +// Extension credits that will show up on Special:Version +$wgExtensionCredits['other'][] = array( + 'path' = __FILE__, + 'name' = 'MobileApp', + 'author' = array( 'Yuvi Panda' ), + 'url' = 'https://www.mediawiki.org/wiki/Extension:MobileApp' +); + +// List of less files included for both iOS and Android +$commonStyles = array( + 'MobileApp/less/common.less' +); + +$wgResourceModules = array_merge( $wgResourceModules, array( + 'mobile.app' = array( + 'styles' = $commonStyles, + 'localBasePath' = $localBasePath, + 'remoteExtPath' = $remoteExtPath + ) +) ); diff --git a/less/common.less b/less/common.less new file mode 100644 index 000..e697dd0 --- /dev/null +++ b/less/common.less @@ -0,0 +1,81 @@ +body { +background-color: #FAFAFA; +color: #333; +font-family: sans-serif; +font-size: 16px; +line-height: 24px; +margin: 0; +padding: 0; +margin-top: 48px; +} + +#content { +padding: 8px 24px; +} + +a { +color: #347BFF; +text-decoration: none; +} + +/* Headers */ +h1 { +font-family: serif; +color: #064AAD; +font-size: 24px; +line-height: 36px; +margin-bottom: 24px; +font-weight: bold; +} + +h2, h3, h4, h5, h6 { +font-family: serif; +} + +/* Basic Thumbnails */ +.thumb { +/* Don't stick thumbnails to the text above and below it */ +margin: 8px 0px; +/* Align everything inside a thumbnail to be centered */ +text-align: center; +} + +.thumb .thumbinner { +/* Make sure that thumb takes up full width */ +width: 100% !important; +} + +.thumb .magnify { +display: none; /* Our parser is STUPID */ +} + +.thumb .noresize { +overflow-x: auto; /* Scrollbars for images that shouldn't be squished */ +} + +/* Makes sure that we don't have horizontal scrollbars for the entire page because + an image is too wide to fit in to the current viewport */ +img { +max-width: 100% !important; +height: auto !important; +} + +/* Basic tables */ +table { +width: 100% !important; +overflow-x: auto; +display: block; +border: 1px solid #ccc; +margin-top: 4px; +margin-bottom: 4px; +} + +/* Last updated info */ +#attribution { +border-top: 1px solid #ccc; +padding: 8px; +text-align: center; +color: #888; +font-size: 80%; +} + -- To view, visit https://gerrit.wikimedia.org/r/106212 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic88b1925d231c195337b84f10903fcbe49fea5bb Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MobileApp Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add special page Special:ContentTranslation - change (mediawiki...ContentTranslation)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/106214 Change subject: Add special page Special:ContentTranslation .. Add special page Special:ContentTranslation Change-Id: I59a1349ad3a9ca0a044165dc870b2aef15ca3ed3 --- A _autoload.php A specials/ContentTranslationSpecialPage.php A specials/SpecialContentTranslation.php 3 files changed, 82 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/14/106214/1 diff --git a/_autoload.php b/_autoload.php new file mode 100644 index 000..7c2dea7 --- /dev/null +++ b/_autoload.php @@ -0,0 +1,26 @@ +?php +/** + * Autoload definitions. + * + * @file + * @author Kartik Mistry + * @copyright Copyright © 2014, Kartik Mistry + * @license GPL-2.0+ + */ + +/** @cond file_level_code */ +global $wgAutoloadClasses; +$dir = dirname( __FILE__ ); +/** @endcond */ + +/** + * @name Special pages + * Special pages in content translation. + * @{ + */ +$wgAutoloadClasses['ContentTranslationSpecialPage'] = + $dir/specials/ContentTranslationSpecialPage.php; +$wgAutoloadClasses['SpecialContentTranslation'] = + $dir/specials/SpecialContentTranslation.php; +/**@}*/ + diff --git a/specials/ContentTranslationSpecialPage.php b/specials/ContentTranslationSpecialPage.php new file mode 100644 index 000..a0084f2 --- /dev/null +++ b/specials/ContentTranslationSpecialPage.php @@ -0,0 +1,34 @@ +?php +/** + * Contains logic for all special pages of the ContentTranslation extension + * + * @file + * @author Kartik Mistry + * @copyright Copyright © 2014 Kartik Mistry + * @license GPL-2.0+ + */ + +/** + * A special page that all special pages of the Content Translation extension + * should use. + * + * @ingroup SpecialPage ContentTranslationSpecialPage + */ +class ContentTranslationSpecialPage extends SpecialPage { + /** +* Get a self-referential title object +* +* For backward compatibility for https://gerrit.wikimedia.org/r/#/c/103587. +* Should be removed when the lowest supported version is MediaWiki 1.23. +* +* @param string|bool $subpage +* @return Title|void +*/ + public function getTitle( $subpage = false ) { + if ( method_exists( $this, 'getPageTitle' ) ) { + return $this-getPageTitle(); + } else { + return self::getTitleFor( $this-mName, $subpage ); + } + } +} diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php new file mode 100644 index 000..c1d0d2a --- /dev/null +++ b/specials/SpecialContentTranslation.php @@ -0,0 +1,22 @@ +?php +/** + * Contains special page Special:ContentTranslation. + * + * @file + * @author Kartik Mistry + * @copyright Copyright © 2014 Kartik Mistry + * @license GPL-2.0+ + */ + +/** + * Implements the core of Content Translation extension - a special page which + * shows Content Translation user interface. + * + * @ingroup SpecialPage ContentTranslationSpecialPage + */ +class SpecialContentTranslation extends ContentTranslationSpecialPage { + + function __construct() { + parent::__construct( 'ContentTranslation' ); + } +} -- To view, visit https://gerrit.wikimedia.org/r/106214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59a1349ad3a9ca0a044165dc870b2aef15ca3ed3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make sure snaklistview test cases pass in Firefox - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/106215 Change subject: Make sure snaklistview test cases pass in Firefox .. Make sure snaklistview test cases pass in Firefox Change-Id: I486be0982b87135f8b8d67eb1e4a5b8ae8c7d7df --- M lib/tests/qunit/jquery.wikibase/jquery.wikibase.snaklistview.tests.js 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/15/106215/1 diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.snaklistview.tests.js b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.snaklistview.tests.js index eb1ecac..abe7f49 100644 --- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.snaklistview.tests.js +++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.snaklistview.tests.js @@ -403,6 +403,10 @@ QUnit.start(); } ); + // We need to make sure the snaklistview is visible before startEditing, + // because Firefox does not allow setting focus on a hidden element. + $node.appendTo( $( 'body' ) ); + snaklistview.startEditing(); assert.strictEqual( @@ -450,6 +454,8 @@ // Should not trigger any events since not in edit mode: snaklistview.stopEditing(); + + $node.remove(); } ); QUnit.test( 'enterNewItem()', function( assert ) { @@ -522,6 +528,10 @@ var $node = createSnaklistview(), snaklistview = $node.data( 'snaklistview' ); + // We need to make sure the snaklistview is visible before startEditing, + // because Firefox does not allow setting focus on a hidden element. + $node.appendTo( $( 'body' ) ); + // Start with empty snaklistview, set a snak list and stop edit mode: snaklistview.startEditing(); snaklistview = setValueKeepingInitial( snaklistview, snakLists[0] ); @@ -571,11 +581,17 @@ snaklistview.isInitialValue(), 'Verified reset to initial value.' ); + + $node.remove(); } ); QUnit.test( 'Stopping edit mode retaining value', function( assert ) { var $node = createSnaklistview(), snaklistview = $node.data( 'snaklistview' ); + + // We need to make sure the snaklistview is visible before startEditing, + // because Firefox does not allow setting focus on a hidden element. + $node.appendTo( $( 'body' ) ); // Start with empty snaklistview, set a snak list and stop edit mode: snaklistview.startEditing(); @@ -639,6 +655,8 @@ null, 'Snaklistview is empty.' ); + + $node.remove(); } ); QUnit.test( 'Dis- and enabling', function( assert ) { -- To view, visit https://gerrit.wikimedia.org/r/106215 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I486be0982b87135f8b8d67eb1e4a5b8ae8c7d7df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update to version 0.4.3 - change (mediawiki...MultiMaps)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/106216 Change subject: update to version 0.4.3 .. update to version 0.4.3 Allow specify an icon for the marker from the directory add two global variables $egMultiMaps_IconAllowFromDirectory $egMultiMaps_IconPath Change-Id: Iebf53396a6a475310caaf7e3bbef7a621c1f2565 --- M MultiMaps.php M Settings.php M includes/mapelements/Marker.php M services/Google/Google.php M services/Yandex/Yandex.php 5 files changed, 22 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultiMaps refs/changes/16/106216/1 diff --git a/MultiMaps.php b/MultiMaps.php index e289f5d..91c54cb 100644 --- a/MultiMaps.php +++ b/MultiMaps.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -define( 'MultiMaps_VERSION' , '0.4.2' ); +define( 'MultiMaps_VERSION' , '0.4.3' ); // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/Settings.php b/Settings.php index c7273a8..2f83461 100644 --- a/Settings.php +++ b/Settings.php @@ -43,6 +43,11 @@ $egMultiMaps_Width = 'auto'; $egMultiMaps_Height = '350px'; +// Boolean. If true, allow specify an icon for the marker from the directory +$egMultiMaps_IconAllowFromDirectory = false; +// String. The URL base path to the directory containing icons for markers +$egMultiMaps_IconPath = $wgScriptPath/mapicons; + //TODO //$egMultiMaps_GoogleApiKey = false; //$egMultiMaps_YandexApiKey = false; diff --git a/includes/mapelements/Marker.php b/includes/mapelements/Marker.php index 8e025a2..c4a9dd1 100644 --- a/includes/mapelements/Marker.php +++ b/includes/mapelements/Marker.php @@ -31,13 +31,21 @@ public function setProperty($name, $value) { if( strtolower($name) == 'icon' ) { - $title = \Title::newFromText( $value, NS_FILE ); - if ( !is_null( $title ) $title-exists() ) { - $imagePage = new \ImagePage( $title ); - $value = $imagePage-getDisplayedFile()-getURL(); + if ( $value[0] == '/' $GLOBALS['egMultiMaps_IconAllowFromDirectory'] === true ) { + if ( preg_match('#[^0-9a-zA-Zа-яА-Я./_=\+\-]#', $value) || preg_match('#/../#', $value) ) { + $this-errormessages[] = \wfMessage( 'multimaps-marker-incorrect-icon', $value )-escaped(); + return false; + } + $value = $GLOBALS['wgServer'] . $GLOBALS['egMultiMaps_IconPath'] . $value; } else { - $this-errormessages[] = \wfMessage( 'multimaps-marker-incorrect-icon', $value )-escaped(); - return false; + $title = \Title::newFromText( $value, NS_FILE ); + if ( !is_null( $title ) $title-exists() ) { + $imagePage = new \ImagePage( $title ); + $value = $imagePage-getDisplayedFile()-getURL(); + } else { + $this-errormessages[] = \wfMessage( 'multimaps-marker-incorrect-icon', $value )-escaped(); + return false; + } } } return parent::setProperty($name, $value); diff --git a/services/Google/Google.php b/services/Google/Google.php index 5221f42..425aede 100644 --- a/services/Google/Google.php +++ b/services/Google/Google.php @@ -25,7 +25,7 @@ $urlArgs = array(); $urlArgs['sensor'] = 'false'; - $this-headerItem .= \Html::linkedScript( 'http://maps.googleapis.com/maps/api/js?'.wfArrayToCgi($urlArgs) ) . \n; + $this-headerItem .= \Html::linkedScript( 'https://maps.googleapis.com/maps/api/js?'.wfArrayToCgi($urlArgs) ) . \n; } } \ No newline at end of file diff --git a/services/Yandex/Yandex.php b/services/Yandex/Yandex.php index d792bef..b7474eb 100644 --- a/services/Yandex/Yandex.php +++ b/services/Yandex/Yandex.php @@ -26,7 +26,7 @@ $urlArgs = array(); $urlArgs['load'] = 'package.standard,package.geoObjects'; $urlArgs['lang'] = 'ru-RU'; - $this-headerItem .= \Html::linkedScript( 'http://api-maps.yandex.ru/2.0-stable/?'.wfArrayToCgi($urlArgs) ) . \n; + $this-headerItem .= \Html::linkedScript( 'https://api-maps.yandex.ru/2.0-stable/?'.wfArrayToCgi($urlArgs) ) . \n; } } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/106216 To unsubscribe, visit
[MediaWiki-commits] [Gerrit] Deploy Extension:MobileApp to betalabs - change (operations/mediawiki-config)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/106217 Change subject: Deploy Extension:MobileApp to betalabs .. Deploy Extension:MobileApp to betalabs Change-Id: Iac50ca3fb44e79ca2f41d66a97887f5d7d87ab2e --- M wmf-config/CommonSettings-labs.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/17/106217/1 diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index 3f00795..6dfe6e5 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -84,6 +84,8 @@ $wgVisualEditorParsoidReportProblemURL = 'http://10.4.0.33/_bugs/'; // parsoid-spof } +require_once( $IP/extensions/MobileApp/MobileApp.php ); + # temporary extensions # -- To view, visit https://gerrit.wikimedia.org/r/106217 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac50ca3fb44e79ca2f41d66a97887f5d7d87ab2e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changed temporary password system to use tokens. - change (mediawiki/core)
Parent5446 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106218 Change subject: Changed temporary password system to use tokens. .. Changed temporary password system to use tokens. Changes password reset flow. The old method was to have the user copy their temporary password into the login form, and then after logging in they would be presented with the change password form. The new method gives the user a link (with a token embedded in the query) rather than a temporary password. Special:ChangePassword then checks that token. Now it is no longer possible to log in with temporary passwords on the login page. It can only be done from Special:ChangePassword, and the token must be supplied using a specific field allocated for it, rather than passing it off as if it were a temporary password. The length of temporary passwords has been increased now that they are tokens. Also the default expiry has been reduced to one day. Change-Id: Idb82b912e6bf8cbbc7710a330388edfbd8807b38 --- M RELEASE-NOTES-1.23 M includes/DefaultSettings.php M includes/specials/SpecialChangePassword.php M includes/specials/SpecialPasswordReset.php M includes/specials/SpecialUserlogin.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php 7 files changed, 125 insertions(+), 169 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/18/106218/1 diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 13d9ff8..5e57098 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -28,6 +28,8 @@ should be updated if LBFactory_Simple or LBFactory_Multi is configured. * $wgPasswordSenderName has been deprecated. To set a custom mailer name, the system message 'emailsender' should be modified (default: {{SITENAME}}). +* Changed expiry of temporary passwords from one week to one day because of + the new token-based password reset system. === New features in 1.23 === * ResourceLoader can utilize the Web Storage API to cache modules client-side. @@ -72,6 +74,9 @@ * WikitextContent will now render redirects with the expected redirect header, rather than as an ordered list. Code calling Article::viewRedirect can probably be changed to no longer special-case redirects. +* The temporary password-based password reset system has been replaced with + a token system, i.e., instead of using a temporary password, the user clicks + a link in the email. === Bug fixes in 1.23 === * (bug 41759) The updated since last visit markers (on history pages, recent diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 9b2b676..ddc4fbc 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1363,7 +1363,7 @@ /** * The time, in seconds, when an emailed temporary password expires. */ -$wgNewPasswordExpiry = 3600 * 24 * 7; +$wgNewPasswordExpiry = 3600 * 24; /** * The time, in seconds, when an email confirmation email expires diff --git a/includes/specials/SpecialChangePassword.php b/includes/specials/SpecialChangePassword.php index d54828a..c617b57 100644 --- a/includes/specials/SpecialChangePassword.php +++ b/includes/specials/SpecialChangePassword.php @@ -27,48 +27,87 @@ * @ingroup SpecialPage */ class SpecialChangePassword extends FormSpecialPage { + /** +* @var string A temporary password reset token optionally provided by the user +*/ + private $token = ''; - protected $mUserName, $mDomain; + /** +* @var User The user whose password is being changed +*/ + private $user; public function __construct() { parent::__construct( 'ChangePassword', 'editmyprivateinfo' ); $this-listed( false ); + $this-user = $this-getUser(); } - /** -* Main execution point -*/ - function execute( $par ) { + public function execute( $par ) { + global $wgSecureLogin; + + // If secure login is enabled, only allow password changes over HTTPS + if ( + $this-getRequest()-getProtocol() !== 'https' + $wgSecureLogin + wfCanIPUseHTTPS( $this-getRequest()-getIP() ) + ) { + $request = $this-getRequest(); + $title = $this-getFullTitle(); + + $query = array( + 'fromhttp' = '1', + 'returnto' = $request-getVal( 'returnto' ), + 'returntoquery' = $request-getVal( 'returntoquery' ), + 'title' = null, + ) + $this-mRequest-getQueryValues(); + + $url = $title-getFullURL( $query, false, PROTO_HTTPS ); + +
[MediaWiki-commits] [Gerrit] Improved vague/incomplete $1 thumb.php error messages - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/106219 Change subject: Improved vague/incomplete $1 thumb.php error messages .. Improved vague/incomplete $1 thumb.php error messages Change-Id: I64d05e25f82242e92abbcbf20252fc17d5790d8b --- M includes/media/Bitmap.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/19/106219/1 diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 1be04a7..8a5c3ae 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -187,7 +187,9 @@ wfHostname(), $image-getName() ) ); return new MediaTransformError( 'thumbnail_error', - $scalerParams['clientWidth'], $scalerParams['clientHeight'] ); + $scalerParams['clientWidth'], $scalerParams['clientHeight'], + 'Could not get retrieve copy of original' + ); } # Try a hook @@ -227,7 +229,9 @@ } elseif ( $removed ) { # Thumbnail was zero-byte and had to be removed return new MediaTransformError( 'thumbnail_error', - $scalerParams['clientWidth'], $scalerParams['clientHeight'] ); + $scalerParams['clientWidth'], $scalerParams['clientHeight'], +'Thumbnail was 0 bytes when created' + ); } elseif ( $mto ) { return $mto; } else { -- To view, visit https://gerrit.wikimedia.org/r/106219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64d05e25f82242e92abbcbf20252fc17d5790d8b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set up the extension with basic files and configurations - change (mediawiki...ContentTranslation)
Siebrand has submitted this change and it was merged. Change subject: Set up the extension with basic files and configurations .. Set up the extension with basic files and configurations Change-Id: I47bd086c81a2e2a33172fdc005c67df2d7f406cc --- A AUTHORS.txt A CONTRIBUTING.md A ContentTranslation.php A LICENSE.txt A README.md A Resources.php A i18n/en.json A i18n/qqq.json A tests/phpunit/Makefile 9 files changed, 586 insertions(+), 0 deletions(-) Approvals: Siebrand: Verified; Looks good to me, approved diff --git a/AUTHORS.txt b/AUTHORS.txt new file mode 100644 index 000..1c91f88 --- /dev/null +++ b/AUTHORS.txt @@ -0,0 +1,3 @@ +Amir E. Aharoni amir.ahar...@mail.huji.ac.il +Santhosh Thottingal santhosh.thottin...@gmail.com +Siebrand Mazeland s.mazel...@xs4all.nl diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000..62cf448 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,140 @@ +# Contributing to ContentTranslation + +Thank you for helping us develop ContentTranslation! + +This document describes how to report bugs, set up your development +environment, run tests, and build documentation. It also provides the coding +conventions we use in the project. + +## Bug reports + +Please report bugs to [bugzilla.wikimedia.org](https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensionscomponent=ContentTranslation) +using the `ContentTranslation` product. Feel free to use the `General` +component if you don't know where else your bug might belong. Don't +worry about specifying version, severity, hardware, or OS. + +## Running tests + +To run the tests in a web browser, make sure your MediaWiki install is +[configured](https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing) to +allow running of tests. Set in `LocalSettings.php`: +```php +// https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing +$wgEnableJavaScriptTest = true; +``` + +Then open `http://URL_OF_MEDIAWIKI/index.php/Special:JavaScriptTest/qunit` +(for example, http://localhost/w/index.php/Special:JavaScriptTest/qunit). + +## Building documentation + +ContentTranslation uses [JSDuck](https://github.com/senchalabs/jsduck) to process +documentation comments embedded in the code. To build the documentation, you +will need `ruby`, `gem`, and `jsduck` installed. + +### Installing ruby and gem + +You're mostly on your own here, but we can give some hints for Mac OS X. + +# Installing Gem in Mac OS X +Ruby ships with OSX but may be outdated. Use [Homebrew](http://mxcl.github.com/homebrew/): +```sh +$ brew install ruby +``` + +If you've never used `gem` before, don't forget to add the gem's bin to your +`PATH` ([howto](http://stackoverflow.com/a/14138490/319266)). + +### Installing jsduck + +Once you have gem, installing [JSDuck](https://github.com/senchalabs/jsduck) is easy: +```sh +$ gem install --user-install jsduck +``` + +### Running jsduck + +Creating the documentation is easy: +```sh +$ cd ContentTranslation +$ .docs/generate.sh +``` + +You may need to set `MW_INSTALL_PATH` in your environment to the location of +your mediawiki installation if ContentTranslation is not checked out directly in the +mediawiki extensions folder (for example, if you're using a symlink). + +The generated documentation is in the `docs/` subdirectory. View the +documentation at +`http://URL_OF_MEDIAWIKI/extensions/ContentTranslation/docs/` +(for example, http://localhost/w/extensions/ContentTranslation/docs). + +Note that `jsduck` doesn't support browsing vis the `file:` protocol. + +## ContentTranslation Code Guidelines + +We inherit the code structure (about whitespace, naming and comments) conventions +from MediaWiki. See [Manual:Coding conventions/JavaScript](https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript) +on mediawiki.org. + +Git commit messages should follow the conventions described in +https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines. + +### Documentation comments + +* End sentences in a full stop. +* Continue sentences belonging to an annotation on the next line, indented with an + additional space. +* Types in documentation comments should be separated by a pipe character. Use types + that are listed in the Types section of this document, otherwise use the identifier + (full path from the global scope) of the constructor function (e.g. `{ve.dm.BranchNode}`). + +### Annotations + +We use the following annotations. They should be used in the order as they are described +here, for consistency. See [JSDuck/Tags](https://github.com/senchalabs/jsduck/wiki/Tags) for more elaborate documentation. + +* @class Name (optional, guessed) +* @abstract +* @extends ClassName +* @mixins ClassName +* @constructor +* @private +* @static +* @method name (optional, guessed) +* @template +* @property name (optional, guessed) +* @until Text: Optional text. +* @source Text +* @context {Type}
[MediaWiki-commits] [Gerrit] Purge etherpad package - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/106220 Change subject: Purge etherpad package .. Purge etherpad package After that we will remove the entire class and respective files Change-Id: I6c14721ca27bac71f94281851a99550a0e2d1bb7 --- M manifests/misc/etherpad.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/20/106220/1 diff --git a/manifests/misc/etherpad.pp b/manifests/misc/etherpad.pp index 74d4a01..679ff42 100644 --- a/manifests/misc/etherpad.pp +++ b/manifests/misc/etherpad.pp @@ -12,7 +12,7 @@ # NB: this has some GUI going on all up in it. first install must be done by hand. package { 'etherpad': -ensure = absent, # Wait until Jan 10 2014 and then turn this into purged +ensure = purged, # Wait until Jan 10 2014 and then turn this into purged } service { 'etherpad': -- To view, visit https://gerrit.wikimedia.org/r/106220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c14721ca27bac71f94281851a99550a0e2d1bb7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Purge etherpad package - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Purge etherpad package .. Purge etherpad package After that we will remove the entire class and respective files Change-Id: I6c14721ca27bac71f94281851a99550a0e2d1bb7 --- M manifests/misc/etherpad.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/etherpad.pp b/manifests/misc/etherpad.pp index 74d4a01..679ff42 100644 --- a/manifests/misc/etherpad.pp +++ b/manifests/misc/etherpad.pp @@ -12,7 +12,7 @@ # NB: this has some GUI going on all up in it. first install must be done by hand. package { 'etherpad': -ensure = absent, # Wait until Jan 10 2014 and then turn this into purged +ensure = purged, # Wait until Jan 10 2014 and then turn this into purged } service { 'etherpad': -- To view, visit https://gerrit.wikimedia.org/r/106220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c14721ca27bac71f94281851a99550a0e2d1bb7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding initial GWT scenarios - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106221 Change subject: Adding initial GWT scenarios .. Adding initial GWT scenarios Change-Id: I2af47156ae5eaf819e9a0d8a73c9ffb572992249 --- A tests/browser/features/special_content_translation.feature 1 file changed, 45 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/21/106221/1 diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature new file mode 100644 index 000..e996ce1 --- /dev/null +++ b/tests/browser/features/special_content_translation.feature @@ -0,0 +1,45 @@ +Feature: Content translation special page + + As a wiki editor + I can write a translation next to the original article, + so that I can manually create a translation without switching tabs. + + Design: + - https://www.mediawiki.org/wiki/Content_translation + - https://pauginer.github.io/prototype-translate/content-translation.html#mies-nl + + These scenarios test the basic functionality of the Special:ContentTranslation page. + + Scenario: Anonymous user cannot use Content translation. +Given I am on the content translation page in an English wiki, translating the article Bratislava to Danish +Then I see the message You must be logged in to translate in this page. + And I don't see a source column + And I don't see a translation column + And I don't see a Publish Translation + + Scenario: Logged in user viewing the special page for translation. +Given I am logged in + And I am on the content translation page in an English wiki, translating the article Bratislava to Danish +Then I see a source column with the content of the article Bratislava + And the language code of the source column is en + And the direction of the source column is left-to-right + And I see the title Bratislava at the top of the source column + And I see a language label saying English below the source column's title + And I see a view article link that points to the page Bratislava on the same wiki + And I see a translation column with an empty editing area + And the translation column's language code is da + And the translation column's direction is left-to-right + And I see an input box pre-filled with the text Bratislava above the writing area in the second column + And I see dansk below the translation column's title + And I see an translation information column + And I see a Publish Translation button + And I see a translation progress bar + + Scenario: Writing some translation text and saving it +Given I am logged in + And I am on the content translation page in an English wiki, translating the article Bratislava to Danish +When I write Bratislava er hovedstad og største by i Slovakiet. in the editing area in the translation column + And I press the Publish Translation button +Then the page User:TranslatorToDa/Bratislava is displayed + And the content of the page is Bratislava er hovedstad og største by i Slovakiet. + And the first version in the history of the page User:TranslatorToDa/Bratislava should have the tag ContentTranslation -- To view, visit https://gerrit.wikimedia.org/r/106221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2af47156ae5eaf819e9a0d8a73c9ffb572992249 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding initial GWT scenarios - change (mediawiki...ContentTranslation)
SuchetaG has submitted this change and it was merged. Change subject: Adding initial GWT scenarios .. Adding initial GWT scenarios Change-Id: I2af47156ae5eaf819e9a0d8a73c9ffb572992249 --- A tests/browser/features/special_content_translation.feature 1 file changed, 45 insertions(+), 0 deletions(-) Approvals: SuchetaG: Verified; Looks good to me, approved diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature new file mode 100644 index 000..e996ce1 --- /dev/null +++ b/tests/browser/features/special_content_translation.feature @@ -0,0 +1,45 @@ +Feature: Content translation special page + + As a wiki editor + I can write a translation next to the original article, + so that I can manually create a translation without switching tabs. + + Design: + - https://www.mediawiki.org/wiki/Content_translation + - https://pauginer.github.io/prototype-translate/content-translation.html#mies-nl + + These scenarios test the basic functionality of the Special:ContentTranslation page. + + Scenario: Anonymous user cannot use Content translation. +Given I am on the content translation page in an English wiki, translating the article Bratislava to Danish +Then I see the message You must be logged in to translate in this page. + And I don't see a source column + And I don't see a translation column + And I don't see a Publish Translation + + Scenario: Logged in user viewing the special page for translation. +Given I am logged in + And I am on the content translation page in an English wiki, translating the article Bratislava to Danish +Then I see a source column with the content of the article Bratislava + And the language code of the source column is en + And the direction of the source column is left-to-right + And I see the title Bratislava at the top of the source column + And I see a language label saying English below the source column's title + And I see a view article link that points to the page Bratislava on the same wiki + And I see a translation column with an empty editing area + And the translation column's language code is da + And the translation column's direction is left-to-right + And I see an input box pre-filled with the text Bratislava above the writing area in the second column + And I see dansk below the translation column's title + And I see an translation information column + And I see a Publish Translation button + And I see a translation progress bar + + Scenario: Writing some translation text and saving it +Given I am logged in + And I am on the content translation page in an English wiki, translating the article Bratislava to Danish +When I write Bratislava er hovedstad og største by i Slovakiet. in the editing area in the translation column + And I press the Publish Translation button +Then the page User:TranslatorToDa/Bratislava is displayed + And the content of the page is Bratislava er hovedstad og største by i Slovakiet. + And the first version in the history of the page User:TranslatorToDa/Bratislava should have the tag ContentTranslation -- To view, visit https://gerrit.wikimedia.org/r/106221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2af47156ae5eaf819e9a0d8a73c9ffb572992249 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: SuchetaG sucheta.ghos...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix scrolling back and forth on copy/paste in Firefox - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Fix scrolling back and forth on copy/paste in Firefox .. Fix scrolling back and forth on copy/paste in Firefox Both on copy and on paste, Firefox would sometimes scroll the document and scroll it back. On paste, it seemed to happen most reliably when pasting into a slug. Fix by restoring the scroll position immediately each time the focus changes, as opposed to restoring it only after the last focus change while yielding in between focus changes. Change-Id: Ia592d0e8399b8896ffc0e18115e470d3ce91128f --- M modules/ve/ce/ve.ce.Surface.js 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 19cc080..135dc2b 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -743,13 +743,16 @@ sel.removeAllRanges(); this.$pasteTarget[0].focus(); sel.addRange( rangyRange, false ); + // Restore scroll position after changing focus + $window.scrollTop( scrollTop ); setTimeout( function () { + // Change focus back sel = rangy.getSelection( view.getElementDocument() ); sel.removeAllRanges(); view.documentView.getDocumentNode().$element[0].focus(); sel.addRange( originalRange ); - + // Restore scroll position $window.scrollTop( scrollTop ); } ); } @@ -871,6 +874,9 @@ this.$pasteTarget[0].focus(); } + // Restore scroll position after focusing the paste target + $window.scrollTop( this.beforePasteData.scrollTop ); + }; /** -- To view, visit https://gerrit.wikimedia.org/r/106185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia592d0e8399b8896ffc0e18115e470d3ce91128f Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Esanders esand...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update to version 0.4.3 - change (mediawiki...MultiMaps)
jenkins-bot has submitted this change and it was merged. Change subject: update to version 0.4.3 .. update to version 0.4.3 Allow specify an icon for the marker from the directory add two global variables $egMultiMaps_IconAllowFromDirectory $egMultiMaps_IconPath Change-Id: Iebf53396a6a475310caaf7e3bbef7a621c1f2565 --- M MultiMaps.php M Settings.php M includes/mapelements/Marker.php M services/Google/Google.php M services/Yandex/Yandex.php M tests/phpunit/services/Yandex/YandexTest.php 6 files changed, 23 insertions(+), 10 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/MultiMaps.php b/MultiMaps.php index e289f5d..91c54cb 100644 --- a/MultiMaps.php +++ b/MultiMaps.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -define( 'MultiMaps_VERSION' , '0.4.2' ); +define( 'MultiMaps_VERSION' , '0.4.3' ); // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/Settings.php b/Settings.php index c7273a8..2f83461 100644 --- a/Settings.php +++ b/Settings.php @@ -43,6 +43,11 @@ $egMultiMaps_Width = 'auto'; $egMultiMaps_Height = '350px'; +// Boolean. If true, allow specify an icon for the marker from the directory +$egMultiMaps_IconAllowFromDirectory = false; +// String. The URL base path to the directory containing icons for markers +$egMultiMaps_IconPath = $wgScriptPath/mapicons; + //TODO //$egMultiMaps_GoogleApiKey = false; //$egMultiMaps_YandexApiKey = false; diff --git a/includes/mapelements/Marker.php b/includes/mapelements/Marker.php index 8e025a2..c4a9dd1 100644 --- a/includes/mapelements/Marker.php +++ b/includes/mapelements/Marker.php @@ -31,13 +31,21 @@ public function setProperty($name, $value) { if( strtolower($name) == 'icon' ) { - $title = \Title::newFromText( $value, NS_FILE ); - if ( !is_null( $title ) $title-exists() ) { - $imagePage = new \ImagePage( $title ); - $value = $imagePage-getDisplayedFile()-getURL(); + if ( $value[0] == '/' $GLOBALS['egMultiMaps_IconAllowFromDirectory'] === true ) { + if ( preg_match('#[^0-9a-zA-Zа-яА-Я./_=\+\-]#', $value) || preg_match('#/../#', $value) ) { + $this-errormessages[] = \wfMessage( 'multimaps-marker-incorrect-icon', $value )-escaped(); + return false; + } + $value = $GLOBALS['wgServer'] . $GLOBALS['egMultiMaps_IconPath'] . $value; } else { - $this-errormessages[] = \wfMessage( 'multimaps-marker-incorrect-icon', $value )-escaped(); - return false; + $title = \Title::newFromText( $value, NS_FILE ); + if ( !is_null( $title ) $title-exists() ) { + $imagePage = new \ImagePage( $title ); + $value = $imagePage-getDisplayedFile()-getURL(); + } else { + $this-errormessages[] = \wfMessage( 'multimaps-marker-incorrect-icon', $value )-escaped(); + return false; + } } } return parent::setProperty($name, $value); diff --git a/services/Google/Google.php b/services/Google/Google.php index 5221f42..425aede 100644 --- a/services/Google/Google.php +++ b/services/Google/Google.php @@ -25,7 +25,7 @@ $urlArgs = array(); $urlArgs['sensor'] = 'false'; - $this-headerItem .= \Html::linkedScript( 'http://maps.googleapis.com/maps/api/js?'.wfArrayToCgi($urlArgs) ) . \n; + $this-headerItem .= \Html::linkedScript( 'https://maps.googleapis.com/maps/api/js?'.wfArrayToCgi($urlArgs) ) . \n; } } \ No newline at end of file diff --git a/services/Yandex/Yandex.php b/services/Yandex/Yandex.php index d792bef..b7474eb 100644 --- a/services/Yandex/Yandex.php +++ b/services/Yandex/Yandex.php @@ -26,7 +26,7 @@ $urlArgs = array(); $urlArgs['load'] = 'package.standard,package.geoObjects'; $urlArgs['lang'] = 'ru-RU'; - $this-headerItem .= \Html::linkedScript( 'http://api-maps.yandex.ru/2.0-stable/?'.wfArrayToCgi($urlArgs) ) . \n; + $this-headerItem .= \Html::linkedScript( 'https://api-maps.yandex.ru/2.0-stable/?'.wfArrayToCgi($urlArgs) ) . \n; } } \ No newline at end of file diff --git a/tests/phpunit/services/Yandex/YandexTest.php
[MediaWiki-commits] [Gerrit] Add env.rb and clarify the GWT - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106222 Change subject: Add env.rb and clarify the GWT .. Add env.rb and clarify the GWT Change-Id: I11bf74943f2956055eb5b38379c0b1db1f34f6a7 --- M tests/browser/features/special_content_translation.feature A tests/browser/features/support/env.rb 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/22/106222/1 diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index e996ce1..901401a 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -31,9 +31,9 @@ And the translation column's direction is left-to-right And I see an input box pre-filled with the text Bratislava above the writing area in the second column And I see dansk below the translation column's title - And I see an translation information column - And I see a Publish Translation button - And I see a translation progress bar + And I see a translation information column at the top of the page + And I see a Publish Translation button at the top of the page + And I see a translation progress bar at the top of the page Scenario: Writing some translation text and saving it Given I am logged in diff --git a/tests/browser/features/support/env.rb b/tests/browser/features/support/env.rb new file mode 100644 index 000..24feda0 --- /dev/null +++ b/tests/browser/features/support/env.rb @@ -0,0 +1 @@ +require mediawiki/selenium -- To view, visit https://gerrit.wikimedia.org/r/106222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11bf74943f2956055eb5b38379c0b1db1f34f6a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add env.rb and clarify the GWT - change (mediawiki...ContentTranslation)
SuchetaG has submitted this change and it was merged. Change subject: Add env.rb and clarify the GWT .. Add env.rb and clarify the GWT Change-Id: I11bf74943f2956055eb5b38379c0b1db1f34f6a7 --- M tests/browser/features/special_content_translation.feature A tests/browser/features/support/env.rb 2 files changed, 4 insertions(+), 3 deletions(-) Approvals: SuchetaG: Verified; Looks good to me, approved diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index e996ce1..901401a 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -31,9 +31,9 @@ And the translation column's direction is left-to-right And I see an input box pre-filled with the text Bratislava above the writing area in the second column And I see dansk below the translation column's title - And I see an translation information column - And I see a Publish Translation button - And I see a translation progress bar + And I see a translation information column at the top of the page + And I see a Publish Translation button at the top of the page + And I see a translation progress bar at the top of the page Scenario: Writing some translation text and saving it Given I am logged in diff --git a/tests/browser/features/support/env.rb b/tests/browser/features/support/env.rb new file mode 100644 index 000..24feda0 --- /dev/null +++ b/tests/browser/features/support/env.rb @@ -0,0 +1 @@ +require mediawiki/selenium -- To view, visit https://gerrit.wikimedia.org/r/106222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I11bf74943f2956055eb5b38379c0b1db1f34f6a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: SuchetaG sucheta.ghos...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove hooper, eiximenis - change (operations/dns)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/106223 Change subject: Remove hooper, eiximenis .. Remove hooper, eiximenis hooper is being decomissioned. eiximenis was a CNAME to hooper and as a result needs to be removed too. Change-Id: Icdefdc622e51500d621f8a9d04ca3c7332ecd43f --- M templates/152.80.208.in-addr.arpa M templates/wikimedia.org 2 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/23/106223/1 diff --git a/templates/152.80.208.in-addr.arpa b/templates/152.80.208.in-addr.arpa index 5974825..d11aab8 100644 --- a/templates/152.80.208.in-addr.arpa +++ b/templates/152.80.208.in-addr.arpa @@ -70,7 +70,6 @@ 1451H IN PTR ae0-101.cr2-pmtpa.wikimedia.org. 1461H IN PTR stat1.wikimedia.org. 1471H IN PTR formey.wikimedia.org. -1481H IN PTR hooper.wikimedia.org. 1491H IN PTR kaulen.wikimedia.org. 1541H IN PTR pdf2.wikimedia.org. diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 9d738bc..206eb6a 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -132,7 +132,6 @@ grosley1H IN A208.80.152.164 hafnium1H IN A208.80.154.79 holmium1H IN A208.80.154.49 -hooper 1H IN A208.80.152.148 hume 1H IN A208.80.152.190 1H IN 2620:0:860:2:21d:9ff:fe33:f235 hydrogen 1H IN A208.80.154.50 @@ -626,7 +625,6 @@ cs 1H IN CNAMEwikimedia.cz. cz 1H IN CNAMEwikimedia.cz. download 1H IN CNAMEdumps -eiximenis 1H IN CNAMEhooper.wikimedia.org. etherpad 1H IN CNAMEzirconium.wikimedia.org. fundraising1H IN CNAMEaluminium ganglia1H IN CNAMEnickel -- To view, visit https://gerrit.wikimedia.org/r/106223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icdefdc622e51500d621f8a9d04ca3c7332ecd43f Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use file handle caching in newSequentialPerNodeIDs() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Use file handle caching in newSequentialPerNodeIDs() .. Use file handle caching in newSequentialPerNodeIDs() * This is now similar to the other methods in that regard Change-Id: I36163fa7f1bc13d493df9d77b139a99881d0de45 --- M includes/utils/UIDGenerator.php 1 file changed, 23 insertions(+), 2 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index 47cef8b..e60293b 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -243,6 +243,21 @@ * @since 1.23 */ public static function newSequentialPerNodeIDs( $bucket, $bits, $count, $flags = 0 ) { + $gen = self::singleton(); + return $gen-getSequentialPerNodeIDs( $bucket, $bits, $count, $flags ); + } + + /** +* Return IDs that are sequential *only* for this node and bucket +* +* @see UIDGenerator::newSequentialPerNodeID() +* @param string $bucket Arbitrary bucket name (should be ASCII) +* @param integer $bits Bit size (16 to 48) of resulting numbers before wrap-around +* @param integer $count Number of IDs to return (1 to 1) +* @param integer $flags (supports UIDGenerator::QUICK_VOLATILE) +* @return array Ordered list of float integer values +*/ + protected function getSequentialPerNodeIDs( $bucket, $bits, $count, $flags ) { if ( $count = 0 ) { return array(); // nothing to do } elseif ( $count 1 ) { @@ -274,7 +289,13 @@ // Note: use of fmod() avoids division by zero on 32 bit machines if ( $counter === null ) { $path = wfTempDir() . '/mw-' . __CLASS__ . '-' . rawurlencode( $bucket ) . '-48'; - $handle = fopen( $path, 'cb+' ); + // Get the UID lock file handle + if ( isset( $this-fileHandles[$path] ) ) { + $handle = $this-fileHandles[$path]; + } else { + $handle = fopen( $path, 'cb+' ); + $this-fileHandles[$path] = $handle ?: null; // cache + } // Acquire the UID lock file if ( $handle === false ) { throw new MWException( Could not open '{$path}'. ); @@ -292,8 +313,8 @@ fflush( $handle ); // Release the UID lock file flock( $handle, LOCK_UN ); - fclose( $handle ); } + $ids = array(); $divisor = pow( 2, $bits ); $currentId = floor( $counter - $count ); // pre-increment counter value -- To view, visit https://gerrit.wikimedia.org/r/105241 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36163fa7f1bc13d493df9d77b139a99881d0de45 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Call to a member function getCommonMetaArray() on a non-obje... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Call to a member function getCommonMetaArray() on a non-object at File.php on line 586 .. Call to a member function getCommonMetaArray() on a non-object at File.php on line 586 Bug: 59785 Change-Id: I7163f3fd122922a28519b7cb1d3d4cd4b81165ee --- M includes/filerepo/file/File.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index dc35016..c9e435e 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -583,6 +583,9 @@ public function getCommonMetaArray() { $handler = $this-getHandler(); + if ( !$handler ) { + return false; + } return $handler-getCommonMetaArray( $this ); } -- To view, visit https://gerrit.wikimedia.org/r/105998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7163f3fd122922a28519b7cb1d3d4cd4b81165ee Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com Gerrit-Reviewer: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move the arrows and the close/fullscreen button - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/106224 Change subject: Move the arrows and the close/fullscreen button .. Move the arrows and the close/fullscreen button Looks drastic at first, but grows on you. I based this on an extreme, the firefox inner scrollbar. Which is huge when hovered. I kind of wish the close button was a bit bigger, though. Change-Id: I2f47280c4e7c4bff299149de24741e3381f0b5e9 --- M resources/ext.multimediaViewer/ext.multimediaViewer.css M resources/multilightbox/multilightbox.css 2 files changed, 13 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/24/106224/1 diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.css b/resources/ext.multimediaViewer/ext.multimediaViewer.css index 53abdbe..1df5706 100644 --- a/resources/ext.multimediaViewer/ext.multimediaViewer.css +++ b/resources/ext.multimediaViewer/ext.multimediaViewer.css @@ -324,15 +324,15 @@ .mw-mlb-next-image { /* @embed */ background-image: url(img/next-ltr.svg); - right: 5px; background-position: right; + right: 18px; } .mw-mlb-prev-image { /* @embed */ background-image: url(img/prev-ltr.svg); - left: 5px; background-position: left; + left: 18px; } .mw-mlb-next-image.disabled, diff --git a/resources/multilightbox/multilightbox.css b/resources/multilightbox/multilightbox.css index c90cda8..f7304f7 100644 --- a/resources/multilightbox/multilightbox.css +++ b/resources/multilightbox/multilightbox.css @@ -79,22 +79,28 @@ .mlb-close, .mlb-fullscreen { position: absolute; - top: 0px; + margin-top: 14px; + margin-right: 14px; cursor: pointer; - width: 32px; - height: 32px; } .mlb-close { - left: 0px; background-image: url(../img/close.svg); border-right: 1px solid #7d7c81; + height: 23px; + width: 23px; } .mlb-fullscreen { - right: 0px; background-image: url(../img/fullscreen.svg); border-left: 1px solid #7d7c81; + width: 21px; + height: 22px; +} + +.mlb-fullscreen-div .mlb-fullscreen { + width: 28px; + height: 29px; } .mlb-main.mlb-fullscreened { -- To view, visit https://gerrit.wikimedia.org/r/106224 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f47280c4e7c4bff299149de24741e3381f0b5e9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fixed spacing - change (mediawiki/core)
Cargan has uploaded a new change for review. https://gerrit.wikimedia.org/r/106225 Change subject: fixed spacing .. fixed spacing Change-Id: I484c618c6d160e130bd9caaf911f60db7b394658 --- M includes/Title.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/25/106225/1 diff --git a/includes/Title.php b/includes/Title.php index efcc491..7552e0a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1894,7 +1894,7 @@ $errors[] = array( 'cant-move-to-user-page' ); } } elseif ( $action == 'edit' $user-isAnon() !$user-isAllowed( 'edit' ) ) { - $errors[] = array( 'noarticletext-nopermission'); + $errors[] = array( 'noarticletext-nopermission' ); $errors[] = $this-missingPermissionError( $action, $short ); } elseif ( !$user-isAllowed( $action ) ) { $errors[] = $this-missingPermissionError( $action, $short ); -- To view, visit https://gerrit.wikimedia.org/r/106225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I484c618c6d160e130bd9caaf911f60db7b394658 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cargan zie...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Slim down wbCurrentSite to only hold information we need - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/106226 Change subject: Slim down wbCurrentSite to only hold information we need .. Slim down wbCurrentSite to only hold information we need Also removed some old temporary caching code. Change-Id: I6eb37bcc8641d712f686a927d6a6387a28abae8f --- M client/includes/modules/SiteModule.php M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 2 files changed, 3 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/26/106226/1 diff --git a/client/includes/modules/SiteModule.php b/client/includes/modules/SiteModule.php index 9653ccb..e2933cb 100644 --- a/client/includes/modules/SiteModule.php +++ b/client/includes/modules/SiteModule.php @@ -5,8 +5,7 @@ use ResourceLoaderModule; use ResourceLoaderContext; use MediaWikiSite; -use Site; -use Sites; +use SiteSQLStore; use Wikibase\Client\WikibaseClient; /** @@ -33,14 +32,11 @@ /** * @var MediaWikiSite $site */ - $site = Sites::singleton()-getSite( Settings::get( 'siteGlobalID' ) ); + $site = SiteSQLStore::newInstance()-getSite( Settings::get( 'siteGlobalID' ) ); $currentSite = array(); if ( $site ) { - $languageName = Utils::fetchLanguageName( $site-getLanguageCode() ); $currentSite = array( - 'shortName' = $languageName, - 'name' = $languageName, 'globalSiteId' = $site-getGlobalId(), 'languageCode' = $site-getLanguageCode(), 'langLinkSiteGroup' = WikibaseClient::getDefaultInstance()-getLangLinkSiteGroup() diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 85db4fe..81c8ba5 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -81,11 +81,7 @@ globalSiteId: mw.config.get( 'wbCurrentSite' ).globalSiteId, namespaceNumber: mw.config.get( 'wgNamespaceNumber' ), repoArticlePath: mw.config.get( 'wbRepoUrl' ) + mw.config.get( 'wbRepoArticlePath' ), - langLinkSiteGroup: - mw.config.get( 'wbCurrentSite' ).langLinkSiteGroup - // Fallback to the site group of the current site in case .langLinkSiteGroup isn't yet - // in the cache: - || wb.getSite( mw.config.get( 'wbCurrentSite' ).globalSiteId ).getGroup() + langLinkSiteGroup: mw.config.get( 'wbCurrentSite' ).langLinkSiteGroup }, /** -- To view, visit https://gerrit.wikimedia.org/r/106226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6eb37bcc8641d712f686a927d6a6387a28abae8f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set up jobs for ContentTranslation repo - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: Set up jobs for ContentTranslation repo .. Set up jobs for ContentTranslation repo Change-Id: Ic7fc9b34a3ea93fbbfb69292e708a7a4acfbe4e5 --- M layout.yaml 1 file changed, 14 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 5af511f..882fbce 100644 --- a/layout.yaml +++ b/layout.yaml @@ -1401,6 +1401,20 @@ - mwext-ConfirmEdit-pep8 - mwext-ConfirmEdit-pyflakes + - name: mediawiki/extensions/ContentTranslation +check-only: + - mwext-ContentTranslation-phpcs-strict-HEAD # Experiment, bug 48420 + - mwext-ContentTranslation-jslint + - mwext-ContentTranslation-lint + - mwext-ContentTranslation-ruby1.9.3lint + - mwext-ContentTranslation-yamllint +gate-and-submit: + - mwext-ContentTranslation-phpcs-strict-HEAD # Experiment, bug 48420 + - mwext-ContentTranslation-jslint + - mwext-ContentTranslation-lint + - mwext-ContentTranslation-ruby1.9.3lint + - mwext-ContentTranslation-yamllint + - name: mediawiki/extensions/ContributionScores template: - name: extension-checks -- To view, visit https://gerrit.wikimedia.org/r/105941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic7fc9b34a3ea93fbbfb69292e708a7a4acfbe4e5 Gerrit-PatchSet: 2 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add special page Special:ContentTranslation - change (mediawiki...ContentTranslation)
Santhosh has submitted this change and it was merged. Change subject: Add special page Special:ContentTranslation .. Add special page Special:ContentTranslation Change-Id: I59a1349ad3a9ca0a044165dc870b2aef15ca3ed3 --- A Autoload.php A ContentTranslation.alias.php M ContentTranslation.php A specials/SpecialContentTranslation.php 4 files changed, 85 insertions(+), 2 deletions(-) Approvals: Santhosh: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve diff --git a/Autoload.php b/Autoload.php new file mode 100644 index 000..973707c --- /dev/null +++ b/Autoload.php @@ -0,0 +1,12 @@ +?php +/** + * Autoload definitions. + * + * @file + * @copyright 2014 ContentTranslation Team and others; see AUTHORS.txt + * @license GPL-2.0+; see LICENSE.txt + */ + +$dir =__DIR__; + +$wgAutoloadClasses['SpecialContentTranslation'] = $dir/specials/SpecialContentTranslation.php; diff --git a/ContentTranslation.alias.php b/ContentTranslation.alias.php new file mode 100644 index 000..0b53484 --- /dev/null +++ b/ContentTranslation.alias.php @@ -0,0 +1,21 @@ +?php +/** + * Special page aliases for extension ContentTranslation. + * + * @file + * @ingroup Extensions + * @copyright 2014 ContentTranslation Team and others; see AUTHORS.txt + * @license GPL-2.0+; see LICENSE.txt + */ + +$specialPageAliases = array(); + +/** English (English) */ +$specialPageAliases['en'] = array( + 'ContentTranslation' = array( 'ContentTranslation' ), +); + +/** Malayalam (മലയാളം) */ +$specialPageAliases['ml'] = array( + 'ContentTranslation' = array( 'ലേഖനപരിഭാഷ' ), +); diff --git a/ContentTranslation.php b/ContentTranslation.php index 815939a..768ce70 100644 --- a/ContentTranslation.php +++ b/ContentTranslation.php @@ -37,6 +37,13 @@ 'url' = 'https://www.mediawiki.org/wiki/Extension:ContentTranslation', ); -require __DIR__ . '/Resources.php'; +$dir = __DIR__; -$wgMessagesDirs['ContentTranslation'] = __DIR__ . /i18n/; \ No newline at end of file +require_once $dir/Resources.php; +require_once $dir/Autoload.php; + +$GLOBALS['wgMessagesDirs']['ContentTranslation'] = __DIR__ . /i18n; +$GLOBALS['wgMessagesDirs']['ContentTranslationAlias'] = __DIR__ . /ContentTranslation.alias.php; + +// Special pages +$wgSpecialPages['ContentTranslation'] = 'SpecialContentTranslation'; diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php new file mode 100644 index 000..23b619c --- /dev/null +++ b/specials/SpecialContentTranslation.php @@ -0,0 +1,43 @@ +?php +/** + * Contains special page Special:ContentTranslation. + * + * @file + * @copyright 2014 ContentTranslation Team and others; see AUTHORS.txt + * @license GPL-2.0+; see LICENSE.txt + */ + +/** + * Implements the core of Content Translation extension - a special page which + * shows Content Translation user interface. + * @ingroup SpecialPage + */ +class SpecialContentTranslation extends SpecialPage { + function __construct() { + parent::__construct( 'ContentTranslation' ); + } + + public function getDescription() { + return $this-msg( 'ct' )-text(); + } + + public function execute( $parameters ) { + $out = $this-getOutput(); + $skin = $this-getSkin(); + $this-setHeaders(); + $out-setArticleBodyOnly( true ); + // Default modules copied from OutputPage::addDefaultModules + $out-addModules( array( + 'mediawiki.user', + 'mediawiki.page.startup', + 'mediawiki.page.ready', + ) ); + + $out-addHTML( $out-headElement( $skin ) ); + // Enable this if you need useful debugging information + // $out-addHtml( MWDebug::getDebugHTML( $this-getContext() ) ); + wfRunHooks( 'BeforePageDisplay', array( $out, $skin ) ); + $out-addHTML( $skin-bottomScripts() ); + $out-addHTML( '/body/html' ); + } +} -- To view, visit https://gerrit.wikimedia.org/r/106214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59a1349ad3a9ca0a044165dc870b2aef15ca3ed3 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: SuchetaG sucheta.ghos...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Zuul status page: support for progress bar - change (integration/docroot)
jenkins-bot has submitted this change and it was merged. Change subject: Zuul status page: support for progress bar .. Zuul status page: support for progress bar Copy pasted from http://status.openstack.org/zuul/ which shows the progress of jobs while they are being run by Jenkins. The new Zuul version provides the elapsed and remaning time for a job which are passed to a HTML5 progress element. The functions comes as-is from Openstack: ssh://review.openstack.org:29418/openstack-infra/config.git modules/openstack_project/files/zuul/status.js I have adapted them to pass jshint and use the object oriented style we are using. progress styling is a mess since each browser behave a bit differently. Tested out on Chromium/Safari/Firefox. Hopefully IE is right. Tested locally seems good for me. Might want to deploy and adjust later. Change-Id: Iff472abbbd7815ce328291b11dc5c1173c9c5951 --- M org/wikimedia/integration/zuul/index.php M org/wikimedia/integration/zuul/status.js 2 files changed, 97 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/org/wikimedia/integration/zuul/index.php b/org/wikimedia/integration/zuul/index.php index 2e1d107..5bebc95 100644 --- a/org/wikimedia/integration/zuul/index.php +++ b/org/wikimedia/integration/zuul/index.php @@ -52,6 +52,43 @@ text-transform: none; } +.zuul-change-progress { + width: 4em; + float: right; + margin-top:0.30em; +} + +progress, +progress[role] { + appearance: none; + -moz-appearance: none; + -webkit-appearance: none; + border: none; + background-image: none; +} + +/** IE10 */ +progress { + color: #069; +} +/** Firefox, maybe IE10 as well */ +progress { + background: #C0C0C0; +} + +/** Webkit */ +progress::-webkit-progress-value { + background: #069; +} +progress::-webkit-progress-bar { + background: #C0C0C0; +} + +/** Firefox */ +progress::-moz-progress-bar { + background: #069; +} + .zuul-result { text-shadow: none; font-weight: normal; diff --git a/org/wikimedia/integration/zuul/status.js b/org/wikimedia/integration/zuul/status.js index 0df3de3..5c33a4f 100644 --- a/org/wikimedia/integration/zuul/status.js +++ b/org/wikimedia/integration/zuul/status.js @@ -131,22 +131,80 @@ break; } html += 'li class=zuul-change-job'; + html += job.url !== null ? 'a href=' + job.url + ' class=zuul-change-job-link' : 'span class=zuul-change-job-link'; + html += job.name; - html += ' span class=' + resultClass + '' + result + '/span'; if (job.voting === false) { html += ' span class=muted(non-voting)/span'; } + + if (job.result === null job.url !== null) { + html += zuul.format.progress(job.elapsed_time, job.remaining_time); + } else { + // job completed + html += ' span class=' + resultClass + '' + result + '/span'; + } + html += job.url !== null ? '/a' : '/span'; - html += '/li'; + + + html += '/li'; // .zuul-change-job }); html += '/ul/div'; return html; }, + // From Openstack format_time() + // Passed via jshint + time: function (ms, words) { + if (ms === null) { + return 'unknown'; + } + var r = '', + seconds = (+ms) / 1000, + minutes = Math.floor(seconds / 60), + hours = Math.floor(minutes / 60); + seconds = Math.floor(seconds % 60); + minutes = Math.floor(minutes % 60); + if (words) { + if (hours) { + r += hours; + r += ' hr '; +
[MediaWiki-commits] [Gerrit] Add a steps file with all steps pending - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106227 Change subject: Add a steps file with all steps pending .. Add a steps file with all steps pending Change-Id: Ibcdbcfeede1969545169dc501459a6971f7efe9a --- M tests/browser/features/special_content_translation.feature A tests/browser/features/step_definitions/special_content_translation_steps.rb 2 files changed, 105 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/27/106227/1 diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index 901401a..01e9e10 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -11,33 +11,33 @@ These scenarios test the basic functionality of the Special:ContentTranslation page. Scenario: Anonymous user cannot use Content translation. -Given I am on the content translation page in an English wiki, translating the article Bratislava to Danish +Given I am on the content translation page in a wiki in English, translating the article Bratislava to Danish Then I see the message You must be logged in to translate in this page. And I don't see a source column And I don't see a translation column - And I don't see a Publish Translation + And I don't see a Publish Translation button Scenario: Logged in user viewing the special page for translation. Given I am logged in - And I am on the content translation page in an English wiki, translating the article Bratislava to Danish + And I am on the content translation page in a wiki in English, translating the article Bratislava to Danish Then I see a source column with the content of the article Bratislava And the language code of the source column is en - And the direction of the source column is left-to-right + And the direction of the source column is ltr And I see the title Bratislava at the top of the source column And I see a language label saying English below the source column's title And I see a view article link that points to the page Bratislava on the same wiki And I see a translation column with an empty editing area - And the translation column's language code is da - And the translation column's direction is left-to-right - And I see an input box pre-filled with the text Bratislava above the writing area in the second column - And I see dansk below the translation column's title - And I see a translation information column at the top of the page + And the language code of the translation column is da + And the direction of the translation column is ltr + And I see an input box pre-filled with the text Bratislava above the editing area in the second column + And I see a language label saying dansk below the translation column's title + And I see a translation information column And I see a Publish Translation button at the top of the page And I see a translation progress bar at the top of the page Scenario: Writing some translation text and saving it Given I am logged in - And I am on the content translation page in an English wiki, translating the article Bratislava to Danish + And I am on the content translation page in a wiki in English, translating the article Bratislava to Danish When I write Bratislava er hovedstad og største by i Slovakiet. in the editing area in the translation column And I press the Publish Translation button Then the page User:TranslatorToDa/Bratislava is displayed diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb new file mode 100644 index 000..da628f3 --- /dev/null +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -0,0 +1,95 @@ +Given(/^I am on the content translation page in a wiki in (.+?), translating the article (.+?) to (.+)$/) do |source_language, article_name, target_language| + pending # express the regexp above with the code you wish you had +end + +When(/^I press the Publish Translation button$/) do + pending # express the regexp above with the code you wish you had +end + +When(/^I write (.*?) in the editing area in the translation column$/) do |translation| + pending # express the regexp above with the code you wish you had +end + +Then(/^I don't see a Publish Translation button$/) do + pending # express the regexp above with the code you wish you had +end + +Then(/^I don't see a source column$/) do + pending # express the regexp above with the code you wish you had +end +
[MediaWiki-commits] [Gerrit] Add a steps file with all steps pending - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Add a steps file with all steps pending .. Add a steps file with all steps pending Change-Id: Ibcdbcfeede1969545169dc501459a6971f7efe9a --- M tests/browser/features/special_content_translation.feature A tests/browser/features/step_definitions/special_content_translation_steps.rb 2 files changed, 105 insertions(+), 10 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index 901401a..01e9e10 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -11,33 +11,33 @@ These scenarios test the basic functionality of the Special:ContentTranslation page. Scenario: Anonymous user cannot use Content translation. -Given I am on the content translation page in an English wiki, translating the article Bratislava to Danish +Given I am on the content translation page in a wiki in English, translating the article Bratislava to Danish Then I see the message You must be logged in to translate in this page. And I don't see a source column And I don't see a translation column - And I don't see a Publish Translation + And I don't see a Publish Translation button Scenario: Logged in user viewing the special page for translation. Given I am logged in - And I am on the content translation page in an English wiki, translating the article Bratislava to Danish + And I am on the content translation page in a wiki in English, translating the article Bratislava to Danish Then I see a source column with the content of the article Bratislava And the language code of the source column is en - And the direction of the source column is left-to-right + And the direction of the source column is ltr And I see the title Bratislava at the top of the source column And I see a language label saying English below the source column's title And I see a view article link that points to the page Bratislava on the same wiki And I see a translation column with an empty editing area - And the translation column's language code is da - And the translation column's direction is left-to-right - And I see an input box pre-filled with the text Bratislava above the writing area in the second column - And I see dansk below the translation column's title - And I see a translation information column at the top of the page + And the language code of the translation column is da + And the direction of the translation column is ltr + And I see an input box pre-filled with the text Bratislava above the editing area in the second column + And I see a language label saying dansk below the translation column's title + And I see a translation information column And I see a Publish Translation button at the top of the page And I see a translation progress bar at the top of the page Scenario: Writing some translation text and saving it Given I am logged in - And I am on the content translation page in an English wiki, translating the article Bratislava to Danish + And I am on the content translation page in a wiki in English, translating the article Bratislava to Danish When I write Bratislava er hovedstad og største by i Slovakiet. in the editing area in the translation column And I press the Publish Translation button Then the page User:TranslatorToDa/Bratislava is displayed diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb new file mode 100644 index 000..da628f3 --- /dev/null +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -0,0 +1,95 @@ +Given(/^I am on the content translation page in a wiki in (.+?), translating the article (.+?) to (.+)$/) do |source_language, article_name, target_language| + pending # express the regexp above with the code you wish you had +end + +When(/^I press the Publish Translation button$/) do + pending # express the regexp above with the code you wish you had +end + +When(/^I write (.*?) in the editing area in the translation column$/) do |translation| + pending # express the regexp above with the code you wish you had +end + +Then(/^I don't see a Publish Translation button$/) do + pending # express the regexp above with the code you wish you had +end + +Then(/^I don't see a source column$/) do + pending # express the regexp above with the code you wish you had +end + +Then(/^I don't see a translation column$/) do + pending
[MediaWiki-commits] [Gerrit] Add ContentTranslationPage class to the browser tests - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106228 Change subject: Add ContentTranslationPage class to the browser tests .. Add ContentTranslationPage class to the browser tests Change-Id: Ie88822ee47fc5e7f15ebe7af443d83743287cf81 --- M tests/browser/features/special_content_translation.feature M tests/browser/features/step_definitions/special_content_translation_steps.rb A tests/browser/features/support/pages/content_translation_page.rb 3 files changed, 30 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/28/106228/1 diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index 01e9e10..2d6d6f5 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -32,8 +32,8 @@ And I see an input box pre-filled with the text Bratislava above the editing area in the second column And I see a language label saying dansk below the translation column's title And I see a translation information column - And I see a Publish Translation button at the top of the page - And I see a translation progress bar at the top of the page + And I see a Publish Translation button + And I see a translation progress bar Scenario: Writing some translation text and saving it Given I am logged in diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index da628f3..f9a6dc3 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -3,31 +3,31 @@ end When(/^I press the Publish Translation button$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).publish_translation end When(/^I write (.*?) in the editing area in the translation column$/) do |translation| - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).translation_editing_area = translation end Then(/^I don't see a Publish Translation button$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).publish_translation_element.should_not be_visible end Then(/^I don't see a source column$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).source_column.should_not be_visible end Then(/^I don't see a translation column$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).translation_column.should_not be_visible end -Then(/^I see a Publish Translation button at the top of the page$/) do - pending # express the regexp above with the code you wish you had +Then(/^I see a Publish Translation button$/) do + on(ContentTranslationPage).publish_translation_element.should be_visible end -Then(/^I see a view article link that points to the page (.*?) on the same wiki$/) do |source_page| - pending # express the regexp above with the code you wish you had +Then(/^I see a view article link in the source column$/) do + on(ContentTranslationPage).view_article.should be_visible end Then(/^I see a language label saying (.*?) below the source column's title$/) do |language_name| @@ -54,7 +54,7 @@ pending # express the regexp above with the code you wish you had end -Then(/^I see a translation progress bar at the top of the page$/) do +Then(/^I see a translation progress bar$/) do pending # express the regexp above with the code you wish you had end @@ -93,3 +93,7 @@ Then(/^the page (.+?) is displayed$/) do |page_title| pending # express the regexp above with the code you wish you had end + +Then(/^the view article link points to the page (.*?) on the same wiki$/) do |source_page| + pending # express the regexp above with the code you wish you had +end diff --git a/tests/browser/features/support/pages/content_translation_page.rb b/tests/browser/features/support/pages/content_translation_page.rb new file mode 100644 index 000..e573f65 --- /dev/null +++ b/tests/browser/features/support/pages/content_translation_page.rb @@ -0,0 +1,14 @@ +class ContentTranslationPage + include PageObject + include URL + page_url URL.url(Special:ContentTranslation) + + button(:publish_translation, class: publish-translation) + + div(:source_column, class: source) + div(:translation_column, class: translation) + + def translation_editing_area +
[MediaWiki-commits] [Gerrit] Add ContentTranslationPage class to the browser tests - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Add ContentTranslationPage class to the browser tests .. Add ContentTranslationPage class to the browser tests Change-Id: Ie88822ee47fc5e7f15ebe7af443d83743287cf81 --- M tests/browser/features/special_content_translation.feature M tests/browser/features/step_definitions/special_content_translation_steps.rb A tests/browser/features/support/pages/content_translation_page.rb 3 files changed, 30 insertions(+), 12 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index 01e9e10..2d6d6f5 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -32,8 +32,8 @@ And I see an input box pre-filled with the text Bratislava above the editing area in the second column And I see a language label saying dansk below the translation column's title And I see a translation information column - And I see a Publish Translation button at the top of the page - And I see a translation progress bar at the top of the page + And I see a Publish Translation button + And I see a translation progress bar Scenario: Writing some translation text and saving it Given I am logged in diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index da628f3..f9a6dc3 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -3,31 +3,31 @@ end When(/^I press the Publish Translation button$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).publish_translation end When(/^I write (.*?) in the editing area in the translation column$/) do |translation| - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).translation_editing_area = translation end Then(/^I don't see a Publish Translation button$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).publish_translation_element.should_not be_visible end Then(/^I don't see a source column$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).source_column.should_not be_visible end Then(/^I don't see a translation column$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).translation_column.should_not be_visible end -Then(/^I see a Publish Translation button at the top of the page$/) do - pending # express the regexp above with the code you wish you had +Then(/^I see a Publish Translation button$/) do + on(ContentTranslationPage).publish_translation_element.should be_visible end -Then(/^I see a view article link that points to the page (.*?) on the same wiki$/) do |source_page| - pending # express the regexp above with the code you wish you had +Then(/^I see a view article link in the source column$/) do + on(ContentTranslationPage).view_article.should be_visible end Then(/^I see a language label saying (.*?) below the source column's title$/) do |language_name| @@ -54,7 +54,7 @@ pending # express the regexp above with the code you wish you had end -Then(/^I see a translation progress bar at the top of the page$/) do +Then(/^I see a translation progress bar$/) do pending # express the regexp above with the code you wish you had end @@ -93,3 +93,7 @@ Then(/^the page (.+?) is displayed$/) do |page_title| pending # express the regexp above with the code you wish you had end + +Then(/^the view article link points to the page (.*?) on the same wiki$/) do |source_page| + pending # express the regexp above with the code you wish you had +end diff --git a/tests/browser/features/support/pages/content_translation_page.rb b/tests/browser/features/support/pages/content_translation_page.rb new file mode 100644 index 000..e573f65 --- /dev/null +++ b/tests/browser/features/support/pages/content_translation_page.rb @@ -0,0 +1,14 @@ +class ContentTranslationPage + include PageObject + include URL + page_url URL.url(Special:ContentTranslation) + + button(:publish_translation, class: publish-translation) + + div(:source_column, class: source) + div(:translation_column, class: translation) + + def translation_editing_area + @browser.div(css: .translation div[contenteditable]) + end +end
[MediaWiki-commits] [Gerrit] Migrating to use new JSON message backend. - change (mediawiki...HostStats)
Hydriz has uploaded a new change for review. https://gerrit.wikimedia.org/r/106229 Change subject: Migrating to use new JSON message backend. .. Migrating to use new JSON message backend. Change-Id: I9fd76b9d20205a8cdf683803b0575c0fd99e8578 --- M HostStats.i18n.php M HostStats.php A i18n/ast.json A i18n/cs.json A i18n/de.json A i18n/el.json A i18n/en.json A i18n/es.json A i18n/fa.json A i18n/fr.json A i18n/frp.json A i18n/gl.json A i18n/he.json A i18n/hsb.json A i18n/hu.json A i18n/it.json A i18n/ja.json A i18n/ko.json A i18n/ksh.json A i18n/lb.json A i18n/mk.json A i18n/ms.json A i18n/nl.json A i18n/oc.json A i18n/pl.json A i18n/pms.json A i18n/pt-br.json A i18n/qqq.json A i18n/ro.json A i18n/roa-tara.json A i18n/ru.json A i18n/si.json A i18n/uk.json A i18n/zh-hans.json A i18n/zh-hant.json 35 files changed, 343 insertions(+), 300 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/HostStats refs/changes/29/106229/1 diff --git a/HostStats.i18n.php b/HostStats.i18n.php index 26c51c7..6207270 100644 --- a/HostStats.i18n.php +++ b/HostStats.i18n.php @@ -1,303 +1,20 @@ ?php -/** - * Internationalisation file for HostStats extension. - * - * @file - * @ingroup Extensions - */ - $messages = array(); +$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, $cachedData ) { + $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); + foreach ( $codeSequence as $csCode ) { + $fileName = __DIR__ . /i18n/$csCode.json; + if ( is_readable( $fileName ) ) { + $data = FormatJson::decode( file_get_contents( $fileName ), true ); + foreach ( $data as $key = $unused ) { + if ( $key === '' || $key[0] === '@' ) { + unset( $data[$key] ); + } + } + $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); + } -/** English - * @author Hydriz - */ -$messages['en'] = array( - 'hoststats' = '{{int:hoststats-title}}', // Do not translate this message - 'hoststats-title' = 'Host statistics', - 'hoststats-desc' = 'A tool to output the host statistics that the wiki is on', - 'hoststats-intro' = 'This page shows some host statistics that the wiki is on.', -); - -/** Message documentation (Message documentation) - * @author Hydriz - * @author Shirayuki - */ -$messages['qqq'] = array( - 'hoststats' = '{{notranslate}} -Refers to {{msg-mw|Hoststats-title}}.', - 'hoststats-title' = '{{doc-special|HostStats}} -Host refers to the server the wiki is on.', - 'hoststats-desc' = '{{desc|name=Host Stats|url=http://www.mediawiki.org/wiki/Extension:HostStats}}', - 'hoststats-intro' = 'The introduction to the special page. Host refers to the server the wiki is on.', -); - -/** Asturian (asturianu) - * @author Xuacu - */ -$messages['ast'] = array( - 'hoststats-title' = 'Estadístiques del sirvidor', - 'hoststats-desc' = Ferramienta qu'amuesa les estadístiques del sirvidor nel que ta la wiki., - 'hoststats-intro' = 'Esta páxina amuesa delles estadístiques del sirvidor nel que ta la wiki.', -); - -/** Czech (čeština) - * @author Vks - */ -$messages['cs'] = array( - 'hoststats-title' = 'Statistika serveru', -); - -/** German (Deutsch) - * @author Metalhead64 - */ -$messages['de'] = array( - 'hoststats-title' = 'Hoststatistiken', - 'hoststats-desc' = 'Ergänzt ein Werkzeug zur Ausgabe von Statistiken des Hosts dieses Wikis', - 'hoststats-intro' = 'Diese Seite zeigt einige Statistiken des Hosts dieses Wikis an.', -); - -/** Greek (Ελληνικά) - * @author ZaDiak - */ -$messages['el'] = array( - 'hoststats-title' = 'Στατιστικά υποδοχής', -); - -/** Spanish (español) - * @author Armando-Martin - */ -$messages['es'] = array( - 'hoststats-title' = 'Estadísticas del servidor', - 'hoststats-desc' = 'Una herramienta muestra las estadísticas del servidor en que encuentra la wiki.', - 'hoststats-intro' = 'Esta página muestra algunas estadísticas del servidor en que se encuentra el wiki.', -); - -/** Persian (فارسی) - * @author Armin1392 - */ -$messages['fa'] = array( - 'hoststats-title' = 'آمارهای گروه', - 'hoststats-desc' = 'ابزاری برای عرضهٔ آمارهای گروهی که ویکی در آن است', - 'hoststats-intro' = 'این صفحه بعضی از آمارهای گروهی را که ویکی در آن است را نمایش میدهد.', -); - -/** French (français) - * @author Gomoko - */ -$messages['fr'] = array( - 'hoststats-title' = Statistiques de l'hôte, - 'hoststats-desc' = Un outil pour sortir les statistiques de l'hôte sur lequel se trouve le wiki., - 'hoststats-intro' = Cette page affiche des statistiques de l'hôte sur lequel se trouve le wiki., -); - -/**
[MediaWiki-commits] [Gerrit] (bug 58422) omit TOC with less than 3 sections - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 58422) omit TOC with less than 3 sections .. (bug 58422) omit TOC with less than 3 sections Change-Id: If830fafe10df44f68d9948f9e87211b76369849c --- M repo/includes/EntityView.php M repo/tests/phpunit/includes/PropertyViewTest.php 2 files changed, 16 insertions(+), 2 deletions(-) Approvals: Hoo man: Looks good to me, but someone else must approve Addshore: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 79255af..e13c33d 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -259,10 +259,17 @@ * * @return string */ - protected function getHtmlForToc() { + public function getHtmlForToc() { $tocContent = ''; $tocSections = $this-getTocSections(); + if ( count( $tocSections ) 2 ) { + // Including the marker for the termbox toc entry, there is fewer + // 3 sections. MediaWiki core doesn't show a TOC unless there are + // at least 3 sections, so we shouldn't either. + return ''; + } + // Placeholder for the TOC entry for the term box (which may or may not be used for a given user). // EntityViewPlaceholderExpander must know about the 'termbox-toc' name. $tocContent .= $this-injector-newMarker( 'termbox-toc' ); diff --git a/repo/tests/phpunit/includes/PropertyViewTest.php b/repo/tests/phpunit/includes/PropertyViewTest.php index 9c9466b..e3ae8e2 100644 --- a/repo/tests/phpunit/includes/PropertyViewTest.php +++ b/repo/tests/phpunit/includes/PropertyViewTest.php @@ -10,7 +10,7 @@ /** * @covers Wikibase\PropertyView * - * @since 0.1 + * @since 0.5 * * @group Wikibase * @group WikibasePropertyView @@ -65,4 +65,11 @@ /* @var Property $entity */ $entityData['datatype'] = $entity-getDataTypeId(); } + + public function testGetHtmlForToc() { + $entityView = $this-newEntityView( Property::ENTITY_TYPE ); + $toc = $entityView-getHtmlForToc(); + + $this-assertSame( '', $toc, properties should currently not have a TOC ); + } } -- To view, visit https://gerrit.wikimedia.org/r/101433 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If830fafe10df44f68d9948f9e87211b76369849c Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Bene benestar.wikime...@googlemail.com Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix missing apostrophe in maintenance/generateJsonI18n.php - change (mediawiki/core)
Hydriz has uploaded a new change for review. https://gerrit.wikimedia.org/r/106230 Change subject: Fix missing apostrophe in maintenance/generateJsonI18n.php .. Fix missing apostrophe in maintenance/generateJsonI18n.php Change-Id: I3f678df09853bfdb6295985c81d4469024aecfbb --- M maintenance/generateJsonI18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/106230/1 diff --git a/maintenance/generateJsonI18n.php b/maintenance/generateJsonI18n.php index 554e0a8..3b7a652 100644 --- a/maintenance/generateJsonI18n.php +++ b/maintenance/generateJsonI18n.php @@ -97,7 +97,7 @@ } $this-output( All done.\n ); - $this-output( Also add \$wgMessagesDirs['YourExtension'] = __DIR__ . /i18n';\n ); + $this-output( Also add \$wgMessagesDirs['YourExtension'] = __DIR__ . '/i18n';\n ); } protected function doShim( $jsondir ) { -- To view, visit https://gerrit.wikimedia.org/r/106230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f678df09853bfdb6295985c81d4469024aecfbb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Hydriz ad...@alphacorp.tk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove tracking branch for submodules - change (mediawiki...Wikidata)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/106231 Change subject: remove tracking branch for submodules .. remove tracking branch for submodules We want to stop gerrit from autoupdating them, while we change how stuff is organized. Change-Id: Idbdcf9398e830cb2f5d5a3b7e4ccae2a4aa18df6 --- M .gitmodules 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/31/106231/1 diff --git a/.gitmodules b/.gitmodules index 5cfb4d4..fe0931b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,20 +1,15 @@ [submodule WikibaseDataModel] path = WikibaseDataModel url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/WikibaseDataModel.git - branch = master [submodule Wikibase] path = Wikibase url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git - branch = master [submodule Diff] path = Diff url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Diff.git - branch = master [submodule DataValues] path = DataValues url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataValues.git - branch = master [submodule DataTypes] path = DataTypes url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataTypes.git - branch = master -- To view, visit https://gerrit.wikimedia.org/r/106231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idbdcf9398e830cb2f5d5a3b7e4ccae2a4aa18df6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use EntityRevision for EntityData - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Use EntityRevision for EntityData .. Use EntityRevision for EntityData This replaces the use of EntityContent with EntityRevision in the EntityData facility. Change-Id: I81f519a2889b6a2d6a33789aeb00c469ee61bafc --- M repo/includes/LinkedData/EntityDataRequestHandler.php M repo/includes/LinkedData/EntityDataSerializationService.php M repo/includes/rdf/RdfBuilder.php M repo/includes/rdf/RdfSerializer.php M repo/includes/specials/SpecialEntityData.php M repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php M repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M repo/tests/phpunit/includes/rdf/RdfSerializerTest.php M repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php 10 files changed, 138 insertions(+), 167 deletions(-) Approvals: Addshore: Looks good to me, approved diff --git a/repo/includes/LinkedData/EntityDataRequestHandler.php b/repo/includes/LinkedData/EntityDataRequestHandler.php index e4eae5a..8be326f 100644 --- a/repo/includes/LinkedData/EntityDataRequestHandler.php +++ b/repo/includes/LinkedData/EntityDataRequestHandler.php @@ -4,16 +4,16 @@ use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityIdParser; use Wikibase\DataModel\Entity\EntityIdParsingException; -use Wikibase\EntityContentFactory; +use Wikibase\EntityRevisionLookup; +use Wikibase\EntityTitleLookup; use Wikibase\HttpAcceptNegotiator; use Wikibase\HttpAcceptParser; -use \Revision; -use \WebRequest; -use \WebResponse; -use \OutputPage; -use \HttpError; -use \SquidUpdate; -use Wikibase\Repo\WikibaseRepo; +use WebRequest; +use WebResponse; +use OutputPage; +use HttpError; +use SquidUpdate; +use Wikibase\StorageException; /** * Request handler implementing a linked data interface for Wikibase entities. @@ -51,9 +51,14 @@ protected $entityIdParser; /** -* @var EntityContentFactory +* @var EntityRevisionLookup */ - protected $entityContentFactory; + protected $entityRevisionLookup; + + /** +* @var EntityTitleLookup +*/ + protected $entityTitleLookup; /** * @var string @@ -74,7 +79,8 @@ * @since 0.4 * * @param EntityDataUriManager $uriManager -* @param EntityContentFactory $entityContentFactory +* @param EntityTitleLookup $entityTitleLookup +* @param EntityRevisionLookup $entityRevisionLookup * @param EntityIdParser $entityIdParser * @param EntityDataSerializationService $serializationService * @param string $defaultFormat @@ -84,7 +90,8 @@ */ public function __construct( EntityDataUriManager $uriManager, - EntityContentFactory $entityContentFactory, + EntityTitleLookup $entityTitleLookup, + EntityRevisionLookup $entityRevisionLookup, EntityIdParser $entityIdParser, EntityDataSerializationService $serializationService, $defaultFormat, @@ -93,7 +100,8 @@ $frameOptionsHeader ) { $this-uriManager = $uriManager; - $this-entityContentFactory = $entityContentFactory; + $this-entityTitleLookup = $entityTitleLookup; + $this-entityRevisionLookup = $entityRevisionLookup; $this-entityIdParser = $entityIdParser; $this-serializationService = $serializationService; $this-defaultFormat = $defaultFormat; @@ -311,14 +319,9 @@ $url = $this-uriManager-getDocUrl( $id, $format, $revision ); $output-redirect( $url, 303 ); - return; } /** - } else { - $title = $this-getDocTitle( $id, $format ); - } - * Output entity data. * * @param WebRequest $request @@ -332,42 +335,18 @@ public function showData( WebRequest $request, OutputPage $output, $format, EntityId $id, $revision ) { $prefixedId = $id-getSerialization(); - $entity = $this-entityContentFactory-getFromId( $id ); - if ( !$entity ) { - wfDebugLog( __CLASS__, __FUNCTION__ . : entity not found: $prefixedId ); - throw new \HttpError( 404, wfMessage( 'wikibase-entitydata-not-found' )-params( $prefixedId ) ); - } + try { + $entityRevision = $this-entityRevisionLookup-getEntityRevision( $id, $revision ); - $page = $entity-getWikiPage(); - - // TODO: use EntityRevisionLookup to get the entity revision,
[MediaWiki-commits] [Gerrit] General cleanup of files touched in G101851 - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/106232 Change subject: General cleanup of files touched in G101851 .. General cleanup of files touched in G101851 Change-Id: I424ef5bcae8c9efb6e87accfc56b6f373b781beb --- M repo/includes/LinkedData/EntityDataRequestHandler.php M repo/includes/LinkedData/EntityDataSerializationService.php M repo/includes/rdf/RdfBuilder.php M repo/includes/specials/SpecialEntityData.php M repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M repo/tests/phpunit/includes/rdf/RdfSerializerTest.php 7 files changed, 60 insertions(+), 53 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/32/106232/1 diff --git a/repo/includes/LinkedData/EntityDataRequestHandler.php b/repo/includes/LinkedData/EntityDataRequestHandler.php index 8be326f..df068d7 100644 --- a/repo/includes/LinkedData/EntityDataRequestHandler.php +++ b/repo/includes/LinkedData/EntityDataRequestHandler.php @@ -1,4 +1,5 @@ ?php + namespace Wikibase\LinkedData; use Wikibase\DataModel\Entity\EntityId; @@ -19,9 +20,6 @@ * Request handler implementing a linked data interface for Wikibase entities. * * @since 0.4 - * - * @file - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author Daniel Kinzler @@ -366,7 +364,12 @@ ); $output-disable(); - $this-outputData( $request, $output-getRequest()-response(), $data, $contentType, $entityRevision-getTimestamp() ); + $this-outputData( + $request, + $output-getRequest()-response(), + $data, $contentType, + $entityRevision-getTimestamp() + ); } /** diff --git a/repo/includes/LinkedData/EntityDataSerializationService.php b/repo/includes/LinkedData/EntityDataSerializationService.php index 3294e73..2ff4bb5 100644 --- a/repo/includes/LinkedData/EntityDataSerializationService.php +++ b/repo/includes/LinkedData/EntityDataSerializationService.php @@ -4,15 +4,15 @@ use Wikibase\Entity; use Wikibase\EntityLookup; -use \MWException; -use \EasyRdf_Format; -use \ApiFormatBase; -use \ApiMain; -use \ApiResult; -use \ApiFormatXml; -use \DerivativeContext; -use \DerivativeRequest; -use \RequestContext; +use MWException; +use EasyRdf_Format; +use ApiFormatBase; +use ApiMain; +use ApiResult; +use ApiFormatXml; +use DerivativeContext; +use DerivativeRequest; +use RequestContext; use Wikibase\EntityRevision; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\Serializers\EntitySerializer; @@ -29,9 +29,6 @@ * For RDF output, this relies on the RdfSerializer class. * * @since 0.4 - * - * @file - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author Daniel Kinzler diff --git a/repo/includes/rdf/RdfBuilder.php b/repo/includes/rdf/RdfBuilder.php index 2446b86..ae03c17 100644 --- a/repo/includes/rdf/RdfBuilder.php +++ b/repo/includes/rdf/RdfBuilder.php @@ -2,10 +2,13 @@ namespace Wikibase; +use Wikibase\DataModel\Entity\EntityId; use DataValues\DataValue; use EasyRdf_Graph; +use EasyRdf_Literal; use EasyRdf_Namespace; use EasyRdf_Resource; +use Sites; /** * RDF mapping for wikibase data model. @@ -232,8 +235,14 @@ $dataResource = $this-graph-resource( $dataURL ); $timestamp = wfTimestamp( TS_ISO_8601, $timestamp ); - $dataResource-addLiteral( self::NS_SCHEMA_ORG . ':version', new \EasyRdf_Literal( $revision, null, 'xsd:integer' ) ); - $dataResource-addLiteral( self::NS_SCHEMA_ORG . ':dateModified', new \EasyRdf_Literal( $timestamp, null, 'xsd:dateTime' ) ); + $dataResource-addLiteral( + self::NS_SCHEMA_ORG . ':version', + new EasyRdf_Literal( $revision, null, 'xsd:integer' ) + ); + $dataResource-addLiteral( + self::NS_SCHEMA_ORG . ':dateModified', + new EasyRdf_Literal( $timestamp, null, 'xsd:dateTime' ) + ); //TODO: versioned data URI, current-version-of } @@ -323,7 +332,7 @@ foreach ( $item-getSimpleSiteLinks() as $link ) { // FIXME: deprecated method usage - $link = new SiteLink( \Sites::singleton()-getSite( $link-getSiteId() ), $link-getPageName() ); + $link = new SiteLink( Sites::singleton()-getSite( $link-getSiteId() ), $link-getPageName() ); $languageCode = $link-getSite()-getLanguageCode(); @@ -382,7 +391,6 @@ wfDebug( __METHOD__ . : Unsupported snak type: . get_class( $snak ) ); } } - /** * Returns a resource
[MediaWiki-commits] [Gerrit] remove tracking branch for submodules - change (mediawiki...Wikidata)
Addshore has submitted this change and it was merged. Change subject: remove tracking branch for submodules .. remove tracking branch for submodules We want to stop gerrit from autoupdating them, while we change how stuff is organized. Change-Id: Idbdcf9398e830cb2f5d5a3b7e4ccae2a4aa18df6 --- M .gitmodules 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Addshore: Verified; Looks good to me, approved diff --git a/.gitmodules b/.gitmodules index 5cfb4d4..fe0931b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,20 +1,15 @@ [submodule WikibaseDataModel] path = WikibaseDataModel url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/WikibaseDataModel.git - branch = master [submodule Wikibase] path = Wikibase url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git - branch = master [submodule Diff] path = Diff url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Diff.git - branch = master [submodule DataValues] path = DataValues url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataValues.git - branch = master [submodule DataTypes] path = DataTypes url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataTypes.git - branch = master -- To view, visit https://gerrit.wikimedia.org/r/106231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idbdcf9398e830cb2f5d5a3b7e4ccae2a4aa18df6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update repo to use a build rather than git submodules - change (mediawiki...Wikidata)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/106233 Change subject: Update repo to use a build rather than git submodules .. Update repo to use a build rather than git submodules Change-Id: Ib6fe2b54875f11754f1a2850e5b9d40798289712 --- D .gitmodules D DataTypes D DataValues D Diff D Wikibase D WikibaseDataModel M Wikidata.php A build.sh 8 files changed, 12 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/33/106233/1 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index fe0931b..000 --- a/.gitmodules +++ /dev/null @@ -1,15 +0,0 @@ -[submodule WikibaseDataModel] - path = WikibaseDataModel - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/WikibaseDataModel.git -[submodule Wikibase] - path = Wikibase - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git -[submodule Diff] - path = Diff - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Diff.git -[submodule DataValues] - path = DataValues - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataValues.git -[submodule DataTypes] - path = DataTypes - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataTypes.git diff --git a/DataTypes b/DataTypes deleted file mode 16 index 8e43438..000 --- a/DataTypes +++ /dev/null -Subproject commit 8e434385a4ee5286324b190d39fd54dfa7bb48ca diff --git a/DataValues b/DataValues deleted file mode 16 index 727ccd6..000 --- a/DataValues +++ /dev/null -Subproject commit 727ccd66b03f42e1f5458ea204ca15b315cf5f04 diff --git a/Diff b/Diff deleted file mode 16 index 515e444..000 --- a/Diff +++ /dev/null -Subproject commit 515e444e0fa546e9b7d78d8014c8e43b908967a6 diff --git a/Wikibase b/Wikibase deleted file mode 16 index 710cca5..000 --- a/Wikibase +++ /dev/null -Subproject commit 710cca510e9b0d804d92fb5f7abd924ebd684a11 diff --git a/WikibaseDataModel b/WikibaseDataModel deleted file mode 16 index 25ba9a1..000 --- a/WikibaseDataModel +++ /dev/null -Subproject commit 25ba9a102856b565d8be9cefe1a6b6edc8e9831c diff --git a/Wikidata.php b/Wikidata.php index aaa5278..e9c1f5f 100644 --- a/Wikidata.php +++ b/Wikidata.php @@ -14,20 +14,8 @@ $wmgUseWikibaseClient = true; } -$wikidataDependencies = array( - 'Diff_VERSION' = '/Diff/Diff.php', - 'DataValues_VERSION' = '/DataValues/DataValues.php', - 'DataTypes_VERSION' = '/DataTypes/DataTypes.php', - 'WIKIBASE_DATAMODEL_VERSION' = '/WikibaseDataModel/WikibaseDataModel.php', - 'WBL_VERSION' = '/Wikibase/lib/WikibaseLib.php' -); - -//Load our entry files ( if we want them ) -if ( $wmgUseWikibaseRepo || $wmgUseWikibaseClient ) { - foreach( $wikidataDependencies as $constant = $location ) { - include_once( __DIR__ . $location ); - } -} +$wgEnableWikibaseRepo = $wmgUseWikibaseRepo; +$wgEnableWikibaseClient = $wmgUseWikibaseClient; if ( $wmgUseWikibaseRepo ) { include_once( __DIR__ . '/Wikibase/repo/Wikibase.php' ); diff --git a/build.sh b/build.sh new file mode 100644 index 000..7596dd4 --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +rm -rf Wikibase/ + +# https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git +git clone https://github.com/wmde/Wikibase.git + +cd Wikibase +git checkout newcomponents +composer install --prefer-dist --no-dev \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/106233 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6fe2b54875f11754f1a2850e5b9d40798289712 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable beta mobile diff on testwiki - change (operations/mediawiki-config)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/106236 Change subject: Enable beta mobile diff on testwiki .. Enable beta mobile diff on testwiki Change-Id: Ie7112a6c1701cfeedc96050ecb123da820b9bf73 --- M wmf-config/InitialiseSettings-labs.php M wmf-config/InitialiseSettings.php M wmf-config/mobile-labs.php M wmf-config/mobile.php 4 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/36/106236/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 5e53c80..fce99a6 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -232,6 +232,9 @@ 'wmgMFUseCentralAuthToken' = array( 'default' = true, ), + 'wmgMFEnableBetaDiff' = array( + 'default' = true, + ), 'wmgEnableGeoData' = array( 'default' = true, diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 1b5de7c..fa07290 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11275,6 +11275,10 @@ 'wmgMFEnablePhotoUploadCTA' = array( 'default' = false, ), +'wmgMFEnableBetaDiff' = array( + 'default' = false, + 'testwiki' = true, +), 'wgExtraGenderNamespaces' = array( 'default' = array(), diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php index b4d6b41..abe786d 100644 --- a/wmf-config/mobile-labs.php +++ b/wmf-config/mobile-labs.php @@ -14,5 +14,3 @@ // Keep Going experiments $wgMFKeepGoing = true; - -$wgMFEnableBetaDiff = true; diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php index c311a89..67ebfd1 100644 --- a/wmf-config/mobile.php +++ b/wmf-config/mobile.php @@ -88,4 +88,5 @@ $wgMFEnableSiteNotice = $wmgMFEnableSiteNotice; $wgMFEnablePhotoUploadCTA = $wmgMFEnablePhotoUploadCTA; + $wgMFEnableBetaDiff = $wmgMFEnableBetaDiff; } -- To view, visit https://gerrit.wikimedia.org/r/106236 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7112a6c1701cfeedc96050ecb123da820b9bf73 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem maxsem.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change article to page - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106235 Change subject: Change article to page .. Change article to page Change-Id: I648abb8bffb8b4847e2930f5023b0c348ec55914 --- M tests/browser/features/special_content_translation.feature M tests/browser/features/step_definitions/special_content_translation_steps.rb 2 files changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/35/106235/1 diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index 2d6d6f5..ff1f4fa 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -1,7 +1,7 @@ Feature: Content translation special page As a wiki editor - I can write a translation next to the original article, + I can write a translation next to the original page, so that I can manually create a translation without switching tabs. Design: @@ -11,7 +11,7 @@ These scenarios test the basic functionality of the Special:ContentTranslation page. Scenario: Anonymous user cannot use Content translation. -Given I am on the content translation page in a wiki in English, translating the article Bratislava to Danish +Given I am on the content translation page in a wiki in English, translating the page Bratislava to Danish Then I see the message You must be logged in to translate in this page. And I don't see a source column And I don't see a translation column @@ -19,13 +19,13 @@ Scenario: Logged in user viewing the special page for translation. Given I am logged in - And I am on the content translation page in a wiki in English, translating the article Bratislava to Danish -Then I see a source column with the content of the article Bratislava + And I am on the content translation page in a wiki in English, translating the page Bratislava to Danish +Then I see a source column with the content of the page Bratislava And the language code of the source column is en And the direction of the source column is ltr And I see the title Bratislava at the top of the source column And I see a language label saying English below the source column's title - And I see a view article link that points to the page Bratislava on the same wiki + And I see a view page link that points to the page Bratislava on the same wiki And I see a translation column with an empty editing area And the language code of the translation column is da And the direction of the translation column is ltr @@ -37,7 +37,7 @@ Scenario: Writing some translation text and saving it Given I am logged in - And I am on the content translation page in a wiki in English, translating the article Bratislava to Danish + And I am on the content translation page in a wiki in English, translating the page Bratislava to Danish When I write Bratislava er hovedstad og største by i Slovakiet. in the editing area in the translation column And I press the Publish Translation button Then the page User:TranslatorToDa/Bratislava is displayed diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index f9a6dc3..1fa3568 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -1,4 +1,4 @@ -Given(/^I am on the content translation page in a wiki in (.+?), translating the article (.+?) to (.+)$/) do |source_language, article_name, target_language| +Given(/^I am on the content translation page in a wiki in (.+?), translating the page (.+?) to (.+)$/) do |source_language, page_name, target_language| pending # express the regexp above with the code you wish you had end @@ -26,8 +26,8 @@ on(ContentTranslationPage).publish_translation_element.should be_visible end -Then(/^I see a view article link in the source column$/) do - on(ContentTranslationPage).view_article.should be_visible +Then(/^I see a view page link in the source column$/) do + on(ContentTranslationPage).view_page.should be_visible end Then(/^I see a language label saying (.*?) below the source column's title$/) do |language_name| @@ -42,7 +42,7 @@ pending # express the regexp above with the code you wish you had end -Then(/^I see a source column with the content of the article (.*?)$/) do |article_name| +Then(/^I see a source column with the content of the page (.*?)$/) do |page_name| pending # express the regexp above with the code you wish you had end @@ -62,7
[MediaWiki-commits] [Gerrit] Update repo to use a build rather than git submodules - change (mediawiki...Wikidata)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/106237 Change subject: Update repo to use a build rather than git submodules .. Update repo to use a build rather than git submodules Change-Id: I31f1ba517a234a5802cdf6c0125dc6868e84a7e6 --- D .gitmodules D DataTypes D DataValues D Diff D Wikibase D WikibaseDataModel M Wikidata.php A build.sh 8 files changed, 12 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/37/106237/1 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index fe0931b..000 --- a/.gitmodules +++ /dev/null @@ -1,15 +0,0 @@ -[submodule WikibaseDataModel] - path = WikibaseDataModel - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/WikibaseDataModel.git -[submodule Wikibase] - path = Wikibase - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git -[submodule Diff] - path = Diff - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Diff.git -[submodule DataValues] - path = DataValues - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataValues.git -[submodule DataTypes] - path = DataTypes - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataTypes.git diff --git a/DataTypes b/DataTypes deleted file mode 16 index 8e43438..000 --- a/DataTypes +++ /dev/null -Subproject commit 8e434385a4ee5286324b190d39fd54dfa7bb48ca diff --git a/DataValues b/DataValues deleted file mode 16 index 727ccd6..000 --- a/DataValues +++ /dev/null -Subproject commit 727ccd66b03f42e1f5458ea204ca15b315cf5f04 diff --git a/Diff b/Diff deleted file mode 16 index 515e444..000 --- a/Diff +++ /dev/null -Subproject commit 515e444e0fa546e9b7d78d8014c8e43b908967a6 diff --git a/Wikibase b/Wikibase deleted file mode 16 index 710cca5..000 --- a/Wikibase +++ /dev/null -Subproject commit 710cca510e9b0d804d92fb5f7abd924ebd684a11 diff --git a/WikibaseDataModel b/WikibaseDataModel deleted file mode 16 index 25ba9a1..000 --- a/WikibaseDataModel +++ /dev/null -Subproject commit 25ba9a102856b565d8be9cefe1a6b6edc8e9831c diff --git a/Wikidata.php b/Wikidata.php index aaa5278..e9c1f5f 100644 --- a/Wikidata.php +++ b/Wikidata.php @@ -14,20 +14,8 @@ $wmgUseWikibaseClient = true; } -$wikidataDependencies = array( - 'Diff_VERSION' = '/Diff/Diff.php', - 'DataValues_VERSION' = '/DataValues/DataValues.php', - 'DataTypes_VERSION' = '/DataTypes/DataTypes.php', - 'WIKIBASE_DATAMODEL_VERSION' = '/WikibaseDataModel/WikibaseDataModel.php', - 'WBL_VERSION' = '/Wikibase/lib/WikibaseLib.php' -); - -//Load our entry files ( if we want them ) -if ( $wmgUseWikibaseRepo || $wmgUseWikibaseClient ) { - foreach( $wikidataDependencies as $constant = $location ) { - include_once( __DIR__ . $location ); - } -} +$wgEnableWikibaseRepo = $wmgUseWikibaseRepo; +$wgEnableWikibaseClient = $wmgUseWikibaseClient; if ( $wmgUseWikibaseRepo ) { include_once( __DIR__ . '/Wikibase/repo/Wikibase.php' ); diff --git a/build.sh b/build.sh new file mode 100644 index 000..7596dd4 --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +rm -rf Wikibase/ + +# https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git +git clone https://github.com/wmde/Wikibase.git + +cd Wikibase +git checkout newcomponents +composer install --prefer-dist --no-dev \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/106237 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31f1ba517a234a5802cdf6c0125dc6868e84a7e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add first Wikidata build - change (mediawiki...Wikidata)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/106238 Change subject: Add first Wikidata build .. Add first Wikidata build Change-Id: I08150c663a23f6dc82d433924382c55ec0b09979 --- A Wikibase 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/38/106238/1 diff --git a/Wikibase b/Wikibase new file mode 16 index 000..1ac4ab6 --- /dev/null +++ b/Wikibase +Subproject commit 1ac4ab6af5a814278d0819bb864d14fc4fef3b84 -- To view, visit https://gerrit.wikimedia.org/r/106238 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08150c663a23f6dc82d433924382c55ec0b09979 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix the JS so that it actually works. - change (mediawiki...FanBoxes)
Jack Phoenix has submitted this change and it was merged. Change subject: Fix the JS so that it actually works. .. Fix the JS so that it actually works. Kudos to http://en.uncyclopedia.co/wiki/User:Bizzeebeever for suggesting this approach, which, no doubt, is far saner than my initial attempt at fixing this. So why was this broken in the first place? I have no idea to be honest. It used to work at some point, I'm sure of that. What's a part of the problem is that there are many components, lots of similar IDs and DOM structures and many different pieces using similar concepts. Change-Id: Ieeb1218bd6d28f7973f2a87ed0f64e99c4553254 --- M FanBoxes.js 1 file changed, 28 insertions(+), 26 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/FanBoxes.js b/FanBoxes.js index bc9124e..b09e1ac 100644 --- a/FanBoxes.js +++ b/FanBoxes.js @@ -378,34 +378,35 @@ // Special:TopUserBoxes, Special:ViewUserBoxes, userboxes / parser hook, // and /extensions/SocialProfile/UserProfile/UserProfilePage.php jQuery( 'body' ).on( 'click', 'input.fanbox-cancel-button', function() { - var $fantagId = jQuery( 'div[id^=fanboxPopUpBox]' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); + var $fantagId = jQuery( this ).parents( 'div:eq(0)' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); FanBoxes.closeFanboxAdd( 'fanboxPopUpBox' + $fantagId, 'individualFanbox' + $fantagId ); } ); - // FanBoxClass.php - jQuery( 'div.individual-fanbox table.fanBoxTable' ).on( 'click', function() { - var $fantagId = jQuery( 'div[id^=individualFanbox]' ).attr( 'id' ).replace( /individualFanbox/, '' ); - FanBoxes.openFanBoxPopup( - 'fanboxPopUpBox' + $fantagId, - 'individualFanbox' + $fantagId - ); - } ); + // FanBoxClass.php (UserBox: pages), Special:TopUserBoxes, Special:ViewUserBoxes + if ( mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'UserBoxes' ) { + jQuery( 'body' ).on( 'click', 'table.fanBoxTable', function() { + var $element; + if ( jQuery( this ).parent().attr( 'id' ) ) { + // FanBoxClass.php case + $element = jQuery( this ).parent(); + } else { + // Special:TopUserBoxes, Special:ViewUserBoxes + $element = jQuery( this ).parent().parent().parent(); + } - // Special:TopUserBoxes, Special:ViewUserBoxes - jQuery( 'body' ).on( 'click', 'div.show-message-container table.fanBoxTable', function() { - var $element = jQuery( 'div[id^=individualFanbox]' ); - var $fantagId = $element.attr( 'id' ).replace( /individualFanbox/, '' ); - FanBoxes.openFanBoxPopup( - 'fanboxPopUpBox' + $fantagId, - 'individualFanbox' + $fantagId - ); - } ); + var $fantagId = $element.attr( 'id' ).replace( /individualFanbox/, '' ); + FanBoxes.openFanBoxPopup( + 'fanboxPopUpBox' + $fantagId, + 'individualFanbox' + $fantagId + ); + } ); + } // UserBoxesHook.php (userboxes / parser hook) /extensions/SocialProfile/UserProfile/UserProfilePage.php - jQuery( 'table.fanBoxTableProfile' ).on( 'click', function() { + jQuery( 'body' ).on( 'click', 'table.fanBoxTableProfile', function() { var $fantagId, $element; // UserBoxesHook.php @@ -424,7 +425,7 @@ } ); jQuery( 'input.fanbox-add-button-half' ).on( 'click', function() { - var $fantagId = jQuery( 'div[id^=fanboxPopUpBox]' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); + var $fantagId = jQuery( this ).parents( 'div:eq(0)' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); FanBoxes.closeFanboxAdd( 'fanboxPopUpBox' + $fantagId, 'individualFanbox' + $fantagId @@ -433,7 +434,7 @@ } ); jQuery( 'input.fanbox-remove-button-half' ).on( 'click', function() { - var $fantagId = jQuery( 'div[id^=fanboxPopUpBox]' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); + var $fantagId = jQuery( this ).parents( 'div:eq(0)' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); FanBoxes.closeFanboxAdd( 'fanboxPopUpBox' + $fantagId, 'individualFanbox' + $fantagId @@ -441,9 +442,10 @@ FanBoxes.showAddRemoveMessageUserPage( 2,
[MediaWiki-commits] [Gerrit] Fix the JS so that it actually works. - change (mediawiki...FanBoxes)
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/106240 Change subject: Fix the JS so that it actually works. .. Fix the JS so that it actually works. Kudos to http://en.uncyclopedia.co/wiki/User:Bizzeebeever for suggesting this approach, which, no doubt, is far saner than my initial attempt at fixing this. So why was this broken in the first place? I have no idea to be honest. It used to work at some point, I'm sure of that. What's a part of the problem is that there are many components, lots of similar IDs and DOM structures and many different pieces using similar concepts. Change-Id: Ieeb1218bd6d28f7973f2a87ed0f64e99c4553254 --- M FanBoxes.js 1 file changed, 28 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FanBoxes refs/changes/40/106240/1 diff --git a/FanBoxes.js b/FanBoxes.js index bc9124e..b09e1ac 100644 --- a/FanBoxes.js +++ b/FanBoxes.js @@ -378,34 +378,35 @@ // Special:TopUserBoxes, Special:ViewUserBoxes, userboxes / parser hook, // and /extensions/SocialProfile/UserProfile/UserProfilePage.php jQuery( 'body' ).on( 'click', 'input.fanbox-cancel-button', function() { - var $fantagId = jQuery( 'div[id^=fanboxPopUpBox]' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); + var $fantagId = jQuery( this ).parents( 'div:eq(0)' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); FanBoxes.closeFanboxAdd( 'fanboxPopUpBox' + $fantagId, 'individualFanbox' + $fantagId ); } ); - // FanBoxClass.php - jQuery( 'div.individual-fanbox table.fanBoxTable' ).on( 'click', function() { - var $fantagId = jQuery( 'div[id^=individualFanbox]' ).attr( 'id' ).replace( /individualFanbox/, '' ); - FanBoxes.openFanBoxPopup( - 'fanboxPopUpBox' + $fantagId, - 'individualFanbox' + $fantagId - ); - } ); + // FanBoxClass.php (UserBox: pages), Special:TopUserBoxes, Special:ViewUserBoxes + if ( mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'UserBoxes' ) { + jQuery( 'body' ).on( 'click', 'table.fanBoxTable', function() { + var $element; + if ( jQuery( this ).parent().attr( 'id' ) ) { + // FanBoxClass.php case + $element = jQuery( this ).parent(); + } else { + // Special:TopUserBoxes, Special:ViewUserBoxes + $element = jQuery( this ).parent().parent().parent(); + } - // Special:TopUserBoxes, Special:ViewUserBoxes - jQuery( 'body' ).on( 'click', 'div.show-message-container table.fanBoxTable', function() { - var $element = jQuery( 'div[id^=individualFanbox]' ); - var $fantagId = $element.attr( 'id' ).replace( /individualFanbox/, '' ); - FanBoxes.openFanBoxPopup( - 'fanboxPopUpBox' + $fantagId, - 'individualFanbox' + $fantagId - ); - } ); + var $fantagId = $element.attr( 'id' ).replace( /individualFanbox/, '' ); + FanBoxes.openFanBoxPopup( + 'fanboxPopUpBox' + $fantagId, + 'individualFanbox' + $fantagId + ); + } ); + } // UserBoxesHook.php (userboxes / parser hook) /extensions/SocialProfile/UserProfile/UserProfilePage.php - jQuery( 'table.fanBoxTableProfile' ).on( 'click', function() { + jQuery( 'body' ).on( 'click', 'table.fanBoxTableProfile', function() { var $fantagId, $element; // UserBoxesHook.php @@ -424,7 +425,7 @@ } ); jQuery( 'input.fanbox-add-button-half' ).on( 'click', function() { - var $fantagId = jQuery( 'div[id^=fanboxPopUpBox]' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); + var $fantagId = jQuery( this ).parents( 'div:eq(0)' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); FanBoxes.closeFanboxAdd( 'fanboxPopUpBox' + $fantagId, 'individualFanbox' + $fantagId @@ -433,7 +434,7 @@ } ); jQuery( 'input.fanbox-remove-button-half' ).on( 'click', function() { - var $fantagId = jQuery( 'div[id^=fanboxPopUpBox]' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); + var $fantagId = jQuery( this ).parents( 'div:eq(0)' ).attr( 'id' ).replace( /fanboxPopUpBox/, '' ); FanBoxes.closeFanboxAdd( 'fanboxPopUpBox' + $fantagId, 'individualFanbox' + $fantagId @@ -441,9
[MediaWiki-commits] [Gerrit] General cleanup of files touched in G101851 - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: General cleanup of files touched in G101851 .. General cleanup of files touched in G101851 Change-Id: I424ef5bcae8c9efb6e87accfc56b6f373b781beb --- M repo/includes/LinkedData/EntityDataRequestHandler.php M repo/includes/LinkedData/EntityDataSerializationService.php M repo/includes/rdf/RdfBuilder.php M repo/includes/specials/SpecialEntityData.php M repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M repo/tests/phpunit/includes/rdf/RdfSerializerTest.php 7 files changed, 59 insertions(+), 53 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/LinkedData/EntityDataRequestHandler.php b/repo/includes/LinkedData/EntityDataRequestHandler.php index 8be326f..df068d7 100644 --- a/repo/includes/LinkedData/EntityDataRequestHandler.php +++ b/repo/includes/LinkedData/EntityDataRequestHandler.php @@ -1,4 +1,5 @@ ?php + namespace Wikibase\LinkedData; use Wikibase\DataModel\Entity\EntityId; @@ -19,9 +20,6 @@ * Request handler implementing a linked data interface for Wikibase entities. * * @since 0.4 - * - * @file - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author Daniel Kinzler @@ -366,7 +364,12 @@ ); $output-disable(); - $this-outputData( $request, $output-getRequest()-response(), $data, $contentType, $entityRevision-getTimestamp() ); + $this-outputData( + $request, + $output-getRequest()-response(), + $data, $contentType, + $entityRevision-getTimestamp() + ); } /** diff --git a/repo/includes/LinkedData/EntityDataSerializationService.php b/repo/includes/LinkedData/EntityDataSerializationService.php index 3294e73..2ff4bb5 100644 --- a/repo/includes/LinkedData/EntityDataSerializationService.php +++ b/repo/includes/LinkedData/EntityDataSerializationService.php @@ -4,15 +4,15 @@ use Wikibase\Entity; use Wikibase\EntityLookup; -use \MWException; -use \EasyRdf_Format; -use \ApiFormatBase; -use \ApiMain; -use \ApiResult; -use \ApiFormatXml; -use \DerivativeContext; -use \DerivativeRequest; -use \RequestContext; +use MWException; +use EasyRdf_Format; +use ApiFormatBase; +use ApiMain; +use ApiResult; +use ApiFormatXml; +use DerivativeContext; +use DerivativeRequest; +use RequestContext; use Wikibase\EntityRevision; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\Serializers\EntitySerializer; @@ -29,9 +29,6 @@ * For RDF output, this relies on the RdfSerializer class. * * @since 0.4 - * - * @file - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author Daniel Kinzler diff --git a/repo/includes/rdf/RdfBuilder.php b/repo/includes/rdf/RdfBuilder.php index 2446b86..8906471 100644 --- a/repo/includes/rdf/RdfBuilder.php +++ b/repo/includes/rdf/RdfBuilder.php @@ -4,8 +4,10 @@ use DataValues\DataValue; use EasyRdf_Graph; +use EasyRdf_Literal; use EasyRdf_Namespace; use EasyRdf_Resource; +use Sites; /** * RDF mapping for wikibase data model. @@ -232,8 +234,14 @@ $dataResource = $this-graph-resource( $dataURL ); $timestamp = wfTimestamp( TS_ISO_8601, $timestamp ); - $dataResource-addLiteral( self::NS_SCHEMA_ORG . ':version', new \EasyRdf_Literal( $revision, null, 'xsd:integer' ) ); - $dataResource-addLiteral( self::NS_SCHEMA_ORG . ':dateModified', new \EasyRdf_Literal( $timestamp, null, 'xsd:dateTime' ) ); + $dataResource-addLiteral( + self::NS_SCHEMA_ORG . ':version', + new EasyRdf_Literal( $revision, null, 'xsd:integer' ) + ); + $dataResource-addLiteral( + self::NS_SCHEMA_ORG . ':dateModified', + new EasyRdf_Literal( $timestamp, null, 'xsd:dateTime' ) + ); //TODO: versioned data URI, current-version-of } @@ -323,7 +331,7 @@ foreach ( $item-getSimpleSiteLinks() as $link ) { // FIXME: deprecated method usage - $link = new SiteLink( \Sites::singleton()-getSite( $link-getSiteId() ), $link-getPageName() ); + $link = new SiteLink( Sites::singleton()-getSite( $link-getSiteId() ), $link-getPageName() ); $languageCode = $link-getSite()-getLanguageCode(); @@ -382,7 +390,6 @@ wfDebug( __METHOD__ . : Unsupported snak type: . get_class( $snak ) ); } } - /** * Returns a resource representing the given claim. diff --git a/repo/includes/specials/SpecialEntityData.php
[MediaWiki-commits] [Gerrit] Untangle wikibase.store module definitions - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/106242 Change subject: Untangle wikibase.store module definitions .. Untangle wikibase.store module definitions No module besides wikibase.store.FetchedContent should depend on wikibase.store itself, since it does not provide anything. Change-Id: I71e37799618dfcbee35b11f46099b8184fc21b6d --- M lib/WikibaseLib.hooks.php M lib/resources/Resources.php 2 files changed, 4 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/42/106242/1 diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php index 92f092b..72f46ec 100644 --- a/lib/WikibaseLib.hooks.php +++ b/lib/WikibaseLib.hooks.php @@ -126,7 +126,7 @@ 'wikibase', 'wikibase.AbstractedRepoApi', 'wikibase.parsers', - 'wikibase.store', + 'wikibase.store.FetchedContent', 'wikibase.utilities', 'wikibase.utilities.ClaimGuidGenerator', 'wikibase.utilities.GuidGenerator', diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index 4db67ef..467e98e 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -197,12 +197,10 @@ 'wikibase.store' = $moduleTemplate + array( 'scripts' = array( - 'wikibase.store/store.js', - 'wikibase.store/store.FetchedContent.js', + 'wikibase.store/store.js' ), 'dependencies' = array( - 'wikibase', - 'mediawiki.Title', + 'wikibase' ) ), @@ -600,7 +598,7 @@ 'jquery.wikibase.entityselector', 'wikibase.datamodel', 'wikibase.AbstractedRepoApi', - 'wikibase.store', // required for getting datatype from entityselector selected property + 'wikibase.store.FetchedContent', // required for getting datatype from entityselector selected property 'mediawiki.legacy.shared', 'jquery.ui.position', 'jquery.ui.TemplatedWidget', -- To view, visit https://gerrit.wikimedia.org/r/106242 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71e37799618dfcbee35b11f46099b8184fc21b6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Migrating to use new JSON message backend. - change (mediawiki...HostStats)
Raimond Spekking has submitted this change and it was merged. Change subject: Migrating to use new JSON message backend. .. Migrating to use new JSON message backend. Change-Id: I9fd76b9d20205a8cdf683803b0575c0fd99e8578 --- M HostStats.i18n.php M HostStats.php A i18n/ast.json A i18n/cs.json A i18n/de.json A i18n/el.json A i18n/en.json A i18n/es.json A i18n/fa.json A i18n/fr.json A i18n/frp.json A i18n/gl.json A i18n/he.json A i18n/hsb.json A i18n/hu.json A i18n/it.json A i18n/ja.json A i18n/ko.json A i18n/ksh.json A i18n/lb.json A i18n/mk.json A i18n/ms.json A i18n/nl.json A i18n/oc.json A i18n/pl.json A i18n/pms.json A i18n/pt-br.json A i18n/qqq.json A i18n/ro.json A i18n/roa-tara.json A i18n/ru.json A i18n/si.json A i18n/uk.json A i18n/zh-hans.json A i18n/zh-hant.json 35 files changed, 343 insertions(+), 300 deletions(-) Approvals: Siebrand: Looks good to me, but someone else must approve Raimond Spekking: Verified; Looks good to me, approved diff --git a/HostStats.i18n.php b/HostStats.i18n.php index 26c51c7..6207270 100644 --- a/HostStats.i18n.php +++ b/HostStats.i18n.php @@ -1,303 +1,20 @@ ?php -/** - * Internationalisation file for HostStats extension. - * - * @file - * @ingroup Extensions - */ - $messages = array(); +$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, $cachedData ) { + $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); + foreach ( $codeSequence as $csCode ) { + $fileName = __DIR__ . /i18n/$csCode.json; + if ( is_readable( $fileName ) ) { + $data = FormatJson::decode( file_get_contents( $fileName ), true ); + foreach ( $data as $key = $unused ) { + if ( $key === '' || $key[0] === '@' ) { + unset( $data[$key] ); + } + } + $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); + } -/** English - * @author Hydriz - */ -$messages['en'] = array( - 'hoststats' = '{{int:hoststats-title}}', // Do not translate this message - 'hoststats-title' = 'Host statistics', - 'hoststats-desc' = 'A tool to output the host statistics that the wiki is on', - 'hoststats-intro' = 'This page shows some host statistics that the wiki is on.', -); - -/** Message documentation (Message documentation) - * @author Hydriz - * @author Shirayuki - */ -$messages['qqq'] = array( - 'hoststats' = '{{notranslate}} -Refers to {{msg-mw|Hoststats-title}}.', - 'hoststats-title' = '{{doc-special|HostStats}} -Host refers to the server the wiki is on.', - 'hoststats-desc' = '{{desc|name=Host Stats|url=http://www.mediawiki.org/wiki/Extension:HostStats}}', - 'hoststats-intro' = 'The introduction to the special page. Host refers to the server the wiki is on.', -); - -/** Asturian (asturianu) - * @author Xuacu - */ -$messages['ast'] = array( - 'hoststats-title' = 'Estadístiques del sirvidor', - 'hoststats-desc' = Ferramienta qu'amuesa les estadístiques del sirvidor nel que ta la wiki., - 'hoststats-intro' = 'Esta páxina amuesa delles estadístiques del sirvidor nel que ta la wiki.', -); - -/** Czech (čeština) - * @author Vks - */ -$messages['cs'] = array( - 'hoststats-title' = 'Statistika serveru', -); - -/** German (Deutsch) - * @author Metalhead64 - */ -$messages['de'] = array( - 'hoststats-title' = 'Hoststatistiken', - 'hoststats-desc' = 'Ergänzt ein Werkzeug zur Ausgabe von Statistiken des Hosts dieses Wikis', - 'hoststats-intro' = 'Diese Seite zeigt einige Statistiken des Hosts dieses Wikis an.', -); - -/** Greek (Ελληνικά) - * @author ZaDiak - */ -$messages['el'] = array( - 'hoststats-title' = 'Στατιστικά υποδοχής', -); - -/** Spanish (español) - * @author Armando-Martin - */ -$messages['es'] = array( - 'hoststats-title' = 'Estadísticas del servidor', - 'hoststats-desc' = 'Una herramienta muestra las estadísticas del servidor en que encuentra la wiki.', - 'hoststats-intro' = 'Esta página muestra algunas estadísticas del servidor en que se encuentra el wiki.', -); - -/** Persian (فارسی) - * @author Armin1392 - */ -$messages['fa'] = array( - 'hoststats-title' = 'آمارهای گروه', - 'hoststats-desc' = 'ابزاری برای عرضهٔ آمارهای گروهی که ویکی در آن است', - 'hoststats-intro' = 'این صفحه بعضی از آمارهای گروهی را که ویکی در آن است را نمایش میدهد.', -); - -/** French (français) - * @author Gomoko - */ -$messages['fr'] = array( - 'hoststats-title' = Statistiques de l'hôte, - 'hoststats-desc' = Un outil pour sortir les statistiques de l'hôte sur lequel se trouve le wiki., - 'hoststats-intro' = Cette page affiche des statistiques de l'hôte sur lequel se trouve le wiki., -); - -/**
[MediaWiki-commits] [Gerrit] [HostStats] Change format to JSON - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/106243 Change subject: [HostStats] Change format to JSON .. [HostStats] Change format to JSON https://gerrit.wikimedia.org/r/#/c/106229/ Change-Id: I65770c3e7783faf3338c2f1beaf06a7bcc7eb7fd --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/43/106243/1 diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index 11d970b..b4d0202 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -700,6 +700,7 @@ Hide Prefix Host Stats +format = json ignored = hoststats Hovergallery -- To view, visit https://gerrit.wikimedia.org/r/106243 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65770c3e7783faf3338c2f1beaf06a7bcc7eb7fd Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [HostStats] Change format to JSON - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [HostStats] Change format to JSON .. [HostStats] Change format to JSON https://gerrit.wikimedia.org/r/#/c/106229/ Change-Id: I65770c3e7783faf3338c2f1beaf06a7bcc7eb7fd --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index 11d970b..b4d0202 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -700,6 +700,7 @@ Hide Prefix Host Stats +format = json ignored = hoststats Hovergallery -- To view, visit https://gerrit.wikimedia.org/r/106243 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I65770c3e7783faf3338c2f1beaf06a7bcc7eb7fd Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use chevron for panel opening affordance - change (mediawiki...MultimediaViewer)
Pginer has uploaded a new change for review. https://gerrit.wikimedia.org/r/106244 Change subject: Use chevron for panel opening affordance .. Use chevron for panel opening affordance replaces the drag image with a chevron and adds CSS classes to adjust the opacity changes. Change-Id: I689c7ff3c952f1ec2b8b16258dc44b1ad095f4fa --- M resources/ext.multimediaViewer/ext.multimediaViewer.css M resources/ext.multimediaViewer/img/drag.svg 2 files changed, 28 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/44/106244/1 diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.css b/resources/ext.multimediaViewer/ext.multimediaViewer.css index 53abdbe..db8c7b9 100644 --- a/resources/ext.multimediaViewer/ext.multimediaViewer.css +++ b/resources/ext.multimediaViewer/ext.multimediaViewer.css @@ -355,4 +355,10 @@ background-repeat: no-repeat; background-position: center bottom; margin: 0 auto; + opacity: 0.6; + transition: opacity 0.25s; } + +.mlb-post-image:hover .mw-mlb-drag-icon { + opacity: 1; +} \ No newline at end of file diff --git a/resources/ext.multimediaViewer/img/drag.svg b/resources/ext.multimediaViewer/img/drag.svg index 36dd3c0..4bc822a 100644 --- a/resources/ext.multimediaViewer/img/drag.svg +++ b/resources/ext.multimediaViewer/img/drag.svg @@ -26,53 +26,25 @@ /defs - rect - width=3.229414 - height=3.2007201 - x=3.8258696 - y=3.1988635 - id=rect5 - style=fill:#cc;fill-opacity:1 /rect - width=3.229414 - height=3.2007201 - x=10.284697 - y=3.1988635 - id=rect7 - style=fill:#cc;fill-opacity:1 /rect - width=3.229414 - height=3.2007201 - x=16.743525 - y=3.1988635 - id=rect9 - style=fill:#cc;fill-opacity:1 /rect - width=3.229414 - height=3.2007201 - x=16.743525 - y=9.6004152 - id=rect11 - style=fill:#cc;fill-opacity:1 /rect - width=3.229414 - height=3.2007201 - x=23.202465 - y=3.1988635 - id=rect13 - style=fill:#cc;fill-opacity:1 /rect - width=3.229414 - height=3.2007201 - x=23.202465 - y=9.6004152 - id=rect15 - style=fill:#cc;fill-opacity:1 /rect - width=3.229414 - height=3.2007201 - x=10.284697 - y=9.6004152 - id=rect17 - style=fill:#cc;fill-opacity:1 /rect - width=3.229414 - height=3.2007201 - x=3.8258696 - y=9.6004152 - id=rect19 - style=fill:#cc;fill-opacity:1 / -/svg \ No newline at end of file + +g + transform=translate(-0.23273449,-1.0139907) + id=g4307 /rect + width=14.503055 + height=1.4892824 + rx=0.25 + ry=0.25 + x=15.244375 + y=-3.4744322 + transform=matrix(0.8660254,0.5,-0.5,0.8660254,0,0) + id=rect3035-9-6 + style=fill:#aa;fill-opacity:1;stroke:none /rect + width=14.503055 + height=1.4892824 + rx=0.25 + ry=0.25 + x=-10.736385 + y=-13.01485 + transform=matrix(-0.8660254,0.5,-0.5,-0.8660254,0,0) + id=rect3035-9-6-4 + style=fill:#aa;fill-opacity:1;stroke:none //svg \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/106244 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I689c7ff3c952f1ec2b8b16258dc44b1ad095f4fa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Pginer pgi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change article to page - change (mediawiki...ContentTranslation)
Amire80 has submitted this change and it was merged. Change subject: Change article to page .. Change article to page Change-Id: I648abb8bffb8b4847e2930f5023b0c348ec55914 --- M tests/browser/features/special_content_translation.feature M tests/browser/features/step_definitions/special_content_translation_steps.rb 2 files changed, 12 insertions(+), 12 deletions(-) Approvals: KartikMistry: Looks good to me, approved Amire80: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index 2d6d6f5..ff1f4fa 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -1,7 +1,7 @@ Feature: Content translation special page As a wiki editor - I can write a translation next to the original article, + I can write a translation next to the original page, so that I can manually create a translation without switching tabs. Design: @@ -11,7 +11,7 @@ These scenarios test the basic functionality of the Special:ContentTranslation page. Scenario: Anonymous user cannot use Content translation. -Given I am on the content translation page in a wiki in English, translating the article Bratislava to Danish +Given I am on the content translation page in a wiki in English, translating the page Bratislava to Danish Then I see the message You must be logged in to translate in this page. And I don't see a source column And I don't see a translation column @@ -19,13 +19,13 @@ Scenario: Logged in user viewing the special page for translation. Given I am logged in - And I am on the content translation page in a wiki in English, translating the article Bratislava to Danish -Then I see a source column with the content of the article Bratislava + And I am on the content translation page in a wiki in English, translating the page Bratislava to Danish +Then I see a source column with the content of the page Bratislava And the language code of the source column is en And the direction of the source column is ltr And I see the title Bratislava at the top of the source column And I see a language label saying English below the source column's title - And I see a view article link that points to the page Bratislava on the same wiki + And I see a view page link that points to the page Bratislava on the same wiki And I see a translation column with an empty editing area And the language code of the translation column is da And the direction of the translation column is ltr @@ -37,7 +37,7 @@ Scenario: Writing some translation text and saving it Given I am logged in - And I am on the content translation page in a wiki in English, translating the article Bratislava to Danish + And I am on the content translation page in a wiki in English, translating the page Bratislava to Danish When I write Bratislava er hovedstad og største by i Slovakiet. in the editing area in the translation column And I press the Publish Translation button Then the page User:TranslatorToDa/Bratislava is displayed diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index f9a6dc3..1fa3568 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -1,4 +1,4 @@ -Given(/^I am on the content translation page in a wiki in (.+?), translating the article (.+?) to (.+)$/) do |source_language, article_name, target_language| +Given(/^I am on the content translation page in a wiki in (.+?), translating the page (.+?) to (.+)$/) do |source_language, page_name, target_language| pending # express the regexp above with the code you wish you had end @@ -26,8 +26,8 @@ on(ContentTranslationPage).publish_translation_element.should be_visible end -Then(/^I see a view article link in the source column$/) do - on(ContentTranslationPage).view_article.should be_visible +Then(/^I see a view page link in the source column$/) do + on(ContentTranslationPage).view_page.should be_visible end Then(/^I see a language label saying (.*?) below the source column's title$/) do |language_name| @@ -42,7 +42,7 @@ pending # express the regexp above with the code you wish you had end -Then(/^I see a source column with the content of the article (.*?)$/) do |article_name| +Then(/^I see a source column with the content of the page (.*?)$/) do |page_name| pending # express the regexp above with the code you wish you
[MediaWiki-commits] [Gerrit] Support for URL params in browser tests - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106246 Change subject: Support for URL params in browser tests .. Support for URL params in browser tests Change-Id: I8e0ccd8838d50ca897b36e4fc652bd6574f8dcb0 --- M tests/browser/features/step_definitions/special_content_translation_steps.rb M tests/browser/features/support/pages/content_translation_page.rb 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/46/106246/1 diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index 1fa3568..4ed153c 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -1,5 +1,5 @@ Given(/^I am on the content translation page in a wiki in (.+?), translating the page (.+?) to (.+)$/) do |source_language, page_name, target_language| - pending # express the regexp above with the code you wish you had + visit(ContentTranslationPage, :using_params = {:extra = title=#{page_name}lang=#{target_language}}) end When(/^I press the Publish Translation button$/) do diff --git a/tests/browser/features/support/pages/content_translation_page.rb b/tests/browser/features/support/pages/content_translation_page.rb index e573f65..69037a5 100644 --- a/tests/browser/features/support/pages/content_translation_page.rb +++ b/tests/browser/features/support/pages/content_translation_page.rb @@ -1,7 +1,7 @@ class ContentTranslationPage include PageObject include URL - page_url URL.url(Special:ContentTranslation) + page_url URL.url(Special:ContentTranslation?%=params[:extra]%) button(:publish_translation, class: publish-translation) -- To view, visit https://gerrit.wikimedia.org/r/106246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e0ccd8838d50ca897b36e4fc652bd6574f8dcb0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a step for the view page link - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106245 Change subject: Add a step for the view page link .. Add a step for the view page link Change-Id: Iaa5cffefbd7a4b44966152518f6400fadf4d67d3 --- M tests/browser/features/step_definitions/special_content_translation_steps.rb M tests/browser/features/support/pages/content_translation_page.rb 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/45/106245/1 diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index 1fa3568..cfaacfd 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -95,5 +95,6 @@ end Then(/^the view page link points to the page (.*?) on the same wiki$/) do |source_page| - pending # express the regexp above with the code you wish you had + source_page_in_url = source_page.gsub( , _) + on(ContentTranslationPage).view_page_element.attribute(href).should match(/#{source_page_in_url}$/) end diff --git a/tests/browser/features/support/pages/content_translation_page.rb b/tests/browser/features/support/pages/content_translation_page.rb index e573f65..1c8c07e 100644 --- a/tests/browser/features/support/pages/content_translation_page.rb +++ b/tests/browser/features/support/pages/content_translation_page.rb @@ -3,6 +3,8 @@ include URL page_url URL.url(Special:ContentTranslation) + a(:view_page, class: view-page) + button(:publish_translation, class: publish-translation) div(:source_column, class: source) -- To view, visit https://gerrit.wikimedia.org/r/106245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa5cffefbd7a4b44966152518f6400fadf4d67d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 47135) Make row IDs use BIGINT. - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 47135) Make row IDs use BIGINT. .. (bug 47135) Make row IDs use BIGINT. DEPLOYMENT: db schema change, see repo/sql/MakeRowIDsBig.sql Change-Id: Iffe0e72688ea5502f4465835408f0819425f6ee6 --- M repo/RELEASE-NOTES M repo/includes/store/sql/AddRowIDs.sql M repo/includes/store/sql/Wikibase.sql A repo/sql/MakeRowIDsBig.sql 4 files changed, 12 insertions(+), 4 deletions(-) Approvals: Aude: Looks good to me, approved Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/RELEASE-NOTES b/repo/RELEASE-NOTES index ff1bc02..e75749d 100644 --- a/repo/RELEASE-NOTES +++ b/repo/RELEASE-NOTES @@ -11,6 +11,7 @@ takes different arguments then it did before. * WikibaseEntityInsertionUpdate hook was added * WikibaseEntityDeletionUpdate hook now gets an EntityContent rather than an EntityDeletionUpdate. +* The definition of the database fields wb_terms.term_row_id and wb_items_per_site.ips_row_id have been changed to BIGINT for MySQL, to avoid integer overflow on large sites. '''NOTE:''' the column definition is not automatically updated when running update.php. If you expect a large number (hundreds of million) of edits on your wiki, please apply repo/sql/MakeRowIDsBig.sql to your database manually. This is only needed for MySQL (and for PostGres, which however isn't fully supported at the moment). === Version 0.4 === (not released) diff --git a/repo/includes/store/sql/AddRowIDs.sql b/repo/includes/store/sql/AddRowIDs.sql index 24177f8..8f22805 100644 --- a/repo/includes/store/sql/AddRowIDs.sql +++ b/repo/includes/store/sql/AddRowIDs.sql @@ -2,8 +2,8 @@ ALTER TABLE /*_*/wb_items_per_site ADD ips_row_id -INTEGER PRIMARY KEY auto_increment FIRST; +BIGINT PRIMARY KEY auto_increment FIRST; ALTER TABLE /*_*/wb_terms ADD COLUMN term_row_id -INTEGER PRIMARY KEY auto_increment FIRST; +BIGINT PRIMARY KEY auto_increment FIRST; diff --git a/repo/includes/store/sql/Wikibase.sql b/repo/includes/store/sql/Wikibase.sql index 3a7ec19..82453c9 100644 --- a/repo/includes/store/sql/Wikibase.sql +++ b/repo/includes/store/sql/Wikibase.sql @@ -18,7 +18,7 @@ -- Derived storage. -- Links site+title pairs to item ids. CREATE TABLE IF NOT EXISTS /*_*/wb_items_per_site ( - ips_row_id INT unsignedNOT NULL PRIMARY KEY AUTO_INCREMENT, -- row ID + ips_row_id BIGINT unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, -- row ID ips_item_idINT unsignedNOT NULL, -- Id of the item ips_site_idVARBINARY(32) NOT NULL, -- Site identifier (global) ips_site_page VARCHAR(255)NOT NULL -- Title of the page @@ -32,7 +32,7 @@ -- Lookup table for entity terms (ie labels, aliases, descriptions). CREATE TABLE IF NOT EXISTS /*_*/wb_terms ( - term_row_idINT unsignedNOT NULL PRIMARY KEY AUTO_INCREMENT, -- row ID + term_row_idBIGINT unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, -- row ID term_entity_id INT unsignedNOT NULL, -- Id of the entity term_entity_type VARBINARY(32) NOT NULL, -- Type of the entity term_language VARBINARY(32) NOT NULL, -- Language code diff --git a/repo/sql/MakeRowIDsBig.sql b/repo/sql/MakeRowIDsBig.sql new file mode 100644 index 000..b19f0d1 --- /dev/null +++ b/repo/sql/MakeRowIDsBig.sql @@ -0,0 +1,7 @@ +-- Update row IDs to BIGINT, so we don't run out of bits. + +ALTER TABLE /*:*/wb_terms +MODIFY term_row_id BIGINT unsigned NOT NULL auto_increment; + +ALTER TABLE /*:*/wb_items_per_site +MODIFY ips_row_id BIGINT unsigned NOT NULL auto_increment; -- To view, visit https://gerrit.wikimedia.org/r/99637 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iffe0e72688ea5502f4465835408f0819425f6ee6 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 45529) use composite indexes on wb_terms. - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 45529) use composite indexes on wb_terms. .. (bug 45529) use composite indexes on wb_terms. Based on Sean Pringle's suggestions on bug 45529. DEPLOYMENT: db schema change, see repo/sql/UpdateTermIndexes.sql Change-Id: I3cd44a07666511ff836d7439540c29e824024ec4 --- M lib/includes/store/sql/TermSqlIndex.php M repo/includes/store/sql/SqlStore.php M repo/includes/store/sql/Wikibase.sql A repo/sql/UpdateTermIndexes.sql 4 files changed, 64 insertions(+), 8 deletions(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/store/sql/TermSqlIndex.php b/lib/includes/store/sql/TermSqlIndex.php index c9e214f..6f90ca8 100644 --- a/lib/includes/store/sql/TermSqlIndex.php +++ b/lib/includes/store/sql/TermSqlIndex.php @@ -157,7 +157,8 @@ $entityIdentifiers, $weightField ), - __METHOD__ + __METHOD__, + array( 'IGNORE' ) ); if ( !$success ) { @@ -211,7 +212,8 @@ $termIdentifiers, $entityIdentifiers ), - __METHOD__ + __METHOD__, + array( 'IGNORE' ) ); if ( !$success ) { diff --git a/repo/includes/store/sql/SqlStore.php b/repo/includes/store/sql/SqlStore.php index 08238f2..c4dc129 100644 --- a/repo/includes/store/sql/SqlStore.php +++ b/repo/includes/store/sql/SqlStore.php @@ -191,6 +191,18 @@ $updater-addPostDatabaseUpdateMaintenance( 'Wikibase\RebuildTermsSearchKey' ); } + // Update from 0.4 to 0.5 + if ( !$db-indexExists( 'wb_terms', 'term_search' ) ) { + + $termsKeyUpdate = 'UpdateTermIndexes' . $extension; + + $updater-addExtensionIndex( + 'wb_terms', + 'term_search', + __DIR__ . '/../../../sql/' . $termsKeyUpdate + ); + } + // Update from 0.1. or 0.2. if ( !$db-tableExists( 'wb_entity_per_page' ) ) { diff --git a/repo/includes/store/sql/Wikibase.sql b/repo/includes/store/sql/Wikibase.sql index 82453c9..6e4cbf4 100644 --- a/repo/includes/store/sql/Wikibase.sql +++ b/repo/includes/store/sql/Wikibase.sql @@ -31,6 +31,7 @@ -- Lookup table for entity terms (ie labels, aliases, descriptions). +-- NOTE: keep the Wikimedia specific terms.wmf.sql in sync with this! CREATE TABLE IF NOT EXISTS /*_*/wb_terms ( term_row_idBIGINT unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, -- row ID term_entity_id INT unsignedNOT NULL, -- Id of the entity @@ -42,12 +43,26 @@ term_weightFLOAT UNSIGNED NOT NULL DEFAULT 0.0 -- weight for ranking ) /*$wgDBTableOptions*/; -CREATE INDEX /*i*/wb_terms_entity_id ON /*_*/wb_terms (term_entity_id); -CREATE INDEX /*i*/wb_terms_entity_type ON /*_*/wb_terms (term_entity_type); -CREATE INDEX /*i*/wb_terms_language ON /*_*/wb_terms (term_language); -CREATE INDEX /*i*/wb_terms_type ON /*_*/wb_terms (term_type); -CREATE INDEX /*i*/wb_terms_text ON /*_*/wb_terms (term_text); -CREATE INDEX /*i*/wb_terms_search_key ON /*_*/wb_terms (term_search_key); +-- Indexes and comments below adopted from the suggestions Sean Pringle made +-- at https://bugzilla.wikimedia.org/show_bug.cgi?id=45529#c10 based on a +-- live analysis of queries on wikidata.org in January 2014. +-- NOTE: keep these in sync with UpdateTermIndexes.sql + +-- Some wb_terms queries use term_entity_id=N which is good selectivity. +CREATE INDEX /*i*/term_entity ON /*_*/wb_terms (term_entity_id); + +-- When any wb_terms query includes a search on term_text greater than +-- four or five leading characters a simple index on term_text and +-- language is often better than the proposed composite indexes. Note +-- that MariaDB still uses the entire key length even with LIKE '...%' on term_text. +CREATE INDEX /*i*/term_text ON /*_*/wb_terms (term_text, term_language); + +-- Same idea as above for terms_search_key (for normalized/insensitive matches). +CREATE INDEX /*i*/term_search_key ON /*_*/wb_terms (term_search_key, term_language); + +-- This index has good selectivity while still allowing ICP for short string values. +CREATE INDEX /*i*/term_search ON /*_*/wb_terms (term_language, term_entity_id, term_type,
[MediaWiki-commits] [Gerrit] Added ContentTranslation to the list of repositories with Se... - change (mediawiki/selenium)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/106247 Change subject: Added ContentTranslation to the list of repositories with Selenium tests .. Added ContentTranslation to the list of repositories with Selenium tests Change-Id: Ibad3cfc41962773bc62e28f9ce007db39bac9e54 --- M README.md 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/47/106247/1 diff --git a/README.md b/README.md index fe79ed1..dbbeaa9 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ Repositories that use the gem: 1. CirrusSearch: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/CirrusSearch), [GitHub](https://github.com/wikimedia/mediawiki-extensions-CirrusSearch), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-CirrusSearch), `/tests/browser` folder +1. ContentTranslation: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/ContentTranslation), [GitHub](https://github.com/wikimedia/mediawiki-extensions-ContentTranslation), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-ContentTranslation), `/tests/browser` folder 2. Flow: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/Flow), [GitHub](https://github.com/wikimedia/mediawiki-extensions-Flow), [Jenkins](https://wmf.ci.cloudbees.com/view/r-fl/), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-Flow), `/tests/browser` folder 3. MobileFrontend: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/MobileFrontend), [GitHub](https://github.com/wikimedia/mediawiki-extensions-MobileFrontend), [Jenkins](https://wmf.ci.cloudbees.com/view/r-mf/), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-MobileFrontend), `/tests/browser` folder 4. Translate: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/Translate), [GitHub](https://github.com/wikimedia/mediawiki-extensions-Translate), [Jenkins](https://wmf.ci.cloudbees.com/view/r-tr/), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-Translate), `/tests/browser` folder -- To view, visit https://gerrit.wikimedia.org/r/106247 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibad3cfc41962773bc62e28f9ce007db39bac9e54 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor SqlStore::doSchemaUpdates - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Refactor SqlStore::doSchemaUpdates .. Refactor SqlStore::doSchemaUpdates This allows schema updates to be defined in a more concise way. Change-Id: I387f1211b5cd27541b38e8d0b4d824e69357f7f2 --- M repo/includes/store/sql/SqlStore.php 1 file changed, 155 insertions(+), 100 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/store/sql/SqlStore.php b/repo/includes/store/sql/SqlStore.php index c4dc129..9df3849 100644 --- a/repo/includes/store/sql/SqlStore.php +++ b/repo/includes/store/sql/SqlStore.php @@ -2,7 +2,10 @@ namespace Wikibase; +use DatabaseBase; +use DatabaseUpdater; use DBQueryError; +use MWException; use ObjectCache; use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\Repo\WikibaseRepo; @@ -145,117 +148,169 @@ * * @since 0.1 * -* @param \DatabaseUpdater $updater +* @param DatabaseUpdater $updater */ - public function doSchemaUpdate( \DatabaseUpdater $updater ) { + public function doSchemaUpdate( DatabaseUpdater $updater ) { $db = $updater-getDB(); - $type = $db-getType(); - // TODO the following ifs are utterly confusing and need some clean up - // i.e. there are code branches that are unreachable, extension adding happens a little - // on the start, a little later, etc. - if ( $type === 'mysql' || $type === 'sqlite' /* || $type === 'postgres' */ ) { - $extension = $type === 'postgres' ? '.pg.sql' : '.sql'; + // Update from 0.1. + if ( !$db-tableExists( 'wb_terms' ) ) { + $updater-dropTable( 'wb_items_per_site' ); + $updater-dropTable( 'wb_items' ); + $updater-dropTable( 'wb_aliases' ); + $updater-dropTable( 'wb_texts_per_lang' ); - // Update from 0.1. - if ( !$db-tableExists( 'wb_terms' ) ) { - $updater-dropTable( 'wb_items_per_site' ); - $updater-dropTable( 'wb_items' ); - $updater-dropTable( 'wb_aliases' ); - $updater-dropTable( 'wb_texts_per_lang' ); + $updater-addExtensionTable( + 'wb_terms', + $this-getUpdateScriptPath( 'Wikibase', $db-getType() ) + ); - $updater-addExtensionTable( - 'wb_terms', - __DIR__ . '/Wikibase' . $extension - ); - - $this-rebuild(); - } - - // Update from 0.1 or 0.2. - if ( !$db-fieldExists( 'wb_terms', 'term_search_key' ) - !Settings::get( 'withoutTermSearchKey' ) ) { - - $termsKeyUpdate = 'AddTermsSearchKey' . $extension; - - if ( $type === 'sqlite' ) { - $termsKeyUpdate = 'AddTermsSearchKey.sqlite.sql'; - } - - $updater-addExtensionField( - 'wb_terms', - 'term_search_key', - __DIR__ . '/' . $termsKeyUpdate - ); - - $updater-addPostDatabaseUpdateMaintenance( 'Wikibase\RebuildTermsSearchKey' ); - } - - // Update from 0.4 to 0.5 - if ( !$db-indexExists( 'wb_terms', 'term_search' ) ) { - - $termsKeyUpdate = 'UpdateTermIndexes' . $extension; - - $updater-addExtensionIndex( - 'wb_terms', - 'term_search', - __DIR__ . '/../../../sql/' . $termsKeyUpdate - ); - } - - // Update from 0.1. or 0.2. - if ( !$db-tableExists( 'wb_entity_per_page' ) ) { - - $updater-addExtensionTable( - 'wb_entity_per_page', - __DIR__ . '/AddEntityPerPage' . $extension - ); - - $updater-addPostDatabaseUpdateMaintenance( 'Wikibase\RebuildEntityPerPage' ); - } - - // Update from 0.1 or 0.2. -
[MediaWiki-commits] [Gerrit] Add a task to fetch a section's wikitext (+ test) - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/106248 Change subject: Add a task to fetch a section's wikitext (+ test) .. Add a task to fetch a section's wikitext (+ test) Change-Id: Ibcfcea9418a09637bf7c14d4ccd29c258e7514df --- A wikipedia-it/src/main/java/org/wikipedia/test/FetchSectionWikitextTaskTests.java A wikipedia/src/main/java/org/wikipedia/editing/FetchSectionWikitextTask.java 2 files changed, 98 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/48/106248/1 diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/FetchSectionWikitextTaskTests.java b/wikipedia-it/src/main/java/org/wikipedia/test/FetchSectionWikitextTaskTests.java new file mode 100644 index 000..017ca09 --- /dev/null +++ b/wikipedia-it/src/main/java/org/wikipedia/test/FetchSectionWikitextTaskTests.java @@ -0,0 +1,42 @@ + +package org.wikipedia.test; + +import android.content.Context; +import android.content.Intent; +import android.test.ActivityUnitTestCase; +import org.mediawiki.api.json.Api; +import org.wikipedia.editing.*; +import org.wikipedia.*; + +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +public class FetchSectionWikitextTaskTests extends ActivityUnitTestCaseTestDummyActivity { +private static final int TASK_COMPLETION_TIMEOUT = 2; + +public FetchSectionWikitextTaskTests() { +super(TestDummyActivity.class); +} + +public void testPageFetch() throws Throwable { +startActivity(new Intent(), null, null); +final CountDownLatch completionLatch = new CountDownLatch(1); +runTestOnUiThread(new Runnable() { +@Override +public void run() { +PageTitle title = new PageTitle(null, Test_page_for_app_testing/Section1, new Site(test.wikipedia.org)); +new FetchSectionWikitextTask(getInstrumentation().getTargetContext(),title, 2) { +@Override +public void onFinish(String result) { +assertNotNull(result); +assertEquals(result, === Section1.2 ===\nThis is a subsection); +completionLatch.countDown(); +} +}.execute(); +} +}); +assertTrue(completionLatch.await(TASK_COMPLETION_TIMEOUT, TimeUnit.MILLISECONDS)); +} +} + diff --git a/wikipedia/src/main/java/org/wikipedia/editing/FetchSectionWikitextTask.java b/wikipedia/src/main/java/org/wikipedia/editing/FetchSectionWikitextTask.java new file mode 100644 index 000..f8d6383 --- /dev/null +++ b/wikipedia/src/main/java/org/wikipedia/editing/FetchSectionWikitextTask.java @@ -0,0 +1,56 @@ +package org.wikipedia.editing; + +import android.content.Context; +import org.json.JSONArray; +import org.json.JSONObject; +import org.mediawiki.api.json.Api; +import org.mediawiki.api.json.ApiResult; +import org.mediawiki.api.json.RequestBuilder; +import org.wikipedia.ApiTask; +import org.wikipedia.PageTitle; +import org.wikipedia.WikipediaApp; +import org.wikipedia.concurrency.ExecutorService; +import org.wikipedia.page.Section; + +import java.util.ArrayList; +import java.util.concurrent.Executor; + +public class FetchSectionWikitextTask extends ApiTaskString { +private final PageTitle title; +private final int sectionID; + +public FetchSectionWikitextTask(Context context, PageTitle title, int sectionID) { +super( + ExecutorService.getSingleton().getExecutor(FetchSectionWikitextTask.class, 1), + ((WikipediaApp)context.getApplicationContext()).getAPIForSite(title.getSite()) +); +this.title = title; +this.sectionID = sectionID; +} + +@Override +public RequestBuilder buildRequest(Api api) { +return api.action(query) +.param(prop, revisions) +.param(rvprop, content) +.param(rvlimit, 1) +.param(titles, title.getPrefixedText()) +.param(rvsection, String.valueOf(sectionID)); +} + +@Override +public String processResult(ApiResult result) throws Throwable { +JSONObject pagesJSON = result.asObject() +.optJSONObject(query) +.optJSONObject(pages); +String pageId = (String) pagesJSON.keys().next(); + +if (!pagesJSON.optJSONObject(pageId).has(revisions)) { +// No links found +return ; +} + +JSONObject revisionJSON = pagesJSON.optJSONObject(pageId).optJSONArray(revisions).getJSONObject(0); +return revisionJSON.optString(*); +} +} -- To view, visit https://gerrit.wikimedia.org/r/106248 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] Immediately trigger new scroll event after adding infinite s... - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/106249 Change subject: Immediately trigger new scroll event after adding infinite scoll content .. Immediately trigger new scroll event after adding infinite scoll content Bug: 58935 Change-Id: I801a92af7919cb460aeeda01260528bc4a23f1ff --- M modules/discussion/paging.js 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/49/106249/1 diff --git a/modules/discussion/paging.js b/modules/discussion/paging.js index 72b8526..62d9e9b 100644 --- a/modules/discussion/paging.js +++ b/modules/discussion/paging.js @@ -89,6 +89,12 @@ $pagingLinkDiv.next( '.flow-error' ).remove(); $pagingLinkDiv.replaceWith( $replaceContent ); $replaceContent.trigger( 'flow_init' ); + + // trigger a new scroll, to check if new data should not be + // fetched already (e.g. if all comments were deleted, this + // batch may have come up empty, in which case we need to + // load new data immediately, not wait for another scroll) + $( window ).trigger( 'scroll' ); } ) .fail( function () { $( 'div/' ) -- To view, visit https://gerrit.wikimedia.org/r/106249 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I801a92af7919cb460aeeda01260528bc4a23f1ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Renamed page - change (mediawiki...TwnMainPage)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/106250 Change subject: Renamed page .. Renamed page To follow the naming convention. Change-Id: Iac6b7f86514c5a57cc9c8b7873874a54a176e95d --- R tests/browser/features/support/pages/reset_preferences_page.rb 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/50/106250/1 diff --git a/tests/browser/features/support/pages/reset_preferences.rb b/tests/browser/features/support/pages/reset_preferences_page.rb similarity index 100% rename from tests/browser/features/support/pages/reset_preferences.rb rename to tests/browser/features/support/pages/reset_preferences_page.rb -- To view, visit https://gerrit.wikimedia.org/r/106250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac6b7f86514c5a57cc9c8b7873874a54a176e95d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Renamed page - change (mediawiki...UniversalLanguageSelector)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/106251 Change subject: Renamed page .. Renamed page To follow the naming convention. Change-Id: I81820cb5e877ad5ebf6e2f806fa30c23d04d800a --- R tests/browser/features/support/pages/reset_preferences_page.rb 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/51/106251/1 diff --git a/tests/browser/features/support/pages/reset_preferences.rb b/tests/browser/features/support/pages/reset_preferences_page.rb similarity index 100% rename from tests/browser/features/support/pages/reset_preferences.rb rename to tests/browser/features/support/pages/reset_preferences_page.rb -- To view, visit https://gerrit.wikimedia.org/r/106251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81820cb5e877ad5ebf6e2f806fa30c23d04d800a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add test steps for columns and language labels - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106252 Change subject: Add test steps for columns and language labels .. Add test steps for columns and language labels Change-Id: I6317f6de4a1ef583cd2c7001af9d44d3196f8351 --- M tests/browser/features/special_content_translation.feature M tests/browser/features/step_definitions/special_content_translation_steps.rb M tests/browser/features/support/pages/content_translation_page.rb 3 files changed, 13 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/52/106252/1 diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index ff1f4fa..f64b57b 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -13,8 +13,8 @@ Scenario: Anonymous user cannot use Content translation. Given I am on the content translation page in a wiki in English, translating the page Bratislava to Danish Then I see the message You must be logged in to translate in this page. - And I don't see a source column - And I don't see a translation column + And I don't see the source column + And I don't see the translation column And I don't see a Publish Translation button Scenario: Logged in user viewing the special page for translation. diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index 4ed153c..ee6d9a6 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -14,12 +14,8 @@ on(ContentTranslationPage).publish_translation_element.should_not be_visible end -Then(/^I don't see a source column$/) do - on(ContentTranslationPage).source_column.should_not be_visible -end - -Then(/^I don't see a translation column$/) do - on(ContentTranslationPage).translation_column.should_not be_visible +Then(/^I don't see the (.+) column$/) do |column_type| + on(ContentTranslationPage).column(column_type).should_not be_visible end Then(/^I see a Publish Translation button$/) do @@ -30,12 +26,8 @@ on(ContentTranslationPage).view_page.should be_visible end -Then(/^I see a language label saying (.*?) below the source column's title$/) do |language_name| - pending # express the regexp above with the code you wish you had -end - -Then(/^I see a language label saying (.*?) below the translation column's title$/) do |language_name| - pending # express the regexp above with the code you wish you had +Then(/^I see a language label saying (.*?) below the (.+) column's title$/) do |language_name, column_type| + on(ContentTranslationPage).language_label(column_type).should == language_name end Then(/^I see an input box pre\-filled with the text (.*?) above the editing area in the second column$/) do |text| diff --git a/tests/browser/features/support/pages/content_translation_page.rb b/tests/browser/features/support/pages/content_translation_page.rb index 69037a5..9a92df9 100644 --- a/tests/browser/features/support/pages/content_translation_page.rb +++ b/tests/browser/features/support/pages/content_translation_page.rb @@ -5,8 +5,13 @@ button(:publish_translation, class: publish-translation) - div(:source_column, class: source) - div(:translation_column, class: translation) + def column(column_type) + @browser.div(class: .ct-column.#{column_type}) + end + + def language_label(column_type) + column(column_type).span(class: language-label) + end def translation_editing_area @browser.div(css: .translation div[contenteditable]) -- To view, visit https://gerrit.wikimedia.org/r/106252 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6317f6de4a1ef583cd2c7001af9d44d3196f8351 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Always use absolute URLs in external links in the clipboard - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/106253 Change subject: Always use absolute URLs in external links in the clipboard .. Always use absolute URLs in external links in the clipboard When writing relative links to the clipboard using clipboardData the full path information is lost, so make sure all links are absolute. Bug: 58136 Change-Id: I7ba039dbbf14648510c154ad99d41823b084 --- M modules/ve/ce/ve.ce.Surface.js 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/53/106253/1 diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 19cc080..84bbe3f 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -720,8 +720,15 @@ // Webkit allows us to directly edit the clipboard // Disable the default event so we can override the data e.preventDefault(); + + // Because we're have to write HTML to the clipboard directly (see below) + // href absolutization doesn't occur so do it manually + this.$pasteTarget.find( 'a' ).attr( 'href', function () { return this.href; } ); + clipboardData.setData( 'text/xcustom', this.clipboardId + '-' + clipboardIndex ); // As we've disabled the default event we need to set the normal clipboard data + // It is apparently impossible to set text/xcustom without setting the other + // types manually too. clipboardData.setData( 'text/html', this.$pasteTarget.html() ); clipboardData.setData( 'text/plain', this.$pasteTarget.text() ); } else { -- To view, visit https://gerrit.wikimedia.org/r/106253 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ba039dbbf14648510c154ad99d41823b084 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support for URL params in browser tests - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Support for URL params in browser tests .. Support for URL params in browser tests Change-Id: I8e0ccd8838d50ca897b36e4fc652bd6574f8dcb0 --- M tests/browser/features/step_definitions/special_content_translation_steps.rb M tests/browser/features/support/pages/content_translation_page.rb 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index 1fa3568..4ed153c 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -1,5 +1,5 @@ Given(/^I am on the content translation page in a wiki in (.+?), translating the page (.+?) to (.+)$/) do |source_language, page_name, target_language| - pending # express the regexp above with the code you wish you had + visit(ContentTranslationPage, :using_params = {:extra = title=#{page_name}lang=#{target_language}}) end When(/^I press the Publish Translation button$/) do diff --git a/tests/browser/features/support/pages/content_translation_page.rb b/tests/browser/features/support/pages/content_translation_page.rb index e573f65..69037a5 100644 --- a/tests/browser/features/support/pages/content_translation_page.rb +++ b/tests/browser/features/support/pages/content_translation_page.rb @@ -1,7 +1,7 @@ class ContentTranslationPage include PageObject include URL - page_url URL.url(Special:ContentTranslation) + page_url URL.url(Special:ContentTranslation?%=params[:extra]%) button(:publish_translation, class: publish-translation) -- To view, visit https://gerrit.wikimedia.org/r/106246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e0ccd8838d50ca897b36e4fc652bd6574f8dcb0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: SuchetaG sucheta.ghos...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Expose max_user_connections var in mysql_multi instance .cnf - change (operations/puppet)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/106254 Change subject: Expose max_user_connections var in mysql_multi instance .cnf .. Expose max_user_connections var in mysql_multi instance .cnf Probably this never worked and was just SET GLOBAL... Change-Id: I64607d735a484717bdcd1900dff6c45c5576ae8c --- M modules/mysql_multi_instance/manifests/instance.pp 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/54/106254/1 diff --git a/modules/mysql_multi_instance/manifests/instance.pp b/modules/mysql_multi_instance/manifests/instance.pp index b1da836..6870694 100644 --- a/modules/mysql_multi_instance/manifests/instance.pp +++ b/modules/mysql_multi_instance/manifests/instance.pp @@ -39,6 +39,11 @@ }else { $slave_transaction_retries = 10 } +if has_key( $instances[$name], 'max_user_connections') { + $max_user_connections = $instances[$name]['max_user_connections'] +}else { + $max_user_connections = 10 +} $serverid = inline_template(%= ia = ipaddress.split('.'); server_id = ia[0] + ia[2] + ia[3] + String(${port}); server_id %) include passwords::nagios::mysql @@ -124,7 +129,7 @@ 'thread_stack' = '192K', 'thread_cache_size' = 300, 'max_connections'= 2000, - 'max_user_connections' = 10, + 'max_user_connections' = $max_user_connections, 'table_open_cache' = 5, 'table_definition_cache' = 4, 'query_cache_size' = 0, -- To view, visit https://gerrit.wikimedia.org/r/106254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64607d735a484717bdcd1900dff6c45c5576ae8c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle sprin...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] depool db1041, forced index query errors during partitioning... - change (operations/mediawiki-config)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/106255 Change subject: depool db1041, forced index query errors during partitioning test .. depool db1041, forced index query errors during partitioning test Change-Id: Ic4a72b2d712080a9d632ad0027a9c4ee9bd64628 --- M wmf-config/db-eqiad.php 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/55/106255/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 8f7b159..1c0744d 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -133,7 +133,7 @@ 's7' = array( 'db1039' = 0, 'db1007' = 0, # snapshot, vslow - 'db1041' = 50, # contributions, logpager + //'db1041' = 50, # contributions, logpager 'db1024' = 400, 'db1028' = 400, ), @@ -210,12 +210,12 @@ 'vslow' = array( 'db1007' = 1, ), - 'contributions' = array( - 'db1041' = 1, - ), - 'logpager' = array( - 'db1041' = 1, - ), +// 'contributions' = array( +// 'db1041' = 1, +// ), +// 'logpager' = array( +// 'db1041' = 1, +// ), ), ), -- To view, visit https://gerrit.wikimedia.org/r/106255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4a72b2d712080a9d632ad0027a9c4ee9bd64628 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle sprin...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Expose max_user_connections var in mysql_multi instance .cnf - change (operations/puppet)
Springle has submitted this change and it was merged. Change subject: Expose max_user_connections var in mysql_multi instance .cnf .. Expose max_user_connections var in mysql_multi instance .cnf Probably this never worked and was just SET GLOBAL... Change-Id: I64607d735a484717bdcd1900dff6c45c5576ae8c --- M modules/mysql_multi_instance/manifests/instance.pp 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/mysql_multi_instance/manifests/instance.pp b/modules/mysql_multi_instance/manifests/instance.pp index b1da836..6870694 100644 --- a/modules/mysql_multi_instance/manifests/instance.pp +++ b/modules/mysql_multi_instance/manifests/instance.pp @@ -39,6 +39,11 @@ }else { $slave_transaction_retries = 10 } +if has_key( $instances[$name], 'max_user_connections') { + $max_user_connections = $instances[$name]['max_user_connections'] +}else { + $max_user_connections = 10 +} $serverid = inline_template(%= ia = ipaddress.split('.'); server_id = ia[0] + ia[2] + ia[3] + String(${port}); server_id %) include passwords::nagios::mysql @@ -124,7 +129,7 @@ 'thread_stack' = '192K', 'thread_cache_size' = 300, 'max_connections'= 2000, - 'max_user_connections' = 10, + 'max_user_connections' = $max_user_connections, 'table_open_cache' = 5, 'table_definition_cache' = 4, 'query_cache_size' = 0, -- To view, visit https://gerrit.wikimedia.org/r/106254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64607d735a484717bdcd1900dff6c45c5576ae8c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle sprin...@wikimedia.org Gerrit-Reviewer: Springle sprin...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] zuul: monitor gearman service - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/106256 Change subject: zuul: monitor gearman service .. zuul: monitor gearman service Zuul has a build in Gearman server listening on 127.0.0.1:4730. Additionally the port is firewalled so we have to use NRPE. Made the TCP check to timeout after two seconds. Change-Id: I662abc44a7f2fe3209f7f8bd3dace8344a5d05b1 --- M manifests/zuul.pp M modules/nrpe/templates/nrpe_local.cfg.erb M templates/icinga/checkcommands.cfg.erb 3 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/56/106256/1 diff --git a/manifests/zuul.pp b/manifests/zuul.pp index 659f75f..b27d6a9 100644 --- a/manifests/zuul.pp +++ b/manifests/zuul.pp @@ -46,6 +46,7 @@ # nagios/icinga monitoring monitor_service { 'zuul': description = 'zuul_service_running', check_command = 'nrpe_check_zuul' } + monitor_service { 'zuul_gearman': description = 'zuul_gearman_service', check_command = 'nrpe_check_gearman' } # Deploy Wikimedia Zuul configuration files. diff --git a/modules/nrpe/templates/nrpe_local.cfg.erb b/modules/nrpe/templates/nrpe_local.cfg.erb index 2070766..7c3f38d 100644 --- a/modules/nrpe/templates/nrpe_local.cfg.erb +++ b/modules/nrpe/templates/nrpe_local.cfg.erb @@ -17,6 +17,7 @@ # Zuul has a main process and a fork which is the gearman server. Thus we need # two process running. command[check_zuul]=/usr/lib/nagios/plugins/check_procs -w 2:2 -c 2:2 --ereg-argument-array '^/usr/bin/python /usr/local/bin/zuul-server' +command[check_gearman]=/usr/lib/nagios/plugins/check_tcp -H 127.0.0.1 -p 4730 --timeout=2 command[check_mailman]=/usr/lib/nagios/plugins/check_procs -w 1:25 -c 1:35 -a mailman command[check_spamd]=/usr/lib/nagios/plugins/check_procs -w 1:20 -c 1:40 -a spamd command[check_poolcounterd]=/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:3 -C poolcounterd diff --git a/templates/icinga/checkcommands.cfg.erb b/templates/icinga/checkcommands.cfg.erb index 00a2d57..20b172d 100644 --- a/templates/icinga/checkcommands.cfg.erb +++ b/templates/icinga/checkcommands.cfg.erb @@ -369,6 +369,10 @@ command_line/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c check_zuul } define command{ + command_namenrpe_check_gearman + command_line/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c check_gearman +} +define command{ command_namenrpe_check_mailman command_line/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c check_mailman } -- To view, visit https://gerrit.wikimedia.org/r/106256 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I662abc44a7f2fe3209f7f8bd3dace8344a5d05b1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Always display In other languages section - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/106257 Change subject: Always display In other languages section .. Always display In other languages section (bug 49079) Now, the In other languages section is displayed always. If the user has no languages configured using the Babel extension, ULS is queried for frequent languages filling the section. In order to improve modularity along with implementing that new functionality, MediaWiki's hook mechanism is used instead of using the document ready handler. Change-Id: I1978e78cc170c1adb81655eda3d41246fa33f4d4 --- M repo/resources/Resources.php A repo/resources/wikibase.ui.entityInit.js M repo/resources/wikibase.ui.entityViewInit.js A repo/resources/wikibase.ui.termBoxInit.js 4 files changed, 222 insertions(+), 63 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/57/106257/1 diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php index 4dfd934..847fc74 100644 --- a/repo/resources/Resources.php +++ b/repo/resources/Resources.php @@ -23,17 +23,16 @@ 'wikibase.ui.entityViewInit.js' // should probably be adjusted for more modularity ), 'dependencies' = array( + 'mediawiki.api', 'mediawiki.user', 'wikibase.ui.PropertyEditTool', 'jquery.wikibase.entityview', 'jquery.wikibase.toolbarcontroller', 'jquery.wikibase.wbtooltip', - 'wikibase.datamodel', - 'jquery.json', 'jquery.cookie', - 'wikibase.serialization.entities', - 'wikibase.serialization.fetchedcontent', - 'jquery.wikibase.claimgrouplabelscroll' + 'jquery.wikibase.claimgrouplabelscroll', + 'wikibase.ui.entityInit', + 'wikibase.ui.termBoxInit', ), 'messages' = array( 'wikibase-statements', @@ -43,6 +42,39 @@ 'wikibase-entity-property', 'wikibase-restrictionedit-tooltip-message', 'wikibase-blockeduser-tooltip-message', + ) + ), + + 'wikibase.ui.entityInit' = $moduleTemplate + array( + 'scripts' = array( + 'wikibase.ui.entityInit.js', + ), + 'dependencies' = array( + 'jquery.json', + 'wikibase', + 'wikibase.datamodel', + 'wikibase.serialization', + 'wikibase.serialization.entities', + 'wikibase.serialization.fetchedcontent', + 'wikibase.store.FetchedContent', + ), + ), + + 'wikibase.ui.termBoxInit' = $moduleTemplate + array( + 'scripts' = array( + 'wikibase.ui.termBoxInit.js', + ), + 'dependencies' = array( + 'jquery.wikibase.toolbar', + 'jquery.wikibase.toolbareditgroup', + 'mediawiki.Title', + 'wikibase', + 'wikibase.templates', + 'wikibase.ui.entityInit', + 'wikibase.ui.PropertyEditTool', + ), + 'messages' = array( + 'wikibase-terms', ) ), @@ -111,6 +143,8 @@ ); if ( defined( 'ULS_VERSION' ) ) { + $modules['wikibase.ui.termBoxInit']['dependencies'][] = 'ext.uls.displaysettings'; + $modules['wikibase.ui.termBoxInit']['dependencies'][] = 'jquery.uls.data'; $modules['wikibase.special.itemDisambiguation']['dependencies'][] = 'jquery.uls.data'; $modules['wikibase.special.entitiesWithout']['dependencies'][] = 'jquery.uls.data'; } diff --git a/repo/resources/wikibase.ui.entityInit.js b/repo/resources/wikibase.ui.entityInit.js new file mode 100644 index 000..3556462 --- /dev/null +++ b/repo/resources/wikibase.ui.entityInit.js @@ -0,0 +1,39 @@ +/** + * Entity initialization. + * Unserializes the entities passed to JavaScript
[MediaWiki-commits] [Gerrit] Add method to fully destroy a target - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/106258 Change subject: Add method to fully destroy a target .. Add method to fully destroy a target Destroys the surface, toolbar and removes the container from the DOM. Surface#destroy takes care of removing overlays. Use this method in the standalone demo. Change-Id: I2e98f8d0ba90ff725c5f0218be941c00a6fa2c8e --- M demos/ve/demo.js M modules/ve/init/ve.init.Target.js 2 files changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/58/106258/1 diff --git a/demos/ve/demo.js b/demos/ve/demo.js index e20668f..efd4fd0 100644 --- a/demos/ve/demo.js +++ b/demos/ve/demo.js @@ -59,11 +59,9 @@ ); target.on( 'surfaceReady', function () { - // TODO: Target should have a way to tear itself down (should include removing - // elements outside target.$element, such as global overlays). $targetContainer.promise().done( function () { if ( currentTarget ) { - currentTarget.$element.remove(); + currentTarget.destroy(); } $targetContainer .append( target.$element ) diff --git a/modules/ve/init/ve.init.Target.js b/modules/ve/init/ve.init.Target.js index 94c5e9d..8c25aa3 100644 --- a/modules/ve/init/ve.init.Target.js +++ b/modules/ve/init/ve.init.Target.js @@ -38,6 +38,22 @@ this.toolbar = null; }; +/** + * Destroy the target + */ +ve.init.Target.prototype.destroy = function () { + this.$document = null; + if ( this.surface ) { + this.surface.destroy(); + } + if ( this.toolbar ) { + this.toolbar.destroy(); + } + if ( this.$element ) { + this.$element.remove(); + } +}; + /* Events */ /** -- To view, visit https://gerrit.wikimedia.org/r/106258 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e98f8d0ba90ff725c5f0218be941c00a6fa2c8e Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add more browser test steps - change (mediawiki...ContentTranslation)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/106259 Change subject: Add more browser test steps .. Add more browser test steps Change-Id: I56277bb0e2d6bd356aec06c1f64c672f993e9af6 --- M tests/browser/features/step_definitions/special_content_translation_steps.rb M tests/browser/features/support/pages/content_translation_page.rb 2 files changed, 24 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/59/106259/1 diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index ee6d9a6..75b5077 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -7,7 +7,7 @@ end When(/^I write (.*?) in the editing area in the translation column$/) do |translation| - on(ContentTranslationPage).translation_editing_area = translation + on(ContentTranslationPage).translation_editor = translation end Then(/^I don't see a Publish Translation button$/) do @@ -31,7 +31,7 @@ end Then(/^I see an input box pre\-filled with the text (.*?) above the editing area in the second column$/) do |text| - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).target_title.should == text end Then(/^I see a source column with the content of the page (.*?)$/) do |page_name| @@ -39,47 +39,40 @@ end Then(/^I see a translation column with an empty editing area$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).translation_editor.should == end Then(/^I see a translation information column$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).column(information).should be_visible end Then(/^I see a translation progress bar$/) do - pending # express the regexp above with the code you wish you had + pending Not implemented yet + on(ContentTranslationPage).progress_bar.should be_visible end Then(/^I see the message You must be logged in to translate in this page\.$/) do pending # express the regexp above with the code you wish you had end -Then(/^I see the title (.*?) at the top of the source column$/) do |page_title| - pending # express the regexp above with the code you wish you had +Then(/^I see the title (.*?) at the top of the source column$/) do |source_page_title| + on(ContentTranslationPage).source_title.should == source_page_title end Then(/^the content of the page is (.*?)$/) do |page_content| pending # express the regexp above with the code you wish you had end -Then(/^the direction of the source column is (.+)$/) do |direction| - pending # express the regexp above with the code you wish you had -end - -Then(/^the direction of the translation column is (.+)$/) do |direction| - pending # express the regexp above with the code you wish you had +Then(/^the direction of the (.+) column is (.+)$/) do |column_type, direction| + on(ContentTranslationPage).column(column_type).attribute(dir).should == direction end Then(/^the first version in the history of the page (.+?) should have the tag (.+?)$/) do |page_title, tag_name| pending # express the regexp above with the code you wish you had end -Then(/^the language code of the source column is (.+)$/) do |language_code| - pending # express the regexp above with the code you wish you had -end - -Then(/^the language code of the translation column is (.+?)$/) do |language_code| - pending # express the regexp above with the code you wish you had +Then(/^the language code of the (.+) column is (.+)$/) do |column_type, language_code| + on(ContentTranslationPage).column(column_type).attribute(lang).should == language_code end Then(/^the page (.+?) is displayed$/) do |page_title| @@ -87,5 +80,5 @@ end Then(/^the view page link points to the page (.*?) on the same wiki$/) do |source_page| - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).view_page_element.attribute(lang).should == language_code end diff --git a/tests/browser/features/support/pages/content_translation_page.rb b/tests/browser/features/support/pages/content_translation_page.rb index 9a92df9..6da00e8 100644 --- a/tests/browser/features/support/pages/content_translation_page.rb +++ b/tests/browser/features/support/pages/content_translation_page.rb @@ -5,6 +5,8 @@ button(:publish_translation, class: publish-translation) + div(:progress_bar, class: ct-progress-bar) + def column(column_type)
[MediaWiki-commits] [Gerrit] Added --backtrace to cucumber - change (mediawiki/selenium)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/106260 Change subject: Added --backtrace to cucumber .. Added --backtrace to cucumber Debugging argument suggested by Cloudbees support. Sometimes a Jenkins job fails when no tests are broken. This will hopefully provide more information on what went wrong. Bug: 58345 Change-Id: I708372183b4a6dcd6086068042baf0b650c90253 --- M docs/jobs.md M docs/template.md 2 files changed, 27 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/60/106260/1 diff --git a/docs/jobs.md b/docs/jobs.md index 8a7adc0..0ac0fbc 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -20,7 +20,7 @@ # browsertests-commons.wikimedia.beta.wmflabs.org - MediaWiki URL: commons.wikimedia.beta.wmflabs.org -- bundle exec: cucumber --verbose --profile ci --tags @commons.wikimedia.beta.wmflabs.org +- bundle exec cucumber: --tags @commons.wikimedia.beta.wmflabs.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG ## browsertests-commons.wikimedia.beta.wmflabs.org-linux-chrome @@ -38,7 +38,7 @@ # browsertests-en.wikipedia.beta.wmflabs.org -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org - MediaWiki URL: en.wikipedia.beta.wmflabs.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG @@ -50,15 +50,15 @@ ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie6-bug +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie6-bug ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie7-bug +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie7-bug ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie8-bug +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie8-bug ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_9 - Browser Label: internet_explorer_9 @@ -69,7 +69,7 @@ # browsertests-test2.wikipedia.org -- bundle exec: cucumber --verbose --profile ci --tags @test2.wikipedia.org +- bundle exec cucumber: --tags @test2.wikipedia.org - MediaWiki URL: test2.wikipedia.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WIKIPEDIA_ORG @@ -81,15 +81,15 @@ ## browsertests-test2.wikipedia.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: cucumber --verbose --profile ci --tags @test2.wikipedia.org --tags ~@ie6-bug +- bundle exec cucumber: --tags @test2.wikipedia.org --tags ~@ie6-bug ## browsertests-test2.wikipedia.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: cucumber --verbose --profile ci --tags @test2.wikipedia.org --tags ~@ie7-bug +- bundle exec cucumber: --tags @test2.wikipedia.org --tags ~@ie7-bug ## browsertests-test2.wikipedia.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: cucumber --verbose --profile ci --tags @test2.wikipedia.org --tags ~@ie8-bug +- bundle exec cucumber: --tags @test2.wikipedia.org --tags ~@ie8-bug ## browsertests-test2.wikipedia.org-windows-internet_explorer_9 - Browser Label: internet_explorer_9 @@ -100,7 +100,7 @@ # Flow -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org - Recipients: zfili...@wikimedia.org cmcma...@wikimedia.org - MediaWiki URL: en.m.wikipedia.beta.wmflabs.org - Folder: tests/browser/ @@ -125,25 +125,25 @@ ## MobileFrontend-en.m.wikipedia.beta.wmflabs.org-linux-chrome - Browser Label: chrome -- bundle exec: cucumber --verbose --profile ci --tags @en.m.wikipedia.beta.wmflabs.org +- bundle exec cucumber: --tags @en.m.wikipedia.beta.wmflabs.org - MediaWiki URL: en.m.wikipedia.beta.wmflabs.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG ## MobileFrontend-en.m.wikipedia.beta.wmflabs.org-linux-firefox - Browser Label: firefox -- bundle exec: cucumber --verbose --profile ci --tags @en.m.wikipedia.beta.wmflabs.org +- bundle exec cucumber: --tags @en.m.wikipedia.beta.wmflabs.org - MediaWiki URL: en.m.wikipedia.beta.wmflabs.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG ## MobileFrontend-en.m.wikipedia.org-linux-firefox - Browser Label: firefox -- bundle exec:
[MediaWiki-commits] [Gerrit] Skip combining highlights correctly - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/106261 Change subject: Skip combining highlights correctly .. Skip combining highlights correctly The old code worked but it tried to combine highlights using the plain highlighter which doesn't work. Change-Id: I18a52d07f14cc76b70ad7f498ef3e3da6dd22bf8 --- M includes/ResultsType.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/61/106261/1 diff --git a/includes/ResultsType.php b/includes/ResultsType.php index 354c359..392b45a 100644 --- a/includes/ResultsType.php +++ b/includes/ResultsType.php @@ -115,7 +115,7 @@ private function addMatchedFields( $fields ) { foreach ( $fields as $name = $config ) { // TODO remove when Elasticsearch issue 3757 is fixed - if ( strpos( $name, '.plain' ) !== false ) { + if ( $config[ 'type' ] !== 'fvh' ) { continue; } $config[ 'matched_fields' ] = array( $name, $name.plain ); -- To view, visit https://gerrit.wikimedia.org/r/106261 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18a52d07f14cc76b70ad7f498ef3e3da6dd22bf8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add more timing and fix others - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/106262 Change subject: Add more timing and fix others .. Add more timing and fix others The extra timing is around searches. Currently we just trust whatever time comes back from Elasticsearch which isn't cool. What if it lies? What if something makes the round trip take forever? We need to know! Silly microtime needing a ( true ) Bug: 59821 Change-Id: I74e5eb8168f67855d0fdf58c6013633adba66aae --- M includes/Searcher.php M includes/Updater.php 2 files changed, 10 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/62/106262/1 diff --git a/includes/Searcher.php b/includes/Searcher.php index d366e7d..2a503e7 100644 --- a/includes/Searcher.php +++ b/includes/Searcher.php @@ -643,8 +643,11 @@ $work = new PoolCounterWorkViaCallback( 'CirrusSearch-Search', _elasticsearch, array( 'doWork' = function() use ( $description, $search ) { try { + $start = microtime( true ); $result = $search-search(); - wfDebugLog( 'CirrusSearch', 'Search completed in ' . $result-getTotalTime() . ' millis' ); + $took = round( ( microtime( true ) - $start ) * 1000 ); + $elasticTook = $result-getTotalTime(); + wfDebugLog( 'CirrusSearch', Search completed in $took millis and $elasticTook Elasticsearch millis ); return Status::newGood( $result ); } catch ( \Elastica\Exception\ExceptionInterface $e ) { wfLogWarning( Search backend error during $description. Error message is: . $e-getMessage() ); diff --git a/includes/Updater.php b/includes/Updater.php index 707ed8c..3a2a97f 100644 --- a/includes/Updater.php +++ b/includes/Updater.php @@ -446,9 +446,9 @@ $linkCountClosureCount = count( $linkCountClosures ); if ( !$skipLinks $linkCountClosureCount ) { try { - $start = microtime(); + $start = microtime( true ); $result = $linkCountMultiSearch-search(); - $took = round( ( microtime() - $start ) * 1000 ); + $took = round( ( microtime( true ) - $start ) * 1000 ); $pageCount = count( $pages ); wfDebugLog( 'CirrusSearch', Counted links to $pageCount pages in $took millis. ); for ( $index = 0; $index $linkCountClosureCount; $index++ ) { @@ -658,9 +658,9 @@ } // Look up the ids and run all closures to build the bulk update - $start = microtime(); + $start = microtime( true ); $findIdsMultiSearchResult = $findIdsMultiSearch-search(); - $took = round( ( microtime() - $start ) * 1000 ); + $took = round( ( microtime( true ) - $start ) * 1000 ); wfDebugLog( 'CirrusSearch', Searched for $findIdsClosuresCount ids in other indexes in $took millis. ); for ( $i = 0; $i $findIdsClosuresCount; $i++ ) { $results = $findIdsMultiSearchResult[ $i ]-getResults(); @@ -679,9 +679,9 @@ // Execute the bulk update $exception = null; try { - $start = microtime(); + $start = microtime( true ); $bulk-send(); - $took = round( ( microtime() - $start ) * 1000 ); + $took = round( ( microtime( true ) - $start ) * 1000 ); wfDebugLog( 'CirrusSearch', Updated $updatesInBulk documents in other indexes in $took millis. ); } catch ( \Elastica\Exception\Bulk\ResponseException $e ) { if ( self::bulkResponseExceptionIsJustDocumentMissing( $e ) ) { -- To view, visit https://gerrit.wikimedia.org/r/106262 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74e5eb8168f67855d0fdf58c6013633adba66aae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make the behavior of the lightbox more consistent with scroll - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/106263 Change subject: Make the behavior of the lightbox more consistent with scroll .. Make the behavior of the lightbox more consistent with scroll Makes sure that the advanced description is out of view when the lightbox opens. Remembers the scrollTop position that was set when the lightbox opens, in order to restore it when it closes. Change-Id: I534f7d718528d1e5a4911c68a524eb96cadeae90 --- M resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/63/106263/1 diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js b/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js index c882d2e..8f86f57 100644 --- a/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js +++ b/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js @@ -89,6 +89,28 @@ } }; + LIP.attach = function ( parentId ) { + // Advanced description needs to be below the fold when the lightbox opens + // regardless of what the scroll value was prior to opening the lightbox + var $document = $( document ); + + // Save the scrollTop value because we want below to be back to where they were + // before opening the lightbox + this.scrollTopBeforeAttach = $document.scrollTop(); + $document.scrollTop( 0 ); + + MLBInterface.prototype.attach.call( this, parentId ); + } + + LIP.unattach = function () { + MLBInterface.prototype.unattach.call( this ); + + // Restore the scrollTop as it was before opening the lightbox + if ( this.scrollTopBeforeAttach !== undefined ) { + $( document ).scrollTop( this.scrollTopBeforeAttach ); + } + } + LIP.load = function ( image ) { var hashFragment = '#mediaviewer/' + mw.mediaViewer.currentImageFilename + '/' + mw.mediaViewer.lightbox.currentIndex; -- To view, visit https://gerrit.wikimedia.org/r/106263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I534f7d718528d1e5a4911c68a524eb96cadeae90 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deleted unused branch option - change (mediawiki/selenium)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/106264 Change subject: Deleted unused branch option .. Deleted unused branch option Bug: 58345 Change-Id: I8f8dd2613f4a81dfa1a6c8c6c4b71bd632aa4f50 --- M docs/jobs.md M docs/template.md 2 files changed, 1 insertion(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/64/106264/1 diff --git a/docs/jobs.md b/docs/jobs.md index 0ac0fbc..1b399dc 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -2,7 +2,6 @@ - Browser Label: - bundle exec: - Recipients: -- Branch: master - MediaWiki URL: - Folder: - Repository URL: diff --git a/docs/template.md b/docs/template.md index d4627bb..aab9fe9 100644 --- a/docs/template.md +++ b/docs/template.md @@ -76,20 +76,6 @@ - Display Name: VisualEditor - Value: https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor -## Branch - -- ID: BRANCH -- Display Name: Branch -- Type: Select a string among many -- UI Mode: Dropdown list (no inline help, but more compact UI) -- Options - - Display Name: (name) - - Value: (name) - - - name: -- debug -- master - ## MediaWiki URL - ID: MEDIAWIKI_URL @@ -183,7 +169,7 @@ /userRemoteConfigs branches hudson.plugins.git.BranchSpec -name${BRANCH}/name +namemaster/name /hudson.plugins.git.BranchSpec /branches disableSubmodulesfalse/disableSubmodules -- To view, visit https://gerrit.wikimedia.org/r/106264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f8dd2613f4a81dfa1a6c8c6c4b71bd632aa4f50 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Protect against JS error when langlinks API query returns an... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Protect against JS error when langlinks API query returns an error .. Protect against JS error when langlinks API query returns an error This happens e.g. when opening VE on a redirect page. Change-Id: I75b77da42013c3d446cbc9c57aebe0907a2b40dc --- M modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js b/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js index 1462b10..9474750 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js @@ -95,7 +95,8 @@ * Handle language items being loaded. */ ve.ui.MWLanguagesPage.prototype.onAllLanguageItemsSuccess = function ( deferred, response ) { - var i, iLen, languages = [], langlinks = response.visualeditor.langlinks; + var i, iLen, languages = [], + langlinks = response response.visualeditor response.visualeditor.langlinks; if ( langlinks ) { for ( i = 0, iLen = langlinks.length; i iLen; i++ ) { languages.push( { -- To view, visit https://gerrit.wikimedia.org/r/105887 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I75b77da42013c3d446cbc9c57aebe0907a2b40dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Esanders esand...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't ever ever search for nothing - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/106265 Change subject: Don't ever ever search for nothing .. Don't ever ever search for nothing So long as the user actually adds a string to the search we'll search. Even if their string just ends up adding a filter. That is cool. We just don't want to search when that box is empty. That takes a long time because we score most documents in the index and then throw them away because the user was just looking to load the page. Change-Id: I54b0cefe6ec052ade39c56440455bea274b06090 --- M includes/CirrusSearch.php 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/65/106265/1 diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php index 3c569bf..463939b 100644 --- a/includes/CirrusSearch.php +++ b/includes/CirrusSearch.php @@ -53,6 +53,12 @@ * @return ResultSet|null|Status results, no results, or error respectively */ public function searchText( $term ) { + $term = trim( $term ); + // No searching for nothing! That takes forever! + if ( !$term ) { + return null; + } + $searcher = new Searcher( $this-offset, $this-limit, $this-namespaces ); // Ignore leading ~ because it is used to force displaying search results but not to effect them -- To view, visit https://gerrit.wikimedia.org/r/106265 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54b0cefe6ec052ade39c56440455bea274b06090 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added build schedule option for Jenkins builds - change (mediawiki/selenium)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/106266 Change subject: Added build schedule option for Jenkins builds .. Added build schedule option for Jenkins builds Bug: 58345 Change-Id: I610178a3dd496f2e03fe449bf74752b6f099daab --- M docs/jobs.md M docs/template.md 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/66/106266/1 diff --git a/docs/jobs.md b/docs/jobs.md index 1b399dc..4fca990 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -7,6 +7,7 @@ - Repository URL: - MediaWiki user: - MediaWiki password variable: +- Build schedule: 0 3,18 * * * diff --git a/docs/template.md b/docs/template.md index aab9fe9..560c02d 100644 --- a/docs/template.md +++ b/docs/template.md @@ -125,6 +125,11 @@ - Display Name: MediaWiki password variable - Type: Text-field +## Build schedule +- ID: BUILD_SCHEDULE +- Display Name: Build schedule +- Type: Text-field + ## Jelly-based transformation - Property @@ -201,7 +206,7 @@ blockBuildWhenUpstreamBuildingfalse/blockBuildWhenUpstreamBuilding triggers class=vector hudson.triggers.TimerTrigger - spec0 3,18 * * */spec + spec${BUILD_SCHEDULE}/spec /hudson.triggers.TimerTrigger /triggers concurrentBuildfalse/concurrentBuild -- To view, visit https://gerrit.wikimedia.org/r/106266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I610178a3dd496f2e03fe449bf74752b6f099daab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] depool db1041, forced index query errors during partitioning... - change (operations/mediawiki-config)
Springle has submitted this change and it was merged. Change subject: depool db1041, forced index query errors during partitioning test .. depool db1041, forced index query errors during partitioning test Change-Id: Ic4a72b2d712080a9d632ad0027a9c4ee9bd64628 --- M wmf-config/db-eqiad.php 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Springle: Looks good to me, approved diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 8f7b159..1c0744d 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -133,7 +133,7 @@ 's7' = array( 'db1039' = 0, 'db1007' = 0, # snapshot, vslow - 'db1041' = 50, # contributions, logpager + //'db1041' = 50, # contributions, logpager 'db1024' = 400, 'db1028' = 400, ), @@ -210,12 +210,12 @@ 'vslow' = array( 'db1007' = 1, ), - 'contributions' = array( - 'db1041' = 1, - ), - 'logpager' = array( - 'db1041' = 1, - ), +// 'contributions' = array( +// 'db1041' = 1, +// ), +// 'logpager' = array( +// 'db1041' = 1, +// ), ), ), -- To view, visit https://gerrit.wikimedia.org/r/106255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4a72b2d712080a9d632ad0027a9c4ee9bd64628 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle sprin...@wikimedia.org Gerrit-Reviewer: Springle sprin...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added --backtrace to cucumber - change (mediawiki/selenium)
Cmcmahon has submitted this change and it was merged. Change subject: Added --backtrace to cucumber .. Added --backtrace to cucumber Debugging argument suggested by Cloudbees support. Sometimes a Jenkins job fails when no tests are broken. This will hopefully provide more information on what went wrong. Bug: 58345 Change-Id: I708372183b4a6dcd6086068042baf0b650c90253 --- M docs/jobs.md M docs/template.md 2 files changed, 27 insertions(+), 27 deletions(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/jobs.md b/docs/jobs.md index 8a7adc0..0ac0fbc 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -20,7 +20,7 @@ # browsertests-commons.wikimedia.beta.wmflabs.org - MediaWiki URL: commons.wikimedia.beta.wmflabs.org -- bundle exec: cucumber --verbose --profile ci --tags @commons.wikimedia.beta.wmflabs.org +- bundle exec cucumber: --tags @commons.wikimedia.beta.wmflabs.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG ## browsertests-commons.wikimedia.beta.wmflabs.org-linux-chrome @@ -38,7 +38,7 @@ # browsertests-en.wikipedia.beta.wmflabs.org -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org - MediaWiki URL: en.wikipedia.beta.wmflabs.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG @@ -50,15 +50,15 @@ ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie6-bug +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie6-bug ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie7-bug +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie7-bug ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie8-bug +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org --tags ~@ie8-bug ## browsertests-en.wikipedia.beta.wmflabs.org-windows-internet_explorer_9 - Browser Label: internet_explorer_9 @@ -69,7 +69,7 @@ # browsertests-test2.wikipedia.org -- bundle exec: cucumber --verbose --profile ci --tags @test2.wikipedia.org +- bundle exec cucumber: --tags @test2.wikipedia.org - MediaWiki URL: test2.wikipedia.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WIKIPEDIA_ORG @@ -81,15 +81,15 @@ ## browsertests-test2.wikipedia.org-windows-internet_explorer_6 - Browser Label: internet_explorer_6 -- bundle exec: cucumber --verbose --profile ci --tags @test2.wikipedia.org --tags ~@ie6-bug +- bundle exec cucumber: --tags @test2.wikipedia.org --tags ~@ie6-bug ## browsertests-test2.wikipedia.org-windows-internet_explorer_7 - Browser Label: internet_explorer_7 -- bundle exec: cucumber --verbose --profile ci --tags @test2.wikipedia.org --tags ~@ie7-bug +- bundle exec cucumber: --tags @test2.wikipedia.org --tags ~@ie7-bug ## browsertests-test2.wikipedia.org-windows-internet_explorer_8 - Browser Label: internet_explorer_8 -- bundle exec: cucumber --verbose --profile ci --tags @test2.wikipedia.org --tags ~@ie8-bug +- bundle exec cucumber: --tags @test2.wikipedia.org --tags ~@ie8-bug ## browsertests-test2.wikipedia.org-windows-internet_explorer_9 - Browser Label: internet_explorer_9 @@ -100,7 +100,7 @@ # Flow -- bundle exec: cucumber --verbose --profile ci --tags @en.wikipedia.beta.wmflabs.org +- bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org - Recipients: zfili...@wikimedia.org cmcma...@wikimedia.org - MediaWiki URL: en.m.wikipedia.beta.wmflabs.org - Folder: tests/browser/ @@ -125,25 +125,25 @@ ## MobileFrontend-en.m.wikipedia.beta.wmflabs.org-linux-chrome - Browser Label: chrome -- bundle exec: cucumber --verbose --profile ci --tags @en.m.wikipedia.beta.wmflabs.org +- bundle exec cucumber: --tags @en.m.wikipedia.beta.wmflabs.org - MediaWiki URL: en.m.wikipedia.beta.wmflabs.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG ## MobileFrontend-en.m.wikipedia.beta.wmflabs.org-linux-firefox - Browser Label: firefox -- bundle exec: cucumber --verbose --profile ci --tags @en.m.wikipedia.beta.wmflabs.org +- bundle exec cucumber: --tags @en.m.wikipedia.beta.wmflabs.org - MediaWiki URL: en.m.wikipedia.beta.wmflabs.org - MediaWiki password variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG ## MobileFrontend-en.m.wikipedia.org-linux-firefox - Browser Label: firefox -- bundle exec: cucumber --verbose --profile ci --tags
[MediaWiki-commits] [Gerrit] Deleted unused branch option - change (mediawiki/selenium)
Cmcmahon has submitted this change and it was merged. Change subject: Deleted unused branch option .. Deleted unused branch option Bug: 58345 Change-Id: I8f8dd2613f4a81dfa1a6c8c6c4b71bd632aa4f50 --- M docs/jobs.md M docs/template.md 2 files changed, 1 insertion(+), 16 deletions(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/jobs.md b/docs/jobs.md index 0ac0fbc..1b399dc 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -2,7 +2,6 @@ - Browser Label: - bundle exec: - Recipients: -- Branch: master - MediaWiki URL: - Folder: - Repository URL: diff --git a/docs/template.md b/docs/template.md index d4627bb..aab9fe9 100644 --- a/docs/template.md +++ b/docs/template.md @@ -76,20 +76,6 @@ - Display Name: VisualEditor - Value: https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor -## Branch - -- ID: BRANCH -- Display Name: Branch -- Type: Select a string among many -- UI Mode: Dropdown list (no inline help, but more compact UI) -- Options - - Display Name: (name) - - Value: (name) - - - name: -- debug -- master - ## MediaWiki URL - ID: MEDIAWIKI_URL @@ -183,7 +169,7 @@ /userRemoteConfigs branches hudson.plugins.git.BranchSpec -name${BRANCH}/name +namemaster/name /hudson.plugins.git.BranchSpec /branches disableSubmodulesfalse/disableSubmodules -- To view, visit https://gerrit.wikimedia.org/r/106264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f8dd2613f4a81dfa1a6c8c6c4b71bd632aa4f50 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Jhall jh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added build schedule option for Jenkins builds - change (mediawiki/selenium)
Cmcmahon has submitted this change and it was merged. Change subject: Added build schedule option for Jenkins builds .. Added build schedule option for Jenkins builds Bug: 58345 Change-Id: I610178a3dd496f2e03fe449bf74752b6f099daab --- M docs/jobs.md M docs/template.md 2 files changed, 7 insertions(+), 1 deletion(-) Approvals: Cmcmahon: Looks good to me, approved diff --git a/docs/jobs.md b/docs/jobs.md index 1b399dc..4fca990 100644 --- a/docs/jobs.md +++ b/docs/jobs.md @@ -7,6 +7,7 @@ - Repository URL: - MediaWiki user: - MediaWiki password variable: +- Build schedule: 0 3,18 * * * diff --git a/docs/template.md b/docs/template.md index aab9fe9..560c02d 100644 --- a/docs/template.md +++ b/docs/template.md @@ -125,6 +125,11 @@ - Display Name: MediaWiki password variable - Type: Text-field +## Build schedule +- ID: BUILD_SCHEDULE +- Display Name: Build schedule +- Type: Text-field + ## Jelly-based transformation - Property @@ -201,7 +206,7 @@ blockBuildWhenUpstreamBuildingfalse/blockBuildWhenUpstreamBuilding triggers class=vector hudson.triggers.TimerTrigger - spec0 3,18 * * */spec + spec${BUILD_SCHEDULE}/spec /hudson.triggers.TimerTrigger /triggers concurrentBuildfalse/concurrentBuild -- To view, visit https://gerrit.wikimedia.org/r/106266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I610178a3dd496f2e03fe449bf74752b6f099daab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Jhall jh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits