[MediaWiki-commits] [Gerrit] Add mw-ui-input to mediawiki ui - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add mw-ui-input to mediawiki ui .. Add mw-ui-input to mediawiki ui Upstream component from Flow Adds mw-ui-input component Update existing (and undocumented) usage in core of mw-ui-input to use Flow focus style Updated usage of mw-ui-input in Special:Search and Special:Userlogin Packaged in mediawiki.ui.inputs to allow developers to use inputs separately to other mediawiki ui components. Change-Id: Ida765b97e6574bdc8fbba88a08ec98ec12f3dc95 --- M docs/kss/Makefile M includes/specials/SpecialSearch.php M includes/specials/SpecialUserlogin.php M includes/templates/Usercreate.php M includes/templates/Userlogin.php M resources/Resources.php M resources/src/mediawiki.less/mediawiki.ui/mixins.less M resources/src/mediawiki.ui/components/forms.less A resources/src/mediawiki.ui/components/inputs.less 9 files changed, 133 insertions(+), 60 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/kss/Makefile b/docs/kss/Makefile index 374bab2..c096ef3 100644 --- a/docs/kss/Makefile +++ b/docs/kss/Makefile @@ -6,7 +6,7 @@ # Generates CSS of mediawiki.ui and mediawiki.ui.button using ResourceLoader, then applies it to the # KSS style guide $(eval KSS_RL_TMP := $(shell mktemp /tmp/tmp.XX)) - @curl -sG "${MEDIAWIKI_LOAD_URL}?modules=mediawiki.legacy.shared|mediawiki.legacy.commonPrint|mediawiki.ui|mediawiki.ui.button&only=styles" > $(KSS_RL_TMP) + @curl -sG "${MEDIAWIKI_LOAD_URL}?modules=mediawiki.ui.input|mediawiki.legacy.shared|mediawiki.legacy.commonPrint|mediawiki.ui|mediawiki.ui.button&only=styles" > $(KSS_RL_TMP) @node_modules/.bin/kss-node ../../resources/src/mediawiki.ui static/ --css $(KSS_RL_TMP) -t styleguide-template @rm $(KSS_RL_TMP) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 541faa1..1df674a 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -82,7 +82,8 @@ $out = $this->getOutput(); $out->allowClickjacking(); $out->addModuleStyles( array( - 'mediawiki.special', 'mediawiki.special.search', 'mediawiki.ui', 'mediawiki.ui.button' + 'mediawiki.special', 'mediawiki.special.search', 'mediawiki.ui', 'mediawiki.ui.button', + 'mediawiki.ui.input', ) ); // Strip underscores from title parameter; most of the time we'll want @@ -1081,7 +1082,7 @@ 'id' => $this->profile === 'advanced' ? 'powerSearchText' : 'searchText', 'size' => '50', 'autofocus', - 'class' => 'mw-ui-input', + 'class' => 'mw-ui-input mw-ui-input-inline', ) ) . "\n"; $out .= Html::hidden( 'fulltext', 'Search' ) . "\n"; $out .= Xml::submitButton( diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 0b11968..46b4999 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -1214,6 +1214,7 @@ $out->addModuleStyles( array( 'mediawiki.ui', 'mediawiki.ui.button', + 'mediawiki.ui.input', 'mediawiki.special.userlogin.common.styles' ) ); $out->addModules( array( diff --git a/includes/templates/Usercreate.php b/includes/templates/Usercreate.php index a4240e2..f1e7065 100644 --- a/includes/templates/Usercreate.php +++ b/includes/templates/Usercreate.php @@ -81,7 +81,7 @@ data['name'], 'text', array( - 'class' => 'mw-input loginText', + 'class' => 'mw-ui-input loginText', 'id' => 'wpName2', 'tabindex' => '1', 'size' => '20', @@ -109,7 +109,7 @@ msg( 'userlogin-yourpassword' ); ?> 'mw-input loginPassword', + 'class' => 'mw-ui-input loginPassword', 'id' => 'wpPassword2', 'tabindex' => '3', 'size' => '20', @@ -129,7 +129,7 @@ ?> msg( 'yourdomainname' ); ?> - + getHTML(); ?>
[MediaWiki-commits] [Gerrit] Remove deprecated calls to wfMsg and updated BlogPage specia... - change (mediawiki...BlogPage)
Withoutaname has uploaded a new change for review. https://gerrit.wikimedia.org/r/150157 Change subject: Remove deprecated calls to wfMsg and updated BlogPage special pages .. Remove deprecated calls to wfMsg and updated BlogPage special pages * Changed various calls to wfMsg to use either the new wfMessage global function or use SpecialPage::msg(). * Removed various globals from the special pages, changed to use getOutput(), getUser() and getRequest() inherited from SpecialPage. * Declared visibility for functions and variables, assumed public. Change-Id: Ia783a8e6288e72ed5b772c62082b2ba6ced533df --- M BlogHooks.php M BlogPage.php M SpecialArticleLists.php M SpecialArticlesHome.php M SpecialCreateBlogPost.php M TagCloudClass.php 6 files changed, 200 insertions(+), 301 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage refs/changes/57/150157/1 diff --git a/BlogHooks.php b/BlogHooks.php index 9b056d6..c90d98f 100644 --- a/BlogHooks.php +++ b/BlogHooks.php @@ -65,7 +65,7 @@ } if ( !$wgUser->isAllowed( 'edit' ) || $wgUser->isBlocked() ) { - $wgOut->addHTML( wfMsg( 'blog-permission-required' ) ); + $wgOut->addHTML( wfMessage( 'blog-permission-required' )->parse() ); return false; } } @@ -107,8 +107,9 @@ foreach ( $res as $row ) { $ctg = Title::makeTitle( NS_CATEGORY, $row->cl_to ); $ctgname = $ctg->getText(); - $blogCat = wfMsgForContent( 'blog-category' ); - $userBlogCat = wfMsgForContent( 'blog-by-user-category', $blogCat ); + $userBlogCat = wfMessage( 'blog-by-user-category', + wfMessage( 'blog-category' )->inContentLanguage()->text() + )->inContentLanguage()->text(); if( strpos( $ctgname, $userBlogCat ) !== false ) { $user_name = trim( str_replace( $userBlogCat, '', $ctgname ) ); @@ -211,10 +212,10 @@ "Got UserProfile articles for user {$user_name} from DB\n" ); $categoryTitle = Title::newFromText( - wfMsgForContent( + wfMessage( 'blog-by-user-category', - wfMsgForContent( 'blog-category' ) - ) . " {$user_name}" + wfMessage( 'blog-category' )->inContentLanguage()->text() + )->inContentLanguage()->text() . " {$user_name}" ); $dbr = wfGetDB( DB_SLAVE ); @@ -256,30 +257,27 @@ $articleLink = Title::makeTitle( NS_CATEGORY, - wfMsgForContent( + wfMessage( 'blog-by-user-category', - wfMsgForContent( 'blog-category' ) - ) . " {$user_name}" + wfMessage( 'blog-category' )->inContentLanguage()->text() + )->inContentLanguage()->text() . " {$user_name}" ); if ( count( $articles ) > 0 ) { $output .= ' ' . - wfMsg( 'blog-user-articles-title' ) . + wfMessage( 'blog-user-articles-title' )->text() . ' '; if( $articleCount > 5 ) { $output .= '' . wfMsg( 'user-view-all' ) . ''; + '" rel="nofollow">' . wfMessage( 'user-view-all' )->text() . ''; } $output .= ' - ' . wfMsgExt( + ' . wfMessage( 'user-count-separator', - 'parsemag', - count( $articles ), - $articleCount - ) . ' + )->numParams( count( $articles ), $articleCount )->text() . ' @@ -305,22 +303,18 @@ {$voteCount}
[MediaWiki-commits] [Gerrit] Recommend search for subscription using gateway - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/150158 Change subject: Recommend search for subscription using gateway .. Recommend search for subscription using gateway Deprecate subscr_id-only searches. Move towards using a full unique id in contribution_recur.trxn_id. Change-Id: I326765ae4c311b0130c1f74b4031b963792b79f6 --- M sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php M sites/all/modules/wmf_civicrm/recurring.inc M sites/all/modules/wmf_civicrm/tests/phpunit/RecurringTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 4 files changed, 78 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/58/150158/1 diff --git a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php index 195f946..8e55574 100644 --- a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php +++ b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php @@ -28,7 +28,7 @@ 'installments' => 0, 'processor_id' => 1, 'currency' => 'USD', -'trxn_id' => "TESTGATEWAY {$this->subscription_id}", +'trxn_id' => "RECURRING TESTGATEWAY {$this->subscription_id}", ) ); $this->contribution_recur_id = $result['id']; diff --git a/sites/all/modules/wmf_civicrm/recurring.inc b/sites/all/modules/wmf_civicrm/recurring.inc index f8d6e5b..928f7fb 100644 --- a/sites/all/modules/wmf_civicrm/recurring.inc +++ b/sites/all/modules/wmf_civicrm/recurring.inc @@ -400,8 +400,7 @@ /** * Get recurring record in CiviCRM for the given subscriber id * - * FIXME: tension between trxn_id as searchable index and full gateway style. - * Probably best to move towards full: "RECURRING GC ", with no effortid. + * @deprecated Use wmf_civicrm_get_gateway_subscription instead. * * @param string $subscr_id * @return object|false @@ -419,3 +418,33 @@ return $dao; } + +/** + * Get recurring record in CiviCRM for the given subscriber id + * + * There is tension between trxn_id as searchable index and full gateway style + * at the moment, so we search using either style: either bare gateway + * subscription ID, or trxn-style full natural key. + * + * @param string $subscr_id + * @return object|false + */ +function wmf_civicrm_get_gateway_subscription( $gateway, $subscr_id ) { + $full_trxn_id = "RECURRING {$gateway} {$subscr_id}"; + + $query = "select * +from civicrm_contribution_recur +where +trxn_id = %1 +or trxn_id = %2"; + $dao = CRM_Core_DAO::executeQuery( $query, array( +1 => array( $subscr_id, 'String' ), +2 => array( $full_trxn_id, 'String' ), + ) ); + + if ( !$dao->fetch() ) { +return false; + } + + return $dao; +} diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/RecurringTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/RecurringTest.php index a85e668..ecfdc9a 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/RecurringTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/RecurringTest.php @@ -9,6 +9,11 @@ ); } +public function setUp() { +parent::setUp(); +civicrm_initialize(); +} + /** * Test next_sched_contribution calculation * @@ -44,4 +49,43 @@ array( '2014-06-01T16:00:00Z', '1', '2014-07-01 00:00:00' ), ); } + +public function testGetGatewaySubscription() { +// TODO: fixtures +$result = civicrm_api3( 'Contact', 'create', array( +'first_name' => 'Testes', +'contact_type' => 'Individual', +) ); +$this->contact_id = $result['id']; + +$subscription_id_1 = 'SUB_FOO-' . mt_rand(); +$recur_values = array( +'contact_id' => $this->contact_id, +'amount' => '1.21', +'frequency_interval' => 1, +'frequency_unit' => 'month', +'next_sched_contribution' => wmf_common_date_unix_to_civicrm(strtotime('+1 month')), +'installments' => 0, +'processor_id' => 1, +'currency' => 'USD', +'trxn_id' => "RECURRING TESTGATEWAY {$subscription_id_1}", +); +$result = civicrm_api3( 'ContributionRecur', 'create', $recur_values ); + +$record = wmf_civicrm_get_gateway_subscription( 'TESTGATEWAY', $subscription_id_1 ); + +$this->assertTrue( is_object( $record ), +'Will match on full unique subscription ID' ); +$this->assertEquals( $recur_values['trxn_id'], $record->trxn_id ); + +$subscription_id_2 = 'SUB_FOO-' . mt_rand(); +$recur_values['trxn_id'] = $subscription_id_2; +$result = civicrm_api3( 'ContributionRecur', 'create', $recur_values ); + +
[MediaWiki-commits] [Gerrit] Begin to deprecate timestamp in contribution.trxn_id - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/150159 Change subject: Begin to deprecate timestamp in contribution.trxn_id .. Begin to deprecate timestamp in contribution.trxn_id Stop adding a timestamp to new contributions unique IDs. Preserve compatibility otherwise. Change-Id: I0af3bcdb7184b8c33848811093e02ca1719d290a --- M sites/all/modules/recurring_globalcollect/recurring_globalcollect.module M sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc M sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php M sites/all/modules/wmf_civicrm/WmfTransaction.php M sites/all/modules/wmf_common/tests/phpunit/WmfTransactionTest.php 5 files changed, 29 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/59/150159/1 diff --git a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module index db2fa49..cacae4f 100644 --- a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module +++ b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module @@ -396,6 +396,7 @@ /** * Create the form to search for subscriptions by order id. + * TODO: deprecate */ function recurring_globalcollect_search_by_order_id_form() { diff --git a/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc b/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc index 927ec15..5c5c8f9 100644 --- a/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc +++ b/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc @@ -113,6 +113,7 @@ * RECURRING GLOBALCOLLECT % * * This ignores the timestamp when doing a search. + * TODO: deprecate * * @param integer $order_id must be a positive integer. * @return false|array diff --git a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php index 8e55574..fcc85d3 100644 --- a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php +++ b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php @@ -69,7 +69,7 @@ } $this->assertEquals( 1, -preg_match( "/^RECURRING GLOBALCOLLECT {$this->subscription_id}-2 \d+\$/", $contribution['trxn_id'] ) ); +preg_match( "/^RECURRING GLOBALCOLLECT {$this->subscription_id}-2\$/", $contribution['trxn_id'] ) ); } } } diff --git a/sites/all/modules/wmf_civicrm/WmfTransaction.php b/sites/all/modules/wmf_civicrm/WmfTransaction.php index 8eeed8b..dfc27c6 100644 --- a/sites/all/modules/wmf_civicrm/WmfTransaction.php +++ b/sites/all/modules/wmf_civicrm/WmfTransaction.php @@ -15,11 +15,13 @@ class WmfTransaction { var $gateway; var $gateway_txn_id; -var $timestamp; var $is_refund; var $is_recurring; -//FIXME: we can't actually cache without wrapping set accessors +/** @deprecated */ +var $timestamp; + +//FIXME: we can't actually lazy evaluate without wrapping set accessors //var $unique_id; function get_unique_id() { @@ -33,17 +35,14 @@ $parts[] = "RECURRING"; } -//FIXME: validate that a gateway has been set. -$parts[] = $this->gateway; - -$txn_id = $this->gateway_txn_id; -$parts[] = $txn_id; - -// FIXME: deprecate the timestamp term -if ( !$this->timestamp ) { -$this->timestamp = time(); +if ( !$this->gateway ) { +throw new WmfException( 'INVALID_MESSAGE', 'Missing gateway.' ); } -$parts[] = $this->timestamp; +if ( !$this->gateway_txn_id ) { +throw new WmfException( 'INVALID_MESSAGE', 'Missing gateway_txn_id.' ); +} +$parts[] = $this->gateway; +$parts[] = $this->gateway_txn_id; return strtoupper( implode( " ", $parts ) ); } @@ -82,6 +81,7 @@ case 0: throw new WmfException( 'INVALID_MESSAGE', "Unique ID is missing terms." ); case 3: +// TODO: deprecate timestamp $transaction->timestamp = array_pop( $parts ); if ( !is_numeric( $transaction->timestamp ) ) { throw new WmfException( 'INVALID_MESSAGE', "Malformed unique id (timestamp does not appear to be numeric)" ); @@ -92,15 +92,11 @@ // pass case 1: // Note that this sucks in effort_id and any other stuff we're -// using to maintain an actually-unique per-gateway surrogate key. +// using to maintain an actually-unique per-gateway natural key. $transaction->gateway_txn_id = array_sh
[MediaWiki-commits] [Gerrit] sudo privileges should be in array - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/150160 Change subject: sudo privileges should be in array .. sudo privileges should be in array Enclose the sudo privileges in an array as everywhere else in the source tree. This was needed anyway but on ruby 1.9 String loses its .each method making the catalog compile fail Change-Id: I5e29eac3532c59c5e7775a887d2d3aba6d948167 --- M modules/authdns/manifests/account.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/60/150160/1 diff --git a/modules/authdns/manifests/account.pp b/modules/authdns/manifests/account.pp index c741b5a..1c1c00a 100644 --- a/modules/authdns/manifests/account.pp +++ b/modules/authdns/manifests/account.pp @@ -19,7 +19,7 @@ } sudo_user { $user: -privileges => 'ALL=NOPASSWD: /usr/local/sbin/authdns-local-update', +privileges => ['ALL=NOPASSWD: /usr/local/sbin/authdns-local-update'], } file { "${home}/.ssh": -- To view, visit https://gerrit.wikimedia.org/r/150160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e29eac3532c59c5e7775a887d2d3aba6d948167 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove dupe message. It belongs to BlueSpiceExtensins/Respon... - change (mediawiki...BlueSpiceFoundation)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/150161 Change subject: Remove dupe message. It belongs to BlueSpiceExtensins/ResponsibleEditors .. Remove dupe message. It belongs to BlueSpiceExtensins/ResponsibleEditors translatewiki.net script throws "Notice: Key 8:action-responsibleeditors-viewspecialpage already belongs to ext-bs, conflict with ext-bs-responsibleeditors" Change-Id: Id22c96e2b53915af6d711bdc8965475dad595fc5 --- M i18n/core/en.json 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/61/150161/1 diff --git a/i18n/core/en.json b/i18n/core/en.json index f9badde..4f32812 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -36,7 +36,6 @@ "bs-exception-view-admin-hint": "Please contact your system administrator.", "bs-exception-view-stacktrace-toggle-show-text": "Show error details", "bs-exception-view-stacktrace-toggle-hide-text": "Hide error details", - "action-responsibleeditors-viewspecialpage": "view pages which are protected with the \"ResponsibleEditors-Viewspecialpage\" right", "bs-viewtagerrorlist-legend": "$1 - Error", "bs-readonly": "The database is currently locked to new entries and other modifications, probably for routine database maintenance, after which it will be back to normal. The administrator who locked it offered this explanation: $1", "bs-imageofotheruser": "You are not allowed to upload an image for another user.", -- To view, visit https://gerrit.wikimedia.org/r/150161 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id22c96e2b53915af6d711bdc8965475dad595fc5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore wikipedia-ios-ui-SER-n4-DZC - change (translatewiki)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/150162 Change subject: Ignore wikipedia-ios-ui-SER-n4-DZC .. Ignore wikipedia-ios-ui-SER-n4-DZC Inused according to the documentation. Change-Id: I437d92bab9a8837809e6be171aa4b063b74c64f2 --- M groups/Wikimedia/WikimediaMobile-ios.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/62/150162/1 diff --git a/groups/Wikimedia/WikimediaMobile-ios.yaml b/groups/Wikimedia/WikimediaMobile-ios.yaml index c2528a3..749cd43 100644 --- a/groups/Wikimedia/WikimediaMobile-ios.yaml +++ b/groups/Wikimedia/WikimediaMobile-ios.yaml @@ -82,6 +82,7 @@ - "wikipedia-ios-ui-cq9-Zs-YsN.normalTitle" - "wikipedia-ios-ui-Vkd-3W-cSt.text" - "wikipedia-ios-ui-djd-0J-VZY.text" +- "wikipedia-ios-ui-SER-n4-DZC.text" --- BASIC: -- To view, visit https://gerrit.wikimedia.org/r/150162 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I437d92bab9a8837809e6be171aa4b063b74c64f2 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Amire80 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] added Universiteits Museum Utrecht to the wgCopyUploadsDomai... - change (operations/mediawiki-config)
Dan-nl has uploaded a new change for review. https://gerrit.wikimedia.org/r/150163 Change subject: added Universiteits Museum Utrecht to the wgCopyUploadsDomains array .. added Universiteits Museum Utrecht to the wgCopyUploadsDomains array Change-Id: I63a5ba9c7b9ede2b562632bfe061b2b079c3a642 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/63/150163/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 1fbbb07..5d2ac19 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10564,6 +10564,7 @@ '*.eur.nl', // Erasmus University Rotterdam bug 67355 'mochila_images.s3.amazonaws.com', //temporary for GWT upload bug 67344 'mochila_images2.s3.amazonaws.com', //temporary for GWT upload bug 67344 + '*.universiteitsmuseum.nl', // Universiteits Museum Utrecht ), ), -- To view, visit https://gerrit.wikimedia.org/r/150163 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63a5ba9c7b9ede2b562632bfe061b2b079c3a642 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dan-nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove dupe message. It belongs to BlueSpiceExtensins/Respon... - change (mediawiki...BlueSpiceFoundation)
Smuggli has submitted this change and it was merged. Change subject: Remove dupe message. It belongs to BlueSpiceExtensins/ResponsibleEditors .. Remove dupe message. It belongs to BlueSpiceExtensins/ResponsibleEditors translatewiki.net script throws "Notice: Key 8:action-responsibleeditors-viewspecialpage already belongs to ext-bs, conflict with ext-bs-responsibleeditors" Change-Id: Id22c96e2b53915af6d711bdc8965475dad595fc5 --- M i18n/core/en.json 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Robert Vogel: Checked; Looks good to me, but someone else must approve Smuggli: Verified; Looks good to me, approved diff --git a/i18n/core/en.json b/i18n/core/en.json index f9badde..4f32812 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -36,7 +36,6 @@ "bs-exception-view-admin-hint": "Please contact your system administrator.", "bs-exception-view-stacktrace-toggle-show-text": "Show error details", "bs-exception-view-stacktrace-toggle-hide-text": "Hide error details", - "action-responsibleeditors-viewspecialpage": "view pages which are protected with the \"ResponsibleEditors-Viewspecialpage\" right", "bs-viewtagerrorlist-legend": "$1 - Error", "bs-readonly": "The database is currently locked to new entries and other modifications, probably for routine database maintenance, after which it will be back to normal. The administrator who locked it offered this explanation: $1", "bs-imageofotheruser": "You are not allowed to upload an image for another user.", -- To view, visit https://gerrit.wikimedia.org/r/150161 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id22c96e2b53915af6d711bdc8965475dad595fc5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Mglaser Gerrit-Reviewer: Pigpen Gerrit-Reviewer: Robert Vogel Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Smuggli ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make double-normalization harmless - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/150164 Change subject: Make double-normalization harmless .. Make double-normalization harmless This fixes a bug which is currently breaking recurring import, where double-normalization causes source_enqueued_time to be encoded wrong. Change-Id: Ice385c5d21b7015e4296498bf8a2ec52d1520f08 --- A sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 88 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/64/150164/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php new file mode 100644 index 000..8c62687 --- /dev/null +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php @@ -0,0 +1,73 @@ + 'WmfCivicrm message normalization', +'group' => 'Pipeline', +'description' => 'Checks for queue message normalization behavior', +); +} + +public function testDoubleNormalization() { +// Start with a message already in normal form, to make comparison easy +$original_msg = array( +'anonymous' => 0, +'check_number' => '', +'city' => '', +'comment' => '', +'contact_id' => mt_rand(), +'contribution_recur_id' => mt_rand(), +'contribution_tracking_id' => mt_rand(), +'contribution_tracking_update' => '1', +'contribution_type' => 'cash', +'contribution_type_id' => '9', +'country' => 'IL', +'create_date' => time() + 11, +'currency' => 'USD', +'date' => time() + 1, +'effort_id' => '2', +'email' => 'test...@localhost.net', +'fee' => 0.5, +'first_name' => 'test', +'gateway' => 'paypal', +'gateway_txn_id' => '1234AB1234-2', +'gross' => 5.8, +'last_name' => 'es', +'letter_code' => '', +'middle_name' => '', +'net' => 5.29, +'optout' => 0, +'organization_name' => '', +'original_currency' => 'ILS', +'original_gross' => '20.00', +'payment_date' => time(), +'payment_instrument_id' => '25', +'payment_instrument' => 'Paypal', +'postal_code' => '', +'postmark_date' => null, +'recurring' => '1', +'source_enqueued_time' => time() + 2, +'source_host' => 'thulium', +'source_name' => 'PayPal IPN (legacy)', +'source_run_id' => mt_rand(), +'source_type' => 'listener', +'source_version' => 'legacy', +'start_date' => time() + 10, +'state_province' => '', +'street_address' => '', +'subscr_id' => 'TEST-S-1234567' . mt_rand(), +'supplemental_address_1' => '', +'supplemental_address_2' => '', +'thankyou_date' => '', +'txn_type' => 'subscr_payment', +'utm_campaign' => '', +); + +$msg = $original_msg; +$normal_msg_1 = wmf_civicrm_normalize_msg( $msg ); +$this->assertEquals( $original_msg, $normal_msg_1 ); +$normal_msg_2 = wmf_civicrm_normalize_msg( $normal_msg_1 ); +$this->assertEquals( $original_msg, $normal_msg_2 ); +} +} diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index a76b65d..10bd02c 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -346,6 +346,19 @@ } } +// Transform any unix timestamps into an unambiguous MySQL datetime literal. +$date_mangle = array( +'postmark_date', +'source_enqueued_time', +); +foreach ( $date_mangle as $field ) { +if ( is_numeric( $custom_vars[$field] ) +and strlen( $custom_vars[$field] ) < 14 +) { +$custom_vars[$field] = wmf_common_date_unix_to_sql( $custom_vars[$field] ); +} +} + $custom_vars += $custom_field_defaults; wmf_civicrm_set_custom_field_values( $contribution_result[ 'id' ], $custom_vars ); @@ -1100,6 +1113,7 @@ 'country' => '', 'state_province' => '', 'postal_code' => '', +'postmark_date' => null, 'check_number' => null, 'letter_code' => null, 'thankyou_date' => null, @@ -1150,6 +1164,7 @@ $anonymous = ( array_key_exists( 'anonymous', $msg) && $msg['anonymous'] == true && strtoupper( $msg['anonymous'] ) != "FALSE" ) ? 1 : 0; $optout = ( array_key_exists( 'optout', $
[MediaWiki-commits] [Gerrit] Fix timezone bug in next_sched search - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/150165 Change subject: Fix timezone bug in next_sched search .. Fix timezone bug in next_sched search This bug would prevent any self-recurrence for hours per day, by scanning a next_sched range which did not include the current day. Change-Id: Ib17a8383ca7e3824e1f051f56be1237756cabd55 --- M sites/all/modules/wmf_civicrm/recurring.inc 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/65/150165/1 diff --git a/sites/all/modules/wmf_civicrm/recurring.inc b/sites/all/modules/wmf_civicrm/recurring.inc index f8d6e5b..e5a6eec 100644 --- a/sites/all/modules/wmf_civicrm/recurring.inc +++ b/sites/all/modules/wmf_civicrm/recurring.inc @@ -176,6 +176,7 @@ * - date stringUses strtotime() to parse the date * - $limit integer Number of records to pull. Default is 1. * + * TODO: other gateways than GC * @todo The field `civicrm_payment_processor`.`payment_processor_type` should be set. * @todo Implement $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus( null, 'name' ); * @@ -183,6 +184,9 @@ */ function wmf_civicrm_get_next_sched_contribution($limit = 1, $date = 'now', $run_missed_days = 0) { +$oldTimezone = date_default_timezone_get(); +date_default_timezone_set( "UTC" ); + $date = date('Y-m-d', strtotime($date)); $start_day = $date . ' 00:00:00'; @@ -197,6 +201,8 @@ $start_day = date('Y-m-d 00:00:00', strtotime($decrement_date, $start_day_stamp)); } + +date_default_timezone_set( $oldTimezone ); $contribution_status_id = civicrm_api_contribution_status('Completed'); -- To view, visit https://gerrit.wikimedia.org/r/150165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib17a8383ca7e3824e1f051f56be1237756cabd55 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Documentation: Update $wgPasswordDefault and BcryptPassword - change (mediawiki/core)
Withoutaname has uploaded a new change for review. https://gerrit.wikimedia.org/r/150166 Change subject: Documentation: Update $wgPasswordDefault and BcryptPassword .. Documentation: Update $wgPasswordDefault and BcryptPassword Slight syntax code change for $wgPasswordDefault in DefaultSettings.php and fixed reference to global in BcryptPassword.php. Change-Id: I8d1d12c09ecd2f422f21a586e948f314e29fa605 --- M includes/DefaultSettings.php M includes/password/BcryptPassword.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/66/150166/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index e6dd544..1f58196 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4134,7 +4134,7 @@ */ $wgInvalidPasswordReset = true; -/* +/** * Default password type to use when hashing user passwords * * @since 1.24 diff --git a/includes/password/BcryptPassword.php b/includes/password/BcryptPassword.php index 4e5e878..dd806e2 100644 --- a/includes/password/BcryptPassword.php +++ b/includes/password/BcryptPassword.php @@ -24,7 +24,7 @@ * A Bcrypt-hashed password * * This is a computationally complex password hash for use in modern applications. - * The number of rounds can be configured by $wgPasswordCost. + * The number of rounds can be configured by $wgPasswordConfig['bcrypt']['cost']. * * @since 1.24 */ -- To view, visit https://gerrit.wikimedia.org/r/150166 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d1d12c09ecd2f422f21a586e948f314e29fa605 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Withoutaname ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improved file indexing - change (mediawiki...BlueSpiceExtensions)
Smuggli has uploaded a new change for review. https://gerrit.wikimedia.org/r/150167 Change subject: Improved file indexing .. Improved file indexing belongs to already merged commit https://gerrit.wikimedia.org/r/#/c/148972/ Change-Id: I3318b16e5fd32fd171ebbcea5520ea85d6cbaee2 --- M ExtendedSearch/includes/BuildIndex/AbstractBuildIndexFile.class.php M ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php M ExtendedSearch/includes/BuildIndex/BuildIndexMwExternalRepository.class.php M ExtendedSearch/includes/BuildIndex/BuildIndexMwLinked.class.php M ExtendedSearch/includes/BuildIndex/BuildIndexMwRepository.class.php 5 files changed, 35 insertions(+), 60 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/67/150167/1 diff --git a/ExtendedSearch/includes/BuildIndex/AbstractBuildIndexFile.class.php b/ExtendedSearch/includes/BuildIndex/AbstractBuildIndexFile.class.php index 8697b23..74f35ee 100644 --- a/ExtendedSearch/includes/BuildIndex/AbstractBuildIndexFile.class.php +++ b/ExtendedSearch/includes/BuildIndex/AbstractBuildIndexFile.class.php @@ -89,10 +89,12 @@ * @param int $iSize Size of document to check in bytes. * @return bool True if document is too big. */ - public function sizeExceedsMaxDocSize( $iSize ) { - if ( $this->iMaxDocSize === null || !is_int( $this->iMaxDocSize ) ) throw new Exception( 'iMaxDocSize not set or less than 1' ); - if ( $this->iMaxDocSize <= 0 ) return false; - return ( $iSize > $this->iMaxDocSize ); + public function sizeExceedsMaxDocSize( $iSize, $sFileName ) { + if ( $iSize > $this->iMaxDocSize ) { + wfDebugLog( 'ExtendedSearch', __METHOD__ . ' File exceeds max doc size and will not be indexed: ' . $sFileName ); + return true; + } + return false; } /** diff --git a/ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php b/ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php index 512ed82..bb0ac9d 100644 --- a/ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php +++ b/ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php @@ -399,11 +399,11 @@ // create lock file $this->lockFile( 'createLock' ); // create log file - $this->LogFile(); + $this->logFile(); // create progress file $this->progressFile( 'create' ); - $this->write( date( "d.m.Y H:i:s" ) . "\n" ); + $this->write( '', date( "d.m.Y H:i:s" ) . "\n" ); $sRes = ''; try { @@ -426,7 +426,7 @@ $this->iDocsInIndex . ' ' . wfMessage( 'bs-extendedsearch-docs-in-index' )->plain(), 100 ); - $this->logFile( 'write', date( "d.m.Y H:i:s" ) ); + $this->write( '', date( "d.m.Y H:i:s" ) ); // delete progress file $this->progressFile( 'delete' ); @@ -630,7 +630,7 @@ touch( $this->sFilePathIndexLogFile ); } else { unlink( $this->sFilePathIndexLogFile ); - $this->logFile( 'create' ); + $this->logFile(); } } diff --git a/ExtendedSearch/includes/BuildIndex/BuildIndexMwExternalRepository.class.php b/ExtendedSearch/includes/BuildIndex/BuildIndexMwExternalRepository.class.php index b1ec4fb..c156ddd 100644 --- a/ExtendedSearch/includes/BuildIndex/BuildIndexMwExternalRepository.class.php +++ b/ExtendedSearch/includes/BuildIndex/BuildIndexMwExternalRepository.class.php @@ -96,32 +96,25 @@ public function indexCrawledDocuments() { foreach ( $this->aFiles as $sFile ) { $oRepoFile = new SplFileInfo( $sFile ); + if ( !$oRepoFile->isFile() ) continue; + $sFileName = $sFileName; $sDocType = $this->mimeDecoding( $oRepoFile->getExtension() ); - if ( !$this->checkDocType( $sDocType, $oRepoFile->getFilename() ) ) continue; + if ( !$this->checkDocType( $sDocType, $sFileName ) ) continue; if ( !$this->oMainControl->bCommandLineMode ) set_time_limit( $this->iTimeLimit ); - try { - $repoFileSize = $oRepoFile->getSize(); // throws Exception if file does not exist - } catch ( Exception $e ) { - wfDebugLog( 'ExtendedSearch', __METHOD__ . ' File does not exist: ' . $oRepoFile->getFilename() ); - continue; - }
[MediaWiki-commits] [Gerrit] Move PasswordError under includes/password/ file - change (mediawiki/core)
Withoutaname has uploaded a new change for review. https://gerrit.wikimedia.org/r/150168 Change subject: Move PasswordError under includes/password/ file .. Move PasswordError under includes/password/ file Change-Id: I7256325492b2f6451223714efb8b3e07fca9ee3e --- M includes/AutoLoader.php M includes/User.php A includes/password/PasswordError.php 3 files changed, 29 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/68/150168/1 diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 905050d..9fa0c13 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -130,7 +130,6 @@ 'MWNamespace' => 'includes/MWNamespace.php', 'OutputPage' => 'includes/OutputPage.php', 'Pager' => 'includes/Pager.php', - 'PasswordError' => 'includes/User.php', 'PathRouter' => 'includes/PathRouter.php', 'PathRouterPatternReplacer' => 'includes/PathRouter.php', 'PhpHttpRequest' => 'includes/HttpFunctions.php', @@ -836,6 +835,7 @@ 'MWOldPassword' => 'includes/password/MWOldPassword.php', 'ParameterizedPassword' => 'includes/password/ParameterizedPassword.php', 'Password' => 'includes/password/Password.php', + 'PasswordError' => 'includes/password/PasswordError.php', 'PasswordFactory' => 'includes/password/PasswordFactory.php', 'Pbkdf2Password' => 'includes/password/Pbkdf2Password.php', 'EncryptedPassword' => 'includes/password/EncryptedPassword.php', diff --git a/includes/User.php b/includes/User.php index 73d4959..a887e36 100644 --- a/includes/User.php +++ b/includes/User.php @@ -39,14 +39,6 @@ define( 'EDIT_TOKEN_SUFFIX', '+\\' ); /** - * Thrown by User::setPassword() on error. - * @ingroup Exception - */ -class PasswordError extends MWException { - // NOP -} - -/** * The User object encapsulates all of the user-specific settings (user_id, * name, rights, password, email address, options, last login time). Client * classes use the getXXX() functions to access these fields. These functions diff --git a/includes/password/PasswordError.php b/includes/password/PasswordError.php new file mode 100644 index 000..c9707ad --- /dev/null +++ b/includes/password/PasswordError.php @@ -0,0 +1,28 @@ +http://www.gnu.org/copyleft/gpl.html + * + * @file + */ + +/** + * Show an error when any operation involving passwords fails to run. + * + * @ingroup Exception + */ +class PasswordError extends MWException { + // NOP +} -- To view, visit https://gerrit.wikimedia.org/r/150168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7256325492b2f6451223714efb8b3e07fca9ee3e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Withoutaname ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add at least one RTL language to the TestSites mock collection - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add at least one RTL language to the TestSites mock collection .. Add at least one RTL language to the TestSites mock collection When working on Wikibase/Wikidata we learned that it's always a good idea to test with at least one right-to-left (RTL) language. We prefer 'fa' (Farsi, the Persian language). This change affects about 30 tests. If they all succeed the change should be fine, right? Change-Id: I11ded5ff98816e604da8fb92993834eb7dc99b99 --- M tests/phpunit/includes/site/TestSites.php 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: Daniel Kinzler: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/tests/phpunit/includes/site/TestSites.php b/tests/phpunit/includes/site/TestSites.php index f224b7d..af314ba 100644 --- a/tests/phpunit/includes/site/TestSites.php +++ b/tests/phpunit/includes/site/TestSites.php @@ -72,7 +72,22 @@ $site->setLinkPath( "http://spamzz.test/testing/"; ); $sites[] = $site; - foreach ( array( 'en', 'de', 'nl', 'sv', 'sr', 'no', 'nn' ) as $langCode ) { + /** +* Add at least one right-to-left language (current RTL languages in MediaWiki core are: +* aeb, ar, arc, arz, azb, bcc, bqi, ckb, dv, en_rtl, fa, glk, he, khw, kk_arab, kk_cn, +* ks_arab, ku_arab, lrc, mzn, pnb, ps, sd, ug_arab, ur, yi). +*/ + $languageCodes = array( + 'de', + 'en', + 'fa', //right-to-left + 'nl', + 'nn', + 'no', + 'sr', + 'sv', + ); + foreach ( $languageCodes as $langCode ) { $site = new MediaWikiSite(); $site->setGlobalId( $langCode . 'wiki' ); $site->setGroup( 'wikipedia' ); -- To view, visit https://gerrit.wikimedia.org/r/135569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I11ded5ff98816e604da8fb92993834eb7dc99b99 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Hashar Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reuse existing date formats in MwTimeIsoFormatter - change (mediawiki...Wikibase)
Daniel Kinzler has submitted this change and it was merged. Change subject: Reuse existing date formats in MwTimeIsoFormatter .. Reuse existing date formats in MwTimeIsoFormatter This is an alternative approach for the suggested change in Ic7a5797. Warning, this requires I232fd3b to be merged first! Change-Id: Id09e26e78e6733d7de63e5dbadebe8821a9f4556 --- M lib/includes/formatters/MwTimeIsoFormatter.php M lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php 2 files changed, 17 insertions(+), 3 deletions(-) Approvals: WikidataJenkins: Verified Daniel Kinzler: Looks good to me, approved jenkins-bot: Checked diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php b/lib/includes/formatters/MwTimeIsoFormatter.php index 2c71732..e6d0fcd 100644 --- a/lib/includes/formatters/MwTimeIsoFormatter.php +++ b/lib/includes/formatters/MwTimeIsoFormatter.php @@ -123,10 +123,12 @@ } if ( $precision === TimeValue::PRECISION_MONTH ) { - return 'F Y'; + $format = $this->language->getDateFormatString( 'monthonly', 'dmy' ); + return $format ?: 'F Y'; } - return 'j F Y'; + $format = $this->language->getDateFormatString( 'date', 'dmy' ); + return $format ?: 'j F Y'; } /** diff --git a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php index c5c831f..a0a849b 100644 --- a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php +++ b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php @@ -265,6 +265,15 @@ '13 billion years BCE', ), + // Some languages default to genitive month names + array( + '+2013-08-16T00:00:00Z', TimeValue::PRECISION_DAY, + // Nominative is "Augustus", genitive is "Augusti". + '16 Augusti 2013', + true, + 'la' + ), + // Valid values with day, month and/or year zero array( '+0001995-00-00T00:00:00Z', TimeValue::PRECISION_YEAR, @@ -354,7 +363,8 @@ $argLists[] = array( isset( $args[2] ) ? $args[2] : $args[0], $timeValue, - isset( $args[3] ) + isset( $args[3] ), + isset( $args[4] ) ? $args[4] : 'en' ); } @@ -363,8 +373,10 @@ 'ar', //replaces all numbers and separators 'bo', //replaces only numbers 'de', //switches separators + 'la', //defaults to genitive month names 'or', //replaces all numbers and separators ); + foreach ( $languageCodes as $languageCode ) { $argLists[] = array( '', -- To view, visit https://gerrit.wikimedia.org/r/148641 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id09e26e78e6733d7de63e5dbadebe8821a9f4556 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) Gerrit-Reviewer: Addshore Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Eranroz Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: WikidataJenkins Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only use date formats that can roundtrip - change (mediawiki...Wikibase)
Daniel Kinzler has submitted this change and it was merged. Change subject: Only use date formats that can roundtrip .. Only use date formats that can roundtrip This partially reverts Id09e26e. Now the formatter checks for a few specific aspects of the format given in the respective MessagesXx.php: * Day can only be "d" (with leading zeros) or "j" (without). * Month can only be "F" (normal), "M" (abbreviation) or "xg" (genitive). * Both support optional dots or commas. * Spaces between the parts are enforced. * "Y" (full year) is enforced. Main change still is the added support for genitive month names which requires I232fd3b to make full roundtrips possible. See the comments in Id09e26e for more examples of strange date formats. Change-Id: I9aefa02a8355c9cca6ac750b2bf82a7734338640 --- M lib/includes/formatters/MwTimeIsoFormatter.php M lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php 2 files changed, 48 insertions(+), 6 deletions(-) Approvals: WikidataJenkins: Verified Daniel Kinzler: Looks good to me, approved Eranroz: Looks good to me, but someone else must approve Thiemo Mättig (WMDE): Looks good to me, but someone else must approve jenkins-bot: Checked diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php b/lib/includes/formatters/MwTimeIsoFormatter.php index e6d0fcd..1ebf18b 100644 --- a/lib/includes/formatters/MwTimeIsoFormatter.php +++ b/lib/includes/formatters/MwTimeIsoFormatter.php @@ -120,15 +120,43 @@ private function getDateFormat( $precision ) { if ( $precision <= TimeValue::PRECISION_YEAR ) { return 'Y'; - } - - if ( $precision === TimeValue::PRECISION_MONTH ) { + } elseif ( $precision === TimeValue::PRECISION_MONTH ) { $format = $this->language->getDateFormatString( 'monthonly', 'dmy' ); - return $format ?: 'F Y'; + return sprintf( '%s Y', $this->getMonthFormat( $format ) ); + } else { + $format = $this->language->getDateFormatString( 'date', 'dmy' ); + return sprintf( '%s %s Y', $this->getDayFormat( $format ), $this->getMonthFormat( $format ) ); + } + } + + /** +* @see Language::sprintfDate +* +* @param string $dateFormat +* +* @return string A date format for the day that roundtrips the Wikibase TimeParsers. +*/ + private function getDayFormat( $dateFormat ) { + if ( preg_match( '/[dj][.,]?/', $dateFormat, $matches ) ) { + return $matches[0]; } - $format = $this->language->getDateFormatString( 'date', 'dmy' ); - return $format ?: 'j F Y'; + return 'j'; + } + + /** +* @see Language::sprintfDate +* +* @param string $dateFormat +* +* @return string A date format for the month that roundtrips the Wikibase TimeParsers. +*/ + private function getMonthFormat( $dateFormat ) { + if ( preg_match( '/(?:[FM]|xg)[.,]?/', $dateFormat, $matches ) ) { + return $matches[0]; + } + + return 'F'; } /** diff --git a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php index a0a849b..244b72f 100644 --- a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php +++ b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php @@ -274,6 +274,20 @@ 'la' ), + // Preserve punctuation as given in MessagesXx.php but skip suffixes and words + array( + '+2013-08-16T00:00:00Z', TimeValue::PRECISION_DAY, + '16 Avgust. 2013', + true, + 'kaa' + ), + array( + '+2013-08-16T00:00:00Z', TimeValue::PRECISION_DAY, + '16 agosto 2013', + true, + 'pt' + ), + // Valid values with day, month and/or year zero array( '+0001995-00-00T00:00:00Z', TimeValue::PRECISION_YEAR, -- To view, visit https://gerrit.wikimedia.org/r/149294 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9aefa02a8355c9cca6ac750b2bf82a7734338640 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) Gerrit-Reviewer: Addshore Gerrit-Reviewer: Daniel Kinzler Ge
[MediaWiki-commits] [Gerrit] test: coverage for wfWikiID() - change (mediawiki/core)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/150169 Change subject: test: coverage for wfWikiID() .. test: coverage for wfWikiID() Basic coverage test, note that $wgDBprefix is used as a suffix! Bug: 68231 Change-Id: Ic454ce38672b1f18db2a7f2f46c50bcfc5ee83d0 --- A tests/phpunit/includes/GlobalFunctions/wfWikiIDTest.php 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/69/150169/1 diff --git a/tests/phpunit/includes/GlobalFunctions/wfWikiIDTest.php b/tests/phpunit/includes/GlobalFunctions/wfWikiIDTest.php new file mode 100644 index 000..d3cba0d --- /dev/null +++ b/tests/phpunit/includes/GlobalFunctions/wfWikiIDTest.php @@ -0,0 +1,22 @@ +setMwGlobals( 'wgDBname', 'known_db_name' ); + $this->assertEquals('known_db_name', wfWikiID() ); + } + + public function testHonorsDatabasePrefix() { + $this->setMwGlobals( array( + 'wgDBname' => 'known_db_name', + 'wgDBprefix' => 'prefix', + )); + # Note: prefix is actually a suffix in wfWikiID() + $this->assertEquals('known_db_name-prefix', wfWikiID() ); + } + +} -- To view, visit https://gerrit.wikimedia.org/r/150169 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic454ce38672b1f18db2a7f2f46c50bcfc5ee83d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WikidataBrowserTests now has tests in tests/browser - change (mediawiki/selenium)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/150170 Change subject: WikidataBrowserTests now has tests in tests/browser .. WikidataBrowserTests now has tests in tests/browser See https://github.com/wmde/WikidataBrowserTests/commit/47fbe3b32931b1626ba6 d59512e396d84d4e4d0d Change-Id: Ie3825d36f460828c3932fc81dd302125edc2daf8 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/70/150170/1 diff --git a/README.md b/README.md index 5d2f2ab..d27b6ae 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ 1. UniversalLanguageSelector: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/UniversalLanguageSelector), [GitHub](https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelector), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-UniversalLanguageSelector) 1. UploadWizard: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/UploadWizard), [GitHub](https://github.com/wikimedia/mediawiki-extensions-UploadWizard), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-UploadWizard) 1. VisualEditor: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/VisualEditor), [GitHub](https://github.com/wikimedia/mediawiki-extensions-VisualEditor), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-VisualEditor), `/modules/ve-mw/tests/browser` folder -1. WikidataBrowserTests: [GitHub](https://github.com/wmde/WikidataBrowserTests), [Code Climate](https://codeclimate.com/github/wmde/WikidataBrowserTests), [Jenkins](http://wdjenkins.wmflabs.org/ci/), `/` folder +1. WikidataBrowserTests: [GitHub](https://github.com/wmde/WikidataBrowserTests), [Code Climate](https://codeclimate.com/github/wmde/WikidataBrowserTests), [Jenkins](http://wdjenkins.wmflabs.org/ci/) 1. WikiLove: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/WikiLove), [GitHub](https://github.com/wikimedia/mediawiki-extensions-WikiLove), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-WikiLove) 1. ZeroBanner: [Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/ZeroBanner), [GitHub](https://github.com/wikimedia/mediawiki-extensions-ZeroBanner), [Code Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-ZeroBanner) -- To view, visit https://gerrit.wikimedia.org/r/150170 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3825d36f460828c3932fc81dd302125edc2daf8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Zfilipin ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove/deprecate various error functions in OutputPage - change (mediawiki/core)
Withoutaname has uploaded a new change for review. https://gerrit.wikimedia.org/r/150171 Change subject: Remove/deprecate various error functions in OutputPage .. Remove/deprecate various error functions in OutputPage Specifically removed functions showFatalError(), showUnexpectedValueError(), showFileCopyError(), showFileRenameError() and showFileNotFoundError() along with their only linked system messages "filecopyerror" and "filerenameerror". Deprecated showFileDeleteError() as it is still in use in multiple extensions. Change-Id: I9632270ee1f31fbb612db49bab419c659692c8e8 --- M RELEASE-NOTES-1.24 M includes/OutputPage.php M languages/i18n/en.json M languages/i18n/qqq.json 4 files changed, 5 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/71/150171/1 diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 8e6e8f5..577f903 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -284,6 +284,9 @@ and filelinks tables. Run update.php to apply this change to the schema. * Removed File::sha1Base36(). (deprecated since 1.19) * Removed File::getPropsFromPath(). (deprecated since 1.19) +* Removed showFatalError(), showUnexpectedValueError(), showFileCopyError(), + showFileRenameError() and showFileNotFoundError() from OutputPage. Also added + deprecation warning to OutputPage::showFileDeleteError(). Renamed classes * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 9685747..452b9f5 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2496,30 +2496,9 @@ } } - public function showFatalError( $message ) { - $this->prepareErrorPage( $this->msg( 'internalerror' ) ); - - $this->addHTML( $message ); - } - - public function showUnexpectedValueError( $name, $val ) { - $this->showFatalError( $this->msg( 'unexpected', $name, $val )->text() ); - } - - public function showFileCopyError( $old, $new ) { - $this->showFatalError( $this->msg( 'filecopyerror', $old, $new )->text() ); - } - - public function showFileRenameError( $old, $new ) { - $this->showFatalError( $this->msg( 'filerenameerror', $old, $new )->text() ); - } - public function showFileDeleteError( $name ) { - $this->showFatalError( $this->msg( 'filedeleteerror', $name )->text() ); - } - - public function showFileNotFoundError( $name ) { - $this->showFatalError( $this->msg( 'filenotfound', $name )->text() ); + wfDeprecated( __METHOD__, '1.24' ); + throw new ErrorPageError( 'internalerror', $this->msg( 'filedeleteerror', (array)$name ) ); } /** diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 78570dc..ef84bf3 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -316,8 +316,6 @@ "readonly_lag": "The database has been automatically locked while the slave database servers catch up to the master", "internalerror": "Internal error", "internalerror_info": "Internal error: $1", - "filecopyerror": "Could not copy file \"$1\" to \"$2\".", - "filerenameerror": "Could not rename file \"$1\" to \"$2\".", "filedeleteerror": "Could not delete file \"$1\".", "directorycreateerror": "Could not create directory \"$1\".", "filenotfound": "Could not find file \"$1\".", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index a95fb72..aa38615 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -478,8 +478,6 @@ "readonly_lag": "Error message displayed when the database is locked.", "internalerror": "{{Identical|Internal error}}", "internalerror_info": "Parameters:\n* $1 - error message", - "filecopyerror": "Parameters:\n* $1 - source file name\n* $2 - destination file name", - "filerenameerror": "Parameters:\n* $1 - old file name\n* $2 - new file name", "filedeleteerror": "Parameters:\n* $1 - file name", "directorycreateerror": "Parameters:\n* $1 - directory name", "filenotfound": "Parameters:\n* $1 - file name", -- To view, visit https://gerrit.wikimedia.org/r/150171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9632270ee1f31fbb612db49bab419c659692c8e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Withoutaname ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable browser tests for the GettingStarted extension - change (integration/jenkins-job-builder-config)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/150172 Change subject: Enable browser tests for the GettingStarted extension .. Enable browser tests for the GettingStarted extension Change-Id: I2b90c3628b0f7277adb29d567996a108f35bae37 Depends-On: I79d9468e56bc7941c7c5bb27a77d1622bc7d3836 --- M jobs.yaml 1 file changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/72/150172/1 diff --git a/jobs.yaml b/jobs.yaml index 8d0f28c..a31c8c3 100644 --- a/jobs.yaml +++ b/jobs.yaml @@ -16,6 +16,8 @@ qa-ale...@lists.wikimedia.org aahar...@wikimedia.org cmcma...@wikimedia.org kmis...@wikimedia.org nlaxst...@wikimedia.org sthottin...@wikimedia.org - VisualEditor: &emails-VisualEditor qa-ale...@lists.wikimedia.org cmcma...@wikimedia.org jforres...@wikimedia.org + - Growth: &emails-growth +qa-ale...@lists.wikimedia.org mflasc...@wikimedia.org rm...@wikimedia.org samsm...@wikimedia.org # CirrusSearch - project: @@ -102,6 +104,24 @@ mediawiki_password_variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WIKIPEDIA_ORG mediawiki_url: test2.wikipedia.org +# GettingStarted +- project: +name: GettingStarted +browser: firefox +folder: tests +headless: 'false' +mediawiki_password_variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG +mediawiki_url: en.m.wikipedia.beta.wmflabs.org +mediawiki_user: Selenium_user +platform: linux +recipients: *emails-growth +repository: mediawiki/extensions/GettingStarted + +jobs: + - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}': + + + # MobileFrontend - project: name: MobileFrontend -- To view, visit https://gerrit.wikimedia.org/r/150172 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b90c3628b0f7277adb29d567996a108f35bae37 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: cloudbees Gerrit-Owner: Phuedx ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DM 1.0 compat: do not use Entity::toArray - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: DM 1.0 compat: do not use Entity::toArray .. DM 1.0 compat: do not use Entity::toArray Change-Id: Ib02ed4e0e03b0c050354faf35b65d2ed9307d6a5 --- M lib/tests/phpunit/serializers/LegacyInternalEntitySerializerTest.php 1 file changed, 0 insertions(+), 24 deletions(-) Approvals: Hoo man: Looks good to me, approved WikidataJenkins: Verified Thiemo Mättig (WMDE): Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/lib/tests/phpunit/serializers/LegacyInternalEntitySerializerTest.php b/lib/tests/phpunit/serializers/LegacyInternalEntitySerializerTest.php index 7ef0b38..4bd0f39 100644 --- a/lib/tests/phpunit/serializers/LegacyInternalEntitySerializerTest.php +++ b/lib/tests/phpunit/serializers/LegacyInternalEntitySerializerTest.php @@ -22,30 +22,6 @@ */ class LegacyInternalEntitySerializerTest extends \PHPUnit_Framework_TestCase { - public function entityProvider() { - $empty = Item::newEmpty(); - - $withLabels = Item::newEmpty(); - $withLabels->setLabel( 'en', 'Hello' ); - $withLabels->setLabel( 'es', 'Holla' ); - - return array( - array( $empty ), - array( $withLabels ), - ); - } - - /** -* @dataProvider entityProvider -* @param Entity $entity -*/ - public function testSerialize( Entity $entity ) { - $serializer = new LegacyInternalEntitySerializer(); - $data = $serializer->serialize( $entity ); - - $this->assertEquals( $entity->toArray(), $data ); - } - public function legacyFormatBlobProvider() { $entity = Item::newEmpty(); $entity->setId( new ItemId( 'Q12' ) ); -- To view, visit https://gerrit.wikimedia.org/r/149237 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib02ed4e0e03b0c050354faf35b65d2ed9307d6a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: WikidataJenkins Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deleting all qa/browsertests jobs - change (integration/jenkins-job-builder-config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/150174 Change subject: Deleting all qa/browsertests jobs .. Deleting all qa/browsertests jobs The repository is empty now. Change-Id: I112322dfba53b9145053b87a43fb9221e2f31648 TODO: if this is merged, the jobs should be deleted from Jenkins. --- D qa.yaml 1 file changed, 0 insertions(+), 94 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/74/150174/1 diff --git a/qa.yaml b/qa.yaml deleted file mode 100644 index ef2fd7c..000 --- a/qa.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# Macro to install qa/browsertests and create a tarball out of it -- builder: -name: qa-browsertests-build - # See bug 54384 for some background -builders: - - shell: | - # Shared cache of gems to avoid hitting rubygems all the time - # See https://github.com/bundler/bundler/issues/2856 - export GEM_HOME="$WORKSPACE/../gems" - - mkdir vendor - - # Fetch bundle from rubygems repo - gem1.9.3 install --env-shebang -i vendor bundler --no-ri --no-rdoc - - # Prepare some paths lookup - export GEM_PATH="`pwd`/vendor" - - ./vendor/bin/bundle --version - ./vendor/bin/bundle install --gemfile=tests/browser/Gemfile --path vendor - - # Later on one can exec tests with: - # GEM_PATH=`pwd`/bundle:`pwd`vendor ./bundle/bin/bundle exec cucumber - -# Pre setup the browsertests dependencies and craft a tarball -# for easy reuse. Meant to be run on post merge commit. -- job-template: -name: 'qa-browsertests-postmerge' -node: contintLabsSlave -defaults: use-remote-zuul -triggers: - - zuul - -builders: - - qa-browsertests-build - - shell: | - # Make a tarball for archiving - GIT_COMMIT_SHORT=`git rev-parse --short HEAD` - TAR_FILE="qa-browsertests-$BUILD_NUMBER-g$GIT_COMMIT_SHORT.tar.gz" - tar -czf "$TAR_FILE" vendor tests/browser/.bundle - -publishers: - - archive: - artifacts: '*.tar.gz' - -- job-template: -name: 'qa-browsertests-build' -node: contintLabsSlave -defaults: use-remote-zuul -triggers: - - zuul -builders: - - qa-browsertests-build - - -# Should be a multi configuration job -- job-template: -name: 'qa-browsertests-run' -node: contintLabsSlave -defaults: use-remote-zuul -triggers: - - zuul -builders: - - qa-browsertests-build - - shell: | - # Publish some variables to env - export BROWSER="phantomjs" - export GEM_PATH=`pwd`/vendor - mkdir -p logs/ - ./vendor/bin/bundle exec cucumber --color \ ---format pretty \ ---format junit --out junit \ ---format html --out report.html \ ---tags @clean \ ---tags @$BROWSER - -publishers: - - xunit: - types: - - junit: - pattern: 'junit/*.xml' - - archive: - artifacts: 'report.html' - - -- project: -name: 'qa-browsertests' - -jobs: - - '{name}-ruby1.9.3lint' - - '{name}-yamllint' - - 'qa-browsertests-build' - - 'qa-browsertests-postmerge' - - 'qa-browsertests-run' -- To view, visit https://gerrit.wikimedia.org/r/150174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I112322dfba53b9145053b87a43fb9221e2f31648 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Zfilipin ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apache: cherry-pick mods added in Ia46312071 - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: apache: cherry-pick mods added in Ia46312071 .. apache: cherry-pick mods added in Ia46312071 * Make Ia46312071 smaller and safer by introducing the mods it depends on. * Make MPM changes do a config test. Change-Id: If903d5cb39f561203271a87fe192533fb7fd299d --- M modules/apache/manifests/mod.pp M modules/apache/manifests/mpm.pp 2 files changed, 9 insertions(+), 6 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/apache/manifests/mod.pp b/modules/apache/manifests/mod.pp index 819ec34..1f23bb8 100644 --- a/modules/apache/manifests/mod.pp +++ b/modules/apache/manifests/mod.pp @@ -4,7 +4,7 @@ # Apache mods. Because the classes are not parametrized, they may be # included multiple times without causing duplicate definition errors. # -class apache::mod {} # Stub to work around Puppet 2.x parser bug. +class apache::mod {} # Modules that are bundled with the apache2 package class apache::mod::actions { apache::mod_conf { 'actions':} } @@ -12,7 +12,9 @@ class apache::mod::auth_basic { apache::mod_conf { 'auth_basic': } } class apache::mod::authn_file { apache::mod_conf { 'authn_file': } } class apache::mod::authnz_ldap { apache::mod_conf { 'authnz_ldap':} } +class apache::mod::authz_host { apache::mod_conf { 'authz_host': } } class apache::mod::authz_user { apache::mod_conf { 'authz_user': } } +class apache::mod::autoindex { apache::mod_conf { 'autoindex': } } class apache::mod::cgi { apache::mod_conf { 'cgi':} } class apache::mod::dav { apache::mod_conf { 'dav':} } class apache::mod::dav_fs { apache::mod_conf { 'dav_fs': } } @@ -24,10 +26,10 @@ class apache::mod::proxy_balancer { apache::mod_conf { 'proxy_balancer': } } class apache::mod::proxy_http { apache::mod_conf { 'proxy_http': } } class apache::mod::rewrite { apache::mod_conf { 'rewrite':} } +class apache::mod::setenvif{ apache::mod_conf { 'setenvif': } } class apache::mod::ssl { apache::mod_conf { 'ssl':} } -class apache::mod::userdir { apache::mod_conf { 'userdir':} } class apache::mod::status { apache::mod_conf { 'status': } } - +class apache::mod::userdir { apache::mod_conf { 'userdir':} } # Modules that depend on additional packages class apache::mod::authz_svn { apache::mod_conf { 'authz_svn': } <- package { 'libapache2-svn': } } @@ -42,6 +44,6 @@ class apache::mod::wsgi{ apache::mod_conf { 'wsgi': } <- package { 'libapache2-mod-wsgi': } } # Modules that target a specific distribution -class apache::mod::proxy_fcgi{ if versioncmp($::lsbdistrelease, '13.10') >= 0 { apache::mod_conf { 'proxy_fcgi':} } } # 2.3+ -class apache::mod::access_compat { if versioncmp($::lsbdistrelease, '13.10') >= 0 { apache::mod_conf { 'access_compat': } } } # Not relevant -class apache::mod::version { if versioncmp($::lsbdistrelease, '13.10') < 0 { apache::mod_conf { 'version': } } } # Baked-in +class apache::mod::access_compat { if ubuntu_version('>= 13.10') { apache::mod_conf { 'access_compat': } } } +class apache::mod::proxy_fcgi{ if ubuntu_version('>= 13.10') { apache::mod_conf { 'proxy_fcgi':} } } +class apache::mod::version { if ubuntu_version( '< 13.10') { apache::mod_conf { 'version': } } } diff --git a/modules/apache/manifests/mpm.pp b/modules/apache/manifests/mpm.pp index 093d0eb..e7812bd 100644 --- a/modules/apache/manifests/mpm.pp +++ b/modules/apache/manifests/mpm.pp @@ -65,5 +65,6 @@ apache::mod_conf { $selected_mod: ensure => present, +notify => Exec['apache2_test_config_and_restart'], } } -- To view, visit https://gerrit.wikimedia.org/r/149066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If903d5cb39f561203271a87fe192533fb7fd299d Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] access: Matt Flaschen new key - change (operations/puppet)
Matanya has uploaded a new change for review. https://gerrit.wikimedia.org/r/150175 Change subject: access: Matt Flaschen new key .. access: Matt Flaschen new key public key was revoked at https://gerrit.wikimedia.org/r/#/c/148107/ RT #8016 Change-Id: I6be9198f3b8b2af48dce0c7af741ac65915ee27f --- M modules/admin/data/data.yaml 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/75/150175/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 9f3f7e6..44e41fb 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -544,7 +544,8 @@ gid: 500 name: mattflaschen realname: Matthew Flaschen -ssh_keys: [] +ssh_keys: [ssh-rsa B3NzaC1yc2EDAQABAAABAQDHESn/vYQ5F7M1fOWjQMKnTe83DpT0GSlDmJW9rhJO4GEX4VT2P/csQsNPjYHD4zqJyYf49mk1idldxg7QFjoZCeLvlw0QHcg+pTOh91IE2fP+V6qLErIs0VHW7pzPb4slevKqxYpKJKY2P4qvviulfENg4XoqkH8szfPdN0L0iouVZVLxIB2jjD561Zc0ytc1Kg4QW9dXZi3Jb7ukxdVC7v7Sipz/H8ge4urc4Y4BCbTPciRf30Ne5sRjqlR0qDvmeUhi9AOz/qmLqj4lmYRJ+OaaLat2ejyAFF0HAI/uZjtNgpvkaV85FlIahqKgVGKlCaV0fXOQP9oRUkvLPKsd +mflasc...@wikimedia.org] uid: 2662 marktraceur: ensure: present -- To view, visit https://gerrit.wikimedia.org/r/150175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6be9198f3b8b2af48dce0c7af741ac65915ee27f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Running Ruby linter for ArticleFeedbackv5 - change (integration/zuul-config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/150177 Change subject: Running Ruby linter for ArticleFeedbackv5 .. Running Ruby linter for ArticleFeedbackv5 Change-Id: If2cde320e03163f7fdc767920b56898642883ac5 --- M layout.yaml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/77/150177/1 diff --git a/layout.yaml b/layout.yaml index 63d15e2..7e949c1 100644 --- a/layout.yaml +++ b/layout.yaml @@ -1659,6 +1659,12 @@ - name: mediawiki/extensions/ArticleFeedbackv5 template: - name: extension-checks +check: + - mwext-ArticleFeedbackv5-ruby1.9.3lint +test: + - mwext-ArticleFeedbackv5-ruby1.9.3lint +gate-and-submit: + - mwext-ArticleFeedbackv5-ruby1.9.3lint - name: mediawiki/extensions/ApiSandbox template: -- To view, visit https://gerrit.wikimedia.org/r/150177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2cde320e03163f7fdc767920b56898642883ac5 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Zfilipin ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] IRC and WUI dependencies - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/150176 Change subject: IRC and WUI dependencies .. IRC and WUI dependencies Replace custom instructions in externals/README and remove custom patch file externals/patch-lua as several github repos include that change are a few are advanced well past that patch. Use dependency_links to setup.py to find suitable packages on github where the pypi package does not exist or is not usable for pywikibot. Change-Id: I096e55da10323b1a77fcc9f822f77ba23610c563 --- M externals/README D externals/patch-lua M scripts/script_wui.py M setup.py 4 files changed, 23 insertions(+), 159 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/76/150176/1 diff --git a/externals/README b/externals/README index 2e9b788..52cb293 100644 --- a/externals/README +++ b/externals/README @@ -1,33 +1,11 @@ -External dependencies for the rewrite branch. This package is only necessary to -run pywikibot from a fully self-sufficient (no other dependencies other than -python 2.6+) directory. This is especially useful on Windows. +This package is only necessary to run pywikibot from a fully self-sufficient +(no other dependencies other than python 2.6+) directory. +This is especially useful on Windows. Usually - under normal circumstances - these packages should be installed separately elsewhere in the OS by the standard package managing system. -If you want to run the rewrite as a stand-alone package, please also download -the contents of the externals/ subdirectory. Furthermore this includes git -repos and zip archives like: +If you want to run the rewrite as a stand-alone package, you may download +dependencies into the externals/ subdirectory, and they will automatically +be used by the pwb.py script. -* parse-crontab: Parse and use crontab schedules in Python - Version .14 -(from https://github.com/josiahcarlson/parse-crontab) -Checkout the git repository and copy the 'crontab' dir into the path -'externals/crontab' afterwards. Or download the zip archive and unpack the -'parse-crontab-master/crontab' dir into the path 'externals/crontab'. -$ wget https://github.com/josiahcarlson/parse-crontab/archive/master.zip -$ unzip master.zip -$ mv parse-crontab-master/crontab crontab -$ rm -rf parse-crontab-master - -* lunatic-python: Two-way bridge between Python and Lua - Version 1.0 -(from https://labix.org/lunatic-python) -Download the zip archive and unpack the 'lunatic-python-1.0' dir into the -path 'externals/_lua' afterwards. -$ wget https://labix.org/download/lunatic-python/lunatic-python-1.0.tar.bz2 -$ tar -xvf lunatic-python-1.0.tar.bz2 -$ mv lunatic-python-1.0 _lua -Patch package dir in order to work with newer lua (>= 5.1) versions -$ patch -p1 -d [path-to-install-dir]/_lua < [path-to-externals]/patch-lua -and you are done. -For the sake of completeness, the command invoked to create the patch was: -$ diff -Naur lunatic-python-1.0 _lua > patch-lua diff --git a/externals/patch-lua b/externals/patch-lua deleted file mode 100644 index 22f1f6b..000 --- a/externals/patch-lua +++ /dev/null @@ -1,128 +0,0 @@ -diff -Naur lunatic-python-1.0/__init__.py _lua/__init__.py lunatic-python-1.0/__init__.py 1970-01-01 01:00:00.0 +0100 -+++ _lua/__init__.py 2013-10-12 17:32:58.954669463 +0200 -@@ -0,0 +1,39 @@ -+# patches applied for compatibility with lua5.1: -+# https://github.com/bastibe/lunatic-python/issues/1 -+# http://lua-users.org/wiki/LunaticPython -+ -+import sys, os -+ -+#scriptdir = os.path.dirname(sys.argv[0]) -+#if not os.path.isabs(scriptdir): -+#scriptdir = os.path.abspath(os.path.join(os.curdir, scriptdir)) -+scriptdir = os.path.abspath(os.path.join(os.path.split(__file__)[0], '..', '..', 'scripts')) -+ -+libdir = os.path.join(scriptdir, '../externals/_lua/build/lib.linux-x86_64-%s.%s' % sys.version_info[:2]) -+if not os.path.exists(libdir): -+os.makedirs(libdir) -+# path has to exist BEFORE appending, otherwise the re-import fails -+sys.path.append(libdir) -+ -+try: -+# try to import -+from lua import * -+except ImportError, e: -+print "(re-)compilation triggered because of: '%s'" % e -+ -+cur = os.path.abspath(os.curdir) -+os.chdir( os.path.join(scriptdir, '../externals/_lua') ) -+ -+# remove/reset if existing already -+if os.path.exists(os.path.join(libdir, 'lua.so')): -+os.remove( os.path.join(libdir, 'lua.so') ) -+ -+# compile python module (may be use 'distutil' instead of 'make' here) -+if os.system("python setup.py build"): -+#if os.system("make"): -+raise ImportError("'lua.so' could not be compiled!") -+ -+os.chdir( cur ) -+ -+# re-try to import -+from lua import * -diff -Naur lunatic-python-1.0/python.lua _lua/python.lua lunatic-python-1.0/python.lua
[MediaWiki-commits] [Gerrit] Generate only one pair of snowmen for multi-sibling nodes - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Generate only one pair of snowmen for multi-sibling nodes .. Generate only one pair of snowmen for multi-sibling nodes If you had a leaf node rendered as 3 siblings (i.e. $element.length = 3), then ve.ce.getDomText() would return 6 snowman characters, but the correct number is 2. Put in a guard against double-snowmanning these nodes. Also clean up the surrounding code a bit: * Use Node.FOO_NODE constants directly * Get rid of check for Node.CDATA_SECTION_NODE (who uses that?!) Add unit tests, combining the tests for getDomHash and getDomText, and including cases to test all code paths, including this one. Bug: 67992 Bug: 68147 Bug: 68151 Bug: 68733 Bug: 68740 Change-Id: Ibf64fc0d3d03c639b2ad0f434949e75a42cef9ef --- M modules/ve/ce/ve.ce.js M modules/ve/tests/ce/ve.ce.test.js 2 files changed, 61 insertions(+), 28 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/ve.ce.js b/modules/ve/ce/ve.ce.js index 804e47e..e999752 100644 --- a/modules/ve/ce/ve.ce.js +++ b/modules/ve/ce/ve.ce.js @@ -32,8 +32,8 @@ * Gets the plain text of a DOM element (that is a node canContainContent === true) * * In the returned string only the contents of text nodes are included, and the contents of - * non-editable elements are excluded (but replaced with the appropriate number of characters - * so the offsets match up with the linear model). + * non-editable elements are excluded (but replaced with the appropriate number of snowman + * characters so the offsets match up with the linear model). * * @method * @param {HTMLElement} element DOM element to get text of @@ -42,15 +42,16 @@ ve.ce.getDomText = function ( element ) { // Inspired by jQuery.text / Sizzle.getText var func = function ( element ) { - var nodeType = element.nodeType, - text = '', - numChars, - $element = $( element ); + var viewNode, + nodeType = element.nodeType, + $element = $( element ), + text = ''; - // Node.ELEMENT_NODE = 1 - // Node.DOCUMENT_NODE = 9 - // Node.DOCUMENT_FRAGMENT_NODE = 11 - if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + if ( + nodeType === Node.ELEMENT_NODE || + nodeType === Node.DOCUMENT_NODE || + nodeType === Node.DOCUMENT_FRAGMENT_NODE + ) { if ( $element.hasClass( 've-ce-branchNode-slug' ) ) { // Slugs are not represented in the model at all, but they do // contain a single nbsp/FEFF character in the DOM, so make sure @@ -58,19 +59,23 @@ return ''; } else if ( $element.hasClass( 've-ce-leafNode' ) ) { // For leaf nodes, don't return the content, but return - // the right amount of characters so the offsets match up - numChars = $element.data( 'view' ).getOuterLength(); - // \u2603 is the snowman character: ☃ - return new Array( numChars + 1 ).join( '\u2603' ); + // the right number of placeholder characters so the offsets match up. + viewNode = $element.data( 'view' ); + // Only return snowmen for the first element in a sibling group: otherwise + // we'll double-count this node + if ( viewNode && element === viewNode.$element[0] ) { + // \u2603 is the snowman character: ☃ + return new Array( viewNode.getOuterLength() + 1 ).join( '\u2603' ); + } + // Second or subsequent sibling, don't double-count + return ''; } else { // Traverse its children for ( element = element.firstChild; element; element = element.nextSibling ) { text += func( element ); } } - // Node.TEXT_NODE = 3 - // Node.CDATA_SECTION_NODE = 4 (historical, unused in HTML5) - } else if ( nodeType === 3 || nodeType === 4 ) { + } else if ( nodeType === Node.TEXT_NODE ) { return element.data; } return text; diff -
[MediaWiki-commits] [Gerrit] make-wmf-branch: move class to its own file - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: make-wmf-branch: move class to its own file .. make-wmf-branch: move class to its own file Mixing CLI handling and the class is bad practice. Split them up. Might be able to write some tests for it later on but the first use case would be to reuse the logic easily. Change-Id: I140e72b91e592468498d87c14edefae279767ad7 --- A make-wmf-branch/MakeWmfBranch.php M make-wmf-branch/make-wmf-branch 2 files changed, 226 insertions(+), 222 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/make-wmf-branch/MakeWmfBranch.php b/make-wmf-branch/MakeWmfBranch.php new file mode 100644 index 000..1986783 --- /dev/null +++ b/make-wmf-branch/MakeWmfBranch.php @@ -0,0 +1,224 @@ +newVersion = $newVersion; + $this->oldVersion = $oldVersion; + $codeDir = dirname( __FILE__ ); + $buildDir = sys_get_temp_dir() . '/make-wmf-branch'; + + require( "{$codeDir}/default.conf" ); + if ( file_exists( "{$codeDir}/local.conf" ) ) { + require( "{$codeDir}/local.conf" ); + } + + $this->dryRun = $dryRun; + $this->buildDir = $buildDir; + $this->branchedExtensions = $branchedExtensions; + $this->branchedSkins = $branchedSkins; + $this->specialExtensions = $specialExtensions; + $this->noisy = $noisy; + $this->patches = $patches; + $this->baseRepoPath = $baseRepoPath; + $this->anonRepoPath = $anonRepoPath; + $this->branchPrefix = $branchPrefix; + } + + function runCmd( /*...*/ ) { + $args = func_get_args(); + if( $this->noisy && in_array( "-q", $args ) ) { + $args = array_diff( $args, array( "-q" ) ); + } + $encArgs = array_map( 'escapeshellarg', $args ); + $cmd = implode( ' ', $encArgs ); + + $attempts = 0; + do { + echo "$cmd\n"; + passthru( $cmd, $ret ); + + if ( !$ret ) { + // It worked! + return; + } + echo "sleeping for 5s\n"; + sleep( 5 ); + } while ( ++$attempts <= 5 ); + $this->croak( $args[0] . " exit with status $ret\n" ); + } + + function runWriteCmd( /*...*/ ) { + $args = func_get_args(); + if ( $this->dryRun ) { + $encArgs = array_map( 'escapeshellarg', $args ); + $cmd = implode( ' ', $encArgs ); + echo "[dry-run] $cmd\n"; + } else { + call_user_func_array( array( $this, 'runCmd' ), $args ); + } + } + + function chdir( $dir ) { + if ( !chdir( $dir ) ) { + $this->croak( "Unable to change working directory\n" ); + } + echo "cd $dir\n"; + } + + function croak( $msg ) { + fwrite( STDERR, "$msg\n" ); + exit( 1 ); + } + + function execute( $clonePath ) { + $this->setupBuildDirectory(); + foreach( $this->branchedExtensions as $ext ) { + $this->branchRepo( "extensions/{$ext}" ); + } + foreach( $this->branchedSkins as $skin ) { + $this->branchRepo( "skins/{$skin}" ); + } + $this->branchRepo( 'core/vendor' ); + $this->branchWmf( $clonePath ); + } + + function setupBuildDirectory() { + # Create a temporary build directory + if ( file_exists( $this->buildDir ) ) { + $this->runCmd( 'rm', '-rf', '--', $this->buildDir ); + } + if ( !mkdir( $this->buildDir ) ) { + $this->croak( "Unable to create build directory {$this->buildDir}" ); + } + $this->chdir( $this->buildDir ); + } + + function branchRepo( $path ) { + $repo = basename( $path ); + $this->runCmd( 'git', 'clone', '-q', "{$this->baseRepoPath}/{$path}.git", $repo ); + $this->chdir( $repo ); + $newVersion = $this->branchPrefix . $this->newVersion; + + $this->runCmd( 'git', 'checkout', '-q', '-b', $newVersion ); + + $this->fixGitReview(); + $this->runWriteCmd( 'git', 'commit', '-a', '-q', '-m', "Creating new {$newVersion} branch" ); + + $this->runWriteCmd( 'git', 'push', 'origin', $newVersion ); + $this->chdir( $this->b
[MediaWiki-commits] [Gerrit] fix object's static properties and constants (v 2.8.0) - change (mediawiki...PhpTags)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/150178 Change subject: fix object's static properties and constants (v 2.8.0) .. fix object's static properties and constants (v 2.8.0) * add Hooks::EXPECTS_MINIMUM_PARAMETERS * add Hooks::EXPECTS_MAXIMUM_PARAMETERS * add Hooks::TYPE_ARRAY * call checkArguments at Hook::createObject() Change-Id: Ibe47c3380be22c54ce5d76e697a7e03fd8b93552 --- M PhpTags.php M includes/Compiler.php M includes/GenericObject.php M includes/Hooks.php M includes/PhpTagsException.php M includes/Runtime.php 6 files changed, 79 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTags refs/changes/78/150178/1 diff --git a/PhpTags.php b/PhpTags.php index 007896f..bc0857e 100644 --- a/PhpTags.php +++ b/PhpTags.php @@ -16,7 +16,7 @@ } define( 'PHPTAGS_MAJOR_VERSION', 2 ); -define( 'PHPTAGS_MINOR_VERSION', 7 ); +define( 'PHPTAGS_MINOR_VERSION', 8 ); define( 'PHPTAGS_RELEASE_VERSION', 0 ); define( 'PHPTAGS_VERSION', PHPTAGS_MAJOR_VERSION . '.' . PHPTAGS_MINOR_VERSION . '.' . PHPTAGS_RELEASE_VERSION ); diff --git a/includes/Compiler.php b/includes/Compiler.php index 70734ae..603686a 100644 --- a/includes/Compiler.php +++ b/includes/Compiler.php @@ -511,7 +511,7 @@ if ( $this->id == '(' ) { // it is function $this->stepFunction( $result, array(PHPTAGS_STACK_COMMAND=>false, PHPTAGS_STACK_RESULT=>$text), $owner ); } elseif ( $owner !== false ) { // it is an objects property. Example: it's 'bar' for FOO::bar - $result[PHPTAGS_STACK_HOOK_TYPE] = $owner[1] === true ? PHPTAGS_HOOK_GET_STATIC_PROPERTY : PHPTAGS_HOOK_GET_OBJECT_PROPERTY; + $result[PHPTAGS_STACK_HOOK_TYPE] = $owner[1] === true ? PHPTAGS_HOOK_GET_OBJECT_CONSTANT : PHPTAGS_HOOK_GET_OBJECT_PROPERTY; $this->addValueIntoStack( $owner[0], $result, PHPTAGS_STACK_PARAM_3 ); } elseif ( $this->id == T_DOUBLE_COLON ) { // it is static constant or method of an object. Examples: FOO::property or FOO::method() $result[PHPTAGS_STACK_COMMAND] = false; @@ -546,7 +546,6 @@ $result = array( PHPTAGS_STACK_COMMAND=>'"', PHPTAGS_STACK_PARAM=>&$strings, PHPTAGS_STACK_RESULT=>null, PHPTAGS_STACK_TOKEN_LINE=>$this->tokenLine, PHPTAGS_STACK_DEBUG=>$text ); break; case T_VARIABLE: - static $assignOpers = array( '=', T_PLUS_EQUAL, T_MINUS_EQUAL, T_MUL_EQUAL, T_DIV_EQUAL, T_CONCAT_EQUAL, T_MOD_EQUAL, T_AND_EQUAL, T_OR_EQUAL, T_XOR_EQUAL, T_SL_EQUAL, T_SR_EQUAL ); $cannotRead = false; $variable = array( PHPTAGS_STACK_COMMAND=>PHPTAGS_T_VARIABLE, PHPTAGS_STACK_PARAM=>substr($text, 1), PHPTAGS_STACK_PARAM_2=>null, PHPTAGS_STACK_RESULT=>null, PHPTAGS_STACK_TOKEN_LINE=>$this->tokenLine, PHPTAGS_STACK_DEBUG=>$text ); @@ -579,7 +578,7 @@ $id = $this->id; $text = $this->text; - if ( in_array($id, $assignOpers) ) { // There is assignment operator @todo isset( $assignOpers[$id] ) + if ( in_array($id, self::$operatorsPrecedence[13]) ) { // It is assignment operator $this->stepUP(); $val =& $this->getNextValue( '=' ); if ( $val == false ) { // Example: $foo=; @@ -603,7 +602,7 @@ case PHPTAGS_HOOK_GET_OBJECT_PROPERTY: // Example: $foo = new FOO(); $foo->bar = $variable[PHPTAGS_STACK_HOOK_TYPE] = PHPTAGS_HOOK_SET_OBJECT_PROPERTY; break; - case PHPTAGS_HOOK_GET_STATIC_PROPERTY: // Example: $foo = new FOO(); $foo::bar = + case PHPTAGS_HOOK_GET_STATIC_PROPERTY: // Example: $foo = new FOO(); $foo::$bar = $variable[PHPTAGS_STACK_HOOK_TYPE] = PHPTAGS_HOOK_SET_STATIC_PROPERTY; break; default : // Example: FOO->$bar() = @@ -612,18 +611,20 @@ } $this->addValueIntoSt
[MediaWiki-commits] [Gerrit] Deleted duplicated lines with extension names - change (integration/jenkins-job-builder-config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/150179 Change subject: Deleted duplicated lines with extension names .. Deleted duplicated lines with extension names Change-Id: I8d58f6056bc344e840081705d23d78a1d0848526 --- M mediawiki-extensions.yaml 1 file changed, 0 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/79/150179/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 4c17ff9..0db82fb 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -368,12 +368,10 @@ - CentralAuth - CentralLogging - CentralNotice - - CentralNotice - CharInsert - CharRangeSpan - Checkpoint - CheckUser - - CirrusSearch - CirrusSearch - Cite - Citoid @@ -384,12 +382,6 @@ - CloseWikis - CodeEditor - CodeReview - - Collection - - Collection - - Collection - - Collection - - Collection - - Collection - Collection - Commentbox - CommentPages @@ -532,7 +524,6 @@ - GraphViz - GroupsSidebar - GuidedTour - - GuidedTour - GWToolset - HaloTripleStoreConnector - Hanp @@ -572,7 +563,6 @@ - Josa - JSBreadCrumbs - JsonConfig - - JsonData - JsonData - LabeledSectionTransclusion - LandingCheck @@ -700,9 +690,6 @@ - ParserFun - ParserFunctions - ParserHooks - - Parsoid - - Parsoid - - Parsoid - Parsoid - PartitionQuery - PDBHandler @@ -968,7 +955,6 @@ - WhoIsWatching - Widgets - WikiArticleFeeds - - Wikibase - Wikibase - WikibaseClient - WikibaseLib -- To view, visit https://gerrit.wikimedia.org/r/150179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d58f6056bc344e840081705d23d78a1d0848526 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Zfilipin ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deleted duplicated lines with extension names - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: Deleted duplicated lines with extension names .. Deleted duplicated lines with extension names Change-Id: I8d58f6056bc344e840081705d23d78a1d0848526 --- M mediawiki-extensions.yaml 1 file changed, 0 insertions(+), 14 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 4c17ff9..0db82fb 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -368,12 +368,10 @@ - CentralAuth - CentralLogging - CentralNotice - - CentralNotice - CharInsert - CharRangeSpan - Checkpoint - CheckUser - - CirrusSearch - CirrusSearch - Cite - Citoid @@ -384,12 +382,6 @@ - CloseWikis - CodeEditor - CodeReview - - Collection - - Collection - - Collection - - Collection - - Collection - - Collection - Collection - Commentbox - CommentPages @@ -532,7 +524,6 @@ - GraphViz - GroupsSidebar - GuidedTour - - GuidedTour - GWToolset - HaloTripleStoreConnector - Hanp @@ -572,7 +563,6 @@ - Josa - JSBreadCrumbs - JsonConfig - - JsonData - JsonData - LabeledSectionTransclusion - LandingCheck @@ -700,9 +690,6 @@ - ParserFun - ParserFunctions - ParserHooks - - Parsoid - - Parsoid - - Parsoid - Parsoid - PartitionQuery - PDBHandler @@ -968,7 +955,6 @@ - WhoIsWatching - Widgets - WikiArticleFeeds - - Wikibase - Wikibase - WikibaseClient - WikibaseLib -- To view, visit https://gerrit.wikimedia.org/r/150179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d58f6056bc344e840081705d23d78a1d0848526 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Zfilipin Gerrit-Reviewer: Cmcmahon Gerrit-Reviewer: Hashar 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 CNAME for osmdb service - change (operations/dns)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/150180 Change subject: Add CNAME for osmdb service .. Add CNAME for osmdb service 5 minutes TTL to allow for fast switchover from labsdb1006 to labsdb1007 and vice versa Change-Id: I6c8c72b026a1b1f9d5fa25cb5395f36f9032c593 --- M templates/wmnet 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/80/150180/1 diff --git a/templates/wmnet b/templates/wmnet index 770a905..b5f6921 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -217,6 +217,7 @@ x1-analytics-slave 5M IN CNAMEdb1031.eqiad.wmnet. analytics-slave 5M IN CNAMEdb1047.eqiad.wmnet. analytics-store 5M IN CNAMEdbstore1002.eqiad.wmnet. +osmdb 5M IN CNAMElabsdb1006.eqiad.wmnet. ; Cameras cam1-a-eqiad1H IN A10.64.0.27 -- To view, visit https://gerrit.wikimedia.org/r/150180 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c8c72b026a1b1f9d5fa25cb5395f36f9032c593 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Alexandros Kosiaris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove families for wikis that are inaccessible - change (pywikibot/compat)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/150181 Change subject: Remove families for wikis that are inaccessible .. Remove families for wikis that are inaccessible Change-Id: If57de48a7aabd9e9ae87368b003babbf10c5f195 --- D families/celtic_family.py D families/twcareer_family.py D families/ubuntutw_family.py D families/wikibond_family.py 4 files changed, 0 insertions(+), 186 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/81/150181/1 diff --git a/families/celtic_family.py b/families/celtic_family.py deleted file mode 100644 index c3b7543..000 --- a/families/celtic_family.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -import family - -# CeltIKI - The Celtic Encyclopedia - -class Family(family.Family): -def __init__(self): -family.Family.__init__(self) - -self.name = 'celtic' - -self.langs = { -'eml': 'celtic.gdr-online.eu', -} -self.namespaces[4] = { -'eml': u'CeltIKI', -} -self.namespaces[5] = { -'eml': u'Discussioni CeltIKI', -} -self.namespaces[6] = { -'eml': u'Immagine', -} -self.namespaces[7] = { -'eml': u'Discussioni immagine', -} - - -def version(self, code): -return "1.11.0" diff --git a/families/twcareer_family.py b/families/twcareer_family.py deleted file mode 100644 index 184a25f..000 --- a/families/twcareer_family.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- - -import family - -class Family(family.Family): - -def __init__(self): - -family.Family.__init__(self) -self.name = 'twcareer' - -self.langs = { -'zh': None, -} - -self.namespaces[4] = { -'_default': u'TwCareer', -} - -self.namespaces[5] = { -'_default': u'TwCareer talk', -} - -self.namespaces[6] = { -'_default': u'Image', -} - -self.namespaces[7] = { -'_default': u'Image talk', -} - -def hostname(self, code): -return 'www.twcareer.com' - -def version(self, code): -return "1.11.0" - -def scriptpath(self, code): -return '' diff --git a/families/ubuntutw_family.py b/families/ubuntutw_family.py deleted file mode 100644 index fb2b385..000 --- a/families/ubuntutw_family.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -import family - -class Family(family.Family): - -def __init__(self): - -family.Family.__init__(self) -self.name = 'ubuntutw' #Set the family name; this should be the same as in the filename. - -self.langs = { -'zh': None, -} - -self.namespaces[-2] = { -'_default': u'媒體', -} - -self.namespaces[-1] = { -'_default': u'特殊', -} - -self.namespaces[1] = { -'_default': u'討論', -'zh': u'使用者討論', -} - -self.namespaces[2] = { -'_default': u'使用者', -} - -self.namespaces[3] = { -'_default': u'討論', -'zh': u'使用者討論', -} - -self.namespaces[4] = { -'_default': u'Ubuntu 正體中文 Wiki', -} - -self.namespaces[5] = { -'_default': u'Ubuntu 正體中文 Wiki對話', -} - -self.namespaces[6] = { -'_default': u'圖片', -} - -self.namespaces[7] = { -'_default': u'圖片討論', -} - -self.namespaces[10] = { -'_default': u'模板', -} - -self.namespaces[11] = { -'_default': u'模板討論', -} - -self.namespaces[12] = { -'_default': u'使用說明', -} - -self.namespaces[13] = { -'_default': u'使用說明討論', -} - -self.namespaces[14] = { -'_default': u'分類', -} - -self.namespaces[15] = { -'_default': u'分類討論', -} - -def hostname(self, code): -return 'wiki.ubuntu-tw.org' - -def version(self, code): -return "1.12.0" - -def scriptpath(self, code): -return '' diff --git a/families/wikibond_family.py b/families/wikibond_family.py deleted file mode 100644 index 59caad4..000 --- a/families/wikibond_family.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -import family - -# I added this becouse someone asked me to. -# The url op the wiki: nl.wikibond.org - -class Family(family.Family): - -def __init__(self): -family.Family.__init__(self) -self.name = 'wikibond' -self.langs = { -'nl': 'nl.wikibond.org', -} -self.namespaces[4] = { -'nl': [u'WikiBond'], -} -self.namespaces[5] = { -'nl': [u'Overleg WikiBond'], -}
[MediaWiki-commits] [Gerrit] Comment icon positioning - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/150182 Change subject: Comment icon positioning .. Comment icon positioning * Tweak vertical position * Add padding to make click target larger * Add comment-in-heading test to demo Change-Id: I7bf62e2f9422a2e6c1fdf7b1cfdcfa92e4642d61 --- M demos/ve/pages/comments.html M modules/ve/ce/styles/nodes/ve.ce.CommentNode.css 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/82/150182/1 diff --git a/demos/ve/pages/comments.html b/demos/ve/pages/comments.html index 412b497..816bd27 100644 --- a/demos/ve/pages/comments.html +++ b/demos/ve/pages/comments.html @@ -14,7 +14,7 @@ Table 2 Baz -Foo Baz! Empty comment: +--> Baz! Empty comment: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. Foo Baz! diff --git a/modules/ve/ce/styles/nodes/ve.ce.CommentNode.css b/modules/ve/ce/styles/nodes/ve.ce.CommentNode.css index de0bd4d..f4b1a38 100644 --- a/modules/ve/ce/styles/nodes/ve.ce.CommentNode.css +++ b/modules/ve/ce/styles/nodes/ve.ce.CommentNode.css @@ -7,8 +7,9 @@ .ve-ce-commentNode { display: inline-block; - margin: 0 0.15em; - + vertical-align: middle; + padding: 0.2em; + margin: -0.25em 0.15em 0 0.15em; width: 1em; height: 1em; background-repeat: no-repeat; -- To view, visit https://gerrit.wikimedia.org/r/150182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7bf62e2f9422a2e6c1fdf7b1cfdcfa92e4642d61 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Images: Make the image tool self contained - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/150185 Change subject: Images: Make the image tool self contained .. Images: Make the image tool self contained * Now the module has no connection to other modules except the hook Helps us to load the module on demand Change-Id: I3fc0dd8b2eddc45027640f1e762dbdc4a95eba9b --- M modules/tools/ext.cx.tools.images.js M modules/translation/ext.cx.translation.js 2 files changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/85/150185/1 diff --git a/modules/tools/ext.cx.tools.images.js b/modules/tools/ext.cx.tools.images.js index a68b58c..2b2d79a 100644 --- a/modules/tools/ext.cx.tools.images.js +++ b/modules/tools/ext.cx.tools.images.js @@ -61,13 +61,10 @@ return deferred.promise(); } - /** -* jQuery plugin to adapt images so that parsoid can translate it to -* proper wiki text. -* @param {string} targetLanguage -*/ - $.fn.adaptImage = function ( targetLanguage ) { - return this.each( function () { + function adaptImage( $section ) { + var targetLanguage = mw.cx.targetLanguage; + + $section.find( 'img' ).each( function () { var $image = $( this ); getImageNamespaceTranslation( targetLanguage ) @@ -84,5 +81,9 @@ $image.parent( 'a' ).attr( 'href', resource ); } ); } ); - }; + } + + $( function () { + mw.hook( 'mw.cx.translation.postMT' ).add( adaptImage ); + } ); }( jQuery, mediaWiki ) ); diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index 049c5fc..5683b44 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -147,8 +147,6 @@ // Adapt links $section.adaptLinks( mw.cx.targetLanguage ); - // Adapt images - $section.find( 'img' ).adaptImage( mw.cx.targetLanguage ); // If the section is editable, initiate an editor. // Otherwise make it non-editable. Example: templates -- To view, visit https://gerrit.wikimedia.org/r/150185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3fc0dd8b2eddc45027640f1e762dbdc4a95eba9b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Links: Make the link module self contained - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/150186 Change subject: Links: Make the link module self contained .. Links: Make the link module self contained * Use the hooks to communicate * Remove $.fn.adaptLinks Helps to load the module conditionally. Change-Id: I3f66c3786c311f271c1ac223d3133405ff377b15 --- M modules/tools/ext.cx.tools.link.js M modules/translation/ext.cx.translation.js 2 files changed, 35 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/86/150186/1 diff --git a/modules/tools/ext.cx.tools.link.js b/modules/tools/ext.cx.tools.link.js index d859cf0..5f45b61 100644 --- a/modules/tools/ext.cx.tools.link.js +++ b/modules/tools/ext.cx.tools.link.js @@ -552,47 +552,45 @@ return false; } - /** -* jQuery plugin to adapt all the links with rel="mw:WikiLink" -* @param {string} targetLanguage -*/ - $.fn.adaptLinks = function ( targetLanguage ) { - var linkAdaptor = new LinkCard(); - return this.each( function () { - var $this = $( this ), - $links, - sourceTitles; + function adaptLinks( $section ) { + var linkAdaptor = new LinkCard(), + targetLanguage = mw.cx.targetLanguage, + $links, + sourceTitles; - // Handle clicks on the section, including future links - $this.on( 'click', 'a', linkClickHandler ); - $links = $this.find( 'a[rel="mw:WikiLink"]' ); - // Collect all sourceTitles; - sourceTitles = $links.map( function () { - var href = $( this ).attr( 'href' ); - // some cleanup - return cleanupLinkHref( href ); - } ).get(); + // Handle clicks on the section, including future links + $section.on( 'click', 'a', linkClickHandler ); + $links = $section.find( 'a[rel="mw:WikiLink"]' ); + // Collect all sourceTitles; + sourceTitles = $links.map( function () { + var href = $( this ).attr( 'href' ); + // some cleanup + return cleanupLinkHref( href ); + } ).get(); - // This callback is called after we have fetched the interwiki links. It - // updates the href appropriate for target language or removes the link. - function apply( adaptations ) { - $links.map( function () { - var $this = $( this ), - href = $this.attr( 'href' ); + // This callback is called after we have fetched the interwiki links. It + // updates the href appropriate for target language or removes the link. + function apply( adaptations ) { + $links.map( function () { + var $this = $( this ), + href = $this.attr( 'href' ); - href = cleanupLinkHref( href ); - if ( adaptations[ href ] ) { - $( this ).prop( 'href', adaptations[ href ] ); - } else { - // Remove the link - $( this ).after( $( this ).text() ).remove(); - } - } ); - } - linkAdaptor.adapt( sourceTitles, targetLanguage ).done( apply ); - } ); - }; + href = cleanupLinkHref( href ); + if ( adaptations[ href ] ) { + $( this ).prop( 'href', adaptations[ href ] ); + } else { + // Remove the link + $( this ).after( $( this ).text() ).remove(); + } + } ); + } + linkAdaptor.adapt( sourceTitles, targetLanguage ).done( apply ); + } mw.cx.tools.link = LinkCard; + + $( function () { + mw.hook( 'mw.cx.translation.postMT' ).add( adaptLinks ); + } ); }( jQuery, mediaWiki ) ); diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.
[MediaWiki-commits] [Gerrit] References: Make the module self contained - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/150184 Change subject: References: Make the module self contained .. References: Make the module self contained * Now Connection to other modules is only through hooks * Removed the $.fn.adaptReferences This help us to load the reference module independently, preferably on demand. Change-Id: Icef06db40be7d61fce6643daba744a7c952b447e --- M modules/tools/ext.cx.tools.reference.js M modules/translation/ext.cx.translation.js 2 files changed, 8 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/84/150184/1 diff --git a/modules/tools/ext.cx.tools.reference.js b/modules/tools/ext.cx.tools.reference.js index 49f8dc2..56c728e 100644 --- a/modules/tools/ext.cx.tools.reference.js +++ b/modules/tools/ext.cx.tools.reference.js @@ -153,25 +153,24 @@ $reference.attr( 'data-mw', JSON.stringify( mwData ) ); }; - /** -* jQuery plugin to adapt all the references with rel="mw:Extension/references" -*/ - $.fn.adaptReferences = function () { + function processReferences( $section ) { var referenceAdaptor = new ReferenceCard(); - - return this.each( function () { + $section.find( '[typeof="mw:Extension/ref"]' ).each( function () { var $reference = $( this ); // Click handler for references. - // TODO: This can be in a better place since - // this is not necessarily part of reference adaptation. $reference.on( 'click', function () { var $reference = $( this ); mw.hook( 'mw.cx.select.reference' ).fire( $reference.text(), $reference.data( 'mw' ), $reference, mw.cx.targetLanguage ); } ); + // Adapt references. referenceAdaptor.adaptReference( $reference ); } ); - }; + } mw.cx.tools.reference = ReferenceCard; + + $( function () { + mw.hook( 'mw.cx.translation.postMT' ).add( processReferences ); + } ); }( jQuery, mediaWiki ) ); diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index 80a16c8..049c5fc 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -149,10 +149,6 @@ $section.adaptLinks( mw.cx.targetLanguage ); // Adapt images $section.find( 'img' ).adaptImage( mw.cx.targetLanguage ); - // Adapt references - if ( $.fn.adaptReferences ) { // This is an experimental feature - $section.find( '[typeof="mw:Extension/ref"]' ).adaptReferences(); - } // If the section is editable, initiate an editor. // Otherwise make it non-editable. Example: templates -- To view, visit https://gerrit.wikimedia.org/r/150184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icef06db40be7d61fce6643daba744a7c952b447e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Instead of calling hook handler directly, trigger the hook - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/150183 Change subject: Instead of calling hook handler directly, trigger the hook .. Instead of calling hook handler directly, trigger the hook Making room for some more refactoring Change-Id: I9b727964e46c680b34cbb61379b20e35a58ce523 --- M modules/translation/ext.cx.translation.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/83/150183/1 diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index d0ac6d5..80a16c8 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -209,7 +209,7 @@ if ( machineTranslate ) { $section.machineTranslate(); } else { - this.postProcessMT( $section ); + mw.hook( 'mw.cx.translation.postMT' ).fire( $section ); } }; -- To view, visit https://gerrit.wikimedia.org/r/150183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b727964e46c680b34cbb61379b20e35a58ce523 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Configure testwikidata to use the "special" site link group - change (operations/mediawiki-config)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/150187 Change subject: Configure testwikidata to use the "special" site link group .. Configure testwikidata to use the "special" site link group Change-Id: I5bf5c77162480497dafabd16941e7a2b51d2e4ba --- M wmf-config/Wikibase.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/87/150187/1 diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php index db607d9..5d6bacb 100644 --- a/wmf-config/Wikibase.php +++ b/wmf-config/Wikibase.php @@ -42,12 +42,13 @@ 'wikiquote', 'wikisource', 'wikivoyage', - 'commons' ); - if ( $wgDBname === 'testwikidatawiki' ) { - $wgWBRepoSettings['siteLinkGroups'][] = 'testwikidata'; + if ( $wgDBname !== 'testwikidatawiki' ) { + $wgWBRepoSettings['siteLinkGroups'][] = 'commons'; + } else { $wgWBRepoSettings['specialSiteLinkGroups'][] = 'testwikidata'; + $wgWBRepoSettings['siteLinkGroups'][] = 'special'; } if ( $wgDBname === 'testwikidatawiki' ) { -- To view, visit https://gerrit.wikimedia.org/r/150187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bf5c77162480497dafabd16941e7a2b51d2e4ba Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Hoo man ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename overlay class rules - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/150188 Change subject: Rename overlay class rules .. Rename overlay class rules Depends on Ia99d368a in core. Change-Id: Ia90b6afbd4abdf3267f4ccaac0b2a7d4101ccc7b --- M modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/88/150188/1 diff --git a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css index e1d54b1..61a3c67 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css +++ b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css @@ -46,7 +46,7 @@ margin-left: 0; } -.ve-ui-surface-globalOverlay { +.ve-ui-overlay-global { z-index: 101; /* #p-personal is z-index 100 in vector :( */ } -- To view, visit https://gerrit.wikimedia.org/r/150188 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia90b6afbd4abdf3267f4ccaac0b2a7d4101ccc7b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Created Ruby lint job for ArticleFeedbackv5 - change (integration/jenkins-job-builder-config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/150189 Change subject: Created Ruby lint job for ArticleFeedbackv5 .. Created Ruby lint job for ArticleFeedbackv5 Created job: mwext-ArticleFeedbackv5-ruby1.9.3lint See also https://gerrit.wikimedia.org/r/#/c/150177/ Bug: 63469 Change-Id: Iecbc0d3ef7834fb08c683114386bcd0f7e33cdd2 --- M mediawiki-extensions.yaml 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/89/150189/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 0db82fb..a48cd46 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -1247,6 +1247,11 @@ dependencies: 'AbuseFilter,SpamBlacklist,CheckUser' - project: +name: 'mwext-ArticleFeedbackv5' +jobs: + - '{name}-ruby1.9.3lint' + +- project: name: 'mwext-BlameMaps' jobs: - python-jobs -- To view, visit https://gerrit.wikimedia.org/r/150189 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecbc0d3ef7834fb08c683114386bcd0f7e33cdd2 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Zfilipin ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add aliases file for Special:TimezoneSelector - change (mediawiki...TimezoneSelector)
MegaAlex has uploaded a new change for review. https://gerrit.wikimedia.org/r/150190 Change subject: Add aliases file for Special:TimezoneSelector .. Add aliases file for Special:TimezoneSelector Bug: 68787 Change-Id: I9289a0b6166b8af5ff2eeae443b0acf5eb235032 --- A TimezoneSelector.alias.php M TimezoneSelector.php 2 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimezoneSelector refs/changes/90/150190/1 diff --git a/TimezoneSelector.alias.php b/TimezoneSelector.alias.php new file mode 100644 index 000..ab4fff6 --- /dev/null +++ b/TimezoneSelector.alias.php @@ -0,0 +1,14 @@ + array( 'TimezoneSelector' ), +); diff --git a/TimezoneSelector.php b/TimezoneSelector.php index ca0fe34..9b52700 100644 --- a/TimezoneSelector.php +++ b/TimezoneSelector.php @@ -33,6 +33,7 @@ $wgMessagesDirs['TimezoneSelector'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['TimezoneSelector'] = __DIR__ . '/TimezoneSelector.i18n.php'; +$wgExtensionMessagesFiles[ 'TimezoneSelectorAlias' ] = __DIR__ . '/TimezoneSelector.alias.php'; $wgAutoloadClasses['TimezoneSelector'] = __DIR__ . '/TimezoneSelector.class.php'; -- To view, visit https://gerrit.wikimedia.org/r/150190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9289a0b6166b8af5ff2eeae443b0acf5eb235032 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimezoneSelector Gerrit-Branch: master Gerrit-Owner: MegaAlex ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove family file for wikis that are inaccessible - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: Remove family file for wikis that are inaccessible .. Remove family file for wikis that are inaccessible Change-Id: If57de48a7aabd9e9ae87368b003babbf10c5f195 --- D families/celtic_family.py D families/twcareer_family.py D families/ubuntutw_family.py D families/wesolve_family.py D families/wikibond_family.py 5 files changed, 0 insertions(+), 223 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/families/celtic_family.py b/families/celtic_family.py deleted file mode 100644 index c3b7543..000 --- a/families/celtic_family.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -import family - -# CeltIKI - The Celtic Encyclopedia - -class Family(family.Family): -def __init__(self): -family.Family.__init__(self) - -self.name = 'celtic' - -self.langs = { -'eml': 'celtic.gdr-online.eu', -} -self.namespaces[4] = { -'eml': u'CeltIKI', -} -self.namespaces[5] = { -'eml': u'Discussioni CeltIKI', -} -self.namespaces[6] = { -'eml': u'Immagine', -} -self.namespaces[7] = { -'eml': u'Discussioni immagine', -} - - -def version(self, code): -return "1.11.0" diff --git a/families/twcareer_family.py b/families/twcareer_family.py deleted file mode 100644 index 184a25f..000 --- a/families/twcareer_family.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- - -import family - -class Family(family.Family): - -def __init__(self): - -family.Family.__init__(self) -self.name = 'twcareer' - -self.langs = { -'zh': None, -} - -self.namespaces[4] = { -'_default': u'TwCareer', -} - -self.namespaces[5] = { -'_default': u'TwCareer talk', -} - -self.namespaces[6] = { -'_default': u'Image', -} - -self.namespaces[7] = { -'_default': u'Image talk', -} - -def hostname(self, code): -return 'www.twcareer.com' - -def version(self, code): -return "1.11.0" - -def scriptpath(self, code): -return '' diff --git a/families/ubuntutw_family.py b/families/ubuntutw_family.py deleted file mode 100644 index fb2b385..000 --- a/families/ubuntutw_family.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -import family - -class Family(family.Family): - -def __init__(self): - -family.Family.__init__(self) -self.name = 'ubuntutw' #Set the family name; this should be the same as in the filename. - -self.langs = { -'zh': None, -} - -self.namespaces[-2] = { -'_default': u'媒體', -} - -self.namespaces[-1] = { -'_default': u'特殊', -} - -self.namespaces[1] = { -'_default': u'討論', -'zh': u'使用者討論', -} - -self.namespaces[2] = { -'_default': u'使用者', -} - -self.namespaces[3] = { -'_default': u'討論', -'zh': u'使用者討論', -} - -self.namespaces[4] = { -'_default': u'Ubuntu 正體中文 Wiki', -} - -self.namespaces[5] = { -'_default': u'Ubuntu 正體中文 Wiki對話', -} - -self.namespaces[6] = { -'_default': u'圖片', -} - -self.namespaces[7] = { -'_default': u'圖片討論', -} - -self.namespaces[10] = { -'_default': u'模板', -} - -self.namespaces[11] = { -'_default': u'模板討論', -} - -self.namespaces[12] = { -'_default': u'使用說明', -} - -self.namespaces[13] = { -'_default': u'使用說明討論', -} - -self.namespaces[14] = { -'_default': u'分類', -} - -self.namespaces[15] = { -'_default': u'分類討論', -} - -def hostname(self, code): -return 'wiki.ubuntu-tw.org' - -def version(self, code): -return "1.12.0" - -def scriptpath(self, code): -return '' diff --git a/families/wesolve_family.py b/families/wesolve_family.py deleted file mode 100644 index ed03e60..000 --- a/families/wesolve_family.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- - -import family, wikipedia - -# The wikimedia family that is known as Wesolve - -class UploadDisabled(wikipedia.Error): -"""Uploads are disabled on this wiki""" - -class Family(family.Family): -def __init__(self): -family.Family.__init__(self) -self.name = 'wesolve' -self.langs = { -'wesolve': None, -} - -self.namespaces[4] = { -'_default': u'Wordsandmore', -} -self.namespaces[5] = { -'
[MediaWiki-commits] [Gerrit] Move hide.*Buttons functions to UWI - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Move hide.*Buttons functions to UWI .. Move hide.*Buttons functions to UWI Change-Id: Iad8d37df8c467dda73e9bfbee18297f7c69d899f Phabricator: http://fab.wmflabs.org/T464 --- M resources/mw.UploadWizard.js M resources/mw.UploadWizardInterface.js M resources/mw.UploadWizardUpload.js 3 files changed, 18 insertions(+), 18 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js index 8d33cbf..9d5133a 100644 --- a/resources/mw.UploadWizard.js +++ b/resources/mw.UploadWizard.js @@ -124,7 +124,7 @@ } ) .on( 'retry-uploads', function () { - wizard.hideFileEndButtons(); + wizard.ui.hideFileEndButtons(); wizard.startUploads(); } ) @@ -171,7 +171,7 @@ .on( 'start-details', function () { wizard.detailsValid( function () { - wizard.hideDetailsEndButtons(); + wizard.ui.hideDetailsEndButtons(); wizard.detailsSubmit( function () { wizard.detailsErrorCount(); wizard.showNext( 'details', 'complete', finalizeDetails ); @@ -532,18 +532,6 @@ this.updateFileCounts(); }, - - /** -* Hide the button choices at the end of the file step. -*/ - hideFileEndButtons: function() { - $( '#mwe-upwiz-stepdiv-file .mwe-upwiz-buttons .mwe-upwiz-file-endchoice' ).hide(); - }, - - hideDetailsEndButtons: function() { - $( '#mwe-upwiz-stepdiv-details .mwe-upwiz-buttons .mwe-upwiz-file-endchoice' ).hide(); - }, - /** * This is useful to clean out unused upload file inputs if the user hits GO. * We are using a second array to iterate, because we will be splicing the main one, _this.uploads @@ -681,7 +669,7 @@ var wizard = this; // remove the upload button, and the add file button $( '#mwe-upwiz-upload-ctrls' ).hide(); - this.hideFileEndButtons(); + this.ui.hideFileEndButtons(); $( '#mwe-upwiz-add-file' ).hide(); // reset any uploads in error state back to be shiny & new @@ -828,7 +816,7 @@ */ updateFileCounts: function() { // First reset the wizard buttons. - this.hideFileEndButtons(); + this.ui.hideFileEndButtons(); if ( this.uploads.length - this.countEmpties() ) { // we have uploads ready to go, so allow us to proceed diff --git a/resources/mw.UploadWizardInterface.js b/resources/mw.UploadWizardInterface.js index 7ae628a..a00871d 100644 --- a/resources/mw.UploadWizardInterface.js +++ b/resources/mw.UploadWizardInterface.js @@ -301,5 +301,19 @@ .click( startDetails ); }; + /** +* Hide the button choices at the end of the file step. +*/ + UWIP.hideFileEndButtons = function () { + $( '#mwe-upwiz-stepdiv-file .mwe-upwiz-buttons .mwe-upwiz-file-endchoice' ).hide(); + }; + + /** +* Hide the button choices at the end of the details step. +*/ + UWIP.hideDetailsEndButtons = function () { + $( '#mwe-upwiz-stepdiv-details .mwe-upwiz-buttons .mwe-upwiz-file-endchoice' ).hide(); + }; + mw.UploadWizardInterface = UploadWizardInterface; }( mediaWiki, jQuery, OO ) ); diff --git a/resources/mw.UploadWizardUpload.js b/resources/mw.UploadWizardUpload.js index de443f6..bd210b0 100644 --- a/resources/mw.UploadWizardUpload.js +++ b/resources/mw.UploadWizardUpload.js @@ -90,8 +90,6 @@ var upload = this; if ( mw.UploadWizard.config.startImmediately === true ) { - this.wizard.hideFileEndButtons(); - if ( !this.wizard.progressBar || this.wizard.progressBar.finished === true ) { this.wizard.startProgressBar(); } -- To view, visit https://gerrit.wikimedia.org/r/150033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iad8d37df8c467dda73e9bfbee18297f7c69d899f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: MarkTraceur Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@li
[MediaWiki-commits] [Gerrit] Clear up cached Main_page title in test - change (mediawiki...Echo)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/150191 Change subject: Clear up cached Main_page title in test .. Clear up cached Main_page title in test In Echo tests/NotificationFormatterTest.php there is a test that ends up invoking the Linker to create full URL for Main_page and pass it a fragment. Title::newMainPage() is really Title::newFromText('Main_Page') which is cached. Whenever the fragment is set, it stuck in the cache entry and later call to Title::newMainPage() yields a Title object which has the fragment. That cause Scribunto tests (at least) to fail when Echo tests are run before it because Scribunto tests expect a Main_Page title without a fragment. The ugly workaround is to have the Echo test to reset the fragment. We could clear up the Title cache between tests though. Bug: 68646 Change-Id: I625492fc8bf0dbd6e10275c3a728f5c1f85768c8 --- M tests/NotificationFormatterTest.php 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/91/150191/1 diff --git a/tests/NotificationFormatterTest.php b/tests/NotificationFormatterTest.php index 60f3b26..20349f2 100644 --- a/tests/NotificationFormatterTest.php +++ b/tests/NotificationFormatterTest.php @@ -34,6 +34,14 @@ } else { $this->assertRegExp( $pattern, $formatted['body'] ); } + + # Reset the Title cache + $mainPage = Title::newMainPage(); + $mainPage->setFragment(''); + # And assert it has been cleaned up + $mainPageCached = Title::newMainPage(); + $this->assertEquals( '', $mainPageCached->getFragment() ); + } public static function provider_editUserTalk() { -- To view, visit https://gerrit.wikimedia.org/r/150191 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I625492fc8bf0dbd6e10275c3a728f5c1f85768c8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Degrade Special:OrphanedTimedText gracefully if !$wgEnableLo... - change (mediawiki...TimedMediaHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Degrade Special:OrphanedTimedText gracefully if !$wgEnableLocalTimedText .. Degrade Special:OrphanedTimedText gracefully if !$wgEnableLocalTimedText When I was making the special page originally, I didn't realize it was an option to disable the TimedText namespace. In such a case it doesn't really make sense to have this special page listed. Change-Id: I23e8fe3a6bf794e78e910c068d50ef10863c2fa4 --- M SpecialOrphanedTimedText.php M i18n/en.json M i18n/qqq.json 3 files changed, 23 insertions(+), 4 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialOrphanedTimedText.php b/SpecialOrphanedTimedText.php index 1d3cdb4..52e86bf 100644 --- a/SpecialOrphanedTimedText.php +++ b/SpecialOrphanedTimedText.php @@ -44,7 +44,13 @@ * @param $par String subpage */ public function execute( $par ) { - if ( !$this->canExecute() ) { + global $wgEnableLocalTimedText; + + if ( !$wgEnableLocalTimedText ) { + $this->setHeaders(); + $this->getOutput()->addWikiMsg( 'orphanedtimedtext-notimedtext' ); + return; + } elseif ( !$this->canExecuteQuery() ) { $this->setHeaders(); $this->outputHeader(); $this->getOutput()->addWikiMsg( 'orphanedtimedtext-unsupported' ); @@ -79,12 +85,23 @@ * * @return bool */ - private function canExecute() { + private function canExecuteQuery() { $dbr = wfGetDB( DB_SLAVE ); return $dbr->getType() === 'mysql'; } /** +* Can we execute this special page +* +* That is, db is mysql, and TimedText namespace enabled. +*/ + private function canExecute() { + global $wgEnableLocalTimedText; + + return $this->canExecuteQuery() && $wgEnableLocalTimedText; + } + + /** * Get query info * * The query here is meant to retrieve all pages in the TimedText namespace, diff --git a/i18n/en.json b/i18n/en.json index 74ff3f8..63bebfc 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -114,5 +114,6 @@ "action-transcode-status": "view the current transcoding status", "orphanedtimedtext": "Orphaned TimedText pages", "orphanedtimedtext-summary": "List of [[{{#special:AllPages/TimedText:}}|{{ns:TimedText}}]] pages which do not have a corresponding file.", -"orphanedtimedtext-unsupported": "This special page is only supported on MySQL databases." +"orphanedtimedtext-unsupported": "This special page is only supported on MySQL databases.", +"orphanedtimedtext-notimedtext": "TimedText is not enabled on this wiki." } diff --git a/i18n/qqq.json b/i18n/qqq.json index 46ddde7..664b3cf 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -117,5 +117,6 @@ "action-transcode-status": "{{doc-action|transcode-status}}", "orphanedtimedtext": "{{doc-special|OrphanedTimedText}}", "orphanedtimedtext-summary": "Summary of Special:OrphanedTimedText.", - "orphanedtimedtext-unsupported": "Shown if Special:OrphanedTimedText isn't supported for the current database back-end." + "orphanedtimedtext-unsupported": "Shown if Special:OrphanedTimedText isn't supported for the current database back-end.", + "orphanedtimedtext-notimedtext": "Shown on Special:OrphanedTimedText if the TimedText namespace is disabled on that wiki (i.e. $wgEnableLocalTimedText is set to false). Note, do not use {{ns:TimedText}} in this message." } -- To view, visit https://gerrit.wikimedia.org/r/149788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23e8fe3a6bf794e78e910c068d50ef10863c2fa4 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brian Wolff Gerrit-Reviewer: Gilles Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unused CSS classes - change (oojs/ui)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/150192 Change subject: Remove unused CSS classes .. Remove unused CSS classes By searching for CSS classes that don't exist in the code. In some cases the classes were used but had been renamed. Change-Id: I9f6823bfb6efcee0e5f479e23afbe91f1581ac57 --- M src/Frame.js M src/layouts/FieldLayout.js M src/styles/Frame.less M src/styles/Toolbar.less M src/styles/layouts/FieldsetLayout.less 5 files changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/92/150192/1 diff --git a/src/Frame.js b/src/Frame.js index 0b9aecb..83a3854 100644 --- a/src/Frame.js +++ b/src/Frame.js @@ -196,6 +196,9 @@ // Initialize contents doc.open(); + // The following classes can be used here: + // oo-ui-ltr + // oo-ui-rtl doc.write( '' + '' + diff --git a/src/layouts/FieldLayout.js b/src/layouts/FieldLayout.js index b2405c1..bc79c77 100644 --- a/src/layouts/FieldLayout.js +++ b/src/layouts/FieldLayout.js @@ -125,6 +125,11 @@ this.$element.removeClass( 'oo-ui-fieldLayout-align-' + this.align ); } this.align = value; + // The following classes can be used here: + // oo-ui-fieldLayout-align-left + // oo-ui-fieldLayout-align-right + // oo-ui-fieldLayout-align-top + // oo-ui-fieldLayout-align-inline this.$element.addClass( 'oo-ui-fieldLayout-align-' + this.align ); } diff --git a/src/styles/Frame.less b/src/styles/Frame.less index 8c49648..dc0525c 100644 --- a/src/styles/Frame.less +++ b/src/styles/Frame.less @@ -2,10 +2,9 @@ margin: 0; padding: 0; - &-body { + &-content { margin: 0; padding: 0; - background: none; } /* Content div takes focus when opened, so hide outline */ diff --git a/src/styles/Toolbar.less b/src/styles/Toolbar.less index 236cbf0..0ace0ac 100644 --- a/src/styles/Toolbar.less +++ b/src/styles/Toolbar.less @@ -7,10 +7,6 @@ line-height: 1em; } - &-bottom .oo-ui-toolbar-bar { - position: absolute; - } - &-actions { float: right; } diff --git a/src/styles/layouts/FieldsetLayout.less b/src/styles/layouts/FieldsetLayout.less index d35a036..9bd786e 100644 --- a/src/styles/layouts/FieldsetLayout.less +++ b/src/styles/layouts/FieldsetLayout.less @@ -7,10 +7,6 @@ margin-top: 2em; } - &-labeled { - margin-top: -0.75em; - } - > .oo-ui-labeledElement-label { margin-bottom: 0.5em; padding: 0.25em 0; -- To view, visit https://gerrit.wikimedia.org/r/150192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f6823bfb6efcee0e5f479e23afbe91f1581ac57 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove direction style attribute - change (oojs/ui)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/150193 Change subject: Remove direction style attribute .. Remove direction style attribute CSS direction is already set using the class. Change-Id: I096366bdf297b23e1f46a63465cb531c63cd24a3 --- M src/Frame.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/93/150193/1 diff --git a/src/Frame.js b/src/Frame.js index 0b9aecb..413d511 100644 --- a/src/Frame.js +++ b/src/Frame.js @@ -199,7 +199,7 @@ doc.write( '' + '' + - '' + + '' + '' + '' ); -- To view, visit https://gerrit.wikimedia.org/r/150193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I096366bdf297b23e1f46a63465cb531c63cd24a3 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Feature detect OOJS compatibility - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Feature detect OOJS compatibility .. Feature detect OOJS compatibility OOJS uses es5-shim but does not use es5-sham so the following ES5 functions are not polyfilled: Object.getPrototypeOf Object.defineProperty Object.getOwnPropertyDescriptor Object.getOwnPropertyNames Object.create Object.defineProperties Object.seal Object.freeze Object.preventExtensions Object.isSealed Object.isFrozen Object.isExtensible Grepping on them shows that Object.create is the only one in use in OOJS, so checking for its existence should be enough to ensure that OOJS works in the given browser. Change-Id: Icf54a9c35b3599dd1831c10ffcd9f15573dc8b00 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/813 --- M MultimediaViewer.php M resources/mmv/mmv.base.js 2 files changed, 9 insertions(+), 10 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 98c6cc5..7d23bea 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -310,10 +310,6 @@ 'scripts' => array( 'mmv/mmv.base.js', ), - - 'dependencies' => array( - 'jquery.client', - ), ), 'mmv.ui' => $wgMediaViewerResourceTemplate + array( diff --git a/resources/mmv/mmv.base.js b/resources/mmv/mmv.base.js index f9154d8..97ee0ea 100644 --- a/resources/mmv/mmv.base.js +++ b/resources/mmv/mmv.base.js @@ -16,13 +16,16 @@ */ // Included on every page which has images so keep it lightweight. -( function ( mw, $ ) { +( function ( mw ) { mw.mmv = { - // We have to disable support for IE < 9 until this is fixed: https://bugzilla.wikimedia.org/show_bug.cgi?id=63303 - // This can't be done with feature detection, as the error IE triggers in that situation can't be caught + /** +* Feature-detects OOJS support. OOJS uses es5-shim, and from the remaining ES5 additions +* (the ones provided by es5-sham) the only one it uses is Object.create. +* @member mw.mmv.MultimediaViewer +* @return {boolean} +*/ isBrowserSupported : function () { - var profile = $.client.profile(); - return ! ( profile.name === 'msie' && profile.versionNumber < 9 ); + return !!Object.create; } }; -}( mediaWiki, jQuery ) ); +}( mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/150086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf54a9c35b3599dd1831c10ffcd9f15573dc8b00 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gergő Tisza Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove $.notify - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Remove $.notify .. Remove $.notify It doesn't *do* anything. Change-Id: I92884789dda40e32d0e7535c96f64cb877d1a41f Phabricator: http://fab.wmflabs.org/T462 --- M resources/mw.UploadWizard.js 1 file changed, 0 insertions(+), 9 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js index 8d33cbf..7882626 100644 --- a/resources/mw.UploadWizard.js +++ b/resources/mw.UploadWizard.js @@ -499,7 +499,6 @@ upload.start(); }, function() { - $().notify( mw.message( 'mwe-upwiz-files-complete' ).escaped() ); wizard.showNext( 'file', 'stashed' ); } ); @@ -726,7 +725,6 @@ upload.start(); }, function() { - $().notify( mw.message( 'mwe-upwiz-files-complete' ).escaped() ); wizard.showNext( 'file', 'stashed' ); } ); @@ -1314,13 +1312,6 @@ mw.isEmpty = function( v ) { return v === undefined || v === null || v === ''; }; - - $.fn.notify = function ( /*message*/ ) { - // could do something here with Chrome's in-browser growl-like notifications. - // play a sound? - // if the current tab does not have focus, use an alert? - // alert( message ); - }; $.fn.enableNextButton = function() { return this.find( '.mwe-upwiz-button-next' ) -- To view, visit https://gerrit.wikimedia.org/r/150039 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I92884789dda40e32d0e7535c96f64cb877d1a41f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: MarkTraceur Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove 'remove' button from comment inspector - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/150194 Change subject: Remove 'remove' button from comment inspector .. Remove 'remove' button from comment inspector The comment inspector is for a node, not an annotation, so a remove button is not required (like the MW extension inspector). You can already remove the using backspace/delete or by blanking the text. We don't, for comparison, have a remove button on the MW image dialog. Change-Id: I8d9fedb7d77dbfc4b3f2d7419d881e2101462a86 --- M modules/ve/ui/inspectors/ve.ui.CommentInspector.js 1 file changed, 2 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/94/150194/1 diff --git a/modules/ve/ui/inspectors/ve.ui.CommentInspector.js b/modules/ve/ui/inspectors/ve.ui.CommentInspector.js index 18a7430..c85cf7b 100644 --- a/modules/ve/ui/inspectors/ve.ui.CommentInspector.js +++ b/modules/ve/ui/inspectors/ve.ui.CommentInspector.js @@ -49,12 +49,6 @@ label: OO.ui.deferMsg( 'visualeditor-commentinspector-insert' ), flags: [ 'constructive', 'primary' ], modes: 'insert' - }, - { - action: 'remove', - label: OO.ui.deferMsg( 'visualeditor-inspector-remove-tooltip' ), - flags: 'destructive', - modes: 'edit' } ]; @@ -81,7 +75,7 @@ * @inheritdoc */ ve.ui.CommentInspector.prototype.getActionProcess = function ( action ) { - if ( action === 'remove' || action === 'insert' ) { + if ( action === 'insert' ) { return new OO.ui.Process( function () { this.close( { action: action } ); }, this ); @@ -145,7 +139,7 @@ rawNewValue = this.whitespace[0] + newValue + this.whitespace[1]; if ( this.commentNode ) { - if ( data.action === 'remove' || newValue === '' ) { + if ( newValue === '' ) { // Remove comment node this.fragment = this.getFragment().clone( this.commentNode.getOuterRange() ); this.fragment.removeContent(); -- To view, visit https://gerrit.wikimedia.org/r/150194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d9fedb7d77dbfc4b3f2d7419d881e2101462a86 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix handling of the specialSiteLinkGroups setting - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/150195 Change subject: Fix handling of the specialSiteLinkGroups setting .. Fix handling of the specialSiteLinkGroups setting Also add some documentation. Change-Id: I5004ee8e823ed0cd245793c61d54246a4805e618 --- M docs/options.wiki M lib/includes/modules/SitesModule.php M lib/resources/wikibase.ui.SiteLinksEditTool.js M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/View/SiteLinksView.php M repo/includes/api/GetEntities.php M repo/includes/api/LinkTitles.php M repo/includes/api/ModifyEntity.php M repo/includes/api/SiteLinkTargetProvider.php M repo/tests/phpunit/includes/View/SiteLinksViewTest.php M repo/tests/phpunit/includes/api/SiteLinkTargetProviderTest.php 12 files changed, 157 insertions(+), 63 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/95/150195/1 diff --git a/docs/options.wiki b/docs/options.wiki index e839424..4621249 100644 --- a/docs/options.wiki +++ b/docs/options.wiki @@ -10,6 +10,7 @@ ;changesDatabase: The database that changes are recorded to for processing by clients. This must be set to a symbolic database identifier that MediaWiki's LBFactory class understands; false means that the wiki's own database shall be used. '''Note''' that on the client, this setting should usually be the same as the repoDatabase setting. ;siteLinkGroups: The site groups to use in sitelinks. Must correspond to a value used to give the site group in the MediaWiki sites table. Default is array( "wikipedia" ). This defines which groups of sites can be linked to Wikibase items. '''Note''' that this setting replaces the old ''siteLinkGroup'' setting, which only allowed for a single group. +;specialSiteLinkGroups: This maps one or more site groups into a single "special" group. This is useful if sites from multiple site groups should be shown in a single "special" section on item pages, instead of one section per site group. ;localClientDatabases: An array of locally accessible client databases, for use by the dispatchChanges.php script. This setting determines which wikis changes are pushed to directly. It must be given either as an associative array, mapping global site IDs to logical database names, or, of the database names are the same as the site IDs, as a list of databases. The default is an empty array, indicating no local client databases. === Expert Settings === diff --git a/lib/includes/modules/SitesModule.php b/lib/includes/modules/SitesModule.php index 1747a1c..4abc461 100644 --- a/lib/includes/modules/SitesModule.php +++ b/lib/includes/modules/SitesModule.php @@ -41,44 +41,70 @@ foreach ( SiteSQLStore::newInstance()->getSites() as $site ) { $group = $site->getGroup(); - if ( $site->getType() === Site::TYPE_MEDIAWIKI && in_array( $group, $groups ) ) { - // FIXME: quickfix to allow a custom site-name / handling for groups defined in $wgSpecialSiteLinkGroups - if ( in_array( $group, $specialGroups ) ) { - $languageNameMsg = wfMessage( 'wikibase-sitelinks-sitename-' . $site->getGlobalId() ); - $languageName = $languageNameMsg->exists() ? $languageNameMsg->parse() : $site->getGlobalId(); - $groupName = 'special'; - } else { - $languageName = Utils::fetchLanguageName( $site->getLanguageCode() ); - $groupName = $group; - } - $globalId = $site->getGlobalId(); - - // Use protocol relative URIs, as it's safe to assume that all wikis support the same protocol - list( $pageUrl, $apiUrl ) = preg_replace( - "/^https?:/i", - '', - array( - $site->getPageUrl(), - $site->getFileUrl( 'api.php' ) - ) - ); - - //TODO: figure out which name ist best - //$localIds = $site->getLocalIds(); - //$name = empty( $localIds['equivalent'] ) ? $site->getGlobalId() : $localIds['equivalent'][0]; - - $sites[ $globalId ] = array( - 'shortName' => $languageName, - 'name' => $languageName, // use short name for both, for now - 'id' => $globa
[MediaWiki-commits] [Gerrit] Lua: Allow arbitrary item access - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/150196 Change subject: Lua: Allow arbitrary item access .. Lua: Allow arbitrary item access This also changes the tests slightly, as we now have hardcoded item ids. This introduces the allowArbitraryDataAccess setting with which access to abitrary items can be disabled (Defaults to allowing abitrary data access). Deploy: Set the allowArbitraryDataAccess setting to false Bug: 67538 Change-Id: I78607bfd984cbc99192faaa5d8ca4ec331de3ab7 (cherry picked from commit 35ee608d66adf1b8df5ae77d71c333c5ff661575) --- M client/config/WikibaseClient.default.php M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php M client/includes/scribunto/WikibaseLuaBindings.php M client/includes/scribunto/mw.wikibase.lua M client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryTests.lua M client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php M client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php M client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php M docs/lua.wiki M docs/options.wiki 10 files changed, 82 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/96/150196/1 diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index fd91e61..7305e6a 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -41,6 +41,8 @@ // List of additional CSS class names for site links that have badges, e.g. // array( 'Q101' => 'wb-badge-goldstar' ). 'badgeClassNames' => array(), + // Allow accessing data from other items in the parser functions and via Lua + 'allowArbitraryDataAccess' => true, /** * @todo this is a bit wikimedia-specific and need to find a better place for this stuff, diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php index 2ebf8b7..ddd68ac 100644 --- a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php +++ b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php @@ -39,6 +39,7 @@ $wikibaseClient->getStore()->getSiteLinkTable(), $wikibaseClient->getLanguageFallbackChainFactory(), $language, + $wikibaseClient->getSettings(), Utils::getLanguageCodes(), $wikibaseClient->getSettings()->getSetting( 'siteGlobalID' ) ); @@ -54,6 +55,7 @@ public function register() { $lib = array( 'getEntity' => array( $this, 'getEntity' ), + 'getSetting' => array( $this, 'getSetting' ), 'getEntityId' => array( $this, 'getEntityId' ), 'getGlobalSiteId' => array( $this, 'getGlobalSiteId' ) ); @@ -113,4 +115,17 @@ return array( $this->wbLibrary->getGlobalSiteId() ); } + /** +* Wrapper for getSetting in Scribunto_LuaWikibaseLibraryImplementation +* +* @since 0.5 +* +* @param string $setting +* +* @return mixed +*/ + public function getSetting( $setting ) { + $this->checkType( 'setting', 1, $setting, 'string' ); + return array( $this->wbLibrary->getSetting( $setting ) ); + } } diff --git a/client/includes/scribunto/WikibaseLuaBindings.php b/client/includes/scribunto/WikibaseLuaBindings.php index c2529a6..8351ed66 100644 --- a/client/includes/scribunto/WikibaseLuaBindings.php +++ b/client/includes/scribunto/WikibaseLuaBindings.php @@ -11,6 +11,7 @@ use Wikibase\Lib\Serializers\SerializerFactory; use Wikibase\Lib\Store\EntityLookup; use Wikibase\Lib\Store\SiteLinkLookup; +use Wikibase\SettingsArray; /** * Actual implementations of the functions to access Wikibase through the Scribunto extension @@ -49,6 +50,11 @@ private $language; /** +* @var SettingsArray +*/ + private $settings; + + /** * @var string[] */ private $languageCodes; @@ -73,6 +79,7 @@ SiteLinkLookup $siteLinkTable, LanguageFallbackChainFactory $fallbackChainFactory, Language $language, + SettingsArray $settings, $languageCodes, $siteId ) { @@ -81,6 +88,7 @@ $this->siteLinkTable = $siteLinkTable; $this->fallbackChainFactory = $fallbackChainFactory; $this->language = $language; + $this->settings = $settings; $this->languageCod
[MediaWiki-commits] [Gerrit] Adds a beta feature for "Other project" sidebar - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/150197 Change subject: Adds a beta feature for "Other project" sidebar .. Adds a beta feature for "Other project" sidebar It introduce an optional dependance to BetaFeature extension Adds two boolean configuration options: otherProjectsLinksBeta to activate the beta feature otherProjectsLinksByDefault to activate the other project sidebar by default Relies on change I170e7253825c8dab5cad38e6b0ba59f28572efbf in MW core "Expands" change I93767d3db76f694f2d37bbf2f2fecaf7643f4e3b in Wikimedia config Change-Id: Ib4014253016db1c3d6b624be9ebbdaf452115145 (cherry picked from commit 0b6a5bf6dca9c2986511947283e3d57aa6e13738) --- M client/WikibaseClient.hooks.php M client/WikibaseClient.php M client/config/WikibaseClient.default.php M client/i18n/en.json M client/i18n/qqq.json A client/resources/images/wb-otherprojects-beta-ltr.png A client/resources/images/wb-otherprojects-beta-ltr.svg A client/resources/images/wb-otherprojects-beta-rtl.png 8 files changed, 119 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/97/150197/1 diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index d91fc47..26372b4 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -4,6 +4,7 @@ use Action; use BaseTemplate; +use BetaFeatures; use ChangesList; use FormOptions; use IContextSource; @@ -621,7 +622,10 @@ $settings = WikibaseClient::getDefaultInstance()->getSettings(); $siteIdsToOutput = $settings->getSetting( 'otherProjectsLinks' ); - if ( count( $siteIdsToOutput ) === 0 ) { + if ( + !$settings->getSetting( 'otherProjectsLinksBeta' ) && !$settings->getSetting( 'otherProjectsLinksByDefault' ) || + count( $siteIdsToOutput ) === 0 + ) { return true; } @@ -641,6 +645,65 @@ } /** +* Filters the display of "other project" sidebar according to the beta feature +* +* @since 0.5 +* +* @param Skin $skin +* @param array $sidebar +* +* @return bool +*/ + public static function onSidebarBeforeOutput( Skin $skin, array &$sidebar ) { + $settings = WikibaseClient::getDefaultInstance()->getSettings(); + if ( + $settings->getSetting( 'otherProjectsLinksBeta' ) && + !$settings->getSetting( 'otherProjectsLinksByDefault' ) && + class_exists( '\BetaFeatures' ) && + !BetaFeatures::isFeatureEnabled( $skin->getUser(), 'wikibase-otherprojects' ) + ) { + unset( $sidebar['wikibase-otherprojects'] ); + } + + return true; + } + + /** +* Initialise beta feature preferences +* +* @since 0.5 +* +* @param User $user +* @param array $betaPreferences +* +* @return bool +*/ + public static function onGetBetaFeaturePreferences( User $user, array &$betaPreferences ) { + global $wgExtensionAssetsPath; + + $remoteExtPathParts = explode( DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR , __DIR__, 2 ); + $assetsPath = $wgExtensionAssetsPath . '/' . $remoteExtPathParts[1]; + + $settings = WikibaseClient::getDefaultInstance()->getSettings(); + if ( !$settings->getSetting( 'otherProjectsLinksBeta' ) || $settings->getSetting( 'otherProjectsLinksByDefault' ) ) { + return true; + } + + $betaPreferences['wikibase-otherprojects'] = array( + 'label-message' => 'wikibase-otherprojects-beta-message', + 'desc-message' => 'wikibase-otherprojects-beta-description', + 'screenshot' => array( + 'ltr' => $assetsPath . '/resources/images/wb-otherprojects-beta-ltr.png', + 'rtl' => $assetsPath . '/resources/images/wb-otherprojects-beta-rtl.png' + ), + 'info-link' => 'https://www.mediawiki.org/wiki/Wikibase/Beta_Features/Other_projects_sidebar', + 'discussion-link' => 'https://www.mediawiki.org/wiki/Talk:Wikibase/Beta_Features/Other_projects_sidebar' + ); + + return true; + } + + /** * Adds a toggle for showing/hiding Wikidata entries in recent changes * * @param SpecialRecentChanges $special diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 4efa0c7..5f775b8 100644 --- a/client/Wi
[MediaWiki-commits] [Gerrit] Update versions for families previously <1.20 - change (pywikibot/compat)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/150198 Change subject: Update versions for families previously <1.20 .. Update versions for families previously <1.20 Also removes methods that are the same as the method they override, so it is easier to see when families have non-standard setup. Add custom nicepath() where appropriate. Change-Id: Ide8126a97aa650c7ac8d1bc7de9011719a3b96c5 --- M families/anarchopedia_family.py M families/botwiki_family.py M families/lyricwiki_family.py M families/mozilla_family.py M families/omegawiki_family.py M families/openttd_family.py M families/piratenwiki_family.py M families/wekey_family.py M families/wikia_family.py M families/wikitravel_shared_family.py M families/wowwiki_family.py 11 files changed, 27 insertions(+), 42 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/98/150198/1 diff --git a/families/anarchopedia_family.py b/families/anarchopedia_family.py index 773efba..cbb19bb 100644 --- a/families/anarchopedia_family.py +++ b/families/anarchopedia_family.py @@ -5,6 +5,7 @@ # The Anarchopedia family +# Offline in July 2014 class Family(family.Family): def __init__(self): family.Family.__init__(self) @@ -149,8 +150,5 @@ def scriptpath(self, code): return '' -def path(self, code): -return '/index.php' - -def apipath(self, code): -return '/api.php' +def nicepath(self, code): +return '/' diff --git a/families/botwiki_family.py b/families/botwiki_family.py index 1409318..898d00e 100644 --- a/families/botwiki_family.py +++ b/families/botwiki_family.py @@ -63,4 +63,4 @@ } def version(self, code): -return "1.11.0" +return '1.17.0' diff --git a/families/lyricwiki_family.py b/families/lyricwiki_family.py index 7c87f40..2bd0688 100644 --- a/families/lyricwiki_family.py +++ b/families/lyricwiki_family.py @@ -34,10 +34,10 @@ self.namespaces[503] = { '_default': u'Blog talk', } def version(self, code): -return "1.16.2" +return '1.19.17' def scriptpath(self, code): return '' -def apipath(self, code): -return '/api.php' +def nicepath(self, code): +return '/' diff --git a/families/mozilla_family.py b/families/mozilla_family.py index 6bb5295..4e10c83 100644 --- a/families/mozilla_family.py +++ b/families/mozilla_family.py @@ -20,17 +20,11 @@ '_default': [u'MozillaWiki talk', self.namespaces[5]['_default']], } -self.content_id = "mainContent" - -def RversionTab(self, code): -return r'.*?' - def version(self, code): -return "1.10.2" +return '1.19.11' def scriptpath(self, code): return '' -def apipath(self, code): -raise NotImplementedError( -"The mozilla family does not support api.php") +def nicepath(self, code): +return '/' diff --git a/families/omegawiki_family.py b/families/omegawiki_family.py index c8cabc4..44ba0e6 100644 --- a/families/omegawiki_family.py +++ b/families/omegawiki_family.py @@ -76,8 +76,5 @@ def scriptpath(self, code): return '' -def path(self, code): -return '/index.php' - -def apipath(self, code): -return '/api.php' +def nicepath(self, code): +return '/' diff --git a/families/openttd_family.py b/families/openttd_family.py index 3ab7755..1c34636 100644 --- a/families/openttd_family.py +++ b/families/openttd_family.py @@ -31,8 +31,11 @@ def scriptpath(self, code): return '' +def nicepath(self, code): +return '/' + def version(self, code): -return "1.12.0" +return '1.19.1' def apipath(self, code): raise NotImplementedError( diff --git a/families/piratenwiki_family.py b/families/piratenwiki_family.py index fb63a28..6670d18 100644 --- a/families/piratenwiki_family.py +++ b/families/piratenwiki_family.py @@ -144,11 +144,7 @@ return "/wiki/" def nicepath(self, code): - return "" + return '/' def version(self, code): - return "1.16.0" - - if family.config.SSL_connection: - def protocol(self, code): - return "https" + return '1.22.8' diff --git a/families/wekey_family.py b/families/wekey_family.py index 13267b2..f9f3866 100644 --- a/families/wekey_family.py +++ b/families/wekey_family.py @@ -77,11 +77,14 @@ return 'wekey.westart.tw' def version(self, code): -return "1.12.0" +return '1.16.0' def scriptpath(self, code): return '' +def nicepath(self, code): +return '/' + def apipath(self, code): raise NotImplementedError( "The %s family does not support api.php" % self.name) diff --git a/families/wikia_family.py b/families/wikia_family.py index a49576a..2a33f15 100
[MediaWiki-commits] [Gerrit] Add aliases file for Special:TimezoneSelector - change (mediawiki...TimezoneSelector)
Raimond Spekking has submitted this change and it was merged. Change subject: Add aliases file for Special:TimezoneSelector .. Add aliases file for Special:TimezoneSelector Bug: 68787 Change-Id: I9289a0b6166b8af5ff2eeae443b0acf5eb235032 --- A TimezoneSelector.alias.php M TimezoneSelector.php 2 files changed, 15 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved Nemo bis: Looks good to me, but someone else must approve diff --git a/TimezoneSelector.alias.php b/TimezoneSelector.alias.php new file mode 100644 index 000..ab4fff6 --- /dev/null +++ b/TimezoneSelector.alias.php @@ -0,0 +1,14 @@ + array( 'TimezoneSelector' ), +); diff --git a/TimezoneSelector.php b/TimezoneSelector.php index ca0fe34..9b52700 100644 --- a/TimezoneSelector.php +++ b/TimezoneSelector.php @@ -33,6 +33,7 @@ $wgMessagesDirs['TimezoneSelector'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['TimezoneSelector'] = __DIR__ . '/TimezoneSelector.i18n.php'; +$wgExtensionMessagesFiles[ 'TimezoneSelectorAlias' ] = __DIR__ . '/TimezoneSelector.alias.php'; $wgAutoloadClasses['TimezoneSelector'] = __DIR__ . '/TimezoneSelector.class.php'; -- To view, visit https://gerrit.wikimedia.org/r/150190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9289a0b6166b8af5ff2eeae443b0acf5eb235032 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimezoneSelector Gerrit-Branch: master Gerrit-Owner: MegaAlex Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BrowserTest] Language of images should be in subcategory of... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: [BrowserTest] Language of images should be in subcategory of VisualEditor .. [BrowserTest] Language of images should be in subcategory of VisualEditor Paired with Amir Aharoni Change-Id: Ibf77dffbb3468446c3a5828fad053f8cac6861af --- M modules/ve-mw/tests/browser/upload.rb 1 file changed, 3 insertions(+), 21 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/tests/browser/upload.rb b/modules/ve-mw/tests/browser/upload.rb index 04b8638..a4930cc 100644 --- a/modules/ve-mw/tests/browser/upload.rb +++ b/modules/ve-mw/tests/browser/upload.rb @@ -1,20 +1,4 @@ -def language_string language_code - language_hash = { -en: "English", -de: "German", -he: "Hebrew", -cs: "Czech", -it: "Italian", -mk: "Macedonian", -ru: "Russian", -fa: "Persian", -fr: "French", -ia: "Interlingua", - } - language_hash.fetch(language_code.to_sym) -end - -def license(language, language_code, file_name) +def license(language_code, file_name) require "date" date = Date.today.to_s "=={{int:filedesc}}== @@ -31,15 +15,13 @@ =={{int:license-header}}== {{Wikipedia-screenshot}} -[[Category:VisualEditor]] -[[Category:#{language}]]" +[[Category:VisualEditor-#{language_code}]]" end def upload_image file_path language_code = ENV['LANGUAGE_SCREENSHOT_CODE'] file_name = File.basename(file_path, "") - language = language_string language_code - file_license = license(language, language_code, file_name) + file_license = license(language_code, file_name) require 'mediawiki_api' client = MediawikiApi::Client.new ENV["MEDIAWIKI_API_UPLOAD_URL"] -- To view, visit https://gerrit.wikimedia.org/r/149854 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf77dffbb3468446c3a5828fad053f8cac6861af Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Vikassy Gerrit-Reviewer: Amire80 Gerrit-Reviewer: Cmcmahon Gerrit-Reviewer: Zfilipin Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 85a1b48..265de12 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/150199 Change subject: Syncronize VisualEditor: 85a1b48..265de12 .. Syncronize VisualEditor: 85a1b48..265de12 Change-Id: Ia4ce54a014d64d14521b033abe9b1b9fc161ce60 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/99/150199/1 diff --git a/VisualEditor b/VisualEditor index 85a1b48..265de12 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 85a1b48f9f374f000bb7b79b7ed2453a3719412f +Subproject commit 265de12b2d8bf7c47b763ffecedf385d2593c402 -- To view, visit https://gerrit.wikimedia.org/r/150199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4ce54a014d64d14521b033abe9b1b9fc161ce60 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 85a1b48..265de12 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 85a1b48..265de12 .. Syncronize VisualEditor: 85a1b48..265de12 Change-Id: Ia4ce54a014d64d14521b033abe9b1b9fc161ce60 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 85a1b48..265de12 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 85a1b48f9f374f000bb7b79b7ed2453a3719412f +Subproject commit 265de12b2d8bf7c47b763ffecedf385d2593c402 -- To view, visit https://gerrit.wikimedia.org/r/150199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4ce54a014d64d14521b033abe9b1b9fc161ce60 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update versions for families previously <1.20 - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: Update versions for families previously <1.20 .. Update versions for families previously <1.20 Also removes methods that are the same as the method they override, so it is easier to see when families have non-standard setup. Add custom nicepath() where appropriate. Change-Id: Ide8126a97aa650c7ac8d1bc7de9011719a3b96c5 --- M families/anarchopedia_family.py M families/botwiki_family.py M families/lyricwiki_family.py M families/mozilla_family.py M families/omegawiki_family.py M families/openttd_family.py M families/piratenwiki_family.py M families/wekey_family.py M families/wikia_family.py M families/wikitravel_shared_family.py M families/wowwiki_family.py 11 files changed, 27 insertions(+), 42 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/families/anarchopedia_family.py b/families/anarchopedia_family.py index 773efba..cbb19bb 100644 --- a/families/anarchopedia_family.py +++ b/families/anarchopedia_family.py @@ -5,6 +5,7 @@ # The Anarchopedia family +# Offline in July 2014 class Family(family.Family): def __init__(self): family.Family.__init__(self) @@ -149,8 +150,5 @@ def scriptpath(self, code): return '' -def path(self, code): -return '/index.php' - -def apipath(self, code): -return '/api.php' +def nicepath(self, code): +return '/' diff --git a/families/botwiki_family.py b/families/botwiki_family.py index 1409318..898d00e 100644 --- a/families/botwiki_family.py +++ b/families/botwiki_family.py @@ -63,4 +63,4 @@ } def version(self, code): -return "1.11.0" +return '1.17.0' diff --git a/families/lyricwiki_family.py b/families/lyricwiki_family.py index 7c87f40..2bd0688 100644 --- a/families/lyricwiki_family.py +++ b/families/lyricwiki_family.py @@ -34,10 +34,10 @@ self.namespaces[503] = { '_default': u'Blog talk', } def version(self, code): -return "1.16.2" +return '1.19.17' def scriptpath(self, code): return '' -def apipath(self, code): -return '/api.php' +def nicepath(self, code): +return '/' diff --git a/families/mozilla_family.py b/families/mozilla_family.py index 6bb5295..4e10c83 100644 --- a/families/mozilla_family.py +++ b/families/mozilla_family.py @@ -20,17 +20,11 @@ '_default': [u'MozillaWiki talk', self.namespaces[5]['_default']], } -self.content_id = "mainContent" - -def RversionTab(self, code): -return r'.*?' - def version(self, code): -return "1.10.2" +return '1.19.11' def scriptpath(self, code): return '' -def apipath(self, code): -raise NotImplementedError( -"The mozilla family does not support api.php") +def nicepath(self, code): +return '/' diff --git a/families/omegawiki_family.py b/families/omegawiki_family.py index c8cabc4..44ba0e6 100644 --- a/families/omegawiki_family.py +++ b/families/omegawiki_family.py @@ -76,8 +76,5 @@ def scriptpath(self, code): return '' -def path(self, code): -return '/index.php' - -def apipath(self, code): -return '/api.php' +def nicepath(self, code): +return '/' diff --git a/families/openttd_family.py b/families/openttd_family.py index 3ab7755..1c34636 100644 --- a/families/openttd_family.py +++ b/families/openttd_family.py @@ -31,8 +31,11 @@ def scriptpath(self, code): return '' +def nicepath(self, code): +return '/' + def version(self, code): -return "1.12.0" +return '1.19.1' def apipath(self, code): raise NotImplementedError( diff --git a/families/piratenwiki_family.py b/families/piratenwiki_family.py index fb63a28..6670d18 100644 --- a/families/piratenwiki_family.py +++ b/families/piratenwiki_family.py @@ -144,11 +144,7 @@ return "/wiki/" def nicepath(self, code): - return "" + return '/' def version(self, code): - return "1.16.0" - - if family.config.SSL_connection: - def protocol(self, code): - return "https" + return '1.22.8' diff --git a/families/wekey_family.py b/families/wekey_family.py index 13267b2..f9f3866 100644 --- a/families/wekey_family.py +++ b/families/wekey_family.py @@ -77,11 +77,14 @@ return 'wekey.westart.tw' def version(self, code): -return "1.12.0" +return '1.16.0' def scriptpath(self, code): return '' +def nicepath(self, code): +return '/' + def apipath(self, code): raise NotImplementedError( "The %s family does not support api.php" % self.name) diff --git a/families/wikia_family.py b/families/wikia_family.py index a49576a..2a33f15 100644 --- a/families/wikia_family.py +++ b/families/wiki
[MediaWiki-commits] [Gerrit] [BrowserTest] Client logins only once to upload all screenshots - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: [BrowserTest] Client logins only once to upload all screenshots .. [BrowserTest] Client logins only once to upload all screenshots Change-Id: Ic242d8b2f35ced23809d4454a44f28f260bb3eb7 --- M modules/ve-mw/tests/browser/upload.rb 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/tests/browser/upload.rb b/modules/ve-mw/tests/browser/upload.rb index a4930cc..34dbe4f 100644 --- a/modules/ve-mw/tests/browser/upload.rb +++ b/modules/ve-mw/tests/browser/upload.rb @@ -18,23 +18,23 @@ [[Category:VisualEditor-#{language_code}]]" end -def upload_image file_path +def upload_image file_path, client language_code = ENV['LANGUAGE_SCREENSHOT_CODE'] file_name = File.basename(file_path, "") file_license = license(language_code, file_name) - require 'mediawiki_api' - client = MediawikiApi::Client.new ENV["MEDIAWIKI_API_UPLOAD_URL"] - client.log_in ENV["MEDIAWIKI_USER"], ENV["MEDIAWIKI_PASSWORD"] client.upload_image(file_name, file_path, file_license, true) sleep 5 # Restriction in bot speed: https://commons.wikimedia.org/wiki/Commons:Bots#Bot_speed end def upload_images screenshot_directory = ENV["LANGUAGE_SCREENSHOT_PATH"] || "./screenshots" + require 'mediawiki_api' + client = MediawikiApi::Client.new ENV["MEDIAWIKI_API_UPLOAD_URL"] + client.log_in ENV["MEDIAWIKI_USER"], ENV["MEDIAWIKI_PASSWORD"] Dir["#{screenshot_directory}/*.png"].each do |file_path| puts "Uploading #{file_path}" -upload_image file_path +upload_image file_path, client end end -- To view, visit https://gerrit.wikimedia.org/r/148373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic242d8b2f35ced23809d4454a44f28f260bb3eb7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Vikassy Gerrit-Reviewer: Amire80 Gerrit-Reviewer: Zfilipin Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 265de12..ca6816b - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 265de12..ca6816b .. Syncronize VisualEditor: 265de12..ca6816b Change-Id: I995ebc870b93fbf87693be314ad736ff04d7f476 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 265de12..ca6816b 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 265de12b2d8bf7c47b763ffecedf385d2593c402 +Subproject commit ca6816be63f4ae755e2ad18cf3a379599752b23f -- To view, visit https://gerrit.wikimedia.org/r/150200 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I995ebc870b93fbf87693be314ad736ff04d7f476 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 265de12..ca6816b - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/150200 Change subject: Syncronize VisualEditor: 265de12..ca6816b .. Syncronize VisualEditor: 265de12..ca6816b Change-Id: I995ebc870b93fbf87693be314ad736ff04d7f476 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/00/150200/1 diff --git a/VisualEditor b/VisualEditor index 265de12..ca6816b 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 265de12b2d8bf7c47b763ffecedf385d2593c402 +Subproject commit ca6816be63f4ae755e2ad18cf3a379599752b23f -- To view, visit https://gerrit.wikimedia.org/r/150200 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I995ebc870b93fbf87693be314ad736ff04d7f476 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Special:Listusers i18n issues - change (mediawiki/core)
Rohan013 has uploaded a new change for review. https://gerrit.wikimedia.org/r/150201 Change subject: Fix Special:Listusers i18n issues .. Fix Special:Listusers i18n issues * Changed hard coded brackets to use message 'brackets' * Changed hard coded space to use message 'word-separator' Bug: 39845 Change-Id: If117e8f1b2436ed1d259add92fc8f6925403afc3 --- M includes/specials/SpecialListusers.php 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/01/150201/1 diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 53dddc7..4cfc4f5 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -194,9 +194,8 @@ global $wgEdititis; if ( !$this->including && $wgEdititis ) { // @todo fixme i18n issue: Hardcoded square brackets. - $edits = ' [' . - $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped() . - ']'; + $count = $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped(); + $edits = $this->msg( 'word-separator' )->escaped() . $this->msg( 'brackets', $count ); } $created = ''; -- To view, visit https://gerrit.wikimedia.org/r/150201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If117e8f1b2436ed1d259add92fc8f6925403afc3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rohan013 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add UnDeserializableValue to DataModelSerializationRoundtrip... - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/150202 Change subject: Add UnDeserializableValue to DataModelSerializationRoundtripTest .. Add UnDeserializableValue to DataModelSerializationRoundtripTest This roundtrip test failed because both the new and the legacy unserializer (in Lib) checked the hash. This can't work if the hash was (partly) created by the UnDeserializableValue class. All hash ckecks are now removed from the new serializer. This removes the last remaining check from the old serializer. See https://github.com/wmde/WikibaseDataModelSerialization/commit/f993c186 Bug: 66839 Bug: 68565 Change-Id: I002e1024275e2270c3de94eda4b66aee792e00fb --- M lib/includes/serializers/ReferenceSerializer.php M lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php 2 files changed, 4 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/02/150202/1 diff --git a/lib/includes/serializers/ReferenceSerializer.php b/lib/includes/serializers/ReferenceSerializer.php index f87139a..1535b6d 100644 --- a/lib/includes/serializers/ReferenceSerializer.php +++ b/lib/includes/serializers/ReferenceSerializer.php @@ -111,10 +111,6 @@ $reference = new Reference( new SnakList( $snakList ) ); - if ( array_key_exists( 'hash', $serialization ) && $serialization['hash'] !== $reference->getHash() ) { - throw new InvalidArgumentException( 'If a hash is present in a reference serialization it needs to be correct' ); - } - return $reference; } diff --git a/lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php b/lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php index e037ff7..982a8bf 100644 --- a/lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php +++ b/lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php @@ -27,7 +27,6 @@ use Wikibase\Lib\Serializers\SerializationOptions; /** - * @todo Fix the UnDeserializableValue test. * @todo Is something special needed to test ordering? * @todo Add tests with $options->setIndexTags( true ). * @@ -201,10 +200,10 @@ new PropertyId( $baseId . '4' ), new StringValue( 'string-value' ) ), - //new PropertyValueSnak( - // new PropertyId( $baseId . '5' ), - // new UnDeserializableValue( 'undeserializable-data', 'unsupported', 'error' ) - //), + new PropertyValueSnak( + new PropertyId( $baseId . '5' ), + new UnDeserializableValue( 'undeserializable-data', 'string', 'error' ) + ), new PropertyValueSnak( new PropertyId( $baseId . '6' ), new UnknownValue( 'unknown-value' ) -- To view, visit https://gerrit.wikimedia.org/r/150202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I002e1024275e2270c3de94eda4b66aee792e00fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) 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 UnDeserializableValue to DataModelSerializationRoundtrip... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add UnDeserializableValue to DataModelSerializationRoundtripTest .. Add UnDeserializableValue to DataModelSerializationRoundtripTest This roundtrip test failed because both the new and the legacy unserializer (in Lib) checked the hash. This can't work if the hash was (partly) created by the UnDeserializableValue class. All hash ckecks are now removed from the new serializer. This removes the last remaining check from the old serializer. See https://github.com/wmde/WikibaseDataModelSerialization/commit/f993c186 Bug: 66839 Bug: 68565 Change-Id: I002e1024275e2270c3de94eda4b66aee792e00fb --- M lib/includes/serializers/ReferenceSerializer.php M lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php 2 files changed, 4 insertions(+), 9 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/serializers/ReferenceSerializer.php b/lib/includes/serializers/ReferenceSerializer.php index f87139a..1535b6d 100644 --- a/lib/includes/serializers/ReferenceSerializer.php +++ b/lib/includes/serializers/ReferenceSerializer.php @@ -111,10 +111,6 @@ $reference = new Reference( new SnakList( $snakList ) ); - if ( array_key_exists( 'hash', $serialization ) && $serialization['hash'] !== $reference->getHash() ) { - throw new InvalidArgumentException( 'If a hash is present in a reference serialization it needs to be correct' ); - } - return $reference; } diff --git a/lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php b/lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php index e037ff7..982a8bf 100644 --- a/lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php +++ b/lib/tests/phpunit/serializers/DataModelSerializationRoundtripTest.php @@ -27,7 +27,6 @@ use Wikibase\Lib\Serializers\SerializationOptions; /** - * @todo Fix the UnDeserializableValue test. * @todo Is something special needed to test ordering? * @todo Add tests with $options->setIndexTags( true ). * @@ -201,10 +200,10 @@ new PropertyId( $baseId . '4' ), new StringValue( 'string-value' ) ), - //new PropertyValueSnak( - // new PropertyId( $baseId . '5' ), - // new UnDeserializableValue( 'undeserializable-data', 'unsupported', 'error' ) - //), + new PropertyValueSnak( + new PropertyId( $baseId . '5' ), + new UnDeserializableValue( 'undeserializable-data', 'string', 'error' ) + ), new PropertyValueSnak( new PropertyId( $baseId . '6' ), new UnknownValue( 'unknown-value' ) -- To view, visit https://gerrit.wikimedia.org/r/150202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I002e1024275e2270c3de94eda4b66aee792e00fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Load messages for licensing option of UploadWizard - change (mediawiki...UploadWizard)
Rillke has uploaded a new change for review. https://gerrit.wikimedia.org/r/150203 Change subject: Load messages for licensing option of UploadWizard .. Load messages for licensing option of UploadWizard Follow-up of I4397c70ff885c75 where loading the messages has been forgotten. Change-Id: I7f55c50c6562fb197ce030b07d7dd24d369db7d7 --- M UploadWizardHooks.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/03/150203/1 diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index 5ae837e..938e0a0 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -366,6 +366,7 @@ 'mwe-upwiz-license-fal', 'mwe-upwiz-license-own-pd', 'mwe-upwiz-license-pd-old-100', + 'mwe-upwiz-license-pd-old-70-1923', 'mwe-upwiz-license-pd-old', 'mwe-upwiz-license-pd-art', 'mwe-upwiz-license-pd-us', -- To view, visit https://gerrit.wikimedia.org/r/150203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f55c50c6562fb197ce030b07d7dd24d369db7d7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Rillke ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Load messages for licensing option of UploadWizard - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Load messages for licensing option of UploadWizard .. Load messages for licensing option of UploadWizard Follow-up of I4397c70ff885c75 where loading the messages has been forgotten. Change-Id: I7f55c50c6562fb197ce030b07d7dd24d369db7d7 --- M UploadWizardHooks.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index 5ae837e..938e0a0 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -366,6 +366,7 @@ 'mwe-upwiz-license-fal', 'mwe-upwiz-license-own-pd', 'mwe-upwiz-license-pd-old-100', + 'mwe-upwiz-license-pd-old-70-1923', 'mwe-upwiz-license-pd-old', 'mwe-upwiz-license-pd-art', 'mwe-upwiz-license-pd-us', -- To view, visit https://gerrit.wikimedia.org/r/150203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f55c50c6562fb197ce030b07d7dd24d369db7d7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Rillke Gerrit-Reviewer: Gilles 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 handling of the specialSiteLinkGroups setting - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix handling of the specialSiteLinkGroups setting .. Fix handling of the specialSiteLinkGroups setting Also add some documentation. Change-Id: I5004ee8e823ed0cd245793c61d54246a4805e618 --- M docs/options.wiki M lib/includes/modules/SitesModule.php M lib/resources/wikibase.ui.SiteLinksEditTool.js M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/View/SiteLinksView.php M repo/includes/api/GetEntities.php M repo/includes/api/LinkTitles.php M repo/includes/api/ModifyEntity.php M repo/includes/api/SiteLinkTargetProvider.php M repo/tests/phpunit/includes/View/SiteLinksViewTest.php M repo/tests/phpunit/includes/api/SiteLinkTargetProviderTest.php 12 files changed, 157 insertions(+), 63 deletions(-) Approvals: Hoo man: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/docs/options.wiki b/docs/options.wiki index e839424..4621249 100644 --- a/docs/options.wiki +++ b/docs/options.wiki @@ -10,6 +10,7 @@ ;changesDatabase: The database that changes are recorded to for processing by clients. This must be set to a symbolic database identifier that MediaWiki's LBFactory class understands; false means that the wiki's own database shall be used. '''Note''' that on the client, this setting should usually be the same as the repoDatabase setting. ;siteLinkGroups: The site groups to use in sitelinks. Must correspond to a value used to give the site group in the MediaWiki sites table. Default is array( "wikipedia" ). This defines which groups of sites can be linked to Wikibase items. '''Note''' that this setting replaces the old ''siteLinkGroup'' setting, which only allowed for a single group. +;specialSiteLinkGroups: This maps one or more site groups into a single "special" group. This is useful if sites from multiple site groups should be shown in a single "special" section on item pages, instead of one section per site group. ;localClientDatabases: An array of locally accessible client databases, for use by the dispatchChanges.php script. This setting determines which wikis changes are pushed to directly. It must be given either as an associative array, mapping global site IDs to logical database names, or, of the database names are the same as the site IDs, as a list of databases. The default is an empty array, indicating no local client databases. === Expert Settings === diff --git a/lib/includes/modules/SitesModule.php b/lib/includes/modules/SitesModule.php index 1747a1c..4abc461 100644 --- a/lib/includes/modules/SitesModule.php +++ b/lib/includes/modules/SitesModule.php @@ -41,44 +41,70 @@ foreach ( SiteSQLStore::newInstance()->getSites() as $site ) { $group = $site->getGroup(); - if ( $site->getType() === Site::TYPE_MEDIAWIKI && in_array( $group, $groups ) ) { - // FIXME: quickfix to allow a custom site-name / handling for groups defined in $wgSpecialSiteLinkGroups - if ( in_array( $group, $specialGroups ) ) { - $languageNameMsg = wfMessage( 'wikibase-sitelinks-sitename-' . $site->getGlobalId() ); - $languageName = $languageNameMsg->exists() ? $languageNameMsg->parse() : $site->getGlobalId(); - $groupName = 'special'; - } else { - $languageName = Utils::fetchLanguageName( $site->getLanguageCode() ); - $groupName = $group; - } - $globalId = $site->getGlobalId(); - - // Use protocol relative URIs, as it's safe to assume that all wikis support the same protocol - list( $pageUrl, $apiUrl ) = preg_replace( - "/^https?:/i", - '', - array( - $site->getPageUrl(), - $site->getFileUrl( 'api.php' ) - ) - ); - - //TODO: figure out which name ist best - //$localIds = $site->getLocalIds(); - //$name = empty( $localIds['equivalent'] ) ? $site->getGlobalId() : $localIds['equivalent'][0]; - - $sites[ $globalId ] = array( - 'shortName' => $languageName, - 'name' => $languageName, // use short name for both, for now - 'id' => $globalId, -
[MediaWiki-commits] [Gerrit] (merge fixup) cache maintenance script - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/150204 Change subject: (merge fixup) cache maintenance script .. (merge fixup) cache maintenance script Ibc7ec0a90a130fb1c834fd632af7872f1325b3e0 altered CachedRequest._cachefile_path() so it was not usable for cache.py introduced in I727af9b6fa10d2231e5d777a1bc6f8602ca03f50. Both being committed at the same time caused cache.py to fail for directories other than the one which CachedRequest uses. Change-Id: I36360fd041da952375bc88a4599a21451878baa7 --- M scripts/maintenance/cache.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/04/150204/1 diff --git a/scripts/maintenance/cache.py b/scripts/maintenance/cache.py index 702e034..2c51070 100644 --- a/scripts/maintenance/cache.py +++ b/scripts/maintenance/cache.py @@ -82,6 +82,10 @@ """ Directory of the cached entry. """ return self.directory +def _cachefile_path(self): +return os.path.join(self._get_cache_dir(), +self._create_file_name()) + def _load_cache(self): """ Load the cache entry. """ with open(self._cachefile_path(), 'rb') as f: -- To view, visit https://gerrit.wikimedia.org/r/150204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36360fd041da952375bc88a4599a21451878baa7 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Lua: Add integration tests for the 'allowArbitraryDataAccess... - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/150205 Change subject: Lua: Add integration tests for the 'allowArbitraryDataAccess' setting .. Lua: Add integration tests for the 'allowArbitraryDataAccess' setting Change-Id: I69a84c2e7dfdd5acb99836d9aba356304c7ad381 (cherry picked from commit 0f4e6e0c33c037985e55c2a513cef5aba479b99d) --- A client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryNoArbitraryAccessTests.lua A client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest.php M client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php 3 files changed, 90 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/05/150205/1 diff --git a/client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryNoArbitraryAccessTests.lua b/client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryNoArbitraryAccessTests.lua new file mode 100644 index 000..1139818 --- /dev/null +++ b/client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryNoArbitraryAccessTests.lua @@ -0,0 +1,19 @@ +--[[ + Integration tests verifiying that arbitrary data access doesn't work, if it's disabled. + + @license GNU GPL v2+ + @author Marius Hoch < h...@online.de > +]] + +local testframework = require 'Module:TestFramework' + +local tests = { + -- Integration tests + + { name = "mw.wikibase.getEntityObject (foreign access)", func = mw.wikibase.getEntityObject, + args = { 'Q42' }, + expect = 'Access to arbitrary items has been disabled.' + } +} + +return testframework.getTestProvider( tests ) diff --git a/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest.php b/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest.php new file mode 100644 index 000..b158e8c --- /dev/null +++ b/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest.php @@ -0,0 +1,38 @@ + + */ +class Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest extends Scribunto_LuaWikibaseLibraryTestCase { + protected static $moduleName = 'LuaWikibaseLibraryNoArbitraryAccessTests'; + + function getTestModules() { + return parent::getTestModules() + array( + 'LuaWikibaseLibraryNoArbitraryAccessTests' => __DIR__ . '/LuaWikibaseLibraryNoArbitraryAccessTests.lua', + ); + } + + /** +* Whether to allow arbitrary data access or not +* +* @return bool +*/ + protected static function allowArbitraryDataAccess() { + return false; + } + +} diff --git a/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php b/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php index e49e07e..34b2876 100644 --- a/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php +++ b/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php @@ -25,7 +25,21 @@ * @author Marius Hoch < h...@online.de > * @author Daniel Kinzler */ -class Scribunto_LuaWikibaseLibraryTestCase extends \Scribunto_LuaEngineTestBase { +abstract class Scribunto_LuaWikibaseLibraryTestCase extends \Scribunto_LuaEngineTestBase { + + /** +* @var bool|null +*/ + private static $oldAllowArbitraryDataAccess = null; + + /** +* Whether to allow arbitrary data access or not +* +* @return bool +*/ + protected static function allowArbitraryDataAccess() { + return true; + } /** * Makes sure WikibaseClient uses our ClientStore mock @@ -39,7 +53,16 @@ $wikibaseClient->overrideStore( $store ); } - $wikibaseClient->getSettings()->setSetting( 'allowArbitraryDataAccess', true ); + $settings = $wikibaseClient->getSettings(); + if ( self::$oldAllowArbitraryDataAccess === null ) { + // Only need to set this once, as this is supposed to be the original value + self::$oldAllowArbitraryDataAccess = $settings->getSetting( 'allowArbitraryDataAccess' ); + } + + $settings->setSetting( + 'allowArbitraryDataAccess', + static::allowArbitraryDataAccess() + ); } /** @@ -80,7 +103,14 @@ public function tearDown() { parent::tearDown(); - WikibaseClient::getDefaultInstance( 'reset' ); + $wikibaseClient = WikibaseClient::getDefaultInstance( 'reset' ); + + if ( self::$oldAllowArbitraryDataAccess !== null ) { + $wikibaseCl
[MediaWiki-commits] [Gerrit] Lua: Allow arbitrary item access - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Lua: Allow arbitrary item access .. Lua: Allow arbitrary item access This also changes the tests slightly, as we now have hardcoded item ids. This introduces the allowArbitraryDataAccess setting with which access to abitrary items can be disabled (Defaults to allowing abitrary data access). Deploy: Set the allowArbitraryDataAccess setting to false Bug: 67538 Change-Id: I78607bfd984cbc99192faaa5d8ca4ec331de3ab7 (cherry picked from commit 35ee608d66adf1b8df5ae77d71c333c5ff661575) --- M client/config/WikibaseClient.default.php M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php M client/includes/scribunto/WikibaseLuaBindings.php M client/includes/scribunto/mw.wikibase.lua M client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryTests.lua M client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php M client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php M client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php M docs/lua.wiki M docs/options.wiki 10 files changed, 82 insertions(+), 16 deletions(-) Approvals: Hoo man: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index fd91e61..7305e6a 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -41,6 +41,8 @@ // List of additional CSS class names for site links that have badges, e.g. // array( 'Q101' => 'wb-badge-goldstar' ). 'badgeClassNames' => array(), + // Allow accessing data from other items in the parser functions and via Lua + 'allowArbitraryDataAccess' => true, /** * @todo this is a bit wikimedia-specific and need to find a better place for this stuff, diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php index 2ebf8b7..ddd68ac 100644 --- a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php +++ b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php @@ -39,6 +39,7 @@ $wikibaseClient->getStore()->getSiteLinkTable(), $wikibaseClient->getLanguageFallbackChainFactory(), $language, + $wikibaseClient->getSettings(), Utils::getLanguageCodes(), $wikibaseClient->getSettings()->getSetting( 'siteGlobalID' ) ); @@ -54,6 +55,7 @@ public function register() { $lib = array( 'getEntity' => array( $this, 'getEntity' ), + 'getSetting' => array( $this, 'getSetting' ), 'getEntityId' => array( $this, 'getEntityId' ), 'getGlobalSiteId' => array( $this, 'getGlobalSiteId' ) ); @@ -113,4 +115,17 @@ return array( $this->wbLibrary->getGlobalSiteId() ); } + /** +* Wrapper for getSetting in Scribunto_LuaWikibaseLibraryImplementation +* +* @since 0.5 +* +* @param string $setting +* +* @return mixed +*/ + public function getSetting( $setting ) { + $this->checkType( 'setting', 1, $setting, 'string' ); + return array( $this->wbLibrary->getSetting( $setting ) ); + } } diff --git a/client/includes/scribunto/WikibaseLuaBindings.php b/client/includes/scribunto/WikibaseLuaBindings.php index c2529a6..8351ed66 100644 --- a/client/includes/scribunto/WikibaseLuaBindings.php +++ b/client/includes/scribunto/WikibaseLuaBindings.php @@ -11,6 +11,7 @@ use Wikibase\Lib\Serializers\SerializerFactory; use Wikibase\Lib\Store\EntityLookup; use Wikibase\Lib\Store\SiteLinkLookup; +use Wikibase\SettingsArray; /** * Actual implementations of the functions to access Wikibase through the Scribunto extension @@ -49,6 +50,11 @@ private $language; /** +* @var SettingsArray +*/ + private $settings; + + /** * @var string[] */ private $languageCodes; @@ -73,6 +79,7 @@ SiteLinkLookup $siteLinkTable, LanguageFallbackChainFactory $fallbackChainFactory, Language $language, + SettingsArray $settings, $languageCodes, $siteId ) { @@ -81,6 +88,7 @@ $this->siteLinkTable = $siteLinkTable; $this->fallbackChainFactory = $fallbackChainFactory; $this->language = $language; + $this->settings = $settings; $this->languageCodes = $languageCodes;
[MediaWiki-commits] [Gerrit] Adds a beta feature for "Other project" sidebar - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Adds a beta feature for "Other project" sidebar .. Adds a beta feature for "Other project" sidebar It introduce an optional dependance to BetaFeature extension Adds two boolean configuration options: otherProjectsLinksBeta to activate the beta feature otherProjectsLinksByDefault to activate the other project sidebar by default Relies on change I170e7253825c8dab5cad38e6b0ba59f28572efbf in MW core "Expands" change I93767d3db76f694f2d37bbf2f2fecaf7643f4e3b in Wikimedia config Change-Id: Ib4014253016db1c3d6b624be9ebbdaf452115145 (cherry picked from commit 0b6a5bf6dca9c2986511947283e3d57aa6e13738) --- M client/WikibaseClient.hooks.php M client/WikibaseClient.php M client/config/WikibaseClient.default.php M client/i18n/en.json M client/i18n/qqq.json A client/resources/images/wb-otherprojects-beta-ltr.png A client/resources/images/wb-otherprojects-beta-ltr.svg A client/resources/images/wb-otherprojects-beta-rtl.png 8 files changed, 119 insertions(+), 3 deletions(-) Approvals: Hoo man: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index d91fc47..26372b4 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -4,6 +4,7 @@ use Action; use BaseTemplate; +use BetaFeatures; use ChangesList; use FormOptions; use IContextSource; @@ -621,7 +622,10 @@ $settings = WikibaseClient::getDefaultInstance()->getSettings(); $siteIdsToOutput = $settings->getSetting( 'otherProjectsLinks' ); - if ( count( $siteIdsToOutput ) === 0 ) { + if ( + !$settings->getSetting( 'otherProjectsLinksBeta' ) && !$settings->getSetting( 'otherProjectsLinksByDefault' ) || + count( $siteIdsToOutput ) === 0 + ) { return true; } @@ -641,6 +645,65 @@ } /** +* Filters the display of "other project" sidebar according to the beta feature +* +* @since 0.5 +* +* @param Skin $skin +* @param array $sidebar +* +* @return bool +*/ + public static function onSidebarBeforeOutput( Skin $skin, array &$sidebar ) { + $settings = WikibaseClient::getDefaultInstance()->getSettings(); + if ( + $settings->getSetting( 'otherProjectsLinksBeta' ) && + !$settings->getSetting( 'otherProjectsLinksByDefault' ) && + class_exists( '\BetaFeatures' ) && + !BetaFeatures::isFeatureEnabled( $skin->getUser(), 'wikibase-otherprojects' ) + ) { + unset( $sidebar['wikibase-otherprojects'] ); + } + + return true; + } + + /** +* Initialise beta feature preferences +* +* @since 0.5 +* +* @param User $user +* @param array $betaPreferences +* +* @return bool +*/ + public static function onGetBetaFeaturePreferences( User $user, array &$betaPreferences ) { + global $wgExtensionAssetsPath; + + $remoteExtPathParts = explode( DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR , __DIR__, 2 ); + $assetsPath = $wgExtensionAssetsPath . '/' . $remoteExtPathParts[1]; + + $settings = WikibaseClient::getDefaultInstance()->getSettings(); + if ( !$settings->getSetting( 'otherProjectsLinksBeta' ) || $settings->getSetting( 'otherProjectsLinksByDefault' ) ) { + return true; + } + + $betaPreferences['wikibase-otherprojects'] = array( + 'label-message' => 'wikibase-otherprojects-beta-message', + 'desc-message' => 'wikibase-otherprojects-beta-description', + 'screenshot' => array( + 'ltr' => $assetsPath . '/resources/images/wb-otherprojects-beta-ltr.png', + 'rtl' => $assetsPath . '/resources/images/wb-otherprojects-beta-rtl.png' + ), + 'info-link' => 'https://www.mediawiki.org/wiki/Wikibase/Beta_Features/Other_projects_sidebar', + 'discussion-link' => 'https://www.mediawiki.org/wiki/Talk:Wikibase/Beta_Features/Other_projects_sidebar' + ); + + return true; + } + + /** * Adds a toggle for showing/hiding Wikidata entries in recent changes * * @param SpecialRecentChanges $special diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 4efa0c7..5f775b8 100644 --- a/client/WikibaseClient.php +++ b/clie
[MediaWiki-commits] [Gerrit] Provides a default to otherProjectsLinks configuration param... - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/150206 Change subject: Provides a default to otherProjectsLinks configuration parameter .. Provides a default to otherProjectsLinks configuration parameter Deploy: Requires the "otherProjectsLinks" setting to be set on client Change-Id: Ie6ccb218e835991f57b3283cfa75d3934cc5cf1f (cherry picked from commit 82cecdc64930dc7c03931b62c0fbff5af77e44e4) --- M client/WikibaseClient.hooks.php M client/config/WikibaseClient.default.php A client/includes/OtherProjectsSitesProvider.php M client/includes/WikibaseClient.php A client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php M client/tests/phpunit/includes/WikibaseClientTest.php 6 files changed, 322 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/06/150206/1 diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 26372b4..62f3d04 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -35,6 +35,7 @@ use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator; use Wikibase\Client\Hooks\SpecialWatchlistQueryHandler; use Wikibase\Client\MovePageNotice; +use Wikibase\Client\OtherProjectsSitesProvider; use Wikibase\Client\WikibaseClient; /** @@ -621,22 +622,15 @@ public static function onSkinBuildSidebar( Skin $skin, &$bar ) { $settings = WikibaseClient::getDefaultInstance()->getSettings(); - $siteIdsToOutput = $settings->getSetting( 'otherProjectsLinks' ); if ( - !$settings->getSetting( 'otherProjectsLinksBeta' ) && !$settings->getSetting( 'otherProjectsLinksByDefault' ) || - count( $siteIdsToOutput ) === 0 + !$settings->getSetting( 'otherProjectsLinksBeta' ) && + !$settings->getSetting( 'otherProjectsLinksByDefault' ) ) { return true; } - $generator = new OtherProjectsSidebarGenerator( - $settings->getSetting( 'siteGlobalID' ), - WikibaseClient::getDefaultInstance()->getStore()->getSiteLinkTable(), - WikibaseClient::getDefaultInstance()->getSiteStore(), - $siteIdsToOutput - ); - - $otherProjectsSidebar = $generator->buildProjectLinkSidebar( $skin->getContext()->getTitle() ); + $otherProjectsSidebarGenerator = WikibaseClient::getDefaultInstance()->getOtherProjectsSidebarGenerator(); + $otherProjectsSidebar = $otherProjectsSidebarGenerator->buildProjectLinkSidebar( $skin->getContext()->getTitle() ); if ( count( $otherProjectsSidebar ) !== 0 ) { $bar['wikibase-otherprojects'] = $otherProjectsSidebar; } diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index 68a9a02..1184213 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -1,5 +1,6 @@ true, 'propagateChangesToRepo' => true, - 'otherProjectsLinks' => array(), 'otherProjectsLinksByDefault' => false, 'otherProjectsLinksBeta' => false, // List of additional CSS class names for site links that have badges, e.g. @@ -239,6 +239,11 @@ return null; }; + $defaults['otherProjectsLinks'] = function ( SettingsArray $settings ) { + $otherProjectsSitesProvider = WikibaseClient::getDefaultInstance()->getOtherProjectsSitesProvider(); + return $otherProjectsSitesProvider->getOtherProjectsSiteIds( $settings->getSetting( 'siteLinkGroups' ) ); + }; + // Prefix to use for cache keys that should be shared among // a wikibase repo and all its clients. // In order to share caches between clients (and the repo) diff --git a/client/includes/OtherProjectsSitesProvider.php b/client/includes/OtherProjectsSitesProvider.php new file mode 100644 index 000..802e58f --- /dev/null +++ b/client/includes/OtherProjectsSitesProvider.php @@ -0,0 +1,109 @@ + + */ +class OtherProjectsSitesProvider { + + /** +* @param SiteStore $siteStore +*/ + private $siteStore; + + /** +* @var Site +*/ + private $currentSite; + + /** +* @param SiteStore $siteStore +* @param Site $currentSite +*/ + public function __construct( SiteStore $siteStore, Site $currentSite ) { + $this->siteStore = $siteStore; + $this->currentSite = $currentSite; + } + + /** +* Provides a list of sites to link to in the "other project" sidebar +* +* This list contains t
[MediaWiki-commits] [Gerrit] WIP: Highlight in chains - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/150207 Change subject: WIP: Highlight in chains .. WIP: Highlight in chains This will prevent Elasticsearch from trying to highlight fields that we're not going to use because a field "before" it was highlighted. Doesn't do anything unless you have I0326baaf497a305348eb536461cd8d6404795d2c deployed to the Elasticsearch cluster. Change-Id: Ib2d9713e9b9feae04f332cc8ca618e063e9a64c4 --- M includes/Search/ResultsType.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/07/150207/1 diff --git a/includes/Search/ResultsType.php b/includes/Search/ResultsType.php index 50fac2e..0172f9e 100644 --- a/includes/Search/ResultsType.php +++ b/includes/Search/ResultsType.php @@ -286,13 +286,17 @@ } if ( $this->highlightingConfig & self::HIGHLIGHT_ALT_TITLE ) { $config[ 'fields' ][ 'redirect.title' ] = $entireValueInListField; + $config[ 'fields' ][ 'redirect.title' ][ 'options' ][ 'skip_if_last_matched' ] = true; $config[ 'fields' ][ 'heading' ] = $entireValueInListField; + $config[ 'fields' ][ 'heading' ][ 'options' ][ 'skip_if_last_matched' ] = true; } if ( $this->highlightingConfig & self::HIGHLIGHT_SNIPPET ) { $config[ 'fields' ][ 'text' ] = $text; $config[ 'fields' ][ 'auxiliary_text' ] = $singleFragment; + $config[ 'fields' ][ 'auxiliary_text' ][ 'options' ][ 'skip_if_last_matched' ] = true; if ( $this->highlightingConfig & self::HIGHLIGHT_FILE_TEXT ) { $config[ 'fields' ][ 'file_text' ] = $singleFragment; + $config[ 'fields' ][ 'file_text' ][ 'options' ][ 'skip_if_last_matched' ] = true; } } $config[ 'fields' ] = $this->addMatchedFields( $config[ 'fields' ] ); -- To view, visit https://gerrit.wikimedia.org/r/150207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2d9713e9b9feae04f332cc8ca618e063e9a64c4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add refinery deploy target to stat1002 - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/150208 Change subject: Add refinery deploy target to stat1002 .. Add refinery deploy target to stat1002 Refinery has useful tools for working with webrequest snappy compressed sequence files in HDFS Change-Id: I0144cb661edd80ae2cdccb42f9044b924ce6aba0 --- M manifests/site.pp 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/08/150208/1 diff --git a/manifests/site.pp b/manifests/site.pp index ac5d6a6..3810d33 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2477,6 +2477,9 @@ # clients so that analysts can access Hadoop # from here. include role::analytics::clients + +# Include analytics/refinery deployment target. +include role::analytics::refinery } # stat1003 is a general purpose number cruncher for -- To view, visit https://gerrit.wikimedia.org/r/150208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0144cb661edd80ae2cdccb42f9044b924ce6aba0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace language selectors using ULS - change (mediawiki...UniversalLanguageSelector)
Kunalgrover05 has uploaded a new change for review. https://gerrit.wikimedia.org/r/150209 Change subject: Replace language selectors using ULS .. Replace language selectors using ULS Change-Id: I30459d32633c3d61129ce1759c0d87717d0fa8d9 --- M Resources.php M UniversalLanguageSelector.hooks.php M UniversalLanguageSelector.php A resources/js/ext.uls.languageselector.js 4 files changed, 66 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/09/150209/1 diff --git a/Resources.php b/Resources.php index d0a2b79..b228ae9 100644 --- a/Resources.php +++ b/Resources.php @@ -292,3 +292,11 @@ $wgResourceModules['rangy.core'] = array( 'scripts' => 'lib/rangy/rangy-core.js', ) + $resourcePaths; + +$wgResourceModules['ext.uls.languageselector'] = array( + 'dependencies' => 'ext.uls.mediawiki', + 'scripts' => 'resources/js/ext.uls.languageselector.js', + 'messages' => array( + 'pagelang-select-lang' + ) +) + $resourcePaths; diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index c826f7f..739ae75 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -407,4 +407,17 @@ return true; } + + /** +* Replace language selectors with ULS language selector +* Hook: Language Selector +* @param OutputPage $out +* @param String $cssClassName +* @return bool +*/ + public static function onLanguageSelector( OutputPage $out, $cssClassName ) { + $out->addJsConfigVars( 'wgCSSClass', $cssClassName ); + $out->addModules( 'ext.uls.languageselector' ); + return true; + } } diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php index 19448c1..fb617a7 100644 --- a/UniversalLanguageSelector.php +++ b/UniversalLanguageSelector.php @@ -216,6 +216,7 @@ $GLOBALS['wgHooks']['GetPreferences'][] = 'UniversalLanguageSelectorHooks::onGetPreferences'; $GLOBALS['wgHooks']['GetBetaFeaturePreferences'][] = 'UniversalLanguageSelectorHooks::onGetBetaFeaturePreferences'; +$GLOBALS['wgHooks']['LanguageSelector'][] = 'UniversalLanguageSelectorHooks::onLanguageSelector'; $GLOBALS['wgExtensionFunctions'][] = function () { global $wgHooks, $wgResourceModules, $wgULSEventLogging, $wgULSGeoService; diff --git a/resources/js/ext.uls.languageselector.js b/resources/js/ext.uls.languageselector.js new file mode 100644 index 000..ad39178 --- /dev/null +++ b/resources/js/ext.uls.languageselector.js @@ -0,0 +1,44 @@ +/** + * ULS interface to replace language selectors using hook LanguageSelector + * + * UniversalLanguageSelector is dual licensed GPLv2 or later and MIT. You don't + * have to do anything special to choose one license or the other and you don't + * have to notify anyone which license you are using. You are free to use + * UniversalLanguageSelector in commercial projects as long as the copyright + * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. + * + * @file + * @ingroup Extensions + * @licence GNU General Public Licence 2.0 or later + * @licence MIT License + */ + +( function ( $, mw ) { + 'use strict'; + + $( document ).ready( function () { + var $langSelector, $ulsSelector, + cssclass = mw.config.get( 'wgCSSClass' ); + + $langSelector = $( '.' + cssclass ); + $langSelector.parent().append( + '' + + mw.message( 'pagelang-select-lang' ) + + '' + ); + // Not removing the language selector as it may be linked to a form + $langSelector.hide(); + + $ulsSelector = $( '.ulsSelector' ); + $ulsSelector.uls( { + onSelect: function( languageCode ) { + var languageName = $.uls.data.getAutonym( languageCode ), + $current = $( this.$element ); + // Set the language for language selector + $current.parent().find( $langSelector ).val( languageCode ); + // Display the selected language + $current.find('a' ).text( languageName + ' (' + languageCode + ')' ); + } + } ); + } ); +} ( jQuery, mediaWiki ) ); -- To view, visit https://gerrit.wikimedia.org/r/150209 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30459d32633c3d61129ce1759c0d87717d0fa8d9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Kunalgr
[MediaWiki-commits] [Gerrit] statistics: Add packages for halfak - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: statistics: Add packages for halfak .. statistics: Add packages for halfak Allows the compilation of statistics (SciPy) and parsing (mwparserfromhell) python modules in python3. Change-Id: I7742f2a468af166e18f707dcd8045b2683882da9 --- M manifests/misc/statistics.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index d9f6e6e..0332bf9 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -435,6 +435,7 @@ package { [ 'python-dev', # RT 6561 'python3-dev', # RT 6561 +'build-essential', # Requested by halfak to install SciPy ]: ensure => 'installed', } -- To view, visit https://gerrit.wikimedia.org/r/150045 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7742f2a468af166e18f707dcd8045b2683882da9 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Ottomata 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 refinery deploy target to stat1002 - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Add refinery deploy target to stat1002 .. Add refinery deploy target to stat1002 Refinery has useful tools for working with webrequest snappy compressed sequence files in HDFS Change-Id: I0144cb661edd80ae2cdccb42f9044b924ce6aba0 --- M manifests/site.pp 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index ac5d6a6..3810d33 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2477,6 +2477,9 @@ # clients so that analysts can access Hadoop # from here. include role::analytics::clients + +# Include analytics/refinery deployment target. +include role::analytics::refinery } # stat1003 is a general purpose number cruncher for -- To view, visit https://gerrit.wikimedia.org/r/150208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0144cb661edd80ae2cdccb42f9044b924ce6aba0 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata Gerrit-Reviewer: Ottomata Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Get label of badge in SiteLinksView - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Get label of badge in SiteLinksView .. Get label of badge in SiteLinksView Instead of the serialized entity id the label of the badge item is displayed if it is available in the user's current language. Bug: 68183 Change-Id: Iaab6fcd34b3e5831e971158250c1040d3f56de02 --- M repo/includes/ItemView.php M repo/includes/View/SiteLinksView.php M repo/tests/phpunit/includes/View/SiteLinksViewTest.php 3 files changed, 77 insertions(+), 9 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/ItemView.php b/repo/includes/ItemView.php index 7c25614..ec4f80d 100644 --- a/repo/includes/ItemView.php +++ b/repo/includes/ItemView.php @@ -74,12 +74,15 @@ * @return string */ public function getHtmlForSiteLinks( Item $item, $editable = true ) { - $groups = WikibaseRepo::getDefaultInstance()->getSettings()->getSetting( 'siteLinkGroups' ); + $wikibaseRepo = WikibaseRepo::getDefaultInstance(); + $groups = $wikibaseRepo->getSettings()->getSetting( 'siteLinkGroups' ); // FIXME: Inject this $siteLinksView = new SiteLinksView( - WikibaseRepo::getDefaultInstance()->getSiteStore()->getSites(), - $this->sectionEditLinkGenerator + $wikibaseRepo->getSiteStore()->getSites(), + $this->sectionEditLinkGenerator, + $wikibaseRepo->getEntityLookup(), + $this->getLanguage()->getCode() ); $itemId = $item->getId(); diff --git a/repo/includes/View/SiteLinksView.php b/repo/includes/View/SiteLinksView.php index edd37c9..95f7be1 100644 --- a/repo/includes/View/SiteLinksView.php +++ b/repo/includes/View/SiteLinksView.php @@ -8,8 +8,10 @@ use Sanitizer; use Site; use SiteList; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\SiteLink; +use Wikibase\Lib\Store\EntityLookup; use Wikibase\Repo\WikibaseRepo; use Wikibase\Utils; @@ -35,6 +37,16 @@ private $sectionEditLinkGenerator; /** +* @var EntityLookup +*/ + private $entityLookup; + + /** +* @var string +*/ + private $languageCode; + + /** * @var string[] */ private $specialSiteLinkGroups; @@ -44,9 +56,12 @@ */ private $badgeItems; - public function __construct( SiteList $sites, SectionEditLinkGenerator $sectionEditLinkGenerator ) { + public function __construct( SiteList $sites, SectionEditLinkGenerator $sectionEditLinkGenerator, + EntityLookup $entityLookup, $languageCode ) { $this->sites = $sites; $this->sectionEditLinkGenerator = $sectionEditLinkGenerator; + $this->entityLookup = $entityLookup; + $this->languageCode = $languageCode; // @todo inject option/objects instead of using the singleton $repo = WikibaseRepo::getDefaultInstance(); @@ -362,7 +377,7 @@ 'span', array( 'class' => $classes, - 'title' => $serialization // @todo get label here + 'title' => $this->getTitleForBadge( $badge ) ) ); } @@ -370,4 +385,26 @@ return $html; } + /** +* Returns the title for the given badge id. +* @todo use TermLookup when we have one +* +* @param EntityId $badgeId +* +* @return string +*/ + private function getTitleForBadge( EntityId $badgeId ) { + $entity = $this->entityLookup->getEntity( $badgeId ); + if ( $entity === null ) { + return $badgeId->getSerialization(); + } + + $labels = $entity->getFingerprint()->getLabels(); + if ( $labels->hasTermForLanguage( $this->languageCode ) ) { + return $labels->getByLanguage( $this->languageCode )->getText(); + } else { + return $badgeId->getSerialization(); + } + } + } diff --git a/repo/tests/phpunit/includes/View/SiteLinksViewTest.php b/repo/tests/phpunit/includes/View/SiteLinksViewTest.php index e78560c..ae1bf37 100644 --- a/repo/tests/phpunit/includes/View/SiteLinksViewTest.php +++ b/repo/tests/phpunit/includes/View/SiteLinksViewTest.php @@ -2,12 +2,13 @@ namespace Wikibase\Test; -use Language; use MediaWikiSite; use SiteList; +use Wikibase\DataModel\Entity\EntityId; use
[MediaWiki-commits] [Gerrit] Special:Newpages feed now shows first revision instead of la... - change (mediawiki/core)
Rohan013 has uploaded a new change for review. https://gerrit.wikimedia.org/r/150210 Change subject: Special:Newpages feed now shows first revision instead of latest revision .. Special:Newpages feed now shows first revision instead of latest revision Bug: 67026 Change-Id: I1f794f314319127848a4e9981c7d4f549fb4fd0f --- M includes/specials/SpecialNewpages.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/150210/1 diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 1ec7006..c878d31 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -469,7 +469,7 @@ } protected function feedItemDesc( $row ) { - $revision = Revision::newFromId( $row->rev_id ); + $revision = Revision::newFromId( $row->rc_this_oldid ); if ( $revision ) { //XXX: include content model/type in feed item? return '' . htmlspecialchars( $revision->getUserText() ) . -- To view, visit https://gerrit.wikimedia.org/r/150210 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f794f314319127848a4e9981c7d4f549fb4fd0f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Rohan013 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove DNS recursor on sodium - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Remove DNS recursor on sodium .. Remove DNS recursor on sodium sodium can just use the (LVS balanced) dns rec cluster in eqiad now. Change-Id: I338537cb8d27512058d2407a78beb8a1c6c00ce9 --- M manifests/site.pp 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 3810d33..ca28d3d 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2404,13 +2404,10 @@ } node 'sodium.wikimedia.org' { -$nameservers_prefix = [ $ipaddress ] - include admin include base include ganglia include ntp::client -include dns::recursor include backup::client include role::mail::lists -- To view, visit https://gerrit.wikimedia.org/r/146072 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I338537cb8d27512058d2407a78beb8a1c6c00ce9 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma Gerrit-Reviewer: Mark Bergsma 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 PasswordError under includes/password/ file - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Move PasswordError under includes/password/ file .. Move PasswordError under includes/password/ file Change-Id: I7256325492b2f6451223714efb8b3e07fca9ee3e --- M includes/AutoLoader.php M includes/User.php A includes/password/PasswordError.php 3 files changed, 29 insertions(+), 9 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 905050d..9fa0c13 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -130,7 +130,6 @@ 'MWNamespace' => 'includes/MWNamespace.php', 'OutputPage' => 'includes/OutputPage.php', 'Pager' => 'includes/Pager.php', - 'PasswordError' => 'includes/User.php', 'PathRouter' => 'includes/PathRouter.php', 'PathRouterPatternReplacer' => 'includes/PathRouter.php', 'PhpHttpRequest' => 'includes/HttpFunctions.php', @@ -836,6 +835,7 @@ 'MWOldPassword' => 'includes/password/MWOldPassword.php', 'ParameterizedPassword' => 'includes/password/ParameterizedPassword.php', 'Password' => 'includes/password/Password.php', + 'PasswordError' => 'includes/password/PasswordError.php', 'PasswordFactory' => 'includes/password/PasswordFactory.php', 'Pbkdf2Password' => 'includes/password/Pbkdf2Password.php', 'EncryptedPassword' => 'includes/password/EncryptedPassword.php', diff --git a/includes/User.php b/includes/User.php index 73d4959..a887e36 100644 --- a/includes/User.php +++ b/includes/User.php @@ -39,14 +39,6 @@ define( 'EDIT_TOKEN_SUFFIX', '+\\' ); /** - * Thrown by User::setPassword() on error. - * @ingroup Exception - */ -class PasswordError extends MWException { - // NOP -} - -/** * The User object encapsulates all of the user-specific settings (user_id, * name, rights, password, email address, options, last login time). Client * classes use the getXXX() functions to access these fields. These functions diff --git a/includes/password/PasswordError.php b/includes/password/PasswordError.php new file mode 100644 index 000..c9707ad --- /dev/null +++ b/includes/password/PasswordError.php @@ -0,0 +1,28 @@ +http://www.gnu.org/copyleft/gpl.html + * + * @file + */ + +/** + * Show an error when any operation involving passwords fails to run. + * + * @ingroup Exception + */ +class PasswordError extends MWException { + // NOP +} -- To view, visit https://gerrit.wikimedia.org/r/150168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7256325492b2f6451223714efb8b3e07fca9ee3e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Withoutaname Gerrit-Reviewer: Bartosz Dziewoński 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 Universiteits Museum Utrecht to the wgCopyUploadsDomai... - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: added Universiteits Museum Utrecht to the wgCopyUploadsDomains array .. added Universiteits Museum Utrecht to the wgCopyUploadsDomains array Change-Id: I63a5ba9c7b9ede2b562632bfe061b2b079c3a642 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 1fbbb07..5d2ac19 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10564,6 +10564,7 @@ '*.eur.nl', // Erasmus University Rotterdam bug 67355 'mochila_images.s3.amazonaws.com', //temporary for GWT upload bug 67344 'mochila_images2.s3.amazonaws.com', //temporary for GWT upload bug 67344 + '*.universiteitsmuseum.nl', // Universiteits Museum Utrecht ), ), -- To view, visit https://gerrit.wikimedia.org/r/150163 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63a5ba9c7b9ede2b562632bfe061b2b079c3a642 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dan-nl Gerrit-Reviewer: Hashar Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Lua: Add integration tests for the 'allowArbitraryDataAccess... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Lua: Add integration tests for the 'allowArbitraryDataAccess' setting .. Lua: Add integration tests for the 'allowArbitraryDataAccess' setting Change-Id: I69a84c2e7dfdd5acb99836d9aba356304c7ad381 (cherry picked from commit 0f4e6e0c33c037985e55c2a513cef5aba479b99d) --- A client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryNoArbitraryAccessTests.lua A client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest.php M client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php 3 files changed, 90 insertions(+), 3 deletions(-) Approvals: Hoo man: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryNoArbitraryAccessTests.lua b/client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryNoArbitraryAccessTests.lua new file mode 100644 index 000..1139818 --- /dev/null +++ b/client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryNoArbitraryAccessTests.lua @@ -0,0 +1,19 @@ +--[[ + Integration tests verifiying that arbitrary data access doesn't work, if it's disabled. + + @license GNU GPL v2+ + @author Marius Hoch < h...@online.de > +]] + +local testframework = require 'Module:TestFramework' + +local tests = { + -- Integration tests + + { name = "mw.wikibase.getEntityObject (foreign access)", func = mw.wikibase.getEntityObject, + args = { 'Q42' }, + expect = 'Access to arbitrary items has been disabled.' + } +} + +return testframework.getTestProvider( tests ) diff --git a/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest.php b/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest.php new file mode 100644 index 000..b158e8c --- /dev/null +++ b/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest.php @@ -0,0 +1,38 @@ + + */ +class Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest extends Scribunto_LuaWikibaseLibraryTestCase { + protected static $moduleName = 'LuaWikibaseLibraryNoArbitraryAccessTests'; + + function getTestModules() { + return parent::getTestModules() + array( + 'LuaWikibaseLibraryNoArbitraryAccessTests' => __DIR__ . '/LuaWikibaseLibraryNoArbitraryAccessTests.lua', + ); + } + + /** +* Whether to allow arbitrary data access or not +* +* @return bool +*/ + protected static function allowArbitraryDataAccess() { + return false; + } + +} diff --git a/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php b/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php index e49e07e..34b2876 100644 --- a/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php +++ b/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php @@ -25,7 +25,21 @@ * @author Marius Hoch < h...@online.de > * @author Daniel Kinzler */ -class Scribunto_LuaWikibaseLibraryTestCase extends \Scribunto_LuaEngineTestBase { +abstract class Scribunto_LuaWikibaseLibraryTestCase extends \Scribunto_LuaEngineTestBase { + + /** +* @var bool|null +*/ + private static $oldAllowArbitraryDataAccess = null; + + /** +* Whether to allow arbitrary data access or not +* +* @return bool +*/ + protected static function allowArbitraryDataAccess() { + return true; + } /** * Makes sure WikibaseClient uses our ClientStore mock @@ -39,7 +53,16 @@ $wikibaseClient->overrideStore( $store ); } - $wikibaseClient->getSettings()->setSetting( 'allowArbitraryDataAccess', true ); + $settings = $wikibaseClient->getSettings(); + if ( self::$oldAllowArbitraryDataAccess === null ) { + // Only need to set this once, as this is supposed to be the original value + self::$oldAllowArbitraryDataAccess = $settings->getSetting( 'allowArbitraryDataAccess' ); + } + + $settings->setSetting( + 'allowArbitraryDataAccess', + static::allowArbitraryDataAccess() + ); } /** @@ -80,7 +103,14 @@ public function tearDown() { parent::tearDown(); - WikibaseClient::getDefaultInstance( 'reset' ); + $wikibaseClient = WikibaseClient::getDefaultInstance( 'reset' ); + + if ( self::$oldAllowArbitraryDataAccess !== null ) { + $wikibaseClient->getSettings()->setSet
[MediaWiki-commits] [Gerrit] Remove comment that perscribes dubious approach to solve a p... - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Remove comment that perscribes dubious approach to solve a problem .. Remove comment that perscribes dubious approach to solve a problem Change-Id: I94862e95c67925a65e1cb0de721a0e7416e155dd --- M repo/includes/store/sql/EntityPerPageTable.php 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: WikidataJenkins: Verified Thiemo Mättig (WMDE): Looks good to me, but someone else must approve Jeroen De Dauw: Looks good to me, approved diff --git a/repo/includes/store/sql/EntityPerPageTable.php b/repo/includes/store/sql/EntityPerPageTable.php index f22d250..8cefc6f 100644 --- a/repo/includes/store/sql/EntityPerPageTable.php +++ b/repo/includes/store/sql/EntityPerPageTable.php @@ -12,9 +12,6 @@ * * @since 0.2 * - * @todo: make this extend DBAccessBase, so it can be used to access the repo's EPP table - * from a client! - * * @licence GNU GPL v2+ * @author Thomas Pellissier Tanon * @author Daniel Kinzler -- To view, visit https://gerrit.wikimedia.org/r/149246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94862e95c67925a65e1cb0de721a0e7416e155dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: WikidataJenkins Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make "otherProjectsLinks" setting compatible with the "speci... - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/150211 Change subject: Make "otherProjectsLinks" setting compatible with the "special" sitelink group .. Make "otherProjectsLinks" setting compatible with the "special" sitelink group Deploy: Requires the "specialSiteLinkGroups" setting to be set on client. Change-Id: I07abcbafbd18a66089685f8fba7164744f9011c9 (cherry picked from commit 6acd5c4866b06fa5da0603d95ed94367e8b7f757) --- M client/includes/OtherProjectsSitesProvider.php M client/includes/WikibaseClient.php M client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php M client/tests/phpunit/includes/WikibaseClientTest.php 4 files changed, 50 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/11/150211/1 diff --git a/client/includes/OtherProjectsSitesProvider.php b/client/includes/OtherProjectsSitesProvider.php index 802e58f..f3016fe 100644 --- a/client/includes/OtherProjectsSitesProvider.php +++ b/client/includes/OtherProjectsSitesProvider.php @@ -28,12 +28,18 @@ private $currentSite; /** +* @var array +*/ + private $specialSiteGroups; + + /** * @param SiteStore $siteStore * @param Site $currentSite */ - public function __construct( SiteStore $siteStore, Site $currentSite ) { + public function __construct( SiteStore $siteStore, Site $currentSite, array $specialSiteGroups ) { $this->siteStore = $siteStore; $this->currentSite = $currentSite; + $this->specialSiteGroups = $specialSiteGroups; } /** @@ -50,6 +56,7 @@ $currentGroupId = $this->currentSite->getGroup(); $otherProjectsSites = new SiteList(); + $this->expandSpecialGroups( $supportedSiteGroupIds ); foreach ( $supportedSiteGroupIds as $groupId ) { if ( $groupId === $currentGroupId ) { continue; @@ -106,4 +113,16 @@ return null; } + + /** +* @param array &$groups +*/ + private function expandSpecialGroups( &$groups ) { + if ( !in_array( 'special', $groups ) ) { + return; + } + + $groups = array_diff( $groups, array( 'special' ) ); + $groups = array_merge( $groups, $this->specialSiteGroups ); + } } \ No newline at end of file diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index e05b748..7243de8 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -683,6 +683,10 @@ * @return OtherProjectsSitesProvider */ public function getOtherProjectsSitesProvider() { - return new OtherProjectsSitesProvider( $this->getSiteStore(), $this->getSite() ); + return new OtherProjectsSitesProvider( + $this->getSiteStore(), + $this->getSite(), + $this->getSettings()->getSetting( 'specialSiteLinkGroups' ) + ); } } diff --git a/client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php b/client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php index 2d91001..292cc03 100644 --- a/client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php +++ b/client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php @@ -32,7 +32,7 @@ public function testOtherProjectSites( array $supportedSites, Site $inputSite, SiteList $expectedSites ) { $siteStore = $this->getSiteStoreMock(); - $otherProjectsSitesProvider = new OtherProjectsSitesProvider( $siteStore, $inputSite ); + $otherProjectsSitesProvider = new OtherProjectsSitesProvider( $siteStore, $inputSite, array( 'wikidata' ) ); $this->assertEquals( $expectedSites, @@ -45,7 +45,7 @@ */ public function testOtherProjectSiteIds( array $supportedSites, Site $inputSite, SiteList $expectedSites ) { $siteStore = $this->getSiteStoreMock(); - $otherProjectsSitesProvider = new OtherProjectsSitesProvider( $siteStore, $inputSite ); + $otherProjectsSitesProvider = new OtherProjectsSitesProvider( $siteStore, $inputSite, array( 'wikidata' ) ); $expectedSiteIds = array(); foreach ( $expectedSites as $site ) { @@ -84,6 +84,23 @@ $tests['Only one in group'] = array( array( 'wikipedia', 'wikisource', 'commons' ), $siteStore->getSite( 'eswiki' ), + $result + ); + + $result = new SiteList(); + $result[] = $siteStore->getSite
[MediaWiki-commits] [Gerrit] Provides a default to otherProjectsLinks configuration param... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Provides a default to otherProjectsLinks configuration parameter .. Provides a default to otherProjectsLinks configuration parameter Deploy: Requires the "otherProjectsLinks" setting to be set on client Change-Id: Ie6ccb218e835991f57b3283cfa75d3934cc5cf1f (cherry picked from commit 82cecdc64930dc7c03931b62c0fbff5af77e44e4) --- M client/WikibaseClient.hooks.php M client/config/WikibaseClient.default.php A client/includes/OtherProjectsSitesProvider.php M client/includes/WikibaseClient.php A client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php M client/tests/phpunit/includes/WikibaseClientTest.php 6 files changed, 322 insertions(+), 14 deletions(-) Approvals: Hoo man: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 26372b4..62f3d04 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -35,6 +35,7 @@ use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator; use Wikibase\Client\Hooks\SpecialWatchlistQueryHandler; use Wikibase\Client\MovePageNotice; +use Wikibase\Client\OtherProjectsSitesProvider; use Wikibase\Client\WikibaseClient; /** @@ -621,22 +622,15 @@ public static function onSkinBuildSidebar( Skin $skin, &$bar ) { $settings = WikibaseClient::getDefaultInstance()->getSettings(); - $siteIdsToOutput = $settings->getSetting( 'otherProjectsLinks' ); if ( - !$settings->getSetting( 'otherProjectsLinksBeta' ) && !$settings->getSetting( 'otherProjectsLinksByDefault' ) || - count( $siteIdsToOutput ) === 0 + !$settings->getSetting( 'otherProjectsLinksBeta' ) && + !$settings->getSetting( 'otherProjectsLinksByDefault' ) ) { return true; } - $generator = new OtherProjectsSidebarGenerator( - $settings->getSetting( 'siteGlobalID' ), - WikibaseClient::getDefaultInstance()->getStore()->getSiteLinkTable(), - WikibaseClient::getDefaultInstance()->getSiteStore(), - $siteIdsToOutput - ); - - $otherProjectsSidebar = $generator->buildProjectLinkSidebar( $skin->getContext()->getTitle() ); + $otherProjectsSidebarGenerator = WikibaseClient::getDefaultInstance()->getOtherProjectsSidebarGenerator(); + $otherProjectsSidebar = $otherProjectsSidebarGenerator->buildProjectLinkSidebar( $skin->getContext()->getTitle() ); if ( count( $otherProjectsSidebar ) !== 0 ) { $bar['wikibase-otherprojects'] = $otherProjectsSidebar; } diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index 68a9a02..1184213 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -1,5 +1,6 @@ true, 'propagateChangesToRepo' => true, - 'otherProjectsLinks' => array(), 'otherProjectsLinksByDefault' => false, 'otherProjectsLinksBeta' => false, // List of additional CSS class names for site links that have badges, e.g. @@ -239,6 +239,11 @@ return null; }; + $defaults['otherProjectsLinks'] = function ( SettingsArray $settings ) { + $otherProjectsSitesProvider = WikibaseClient::getDefaultInstance()->getOtherProjectsSitesProvider(); + return $otherProjectsSitesProvider->getOtherProjectsSiteIds( $settings->getSetting( 'siteLinkGroups' ) ); + }; + // Prefix to use for cache keys that should be shared among // a wikibase repo and all its clients. // In order to share caches between clients (and the repo) diff --git a/client/includes/OtherProjectsSitesProvider.php b/client/includes/OtherProjectsSitesProvider.php new file mode 100644 index 000..802e58f --- /dev/null +++ b/client/includes/OtherProjectsSitesProvider.php @@ -0,0 +1,109 @@ + + */ +class OtherProjectsSitesProvider { + + /** +* @param SiteStore $siteStore +*/ + private $siteStore; + + /** +* @var Site +*/ + private $currentSite; + + /** +* @param SiteStore $siteStore +* @param Site $currentSite +*/ + public function __construct( SiteStore $siteStore, Site $currentSite ) { + $this->siteStore = $siteStore; + $this->currentSite = $currentSite; + } + + /** +* Provides a list of sites to link to in the "other project" sidebar +* +* This list contains the wiki in the same languag
[MediaWiki-commits] [Gerrit] Close out extension and note TimedMediaHandler as replacement - change (mediawiki...OggHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Close out extension and note TimedMediaHandler as replacement .. Close out extension and note TimedMediaHandler as replacement Leave no-op PHP file to avoid errors and README, both pointing to TMH. Change-Id: I6ad2538fda15d29d780a22796e7c980e94901729 --- D .gitignore D .jshintrc D .project D OggHandler.i18n.magic.php D OggHandler.i18n.php M OggHandler.php D OggHandler_body.php D OggPlayer.js D PEAR/File_Ogg/File/Ogg.php D PEAR/File_Ogg/File/Ogg/Bitstream.php D PEAR/File_Ogg/File/Ogg/Flac.php D PEAR/File_Ogg/File/Ogg/Media.php D PEAR/File_Ogg/File/Ogg/Speex.php D PEAR/File_Ogg/File/Ogg/Theora.php D PEAR/File_Ogg/File/Ogg/Vorbis.php D PEAR/File_Ogg/File/README D PEAR/File_Ogg/package.xml M README D cortado-ovt-stripped-0.6.0.jar D ffmpeg-bugfix.diff D i18n/af.json D i18n/akz.json D i18n/aln.json D i18n/an.json D i18n/ar.json D i18n/arc.json D i18n/arz.json D i18n/as.json D i18n/ast.json D i18n/avk.json D i18n/az.json D i18n/azb.json D i18n/ba.json D i18n/bcc.json D i18n/bcl.json D i18n/be-tarask.json D i18n/be.json D i18n/bg.json D i18n/bn.json D i18n/br.json D i18n/bs.json D i18n/ca.json D i18n/ce.json D i18n/ckb.json D i18n/cs.json D i18n/cu.json D i18n/cy.json D i18n/da.json D i18n/de-ch.json D i18n/de.json D i18n/diq.json D i18n/dsb.json D i18n/el.json D i18n/en.json D i18n/eo.json D i18n/es.json D i18n/et.json D i18n/eu.json D i18n/fa.json D i18n/fi.json D i18n/fo.json D i18n/fr.json D i18n/frp.json D i18n/fur.json D i18n/ga.json D i18n/gl.json D i18n/grc.json D i18n/gsw.json D i18n/gu.json D i18n/gv.json D i18n/he.json D i18n/hi.json D i18n/hif-latn.json D i18n/hr.json D i18n/hsb.json D i18n/ht.json D i18n/hu.json D i18n/hy.json D i18n/ia.json D i18n/id.json D i18n/ig.json D i18n/ilo.json D i18n/io.json D i18n/is.json D i18n/it.json D i18n/ja.json D i18n/jut.json D i18n/jv.json D i18n/ka.json D i18n/kk-arab.json D i18n/kk-cyrl.json D i18n/kk-latn.json D i18n/km.json D i18n/ko.json D i18n/krc.json D i18n/krj.json D i18n/ksh.json D i18n/ku-latn.json D i18n/ky.json D i18n/la.json D i18n/lb.json D i18n/lez.json D i18n/lfn.json D i18n/li.json D i18n/lt.json D i18n/lv.json D i18n/mk.json D i18n/ml.json D i18n/mr.json D i18n/ms.json D i18n/mt.json D i18n/myv.json D i18n/nah.json D i18n/nb.json D i18n/nds-nl.json D i18n/nds.json D i18n/nl-informal.json D i18n/nl.json D i18n/nn.json D i18n/oc.json D i18n/or.json D i18n/os.json D i18n/pa.json D i18n/pdc.json D i18n/pfl.json D i18n/pl.json D i18n/pms.json D i18n/pnb.json D i18n/ps.json D i18n/pt-br.json D i18n/pt.json D i18n/qqq.json D i18n/qu.json D i18n/ro.json D i18n/roa-tara.json D i18n/ru.json D i18n/rue.json D i18n/sa.json D i18n/sah.json D i18n/scn.json D i18n/sgs.json D i18n/si.json D i18n/sk.json D i18n/sl.json D i18n/sq.json D i18n/sr-ec.json D i18n/sr-el.json D i18n/stq.json D i18n/su.json D i18n/sv.json D i18n/sw.json D i18n/ta.json D i18n/te.json D i18n/tg-cyrl.json D i18n/tg-latn.json D i18n/th.json D i18n/tk.json D i18n/tl.json D i18n/tpi.json D i18n/tr.json D i18n/ts.json D i18n/tt-cyrl.json D i18n/tzm.json D i18n/ug-arab.json D i18n/uk.json D i18n/ur.json D i18n/vec.json D i18n/vep.json D i18n/vi.json D i18n/vo.json D i18n/wa.json D i18n/yi.json D i18n/yo.json D i18n/yue.json D i18n/zh-hans.json D i18n/zh-hant.json D info.png D null_file D null_file.mov D pause.png D play.png D stop.png 182 files changed, 6 insertions(+), 9,274 deletions(-) Approvals: Krinkle: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/149465 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ad2538fda15d29d780a22796e7c980e94901729 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OggHandler Gerrit-Branch: master Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Attaching Hooks to tweak MIME type detection - change (mediawiki...MolHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Attaching Hooks to tweak MIME type detection .. Attaching Hooks to tweak MIME type detection This is the successor of Icf9eec10bec7c0a7e. PHP's own module fileinfo module is not capable detecting Chemical table files. Instead, they are reported as text/plain. MediaHandlers can be attached by MIME type only. That's why these changes are required for [[Extension:MolHandler]] to work. MIME type detection can be also established and tweaked through the operating system's file command on Linux and Mac but that's non-trivial. Change-Id: I5f7a56ccfbf7739e8cdbfa3b547e8f36653e6d86 --- A MolHandler.mime.php M MolHandler.php A MolHandlerHooks.php A tests/files/Chlorbenzene.syn.test.pass.rxn A tests/files/DA.test.pass.rxn A tests/files/Penthiopyrad.test.pass.mol A tests/files/benzene.test.pass.mol A tests/files/benzene_aromatic.test.pass.mol A tests/files/benzylpenicillinG2D.test.pass.sdf A tests/files/benzylpenicillinG3D.test.pass.sdf A tests/files/tartaric_acid.test.pass.mol A tests/files/thiamine_nitrate.test.pass.mol A tests/files/water.test.pass.mol A tests/phpunit/MolHandler.mimeTest.php 14 files changed, 1,058 insertions(+), 1 deletion(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/MolHandler.mime.php b/MolHandler.mime.php new file mode 100755 index 000..2ae6ce5 --- /dev/null +++ b/MolHandler.mime.php @@ -0,0 +1,176 @@ +http://www.gnu.org/copyleft/gpl.html + * @file + * @ingroup Media + */ + +class MolHandlerMime { + + /** +* Hook: MimeMagicInit. +* +* @param MimeMagic $mimeMagic +* @param object $addToList Callback function +* @return bool Always true +*/ + public static function onMimeMagicInit( $mimeMagic ) { + static $extraInfo = + 'chemical/x-mdl-molfile [DRAWING] + chemical/x-mdl-sdfile [DRAWING] + chemical/x-mdl-rxnfile [DRAWING] + chemical/x-mdl-rdfile [DRAWING] + chemical/x-mdl-rgfile [DRAWING]'; + + static $extraTypes = + 'chemical/x-mdl-molfile mol + chemical/x-mdl-sdfile sdf + chemical/x-mdl-rxnfile rxn + chemical/x-mdl-rdfile rd + chemical/x-mdl-rgfile rg'; + + $mimeMagic->addExtraInfo( $extraInfo ); + $mimeMagic->addExtraTypes( $extraTypes ); + return true; + } + + /** +* Determines whether $extension is one that is used for chemical table files. +* +* @param string $extension File extension +* @return bool +*/ + private static function isChemFileExtension( $extension ) { + static $types = array( + 'mol', 'sdf', 'rxn', 'rd', 'rg', + ); + return in_array( strtolower( $extension ), $types ); + } + + /** +* Looks whether the MIME type could be improved from file extension. +* +* @param MimeMagic $mimeMagic +* @param string $ext File extension +* @param string $mime Previously detected MIME +* @return string Improved MIME +*/ + public static function improveFromExtension( $mimeMagic, $ext, $mime ) { + if ( ( $mime === 'text/plain' ) && self::isChemFileExtension( $ext ) ) { + $mime = $mimeMagic->guessTypesForExtension( $ext ); + } + return $mime; + } + + /** +* Hook: MimeMagicImproveFromExtension. +* +* @param MimeMagic $mimeMagic +* @param string $ext File extension +* @param string $mime In: Previously detected MIME; Out: Improved MIME +* @return bool Always true +*/ + public static function onMimeMagicImproveFromExtension( $mimeMagic, $ext, &$mime ) { + $mime = self::improveFromExtension( $mimeMagic, $ext, $mime ); + return true; + } + + /** +* Guess chemical MIME types from file content. +* +* @param string $head 1024 bytes of the head +* @param string $tail 1024 bytes of the tail +* @param string $file +* @return bool|string Mime type +*/ + public static function doGuessChemicalMime( &$head, &$tail, $file ) { + # Note that a lot of chemical table files contain embedded molfiles. + # Therefore, always check for these container files before checking for molfiles! + static $headers = array( + '$RXN' => 'chemical/x-mdl-rxnfile', + '$RDFILE ' => 'chemical/x-mdl-rdfile', +
[MediaWiki-commits] [Gerrit] hhvm: provide hhvm-build-$VERSION - change (operations...hhvm)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/150212 Change subject: hhvm: provide hhvm-build-$VERSION .. hhvm: provide hhvm-build-$VERSION As hhvm does not guarantee ABI compatibility, all extensions should be rebuilt once we have changed the ABI version - but we don't need them to be rebuilt for every version of this package, so for wikimedia-specific patches we remove the final suffix from the package version to indicate the api version. Signed-off-by: Giuseppe Lavagetto --- M debian/control M debian/rules 2 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm refs/changes/12/150212/1 diff --git a/debian/control b/debian/control index b6e7383..fe111d2 100644 --- a/debian/control +++ b/debian/control @@ -64,6 +64,7 @@ Package: hhvm Architecture: amd64 Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: ${hhvm:Build} Description: HipHop Virtual Machine, a JIT replacement for PHP HHVM is a new open-source virtual machine designed for executing programs written in PHP. HHVM uses a just-in-time (JIT) compilation approach to diff --git a/debian/rules b/debian/rules index 511edf2..ae5bb49 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,7 @@ #export DH_VERBOSE=1 export LDFLAGS='-Wl,--as-needed' +HHVMVER := $(shell dpkg-parsechangelog | sed -ne 's/^Version:\ //p' | sed -e s'/\+wmf[0-9]//') %: dh $@ --parallel @@ -30,4 +31,7 @@ override_dh_strip: dh_strip --dbg-package=hhvm-dbg +override_dh_gencontrol: + echo "hhvm:Build=hhvm-build-$(HHVMVER)" >> debian/hhvm.substvars + .PHONY: override_dh_auto_build override_dh_auto_configure override_dh_auto_test override_dh_strip -- To view, visit https://gerrit.wikimedia.org/r/150212 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8518d562682ae2aff84748d13c58af94c8287d3 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/hhvm Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hhvm: lintian fixes - change (operations...hhvm)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/150213 Change subject: hhvm: lintian fixes .. hhvm: lintian fixes I have corrected some lintian errors I introduced, and added a couple to the overrides list. Signed-off-by: Giuseppe Lavagetto --- M debian/hhvm.lintian-overrides M debian/hhvm.postinst D debian/hhvm.postrm A debian/hhvm.prerm 4 files changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm refs/changes/13/150213/1 diff --git a/debian/hhvm.lintian-overrides b/debian/hhvm.lintian-overrides index c490f1e..993009d 100644 --- a/debian/hhvm.lintian-overrides +++ b/debian/hhvm.lintian-overrides @@ -1,2 +1,5 @@ hhvm: spelling-error-in-binary usr/bin/hhvm tEH the hhvm: spelling-error-in-binary usr/bin/hhvm taht that +hhvm: script-in-etc-init.d-not-registered-via-update-rc.d etc/init.d/hhvm +hhvm: binary-without-manpage usr/bin/hhvm +hhvm-dev: binary-without-manpage usr/bin/hphpize diff --git a/debian/hhvm.postinst b/debian/hhvm.postinst index 3116515..70b2ab2 100755 --- a/debian/hhvm.postinst +++ b/debian/hhvm.postinst @@ -1,2 +1,4 @@ #!/bin/bash -e -/usr/bin/update-alternatives --install /usr/bin/php php /usr/bin/hhvm 60 +update-alternatives --install /usr/bin/php php /usr/bin/hhvm 60 + +#DEBHELPER# diff --git a/debian/hhvm.postrm b/debian/hhvm.postrm deleted file mode 100755 index 489ec54..000 --- a/debian/hhvm.postrm +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -e -/usr/bin/update-alternatives --remove php /usr/bin/hhvm diff --git a/debian/hhvm.prerm b/debian/hhvm.prerm new file mode 100755 index 000..ef2f601 --- /dev/null +++ b/debian/hhvm.prerm @@ -0,0 +1,4 @@ +#!/bin/bash -e +update-alternatives --remove php /usr/bin/hhvm + +#DEBHELPER# -- To view, visit https://gerrit.wikimedia.org/r/150213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icde23c00a22e0f0ca944ad295a2a4af030b0d5b3 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/hhvm Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add 'quarter' to variables available in archive page name pa... - change (pywikibot/core)
Whym has uploaded a new change for review. https://gerrit.wikimedia.org/r/150214 Change subject: Add 'quarter' to variables available in archive page name patterns .. Add 'quarter' to variables available in archive page name patterns Change-Id: I7235aac26f7c577d4acde1b0b3466770f6a309d3 --- M externals/httplib2 M scripts/archivebot.py 2 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/14/150214/1 diff --git a/externals/httplib2 b/externals/httplib2 index 5dc1456..ab41873 16 --- a/externals/httplib2 +++ b/externals/httplib2 -Subproject commit 5dc145682eb726bd54eaf7e9f940844ca234db71 +Subproject commit ab418734f432691ec4a927be32364ee85baab35c diff --git a/scripts/archivebot.py b/scripts/archivebot.py index 8b073e8..8fb0dd4 100644 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -52,6 +52,15 @@ key A secret key that (if valid) allows archives to not be subpages of the page being archived. +Variables below can be used in the value for "archive" in the template above: + +%(counter)d the current value of the counter +%(year)d year of the thread being archived +%(quater)d quater of the year of the thread being archived +%(month)dmonth (as a number 1-12) of the thread being archived +%(monthname)sEnglish name of the month above +%(monthnameshort)s first three letters of the name above +%(week)d week number of the thread being archived Options (may be omitted): -help show this help message and exit @@ -78,6 +87,7 @@ import re import locale from hashlib import md5 +from math import ceil import pywikibot from pywikibot import i18n @@ -421,6 +431,7 @@ params = { 'counter': arch_counter, 'year': t.timestamp.year, +'quarter': int(ceil(float(t.timestamp.month) / 3), 'month': t.timestamp.month, 'monthname': self.month_num2orig_names[t.timestamp.month]['long'], 'monthnameshort': self.month_num2orig_names[t.timestamp.month]['short'], -- To view, visit https://gerrit.wikimedia.org/r/150214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7235aac26f7c577d4acde1b0b3466770f6a309d3 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Whym ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make hhvm-luasandbox depend on hhvm-build and not on the pac... - change (mediawiki...luasandbox)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/150215 Change subject: Make hhvm-luasandbox depend on hhvm-build and not on the package .. Make hhvm-luasandbox depend on hhvm-build and not on the package Change-Id: Ia3aeeb8cf622501bd2f93f3ce2724f73be95a323 Signed-off-by: Giuseppe Lavagetto --- M debian/control M debian/rules 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/luasandbox refs/changes/15/150215/1 diff --git a/debian/control b/debian/control index 5cbc8aa..5df0dba 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Package: hhvm-luasandbox Architecture: any -Depends: hhvm (= ${hhvm:Depends}), ${shlibs:Depends}, ${misc:Depends} +Depends: ${hhvm:Depends}, ${shlibs:Depends}, ${misc:Depends} Description: Lua extension for HHVM A HHVM extension providing a sandboxed Lua environment which can be used to run untrusted code. diff --git a/debian/rules b/debian/rules index 9fc8267..0c61f38 100755 --- a/debian/rules +++ b/debian/rules @@ -35,7 +35,7 @@ override_dh_gencontrol: echo "php:Depends=phpapi-$(shell php-config5 --phpapi)" >> debian/php-luasandbox.substvars # HHVM does *not* ensure binary compatibility - echo "hhvm:Depends=$(shell dpkg -s hhvm-dev | grep -i "version:" | cut -d\ -f 2)" >> debian/hhvm-luasandbox.substvars + echo "hhvm:Depends=hhvm-build-$(shell dpkg -s hhvm-dev | sed -ne 's/^Version:\ //p' | sed -e s'/\+wmf[0-9]//'" >> debian/hhvm-luasandbox.substvars dh_gencontrol override_dh_auto_clean: -- To view, visit https://gerrit.wikimedia.org/r/150215 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3aeeb8cf622501bd2f93f3ce2724f73be95a323 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/php/luasandbox Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make "otherProjectsLinks" setting compatible with the "speci... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Make "otherProjectsLinks" setting compatible with the "special" sitelink group .. Make "otherProjectsLinks" setting compatible with the "special" sitelink group Deploy: Requires the "specialSiteLinkGroups" setting to be set on client. Change-Id: I07abcbafbd18a66089685f8fba7164744f9011c9 (cherry picked from commit 6acd5c4866b06fa5da0603d95ed94367e8b7f757) --- M client/includes/OtherProjectsSitesProvider.php M client/includes/WikibaseClient.php M client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php M client/tests/phpunit/includes/WikibaseClientTest.php 4 files changed, 50 insertions(+), 12 deletions(-) Approvals: Hoo man: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/client/includes/OtherProjectsSitesProvider.php b/client/includes/OtherProjectsSitesProvider.php index 802e58f..f3016fe 100644 --- a/client/includes/OtherProjectsSitesProvider.php +++ b/client/includes/OtherProjectsSitesProvider.php @@ -28,12 +28,18 @@ private $currentSite; /** +* @var array +*/ + private $specialSiteGroups; + + /** * @param SiteStore $siteStore * @param Site $currentSite */ - public function __construct( SiteStore $siteStore, Site $currentSite ) { + public function __construct( SiteStore $siteStore, Site $currentSite, array $specialSiteGroups ) { $this->siteStore = $siteStore; $this->currentSite = $currentSite; + $this->specialSiteGroups = $specialSiteGroups; } /** @@ -50,6 +56,7 @@ $currentGroupId = $this->currentSite->getGroup(); $otherProjectsSites = new SiteList(); + $this->expandSpecialGroups( $supportedSiteGroupIds ); foreach ( $supportedSiteGroupIds as $groupId ) { if ( $groupId === $currentGroupId ) { continue; @@ -106,4 +113,16 @@ return null; } + + /** +* @param array &$groups +*/ + private function expandSpecialGroups( &$groups ) { + if ( !in_array( 'special', $groups ) ) { + return; + } + + $groups = array_diff( $groups, array( 'special' ) ); + $groups = array_merge( $groups, $this->specialSiteGroups ); + } } \ No newline at end of file diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index e05b748..7243de8 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -683,6 +683,10 @@ * @return OtherProjectsSitesProvider */ public function getOtherProjectsSitesProvider() { - return new OtherProjectsSitesProvider( $this->getSiteStore(), $this->getSite() ); + return new OtherProjectsSitesProvider( + $this->getSiteStore(), + $this->getSite(), + $this->getSettings()->getSetting( 'specialSiteLinkGroups' ) + ); } } diff --git a/client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php b/client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php index 2d91001..292cc03 100644 --- a/client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php +++ b/client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php @@ -32,7 +32,7 @@ public function testOtherProjectSites( array $supportedSites, Site $inputSite, SiteList $expectedSites ) { $siteStore = $this->getSiteStoreMock(); - $otherProjectsSitesProvider = new OtherProjectsSitesProvider( $siteStore, $inputSite ); + $otherProjectsSitesProvider = new OtherProjectsSitesProvider( $siteStore, $inputSite, array( 'wikidata' ) ); $this->assertEquals( $expectedSites, @@ -45,7 +45,7 @@ */ public function testOtherProjectSiteIds( array $supportedSites, Site $inputSite, SiteList $expectedSites ) { $siteStore = $this->getSiteStoreMock(); - $otherProjectsSitesProvider = new OtherProjectsSitesProvider( $siteStore, $inputSite ); + $otherProjectsSitesProvider = new OtherProjectsSitesProvider( $siteStore, $inputSite, array( 'wikidata' ) ); $expectedSiteIds = array(); foreach ( $expectedSites as $site ) { @@ -84,6 +84,23 @@ $tests['Only one in group'] = array( array( 'wikipedia', 'wikisource', 'commons' ), $siteStore->getSite( 'eswiki' ), + $result + ); + + $result = new SiteList(); + $result[] = $siteStore->getSite( 'wikidatawiki' ); +
[MediaWiki-commits] [Gerrit] Make hhvm-fss depend on hhvm-build and not on the package - change (mediawiki...FastStringSearch)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/150216 Change subject: Make hhvm-fss depend on hhvm-build and not on the package .. Make hhvm-fss depend on hhvm-build and not on the package Change-Id: If1ef111b99c070a3695b622caee688460bc73297 Signed-off-by: Giuseppe Lavagetto --- M debian/control M debian/rules 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/FastStringSearch refs/changes/16/150216/1 diff --git a/debian/control b/debian/control index cb256b1..3b45bf3 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Package: hhvm-fss Architecture: any -Depends: hhvm (= ${hhvm:Depends}), ${shlibs:Depends}, ${misc:Depends}, ${php:Depends} +Depends: ${hhvm:Depends}, ${shlibs:Depends}, ${misc:Depends}, ${php:Depends} Description: fast string search extension for HHVM This is a HHVM extension for fast string search and replace that supports multiple search terms. It can be used as a replacement for PHP's strtr, which diff --git a/debian/rules b/debian/rules index cbf9253..712ebc4 100755 --- a/debian/rules +++ b/debian/rules @@ -33,7 +33,7 @@ override_dh_gencontrol: echo "php:Depends=phpapi-$(shell php-config5 --phpapi)" >> debian/php5-fss.substvars # HHVM does *not* ensure abi compatibility. - echo "hhvm:Depends=$(shell dpkg -s hhvm-dev | grep -i "version:" | cut -d\ -f 2)" >> debian/hhvm-fss.substvars + echo "hhvm:Depends=hhvm-build-$(shell dpkg -s hhvm-dev | sed -ne 's/^Version:\ //p' | sed -e s'/\+wmf[0-9]//'" >> debian/hhvm-fss.substvars dh_gencontrol override_dh_auto_clean: -- To view, visit https://gerrit.wikimedia.org/r/150216 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1ef111b99c070a3695b622caee688460bc73297 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/php/FastStringSearch Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make hhvm-wikidiff2 depend on hhvm-build and not on the package - change (mediawiki...wikidiff2)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/150217 Change subject: Make hhvm-wikidiff2 depend on hhvm-build and not on the package .. Make hhvm-wikidiff2 depend on hhvm-build and not on the package Change-Id: I73c00aba7f3a8f08bbb30a0d8f08fc20d3eae8b0 Signed-off-by: Giuseppe Lavagetto --- M debian/control M debian/rules 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/wikidiff2 refs/changes/17/150217/1 diff --git a/debian/control b/debian/control index 6f23e98..72f298f 100644 --- a/debian/control +++ b/debian/control @@ -21,7 +21,7 @@ Package: hhvm-wikidiff2 Architecture: any -Depends: hhvm (= ${hhvm:Depends}), ${shlibs:Depends}, ${misc:Depends} +Depends: ${hhvm:Depends}, ${shlibs:Depends}, ${misc:Depends} Description: external diff engine for MediaWiki (HHVM extension) Wikidiff2 is PHP 5 module providing external diff engine for MediaWiki. It performs word-level (space-delimited) diffs on general text, and diff --git a/debian/rules b/debian/rules index 6b125ac..bb5bbdc 100755 --- a/debian/rules +++ b/debian/rules @@ -37,7 +37,7 @@ override_dh_gencontrol: echo "php:Depends=phpapi-$(shell php-config5 --phpapi)" >> debian/php-wikidiff2.substvars # HHVM does *not* ensure binary compatibility - echo "hhvm:Depends=$(shell dpkg -s hhvm-dev | grep -i "version:" | cut -d\ -f 2)" >> debian/hhvm-wikidiff2.substvars + echo "hhvm:Depends=hhvm-build-$(shell dpkg -s hhvm-dev | sed -ne 's/^Version:\ //p' | sed -e s'/\+wmf[0-9]//'" >> debian/hhvm-wikidiff2.substvars dh_gencontrol override_dh_auto_clean: -- To view, visit https://gerrit.wikimedia.org/r/150217 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73c00aba7f3a8f08bbb30a0d8f08fc20d3eae8b0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/php/wikidiff2 Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikibase and ValueView - change (mediawiki...Wikidata)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/150218 Change subject: Update Wikibase and ValueView .. Update Wikibase and ValueView Change-Id: Iaaf8a2b26a7453faa41de71157b36f96cd1765b6 --- M composer.lock M extensions/ValueView/README.md M extensions/ValueView/ValueView.php M extensions/ValueView/lib/jquery.ui/jquery.ui.suggester.css M extensions/ValueView/lib/jquery.ui/jquery.ui.suggester.js M extensions/Wikibase/client/WikibaseClient.hooks.php M extensions/Wikibase/client/WikibaseClient.php M extensions/Wikibase/client/config/WikibaseClient.default.php M extensions/Wikibase/client/i18n/en.json M extensions/Wikibase/client/i18n/qqq.json A extensions/Wikibase/client/includes/OtherProjectsSitesProvider.php M extensions/Wikibase/client/includes/WikibaseClient.php M extensions/Wikibase/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php M extensions/Wikibase/client/includes/scribunto/WikibaseLuaBindings.php M extensions/Wikibase/client/includes/scribunto/mw.wikibase.lua A extensions/Wikibase/client/resources/images/wb-otherprojects-beta-ltr.png A extensions/Wikibase/client/resources/images/wb-otherprojects-beta-ltr.svg A extensions/Wikibase/client/resources/images/wb-otherprojects-beta-rtl.png A extensions/Wikibase/client/tests/phpunit/includes/OtherProjectsSitesProviderTest.php M extensions/Wikibase/client/tests/phpunit/includes/WikibaseClientTest.php A extensions/Wikibase/client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryNoArbitraryAccessTests.lua M extensions/Wikibase/client/tests/phpunit/includes/scribunto/LuaWikibaseLibraryTests.lua A extensions/Wikibase/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest.php M extensions/Wikibase/client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTestCase.php M extensions/Wikibase/client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php M extensions/Wikibase/client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php M extensions/Wikibase/docs/lua.wiki M extensions/Wikibase/docs/options.wiki M extensions/Wikibase/lib/includes/modules/SitesModule.php M extensions/Wikibase/lib/resources/wikibase.ui.SiteLinksEditTool.js M extensions/Wikibase/repo/i18n/en.json M extensions/Wikibase/repo/i18n/qqq.json M extensions/Wikibase/repo/includes/View/SiteLinksView.php M extensions/Wikibase/repo/includes/api/GetEntities.php M extensions/Wikibase/repo/includes/api/LinkTitles.php M extensions/Wikibase/repo/includes/api/ModifyEntity.php M extensions/Wikibase/repo/includes/api/SiteLinkTargetProvider.php M extensions/Wikibase/repo/tests/phpunit/includes/View/SiteLinksViewTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/SiteLinkTargetProviderTest.php M vendor/composer/autoload_classmap.php M vendor/composer/installed.json 41 files changed, 875 insertions(+), 162 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/18/150218/1 diff --git a/composer.lock b/composer.lock index 9c104a3..ec877cc 100644 --- a/composer.lock +++ b/composer.lock @@ -632,16 +632,16 @@ }, { "name": "data-values/value-view", -"version": "0.6.7", +"version": "0.6.8", "source": { "type": "git", "url": "https://github.com/wmde/ValueView.git";, -"reference": "66686f91e498a9ddda75d84e2fdee43312ed7d5e" +"reference": "44ca1b31a172130224ffc707657558690ec03d45" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wmde/ValueView/zipball/66686f91e498a9ddda75d84e2fdee43312ed7d5e";, -"reference": "66686f91e498a9ddda75d84e2fdee43312ed7d5e", +"url": "https://api.github.com/repos/wmde/ValueView/zipball/44ca1b31a172130224ffc707657558690ec03d45";, +"reference": "44ca1b31a172130224ffc707657558690ec03d45", "shasum": "" }, "require": { @@ -670,7 +670,7 @@ ], "description": "Provides JS widgets to edit values defined by the DataValues library", "homepage": "https://www.mediawiki.org/wiki/Extension:ValueView";, -"time": "2014-07-23 13:34:45" +"time": "2014-07-29 11:56:20" }, { "name": "diff/diff", @@ -754,7 +754,7 @@ }, "files": [ -], +], "classmap": [ "PropertySuggesterHooks.php", "maintenance/UpdateTable.php" @@ -1153,12 +1153,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";, -"reference": "d2834f594edad6b0e2c089a6bab803d5bff30c6f" +
[MediaWiki-commits] [Gerrit] Prefix parser tests files with 'proofreadpage_' - change (mediawiki...ProofreadPage)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/150219 Change subject: Prefix parser tests files with 'proofreadpage_' .. Prefix parser tests files with 'proofreadpage_' The parser test suite use the name of the text file to forge a class which in test output would show as: Pagelist::testParserTest.testParserTest with data set #0 Pages::testParserTest.testParserTest with data set #0 Prefix the text files with 'proofreadpage_' to have classes named such as: Proofreadpage_pagelist Proofreadpage_pages That will let us easily find out where the tests come from. Change-Id: I71c4c9347bb680176af63174cd6315c8127d22f2 --- M ProofreadPage.php R tests/parser/proofreadpage_pagelist.txt R tests/parser/proofreadpage_pages.txt 3 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/19/150219/1 diff --git a/ProofreadPage.php b/ProofreadPage.php index a204cbf..fde1474 100644 --- a/ProofreadPage.php +++ b/ProofreadPage.php @@ -237,8 +237,8 @@ }; //Parser tests -$wgParserTestFiles[] = __DIR__ . '/tests/parser/pagelist.txt'; -$wgParserTestFiles[] = __DIR__ . '/tests/parser/pages.txt'; +$wgParserTestFiles[] = __DIR__ . '/tests/parser/proofreadpage_pagelist.txt'; +$wgParserTestFiles[] = __DIR__ . '/tests/parser/proofreadpage_pages.txt'; //Handlers $wgContentHandlers[CONTENT_MODEL_PROOFREAD_PAGE] = '\ProofreadPage\Page\PageContentHandler'; diff --git a/tests/parser/pagelist.txt b/tests/parser/proofreadpage_pagelist.txt similarity index 100% rename from tests/parser/pagelist.txt rename to tests/parser/proofreadpage_pagelist.txt diff --git a/tests/parser/pages.txt b/tests/parser/proofreadpage_pages.txt similarity index 100% rename from tests/parser/pages.txt rename to tests/parser/proofreadpage_pages.txt -- To view, visit https://gerrit.wikimedia.org/r/150219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71c4c9347bb680176af63174cd6315c8127d22f2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits