[MediaWiki-commits] [Gerrit] Added more protection against sending invalid events to the ... - change (mediawiki...EventBus)
Mobrovac has submitted this change and it was merged. Change subject: Added more protection against sending invalid events to the eventlogging service. .. Added more protection against sending invalid events to the eventlogging service. Also, moved event construction out of the deferred task for revision_visibility_set event, which greatly reduces probability of a page being deleted simultaniously with event creation. I suppose that was the reason for an NPE that we've encountered in logs, but I'm not sure. Bug: T128655 Change-Id: I1737de7ef1cb5478d9156b60f2f7daec3185c98c --- M EventBus.hooks.php M extension.json 2 files changed, 19 insertions(+), 11 deletions(-) Approvals: Mobrovac: Looks good to me, approved jenkins-bot: Verified diff --git a/EventBus.hooks.php b/EventBus.hooks.php index 1cbe8ee..11e4578 100644 --- a/EventBus.hooks.php +++ b/EventBus.hooks.php @@ -84,7 +84,7 @@ // must have a minimum value of 1, so omit it entirely when there is no // parent revision (i.e. page creation). $parentId = $revision->getParentId(); - if ( !is_null( $parentId ) ) { + if ( !is_null( $parentId ) && $parentId !== 0 ) { $attrs['rev_parent_id'] = $parentId; } @@ -138,7 +138,9 @@ $attrs = array(); $attrs['title'] = $title->getText(); $attrs['new_page_id'] = $title->getArticleID(); - $attrs['old_page_id'] = $oldPageId; + if ( !is_null( $oldPageId ) && $oldPageId !== 0 ) { + $attrs['old_page_id'] = $oldPageId; + } $attrs['namespace'] = $title->getNamespace(); $attrs['summary'] = $comment; @@ -195,14 +197,18 @@ * @param array $revIds array of integer revision IDs */ public static function onArticleRevisionVisibilitySet( $title, $revIds ) { - DeferredUpdates::addCallableUpdate( function() use ( $revIds ) { - $user = RequestContext::getMain()->getUser(); - $userId = $user->getId(); - $userText = $user->getName(); + $user = RequestContext::getMain()->getUser(); + $userId = $user->getId(); + $userText = $user->getName(); - $events = array(); - foreach ( $revIds as $revId ) { - $revision = Revision::newFromId( $revId ); + $events = array(); + foreach ( $revIds as $revId ) { + $revision = Revision::newFromId( $revId ); + + // If the page gets deleted simultaneously with this code + // we can't access the revision any more, so can't send a + // meaningful event. + if ( !is_null( $revision ) ) { $attrs = array( 'revision_id' => (int)$revId, 'hidden' => array( @@ -215,9 +221,11 @@ 'user_text' => $userText ); $events[] = self::createEvent( '/visibility_set/uri', - 'mediawiki.revision_visibility_set', $attrs ); + 'mediawiki.revision_visibility_set', $attrs ); } + } + DeferredUpdates::addCallableUpdate( function() use ( $events ) { EventBus::getInstance()->send( $events ); } ); } diff --git a/extension.json b/extension.json index 26380db..48fa07e 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "EventBus", - "version": "0.2.0", + "version": "0.2.1", "author": [ "Eric Evans" ], -- To view, visit https://gerrit.wikimedia.org/r/274570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1737de7ef1cb5478d9156b60f2f7daec3185c98c Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/EventBus Gerrit-Branch: master Gerrit-Owner: PpchelkoGerrit-Reviewer: Eevans Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Ottomata Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Try and avoid race conditions with thank-you-edit notifications - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Try and avoid race conditions with thank-you-edit notifications .. Try and avoid race conditions with thank-you-edit notifications Wait until after the main transaction has been committed before checking whether they have the right number of edits. Bug: T128249 Change-Id: I38cc0f96e97fda3692340cc8906144a002594ef2 --- M Hooks.php 1 file changed, 16 insertions(+), 9 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 0b67aa1..b326795 100644 --- a/Hooks.php +++ b/Hooks.php @@ -461,15 +461,22 @@ // This edit hasn't been added to the edit count yet $editCount = $user->getEditCount() + 1; if ( in_array( $editCount, $thresholds ) ) { - LoggerFactory::getInstance( 'Echo' )->debug( - 'Thanking {user} (id: {id}) for their {count} edit', - array( - 'user' => $user->getName(), - 'id' => $user->getId(), - 'count' => $editCount, - ) - ); - DeferredUpdates::addCallableUpdate( function () use ( $user, $title, $editCount ) { + $id = $user->getId(); + DeferredUpdates::addCallableUpdate( function () use ( $id, $title, $editCount ) { + // Fresh User object + $user = User::newFromId( $id ); + if ( $user->getEditCount() !== $editCount ) { + // Race condition with multiple simultaneous requests, skip + return; + } + LoggerFactory::getInstance( 'Echo' )->debug( + 'Thanking {user} (id: {id}) for their {count} edit', + array( + 'user' => $user->getName(), + 'id' => $user->getId(), + 'count' => $editCount, + ) + ); EchoEvent::create( array( 'type' => 'thank-you-edit', 'title' => $title, -- To view, visit https://gerrit.wikimedia.org/r/274904 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I38cc0f96e97fda3692340cc8906144a002594ef2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Try and avoid race conditions with thank-you-edit notifications - change (mediawiki...Echo)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/274908 Change subject: Try and avoid race conditions with thank-you-edit notifications .. Try and avoid race conditions with thank-you-edit notifications Wait until after the main transaction has been committed before checking whether they have the right number of edits. Bug: T128249 Change-Id: I38cc0f96e97fda3692340cc8906144a002594ef2 (cherry picked from commit 8d9949010813cf5f31ca6ba0c638ca25ed815bf2) --- M Hooks.php 1 file changed, 16 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/08/274908/1 diff --git a/Hooks.php b/Hooks.php index 0b67aa1..b326795 100644 --- a/Hooks.php +++ b/Hooks.php @@ -461,15 +461,22 @@ // This edit hasn't been added to the edit count yet $editCount = $user->getEditCount() + 1; if ( in_array( $editCount, $thresholds ) ) { - LoggerFactory::getInstance( 'Echo' )->debug( - 'Thanking {user} (id: {id}) for their {count} edit', - array( - 'user' => $user->getName(), - 'id' => $user->getId(), - 'count' => $editCount, - ) - ); - DeferredUpdates::addCallableUpdate( function () use ( $user, $title, $editCount ) { + $id = $user->getId(); + DeferredUpdates::addCallableUpdate( function () use ( $id, $title, $editCount ) { + // Fresh User object + $user = User::newFromId( $id ); + if ( $user->getEditCount() !== $editCount ) { + // Race condition with multiple simultaneous requests, skip + return; + } + LoggerFactory::getInstance( 'Echo' )->debug( + 'Thanking {user} (id: {id}) for their {count} edit', + array( + 'user' => $user->getName(), + 'id' => $user->getId(), + 'count' => $editCount, + ) + ); EchoEvent::create( array( 'type' => 'thank-you-edit', 'title' => $title, -- To view, visit https://gerrit.wikimedia.org/r/274908 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38cc0f96e97fda3692340cc8906144a002594ef2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: wmf/1.27.0-wmf.15 Gerrit-Owner: CatropeGerrit-Reviewer: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove deprecated profiling calls - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Remove deprecated profiling calls .. Remove deprecated profiling calls Change-Id: If4f863a2fd041937a68772a84eb8750599f61d2b --- M api/ApiQueryMessageGroups.php M webservices/MicrosoftWebService.php 2 files changed, 0 insertions(+), 16 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php index 6ef2dca..583798f 100644 --- a/api/ApiQueryMessageGroups.php +++ b/api/ApiQueryMessageGroups.php @@ -121,13 +121,10 @@ $subgroups = $mixed; } - wfProfileIn( __METHOD__ . '-' . get_class( $g ) ); - $a = array(); $groupId = $g->getId(); - wfProfileIn( __METHOD__ . '-basic' ); if ( isset( $props['id'] ) ) { $a['id'] = $groupId; } @@ -147,24 +144,18 @@ if ( isset( $props['namespace'] ) ) { $a['namespace'] = $g->getNamespace(); } - wfProfileOut( __METHOD__ . '-basic' ); - wfProfileIn( __METHOD__ . '-exists' ); if ( isset( $props['exists'] ) ) { $a['exists'] = $g->exists(); } - wfProfileOut( __METHOD__ . '-exists' ); - wfProfileIn( __METHOD__ . '-icon' ); if ( isset( $props['icon'] ) ) { $formats = TranslateUtils::getIcon( $g, $params['iconsize'] ); if ( $formats ) { $a['icon'] = $formats; } } - wfProfileOut( __METHOD__ . '-icon' ); - wfProfileIn( __METHOD__ . '-priority' ); if ( isset( $props['priority'] ) ) { $priority = MessageGroups::getPriority( $g ); $a['priority'] = $priority ?: 'default'; @@ -178,20 +169,15 @@ if ( isset( $props['priorityforce'] ) ) { $a['priorityforce'] = ( TranslateMetadata::get( $groupId, 'priorityforce' ) === 'on' ); } - wfProfileOut( __METHOD__ . '-priority' ); - wfProfileIn( __METHOD__ . '-workflowstates' ); if ( isset( $props['workflowstates'] ) ) { $a['workflowstates'] = $this->getWorkflowStates( $g ); } - wfProfileOut( __METHOD__ . '-workflowstates' ); Hooks::run( 'TranslateProcessAPIMessageGroupsProperties', array( &$a, $props, $params, $g ) ); - - wfProfileOut( __METHOD__ . '-' . get_class( $g ) ); // Depth only applies to tree format if ( $depth >= $params['depth'] && $params['format'] === 'tree' ) { diff --git a/webservices/MicrosoftWebService.php b/webservices/MicrosoftWebService.php index f3b464f..22488b0 100644 --- a/webservices/MicrosoftWebService.php +++ b/webservices/MicrosoftWebService.php @@ -44,9 +44,7 @@ $url .= wfArrayToCgi( $params ); $req = MWHttpRequest::factory( $url, $options ); - wfProfileIn( 'TranslateWebServiceRequest-' . $this->service . '-pairs' ); $status = $req->execute(); - wfProfileOut( 'TranslateWebServiceRequest-' . $this->service . '-pairs' ); if ( !$status->isOK() ) { $error = $req->getContent(); -- To view, visit https://gerrit.wikimedia.org/r/274867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4f863a2fd041937a68772a84eb8750599f61d2b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: SiebrandGerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ditch support for original wikidiff - change (mediawiki/core)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/274907 Change subject: Ditch support for original wikidiff .. Ditch support for original wikidiff It's been unmaintained for a while and does not support various languages adequately. Also, document $wgExternalDiffEngine. Change-Id: Ia8aeffd79d550fb7a1a7121456940446eea8bd4f --- M includes/DefaultSettings.php M includes/diff/DifferenceEngine.php 2 files changed, 5 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/274907/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index e7c8651..3257e39 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -7744,7 +7744,11 @@ */ /** - * Name of the external diff engine to use + * Name of the external diff engine to use. Supported values: + * * false: default PHP implementation, DairikiDiff + * * 'wikidiff2': Wikimedia's fast difference engine implemented as a PHP/HHVM module; + * * 'wikidiff3': for newer PHP-based difference engine + * * any other string is treated as a path to external diff executable */ $wgExternalDiffEngine = false; diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 99eefc0..a32e7c0 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -847,16 +847,6 @@ $otext = str_replace( "\r\n", "\n", $otext ); $ntext = str_replace( "\r\n", "\n", $ntext ); - if ( $wgExternalDiffEngine == 'wikidiff' && function_exists( 'wikidiff_do_diff' ) ) { - # For historical reasons, external diff engine expects - # input text to be HTML-escaped already - $otext = htmlspecialchars( $wgContLang->segmentForDiff( $otext ) ); - $ntext = htmlspecialchars( $wgContLang->segmentForDiff( $ntext ) ); - - return $wgContLang->unsegmentForDiff( wikidiff_do_diff( $otext, $ntext, 2 ) ) . - $this->debug( 'wikidiff1' ); - } - if ( $wgExternalDiffEngine == 'wikidiff2' && function_exists( 'wikidiff2_do_diff' ) ) { # Better external diff engine, the 2 may some day be dropped # This one does the escaping and segmenting itself -- To view, visit https://gerrit.wikimedia.org/r/274907 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia8aeffd79d550fb7a1a7121456940446eea8bd4f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix incorrect variable name - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Fix incorrect variable name .. Fix incorrect variable name Change-Id: I36aa573f70c007eb815601be4be56f0ffeb6c7a2 --- M ttmserver/SolrTTMServer.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/ttmserver/SolrTTMServer.php b/ttmserver/SolrTTMServer.php index 34e6da8..db5f192 100644 --- a/ttmserver/SolrTTMServer.php +++ b/ttmserver/SolrTTMServer.php @@ -290,7 +290,7 @@ foreach ( $batch as $key => $data ) { list( $handle, $sourceLanguage, $text ) = $data; $revId = $handle->getTitleForLanguage( $sourceLanguage )->getLatestRevID(); - $doc = $this->createDocument( $handle, $text, $id ); + $doc = $this->createDocument( $handle, $text, $revId ); // Add document and commit within X seconds. $update->addDocument( $doc, null, self::COMMIT_WITHIN ); } -- To view, visit https://gerrit.wikimedia.org/r/274866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36aa573f70c007eb815601be4be56f0ffeb6c7a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: SiebrandGerrit-Reviewer: Nikerabbit 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 private method - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused private method .. Remove unused private method Change-Id: I73c21207f5cd184a67c72117d5640eb0e71e4d02 --- M specials/SpecialTranslations.php 1 file changed, 0 insertions(+), 12 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialTranslations.php b/specials/SpecialTranslations.php index 80a7938..01bb95b 100644 --- a/specials/SpecialTranslations.php +++ b/specials/SpecialTranslations.php @@ -285,18 +285,6 @@ } /** -* Get code for a page name -* -* @param string $name Page title (f.e. "MediaWiki:Main_page/nl"). -* @return string Language code -*/ - private function getCode( $name ) { - $from = strrpos( $name, '/' ); - - return substr( $name, $from + 1 ); - } - - /** * Add JavaScript assets */ private function includeAssets() { -- To view, visit https://gerrit.wikimedia.org/r/274865 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I73c21207f5cd184a67c72117d5640eb0e71e4d02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: SiebrandGerrit-Reviewer: Nikerabbit 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 static method invocation via $this - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Fix static method invocation via $this .. Fix static method invocation via $this Change-Id: I4a4799095b07495a8be5645098e6591408151f6f --- M ffs/GettextFFS.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/ffs/GettextFFS.php b/ffs/GettextFFS.php index 4fc91a9..35cbe0b 100644 --- a/ffs/GettextFFS.php +++ b/ffs/GettextFFS.php @@ -506,13 +506,13 @@ if ( preg_match( '/{{PLURAL:GETTEXT/i', $msgid ) ) { $forms = $this->splitPlural( $msgid, 2 ); - $content .= 'msgid ' . $this->escape( $forms[0] ) . "\n"; - $content .= 'msgid_plural ' . $this->escape( $forms[1] ) . "\n"; + $content .= 'msgid ' . self::escape( $forms[0] ) . "\n"; + $content .= 'msgid_plural ' . self::escape( $forms[1] ) . "\n"; try { $forms = $this->splitPlural( $msgstr, $pluralCount ); foreach ( $forms as $index => $form ) { - $content .= "msgstr[$index] " . $this->escape( $form ) . "\n"; + $content .= "msgstr[$index] " . self::escape( $form ) . "\n"; } } catch ( GettextPluralException $e ) { $flags[] = 'invalid-plural'; -- To view, visit https://gerrit.wikimedia.org/r/274862 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a4799095b07495a8be5645098e6591408151f6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: SiebrandGerrit-Reviewer: Nikerabbit 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 superfluous newlines - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Remove superfluous newlines .. Remove superfluous newlines Change-Id: Ib0a148917ec8a74f2f38a2623cf7f03c8d1bbce2 --- M MessageGroups.php M Resources.php M Translate.php M stash/TranslationStashStorage.php M utils/ArrayFlattener.php M utils/MessageIndex.php M utils/TranslationHelpers.php 7 files changed, 0 insertions(+), 9 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/MessageGroups.php b/MessageGroups.php index 5595438..dfb90c3 100644 --- a/MessageGroups.php +++ b/MessageGroups.php @@ -67,7 +67,6 @@ $this->groups = $groups; } - /** * Immediately update the cache. * @@ -292,7 +291,6 @@ public static function exists( $id ) { return (bool)self::getGroup( $id ); } - /** * Check if a particular aggregate group label exists diff --git a/Resources.php b/Resources.php index d84367f..8fbbc4e 100644 --- a/Resources.php +++ b/Resources.php @@ -512,7 +512,6 @@ 'scripts' => 'resources/js/ext.translate.storage.js', ) + $resourcePaths; - $wgResourceModules['ext.translate.tabgroup'] = array( 'styles' => 'resources/css/ext.translate.tabgroup.css', 'position' => 'top', diff --git a/Translate.php b/Translate.php index 52355cb..ea07e09 100644 --- a/Translate.php +++ b/Translate.php @@ -167,7 +167,6 @@ $wgHooks['TranslatePostInitGroups'][] = 'MessageGroups::getWorkflowGroups'; $wgHooks['TranslatePostInitGroups'][] = 'MessageGroups::getAggregateGroups'; - // Other extensions $wgHooks['AdminLinks'][] = 'TranslateHooks::onAdminLinks'; $wgHooks['MergeAccountFromTo'][] = 'TranslateHooks::onMergeAccountFromTo'; @@ -203,7 +202,6 @@ require "$dir/Resources.php"; /** @endcond */ - # == Configuration variables == diff --git a/stash/TranslationStashStorage.php b/stash/TranslationStashStorage.php index 501beb6..f8bda4e 100644 --- a/stash/TranslationStashStorage.php +++ b/stash/TranslationStashStorage.php @@ -40,7 +40,6 @@ $this->db->replace( $this->dbTable, $indexes, $row, __METHOD__ ); } - /** * Gets all stashed translations for the given user. * @param User $user diff --git a/utils/ArrayFlattener.php b/utils/ArrayFlattener.php index 6eba2c4..8845ef1 100644 --- a/utils/ArrayFlattener.php +++ b/utils/ArrayFlattener.php @@ -46,7 +46,6 @@ return $flat; } - /** * Performs the reverse operation of flatten. * diff --git a/utils/MessageIndex.php b/utils/MessageIndex.php index 6d63fb4..fe89d0f 100644 --- a/utils/MessageIndex.php +++ b/utils/MessageIndex.php @@ -622,7 +622,6 @@ } } - /** * Storage on hash. * diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php index 57772cd..83d5750 100644 --- a/utils/TranslationHelpers.php +++ b/utils/TranslationHelpers.php @@ -613,7 +613,6 @@ return Html::element( 'pre', array( 'id' => $id, 'style' => 'display: none;' ), $text ); } - /** * Ajax-enabled message editing link. * @param $target Title: Title of the target message. -- To view, visit https://gerrit.wikimedia.org/r/274860 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0a148917ec8a74f2f38a2623cf7f03c8d1bbce2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: SiebrandGerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ferm rule: allow deployment hosts to connect to iridium ssh ... - change (operations/puppet)
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/274905 Change subject: Ferm rule: allow deployment hosts to connect to iridium ssh (for scap) .. Ferm rule: allow deployment hosts to connect to iridium ssh (for scap) Bug: T114363 Change-Id: I2a590b813631ccb0cbc97736356de49a4d3c01b3 --- M modules/role/manifests/phabricator/main.pp 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/05/274905/1 diff --git a/modules/role/manifests/phabricator/main.pp b/modules/role/manifests/phabricator/main.pp index 0d383ce..06bc015 100644 --- a/modules/role/manifests/phabricator/main.pp +++ b/modules/role/manifests/phabricator/main.pp @@ -161,6 +161,11 @@ rule => 'saddr (0.0.0.0/0 ::/0) daddr (10.64.32.186/32 208.80.154.250/32 2620:0:861:103:10:64:32:186/128 2620:0:861:ed1a::3:16/128) proto tcp dport (22) ACCEPT;', } +# Allow SSH from deployment hosts +ferm::rule { 'deployment-ssh': +rule => 'proto tcp dport ssh saddr $DEPLOYMENT_HOSTS ACCEPT;', +} + # redirect bugzilla URL patterns to phabricator # handles translation of bug numbers to maniphest task ids phabricator::redirector { "redirector.${domain}": -- To view, visit https://gerrit.wikimedia.org/r/274905 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a590b813631ccb0cbc97736356de49a4d3c01b3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 20after4___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move phabricator/extensions to libext fixes T128797 - change (operations/puppet)
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/274906 Change subject: Move phabricator/extensions to libext fixes T128797 .. Move phabricator/extensions to libext fixes T128797 This puppetizes a hotfix I applied on iridium to fix T128751 Bug: T128797 Change-Id: Ic3901af340324c5024c43b7d2b26a0ce1ab34e80 --- M modules/phabricator/manifests/extension.pp M modules/role/manifests/phabricator/labs.pp M modules/role/manifests/phabricator/main.pp 3 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/06/274906/1 diff --git a/modules/phabricator/manifests/extension.pp b/modules/phabricator/manifests/extension.pp index 2b143b7..f8ef46f 100644 --- a/modules/phabricator/manifests/extension.pp +++ b/modules/phabricator/manifests/extension.pp @@ -4,11 +4,11 @@ # # [*rootdir*] #Phabricator repo directory - +# +# Obsolete: Put extensions in phutil libraries under libext/ instead! +# define phabricator::extension($rootdir='/') { file { "${rootdir}/phabricator/src/extensions/${name}": -ensure => 'link', -target => "${rootdir}/extensions/${name}", -require => File[$rootdir], +ensure => 'absent', } } diff --git a/modules/role/manifests/phabricator/labs.pp b/modules/role/manifests/phabricator/labs.pp index b27fd0d..94b44e2 100644 --- a/modules/role/manifests/phabricator/labs.pp +++ b/modules/role/manifests/phabricator/labs.pp @@ -9,7 +9,8 @@ deploy_target => 'phabricator/deployment', phabdir => $phab_root_dir, libraries => ["${phab_root_dir}/libext/Sprint/src", - "${phab_root_dir}/libext/security/src"], + "${phab_root_dir}/libext/security/src", + "${phab_root_dir}/libext/misc" ], extensions=> [ 'MediaWikiUserpageCustomField.php', 'LDAPUserpageCustomField.php', 'PhabricatorMediaWikiAuthProvider.php', diff --git a/modules/role/manifests/phabricator/main.pp b/modules/role/manifests/phabricator/main.pp index 06bc015..52d1c90 100644 --- a/modules/role/manifests/phabricator/main.pp +++ b/modules/role/manifests/phabricator/main.pp @@ -34,7 +34,8 @@ mysql_admin_user => $role::phabricator::config::mysql_adminuser, mysql_admin_pass => $role::phabricator::config::mysql_adminpass, libraries=> [ "${phab_root_dir}/libext/Sprint/src", - "${phab_root_dir}/libext/security/src" ], + "${phab_root_dir}/libext/security/src", + "${phab_root_dir}/libext/misc" ], extensions => [ 'MediaWikiUserpageCustomField.php', 'LDAPUserpageCustomField.php', 'PhabricatorMediaWikiAuthProvider.php', -- To view, visit https://gerrit.wikimedia.org/r/274906 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic3901af340324c5024c43b7d2b26a0ce1ab34e80 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 20after4___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] gerrit: Whitelist PNG as safe to render in change sets - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: gerrit: Whitelist PNG as safe to render in change sets .. gerrit: Whitelist PNG as safe to render in change sets Follows-up 8a58937aa. Per T72892, png should be safe too. At the moment Phabricator Differential nor Difussion render binary files at all (only when browsing a repo branch, not when viewing merged or unmerged commits). https://phabricator.wikimedia.org/rMW556b6. Change-Id: Ic27d4e97ce37adb4ba82934580230a9f4d843ce1 --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: CSteipp: Looks good to me, but someone else must approve Chad: Looks good to me, but someone else must approve 20after4: Looks good to me, but someone else must approve JanZerebecki: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index 3acfe34..617155d 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -116,6 +116,8 @@ safe = true [mimetype "image/tiff"] safe = true +[mimetype "image/png"] +safe = true [mimetype "image/x-icon"] safe = true [mimetype "text/css"] -- To view, visit https://gerrit.wikimedia.org/r/274741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic27d4e97ce37adb4ba82934580230a9f4d843ce1 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KrinkleGerrit-Reviewer: 20after4 Gerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: CSteipp Gerrit-Reviewer: Chad Gerrit-Reviewer: Dzahn Gerrit-Reviewer: JanZerebecki 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] Set "array_plus_2d" merge strategy for "SiteMatrixSites" con... - change (mediawiki...SiteMatrix)
jenkins-bot has submitted this change and it was merged. Change subject: Set "array_plus_2d" merge strategy for "SiteMatrixSites" config option .. Set "array_plus_2d" merge strategy for "SiteMatrixSites" config option This allows overriding sub-elements of individual sites, otherwise that override becomes the only element in the site. Change-Id: I8ddcfb0ba3ce238824e322aa5b7bd981bd8493a1 --- M extension.json 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 70918eb..216d7b0 100644 --- a/extension.json +++ b/extension.json @@ -76,7 +76,8 @@ "name": "Wikivoyage", "host": "www.wikivoyage.org", "prefix": "voy" - } + }, + "_merge_strategy": "array_plus_2d" }, "SiteMatrixPrivateSites": null, "SiteMatrixFishbowlSites": null, -- To view, visit https://gerrit.wikimedia.org/r/274902 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8ddcfb0ba3ce238824e322aa5b7bd981bd8493a1 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/SiteMatrix Gerrit-Branch: master Gerrit-Owner: MattflaschenGerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Try and avoid race conditions with thank-you-edit notifications - change (mediawiki...Echo)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/274904 Change subject: Try and avoid race conditions with thank-you-edit notifications .. Try and avoid race conditions with thank-you-edit notifications Wait until after the main transaction has been committed before checking whether they have the right number of edits. Bug: T128249 Change-Id: I38cc0f96e97fda3692340cc8906144a002594ef2 --- M Hooks.php 1 file changed, 16 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/04/274904/1 diff --git a/Hooks.php b/Hooks.php index 0b67aa1..b326795 100644 --- a/Hooks.php +++ b/Hooks.php @@ -461,15 +461,22 @@ // This edit hasn't been added to the edit count yet $editCount = $user->getEditCount() + 1; if ( in_array( $editCount, $thresholds ) ) { - LoggerFactory::getInstance( 'Echo' )->debug( - 'Thanking {user} (id: {id}) for their {count} edit', - array( - 'user' => $user->getName(), - 'id' => $user->getId(), - 'count' => $editCount, - ) - ); - DeferredUpdates::addCallableUpdate( function () use ( $user, $title, $editCount ) { + $id = $user->getId(); + DeferredUpdates::addCallableUpdate( function () use ( $id, $title, $editCount ) { + // Fresh User object + $user = User::newFromId( $id ); + if ( $user->getEditCount() !== $editCount ) { + // Race condition with multiple simultaneous requests, skip + return; + } + LoggerFactory::getInstance( 'Echo' )->debug( + 'Thanking {user} (id: {id}) for their {count} edit', + array( + 'user' => $user->getName(), + 'id' => $user->getId(), + 'count' => $editCount, + ) + ); EchoEvent::create( array( 'type' => 'thank-you-edit', 'title' => $title, -- To view, visit https://gerrit.wikimedia.org/r/274904 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38cc0f96e97fda3692340cc8906144a002594ef2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add name to SiteMatrix - change (mediawiki/vagrant)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/274903 Change subject: Add name to SiteMatrix .. Add name to SiteMatrix This was triggering an error (due to wiping out the default SiteMatrix name). This is fixed in another way in I8ddcfb0ba3ce238824e322aa5b7bd981bd8493a1 (so it correctly uses the default name if not overriden). But it ought to use the right name here anyway. Change-Id: Ib50839b58fca9547a9f4e37b0464028087a8f0bf --- M puppet/hieradata/common.yaml M puppet/modules/role/manifests/sitematrix.pp 2 files changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/03/274903/1 diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 36867f5..6e0aff9 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -295,6 +295,9 @@ CACHE_DIR: /var/cache/sal SLIM_MODE: development +role::sitematrix::wiki_name: "%{hiera('mediawiki::wiki_name')}" +role::sitematrix::host: "www%{hiera('mediawiki::multiwiki::base_domain')}%{::port_fragment}" + role::oauth::dir: "%{hiera('mwv::services_dir')}/oauth-hello-world" role::oauth::secret_key: 292ed299345a01c1c0520b60f628c01ea817a0b3372b89dbb7637a2f678d018a role::oauth::example_consumer_key: 81cf4c1f885de4ed6b475c05c408c9b4 diff --git a/puppet/modules/role/manifests/sitematrix.pp b/puppet/modules/role/manifests/sitematrix.pp index 8cb39dc..64a0b54 100644 --- a/puppet/modules/role/manifests/sitematrix.pp +++ b/puppet/modules/role/manifests/sitematrix.pp @@ -1,8 +1,18 @@ # == Class: role::sitematrix # The sitematrix extension adds a special page with a matrix of all sites -class role::sitematrix { +# +# [*wiki_name*] +# Friendly name of wiki +# +# [*host*] +# Host with port but without protocol +class role::sitematrix( +$wiki_name, +$host, +) { mediawiki::extension { 'SiteMatrix': # TODO: DB postfixes other than 'wiki' aren't supported elsewhere -settings => "\$wgSiteMatrixSites['wiki']['host'] = 'www${mediawiki::multiwiki::base_domain}${::port_fragment}';", +# extension.json loads later, so it still uses the prefix from there. +settings => "\$wgSiteMatrixSites['wiki'] = [ 'name' => '${wiki_name}', 'host' => '${host}' ];", } } -- To view, visit https://gerrit.wikimedia.org/r/274903 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib50839b58fca9547a9f4e37b0464028087a8f0bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Mattflaschen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] array_plus_2d to allow overriding sub-fields of individual s... - change (mediawiki...SiteMatrix)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/274902 Change subject: array_plus_2d to allow overriding sub-fields of individual sites .. array_plus_2d to allow overriding sub-fields of individual sites Otherwise, that override becomes the only item in the site. Change-Id: I8ddcfb0ba3ce238824e322aa5b7bd981bd8493a1 --- M extension.json 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SiteMatrix refs/changes/02/274902/1 diff --git a/extension.json b/extension.json index 70918eb..216d7b0 100644 --- a/extension.json +++ b/extension.json @@ -76,7 +76,8 @@ "name": "Wikivoyage", "host": "www.wikivoyage.org", "prefix": "voy" - } + }, + "_merge_strategy": "array_plus_2d" }, "SiteMatrixPrivateSites": null, "SiteMatrixFishbowlSites": null, -- To view, visit https://gerrit.wikimedia.org/r/274902 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ddcfb0ba3ce238824e322aa5b7bd981bd8493a1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SiteMatrix Gerrit-Branch: master Gerrit-Owner: Mattflaschen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unused local variable - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274901 Change subject: Remove unused local variable .. Remove unused local variable Change-Id: If092ec9275d43b6e81c7f1a14a96c78f166c7713 --- M ttmserver/ElasticSearchTTMServer.php M webservices/MicrosoftWebService.php 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/01/274901/1 diff --git a/ttmserver/ElasticSearchTTMServer.php b/ttmserver/ElasticSearchTTMServer.php index f4006c0..10a3989 100644 --- a/ttmserver/ElasticSearchTTMServer.php +++ b/ttmserver/ElasticSearchTTMServer.php @@ -229,7 +229,6 @@ * These only apply to known messages. */ - $title = $handle->getTitle(); $sourceLanguage = $handle->getGroup()->getSourceLanguage(); // Do not delete definitions, because the translations are attached to that diff --git a/webservices/MicrosoftWebService.php b/webservices/MicrosoftWebService.php index f0d20fd..6e8a067 100644 --- a/webservices/MicrosoftWebService.php +++ b/webservices/MicrosoftWebService.php @@ -89,7 +89,6 @@ 'appId' => $this->config['key'], ); - $url = 'http://api.microsofttranslator.com/V2/Http.svc/Translate?'; return TranslationQuery::factory( $this->config['url'] ) ->timeout( $this->config['timeout'] ) ->queryParamaters( $params ); -- To view, visit https://gerrit.wikimedia.org/r/274901 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If092ec9275d43b6e81c7f1a14a96c78f166c7713 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix incorrect variable name - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274900 Change subject: Fix incorrect variable name .. Fix incorrect variable name Was introduced in I071b806a08d78e01bfe05bccfcbdb5e5d73220f4. Bug: T54728 Change-Id: I68517e29fb81851bdd69fae8221409c4b4e3cc12 --- M specials/SpecialSupportedLanguages.php M ttmserver/ElasticSearchTTMServer.php M webservices/MicrosoftWebService.php 3 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/00/274900/1 diff --git a/specials/SpecialSupportedLanguages.php b/specials/SpecialSupportedLanguages.php index cdf6685..0455c1c 100644 --- a/specials/SpecialSupportedLanguages.php +++ b/specials/SpecialSupportedLanguages.php @@ -293,7 +293,7 @@ $out = $this->getOutput(); $out->addHTML( '' ); - $langs = $this->shuffle_assoc( $languages ); + $languages = $this->shuffle_assoc( $languages ); foreach ( $languages as $k => $v ) { $name = $names[$k]; $size = round( log( $v ) * 20 ) + 10; diff --git a/ttmserver/ElasticSearchTTMServer.php b/ttmserver/ElasticSearchTTMServer.php index f4006c0..10a3989 100644 --- a/ttmserver/ElasticSearchTTMServer.php +++ b/ttmserver/ElasticSearchTTMServer.php @@ -229,7 +229,6 @@ * These only apply to known messages. */ - $title = $handle->getTitle(); $sourceLanguage = $handle->getGroup()->getSourceLanguage(); // Do not delete definitions, because the translations are attached to that diff --git a/webservices/MicrosoftWebService.php b/webservices/MicrosoftWebService.php index f0d20fd..6e8a067 100644 --- a/webservices/MicrosoftWebService.php +++ b/webservices/MicrosoftWebService.php @@ -89,7 +89,6 @@ 'appId' => $this->config['key'], ); - $url = 'http://api.microsofttranslator.com/V2/Http.svc/Translate?'; return TranslationQuery::factory( $this->config['url'] ) ->timeout( $this->config['timeout'] ) ->queryParamaters( $params ); -- To view, visit https://gerrit.wikimedia.org/r/274900 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68517e29fb81851bdd69fae8221409c4b4e3cc12 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add documentation - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274899 Change subject: Add documentation .. Add documentation Change-Id: I083585c1c819858c3522c1f7cc582e2cf903ea24 --- M MessageGroups.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/99/274899/1 diff --git a/MessageGroups.php b/MessageGroups.php index 4841bbb..74da5b1 100644 --- a/MessageGroups.php +++ b/MessageGroups.php @@ -606,6 +606,7 @@ * other code might not handle more than two (or even one) nesting levels. * One group can exist multiple times in differents parts of the tree. * In other words: [Group1, Group2, [AggGroup, Group3, Group4]] +* * @throws MWException If cyclic structure is detected. * @return array */ @@ -673,6 +674,7 @@ /// See getGroupStructure, just collects ids into array public static function collectGroupIds( $value, $key, $used ) { + /** @var MessageGroup $value */ $used[0][$value->getId()] = true; } -- To view, visit https://gerrit.wikimedia.org/r/274899 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I083585c1c819858c3522c1f7cc582e2cf903ea24 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use assertCount instead of assertEquals - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274898 Change subject: Use assertCount instead of assertEquals .. Use assertCount instead of assertEquals Change-Id: I89a648157440b65708cc720d2ea86f1979509d49 --- M tests/phpunit/BlackListTest.php M tests/phpunit/MediaWikiExtensionTest.php 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/98/274898/1 diff --git a/tests/phpunit/BlackListTest.php b/tests/phpunit/BlackListTest.php index 19806b3..2916600 100644 --- a/tests/phpunit/BlackListTest.php +++ b/tests/phpunit/BlackListTest.php @@ -54,7 +54,7 @@ ); $group = MessageGroupBase::factory( $conf ); $translatableLanguages = $group->getTranslatableLanguages(); - $this->assertEquals( count( $translatableLanguages ), 0 ); + $this->assertCount( count( $translatableLanguages ), 0 ); } public function testAllWhiteList() { diff --git a/tests/phpunit/MediaWikiExtensionTest.php b/tests/phpunit/MediaWikiExtensionTest.php index b94167b..4cef364 100644 --- a/tests/phpunit/MediaWikiExtensionTest.php +++ b/tests/phpunit/MediaWikiExtensionTest.php @@ -18,8 +18,8 @@ $list = $deps = $autoload = array(); $foo->register( $list, $deps, $autoload ); - $this->assertEquals( 1, count( $deps ), 'A dependency to definition file was added' ); - $this->assertEquals( 4, count( $list ), 'Four groups were created' ); + $this->assertCount( 1, count( $deps ), 'A dependency to definition file was added' ); + $this->assertCount( 4, count( $list ), 'Four groups were created' ); $this->assertArrayHasKey( 'ext-exampleextension', $list ); $expected = TranslateYaml::load( __DIR__ . '/data/MediaWikiExtensionTest-conf1.yaml' ); -- To view, visit https://gerrit.wikimedia.org/r/274898 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89a648157440b65708cc720d2ea86f1979509d49 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix check - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274897 Change subject: Fix check .. Fix check Was incorrectly added in Ib2c7626ad43916912a98ff857874dc699473d03d Bug: T59541 Change-Id: Ie6e428f3c8e52b35b36255681a6283fbb7b80981 --- M tag/PageTranslationHooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/97/274897/1 diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php index 95ddada..937c8bf 100644 --- a/tag/PageTranslationHooks.php +++ b/tag/PageTranslationHooks.php @@ -964,7 +964,7 @@ $language = $handle->getCode(); // Ignore pages such as Translations:Page/unit without language code - if ( (string)$code === '' ) { + if ( (string)$language === '' ) { continue; } -- To view, visit https://gerrit.wikimedia.org/r/274897 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6e428f3c8e52b35b36255681a6283fbb7b80981 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace type casting via PHP4 functions - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274896 Change subject: Replace type casting via PHP4 functions .. Replace type casting via PHP4 functions Change-Id: I7ea529cef6a51ae52d20b9b824a9e5cd72ec60a0 --- M MessageCollection.php M MessageGroups.php M TranslateUtils.php M api/ApiQueryTranslationAids.php M api/ApiTranslateUser.php M messagegroups/MediaWikiExtensionMessageGroup.php M scripts/characterEditStats.php M scripts/groupStatistics.php M specials/SpecialTranslationStats.php M tag/PageTranslationHooks.php M tag/SpecialPageTranslation.php M tag/TPParse.php M tag/TranslatablePage.php M tag/TranslateMoveJob.php M ttmserver/SolrTTMServer.php M utils/MessageGroupCache.php M utils/MessageGroupStats.php M utils/MessageHandle.php M utils/MessageWebImporter.php M utils/TranslationHelpers.php M webservices/ApertiumWebService.php M webservices/CxserverWebService.php M webservices/MicrosoftWebService.php M webservices/YandexWebService.php 24 files changed, 44 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/96/274896/1 diff --git a/MessageCollection.php b/MessageCollection.php index 8752f18..4054e23 100644 --- a/MessageCollection.php +++ b/MessageCollection.php @@ -279,7 +279,7 @@ } // Handle string offsets - if ( !ctype_digit( strval( $offset ) ) ) { + if ( !ctype_digit( (string)$offset ) ) { $count = 0; foreach ( array_keys( $this->keys ) as $index ) { if ( $index === $offset ) { @@ -302,7 +302,7 @@ // max(). And finally make the offsets to be strings even if // they are numbers in this case. if ( $offset > 0 ) { - $backwardsOffset = strval( max( 0, $offset - $limit ) ); + $backwardsOffset = (string)( max( 0, $offset - $limit ) ); } // Forwards paging uses keys. If user opens view Untranslated, @@ -556,9 +556,9 @@ /* This removes messages from the list which have certain * reviewer (among others) */ - $userId = intval( $user ); + $userId = (int)$user; foreach ( $this->dbReviewData as $row ) { - if ( $user === null || intval( $row->trr_user ) === $userId ) { + if ( $user === null || (int)$row->trr_user === $userId ) { unset( $keys[$this->rowToKey( $row )] ); } } @@ -581,9 +581,9 @@ $this->loadData( $keys ); $origKeys = $keys; - $user = intval( $user ); + $user = (int)$user; foreach ( $this->dbData as $row ) { - if ( intval( $row->rev_user ) === $user ) { + if ( (int)$row->rev_user === $user ) { unset( $keys[$this->rowToKey( $row )] ); } } diff --git a/MessageGroups.php b/MessageGroups.php index 23671e9..4841bbb 100644 --- a/MessageGroups.php +++ b/MessageGroups.php @@ -253,7 +253,7 @@ return $groups[$id]; } - if ( strval( $id ) !== '' && $id[0] === '!' ) { + if ( (string)$id !== '' && $id[0] === '!' ) { $dynamic = self::getDynamicGroups(); if ( isset( $dynamic[$id] ) ) { return new $dynamic[$id]; @@ -385,7 +385,7 @@ public static function isDynamic( MessageGroup $group ) { $id = $group->getId(); - return strval( $id ) !== '' && $id[0] === '!'; + return (string)$id !== '' && $id[0] === '!'; } /** diff --git a/TranslateUtils.php b/TranslateUtils.php index a6d5245..383a47b 100644 --- a/TranslateUtils.php +++ b/TranslateUtils.php @@ -112,7 +112,7 @@ $dbr = wfGetDB( DB_SLAVE ); $recentchanges = $dbr->tableName( 'recentchanges' ); - $hours = intval( $hours ); + $hours = (int)$hours; $cutoff_unixtime = time() - ( $hours * 3600 ); $cutoff = $dbr->timestamp( $cutoff_unixtime ); diff --git a/api/ApiQueryTranslationAids.php b/api/ApiQueryTranslationAids.php index 2a0075d..8fa06d1 100644 --- a/api/ApiQueryTranslationAids.php +++ b/api/ApiQueryTranslationAids.php @@ -29,7 +29,7 @@ ); } - if ( strval( $params['group'] ) !== '' ) { + if ( (string)$params['group'] !== '' ) { $group = MessageGroups::getGroup( $params['group'] ); } else { $group =
[MediaWiki-commits] [Gerrit] Make cheaper checks earlier - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274895 Change subject: Make cheaper checks earlier .. Make cheaper checks earlier Change-Id: Ia0195ab0728c5b9ff936e32fb05803c84d7f9afe --- M TranslateEditAddons.php M specials/SpecialMagic.php M specials/SpecialManageGroups.php M specials/SpecialSearchTranslations.php M specials/SpecialTranslationStash.php M tag/PageTranslationHooks.php M utils/MessageGroupStatesUpdaterJob.php 7 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/95/274895/1 diff --git a/TranslateEditAddons.php b/TranslateEditAddons.php index 8a3bc6d..a750dc0 100644 --- a/TranslateEditAddons.php +++ b/TranslateEditAddons.php @@ -25,7 +25,7 @@ $editpage->suppressIntro = true; $group = $handle->getGroup(); $languages = $group->getTranslatableLanguages(); - if ( $handle->getCode() && $languages !== null && !isset( $languages[$handle->getCode()] ) ) { + if ( $languages !== null && $handle->getCode() && !isset( $languages[$handle->getCode()] ) ) { $editpage->getArticle()->getContext()->getOutput()->wrapWikiMsg( "$1", 'translate-language-disabled' ); diff --git a/specials/SpecialMagic.php b/specials/SpecialMagic.php index 8012d89..c9e78ef 100644 --- a/specials/SpecialMagic.php +++ b/specials/SpecialMagic.php @@ -184,7 +184,7 @@ } $request = $this->getRequest(); - if ( $request->wasPosted() && $this->options['savetodb'] ) { + if ( $this->options['savetodb'] && $request->wasPosted() ) { if ( !$this->getUser()->isAllowed( 'translate' ) ) { throw new PermissionsError( 'translate' ); } diff --git a/specials/SpecialManageGroups.php b/specials/SpecialManageGroups.php index b2632e8..95d1464 100644 --- a/specials/SpecialManageGroups.php +++ b/specials/SpecialManageGroups.php @@ -198,7 +198,7 @@ $title = Title::makeTitleSafe( $group->getNamespace(), "$key/$code" ); $id = self::changeId( $group->getId(), $code, $type, $key ); - if ( $title && $title->exists() && $type === 'addition' ) { + if ( $title && $type === 'addition' && $title->exists() ) { // The message has for some reason dropped out from cache // or perhaps it is being reused. In any case treat it // as a change for display, so the admin can see if @@ -207,7 +207,7 @@ // forever and will prevent rebuilding the cache, which // leads to many other annoying problems. $type = 'change'; - } elseif ( $title && !$title->exists() && ( $type === 'deletion' || $type === 'change' ) ) { + } elseif ( $title && ( $type === 'deletion' || $type === 'change' ) && !$title->exists() ) { return ''; } diff --git a/specials/SpecialSearchTranslations.php b/specials/SpecialSearchTranslations.php index 3ff12e2..61d7c69 100644 --- a/specials/SpecialSearchTranslations.php +++ b/specials/SpecialSearchTranslations.php @@ -149,7 +149,7 @@ $handle = new MessageHandle( $title ); $code = $handle->getCode(); $language = $opts->getValue( 'language' ); - if ( $handle->isValid() && $code !== '' && $code !== $language ) { + if ( $code !== '' && $code !== $language && $handle->isValid() ) { $groupId = $handle->getGroup()->getId(); $helpers = new TranslationHelpers( $title, $groupId ); $document['wiki'] = wfWikiID(); diff --git a/specials/SpecialTranslationStash.php b/specials/SpecialTranslationStash.php index 57e1e9e..4c58905 100644 --- a/specials/SpecialTranslationStash.php +++ b/specials/SpecialTranslationStash.php @@ -37,7 +37,7 @@ $this->stash = new TranslationStashStorage( wfGetDB( DB_MASTER ) ); if ( !$this->hasPermissionToUse() ) { - if ( $this->getUser()->isLoggedIn() && $wgTranslateSecondaryPermissionUrl ) { + if ( $wgTranslateSecondaryPermissionUrl && $this->getUser()->isLoggedIn() ) { $out->redirect( Title::newFromText( $wgTranslateSecondaryPermissionUrl )->getLocalURL() ); diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php index
[MediaWiki-commits] [Gerrit] Update cxserver to 18d5da2 - change (mediawiki...deploy)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/274894 Change subject: Update cxserver to 18d5da2 .. Update cxserver to 18d5da2 Changes: * 18d5da2 Switch to Node 4.3 * 6d47346 Merge "Bump node dependency to >=4.3.0" |\ | * ef5f40c Bump node dependency to >=4.3.0 * | d4b0122 MT Client: Remove unused variable |/ * 31b060a Tweak docstring of MTClient.prototype.translate() * b53cad5 Merge "Add support for loading a given revision of page" |\ | * 10103ea Add support for loading a given revision of page Change-Id: I9f5007c8226f2a1024fb909002938e9cbb917191 --- M src 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver/deploy refs/changes/94/274894/1 diff --git a/src b/src index 4cbb572..18d5da2 16 --- a/src +++ b/src -Subproject commit 4cbb57285864ddd0a6a977444303952f40b9c03e +Subproject commit 18d5da229c13d833d17a43c8feee55d12fa49f21 -- To view, visit https://gerrit.wikimedia.org/r/274894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f5007c8226f2a1024fb909002938e9cbb917191 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver/deploy Gerrit-Branch: master Gerrit-Owner: KartikMistry___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove superfluous return statements - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274893 Change subject: Remove superfluous return statements .. Remove superfluous return statements Change-Id: Ibf8deabcbf3bdca68d1645a4603c571170f7236b --- M ffs/MediaWikiExtensionFFS.php M specials/SpecialLanguageStats.php 2 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/93/274893/1 diff --git a/ffs/MediaWikiExtensionFFS.php b/ffs/MediaWikiExtensionFFS.php index ac54ceb..b3b5edf 100644 --- a/ffs/MediaWikiExtensionFFS.php +++ b/ffs/MediaWikiExtensionFFS.php @@ -133,7 +133,6 @@ // Handled in writeReal protected function tryReadSource( $filename, MessageCollection $collection ) { - return; } /** diff --git a/specials/SpecialLanguageStats.php b/specials/SpecialLanguageStats.php index 7ef21de..6d1541e 100644 --- a/specials/SpecialLanguageStats.php +++ b/specials/SpecialLanguageStats.php @@ -303,8 +303,6 @@ // An array where keys are state names and values are numbers $this->table->addExtraColumn( $this->msg( 'translate-stats-workflow' ) ); } - - return; } protected function getWorkflowStateValue( $target ) { -- To view, visit https://gerrit.wikimedia.org/r/274893 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf8deabcbf3bdca68d1645a4603c571170f7236b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix callable name case mismatches - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274892 Change subject: Fix callable name case mismatches .. Fix callable name case mismatches Change-Id: I88bb6224700db74d35b81374a1880e45e446c028 --- M MessageCollection.php M MessageGroups.php M TranslateEditAddons.php M TranslateUtils.php M api/ApiTranslateSandbox.php M ffs/AmdFFS.php M ffs/AndroidXmlFFS.php M ffs/AppleFFS.php M ffs/DtdFFS.php M ffs/FlatPhpFFS.php M ffs/IniFFS.php M ffs/JavaFFS.php M ffs/JavaScriptFFS.php M ffs/JsonFFS.php M ffs/MediaWikiExtensionFFS.php M ffs/SimpleFFS.php M ffs/XliffFFS.php M ffs/YamlFFS.php M messagegroups/AggregateMessageGroup.php M messagegroups/MessageGroupBase.php M messagegroups/MessageGroupOld.php M messagegroups/WikiPageMessageGroup.php M scripts/create-language-models.php M scripts/createCheckIndex.php M scripts/fuzzy.php M scripts/processMessageChanges.php M specials/SpecialAggregateGroups.php M specials/SpecialImportTranslations.php M specials/SpecialManageGroups.php M specials/SpecialManageTranslatorSandbox.php M specials/SpecialSearchTranslations.php M specials/SpecialSupportedLanguages.php M specials/SpecialTranslate.php M specials/SpecialTranslationStash.php M specials/SpecialTranslationStats.php M stash/TranslationStashStorage.php M tag/PageTranslationHooks.php M tag/SpecialPageTranslation.php M tag/SpecialPageTranslationDeletePage.php M tag/SpecialPageTranslationMovePage.php M tag/TPParse.php M tag/TranslatablePage.php M tests/phpunit/MediaWikiMessageCheckerTest.php M tests/phpunit/MessageCollectionTest.php M tests/phpunit/SolrTTMServerTest.php M tests/phpunit/StringMatcherTest.php M tests/phpunit/TPParseTest.php M tests/phpunit/ffs/MediaWikiExtensionFFSTest.php M translationaids/SupportAid.php M translationaids/UpdatedDefinitionAid.php M ttmserver/CrossLanguageTranslationSearchQuery.php M ttmserver/DatabaseTTMServer.php M ttmserver/ElasticSearchTTMServer.php M ttmserver/SolrTTMServer.php M utils/Font.php M utils/HTMLJsSelectToInputField.php M utils/JsSelectToInput.php M utils/MessageGroupStats.php M utils/MessageHandle.php M utils/MessageIndex.php M utils/MessageTable.php M utils/MessageUpdateJob.php M utils/StatsTable.php M utils/TranslateSandbox.php M utils/TranslationEditPage.php M utils/TranslationHelpers.php 66 files changed, 157 insertions(+), 157 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/92/274892/1 diff --git a/MessageCollection.php b/MessageCollection.php index 0757286..8752f18 100644 --- a/MessageCollection.php +++ b/MessageCollection.php @@ -728,7 +728,7 @@ $byNamespace = array(); foreach ( $this->getTitles() as $title ) { $namespace = $title->getNamespace(); - $pagename = $title->getDBKey(); + $pagename = $title->getDBkey(); $byNamespace[$namespace][] = $pagename; } @@ -776,7 +776,7 @@ * @var Title $title */ foreach ( $this->keys as $mkey => $title ) { - $map[$title->getNamespace()][$title->getDBKey()] = $mkey; + $map[$title->getNamespace()][$title->getDBkey()] = $mkey; } return $this->reverseMap = $map; diff --git a/MessageGroups.php b/MessageGroups.php index 5595438..23671e9 100644 --- a/MessageGroups.php +++ b/MessageGroups.php @@ -85,7 +85,7 @@ */ public static function clearCache() { $self = self::singleton(); - $self->getCache()->delete( wfMemckey( 'translate-groups' ) ); + $self->getCache()->delete( wfMemcKey( 'translate-groups' ) ); $self->groups = null; } @@ -144,7 +144,7 @@ // Register autoloaders for this request, both values modified by reference self::appendAutoloader( $autoload, $wgAutoloadClasses ); - $key = wfMemckey( 'translate-groups' ); + $key = wfMemcKey( 'translate-groups' ); $value = array( 'cc' => $groups, 'autoload' => $autoload, diff --git a/TranslateEditAddons.php b/TranslateEditAddons.php index 148ad4d..8a3bc6d 100644 --- a/TranslateEditAddons.php +++ b/TranslateEditAddons.php @@ -161,7 +161,7 @@ // Update it. if ( $revision === null ) { - $rev = $wikiPage->getTitle()->getLatestRevId(); + $rev = $wikiPage->getTitle()->getLatestRevID(); } else { $rev = $revision->getID(); } @@ -341,7 +341,7 @@ array( 'class' => 'mw-sp-translate-edit-fields' ), $output ); - $out->addHtml( $output ); + $out->addHTML(
[MediaWiki-commits] [Gerrit] qunit: Don't require expect() anymore - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/274891 Change subject: qunit: Don't require expect() anymore .. qunit: Don't require expect() anymore This hasn't been useful in QUnit for a while now with the improved assertion context object and tracking of asynchronous tests without shared global state. Change-Id: Icaf865b4d6e85e739bf79c4d1bacb8a71ec5a3da --- M tests/qunit/data/testrunner.js 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/91/274891/1 diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js index 07e6f26..1091d09 100644 --- a/tests/qunit/data/testrunner.js +++ b/tests/qunit/data/testrunner.js @@ -26,8 +26,6 @@ // killing the test and assuming timeout failure. QUnit.config.testTimeout = 60 * 1000; - QUnit.config.requireExpects = true; - // Add a checkbox to QUnit header to toggle MediaWiki ResourceLoader debug mode. QUnit.config.urlConfig.push( { id: 'debug', -- To view, visit https://gerrit.wikimedia.org/r/274891 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icaf865b4d6e85e739bf79c4d1bacb8a71ec5a3da Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set civicrm resource URL - change (mediawiki/vagrant)
Ejegg has submitted this change and it was merged. Change subject: Set civicrm resource URL .. Set civicrm resource URL This may have been damaged since the Civi 4.4 upgrade. The resource URL is where we'll serve scripts and stylesheets. Change-Id: I930815f374006b187f240aa7fa83dd621c9bf25a --- M puppet/modules/crm/manifests/init.pp M puppet/modules/crm/templates/civicrm-install.php.erb M puppet/modules/crm/templates/settings.php.erb 3 files changed, 12 insertions(+), 7 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/crm/manifests/init.pp b/puppet/modules/crm/manifests/init.pp index ac581a6..eb1037c 100644 --- a/puppet/modules/crm/manifests/init.pp +++ b/puppet/modules/crm/manifests/init.pp @@ -31,6 +31,7 @@ $db_pass, ) { $repo = 'wikimedia/fundraising/crm' +$base_url = "http://${::crm::site_name}${::port_fragment}/; include ::php include ::postfix diff --git a/puppet/modules/crm/templates/civicrm-install.php.erb b/puppet/modules/crm/templates/civicrm-install.php.erb index c428d97..8840a53 100644 --- a/puppet/modules/crm/templates/civicrm-install.php.erb +++ b/puppet/modules/crm/templates/civicrm-install.php.erb @@ -2,18 +2,18 @@ $config = array( 'site_dir' => 'default', -'base_url' => "http://<%= @site_name %><%= scope['::port_fragment'] %>/", +'base_url' => '<%= scope['::crm::base_url'] %>', 'mysql' => array( -'username' => "<%= scope['::crm::db_user'] %>", -'password' => "<%= scope['::crm::db_pass'] %>", +'username' => '<%= scope['::crm::db_user'] %>', +'password' => '<%= scope['::crm::db_pass'] %>', 'server' => '127.0.0.1', -'database' => "<%= scope['::crm::civicrm_db'] %>", +'database' => '<%= scope['::crm::civicrm_db'] %>', ), 'drupal' => array( -'username' => "<%= scope['::crm::db_user'] %>", -'password' => "<%= scope['::crm::db_pass'] %>", +'username' => '<%= scope['::crm::db_user'] %>', +'password' => '<%= scope['::crm::db_pass'] %>', 'server' => '127.0.0.1', -'database' => "<%= scope['::crm::drupal_db'] %>", +'database' => '<%= scope['::crm::drupal_db'] %>', ), ); diff --git a/puppet/modules/crm/templates/settings.php.erb b/puppet/modules/crm/templates/settings.php.erb index 52a44ba..5168711 100644 --- a/puppet/modules/crm/templates/settings.php.erb +++ b/puppet/modules/crm/templates/settings.php.erb @@ -27,6 +27,10 @@ $conf['<%= k %>'] = '<%= v %>'; <% end %> +# TODO: Move to civicrm.settings.php and use CIVICRM_UF_BASEURL constant +global $civicrm_setting; +$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = '<%= scope['::crm::base_url'] %>sites/all/modules/civicrm'; + # FIXME: That's annoying. require_once __DIR__ . '/../../vendor/autoload.php'; -- To view, visit https://gerrit.wikimedia.org/r/274642 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I930815f374006b187f240aa7fa83dd621c9bf25a Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: AwightGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Katie Horn Gerrit-Reviewer: Pcoombe Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VE core submodule to REL1_26 (69b1878) - change (mediawiki...VisualEditor)
Krinkle has submitted this change and it was merged. Change subject: Update VE core submodule to REL1_26 (69b1878) .. Update VE core submodule to REL1_26 (69b1878) New changes: 69b1878 ve.test.utils: Don't require QUnit expect() anymore Change-Id: Iefee83f6446dd15e8cf61f597cc24d36181e76a5 --- M lib/ve 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Krinkle: Verified; Looks good to me, approved diff --git a/lib/ve b/lib/ve index 171fe11..69b1878 16 --- a/lib/ve +++ b/lib/ve -Subproject commit 171fe1156864ddb40f71b60b7b1e8e4a12115d75 +Subproject commit 69b1878614c3ff26c768218cc38381afa0716e2f -- To view, visit https://gerrit.wikimedia.org/r/274890 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iefee83f6446dd15e8cf61f597cc24d36181e76a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: REL1_26 Gerrit-Owner: KrinkleGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VE core submodule to REL1_26 (69b1878) - change (mediawiki...VisualEditor)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/274890 Change subject: Update VE core submodule to REL1_26 (69b1878) .. Update VE core submodule to REL1_26 (69b1878) New changes: 69b1878 ve.test.utils: Don't require QUnit expect() anymore Change-Id: Iefee83f6446dd15e8cf61f597cc24d36181e76a5 --- M lib/ve 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/90/274890/1 diff --git a/lib/ve b/lib/ve index 171fe11..69b1878 16 --- a/lib/ve +++ b/lib/ve -Subproject commit 171fe1156864ddb40f71b60b7b1e8e4a12115d75 +Subproject commit 69b1878614c3ff26c768218cc38381afa0716e2f -- To view, visit https://gerrit.wikimedia.org/r/274890 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefee83f6446dd15e8cf61f597cc24d36181e76a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: REL1_26 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ve.test.utils: Don't require QUnit expect() anymore - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: ve.test.utils: Don't require QUnit expect() anymore .. ve.test.utils: Don't require QUnit expect() anymore This hasn't been useful in QUnit for a over a year now with the improved assertion context object and tracking of asynchronous tests without shared global state. It's also causing a conflict because VisualEditor-MediaWiki includes this file and ends up overriding MediaWiki core's loser configuration. And while MediaWiki still happens to pass requireExpects in REL1_26, Wikibase has started to write tests that don't set expect() for each test (which is fine). Change-Id: I4929c10424be7bb8f717f8b01f1c139a25ad117f --- M tests/ve.test.utils.js 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/ve.test.utils.js b/tests/ve.test.utils.js index 2a9bd25..eb12cd0 100644 --- a/tests/ve.test.utils.js +++ b/tests/ve.test.utils.js @@ -13,9 +13,6 @@ new ve.init.sa.Target(); /*jshint nonew:true */ - // Configure QUnit - QUnit.config.requireExpects = true; - // Disable scroll animatinos ve.scrollIntoView = function () {}; -- To view, visit https://gerrit.wikimedia.org/r/274887 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4929c10424be7bb8f717f8b01f1c139a25ad117f Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: REL1_26 Gerrit-Owner: KrinkleGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a short abbreviation for timestamps in notifications - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Add a short abbreviation for timestamps in notifications .. Add a short abbreviation for timestamps in notifications Use 'm' instead of 'minutes', 's' instead of 'seconds', etc, for shorter timestamp rendering in the notification list. Bug: T125970 Change-Id: I9479c5406a4bf44ef560bef2c8f204a9f60cafc6 --- M Resources.php M i18n/en.json M i18n/qqq.json M modules/ext.echo.init.js M modules/ooui/mw.echo.ui.NotificationItemWidget.js 5 files changed, 50 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index b66f558..f1f07b1 100644 --- a/Resources.php +++ b/Resources.php @@ -99,6 +99,12 @@ "notification-link-text-expand-alert-count", "notification-link-text-expand-message-count", "notification-link-text-expand-all-count", + "notification-timestamp-ago-seconds", + "notification-timestamp-ago-minutes", + "notification-timestamp-ago-hours", + "notification-timestamp-ago-days", + "notification-timestamp-ago-months", + "notification-timestamp-ago-years", 'echo-notification-markasread', 'echo-notification-alert-text-only', 'echo-notification-message-text-only', diff --git a/i18n/en.json b/i18n/en.json index 8c74bdb..a4b81a9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -127,6 +127,12 @@ "notification-mention-nosection-email-batch-body": "$1 {{GENDER:$1|mentioned}} you on the $2 talk page.", "notification-user-rights-email-subject": "Your user rights have changed on {{SITENAME}}", "notification-user-rights-email-batch-body": "Your user rights were {{GENDER:$1|changed}} by $1. $2.", + "notification-timestamp-ago-seconds": "{{PLURAL:$1|$1s}}", + "notification-timestamp-ago-minutes": "{{PLURAL:$1|$1m}}", + "notification-timestamp-ago-hours": "{{PLURAL:$1|$1h}}", + "notification-timestamp-ago-days": "{{PLURAL:$1|$1d}}", + "notification-timestamp-ago-months": "{{PLURAL:$1|$1mo}}", + "notification-timestamp-ago-years": "{{PLURAL:$1|$1yr}}", "echo-notification-count": "$1+", "echo-email-subject-default": "New notification at {{SITENAME}}", "echo-email-body-default": "You have a new notification at {{SITENAME}}:\n\n$1", diff --git a/i18n/qqq.json b/i18n/qqq.json index 3bdc8d7..7795527 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -148,6 +148,12 @@ "notification-mention-nosection-email-batch-body": "E-mail notification batch body. Parameters:\n* $1 - a username, plaintext. Can be used for gender support\n* $2 - the title text without namespace (a page title in any namespace)\n* $3 - name of the user viewing the notification, can be used for GENDER\n\nSee also:\n* {{msg-mw|Notification-mention-nosection}}\n* {{msg-mw|Notification-mention-nosection-flyout}}\n* {{msg-mw|Notification-mention-email-subject}}", "notification-user-rights-email-subject": "E-mail subject for user rights notification\n\nSee also:\n* {{msg-mw|Notification-user-rights}}\n* {{msg-mw|Notification-user-rights-email-batch-body}}", "notification-user-rights-email-batch-body": "Email notification batch body. Parameters:\n* $1 - a user name, plaintext. Can be used for gender support.\n* $2 - a semicolon separated list of {{msg-mw|notification-user-rights-add}}, {{msg-mw|notification-user-rights-remove}}", + "notification-timestamp-ago-seconds": "Label for the amount of time since a notification has arrived in the case where it is under a minute. This should be a very short string. $1 - Number of seconds", + "notification-timestamp-ago-minutes": "Label for the amount of time since a notification has arrived in the case where it is in order of minutes. This should be a very short string. $1 - Number of minutes", + "notification-timestamp-ago-hours": "Label for the amount of time since a notification has arrived in the case where it is in order of hours. This should be a very short string. $1 - Number of hours", + "notification-timestamp-ago-days": "Label for the amount of time since a notification has arrived in the case where it is in order of days. This should be a very short string. $1 - Number of days", + "notification-timestamp-ago-months": "Label for the amount of time since a notification has arrived in the case where it is in order of months. This should be a very short string. $1 - Number of months", + "notification-timestamp-ago-years": "Label for the amount of time since a notification has arrived in the
[MediaWiki-commits] [Gerrit] Don't run rake-jessie on REL1_25 or REL1_26 of VisualEditor - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Don't run rake-jessie on REL1_25 or REL1_26 of VisualEditor .. Don't run rake-jessie on REL1_25 or REL1_26 of VisualEditor Entry point doesn't exist there yet. Change-Id: I584666c16111fb0f88cac210d2c1656d0da1d23c --- M zuul/layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 01b33d7..8b49684 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -593,6 +593,8 @@ branch: (?:^REL1_23$|^REL1_24$|^fundraising/REL.*) - project: '^mediawiki/extensions/Flow$' branch: (?:^REL1_25$) + - project: '^VisualEditor/VisualEditor$' +branch: (?:^REL1_25$|^REL1_26$) - name: ^jsduck$ skip-if: -- To view, visit https://gerrit.wikimedia.org/r/274889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I584666c16111fb0f88cac210d2c1656d0da1d23c Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't run rake-jessie on REL1_25 or REL1_26 of VisualEditor - change (integration/config)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/274889 Change subject: Don't run rake-jessie on REL1_25 or REL1_26 of VisualEditor .. Don't run rake-jessie on REL1_25 or REL1_26 of VisualEditor Entry point doesn't exist there yet. Change-Id: I584666c16111fb0f88cac210d2c1656d0da1d23c --- M zuul/layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/89/274889/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 01b33d7..8b49684 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -593,6 +593,8 @@ branch: (?:^REL1_23$|^REL1_24$|^fundraising/REL.*) - project: '^mediawiki/extensions/Flow$' branch: (?:^REL1_25$) + - project: '^VisualEditor/VisualEditor$' +branch: (?:^REL1_25$|^REL1_26$) - name: ^jsduck$ skip-if: -- To view, visit https://gerrit.wikimedia.org/r/274889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I584666c16111fb0f88cac210d2c1656d0da1d23c Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Safely use single quotes - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274888 Change subject: Safely use single quotes .. Safely use single quotes Change-Id: I02fa1edca8b3ef76a69f44e8b42f64d5afc1a69b --- M Translate.php M api/ApiTranslateSandbox.php M ffs/MediaWikiComplexMessages.php M messagegroups/RecentMessageGroup.php M scripts/fallbacks-graph.php M scripts/groupStatistics.php M scripts/migrate-schema2.php M scripts/mwcore-export.php M scripts/plural-comparison.php M scripts/sync-group.php M scripts/ttmserver-export.php M scripts/yaml-tests.php M specials/SpecialPagePreparation.php M specials/SpecialTranslations.php M stringmangler/StringMatcher.php M tag/SpecialPageTranslation.php M tag/TranslateRenderJob.php M tests/phpunit/MessageGroupBaseTest.php M tests/phpunit/ResourcesOrderTest.php M tests/phpunit/ffs/AppleFFSTest.php M translationaids/GettextDocumentationAid.php M translationaids/InsertablesAid.php M translationaids/SupportAid.php M translationaids/UpdatedDefinitionAid.php M ttmserver/TTMServer.php M utils/JsSelectToInput.php M utils/MemProfile.php M utils/StatsTable.php M utils/TranslateSandbox.php M utils/TranslateYaml.php M webservices/ApertiumWebService.php 31 files changed, 81 insertions(+), 82 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/88/274888/1 diff --git a/Translate.php b/Translate.php index 52355cb..10a9e7a 100644 --- a/Translate.php +++ b/Translate.php @@ -50,11 +50,11 @@ * @cond file_level_code */ -$wgMessagesDirs['PageTranslation'] = __DIR__ . "/i18n/pagetranslation"; -$wgMessagesDirs['Translate'] = __DIR__ . "/i18n/core"; -$wgMessagesDirs['TranslateSearch'] = __DIR__ . "/i18n/search"; -$wgMessagesDirs['TranslateSandbox'] = __DIR__ . "/i18n/sandbox"; -$wgMessagesDirs['TranslateApi'] = __DIR__ . "/i18n/api"; +$wgMessagesDirs['PageTranslation'] = __DIR__ . '/i18n/pagetranslation'; +$wgMessagesDirs['Translate'] = __DIR__ . '/i18n/core'; +$wgMessagesDirs['TranslateSearch'] = __DIR__ . '/i18n/search'; +$wgMessagesDirs['TranslateSandbox'] = __DIR__ . '/i18n/sandbox'; +$wgMessagesDirs['TranslateApi'] = __DIR__ . '/i18n/api'; $wgExtensionMessagesFiles['TranslateAlias'] = "$dir/Translate.alias.php"; $wgExtensionMessagesFiles['TranslateMagic'] = "$dir/Translate.i18n.magic.php"; diff --git a/api/ApiTranslateSandbox.php b/api/ApiTranslateSandbox.php index 46cf168..fc75c75 100644 --- a/api/ApiTranslateSandbox.php +++ b/api/ApiTranslateSandbox.php @@ -47,22 +47,22 @@ $username = $params['username']; if ( User::getCanonicalName( $username, 'creatable' ) === false ) { - $this->dieUsage( "User name is not acceptable", 'invalidusername' ); + $this->dieUsage( 'User name is not acceptable', 'invalidusername' ); } $user = User::newFromName( $username ); if ( $user->getID() !== 0 ) { - $this->dieUsage( "User name is in use", 'nonfreeusername' ); + $this->dieUsage( 'User name is in use', 'nonfreeusername' ); } $password = $params['password']; if ( !$user->isValidPassword( $password ) ) { - $this->dieUsage( "Password is not acceptable", 'invalidpassword' ); + $this->dieUsage( 'Password is not acceptable', 'invalidpassword' ); } $email = $params['email']; if ( !Sanitizer::validateEmail( $email ) ) { - $this->dieUsage( "Email is not acceptable", 'invalidemail' ); + $this->dieUsage( 'Email is not acceptable', 'invalidemail' ); } $user = TranslateSandbox::addUser( $username, $email, $password ); diff --git a/ffs/MediaWikiComplexMessages.php b/ffs/MediaWikiComplexMessages.php index d10d69f..c7aced9 100644 --- a/ffs/MediaWikiComplexMessages.php +++ b/ffs/MediaWikiComplexMessages.php @@ -627,7 +627,7 @@ public function highlight( $key, $values ) { if ( count( $values ) ) { if ( !isset( $values[0] ) ) { - throw new MWException( "Something missing from values: " . + throw new MWException( 'Something missing from values: ' . print_r( $values, true ) ); } @@ -762,7 +762,7 @@ if ( count( $values ) > 1 ) { $link = Xml::element( 'a', array( 'href' => "#mw-sp-magic-$key" ), $key ); $errors[] = "Namespace $link can have only one translation. Replace the " . - "translation with a new one, and notify staff about the change."; +
[MediaWiki-commits] [Gerrit] ve.test.utils: Don't require QUnit expect() anymore - change (VisualEditor/VisualEditor)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/274887 Change subject: ve.test.utils: Don't require QUnit expect() anymore .. ve.test.utils: Don't require QUnit expect() anymore This hasn't been useful in QUnit for a over a year now with the improved assertion context object and tracking of asynchronous tests without shared global state. It's also causing a conflict because VisualEditor-MediaWiki includes this file and ends up overriding MediaWiki core's loser configuration. And while MediaWiki still happens to pass requireExpects in REL1_26, Wikibase has started to write tests that don't set expect() for each test (which is fine). Change-Id: I4929c10424be7bb8f717f8b01f1c139a25ad117f --- M tests/ve.test.utils.js 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/87/274887/1 diff --git a/tests/ve.test.utils.js b/tests/ve.test.utils.js index 2a9bd25..eb12cd0 100644 --- a/tests/ve.test.utils.js +++ b/tests/ve.test.utils.js @@ -13,9 +13,6 @@ new ve.init.sa.Target(); /*jshint nonew:true */ - // Configure QUnit - QUnit.config.requireExpects = true; - // Disable scroll animatinos ve.scrollIntoView = function () {}; -- To view, visit https://gerrit.wikimedia.org/r/274887 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4929c10424be7bb8f717f8b01f1c139a25ad117f Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: REL1_26 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ve.test.utils: Don't require QUnit expect() anymore - change (VisualEditor/VisualEditor)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/274880 Change subject: ve.test.utils: Don't require QUnit expect() anymore .. ve.test.utils: Don't require QUnit expect() anymore This hasn't been useful in QUnit for a over a year now with the improved assertion context object and tracking of asynchronous tests without shared global state. It's also causing a conflict because VisualEditor-MediaWiki includes this file and ends up overriding MediaWiki core's loser configuration. And while MediaWiki still happens to pass requireExpects in REL1_26, Wikibase has started to write tests that don't set expect() for each test (which is fine). Change-Id: I4929c10424be7bb8f717f8b01f1c139a25ad117f --- M tests/ve.test.utils.js 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/80/274880/1 diff --git a/tests/ve.test.utils.js b/tests/ve.test.utils.js index 6a52fb5..e53037b 100644 --- a/tests/ve.test.utils.js +++ b/tests/ve.test.utils.js @@ -13,9 +13,6 @@ new ve.init.sa.Target(); /*jshint nonew:true */ - // Configure QUnit - QUnit.config.requireExpects = true; - // Disable scroll animatinos ve.scrollIntoView = function () {}; -- To view, visit https://gerrit.wikimedia.org/r/274880 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4929c10424be7bb8f717f8b01f1c139a25ad117f Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] RT: do not load shredder plugin - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: RT: do not load shredder plugin .. RT: do not load shredder plugin Plugins are currently just a single one and that isn't used and needs puppet fixes anyways. Change-Id: Id632fe1e4d522753a24ff3b7b314268d7540e982 --- M modules/requesttracker/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/requesttracker/manifests/init.pp b/modules/requesttracker/manifests/init.pp index ec60cd2..0e88288 100644 --- a/modules/requesttracker/manifests/init.pp +++ b/modules/requesttracker/manifests/init.pp @@ -19,7 +19,7 @@ include requesttracker::packages include requesttracker::config include requesttracker::forms -include requesttracker::plugins +# include requesttracker::plugins include requesttracker::aliases class { 'requesttracker::apache': -- To view, visit https://gerrit.wikimedia.org/r/274879 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id632fe1e4d522753a24ff3b7b314268d7540e982 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] RT: do not load shredder plugin - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/274879 Change subject: RT: do not load shredder plugin .. RT: do not load shredder plugin Plugins are currently just a single one and that isn't used and needs puppet fixes anyways. Change-Id: Id632fe1e4d522753a24ff3b7b314268d7540e982 --- M modules/requesttracker/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/79/274879/1 diff --git a/modules/requesttracker/manifests/init.pp b/modules/requesttracker/manifests/init.pp index ec60cd2..0e88288 100644 --- a/modules/requesttracker/manifests/init.pp +++ b/modules/requesttracker/manifests/init.pp @@ -19,7 +19,7 @@ include requesttracker::packages include requesttracker::config include requesttracker::forms -include requesttracker::plugins +# include requesttracker::plugins include requesttracker::aliases class { 'requesttracker::apache': -- To view, visit https://gerrit.wikimedia.org/r/274879 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id632fe1e4d522753a24ff3b7b314268d7540e982 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] qunit: Don't require expect() anymore - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/274878 Change subject: qunit: Don't require expect() anymore .. qunit: Don't require expect() anymore This hasn't been useful in QUnit for a while now with the improved assertion context object and tracking of asynchronous tests without shared global state. Currently breaking REL1_26 because Wikibase is naughty. Change-Id: Icaf865b4d6e85e739bf79c4d1bacb8a71ec5a3da --- M tests/qunit/data/testrunner.js 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/274878/1 diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js index 01f9625..53bff76 100644 --- a/tests/qunit/data/testrunner.js +++ b/tests/qunit/data/testrunner.js @@ -27,8 +27,6 @@ // and assuming failure. QUnit.config.testTimeout = 30 * 1000; - QUnit.config.requireExpects = true; - // Add a checkbox to QUnit header to toggle MediaWiki ResourceLoader debug mode. QUnit.config.urlConfig.push( { id: 'debug', -- To view, visit https://gerrit.wikimedia.org/r/274878 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icaf865b4d6e85e739bf79c4d1bacb8a71ec5a3da Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_26 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use https to talk to elasticsearch in beta cluster - change (operations/mediawiki-config)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/274877 Change subject: Use https to talk to elasticsearch in beta cluster .. Use https to talk to elasticsearch in beta cluster Bug: T12 Change-Id: I0e356fb893556a7ebbf650d98832697bed3720d6 --- M wmf-config/CirrusSearch-labs.php M wmf-config/LabsServices.php 2 files changed, 16 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/77/274877/1 diff --git a/wmf-config/CirrusSearch-labs.php b/wmf-config/CirrusSearch-labs.php index a876768..d1b5e73 100644 --- a/wmf-config/CirrusSearch-labs.php +++ b/wmf-config/CirrusSearch-labs.php @@ -6,7 +6,17 @@ # It should be loaded AFTER CirrusSearch-common.php $wgCirrusSearchClusters = array( - 'eqiad' => $wmfAllServices['eqiad']['search'] + 'eqiad' => array_map( function ( $host ) { + return array( + 'transport' => 'Https', + 'port' => '9243', + 'host' => $host, + 'curl' => array( + // We might not need to specify the cert explicitly, + // CURLOPT_CAINFO => '/etc/ssl/certs/wmf-labs.pem', + ), + ); + }, $wmfAllServices['eqiad']['search'] ), ); if ( $wgDBname == 'enwiki' ) { diff --git a/wmf-config/LabsServices.php b/wmf-config/LabsServices.php index 6bf5e0e..ee3f943 100644 --- a/wmf-config/LabsServices.php +++ b/wmf-config/LabsServices.php @@ -15,10 +15,11 @@ 'udp2log' => 'deployment-fluorine.eqiad.wmflabs:8420', 'statsd' => 'labmon1001.eqiad.wmnet', 'search' => array( - 'deployment-elastic05', - 'deployment-elastic06', - 'deployment-elastic07', - 'deployment-elastic08', + // These MUST match the installed SSL certs + 'deployment-elastic05.deployment-prep.eqiad.wmflabs', + 'deployment-elastic06.deployment-prep.eqiad.wmflabs', + 'deployment-elastic07.deployment-prep.eqiad.wmflabs', + 'deployment-elastic08.deployment-prep.eqiad.wmflabs', ), 'ocg' => 'http://deployment-pdf01:8000', 'urldownloader' => 'http://deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080', -- To view, visit https://gerrit.wikimedia.org/r/274877 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e356fb893556a7ebbf650d98832697bed3720d6 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.widgets.CategorySelector: Add missing dependency f... - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/274876 Change subject: mediawiki.widgets.CategorySelector: Add missing dependency for ForeignApi and Title .. mediawiki.widgets.CategorySelector: Add missing dependency for ForeignApi and Title Follows-up e6d1550309 which attempted to backport 86dedeea7f but left out the dependencies. Fixes fatal error in REL1_26 qunit tests: > Exception in module-execute in module mediawiki.widgets.CategorySelector > TypeError: Expecting a function in instanceof check, but got undefined Bug: T125335 Change-Id: I6e5834c3098d00bfc75e9f6b0d61ed6e5babc6ca --- M resources/Resources.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/76/274876/1 diff --git a/resources/Resources.php b/resources/Resources.php index 6a22af6..6626f05 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -2031,6 +2031,8 @@ 'dependencies' => array( 'oojs-ui', 'mediawiki.api', + 'mediawiki.ForeignApi', + 'mediawiki.Title', ), 'targets' => array( 'desktop', 'mobile' ), ), -- To view, visit https://gerrit.wikimedia.org/r/274876 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e5834c3098d00bfc75e9f6b0d61ed6e5babc6ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_26 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] RT: add role to krypton - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: RT: add role to krypton .. RT: add role to krypton Move RT to krypton. Talked with Robh once, we agreed to just move it to VM for archival purposes but stop running it on physical hardware. Same for the other service on this server, racktables. Then magnesium can be repurposed for something else. Bug:T119112 Change-Id: Ic616d4ca41ee69bf79c22f1ec1f08d13adb45d4c --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 68a0ed1..c8e0f23 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1272,7 +1272,7 @@ # kafka::analytics::burrow is a Kafka consumer lag monitor. # Running this here because krypton is a 'misc' Jessie # monitoring host (not really, it's just misc apps) -role wikimania_scholarships, iegreview, grafana, kafka::analytics::burrow, racktables +role wikimania_scholarships, iegreview, grafana, kafka::analytics::burrow, racktables, requesttracker include standard } -- To view, visit https://gerrit.wikimedia.org/r/250047 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic616d4ca41ee69bf79c22f1ec1f08d13adb45d4c Gerrit-PatchSet: 10 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: Dzahn Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Try to fix handling of empty document on WTE->VE switch - change (mediawiki...VisualEditor)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/274875 Change subject: Try to fix handling of empty document on WTE->VE switch .. Try to fix handling of empty document on WTE->VE switch Bug: T128635 Change-Id: Iff83e1d71e7186b8da875aa507f9e19e8d9c23ce --- M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js M modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js 2 files changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/75/274875/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js index 41444a1..b368a05 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js @@ -563,11 +563,8 @@ } } ); } ); - } else if ( isViewPage || wikitext ) { - activatePageTarget( false ); } else { - setEditorPreference( 'visualeditor' ); - location.href = veEditUri; + activatePageTarget( false ); } }, diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js index 71703a6..5cb6542 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js @@ -135,7 +135,7 @@ if ( conf.fullRestbaseUrl || conf.restbaseUrl ) { ve.track( 'trace.restbaseLoad.enter' ); - if ( conf.fullRestbaseUrl && $( '#wpTextbox1' ).length ) { + if ( conf.fullRestbaseUrl && $( '#wpTextbox1' ).val() ) { fromEditedState = modified; window.onbeforeunload = null; $( window ).off( 'beforeunload' ); -- To view, visit https://gerrit.wikimedia.org/r/274875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff83e1d71e7186b8da875aa507f9e19e8d9c23ce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Roll out RESTBase usage to Android production app: 25% - change (mediawiki...MobileApp)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/274874 Change subject: Roll out RESTBase usage to Android production app: 25% .. Roll out RESTBase usage to Android production app: 25% Change-Id: I9001ada6c1762d8a3856fb6c76e9290ea7a4b144 See-also: Ie49d02141402ede6c292244d223531ee2ef76575 Bug: T126934 --- M config/config.json 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileApp refs/changes/74/274874/1 diff --git a/config/config.json b/config/config.json index 32b7631..da91f79 100644 --- a/config/config.json +++ b/config/config.json @@ -4,5 +4,6 @@ "disableFullTextSearch": false, "searchLogSampleRate": 100, "tocLogSampleRate": 100, -"restbaseBetaPercent": 100 +"restbaseBetaPercent": 100, +"rbPct": 25 } -- To view, visit https://gerrit.wikimedia.org/r/274874 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9001ada6c1762d8a3856fb6c76e9290ea7a4b144 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileApp Gerrit-Branch: master Gerrit-Owner: BearND___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove no longer present entry - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274872 Change subject: Remove no longer present entry .. Remove no longer present entry Change-Id: I27c95001b741173788dc63541f29ee72a0777ca0 --- M .jshintignore 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/72/274872/1 diff --git a/.jshintignore b/.jshintignore index 6310582..5c58acc 100644 --- a/.jshintignore +++ b/.jshintignore @@ -4,4 +4,3 @@ # upstream libs resources/js/jquery.autosize.js -resources/js/jquery.ui.position.js -- To view, visit https://gerrit.wikimedia.org/r/274872 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27c95001b741173788dc63541f29ee72a0777ca0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Autosize to 3.0.15 - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274871 Change subject: Update Autosize to 3.0.15 .. Update Autosize to 3.0.15 Change-Id: I3a4ee2742fe8076add5699b26d7c25024d798132 --- M resources/js/jquery.autosize.js 1 file changed, 223 insertions(+), 211 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/71/274871/1 diff --git a/resources/js/jquery.autosize.js b/resources/js/jquery.autosize.js index 406ca01..2227121 100644 --- a/resources/js/jquery.autosize.js +++ b/resources/js/jquery.autosize.js @@ -1,242 +1,254 @@ /*! - Autosize v1.17.2 - 2013-07-30 - Automatically adjust textarea height based on user input. - (c) 2013 Jack Moore - http://www.jacklmoore.com/autosize - license: http://www.opensource.org/licenses/mit-license.php - https://raw.github.com/jackmoore/autosize/1.17.2/jquery.autosize.js + Autosize 3.0.15 + license: MIT + http://www.jacklmoore.com/autosize */ -( function ( factory ) { - if ( typeof define === 'function' && define.amd ) { - // AMD. Register as an anonymous module. - define( [ 'jquery' ], factory ); +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module); } else { - // Browser globals: jQuery or jQuery-like library, such as Zepto - factory( window.jQuery || window.$ ); + var mod = { + exports: {} + }; + factory(mod.exports, mod); + global.autosize = mod.exports; } -}( function ( $ ) { - var - defaults = { - className: 'autosizejs', - append: '', - callback: false, - resizeDelay: 10 - }, +})(this, function (exports, module) { + 'use strict'; - // border:0 is unnecessary, but avoids a bug in FireFox on OSX - copy = '', + var set = typeof Set === 'function' ? new Set() : (function () { + var list = []; - // line-height is conditionally included because IE7/IE8/old Opera do not return the correct value. - typographyStyles = [ - 'fontFamily', - 'fontSize', - 'fontWeight', - 'fontStyle', - 'letterSpacing', - 'textTransform', - 'wordSpacing', - 'textIndent' - ], + return { + has: function has(key) { + return Boolean(list.indexOf(key) > -1); + }, + add: function add(key) { + list.push(key); + }, + 'delete': function _delete(key) { + list.splice(list.indexOf(key), 1); + } }; + })(); - // to keep track which textarea is being mirrored when adjust() is called. - mirrored, - - // the mirror element, which is used to calculate what size the mirrored element should be. - mirror = $( copy ).data( 'autosize', true )[ 0 ]; - - // test that line-height can be accurately copied. - mirror.style.lineHeight = '99px'; - if ( $( mirror ).css( 'lineHeight' ) === '99px' ) { - typographyStyles.push( 'lineHeight' ); + var createEvent = function createEvent(name) { + return new Event(name); + }; + try { + new Event('test'); + } catch (e) { + // IE does not support `new Event()` + createEvent = function (name) { + var evt = document.createEvent('Event'); + evt.initEvent(name, true, false); + return evt; + }; } - mirror.style.lineHeight = ''; - $.fn.autosize = function ( options ) { - options = $.extend( {}, defaults, options || {} ); + function assign(ta) { + var _ref = arguments[1] === undefined ? {} : arguments[1]; - if ( mirror.parentNode !== document.body ) { - $( document.body ).append( mirror ); + var _ref$setOverflowX = _ref.setOverflowX; + var setOverflowX = _ref$setOverflowX === undefined ? true : _ref$setOverflowX; + var _ref$setOverflowY = _ref.setOverflowY; + var setOverflowY = _ref$setOverflowY === undefined ? true : _ref$setOverflowY; + + if (!ta || !ta.nodeName
[MediaWiki-commits] [Gerrit] Factor page langauge out to use it in multiple places - change (mediawiki...Kartographer)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/274870 Change subject: Factor page langauge out to use it in multiple places .. Factor page langauge out to use it in multiple places Change-Id: Ida9c55385bebcc9797c9ee25a6e47f563436fad2 --- M includes/Tag/TagHandler.php 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/70/274870/1 diff --git a/includes/Tag/TagHandler.php b/includes/Tag/TagHandler.php index 887708f..8782db8 100644 --- a/includes/Tag/TagHandler.php +++ b/includes/Tag/TagHandler.php @@ -13,7 +13,7 @@ use FormatJson; use Html; use Kartographer\SimpleStyleSanitizer; -use Message; +use Language; use Parser; use ParserOutput; use PPFrame; @@ -63,6 +63,9 @@ /** @var PPFrame */ protected $frame; + /** @var Language */ + protected $language; + public function __construct() { $this->defaultAttributes = [ 'class' => 'mw-kartographer', 'mw-data' => 'interface' ]; } @@ -92,6 +95,7 @@ private final function handle( $input, array $args, Parser $parser, PPFrame $frame ) { $this->parser = $parser; $this->frame = $frame; + $this->language = $parser->getTitle()->getPageLanguage(); $output = $parser->getOutput(); $output->addModuleStyles( 'ext.kartographer' ); @@ -313,14 +317,13 @@ if ( !count( $errors ) ) { throw new Exception( __METHOD__ , '(): attempt to report error when none took place' ); } - $lang = $this->parser->getTitle()->getPageLanguage(); $message = count( $errors ) > 1 ? 'kartographer-error-context-multi' : 'kartographer-error-context'; // Status sucks, redoing a bunch of its code here - $errorText = implode( "\n* ", array_map( function( array $err ) use ( $lang ) { + $errorText = implode( "\n* ", array_map( function( array $err ) { return wfMessage( $err['message'] ) ->params( $err['params'] ) - ->inLanguage( $lang ) + ->inLanguage( $this->language ) ->plain(); }, $errors ) ); if ( count( $errors ) > 1 ) { -- To view, visit https://gerrit.wikimedia.org/r/274870 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida9c55385bebcc9797c9ee25a6e47f563436fad2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Kartographer Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Polish error messages - change (mediawiki...Kartographer)
jenkins-bot has submitted this change and it was merged. Change subject: Polish error messages .. Polish error messages * Fix the goddamn thing to actually output something sensible * Add a separate error for missing parameters Bug: T128551 Change-Id: Ia59561f73e381e633e1b48c8afd93c1ea6a75758 --- M i18n/en.json M i18n/qqq.json M includes/Tag/MapFrame.php M includes/Tag/MapLink.php M includes/Tag/TagHandler.php M tests/parserTests.txt 6 files changed, 48 insertions(+), 3 deletions(-) Approvals: Siebrand: Looks good to me, but someone else must approve Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index d602343..931896e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -10,7 +10,8 @@ "kartographer-desc": "Allows maps to be added to the wiki pages", "kartographer-error-context": "$1: $2", "kartographer-error-context-multi": "$1 problems:\n$2", - "kartographer-error-bad_attr": "Attribute '$1' has an invalid value", + "kartographer-error-missing-attr": "Attribute \"$1\" is missing", + "kartographer-error-bad_attr": "Attribute \"$1\" has an invalid value", "kartographer-error-bad_data": "The JSON content is not correct", "kartographer-tracking-category": "Pages with maps", "kartographer-tracking-category-desc": "The page includes a map", diff --git a/i18n/qqq.json b/i18n/qqq.json index 4ec1002..ebd15ea 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -12,6 +12,7 @@ "kartographer-desc": "{{desc|name=Kartographer|url=https://www.mediawiki.org/wiki/Extension:Kartographer}};, "kartographer-error-context": "General message shown before a single specific error\n\nParameters:\n* $1 - tag name, 'mapframe' or 'maplink'\n* $2 - error message", "kartographer-error-context-multi": "General message shown before multiple errors\n\nParameters:\n* $1 - tag name, 'mapframe', 'maplink' or 'mapdata'\n* $2 - list of errors combined into a bullet list", + "kartographer-error-missing-attr": "Error shown instead of a map when required parameter(s) is missing.\n\nParameters:\n* $1 - non-localized attribute name, such as 'height', 'latitude', etc", "kartographer-error-bad_attr": "Error shown instead of a map in case of a problem with parameters.\n\nParameters:\n* $1 - non-localized attribute name, such as 'height', 'latitude', etc", "kartographer-error-bad_data": "This error is shown if the JSON content of the tag does not pass validation", "kartographer-tracking-category": "Name of the tracking category", diff --git a/includes/Tag/MapFrame.php b/includes/Tag/MapFrame.php index e5ea2bc..610bdb4 100644 --- a/includes/Tag/MapFrame.php +++ b/includes/Tag/MapFrame.php @@ -11,6 +11,8 @@ * The tag inserts a map into wiki page */ class MapFrame extends TagHandler { + protected $tag = 'mapframe'; + private $width; private $height; diff --git a/includes/Tag/MapLink.php b/includes/Tag/MapLink.php index 289cfc6..834365a 100644 --- a/includes/Tag/MapLink.php +++ b/includes/Tag/MapLink.php @@ -8,6 +8,7 @@ * The tag creates a link that, when clicked, */ class MapLink extends TagHandler { + protected $tag = 'maplink'; protected function parseArgs() { $this->parseMapArgs(); diff --git a/includes/Tag/TagHandler.php b/includes/Tag/TagHandler.php index 29af921..887708f 100644 --- a/includes/Tag/TagHandler.php +++ b/includes/Tag/TagHandler.php @@ -9,9 +9,11 @@ namespace Kartographer\Tag; +use Exception; use FormatJson; use Html; use Kartographer\SimpleStyleSanitizer; +use Message; use Parser; use ParserOutput; use PPFrame; @@ -22,6 +24,9 @@ * Base class for all tags */ abstract class TagHandler { + /** @var string */ + protected $tag; + /** @var Status */ protected $status; @@ -176,7 +181,7 @@ protected function getText( $name, $default, $regexp = false ) { if ( !isset( $this->args[$name] ) ) { if ( $default === false ) { - $this->status->fatal( 'kartographer-error-bad_attr', $name ); + $this->status->fatal( 'kartographer-error-missing-attr', $name ); } return $default; } @@ -302,7 +307,26 @@ */ private function reportError() { $this->parser->getOutput()->setExtensionData( 'kartographer_broken', true ); + $errors = array_merge( $this->status->getErrorsByType( 'error' ), + $this->status->getErrorsByType( 'warning' ) + ); + if ( !count( $errors ) ) { + throw new Exception( __METHOD__ , '(): attempt to report error when none took place' ); + } + $lang =
[MediaWiki-commits] [Gerrit] Remove duplicate and overwritten CSS properties - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274869 Change subject: Remove duplicate and overwritten CSS properties .. Remove duplicate and overwritten CSS properties Change-Id: If574a0af554a00020a0aa0bdb4306ee559b2567a --- M resources/css/ext.translate.special.managetranslatorsandbox.css M resources/css/ext.translate.special.searchtranslations.css 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/69/274869/1 diff --git a/resources/css/ext.translate.special.managetranslatorsandbox.css b/resources/css/ext.translate.special.managetranslatorsandbox.css index a00c27e..5269e46 100644 --- a/resources/css/ext.translate.special.managetranslatorsandbox.css +++ b/resources/css/ext.translate.special.managetranslatorsandbox.css @@ -217,7 +217,6 @@ font-size: 1em; display: block; float: left; - border-radius: 3px; } .clear-language-selector { diff --git a/resources/css/ext.translate.special.searchtranslations.css b/resources/css/ext.translate.special.searchtranslations.css index f35084d..77815fa 100644 --- a/resources/css/ext.translate.special.searchtranslations.css +++ b/resources/css/ext.translate.special.searchtranslations.css @@ -168,7 +168,6 @@ .translate-search-more-groups-info, .translate-search-more-languages-info { - padding: 5px; color: #888; font-size: 14px; padding: 0 8px; -- To view, visit https://gerrit.wikimedia.org/r/274869 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If574a0af554a00020a0aa0bdb4306ee559b2567a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace more functions deprecated in MediaWiki 1.25 - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274868 Change subject: Replace more functions deprecated in MediaWiki 1.25 .. Replace more functions deprecated in MediaWiki 1.25 Change-Id: Idf810b401ec52d95f897ce5330ec2cea86b80619 --- M scripts/create-language-models.php M scripts/yaml-tests.php M specials/SpecialManageGroups.php M ttmserver/TTMServer.php M utils/MessageChangeStorage.php M utils/MessageGroupCache.php M utils/MessageIndex.php M utils/TranslationEditPage.php 8 files changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/68/274868/1 diff --git a/scripts/create-language-models.php b/scripts/create-language-models.php index dfc6216..8604f76 100644 --- a/scripts/create-language-models.php +++ b/scripts/create-language-models.php @@ -209,7 +209,7 @@ 'BC' => array(), ) ); } else { - $result = $api->getResultData(); + $result = $api->getResult()->getData(); } $text = $result['parse']['text']['*']; $text = strip_tags( $text ); diff --git a/scripts/yaml-tests.php b/scripts/yaml-tests.php index 905b8a7..332a877 100644 --- a/scripts/yaml-tests.php +++ b/scripts/yaml-tests.php @@ -76,7 +76,7 @@ } foreach ( $groups as $i => $group ) { - $groups[$i] = TranslateYaml::mergeTemplate( $template, $group ); + $groups[$i] = MessageGroupConfigurationParser::mergeTemplate( $template, $group ); } return $groups; diff --git a/specials/SpecialManageGroups.php b/specials/SpecialManageGroups.php index a12e9f7..9ce4b12 100644 --- a/specials/SpecialManageGroups.php +++ b/specials/SpecialManageGroups.php @@ -129,7 +129,7 @@ // The above count as two $limit = $limit - 2; - $reader = CdbReader::open( $this->cdb ); + $reader = \Cdb\Reader::open( $this->cdb ); $groups = unserialize( $reader->get( '#keys' ) ); foreach ( $groups as $id ) { $group = MessageGroups::getGroup( $id ); @@ -272,7 +272,7 @@ $jobs = array(); $jobs[] = MessageIndexRebuildJob::newJob(); - $reader = CdbReader::open( $this->cdb ); + $reader = \Cdb\Reader::open( $this->cdb ); $groups = unserialize( $reader->get( '#keys' ) ); $postponed = array(); diff --git a/ttmserver/TTMServer.php b/ttmserver/TTMServer.php index d1cf443..5ca6505 100644 --- a/ttmserver/TTMServer.php +++ b/ttmserver/TTMServer.php @@ -147,7 +147,7 @@ } $job = TTMServerMessageUpdateJob::newJob( $handle ); - $job->insert(); + JobQueueGroup::singleton()->push( $job ); return true; } diff --git a/utils/MessageChangeStorage.php b/utils/MessageChangeStorage.php index f56aa93..b10fe8c 100644 --- a/utils/MessageChangeStorage.php +++ b/utils/MessageChangeStorage.php @@ -19,7 +19,7 @@ * @param string $file Which file to use. */ public static function writeChanges( $array, $file ) { - $cache = CdbWriter::open( $file ); + $cache = \Cdb\Writer::open( $file ); $keys = array_keys( $array ); $cache->set( '#keys', serialize( $keys ) ); diff --git a/utils/MessageGroupCache.php b/utils/MessageGroupCache.php index 4f5713f..f5758ec 100644 --- a/utils/MessageGroupCache.php +++ b/utils/MessageGroupCache.php @@ -127,7 +127,7 @@ $hash = md5( file_get_contents( $this->group->getSourceFilePath( $this->code ) ) ); wfMkdirParents( dirname( $this->getCacheFileName() ) ); - $cache = CdbWriter::open( $this->getCacheFileName() ); + $cache = \Cdb\Writer::open( $this->getCacheFileName() ); $keys = array_keys( $messages ); $cache->set( '#keys', serialize( $keys ) ); @@ -234,7 +234,7 @@ */ protected function open() { if ( $this->cache === null ) { - $this->cache = CdbReader::open( $this->getCacheFileName() ); + $this->cache = \Cdb\Reader::open( $this->getCacheFileName() ); if ( $this->cache->get( '#version' ) !== '3' ) { $this->close(); unlink( $this->getCacheFileName() ); diff --git a/utils/MessageIndex.php b/utils/MessageIndex.php index fe89d0f..8958377 100644 --- a/utils/MessageIndex.php +++
[MediaWiki-commits] [Gerrit] Remove deprecated profiling calls - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274867 Change subject: Remove deprecated profiling calls .. Remove deprecated profiling calls Change-Id: If4f863a2fd041937a68772a84eb8750599f61d2b --- M api/ApiQueryMessageGroups.php M webservices/MicrosoftWebService.php 2 files changed, 0 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/67/274867/1 diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php index 6ef2dca..583798f 100644 --- a/api/ApiQueryMessageGroups.php +++ b/api/ApiQueryMessageGroups.php @@ -121,13 +121,10 @@ $subgroups = $mixed; } - wfProfileIn( __METHOD__ . '-' . get_class( $g ) ); - $a = array(); $groupId = $g->getId(); - wfProfileIn( __METHOD__ . '-basic' ); if ( isset( $props['id'] ) ) { $a['id'] = $groupId; } @@ -147,24 +144,18 @@ if ( isset( $props['namespace'] ) ) { $a['namespace'] = $g->getNamespace(); } - wfProfileOut( __METHOD__ . '-basic' ); - wfProfileIn( __METHOD__ . '-exists' ); if ( isset( $props['exists'] ) ) { $a['exists'] = $g->exists(); } - wfProfileOut( __METHOD__ . '-exists' ); - wfProfileIn( __METHOD__ . '-icon' ); if ( isset( $props['icon'] ) ) { $formats = TranslateUtils::getIcon( $g, $params['iconsize'] ); if ( $formats ) { $a['icon'] = $formats; } } - wfProfileOut( __METHOD__ . '-icon' ); - wfProfileIn( __METHOD__ . '-priority' ); if ( isset( $props['priority'] ) ) { $priority = MessageGroups::getPriority( $g ); $a['priority'] = $priority ?: 'default'; @@ -178,20 +169,15 @@ if ( isset( $props['priorityforce'] ) ) { $a['priorityforce'] = ( TranslateMetadata::get( $groupId, 'priorityforce' ) === 'on' ); } - wfProfileOut( __METHOD__ . '-priority' ); - wfProfileIn( __METHOD__ . '-workflowstates' ); if ( isset( $props['workflowstates'] ) ) { $a['workflowstates'] = $this->getWorkflowStates( $g ); } - wfProfileOut( __METHOD__ . '-workflowstates' ); Hooks::run( 'TranslateProcessAPIMessageGroupsProperties', array( &$a, $props, $params, $g ) ); - - wfProfileOut( __METHOD__ . '-' . get_class( $g ) ); // Depth only applies to tree format if ( $depth >= $params['depth'] && $params['format'] === 'tree' ) { diff --git a/webservices/MicrosoftWebService.php b/webservices/MicrosoftWebService.php index f3b464f..22488b0 100644 --- a/webservices/MicrosoftWebService.php +++ b/webservices/MicrosoftWebService.php @@ -44,9 +44,7 @@ $url .= wfArrayToCgi( $params ); $req = MWHttpRequest::factory( $url, $options ); - wfProfileIn( 'TranslateWebServiceRequest-' . $this->service . '-pairs' ); $status = $req->execute(); - wfProfileOut( 'TranslateWebServiceRequest-' . $this->service . '-pairs' ); if ( !$status->isOK() ) { $error = $req->getContent(); -- To view, visit https://gerrit.wikimedia.org/r/274867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4f863a2fd041937a68772a84eb8750599f61d2b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix incorrect variable name - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274866 Change subject: Fix incorrect variable name .. Fix incorrect variable name Change-Id: I36aa573f70c007eb815601be4be56f0ffeb6c7a2 --- M ttmserver/SolrTTMServer.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/66/274866/1 diff --git a/ttmserver/SolrTTMServer.php b/ttmserver/SolrTTMServer.php index 34e6da8..db5f192 100644 --- a/ttmserver/SolrTTMServer.php +++ b/ttmserver/SolrTTMServer.php @@ -290,7 +290,7 @@ foreach ( $batch as $key => $data ) { list( $handle, $sourceLanguage, $text ) = $data; $revId = $handle->getTitleForLanguage( $sourceLanguage )->getLatestRevID(); - $doc = $this->createDocument( $handle, $text, $id ); + $doc = $this->createDocument( $handle, $text, $revId ); // Add document and commit within X seconds. $update->addDocument( $doc, null, self::COMMIT_WITHIN ); } -- To view, visit https://gerrit.wikimedia.org/r/274866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36aa573f70c007eb815601be4be56f0ffeb6c7a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update exchange rates when missing - change (mediawiki/vagrant)
Ejegg has submitted this change and it was merged. Change subject: Update exchange rates when missing .. Update exchange rates when missing Also corrects mysql existence test for civicrm_domain. Mysql still returns with exit code 0 on empty result set. Change-Id: I72560eb497028ead6f3d6a1adf1ecbd3d798cae4 --- M puppet/modules/crm/manifests/civicrm.pp M puppet/modules/crm/manifests/drupal.pp 2 files changed, 7 insertions(+), 1 deletion(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/crm/manifests/civicrm.pp b/puppet/modules/crm/manifests/civicrm.pp index 1999d24..df56792 100644 --- a/puppet/modules/crm/manifests/civicrm.pp +++ b/puppet/modules/crm/manifests/civicrm.pp @@ -11,7 +11,7 @@ exec { 'civicrm_setup': command => "/usr/bin/php5 ${install_script}", -unless => "/usr/bin/mysql -u ${::crm::db_user} -p${::crm::db_pass} ${::crm::civicrm_db} -e 'select count(*) from civicrm_domain'", +unless => "/usr/bin/mysql -u ${::crm::db_user} -p${::crm::db_pass} ${::crm::civicrm_db} -B -N -e 'select 1 from civicrm_domain' | grep -q 1", require => [ File[ $install_script, diff --git a/puppet/modules/crm/manifests/drupal.pp b/puppet/modules/crm/manifests/drupal.pp index 585e81e..fdf8d5e 100644 --- a/puppet/modules/crm/manifests/drupal.pp +++ b/puppet/modules/crm/manifests/drupal.pp @@ -112,4 +112,10 @@ File['drupal_settings_php'], ], } + +exec { 'update_exchange_rates': +command => inline_template('<%= scope["::crm::drush::wrapper"] %> exchange-rates-update'), +unless=> "/usr/bin/mysql -u '${::crm::db_user}' -p'${::crm::db_pass}' '${::crm::drupal_db}' -B -N -e 'select 1 from exchange_rates') | grep -q 1", +subscribe => Exec['enable_drupal_modules'], +} } -- To view, visit https://gerrit.wikimedia.org/r/274633 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I72560eb497028ead6f3d6a1adf1ecbd3d798cae4 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: AwightGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Katie Horn Gerrit-Reviewer: Pcoombe Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Various cleanups pulled out of another patch - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Various cleanups pulled out of another patch .. Various cleanups pulled out of another patch Change-Id: Ife46877f97644ee018b730f858f8441c56bc37f8 --- M lib/html2wt/DOMDiff.js M lib/html2wt/LinkHandler.js M lib/html2wt/WikitextSerializer.js M lib/utils/DOMUtils.js M lib/utils/Util.js M lib/wt2html/pp/cleanup.js M lib/wt2html/tt/LinkHandler.js 7 files changed, 7 insertions(+), 26 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/html2wt/DOMDiff.js b/lib/html2wt/DOMDiff.js index b1c8582..78353b1 100644 --- a/lib/html2wt/DOMDiff.js +++ b/lib/html2wt/DOMDiff.js @@ -44,7 +44,7 @@ // moved around without their content which occasionally leads to incorrect // DSR being used by selser. Hard to describe a reduced test case here. // Discovered via: /mnt/bugs/2013-05-01T09:43:14.960Z-Reverse_innovation - // 'data-parsoid': 1, + // 'data-parsoid', 'data-parsoid-diff', 'about', ]); diff --git a/lib/html2wt/LinkHandler.js b/lib/html2wt/LinkHandler.js index 364b5af..fa94aaf 100644 --- a/lib/html2wt/LinkHandler.js +++ b/lib/html2wt/LinkHandler.js @@ -132,9 +132,7 @@ // Check if the link content has been modified. // FIXME: This will only work with selser of course. Hard to test without selser. - var pd = DU.loadDataAttrib(node, "parsoid-diff", {}); - var changes = pd.diff || []; - if (changes.indexOf('subtree-changed') !== -1) { + if (DU.hasDiffMark(node, env, 'subtree-changed')) { rtData.contentModified = true; } diff --git a/lib/html2wt/WikitextSerializer.js b/lib/html2wt/WikitextSerializer.js index ac60914..c06882b 100644 --- a/lib/html2wt/WikitextSerializer.js +++ b/lib/html2wt/WikitextSerializer.js @@ -261,7 +261,7 @@ // in v2/v3 API when there is no matching data-parsoid entry found // for this id. if (k === "id" && /^mw[\w-]{2,}$/.test(kv.v)) { - if (!node.getAttribute("data-parsoid")) { + if (DU.isNewElt(node)) { this.env.log("warning/html2wt", "Parsoid id found on element without a matching data-parsoid " + "entry: ID=" + kv.v + "; ELT=" + node.outerHTML); diff --git a/lib/utils/DOMUtils.js b/lib/utils/DOMUtils.js index 35443ca..e295a52 100644 --- a/lib/utils/DOMUtils.js +++ b/lib/utils/DOMUtils.js @@ -2053,7 +2053,7 @@ DU.addNormalizedAttribute(node, 'id', uid, origId); } docDp.ids[uid] = dp; - DU.getNodeData(node).parsoid = undefined; + DU.setDataParsoid(node, undefined); // It would be better to instrument all the load sites. node.removeAttribute('data-parsoid'); }, diff --git a/lib/utils/Util.js b/lib/utils/Util.js index 4e6a260..d4495fb 100644 --- a/lib/utils/Util.js +++ b/lib/utils/Util.js @@ -1315,22 +1315,6 @@ }, }; -// FIXME: There is also a DOMUtils.getJSONAttribute. Consolidate -Util.getJSONAttribute = function(node, attr, fallback) { - fallback = fallback || null; - var atext; - if (node && node.getAttribute && typeof node.getAttribute === 'function') { - atext = node.getAttribute(attr); - if (atext) { - return JSON.parse(atext); - } else { - return fallback; - } - } else { - return fallback; - } -}; - /** * @property linkTrailRegex * diff --git a/lib/wt2html/pp/cleanup.js b/lib/wt2html/pp/cleanup.js index fe82e16..0ffae22 100644 --- a/lib/wt2html/pp/cleanup.js +++ b/lib/wt2html/pp/cleanup.js @@ -177,7 +177,7 @@ // This is only needed for the last top-level node . && (!dp.stx || tplInfo.last !== node)) ) { - DU.getNodeData(node).parsoid = undefined; + DU.setDataParsoid(node, undefined); node.removeAttribute("data-parsoid"); // Store for v2/v3 purposes. } else if (env.storeDataParsoid) { diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js index 60320e3..fa35b12 100644 --- a/lib/wt2html/tt/LinkHandler.js +++ b/lib/wt2html/tt/LinkHandler.js @@ -513,13 +513,12 @@ inVals, this.options.wrapTemplates, function(_, outVals) { - var sortKeyInfo = outVals; var dataMW = newTk.getAttribute("data-mw");
[MediaWiki-commits] [Gerrit] Cleanup + tweaks of arg formatting for clarity + fewer dirty... - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Cleanup + tweaks of arg formatting for clarity + fewer dirty diffs .. Cleanup + tweaks of arg formatting for clarity + fewer dirty diffs * Separate code paths for positional and named args since formatting only applies to named args. Formatting of positional args is buggy and can change semantics. * See https://phabricator.wikimedia.org/T128337#2080275 * This fix should prevent diffs like the following: https://it.wikipedia.org/w/index.php?title=Aleksandra_Michajlovna_Kollontaj=79272986 * Don't always add a space after a '|' in block format. Add that space to the default block-space format which is used only when spc property is not present in data-parsoid. * The change in parser tests is from the normalization of an inline transclusion that doesn't have data-parsoid recorded in the parser test which leads the serializer to treat it as new content. Not worth the effort to add data-parsoid to the tests to eliminate this html2html failure. Change-Id: I83c58acf2e2900dfa0fc2eb4daa57c58402c5797 --- M lib/html2wt/WikitextSerializer.js M tests/parserTests-blacklist.js 2 files changed, 38 insertions(+), 37 deletions(-) Approvals: Arlolra: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/html2wt/WikitextSerializer.js b/lib/html2wt/WikitextSerializer.js index ac60914..6a0e01a 100644 --- a/lib/html2wt/WikitextSerializer.js +++ b/lib/html2wt/WikitextSerializer.js @@ -526,25 +526,23 @@ // of edited transclusions which don't have valid // templatedata formatting information. - var defaultBlockSpc = ['', ' ', ' ', '']; // "foo = bar" - var defaultInlineSpc = ['', '', '', '']; // "foo=bar" + var defaultBlockSpc = [' ', ' ', ' ', '\n']; // "| foo = bar\n" + var defaultInlineSpc = ['', '', '', '']; // "|foo=bar" // FIXME: Do a full regexp test maybe? if (/.*"mediawiki.org\/specs\/data-parsoid\/0.0.1"$/.test(env.page.dpContentType)) { // For previous versions of data-parsoid, - // wt2html pipeline used 'foo = bar' style args + // wt2html pipeline used "|foo = bar" style args // as the default. defaultInlineSpc = ['', ' ', ' ', '']; } var format = tplData && tplData.format ? tplData.format.toLowerCase() : null; - var useBlockFormat = (format === 'block'); - var useInlineFormat = (format === 'inline' || DU.isNewElt(node)); - if (useBlockFormat) { - if (!TRAILING_COMMENT_OR_WS_AFTER_NL_REGEXP.test(buf)) { - buf += '\n'; - } + var useBlockFormat = format === 'block'; + var useInlineFormat = format === 'inline' || (!useBlockFormat && DU.isNewElt(node)); + if (useBlockFormat && !TRAILING_COMMENT_OR_WS_AFTER_NL_REGEXP.test(buf)) { + buf += '\n'; } else if (useInlineFormat) { - buf = buf.replace(/\s*$/, ''); + buf = buf.replace(/\n/g, ' ').trim(); } for (var i = 0; i < argBuf.length; i++) { @@ -553,7 +551,14 @@ var arg = argBuf[i]; var name = arg.name; var val = arg.value; - if (name !== null) { + if (name === null) { + // We are serializing a positional parameter. + // Whitespace is significant for these and + // formatting would change semantics. + buf += val; + } else { + // We are serializing a named parameter. + // arg.value has had its whitespace trimmed already. var spc; if (name === '') { // No spacing for blank parameters ({{foo|=bar}}) @@ -563,36 +568,31 @@ // ever a problem. spc = ['', '', '', '']; } else { - // Default to inline-arg spacing 'foo=bar' - // block-arg spacing is 'foo = bar' + // Preserve existing spacing. + // Otherwise, follow TemplateData's lead. spc = (dpArgInfoMap.get(arg.dpKey) || {}).spc; if (!spc) { +
[MediaWiki-commits] [Gerrit] Remove unnecessary DonationInterface configuration - change (mediawiki/vagrant)
Ejegg has submitted this change and it was merged. Change subject: Remove unnecessary DonationInterface configuration .. Remove unnecessary DonationInterface configuration We've deprecated this whole situation. Change-Id: Id63492509fb84a69cd3f2be8e3d958d12c5d9817 --- M puppet/modules/payments/manifests/donation_interface.pp 1 file changed, 0 insertions(+), 8 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/payments/manifests/donation_interface.pp b/puppet/modules/payments/manifests/donation_interface.pp index ebb7f6e..90d1906 100644 --- a/puppet/modules/payments/manifests/donation_interface.pp +++ b/puppet/modules/payments/manifests/donation_interface.pp @@ -24,14 +24,6 @@ # donation.api.php will rely on a test class. wgDonationInterfaceTestMode => false, - # TODO: the following cruft is brought to u by a forward reference snafu. - # Better if DonationInterfaceFormSettings would use relative paths? - wgAdyenGatewayHtmlFormDir=> "${DI}/adyen_gateway/forms/html", - wgAmazonGatewayHtmlFormDir => "${DI}/amazon_gateway/forms/html", - wgGlobalCollectGatewayHtmlFormDir=> "${DI}/globalcollect_gateway/forms/html", - wgPayflowProGatewayHtmlFormDir => "${DI}/payflowpro_gateway/forms/html", - wgPaypalGatewayHtmlFormDir => "${DI}/paypal_gateway/forms/html", - wgAdyenGatewayAccountInfo=> { 'test' => { 'AccountName' => 'test', -- To view, visit https://gerrit.wikimedia.org/r/274338 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id63492509fb84a69cd3f2be8e3d958d12c5d9817 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: AwightGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Katie Horn Gerrit-Reviewer: Pcoombe Gerrit-Reviewer: XenoRyet 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 private method - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274865 Change subject: Remove unused private method .. Remove unused private method Change-Id: I73c21207f5cd184a67c72117d5640eb0e71e4d02 --- M specials/SpecialTranslations.php 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/65/274865/1 diff --git a/specials/SpecialTranslations.php b/specials/SpecialTranslations.php index 80a7938..01bb95b 100644 --- a/specials/SpecialTranslations.php +++ b/specials/SpecialTranslations.php @@ -285,18 +285,6 @@ } /** -* Get code for a page name -* -* @param string $name Page title (f.e. "MediaWiki:Main_page/nl"). -* @return string Language code -*/ - private function getCode( $name ) { - $from = strrpos( $name, '/' ); - - return substr( $name, $from + 1 ); - } - - /** * Add JavaScript assets */ private function includeAssets() { -- To view, visit https://gerrit.wikimedia.org/r/274865 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73c21207f5cd184a67c72117d5640eb0e71e4d02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing console.log - change (analytics/dashiki)
Nuria has submitted this change and it was merged. Change subject: Removing console.log .. Removing console.log Change-Id: I93d270f03b1383e778640d909ce10c9b703b4c41 --- M src/components/visualizers/wikimetrics/wikimetrics.js 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Nuria: Verified; Looks good to me, approved diff --git a/src/components/visualizers/wikimetrics/wikimetrics.js b/src/components/visualizers/wikimetrics/wikimetrics.js index 25d3c12..ec47866 100644 --- a/src/components/visualizers/wikimetrics/wikimetrics.js +++ b/src/components/visualizers/wikimetrics/wikimetrics.js @@ -43,7 +43,6 @@ //invoqued when all promises are done $.when.apply(this, promises).then(function () { var timeseriesData = _.flatten(arguments); - console.log(TimeseriesData.mergeAll(_.toArray(timeseriesData))); this.mergedData(TimeseriesData.mergeAll(_.toArray(timeseriesData))); this.applyColors(projects); }.bind(this)); -- To view, visit https://gerrit.wikimedia.org/r/274811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I93d270f03b1383e778640d909ce10c9b703b4c41 Gerrit-PatchSet: 1 Gerrit-Project: analytics/dashiki Gerrit-Branch: master Gerrit-Owner: NuriaGerrit-Reviewer: Milimetric Gerrit-Reviewer: Nuria ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove Friesland Bank - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: remove Friesland Bank .. remove Friesland Bank Change-Id: I6988a393c7769e8be14e1552911db84af5dca909 --- M globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html M globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html M globalcollect_gateway/globalcollect.adapter.php M tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTest.php 4 files changed, 3 insertions(+), 6 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html index 3bec148..788d783 100644 --- a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html +++ b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html @@ -77,7 +77,6 @@ %donate_interface-rtbt-issuer_id%... ABN AMRO - Friesland Bank ING Rabobank SNS Bank diff --git a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html index ce375db..cadf429 100644 --- a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html +++ b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html @@ -76,7 +76,6 @@ %donate_interface-rtbt-issuer_id%... ABN AMRO - Friesland Bank ING Rabobank SNS Bank @@ -147,4 +146,4 @@ \ No newline at end of file + --> diff --git a/globalcollect_gateway/globalcollect.adapter.php b/globalcollect_gateway/globalcollect.adapter.php index 3868111..4ef3f91 100644 --- a/globalcollect_gateway/globalcollect.adapter.php +++ b/globalcollect_gateway/globalcollect.adapter.php @@ -1146,7 +1146,6 @@ 511 => 'Triodos Bank', 721 => 'ING', 751 => 'SNS Bank', - 91 => 'Friesland Bank', 801 => 'Knab', ) ); diff --git a/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTest.php b/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTest.php index 9cf100b..d9e5d77 100644 --- a/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTest.php +++ b/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTest.php @@ -131,7 +131,7 @@ /** * testBuildRequestXmlWithIssuerId91 * -* Friesland Bank: 91 +* Rabobank: 21 * * @covers GatewayAdapter::__construct * @covers GatewayAdapter::setCurrentTransaction @@ -145,7 +145,7 @@ 'payment_method' => 'rtbt', 'payment_submethod' => 'rtbt_ideal', 'payment_product_id' => 809, - 'issuer_id' => 91, + 'issuer_id' => 21, ); //somewhere else? -- To view, visit https://gerrit.wikimedia.org/r/274828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6988a393c7769e8be14e1552911db84af5dca909 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: CdentingerGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Ssmith Gerrit-Reviewer: XenoRyet Gerrit-Reviewer:
[MediaWiki-commits] [Gerrit] Add caching headers for nginx - change (operations/puppet)
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/274864 Change subject: Add caching headers for nginx .. Add caching headers for nginx Bug: T126730 Change-Id: I7478cbd48b04372c1a68a677e47efa1fbd9a03a7 --- M modules/wdqs/templates/nginx.erb 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/64/274864/1 diff --git a/modules/wdqs/templates/nginx.erb b/modules/wdqs/templates/nginx.erb index 6c44a6b..7194720 100644 --- a/modules/wdqs/templates/nginx.erb +++ b/modules/wdqs/templates/nginx.erb @@ -55,16 +55,18 @@ add_header X-Served-By <%= @hostname %> always; add_header Access-Control-Allow-Origin * always; + add_header Cache-Control "public, max-age=60, s-maxage=60"; + add_header Vary Accept; client_max_body_size 10M; client_body_buffer_size 1m; proxy_intercept_errors on; proxy_buffering on; -proxy_buffer_size 128k; -proxy_buffers 256 16k; -proxy_busy_buffers_size 256k; -proxy_temp_file_write_size 256k; -proxy_max_temp_file_size 0; +proxy_buffer_size 8k; +proxy_buffers 256 8k; +proxy_busy_buffers_size 16k; +proxy_temp_file_write_size 16k; +proxy_max_temp_file_size 10m; proxy_read_timeout 300; limit_except GET OPTIONS { -- To view, visit https://gerrit.wikimedia.org/r/274864 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7478cbd48b04372c1a68a677e47efa1fbd9a03a7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Smalyshev___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix parserTests.php script - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix parserTests.php script .. Fix parserTests.php script * Follow up to 60e4f3fd Change-Id: If1370a720da21c3662fda4100c96b1758ddc1dc0 --- M includes/context/RequestContext.php M tests/parserTests.php 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php index 63b4f71..35ee1b7 100644 --- a/includes/context/RequestContext.php +++ b/includes/context/RequestContext.php @@ -496,7 +496,7 @@ * Resets singleton returned by getMain(). Should be called only from unit tests. */ public static function resetMain() { - if ( !defined( 'MW_PHPUNIT_TEST' ) ) { + if ( !( defined( 'MW_PHPUNIT_TEST' ) || defined( 'MW_PARSER_TEST' ) ) ) { throw new MWException( __METHOD__ . '() should be called only from unit tests!' ); } self::$instance = null; diff --git a/tests/parserTests.php b/tests/parserTests.php index 7e6f68c..b3cb89a 100644 --- a/tests/parserTests.php +++ b/tests/parserTests.php @@ -24,6 +24,8 @@ * @ingroup Testing */ +define( 'MW_PARSER_TEST', true ); + $options = [ 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled', 'run-parsoid' ]; $optionsWithArgs = [ 'regex', 'filter', 'seed', 'setversion', 'file' ]; -- To view, visit https://gerrit.wikimedia.org/r/274861 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1370a720da21c3662fda4100c96b1758ddc1dc0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: ArlolraGerrit-Reviewer: Arlolra Gerrit-Reviewer: Cscott Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set $wgShowExceptionDetails = true; in LocalSettings.php - change (integration/config)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/274863 Change subject: Set $wgShowExceptionDetails = true; in LocalSettings.php .. Set $wgShowExceptionDetails = true; in LocalSettings.php * See https://integration.wikimedia.org/ci/job/parsoidsvc-php-parsertests/6957/console Change-Id: I44014859c468fa0bf28d29d28229df106e0915bf --- M jjb/macro.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/63/274863/1 diff --git a/jjb/macro.yaml b/jjb/macro.yaml index fbc4fcd..3509ef8 100644 --- a/jjb/macro.yaml +++ b/jjb/macro.yaml @@ -313,6 +313,7 @@ "\$wgScriptPath = '${MW_SCRIPT_PATH}';\n"\ "\$wgScript = \$wgStylePath = \$wgLogo = false;\n"\ "\$wgResourceBasePath = null;\n"\ + "\$wgShowExceptionDetails = true;\n"\ "\$wgEnableJavaScriptTest = true;\n?>\n" >> "$MW_INSTALL_PATH/LocalSettings.php" # The location is free or we make it free -- To view, visit https://gerrit.wikimedia.org/r/274863 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44014859c468fa0bf28d29d28229df106e0915bf Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Bump various devDependencies - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: build: Bump various devDependencies .. build: Bump various devDependencies karma-chrome-launcher: 0.1.7 -> 0.1.8 Change-Id: Ieeb6dbcd3e6d9f6f0fb9865d356da462b9b0499b --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index 9f27d5f..de02397 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "grunt-jscs-checker": "0.4.1", "grunt-karma": "0.10.1", "karma": "0.12.31", -"karma-chrome-launcher": "0.1.7", +"karma-chrome-launcher": "0.1.8", "karma-firefox-launcher": "0.1.4", "karma-qunit": "0.1.4", "qunitjs": "1.16.0" -- To view, visit https://gerrit.wikimedia.org/r/274846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieeb6dbcd3e6d9f6f0fb9865d356da462b9b0499b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_23 Gerrit-Owner: KrinkleGerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Mark all as read should not apply to cross-wiki bundles - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Mark all as read should not apply to cross-wiki bundles .. Mark all as read should not apply to cross-wiki bundles Skip foreign bundles on 'mark all as read' operation, and mark as read the items available in the popup. Bug: T128621 Change-Id: I431b1ea94ab1c4942bd3de38753f113a4e2ae22f --- M modules/viewmodel/mw.echo.dm.NotificationGroupItem.js M modules/viewmodel/mw.echo.dm.NotificationsModel.js 2 files changed, 5 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js b/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js index 8607bef..3cda303 100644 --- a/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js +++ b/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js @@ -61,7 +61,7 @@ { type: this.getType(), source: source, - foreign: this.foreign, + foreign: this.isForeign(), title: this.sources[ source ].title, removeReadNotifications: this.removeReadNotifications } diff --git a/modules/viewmodel/mw.echo.dm.NotificationsModel.js b/modules/viewmodel/mw.echo.dm.NotificationsModel.js index 49a7ee8..9feea72 100644 --- a/modules/viewmodel/mw.echo.dm.NotificationsModel.js +++ b/modules/viewmodel/mw.echo.dm.NotificationsModel.js @@ -360,6 +360,7 @@ mw.echo.dm.NotificationsModel.prototype.markAllRead = function () { var i, len, items = this.unreadNotifications.getItems(), + itemIds = [], length = items.length; // Skip if this is an automatic "mark as read" and this model is @@ -383,15 +384,16 @@ this.markingAllAsRead = true; for ( i = 0, len = items.length; i < len; i++ ) { // Skip items that are foreign if we are in automatic 'mark all as read' - if ( !items[ i ].isForeign() || !this.autoMarkReadInProcess ) { + if ( !items[ i ].isForeign() ) { items[ i ].toggleRead( true ); items[ i ].toggleSeen( true ); this.unreadNotifications.removeItems( [ items[ i ] ] ); + itemIds.push( items[ i ].getId() ); } } this.markingAllAsRead = false; - return this.api.markAllRead( this.getSource(), this.getType() ); + return this.api.markItemsRead( itemIds, this.getSource(), this.getType() ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/274480 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I431b1ea94ab1c4942bd3de38753f113a4e2ae22f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: MooeypooGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] sajax: Explicitly specify released under 3-clause BSD license - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: sajax: Explicitly specify released under 3-clause BSD license .. sajax: Explicitly specify released under 3-clause BSD license Bug: T128348 Change-Id: I39f1c1f2319088005099b0ce5f30d1dfb3c27776 --- M skins/common/ajax.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/skins/common/ajax.js b/skins/common/ajax.js index c017e3c..ab0c793 100644 --- a/skins/common/ajax.js +++ b/skins/common/ajax.js @@ -1,7 +1,7 @@ /** * Remote Scripting Library * Copyright 2005 modernmethod, inc - * Under the open source BSD license + * Under the 3-clause BSD license * http://www.modernmethod.com/sajax/ */ -- To view, visit https://gerrit.wikimedia.org/r/274757 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I39f1c1f2319088005099b0ce5f30d1dfb3c27776 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_23 Gerrit-Owner: LegoktmGerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Waldir Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Echo API layer - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Echo API layer .. Echo API layer Split and refactor Echo network handling and create a proper API layer for the UI to use consistently. Split Echo's API methods into its own module so they can be loaded along with the initialization script and manage the API requests. Change-Id: I0526a14bb8cc0d9729a303e24ab6e43259cc86bb --- M Resources.php A modules/api/mw.echo.api.APIHandler.js A modules/api/mw.echo.api.EchoApi.js A modules/api/mw.echo.api.ForeignAPIHandler.js A modules/api/mw.echo.api.LocalAPIHandler.js A modules/api/mw.echo.api.NetworkHandler.js A modules/api/mw.echo.api.js M modules/ext.echo.init.js M modules/ooui/mw.echo.ui.NotificationBadgeWidget.js D modules/viewmodel/handlers/mw.echo.dm.APIHandler.js D modules/viewmodel/handlers/mw.echo.dm.ForeignAPIHandler.js D modules/viewmodel/handlers/mw.echo.dm.LocalAPIHandler.js D modules/viewmodel/handlers/mw.echo.dm.NetworkHandler.js M modules/viewmodel/mw.echo.dm.NotificationGroupItem.js M modules/viewmodel/mw.echo.dm.NotificationsModel.js M tests/qunit/viewmodel/test_mw.echo.dm.NotificationsModel.js 16 files changed, 735 insertions(+), 673 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index 4e88e2d..399c537 100644 --- a/Resources.php +++ b/Resources.php @@ -117,23 +117,34 @@ 'viewmodel/mw.echo.dm.js', 'viewmodel/mw.echo.dm.List.js', 'viewmodel/mw.echo.dm.SortedList.js', - 'viewmodel/handlers/mw.echo.dm.APIHandler.js', - 'viewmodel/handlers/mw.echo.dm.LocalAPIHandler.js', - 'viewmodel/handlers/mw.echo.dm.ForeignAPIHandler.js', - 'viewmodel/handlers/mw.echo.dm.NetworkHandler.js', 'viewmodel/mw.echo.dm.NotificationItem.js', 'viewmodel/mw.echo.dm.NotificationGroupItem.js', 'viewmodel/mw.echo.dm.NotificationList.js', 'viewmodel/mw.echo.dm.NotificationsModel.js', ), 'dependencies' => array( - 'mediawiki.api', - 'mediawiki.ForeignApi', - 'oojs' + 'oojs', + 'ext.echo.api', ), 'messages' => array( 'echo-api-failure', 'echo-api-failure-cross-wiki', + ), + 'targets' => array( 'desktop', 'mobile' ), + ), + 'ext.echo.api' => $echoResourceTemplate + array( + 'scripts' => array( + 'api/mw.echo.api.js', + 'api/mw.echo.api.EchoApi.js', + 'api/mw.echo.api.APIHandler.js', + 'api/mw.echo.api.LocalAPIHandler.js', + 'api/mw.echo.api.ForeignAPIHandler.js', + 'api/mw.echo.api.NetworkHandler.js', + ), + 'dependencies' => array( + 'mediawiki.api', + 'mediawiki.ForeignApi', + 'oojs' ), 'targets' => array( 'desktop', 'mobile' ), ), @@ -154,6 +165,7 @@ 'scripts' => array( 'ext.echo.init.js', ), + 'dependencies' => array( 'ext.echo.api' ), 'targets' => array( 'desktop' ), ), // Base no-js styles diff --git a/modules/api/mw.echo.api.APIHandler.js b/modules/api/mw.echo.api.APIHandler.js new file mode 100644 index 000..b16c1ff --- /dev/null +++ b/modules/api/mw.echo.api.APIHandler.js @@ -0,0 +1,167 @@ +( function ( mw, $ ) { + /** +* Abstract notification API handler +* +* @abstract +* @class +* +* @constructor +* @param {Object} [config] Configuration object +* @cfg {number} [limit=25] The limit on how many notifications to fetch +* @cfg {string} [userLang=mw.config.get( 'wgUserLanguage' )] User language. Defaults +* to the default user language configuration settings. +*/ + mw.echo.api.APIHandler = function MwEchoApiAPIHandler( config ) { + config = config || {}; + + this.fetchNotificationsPromise = {}; + this.apiErrorState = {}; + + this.limit = config.limit || 25; + this.userLang = config.userLang || mw.config.get( 'wgUserLanguage' ); + + this.api = null; + + // Map the logical type to the type + // that the API recognizes + this.normalizedType = { + message: 'message', + alert: 'alert', +
[MediaWiki-commits] [Gerrit] Fix static method invocation via $this - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274862 Change subject: Fix static method invocation via $this .. Fix static method invocation via $this Change-Id: I4a4799095b07495a8be5645098e6591408151f6f --- M ffs/GettextFFS.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/62/274862/1 diff --git a/ffs/GettextFFS.php b/ffs/GettextFFS.php index 4fc91a9..35cbe0b 100644 --- a/ffs/GettextFFS.php +++ b/ffs/GettextFFS.php @@ -506,13 +506,13 @@ if ( preg_match( '/{{PLURAL:GETTEXT/i', $msgid ) ) { $forms = $this->splitPlural( $msgid, 2 ); - $content .= 'msgid ' . $this->escape( $forms[0] ) . "\n"; - $content .= 'msgid_plural ' . $this->escape( $forms[1] ) . "\n"; + $content .= 'msgid ' . self::escape( $forms[0] ) . "\n"; + $content .= 'msgid_plural ' . self::escape( $forms[1] ) . "\n"; try { $forms = $this->splitPlural( $msgstr, $pluralCount ); foreach ( $forms as $index => $form ) { - $content .= "msgstr[$index] " . $this->escape( $form ) . "\n"; + $content .= "msgstr[$index] " . self::escape( $form ) . "\n"; } } catch ( GettextPluralException $e ) { $flags[] = 'invalid-plural'; -- To view, visit https://gerrit.wikimedia.org/r/274862 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a4799095b07495a8be5645098e6591408151f6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix parserTests.php script - change (mediawiki/core)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/274861 Change subject: Fix parserTests.php script .. Fix parserTests.php script * Follow up to 60e4f3fd Change-Id: If1370a720da21c3662fda4100c96b1758ddc1dc0 --- M includes/context/RequestContext.php M tests/parserTests.php 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/61/274861/1 diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php index 63b4f71..35ee1b7 100644 --- a/includes/context/RequestContext.php +++ b/includes/context/RequestContext.php @@ -496,7 +496,7 @@ * Resets singleton returned by getMain(). Should be called only from unit tests. */ public static function resetMain() { - if ( !defined( 'MW_PHPUNIT_TEST' ) ) { + if ( !( defined( 'MW_PHPUNIT_TEST' ) || defined( 'MW_PARSER_TEST' ) ) ) { throw new MWException( __METHOD__ . '() should be called only from unit tests!' ); } self::$instance = null; diff --git a/tests/parserTests.php b/tests/parserTests.php index 7e6f68c..b3cb89a 100644 --- a/tests/parserTests.php +++ b/tests/parserTests.php @@ -24,6 +24,8 @@ * @ingroup Testing */ +define( 'MW_PARSER_TEST', true ); + $options = [ 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled', 'run-parsoid' ]; $optionsWithArgs = [ 'regex', 'filter', 'seed', 'setversion', 'file' ]; -- To view, visit https://gerrit.wikimedia.org/r/274861 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1370a720da21c3662fda4100c96b1758ddc1dc0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove superfluous newlines - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/274860 Change subject: Remove superfluous newlines .. Remove superfluous newlines Change-Id: Ib0a148917ec8a74f2f38a2623cf7f03c8d1bbce2 --- M MessageGroups.php M Resources.php M Translate.php M stash/TranslationStashStorage.php M utils/ArrayFlattener.php M utils/MessageIndex.php M utils/TranslationHelpers.php 7 files changed, 0 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/60/274860/1 diff --git a/MessageGroups.php b/MessageGroups.php index 5595438..dfb90c3 100644 --- a/MessageGroups.php +++ b/MessageGroups.php @@ -67,7 +67,6 @@ $this->groups = $groups; } - /** * Immediately update the cache. * @@ -292,7 +291,6 @@ public static function exists( $id ) { return (bool)self::getGroup( $id ); } - /** * Check if a particular aggregate group label exists diff --git a/Resources.php b/Resources.php index d84367f..8fbbc4e 100644 --- a/Resources.php +++ b/Resources.php @@ -512,7 +512,6 @@ 'scripts' => 'resources/js/ext.translate.storage.js', ) + $resourcePaths; - $wgResourceModules['ext.translate.tabgroup'] = array( 'styles' => 'resources/css/ext.translate.tabgroup.css', 'position' => 'top', diff --git a/Translate.php b/Translate.php index 52355cb..ea07e09 100644 --- a/Translate.php +++ b/Translate.php @@ -167,7 +167,6 @@ $wgHooks['TranslatePostInitGroups'][] = 'MessageGroups::getWorkflowGroups'; $wgHooks['TranslatePostInitGroups'][] = 'MessageGroups::getAggregateGroups'; - // Other extensions $wgHooks['AdminLinks'][] = 'TranslateHooks::onAdminLinks'; $wgHooks['MergeAccountFromTo'][] = 'TranslateHooks::onMergeAccountFromTo'; @@ -203,7 +202,6 @@ require "$dir/Resources.php"; /** @endcond */ - # == Configuration variables == diff --git a/stash/TranslationStashStorage.php b/stash/TranslationStashStorage.php index 501beb6..f8bda4e 100644 --- a/stash/TranslationStashStorage.php +++ b/stash/TranslationStashStorage.php @@ -40,7 +40,6 @@ $this->db->replace( $this->dbTable, $indexes, $row, __METHOD__ ); } - /** * Gets all stashed translations for the given user. * @param User $user diff --git a/utils/ArrayFlattener.php b/utils/ArrayFlattener.php index 6eba2c4..8845ef1 100644 --- a/utils/ArrayFlattener.php +++ b/utils/ArrayFlattener.php @@ -46,7 +46,6 @@ return $flat; } - /** * Performs the reverse operation of flatten. * diff --git a/utils/MessageIndex.php b/utils/MessageIndex.php index 6d63fb4..fe89d0f 100644 --- a/utils/MessageIndex.php +++ b/utils/MessageIndex.php @@ -622,7 +622,6 @@ } } - /** * Storage on hash. * diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php index 57772cd..83d5750 100644 --- a/utils/TranslationHelpers.php +++ b/utils/TranslationHelpers.php @@ -613,7 +613,6 @@ return Html::element( 'pre', array( 'id' => $id, 'style' => 'display: none;' ), $text ); } - /** * Ajax-enabled message editing link. * @param $target Title: Title of the target message. -- To view, visit https://gerrit.wikimedia.org/r/274860 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0a148917ec8a74f2f38a2623cf7f03c8d1bbce2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DonationInterface submodule - change (mediawiki/core)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/274859 Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: Ib38d092521bf371b162049fa3640c431223fd64a --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/274859/1 diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 2476e17..86e4c46 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 2476e178583486dc988e30273aea5b2595ee21a7 +Subproject commit 86e4c46a8e1dcd65045790b2ea742f19ec0bda91 -- To view, visit https://gerrit.wikimedia.org/r/274859 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib38d092521bf371b162049fa3640c431223fd64a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_25 Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DonationInterface submodule - change (mediawiki/core)
Ejegg has submitted this change and it was merged. Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: Ib38d092521bf371b162049fa3640c431223fd64a --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 2476e17..86e4c46 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 2476e178583486dc988e30273aea5b2595ee21a7 +Subproject commit 86e4c46a8e1dcd65045790b2ea742f19ec0bda91 -- To view, visit https://gerrit.wikimedia.org/r/274859 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib38d092521bf371b162049fa3640c431223fd64a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_25 Gerrit-Owner: EjeggGerrit-Reviewer: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add empty composer.json - change (mediawiki/vendor)
jenkins-bot has submitted this change and it was merged. Change subject: Add empty composer.json .. Add empty composer.json Change-Id: Ib82a27f66edddee7b8b017fd8ae36a5fd69779b0 --- M .gitreview A composer.json 2 files changed, 15 insertions(+), 2 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitreview b/.gitreview index 81e60f6..519291c 100644 --- a/.gitreview +++ b/.gitreview @@ -1,6 +1,6 @@ [gerrit] host=gerrit.wikimedia.org port=29418 -project=mediawiki/core/vendor.git -defaultbranch=master +project=mediawiki/vendor.git +defaultbranch=REL1_23 defaultrebase=0 diff --git a/composer.json b/composer.json new file mode 100644 index 000..1fcb9ec --- /dev/null +++ b/composer.json @@ -0,0 +1,13 @@ +{ + "config": { + "autoloader-suffix": "_mediawiki_vendor", + "classmap-authoritative": true, + "optimize-autoloader": true, + "preferred-install": "dist", + "vendor-dir": "." + }, + "prefer-stable": true, + "require": { + "php": ">=5.3.3" + } +} -- To view, visit https://gerrit.wikimedia.org/r/274856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib82a27f66edddee7b8b017fd8ae36a5fd69779b0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vendor Gerrit-Branch: REL1_23 Gerrit-Owner: KrinkleGerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix bad merge - change (mediawiki...DonationInterface)
Ejegg has submitted this change and it was merged. Change subject: Fix bad merge .. Fix bad merge Weird, the mangling doesn't even show up in the file history... Change-Id: I2c7edb2871f3bfd02e2176e49440817eba2ea723 --- M DonationInterface.php 1 file changed, 0 insertions(+), 37 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/DonationInterface.php b/DonationInterface.php index 4bf93dd..889ab23 100644 --- a/DonationInterface.php +++ b/DonationInterface.php @@ -1079,43 +1079,6 @@ // Load the default form settings. require_once __DIR__ . '/DonationInterfaceFormSettings.php'; -<<< HEAD -=== -/** - * FUNCTIONS - */ - -function efDonationInterfaceUnitTests( &$files ) { - global $wgAutoloadClasses; - - $testDir = __DIR__ . '/tests/'; - - $files[] = $testDir . 'AllTests.php'; - - $wgAutoloadClasses['DonationInterfaceTestCase'] = $testDir . 'DonationInterfaceTestCase.php'; - $wgAutoloadClasses['MockAmazonClient'] = $testDir . 'includes/MockAmazonClient.php'; - $wgAutoloadClasses['MockAmazonResponse'] = $testDir . 'includes/MockAmazonResponse.php'; - $wgAutoloadClasses['TestingQueue'] = $testDir . 'includes/TestingQueue.php'; - $wgAutoloadClasses['TestingAdyenAdapter'] = $testDir . 'includes/test_gateway/TestingAdyenAdapter.php'; - $wgAutoloadClasses['TestingAmazonAdapter'] = $testDir . 'includes/test_gateway/TestingAmazonAdapter.php'; - $wgAutoloadClasses['TestingAstropayAdapter'] = $testDir . 'includes/test_gateway/TestingAstropayAdapter.php'; - $wgAutoloadClasses['TestingAmazonGateway'] = $testDir . 'includes/test_page/TestingAmazonGateway.php'; - $wgAutoloadClasses['TestingDonationLogger'] = $testDir . 'includes/TestingDonationLogger.php'; - $wgAutoloadClasses['TestingGatewayPage'] = $testDir . 'includes/TestingGatewayPage.php'; - $wgAutoloadClasses['TestingGenericAdapter'] = $testDir . 'includes/test_gateway/TestingGenericAdapter.php'; - $wgAutoloadClasses['TestingGlobalCollectAdapter'] = $testDir . 'includes/test_gateway/TestingGlobalCollectAdapter.php'; - $wgAutoloadClasses['TestingGlobalCollectGateway'] = $testDir . 'includes/test_page/TestingGlobalCollectGateway.php'; - $wgAutoloadClasses['TestingGlobalCollectOrphanAdapter'] = $testDir . 'includes/test_gateway/TestingGlobalCollectOrphanAdapter.php'; - $wgAutoloadClasses['TestingPaypalAdapter'] = $testDir . 'includes/test_gateway/TestingPaypalAdapter.php'; - $wgAutoloadClasses['TestingWorldpayAdapter'] = $testDir . 'includes/test_gateway/TestingWorldpayAdapter.php'; - $wgAutoloadClasses['TestingWorldpayGateway'] = $testDir . 'includes/test_page/TestingWorldpayGateway.php'; - - $wgAutoloadClasses['TestingRequest'] = $testDir . 'includes/test_request/test.request.php'; - - return true; -} - ->>> master // Include composer's autoload if the vendor directory exists. If we have been // included via Composer, our dependencies should already be autoloaded at the // top level. -- To view, visit https://gerrit.wikimedia.org/r/274858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c7edb2871f3bfd02e2176e49440817eba2ea723 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: deployment Gerrit-Owner: EjeggGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Ssmith Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: tidy up XML - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: tidy up XML .. Hygiene: tidy up XML • Close empty tags as reported by Android Lint. • Remove redundant rectangle shape attribute for shape tags. • Fix indentation on some files that had none. • Remove unused namespace. No functional changes intended. Change-Id: If4996c3e225d211fc877a7a55829cf2693d4fe17 --- M app/src/dev/AndroidManifest.xml M app/src/main/res/drawable/button_shape_themedark.xml M app/src/main/res/drawable/button_shape_themedark_selected.xml M app/src/main/res/drawable/button_shape_themelight_selected.xml M app/src/main/res/drawable/editpage_improve_tag_selected.xml M app/src/main/res/drawable/editpage_improve_tag_unselected.xml M app/src/main/res/values/strings_no_translate.xml 7 files changed, 22 insertions(+), 30 deletions(-) Approvals: Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/dev/AndroidManifest.xml b/app/src/dev/AndroidManifest.xml index a7ef4df..36c6eb1 100644 --- a/app/src/dev/AndroidManifest.xml +++ b/app/src/dev/AndroidManifest.xml @@ -1,5 +1,4 @@ -http://schemas.android.com/apk/res/android; -xmlns:tools="http://schemas.android.com/tools;> +http://schemas.android.com/apk/res/android;> diff --git a/app/src/main/res/drawable/button_shape_themedark.xml b/app/src/main/res/drawable/button_shape_themedark.xml index 4536e86..4177754 100644 --- a/app/src/main/res/drawable/button_shape_themedark.xml +++ b/app/src/main/res/drawable/button_shape_themedark.xml @@ -1,6 +1,5 @@ -http://schemas.android.com/apk/res/android; - android:shape="rectangle"> - - - \ No newline at end of file +http://schemas.android.com/apk/res/android;> + + + diff --git a/app/src/main/res/drawable/button_shape_themedark_selected.xml b/app/src/main/res/drawable/button_shape_themedark_selected.xml index 10158fb..ef1403f 100644 --- a/app/src/main/res/drawable/button_shape_themedark_selected.xml +++ b/app/src/main/res/drawable/button_shape_themedark_selected.xml @@ -1,6 +1,5 @@ -http://schemas.android.com/apk/res/android; -android:shape="rectangle"> - - +http://schemas.android.com/apk/res/android;> + + \ No newline at end of file diff --git a/app/src/main/res/drawable/button_shape_themelight_selected.xml b/app/src/main/res/drawable/button_shape_themelight_selected.xml index babc187..ff24481 100644 --- a/app/src/main/res/drawable/button_shape_themelight_selected.xml +++ b/app/src/main/res/drawable/button_shape_themelight_selected.xml @@ -1,6 +1,5 @@ -http://schemas.android.com/apk/res/android; -android:shape="rectangle"> - - - \ No newline at end of file +http://schemas.android.com/apk/res/android;> + + + diff --git a/app/src/main/res/drawable/editpage_improve_tag_selected.xml b/app/src/main/res/drawable/editpage_improve_tag_selected.xml index 3972aa8..d715a34 100644 --- a/app/src/main/res/drawable/editpage_improve_tag_selected.xml +++ b/app/src/main/res/drawable/editpage_improve_tag_selected.xml @@ -1,8 +1,6 @@ -http://schemas.android.com/apk/res/android; -android:shape="rectangle"> - - - - \ No newline at end of file +http://schemas.android.com/apk/res/android;> + + + + diff --git a/app/src/main/res/drawable/editpage_improve_tag_unselected.xml b/app/src/main/res/drawable/editpage_improve_tag_unselected.xml index c9f31c9..29a5bdd 100644 --- a/app/src/main/res/drawable/editpage_improve_tag_unselected.xml +++ b/app/src/main/res/drawable/editpage_improve_tag_unselected.xml @@ -1,8 +1,6 @@ -http://schemas.android.com/apk/res/android; -android:shape="rectangle"> - - - +http://schemas.android.com/apk/res/android;> + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings_no_translate.xml b/app/src/main/res/values/strings_no_translate.xml index 21cd232..93f37c1 100644 --- a/app/src/main/res/values/strings_no_translate.xml +++ b/app/src/main/res/values/strings_no_translate.xml @@ -1,7 +1,7 @@ http://schemas.android.com/tools;> @string/app_name_prod - + eb167874c1d6569430a9bcfd71d4c24d pk.eyJ1IjoiZG1pdHJ5YnJhbnQiLCJhIjoiY2lnd3FzdTI1MHNicHZrbTVhMno4anF4dCJ9.HG3mJUj8xbqOvk_ieFDCfA -- To view, visit https://gerrit.wikimedia.org/r/274560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4996c3e225d211fc877a7a55829cf2693d4fe17 Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: NiedzielskiGerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <>
[MediaWiki-commits] [Gerrit] Fix bad merge - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/274858 Change subject: Fix bad merge .. Fix bad merge Weird, the mangling doesn't even show up in the file history... Change-Id: I2c7edb2871f3bfd02e2176e49440817eba2ea723 --- M DonationInterface.php 1 file changed, 0 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/58/274858/1 diff --git a/DonationInterface.php b/DonationInterface.php index 4bf93dd..889ab23 100644 --- a/DonationInterface.php +++ b/DonationInterface.php @@ -1079,43 +1079,6 @@ // Load the default form settings. require_once __DIR__ . '/DonationInterfaceFormSettings.php'; -<<< HEAD -=== -/** - * FUNCTIONS - */ - -function efDonationInterfaceUnitTests( &$files ) { - global $wgAutoloadClasses; - - $testDir = __DIR__ . '/tests/'; - - $files[] = $testDir . 'AllTests.php'; - - $wgAutoloadClasses['DonationInterfaceTestCase'] = $testDir . 'DonationInterfaceTestCase.php'; - $wgAutoloadClasses['MockAmazonClient'] = $testDir . 'includes/MockAmazonClient.php'; - $wgAutoloadClasses['MockAmazonResponse'] = $testDir . 'includes/MockAmazonResponse.php'; - $wgAutoloadClasses['TestingQueue'] = $testDir . 'includes/TestingQueue.php'; - $wgAutoloadClasses['TestingAdyenAdapter'] = $testDir . 'includes/test_gateway/TestingAdyenAdapter.php'; - $wgAutoloadClasses['TestingAmazonAdapter'] = $testDir . 'includes/test_gateway/TestingAmazonAdapter.php'; - $wgAutoloadClasses['TestingAstropayAdapter'] = $testDir . 'includes/test_gateway/TestingAstropayAdapter.php'; - $wgAutoloadClasses['TestingAmazonGateway'] = $testDir . 'includes/test_page/TestingAmazonGateway.php'; - $wgAutoloadClasses['TestingDonationLogger'] = $testDir . 'includes/TestingDonationLogger.php'; - $wgAutoloadClasses['TestingGatewayPage'] = $testDir . 'includes/TestingGatewayPage.php'; - $wgAutoloadClasses['TestingGenericAdapter'] = $testDir . 'includes/test_gateway/TestingGenericAdapter.php'; - $wgAutoloadClasses['TestingGlobalCollectAdapter'] = $testDir . 'includes/test_gateway/TestingGlobalCollectAdapter.php'; - $wgAutoloadClasses['TestingGlobalCollectGateway'] = $testDir . 'includes/test_page/TestingGlobalCollectGateway.php'; - $wgAutoloadClasses['TestingGlobalCollectOrphanAdapter'] = $testDir . 'includes/test_gateway/TestingGlobalCollectOrphanAdapter.php'; - $wgAutoloadClasses['TestingPaypalAdapter'] = $testDir . 'includes/test_gateway/TestingPaypalAdapter.php'; - $wgAutoloadClasses['TestingWorldpayAdapter'] = $testDir . 'includes/test_gateway/TestingWorldpayAdapter.php'; - $wgAutoloadClasses['TestingWorldpayGateway'] = $testDir . 'includes/test_page/TestingWorldpayGateway.php'; - - $wgAutoloadClasses['TestingRequest'] = $testDir . 'includes/test_request/test.request.php'; - - return true; -} - ->>> master // Include composer's autoload if the vendor directory exists. If we have been // included via Composer, our dependencies should already be autoloaded at the // top level. -- To view, visit https://gerrit.wikimedia.org/r/274858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c7edb2871f3bfd02e2176e49440817eba2ea723 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: deployment Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Namespace configuration on wuu.wikipedia - change (operations/mediawiki-config)
Awight has submitted this change and it was merged. Change subject: Namespace configuration on wuu.wikipedia .. Namespace configuration on wuu.wikipedia Namespaces settings: * wgMetaNamespace: 维基百科 * wgMetaNamespaceTalk: (reset to default value) This is a follow-up of change I5fb9b5559dc3468566c626d1253fd5927d581862. Change-Id: Iccc4b0cdda94cd0b0be1145dc96a213338be3354 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 2cfc012..4f54353 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -2419,6 +2419,7 @@ 'vowikibooks' => 'Vükibuks', 'vowiktionary' => 'Vükivödabuk', 'wikimaniateamwiki' => 'WikimaniaTeam', + 'wuuwiki' => '维基百科', // T128354 'xmfwiki' => 'ვიკიპედია', 'yiwiki' => 'װיקיפּעדיע', 'yiwikisource' => 'װיקיביבליאָטעק', @@ -2518,7 +2519,6 @@ 'ukwiktionary' => 'Обговорення_Вікісловника', 'ukwikinews' => 'Обговорення_Вікіновин', // T50843 'vepwiki' => 'Paginad_Vikipedii', - 'wuuwiki' => '维基百科', // T128354 'xmfwiki' => 'ვიკიპედია_სხუნუა', ), # @} end of wgMetaNamespaceTalk -- To view, visit https://gerrit.wikimedia.org/r/274857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iccc4b0cdda94cd0b0be1145dc96a213338be3354 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: DerecksonGerrit-Reviewer: Awight Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use padding instead of margin to separate cross-wiki section... - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Use padding instead of margin to separate cross-wiki sections from each other .. Use padding instead of margin to separate cross-wiki sections from each other So that margin collapsing doesn't eat up the extra space we wanted to create. Bug: T128069 Change-Id: Ib3b96c54c2ace52cf28047a5f9f012fcc56ccb9c --- M modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mooeypoo: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less b/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less index d4b3a03..34e7a67 100644 --- a/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less +++ b/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less @@ -3,7 +3,7 @@ .mw-echo-ui-bundledNotificationGroupWidget { &:not(:first-child) { - margin-top: @bundle-group-padding; + padding-top: @bundle-group-padding; } &-title { -- To view, visit https://gerrit.wikimedia.org/r/274853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib3b96c54c2ace52cf28047a5f9f012fcc56ccb9c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Mooeypoo Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't set diff mark on DOM - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/274855 Change subject: Don't set diff mark on DOM .. Don't set diff mark on DOM * Let's keep it in the dataobject Change-Id: I2ffc1e5d232e42e3f15abf6082b8acb8e2e08059 --- M lib/utils/DOMUtils.js 1 file changed, 16 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/55/274855/1 diff --git a/lib/utils/DOMUtils.js b/lib/utils/DOMUtils.js index e295a52..e2af3b6 100644 --- a/lib/utils/DOMUtils.js +++ b/lib/utils/DOMUtils.js @@ -961,18 +961,6 @@ return node && this.isMarkerMeta(node, "mw:DiffMarker"); }, - currentDiffMark: function(node, env) { - if (!node || !DU.isElt(node)) { - return null; - } - var data = this.getNodeData(node); - var dpd = data["parsoid-diff"]; - if (!dpd) { - dpd = this.loadDataAttrib(node, "parsoid-diff"); - } - return dpd !== {} && dpd.id === env.page.id ? dpd : null; - }, - /** * Check that the diff markers on the node exist and are recent. * @@ -980,7 +968,7 @@ * @param {MWParserEnvironment} env */ hasDiffMarkers: function(node, env) { - return this.currentDiffMark(node, env) !== null || this.isDiffMarker(node); + return this.getDiffMark(node, env) !== null || this.isDiffMarker(node); }, hasDiffMark: function(node, env, mark) { @@ -989,7 +977,7 @@ if (mark === 'deleted' || (mark === 'inserted' && !DU.isElt(node))) { return this.isDiffMarker(node.previousSibling); } else { - var diffMark = this.currentDiffMark(node, env); + var diffMark = this.getDiffMark(node, env); return diffMark && diffMark.diff.indexOf(mark) >= 0; } }, @@ -1003,7 +991,7 @@ }, onlySubtreeChanged: function(node, env) { - var dmark = this.currentDiffMark(node, env); + var dmark = this.getDiffMark(node, env); return dmark && dmark.diff.every(function subTreechangeMarker(mark) { return mark === 'subtree-changed' || mark === 'children-changed'; }); @@ -1022,6 +1010,15 @@ } }, + getDiffMark: function(node, env) { + if (!DU.isElt(node)) { + return null; + } + var data = DU.getNodeData(node); + var dpd = data['parsoid-diff']; + return dpd && dpd.id === env.page.id ? dpd : null; + }, + /** * Set a diff marker on a node. * @@ -1030,8 +1027,9 @@ * @param {string} change */ setDiffMark: function(node, env, change) { - var dpd = this.getJSONAttribute(node, 'data-parsoid-diff', null); - if (dpd !== null && dpd.id === env.page.id) { + if (!DU.isElt(node)) { return; } + var dpd = DU.getDiffMark(node, env); + if (dpd) { // Diff is up to date, append this change if it doesn't already exist if (dpd.diff.indexOf(change) === -1) { dpd.diff.push(change); @@ -1044,12 +1042,7 @@ diff: [change], }; } - - // Clear out the loaded value - this.getNodeData(node)["parsoid-diff"] = undefined; - - // Add serialization info to this node - this.setJSONAttribute(node, 'data-parsoid-diff', dpd); + DU.getNodeData(node)['parsoid-diff'] = dpd; }, /** -- To view, visit https://gerrit.wikimedia.org/r/274855 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ffc1e5d232e42e3f15abf6082b8acb8e2e08059 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Namespace configuration on wuu.wikipedia - change (operations/mediawiki-config)
Dereckson has uploaded a new change for review. https://gerrit.wikimedia.org/r/274857 Change subject: Namespace configuration on wuu.wikipedia .. Namespace configuration on wuu.wikipedia Namespaces settings: * wgMetaNamespace: 维基百科 * wgMetaNamespaceTalk: (reset to default value) This is a follow-up of change I5fb9b5559dc3468566c626d1253fd5927d581862. Change-Id: Iccc4b0cdda94cd0b0be1145dc96a213338be3354 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/57/274857/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 2cfc012..4f54353 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -2419,6 +2419,7 @@ 'vowikibooks' => 'Vükibuks', 'vowiktionary' => 'Vükivödabuk', 'wikimaniateamwiki' => 'WikimaniaTeam', + 'wuuwiki' => '维基百科', // T128354 'xmfwiki' => 'ვიკიპედია', 'yiwiki' => 'װיקיפּעדיע', 'yiwikisource' => 'װיקיביבליאָטעק', @@ -2518,7 +2519,6 @@ 'ukwiktionary' => 'Обговорення_Вікісловника', 'ukwikinews' => 'Обговорення_Вікіновин', // T50843 'vepwiki' => 'Paginad_Vikipedii', - 'wuuwiki' => '维基百科', // T128354 'xmfwiki' => 'ვიკიპედია_სხუნუა', ), # @} end of wgMetaNamespaceTalk -- To view, visit https://gerrit.wikimedia.org/r/274857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iccc4b0cdda94cd0b0be1145dc96a213338be3354 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dereckson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add empty composer.json - change (mediawiki/vendor)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/274856 Change subject: Add empty composer.json .. Add empty composer.json Change-Id: Ib82a27f66edddee7b8b017fd8ae36a5fd69779b0 --- M .gitreview A composer.json 2 files changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor refs/changes/56/274856/1 diff --git a/.gitreview b/.gitreview index 81e60f6..519291c 100644 --- a/.gitreview +++ b/.gitreview @@ -1,6 +1,6 @@ [gerrit] host=gerrit.wikimedia.org port=29418 -project=mediawiki/core/vendor.git -defaultbranch=master +project=mediawiki/vendor.git +defaultbranch=REL1_23 defaultrebase=0 diff --git a/composer.json b/composer.json new file mode 100644 index 000..1fcb9ec --- /dev/null +++ b/composer.json @@ -0,0 +1,13 @@ +{ + "config": { + "autoloader-suffix": "_mediawiki_vendor", + "classmap-authoritative": true, + "optimize-autoloader": true, + "preferred-install": "dist", + "vendor-dir": "." + }, + "prefer-stable": true, + "require": { + "php": ">=5.3.3" + } +} -- To view, visit https://gerrit.wikimedia.org/r/274856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib82a27f66edddee7b8b017fd8ae36a5fd69779b0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vendor Gerrit-Branch: REL1_23 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs: Kill NFS from the wikistats project - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: labs: Kill NFS from the wikistats project .. labs: Kill NFS from the wikistats project w00t Bug: T128816 Change-Id: I9255ee85d2ee33fd5c4ab2e230dcbbc6751bcb50 --- M modules/labstore/files/nfs-mounts.yaml 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/labstore/files/nfs-mounts.yaml b/modules/labstore/files/nfs-mounts.yaml index 33280c9..772fad6 100644 --- a/modules/labstore/files/nfs-mounts.yaml +++ b/modules/labstore/files/nfs-mounts.yaml @@ -222,10 +222,6 @@ home: true project: true scratch: true - wikistats: -gid: 50338 -mounts: - project: true wmt: gid: 52488 mounts: -- To view, visit https://gerrit.wikimedia.org/r/274854 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9255ee85d2ee33fd5c4ab2e230dcbbc6751bcb50 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Bump various devDependencies - change (mediawiki/core)
Ejegg has submitted this change and it was merged. Change subject: build: Bump various devDependencies .. build: Bump various devDependencies karma-chrome-launcher: 0.1.7 -> 0.1.8 Change-Id: Ieeb6dbcd3e6d9f6f0fb9865d356da462b9b0499b --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index fc2bd3a..270b80a 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "grunt-jsonlint": "1.0.4", "grunt-karma": "0.10.1", "karma": "0.12.31", -"karma-chrome-launcher": "0.1.7", +"karma-chrome-launcher": "0.1.8", "karma-firefox-launcher": "0.1.4", "karma-qunit": "0.1.4", "qunitjs": "1.17.1" -- To view, visit https://gerrit.wikimedia.org/r/274847 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieeb6dbcd3e6d9f6f0fb9865d356da462b9b0499b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_25 Gerrit-Owner: KrinkleGerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs: Kill NFS from the wikistats project - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/274854 Change subject: labs: Kill NFS from the wikistats project .. labs: Kill NFS from the wikistats project w00t Bug: T128816 Change-Id: I9255ee85d2ee33fd5c4ab2e230dcbbc6751bcb50 --- M modules/labstore/files/nfs-mounts.yaml 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/54/274854/1 diff --git a/modules/labstore/files/nfs-mounts.yaml b/modules/labstore/files/nfs-mounts.yaml index 33280c9..772fad6 100644 --- a/modules/labstore/files/nfs-mounts.yaml +++ b/modules/labstore/files/nfs-mounts.yaml @@ -222,10 +222,6 @@ home: true project: true scratch: true - wikistats: -gid: 50338 -mounts: - project: true wmt: gid: 52488 mounts: -- To view, visit https://gerrit.wikimedia.org/r/274854 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9255ee85d2ee33fd5c4ab2e230dcbbc6751bcb50 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use padding instead of margin to separate cross-wiki section... - change (mediawiki...Echo)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/274853 Change subject: Use padding instead of margin to separate cross-wiki sections from each other .. Use padding instead of margin to separate cross-wiki sections from each other So that margin collapsing doesn't eat up the extra space we wanted to create. Bug: T128069 Change-Id: Ib3b96c54c2ace52cf28047a5f9f012fcc56ccb9c --- M modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/53/274853/1 diff --git a/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less b/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less index d4b3a03..34e7a67 100644 --- a/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less +++ b/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less @@ -3,7 +3,7 @@ .mw-echo-ui-bundledNotificationGroupWidget { &:not(:first-child) { - margin-top: @bundle-group-padding; + padding-top: @bundle-group-padding; } &-title { -- To view, visit https://gerrit.wikimedia.org/r/274853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib3b96c54c2ace52cf28047a5f9f012fcc56ccb9c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DonationInterface submodule - change (mediawiki/core)
Ejegg has submitted this change and it was merged. Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: I57c32700509a0b1d4b2d96c8f4ab1bfabaa40631 --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 99d5bcb..2476e17 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 99d5bcb5695bb5fbf2a87aaf52a7272c0f70afd5 +Subproject commit 2476e178583486dc988e30273aea5b2595ee21a7 -- To view, visit https://gerrit.wikimedia.org/r/274852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57c32700509a0b1d4b2d96c8f4ab1bfabaa40631 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_25 Gerrit-Owner: EjeggGerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DonationInterface submodule - change (mediawiki/core)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/274852 Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: I57c32700509a0b1d4b2d96c8f4ab1bfabaa40631 --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/274852/1 diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 99d5bcb..2476e17 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 99d5bcb5695bb5fbf2a87aaf52a7272c0f70afd5 +Subproject commit 2476e178583486dc988e30273aea5b2595ee21a7 -- To view, visit https://gerrit.wikimedia.org/r/274852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I57c32700509a0b1d4b2d96c8f4ab1bfabaa40631 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_25 Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge master into deployment - change (mediawiki...DonationInterface)
Ejegg has submitted this change and it was merged. Change subject: Merge master into deployment .. Merge master into deployment cceb755 Filter currencies by country a8c027c Allow a different fallback currency for each country d0435d8 Fix appending country to TY page URL 26291b7 Update Paypal return URL handling 7bc5c08 Don't show single-value currency dropdown 1e5d9b3 Make PayPal tests less tautological 7aa5e9b Localisation updates from https://translatewiki.net. adf2404 fix quote 17ce27d Use RequestContext instead of $wgLang b7d97b9 give 'bt' submethod a group f897698 Prepare logos for AstroPay LATAM banks and cards Removed tests Change-Id: I5e052c92b024154f554577f51954d79012dc8ba5 --- M DonationInterface.php D tests/Adapter/Astropay/AstropayTest.php D tests/Adapter/PayPal/PayPalTest.php D tests/DonationInterfaceTestCase.php D tests/GatewayPageTest.php D tests/includes/test_gateway/TestingGenericAdapter.php 6 files changed, 3 insertions(+), 1,844 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved diff --git a/DonationInterface.php b/DonationInterface.php index 0b1c980..4bf93dd 100644 --- a/DonationInterface.php +++ b/DonationInterface.php @@ -1078,9 +1078,9 @@ // Load the default form settings. require_once __DIR__ . '/DonationInterfaceFormSettings.php'; -<<< HEAD (99d5bc Merge master into deployment) -=== +<<< HEAD +=== /** * FUNCTIONS */ @@ -1114,8 +1114,8 @@ return true; } ->>> BRANCH (f89769 Prepare logos for AstroPay LATAM banks and cards) +>>> master // Include composer's autoload if the vendor directory exists. If we have been // included via Composer, our dependencies should already be autoloaded at the // top level. diff --git a/tests/Adapter/Astropay/AstropayTest.php b/tests/Adapter/Astropay/AstropayTest.php deleted file mode 100644 index 744bf95..000 --- a/tests/Adapter/Astropay/AstropayTest.php +++ /dev/null @@ -1,585 +0,0 @@ -<<< HEAD (99d5bc Merge master into deployment) -=== -testAdapterClass = 'TestingAstropayAdapter'; - } - - function setUp() { - parent::setUp(); - $this->setMwGlobals( array( - 'wgAstropayGatewayEnabled' => true, - ) ); - } - - /** -* Ensure we're setting the right url for each transaction -* @covers AstropayAdapter::getCurlBaseOpts -*/ - function testCurlUrl() { - $init = $this->getDonorTestData( 'BR' ); - $gateway = $this->getFreshGatewayObject( $init ); - $gateway->setCurrentTransaction( 'NewInvoice' ); - - $result = $gateway->getCurlBaseOpts(); - - $this->assertEquals( - 'https://sandbox.astropay.example.com/api_curl/streamline/NewInvoice', - $result[CURLOPT_URL], - 'Not setting URL to transaction-specific value.' - ); - } - - /** -* Test the NewInvoice transaction is making a sane request and signing -* it correctly -*/ - function testNewInvoiceRequest() { - $init = $this->getDonorTestData( 'BR' ); - $this->setLanguage( $init['language'] ); - $session['Donor']['order_id'] = '123456789'; - $this->setUpRequest( $init, $session ); - $gateway = new TestingAstropayAdapter(); - - $gateway->do_transaction( 'NewInvoice' ); - parse_str( $gateway->curled[0], $actual ); - - $expected = array( - 'x_login' => 'createlogin', - 'x_trans_key' => 'createpass', - 'x_invoice' => '123456789', - 'x_amount' => '100.00', - 'x_currency' => 'BRL', - 'x_bank' => 'TE', - 'x_country' => 'BR', - 'x_description' => wfMessage( 'donate_interface-donation-description' )->inLanguage( $init['language'] )->text(), - 'x_iduser' => 'nob...@example.org', - 'x_cpf' => '3456789', - 'x_name' => 'Nome Apelido', - 'x_email' => 'nob...@example.org', - // 'x_address' => 'Rua Falso 123', - // 'x_zip' => '01110-111', - // 'x_city' => 'São Paulo', - // 'x_state' => 'SP', - 'control' => 'AC43664E0C4DF30607A26F271C8998BC4EE26511366E65AFB69B96E89BFD4359', - 'type' => 'json', - ); - $this->assertEquals( $expected, $actual, 'NewInvoice is not including the right parameters' ); - } - - /** -* When Astropay sends back valid JSON with status "0", we should set txn -* status to true and errors
[MediaWiki-commits] [Gerrit] Merge master into deployment - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/274851 Change subject: Merge master into deployment .. Merge master into deployment cceb755 Filter currencies by country a8c027c Allow a different fallback currency for each country d0435d8 Fix appending country to TY page URL 26291b7 Update Paypal return URL handling 7bc5c08 Don't show single-value currency dropdown 1e5d9b3 Make PayPal tests less tautological 7aa5e9b Localisation updates from https://translatewiki.net. adf2404 fix quote 17ce27d Use RequestContext instead of $wgLang b7d97b9 give 'bt' submethod a group f897698 Prepare logos for AstroPay LATAM banks and cards Removed tests Change-Id: I5e052c92b024154f554577f51954d79012dc8ba5 --- M DonationInterface.php D tests/Adapter/Astropay/AstropayTest.php D tests/Adapter/PayPal/PayPalTest.php D tests/DonationInterfaceTestCase.php D tests/GatewayPageTest.php D tests/includes/test_gateway/TestingGenericAdapter.php 6 files changed, 3 insertions(+), 1,844 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/51/274851/1 diff --git a/DonationInterface.php b/DonationInterface.php index 0b1c980..4bf93dd 100644 --- a/DonationInterface.php +++ b/DonationInterface.php @@ -1078,9 +1078,9 @@ // Load the default form settings. require_once __DIR__ . '/DonationInterfaceFormSettings.php'; -<<< HEAD (99d5bc Merge master into deployment) -=== +<<< HEAD +=== /** * FUNCTIONS */ @@ -1114,8 +1114,8 @@ return true; } ->>> BRANCH (f89769 Prepare logos for AstroPay LATAM banks and cards) +>>> master // Include composer's autoload if the vendor directory exists. If we have been // included via Composer, our dependencies should already be autoloaded at the // top level. diff --git a/tests/Adapter/Astropay/AstropayTest.php b/tests/Adapter/Astropay/AstropayTest.php deleted file mode 100644 index 744bf95..000 --- a/tests/Adapter/Astropay/AstropayTest.php +++ /dev/null @@ -1,585 +0,0 @@ -<<< HEAD (99d5bc Merge master into deployment) -=== -testAdapterClass = 'TestingAstropayAdapter'; - } - - function setUp() { - parent::setUp(); - $this->setMwGlobals( array( - 'wgAstropayGatewayEnabled' => true, - ) ); - } - - /** -* Ensure we're setting the right url for each transaction -* @covers AstropayAdapter::getCurlBaseOpts -*/ - function testCurlUrl() { - $init = $this->getDonorTestData( 'BR' ); - $gateway = $this->getFreshGatewayObject( $init ); - $gateway->setCurrentTransaction( 'NewInvoice' ); - - $result = $gateway->getCurlBaseOpts(); - - $this->assertEquals( - 'https://sandbox.astropay.example.com/api_curl/streamline/NewInvoice', - $result[CURLOPT_URL], - 'Not setting URL to transaction-specific value.' - ); - } - - /** -* Test the NewInvoice transaction is making a sane request and signing -* it correctly -*/ - function testNewInvoiceRequest() { - $init = $this->getDonorTestData( 'BR' ); - $this->setLanguage( $init['language'] ); - $session['Donor']['order_id'] = '123456789'; - $this->setUpRequest( $init, $session ); - $gateway = new TestingAstropayAdapter(); - - $gateway->do_transaction( 'NewInvoice' ); - parse_str( $gateway->curled[0], $actual ); - - $expected = array( - 'x_login' => 'createlogin', - 'x_trans_key' => 'createpass', - 'x_invoice' => '123456789', - 'x_amount' => '100.00', - 'x_currency' => 'BRL', - 'x_bank' => 'TE', - 'x_country' => 'BR', - 'x_description' => wfMessage( 'donate_interface-donation-description' )->inLanguage( $init['language'] )->text(), - 'x_iduser' => 'nob...@example.org', - 'x_cpf' => '3456789', - 'x_name' => 'Nome Apelido', - 'x_email' => 'nob...@example.org', - // 'x_address' => 'Rua Falso 123', - // 'x_zip' => '01110-111', - // 'x_city' => 'São Paulo', - // 'x_state' => 'SP', - 'control' => 'AC43664E0C4DF30607A26F271C8998BC4EE26511366E65AFB69B96E89BFD4359', - 'type' => 'json', - ); - $this->assertEquals( $expected, $actual, 'NewInvoice is not including the right parameters' ); - } - - /** -* When Astropay sends
[MediaWiki-commits] [Gerrit] mw-fetch-composer-dev: Add fallback for REL1_23 - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: mw-fetch-composer-dev: Add fallback for REL1_23 .. mw-fetch-composer-dev: Add fallback for REL1_23 Change-Id: Ie3d42d8259094f57ee94eaf23a2b56f22a5ef329 --- M tools/composer-dev-args.js 1 file changed, 9 insertions(+), 4 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/tools/composer-dev-args.js b/tools/composer-dev-args.js index 02ffc41..a1d9380 100755 --- a/tools/composer-dev-args.js +++ b/tools/composer-dev-args.js @@ -1,7 +1,12 @@ #!/usr/bin/env node -var devPackages = require( process.argv[ 2 ] )[ 'require-dev' ], - package; +var devPackages, package; -for ( package in devPackages ) { - console.log( package + '=' + devPackages[ package ] ); +try { + devPackages = require( process.argv[ 2 ] )[ 'require-dev' ]; + for ( package in devPackages ) { + console.log( package + '=' + devPackages[ package ] ); + } +} catch ( e ) { + // Back-compat for REL1_23 which doesn't have composer.json + console.log( 'phpunit/phpunit=3.7.37' ); } -- To view, visit https://gerrit.wikimedia.org/r/274849 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3d42d8259094f57ee94eaf23a2b56f22a5ef329 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Full screen mode - change (mediawiki...Kartographer)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/274850 Change subject: WIP: Full screen mode .. WIP: Full screen mode Change-Id: I7e4326a32e96cc942705bd8e19a392430d11ad30 --- M extension.json A modules/kartographer.MapDialog.js M modules/kartographer.js 3 files changed, 92 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/50/274850/1 diff --git a/extension.json b/extension.json index 404251d..fe1387d 100644 --- a/extension.json +++ b/extension.json @@ -116,6 +116,18 @@ "desktop" ] }, + "ext.kartographer.fullscreen": { + "dependencies": [ + "oojs-ui-windows" + ], + "scripts": [ + "modules/kartographer.MapDialog.js" + ], + "targets": [ + "mobile", + "desktop" + ] + }, "ext.kartographer.editor": { "dependencies": [ "leaflet.draw", diff --git a/modules/kartographer.MapDialog.js b/modules/kartographer.MapDialog.js new file mode 100644 index 000..5fcdb1d --- /dev/null +++ b/modules/kartographer.MapDialog.js @@ -0,0 +1,50 @@ +mw.kartographer.MapDialog = function MwKartographerMapDialog() { + // Parent method + mw.kartographer.MapDialog.super.apply( this, arguments ); +}; + +OO.inheritClass( mw.kartographer.MapDialog, OO.ui.ProcessDialog ); + +mw.kartographer.MapDialog.static.size = 'full'; + +mw.kartographer.MapDialog.static.title = 'Map';// OO.ui.deferMsg( '' ) + +mw.kartographer.MapDialog.static.actions = [ + { + label: 'Close',// OO.ui.deferMsg( '' ), + flags: [ 'safe', 'back' ], + modes: [ 'edit', 'insert' ] + } +]; + +mw.kartographer.MapDialog.prototype.initialize = function () { + // Parent method + mw.kartographer.MapDialog.super.prototype.initialize.apply( this, arguments ); + + this.$map = $( '' ).css( 'height', '100%' ); + this.map = null; + + this.$body.append( this.$map ); +}; + +mw.kartographer.MapDialog.prototype.getSetupProcess = function ( data ) { + return mw.kartographer.MapDialog.super.prototype.getSetupProcess.call( this, data ) + .next( function () { + this.map = mw.kartographer.createMap( this.$map[ 0 ], data ); + }, this ); +}; + +mw.kartographer.MapDialog.prototype.getReadyProcess = function ( data ) { + return mw.kartographer.MapDialog.super.prototype.getReadyProcess.call( this, data ) + .next( function () { + this.map.invalidateSize(); + }, this ); +}; + +mw.kartographer.MapDialog.prototype.getTeardownProcess = function ( data ) { + return mw.kartographer.MapDialog.super.prototype.getTeardownProcess.call( this, data ) + .next( function () { + this.map.remove(); + this.map = null; + }, this ); +}; diff --git a/modules/kartographer.js b/modules/kartographer.js index 7e99c41..bcf7231 100644 --- a/modules/kartographer.js +++ b/modules/kartographer.js @@ -2,7 +2,7 @@ // Load this script after lib/mapbox-lib.js - var scale, urlFormat, + var scale, urlFormat, windowManager, mapDialog, mapServer = mw.config.get( 'wgKartographerMapServer' ), forceHttps = mapServer[ 4 ] === 's', config = L.mapbox.config; @@ -154,21 +154,48 @@ } }; + function getWindowManager() { + if ( !windowManager ) { + windowManager = new OO.ui.WindowManager(); + mapDialog = new mw.kartographer.MapDialog(); + $( 'body' ).append( windowManager.$element ); + windowManager.addWindows( [ mapDialog ] ); + } + return windowManager; + } + + function openFullscreenMap( data ) { + mw.loader.using( 'ext.kartographer.fullscreen' ).done( function () { + getWindowManager().openWindow( mapDialog, data ) + .then( function ( opened ) { return opened; } ) + .then( function ( closing ) { return closing; } ) + .then( function ( data ) { + } ); + } ); + } + mw.hook( 'wikipage.content' ).add( function ( $content ) { $content.find( '.mw-kartographer-interactive' ).each( function () { - var $this = $(
[MediaWiki-commits] [Gerrit] mw-fetch-composer-dev: Add fallback for REL1_23 - change (integration/jenkins)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/274849 Change subject: mw-fetch-composer-dev: Add fallback for REL1_23 .. mw-fetch-composer-dev: Add fallback for REL1_23 Change-Id: Ie3d42d8259094f57ee94eaf23a2b56f22a5ef329 --- M tools/composer-dev-args.js 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/49/274849/1 diff --git a/tools/composer-dev-args.js b/tools/composer-dev-args.js index 02ffc41..a1d9380 100755 --- a/tools/composer-dev-args.js +++ b/tools/composer-dev-args.js @@ -1,7 +1,12 @@ #!/usr/bin/env node -var devPackages = require( process.argv[ 2 ] )[ 'require-dev' ], - package; +var devPackages, package; -for ( package in devPackages ) { - console.log( package + '=' + devPackages[ package ] ); +try { + devPackages = require( process.argv[ 2 ] )[ 'require-dev' ]; + for ( package in devPackages ) { + console.log( package + '=' + devPackages[ package ] ); + } +} catch ( e ) { + // Back-compat for REL1_23 which doesn't have composer.json + console.log( 'phpunit/phpunit=3.7.37' ); } -- To view, visit https://gerrit.wikimedia.org/r/274849 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3d42d8259094f57ee94eaf23a2b56f22a5ef329 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set default completion suggester scoring for beta and prod - change (operations/mediawiki-config)
Awight has submitted this change and it was merged. Change subject: Set default completion suggester scoring for beta and prod .. Set default completion suggester scoring for beta and prod This was accidently set to only production. We want this set in production and beta. Change-Id: I7297cae0d2265ffbd6694ce01ada4a7732191ef8 --- M wmf-config/CirrusSearch-common.php M wmf-config/CirrusSearch-production.php 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CirrusSearch-common.php b/wmf-config/CirrusSearch-common.php index c118d1d..cc60135 100644 --- a/wmf-config/CirrusSearch-common.php +++ b/wmf-config/CirrusSearch-common.php @@ -138,6 +138,9 @@ ); }; +// Set the scoring method +$wgCirrusSearchCompletionDefaultScore = 'popqual'; + # Load per realm specific configuration, either: # - CirrusSearch-labs.php # - CirrusSearch-production.php diff --git a/wmf-config/CirrusSearch-production.php b/wmf-config/CirrusSearch-production.php index 013f422..2ad0122 100644 --- a/wmf-config/CirrusSearch-production.php +++ b/wmf-config/CirrusSearch-production.php @@ -93,9 +93,6 @@ // Enable completion suggester (beta) $wgCirrusSearchUseCompletionSuggester = $wmgCirrusSearchUseCompletionSuggester; -// Set the scoring method -$wgCirrusSearchCompletionDefaultScore = 'popqual'; - $wgCirrusSearchRecycleCompletionSuggesterIndex = $wmgCirrusSearchRecycleCompletionSuggesterIndex; // repoint morelike queries to codfw -- To view, visit https://gerrit.wikimedia.org/r/274777 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7297cae0d2265ffbd6694ce01ada4a7732191ef8 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: Awight Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change RB remote config key - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/274848 Change subject: Change RB remote config key .. Change RB remote config key This is to ensure that for the production app only the latest app version, which sends the correct x-analytics: pageview=1 header, gets to use RESTBase and the Mobile Content Service. Bug: T126934 Bug: T128612 Change-Id: Ie49d02141402ede6c292244d223531ee2ef76575 --- M app/src/main/java/org/wikipedia/settings/RbSwitch.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/48/274848/1 diff --git a/app/src/main/java/org/wikipedia/settings/RbSwitch.java b/app/src/main/java/org/wikipedia/settings/RbSwitch.java index f096bc2..3f83055 100644 --- a/app/src/main/java/org/wikipedia/settings/RbSwitch.java +++ b/app/src/main/java/org/wikipedia/settings/RbSwitch.java @@ -62,7 +62,7 @@ } if (WikipediaApp.getInstance().isProdRelease()) { -return isAdmitted(ticket, "restbasePercent"); +return isAdmitted(ticket, "rbPct"); } else { return isAdmitted(ticket, "restbaseBetaPercent"); } -- To view, visit https://gerrit.wikimedia.org/r/274848 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie49d02141402ede6c292244d223531ee2ef76575 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Site name configuration on wuu.wikipedia - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Site name configuration on wuu.wikipedia .. Site name configuration on wuu.wikipedia Site name and NS_PROJECT namespace set to '维基百科'. Bug: T128354 Change-Id: I5fb9b5559dc3468566c626d1253fd5927d581862 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Awight: Looks good to me, approved Luke081515: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 2a37221..4917b63 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -1934,6 +1934,7 @@ 'vowiktionary' => 'Vükivödabuk', 'wg_enwiki' => 'Wikipedia Working Group', 'wikimaniateamwiki' => 'WikimaniaTeam', + 'wuuwiki' => '维基百科', // T128354 'xmfwiki' => 'ვიკიპედია', 'yiwiki' => 'װיקיפּעדיע', 'yiwikisource' => 'װיקיביבליאָטעק', @@ -2517,6 +2518,7 @@ 'ukwiktionary' => 'Обговорення_Вікісловника', 'ukwikinews' => 'Обговорення_Вікіновин', // T50843 'vepwiki' => 'Paginad_Vikipedii', + 'wuuwiki' => '维基百科', // T128354 'xmfwiki' => 'ვიკიპედია_სხუნუა', ), # @} end of wgMetaNamespaceTalk -- To view, visit https://gerrit.wikimedia.org/r/274196 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5fb9b5559dc3468566c626d1253fd5927d581862 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: DerecksonGerrit-Reviewer: Awight Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Luke081515 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [bugfix]: MySQLPageGenerator shall use int namespace id - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [bugfix]: MySQLPageGenerator shall use int namespace id .. [bugfix]: MySQLPageGenerator shall use int namespace id Namespace dict only supports int. Bug: T128531 Change-Id: I00ef01d53b7005277aa04da78fd371eb810e3dc3 --- M pywikibot/pagegenerators.py 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 2a22663..909c954 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -2446,7 +2446,8 @@ # Limit reached or no more results break if pageName: -namespace = site.namespace(namespaceNumber) +# Namespace Dict only supports int +namespace = site.namespace(int(namespaceNumber)) pageName = pageName.decode(site.encoding()) if namespace: pageTitle = '%s:%s' % (namespace, pageName) -- To view, visit https://gerrit.wikimedia.org/r/274486 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00ef01d53b7005277aa04da78fd371eb810e3dc3 Gerrit-PatchSet: 4 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: MpaaGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable useless Echo eventlogging schema - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Disable useless Echo eventlogging schema .. Disable useless Echo eventlogging schema Almost all of the data recorded in Schema:Echo is already in the echo_* database tables. The only useful field is "which Thank link was used", which is something we can instrument separately without overwhelming our analytics infrastructure with nine gigs of useless data. Change-Id: I124a95960e4b915b13bd817fc3f129309094e564 --- M wmf-config/CommonSettings.php 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 2fe3748..9c80d8e 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2463,8 +2463,6 @@ $wgJobTypeConf['MWEchoNotificationEmailBundleJob'] = array( 'checkDelay' => true ) + $wgJobTypeConf['default']; } - // Eventlogging for Schema:Echo - $wgEchoConfig['eventlogging']['Echo']['enabled'] = true; // Eventlogging for Schema:EchoMail $wgEchoConfig['eventlogging']['EchoMail']['enabled'] = true; // Eventlogging for Schema:EchoInteraction -- To view, visit https://gerrit.wikimedia.org/r/274345 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I124a95960e4b915b13bd817fc3f129309094e564 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Awight Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] sajax: Explicitly specify released under 3-clause BSD license - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: sajax: Explicitly specify released under 3-clause BSD license .. sajax: Explicitly specify released under 3-clause BSD license Bug: T128348 Change-Id: I39f1c1f2319088005099b0ce5f30d1dfb3c27776 --- M resources/src/mediawiki.legacy/ajax.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.legacy/ajax.js b/resources/src/mediawiki.legacy/ajax.js index 3660c20..930a388 100644 --- a/resources/src/mediawiki.legacy/ajax.js +++ b/resources/src/mediawiki.legacy/ajax.js @@ -1,7 +1,7 @@ /** * Remote Scripting Library * Copyright 2005 modernmethod, inc - * Under the open source BSD license + * Under the 3-clause BSD license * http://www.modernmethod.com/sajax/ */ -- To view, visit https://gerrit.wikimedia.org/r/274756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I39f1c1f2319088005099b0ce5f30d1dfb3c27776 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_25 Gerrit-Owner: LegoktmGerrit-Reviewer: Edokter Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change "Expand N alerts/messages" to "View N alerts/messages" - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Change "Expand N alerts/messages" to "View N alerts/messages" .. Change "Expand N alerts/messages" to "View N alerts/messages" Bug: T121936 Change-Id: I1a550d1ed12287ee148689255374d7d5edd00765 --- M i18n/en.json 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index a7fac98..fb6e407 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -59,10 +59,10 @@ "echo-notification-loginrequired": "You must login to see your notifications.", "echo-notification-popup-loginrequired": "Please log in to view your notifications.", "echo-notification-markasread": "Mark as read", - "notification-link-text-expand-all": "Expand all", - "notification-link-text-expand-alert-count": "Expand {{PLURAL:$1|$1 alert|$1 alerts}}", - "notification-link-text-expand-message-count": "Expand {{PLURAL:$1|$1 message|$1 messages}}", - "notification-link-text-expand-all-count": "Expand {{PLURAL:$1|$1 notification|$1 notifications}}", + "notification-link-text-expand-all": "View all", + "notification-link-text-expand-alert-count": "View {{PLURAL:$1|$1 alert|$1 alerts}}", + "notification-link-text-expand-message-count": "View {{PLURAL:$1|$1 message|$1 messages}}", + "notification-link-text-expand-all-count": "View {{PLURAL:$1|$1 notification|$1 notifications}}", "notification-link-text-collapse-all": "Collapse all", "notification-link-text-view-message": "View message", "notification-link-text-view-mention": "View mention", -- To view, visit https://gerrit.wikimedia.org/r/274162 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a550d1ed12287ee148689255374d7d5edd00765 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Catrope Gerrit-Reviewer: Pginer Gerrit-Reviewer: Sbisson 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] build: Bump various devDependencies - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: build: Bump various devDependencies .. build: Bump various devDependencies grunt-contrib-jshint: 0.11.0 -> 0.11.3 grunt-jscs:1.5.0 -> 1.8.0 karma-chrome-launcher: 0.1.7 -> 0.1.8 qunitjs: 1.17.1 -> 1.18.0 Some trivial indentation and line-spacing changes to make this pass jscs. Change-Id: Ieeb6dbcd3e6d9f6f0fb9865d356da462b9b0499b --- M package.json M resources/src/jquery/jquery.tablesorter.js M resources/src/mediawiki.api/mediawiki.api.js M tests/qunit/suites/resources/jquery/jquery.textSelection.test.js M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js 5 files changed, 13 insertions(+), 15 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index fc2bd3a..684eb2b 100644 --- a/package.json +++ b/package.json @@ -11,15 +11,15 @@ "grunt-cli": "0.1.13", "grunt-banana-checker": "0.2.1", "grunt-contrib-copy": "0.8.0", -"grunt-contrib-jshint": "0.11.0", +"grunt-contrib-jshint": "0.11.3", "grunt-contrib-watch": "0.6.1", -"grunt-jscs": "1.5.0", +"grunt-jscs": "1.8.0", "grunt-jsonlint": "1.0.4", "grunt-karma": "0.10.1", "karma": "0.12.31", -"karma-chrome-launcher": "0.1.7", +"karma-chrome-launcher": "0.1.8", "karma-firefox-launcher": "0.1.4", "karma-qunit": "0.1.4", -"qunitjs": "1.17.1" +"qunitjs": "1.18.0" } } diff --git a/resources/src/jquery/jquery.tablesorter.js b/resources/src/jquery/jquery.tablesorter.js index ff5ff0a..94fdca5 100644 --- a/resources/src/jquery/jquery.tablesorter.js +++ b/resources/src/jquery/jquery.tablesorter.js @@ -708,7 +708,6 @@ /* Public scope */ $.tablesorter = { - defaultOptions: { cssHeader: 'headerSort', cssAsc: 'headerSortUp', diff --git a/resources/src/mediawiki.api/mediawiki.api.js b/resources/src/mediawiki.api/mediawiki.api.js index 3a19e02..08996fe 100644 --- a/resources/src/mediawiki.api/mediawiki.api.js +++ b/resources/src/mediawiki.api/mediawiki.api.js @@ -5,7 +5,6 @@ // wondering, would it be simpler to make it easy to clone the api object, // change error handling, and use that instead? var defaultOptions = { - // Query parameters for API requests parameters: { action: 'query', @@ -21,6 +20,7 @@ dataType: 'json' } }, + // Keyed by ajax url and symbolic name for the individual request promises = {}; diff --git a/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js b/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js index 56b0fa9..4bf44b0 100644 --- a/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js @@ -244,16 +244,15 @@ caretSample = 'Some big text that we like to work with. Nothing fancy... you know what I mean?'; -/* - // @broken: Disabled per bug 34820 + /* @broken: Disabled per bug 34820 caretTest({ - description: 'getCaretPosition with original/empty selection - bug 31847 with IE 6/7/8', - text: caretSample, - start: [0, caretSample.length], // Opera and Firefox (prior to FF 6.0) default caret to the end of the box (caretSample.length) - end: [0, caretSample.length], // Other browsers default it to the beginning (0), so check both. - mode: 'get' + description: 'getCaretPosition with original/empty selection - bug 31847 with IE 6/7/8', + text: caretSample, + start: [0, caretSample.length], // Opera and Firefox (prior to FF 6.0) default caret to the end of the box (caretSample.length) + end: [0, caretSample.length], // Other browsers default it to the beginning (0), so check both. + mode: 'get' }); -*/ + */ caretTest( { description: 'set/getCaretPosition with forced empty selection', diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js index 7e23e2f..9dde167 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js @@ -386,7 +386,7 @@ ); } ); -// Tests that {{-transformation vs. general parsing are done as requested + // Tests that {{-transformation vs. general parsing are done as requested QUnit.test( 'Curly brace transformation', 16, function ( assert ) {