[MediaWiki-commits] [Gerrit] (bug 48298) Set status in EditEntity for failed permission c... - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/63078 Change subject: (bug 48298) Set status in EditEntity for failed permission check .. (bug 48298) Set status in EditEntity for failed permission check - instead of throwing \PermissionsError (verified for trying to edit protected items via bot) Change-Id: If80689bc8a56290f1df33309670707f88c3ceae6 --- M repo/Wikibase.i18n.php M repo/includes/EditEntity.php M repo/tests/phpunit/includes/EditEntityTest.php 3 files changed, 8 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/78/63078/3 diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php index 1527c05..240a051 100644 --- a/repo/Wikibase.i18n.php +++ b/repo/Wikibase.i18n.php @@ -233,7 +233,7 @@ 'wikibase-api-not-recognized-array' = 'An array was expected, but not found.', # Do not translate 'wikibase-api-not-recognized-language' = 'The supplied language identifier was not recognized.', # Do not translate 'wikibase-api-not-recognized-siteid' = 'The supplied site identifier was not recognized.', # Do not translate - 'wikibase-api-no-permissions' = 'The logged in user does not have sufficient rights.', # Do not translate + 'wikibase-api-no-permissions' = 'The user does not have sufficient rights.', # Do not translate 'wikibase-api-no-revision' = 'The revision could not be found.', # Do not translate 'wikibase-api-patch-empty' = 'The generated patch turned out to be empty.', # Do not translate 'wikibase-api-patch-incomplete' = 'The generated patch turned out to be incomplete.', # Do not translate diff --git a/repo/includes/EditEntity.php b/repo/includes/EditEntity.php index eae909e..4a2e31c 100644 --- a/repo/includes/EditEntity.php +++ b/repo/includes/EditEntity.php @@ -138,7 +138,7 @@ * @since 0.1 * @var array */ - protected $requiredPremissions = array( + protected $requiredPermissions = array( 'edit', ); @@ -524,28 +524,25 @@ * @param String $permission */ public function addRequiredPermission( $permission ) { - $this-requiredPremissions[] = $permission; + $this-requiredPermissions[] = $permission; } /** * Checks the necessary permissions to perform this edit. * Per default, the 'edit' permission (and if needed, the 'create' permission) is checked. * Use addRequiredPermission() to check more permissions. -* -* @throws \PermissionsError if the user's permissions are not sufficient */ public function checkEditPermissions() { wfProfileIn( __METHOD__ ); - foreach ( $this-requiredPremissions as $action ) { + foreach ( $this-requiredPermissions as $action ) { $permissionStatus = $this-newContent-checkPermission( $action, $this-getUser() ); $this-status-merge( $permissionStatus ); if ( !$this-status-isOK() ) { $this-errorType |= self::PERMISSION_ERROR; - wfProfileOut( __METHOD__ ); - throw new \PermissionsError( $action, $permissionStatus-getErrorsArray() ); + $this-status-fatal( 'no-permission' ); } } @@ -553,11 +550,7 @@ } /** -* Checks the necessary permissions to perform this edit. -* Per default, the 'edit' permission (and if needed, the 'create' permission) is checked. -* Use addRequiredPermission() to check more permissions. -* -* @throws \PermissionsError if the user's permissions are not sufficient +* Checks if rate limits have been exceeded. */ public function checkRateLimits() { wfProfileIn( __METHOD__ ); diff --git a/repo/tests/phpunit/includes/EditEntityTest.php b/repo/tests/phpunit/includes/EditEntityTest.php index b706de5..a2f91d0 100644 --- a/repo/tests/phpunit/includes/EditEntityTest.php +++ b/repo/tests/phpunit/includes/EditEntityTest.php @@ -458,18 +458,10 @@ $edit = new EditEntity( $content ); - try { - $edit-checkEditPermissions(); - - $this-assertTrue( $expectedOK, 'this permission check was expected to fail!' ); - } catch ( \PermissionsError $ex ) { - $this-assertFalse( $expectedOK, 'this permission check was expected to pass! ' - . $ex-permission . ': ' . var_export( $ex-errors, true ) ); - } + $edit-checkEditPermissions(); $this-assertEquals( $expectedOK, $edit-getStatus()-isOK()
[MediaWiki-commits] [Gerrit] Deprecate some unused one-line global functions - change (mediawiki/core)
PleaseStand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63108 Change subject: Deprecate some unused one-line global functions .. Deprecate some unused one-line global functions * wfArrayLookup() is similar to array_intersect_key() (PHP 5.1.0+) yet has serious limitations. For example, integer string values are implicitly cast to integers in the former function. * wfTime() just returns microtime( true ) (param added in PHP 5). * swap() was added in r7939 for no apparent reason. It is easily replaceable by list( $a, $b ) = array( $b, $a ); Change-Id: I2c6844fc48a265d2d885083b5bed8df846e0aaf4 --- M includes/GlobalFunctions.php M tests/phpunit/includes/GlobalFunctions/GlobalTest.php 2 files changed, 8 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/08/63108/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5c45577..e911bbe 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -130,14 +130,16 @@ /** * Array lookup - * Returns an array where the values in the first array are replaced by the - * values in the second array with the corresponding keys + * Returns an array where the values in array $b are replaced by the + * values in array $a with the corresponding keys * + * @deprecated since 1.22; use array_intersect_key() * @param $a Array * @param $b Array * @return array */ function wfArrayLookup( $a, $b ) { + wfDeprecated( __FUNCTION__, '1.22' ); return array_flip( array_intersect( array_flip( $a ), array_keys( $b ) ) ); } @@ -2024,9 +2026,11 @@ /** * Get the current unix timestamp with microseconds. Useful for profiling + * @deprecated since 1.22; call microtime() directly * @return Float */ function wfTime() { + wfDeprecated( __FUNCTION__, '1.22' ); return microtime( true ); } @@ -2437,10 +2441,12 @@ /** * Swap two variables * + * @deprecated since 1.22 * @param $x Mixed * @param $y Mixed */ function swap( $x, $y ) { + wfDeprecated( __FUNCTION__, '1.22' ); $z = $x; $x = $y; $y = $z; diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php index 166a3ce..6b4c66a 100644 --- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php +++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php @@ -103,13 +103,6 @@ UserMailer::quotedPrintable( \xc4\x88u legebla?, UTF-8 ) ); } - function testTime() { - $start = wfTime(); - $this-assertInternalType( 'float', $start ); - $end = wfTime(); - $this-assertTrue( $end $start, Time is running backwards! ); - } - public static function provideArrayToCGI() { return array( array( array(), '' ), // empty @@ -378,19 +371,6 @@ if ( isset( $old_server_setting ) ) { $_SERVER['HTTP_ACCEPT_ENCODING'] = $old_server_setting; } - } - - function testSwapVarsTest() { - $var1 = 1; - $var2 = 2; - - $this-assertEquals( $var1, 1, 'var1 is set originally' ); - $this-assertEquals( $var2, 2, 'var1 is set originally' ); - - swap( $var1, $var2 ); - - $this-assertEquals( $var1, 2, 'var1 is swapped' ); - $this-assertEquals( $var2, 1, 'var2 is swapped' ); } function testWfPercentTest() { -- To view, visit https://gerrit.wikimedia.org/r/63108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c6844fc48a265d2d885083b5bed8df846e0aaf4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: PleaseStand pleasest...@live.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make wfReadOnly() a wrapper around wfReadOnlyReason() - change (mediawiki/core)
PleaseStand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63109 Change subject: Make wfReadOnly() a wrapper around wfReadOnlyReason() .. Make wfReadOnly() a wrapper around wfReadOnlyReason() This makes more sense than having wfReadOnlyReason() call wfReadOnly() for its side effect of setting $wgReadOnly to the contents of $wgReadOnlyFile if the file exists. Change-Id: Ic723aed368915ac3757f3100ddbbeb3b5a4cdc15 --- M includes/GlobalFunctions.php 1 file changed, 16 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/63109/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5c45577..82e4c69 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1221,36 +1221,31 @@ } /** - * Check if the wiki read-only lock file is present. This can be used to lock - * off editing functions, but doesn't guarantee that the database will not be - * modified. + * Check whether the wiki is in read-only mode. * * @return bool */ function wfReadOnly() { - global $wgReadOnlyFile, $wgReadOnly; - - if ( !is_null( $wgReadOnly ) ) { - return (bool)$wgReadOnly; - } - if ( $wgReadOnlyFile == '' ) { - return false; - } - // Set $wgReadOnly for faster access next time - if ( is_file( $wgReadOnlyFile ) ) { - $wgReadOnly = file_get_contents( $wgReadOnlyFile ); - } else { - $wgReadOnly = false; - } - return (bool)$wgReadOnly; + return wfReadOnlyReason() !== false; } /** - * @return bool + * Get the value of $wgReadOnly or the contents of $wgReadOnlyFile. + * + * @return string|bool: String when in read-only mode; false otherwise */ function wfReadOnlyReason() { - global $wgReadOnly; - wfReadOnly(); + global $wgReadOnly, $wgReadOnlyFile; + + if ( $wgReadOnly === null ) { + // Set $wgReadOnly for faster access next time + if ( is_file( $wgReadOnlyFile ) filesize( $wgReadOnlyFile ) 0 ) { + $wgReadOnly = file_get_contents( $wgReadOnlyFile ); + } else { + $wgReadOnly = false; + } + } + return $wgReadOnly; } -- To view, visit https://gerrit.wikimedia.org/r/63109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic723aed368915ac3757f3100ddbbeb3b5a4cdc15 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: PleaseStand pleasest...@live.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add. 'dist' aggregator for 'pages_created' metric. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/63110 Change subject: add. 'dist' aggregator for 'pages_created' metric. .. add. 'dist' aggregator for 'pages_created' metric. Change-Id: I33c3c765cba9845ce21a497e58c8472dbca4c545 --- M user_metrics/metrics/pages_created.py 1 file changed, 19 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/10/63110/1 diff --git a/user_metrics/metrics/pages_created.py b/user_metrics/metrics/pages_created.py index dcedfb1..cc5bf7b 100644 --- a/user_metrics/metrics/pages_created.py +++ b/user_metrics/metrics/pages_created.py @@ -6,9 +6,9 @@ from user_metrics.config import logging import os +from numpy import mean, std, median import user_metrics.utils.multiprocessing_wrapper as mpw import user_metric as um -from user_metrics.etl.aggregator import decorator_builder, boolean_rate from user_metrics.metrics import query_mod from user_metrics.metrics.users import UMP_MAP @@ -97,7 +97,6 @@ count = query_mod.pages_created_query(uid, metric_params.project, metric_params) -print count except query_mod.UMQueryCallError: dropped_users += 1 continue @@ -119,4 +118,21 @@ # DEFINE METRIC AGGREGATORS # == -# TODO - add sum, median, mean, min, and max aggregators +from user_metrics.etl.aggregator import build_numpy_op_agg, build_agg_meta +from user_metrics.metrics.user_metric import METRIC_AGG_METHOD_KWARGS + +metric_header = PagesCreated.header() + +field_prefixes =\ +{ +'count_': 1, +} + +# Build dist decorator +op_list = [sum, mean, std, median, min, max] +pages_created_stats_agg = build_numpy_op_agg( +build_agg_meta(op_list, field_prefixes), metric_header, +'pages_created_stats_agg') + +agg_kwargs = getattr(pages_created_stats_agg, METRIC_AGG_METHOD_KWARGS) +setattr(pages_created_stats_agg, METRIC_AGG_METHOD_KWARGS, agg_kwargs) -- To view, visit https://gerrit.wikimedia.org/r/63110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33c3c765cba9845ce21a497e58c8472dbca4c545 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk ryan.faulk...@mail.mcgill.ca ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add. Register 'dist' aggregator for 'pages_created' in API. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/63111 Change subject: add. Register 'dist' aggregator for 'pages_created' in API. .. add. Register 'dist' aggregator for 'pages_created' in API. Change-Id: I6bc1d58c2740705c4422c10f466706d72dc8fe4c --- M user_metrics/api/engine/request_meta.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/11/63111/1 diff --git a/user_metrics/api/engine/request_meta.py b/user_metrics/api/engine/request_meta.py index f5c52f9..3aa44a0 100644 --- a/user_metrics/api/engine/request_meta.py +++ b/user_metrics/api/engine/request_meta.py @@ -319,7 +319,8 @@ from user_metrics.metrics.namespace_of_edits import NamespaceEdits, \ namespace_edits_sum from user_metrics.metrics.live_account import LiveAccount, live_accounts_agg -from user_metrics.metrics.pages_created import PagesCreated +from user_metrics.metrics.pages_created import PagesCreated, \ +pages_created_stats_agg # Registered metrics types @@ -357,6 +358,7 @@ 'dist+edit_rate': er_stats_agg, 'proportion+blocks': block_rate_agg, 'dist+time_to_threshold': ttt_stats_agg, +'dist+pages_created': pages_created_stats_agg, } -- To view, visit https://gerrit.wikimedia.org/r/63111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6bc1d58c2740705c4422c10f466706d72dc8fe4c Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk ryan.faulk...@mail.mcgill.ca ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add. 'dist' aggregator for 'pages_created' metric. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: add. 'dist' aggregator for 'pages_created' metric. .. add. 'dist' aggregator for 'pages_created' metric. Change-Id: I33c3c765cba9845ce21a497e58c8472dbca4c545 --- M user_metrics/metrics/pages_created.py 1 file changed, 19 insertions(+), 3 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/metrics/pages_created.py b/user_metrics/metrics/pages_created.py index dcedfb1..cc5bf7b 100644 --- a/user_metrics/metrics/pages_created.py +++ b/user_metrics/metrics/pages_created.py @@ -6,9 +6,9 @@ from user_metrics.config import logging import os +from numpy import mean, std, median import user_metrics.utils.multiprocessing_wrapper as mpw import user_metric as um -from user_metrics.etl.aggregator import decorator_builder, boolean_rate from user_metrics.metrics import query_mod from user_metrics.metrics.users import UMP_MAP @@ -97,7 +97,6 @@ count = query_mod.pages_created_query(uid, metric_params.project, metric_params) -print count except query_mod.UMQueryCallError: dropped_users += 1 continue @@ -119,4 +118,21 @@ # DEFINE METRIC AGGREGATORS # == -# TODO - add sum, median, mean, min, and max aggregators +from user_metrics.etl.aggregator import build_numpy_op_agg, build_agg_meta +from user_metrics.metrics.user_metric import METRIC_AGG_METHOD_KWARGS + +metric_header = PagesCreated.header() + +field_prefixes =\ +{ +'count_': 1, +} + +# Build dist decorator +op_list = [sum, mean, std, median, min, max] +pages_created_stats_agg = build_numpy_op_agg( +build_agg_meta(op_list, field_prefixes), metric_header, +'pages_created_stats_agg') + +agg_kwargs = getattr(pages_created_stats_agg, METRIC_AGG_METHOD_KWARGS) +setattr(pages_created_stats_agg, METRIC_AGG_METHOD_KWARGS, agg_kwargs) -- To view, visit https://gerrit.wikimedia.org/r/63110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33c3c765cba9845ce21a497e58c8472dbca4c545 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk ryan.faulk...@mail.mcgill.ca Gerrit-Reviewer: Milimetric dandree...@wikimedia.org Gerrit-Reviewer: Rfaulk ryan.faulk...@mail.mcgill.ca ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 48311): Added missing barrier to newline migration - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/63112 Change subject: (Bug 48311): Added missing barrier to newline migration .. (Bug 48311): Added missing barrier to newline migration * refs leave behind a marker in place and cannot use the mw:Object/* meta-types since DOM processors expects matched start/end pairs. So, mw:Ext/Ref/Content meta-marker slips through the conditions that prevent newline migration across the ref-tags. * Added a new check (in migrateTrailingNLs DOM pass) for extension placeholder markers since these are also newline migration barriers. * Fixes parsing of echo a ref/\nref/ so that the newline between the two ref-tags is not migrated out of the paragraph. Change-Id: I9c10ab734bc4af29fdf94ad06a664271a315b7cb --- M js/lib/mediawiki.DOMPostProcessor.js 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/12/63112/1 diff --git a/js/lib/mediawiki.DOMPostProcessor.js b/js/lib/mediawiki.DOMPostProcessor.js index 5f5962d..918b0fc 100644 --- a/js/lib/mediawiki.DOMPostProcessor.js +++ b/js/lib/mediawiki.DOMPostProcessor.js @@ -738,7 +738,8 @@ // - are not literal html metas (found in wikitext) // - are not mw:PageProp (cannot cross page-property boundary // - are not mw:Includes/* (cannot cross *include* boundary) - // - are not tpl start/end markers (cannot cross tpl boundary) + // - are not ext/tpl start/end markers (cannot cross ext/tpl boundary) + // - are not ext placeholder markers (cannot cross ext boundaries) while (n DU.hasNodeName(n, meta) !DU.isLiteralHTMLNode(n)) { var prop = n.getAttribute(property), type = n.getAttribute(typeof); @@ -747,7 +748,7 @@ break; } - if (type (DU.isTplMetaType(type) || type.match(/mw:Includes/))) { + if (type (DU.isTplMetaType(type) || type.match(/\b(mw:Includes|mw:Ext\/)/))) { break; } @@ -2280,9 +2281,6 @@ // Ex: {{compactTOC8|side=yes|seealso=yes}} generates a mw:PageProp/notoc meta // that gets the mw:Object/Template typeof attached to it. It is not okay to // delete it! - // - // SSS FIXME: This strips out all Ext/Ref/Content meta-tags that the VE needs - // to regenerate references on demand. To be fixed. var metaType = node.getAttribute(typeof); if (metaType metaType.match(/^\bmw:(Object|EndTag|TSRMarker|Ext)\/?[^\s]*\b/) -- To view, visit https://gerrit.wikimedia.org/r/63112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c10ab734bc4af29fdf94ad06a664271a315b7cb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ULS config for deployment phase 1 - change (operations/mediawiki-config)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/63113 Change subject: ULS config for deployment phase 1 .. ULS config for deployment phase 1 Change-Id: Iefe2e2e5407134337ff6831b4e5912f223b853a9 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings-labs.php M wmf-config/InitialiseSettings.php 3 files changed, 90 insertions(+), 161 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/13/63113/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index ee8478d..cd31caa 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -,17 +,6 @@ require_once( $IP/extensions/TemplateData/TemplateData.php ); } -if ( $wmgUseNarayam ) { - require_once( $IP/extensions/Narayam/Narayam.php ); - $wgNarayamEnabledByDefault = $wmgNarayamEnabledByDefault; - $wgNarayamUseBetaMapping = $wmgNarayamUseBetaMapping; -} - -if ( $wmgUseWebFonts ) { - require_once( $IP/extensions/WebFonts/WebFonts.php ); - $wgWebFontsEnabledByDefault = $wmgWebFontsEnabledByDefault; -} - if ( $wmgUseGoogleNewsSitemap ) { include( $IP/extensions/GoogleNewsSitemap/GoogleNewsSitemap.php ); $wgGNSMfallbackCategory = $wmgGNSMfallbackCategory; diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 4743428..9687ade 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -244,12 +244,7 @@ 'default' = true, ), - '-wmgULSPosition' = array( - 'default' = 'interlanguage', - # Multilingual wikis (only the few existing on Beta) - 'commonswiki' = 'personal', // Assuming the multilingualism prevails on 13M interwikis3 - 'metawiki' = 'personal', - 'testwiki' = 'personal', + 'wmgULSPosition' = array( # Beta-specific 'ee-prototype' = 'personal', 'labswiki' = 'personal', diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 37a527e..aeaf1b4 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10856,149 +10856,6 @@ 'default' = true, ), -'wmgUseNarayam' = array( - 'default' = false, - 'amwiki' = true, // Bug 41460 - 'amwikiquote' = true, // Bug 41460 - 'amwiktionary' = true, // Bug 41460 - 'aswiki' = true, // Bug 32042 - 'aswikisource' = true, // Bug 43129 - 'betawikiversity' = true, // Bug 41912 - 'bhwiki' = true, // Bug 25326 - 'bnwiki' = true, // Bug 40366 - 'bnwikibooks' = true, // Bug 40366 - 'bnwikisource' = true, // Bug 36104 - 'commonswiki' = true, // Bug 32619 - 'guwiki' = true, // Bug 33423 - 'guwikisource' = true, // Bug 35138 - 'guwiktionary' = true, // bug 37365 - 'guwikiquote' = true, // bug 37385 - 'hiwiki' = true, // Bug 35436 - 'hiwiktionary' = true, // Bug 41015 - 'kawiki' = true, // Bug 39432 - 'knwiki' = true, // Bug 34516 - 'knwikisource' = true, // Bug 37456 - 'mlwikiquote' = true, // Bug 27949 - 'mlwikibooks' = true, // Bug 27949 - 'mlwiktionary' = true, // Bug 27949 - 'mlwikisource' = true, // Bug 27949 - 'mlwiki' = true, // Bug 27949 - 'mrwiki' = true, // Bug 32669 - 'mrwikibooks' = true, // Bug 39200 - 'mrwikiquote' = true, // Bug 39200 - 'mrwiktionary' = true, // Bug 39200 - 'mrwikisource' = true, // Bug 34454 - 'orwiki' = true, // Bug 31814 - 'orwiktionary' = true, // Bug 31857 - 'pawiki' = true, // Bug 32516 - 'sawiki' = true, // Bug 29515 - 'sawikibooks' = true, // Bug 29515 - 'sawikiquote' = true, // Bug 29515 - 'sawikisource' = true, // Bug 29515 - 'sawiktionary' = true, // Bug 29515 - 'siwiki' = true, // Bug 31372 - 'siwikibooks' = true, // Bug 31372 - 'siwiktionary' = true, // Bug 31372 - 'tawiki' = true, // Bug 29798 - 'tawikibooks' = true, // Bug 29798 - 'tawikinews' = true, // Bug 31142 - 'tawikiquote' = true, // Bug 31142 - 'tawikisource' = true, // Bug 29798 - 'tawiktionary' = true, // Bug 31142 - 'tewiki' = true, // Bug 33480 - 'tewikisource' = true, // Bug 37336 - 'tewiktionary' = true, // Bug 37336 -), -'wmgNarayamEnabledByDefault' = array( - 'default' = false, // Note Narayam default is true - 'commonswiki' = false, // Bug 32619 - 'amwiki' = true, // Bug 41460 - 'amwikiquote' = true, // Bug 41460 - 'amwiktionary' = true, // Bug 41460 - 'kawiki' = true, // Bug 39432 - 'knwiki' = true, // Bug 34591 - 'orwiki' = true, // Bug 31859 - 'orwiktionary' = true, // Bug 31859 -),
[MediaWiki-commits] [Gerrit] fix bug 47806 (minor edit and watch this page checkboxes... - change (mediawiki...SemanticForms)
Foxtrott has uploaded a new change for review. https://gerrit.wikimedia.org/r/63114 Change subject: fix bug 47806 (minor edit and watch this page checkboxes no longer work in forms) .. fix bug 47806 (minor edit and watch this page checkboxes no longer work in forms) With some exceptions values from standard inputs were ignored. Change-Id: I3bf24ac4d383b782182e52d065c8b23429084eba --- M includes/SF_AutoeditAPI.php 1 file changed, 11 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/14/63114/1 diff --git a/includes/SF_AutoeditAPI.php b/includes/SF_AutoeditAPI.php index da7dafa..b5ce5d5 100644 --- a/includes/SF_AutoeditAPI.php +++ b/includes/SF_AutoeditAPI.php @@ -309,22 +309,21 @@ // Find existing target article if it exists, or create a new one. $article = new Article( Title::newFromText( $this-mOptions[ 'target' ] ) ); - $summary = (array_key_exists( 'wpSummary', $this-mOptions )) ? $this-mOptions[ 'wpSummary' ] : ''; - $startTime = (array_key_exists( 'wpStartTime', $this-mOptions )) ? $this-mOptions[ 'wpStarttime' ] : wfTimestampNow(); - $editTime = (array_key_exists( 'wpEdittime', $this-mOptions )) ? $this-mOptions[ 'wpEdittime' ] : ''; - // set up a normal edit page // we'll feed it our data to simulate a normal edit $editor = new EditPage( $article ); - // set up simulated form data - $data = array( - 'wpTextbox1' = $targetContent, - 'wpSummary' = $summary, - 'wpStarttime' = $startTime, - 'wpEdittime' = $editTime, - 'wpEditToken' = $wgUser-isLoggedIn() ? $wgUser-editToken() : EDIT_TOKEN_SUFFIX, - 'action' = 'submit', + // set up form data: + // merge data coming from the web request on top of some defaults + $data = array_merge( + array( + 'wpTextbox1' = $targetContent, + 'wpSummary' = '', + 'wpStarttime' = wfTimestampNow(), + 'wpEdittime' = '', + 'wpEditToken' = $wgUser-isLoggedIn() ? $wgUser-editToken() : EDIT_TOKEN_SUFFIX, + 'action' = 'submit', + ), $this-getRequest()-getValues() ); // set up a faux request with the simulated data -- To view, visit https://gerrit.wikimedia.org/r/63114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3bf24ac4d383b782182e52d065c8b23429084eba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Foxtrott s7ep...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplified imports - change (mediawiki...Diff)
Ataherivand has submitted this change and it was merged. Change subject: Simplified imports .. Simplified imports Change-Id: Ic8230cb309ce095b15cd1b8b1d4202d1d35314d5 --- M tests/phpunit/diffop/DiffOpAddTest.php M tests/phpunit/diffop/DiffOpChangeTest.php M tests/phpunit/diffop/DiffOpRemoveTest.php 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Ataherivand: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/diffop/DiffOpAddTest.php b/tests/phpunit/diffop/DiffOpAddTest.php index 9a53a12..e51a8ec 100644 --- a/tests/phpunit/diffop/DiffOpAddTest.php +++ b/tests/phpunit/diffop/DiffOpAddTest.php @@ -2,7 +2,7 @@ namespace Diff\Tests; -use Diff\DiffOpAdd as DiffOpAdd; +use Diff\DiffOpAdd; /** * Tests for the Diff\DiffOpAdd class. diff --git a/tests/phpunit/diffop/DiffOpChangeTest.php b/tests/phpunit/diffop/DiffOpChangeTest.php index a655617..0f4153a 100644 --- a/tests/phpunit/diffop/DiffOpChangeTest.php +++ b/tests/phpunit/diffop/DiffOpChangeTest.php @@ -2,7 +2,7 @@ namespace Diff\Tests; -use Diff\DiffOpChange as DiffOpChange; +use Diff\DiffOpChange; /** * Tests for the Diff\DiffOpChange class. diff --git a/tests/phpunit/diffop/DiffOpRemoveTest.php b/tests/phpunit/diffop/DiffOpRemoveTest.php index 6e6f4c7..487be51 100644 --- a/tests/phpunit/diffop/DiffOpRemoveTest.php +++ b/tests/phpunit/diffop/DiffOpRemoveTest.php @@ -2,7 +2,7 @@ namespace Diff\Tests; -use Diff\DiffOpRemove as DiffOpRemove; +use Diff\DiffOpRemove; /** * Tests for the Diff\DiffOpRemove class. -- To view, visit https://gerrit.wikimedia.org/r/62828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic8230cb309ce095b15cd1b8b1d4202d1d35314d5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Anja Jentzsch a...@anjeve.de Gerrit-Reviewer: Ataherivand abraham.taheriv...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad jeb...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: Markus Kroetzsch mar...@semantic-mediawiki.org Gerrit-Reviewer: Nikola Smolenski smole...@eunet.rs Gerrit-Reviewer: Silke Meyer silke.me...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move tests for code in directory diffop/diff into matching t... - change (mediawiki...Diff)
Ataherivand has submitted this change and it was merged. Change subject: Move tests for code in directory diffop/diff into matching test directory .. Move tests for code in directory diffop/diff into matching test directory Change-Id: I13547b4820660431807e1b120ff3d92614196996 --- M Diff.mw.php R tests/phpunit/diffop/diff/DiffAsOpTest.php R tests/phpunit/diffop/diff/DiffTest.php R tests/phpunit/diffop/diff/ListDiffTest.php R tests/phpunit/diffop/diff/MapDiffTest.php 5 files changed, 5 insertions(+), 4 deletions(-) Approvals: Ataherivand: Looks good to me, approved jenkins-bot: Verified diff --git a/Diff.mw.php b/Diff.mw.php index dfadc9e..1b17f82 100644 --- a/Diff.mw.php +++ b/Diff.mw.php @@ -65,13 +65,14 @@ 'differ/ListDiffer', 'differ/MapDiffer', - 'diffop/DiffAsOp', 'diffop/DiffOpAdd', 'diffop/DiffOpChange', 'diffop/DiffOpRemove', - 'diffop/Diff', - 'diffop/ListDiff', - 'diffop/MapDiff', + + 'diffop/diff/DiffAsOp', + 'diffop/diff/Diff', + 'diffop/diff/ListDiff', + 'diffop/diff/MapDiff', 'patcher/ListPatcher', 'patcher/MapPatcher', diff --git a/tests/phpunit/diffop/DiffAsOpTest.php b/tests/phpunit/diffop/diff/DiffAsOpTest.php similarity index 100% rename from tests/phpunit/diffop/DiffAsOpTest.php rename to tests/phpunit/diffop/diff/DiffAsOpTest.php diff --git a/tests/phpunit/diffop/DiffTest.php b/tests/phpunit/diffop/diff/DiffTest.php similarity index 100% rename from tests/phpunit/diffop/DiffTest.php rename to tests/phpunit/diffop/diff/DiffTest.php diff --git a/tests/phpunit/diffop/ListDiffTest.php b/tests/phpunit/diffop/diff/ListDiffTest.php similarity index 100% rename from tests/phpunit/diffop/ListDiffTest.php rename to tests/phpunit/diffop/diff/ListDiffTest.php diff --git a/tests/phpunit/diffop/MapDiffTest.php b/tests/phpunit/diffop/diff/MapDiffTest.php similarity index 100% rename from tests/phpunit/diffop/MapDiffTest.php rename to tests/phpunit/diffop/diff/MapDiffTest.php -- To view, visit https://gerrit.wikimedia.org/r/62829 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I13547b4820660431807e1b120ff3d92614196996 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Diff Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Anja Jentzsch a...@anjeve.de Gerrit-Reviewer: Ataherivand abraham.taheriv...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad jeb...@gmail.com Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de Gerrit-Reviewer: Markus Kroetzsch mar...@semantic-mediawiki.org Gerrit-Reviewer: Nikola Smolenski smole...@eunet.rs Gerrit-Reviewer: Silke Meyer silke.me...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Kill getOffsetFromNode() with fire - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Kill getOffsetFromNode() with fire .. Kill getOffsetFromNode() with fire The way it operated was evil. It did a depth-first search from the root, finding the node using reference equality. For documents with deep structures, this could take a long time. Inez did some profiling and found it was called tens of millions of times on a complex document. Kill getOffsetFromNode() and move its functionality to getOffset(). The logic has been completely rewritten: getOffset() now traverses up from the node rather than down from the root, and pretty much does the reverse of what getNodeFromOffset() does. This should be much more efficient even without offset caching in the node objects (which we may still implement later). Change-Id: I125f9fa423c40db6472e2c4a7c94214218ba3bc7 --- M modules/ve/ce/ve.ce.Document.js M modules/ve/ce/ve.ce.Node.js M modules/ve/dm/ve.dm.Document.js M modules/ve/dm/ve.dm.Node.js M modules/ve/dm/ve.dm.TransactionProcessor.js M modules/ve/test/dm/ve.dm.BranchNode.test.js M modules/ve/ve.BranchNode.js 7 files changed, 33 insertions(+), 49 deletions(-) Approvals: Inez: Looks good to me, approved Trevor Parscal: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/ve.ce.Document.js b/modules/ve/ce/ve.ce.Document.js index 994ccb0..d209692 100644 --- a/modules/ve/ce/ve.ce.Document.js +++ b/modules/ve/ce/ve.ce.Document.js @@ -133,7 +133,7 @@ return { node: $slug[0].childNodes[0], offset: 0 }; } node = this.getNodeFromOffset( offset ); - startOffset = this.getDocumentNode().getOffsetFromNode( node ) + ( ( node.isWrapped() ) ? 1 : 0 ); + startOffset = node.getOffset() + ( ( node.isWrapped() ) ? 1 : 0 ); current = [node.$.contents(), 0]; stack = [current]; while ( stack.length 0 ) { diff --git a/modules/ve/ce/ve.ce.Node.js b/modules/ve/ce/ve.ce.Node.js index 2a5bf96..c449a01 100644 --- a/modules/ve/ce/ve.ce.Node.js +++ b/modules/ve/ce/ve.ce.Node.js @@ -197,6 +197,16 @@ }; /** + * Get the offset of the node. + * + * @see ve.dm.Node#getOffset + * @returns {number} Offset + */ +ve.ce.Node.prototype.getOffset = function () { + return this.model.getOffset(); +}; + +/** * Check if the node can be split. * * @method diff --git a/modules/ve/dm/ve.dm.Document.js b/modules/ve/dm/ve.dm.Document.js index 221108b..de37503 100644 --- a/modules/ve/dm/ve.dm.Document.js +++ b/modules/ve/dm/ve.dm.Document.js @@ -396,7 +396,7 @@ */ ve.dm.Document.prototype.getDataFromNode = function ( node ) { var length = node.getLength(), - offset = this.documentNode.getOffsetFromNode( node ); + offset = node.getOffset(); if ( offset = 0 ) { // XXX: If the node is wrapped in an element than we should increment the offset by one so // we only return the content inside the element. diff --git a/modules/ve/dm/ve.dm.Node.js b/modules/ve/dm/ve.dm.Node.js index d539cd0..8729eeb 100644 --- a/modules/ve/dm/ve.dm.Node.js +++ b/modules/ve/dm/ve.dm.Node.js @@ -460,9 +460,28 @@ * * @method * @returns {number} Offset of node + * @throws {Error} Node not found in parent's children array */ ve.dm.Node.prototype.getOffset = function () { - return this.root === this ? 0 : this.root.getOffsetFromNode( this ); + var i, len, siblings, offset; + + if ( !this.parent ) { + return 0; + } + + // Find our index in the parent and add up lengths while we do so + siblings = this.parent.children; + offset = this.parent.getOffset() + ( this.parent === this.root ? 0 : 1 ); + for ( i = 0, len = siblings.length; i len; i++ ) { + if ( siblings[i] === this ) { + break; + } + offset += siblings[i].getOuterLength(); + } + if ( i === len ) { + throw new Error( 'Node not found in parent\'s children array' ); + } + return offset; }; /** diff --git a/modules/ve/dm/ve.dm.TransactionProcessor.js b/modules/ve/dm/ve.dm.TransactionProcessor.js index b571437..9a8f86d 100644 --- a/modules/ve/dm/ve.dm.TransactionProcessor.js +++ b/modules/ve/dm/ve.dm.TransactionProcessor.js @@ -442,8 +442,7 @@ // Lazy-initialize scope scope = scope || this.document.getNodeFromOffset( prevCursor ); // Push the full range of the old scope as an affected range - scopeStart = - this.document.getDocumentNode().getOffsetFromNode( scope ); +
[MediaWiki-commits] [Gerrit] (bug 47365) Fix edge cases in mw.ustring.find, mw.ustring.match - change (mediawiki...Scribunto)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 47365) Fix edge cases in mw.ustring.find, mw.ustring.match .. (bug 47365) Fix edge cases in mw.ustring.find, mw.ustring.match The following errors are fixed: * PHP warning and wrong return value with empty pattern and plain * Incorrect offsets returned when init is larger than the string length * Incorrect captured offsets returned when init is excessively negative Bug: 47365 Change-Id: I9741418287dc727747326d6a19678370ce155a2b --- M engines/LuaCommon/UstringLibrary.php M engines/LuaCommon/lualib/ustring/ustring.lua M tests/engines/LuaCommon/UstringLibraryTests.lua 3 files changed, 69 insertions(+), 11 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/engines/LuaCommon/UstringLibrary.php b/engines/LuaCommon/UstringLibrary.php index 5821a2d..b253e0b 100644 --- a/engines/LuaCommon/UstringLibrary.php +++ b/engines/LuaCommon/UstringLibrary.php @@ -449,6 +449,8 @@ $len = mb_strlen( $s, 'UTF-8' ); if ( $init 0 ) { $init = $len + $init + 1; + } elseif ( $init $len + 1 ) { + $init = $len + 1; } if ( $init 1 ) { @@ -458,7 +460,11 @@ } if ( $plain ) { - $ret = mb_strpos( $s, $pattern, 0, 'UTF-8' ); + if ( $pattern !== '' ) { + $ret = mb_strpos( $s, $pattern, 0, 'UTF-8' ); + } else { + $ret = 0; + } if ( $ret === false ) { return array( null ); } else { @@ -483,6 +489,8 @@ $len = mb_strlen( $s, 'UTF-8' ); if ( $init 0 ) { $init = $len + $init + 1; + } elseif ( $init $len + 1 ) { + $init = $len + 1; } if ( $init 1 ) { $s = mb_substr( $s, $init - 1, $len - $init + 1, 'UTF-8' ); diff --git a/engines/LuaCommon/lualib/ustring/ustring.lua b/engines/LuaCommon/lualib/ustring/ustring.lua index 4aa299f..87f3b4a 100644 --- a/engines/LuaCommon/lualib/ustring/ustring.lua +++ b/engines/LuaCommon/lualib/ustring/ustring.lua @@ -151,6 +151,9 @@ -- @return int local function cpoffset( cps, i ) local min, max, p = 0, cps.len + 1 + if i == 0 then + return 0 + end while min + 1 max do p = math.floor( ( min + max ) / 2 ) + 1 if cps.bytepos[p] = i then @@ -673,6 +676,12 @@ end end + init = init or 1 + if init 0 then + init = cps.len + init + 1 + end + init = math.max( 1, math.min( init, cps.len + 1 ) ) + -- Here is the actual match loop. It just calls 'match' on successive -- starting positions (or not, if the pattern is anchored) until it finds a -- match. @@ -758,17 +767,15 @@ end if plain or patternIsSimple( pattern ) then + if init and init cps.len + 1 then + init = cps.len + 1 + end local m = { S.find( s, pattern, cps.bytepos[init], plain ) } if m[1] then m[1] = cpoffset( cps, m[1] ) m[2] = cpoffset( cps, m[2] ) end return unpack( m ) - end - - init = init or 1 - if init 0 then - init = cps.len + init + 1 end return find( s, cps, pattern, pat, init ) @@ -797,11 +804,6 @@ if patternIsSimple( pattern ) then return S.match( s, pattern, cps.bytepos[init] ) - end - - init = init or 1 - if init 0 then - init = cps.len + init + 1 end local m = { find( s, cps, pattern, pat, init ) } diff --git a/tests/engines/LuaCommon/UstringLibraryTests.lua b/tests/engines/LuaCommon/UstringLibraryTests.lua index d968b58..bc16642 100644 --- a/tests/engines/LuaCommon/UstringLibraryTests.lua +++ b/tests/engines/LuaCommon/UstringLibraryTests.lua @@ -285,6 +285,38 @@ args = { ¡a¡ ¡.¡, '¡.¡', 1, true }, expect = { 5, 7 } }, + { name = 'find: empty delimiter', func = mw.ustring.find, + args = { ¡a¡ ¡.¡, '' }, + expect = { 1, 0 } + }, + { name = 'find: empty delimiter (2)', func = mw.ustring.find, + args = { ¡a¡ ¡.¡, '', 2 }, + expect = { 2, 1 } + }, + { name = 'find: plain + empty delimiter', func = mw.ustring.find, + args = { ¡a¡ ¡.¡, '', 1, true }, + expect = { 1, 0 } + }, + { name = 'find: plain + empty delimiter (2)', func =
[MediaWiki-commits] [Gerrit] (bug 48304) Add 'Feedback' link to the Notifications flyout - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 48304) Add 'Feedback' link to the Notifications flyout .. (bug 48304) Add 'Feedback' link to the Notifications flyout Change-Id: I86e7b5e6762557743752e433a6e2a007596b1891 --- M Echo.php M Hooks.php M modules/overlay/ext.echo.overlay.css M modules/overlay/ext.echo.overlay.js 4 files changed, 17 insertions(+), 0 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/Echo.php b/Echo.php index 9948968..416f9e5 100644 --- a/Echo.php +++ b/Echo.php @@ -143,6 +143,7 @@ 'echo-none', 'echo-mark-all-as-read', 'echo-more-info', + 'echo-feedback', ), ), 'ext.echo.special' = $echoResourceTemplate + array( diff --git a/Hooks.php b/Hooks.php index 0f65134..6eed01a 100644 --- a/Hooks.php +++ b/Hooks.php @@ -586,8 +586,10 @@ static function beforePageDisplay( $out, $skin ) { $user = $out-getUser(); if ( $user-isLoggedIn() $user-getOption( 'echo-notify-show-link' ) ) { + global $wgEchoFeedbackPage; // Load the module for the Notifications flyout $out-addModules( array( 'ext.echo.overlay' ) ); + $out-addJsConfigVars( array( 'wgEchoFeedbackPage' = $wgEchoFeedbackPage ) ); } return true; } diff --git a/modules/overlay/ext.echo.overlay.css b/modules/overlay/ext.echo.overlay.css index 351b271..5974f5c 100644 --- a/modules/overlay/ext.echo.overlay.css +++ b/modules/overlay/ext.echo.overlay.css @@ -159,3 +159,9 @@ line-height: 15px; font-weight: normal; } + +#mw-echo-overlay-feedback-link { + position: absolute; + bottom: 12px; + right: 15px; +} diff --git a/modules/overlay/ext.echo.overlay.js b/modules/overlay/ext.echo.overlay.js index 542c5b6..531a9d2 100644 --- a/modules/overlay/ext.echo.overlay.js +++ b/modules/overlay/ext.echo.overlay.js @@ -130,6 +130,14 @@ ) { // Add the 'mark all as read' button to the title area $title.append( $markReadButton ); + // Display a feedback link if there is no 'mark read' button + } else { + $( 'a' ) + .attr( 'href', mw.config.get( 'wgEchoFeedbackPage' ) + '?c=flyout' ) + .attr( 'id', 'mw-echo-overlay-feedback-link' ) + .attr( 'target', '_blank' ) + .text( mw.msg( 'echo-feedback' ) ) + .appendTo( $title ); } // Add the header to the title area -- To view, visit https://gerrit.wikimedia.org/r/63087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86e7b5e6762557743752e433a6e2a007596b1891 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Bsitu bs...@wikimedia.org Gerrit-Reviewer: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Lwelling lwell...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add alt attribute for img - change (mediawiki...TwnMainPage)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63115 Change subject: Add alt attribute for img .. Add alt attribute for img Change-Id: I2023a600b6af4adf23687b18f9363dced8cd0922 --- M specials/SpecialTwnMainPage.php 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/15/63115/1 diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index f3ff4d1..1a2b963 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -164,7 +164,14 @@ $proofread = round( 100 * $proofread / $stats[MessageGroupStats::TOTAL] ); } - $image = Html::element( 'img', array( 'src' = $url, 'width' = '100%' ) ); + $image = Html::element( + 'img', + array( + 'src' = $url, + 'alt' = $group-getId(), + 'width' = '100%' + ) + ); $label = htmlspecialchars( $group-getLabel( $this-getContext() ) ); $stats = $statsbar-getHtml( $this-getContext() ); $acts = -- To view, visit https://gerrit.wikimedia.org/r/63115 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2023a600b6af4adf23687b18f9363dced8cd0922 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set width for img to be integer - change (mediawiki...TwnMainPage)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63116 Change subject: Set width for img to be integer .. Set width for img to be integer Bad value 100% for attribute width on element img: Expected a digit but saw % instead. Change-Id: I118eab6c9653c267cf74e9eaeda4ee2e9d897113 --- M specials/SpecialTwnMainPage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/16/63116/1 diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index 1a2b963..3f5a11f 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -169,7 +169,7 @@ array( 'src' = $url, 'alt' = $group-getId(), - 'width' = '100%' + 'width' = '100' ) ); $label = htmlspecialchars( $group-getLabel( $this-getContext() ) ); -- To view, visit https://gerrit.wikimedia.org/r/63116 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I118eab6c9653c267cf74e9eaeda4ee2e9d897113 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use correct casing for OutputPage::addHTML() - change (mediawiki...TwnMainPage)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63117 Change subject: Use correct casing for OutputPage::addHTML() .. Use correct casing for OutputPage::addHTML() Change-Id: I0499d1781e218d8c489e03487a53bb40eda7659b --- M specials/SpecialTwnMainPage.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/17/63117/1 diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index 3f5a11f..5c1de17 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -37,7 +37,7 @@ $out-addModuleStyles( 'jquery.uls.grid' ); $out-addModuleStyles( 'ext.translate.mainpage' ); $out-addModules( 'ext.translate.mainpage' ); - $out-addHtml( $out-headElement( $this-getSkin() ) ); + $out-addHTML( $out-headElement( $this-getSkin() ) ); $out-addHTML( Html::openElement( 'div', array( 'class' = 'grid twn-mainpage', ) ) ); @@ -46,8 +46,8 @@ $out-addHTML( $this-searchBar() ); $out-addHTML( $this-projectSelector() ); $out-addHTML( $this-footer() ); - $out-addHtml( $out-getBottomScripts() ); - $out-addHtml( '/body/html' ); + $out-addHTML( $out-getBottomScripts() ); + $out-addHTML( '/body/html' ); } public function header() { -- To view, visit https://gerrit.wikimedia.org/r/63117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0499d1781e218d8c489e03487a53bb40eda7659b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Close unclosed element div - change (mediawiki...TwnMainPage)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63118 Change subject: Close unclosed element div .. Close unclosed element div Change-Id: I676b20fed2124c9b6ba0742cfd0b57e6faa6bb92 --- M specials/SpecialTwnMainPage.php 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/18/63118/1 diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index 5c1de17..8a72d5c 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -38,15 +38,17 @@ $out-addModuleStyles( 'ext.translate.mainpage' ); $out-addModules( 'ext.translate.mainpage' ); $out-addHTML( $out-headElement( $this-getSkin() ) ); - $out-addHTML( Html::openElement( 'div', array( - 'class' = 'grid twn-mainpage', - ) ) ); + $out-addHTML( Html::openElement( + 'div', + array( 'class' = 'grid twn-mainpage' ) + ) ); $out-addHTML( $this-header() ); $out-addHTML( $this-banner() ); $out-addHTML( $this-searchBar() ); $out-addHTML( $this-projectSelector() ); $out-addHTML( $this-footer() ); $out-addHTML( $out-getBottomScripts() ); + $out-addHTML( Html::closeElement( 'div' ) ); // grid twn-mainpage $out-addHTML( '/body/html' ); } -- To view, visit https://gerrit.wikimedia.org/r/63118 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I676b20fed2124c9b6ba0742cfd0b57e6faa6bb92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update code formatting and a few other nit picks - change (mediawiki...TwnMainPage)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63119 Change subject: Update code formatting and a few other nit picks .. Update code formatting and a few other nit picks Change-Id: If3ff1d5021c4285acfaa1a078c3a0aed48b56e38 --- M MainPage.alias.php M MainPage.i18n.php M MainPage.php M resources/js/ext.translate.mainpage.js M specials/SpecialTwnMainPage.php 5 files changed, 39 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/19/63119/1 diff --git a/MainPage.alias.php b/MainPage.alias.php index 31123ad..04d1dbf 100644 --- a/MainPage.alias.php +++ b/MainPage.alias.php @@ -1,4 +1,10 @@ ?php +/** + * Special page aliases for extension TwnMainPage. + * + * @file + * @ingroup Extensions + */ $specialPageAliases = array(); @@ -24,4 +30,4 @@ /** Traditional Chinese (中文(繁體)) */ $specialPageAliases['zh-hant'] = array( 'TwnMainPage' = array( '主頁' ), -); \ No newline at end of file +); diff --git a/MainPage.i18n.php b/MainPage.i18n.php index ecde24c..dab1531 100644 --- a/MainPage.i18n.php +++ b/MainPage.i18n.php @@ -1,4 +1,10 @@ ?php +/** + * Internationalisation file for extension TwnMainPage. + * + * @file + * @ingroup Extensions + */ $messages = array(); diff --git a/MainPage.php b/MainPage.php index f2ae020..c81be12 100644 --- a/MainPage.php +++ b/MainPage.php @@ -15,7 +15,7 @@ $wgExtensionCredits['specialpage'][] = array( 'path' = __FILE__, 'name' = 'Translatewiki.net main page', - 'version' = '2013-03-20', + 'version' = '2013-05-10', 'author' = array( 'Niklas Laxström', 'Santhosh Thottingal' ), 'descriptionmsg' = 'twnmp-desc', ); @@ -35,11 +35,12 @@ $wgMainPageImages = array(); // Example -$wgExtensionFunctions[] = function () { +$wgExtensionFunctions[] = function () { global $wgMainPageImages, $wgExtensionAssetsPath; $wgMainPageImages[] = array( 'url' = $wgExtensionAssetsPath/TwnMainPage/resources/banners/dance.jpg, 'attribution' = 'a href=http://www.flickr.com/photos/ldhendrix/7389351416/;CC-BY ldhendrix/a', ); + return true; }; diff --git a/resources/js/ext.translate.mainpage.js b/resources/js/ext.translate.mainpage.js index be43b63..ed28ecd 100644 --- a/resources/js/ext.translate.mainpage.js +++ b/resources/js/ext.translate.mainpage.js @@ -12,8 +12,12 @@ $tiles = $( '.project-tile' ); $tiles.hover( - function () { $( this ).find( '.project-actions' ).removeClass( 'hide' ); }, - function () { $( this ).find( '.project-actions' ).addClass( 'hide' ); } + function () { + $( this ).find( '.project-actions' ).removeClass( 'hide' ); + }, + function () { + $( this ).find( '.project-actions' ).addClass( 'hide' ); + } ); if ( $tiles.length !== 8 ) { @@ -72,7 +76,9 @@ }; req = api.post( options ); - req.fail( function () { window.alert( 'Failure' ); } ); + req.fail( function () { + window.alert( 'Failure' ); + } ); req.done( function () { var options, req, api = new mw.Api(); @@ -84,13 +90,15 @@ }; req = api.post( options ); - req.fail( function () { window.alert( 'Failure2' ); } ); + req.fail( function () { + window.alert( 'Failure2' ); + } ); req.done( function ( data ) { var req, api = new mw.Api(); req = api.post( $.extend( {}, { lgtoken: data.login.token }, options ) ); - req.done( function ( ) { + req.done( function () { window.location.reload(); } ); } ); diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index 8a72d5c..2329d9e 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -138,7 +138,6 @@ } } - $out .= implode( \n\n, $tiles ); $out .= Html::closeElement( 'div' ); @@ -156,7 +155,7 @@ }
[MediaWiki-commits] [Gerrit] Use whitelist instead of blacklist for translate tab group - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Use whitelist instead of blacklist for translate tab group .. Use whitelist instead of blacklist for translate tab group Change-Id: I3a5fa70d92562829d8940159fe5369cb0ceeff01 --- M specials/SpecialTranslate.php 1 file changed, 4 insertions(+), 14 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php index 1a81b85..b19f0b1 100644 --- a/specials/SpecialTranslate.php +++ b/specials/SpecialTranslate.php @@ -838,8 +838,8 @@ $request = $skin-getRequest(); // However, query string params take precedence - $params = $request-getQueryValues() + $params; - asort( $params ); + $params['language'] = $request-getVal( 'language' ); + $params['group'] = $request-getVal( 'group' ); $taction = $request-getVal( 'taction', 'translate' ); @@ -847,32 +847,22 @@ $languagestats = SpecialPage::getTitleFor( 'LanguageStats' ); $messagegroupstats = SpecialPage::getTitleFor( 'MessageGroupStats' ); - unset( $params['task'] ); // Depends on taction - unset( $params['taction'] ); // We're supplying this ourself - unset( $params['title'] ); // As above - unset( $params['x'] ); // Was posted -marker on stats pages - unset( $params['suppresscomplete'] ); // Stats things, should - unset( $params['suppressempty'] ); // not be passed - // Clear the special page tab that might be there already $tabs['namespaces'] = array(); - $tabs['namespaces']['translate'] = $data = array( + $tabs['namespaces']['translate'] = array( 'text' = wfMessage( 'translate-taction-translate' )-text(), 'href' = $translate-getLocalUrl( array( 'taction' = 'translate' ) + $params ), 'class' = $alias === 'Translate' $taction === 'translate' ? 'selected' : '', ); if ( !self::isBeta( $request ) ) { - $tabs['namespaces']['proofread'] = $data = array( + $tabs['namespaces']['proofread'] = array( 'text' = wfMessage( 'translate-taction-proofread' )-text(), 'href' = $translate-getLocalUrl( array( 'taction' = 'proofread' ) + $params ), 'class' = $alias === 'Translate' $taction === 'proofread' ? 'selected' : '', ); } - - // Limit only applies to the above - unset( $params['limit'] ); $tabs['views']['lstats'] = array( 'text' = wfMessage( 'translate-taction-lstats' )-text(), -- To view, visit https://gerrit.wikimedia.org/r/62340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a5fa70d92562829d8940159fe5369cb0ceeff01 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 42722) Show Protect Feedback (action=protect) for pages... - change (mediawiki...ArticleFeedbackv5)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/63120 Change subject: (bug 42722) Show Protect Feedback (action=protect) for pages in whitelisted namespaces only .. (bug 42722) Show Protect Feedback (action=protect) for pages in whitelisted namespaces only Bug: 42722 Change-Id: Ibcb2a78d51332df1ab805890a34aef5e07c1a142 --- M ArticleFeedbackv5.hooks.php 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 refs/changes/20/63120/1 diff --git a/ArticleFeedbackv5.hooks.php b/ArticleFeedbackv5.hooks.php index e661153..4476873 100644 --- a/ArticleFeedbackv5.hooks.php +++ b/ArticleFeedbackv5.hooks.php @@ -607,7 +607,13 @@ * @return bool */ public static function onProtectionForm( Page $article, $output ) { - global $wgLang, $wgUser; + global $wgLang, $wgUser, $wgArticleFeedbackv5Namespaces; + + // only on pages in namespaces where it is enabled + if ( !in_array( $article-getTitle()-getNamespace(), $wgArticleFeedbackv5Namespaces ) ) { + return true; + } + $permErrors = $article-getTitle()-getUserPermissionsErrors( 'protect', $wgUser ); if ( wfReadOnly() ) { $permErrors[] = array( 'readonlytext', wfReadOnlyReason() ); @@ -752,7 +758,12 @@ * @return bool */ public static function onProtectionSave( Page $article, $errorMsg ) { - global $wgRequest; + global $wgRequest, $wgArticleFeedbackv5Namespaces; + + // only on pages in namespaces where it is enabled + if ( !in_array( $article-getTitle()-getNamespace(), $wgArticleFeedbackv5Namespaces ) ) { + return true; + } $requestPermission = $wgRequest-getVal( 'articlefeedbackv5-protection-level' ); $requestExpiry = $wgRequest-getText( 'articlefeedbackv5-protection-expiration' ); -- To view, visit https://gerrit.wikimedia.org/r/63120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcb2a78d51332df1ab805890a34aef5e07c1a142 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change EXIF to Exif - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63121 Change subject: Change EXIF to Exif .. Change EXIF to Exif Per https://en.wikipedia.org/wiki/Exchangeable_image_file_format. Spotted by Shirayuki and documented on https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Sesp-property-exif-data/en Change-Id: I92ba67ec60ccfe7a173d950593357b86792b8ed3 --- M includes/DefaultSettings.php M includes/ImagePage.php M includes/api/ApiQueryFilearchive.php M includes/api/ApiQueryImageInfo.php M includes/media/Bitmap.php M includes/media/Exif.php M includes/media/ExifBitmap.php M languages/messages/MessagesEn.php M maintenance/language/checkLanguage.inc M maintenance/language/languages.inc M maintenance/language/messageTypes.inc M maintenance/language/messages.inc M maintenance/tables.sql M resources/mediawiki.libs/mediawiki.libs.jpegmeta.js M skins/common/oldshared.css M skins/common/shared.css M tests/phpunit/includes/api/RandomImageGenerator.php 17 files changed, 24 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/63121/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 407ac8f..5330caf 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -496,11 +496,11 @@ $wgLockManagers = array(); /** - * Show EXIF data, on by default if available. - * Requires PHP's EXIF extension: http://www.php.net/manual/en/ref.exif.php + * Show Exif data, on by default if available. + * Requires PHP's Exif extension: http://www.php.net/manual/en/ref.exif.php * * @note FOR WINDOWS USERS: - * To enable EXIF functions, add the following lines to the Windows + * To enable Exif functions, add the following lines to the Windows * extensions section of php.ini: * @code{.ini} * extension=extensions/php_mbstring.dll @@ -848,7 +848,7 @@ /** - * Some tests and extensions use exiv2 to manipulate the EXIF metadata in some + * Some tests and extensions use exiv2 to manipulate the Exif metadata in some * image formats. */ $wgExiv2Command = '/usr/bin/exiv2'; diff --git a/includes/ImagePage.php b/includes/ImagePage.php index e687046..a5beb5d 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -250,7 +250,7 @@ * * @todo FIXME: Bad interface, see note on MediaHandler::formatMetadata(). * -* @param array $metadata the array containing the EXIF data +* @param array $metadata the array containing the Exif data * @return String The metadata table. This is treated as Wikitext (!) */ protected function makeMetadataTable( $metadata ) { diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index c34859b..408c7c2 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -281,7 +281,7 @@ ' parseddescription - Parse the description on the version', ' mime - Adds MIME of the image', ' mediatype - Adds the media type of the image', - ' metadata - Lists EXIF metadata for the version of the image', + ' metadata - Lists Exif metadata for the version of the image', ' bitdepth - Adds the bit depth of the version', ' archivename - Adds the file name of the archive version for non-latest versions' ), diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 5ed9d38..4849f40 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -545,7 +545,7 @@ 'thumbmime' = ' thumbmime - Adds MIME type of the image thumbnail' . ' (requires url and param ' . $modulePrefix . 'urlwidth)', 'mediatype' = ' mediatype - Adds the media type of the image', - 'metadata' = ' metadata - Lists EXIF metadata for the version of the image', + 'metadata' = ' metadata - Lists Exif metadata for the version of the image', 'archivename' =' archivename - Adds the file name of the archive version for non-latest versions', 'bitdepth' = ' bitdepth - Adds the bit depth of the version', ); diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 1ce3d5e..9f7a09c 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -131,7 +131,7 @@ # The size of the image on the page 'clientWidth' = $params['width'],
[MediaWiki-commits] [Gerrit] Refactoring: introduced URL module - change (mediawiki...MobileFrontend)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/63122 Change subject: Refactoring: introduced URL module .. Refactoring: introduced URL module Change-Id: I99e4d8831ca770d643b2ba40de36205b7309a46f --- A tests/acceptance/features/support/modules/url_module.rb M tests/acceptance/features/support/pages/beta_page.rb M tests/acceptance/features/support/pages/home_page.rb M tests/acceptance/features/support/pages/login_page.rb M tests/acceptance/features/support/pages/random_page.rb 5 files changed, 18 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/22/63122/1 diff --git a/tests/acceptance/features/support/modules/url_module.rb b/tests/acceptance/features/support/modules/url_module.rb new file mode 100644 index 000..5ac84a3 --- /dev/null +++ b/tests/acceptance/features/support/modules/url_module.rb @@ -0,0 +1,10 @@ +module URL + def self.url(name) +if ENV['MEDIAWIKI_URL'] + mediawiki_url = ENV['MEDIAWIKI_URL'] +else + mediawiki_url = 'http://127.0.0.1:80/wiki/' +end +#{mediawiki_url}#{name} + end +end diff --git a/tests/acceptance/features/support/pages/beta_page.rb b/tests/acceptance/features/support/pages/beta_page.rb index e28d110..1efe6ff 100644 --- a/tests/acceptance/features/support/pages/beta_page.rb +++ b/tests/acceptance/features/support/pages/beta_page.rb @@ -1,15 +1,8 @@ class BetaPage include PageObject - def self.url -if ENV['MEDIAWIKI_URL'] - mediawiki_url = ENV['MEDIAWIKI_URL'] -else - mediawiki_url = 'http://127.0.0.1:80/wiki/' -end -#{mediawiki_url}Special:MobileOptions/BetaOptIn - end - page_url url + include URL + page_url URL.url('Special:MobileOptions/BetaOptIn') div(:beta_parent, class: 'mw-mf-checkbox-css3') span(:beta) do |page| diff --git a/tests/acceptance/features/support/pages/home_page.rb b/tests/acceptance/features/support/pages/home_page.rb index 9e90b8c..f75808d 100644 --- a/tests/acceptance/features/support/pages/home_page.rb +++ b/tests/acceptance/features/support/pages/home_page.rb @@ -1,13 +1,9 @@ class HomePage include PageObject + include URL def self.url -if ENV['MEDIAWIKI_URL'] - mediawiki_url = ENV['MEDIAWIKI_URL'] -else - mediawiki_url = 'http://127.0.0.1:80/wiki/' -end -#{mediawiki_url}Main_Page +URL.url('Main_Page') end page_url url diff --git a/tests/acceptance/features/support/pages/login_page.rb b/tests/acceptance/features/support/pages/login_page.rb index 13b865a..583752a 100644 --- a/tests/acceptance/features/support/pages/login_page.rb +++ b/tests/acceptance/features/support/pages/login_page.rb @@ -1,15 +1,8 @@ class LoginPage include PageObject - def self.url -if ENV['MEDIAWIKI_URL'] - mediawiki_url = ENV['MEDIAWIKI_URL'] -else - mediawiki_url = 'http://127.0.0.1:80/wiki/' -end -#{mediawiki_url}Special:UserLogin - end - page_url url + include URL + page_url URL.url('Special:UserLogin') div(:feedback, class: 'errorbox') button(:login, id: 'wpLoginAttempt') diff --git a/tests/acceptance/features/support/pages/random_page.rb b/tests/acceptance/features/support/pages/random_page.rb index aa98fe2..4ed37d7 100644 --- a/tests/acceptance/features/support/pages/random_page.rb +++ b/tests/acceptance/features/support/pages/random_page.rb @@ -1,13 +1,6 @@ class RandomPage include PageObject - def self.url -if ENV['MEDIAWIKI_URL'] - mediawiki_url = ENV['MEDIAWIKI_URL'] -else - mediawiki_url = 'http://127.0.0.1:80/wiki/' -end -#{mediawiki_url}Special:Random - end - page_url url + include URL + page_url URL.url('Special:Random') end -- To view, visit https://gerrit.wikimedia.org/r/63122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99e4d8831ca770d643b2ba40de36205b7309a46f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed Watchlist tests - change (mediawiki...MobileFrontend)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/63123 Change subject: Fixed Watchlist tests .. Fixed Watchlist tests Bug: 46922 Change-Id: Id353d9014ba9fdc33d08da5db1eb8c941391b972 --- M tests/acceptance/features/step_definitions/watchlist_steps.rb M tests/acceptance/features/watchlist.feature 2 files changed, 8 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/23/63123/1 diff --git a/tests/acceptance/features/step_definitions/watchlist_steps.rb b/tests/acceptance/features/step_definitions/watchlist_steps.rb index 13ea68d..4e7f02b 100644 --- a/tests/acceptance/features/step_definitions/watchlist_steps.rb +++ b/tests/acceptance/features/step_definitions/watchlist_steps.rb @@ -27,13 +27,11 @@ #Signup takes you to the sign in page... should it take you to the Mobile Create Account page?? Given /^I am logged into the mobile website$/ do - on(HomePage) do |page| + visit(HomePage) do |page| page.mainmenu_button_element.when_present.click page.login_button end - on(LoginPage) do |page| -page.login_with(@mediawiki_username, @mediawiki_password) - end + on(LoginPage).login_with(@mediawiki_username, @mediawiki_password) end When /^I go to random page$/ do diff --git a/tests/acceptance/features/watchlist.feature b/tests/acceptance/features/watchlist.feature index 1be2ad4..3a33c85 100644 --- a/tests/acceptance/features/watchlist.feature +++ b/tests/acceptance/features/watchlist.feature @@ -1,18 +1,21 @@ Feature: Manage Watchlist Scenario: I receive notification that I need to log in to use the watchlist functionality -Given I am not logged in +Given I am on the home page + And I am not logged in When I select the watchlist icon Then I receive notification that I need to log in to use the watchlist functionality Scenario: Login link leads to login page -Given I am not logged in +Given I am on the home page + And I am not logged in When I select the watchlist icon And I click Login Then Login page opens Scenario: Sign up link leads to Sign up page -Given I am not logged in +Given I am on the home page + And I am not logged in When I select the watchlist icon And I click Sign up Then Sign up page opens -- To view, visit https://gerrit.wikimedia.org/r/63123 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id353d9014ba9fdc33d08da5db1eb8c941391b972 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change EXIF to Exif - change (mediawiki...Configure)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63124 Change subject: Change EXIF to Exif .. Change EXIF to Exif Per https://en.wikipedia.org/wiki/Exchangeable_image_file_format. Spotted by Shirayuki and documented on https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Sesp-property-exif-data/en Change-Id: Ia2213086b2c01d46ec35e0f14552e6abf3837c99 --- M settings/Settings.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Configure refs/changes/24/63124/1 diff --git a/settings/Settings.i18n.php b/settings/Settings.i18n.php index 9900c26..b4285d5 100644 --- a/settings/Settings.i18n.php +++ b/settings/Settings.i18n.php @@ -44,7 +44,7 @@ 'configure-setting-wgMediaHandlers-value' = 'Handler class', 'configure-setting-wgThumbnailScriptPath' = 'Path to thumb.php for thumbnail generation on-the-fly instead of on-parse', 'configure-setting-wgThumbUpright' = 'Width adjustment factor for upright thumbnails', - 'configure-setting-wgShowEXIF' = 'Show EXIF data on file description pages', + 'configure-setting-wgShowEXIF' = 'Show Exif data on file description pages', 'configure-setting-wgUpdateCompatibleMetadata' = 'Automatically update the img_metadata field if it is outdated, but compatible with the current version', 'configure-setting-wgThumbLimits' = 'Allowed image thumbnail sizes', 'configure-setting-wgUseImageResize' = 'Enable dynamic server side image resizing', -- To view, visit https://gerrit.wikimedia.org/r/63124 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2213086b2c01d46ec35e0f14552e6abf3837c99 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Configure Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change EXIF to Exif - change (mediawiki...SemanticExtraSpecialProperties)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/63125 Change subject: Change EXIF to Exif .. Change EXIF to Exif Per https://en.wikipedia.org/wiki/Exchangeable_image_file_format. Spotted by Shirayuki and documented on https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Sesp-property-exif-data/en Change-Id: I84d9ef123e8581bb34cad5baec17083f442517fe --- M SemanticExtraSpecialProperties.hooks.php M SemanticExtraSpecialProperties.i18n.php 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticExtraSpecialProperties refs/changes/25/63125/1 diff --git a/SemanticExtraSpecialProperties.hooks.php b/SemanticExtraSpecialProperties.hooks.php index b26f3b8..793388b 100644 --- a/SemanticExtraSpecialProperties.hooks.php +++ b/SemanticExtraSpecialProperties.hooks.php @@ -469,7 +469,7 @@ // log exif data to log if log group exif is specified wfDebugLog( 'exif', \n . $title-getFullText() . \nFORMATTED EXIF DATA: . var_export($formattedExif, true), false ); - // create semantic data container for EXIF data subobject + // create semantic data container for Exif data subobject $diSubobject = new SMWDIWikiPage( $subject-getDBkey(), $subject-getNamespace(), diff --git a/SemanticExtraSpecialProperties.i18n.php b/SemanticExtraSpecialProperties.i18n.php index 3f8ec02..103c5bd 100644 --- a/SemanticExtraSpecialProperties.i18n.php +++ b/SemanticExtraSpecialProperties.i18n.php @@ -26,7 +26,7 @@ 'sesp-property-shorturl' = 'Short URL', 'sesp-property-user-registration-date' = 'User registration date', - 'sesp-property-exif-data' = 'EXIF data', + 'sesp-property-exif-data' = 'Exif data', ); /** Message documentation (Message documentation) @@ -49,7 +49,7 @@ 'sesp-property-shorturl' = 'The name of the special property that stores the short URL of a page, if the extensions ShortURL is installed', 'sesp-property-user-registration-date' = 'The name of the special property that stores a users registration date on a user page', - 'sesp-property-exif-data' = 'The name of the special property that stores a reference to the EXIF data of a file', + 'sesp-property-exif-data' = 'The name of the special property that stores a reference to the Exif data of a file', ); /** Breton (brezhoneg) -- To view, visit https://gerrit.wikimedia.org/r/63125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84d9ef123e8581bb34cad5baec17083f442517fe Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticExtraSpecialProperties Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove empty test - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Remove empty test .. Remove empty test Change-Id: I88c1a751c8aeda8038a45a5fffc9b5d3898a64f0 --- M lib/WikibaseLib.hooks.php D lib/tests/phpunit/DataTypesTest.php 2 files changed, 0 insertions(+), 56 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php index 2bb2884..8af3a8c 100644 --- a/lib/WikibaseLib.hooks.php +++ b/lib/WikibaseLib.hooks.php @@ -69,7 +69,6 @@ 'ByPropertyIdArray', 'ChangesTable', 'ClaimDifference', - 'DataTypes', 'ReferencedEntitiesFinder', 'EntityRetrievingDataTypeLookup', 'InMemoryDataTypeLookup', diff --git a/lib/tests/phpunit/DataTypesTest.php b/lib/tests/phpunit/DataTypesTest.php deleted file mode 100644 index 978fe10..000 --- a/lib/tests/phpunit/DataTypesTest.php +++ /dev/null @@ -1,55 +0,0 @@ -?php - -namespace Wikibase\Lib\Test; - -/** - * Tests for the data types defined in WikibaseLib. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html - * - * @file - * @since 0.4 - * - * @ingroup WikibaseLib - * @ingroup Test - * - * @group Wikibase - * @group WikibaseLib - * - * @licence GNU GPL v2+ - * @author Jeroen De Dauw jeroended...@gmail.com - */ -class DataTypesTest extends \MediaWikiTestCase { - - protected function getFactory() { - $registry = new \Wikibase\LibRegistry( \Wikibase\Settings::singleton() ); - return $registry-getDataTypeFactory(); - } - - public function testItemDataType() { - $dataType = $this-getFactory()-getType( 'wikibase-item' ); - - $parsers = $dataType-getParsers(); - $parser = $parsers[0]; - - $expected = new \Wikibase\EntityId( \Wikibase\Item::ENTITY_TYPE, 42 ); - - $result = $parser-parse( $expected-getPrefixedId() ); - - $this-assertTrue( $expected-equals( $result ) ); - } - -} -- To view, visit https://gerrit.wikimedia.org/r/62644 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88c1a751c8aeda8038a45a5fffc9b5d3898a64f0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change EXIF to Exif - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Change EXIF to Exif .. Change EXIF to Exif Per https://en.wikipedia.org/wiki/Exchangeable_image_file_format. Spotted by Shirayuki and documented on https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Sesp-property-exif-data/en Change-Id: I92ba67ec60ccfe7a173d950593357b86792b8ed3 --- M includes/DefaultSettings.php M includes/ImagePage.php M includes/api/ApiQueryFilearchive.php M includes/api/ApiQueryImageInfo.php M includes/media/Bitmap.php M includes/media/Exif.php M includes/media/ExifBitmap.php M languages/messages/MessagesEn.php M maintenance/language/checkLanguage.inc M maintenance/language/languages.inc M maintenance/language/messageTypes.inc M maintenance/language/messages.inc M maintenance/tables.sql M resources/mediawiki.libs/mediawiki.libs.jpegmeta.js M skins/common/oldshared.css M skins/common/shared.css M tests/phpunit/includes/api/RandomImageGenerator.php 17 files changed, 24 insertions(+), 24 deletions(-) Approvals: Shirayuki: Looks good to me, but someone else must approve Raimond Spekking: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 407ac8f..5330caf 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -496,11 +496,11 @@ $wgLockManagers = array(); /** - * Show EXIF data, on by default if available. - * Requires PHP's EXIF extension: http://www.php.net/manual/en/ref.exif.php + * Show Exif data, on by default if available. + * Requires PHP's Exif extension: http://www.php.net/manual/en/ref.exif.php * * @note FOR WINDOWS USERS: - * To enable EXIF functions, add the following lines to the Windows + * To enable Exif functions, add the following lines to the Windows * extensions section of php.ini: * @code{.ini} * extension=extensions/php_mbstring.dll @@ -848,7 +848,7 @@ /** - * Some tests and extensions use exiv2 to manipulate the EXIF metadata in some + * Some tests and extensions use exiv2 to manipulate the Exif metadata in some * image formats. */ $wgExiv2Command = '/usr/bin/exiv2'; diff --git a/includes/ImagePage.php b/includes/ImagePage.php index e687046..a5beb5d 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -250,7 +250,7 @@ * * @todo FIXME: Bad interface, see note on MediaHandler::formatMetadata(). * -* @param array $metadata the array containing the EXIF data +* @param array $metadata the array containing the Exif data * @return String The metadata table. This is treated as Wikitext (!) */ protected function makeMetadataTable( $metadata ) { diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index c34859b..408c7c2 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -281,7 +281,7 @@ ' parseddescription - Parse the description on the version', ' mime - Adds MIME of the image', ' mediatype - Adds the media type of the image', - ' metadata - Lists EXIF metadata for the version of the image', + ' metadata - Lists Exif metadata for the version of the image', ' bitdepth - Adds the bit depth of the version', ' archivename - Adds the file name of the archive version for non-latest versions' ), diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 5ed9d38..4849f40 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -545,7 +545,7 @@ 'thumbmime' = ' thumbmime - Adds MIME type of the image thumbnail' . ' (requires url and param ' . $modulePrefix . 'urlwidth)', 'mediatype' = ' mediatype - Adds the media type of the image', - 'metadata' = ' metadata - Lists EXIF metadata for the version of the image', + 'metadata' = ' metadata - Lists Exif metadata for the version of the image', 'archivename' =' archivename - Adds the file name of the archive version for non-latest versions', 'bitdepth' = ' bitdepth - Adds the bit depth of the version', ); diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 1ce3d5e..9f7a09c 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -131,7 +131,7 @@ # The size of the image on the page 'clientWidth' =
[MediaWiki-commits] [Gerrit] Fixed tests that where relying on sitelinks being present in... - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/63126 Change subject: Fixed tests that where relying on sitelinks being present in the db .. Fixed tests that where relying on sitelinks being present in the db This makes them pass when there are no such links in the db and allows us to remove the evil hack in the test entry point file that was inserting those links into the db each time Change-Id: Ifbd141dcc41640fd9348558efdc8d82a5423be82 --- M Wikibase.php 1 file changed, 0 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/26/63126/1 diff --git a/Wikibase.php b/Wikibase.php index e94a767..a1f50e3 100644 --- a/Wikibase.php +++ b/Wikibase.php @@ -26,13 +26,6 @@ require_once __DIR__ . '/repo/ExampleSettings.php'; -// Temporary hack that populates the sites table since there are some tests that require this to have happened -require_once __DIR__ . '/lib/maintenance/populateSitesTable.php'; -$wgExtensionFunctions[] = function() { - $evilStuff = new PopulateSitesTable(); - $evilStuff-execute(); -}; - # Let JenkinsAdapt our test suite when run under Jenkins $jenkins_job_name = getenv( 'JOB_NAME' ); if( PHP_SAPI === 'cli' $jenkins_job_name !== false ) { -- To view, visit https://gerrit.wikimedia.org/r/63126 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifbd141dcc41640fd9348558efdc8d82a5423be82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added PHPUnit config and boostrtap files - change (mediawiki...DataValues)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/63127 Change subject: Added PHPUnit config and boostrtap files .. Added PHPUnit config and boostrtap files Change-Id: I94f21c34e7a142a6f5376771750531f98e858659 --- A DataValues/phpunit.xml.dist A DataValues/tests/bootstrap.php 2 files changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/27/63127/1 diff --git a/DataValues/phpunit.xml.dist b/DataValues/phpunit.xml.dist new file mode 100644 index 000..d38c30c --- /dev/null +++ b/DataValues/phpunit.xml.dist @@ -0,0 +1,20 @@ +phpunit backupGlobals=false + backupStaticAttributes=false + bootstrap=tests/bootstrap.php + cacheTokens=false + colors=true + convertErrorsToExceptions=true + convertNoticesToExceptions=true + convertWarningsToExceptions=true + stopOnError=false + stopOnFailure=false + stopOnIncomplete=false + stopOnSkipped=false + strict=true + verbose=true +testsuites +testsuite name=DataValues +directorytests/directory +/testsuite +/testsuites +/phpunit diff --git a/DataValues/tests/bootstrap.php b/DataValues/tests/bootstrap.php new file mode 100644 index 000..7379c89 --- /dev/null +++ b/DataValues/tests/bootstrap.php @@ -0,0 +1,15 @@ +?php + +/** + * PHPUnit test bootstrap file for the DataValues library. + * + * @since 0.1 + * + * @file + * @ingroup DataValues + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ + +require_once( __DIR__ . '/../DataValues.php' ); -- To view, visit https://gerrit.wikimedia.org/r/63127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94f21c34e7a142a6f5376771750531f98e858659 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add. Register 'dist' aggregator for 'pages_created' in API. - change (analytics/user-metrics)
Milimetric has submitted this change and it was merged. Change subject: add. Register 'dist' aggregator for 'pages_created' in API. .. add. Register 'dist' aggregator for 'pages_created' in API. Change-Id: I6bc1d58c2740705c4422c10f466706d72dc8fe4c --- M user_metrics/api/engine/request_meta.py 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Rfaulk: Verified Milimetric: Verified; Looks good to me, approved diff --git a/user_metrics/api/engine/request_meta.py b/user_metrics/api/engine/request_meta.py index f5c52f9..3aa44a0 100644 --- a/user_metrics/api/engine/request_meta.py +++ b/user_metrics/api/engine/request_meta.py @@ -319,7 +319,8 @@ from user_metrics.metrics.namespace_of_edits import NamespaceEdits, \ namespace_edits_sum from user_metrics.metrics.live_account import LiveAccount, live_accounts_agg -from user_metrics.metrics.pages_created import PagesCreated +from user_metrics.metrics.pages_created import PagesCreated, \ +pages_created_stats_agg # Registered metrics types @@ -357,6 +358,7 @@ 'dist+edit_rate': er_stats_agg, 'proportion+blocks': block_rate_agg, 'dist+time_to_threshold': ttt_stats_agg, +'dist+pages_created': pages_created_stats_agg, } -- To view, visit https://gerrit.wikimedia.org/r/63111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6bc1d58c2740705c4422c10f466706d72dc8fe4c Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk ryan.faulk...@mail.mcgill.ca Gerrit-Reviewer: Milimetric dandree...@wikimedia.org Gerrit-Reviewer: Rfaulk ryan.faulk...@mail.mcgill.ca ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mwext-MobileFrontend-jslint is now voting - change (integration/zuul-config)
Hashar has submitted this change and it was merged. Change subject: mwext-MobileFrontend-jslint is now voting .. mwext-MobileFrontend-jslint is now voting Someone told me Jon Robson would love this... Change-Id: Id03fceeaf9d5a69183f77e71d08d4e3998859aa5 --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 00d784f..41f7c74 100644 --- a/layout.yaml +++ b/layout.yaml @@ -317,6 +317,8 @@ voting: true - name: mwext-Math-jslint voting: true + - name: mwext-MobileFrontend-jslint +voting: true - name: mwext-PHPExcel-jslint voting: true - name: mwext-PostEdit-jslint -- To view, visit https://gerrit.wikimedia.org/r/62825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id03fceeaf9d5a69183f77e71d08d4e3998859aa5 Gerrit-PatchSet: 3 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed dead procedural code - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/63128 Change subject: Removed dead procedural code .. Removed dead procedural code Change-Id: Ic85d9494ba5bda6bfe2a1575b458d3ca156ba64f --- M DataModel/DataModel/SiteLink.php 1 file changed, 0 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/28/63128/1 diff --git a/DataModel/DataModel/SiteLink.php b/DataModel/DataModel/SiteLink.php index 155f329..99b48f6 100644 --- a/DataModel/DataModel/SiteLink.php +++ b/DataModel/DataModel/SiteLink.php @@ -157,27 +157,6 @@ } /** -* Returns the list of site IDs for a given list of site Links. -* Each site will only occur once in the result. -* The order of the site ids in the result is undefined. -* -* @param $siteLinks array a list of SiteLink objects -* @return array the list of site ids. -*/ - public static function getSiteIDs( $siteLinks ) { - $siteIds = array(); - - /** -* @var SiteLink $link -*/ - foreach ( $siteLinks as $link ) { - $siteIds[] = $link-getSite()-getGlobalId(); - } - - return array_unique( $siteIds ); - } - - /** * Converts a list of SiteLink objects to a structure of arrays. * * @since 0.1 -- To view, visit https://gerrit.wikimedia.org/r/63128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic85d9494ba5bda6bfe2a1575b458d3ca156ba64f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed dead procedural code - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/63129 Change subject: Removed dead procedural code .. Removed dead procedural code Change-Id: If3c59c0aa3e5ff8a4f319ba30a8bff7245005209 --- M DataModel/DataModel/SiteLink.php 1 file changed, 0 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/29/63129/1 diff --git a/DataModel/DataModel/SiteLink.php b/DataModel/DataModel/SiteLink.php index 155f329..7efaefd 100644 --- a/DataModel/DataModel/SiteLink.php +++ b/DataModel/DataModel/SiteLink.php @@ -198,32 +198,4 @@ return $links; } - /** -* Builds an array of SiteLinks from an array of arrays. -* -* @since 0.4 -* -* @param array[] $linkSpecs array of arrays, in which each sub-array representa a link and -* contains the links's site ID and page name in the fields designated by $sideIdKey -* and $pageNameKey, respectively. -* -* @param string $siteIdKey the field in which to find the link's target site id. -* @param string $pageNameKey the field in which to find the link's target page name. -* -* @return SiteLink[] -*/ - public static function siteLinksFromArray( array $linkSpecs, - $siteIdKey = 'site', $pageNameKey = 'title' ) { - $links = array(); - - foreach ( $linkSpecs as $spec ) { - $siteId = $spec[ $siteIdKey ]; - $pageName = $spec[ $pageNameKey ]; - - $links[] = SiteLink::newFromText( $siteId, $pageName ); - } - - return $links; - } - } -- To view, visit https://gerrit.wikimedia.org/r/63129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3c59c0aa3e5ff8a4f319ba30a8bff7245005209 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: install colordiff - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/63130 Change subject: contint: install colordiff .. contint: install colordiff colordiff is a wrapper around the diff command that gives out ANSI colored diff. That makes the diff in Jenkins console easier to read. Change-Id: I79eba9b9a45de707f6e63dd23ea40289af55b8cc --- M modules/contint/manifests/packages.pp 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/30/63130/1 diff --git a/modules/contint/manifests/packages.pp b/modules/contint/manifests/packages.pp index 8ed9afa..adbb4ad 100644 --- a/modules/contint/manifests/packages.pp +++ b/modules/contint/manifests/packages.pp @@ -98,4 +98,10 @@ ensure = latest, } + # Colordiff gives us nice coloring in Jenkins console whenever + # it is used instead of the stock diff. + package { 'colordiff': +ensure = present, + } + } -- To view, visit https://gerrit.wikimedia.org/r/63130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79eba9b9a45de707f6e63dd23ea40289af55b8cc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration-zuul-layoutdiff now has colorized diff! - change (integration/jenkins-job-builder-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/63131 Change subject: integration-zuul-layoutdiff now has colorized diff! .. integration-zuul-layoutdiff now has colorized diff! Thanks to `colordiff` we can output in the Jenkins console a diff with ANSI colors :-] Change-Id: I59a5f68fa5cb193f97494065c3e8cd3b77abaf94 --- M integration.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/31/63131/1 diff --git a/integration.yaml b/integration.yaml index 920daf8..80da425 100644 --- a/integration.yaml +++ b/integration.yaml @@ -35,7 +35,7 @@ /usr/local/bin/zuul-server -t -l $WORKSPACE/layout.yaml 2current.txt git checkout HEAD^ /usr/local/bin/zuul-server -t -l $WORKSPACE/layout.yaml 2before.txt -diff -u before.txt current.txt +colordiff -u before.txt current.txt - project: name: 'integration-docroot' -- To view, visit https://gerrit.wikimedia.org/r/63131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59a5f68fa5cb193f97494065c3e8cd3b77abaf94 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration-zuul-layoutdiff now has colorized diff! - change (integration/jenkins-job-builder-config)
Hashar has submitted this change and it was merged. Change subject: integration-zuul-layoutdiff now has colorized diff! .. integration-zuul-layoutdiff now has colorized diff! Thanks to `colordiff` we can output in the Jenkins console a diff with ANSI colors :-] Change-Id: I59a5f68fa5cb193f97494065c3e8cd3b77abaf94 --- M integration.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/integration.yaml b/integration.yaml index 920daf8..80da425 100644 --- a/integration.yaml +++ b/integration.yaml @@ -35,7 +35,7 @@ /usr/local/bin/zuul-server -t -l $WORKSPACE/layout.yaml 2current.txt git checkout HEAD^ /usr/local/bin/zuul-server -t -l $WORKSPACE/layout.yaml 2before.txt -diff -u before.txt current.txt +colordiff -u before.txt current.txt - project: name: 'integration-docroot' -- To view, visit https://gerrit.wikimedia.org/r/63131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59a5f68fa5cb193f97494065c3e8cd3b77abaf94 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trigger js jobs only when .js files are changed - change (integration/zuul-config)
Hashar has submitted this change and it was merged. Change subject: trigger js jobs only when .js files are changed .. trigger js jobs only when .js files are changed Change-Id: Iaa5f135f16c595b052633b9ed9e3dfd66b42f484 --- M layout.yaml 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 41f7c74..c2037dd 100644 --- a/layout.yaml +++ b/layout.yaml @@ -239,6 +239,16 @@ - name: ^.*-jslint$ # Non-voting by default (most projects do not pass yet) voting: false +files: + - '^.*\.js$' + + - name: ^.*-jsduck$ +files: + - '^.*\.js$' + + - name: ^.*-jsduck-publish$ +files: + - '^.*\.js$' - name: ^.*-pep8$ # Non-voting (most of our script fail the tests miserably) -- To view, visit https://gerrit.wikimedia.org/r/61277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa5f135f16c595b052633b9ed9e3dfd66b42f484 Gerrit-PatchSet: 3 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trigger pep8/pyflakes only when .py files are changed - change (integration/zuul-config)
Hashar has submitted this change and it was merged. Change subject: trigger pep8/pyflakes only when .py files are changed .. trigger pep8/pyflakes only when .py files are changed Change-Id: I1b163315c9b1422e20a9cbadd9344def2637289a --- M layout.yaml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index c2037dd..276aa9c 100644 --- a/layout.yaml +++ b/layout.yaml @@ -253,10 +253,14 @@ - name: ^.*-pep8$ # Non-voting (most of our script fail the tests miserably) voting: false +files: + - '^.*\.py$' - name: ^.*-pyflakes$ # do not vote by default voting: false +files: + - '^.*\.py$' # PHP CodeSniffer (experimental) - name: ^.*-phpcs$ -- To view, visit https://gerrit.wikimedia.org/r/61366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b163315c9b1422e20a9cbadd9344def2637289a Gerrit-PatchSet: 2 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trigger PHP related job only when PHP files are changed - change (integration/zuul-config)
Hashar has submitted this change and it was merged. Change subject: trigger PHP related job only when PHP files are changed .. trigger PHP related job only when PHP files are changed Would skip the build whenever a patchset is not altering a file ending with either php, php5, phtml or inc. Change-Id: I054abdfaf3fbc767f1cdc90646bb934477df3e94 --- M layout.yaml 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 276aa9c..92edc66 100644 --- a/layout.yaml +++ b/layout.yaml @@ -265,8 +265,18 @@ # PHP CodeSniffer (experimental) - name: ^.*-phpcs$ voting: false +files: + - '^.*\.(php|php5|phtml|inc)$' - name: ^.*-phpcs-HEAD$ voting: false +files: + - '^.*\.(php|php5|phtml|inc)$' + - name: ^.*-phplint$ +files: + - '^.*\.(php|php5|phtml|inc)$' + - name: ^mediawiki-core-lint$ +files: + - '^.*\.(php|php5|phtml|inc)$' # Rejecting changes having trailing whitespaces cause too many false # positives. So only report the whitespace issues, but don't let it vote. -- To view, visit https://gerrit.wikimedia.org/r/61367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I054abdfaf3fbc767f1cdc90646bb934477df3e94 Gerrit-PatchSet: 3 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactoring: renamed step files so they have the same names ... - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/63132 Change subject: Refactoring: renamed step files so they have the same names as feature files .. Refactoring: renamed step files so they have the same names as feature files Change-Id: Icba27067b5a4f7c8398ff9f170037e43e84b8975 --- R features/step_definitions/uls_accept_language_steps.rb R features/step_definitions/uls_steps.rb 2 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/32/63132/1 diff --git a/features/step_definitions/accept_language_steps.rb b/features/step_definitions/uls_accept_language_steps.rb similarity index 100% rename from features/step_definitions/accept_language_steps.rb rename to features/step_definitions/uls_accept_language_steps.rb diff --git a/features/step_definitions/universal_language_selector_steps.rb b/features/step_definitions/uls_steps.rb similarity index 100% rename from features/step_definitions/universal_language_selector_steps.rb rename to features/step_definitions/uls_steps.rb -- To view, visit https://gerrit.wikimedia.org/r/63132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icba27067b5a4f7c8398ff9f170037e43e84b8975 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phplint always run or Zuul skips child jobs - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/63133 Change subject: phplint always run or Zuul skips child jobs .. phplint always run or Zuul skips child jobs Change-Id: I04751f40f7f8133728766a2443381b130d827f52 --- M layout.yaml 1 file changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/33/63133/1 diff --git a/layout.yaml b/layout.yaml index 92edc66..09397f6 100644 --- a/layout.yaml +++ b/layout.yaml @@ -271,12 +271,6 @@ voting: false files: - '^.*\.(php|php5|phtml|inc)$' - - name: ^.*-phplint$ -files: - - '^.*\.(php|php5|phtml|inc)$' - - name: ^mediawiki-core-lint$ -files: - - '^.*\.(php|php5|phtml|inc)$' # Rejecting changes having trailing whitespaces cause too many false # positives. So only report the whitespace issues, but don't let it vote. -- To view, visit https://gerrit.wikimedia.org/r/63133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04751f40f7f8133728766a2443381b130d827f52 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phplint always run or Zuul skips child jobs - change (integration/zuul-config)
Hashar has submitted this change and it was merged. Change subject: phplint always run or Zuul skips child jobs .. phplint always run or Zuul skips child jobs Change-Id: I04751f40f7f8133728766a2443381b130d827f52 --- M layout.yaml 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 92edc66..09397f6 100644 --- a/layout.yaml +++ b/layout.yaml @@ -271,12 +271,6 @@ voting: false files: - '^.*\.(php|php5|phtml|inc)$' - - name: ^.*-phplint$ -files: - - '^.*\.(php|php5|phtml|inc)$' - - name: ^mediawiki-core-lint$ -files: - - '^.*\.(php|php5|phtml|inc)$' # Rejecting changes having trailing whitespaces cause too many false # positives. So only report the whitespace issues, but don't let it vote. -- To view, visit https://gerrit.wikimedia.org/r/63133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04751f40f7f8133728766a2443381b130d827f52 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Jenkins job validation (DO NOT SUBMIT) - change (mediawiki...LabeledSectionTransclusion)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/63134 Change subject: Jenkins job validation (DO NOT SUBMIT) .. Jenkins job validation (DO NOT SUBMIT) Change-Id: I421b9dc44a8b29483ff99437c04306e0c69b0cf1 --- A JENKINS 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LabeledSectionTransclusion refs/changes/34/63134/1 diff --git a/JENKINS b/JENKINS new file mode 100644 index 000..e69de29 --- /dev/null +++ b/JENKINS -- To view, visit https://gerrit.wikimedia.org/r/63134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I421b9dc44a8b29483ff99437c04306e0c69b0cf1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LabeledSectionTransclusion Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding the feature file to test the bevaiour of the ULS cog ... - change (qa/browsertests)
Arrbee has uploaded a new change for review. https://gerrit.wikimedia.org/r/63135 Change subject: Adding the feature file to test the bevaiour of the ULS cog icon from the sidebar for logged-in users .. Adding the feature file to test the bevaiour of the ULS cog icon from the sidebar for logged-in users Change-Id: I2c0dbac361ffdba37c8f9b29f23cf3c144b39419 --- A features/backlog/uls_cog_sidebar_logged_user.feature 1 file changed, 66 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/35/63135/1 diff --git a/features/backlog/uls_cog_sidebar_logged_user.feature b/features/backlog/uls_cog_sidebar_logged_user.feature new file mode 100644 index 000..d894566 --- /dev/null +++ b/features/backlog/uls_cog_sidebar_logged_user.feature @@ -0,0 +1,66 @@ +Feature: ULS cog behaviour on the side-bar for logged in users + +Background: In all of the following scenarios the global variable $wgULSPosition is set to 'interlanguage' for the wiki. + And Base language at the start of the test is English + And the tests needs to run with a logged-in user + And the URL is http://en.wikipedia.beta.wmflabs.org/wiki/Main_Page + +Scenario: The cog icon is visible in the sidebar on an article without interlanguage links + Given I am on a wiki content page without interlanguage links + When I scroll to the area where interlanguage links are supposed to be + Then I should see a cog icon near the 'Languages' header + +Scenario: The cog icon is visible in the sidebar on an article with interlanguage links + Given I am on a wiki content page with interlanguage links + When I scroll to the area where interlanguage links are + Then I should see a cog icon near the 'Languages' header + +Scenario: The cog icon is visible in the sidebar on the talk page of an article without interlanguage links + Given I am on a talk page of an article without interlanguage links + When I scroll to the area where interlanguage links are on articles + Then I should see a cog icon near the 'Languages' header + +Scenario: The cog icon is visible in the sidebar on the talk page of an article with interlanguage links + Given I am on a talk page of an article with interlanguage links + When I scroll to the area where interlanguage links are on articles + Then I should see a cog icon near the 'Languages' header + +Scenario: Clicking the cog icon opens the Language Settings panel + Given I am on a wiki page + When I click on the cog icon near the interlanguage links on the side-bar + Then the Language Settings panel appears + +Scenario: Clicking the cog icon when the Language settings panel is open closes it + Given I am on a wiki page with the Language settings panel open + When I click on the cog icon near the interlanguage links + Then the Language settings panel disappears + +Scenario: Clicking the cancel button in the Language settings panel closes it + Given I am on a wiki page with the Language settings panel open + When I click on the Cancel button in the panel + Then the Language settings panel disappears + +Scenario: Clicking the cog after closing the Language settings panel using the Cancel button opens the panel + Given I closed the Language settings panel using the Cancel button + When I click on the cog icon + Then the Language settings panel appears + +Scenario: Clicking the X button in the Language settings panel closes it + Given I am on a wiki page with the Language settings panel open + When I click on the X close button in the panel + Then the Language settings panel disappears + +Scenario: Clicking the cog after closing the Language settings panel using the X button opens the panel +Given I closed the Language settings panel using the X close button +When I click on the cog icon +Then the Language settings panel appears + +Scenario: Clicking the 'Apply Settings' after making a change button in the Language settings panel closes it +Given I am on a wiki page with the Language settings panel open +When I click on the apply settings button in the panel +Then the Language settings panel disappears + +Scenario: Clicking the cog after closing the Language settings panel using the Apply Settings' button opens the panel +Given I closed the Language settings panel using the apply settings button +When I click on the cog icon +Then the Language settings panel appears -- To view, visit https://gerrit.wikimedia.org/r/63135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c0dbac361ffdba37c8f9b29f23cf3c144b39419 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Arrbee run...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Fix token parameter documentation on a couple of API modules - change (mediawiki...CentralAuth)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/63136 Change subject: Fix token parameter documentation on a couple of API modules .. Fix token parameter documentation on a couple of API modules Bug: 48324 Change-Id: I4b7d42f7ba48026509a7f7a0f6ea033625c260fb --- M api/ApiDeleteGlobalAccount.php M api/ApiSetGlobalAccountStatus.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/36/63136/1 diff --git a/api/ApiDeleteGlobalAccount.php b/api/ApiDeleteGlobalAccount.php index dfb5491..2cec567 100644 --- a/api/ApiDeleteGlobalAccount.php +++ b/api/ApiDeleteGlobalAccount.php @@ -78,7 +78,7 @@ return array( 'user' = 'User to delete.', 'reason' = 'Reason for deleting the user.', - 'token' = 'Your edit token.' + 'token' = 'Your token (obtained from action=tokenstype=deleteglobalaccount).' ); } diff --git a/api/ApiSetGlobalAccountStatus.php b/api/ApiSetGlobalAccountStatus.php index fe7ee33..bdd93d6 100644 --- a/api/ApiSetGlobalAccountStatus.php +++ b/api/ApiSetGlobalAccountStatus.php @@ -128,7 +128,7 @@ 'locked' = 'Change whether this user is locked or not.', 'hidden' = 'Change whether this user is not hidden, hidden from lists, or suppressed.', 'reason' = Reason for changing the user's status., - 'token' = 'Your edit token.', + 'token' = 'Your token (obtained from action=tokenstype=setglobalaccountstatus).', 'statecheck' = 'Optional MD5 of the expected current username:hidden:locked, to detect edit conflicts. Set locked to 1 for locked, 0 for unlocked.' ); } -- To view, visit https://gerrit.wikimedia.org/r/63136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b7d42f7ba48026509a7f7a0f6ea033625c260fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Alex Monk kren...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed unused join array from ActiveUser conds. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Removed unused join array from ActiveUser conds. .. Removed unused join array from ActiveUser conds. * The table was not in the table array so this did not affect the SQL, but was still unused cruft. Change-Id: Ia5aa934fb6e6de9daeb0072d902df6e681575fd7 --- M includes/specials/SpecialActiveusers.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Anomie: Looks good to me, approved Parent5446: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index a2978e3..c84beb1 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -120,10 +120,6 @@ 'GROUP BY' = array( 'rc_user_text' ), 'USE INDEX' = array( 'recentchanges' = 'rc_user_text' ) ), - 'join_conds' = array( // check for suppression blocks - 'ipblocks' = array( 'LEFT JOIN', - array( 'rc_user=ipb_user', 'ipb_deleted' = 1 ) ), - ), 'conds' = $conds ); } -- To view, visit https://gerrit.wikimedia.org/r/63101 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5aa934fb6e6de9daeb0072d902df6e681575fd7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduction of renderContents calls - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Reduction of renderContents calls .. Reduction of renderContents calls There is no need to call renderContents in ContentBranchNode constructor because it is going to be called anyways in onSplice Change-Id: Id1ab983668299658ecd6e89a37667cc34c701689 --- M modules/ve/ce/ve.ce.ContentBranchNode.js 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/ve.ce.ContentBranchNode.js b/modules/ve/ce/ve.ce.ContentBranchNode.js index 0e5f4d5..e1b9ca2 100644 --- a/modules/ve/ce/ve.ce.ContentBranchNode.js +++ b/modules/ve/ce/ve.ce.ContentBranchNode.js @@ -25,9 +25,6 @@ // Events this.connect( this, { 'childUpdate': 'onChildUpdate' } ); - - // Initialization - this.renderContents(); }; /* Inheritance */ -- To view, visit https://gerrit.wikimedia.org/r/63096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id1ab983668299658ecd6e89a37667cc34c701689 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Inez i...@wikia-inc.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clone template dom elements being sent to converter - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Clone template dom elements being sent to converter .. Clone template dom elements being sent to converter The dom elements in the IV store are used for rendering, so if they are sent by reference to the converter they get re-attached, causing all templates to disappear from the page whenever you press 'review and save'. Fix is to run it through ve.copyArray, which clones all the nodes. Change-Id: I1b03351a28ac82e0fdb7e94e761cf65d6548e501 --- M modules/ve/dm/nodes/ve.dm.MWTemplateNode.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js b/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js index b48e71c..bbd1df6 100644 --- a/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js +++ b/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js @@ -70,7 +70,8 @@ if ( ve.compareObjects( dataElement.attributes.mw, dataElement.attributes.mwOriginal ) ) { // If the template is unchanged just send back the original dom elements so selser can skip over it index = converter.getStore().indexOfHash( ve.getHash( this.getHashObject( dataElement ) ) ); - return converter.getStore().value( index ); + // The object in the store is also used for rendering so return a copy + return ve.copyArray( converter.getStore().value( index ) ); } else { span = doc.createElement( 'span' ); // All we need to send back to Parsoid is the original template marker, -- To view, visit https://gerrit.wikimedia.org/r/62971 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b03351a28ac82e0fdb7e94e761cf65d6548e501 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Esanders esand...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 48311): Added missing barrier to newline migration - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: (Bug 48311): Added missing barrier to newline migration .. (Bug 48311): Added missing barrier to newline migration * refs leave behind a marker in place and cannot use the mw:Object/* meta-types since DOM processors expects matched start/end pairs. So, mw:Ext/Ref/Content meta-marker slips through the conditions that prevent newline migration across the ref-tags. * Added a new check (in migrateTrailingNLs DOM pass) for extension placeholder markers since these are also newline migration barriers. * Fixes parsing of echo a ref/\nref/ so that the newline between the two ref-tags is not migrated out of the paragraph. Change-Id: I9c10ab734bc4af29fdf94ad06a664271a315b7cb --- M js/lib/mediawiki.DOMPostProcessor.js 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/mediawiki.DOMPostProcessor.js b/js/lib/mediawiki.DOMPostProcessor.js index 5f5962d..918b0fc 100644 --- a/js/lib/mediawiki.DOMPostProcessor.js +++ b/js/lib/mediawiki.DOMPostProcessor.js @@ -738,7 +738,8 @@ // - are not literal html metas (found in wikitext) // - are not mw:PageProp (cannot cross page-property boundary // - are not mw:Includes/* (cannot cross *include* boundary) - // - are not tpl start/end markers (cannot cross tpl boundary) + // - are not ext/tpl start/end markers (cannot cross ext/tpl boundary) + // - are not ext placeholder markers (cannot cross ext boundaries) while (n DU.hasNodeName(n, meta) !DU.isLiteralHTMLNode(n)) { var prop = n.getAttribute(property), type = n.getAttribute(typeof); @@ -747,7 +748,7 @@ break; } - if (type (DU.isTplMetaType(type) || type.match(/mw:Includes/))) { + if (type (DU.isTplMetaType(type) || type.match(/\b(mw:Includes|mw:Ext\/)/))) { break; } @@ -2280,9 +2281,6 @@ // Ex: {{compactTOC8|side=yes|seealso=yes}} generates a mw:PageProp/notoc meta // that gets the mw:Object/Template typeof attached to it. It is not okay to // delete it! - // - // SSS FIXME: This strips out all Ext/Ref/Content meta-tags that the VE needs - // to regenerate references on demand. To be fixed. var metaType = node.getAttribute(typeof); if (metaType metaType.match(/^\bmw:(Object|EndTag|TSRMarker|Ext)\/?[^\s]*\b/) -- To view, visit https://gerrit.wikimedia.org/r/63112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c10ab734bc4af29fdf94ad06a664271a315b7cb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] test for cog - change (qa/browsertests)
Rachel99 has uploaded a new change for review. https://gerrit.wikimedia.org/r/63137 Change subject: test for cog .. test for cog Change-Id: Ia534c7839b0d8716472e80e4b5c6f96cb8e70453 --- M features/step_definitions/universal_language_selector_steps.rb M features/support/pages/random_page.rb M features/uls.feature 3 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/37/63137/1 diff --git a/features/step_definitions/universal_language_selector_steps.rb b/features/step_definitions/universal_language_selector_steps.rb index eec8c2e..cca5fd5 100644 --- a/features/step_definitions/universal_language_selector_steps.rb +++ b/features/step_definitions/universal_language_selector_steps.rb @@ -5,3 +5,9 @@ Then /^I should see the Language selector$/ do on(RandomPage).search_element.should exist end + + Then(/^I should see a cog icon near the 'Languages' header$/) do +on(RandomPage).cog_element.should exist +end + + diff --git a/features/support/pages/random_page.rb b/features/support/pages/random_page.rb index 375a2f3..a55f85d 100644 --- a/features/support/pages/random_page.rb +++ b/features/support/pages/random_page.rb @@ -4,6 +4,7 @@ include URL page_url URL.url('Special:Random') + span(:cog, title: 'Language settings') li(:main_page, id: 'n-mainpage-description') a(:download_as_pdf, text: 'Download as PDF') a(:download_the_file, text: 'Download the file') @@ -12,4 +13,5 @@ text_field(:search_input, id: 'searchInput') button(:search_button, id: 'searchButton') div(:input_method, class: 'imeselector imeselector-toggle') + span(cog, class: 'us3') end diff --git a/features/uls.feature b/features/uls.feature index ae8f8da..b6a41c8 100644 --- a/features/uls.feature +++ b/features/uls.feature @@ -5,3 +5,7 @@ Given I visit a random page When I click language selector trigger element Then I should see the Language selector + +Scenario: The cog icon is visible in the sidebar on an article + Given I am at random page + Then I should see a cog icon near the 'Languages' header \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/63137 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia534c7839b0d8716472e80e4b5c6f96cb8e70453 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Rachel99 rachelthomas...@yahoo.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] API: Fix action=parse without any page or title or text - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/63138 Change subject: API: Fix action=parse without any page or title or text .. API: Fix action=parse without any page or title or text action=parse was raising an error about missing 'text' with 'title' even when 'title' wasn't actually passed, due to a fix for bug 33865. But this broke using action=parse to parse an edit summary without also giving it wikitext to parse. It turns out that the ContentHandler changes fixed bug 33865 anyway, so the check for 'title' without 'text' could be removed. But on the other hand, it doesn't hurt anything and warns about a probable client error, so let's keep it in and just fix it to not complain when 'title' is not passed (or is the default). Also, while we're editing the file, add some more examples as also requested in bug 48319. Bug: 48319 Change-Id: I03c1fbcb0bd31dea8bd84e164104f7ced0ace449 --- M RELEASE-NOTES-1.22 M includes/api/ApiParse.php 2 files changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/63138/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 50444a7..cf6a5e9 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -88,6 +88,8 @@ * A bias in wfRandomString() toward digits 1-7 has been corrected. Generated strings will now start with digits 0 and 8-f as often as they should. * (bug 45371) Removed Parser_LinkHooks and CoreLinkFunctions classes. +* (bug 48319) action=parse no longer returns an error if passed none of 'oldid', + 'pageid', 'page', 'title', and 'text' (e.g. if only passed 'summary'). === API changes in 1.22 === * (bug 46626) xmldoublequote parameter was removed. Because of a bug, the diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index bde1d99..1a48860 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -173,7 +173,7 @@ $popts = $pageObj-makeParserOptions( $this-getContext() ); $popts-enableLimitReport( !$params['disablepp'] ); - if ( is_null( $text ) ) { + if ( is_null( $text ) $title !== 'API' ) { $this-dieUsage( 'The text parameter should be passed with the title parameter. Should you be using the page parameter instead?', 'params' ); } @@ -679,7 +679,10 @@ public function getExamples() { return array( - 'api.php?action=parsetext={{Project:Sandbox}}' + 'api.php?action=parsepage=Project:Sandbox' = 'Parse a page', + 'api.php?action=parsetext={{Project:Sandbox}}' = 'Parse wikitext', + 'api.php?action=parsetext={{PAGENAME}}title=Test' = 'Parse wikitext, specifying the page title', + 'api.php?action=parsesummary=Some+[[link]]prop=' = 'Parse a summary', ); } -- To view, visit https://gerrit.wikimedia.org/r/63138 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03c1fbcb0bd31dea8bd84e164104f7ced0ace449 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Spell-check: occured - occurred etc. - change (mediawiki...FundraisingEmailUnsubscribe)
Katie Horn has submitted this change and it was merged. Change subject: Spell-check: occured - occurred etc. .. Spell-check: occured - occurred etc. * Replace occured by occurred * Remove a full stop from fundraiserunsubscribe-desc for consistency Change-Id: Ie700d9445684f802196a8789e0fb5fbcb11060e2 --- M FundraiserUnsubscribe.i18n.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Katie Horn: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve diff --git a/FundraiserUnsubscribe.i18n.php b/FundraiserUnsubscribe.i18n.php index 4ce3b61..8d4b0c3 100644 --- a/FundraiserUnsubscribe.i18n.php +++ b/FundraiserUnsubscribe.i18n.php @@ -8,7 +8,7 @@ $messages = array(); $messages['en'] = array( - 'fundraiserunsubscribe-desc' = 'Allows users to unsubscribe from configured fundraising mailing lists.', + 'fundraiserunsubscribe-desc' = 'Allows users to unsubscribe from configured fundraising mailing lists', 'fundraiserunsubscribe' = 'Unsubscribe from Wikimedia Fundraising Email', @@ -17,7 +17,7 @@ 'fundraiserunsubscribe-submit' = 'Unsubscribe', 'fundraiserunsubscribe-cancel' = 'Cancel', - 'fundraiserunsubscribe-errormsg' = 'An error occured while attempting to process your request. Please contact [mailto:$1 $1].', + 'fundraiserunsubscribe-errormsg' = 'An error occurred while attempting to process your request. Please contact [mailto:$1 $1].', 'fundraiserunsubscribe-success' = 'You have successfully been removed from our mailing list.', 'fundraiserunsubscribe-sucesswarning' = 'Please allow up to four (4) days for the changes to take effect. We apologize for any emails you receive during this time. If you have any questions, please contact [mailto:$1 $1].', -- To view, visit https://gerrit.wikimedia.org/r/59048 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie700d9445684f802196a8789e0fb5fbcb11060e2 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/FundraisingEmailUnsubscribe Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com Gerrit-Reviewer: Adamw awi...@wikimedia.org Gerrit-Reviewer: Katie Horn kh...@wikimedia.org Gerrit-Reviewer: Mwalker mwal...@wikimedia.org Gerrit-Reviewer: Pgehres pgeh...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] toy scripts playing with long-range compression - change (operations/dumps)
Twotwotwo has uploaded a new change for review. https://gerrit.wikimedia.org/r/63139 Change subject: toy scripts playing with long-range compression .. toy scripts playing with long-range compression Change-Id: I06519466a4ffaf82371d50dea42e067b73e0ba6f --- A toys/long-range-zippers/README.txt A toys/long-range-zippers/blks-rzip.py A toys/long-range-zippers/blks-standalone.py 3 files changed, 644 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps refs/changes/39/63139/1 diff --git a/toys/long-range-zippers/README.txt b/toys/long-range-zippers/README.txt new file mode 100644 index 000..19af10a --- /dev/null +++ b/toys/long-range-zippers/README.txt @@ -0,0 +1,55 @@ +These are a couple of scripts playing with alternate compressors for +full-history dumps. The essential idea is that general-purpose compression +tools weren't made for files like history dumps that have many repetitions +of long chunks of content, sometimes spaced far apart. Using tools made for +this sort of content can save you compression time or space. + +Both of these scripts share a lot of boilerplate to split uncompressed +content into 10M chunks; that allows the script to stream input and output +even if the underlying compressor can't, and allows random read access to +the compressed content. + + +* blks-standalone.py preprocesses the file in Python, then runs gzip or + bzip. + + Specifically, some Python code produces 1) a sorted list of all *distinct* + lines in the input, and 2) indices into that array for every line of the + input. It gzips (or, with minor code changes, can bzip) both the indices + and the lines. + + Here's a slightly simplified copy of the compression code to illustrate: + +lines = input.split('\n') +line_list = sorted(set(lines)) +line_dict = dict((line,i) for i,line in enumerate(line_list)) +line_numbers = array.array('I', (line_dict[line] for line in lines)) +nums = zip(line_numbers.tostring()) +text = zip('\n'.join(line_list)) +return pack_num(len(nums)) + nums + text + + In a test on a c1.medium EC2 instance, it compressed 4.1G to 63M in 2m45s + wall time. Using bzip instead of gzip on the text, it gets the file to 56M + in 3m40s. + + +* blks-rzip.py runs rzip, from http://rzip.samba.org/, which internally uses + a hashtable to find long repetitions (32+ chars) anywhere in the file, + then bzips the 'instructions' and the remaining text. + + rzip's more efficient: in the saem test scenario above, it creates a 44M + file in three minutes. You can also run rzip -0 and gzip the output for + faster results with worse compression. rzip also works on all sorts of + files with long-range redundancy, whereas the line-based trick in + blks-standalone only works on text content. People obviously need the + rzip package installed to use it; there's a pure-Python decompressor in + the script, but it's slow. + + +None of this is optimal. If anything, the performance numbers from this +just indicate there may be gains from even blunt approaches to exploiting +the similarity between revisions. + +Everything here is public domain. + +Randall Farmer, twotwotwo at gmail, 2013 \ No newline at end of file diff --git a/toys/long-range-zippers/blks-rzip.py b/toys/long-range-zippers/blks-rzip.py new file mode 100755 index 000..68005ee --- /dev/null +++ b/toys/long-range-zippers/blks-rzip.py @@ -0,0 +1,351 @@ +#!/usr/bin/env python +# Randall Farmer, twotwotwo at gmail, 2013. Public domain. No warranty. +import sys, subprocess, tempfile, gzip as gzip_mod, array, os, getopt, bisect, ctypes, bz2 +from struct import pack, unpack +from cStringIO import StringIO +from binascii import crc32 + +# pure-Python runzipper won't decompress more than this +MAX_SIZE = 1024*1024*300 + +# check our endianness +LITTLE_ENDIAN = array.array('L',[1]).tostring()[0] == '\x01' + +MAGIC = 'BLKS' + +MISSING_RZIP = os.system('rzip -V /dev/null 2 /dev/null') + +### MEMORY-TO-MEMORY RUNZIP FROM PYTHON + +class RZFile: +def __init__(self, f=None, s=None): +self.infile = StringIO(s or f.read()) +file_header = self.infile.read(24) +# we like rzip | gzip, too +if file_header[0:2] == '\0x1f\0x8b': +self.infile.seek(0) +self.infile = gzip_mod.GzipFile(fileobj=self.infile) +file_header = self.infile.read(24) +self.initial_pos = 24 +if file_header[0:4] != 'RZIP': +raise Exception('not rzip') +self.outsize, = unpack(!i, file_header[6:10]) +if self.outsize MAX_SIZE: +raise Exception('won\'t expand %d bytes into RAM, saw %d' % (MAX_SIZE, self.outsize)) +self.outbuf = ctypes.create_string_buffer(self.outsize) +self.outoffs = 0 +self.instreams = [None, None] +self.nexthdrs = [24,37] + +def read_stream(self,which,bytes): +
[MediaWiki-commits] [Gerrit] Refactoring: introduced URL module - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Refactoring: introduced URL module .. Refactoring: introduced URL module Change-Id: I99e4d8831ca770d643b2ba40de36205b7309a46f --- A tests/acceptance/features/support/modules/url_module.rb M tests/acceptance/features/support/pages/beta_page.rb M tests/acceptance/features/support/pages/home_page.rb M tests/acceptance/features/support/pages/login_page.rb M tests/acceptance/features/support/pages/random_page.rb 5 files changed, 18 insertions(+), 33 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/tests/acceptance/features/support/modules/url_module.rb b/tests/acceptance/features/support/modules/url_module.rb new file mode 100644 index 000..5ac84a3 --- /dev/null +++ b/tests/acceptance/features/support/modules/url_module.rb @@ -0,0 +1,10 @@ +module URL + def self.url(name) +if ENV['MEDIAWIKI_URL'] + mediawiki_url = ENV['MEDIAWIKI_URL'] +else + mediawiki_url = 'http://127.0.0.1:80/wiki/' +end +#{mediawiki_url}#{name} + end +end diff --git a/tests/acceptance/features/support/pages/beta_page.rb b/tests/acceptance/features/support/pages/beta_page.rb index e28d110..1efe6ff 100644 --- a/tests/acceptance/features/support/pages/beta_page.rb +++ b/tests/acceptance/features/support/pages/beta_page.rb @@ -1,15 +1,8 @@ class BetaPage include PageObject - def self.url -if ENV['MEDIAWIKI_URL'] - mediawiki_url = ENV['MEDIAWIKI_URL'] -else - mediawiki_url = 'http://127.0.0.1:80/wiki/' -end -#{mediawiki_url}Special:MobileOptions/BetaOptIn - end - page_url url + include URL + page_url URL.url('Special:MobileOptions/BetaOptIn') div(:beta_parent, class: 'mw-mf-checkbox-css3') span(:beta) do |page| diff --git a/tests/acceptance/features/support/pages/home_page.rb b/tests/acceptance/features/support/pages/home_page.rb index 9e90b8c..f75808d 100644 --- a/tests/acceptance/features/support/pages/home_page.rb +++ b/tests/acceptance/features/support/pages/home_page.rb @@ -1,13 +1,9 @@ class HomePage include PageObject + include URL def self.url -if ENV['MEDIAWIKI_URL'] - mediawiki_url = ENV['MEDIAWIKI_URL'] -else - mediawiki_url = 'http://127.0.0.1:80/wiki/' -end -#{mediawiki_url}Main_Page +URL.url('Main_Page') end page_url url diff --git a/tests/acceptance/features/support/pages/login_page.rb b/tests/acceptance/features/support/pages/login_page.rb index 13b865a..583752a 100644 --- a/tests/acceptance/features/support/pages/login_page.rb +++ b/tests/acceptance/features/support/pages/login_page.rb @@ -1,15 +1,8 @@ class LoginPage include PageObject - def self.url -if ENV['MEDIAWIKI_URL'] - mediawiki_url = ENV['MEDIAWIKI_URL'] -else - mediawiki_url = 'http://127.0.0.1:80/wiki/' -end -#{mediawiki_url}Special:UserLogin - end - page_url url + include URL + page_url URL.url('Special:UserLogin') div(:feedback, class: 'errorbox') button(:login, id: 'wpLoginAttempt') diff --git a/tests/acceptance/features/support/pages/random_page.rb b/tests/acceptance/features/support/pages/random_page.rb index aa98fe2..4ed37d7 100644 --- a/tests/acceptance/features/support/pages/random_page.rb +++ b/tests/acceptance/features/support/pages/random_page.rb @@ -1,13 +1,6 @@ class RandomPage include PageObject - def self.url -if ENV['MEDIAWIKI_URL'] - mediawiki_url = ENV['MEDIAWIKI_URL'] -else - mediawiki_url = 'http://127.0.0.1:80/wiki/' -end -#{mediawiki_url}Special:Random - end - page_url url + include URL + page_url URL.url('Special:Random') end -- To view, visit https://gerrit.wikimedia.org/r/63122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99e4d8831ca770d643b2ba40de36205b7309a46f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Mgrover mgro...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding more test scenarios for ULS user settings - change (qa/browsertests)
Arrbee has uploaded a new change for review. https://gerrit.wikimedia.org/r/63140 Change subject: Adding more test scenarios for ULS user settings .. Adding more test scenarios for ULS user settings Adding the test scenarios for the display, font and input settings for logged in and anonymous users Change-Id: I366ef64ef51cde67117b344d4cb88cb77b944af9 --- A features/backlog/uls_cog_tooltip_revert-anonymous.feature A features/backlog/uls_display_settings_menu_anonymous.feature A features/backlog/uls_display_settings_menu_logged-user.feature A features/backlog/uls_font_download_anonymous.feature A features/backlog/uls_language_selection_logged_user.feature A features/backlog/uls_menu_font_anonymous.feature 6 files changed, 220 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/40/63140/1 diff --git a/features/backlog/uls_cog_tooltip_revert-anonymous.feature b/features/backlog/uls_cog_tooltip_revert-anonymous.feature new file mode 100644 index 000..4efc8a0 --- /dev/null +++ b/features/backlog/uls_cog_tooltip_revert-anonymous.feature @@ -0,0 +1,12 @@ +Feature: ULS cog tooltip does not allow to revert language changes for anonymous users + +Background: In all of the following scenarios the global variable $wgULSPosition is set to 'interlanguage' for the wiki + And the base language at the start of the test is English + And the tests needs to run with an anonymous user + And setlang=fr is used + And the URL http://en.wikipedia.beta.wmflabs.org/wiki/Main_Page is used + +Scenario: The cog icon's tooltip is always Language settings for anonymous users + Given I am on a wiki content page with interlanguage links + When I move the cursor over the cog icon + Then I should see a tooltip with the Language settings text. diff --git a/features/backlog/uls_display_settings_menu_anonymous.feature b/features/backlog/uls_display_settings_menu_anonymous.feature new file mode 100644 index 000..a4b6350 --- /dev/null +++ b/features/backlog/uls_display_settings_menu_anonymous.feature @@ -0,0 +1,16 @@ +Feature: Display settings on the Language Settings panel menu for anonymous users + +Background: In all of the following scenarios the global variable $wgULSPosition is set to 'interlanguage' for the wiki. + And the base language at the start of the test is English + And the tests need to be run as an anonymous user + And URL to be used is http://en.wikipedia.beta.wmflabs.org/wiki/Main_Page + +Scenario: Language settings panel displays Display and Input options + Given I clicked the cog icon to open the 'Language Settings' panel + When the panel opens + Then I see the buttons Display and Input buttons on the left side + +Scenario: Display option is selected by default in a new Language settings panel +Given I clicked the cog icon to open the 'Language Settings' panel +When the panel opens +Then I see the button Display selected at the start diff --git a/features/backlog/uls_display_settings_menu_logged-user.feature b/features/backlog/uls_display_settings_menu_logged-user.feature new file mode 100644 index 000..fa58503 --- /dev/null +++ b/features/backlog/uls_display_settings_menu_logged-user.feature @@ -0,0 +1,72 @@ +Feature: Display settings on the Language Settings panel menu for logged-in users + +Background: In all of the following scenarios the global variable $wgULSPosition is set to 'interlanguage' for the wiki. + And the base language at the start of the test is English + And the tests need to be run as a logged-in user + And URL to be used is http://en.wikipedia.beta.wmflabs.org/wiki/Main_Page + +Scenario: Language settings panel displays Display and Input options + Given I clicked the cog icon to open the 'Language Settings' panel + When the panel opens + Then I see the buttons Display and Input buttons on the left side + +Scenario: Display option is selected by default in a new Language settings panel +Given I clicked the cog icon to open the 'Language Settings' panel +When the panel opens +Then I see the button Display selected at the start + +Scenario: Selected option can be changed in the Language settings panel +Given I clicked the cog icon to open the 'Language Settings' panel with 'Display' settings selected by default +When I click on the 'Input' option +Then I see the Display options changed to the Input options + +Scenario: Language settings panel can be closed after changing the selected option and closing +Given I clicked the cog icon to open the 'Language Settings' panel with 'Display' settings selected by default + And I have clicked the 'Input option to select it +When I click on the close button +Then the Language settings panel disappears + +Scenario: Language settings panel can be closed after changing the selected option and applying the setting +Given
[MediaWiki-commits] [Gerrit] Fixed Watchlist tests - change (mediawiki...MobileFrontend)
Cmcmahon has submitted this change and it was merged. Change subject: Fixed Watchlist tests .. Fixed Watchlist tests Bug: 46922 Change-Id: Id353d9014ba9fdc33d08da5db1eb8c941391b972 --- M tests/acceptance/features/step_definitions/watchlist_steps.rb M tests/acceptance/features/watchlist.feature 2 files changed, 8 insertions(+), 7 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/tests/acceptance/features/step_definitions/watchlist_steps.rb b/tests/acceptance/features/step_definitions/watchlist_steps.rb index 13ea68d..4e7f02b 100644 --- a/tests/acceptance/features/step_definitions/watchlist_steps.rb +++ b/tests/acceptance/features/step_definitions/watchlist_steps.rb @@ -27,13 +27,11 @@ #Signup takes you to the sign in page... should it take you to the Mobile Create Account page?? Given /^I am logged into the mobile website$/ do - on(HomePage) do |page| + visit(HomePage) do |page| page.mainmenu_button_element.when_present.click page.login_button end - on(LoginPage) do |page| -page.login_with(@mediawiki_username, @mediawiki_password) - end + on(LoginPage).login_with(@mediawiki_username, @mediawiki_password) end When /^I go to random page$/ do diff --git a/tests/acceptance/features/watchlist.feature b/tests/acceptance/features/watchlist.feature index 1be2ad4..3a33c85 100644 --- a/tests/acceptance/features/watchlist.feature +++ b/tests/acceptance/features/watchlist.feature @@ -1,18 +1,21 @@ Feature: Manage Watchlist Scenario: I receive notification that I need to log in to use the watchlist functionality -Given I am not logged in +Given I am on the home page + And I am not logged in When I select the watchlist icon Then I receive notification that I need to log in to use the watchlist functionality Scenario: Login link leads to login page -Given I am not logged in +Given I am on the home page + And I am not logged in When I select the watchlist icon And I click Login Then Login page opens Scenario: Sign up link leads to Sign up page -Given I am not logged in +Given I am on the home page + And I am not logged in When I select the watchlist icon And I click Sign up Then Sign up page opens -- To view, visit https://gerrit.wikimedia.org/r/63123 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id353d9014ba9fdc33d08da5db1eb8c941391b972 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Mgrover mgro...@wikimedia.org Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactoring: renamed step files so they have the same names ... - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: Refactoring: renamed step files so they have the same names as feature files .. Refactoring: renamed step files so they have the same names as feature files Change-Id: Icba27067b5a4f7c8398ff9f170037e43e84b8975 --- R features/step_definitions/uls_accept_language_steps.rb R features/step_definitions/uls_steps.rb 2 files changed, 0 insertions(+), 0 deletions(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/features/step_definitions/accept_language_steps.rb b/features/step_definitions/uls_accept_language_steps.rb similarity index 100% rename from features/step_definitions/accept_language_steps.rb rename to features/step_definitions/uls_accept_language_steps.rb diff --git a/features/step_definitions/universal_language_selector_steps.rb b/features/step_definitions/uls_steps.rb similarity index 100% rename from features/step_definitions/universal_language_selector_steps.rb rename to features/step_definitions/uls_steps.rb -- To view, visit https://gerrit.wikimedia.org/r/63132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icba27067b5a4f7c8398ff9f170037e43e84b8975 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Rachel99 rachelthomas...@yahoo.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Increasing z-index of personal toolbar from 1 to 100 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Increasing z-index of personal toolbar from 1 to 100 .. Increasing z-index of personal toolbar from 1 to 100 Since the personal toolbar is at the top of the page and may include children that need a high z-index, such as dropdown menus or overlays we should set it to at least be equal to the highest potential competitor (the Visual Editor toolbar). The other option would be to not set a z-index at all, but this would regress bug 37158. Bug: 48078 Change-Id: I61daea50209d040f7e0f71207a4e90998c15083f --- M skins/vector/screen.css 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/skins/vector/screen.css b/skins/vector/screen.css index dc4267f..eb4a4dd 100644 --- a/skins/vector/screen.css +++ b/skins/vector/screen.css @@ -75,8 +75,8 @@ position: absolute; top: 0.33em; right: 0.75em; - /* Display on top of page tabs - bug 37158 */ - z-index: 1; + /* Display on top of page tabs - bugs 37158, 48078 */ + z-index: 100; } #p-personal h3, #p-personal h5 { -- To view, visit https://gerrit.wikimedia.org/r/63099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61daea50209d040f7e0f71207a4e90998c15083f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org Gerrit-Reviewer: Trevor Parscal tpars...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Whitespace between unwrapped inline nodes assigned to paragraph - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Whitespace between unwrapped inline nodes assigned to paragraph .. Whitespace between unwrapped inline nodes assigned to paragraph In stopWrapping we assign any left over whitespace to the paragraph in position 3, however we weren't clearing this whitespace buffer if an inline content node followed it. Change-Id: I8b3ee3915044abd6bafda386430bf7f992ca4aa8 --- M modules/ve/dm/ve.dm.Converter.js M modules/ve/test/dm/ve.dm.example.js 2 files changed, 38 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/dm/ve.dm.Converter.js b/modules/ve/dm/ve.dm.Converter.js index dd16935..05425e8 100644 --- a/modules/ve/dm/ve.dm.Converter.js +++ b/modules/ve/dm/ve.dm.Converter.js @@ -590,6 +590,12 @@ } } + // If we're inserting content into a wrapper, any wrappedWhitespace + // up to this point can be considered dealt with + if ( context.inWrapper childIsContent ) { + wrappedWhitespace = ''; + } + // Annotate child if ( childIsContent !context.annotations.isEmpty() ) { childDataElements[0].annotations = context.annotations.getIndexes().slice(); diff --git a/modules/ve/test/dm/ve.dm.example.js b/modules/ve/test/dm/ve.dm.example.js index 1dc2f20..378d4c5 100644 --- a/modules/ve/test/dm/ve.dm.example.js +++ b/modules/ve/test/dm/ve.dm.example.js @@ -1621,6 +1621,38 @@ { 'type': '/paragraph' } ] }, + 'whitespace between unwrapped inline nodes': { + 'html': + 'body' + + 'span typeof=mw:Entityc/span span typeof=mw:Entityd/span\nspan typeof=mw:Entitye/span' + + '/body', + 'data': [ + { + 'type': 'paragraph', + 'internal': { + 'generated': 'wrapper' + } + }, + { + 'type': 'MWentity', + 'attributes': { 'character': 'c', 'html/0/typeof': 'mw:Entity' } + }, + { 'type': '/MWentity' }, + ' ', + { + 'type': 'MWentity', + 'attributes': { 'character': 'd', 'html/0/typeof': 'mw:Entity' } + }, + { 'type': '/MWentity' }, + '\n', + { + 'type': 'MWentity', + 'attributes': { 'character': 'e', 'html/0/typeof': 'mw:Entity' } + }, + { 'type': '/MWentity' }, + { 'type': '/paragraph' }, + ] + }, 'whitespace preservation in headings': { 'html': 'bodyh2Foo/h2h2 Bar/h2h2Baz /h2h2 Quux /h2/body', 'data': [ -- To view, visit https://gerrit.wikimedia.org/r/63012 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b3ee3915044abd6bafda386430bf7f992ca4aa8 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable Local XFF blocking - change (operations/mediawiki-config)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/63141 Change subject: Enable Local XFF blocking .. Enable Local XFF blocking Bug: 23343 Bug: 48323 Change-Id: Iba5cfdff2f91434f94e546ead0062ff3d016dba8 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/41/63141/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index ee8478d..421087c 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2806,6 +2806,14 @@ require_once( $IP/extensions/AccountAudit/AccountAudit.php ); } +if ( $wmgUseXFFBlocks ) { + $wgApplyIpBlocksToXff = true; + $wgGlobalBlockingBlockXFF = true; +} else { + $wgApplyIpBlocksToXff = false; + $wgGlobalBlockingBlockXFF = false; +} + // On Special:Version, link to useful release notes $wgHooks['SpecialVersionVersionUrl'][] = function( $wgVersion, $versionUrl ) { $matches = array(); diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 37a527e..5f1896f 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12480,6 +12480,11 @@ 'metawiki' = true, ), +// Apply blocks to IPs in XFF (bug 23343) +'wmgUseXFFBlocks' = array( + 'default' = true, +), + 'wgUrlProtocols' = array( 'default' = array( 'http://', -- To view, visit https://gerrit.wikimedia.org/r/63141 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba5cfdff2f91434f94e546ead0062ff3d016dba8 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: CSteipp cste...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] When removing an empty list item, also remove the list if it... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: When removing an empty list item, also remove the list if it's now empty .. When removing an empty list item, also remove the list if it's now empty When the user presses Enter in an empty list item, we remove it. But if the list item was the only child of the list, that leaves an empty list which then gets a block slug, leading to all sorts of weird things, and even pawns in Firefox. So check whether the list item was the last child and if so, remove the list. Bug: 48287 Change-Id: If22d9b904b8861e24d56944d791545635b2e4254 --- M modules/ve/ce/ve.ce.Surface.js 1 file changed, 19 insertions(+), 9 deletions(-) Approvals: Trevor Parscal: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 52ae182..83f28ff 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -1112,15 +1112,24 @@ ) { // Enter was pressed in an empty list item. list = outermostNode.getModel().getParent(); - // Remove the list item - tx = ve.dm.Transaction.newFromRemoval( - documentModel, outermostNode.getModel().getOuterRange() - ); - this.model.change( tx ); - // Insert a paragraph - tx = ve.dm.Transaction.newFromInsertion( - documentModel, list.getOuterRange().to, emptyParagraph - ); + if ( list.getChildren().length === 1 ) { + // The list item we're about to remove is the only child of the list + // Remove the list + tx = ve.dm.Transaction.newFromRemoval( + documentModel, list.getOuterRange() + ); + } else { + // Remove the list item + tx = ve.dm.Transaction.newFromRemoval( + documentModel, outermostNode.getModel().getOuterRange() + ); + this.model.change( tx ); + selection = tx.translateRange( selection ); + // Insert a paragraph + tx = ve.dm.Transaction.newFromInsertion( + documentModel, list.getOuterRange().to, emptyParagraph + ); + } advanceCursor = false; } else { // We must process the transaction first because getRelativeContentOffset can't help us @@ -1131,6 +1140,7 @@ // Commit the transaction this.model.change( tx ); + selection = tx.translateRange( selection ); // Now we can move the cursor forward if ( advanceCursor ) { -- To view, visit https://gerrit.wikimedia.org/r/63102 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If22d9b904b8861e24d56944d791545635b2e4254 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Esanders esand...@wikimedia.org Gerrit-Reviewer: Trevor Parscal tpars...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Punctuation and consistency for log-description-thanks - change (mediawiki...Thanks)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/63142 Change subject: Punctuation and consistency for log-description-thanks .. Punctuation and consistency for log-description-thanks Added period and made consistent with core log descriptions. https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Log-description-thanks/en Change-Id: I7aaeecad6b662428bff9a2f4918a1943033f45d0 --- M Thanks.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Thanks refs/changes/42/63142/1 diff --git a/Thanks.i18n.php b/Thanks.i18n.php index 9cbe58f..dcc70c0 100644 --- a/Thanks.i18n.php +++ b/Thanks.i18n.php @@ -33,7 +33,7 @@ $4', 'notification-thanks-email-batch-body' = '$1 {{GENDER:$1|thanked}} you for your edit on $2.', 'log-name-thanks' = 'Thanks log', - 'log-description-thanks' = 'These events track when users thank other users', + 'log-description-thanks' = 'Below is a list of users thanked by other users.', 'logentry-thanks-thank' = '$1 {{GENDER:$2|thanked}} $3', ); -- To view, visit https://gerrit.wikimedia.org/r/63142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7aaeecad6b662428bff9a2f4918a1943033f45d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Thanks Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Non-performant hack: set threads to 1 - change (operations/puppet)
Diederik has uploaded a new change for review. https://gerrit.wikimedia.org/r/63143 Change subject: Non-performant hack: set threads to 1 .. Non-performant hack: set threads to 1 This is a temporarily measure while the job queue system in UMAPI is being replaced. As soon as that code has been deployed then this changeset should be reverted. Change-Id: I0cf8a37b9671c6f2b468bff32eb78715b445ee13 --- M templates/apache/sites/metrics.wikimedia.org.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/63143/1 diff --git a/templates/apache/sites/metrics.wikimedia.org.erb b/templates/apache/sites/metrics.wikimedia.org.erb index cfcd3b4..3e4eb78 100644 --- a/templates/apache/sites/metrics.wikimedia.org.erb +++ b/templates/apache/sites/metrics.wikimedia.org.erb @@ -50,7 +50,7 @@ SSLCertificateKeyFile /etc/ssl/private/%= site_name %.key SSLCACertificatePath /etc/ssl/certs/ - WSGIDaemonProcess api user=%= metrics_user % group=wikidev threads=5 python-path=%= e3_analysis_path % + WSGIDaemonProcess api user=%= metrics_user % group=wikidev threads=1 python-path=%= e3_analysis_path % WSGIScriptAlias / %= document_root %/api.wsgi Directory %= document_root % -- To view, visit https://gerrit.wikimedia.org/r/63143 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0cf8a37b9671c6f2b468bff32eb78715b445ee13 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Diederik dvanli...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tests: mock parser tests file access - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: tests: mock parser tests file access .. tests: mock parser tests file access I eventually got tired of our parser tests creating and deleting fixture files over and over. This patch mock the files in memory and just expose the file metadata which is all we need for parser tests. The mocked classes are under /tests/phpunit/mocks/ and respect the hierarchy of /includes/. The wiki.png and headbg.jpg files are still copied on each test :/ Change-Id: Iccdff67222e66d48d01dd1596d09df2ea24b8c2a --- M tests/TestsAutoLoader.php M tests/phpunit/includes/parser/NewParserTest.php A tests/phpunit/mocks/filebackend/MockFSFile.php A tests/phpunit/mocks/filebackend/MockFileBackend.php A tests/phpunit/mocks/media/MockBitmapHandler.php 5 files changed, 291 insertions(+), 1 deletion(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/TestsAutoLoader.php b/tests/TestsAutoLoader.php index ca92fe3..4a6e3fb 100644 --- a/tests/TestsAutoLoader.php +++ b/tests/TestsAutoLoader.php @@ -79,6 +79,11 @@ 'SiteTest' = $testDir/phpunit/includes/site/SiteTest.php, 'TestSites' = $testDir/phpunit/includes/site/TestSites.php, + # tests/phpunit/mocks + 'MockFSFile' = $testDir/phpunit/mocks/filebackend/MockFSFile.php, + 'MockFileBackend' = $testDir/phpunit/mocks/filebackend/MockFileBackend.php, + 'MockBitmapHandler' = $testDir/phpunit/mocks/media/MockBitmapHandler.php, + # tests/phpunit/languages 'LanguageClassesTestCase' = $testDir/phpunit/languages/LanguageClassesTestCase.php, diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index d66fac7..f41c71c 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -110,6 +110,14 @@ $tmpGlobals['wgStyleDirectory'] = $IP/skins; } + # Replace all media handlers with a mock. We do not need to generate + # actual thumbnails to do parser testing, we only care about receiving + # a ThumbnailImage properly initialized. + global $wgMediaHandlers; + foreach( $wgMediaHandlers as $type = $handler ) { + $tmpGlobals['wgMediaHandlers'][$type] = 'MockBitmapHandler'; + } + $tmpHooks = $wgHooks; $tmpHooks['ParserTestParser'][] = 'ParserTestParserHook::setup'; $tmpHooks['ParserGetVariableValueTs'][] = 'ParserTest::getFakeTimestamp'; @@ -301,7 +309,10 @@ $backend = self::$backendToUse; } } else { - $backend = new FSFileBackend( array( + # Replace with a mock. We do not care about generating real + # files on the filesystem, just need to expose the file + # informations. + $backend = new MockFileBackend( array( 'name' = 'local-backend', 'lockManager' = 'nullLockManager', 'containerPaths' = array( @@ -456,6 +467,12 @@ return; } + $backend = RepoGroup::singleton()-getLocalRepo()-getBackend(); + if( $backend instanceof MockFileBackend ) { + # In memory backend, so dont bother cleaning them up. + return; + } + $base = $this-getBaseDir(); // delete the files first, then the dirs. self::deleteFiles( diff --git a/tests/phpunit/mocks/filebackend/MockFSFile.php b/tests/phpunit/mocks/filebackend/MockFSFile.php new file mode 100644 index 000..31deaf7 --- /dev/null +++ b/tests/phpunit/mocks/filebackend/MockFSFile.php @@ -0,0 +1,69 @@ +?php +/** + * Mock of a filesystem file. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @ingroup FileBackend + */ + +/** + * Class representing
[MediaWiki-commits] [Gerrit] Bug 44436 - add warning interstitials for non-whitelisted la... - change (mediawiki...ZeroRatedMobileAccess)
jenkins-bot has submitted this change and it was merged. Change subject: Bug 44436 - add warning interstitials for non-whitelisted langs. .. Bug 44436 - add warning interstitials for non-whitelisted langs. * The language dropdown list on Special:ZeroRatedMobile Access currently sends a user to the language code subdomain of zero.wikipedia.org if the user is already on a subdomain of zero.wikipedia.org, or to the language code subdomain of m.wikipedia.org if the user is already on a subdomain of m.wikipedia.org. * If a Wikipedia Zero partner carrier has not whitelisted a language selected from the dropdown list, the user is presented with a warning that Wikipedia Zero is not supported by the carrier. Users may currently believe no further access is possible. * This change provides the user the opportunity to visit Wikipedia in a non-whitelisted language, but with notification that standard data charges may apply. The user will have the option of not continuing with access to the non-whitelisted version of Wikipedia. Users who choose to cotinue will be upgraded to the standard m.wikipedia.org experience in the subdomain of the language they've chosen. Change-Id: I173d824b2e5339d269a52158d217feba00b53f87 --- M includes/PageRenderingHooks.php 1 file changed, 19 insertions(+), 7 deletions(-) Approvals: Dr0ptp4kt: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php index 2526e13..a18b5a6 100644 --- a/includes/PageRenderingHooks.php +++ b/includes/PageRenderingHooks.php @@ -21,7 +21,8 @@ class PageRenderingHooks { public static $renderZeroRatedLandingPage; public static $renderZeroRatedBanner; - private static $formatMobileUrl = '//%s.zero.wikipedia.org/wiki/Main_Page'; + private static $formatMobileUrl = '//%s.m.wikipedia.org/wiki/Main_Page'; + private static $formatZeroUrl = '//%s.zero.wikipedia.org/wiki/Main_Page'; /** * @var Title @@ -264,7 +265,7 @@ continue; } $languageName = $languageNames[$languageCode]; - $languageUrl = sprintf( self::$formatMobileUrl, $languageCode ); + $languageUrl = sprintf( self::$formatZeroUrl, $languageCode ); $languageLink = Html::element( 'a', array( 'id' = 'lang_' . $languageCode, 'href' = $languageUrl ), @@ -291,13 +292,24 @@ array( 'value' = '' ), wfMessage( 'zero-rated-mobile-access-language-selection' )-text() ); + + $freeLangs = self::$carrier['whitelistedLangs']; foreach ( $languageNames as $languageCode = $languageName ) { - $languageUrl = sprintf( self::$formatMobileUrl, $languageCode ); - if ( $wgZeroDisableImages === 1 ) { - $languageUrl = str_replace( '.m.wikipedia.org', '.zero.wikipedia.org', $languageUrl ); - } else { - $languageUrl = str_replace( '.zero.wikipedia.org', '.m.wikipedia.org', $languageUrl ); + $isFree = ( 0 === count( $freeLangs ) || in_array( $languageCode, $freeLangs ) ); + if ( !$isFree || $wgZeroDisableImages !== 1 ) { + // send user to the m subdomain + $languageUrl = sprintf( self::$formatMobileUrl, $languageCode ); + if ( !$isFree ) { + // offer upgraded ux + $languageUrl = $wgRequest-appendQuery( + 'renderZeroRatedBanner=truerenderwarning=yesreturnto=' + . urlencode( $languageUrl ) ); } + } else { + // send low bandwidth user to whitelisted zero subdomain + $languageUrl = sprintf( self::$formatZeroUrl, $languageCode ); + } +
[MediaWiki-commits] [Gerrit] Category UI improvements - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Category UI improvements .. Category UI improvements Objectives: * Ensure items don't get moved to the end when their sort-key is edited * Add placeholder text and pending styling to input * Auto-expand input to the end of the line * Make the minimum input width smaller Changes: ve.ui.MWMetaDialog.js * Added calls to fitInput on initialize * Fixed sort key update and insert handlers to maintain item position when updating ve.ui.GroupElement.js * Added index argument to addItems, allowing items to be inserted at a specific location ve.ui.PagePanelLayout.js * Fixed CSS class name ve.ui.StackPanelLayout.js, ve.ui.MenuWidget.js, ve.ui.SelectWidget.js * Passed index argument through to group element ve.ui.PanelLayout.js * Fixed overflow direction for scrolling option ve.ui.Inspector.css * Moved border-box properties to text input widget class * Set input widget within inspectors to be 100% by default ve.ui.Layout.css * Updated CSS class name * Whitespace fixes ve.ui.Widget.css * Made text input widgets's wrapper default to 20em wide and the input inside it be 100%, using border-box to ensure proper sizing * Adjusted category list item and input styles to make input appear more like a category item * Whitespace fixes ve.ui.MWCategoryInputWidget.js * Made category input widget inherit text input widget, rather than just input widget ve.ui.MWCategoryWidget.js * Replaced group functionality by mixing in group element * Added fitInput, which automatically make the input fill the rest of the line or take up the entire next line depending on how much space is left VisualEditor.i18n.php * Adjusted placeholder text for category input Change-Id: I79a18a7b849804027473084a42c36133fdacad57 --- M VisualEditor.i18n.php M modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js M modules/ve/ui/elements/ve.ui.GroupElement.js M modules/ve/ui/layouts/panels/ve.ui.PagePanelLayout.js M modules/ve/ui/layouts/panels/ve.ui.StackPanelLayout.js M modules/ve/ui/layouts/ve.ui.PanelLayout.js M modules/ve/ui/styles/ve.ui.Inspector.css M modules/ve/ui/styles/ve.ui.Layout.css M modules/ve/ui/styles/ve.ui.Widget.css M modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js M modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js M modules/ve/ui/widgets/ve.ui.MenuWidget.js M modules/ve/ui/widgets/ve.ui.SelectWidget.js 13 files changed, 165 insertions(+), 82 deletions(-) Approvals: Robmoen: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index 551f112..cc3290b 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -23,7 +23,7 @@ 'visualeditor-ca-editsource' = 'Edit source', 'visualeditor-ca-ve-edit' = 'VisualEditor', 'visualeditor-ca-ve-create' = 'VisualEditor', - 'visualeditor-category-input-placeholder' = 'Category name', + 'visualeditor-category-input-placeholder' = 'Add category', 'visualeditor-category-settings-label' = 'Category settings', 'visualeditor-dialog-meta-title' = 'Page settings', 'visualeditor-dialog-content-title' = 'Content settings', diff --git a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js index 886fb4d..afac2e0 100644 --- a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js +++ b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js @@ -46,7 +46,8 @@ * @method */ ve.ui.MWMetaDialog.prototype.onOpen = function () { - var surfaceModel = this.surface.getModel(); + var surfaceModel = this.surface.getModel(), + categoryWidget = this.categoryWidget; // Force all previous transactions to be separate from this history state surfaceModel.breakpoint(); @@ -54,6 +55,11 @@ // Parent method ve.ui.PagedDialog.prototype.onOpen.call( this ); + + // Update input position once visible + setTimeout( function () { + categoryWidget.fitInput(); + } ); }; /** @@ -175,15 +181,11 @@ * @param {Object} item */ ve.ui.MWMetaDialog.prototype.onUpdateSortKey = function ( item ) { - // Store the offset and index before removing - var offset = item.metaItem.offset, - index = item.metaItem.index; + var offset = item.metaItem.getOffset(), + index = item.metaItem.getIndex(); + // Replace meta item with updated one item.metaItem.remove(); - // It would seem as if insertItem happens before the onRemove event is sent to CategoryWidget, - // Remove the reference there so it doesn't try to get removed again onMetaListInsert - delete this.categoryWidget.categories[item.name]; - // Insert updated meta item at same offset and index this.metaList.insertMeta( this.getCategoryItemForInsertion( item ), offset, index ); }; @@ -194,9 +196,12 @@ * @param {Object}
[MediaWiki-commits] [Gerrit] Use processToplevelDoc to process src for /_wikitext/ endpoint - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/63144 Change subject: Use processToplevelDoc to process src for /_wikitext/ endpoint .. Use processToplevelDoc to process src for /_wikitext/ endpoint * Fixes bug with cite ref indexes not being reset. Change-Id: Id169f22bed4c1c8060406ff20607af72a83e7c81 --- M js/api/ParserService.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/44/63144/1 diff --git a/js/api/ParserService.js b/js/api/ParserService.js index 9c3010e..64557af 100644 --- a/js/api/ParserService.js +++ b/js/api/ParserService.js @@ -444,7 +444,7 @@ console.log('starting parsing of ' + req.params[0]); // FIXME: This does not handle includes or templates correctly env.setPageSrcInfo( src ); - parser.process( src ); + parser.processToplevelDoc( src ); } catch (e) { res.setHeader('Content-Type', 'text/plain; charset=UTF-8'); console.error( e.stack || e.toString() ); -- To view, visit https://gerrit.wikimedia.org/r/63144 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id169f22bed4c1c8060406ff20607af72a83e7c81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Slight refactoring of migrateAccount for better stats. Addi... - change (mediawiki...CentralAuth)
Pgehres has uploaded a new change for review. https://gerrit.wikimedia.org/r/63145 Change subject: Slight refactoring of migrateAccount for better stats. Adding resetting of authToken. .. Slight refactoring of migrateAccount for better stats. Adding resetting of authToken. Change-Id: I72aba3594ebd19d92bac66e84d5c1b6ffb45fd95 --- M maintenance/migrateAccount.php 1 file changed, 27 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/45/63145/1 diff --git a/maintenance/migrateAccount.php b/maintenance/migrateAccount.php index ddd3a96..c1fb128 100644 --- a/maintenance/migrateAccount.php +++ b/maintenance/migrateAccount.php @@ -17,12 +17,14 @@ parent::__construct(); $this-mDescription = Migrates the specified local account to a global account; $this-start = microtime( true ); + $this-partial = 0; $this-migrated = 0; $this-total = 0; $this-safe = false; $this-dbBackground = null; $this-batchSize = 1000; $this-autoMigrate = false; + $this-resetToken = false; $this-addOption( 'auto', 'Allows migration using CentralAuthUser::attemptAutoMigration defaults', false, false ); $this-addOption( 'userlist', 'List of usernames to migrate in the format username\thomewiki, where \thomewiki is optional', false, true ); @@ -30,6 +32,7 @@ $this-addOption( 'homewiki', 'The wiki to set as the homewiki. Can only be used with --username', false, true, 'h' ); $this-addOption( 'safe', 'Only migrates accounts with one instance of the username across all wikis', false, false ); $this-addOption( 'attachmissing', 'Attach matching local accounts to global account', false, false ); + $this-addOption( 'resettoken', 'Allows for the reset of auth tokens in certain circumstances', false, false ); } public function execute() { @@ -41,6 +44,9 @@ } if ( $this-getOption( 'auto', false ) !== false ) { $this-autoMigrate = true; + } + if ( $this-getOption( 'resettoken', false ) !== false ) { + $this-resetToken = true; } // check to see if we are processing a single username @@ -95,6 +101,7 @@ $this-output( CentralAuth account migration for: . $username . \n); $central = new CentralAuthUser( $username ); + $unattached = $central-queryUnattached(); /** * Migration with an existing global account @@ -104,7 +111,6 @@ $this-getOption( 'attachmissing', false ) !is_null( $central-getEmailAuthenticationTimestamp() ) ){ - $unattached = $central-queryUnattached(); foreach ( $unattached as $wiki = $local ) { if ( $central-getEmail() == $local['email'] @@ -112,10 +118,8 @@ ){ $this-output( ATTACHING: $username@$wiki\n ); $central-attach( $wiki, 'mail' ); - $this-migrated++; } } - return true; } else { $this-output( ERROR: A global account already exists for: $username\n ); } @@ -124,8 +128,6 @@ * Migration without an existing global account */ else { - $unattached = $central-queryUnattached(); - if ( count( $unattached ) == 0 ) { $this-output( ERROR: No local accounts found for: $username\n ); return false; @@ -167,31 +169,41 @@ // all of the emails are the same and confirmed if ( $emailMatch ) { $this-output( Email addresses match and are confirmed for: $username\n ); - if ( $central-storeAndMigrate() ) { - $this-migrated++; - return true; - } + $central-storeAndMigrate(); } else { if ( isset( $central-mHomeWiki ) || $this-autoMigrate ) { -
[MediaWiki-commits] [Gerrit] Use processToplevelDoc to process src for /_wikitext/ endpoint - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Use processToplevelDoc to process src for /_wikitext/ endpoint .. Use processToplevelDoc to process src for /_wikitext/ endpoint * Fixes bug with cite ref indexes not being reset. Change-Id: Id169f22bed4c1c8060406ff20607af72a83e7c81 --- M js/api/ParserService.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/js/api/ParserService.js b/js/api/ParserService.js index 9c3010e..64557af 100644 --- a/js/api/ParserService.js +++ b/js/api/ParserService.js @@ -444,7 +444,7 @@ console.log('starting parsing of ' + req.params[0]); // FIXME: This does not handle includes or templates correctly env.setPageSrcInfo( src ); - parser.process( src ); + parser.processToplevelDoc( src ); } catch (e) { res.setHeader('Content-Type', 'text/plain; charset=UTF-8'); console.error( e.stack || e.toString() ); -- To view, visit https://gerrit.wikimedia.org/r/63144 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id169f22bed4c1c8060406ff20607af72a83e7c81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make reference list nodes render contents again - change (mediawiki...VisualEditor)
Trevor Parscal has uploaded a new change for review. https://gerrit.wikimedia.org/r/63146 Change subject: Make reference list nodes render contents again .. Make reference list nodes render contents again Really Roan? How dare you! See I3f5116d7dfbaa5889b7c5cac01d7341272749c58 Change-Id: Ia0ae514fc07752edb7b7100716e09163d3bfacba --- M modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/46/63146/1 diff --git a/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js b/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js index 1001804..0188e7f 100644 --- a/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js +++ b/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js @@ -46,7 +46,7 @@ /* Methods */ ve.ce.MWReferenceListNode.prototype.onUpdate = function () { - this.$.html( this.model.getAttribute( 'html' ) ); + this.$.html( ve.copyArray( this.model.getAttribute( 'domElements' ) || [] ) ); }; /* Registration */ -- To view, visit https://gerrit.wikimedia.org/r/63146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0ae514fc07752edb7b7100716e09163d3bfacba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make reference list nodes render contents again - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Make reference list nodes render contents again .. Make reference list nodes render contents again Really Roan? How dare you! See I3f5116d7dfbaa5889b7c5cac01d7341272749c58 Change-Id: Ia0ae514fc07752edb7b7100716e09163d3bfacba --- M modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js b/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js index 1001804..0188e7f 100644 --- a/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js +++ b/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js @@ -46,7 +46,7 @@ /* Methods */ ve.ce.MWReferenceListNode.prototype.onUpdate = function () { - this.$.html( this.model.getAttribute( 'html' ) ); + this.$.html( ve.copyArray( this.model.getAttribute( 'domElements' ) || [] ) ); }; /* Registration */ -- To view, visit https://gerrit.wikimedia.org/r/63146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0ae514fc07752edb7b7100716e09163d3bfacba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 43593) error for restricted flickr content. - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 43593) error for restricted flickr content. .. (bug 43593) error for restricted flickr content. Restricted content from flickr needs authorization. Since currently there is no way to find out if the content is restricted or invalid we try to display a single error message for both conditions. Todo: Find out a way to know if the flickr set is restricted and authorize users to fetch its content. Change-Id: Id906ae3f205ed4742e2e03cc1faa49171e5d47c9 --- M UploadWizard.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Kaldari: Looks good to me, approved TheDJ: Looks good to me, but someone else must approve Nemo bis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/UploadWizard.i18n.php b/UploadWizard.i18n.php index ff383cc..6d82488 100644 --- a/UploadWizard.i18n.php +++ b/UploadWizard.i18n.php @@ -313,7 +313,7 @@ 'mwe-upwiz-license-external' = 'This file is under the following license on $1: $2.', 'mwe-upwiz-license-external-invalid' = 'This file is under the following license on $1: $2. Unfortunately, this license is not appropriate for use on this site.', 'mwe-upwiz-license-photoset-invalid' = 'Unfortunately, no image in the photoset has a license appropriate to be used on this site.', - 'mwe-upwiz-url-invalid' = 'The URL entered is not a valid $1 image or photoset URL.', + 'mwe-upwiz-url-invalid' = 'The URL entered points to an invalid or restricted $1 image or photoset and cannot be used.', 'mwe-upwiz-categories' = 'Categories', 'mwe-upwiz-categories-add' = 'Add another category', 'mwe-upwiz-category-will-be-added' = 'This category is not in use yet.', -- To view, visit https://gerrit.wikimedia.org/r/53946 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id906ae3f205ed4742e2e03cc1faa49171e5d47c9 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Nischayn22 nischay...@gmail.com Gerrit-Reviewer: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] removing old racktables stuff - change (operations/puppet)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/63147 Change subject: removing old racktables stuff .. removing old racktables stuff Change-Id: I1c974f17dcf67d7330e2d907fc52bc73dc1fe17c --- M manifests/misc/racktables.pp M manifests/site.pp 2 files changed, 2 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/47/63147/1 diff --git a/manifests/misc/racktables.pp b/manifests/misc/racktables.pp index 9b95234..f6cb481 100644 --- a/manifests/misc/racktables.pp +++ b/manifests/misc/racktables.pp @@ -18,41 +18,4 @@ content = template('racktables/racktables.config.erb'); } -} - - -class misc::racktables-old { - # When this class is chosen, ensure that apache, php5-common, php5-mysql are - # installed on the host via another package set. - - system_role { misc::racktables: description = Racktables } - - if $realm == labs { - $racktables_host = $instancename.${domain} - $racktables_ssl_cert = /etc/ssl/certs/star.wmflabs.pem - $racktables_ssl_key = /etc/ssl/private/star.wmflabs.key - } else { - $racktables_host = racktables.wikimedia.org - $racktables_ssl_cert = /etc/ssl/certs/star.wikimedia.org.pem - $racktables_ssl_key = /etc/ssl/private/star.wikimedia.org.key - } - - class {'webserver::php5': ssl = 'true'; } - - include generic::mysql::packages::client, - webserver::php5-gd - - file { - /etc/apache2/sites-available/racktables.wikimedia.org: - mode = 0444, - owner = root, - group = root, - notify = Service[apache2], - content = template('apache/sites/racktables.wikimedia.org.erb'), - ensure = present; - } - - apache_site { racktables: name = racktables.wikimedia.org } - apache_confd { namevirtualhost: install = true, name = namevirtualhost } - apache_module { rewrite: name = rewrite } -} +} \ No newline at end of file diff --git a/manifests/site.pp b/manifests/site.pp index f3ca12d..577d1d7 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1089,8 +1089,7 @@ include standard, admins::roots, svn::client, - misc::etherpad, - misc::racktables-old + misc::etherpad install_certificate{ star.wikimedia.org: } } -- To view, visit https://gerrit.wikimedia.org/r/63147 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c974f17dcf67d7330e2d907fc52bc73dc1fe17c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH r...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove pointless checks that obstruct library usage - change (mediawiki...DataValues)
Daniel Werner has submitted this change and it was merged. Change subject: Remove pointless checks that obstruct library usage .. Remove pointless checks that obstruct library usage Change-Id: I1695b2f64c3aff2688f806c5fc20416fb688bd2f --- M DataTypes/DataTypes.php M DataValues/DataValues.mw.php M DataValues/DataValues.php M ValueFormatters/ValueFormatters.php M ValueParsers/ValueParsers.php M ValueValidators/ValueValidators.php M ValueView/ValueView.php 7 files changed, 0 insertions(+), 55 deletions(-) Approvals: Daniel Werner: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/DataTypes/DataTypes.php b/DataTypes/DataTypes.php index 2ebcd85..fe5fda2 100644 --- a/DataTypes/DataTypes.php +++ b/DataTypes/DataTypes.php @@ -46,14 +46,6 @@ namespace DataTypes; -if ( !defined( 'DATAVALUES' ) !defined( 'MEDIAWIKI' ) ) { - die( 'Not an entry point.' ); -} - -if ( !defined( 'DATAVALUES' ) ) { - define( 'DATAVALUES', true ); -} - define( 'DataTypes_VERSION', '0.1 alpha' ); global $wgDataTypes; diff --git a/DataValues/DataValues.mw.php b/DataValues/DataValues.mw.php index dc461a8..f83caf4 100644 --- a/DataValues/DataValues.mw.php +++ b/DataValues/DataValues.mw.php @@ -27,14 +27,6 @@ * @author Jeroen De Dauw jeroended...@gmail.com */ -if ( !defined( 'MEDIAWIKI' ) ) { - die( 'Not an entry point.' ); -} - -if ( !defined( 'DATAVALUES' ) ) { - define( 'DATAVALUES', true ); -} - global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgAutoloadClasses, $wgHooks, $wgResourceModules; $wgExtensionCredits['datavalues'][] = array( diff --git a/DataValues/DataValues.php b/DataValues/DataValues.php index 9263b00..63279df 100644 --- a/DataValues/DataValues.php +++ b/DataValues/DataValues.php @@ -44,14 +44,6 @@ * @ingroup DataValues */ -if ( !defined( 'DATAVALUES' ) !defined( 'MEDIAWIKI' ) ) { - die( 'Not an entry point.' ); -} - -if ( !defined( 'DATAVALUES' ) ) { - define( 'DATAVALUES', true ); -} - define( 'DataValues_VERSION', '0.1 alpha' ); if ( defined( 'MEDIAWIKI' ) ) { diff --git a/ValueFormatters/ValueFormatters.php b/ValueFormatters/ValueFormatters.php index 5eb394f..9393962 100644 --- a/ValueFormatters/ValueFormatters.php +++ b/ValueFormatters/ValueFormatters.php @@ -45,14 +45,6 @@ * @ingroup Test */ -if ( !defined( 'DATAVALUES' ) !defined( 'MEDIAWIKI' ) ) { - die( 'Not an entry point.' ); -} - -if ( !defined( 'DATAVALUES' ) ) { - define( 'DATAVALUES', true ); -} - define( 'ValueFormatters_VERSION', '0.1 alpha' ); global $wgValueFormatters; diff --git a/ValueParsers/ValueParsers.php b/ValueParsers/ValueParsers.php index ba2ce21..689ebb0 100644 --- a/ValueParsers/ValueParsers.php +++ b/ValueParsers/ValueParsers.php @@ -45,14 +45,6 @@ * @ingroup Test */ -if ( !defined( 'DATAVALUES' ) !defined( 'MEDIAWIKI' ) ) { - die( 'Not an entry point.' ); -} - -if ( !defined( 'DATAVALUES' ) ) { - define( 'DATAVALUES', true ); -} - define( 'ValueParsers_VERSION', '0.1 alpha' ); global $wgValueParsers; diff --git a/ValueValidators/ValueValidators.php b/ValueValidators/ValueValidators.php index e726238..3ead83c 100644 --- a/ValueValidators/ValueValidators.php +++ b/ValueValidators/ValueValidators.php @@ -45,14 +45,6 @@ * @ingroup Test */ -if ( !defined( 'DATAVALUES' ) !defined( 'MEDIAWIKI' ) ) { - die( 'Not an entry point.' ); -} - -if ( !defined( 'DATAVALUES' ) ) { - define( 'DATAVALUES', true ); -} - define( 'ValueValidators_VERSION', '0.1 alpha' ); global $wgValueValidators; diff --git a/ValueView/ValueView.php b/ValueView/ValueView.php index e2ada22..04f04ff 100644 --- a/ValueView/ValueView.php +++ b/ValueView/ValueView.php @@ -31,13 +31,6 @@ * @author Daniel Werner daniel.wer...@wikimedia.de */ -if ( !defined( 'DATAVALUES' ) !defined( 'MEDIAWIKI' ) ) { - die( 'Not an entry point.' ); -} - -if ( !defined( 'DATAVALUES' ) ) { - define( 'DATAVALUES', true ); -} define( 'ValueView_VERSION', '0.1 alpha' ); -- To view, visit https://gerrit.wikimedia.org/r/62584 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1695b2f64c3aff2688f806c5fc20416fb688bd2f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Anja Jentzsch a...@anjeve.de Gerrit-Reviewer: Ataherivand abraham.taheriv...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: John Erling Blad
[MediaWiki-commits] [Gerrit] Bug 47586: Remove DeviceDetection js - change (mediawiki...MobileFrontend)
awjrichards has submitted this change and it was merged. Change subject: Bug 47586: Remove DeviceDetection js .. Bug 47586: Remove DeviceDetection js Move it to CentralNotice instead See https://gerrit.wikimedia.org/r/61988 Change-Id: If219c84d4755697ab849cfc083fa9234382f30f6 --- M MobileFrontend.php M includes/modules/MobileDeviceDetectModule.php M includes/skins/SkinMobile.php 3 files changed, 5 insertions(+), 21 deletions(-) Approvals: awjrichards: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/MobileFrontend.php b/MobileFrontend.php index fe988cd..4a6f9bc 100644 --- a/MobileFrontend.php +++ b/MobileFrontend.php @@ -51,8 +51,6 @@ 'MFResourceLoaderModule' = 'modules/MFResourceLoaderModule', 'MobileSiteModule' = 'modules/MobileSiteModule', 'MobileDeviceDetectModule' = 'modules/MobileDeviceDetectModule', - 'MobileDeviceDetectScriptsModule' = 'modules/MobileDeviceDetectModule', - 'MobileDeviceDetectStylesModule' = 'modules/MobileDeviceDetectModule', 'SpecialUploads' = 'specials/SpecialUploads', 'SpecialMobileDiff' = 'specials/SpecialMobileDiff', @@ -700,12 +698,8 @@ ); //@hack: xdevice instead of device to force this module to be last in a link -$wgResourceModules['mobile.xdevice.detect.styles'] = $wgMFMobileResourceBoilerplate + array( - 'class' = 'MobileDeviceDetectStylesModule', -); - -$wgResourceModules['mobile.xdevice.detect.scripts'] = $wgMFMobileResourceBoilerplate + array( - 'class' = 'MobileDeviceDetectScriptsModule', +$wgResourceModules['mobile.xdevice.detect'] = $wgResourceModules['mobile.xdevice.detect.styles'] = $wgMFMobileResourceBoilerplate + array( + 'class' = 'MobileDeviceDetectModule', ); /** diff --git a/includes/modules/MobileDeviceDetectModule.php b/includes/modules/MobileDeviceDetectModule.php index 0fc797e..6aaf06e 100644 --- a/includes/modules/MobileDeviceDetectModule.php +++ b/includes/modules/MobileDeviceDetectModule.php @@ -1,8 +1,8 @@ ?php /** - * Provides device-specific CSS and device type information. - * Only available when $wgMFVaryResources = true + * Provides device-specific CSS + * Only added to output when $wgMFVaryResources = true */ class MobileDeviceDetectModule extends ResourceLoaderFileModule { protected $xDevice = null; @@ -20,16 +20,7 @@ } } } -} -class MobileDeviceDetectScriptsModule extends MobileDeviceDetectModule { - public function getScript( ResourceLoaderContext $context ) { - $this-init( $context ); - return Xml::encodeJsCall( 'mw.config.set', array( 'wgMobileDeviceName', $this-xDevice ) ); - } -} - -class MobileDeviceDetectStylesModule extends MobileDeviceDetectModule { public function getStyles( ResourceLoaderContext $context ) { $this-init( $context ); diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php index ac29479..f863385 100644 --- a/includes/skins/SkinMobile.php +++ b/includes/skins/SkinMobile.php @@ -228,8 +228,7 @@ // add device specific css file - add separately to avoid cache fragmentation if ( $wgMFVaryResources ) { - $out-addModuleStyles( 'mobile.xdevice.detect.styles' ); - $out-addModules( 'mobile.xdevice.detect.scripts' ); + $out-addModuleStyles( 'mobile.xdevice.detect' ); } elseif ( $device-moduleName() ) { $out-addModuleStyles( $device-moduleName() ); } -- To view, visit https://gerrit.wikimedia.org/r/61989 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If219c84d4755697ab849cfc083fa9234382f30f6 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: JGonera jgon...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: awjrichards aricha...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] TemplateDataBlob: Improve error handling - change (mediawiki...TemplateData)
jenkins-bot has submitted this change and it was merged. Change subject: TemplateDataBlob: Improve error handling .. TemplateDataBlob: Improve error handling For invalid keys, pass property path, not just the latest child. Changes error: - Invalid value for typo + Invalid value for params.date.typo Also cleaned up the concatenation logic for the others to be more readable (PHP dots vs. string dots): - 'params.' . $paramName . '.key' + params.{$paramName}.key Change-Id: I666e0b22f4b7bacc5b89b0761c74138732f94d73 --- M TemplateDataBlob.php 1 file changed, 9 insertions(+), 9 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index b8d8d0a..9bd9114 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -110,12 +110,12 @@ foreach ( $data-params as $paramName = $paramObj ) { if ( !is_object( $paramObj ) ) { - return Status::newFatal( 'templatedata-invalid-type', 'params.' . $paramName, 'object' ); + return Status::newFatal( 'templatedata-invalid-type', params.{$paramName}, 'object' ); } foreach ( $paramObj as $key = $value ) { if ( !in_array( $key, $paramKeys ) ) { - return Status::newFatal( 'templatedata-invalid-unknown', $key ); + return Status::newFatal( 'templatedata-invalid-unknown', params.{$paramName}.{$key} ); } } @@ -124,7 +124,7 @@ if ( !is_object( $paramObj-label ) !is_string( $paramObj-label ) ) { // TODO: Also validate that if it is an object, the keys are valid lang codes // and the values strings. - return Status::newFatal( 'templatedata-invalid-type', 'params.' . $paramName . '.label', 'string|object' ); + return Status::newFatal( 'templatedata-invalid-type', params.{$paramName}.label, 'string|object' ); } $paramObj-label = self::normaliseInterfaceText( $paramObj-label ); } else { @@ -134,7 +134,7 @@ // Param.required if ( isset( $paramObj-required ) ) { if ( !is_bool( $paramObj-required ) ) { - return Status::newFatal( 'templatedata-invalid-type', 'params.' . $paramName . '.required', 'boolean' ); + return Status::newFatal( 'templatedata-invalid-type', params.{$paramName}.required, 'boolean' ); } } else { $paramObj-required = false; @@ -145,7 +145,7 @@ if ( !is_object( $paramObj-description ) !is_string( $paramObj-description ) ) { // TODO: Also validate that if it is an object, the keys are valid lang codes // and the values strings. - return Status::newFatal( 'templatedata-invalid-type', 'params.' . $paramName . '.description', 'string|object' ); + return Status::newFatal( 'templatedata-invalid-type', params.{$paramName}.description, 'string|object' ); } $paramObj-description = self::normaliseInterfaceText( $paramObj-description ); } else { @@ -155,7 +155,7 @@ // Param.deprecated if ( isset( $paramObj-deprecated ) ) { if ( $paramObj-deprecated !== false !is_string( $paramObj-deprecated ) ) { - return Status::newFatal( 'templatedata-invalid-type', 'params.' . $paramName . '.deprecated', 'boolean|string' ); + return Status::newFatal( 'templatedata-invalid-type', params.{$paramName}.deprecated, 'boolean|string' ); } } else { $paramObj-deprecated = false; @@ -165,7 +165,7 @@ if ( isset( $paramObj-aliases ) ) { if ( !is_array( $paramObj-aliases ) ) { // TODO: Validate the array values. - return Status::newFatal( 'templatedata-invalid-type', 'params.' . $paramName . '.aliases', 'array' ); +
[MediaWiki-commits] [Gerrit] TemplateDataBlob: Implement 'type' and 'label' - change (mediawiki...TemplateData)
jenkins-bot has submitted this change and it was merged. Change subject: TemplateDataBlob: Implement 'type' and 'label' .. TemplateDataBlob: Implement 'type' and 'label' InterfaceText now defaults to null instead of {en:} which was awkward to deal with in the frontend. As specified: - label is InterfaceText - type is a string and must be a one of the recognized types Updated example for the hypothetical variant of Template:Unsigned and removed other no longer needed example. HTML output has been revised per conversation with Trevor, James and Timo: - Not sortable. - Add label to html output. - Aliases in the main parameter column (one per line), but muted in styling. - Add type to html output. The css module styles content from the server, not content generated by javascript. Moved module to position = top to fix flash of unstyled content. Change-Id: I16d3f9e460c5513935b9b55fe4cec0092b38e6c2 --- M TemplateData.i18n.php M TemplateData.php M TemplateDataBlob.php M resources/ext.templateData.css M spec.templatedata.json M tests/TemplateDataBlobTest.php 6 files changed, 156 insertions(+), 133 deletions(-) Approvals: Trevor Parscal: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/TemplateData.i18n.php b/TemplateData.i18n.php index 0cbe963..b3c225c 100644 --- a/TemplateData.i18n.php +++ b/TemplateData.i18n.php @@ -11,8 +11,9 @@ // Page output for templatedata 'templatedata-doc-params' = 'Template parameters', - 'templatedata-doc-param-name' = 'Name', + 'templatedata-doc-param-name' = 'Parameter', 'templatedata-doc-param-desc' = 'Description', + 'templatedata-doc-param-type' = 'Type', 'templatedata-doc-param-default' = 'Default', 'templatedata-doc-param-status' = 'Status', diff --git a/TemplateData.php b/TemplateData.php index d90eb93..159729f 100644 --- a/TemplateData.php +++ b/TemplateData.php @@ -44,6 +44,7 @@ // Register modules $wgResourceModules['ext.templateData'] = array( 'styles' = 'resources/ext.templateData.css', + 'position' = 'top', 'localBasePath' = $dir, 'remoteExtPath' = 'TemplateData', ); diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index 0f7b54b..b8d8d0a 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -53,14 +53,21 @@ 'description', ); static $paramKeys = array( - // 'label', + 'label', 'required', 'description', 'deprecated', 'aliases', 'default', 'inherits', - // 'type', + 'type', + ); + static $types = array( + 'unknown', + 'string', + 'number', + 'string/wiki-page-name', + 'string/wiki-user-name', ); if ( $data === null ) { @@ -84,7 +91,7 @@ } $data-description = self::normaliseInterfaceText( $data-description ); } else { - $data-description = self::normaliseInterfaceText( '' ); + $data-description = null; } // Root.params @@ -112,7 +119,17 @@ } } - // TODO: Param.label + // Param.label + if ( isset( $paramObj-label ) ) { + if ( !is_object( $paramObj-label ) !is_string( $paramObj-label ) ) { + // TODO: Also validate that if it is an object, the keys are valid lang codes + // and the values strings. + return Status::newFatal( 'templatedata-invalid-type', 'params.' . $paramName . '.label', 'string|object' ); + } + $paramObj-label = self::normaliseInterfaceText( $paramObj-label ); + } else { + $paramObj-label = null; + } // Param.required if ( isset( $paramObj-required ) ) { @@ -132,7 +149,7 @@ } $paramObj-description = self::normaliseInterfaceText( $paramObj-description ); } else { - $paramObj-description = self::normaliseInterfaceText( '' ); + $paramObj-description = null; } // Param.deprecated @@ -163,7 +180,17 @@
[MediaWiki-commits] [Gerrit] removing old racktables stuff - change (operations/puppet)
RobH has submitted this change and it was merged. Change subject: removing old racktables stuff .. removing old racktables stuff Change-Id: I1c974f17dcf67d7330e2d907fc52bc73dc1fe17c --- M manifests/misc/racktables.pp M manifests/site.pp 2 files changed, 2 insertions(+), 40 deletions(-) Approvals: RobH: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/racktables.pp b/manifests/misc/racktables.pp index 9b95234..f6cb481 100644 --- a/manifests/misc/racktables.pp +++ b/manifests/misc/racktables.pp @@ -18,41 +18,4 @@ content = template('racktables/racktables.config.erb'); } -} - - -class misc::racktables-old { - # When this class is chosen, ensure that apache, php5-common, php5-mysql are - # installed on the host via another package set. - - system_role { misc::racktables: description = Racktables } - - if $realm == labs { - $racktables_host = $instancename.${domain} - $racktables_ssl_cert = /etc/ssl/certs/star.wmflabs.pem - $racktables_ssl_key = /etc/ssl/private/star.wmflabs.key - } else { - $racktables_host = racktables.wikimedia.org - $racktables_ssl_cert = /etc/ssl/certs/star.wikimedia.org.pem - $racktables_ssl_key = /etc/ssl/private/star.wikimedia.org.key - } - - class {'webserver::php5': ssl = 'true'; } - - include generic::mysql::packages::client, - webserver::php5-gd - - file { - /etc/apache2/sites-available/racktables.wikimedia.org: - mode = 0444, - owner = root, - group = root, - notify = Service[apache2], - content = template('apache/sites/racktables.wikimedia.org.erb'), - ensure = present; - } - - apache_site { racktables: name = racktables.wikimedia.org } - apache_confd { namevirtualhost: install = true, name = namevirtualhost } - apache_module { rewrite: name = rewrite } -} +} \ No newline at end of file diff --git a/manifests/site.pp b/manifests/site.pp index f3ca12d..577d1d7 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1089,8 +1089,7 @@ include standard, admins::roots, svn::client, - misc::etherpad, - misc::racktables-old + misc::etherpad install_certificate{ star.wikimedia.org: } } -- To view, visit https://gerrit.wikimedia.org/r/63147 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c974f17dcf67d7330e2d907fc52bc73dc1fe17c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH r...@wikimedia.org Gerrit-Reviewer: RobH r...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use pageLanguage rather than pageViewLanguage for the surfac... - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/63148 Change subject: Use pageLanguage rather than pageViewLanguage for the surface's langdir .. Use pageLanguage rather than pageViewLanguage for the surface's langdir Bug: 33175 Change-Id: Ica006404227dcd286c387de4f637036341b17eae --- M VisualEditor.hooks.php M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/48/63148/1 diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index fe331da..6ecbcd0 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -58,6 +58,8 @@ public static function onMakeGlobalVariablesScript( array $vars, OutputPage $out ) { $vars['wgVisualEditor'] = array( 'isPageWatched' = $out-getUser()-isWatched( $out-getTitle() ), + 'pageLanguageCode' = $out-getTitle()-getPageLanguage()-getHtmlCode(), + 'pageLanguageDir' = $out-getTitle()-getPageLanguage()-getDir() ); return true; diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index 0b34656..d642c08 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -706,8 +706,6 @@ * @param {HTMLDocument} doc HTML DOM to edit */ ve.init.mw.ViewPageTarget.prototype.setUpSurface = function ( doc ) { - var $contentText = $( '#mw-content-text' ); - // Initialize surface this.surface = new ve.Surface( this, doc, this.surfaceOptions ); this.surface.getContext().hide(); @@ -722,8 +720,8 @@ this.hideSpinner(); this.active = true; this.$document.attr( { - 'lang': $contentText.attr( 'lang' ), - 'dir': $contentText.attr( 'dir' ) + 'lang': mw.config.get( 'wgVisualEditor' ).pageLanguageCode, + 'dir': mw.config.get( 'wgVisualEditor' ).pageLanguageDir } ); }; -- To view, visit https://gerrit.wikimedia.org/r/63148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica006404227dcd286c387de4f637036341b17eae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use pageLanguage rather than pageViewLanguage for the surfac... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Use pageLanguage rather than pageViewLanguage for the surface's langdir .. Use pageLanguage rather than pageViewLanguage for the surface's langdir Bug: 33175 Change-Id: Ica006404227dcd286c387de4f637036341b17eae --- M VisualEditor.hooks.php M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Trevor Parscal: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index fe331da..6ecbcd0 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -58,6 +58,8 @@ public static function onMakeGlobalVariablesScript( array $vars, OutputPage $out ) { $vars['wgVisualEditor'] = array( 'isPageWatched' = $out-getUser()-isWatched( $out-getTitle() ), + 'pageLanguageCode' = $out-getTitle()-getPageLanguage()-getHtmlCode(), + 'pageLanguageDir' = $out-getTitle()-getPageLanguage()-getDir() ); return true; diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index 0b34656..d642c08 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -706,8 +706,6 @@ * @param {HTMLDocument} doc HTML DOM to edit */ ve.init.mw.ViewPageTarget.prototype.setUpSurface = function ( doc ) { - var $contentText = $( '#mw-content-text' ); - // Initialize surface this.surface = new ve.Surface( this, doc, this.surfaceOptions ); this.surface.getContext().hide(); @@ -722,8 +720,8 @@ this.hideSpinner(); this.active = true; this.$document.attr( { - 'lang': $contentText.attr( 'lang' ), - 'dir': $contentText.attr( 'dir' ) + 'lang': mw.config.get( 'wgVisualEditor' ).pageLanguageCode, + 'dir': mw.config.get( 'wgVisualEditor' ).pageLanguageDir } ); }; -- To view, visit https://gerrit.wikimedia.org/r/63148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica006404227dcd286c387de4f637036341b17eae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Liangent liang...@gmail.com Gerrit-Reviewer: Trevor Parscal tpars...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add refresh button to nearby - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/63149 Change subject: Add refresh button to nearby .. Add refresh button to nearby In alpha animate it when clicked Note asset will change but for time being using http://thenounproject.com/noun/refresh/#icon-No4985 Change-Id: I36758885d91e0afc08ff80f46c423545e4c35e28 --- M javascripts/common/mf-navigation.js M javascripts/specials/nearby.js M less/mf-mixins.less M less/specials/nearby.less A stylesheets/specials/images/refresh.png M stylesheets/specials/nearby.css 6 files changed, 114 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/49/63149/1 diff --git a/javascripts/common/mf-navigation.js b/javascripts/common/mf-navigation.js index 85fa4cc..9541c3f 100644 --- a/javascripts/common/mf-navigation.js +++ b/javascripts/common/mf-navigation.js @@ -101,7 +101,7 @@ } ); function getPageMenu() { - return $( '#mw-mf-menu-page' )[ 0 ]; + return $( '#mw-mf-menu-page' ); } function enableEditing( title ) { diff --git a/javascripts/specials/nearby.js b/javascripts/specials/nearby.js index f54ae2f..06c4dd1 100644 --- a/javascripts/specials/nearby.js +++ b/javascripts/specials/nearby.js @@ -1,6 +1,5 @@ ( function( M, $ ) { var CACHE_KEY_RESULTS = 'mfNearbyLastSearchResult', - PRECISION = 2, CACHE_KEY_LAST_LOCATION = 'mfNearbyLastKnownLocation'; ( function() { @@ -8,7 +7,6 @@ popup = M.require( 'notifications' ), View = M.require( 'view' ), endpoint = mw.config.get( 'wgMFNearbyEndpoint' ), - cachedPages, curLocation, lastKnownLocation = M.settings.getUserSetting( CACHE_KEY_LAST_LOCATION ), cache = M.settings.saveUserSetting, @@ -19,6 +17,7 @@ this.emit( 'done', this ); } } ), + pendingQuery = false, overlay = new Nearby( { el: $( '#mw-mf-nearby' ) } ); @@ -130,20 +129,9 @@ } ).done( function( data ) { var pages = $.map( data.query.pages, function( i ) { return i; - } ), $popup; + } ); if ( pages.length 0 ) { - if ( !cachedPages ) { - render( $content, pages ); - } else { - $popup = popup.show( - mw.message( 'mobile-frontend-nearby-refresh' ).plain(), 'toast locked' ); - $popup.click( function() { - render( $content, pages ); - popup.close( true ); - } ); - } - - cachedPages = pages; + render( $content, pages ); } else { $content.empty(); $( 'div class=empty content' ). @@ -155,27 +143,39 @@ } ); } + function cancelRefresh() { + $( 'button.refresh' ).removeClass( 'refreshing' ); + pendingQuery = false; + } + function init() { var $content = $( '#mw-mf-nearby' ).empty(); $( 'div class=content loading ').text( mw.message( 'mobile-frontend-nearby-loading' ) ).appendTo( $content ); - navigator.geolocation.watchPosition( function( geo ) { + navigator.geolocation.getCurrentPosition( function( geo ) { var lat = geo.coords.latitude, lng = geo.coords.longitude; - if ( curLocation lat.toFixed( PRECISION ) === curLocation.latitude.toFixed( PRECISION ) - lng.toFixed( PRECISION ) === curLocation.longitude.toFixed( PRECISION ) ) { // bug 47898 - return; - } else { - curLocation = { latitude: lat, longitude: lng }; // save as json so it can be cached bug 48268 - cache( CACHE_KEY_LAST_LOCATION, $.toJSON( curLocation ) ); - findResults( lat, lng ); - } + curLocation = { latitude: lat, longitude: lng }; // save as json so it can be cached bug 48268 + cache( CACHE_KEY_LAST_LOCATION, $.toJSON( curLocation ) ); + findResults( lat, lng ); +
[MediaWiki-commits] [Gerrit] Add value to add() call when locking - change (mediawiki/core)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/63150 Change subject: Add value to add() call when locking .. Add value to add() call when locking When BagOStuff::lock() was called, it called $this-add() with only two parameters, the key and the timeout. But BagOStuff::add() takes three parameters (key, value, timeout), so all locks got an infinite timeout. Change-Id: I82bed11b0b799f2cda13a8a0bd0cd94908b6ce8e --- M includes/objectcache/BagOStuff.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/50/63150/1 diff --git a/includes/objectcache/BagOStuff.php b/includes/objectcache/BagOStuff.php index 58ddd6a..e992f81 100644 --- a/includes/objectcache/BagOStuff.php +++ b/includes/objectcache/BagOStuff.php @@ -170,7 +170,7 @@ */ public function lock( $key, $timeout = 60 ) { $timestamp = microtime( true ); // starting UNIX timestamp - if ( $this-add( {$key}:lock, $timeout ) ) { + if ( $this-add( {$key}:lock, 'lock', $timeout ) ) { return true; } @@ -186,7 +186,7 @@ $sleep *= 2; } usleep( $sleep ); // back off - $locked = $this-add( {$key}:lock, $timeout ); + $locked = $this-add( {$key}:lock, 'lock', $timeout ); } while ( !$locked ); return $locked; -- To view, visit https://gerrit.wikimedia.org/r/63150 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82bed11b0b799f2cda13a8a0bd0cd94908b6ce8e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: CSteipp cste...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Got rid of autoload registration since we can auto resolve t... - change (mediawiki...Ask)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/63151 Change subject: Got rid of autoload registration since we can auto resolve the paths .. Got rid of autoload registration since we can auto resolve the paths Change-Id: Idd79e11fe1ab66ed62577504a62a6f30b7eed89f --- D Ask.classes.php M Ask.mw.php M Ask.php D Ask.standalone.php D Tests/AskTestClasses.php M Tests/bootstrap.php A Tests/testLoader.php 7 files changed, 68 insertions(+), 154 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask refs/changes/51/63151/1 diff --git a/Ask.classes.php b/Ask.classes.php deleted file mode 100644 index f3925a8..000 --- a/Ask.classes.php +++ /dev/null @@ -1,57 +0,0 @@ -?php - -/** - * Class registration file for the Ask library. - * - * @since 0.1 - * - * @file - * @ingroup Ask - * - * @licence GNU GPL v2+ - * @author Jeroen De Dauw jeroended...@gmail.com - */ -return call_user_func( function() { - - // PSR-0 compliant :) - - $classes = array( - 'Ask\Arrayable', - 'Ask\ArrayValueProvider', - 'Ask\Comparable', - 'Ask\Hashable', - 'Ask\Immutable', - 'Ask\Typeable', - - 'Ask\Language\Description\AnyValue', - 'Ask\Language\Description\Conjunction', - 'Ask\Language\Description\Description', - 'Ask\Language\Description\DescriptionCollection', - 'Ask\Language\Description\Disjunction', - 'Ask\Language\Description\SomeProperty', - 'Ask\Language\Description\ValueDescription', - - 'Ask\Language\Option\PropertyValueSortExpression', - 'Ask\Language\Option\QueryOptions', - 'Ask\Language\Option\SortExpression', - 'Ask\Language\Option\SortOptions', - - - 'Ask\Language\Selection\PropertySelection', - 'Ask\Language\Selection\SelectionRequest', - 'Ask\Language\Selection\SubjectSelection', - - 'Ask\Language\Query' - ); - - $paths = array(); - - foreach ( $classes as $class ) { - $path = 'includes/' . str_replace( '\\', '/', $class ) . '.php'; - - $paths[$class] = $path; - } - - return $paths; - -} ); diff --git a/Ask.mw.php b/Ask.mw.php index 90ce676..f1093d7 100644 --- a/Ask.mw.php +++ b/Ask.mw.php @@ -28,6 +28,8 @@ * @author Jeroen De Dauw jeroended...@gmail.com */ +// @codeCoverageIgnoreStart + if ( !defined( 'MEDIAWIKI' ) ) { die( 'Not an entry point.' ); } @@ -38,15 +40,8 @@ $wgExtensionMessagesFiles['AskExtension'] = __DIR__ . '/Ask.i18n.php'; -// Autoloading -foreach ( include( __DIR__ . '/Ask.classes.php' ) as $class = $file ) { - $wgAutoloadClasses[$class] = __DIR__ . '/' . $file; -} - if ( defined( 'MW_PHPUNIT_TEST' ) ) { - foreach ( include( __DIR__ . '/Tests/AskTestClasses.php' ) as $class = $file ) { - $wgAutoloadClasses[$class] = __DIR__ . '/../' . $file; - } + require_once __DIR__ . '/Tests/testLoader.php'; } /** @@ -62,7 +57,7 @@ * @return boolean */ $wgHooks['UnitTestsList'][]= function( array $files ) { - // @codeCoverageIgnoreStart + $testFiles = array( 'Language/Description/AnyValue', 'Language/Description/Conjunction', @@ -85,5 +80,6 @@ } return true; - // @codeCoverageIgnoreEnd }; + +// @codeCoverageIgnoreEnd diff --git a/Ask.php b/Ask.php index 4b70526..00b7561 100644 --- a/Ask.php +++ b/Ask.php @@ -41,8 +41,31 @@ define( 'Ask_VERSION', '0.1 alpha' ); // @codeCoverageIgnoreStart -call_user_func( function() { - $extension = defined( 'MEDIAWIKI' ) ? 'mw' : 'standalone'; - require_once __DIR__ . '/Ask.' . $extension . '.php'; +spl_autoload_register( function ( $className ) { + $className = ltrim( $className, '\\' ); + $fileName = ''; + $namespace = ''; + + if ( $lastNsPos = strripos( $className, '\\') ) { + $namespace = substr( $className, 0, $lastNsPos ); + $className = substr( $className, $lastNsPos + 1 ); + $fileName = str_replace( '\\', '/', $namespace ) . '/'; + } + + $fileName .= str_replace( '_', '/', $className ) . '.php'; + + $namespaceSegments = explode( '\\', $namespace ); + + if ( $namespaceSegments[0] === 'Ask' ) { + if ( count( $namespaceSegments ) === 1 || $namespaceSegments[1] !== 'Tests' ) { + require_once __DIR__ . '/includes/' . $fileName; + } + } } ); -// @codeCoverageIgnoreEnd + +call_user_func( function() { + if ( defined( 'MEDIAWIKI' ) ) { + require_once __DIR__ . '/Ask.mw.php'; + } +} ); +// @codeCoverageIgnoreEnd \ No newline at end of file diff --git
[MediaWiki-commits] [Gerrit] Clean up variable initialization in setupSkinTabs() - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/63152 Change subject: Clean up variable initialization in setupSkinTabs() .. Clean up variable initialization in setupSkinTabs() Change-Id: Ic596f1c98162557f33f5ca398d2358e91a3d5cb0 --- M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 1 file changed, 7 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/52/63152/1 diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index 0b34656..c1b483f 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -759,20 +759,19 @@ * @method */ ve.init.mw.ViewPageTarget.prototype.setupSkinTabs = function () { - var action, pTabsId, $caSource, $caEdit, $caEditLink, caVeEdit, caVeEditSource, caVeEditNextnode, uriClone; - $caEdit = $( '#ca-edit' ); - $caEditLink = $caEdit.find( 'a' ); - $caSource = $( '#ca-viewsource' ); - caVeEditNextnode = $caEdit.next().get( 0 ); + var caVeEdit, caVeEditSource, urlClone, + action = this.pageExists ? 'edit' : 'create', + pTabsId = $( '#p-views' ).length ? 'p-views' : 'p-cactions', + $caSource = $( '#ca-viewsource' ), + $caEdit = $( '#ca-edit' ), + $caEditLink = $caEdit.find( 'a' ), + caVeEditNextnode = $caEdit.next().get( 0 ); if ( !$caEdit.length || $caSource.length ) { // If there is no edit tab or a view-source tab, // the user doesn't have permission to edit. return; } - - action = this.pageExists ? 'edit' : 'create'; - pTabsId = $( '#p-views' ).length ? 'p-views' : 'p-cactions'; // Add independent VisualEditor tab (#ca-ve-edit). if ( this.tabLayout === 'add' ) { -- To view, visit https://gerrit.wikimedia.org/r/63152 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic596f1c98162557f33f5ca398d2358e91a3d5cb0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Edit and Edit source tab were reversed in RTL in the Vector ... - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/63153 Change subject: Edit and Edit source tab were reversed in RTL in the Vector integration .. Edit and Edit source tab were reversed in RTL in the Vector integration If we're in RTL mode and the skin is Vector-based, we need to reverse the order of the tabs in the DOM, because that's a weird thing that Vector does to render tabs in RTL. See https://bugzilla.wikimedia.org/show_bug.cgi?id=46947 for discussion about the Vector behavior. Bug: 48017 Change-Id: Ie1214b08450aefed893739a2b862cb1e9b23a2ef --- M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/53/63153/1 diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index c1b483f..b85047c 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -765,7 +765,8 @@ $caSource = $( '#ca-viewsource' ), $caEdit = $( '#ca-edit' ), $caEditLink = $caEdit.find( 'a' ), - caVeEditNextnode = $caEdit.next().get( 0 ); + reverseTabOrder = $( 'body' ).hasClass( 'rtl' ) pTabsId === 'p-views', + caVeEditNextnode = reverseTabOrder ? $caEdit.get( 0 ) : $caEdit.next().get( 0 ); if ( !$caEdit.length || $caSource.length ) { // If there is no edit tab or a view-source tab, @@ -823,7 +824,7 @@ $caEdit.attr( 'id' ), $caEditLink.attr( 'title' ), $caEditLink.attr( 'accesskey' ), - caVeEditSource + reverseTabOrder ? caVeEditSource.nextSibling : caVeEditSource ); } -- To view, visit https://gerrit.wikimedia.org/r/63153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie1214b08450aefed893739a2b862cb1e9b23a2ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding a global Context Class - change (wikimedia...PaymentsListeners)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/63154 Change subject: Adding a global Context Class .. Adding a global Context Class This allows us to track things with yet another ID :) Change-Id: I5a10496b35ba1f10b9d3a8fd91e8f678436aa350 --- A SmashPig/Core/Context.php M SmashPig/Core/Http/RequestHandler.php M SmashPig/Core/Listeners/RestListener.php M SmashPig/Core/Listeners/SoapListener.php M SmashPig/Maintenance/MaintenanceBase.php M SmashPig/config_defaults.php 6 files changed, 67 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners refs/changes/54/63154/1 diff --git a/SmashPig/Core/Context.php b/SmashPig/Core/Context.php new file mode 100644 index 000..c525271 --- /dev/null +++ b/SmashPig/Core/Context.php @@ -0,0 +1,61 @@ +?php +namespace SmashPig\Core; + +/** + * Global context object -- useful for managing global variables when + * we don't actually want globals or dedicated static classes. + * + * @package SmashPig\Core + */ +class Context { + protected static $instance; + + public static function init() { + if ( !Context::$instance ) { + Context::$instance = new Context(); + } + } + + /** +* Obtains the current context object +* @return Context +*/ + public static function get() { + if ( Context::$instance === null ) { + Context::init(); + } + return Context::$instance; + } + + /** +* Sets the current context, returning the displaced context +* @param Context $c +* @return Context +*/ + public static function set( Context $c = null ) { + $old = Context::$instance; + Context::$instance = ( $c === null ) ? new Context() : $c; + + return $old; + } + + protected $contextId; + + public function __construct( $cid = null ) { + if ( !$cid ) { + $this-contextId = sprintf( 'SPCID-%010d', mt_rand( 1, pow( 2, 31 ) - 1 ) ); + } else { + $this-contextId = $cid; + } + } + + /** +* Gets the global context identifier - this is used for logging, filenames, +* or other identifiers specific to the current job. +* +* @return string Format of SPCID-[1-9][0-9]{8} +*/ + public function getContextId() { + return $this-contextId; + } +} \ No newline at end of file diff --git a/SmashPig/Core/Http/RequestHandler.php b/SmashPig/Core/Http/RequestHandler.php index 0940976..ee2fa7a 100644 --- a/SmashPig/Core/Http/RequestHandler.php +++ b/SmashPig/Core/Http/RequestHandler.php @@ -1,6 +1,7 @@ ?php namespace SmashPig\Core\Http; use SmashPig\Core\Configuration; +use SmashPig\Core\Context; use SmashPig\Core\Logging\Logger; use SmashPig\Core\AutoLoader; @@ -53,6 +54,8 @@ true ); Logger::init( $config-val( 'logging/root-context' ), $config-val( 'logging/log-level' ), $config ); + Context::init(); + Logger::enterContext( Context::get()-getContextId() ); set_error_handler( '\SmashPig\Core\Http\RequestHandler::lastChanceErrorHandler' ); set_exception_handler( '\SmashPig\Core\Http\RequestHandler::lastChanceExceptionHandler' ); diff --git a/SmashPig/Core/Listeners/RestListener.php b/SmashPig/Core/Listeners/RestListener.php index c0f224a..a5473ea 100644 --- a/SmashPig/Core/Listeners/RestListener.php +++ b/SmashPig/Core/Listeners/RestListener.php @@ -7,7 +7,6 @@ abstract class RestListener extends ListenerBase { public function execute( Request $request, Response $response, $pathParts ) { - Logger::enterContext( 'sess' . mt_rand( 1, 9 ) ); Logger::info( Starting processing of listener request from {$_SERVER[ 'REMOTE_ADDR' ]} ); try { diff --git a/SmashPig/Core/Listeners/SoapListener.php b/SmashPig/Core/Listeners/SoapListener.php index 9278780..35b1f68 100644 --- a/SmashPig/Core/Listeners/SoapListener.php +++ b/SmashPig/Core/Listeners/SoapListener.php @@ -28,7 +28,6 @@ } public function execute( Request $request, Response $response, $pathParts ) { - Logger::enterContext( 'sess' . mt_rand( 1, 9 ) ); Logger::info( Starting processing of listener request from {$_SERVER[ 'REMOTE_ADDR' ]} ); try { diff --git a/SmashPig/Maintenance/MaintenanceBase.php b/SmashPig/Maintenance/MaintenanceBase.php index 62ee997..0c89b18 100644 --- a/SmashPig/Maintenance/MaintenanceBase.php +++ b/SmashPig/Maintenance/MaintenanceBase.php @@ -9,6 +9,7 @@ use
[MediaWiki-commits] [Gerrit] Zero config regular font size - change (mediawiki...ZeroRatedMobileAccess)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/63155 Change subject: Zero config regular font size .. Zero config regular font size Change-Id: I3e738d6f2eaa4dc380d6a2570008258ed8ef8d15 --- M modules/zero.config.css 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroRatedMobileAccess refs/changes/55/63155/1 diff --git a/modules/zero.config.css b/modules/zero.config.css index 3c73f88..49c5c2b 100644 --- a/modules/zero.config.css +++ b/modules/zero.config.css @@ -16,7 +16,6 @@ .mw-zero-config th, .mw-zero-config td { border: 1px solid gray; - font-size: 16px; padding: 0.5em 1em; } -- To view, visit https://gerrit.wikimedia.org/r/63155 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e738d6f2eaa4dc380d6a2570008258ed8ef8d15 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess Gerrit-Branch: master Gerrit-Owner: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] barium reclaim - change (operations/puppet)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/63156 Change subject: barium reclaim .. barium reclaim Change-Id: I1f2612fd90f53964d9b0db373dfbb5a1064b89c5 --- M manifests/decommissioning.pp 1 file changed, 253 insertions(+), 253 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/56/63156/1 diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp index 91fa0cd..0bd0137 100644 --- a/manifests/decommissioning.pp +++ b/manifests/decommissioning.pp @@ -3,257 +3,257 @@ # ALPHABETIC order! $decommissioned_servers = [ -adler, -argon, # not really decom, just need to stop nagios monitoring -bayes, -br1-knams, -controller, -copper, #moved from external to internal ip, will come back out once spence updates -cp3001, -cp3002, -db1, -db2, -db3, -db4, -db5, -db7, -db8, -db10, -db11, -db12, -db13, -db14, -db15, -db16, -db17, -db18, -db19, -db20, -db21, -db22, -db23, -db24, -db25, -db27, -db28, -db30, -db41, -db1012, #turned into stat1002 -db1025, #moved to frack.eqiad -europium, #reclaimed rt4689 robh -ixia, -gilman, -knsq1, -knsq2, -knsq3, -knsq4, -knsq5, -knsq6, -knsq7, -knsq8, -knsq9, -knsq10, -knsq11, -knsq12, -knsq13, -knsq14, -knsq15, -knsq25, -knsq30, -lily, -lomaria, -mobile1, -mobile2, -mobile3, -mobile4, -mobile5, -ms1, -ms2, -ms3, -ms4, -msfe1002, -project1, -project2, -searchidx1, -search1, -search2, -search3, -search4, -search5, -search6, -search7, -search8, -search9, -search10, -search11, -search12, -sq31, -sq32, -sq33, -sq34, -sq35, -sq38, -sq39, -sq40, -sq46, -sq47, -srv86, -srv87, -srv88, -srv89, -srv90, -srv91, -srv92, -srv93, -srv94, -srv95, -srv96, -srv97, -srv98, -srv99, -srv100, -srv101, -srv102, -srv103, -srv104, -srv105, -srv106, -srv107, -srv108, -srv109, -srv110, -srv111, -srv112, -srv113, -srv114, -srv115, -srv116, -srv117, -srv118, -srv119, -srv120, -srv121, -srv122, -srv123, -srv124, -srv125, -srv126, -srv127, -srv128, -srv129, -srv130, -srv131, -srv132, -srv133, -srv134, -srv135, -srv136, -srv137, -srv138, -srv139, -srv140, -srv141, -srv142, -srv143, -srv144, -srv145, -srv146, -srv147, -srv148, -srv149, -srv150, -srv151, -srv152, -srv153, -srv154, -srv155, -srv156, -srv157, -srv158, -srv159, -srv160, -srv161, -srv162, -srv163, -srv164, -srv165, -srv166, -srv167, -srv168, -srv169, -srv170, -srv171, -srv172, -srv173, -srv174, -srv175, -srv176, -srv177, -srv178, -srv179, -srv180, -srv181, -srv182, -srv183, -srv184, -srv185, -srv186, -srv187, -srv188, -srv189, -srv190, -srv191, -srv192, -srv194, -srv195, -srv196, -srv197, -srv198, -srv199, -srv200, -srv201, -srv202, -srv203, -srv204, -srv205, -srv206, -srv207, -srv208, -srv209, -srv210, -srv211, -srv212, -srv213, -srv214, -srv215, -srv216, -srv217, -srv218, -srv219, -srv220, -srv221, -srv222, -srv223, -srv224, -srv225, -srv226, -srv227, -srv228, -srv229, -srv230, -srv231, -srv232, -srv233, -srv234, -srv266, -srv278, -storage1, -storage2, -storage3, -thistle, -virt1001, -virt1002, -virt1003, -wikinews-lb.wikimedia.org, -xenon, +'adler', +'argon', # not really decom, just need to stop nagios monitoring +'barium', +'bayes', +'br1-knams', +'controller', +'cp3001', +'cp3002', +'db1', +'db2', +'db3', +'db4', +'db5', +'db7', +'db8', +'db10', +'db11', +'db12', +'db13', +'db14', +'db15', +'db16', +'db17', +'db18', +'db19', +'db20', +'db21', +'db22', +'db23', +'db24', +'db25', +'db27', +'db28', +'db30', +'db41', +'db1012', #turned into stat1002 +'db1025', #moved to frack.eqiad +'europium', #reclaimed rt4689 robh +'ixia', +'gilman', +'knsq1', +'knsq2', +'knsq3', +'knsq4', +'knsq5', +'knsq6', +'knsq7', +'knsq8', +'knsq9', +'knsq10', +'knsq11', +'knsq12', +'knsq13', +'knsq14', +'knsq15', +'knsq25', +'knsq30', +'lily', +'lomaria', +'mobile1', +'mobile2', +'mobile3', +'mobile4', +'mobile5', +'ms1', +'ms2', +'ms3', +'ms4', +'msfe1002', +'project1', +'project2', +'searchidx1', +'search1', +'search2', +'search3', +'search4', +'search5', +'search6', +'search7', +'search8', +'search9', +'search10', +'search11', +'search12', +'sq31', +'sq32', +'sq33', +'sq34', +'sq35', +'sq38', +'sq39', +'sq40', +'sq46', +'sq47', +'srv86', +'srv87', +'srv88', +'srv89', +'srv90', +'srv91', +'srv92', +'srv93', +'srv94', +'srv95', +'srv96', +'srv97', +'srv98', +'srv99', +'srv100', +'srv101', +'srv102', +'srv103', +'srv104', +'srv105', +'srv106', +'srv107', +'srv108', +'srv109', +'srv110', +'srv111', +'srv112', +'srv113', +'srv114', +'srv115', +'srv116', +'srv117', +'srv118', +'srv119', +'srv120', +'srv121', +'srv122', +'srv123', +'srv124', +'srv125', +'srv126', +'srv127', +'srv128', +'srv129', +'srv130', +'srv131', +'srv132', +'srv133', +'srv134', +'srv135', +'srv136', +'srv137', +'srv138', +'srv139', +'srv140', +'srv141', +'srv142', +'srv143', +'srv144', +'srv145', +'srv146', +'srv147', +'srv148', +'srv149', +'srv150', +'srv151', +'srv152', +'srv153', +'srv154', +'srv155', +'srv156', +'srv157', +'srv158', +'srv159',
[MediaWiki-commits] [Gerrit] Adding Disk Based Store - change (wikimedia...PaymentsListeners)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/63157 Change subject: Adding Disk Based Store .. Adding Disk Based Store Just for temporary status things -- does not yet implement queuing functionality. Change-Id: Iadb1db09a6aa30d2e98a7c1d91ed3aa194a3e0f4 --- M SmashPig/Core/DataStores/KeyedOpaqueDataStore.php M SmashPig/Core/DataStores/StompDataStore.php M SmashPig/config_defaults.php 3 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners refs/changes/57/63157/1 diff --git a/SmashPig/Core/DataStores/KeyedOpaqueDataStore.php b/SmashPig/Core/DataStores/KeyedOpaqueDataStore.php index bdd04c2..ab049f6 100644 --- a/SmashPig/Core/DataStores/KeyedOpaqueDataStore.php +++ b/SmashPig/Core/DataStores/KeyedOpaqueDataStore.php @@ -17,7 +17,7 @@ abstract public function addObject( KeyedOpaqueStorableObject $obj ); /** -* Remove object with the same serialization type and correlation ID from the +* Remove objects with the same serialization type and correlation ID from the * persistent store. * * @param KeyedOpaqueStorableObject $protoObj Prototype to remove. diff --git a/SmashPig/Core/DataStores/StompDataStore.php b/SmashPig/Core/DataStores/StompDataStore.php index 0cb7000..0abfab0 100644 --- a/SmashPig/Core/DataStores/StompDataStore.php +++ b/SmashPig/Core/DataStores/StompDataStore.php @@ -314,7 +314,13 @@ protected function deleteSubscription() { if ( $this-subscribed ) { Logger::debug( Unsubscribing from STOMP queue '{$this-queue_id}' ); - $this-stompObj-unsubscribe( $this-queue_id ); + try { + // Sometimes the resource has already been destroyed by some other + // means and STOMP throws an exception. + $this-stompObj-unsubscribe( $this-queue_id ); + } catch ( \Stomp_Exception $ex ) { + // Yay for generic errors! We never do that... no... . + } $this-subscribed = false; } } diff --git a/SmashPig/config_defaults.php b/SmashPig/config_defaults.php index bb5638f..2afaa5c 100644 --- a/SmashPig/config_defaults.php +++ b/SmashPig/config_defaults.php @@ -5,8 +5,8 @@ 'data-store' = array( // Store definitions 'pending' = array( - 'class' = 'SmashPig\Core\DataStores\StompDataStore', - 'inst-args' = array( 'pending' ), + 'class' = 'SmashPig\Core\DataStores\DiskFileDataStore', + 'inst-args' = array( '/tmp/' ), ), 'limbo' = array( -- To view, visit https://gerrit.wikimedia.org/r/63157 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iadb1db09a6aa30d2e98a7c1d91ed3aa194a3e0f4 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/PaymentsListeners Gerrit-Branch: master Gerrit-Owner: Mwalker mwal...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] barium reclaim - change (operations/puppet)
RobH has submitted this change and it was merged. Change subject: barium reclaim .. barium reclaim Change-Id: I1f2612fd90f53964d9b0db373dfbb5a1064b89c5 --- M manifests/decommissioning.pp 1 file changed, 253 insertions(+), 253 deletions(-) Approvals: RobH: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp index 91fa0cd..0bd0137 100644 --- a/manifests/decommissioning.pp +++ b/manifests/decommissioning.pp @@ -3,257 +3,257 @@ # ALPHABETIC order! $decommissioned_servers = [ -adler, -argon, # not really decom, just need to stop nagios monitoring -bayes, -br1-knams, -controller, -copper, #moved from external to internal ip, will come back out once spence updates -cp3001, -cp3002, -db1, -db2, -db3, -db4, -db5, -db7, -db8, -db10, -db11, -db12, -db13, -db14, -db15, -db16, -db17, -db18, -db19, -db20, -db21, -db22, -db23, -db24, -db25, -db27, -db28, -db30, -db41, -db1012, #turned into stat1002 -db1025, #moved to frack.eqiad -europium, #reclaimed rt4689 robh -ixia, -gilman, -knsq1, -knsq2, -knsq3, -knsq4, -knsq5, -knsq6, -knsq7, -knsq8, -knsq9, -knsq10, -knsq11, -knsq12, -knsq13, -knsq14, -knsq15, -knsq25, -knsq30, -lily, -lomaria, -mobile1, -mobile2, -mobile3, -mobile4, -mobile5, -ms1, -ms2, -ms3, -ms4, -msfe1002, -project1, -project2, -searchidx1, -search1, -search2, -search3, -search4, -search5, -search6, -search7, -search8, -search9, -search10, -search11, -search12, -sq31, -sq32, -sq33, -sq34, -sq35, -sq38, -sq39, -sq40, -sq46, -sq47, -srv86, -srv87, -srv88, -srv89, -srv90, -srv91, -srv92, -srv93, -srv94, -srv95, -srv96, -srv97, -srv98, -srv99, -srv100, -srv101, -srv102, -srv103, -srv104, -srv105, -srv106, -srv107, -srv108, -srv109, -srv110, -srv111, -srv112, -srv113, -srv114, -srv115, -srv116, -srv117, -srv118, -srv119, -srv120, -srv121, -srv122, -srv123, -srv124, -srv125, -srv126, -srv127, -srv128, -srv129, -srv130, -srv131, -srv132, -srv133, -srv134, -srv135, -srv136, -srv137, -srv138, -srv139, -srv140, -srv141, -srv142, -srv143, -srv144, -srv145, -srv146, -srv147, -srv148, -srv149, -srv150, -srv151, -srv152, -srv153, -srv154, -srv155, -srv156, -srv157, -srv158, -srv159, -srv160, -srv161, -srv162, -srv163, -srv164, -srv165, -srv166, -srv167, -srv168, -srv169, -srv170, -srv171, -srv172, -srv173, -srv174, -srv175, -srv176, -srv177, -srv178, -srv179, -srv180, -srv181, -srv182, -srv183, -srv184, -srv185, -srv186, -srv187, -srv188, -srv189, -srv190, -srv191, -srv192, -srv194, -srv195, -srv196, -srv197, -srv198, -srv199, -srv200, -srv201, -srv202, -srv203, -srv204, -srv205, -srv206, -srv207, -srv208, -srv209, -srv210, -srv211, -srv212, -srv213, -srv214, -srv215, -srv216, -srv217, -srv218, -srv219, -srv220, -srv221, -srv222, -srv223, -srv224, -srv225, -srv226, -srv227, -srv228, -srv229, -srv230, -srv231, -srv232, -srv233, -srv234, -srv266, -srv278, -storage1, -storage2, -storage3, -thistle, -virt1001, -virt1002, -virt1003, -wikinews-lb.wikimedia.org, -xenon, +'adler', +'argon', # not really decom, just need to stop nagios monitoring +'barium', +'bayes', +'br1-knams', +'controller', +'cp3001', +'cp3002', +'db1', +'db2', +'db3', +'db4', +'db5', +'db7', +'db8', +'db10', +'db11', +'db12', +'db13', +'db14', +'db15', +'db16', +'db17', +'db18', +'db19', +'db20', +'db21', +'db22', +'db23', +'db24', +'db25', +'db27', +'db28', +'db30', +'db41', +'db1012', #turned into stat1002 +'db1025', #moved to frack.eqiad +'europium', #reclaimed rt4689 robh +'ixia', +'gilman', +'knsq1', +'knsq2', +'knsq3', +'knsq4', +'knsq5', +'knsq6', +'knsq7', +'knsq8', +'knsq9', +'knsq10', +'knsq11', +'knsq12', +'knsq13', +'knsq14', +'knsq15', +'knsq25', +'knsq30', +'lily', +'lomaria', +'mobile1', +'mobile2', +'mobile3', +'mobile4', +'mobile5', +'ms1', +'ms2', +'ms3', +'ms4', +'msfe1002', +'project1', +'project2', +'searchidx1', +'search1', +'search2', +'search3', +'search4', +'search5', +'search6', +'search7', +'search8', +'search9', +'search10', +'search11', +'search12', +'sq31', +'sq32', +'sq33', +'sq34', +'sq35', +'sq38', +'sq39', +'sq40', +'sq46', +'sq47', +'srv86', +'srv87', +'srv88', +'srv89', +'srv90', +'srv91', +'srv92', +'srv93', +'srv94', +'srv95', +'srv96', +'srv97', +'srv98', +'srv99', +'srv100', +'srv101', +'srv102', +'srv103', +'srv104', +'srv105', +'srv106', +'srv107', +'srv108', +'srv109', +'srv110', +'srv111', +'srv112', +'srv113', +'srv114', +'srv115', +'srv116', +'srv117', +'srv118', +'srv119', +'srv120', +'srv121', +'srv122', +'srv123', +'srv124', +'srv125', +'srv126', +'srv127', +'srv128', +'srv129', +'srv130', +'srv131', +'srv132', +'srv133', +'srv134', +'srv135', +'srv136', +'srv137', +'srv138', +'srv139', +'srv140', +'srv141', +'srv142', +'srv143', +'srv144', +'srv145', +'srv146', +'srv147', +'srv148', +'srv149', +'srv150', +'srv151', +'srv152', +'srv153', +'srv154', +'srv155', +'srv156', +'srv157', +'srv158', +'srv159', +'srv160', +'srv161', +'srv162', +'srv163', +'srv164',
[MediaWiki-commits] [Gerrit] Cleanup Adyen - change (wikimedia...PaymentsListeners)
Mwalker has uploaded a new change for review. https://gerrit.wikimedia.org/r/63158 Change subject: Cleanup Adyen .. Cleanup Adyen Adding moar logs! Change-Id: I38fbb6443cced6f56adb5297f20bfbad2e09019a --- M SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php M SmashPig/PaymentProviders/Adyen/AdyenListener.php M SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php 3 files changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/PaymentsListeners refs/changes/58/63158/1 diff --git a/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php b/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php index f9a642a..03e812e 100644 --- a/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php +++ b/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php @@ -27,6 +27,8 @@ } public function execute( ListenerMessage $msg ) { + Logger::enterContext( 'PaymentCaptureAction' ); + if ( $msg instanceof Authorisation ) { if ( $msg-success ) { // Here we need to capture the payment, the job runner will collect the @@ -59,6 +61,7 @@ } } + Logger::leaveContext(); return true; } } diff --git a/SmashPig/PaymentProviders/Adyen/AdyenListener.php b/SmashPig/PaymentProviders/Adyen/AdyenListener.php index 575788c..3c02dc7 100644 --- a/SmashPig/PaymentProviders/Adyen/AdyenListener.php +++ b/SmashPig/PaymentProviders/Adyen/AdyenListener.php @@ -88,6 +88,9 @@ } } + $numItems = count( $messages ); + Logger::info( Extracted $numItems from received message. Beginning processing loop. ); + // Now process each message to the best of our ability foreach ( $messages as $msg ) { if ( $this-processMessage( $msg ) ) { @@ -98,6 +101,7 @@ } } + Logger::info( 'Finished processing of IPN message, retuning accepted.'); $respstring = '[accepted]'; } else { @@ -119,7 +123,8 @@ Logger::error( 'Listener message object could not be created. Unknown type!', $item ); return false; } else { - Logger::info( 'Listener message created - adding to pending store.' ); + $className = get_class( $msg ); + Logger::info( Listener message of type $className created - adding to pending store. ); $this-pendingStore-addObject( $msg ); } return $msg; diff --git a/SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php b/SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php index 540c7f1..ffdb13c 100644 --- a/SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php +++ b/SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php @@ -7,6 +7,16 @@ use SmashPig\CrmLink\Messages\LimboMessage; use SmashPig\CrmLink\Messages\PaymentSuccess; +/** + * Job that merges inbound IPN calls from Adyen with a limbo message in the queue + * and then places that into the verified queue. Is idempotent with respect to the + * limbo queue state -- e.g. if no limbo message is found it assumes that the message + * was already processed. + * + * Class ProcessCaptureRequestJob + * + * @package SmashPig\PaymentProviders\Adyen\Jobs + */ class ProcessCaptureRequestJob extends RunnableJob { protected $account; @@ -27,6 +37,7 @@ } public function execute() { + Logger::enterContext( corr_id-$this-correlationId ); Logger::info( Attempting to capture payment on account '{$this-account}' with reference '{$this-pspReference}' and correlation id '{$this-correlationId}'. ); @@ -73,6 +84,7 @@ ); } + Logger::leaveContext(); return true; } } -- To view, visit https://gerrit.wikimedia.org/r/63158 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38fbb6443cced6f56adb5297f20bfbad2e09019a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/PaymentsListeners Gerrit-Branch: master Gerrit-Owner: Mwalker mwal...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove hack for old version of Parsoid - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/63159 Change subject: Remove hack for old version of Parsoid .. Remove hack for old version of Parsoid Removing check for parsoid returning document fragments. Change-Id: I5a8729d93907d13c699a1f3cf43ffd3e0c45b003 --- M modules/ve/init/mw/ve.init.mw.Target.js 1 file changed, 2 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/59/63159/1 diff --git a/modules/ve/init/mw/ve.init.mw.Target.js b/modules/ve/init/mw/ve.init.mw.Target.js index 8a58e57..1793dcb 100644 --- a/modules/ve/init/mw/ve.init.mw.Target.js +++ b/modules/ve/init/mw/ve.init.mw.Target.js @@ -121,7 +121,7 @@ * @emits loadError */ ve.init.mw.Target.onLoad = function ( response ) { - var key, tmp, el, html, + var key, tmp, el, data = response ? response.visualeditor : null; if ( !data !response.error ) { @@ -139,14 +139,7 @@ ); } else { this.originalHtml = data.content; - // HACK for backwards compatibility with older versions of Parsoid, detect whether - // data.content is a document fragment or a full HTML document - if ( data.content.match( /^(!doctype|html|head|body)(|\s)/i ) ) { - html = data.content; - } else { - html = '!doctype htmlhtmlhead/headbody' + data.content + '/body/html'; - } - this.doc = ve.createDocumentFromHTML( html ); + this.doc = ve.createDocumentFromHTML( this.originalHtml ); /* Don't show notices with no visible html (bug 43013). */ -- To view, visit https://gerrit.wikimedia.org/r/63159 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a8729d93907d13c699a1f3cf43ffd3e0c45b003 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] removed colby and barium from site.pp - change (operations/puppet)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/63160 Change subject: removed colby and barium from site.pp .. removed colby and barium from site.pp Change-Id: If24ee713d1d422bb81f060b913a5b4eebbcb5460 --- M manifests/site.pp 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/60/63160/1 diff --git a/manifests/site.pp b/manifests/site.pp index 577d1d7..ba42368 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -225,10 +225,6 @@ include role::cache::bits } -node /^(barium|colby)\.wikimedia\.org$/ { - include standard -} - node bast1001.wikimedia.org { $cluster = misc $domain_search = wikimedia.org pmtpa.wmnet eqiad.wmnet esams.wikimedia.org -- To view, visit https://gerrit.wikimedia.org/r/63160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If24ee713d1d422bb81f060b913a5b4eebbcb5460 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH r...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make use of @covers tag to increase test coverage report acc... - change (mediawiki...Ask)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/63161 Change subject: Make use of @covers tag to increase test coverage report accuracy .. Make use of @covers tag to increase test coverage report accuracy Change-Id: I13cfd70d5bc7651f68cc0984cb00e9ea3cf7c077 --- M Tests/Phpunit/Language/Description/AnyValueTest.php M Tests/Phpunit/Language/Description/ConjunctionTest.php M Tests/Phpunit/Language/Description/DisjunctionTest.php M Tests/Phpunit/Language/Description/SomePropertyTest.php M Tests/Phpunit/Language/Description/ValueDescriptionTest.php M Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php M Tests/Phpunit/Language/Option/QueryOptionsTest.php M Tests/Phpunit/Language/Option/SortOptionsTest.php M Tests/Phpunit/Language/QueryTest.php M Tests/Phpunit/Language/Selection/PropertySelectionTest.php M Tests/Phpunit/Language/Selection/SubjectSelectionTest.php 11 files changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask refs/changes/61/63161/1 diff --git a/Tests/Phpunit/Language/Description/AnyValueTest.php b/Tests/Phpunit/Language/Description/AnyValueTest.php index e4fc335..2adbf5f 100644 --- a/Tests/Phpunit/Language/Description/AnyValueTest.php +++ b/Tests/Phpunit/Language/Description/AnyValueTest.php @@ -5,7 +5,7 @@ use Ask\Language\Description\AnyValue; /** - * Unit tests for the Ask\Language\Description\AnyValue class. + * @covers Ask\Language\Description\AnyValue * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Tests/Phpunit/Language/Description/ConjunctionTest.php b/Tests/Phpunit/Language/Description/ConjunctionTest.php index acdbf51..2fcf840 100644 --- a/Tests/Phpunit/Language/Description/ConjunctionTest.php +++ b/Tests/Phpunit/Language/Description/ConjunctionTest.php @@ -8,7 +8,7 @@ use Ask\Language\Description\Disjunction; /** - * Unit tests for the Ask\Language\Description\Intersection class. + * @covers Ask\Language\Description\Intersection * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Tests/Phpunit/Language/Description/DisjunctionTest.php b/Tests/Phpunit/Language/Description/DisjunctionTest.php index 3ff1bc9..18497fa 100644 --- a/Tests/Phpunit/Language/Description/DisjunctionTest.php +++ b/Tests/Phpunit/Language/Description/DisjunctionTest.php @@ -7,7 +7,7 @@ use Ask\Language\Description\Disjunction; /** - * Unit tests for the Ask\Language\Description\Union class. + * @covers Ask\Language\Description\Union * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Tests/Phpunit/Language/Description/SomePropertyTest.php b/Tests/Phpunit/Language/Description/SomePropertyTest.php index fd5ec96..d084c89 100644 --- a/Tests/Phpunit/Language/Description/SomePropertyTest.php +++ b/Tests/Phpunit/Language/Description/SomePropertyTest.php @@ -6,7 +6,7 @@ use DataValues\PropertyValue; /** - * Unit tests for the Ask\Language\Description\SomeProperty class. + * @covers Ask\Language\Description\SomeProperty * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Tests/Phpunit/Language/Description/ValueDescriptionTest.php b/Tests/Phpunit/Language/Description/ValueDescriptionTest.php index 94860b6..2d9d036 100644 --- a/Tests/Phpunit/Language/Description/ValueDescriptionTest.php +++ b/Tests/Phpunit/Language/Description/ValueDescriptionTest.php @@ -5,7 +5,7 @@ use Ask\Language\Description\ValueDescription; /** - * Unit tests for the Ask\Language\Description\ValueDescription class. + * @covers Ask\Language\Description\ValueDescription * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php b/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php index 4605991..a7ec411 100644 --- a/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php +++ b/Tests/Phpunit/Language/Option/PropertyValueSortExpressionTest.php @@ -5,7 +5,7 @@ use Ask\Language\Option\SortExpression; /** - * Tests for the Ask\Language\Option\PropertyValueSortExpression class. + * @covers Ask\Language\Option\PropertyValueSortExpression * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Tests/Phpunit/Language/Option/QueryOptionsTest.php b/Tests/Phpunit/Language/Option/QueryOptionsTest.php index
[MediaWiki-commits] [Gerrit] Moved phpunit.php runner into Tests directory since it is no... - change (mediawiki...Ask)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/63162 Change subject: Moved phpunit.php runner into Tests directory since it is not a PHPUnit test itself .. Moved phpunit.php runner into Tests directory since it is not a PHPUnit test itself Change-Id: Ie0d2da52581caa7bbfb22bfb27b2d25117b074bf --- R Tests/phpunit.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask refs/changes/62/63162/1 diff --git a/Tests/Phpunit/phpunit.php b/Tests/phpunit.php similarity index 93% rename from Tests/Phpunit/phpunit.php rename to Tests/phpunit.php index 2ffaf53..6e5783c 100755 --- a/Tests/Phpunit/phpunit.php +++ b/Tests/phpunit.php @@ -10,7 +10,7 @@ } require_once( 'PHPUnit/Autoload.php' ); -require_once( __DIR__ . '/../bootstrap.php' ); +require_once( __DIR__ . '/bootstrap.php' ); echo 'Running tests for Ask version ' . Ask_VERSION . .\n; -- To view, visit https://gerrit.wikimedia.org/r/63162 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0d2da52581caa7bbfb22bfb27b2d25117b074bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Ask Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] removed colby and barium from site.pp - change (operations/puppet)
RobH has submitted this change and it was merged. Change subject: removed colby and barium from site.pp .. removed colby and barium from site.pp Change-Id: If24ee713d1d422bb81f060b913a5b4eebbcb5460 --- M manifests/site.pp 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: RobH: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 577d1d7..ba42368 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -225,10 +225,6 @@ include role::cache::bits } -node /^(barium|colby)\.wikimedia\.org$/ { - include standard -} - node bast1001.wikimedia.org { $cluster = misc $domain_search = wikimedia.org pmtpa.wmnet eqiad.wmnet esams.wikimedia.org -- To view, visit https://gerrit.wikimedia.org/r/63160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If24ee713d1d422bb81f060b913a5b4eebbcb5460 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH r...@wikimedia.org Gerrit-Reviewer: RobH r...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] PHPUnit now recognizes extension parser tests - change (mediawiki/core)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/63164 Change subject: PHPUnit now recognizes extension parser tests .. PHPUnit now recognizes extension parser tests *** *** *** *** WORK IN PROGRESS *** *** *** *** The parser tests shipped by extension are not recognized by the 'extension' test suite. This change attempt to find them by looking at the $wgParserFiles variable. Play cases: $ php phpunit.php --group Parser --tap Only runs the MediaWiki core parser tests. FIXME: should run everything With an extension having parser tests such as Cite: $ php phpunit.php --testsuite extensions --tap // Extensions tests are run including parser tests. *** *** *** *** WORK IN PROGRESS *** *** *** *** Got to figure out how to let all tests run which does not play nice with PHPUnit right now :/ bug: 42506 Change-Id: Icc3e9d30706b32149aa9dd18552e4241ec4af67e --- M tests/TestsAutoLoader.php M tests/phpunit/includes/parser/MediaWikiParserTest.php M tests/phpunit/suites/ExtensionsTestSuite.php 3 files changed, 75 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/63164/1 diff --git a/tests/TestsAutoLoader.php b/tests/TestsAutoLoader.php index 4a6e3fb..8db3120 100644 --- a/tests/TestsAutoLoader.php +++ b/tests/TestsAutoLoader.php @@ -71,6 +71,7 @@ # tests/phpunit/includes/parser 'NewParserTest' = $testDir/phpunit/includes/parser/NewParserTest.php, + 'MediaWikiParserTest' = $testDir/phpunit/includes/parser/MediaWikiParserTest.php, # tests/phpunit/includes/libs 'GenericArrayObjectTest' = $testDir/phpunit/includes/libs/GenericArrayObjectTest.php, diff --git a/tests/phpunit/includes/parser/MediaWikiParserTest.php b/tests/phpunit/includes/parser/MediaWikiParserTest.php index 3939c4f..12b4bec 100644 --- a/tests/phpunit/includes/parser/MediaWikiParserTest.php +++ b/tests/phpunit/includes/parser/MediaWikiParserTest.php @@ -11,12 +11,77 @@ */ class MediaWikiParserTest { - public static function suite() { - global $wgParserTestFiles; + /** +* @defgroup filtering_constants Filtering constants +* +* Limit inclusion of parser tests files coming from MediaWiki core +* @{ +*/ + + /** Include files shipped with MediaWiki core */ + const WITH_CORE = 1; + /** Include non core files as set in $wgParserTestFiles */ + const WITH_REST = 2; + /** Include anything set via $wgParserTestFiles */ + const WITH_ALL = 3; # WITH_CORE | WITH_REST + + /** @} */ + + /** +* Get a PHPUnit test suite of parser tests. Optionally filtered with +* $flags. +* +* @par Examples: +* Get a suite of parser tests shipped by MediaWiki core: +* @code +* MediaWikiParserTest::suite( MediaWikiParserTest::WITH_CORE ); +* @endcode +* Get a suite of various parser tests, like extensions: +* @code +* MediaWikiParserTest::suite( MediaWikiParserTest::WITH_REST ); +* @endcode +* Get any test defined via $wgParserTestFiles: +* @code +* MediaWikiParserTest::suite( MediaWikiParserTest::WITH_ALL ); +* @endcode +* +* @param $flags bitwise flag to filter out the $wgParserTestFiles that +* will be included. Default: MediaWikiParserTest::WITH_CORE +* +* @return PHPUnit_Framework_TestSuite +*/ + public static function suite( $flags = self::WITH_CORE ) { + var_dump(callled...); + if( is_string( $flags ) ) { + $flags = self::WITH_CORE; + } + global $wgParserTestFiles, $IP; + + $mwTestDir = $IP.'/tests/'; + + $wantsCore = ($flags self::WITH_CORE); + $wantsRest = ($flags self::WITH_REST); + $filesToTest = array(); + foreach( $wgParserTestFiles as $parserTestFile ) { + $isCore = ( 0 === strpos( $parserTestFile, $mwTestDir ) ); + + if( $isCore $wantsCore ) { + var_dump( IS CORE AND WE WANT CORE: $parserTestFile\n ); + $filesToTest[] = $parserTestFile; + } elseif( !$isCore $wantsRest ) { + var_dump( IS NOT CORE BUT WANT REST: $parserTestFile\n ); + $filesToTest[] = $parserTestFile; + } else { + var_dump( ISCORE: $isCore WANTSCORE: $wantsCore FLAGS: $flags); + } + } $suite = new PHPUnit_Framework_TestSuite; - foreach ( $wgParserTestFiles as $fileName ) { + var_dump( TESTDIR: $mwTestDir ); +
[MediaWiki-commits] [Gerrit] Fix jsub -continuous quoting issues. - change (labs/toollabs)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/63165 Change subject: Fix jsub -continuous quoting issues. .. Fix jsub -continuous quoting issues. jsub -continuous failed if either an argument to an option or a part of the command line to be executed contained 's. This fixes bug 48334 by using 3-argument open for the former and String::ShellQuote for the latter. Bug:48334 Change-Id: I5198d2ee0592f8756905a18139ad2f50fa1cba84 --- M packages/jobutils/usr/local/bin/jsub 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs refs/changes/65/63165/1 diff --git a/packages/jobutils/usr/local/bin/jsub b/packages/jobutils/usr/local/bin/jsub index 756ee1d..2d5b47d 100755 --- a/packages/jobutils/usr/local/bin/jsub +++ b/packages/jobutils/usr/local/bin/jsub @@ -1,5 +1,7 @@ #! /usr/bin/perl +use String::ShellQuote; + my %qsubargs = ( '-a' = 1, '-b' = 1, '-cwd' = 0, '-e' = 1, '-hard' = 0, '-i' = 1, '-j' = 1, '-l' = 1, '-now' = 1, '-N' = 1, '-o' = 1, '-p' = 1, '-q' = 1, '-soft' = 0, @@ -111,9 +113,9 @@ if($continuous) { push @args, '-q', 'continuous'; - open QSUB, |/usr/bin/qsub '.join(' ', @args).' or die \[$now\] unable to start qsub: $!\n; - print QSUB #! /bin/bash\n; - print QSUB while ! '$prog' '.join(' ', @ARGV).' ; do\n; + open QSUB, '|-', '/usr/bin/qsub', @args or die \[$now\] unable to start qsub: $!\n; + print QSUB #!/bin/bash\n; + print QSUB while ! . shell_quote($prog, @ARGV) . ; do\n; print QSUB sleep 5\n; print QSUB done\n; close QSUB; -- To view, visit https://gerrit.wikimedia.org/r/63165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5198d2ee0592f8756905a18139ad2f50fa1cba84 Gerrit-PatchSet: 1 Gerrit-Project: labs/toollabs Gerrit-Branch: master Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix jsub -continuous quoting issues. - change (labs/toollabs)
coren has submitted this change and it was merged. Change subject: Fix jsub -continuous quoting issues. .. Fix jsub -continuous quoting issues. jsub -continuous failed if either an argument to an option or a part of the command line to be executed contained 's. This fixes bug 48334 by using 3-argument open for the former and String::ShellQuote for the latter. Bug:48334 Change-Id: I5198d2ee0592f8756905a18139ad2f50fa1cba84 --- M packages/jobutils/usr/local/bin/jsub 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: coren: Verified; Looks good to me, approved diff --git a/packages/jobutils/usr/local/bin/jsub b/packages/jobutils/usr/local/bin/jsub index 756ee1d..2d5b47d 100755 --- a/packages/jobutils/usr/local/bin/jsub +++ b/packages/jobutils/usr/local/bin/jsub @@ -1,5 +1,7 @@ #! /usr/bin/perl +use String::ShellQuote; + my %qsubargs = ( '-a' = 1, '-b' = 1, '-cwd' = 0, '-e' = 1, '-hard' = 0, '-i' = 1, '-j' = 1, '-l' = 1, '-now' = 1, '-N' = 1, '-o' = 1, '-p' = 1, '-q' = 1, '-soft' = 0, @@ -111,9 +113,9 @@ if($continuous) { push @args, '-q', 'continuous'; - open QSUB, |/usr/bin/qsub '.join(' ', @args).' or die \[$now\] unable to start qsub: $!\n; - print QSUB #! /bin/bash\n; - print QSUB while ! '$prog' '.join(' ', @ARGV).' ; do\n; + open QSUB, '|-', '/usr/bin/qsub', @args or die \[$now\] unable to start qsub: $!\n; + print QSUB #!/bin/bash\n; + print QSUB while ! . shell_quote($prog, @ARGV) . ; do\n; print QSUB sleep 5\n; print QSUB done\n; close QSUB; -- To view, visit https://gerrit.wikimedia.org/r/63165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5198d2ee0592f8756905a18139ad2f50fa1cba84 Gerrit-PatchSet: 1 Gerrit-Project: labs/toollabs Gerrit-Branch: master Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de Gerrit-Reviewer: coren mpellet...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits