[MediaWiki-commits] [Gerrit] Update/add documentation - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Update/add documentation .. Update/add documentation Change-Id: I118f3aa3827fa34a8d324f70bdf9f96a052c1965 --- M ffs/AndroidXmlFFS.php M ffs/DtdFFS.php M ffs/FFS.php M ffs/FlatPhpFFS.php M ffs/GettextFFS.php M ffs/IniFFS.php M ffs/JavaFFS.php M ffs/JavaScriptFFS.php M ffs/JsonFFS.php M ffs/MediaWikiExtensionFFS.php M ffs/PythonSingleFFS.php M ffs/XliffFFS.php M ffs/YamlFFS.php M messagegroups/AggregateMessageGroup.php M messagegroups/FileBasedMessageGroup.php M messagegroups/MessageGroup.php M messagegroups/MessageGroupBase.php M messagegroups/MessageGroupOld.php M messagegroups/WikiPageMessageGroup.php 19 files changed, 108 insertions(+), 42 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/ffs/AndroidXmlFFS.php b/ffs/AndroidXmlFFS.php index 138e4b9..7563867 100644 --- a/ffs/AndroidXmlFFS.php +++ b/ffs/AndroidXmlFFS.php @@ -21,6 +21,10 @@ return array( '.xml' ); } + /** +* @param string $data +* @return array Parsed data. +*/ public function readFromVariable( $data ) { $reader = new SimpleXMLElement( $data ); diff --git a/ffs/DtdFFS.php b/ffs/DtdFFS.php index 6910964..cab36ef 100644 --- a/ffs/DtdFFS.php +++ b/ffs/DtdFFS.php @@ -22,7 +22,7 @@ /** * @param $data string -* @return array +* @return array Parsed data. */ public function readFromVariable( $data ) { preg_match_all( ',# Author: ([^\n]+)\n,', $data, $matches ); diff --git a/ffs/FFS.php b/ffs/FFS.php index a569931..f439221 100644 --- a/ffs/FFS.php +++ b/ffs/FFS.php @@ -21,13 +21,13 @@ /** * Set the file's location in the system -* @param $target \string Filesystem path for exported files. +* @param string $target Filesystem path for exported files. */ public function setWritePath( $target ); /** * Get the file's location in the system -* @return \string +* @return string */ public function getWritePath(); @@ -35,16 +35,16 @@ * Will parse messages, authors, and any custom data from the file * and return it in associative array with keys like \c AUTHORS and * \c MESSAGES. -* @param $code \string Languge code. -* @return array of string|mixed Parsed data. +* @param string $code Language code. +* @return array|bool Parsed data or false on failure. */ public function read( $code ); /** * Same as read(), but takes the data as a parameter. The caller * is supposed to know in what language the translations are. -* @param $data \string Formatted messages. -* @return array of string|mixed Parsed data. +* @param string $data Formatted messages. +* @return array Parsed data. */ public function readFromVariable( $data ); @@ -60,8 +60,8 @@ * Quick shortcut for getting the plain exported data. * Same as write(), but returns the output instead of writing it into * a file. -* @param $collection MessageCollection -* @return \string +* @param MessageCollection $collection +* @return string */ public function writeIntoVariable( MessageCollection $collection ); @@ -122,7 +122,7 @@ } /** -* @param $group FileBasedMessageGroup +* @param FileBasedMessageGroup $group */ public function setGroup( FileBasedMessageGroup $group ) { $this-group = $group; @@ -136,7 +136,7 @@ } /** -* @param $writePath string +* @param string $writePath */ public function setWritePath( $writePath ) { $this-writePath = $writePath; @@ -156,7 +156,7 @@ * function will return true even if there are no translations to that * language. * -* @param $code string|bool +* @param string|bool $code * @return bool */ public function exists( $code = false ) { @@ -176,8 +176,8 @@ * Reads messages from the file in a given language and returns an array * of AUTHORS, MESSAGES and possibly other properties. * -* @param $code string -* @return array|bool false if the file does not exist +* @param string $code Language code. +* @return array|bool False if the file does not exist * @throws MWException if the file appears to exist, but cannot be read */ public function read( $code ) { @@ -198,8 +198,8 @@ * Parse the message data given as a string in the SimpleFFS format * and return it as an array of AUTHORS and MESSAGES. * -
[MediaWiki-commits] [Gerrit] Update Russian(ru) plural rules to CLDR 24 - change (mediawiki/core)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/105148 Change subject: Update Russian(ru) plural rules to CLDR 24 .. Update Russian(ru) plural rules to CLDR 24 Russian (ru) plural rules have a major change. The 'few' form is merged with the 'other' form. The current forms are 'one', 'many', 'other'. In MW ru plural rules were overridden using convertPlural methdod in LanguagesRu.php with 3 forms. Effectively forms[1] and forms[2] are swapped. Followup: I9930b290d004667a3bb09e5c1663ec2c9c27d8a6 Bug: 56931 Change-Id: Ia5779e42315d3f41f52dce2bfffaee0a4297d23b --- M languages/classes/LanguageRu.php M tests/phpunit/languages/LanguageRuTest.php 2 files changed, 11 insertions(+), 68 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/105148/1 diff --git a/languages/classes/LanguageRu.php b/languages/classes/LanguageRu.php index 243a876..d3ac1d2 100644 --- a/languages/classes/LanguageRu.php +++ b/languages/classes/LanguageRu.php @@ -44,8 +44,9 @@ return $wgGrammarForms['ru'][$case][$word]; } - # These rules are not perfect, but they are currently only used for Wikimedia site names so it doesn't - # matter if they are wrong sometimes. Just add a special case for your site name if necessary. + # These rules are not perfect, but they are currently only used for Wikimedia + # site names so it doesn't matter if they are wrong sometimes. + # Just add a special case for your site name if necessary. # substr doesn't support Unicode and mb_substr has issues, # so break it to characters using preg_match_all and then use array_slice and join @@ -100,62 +101,6 @@ } return $word; - } - - /** -* Plural form transformations -* -* $forms[0] - singular form (for 1, 21, 31, 41...) -* $forms[1] - paucal form (for 2, 3, 4, 22, 23, 24, 32, 33, 34...) -* $forms[2] - plural form (for 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26...) -* -* Examples: -* message with number -* Сделано $1 {{PLURAL:$1|изменение|изменения|изменений}} -* ($1 change[s] were made) -* message without number -* Действие не может быть выполнено по {{PLURAL:$1|следующей причине|следующим причинам}}: -* (The action cannot be performed for the following reason[s]) -* @param $count int -* @param $forms array -* -* @return string -*/ - function convertPlural( $count, $forms ) { - $forms = $this-handleExplicitPluralForms( $count, $forms ); - if ( is_string( $forms ) ) { - return $forms; - } - if ( !count( $forms ) ) { - return ''; - } - - // If the actual number is not mentioned in the expression, then just two forms are enough: - // singular for $count === 1 - // plural for $count !== 1 - // For example, This user belongs to {{PLURAL:$1|one group|several groups}}. - if ( count( $forms ) === 2 ) { - return $count === 1 ? $forms[0] : $forms[1]; - } - - // @todo FIXME: CLDR defines 4 plural forms. Form with decimals missing. - // See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#ru - $forms = $this-preConvertPlural( $forms, 3 ); - - if ( $count 10 (int)floor( ( $count % 100 ) / 10 ) === 1 ) { - return $forms[2]; - } - - switch ( $count % 10 ) { - case 1: - return $forms[0]; - case 2: - case 3: - case 4: - return $forms[1]; - default: - return $forms[2]; - } } /** diff --git a/tests/phpunit/languages/LanguageRuTest.php b/tests/phpunit/languages/LanguageRuTest.php index ac18276..e17c708 100644 --- a/tests/phpunit/languages/LanguageRuTest.php +++ b/tests/phpunit/languages/LanguageRuTest.php @@ -13,7 +13,7 @@ * @covers Language::convertPlural */ public function testPlural( $result, $value ) { - $forms = array( 'one', 'few', 'many', 'other' ); + $forms = array( 'one', 'many', 'other' ); $this-assertEquals( $result, $this-getLang()-convertPlural( $value, $forms ) ); } @@ -22,9 +22,9 @@ * @covers Language::convertPlural */ public function
[MediaWiki-commits] [Gerrit] (bug 59227) retry on internal_api_error_ReadOnlyError - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 59227) retry on internal_api_error_ReadOnlyError .. (bug 59227) retry on internal_api_error_ReadOnlyError Change-Id: I0faa929103a92d4de7f9691293c547c20abba212 --- M pywikibot/data/api.py 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 2c20e37..141b6d9 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -389,7 +389,9 @@ uPausing due to database lag: + info) self.site.throttle.lag(int(lag.group(lag))) continue -if code in (u'internal_api_error_DBConnectionError', u'internal_api_error_DBQueryError'): +if code in (u'internal_api_error_DBConnectionError', +u'internal_api_error_DBQueryError', +u'internal_api_error_ReadOnlyError'): self.wait() continue # raise error -- To view, visit https://gerrit.wikimedia.org/r/105099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0faa929103a92d4de7f9691293c547c20abba212 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Multichill maar...@mdammers.nl Gerrit-Reviewer: Xqt i...@gno.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] New schema for transaction source metadata - change (wikimedia...crm)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/105149 Change subject: New schema for transaction source metadata .. New schema for transaction source metadata Change-Id: Ib820f16ab8dad2c6570c9c3d8f37cb342f6c3cf8 --- M sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install 1 file changed, 145 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/49/105149/1 diff --git a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install index 6ff8bb8..1a18890 100644 --- a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.install @@ -16,6 +16,7 @@ wmf_civicrm_update_6009(); wmf_civicrm_update_6010(); wmf_civicrm_update_6011(); +wmf_civicrm_update_6012(); } /** @@ -541,3 +542,147 @@ drupal_set_message(Key already exists?: + $ex-getMessage()); } } + +/** + * Add source metadata fields + */ +function wmf_civicrm_update_6012() +{ +$api = wmf_civicrm_bootstrap_civi(); + +$success = $api-CustomGroup-get(array( +'name' = 'contribution_extra', +)); +if (!$success) { +throw new Exception($api-errorMsg()); +} +$values = $api-values(); +$custom_group = array_pop($values); + +$success = $api-CustomField-create(array( +'custom_group_id' = $custom_group-id, +'name' = 'source_name', +'column_name' = 'source_name', +'label' = ts('Source Name'), +'data_type' = 'String', +'html_type' = 'Text', +'is_active' = 1, +'is_searchable' = 1, +'is_view' = 1, +)); +if (!$success) { +$ret[] = $api-errorMsg(); +} + +$success = $api-CustomField-create(array( +'custom_group_id' = $custom_group-id, +'name' = 'Source Type', +'column_name' = 'source_type', +'label' = ts('Source Type'), +'data_type' = 'String', +'html_type' = 'Text', +'is_active' = 1, +'is_searchable' = 1, +'is_view' = 1, +)); +if (!$success) { +$ret[] = $api-errorMsg(); +} + +$success = $api-CustomField-create(array( +'custom_group_id' = $custom_group-id, +'name' = 'source_server', +'column_name' = 'source_server', +'label' = ts('Source Server'), +'data_type' = 'String', +'html_type' = 'Text', +'is_active' = 1, +'is_searchable' = 1, +'is_view' = 1, +)); +if (!$success) { +$ret[] = $api-errorMsg(); +} + +$success = $api-CustomField-create(array( +'custom_group_id' = $custom_group-id, +'name' = 'enqueued_at', +'column_name' = 'enqueued_at', +'label' = ts('Enqueued At Timestamp'), +'data_type' = 'Date', +'html_type' = 'Select Date', +'is_active' = 1, +'is_searchable' = 1, +'is_search_range' = 1, +'is_view' = 1, +'date_format' = 'M d, yy', +'time_format' = 2, +)); +if (!$success) { +$ret[] = $api-errorMsg(); +} + +$success = $api-CustomField-create(array( +'custom_group_id' = $custom_group-id, +'name' = 'source_version', +'column_name' = 'source_version', +'label' = ts('Source Version'), +'data_type' = 'String', +'html_type' = 'Text', +'is_active' = 1, +'is_searchable' = 1, +'is_view' = 1, +)); +if (!$success) { +$ret[] = $api-errorMsg(); +} + +$success = $api-CustomField-create(array( +'custom_group_id' = $custom_group-id, +'name' = 'source_job', +'column_name' = 'source_job', +'label' = ts('Source Job ID'), +'data_type' = 'String', +'html_type' = 'Text', +'is_active' = 1, +'is_searchable' = 1, +'is_view' = 1, +)); +if (!$success) { +$ret[] = $api-errorMsg(); +} + +$success = $api-CustomField-create(array( +'custom_group_id' = $custom_group-id, +'name' = 'damaged_requeue_count', +'column_name' = 'damaged_requeue_count', +'label' = ts('Damaged Requeue Count'), +'data_type' = 'Int', +'html_type' = 'Text', +'is_active' = 1, +'is_searchable' = 1, +'is_search_range' = 1, +'is_view' = 1, +)); +if (!$success) { +$ret[] = $api-errorMsg(); +} + +$success = $api-CustomField-create(array( +'custom_group_id' = $custom_group-id, +'name' = 'delay_retry_count', +'column_name' = 'delay_retry_count', +'label' = ts('Delay-Retry Count'), +'data_type' = 'Int', +'html_type' = 'Text', +'is_active' = 1, +'is_searchable' = 1, +'is_search_range' = 1, +
[MediaWiki-commits] [Gerrit] Update Russian(ru) plural rules to CLDR 24 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update Russian(ru) plural rules to CLDR 24 .. Update Russian(ru) plural rules to CLDR 24 Russian (ru) plural rules have a major change. The 'few' form is merged with the 'other' form. The current forms are 'one', 'many', 'other'. In MW ru plural rules were overridden using convertPlural methdod in LanguagesRu.php with 3 forms. Effectively forms[1] and forms[2] are swapped. Followup: I9930b290d004667a3bb09e5c1663ec2c9c27d8a6 Bug: 56931 Change-Id: Ia5779e42315d3f41f52dce2bfffaee0a4297d23b --- M languages/classes/LanguageRu.php M tests/phpunit/languages/LanguageRuTest.php 2 files changed, 11 insertions(+), 68 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/classes/LanguageRu.php b/languages/classes/LanguageRu.php index 243a876..d3ac1d2 100644 --- a/languages/classes/LanguageRu.php +++ b/languages/classes/LanguageRu.php @@ -44,8 +44,9 @@ return $wgGrammarForms['ru'][$case][$word]; } - # These rules are not perfect, but they are currently only used for Wikimedia site names so it doesn't - # matter if they are wrong sometimes. Just add a special case for your site name if necessary. + # These rules are not perfect, but they are currently only used for Wikimedia + # site names so it doesn't matter if they are wrong sometimes. + # Just add a special case for your site name if necessary. # substr doesn't support Unicode and mb_substr has issues, # so break it to characters using preg_match_all and then use array_slice and join @@ -100,62 +101,6 @@ } return $word; - } - - /** -* Plural form transformations -* -* $forms[0] - singular form (for 1, 21, 31, 41...) -* $forms[1] - paucal form (for 2, 3, 4, 22, 23, 24, 32, 33, 34...) -* $forms[2] - plural form (for 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26...) -* -* Examples: -* message with number -* Сделано $1 {{PLURAL:$1|изменение|изменения|изменений}} -* ($1 change[s] were made) -* message without number -* Действие не может быть выполнено по {{PLURAL:$1|следующей причине|следующим причинам}}: -* (The action cannot be performed for the following reason[s]) -* @param $count int -* @param $forms array -* -* @return string -*/ - function convertPlural( $count, $forms ) { - $forms = $this-handleExplicitPluralForms( $count, $forms ); - if ( is_string( $forms ) ) { - return $forms; - } - if ( !count( $forms ) ) { - return ''; - } - - // If the actual number is not mentioned in the expression, then just two forms are enough: - // singular for $count === 1 - // plural for $count !== 1 - // For example, This user belongs to {{PLURAL:$1|one group|several groups}}. - if ( count( $forms ) === 2 ) { - return $count === 1 ? $forms[0] : $forms[1]; - } - - // @todo FIXME: CLDR defines 4 plural forms. Form with decimals missing. - // See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#ru - $forms = $this-preConvertPlural( $forms, 3 ); - - if ( $count 10 (int)floor( ( $count % 100 ) / 10 ) === 1 ) { - return $forms[2]; - } - - switch ( $count % 10 ) { - case 1: - return $forms[0]; - case 2: - case 3: - case 4: - return $forms[1]; - default: - return $forms[2]; - } } /** diff --git a/tests/phpunit/languages/LanguageRuTest.php b/tests/phpunit/languages/LanguageRuTest.php index ac18276..e17c708 100644 --- a/tests/phpunit/languages/LanguageRuTest.php +++ b/tests/phpunit/languages/LanguageRuTest.php @@ -13,7 +13,7 @@ * @covers Language::convertPlural */ public function testPlural( $result, $value ) { - $forms = array( 'one', 'few', 'many', 'other' ); + $forms = array( 'one', 'many', 'other' ); $this-assertEquals( $result, $this-getLang()-convertPlural( $value, $forms ) ); } @@ -22,9 +22,9 @@ * @covers Language::convertPlural */ public function testExplicitPlural() { - $forms =
[MediaWiki-commits] [Gerrit] fix parsoidsvc-jslint was not voting - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105151 Change subject: fix parsoidsvc-jslint was not voting .. fix parsoidsvc-jslint was not voting Change-Id: I38198fefe40ebdc7c85723896dc05b6f06c9613f --- M layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/51/105151/1 diff --git a/layout.yaml b/layout.yaml index b5bd57c..289d39e 100644 --- a/layout.yaml +++ b/layout.yaml @@ -362,7 +362,7 @@ voting: true # Being integrated.. - - name: ^parsoidsvc-jslint$ + - name: parsoidsvc-jslint voting: true # FIXME: work in progress -- To view, visit https://gerrit.wikimedia.org/r/105151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38198fefe40ebdc7c85723896dc05b6f06c9613f 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] (bug 59227) retry on all internal_api_error_s - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/105152 Change subject: (bug 59227) retry on all internal_api_error_s .. (bug 59227) retry on all internal_api_error_s follow-up for https://gerrit.wikimedia.org/r/#/c/105099/ Name of API exception is provided since r26140 https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiMain.php?pathrev=26140r1=26139r2=26140 Change-Id: Ic62a1e83130370f62f863de9ff313512754cac14 --- M pywikibot/data/api.py 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/52/105152/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 141b6d9..043cc52 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -389,9 +389,7 @@ uPausing due to database lag: + info) self.site.throttle.lag(int(lag.group(lag))) continue -if code in (u'internal_api_error_DBConnectionError', -u'internal_api_error_DBQueryError', -u'internal_api_error_ReadOnlyError'): +if code.startswith(u'internal_api_error_'): self.wait() continue # raise error -- To view, visit https://gerrit.wikimedia.org/r/105152 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic62a1e83130370f62f863de9ff313512754cac14 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix parsoidsvc-jslint was not voting - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: fix parsoidsvc-jslint was not voting .. fix parsoidsvc-jslint was not voting Change-Id: I38198fefe40ebdc7c85723896dc05b6f06c9613f --- M layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index b5bd57c..289d39e 100644 --- a/layout.yaml +++ b/layout.yaml @@ -362,7 +362,7 @@ voting: true # Being integrated.. - - name: ^parsoidsvc-jslint$ + - name: parsoidsvc-jslint voting: true # FIXME: work in progress -- To view, visit https://gerrit.wikimedia.org/r/105151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I38198fefe40ebdc7c85723896dc05b6f06c9613f Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Subramanya Sastry ssas...@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] MWMessagePack: improvements to test suite, exception handlin... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: MWMessagePack: improvements to test suite, exception handling, array detection .. MWMessagePack: improvements to test suite, exception handling, array detection * Throw InvalidArgumentException * Use data provider in unit tests * Detect associative arrays without copying Per Tyler's post-merge review of Id2833c5a9. Change-Id: Iec6b135238ca5da3002944066843102f0ae8d23d --- M includes/libs/MWMessagePack.php M tests/phpunit/includes/libs/MWMessagePackTest.php 2 files changed, 69 insertions(+), 62 deletions(-) Approvals: Parent5446: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/MWMessagePack.php b/includes/libs/MWMessagePack.php index b44635d..c61e8f8 100644 --- a/includes/libs/MWMessagePack.php +++ b/includes/libs/MWMessagePack.php @@ -35,7 +35,7 @@ class MWMessagePack { /** @var boolean|null Whether current system is bigendian. **/ - public static $bigendian; + public static $bigendian = null; /** * Encode a value using MessagePack @@ -46,6 +46,7 @@ * * @param mixed $value * @return string +* @throws InvalidArgumentException if $value is an unsupported type or too long a string */ public static function pack( $value ) { if ( self::$bigendian === null ) { @@ -74,7 +75,7 @@ } elseif ( $length = 0x ) { return pack( 'CNa*', 0xDB, $length, $value ); } - throw new LengthException( String too long: $length (max: 4294967295). ); + throw new InvalidArgumentException( __METHOD__ . : string too long (length: $length; max: 4294967295) ); case 'integer': if ( $value = 0 ) { @@ -113,7 +114,7 @@ } if ( $value = -0x8000 ) { // int16 - $p = pack('s',$value); + $p = pack( 's', $value ); return self::$bigendian ? pack( 'Ca2', 0xD1, $p ) : pack( 'Ca2', 0xD1, strrev( $p ) ); @@ -135,16 +136,24 @@ : pack( 'Ca4a4', 0xD3, strrev( $p2 ), strrev( $p1 ) ); } } - throw new LengthException( 'Invalid integer: ' . $value ); + throw new InvalidArgumentException( __METHOD__ . : invalid integer '$value' ); case 'array': - $associative = array_values( $value ) !== $value; - $length = count( $value ); $buffer = ''; - + $length = count( $value ); if ( $length 0x ) { - throw new LengthException( Array too long: $length (max: 4294967295). ); + throw new InvalidArgumentException( __METHOD__ . : array too long (length: $length, max: 4294967295) ); } + + $index = 0; + foreach ( $value as $k = $v ) { + if ( $index !== $k || $index === $length ) { + break; + } else { + $index++; + } + } + $associative = $index !== $length; if ( $associative ) { if ( $length 16 ) { @@ -173,7 +182,7 @@ return $buffer; default: - throw new LengthException( 'Unsupported type: ' . gettype( $value ) ); + throw new InvalidArgumentException( __METHOD__ . ': unsupported type ' . gettype( $value ) ); } } } diff --git a/tests/phpunit/includes/libs/MWMessagePackTest.php b/tests/phpunit/includes/libs/MWMessagePackTest.php index de5848d..b99ef86 100644 --- a/tests/phpunit/includes/libs/MWMessagePackTest.php +++ b/tests/phpunit/includes/libs/MWMessagePackTest.php @@ -5,68 +5,66 @@ */ class MWMessagePackTest extends MediaWikiTestCase { - /* @var array Array of test cases, keyed by type. Each type is an array of -* (value, expected encoding as hex string). The expected values were -* generated using https://github.com/onlinecity/msgpack-php, which -* includes a serialization function. + /** +* Provides test cases for MWMessagePackTest::testMessagePack +* +
[MediaWiki-commits] [Gerrit] grabText: Don't store entire list of pages in memory - change (mediawiki...grabbers)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/105153 Change subject: grabText: Don't store entire list of pages in memory .. grabText: Don't store entire list of pages in memory Process each page as we receive it, shouldn't have any major speed implications since the exact same processing will happen, just at a different point. Bug: 58531 Change-Id: If05ae8325219349d675ab4378c5e0d7b22d71017 --- M grabText.php 1 file changed, 7 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/grabbers refs/changes/53/105153/1 diff --git a/grabText.php b/grabText.php index 027f8e7..58639a8 100755 --- a/grabText.php +++ b/grabText.php @@ -109,7 +109,7 @@ $this-output( Generating page list - $pageCount expected...\n ); $pageCount = 0; - $pageList = array(); + $doneCount = 0; foreach ( $textNamespaces as $ns ) { $nsPageCount = 0; @@ -137,7 +137,11 @@ $resultsCount = 0; foreach ( $pages as $page ) { - $pageList[] = $page; + $this-processPage( $page ); + $doneCount++; + if ( $doneCount % 500 === 0 ) { + $this-output( $doneCount\n ); + } $resultsCount++; } $nsPageCount += $resultsCount; @@ -159,20 +163,7 @@ $this-output( $nsPageCount pages found in namespace $ns.\n ); $pageCount += $nsPageCount; } - $this-output( \nPage list saved - found $pageCount total pages.\n ); - $this-output( \n ); - - $this-output( Saving all pages, including text, edit history and protection settings...\n ); - - $currentPage = 0; - $this-output( 0 pages committed...\n ); - foreach ( $pageList as $page ) { - $this-processPage( $page ); - $currentPage++; - if ( $currentPage % 500 == 0 ) { - $this-output( $currentPage\n ); - } - } + $this-output( \nDone - found $pageCount total pages.\n ); # Print skipped list $this-output( \nPage IDs skipped (not found): ); -- To view, visit https://gerrit.wikimedia.org/r/105153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If05ae8325219349d675ab4378c5e0d7b22d71017 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/grabbers Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Redo: Rm change_category func from category_redirect.py - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Redo: Rm change_category func from category_redirect.py .. Redo: Rm change_category func from category_redirect.py Bug which was caused by this change is solved now. Change-Id: Ib368eb96a4d8e5459423f4739ba3a4dc7c63f790 --- M scripts/category_redirect.py 1 file changed, 4 insertions(+), 57 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py index fa7474b..1a018d4 100755 --- a/scripts/category_redirect.py +++ b/scripts/category_redirect.py @@ -79,59 +79,6 @@ self.edit_request_item = i18n.twtranslate( self.site.lang, 'category_redirect-edit-request-item') -def change_category(self, article, oldCat, newCat, comment=None, -sortKey=None): -Given an article in category oldCat, moves it to category newCat. -Moves subcategories of oldCat as well. oldCat and newCat should be -Category objects. If newCat is None, the category will be removed. - -This is a copy of portions of [old] catlib.change_category(), with -some changes. - - -oldtext = article.get(get_redirect=True, force=True) -if newCat in article.categories() or newCat == article: -newtext = pywikibot.replaceCategoryInPlace(oldtext, oldCat, None, - site=self.site) -else: -newtext = pywikibot.replaceCategoryInPlace(oldtext, oldCat, newCat, - site=self.site) -try: -# even if no changes, still save the page, in case it needs -# an update due to changes in a transcluded template -article.put(newtext, comment) -if newtext == oldtext: -pywikibot.output(u'No changes made in page %s.' - % article.title(asLink=True)) -return False -return True -except pywikibot.EditConflict: -pywikibot.output(u'Skipping %s because of edit conflict' - % article.title(asLink=True)) -except pywikibot.LockedPage: -pywikibot.output(u'Skipping locked page %s' - % article.title(asLink=True)) -self.edit_requests.append({ -'title': article.title(asLink=True, textlink=True), -'oldcat': oldCat.title(asLink=True, textlink=True), -'newcat': newCat.title(asLink=True, textlink=True)}) -except pywikibot.SpamfilterError as error: -pywikibot.output( -u'Changing page %s blocked by spam filter (URL=%s)' -% (article.title(asLink=True), error.url)) -except pywikibot.NoUsername: -pywikibot.output( -uPage %s not saved; sysop privileges required. -% article.title(asLink=True)) -self.edit_requests.append({ -'title': article.title(asLink=True, textlink=True), -'oldcat': oldCat.title(asLink=True, textlink=True), -'newcat': newCat.title(asLink=True, textlink=True)}) -except pywikibot.PageNotSaved as error: -pywikibot.output(uSaving page %s failed: %s - % (article.title(asLink=True), error)) -return False - def move_contents(self, oldCatTitle, newCatTitle, editSummary): The worker function that moves pages out of oldCat into newCat while True: @@ -148,8 +95,8 @@ found, moved = 0, 0 for article in oldCat.members(): found += 1 -changed = self.change_category(article, oldCat, newCat, - comment=comment) +changed = article.change_category(oldCat, newCat, + comment=comment) if changed: moved += 1 @@ -164,8 +111,8 @@ old_text = doc.get() except pywikibot.Error: continue -changed = self.change_category(doc, oldCat, newCat, - comment=comment) +changed = doc.change_category(oldCat, newCat, + comment=comment) if changed: moved += 1 -- To view, visit https://gerrit.wikimedia.org/r/105076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib368eb96a4d8e5459423f4739ba3a4dc7c63f790 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master
[MediaWiki-commits] [Gerrit] Changed the font-size for decription in lightbox - change (mediawiki...MultimediaViewer)
Apsdehal has uploaded a new change for review. https://gerrit.wikimedia.org/r/105154 Change subject: Changed the font-size for decription in lightbox .. Changed the font-size for decription in lightbox Bug: 56445 Change-Id: I0d553d5089768df597a48fa0c696b5a8d29d34c7 --- M resources/ext.multimediaViewer/ext.multimediaViewer.css 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/54/105154/1 diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.css b/resources/ext.multimediaViewer/ext.multimediaViewer.css index f85d708..7027f91 100644 --- a/resources/ext.multimediaViewer/ext.multimediaViewer.css +++ b/resources/ext.multimediaViewer/ext.multimediaViewer.css @@ -153,6 +153,7 @@ } .mw-mlb-image-desc { + font-size: 0.8em; color: #6f7073; } -- To view, visit https://gerrit.wikimedia.org/r/105154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d553d5089768df597a48fa0c696b5a8d29d34c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Apsdehal amanpreet.iitr2...@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 58944 - site.mediawiki_message: support multiple messages - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Bug 58944 - site.mediawiki_message: support multiple messages .. Bug 58944 - site.mediawiki_message: support multiple messages Added site.mediawiki_messages() added to handle request of several messages. https://bugzilla.wikimedia.org/show_bug.cgi?id=58944 Change-Id: I64710f67c04a0d2b93c70d9edd472f8bab4ce309 --- M pywikibot/site.py M tests/site_tests.py 2 files changed, 42 insertions(+), 14 deletions(-) Approvals: Mpaa: Looks good to me, but someone else must approve Xqt: Looks good to me, approved Merlijn van Deen: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/pywikibot/site.py b/pywikibot/site.py index a090d04..d51ae54 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -997,24 +997,42 @@ self.login(sysop) return 'hasmsg' in self._userinfo +def mediawiki_messages(self, keys): +Return the MediaWiki message text for each 'key' in keys + in a dict: + -. dict['key'] = text message + + + +if not all(_key in self._msgcache for _key in keys): +msg_query = api.QueryGenerator( +site=self, +meta=allmessages, +ammessages='|'.join(keys), +) +for _key in keys: +for msg in msg_query: +if msg['name'] == _key and not 'missing' in msg: +self._msgcache[_key] = msg['*'] +break +else: +raise KeyError(Site %(self)s has no message '%(_key)s' + % locals()) + +return dict((_key, self._msgcache[_key]) for _key in keys) + def mediawiki_message(self, key): -Return the MediaWiki message text for key key -if not key in self._msgcache: -msg_query = api.QueryGenerator(site=self, meta=allmessages, - ammessages=key) -for msg in msg_query: -if msg['name'] == key and not 'missing' in msg: -self._msgcache[key] = msg['*'] -break -else: -raise KeyError(Site %(self)s has no message '%(key)s' - % locals()) -return self._msgcache[key] +Return the MediaWiki message text for key 'key' +return self.mediawiki_messages([key])[key] def has_mediawiki_message(self, key): -Return True iff this site defines a MediaWiki message for 'key'. +Return True if this site defines a MediaWiki message for 'key' +return self.has_all_mediawiki_messages([key]) + +def has_all_mediawiki_messages(self, keys): +Return True if this site defines MediaWiki messages for all 'keys'; False otherwise. try: -v = self.mediawiki_message(key) +v = self.mediawiki_messages(keys) return True except KeyError: return False diff --git a/tests/site_tests.py b/tests/site_tests.py index ce7b930..ee86e70 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -144,12 +144,22 @@ except pywikibot.NoUsername: pywikibot.warning( Cannot test Site methods for sysop; no sysop account configured.) + for msg in (1movedto2, about, aboutpage, aboutsite, accesskey-n-portal): self.assertTrue(mysite.has_mediawiki_message(msg)) self.assertType(mysite.mediawiki_message(msg), basestring) self.assertFalse(mysite.has_mediawiki_message(nosuchmessage)) self.assertRaises(KeyError, mysite.mediawiki_message, nosuchmessage) + +msg = (1movedto2, about, aboutpage) +self.assertType(mysite.mediawiki_messages(msg), dict) +self.assertTrue(mysite.mediawiki_messages(msg)) + +msg = (1movedto2, about, aboutpage, nosuchmessage) +self.assertFalse(mysite.has_all_mediawiki_messages(msg)) +self.assertRaises(KeyError, mysite.mediawiki_messages, msg) + self.assertType(mysite.getcurrenttimestamp(), basestring) self.assertType(mysite.siteinfo, dict) self.assertType(mysite.case(), basestring) -- To view, visit https://gerrit.wikimedia.org/r/104211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64710f67c04a0d2b93c70d9edd472f8bab4ce309 Gerrit-PatchSet: 8 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mpaa mpaa.w...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Mpaa mpaa.w...@gmail.com Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] remove deprecate_arg savetitle for Page.delete() - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/105155 Change subject: remove deprecate_arg savetitle for Page.delete() .. remove deprecate_arg savetitle for Page.delete() Change-Id: I2babd3db634a62af5f68636962a8acab3e16b1d9 --- M pywikibot/page.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/55/105155/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index f337482..a510fe1 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -125,7 +125,7 @@ @deprecate_arg(decode, None) @deprecate_arg(savetitle, asUrl) -def title(self, underscore=False, savetitle=False, withNamespace=True, +def title(self, underscore=False, withNamespace=True, withSection=True, asUrl=False, asLink=False, allowInterwiki=True, forceInterwiki=False, textlink=False, as_filename=False): -- To view, visit https://gerrit.wikimedia.org/r/105155 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2babd3db634a62af5f68636962a8acab3e16b1d9 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Turn HTMLBlockedUsersItemSelect into HTMLSelectLimitField - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/105156 Change subject: Turn HTMLBlockedUsersItemSelect into HTMLSelectLimitField .. Turn HTMLBlockedUsersItemSelect into HTMLSelectLimitField Makes it a real HTMLForm option that other code can re-use Change-Id: If0fb7332daf991b790bbf87e825229dccb10b360 --- M includes/AutoLoader.php M includes/htmlform/HTMLForm.php A includes/htmlform/HTMLSelectLimitField.php M includes/specials/SpecialBlockList.php 4 files changed, 35 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/105156/1 diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 5b99c8d..1a725a6 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -110,6 +110,7 @@ 'HTMLRadioField' = 'includes/htmlform/HTMLRadioField.php', 'HTMLSelectAndOtherField' = 'includes/htmlform/HTMLSelectAndOtherField.php', 'HTMLSelectField' = 'includes/htmlform/HTMLSelectField.php', + 'HTMLSelectLimitField' = 'includes/htmlform/HTMLSelectLimitField.php', 'HTMLSelectOrOtherField' = 'includes/htmlform/HTMLSelectOrOtherField.php', 'HTMLSubmitField' = 'includes/htmlform/HTMLSubmitField.php', 'HTMLTextAreaField' = 'includes/htmlform/HTMLTextAreaField.php', @@ -926,7 +927,6 @@ 'EmailInvalidation' = 'includes/specials/SpecialConfirmemail.php', 'FewestrevisionsPage' = 'includes/specials/SpecialFewestrevisions.php', 'FileDuplicateSearchPage' = 'includes/specials/SpecialFileDuplicateSearch.php', - 'HTMLBlockedUsersItemSelect' = 'includes/specials/SpecialBlockList.php', 'ImageListPager' = 'includes/specials/SpecialListfiles.php', 'ImportReporter' = 'includes/specials/SpecialImport.php', 'IPBlockForm' = 'includes/specials/SpecialBlock.php', diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 0aea070..b1ae18f 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -101,6 +101,7 @@ 'select' = 'HTMLSelectField', 'radio' = 'HTMLRadioField', 'multiselect' = 'HTMLMultiSelectField', + 'limitselect' = 'HTMLSelectLimitField', 'check' = 'HTMLCheckField', 'toggle' = 'HTMLCheckField', 'int' = 'HTMLIntField', diff --git a/includes/htmlform/HTMLSelectLimitField.php b/includes/htmlform/HTMLSelectLimitField.php new file mode 100644 index 000..c2d574d --- /dev/null +++ b/includes/htmlform/HTMLSelectLimitField.php @@ -0,0 +1,32 @@ +?php + +/** + * A limit dropdown, which accepts any valid number + */ +class HTMLSelectLimitField extends HTMLSelectField { + /** +* Basically don't do any validation, except checking +* it's a real number. +* Also, add it to the list if it's not there already. +* +* @param $value +* @param $alldata +* @return bool +*/ + function validate( $value, $alldata ) { + if ( $value == '' ) { + return true; + } + + // Let folks pick an explicit limit not from our list, as long as it's a real numbr. + if ( !in_array( $value, $this-mParams['options'] ) $value == intval( $value ) $value 0 ) { + // This adds the explicitly requested limit value to the drop-down, + // then makes sure it's sorted correctly so when we output the list + // later, the custom option doesn't just show up last. + $this-mParams['options'][$this-mParent-getLanguage()-formatNum( $value )] = intval( $value ); + asort( $this-mParams['options'] ); + } + + return true; + } +} diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index 4e7043d..37ebbc0 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -83,7 +83,7 @@ 'flatlist' = true, ), 'Limit' = array( - 'class' = 'HTMLBlockedUsersItemSelect', + 'type' = 'limitselect', 'label-message' = 'table_pager_limit_label', 'options' = array( $lang-formatNum( 20 ) = 20, @@ -450,35 +450,5 @@ $lb-execute(); wfProfileOut( __METHOD__ ); - } -} - -/** - * Items per page dropdown. Essentially a crap workaround for bug 32603. - */ -class HTMLBlockedUsersItemSelect extends HTMLSelectField { - /** -* Basically don't do any validation. If it's a number that's fine. Also, -* add it to
[MediaWiki-commits] [Gerrit] bug 17630 fix; added aditional check if anonymous user can c... - change (mediawiki/core)
Cargan has uploaded a new change for review. https://gerrit.wikimedia.org/r/105158 Change subject: bug 17630 fix; added aditional check if anonymous user can create/edit none existing page, if not display permission error .. bug 17630 fix; added aditional check if anonymous user can create/edit none existing page, if not display permission error Change-Id: Idf5e1a9d33640bef796dbfbf833db618de4f177e --- M includes/Title.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/105158/1 diff --git a/includes/Title.php b/includes/Title.php index ee9ce8a..ac70321 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1893,6 +1893,11 @@ // Show user page-specific message only if the user can move other pages $errors[] = array( 'cant-move-to-user-page' ); } + } elseif ( $action == 'edit' !$user-isAllowed( 'edit' )) { + if ( $user-isAnon() ) { + $errors[] = array( 'noarticletext-nopermission'); + $errors[] = $this-missingPermissionError( $action, $short ); + } } elseif ( !$user-isAllowed( $action ) ) { $errors[] = $this-missingPermissionError( $action, $short ); } -- To view, visit https://gerrit.wikimedia.org/r/105158 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf5e1a9d33640bef796dbfbf833db618de4f177e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cargan zie...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: (FR #1285) Munge logs for source metadata - change (wikimedia...tools)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/105159 Change subject: WIP: (FR #1285) Munge logs for source metadata .. WIP: (FR #1285) Munge logs for source metadata Change-Id: I23582aa6c054b7e203d700394999b9a4abf81d83 --- A forensic/__init__.py A forensic/legacy_paypal_logs.py A forensic/metadata.py A forensic/php_deserializer.py 4 files changed, 92 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools refs/changes/59/105159/1 diff --git a/forensic/__init__.py b/forensic/__init__.py new file mode 100644 index 000..e69de29 --- /dev/null +++ b/forensic/__init__.py diff --git a/forensic/legacy_paypal_logs.py b/forensic/legacy_paypal_logs.py new file mode 100644 index 000..a09db7c --- /dev/null +++ b/forensic/legacy_paypal_logs.py @@ -0,0 +1,46 @@ +import re +from dateutil import parser as dateparser +from calendar import timegm + +import php_deserializer +import metadata + +date_pat = r\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2} +logline_pat = r(?msx) +^(?Ptime{date_pat})\s +\d+_\d+\s +(?Pline.+?) +(?=\s{date_pat}\s|\Z) +.format(date_pat=date_pat) + +def parse_line(entry): +timestamp = timegm(dateparser.parse(entry['time']).utctimetuple()) +if entry['line'].startswith('Attempting to parse: Array'): +msg = php_deserializer.parse_print_r(entry['line'][len(Attempting to parse: ):]) +if not msg or not hasattr(msg, 'update'): +raise RuntimeError(Bad msg format: + entry['line']) +if 'txn_id' in msg: +id = msg['txn_id'] +elif 'subscr_id' in msg: +id = msg['subscr_id'] +else: +raise RuntimeError(Bad msg format: + entry['line']) + +metadata.dump_metadata( +source_name='PayPal IPN', +source_type='listener', +gateway='paypal', +gateway_txn_id=id, +enqueued_at=timestamp +) + + +if __name__ == '__main__': +filename = /home/adamw/work/ipn-out.log + +contents = open(filename, r).read() + +matches = re.finditer(logline_pat, contents) + +for m in matches: +parse_line(m.groupdict()) diff --git a/forensic/metadata.py b/forensic/metadata.py new file mode 100644 index 000..2584e9f --- /dev/null +++ b/forensic/metadata.py @@ -0,0 +1,11 @@ +import json + +def dump_metadata(source_name=None, source_type=None, enqueued_at=None, gateway=None, gateway_txn_id=None): +# FIXME: yuck, don't stutter here +print(json.dumps({ +'source_name': source_name, +'source_type': source_type, +'enqueued_at': enqueued_at, +'gateway_txn_id': gateway_txn_id, +'gateway': gateway, +})) diff --git a/forensic/php_deserializer.py b/forensic/php_deserializer.py new file mode 100644 index 000..b5b7a3a --- /dev/null +++ b/forensic/php_deserializer.py @@ -0,0 +1,35 @@ +import re + +def parse_print_r(text): +array_pat = r(?msx) +Array\s +(?Pindentation\s*)[(]$ +\s +.* # members +\s +(?P=indentation)[)]\s* + + +m = re.search(array_pat, text) +if m: +out = {} +member_pat = r(?msx) +{field_indentation}[[](?Pname[^]]+)[]] +\s=\s +(?Pvalue.*?|{array_pat})$ +(?=\s{field_indentation}[[]|\s{end_indentation}[)]) +.format( +array_pat=array_pat, +end_indentation=m.group(indentation).replace( ,r'\s'), +field_indentation=(m.group(indentation) + ).replace( ,r'\s') +) +members = re.finditer(member_pat, text) +for row in members: +if row.group(value).startswith(Array): +out[row.group(name)] = parse_print_r(row.group(value)) +else: +# TODO: do we care about EOL conversion or trimming? +out[row.group(name)] = row.group(value) +return out +else: +return text -- To view, visit https://gerrit.wikimedia.org/r/105159 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23582aa6c054b7e203d700394999b9a4abf81d83 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools Gerrit-Branch: master Gerrit-Owner: Adamw awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] multigit: fetch branches from Gerrit, not Zuul - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105161 Change subject: multigit: fetch branches from Gerrit, not Zuul .. multigit: fetch branches from Gerrit, not Zuul Would attempt to make repositories to use the same branch as the one that triggered the patch. The script would fetch the branch from Zuul which is most probably not the actual branch in the Gerrit repository. Instead, make the origin repository either the local Gerrit replica or the Gerrit distant repo. The Zuul patches are still fetched from Zuul repositories though. bug: 59224 Change-Id: I6a602ab35accf4b407a4d6bbae9e26b47d840ddc --- M bin/multigit.sh 1 file changed, 16 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/61/105161/1 diff --git a/bin/multigit.sh b/bin/multigit.sh index e85c3f1..e9e1806 100755 --- a/bin/multigit.sh +++ b/bin/multigit.sh @@ -32,14 +32,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -# URL to fetch ZUUL references from. Hosted +# URL to fetch ZUUL references from. ZUUL_URL=git://integration.wikimedia.org + +# URL to fetch from Gerrit (reference repository) +GERRIT_URL=https://gerrit.wikimedia.org/r/p; # Url to the Gerrit change GERRIT_CHANGE=https://gerrit.wikimedia.org/r/#/c/$ZUUL_CHANGE/$ZUUL_PATCHSET; # Base path for locally replicated repositories. -# Used by git clone with --reference GERRIT_REFERENCE=${GERRIT_REFERENCE:-/srv/ssd/gerrit} echo Change triggered by $GERRIT_CHANGE @@ -81,26 +83,25 @@ # Clone or refresh repository + # Fetch from the locally replicated Gerrit repository if it exist or simply + # fallback to Gerrit. + ref_repo=$GERRIT_REFERENCE/${project}.git + if [[ ! -d $ref_repo ]]; then + ref_repo=$GERRIT_URL/$project + fi + # Variable used for display purposes action_done=cloning if [[ -d $dest/.git ]]; then echo Refreshing $project in $dest action_done=refreshing - (cd $dest git remote update) + cd $dest + git remote set-url origin $ref_repo + git fetch origin else if [[ ! -d $dest ]]; then echo Cloning $project in $dest - if [ ! -d $GERRIT_REFERENCE ]; then - echo WARNING $GERRIT_REFERENCE not a directory - echo WARNING cloning without --reference - git clone $ZUUL_URL/$project $dest - else - ref_repo=${GERRIT_REFERENCE}/${project}.git - echo Cloning with reference repository $ref_repo - git clone --reference=$ref_repo \ - $ZUUL_URL/$project $dest - fi - + git clone $ref_repo $dest else # Workaround cloning in $WORKSPACE # Git refuses to clone at an existing directory @@ -108,7 +109,7 @@ action_done=initing cd $dest git init . - git remote add origin $ZUUL_URL/$project + git remote add origin $ref_repo git fetch origin fi fi -- To view, visit https://gerrit.wikimedia.org/r/105161 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a602ab35accf4b407a4d6bbae9e26b47d840ddc Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins 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] multigit: GERRIT_URL - GERRIT_CHANGE - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: multigit: GERRIT_URL - GERRIT_CHANGE .. multigit: GERRIT_URL - GERRIT_CHANGE Change-Id: I60b54f8d70e4d51d1670357cc6f02ea4fe1e1381 --- M bin/multigit.sh 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/multigit.sh b/bin/multigit.sh index 01b2ecd..e85c3f1 100755 --- a/bin/multigit.sh +++ b/bin/multigit.sh @@ -36,13 +36,13 @@ ZUUL_URL=git://integration.wikimedia.org # Url to the Gerrit change -GERRIT_URL=https://gerrit.wikimedia.org/r/#/c/$ZUUL_CHANGE/$ZUUL_PATCHSET; +GERRIT_CHANGE=https://gerrit.wikimedia.org/r/#/c/$ZUUL_CHANGE/$ZUUL_PATCHSET; # Base path for locally replicated repositories. # Used by git clone with --reference GERRIT_REFERENCE=${GERRIT_REFERENCE:-/srv/ssd/gerrit} -echo Change triggered by $GERRIT_URL +echo Change triggered by $GERRIT_CHANGE echo echo Triggering informations: echo Pipeline : $ZUUL_PIPELINE -- To view, visit https://gerrit.wikimedia.org/r/105160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60b54f8d70e4d51d1670357cc6f02ea4fe1e1381 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins 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] multigit: GERRIT_URL - GERRIT_CHANGE - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105160 Change subject: multigit: GERRIT_URL - GERRIT_CHANGE .. multigit: GERRIT_URL - GERRIT_CHANGE Change-Id: I60b54f8d70e4d51d1670357cc6f02ea4fe1e1381 --- M bin/multigit.sh 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/60/105160/1 diff --git a/bin/multigit.sh b/bin/multigit.sh index 01b2ecd..e85c3f1 100755 --- a/bin/multigit.sh +++ b/bin/multigit.sh @@ -36,13 +36,13 @@ ZUUL_URL=git://integration.wikimedia.org # Url to the Gerrit change -GERRIT_URL=https://gerrit.wikimedia.org/r/#/c/$ZUUL_CHANGE/$ZUUL_PATCHSET; +GERRIT_CHANGE=https://gerrit.wikimedia.org/r/#/c/$ZUUL_CHANGE/$ZUUL_PATCHSET; # Base path for locally replicated repositories. # Used by git clone with --reference GERRIT_REFERENCE=${GERRIT_REFERENCE:-/srv/ssd/gerrit} -echo Change triggered by $GERRIT_URL +echo Change triggered by $GERRIT_CHANGE echo echo Triggering informations: echo Pipeline : $ZUUL_PIPELINE -- To view, visit https://gerrit.wikimedia.org/r/105160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60b54f8d70e4d51d1670357cc6f02ea4fe1e1381 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins 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] Improve special page entity id handling - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Improve special page entity id handling .. Improve special page entity id handling This fixes the bad assumption that id == page title and it also the fixes the id preset in forms (this will fix Special:SetSiteLink/Q123) Change-Id: Ib101a96f29ee8ded3f91a8ca433dfea7b45e480e --- M repo/includes/specials/SpecialModifyEntity.php M repo/includes/specials/SpecialModifyTerm.php M repo/includes/specials/SpecialSetSiteLink.php 3 files changed, 6 insertions(+), 4 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/specials/SpecialModifyEntity.php b/repo/includes/specials/SpecialModifyEntity.php index 9913d9f..a1c9aed 100644 --- a/repo/includes/specials/SpecialModifyEntity.php +++ b/repo/includes/specials/SpecialModifyEntity.php @@ -261,7 +261,9 @@ * @return string */ protected function getFormElements() { - $id = $this-entityContent ? $this-entityContent-getTitle()-getText() : ''; + $id = $this-entityContent ? + $this-entityContent-getEntity()-getId()-getSerialization() : ''; + return Html::element( 'label', array( @@ -272,7 +274,7 @@ ) . Html::input( 'id', - $this-getRequest()-getVal( 'id' ), + $id, 'text', array( 'class' = 'wb-input', diff --git a/repo/includes/specials/SpecialModifyTerm.php b/repo/includes/specials/SpecialModifyTerm.php index 8ba47a3..4a6ef0b 100644 --- a/repo/includes/specials/SpecialModifyTerm.php +++ b/repo/includes/specials/SpecialModifyTerm.php @@ -168,7 +168,7 @@ )-parse() ) . Html::input( 'language', $this-language, 'hidden' ) - . Html::input( 'id', $this-entityContent-getTitle()-getText(), 'hidden' ) + . Html::input( 'id', $this-entityContent-getEntity()-getId()-getSerialization(), 'hidden' ) . Html::input( 'remove', 'remove', 'hidden' ) . $valueinput; } diff --git a/repo/includes/specials/SpecialSetSiteLink.php b/repo/includes/specials/SpecialSetSiteLink.php index 2a1a443..f34de52 100644 --- a/repo/includes/specials/SpecialSetSiteLink.php +++ b/repo/includes/specials/SpecialSetSiteLink.php @@ -189,7 +189,7 @@ )-parse() ) . Html::input( 'site', $this-site, 'hidden' ) - . Html::input( 'id', $this-entityContent-getTitle()-getText(), 'hidden' ) + . Html::input( 'id', $this-getEntity()-getId()-getSerialization(), 'hidden' ) . Html::input( 'remove', 'remove', 'hidden' ) . $pageinput; } -- To view, visit https://gerrit.wikimedia.org/r/104357 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib101a96f29ee8ded3f91a8ca433dfea7b45e480e Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Bene benestar.wikime...@googlemail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Hoo man h...@online.de 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] multigit: fetch branches from Gerrit, not Zuul - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: multigit: fetch branches from Gerrit, not Zuul .. multigit: fetch branches from Gerrit, not Zuul Would attempt to make repositories to use the same branch as the one that triggered the patch. The script would fetch the branch from Zuul which is most probably not the actual branch in the Gerrit repository. Instead, make the origin repository either the local Gerrit replica or the Gerrit distant repo. The Zuul patches are still fetched from Zuul repositories though. bug: 59224 Change-Id: I6a602ab35accf4b407a4d6bbae9e26b47d840ddc --- M bin/multigit.sh 1 file changed, 16 insertions(+), 15 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/multigit.sh b/bin/multigit.sh index e85c3f1..e9e1806 100755 --- a/bin/multigit.sh +++ b/bin/multigit.sh @@ -32,14 +32,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -# URL to fetch ZUUL references from. Hosted +# URL to fetch ZUUL references from. ZUUL_URL=git://integration.wikimedia.org + +# URL to fetch from Gerrit (reference repository) +GERRIT_URL=https://gerrit.wikimedia.org/r/p; # Url to the Gerrit change GERRIT_CHANGE=https://gerrit.wikimedia.org/r/#/c/$ZUUL_CHANGE/$ZUUL_PATCHSET; # Base path for locally replicated repositories. -# Used by git clone with --reference GERRIT_REFERENCE=${GERRIT_REFERENCE:-/srv/ssd/gerrit} echo Change triggered by $GERRIT_CHANGE @@ -81,26 +83,25 @@ # Clone or refresh repository + # Fetch from the locally replicated Gerrit repository if it exist or simply + # fallback to Gerrit. + ref_repo=$GERRIT_REFERENCE/${project}.git + if [[ ! -d $ref_repo ]]; then + ref_repo=$GERRIT_URL/$project + fi + # Variable used for display purposes action_done=cloning if [[ -d $dest/.git ]]; then echo Refreshing $project in $dest action_done=refreshing - (cd $dest git remote update) + cd $dest + git remote set-url origin $ref_repo + git fetch origin else if [[ ! -d $dest ]]; then echo Cloning $project in $dest - if [ ! -d $GERRIT_REFERENCE ]; then - echo WARNING $GERRIT_REFERENCE not a directory - echo WARNING cloning without --reference - git clone $ZUUL_URL/$project $dest - else - ref_repo=${GERRIT_REFERENCE}/${project}.git - echo Cloning with reference repository $ref_repo - git clone --reference=$ref_repo \ - $ZUUL_URL/$project $dest - fi - + git clone $ref_repo $dest else # Workaround cloning in $WORKSPACE # Git refuses to clone at an existing directory @@ -108,7 +109,7 @@ action_done=initing cd $dest git init . - git remote add origin $ZUUL_URL/$project + git remote add origin $ref_repo git fetch origin fi fi -- To view, visit https://gerrit.wikimedia.org/r/105161 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a602ab35accf4b407a4d6bbae9e26b47d840ddc Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins 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] CLDR 24 update - release notes - change (mediawiki/core)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/105162 Change subject: CLDR 24 update - release notes .. CLDR 24 update - release notes Follow up: I9930b290d004667a3bb09e5c1663ec2c9c27d8a6 Bug: 56931 Change-Id: Ic37276126dd615c2510c17455a5bbf5d8653045d --- M RELEASE-NOTES-1.23 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/105162/1 diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index d6263a7..a36892d 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -84,6 +84,11 @@ * (bug 57201) SpecialRecentChangesFilters hook is now executed for feeds. * (bug 58640) Fixed a compatibility issue with PCRE 8.34 that caused pages to appear blank or with missing text. +* (bug: 56931) Updated the plural rules to CLDR 24. They are in new format + which is detailed in UTS 35 Rev 33. The PHP parser and evaluator as well as + the JavaScript evaluator were updated to support the new format. Plural rules + for some languages have changed, most notably Russian. Affected software messages + have been automatically updated and marked for review at translatewiki.net. === Web API changes in 1.23 === * (bug 54884) action=parseprop=categories now indicates hidden and missing -- To view, visit https://gerrit.wikimedia.org/r/105162 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic37276126dd615c2510c17455a5bbf5d8653045d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed the details link if the user is already in details... - change (mediawiki...AbuseFilter)
01tonythomas has uploaded a new change for review. https://gerrit.wikimedia.org/r/105164 Change subject: Removed the details link if the user is already in details page .. Removed the details link if the user is already in details page Removed the line $actionLinks[] = $detailsLink; Patch courtesy: Sakshi Bansal Bug: 50808 Change-Id: I06a473550db79752aacb874f17f879f3b1ee1991 --- M special/SpecialAbuseLog.php 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/64/105164/1 diff --git a/special/SpecialAbuseLog.php b/special/SpecialAbuseLog.php index 30f8443..6f5c3e1 100644 --- a/special/SpecialAbuseLog.php +++ b/special/SpecialAbuseLog.php @@ -493,8 +493,7 @@ $this-msg( 'abusefilter-changeslist-examine' )-parse(), array() ); - - $actionLinks[] = $detailsLink; + $actionLinks[] = $examineLink; if ($diffLink) -- To view, visit https://gerrit.wikimedia.org/r/105164 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06a473550db79752aacb874f17f879f3b1ee1991 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: master Gerrit-Owner: 01tonythomas 01tonytho...@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] fix build error by malformed translation string - change (apps...commons)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/105165 Change subject: fix build error by malformed translation string .. fix build error by malformed translation string before this fix, when trying to build the commons app: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation :android-maven-plugin:3.6.0:generate-sources (default-generate-sources) on project commons.. ... Caused by: com.jayway.maven.plugins.android.ExecutionException: ANDROID-040-001: Could not execute: Command = /bin/sh -c if you execute the complete /bin/sh command that follow here you get more details: ./commons/commons/commons/res/values-fa/strings.xml:25: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted=false attribute? ./commons/commons/commons/res/values-fa/strings.xml:25: error: Unexpected end tag string this fixes that by copying the syntax from values-de/strings.xml Change-Id: Iadcab3fcd9dd3a6975dff51829d4966fff5e42b2 --- M commons/res/values-fa/strings.xml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/commons refs/changes/65/105165/1 diff --git a/commons/res/values-fa/strings.xml b/commons/res/values-fa/strings.xml index fe11bce..9078e82 100644 --- a/commons/res/values-fa/strings.xml +++ b/commons/res/values-fa/strings.xml @@ -22,7 +22,7 @@ string name=title_activity_contributionsبارگذاریهای من/string string name=contribution_state_queuedدر صف/string string name=contribution_state_failedناموفق بود/string - string name=contribution_state_in_progress%1$d%٪ کامل شد/string + string name=contribution_state_in_progress%1$d%% کامل شد/string string name=contribution_state_startingدر حال بارگذاری/string string name=menu_from_galleryاز نگارخانه/string string name=menu_from_cameraگرفتن عکس/string -- To view, visit https://gerrit.wikimedia.org/r/105165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iadcab3fcd9dd3a6975dff51829d4966fff5e42b2 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/commons Gerrit-Branch: master Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] point graphite CNAME at tungsten in eqiad - change (operations/dns)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/105166 Change subject: point graphite CNAME at tungsten in eqiad .. point graphite CNAME at tungsten in eqiad tungsten is the new Graphite host in eqiad, replacing professor in pmtpa. Change-Id: If02fec8505389fc6a23cd5c79f39d63fd892c669 --- M templates/wikimedia.org M templates/wmnet 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/66/105166/1 diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 8601366..60b0f1e 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -483,6 +483,7 @@ 1H IN 2620:0:861:3:208:80:154:81 git1H IN CNAMEmisc-web-lb.eqiad gdash 1H IN CNAMEmisc-web-lb.eqiad +graphite 1H IN CNAMEmisc-web-lb.eqiad icinga 1H IN CNAMEneon icinga-admin 1H IN A208.80.154.14 diff --git a/templates/wmnet b/templates/wmnet index 9ce4bbe..a1c4cde 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -35,8 +35,8 @@ dbdump 1H IN A10.0.5.1 dns-r0 1H IN A10.0.5.6 dns-r1 1H IN A10.0.5.7 -graphite 1H IN CNAMEprofessor.pmtpa.wmnet. -gdash 1H IN CNAMEprofessor.pmtpa.wmnet. +graphite 1H IN CNAMEtungsten.eqiad.wmnet. +gdash 1H IN CNAMEtungsten.eqiad.wmnet. nfs-home 1H IN A10.0.5.8 imagedump 1H IN A10.0.5.2 rendering.svc 1H IN A10.2.1.21 -- To view, visit https://gerrit.wikimedia.org/r/105166 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If02fec8505389fc6a23cd5c79f39d63fd892c669 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 17630) Add edit page permission check - change (mediawiki/core)
Cargan has uploaded a new change for review. https://gerrit.wikimedia.org/r/105167 Change subject: (bug 17630) Add edit page permission check .. (bug 17630) Add edit page permission check Fixed typo. Put checking for anonymous user to outer scope. Follows-up: 534d124 Change-Id: I0654576476f8c2692e79784e5d2165695e0d076a --- M includes/Title.php 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/105167/1 diff --git a/includes/Title.php b/includes/Title.php index ac70321..efcc491 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1893,11 +1893,9 @@ // Show user page-specific message only if the user can move other pages $errors[] = array( 'cant-move-to-user-page' ); } - } elseif ( $action == 'edit' !$user-isAllowed( 'edit' )) { - if ( $user-isAnon() ) { - $errors[] = array( 'noarticletext-nopermission'); - $errors[] = $this-missingPermissionError( $action, $short ); - } + } elseif ( $action == 'edit' $user-isAnon() !$user-isAllowed( 'edit' ) ) { + $errors[] = array( 'noarticletext-nopermission'); + $errors[] = $this-missingPermissionError( $action, $short ); } elseif ( !$user-isAllowed( $action ) ) { $errors[] = $this-missingPermissionError( $action, $short ); } -- To view, visit https://gerrit.wikimedia.org/r/105167 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0654576476f8c2692e79784e5d2165695e0d076a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cargan zie...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CLDR 24 update - release notes - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: CLDR 24 update - release notes .. CLDR 24 update - release notes Follow up: I9930b290d004667a3bb09e5c1663ec2c9c27d8a6 Bug: 56931 Change-Id: Ic37276126dd615c2510c17455a5bbf5d8653045d --- M RELEASE-NOTES-1.23 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index d6263a7..d682206 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -84,6 +84,11 @@ * (bug 57201) SpecialRecentChangesFilters hook is now executed for feeds. * (bug 58640) Fixed a compatibility issue with PCRE 8.34 that caused pages to appear blank or with missing text. +* (bug 56931) Updated the plural rules to CLDR 24. They are in new format + which is detailed in UTS 35 Rev 33. The PHP parser and evaluator as well as + the JavaScript evaluator were updated to support the new format. Plural rules + for some languages have changed, most notably Russian. Affected software + messages have been updated and marked for review at translatewiki.net. === Web API changes in 1.23 === * (bug 54884) action=parseprop=categories now indicates hidden and missing -- To view, visit https://gerrit.wikimedia.org/r/105162 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic37276126dd615c2510c17455a5bbf5d8653045d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: 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 59227) retry on all internal_api_error_s - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 59227) retry on all internal_api_error_s .. (bug 59227) retry on all internal_api_error_s follow-up for https://gerrit.wikimedia.org/r/#/c/105099/ Name of API exception is provided since r26140 Change-Id: Ic62a1e83130370f62f863de9ff313512754cac14 --- M pywikibot/data/api.py 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 141b6d9..043cc52 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -389,9 +389,7 @@ uPausing due to database lag: + info) self.site.throttle.lag(int(lag.group(lag))) continue -if code in (u'internal_api_error_DBConnectionError', -u'internal_api_error_DBQueryError', -u'internal_api_error_ReadOnlyError'): +if code.startswith(u'internal_api_error_'): self.wait() continue # raise error -- To view, visit https://gerrit.wikimedia.org/r/105152 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic62a1e83130370f62f863de9ff313512754cac14 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Multichill maar...@mdammers.nl Gerrit-Reviewer: Russell Blau russb...@imapmail.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] Adapted unittest to fit new wrapper - change (mediawiki...PagedTiffHandler)
Mglaser has uploaded a new change for review. https://gerrit.wikimedia.org/r/105168 Change subject: Adapted unittest to fit new wrapper .. Adapted unittest to fit new wrapper Unittests now work with the MediaWiki phpunit.php wrapper. Also, the tests were refactored a bit. Instead of having one big test with many assertions, there are now 14 different tests. This should make the test suite more readable and maintainable. Change-Id: Iec37ab37537ccc531749045148bb8f3d91534539 --- M PagedTiffHandler.php M PagedTiffHandler_body.php R tests/phpunit/PagedTiffHandlerTest.php 3 files changed, 132 insertions(+), 71 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PagedTiffHandler refs/changes/68/105168/1 diff --git a/PagedTiffHandler.php b/PagedTiffHandler.php index a1203e7..b05f5d3 100644 --- a/PagedTiffHandler.php +++ b/PagedTiffHandler.php @@ -132,3 +132,4 @@ //$wgHooks['PagedTiffHandlerExifData'][] = 'PagedTiffImage::exifData'; $wgHooks['ExtractThumbParameters'][] = 'PagedTiffHandler::onExtractThumbParameters'; +$wgHooks['UnitTestsList'][] = 'PagedTiffHandler::onUnitTestsList'; \ No newline at end of file diff --git a/PagedTiffHandler_body.php b/PagedTiffHandler_body.php index 85ec766..e755759 100644 --- a/PagedTiffHandler_body.php +++ b/PagedTiffHandler_body.php @@ -757,4 +757,14 @@ } return true; // pass through to next handler } + + /** +* Add extension unit tests to test list +* @param array $files +* @return boolean +*/ + public static function onUnitTestsList( $files ) { + $files = array_merge( $files, glob( __DIR__ . '/tests/phpunit/*Test.php' ) ); + return true; + } } diff --git a/tests/PagedTiffHandlerTest.php b/tests/phpunit/PagedTiffHandlerTest.php similarity index 74% rename from tests/PagedTiffHandlerTest.php rename to tests/phpunit/PagedTiffHandlerTest.php index 62a60f2..d995965 100644 --- a/tests/PagedTiffHandlerTest.php +++ b/tests/phpunit/PagedTiffHandlerTest.php @@ -1,7 +1,6 @@ ?php /** * To get this working you must - * - set a valid path to PEAR * - check upload size in php.ini: Multipage.tiff needs at least 3M * - Upload the image truncated.tiff without PagedTiffHandler being active * Caution: you need to allow tiff for upload: @@ -9,25 +8,55 @@ * $wgFileExtensions[] = 'tif'; * - Upload multipage.tiff when PagedTiffHandler is active */ +class PagedTiffHandlerTest extends MediaWikiTestCase { -if ( getenv( 'MW_INSTALL_PATH' ) ) { - $IP = getenv( 'MW_INSTALL_PATH' ); -} else { - $IP = dirname( __FILE__ ) . '/../../..'; -} -require_once( $IP/maintenance/commandLine.inc ); + /** +* Set this to true if test images should be uploaded automatically +* @var boolean +*/ + public $autoUpload = true; -// requires PHPUnit 3.4 -require_once 'PHPUnit/Framework.php'; + /** +* Holds the tested PagedTiffHandler object +* @var PagedTiffHandler +*/ + private $handler = null; -error_reporting( E_ALL ); - -class PagedTiffHandlerTest extends PHPUnit_Framework_TestCase { - - private $handler; + /** +* True if there are any errors in test preparation +* @var boolean +*/ private $preCheckError = false; + + /* +* Paths to test images +*/ + private $multipage_path; + private $truncated_path; + private $mhz_path; + private $test_path; - function upload( $title, $path ) { + /* +* Title objects of test images +*/ + private $multipageTitle; + private $mhzTitle; + private $truncatedTitle; + + /* +* Image objects of test images +*/ + private $multipage_image; + private $mhz_image; + private $truncated_image; + + /** +* Uploads test images +* @param Title $title Title object of the image to upload +* @param string $path Source path of the image to upload +* @return boolean +*/ + private function upload( $title, $path ) { echo $title seems not to be present in the wiki. Trying to upload from $path.\n; $image = wfLocalFile( $title ); $archive = $image-publish( $path ); @@ -42,23 +71,44 @@ } } - function setUp( $autoUpload = false ) { - global $wgTitle; - $wgTitle = Title::newFromText( 'PagedTiffHandler_UnitTest' ); - + /** +* Prepare test image objects and paths. This is executed before every test +* @return boolean +*/ + protected function setUp() { + parent::setUp(); $this-handler = new PagedTiffHandler(); - if ( !file_exists(
[MediaWiki-commits] [Gerrit] Remove reference to deleted file - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/105169 Change subject: Remove reference to deleted file .. Remove reference to deleted file It didn't even point to the right location… Follow-up to I70d20bf2. Change-Id: I7f909873035b9176ba9b7c2bf41b05d9eede3cc4 --- M includes/upload/UploadBase.php 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/69/105169/1 diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 3d2b3f4..9f34f9c 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -31,8 +31,6 @@ * UploadBase and subclasses are the backend of MediaWiki's file uploads. * The frontends are formed by ApiUpload and SpecialUpload. * - * See also includes/docs/upload.txt - * * @author Brion Vibber * @author Bryan Tong Minh * @author Michael Dale -- To view, visit https://gerrit.wikimedia.org/r/105169 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f909873035b9176ba9b7c2bf41b05d9eede3cc4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Code hygiene for the API modules: * swapped global $wgUser t... - change (mediawiki...CodeReview)
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/105170 Change subject: Code hygiene for the API modules: * swapped global $wgUser to the context-sensitive -getUser() method * removed getVersion() functions from all modules, because, quoth core, since 1.21, version string is no longer supported .. Code hygiene for the API modules: * swapped global $wgUser to the context-sensitive -getUser() method * removed getVersion() functions from all modules, because, quoth core, since 1.21, version string is no longer supported Change-Id: I8655f25f3784d02075e663a49ea74cb454f0e21b --- M api/ApiCodeDiff.php M api/ApiCodeUpdate.php M api/ApiQueryCodePaths.php M api/ApiQueryCodeRevisions.php M api/ApiQueryCodeTags.php M api/ApiRevisionUpdate.php 6 files changed, 17 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview refs/changes/70/105170/1 diff --git a/api/ApiCodeDiff.php b/api/ApiCodeDiff.php index 2dfb08a..96172b4 100644 --- a/api/ApiCodeDiff.php +++ b/api/ApiCodeDiff.php @@ -20,9 +20,9 @@ class ApiCodeDiff extends ApiBase { public function execute() { - global $wgUser, $wgCodeReviewMaxDiffSize; + global $wgCodeReviewMaxDiffSize; // Before doing anything at all, let's check permissions - if ( !$wgUser-isAllowed( 'codereview-use' ) ) { + if ( !$this-getUser()-isAllowed( 'codereview-use' ) ) { $this-dieUsage( 'You don\'t have permission to view code diffs', 'permissiondenied' ); } $params = $this-extractRequestParams(); @@ -95,9 +95,5 @@ return array( 'api.php?action=codediffrepo=MediaWikirev=42080', ); - } - - public function getVersion() { - return __CLASS__ . ': $Id$'; } } diff --git a/api/ApiCodeUpdate.php b/api/ApiCodeUpdate.php index 8102c04..198bed3 100644 --- a/api/ApiCodeUpdate.php +++ b/api/ApiCodeUpdate.php @@ -21,9 +21,8 @@ class ApiCodeUpdate extends ApiBase { public function execute() { - global $wgUser; // Before doing anything at all, let's check permissions - if ( !$wgUser-isAllowed( 'codereview-use' ) ) { + if ( !$this-getUser()-isAllowed( 'codereview-use' ) ) { $this-dieUsage( 'You don\'t have permission to update code', 'permissiondenied' ); } $params = $this-extractRequestParams(); @@ -120,9 +119,5 @@ return array( 'api.php?action=codeupdaterepo=MediaWikirev=42080', ); - } - - public function getVersion() { - return __CLASS__ . ': $Id$'; } } diff --git a/api/ApiQueryCodePaths.php b/api/ApiQueryCodePaths.php index 9a20a76..f89f5a7 100644 --- a/api/ApiQueryCodePaths.php +++ b/api/ApiQueryCodePaths.php @@ -25,9 +25,8 @@ } public function execute() { - global $wgUser; // Before doing anything at all, let's check permissions - if ( !$wgUser-isAllowed( 'codereview-use' ) ) { + if ( !$this-getUser()-isAllowed( 'codereview-use' ) ) { $this-dieUsage( 'You don\'t have permission to view code paths', 'permissiondenied' ); } $params = $this-extractRequestParams(); @@ -98,9 +97,5 @@ return array( 'api.php?action=querylist=codepathscprepo=MediaWikicppath=/trunk/phase3', ); - } - - public function getVersion() { - return __CLASS__ . ': $Id$'; } } diff --git a/api/ApiQueryCodeRevisions.php b/api/ApiQueryCodeRevisions.php index 29f791c..8c1c340 100644 --- a/api/ApiQueryCodeRevisions.php +++ b/api/ApiQueryCodeRevisions.php @@ -241,8 +241,4 @@ 'api.php?action=querylist=coderevisionscrrepo=MediaWikicrprop=revid|author|status|timestamp|tags', ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/api/ApiQueryCodeTags.php b/api/ApiQueryCodeTags.php index 975dcc0..8393f75 100644 --- a/api/ApiQueryCodeTags.php +++ b/api/ApiQueryCodeTags.php @@ -25,9 +25,8 @@ } public function execute() { - global $wgUser; // Before doing anything at all, let's check permissions - if ( !$wgUser-isAllowed( 'codereview-use' ) ) { + if ( !$this-getUser()-isAllowed( 'codereview-use' ) ) { $this-dieUsage( 'You don\'t have permission to view code tags', 'permissiondenied' ); } $params = $this-extractRequestParams(); @@ -80,9 +79,5 @@ return array(
[MediaWiki-commits] [Gerrit] Remove reference to deleted file - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove reference to deleted file .. Remove reference to deleted file It didn't even point to the right location… Follow-up to I70d20bf2. Change-Id: I7f909873035b9176ba9b7c2bf41b05d9eede3cc4 --- M includes/upload/UploadBase.php 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 3d2b3f4..9f34f9c 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -31,8 +31,6 @@ * UploadBase and subclasses are the backend of MediaWiki's file uploads. * The frontends are formed by ApiUpload and SpecialUpload. * - * See also includes/docs/upload.txt - * * @author Brion Vibber * @author Bryan Tong Minh * @author Michael Dale -- To view, visit https://gerrit.wikimedia.org/r/105169 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f909873035b9176ba9b7c2bf41b05d9eede3cc4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] WIP: listen to input event in EventSequencer - change (VisualEditor/VisualEditor)
Divec has uploaded a new change for review. https://gerrit.wikimedia.org/r/105171 Change subject: WIP: listen to input event in EventSequencer .. WIP: listen to input event in EventSequencer This breaks ordinary typing, in Chromium (but not Firefox), presumably because afterDocumentKeyPress does a poll which comes too early. However, we need it because some input methods only fire 'input'. Change-Id: I3f821cbe15efa9a389baea10f2255aefbc6e9848 --- M modules/ve/ce/ve.ce.Surface.js M modules/ve/test/ce/ve.ce.imetests.test.js 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/71/105171/1 diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 4f1e38c..754d009 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -37,7 +37,7 @@ this.$document = this.$( this.getElementDocument() ); this.eventSequencer = new ve.EventSequencer( [ 'keydown', 'keypress', 'keyup', 'mousedown', 'mouseup', - 'mousemove', 'compositionstart', 'compositionend' + 'mousemove', 'compositionstart', 'compositionend', 'input' ] ); this.clipboard = []; this.clipboardId = String( Math.random() ); diff --git a/modules/ve/test/ce/ve.ce.imetests.test.js b/modules/ve/test/ce/ve.ce.imetests.test.js index bd5ed43..0776d8d 100644 --- a/modules/ve/test/ce/ve.ce.imetests.test.js +++ b/modules/ve/test/ce/ve.ce.imetests.test.js @@ -15,7 +15,6 @@ 'backspace-chromium-ubuntu-none': true, 'backspace-firefox-ubuntu-none': true, 'backspace-ie-win-none': true, - 'input-chrome-win-chinese-traditional-handwriting': true, 'input-chromium-ubuntu-ibus-chinese-cantonese': true, 'input-chromium-ubuntu-ibus-japanese-anthy--hiraganaonly': true, 'input-chromium-ubuntu-ibus-korean-korean': true, @@ -24,7 +23,6 @@ 'input-firefox-ubuntu-ibus-japanese-anthy--hiraganaonly': true, 'input-firefox-ubuntu-ibus-korean-korean': true, 'input-firefox-ubuntu-ibus-malayalam-swanalekha': true, - 'input-firefox-win-chinese-traditional-handwriting': true, 'input-ie-win-korean': true, 'input-ie-win-chinese-traditional-handwriting': true, 'leftarrow-chromium-ubuntu-none': true, -- To view, visit https://gerrit.wikimedia.org/r/105171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f821cbe15efa9a389baea10f2255aefbc6e9848 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Divec da...@sheetmusic.org.uk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Code hygiene for the API modules: * swapped global $wgUser t... - change (mediawiki...CodeReview)
jenkins-bot has submitted this change and it was merged. Change subject: Code hygiene for the API modules: * swapped global $wgUser to the context-sensitive -getUser() method * removed getVersion() functions from all modules, because, quoth core, since 1.21, version string is no longer supported .. Code hygiene for the API modules: * swapped global $wgUser to the context-sensitive -getUser() method * removed getVersion() functions from all modules, because, quoth core, since 1.21, version string is no longer supported Change-Id: I8655f25f3784d02075e663a49ea74cb454f0e21b --- M api/ApiCodeDiff.php M api/ApiCodeUpdate.php M api/ApiQueryCodePaths.php M api/ApiQueryCodeRevisions.php M api/ApiQueryCodeTags.php M api/ApiRevisionUpdate.php 6 files changed, 17 insertions(+), 40 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiCodeDiff.php b/api/ApiCodeDiff.php index 2dfb08a..96172b4 100644 --- a/api/ApiCodeDiff.php +++ b/api/ApiCodeDiff.php @@ -20,9 +20,9 @@ class ApiCodeDiff extends ApiBase { public function execute() { - global $wgUser, $wgCodeReviewMaxDiffSize; + global $wgCodeReviewMaxDiffSize; // Before doing anything at all, let's check permissions - if ( !$wgUser-isAllowed( 'codereview-use' ) ) { + if ( !$this-getUser()-isAllowed( 'codereview-use' ) ) { $this-dieUsage( 'You don\'t have permission to view code diffs', 'permissiondenied' ); } $params = $this-extractRequestParams(); @@ -95,9 +95,5 @@ return array( 'api.php?action=codediffrepo=MediaWikirev=42080', ); - } - - public function getVersion() { - return __CLASS__ . ': $Id$'; } } diff --git a/api/ApiCodeUpdate.php b/api/ApiCodeUpdate.php index 8102c04..198bed3 100644 --- a/api/ApiCodeUpdate.php +++ b/api/ApiCodeUpdate.php @@ -21,9 +21,8 @@ class ApiCodeUpdate extends ApiBase { public function execute() { - global $wgUser; // Before doing anything at all, let's check permissions - if ( !$wgUser-isAllowed( 'codereview-use' ) ) { + if ( !$this-getUser()-isAllowed( 'codereview-use' ) ) { $this-dieUsage( 'You don\'t have permission to update code', 'permissiondenied' ); } $params = $this-extractRequestParams(); @@ -120,9 +119,5 @@ return array( 'api.php?action=codeupdaterepo=MediaWikirev=42080', ); - } - - public function getVersion() { - return __CLASS__ . ': $Id$'; } } diff --git a/api/ApiQueryCodePaths.php b/api/ApiQueryCodePaths.php index 9a20a76..f89f5a7 100644 --- a/api/ApiQueryCodePaths.php +++ b/api/ApiQueryCodePaths.php @@ -25,9 +25,8 @@ } public function execute() { - global $wgUser; // Before doing anything at all, let's check permissions - if ( !$wgUser-isAllowed( 'codereview-use' ) ) { + if ( !$this-getUser()-isAllowed( 'codereview-use' ) ) { $this-dieUsage( 'You don\'t have permission to view code paths', 'permissiondenied' ); } $params = $this-extractRequestParams(); @@ -98,9 +97,5 @@ return array( 'api.php?action=querylist=codepathscprepo=MediaWikicppath=/trunk/phase3', ); - } - - public function getVersion() { - return __CLASS__ . ': $Id$'; } } diff --git a/api/ApiQueryCodeRevisions.php b/api/ApiQueryCodeRevisions.php index 29f791c..8c1c340 100644 --- a/api/ApiQueryCodeRevisions.php +++ b/api/ApiQueryCodeRevisions.php @@ -241,8 +241,4 @@ 'api.php?action=querylist=coderevisionscrrepo=MediaWikicrprop=revid|author|status|timestamp|tags', ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/api/ApiQueryCodeTags.php b/api/ApiQueryCodeTags.php index 975dcc0..8393f75 100644 --- a/api/ApiQueryCodeTags.php +++ b/api/ApiQueryCodeTags.php @@ -25,9 +25,8 @@ } public function execute() { - global $wgUser; // Before doing anything at all, let's check permissions - if ( !$wgUser-isAllowed( 'codereview-use' ) ) { + if ( !$this-getUser()-isAllowed( 'codereview-use' ) ) { $this-dieUsage( 'You don\'t have permission to view code tags', 'permissiondenied' ); } $params = $this-extractRequestParams(); @@ -80,9 +79,5 @@ return array( 'api.php?action=querylist=codetagsctrepo=MediaWiki',
[MediaWiki-commits] [Gerrit] WIP: Prepare-Observe-Fixup for keyboard events - change (VisualEditor/VisualEditor)
Divec has uploaded a new change for review. https://gerrit.wikimedia.org/r/105172 Change subject: WIP: Prepare-Observe-Fixup for keyboard events .. WIP: Prepare-Observe-Fixup for keyboard events Lots of work still to do TODO: Tidy up (or replace) incomplete action detection TODO: Implicit assumptions about keyboard actions - Any content change is preceded by compositionstart, compositionupdate or keypress - Any content change is followed by input, keyup or compositionend before further content changes - Any content change happens at the selection - Javascript code will not close the IME unless it changes content or selection - It is ok if emulated actions which change the content/selection close the IME - No fixups are needed for the normal process of typing text, so it is ok if fixups close the IME TODO: Certain methods must assume the DM is in sync, including: - handleKeyDown - handleKeyPress - handleInsertion - handleEnter - badSelection - fixSelection - badDeletion - fixDeletion TODO: Correct deletion fixup requires restoring deleted nodes. TODO: IE reverse selections should be handled via an arms-length chunk of ugliness. One of the hardest parts of reading the code at the moment is to understand when the DM is supposed to be in sync. Hungarian notation (see joelonsoftware.com/articles/Wrong.html) or a dedicated object/namespace might help. ve.ce.Surface.js * KeyboardManager class to manage prepare/observe/fixup state * Changes in Surface to use KeyboardManager Change-Id: I78638a27027a30f6a05b0f94d876e285a4453077 --- M modules/ve/ce/ve.ce.ContentBranchNode.js M modules/ve/ce/ve.ce.Surface.js M modules/ve/ce/ve.ce.SurfaceObserver.js M modules/ve/dm/ve.dm.Document.js M modules/ve/dm/ve.dm.DocumentSynchronizer.js M modules/ve/dm/ve.dm.Node.js M modules/ve/dm/ve.dm.Surface.js M modules/ve/dm/ve.dm.TransactionProcessor.js 8 files changed, 274 insertions(+), 253 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/72/105172/1 diff --git a/modules/ve/ce/ve.ce.ContentBranchNode.js b/modules/ve/ce/ve.ce.ContentBranchNode.js index 10d365c..ecd2736 100644 --- a/modules/ve/ce/ve.ce.ContentBranchNode.js +++ b/modules/ve/ce/ve.ce.ContentBranchNode.js @@ -172,6 +172,25 @@ this.root.getSurface().setContentBranchNodeChanged( true ); } + // Test for changes before wiping + var kid, oldContent = [], newContent = []; + for ( i = 0, len = this.$element.length; i len; i++ ) { + node = this.$element[i]; + var kid = node.firstChild; + while ( kid ) { + oldContent.push( kid.textContent ); + kid = kid.nextSibling; + } + } + rendered = this.getRenderedContents(); + for ( i = 0, len = rendered.length; i len; i++ ) { + node = rendered[i]; + newContent.push( node.textContent ); + } + if ( oldContent.join( '' ) === newContent.join( '' ) ) { + return; + } + // Detach all child nodes from this.$element for ( i = 0, len = this.$element.length; i len; i++ ) { node = this.$element[i]; @@ -181,7 +200,6 @@ } // Reattach child nodes with the right annotations - rendered = this.getRenderedContents(); for ( i = 0, len = rendered.length; i len; i++ ) { this.$element[0].appendChild( rendered[i] ); } diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 4f1e38c..2f9648f 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -7,6 +7,117 @@ /*global rangy */ /** + * Keyboard manager for ContentEditable surface. + * + * This implements the prepare-observe-fixup pattern, whereby native actions (e.g. cursoring) occur + * and then are corrected if necessary. + * + * @class + * @constructor + * @param {ve.ce.Surface} surface ContentEditable surface + */ +ve.ce.KeyboardManager = function VeCeKeyStateManager( surface ) { + this.surface = surface; + this.postponements = []; + this.surface.eventSequencer.on( { + 'keydown': ve.bind( this.onKeyDown, this ), + 'keyup': ve.bind( this.onKeyUp, this ), + 'keypress': ve.bind( this.onKeyPress, this ), + //'mousedown': ve.bind( this.onMouseDown, this ), + //'mouseup': ve.bind( this.onMouseUp, this ), + //'mousemove': ve.bind( this.onMouseMove, this ), + 'compositionstart': ve.bind( this.onCompositionStart, this ), + 'compositionend': ve.bind( this.onCompositionEnd, this ) + } ); + this.surface.eventSequencer.onLoop( [ ve.bind( this.onLoop, this ) ] ); + this.surface.eventSequencer.afterLoop( [ ve.bind( this.afterLoop, this ) ] ); +}; +
[MediaWiki-commits] [Gerrit] Renamed Page.change_category() to changeCategory. - change (pywikibot/core)
Pyfisch has uploaded a new change for review. https://gerrit.wikimedia.org/r/105173 Change subject: Renamed Page.change_category() to changeCategory. .. Renamed Page.change_category() to changeCategory. change_category is against (inofficial) PWB naming conventions, functions normalally use no underscrores. Marked old function as deprecated and created redirect to the new one. Change-Id: I264c6896b7daf1fdee9ac2085748b5fc19fd1134 --- M pywikibot/page.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/73/105173/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index f337482..2153ea1 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -1439,8 +1439,12 @@ self.site._noProtectPrompt = True if answer in ['y', 'Y']: return self.site.protect(self, edit, move, reason) + +@deprecated(Page.changeCategory(...)) +def change_category(self, *args, **kwargs): +self.changeCategory(*args, **kwargs) -def change_category(self, oldCat, newCat, comment=None, sortKey=None, +def changeCategory(self, oldCat, newCat, comment=None, sortKey=None, inPlace=True): Remove page from oldCat and add it to newCat. -- To view, visit https://gerrit.wikimedia.org/r/105173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I264c6896b7daf1fdee9ac2085748b5fc19fd1134 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Pyfisch pyfi...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] featured.py: decrease memory usage - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: featured.py: decrease memory usage .. featured.py: decrease memory usage Instead of looping over the list, remove each item when it has been processed. This saves roughly 60% memory (at least on dewiki) Change-Id: Idb2666d0664cbbddd7dcb011a893dd7d8948 --- M scripts/featured.py 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/featured.py b/scripts/featured.py index a79770a..28a2630 100644 --- a/scripts/featured.py +++ b/scripts/featured.py @@ -398,7 +398,8 @@ pywikibot.output( '\03{lightred}** %s has %i %s articles\03{default}' % (site, len(articles), task)) -for p in articles: +while articles: +p = articles.pop(0) if p.title() afterpage: continue @@ -410,7 +411,7 @@ pywikibot.output(u(cached) %s - %s % (p.title(), cache[p.title()])) continue -yield copy(p) +yield p def findTranslated(self, page, oursite=None): quiet = self.getOption('quiet') -- To view, visit https://gerrit.wikimedia.org/r/104915 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb2666d0664cbbddd7dcb011a893dd7d8948 Gerrit-PatchSet: 3 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: DrTrigon dr.tri...@surfeu.ch Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Meno25 meno25m...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Rotem Liss roteml...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Xqt i...@gno.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] Ignore data files in watchlists folder - change (pywikibot/compat)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/105174 Change subject: Ignore data files in watchlists folder .. Ignore data files in watchlists folder Change-Id: Iff1d764261a9036e0f1eefecbd6191a3e4ecf638 --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/74/105174/1 diff --git a/.gitignore b/.gitignore index f394fd0..29cd0f2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ user-fixes.py throttle.ctrl login-data/*login.data +watchlists/*.dat -- To view, visit https://gerrit.wikimedia.org/r/105174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff1d764261a9036e0f1eefecbd6191a3e4ecf638 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat 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] Ignore data files in watchlists folder - change (pywikibot/compat)
Xqt has submitted this change and it was merged. Change subject: Ignore data files in watchlists folder .. Ignore data files in watchlists folder Change-Id: Iff1d764261a9036e0f1eefecbd6191a3e4ecf638 --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved diff --git a/.gitignore b/.gitignore index f394fd0..29cd0f2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ user-fixes.py throttle.ctrl login-data/*login.data +watchlists/*.dat -- To view, visit https://gerrit.wikimedia.org/r/105174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff1d764261a9036e0f1eefecbd6191a3e4ecf638 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Xqt i...@gno.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] Add bot to transfer pages to another wiki, with history - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add bot to transfer pages to another wiki, with history .. Add bot to transfer pages to another wiki, with history Change-Id: I1503c812b19bc5744bc5e17484facc577a2d471e --- A scripts/transferbot.py 1 file changed, 135 insertions(+), 0 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/transferbot.py b/scripts/transferbot.py new file mode 100644 index 000..8ab1769 --- /dev/null +++ b/scripts/transferbot.py @@ -0,0 +1,135 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + + +This script transfers pages from a source wiki to a target wiki. It also +copies edit history to a subpage. + +Target site can be specified with -tofamily and -tolang +Source site can be specified with -fromfamily and -fromlang +Page prefix on the new site can be specified with -prefix + +Existing pages are skipped by default. Pass -overwrite to overwrite pages. + +Internal links are *not* repaired! + +Pages to work on can be specified using any of: +params; + +Example commands: + +# Transfer all pages in category Query service from the Toolserver wiki to +# wikitech, adding Nova_Resource:Tools/Tools/ as prefix +transferbot.py -v -family:toolserver -tofamily:wikitech -cat:Query service -prefix:Nova_Resource:Tools/Tools/ + +# Copy the template Query service from the Toolserver wiki to wikitech +transferbot.py -v -family:toolserver -tofamily:wikitech -page:Template:Query service + + + +# +# (C) Merlijn van Deen, 2014 +# +# Distributed under the terms of the MIT license. +# + +import pywikibot +from pywikibot import pagegenerators + +docuReplacements = { +'params;': pagegenerators.parameterHelp, +} + + +def main(): +tohandle = pywikibot.handleArgs() + +fromsite = pywikibot.getSite() +tolang = fromsite.code +tofamily = None +prefix = '' +template = None +overwrite = False + +genFactory = pagegenerators.GeneratorFactory() + +for arg in tohandle: +if genFactory.handleArg(arg): +continue +if arg.startswith('-tofamily'): +tofamily = arg[len('-tofamily:'):] +elif arg.startswith('-tolang'): +tolang = arg[len('-tolang:'):] +elif arg.startswith('-prefix'): +prefix = arg[len('-prefix:'):] +elif arg.startswith('-template'): +prefix = arg[len('-template:'):] +elif arg == -overwrite: +overwrite = True + +gen = genFactory.getCombinedGenerator() + +if not tofamily: +raise Exception('Target family not specified') + +from pywikibot import config + +# we change the config family to make sure we get sensible backlinks +# i.e. [[wikipedia:en:pagename]] instead of [[pagename]] +# this should really be fixed in Page.title() (bug #59223) +# we can't do this before, as the pagegenerator would work on the +# incorrect site... +config.mylang = tolang +config.family = tofamily + +tosite = pywikibot.Site() + +if not gen: +raise Exception('Target pages not specified') + +pywikibot.output(u +Page transfer configuration +--- +Source: %(fromsite)r +Target: %(tosite)r + +Pages to transfer: %(gen)r + +Prefix for transferred pages: %(prefix)s + % locals()) + +for page in gen: +summary = Moved page from %s % page.title(asLink=True) +targetpage = pywikibot.Page(tosite, prefix + page.title()) +edithistpage = pywikibot.Page(tosite, prefix + page.title() + /edithistory) + +if targetpage.exists() and not overwrite: +pywikibot.output( +uSkipped %s (target page %s exists) % ( +page.title(asLink=True), +targetpage.title(asLink=True) +) +) +continue + +pywikibot.output(uMoving %s to %s... % (page.title(asLink=True), targetpage.title(asLink=True))) + +pywikibot.log(Getting page text.) +text = page.get(get_redirect=True) +text += noinclude\n\nsmallThis page was moved from %s. It's edit history can be viewed at %s/small/noinclude % ( +page.title(asLink=True), edithistpage.title(asLink=True)) + +pywikibot.log(Getting edit history.) +historytable = page.getVersionHistoryTable() + +pywikibot.log(Putting page text.) +targetpage.put(text, comment=summary) + +pywikibot.log(Putting edit history.) +edithistpage.put(historytable, comment=summary) + +if __name__ == __main__: +try: +main() +finally: +pywikibot.stopme() -- To view, visit https://gerrit.wikimedia.org/r/105009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1503c812b19bc5744bc5e17484facc577a2d471e Gerrit-PatchSet: 4 Gerrit-Project:
[MediaWiki-commits] [Gerrit] Namespace translation updates - change (mediawiki...Scribunto)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/105175 Change subject: Namespace translation updates .. Namespace translation updates * Renamed 'no' to 'nb' * Added 'fi' and 'ro' Requested at: * bug 59014 * https://meta.wikimedia.org/wiki/User_talk:Matma_Rex#Translation_of_Module_namespace_name * https://translatewiki.net/wiki/Thread:Support/Rename_%22module%22_namespace * https://meta.wikimedia.org/w/index.php?title=Stewards%27_noticeboardoldid=6929612#Renaming_namespaces Change-Id: I69ec61305d638dd39e70406e192101c89ab7a1f4 --- M Scribunto.namespaces.php 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto refs/changes/75/105175/1 diff --git a/Scribunto.namespaces.php b/Scribunto.namespaces.php index c5b3e08..4a658dc 100644 --- a/Scribunto.namespaces.php +++ b/Scribunto.namespaces.php @@ -128,6 +128,11 @@ 829 = 'بحث_پودمان', ); +$namespaceNames['fi'] = array( + 828 = 'Moduuli', + 829 = 'Keskustelu_moduulista', +); + $namespaceNames['fr'] = array( 828 = 'Module', 829 = 'Discussion_module', @@ -211,7 +216,7 @@ 829 = 'Moduldiskusjon', ); -$namespaceNames['no'] = array( +$namespaceNames['nb'] = array( 828 = 'Modul', 829 = 'Moduldiskusjon', ); @@ -231,6 +236,11 @@ 829 = 'Módulo_Discussão', ); +$namespaceNames['ro'] = array( + 828 = 'Modul', + 829 = 'Discuție_Modul', +); + $namespaceNames['ru'] = array( 828 = 'Модуль', 829 = 'Обсуждение_модуля', -- To view, visit https://gerrit.wikimedia.org/r/105175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69ec61305d638dd39e70406e192101c89ab7a1f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Namespace translation updates - change (mediawiki...Scribunto)
jenkins-bot has submitted this change and it was merged. Change subject: Namespace translation updates .. Namespace translation updates * Renamed 'no' to 'nb' * Added 'fi' and 'ro' Requested at: * bug 59014 * https://meta.wikimedia.org/wiki/User_talk:Matma_Rex#Translation_of_Module_namespace_name * https://translatewiki.net/wiki/Thread:Support/Rename_%22module%22_namespace * https://meta.wikimedia.org/w/index.php?title=Stewards%27_noticeboardoldid=6929612#Renaming_namespaces Change-Id: I69ec61305d638dd39e70406e192101c89ab7a1f4 --- M Scribunto.namespaces.php 1 file changed, 15 insertions(+), 5 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/Scribunto.namespaces.php b/Scribunto.namespaces.php index c5b3e08..0091c51 100644 --- a/Scribunto.namespaces.php +++ b/Scribunto.namespaces.php @@ -128,6 +128,11 @@ 829 = 'بحث_پودمان', ); +$namespaceNames['fi'] = array( + 828 = 'Moduuli', + 829 = 'Keskustelu_moduulista', +); + $namespaceNames['fr'] = array( 828 = 'Module', 829 = 'Discussion_module', @@ -201,17 +206,17 @@ 828 = 'Modul', ); +$namespaceNames['nb'] = array( + 828 = 'Modul', + 829 = 'Moduldiskusjon', +); + $namespaceNames['nl'] = array( 828 = 'Module', 829 = 'Overleg_module', ); $namespaceNames['nn'] = array( - 828 = 'Modul', - 829 = 'Moduldiskusjon', -); - -$namespaceNames['no'] = array( 828 = 'Modul', 829 = 'Moduldiskusjon', ); @@ -231,6 +236,11 @@ 829 = 'Módulo_Discussão', ); +$namespaceNames['ro'] = array( + 828 = 'Modul', + 829 = 'Discuție_Modul', +); + $namespaceNames['ru'] = array( 828 = 'Модуль', 829 = 'Обсуждение_модуля', -- To view, visit https://gerrit.wikimedia.org/r/105175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69ec61305d638dd39e70406e192101c89ab7a1f4 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: 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] Added BaseCategoryRobot as a baseclass. - change (pywikibot/core)
Pyfisch has uploaded a new change for review. https://gerrit.wikimedia.org/r/105176 Change subject: Added BaseCategoryRobot as a baseclass. .. Added BaseCategoryRobot as a baseclass. BaseCategoryRobot provides some standard variables for category robots. It automatically converts category titles to category names. Change-Id: I4f9397a5ea0b1b39ba66b8e3a9bdc0f390ab9c0e --- M scripts/category.py 1 file changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/76/105176/1 diff --git a/scripts/category.py b/scripts/category.py index 73988e4..dc6da9a 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -230,6 +230,33 @@ % config.shortpath(filename)) +class BaseCategoryRobot(object): +Basic bot that provides some often used values. + +@deprecate_arg(oldCatTitle, oldCat) +@deprecate_arg(newCatTitle, newCat) +@deprecate_arg(catTitle, cat) +def __init__(self, comment, oldCat, newCat, cat): +self.site = pywikibot.Site() +self.comment = comment +self.oldCat = self._makecat(oldCat) +self.newCat = self._makecat(newCat) +self.cat = self._makecat(cat) + +def _makecat(self, var): +Helper function to provide backwards compatibility. Old +code passes strings with the category title, new code +should pass a category object instead. + +@param var: Category object or category title as string. +@return: Category object. + +if isinstance(var, pywikibot.Category): +return var +else: +return pywikibot.Category(self.site, var) + + class AddCategory: '''A robot to mass-add a category to a list of pages.''' -- To view, visit https://gerrit.wikimedia.org/r/105176 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f9397a5ea0b1b39ba66b8e3a9bdc0f390ab9c0e Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Pyfisch pyfi...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prevent selection of Jump to text - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Prevent selection of Jump to text .. Prevent selection of Jump to text When an article's heading and body text are copied together, prevent the Jump to links from being copied. Bug: 59235 Change-Id: Ibf661e94c748df0c6d65f1dee2815aeb169e7148 --- M skins/common/shared.css 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Parent5446: Looks good to me, but someone else must approve Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/skins/common/shared.css b/skins/common/shared.css index 310294a..11d6177 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -1183,7 +1183,8 @@ } .mw-editsection, -.toctoggle { +.toctoggle, +#jump-to-nav { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; -- To view, visit https://gerrit.wikimedia.org/r/105133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf661e94c748df0c6d65f1dee2815aeb169e7148 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: Qgil q...@wikimedia.org Gerrit-Reviewer: Waldir wal...@email.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] Typofix: less bunny hoppers - change (mediawiki/core)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/105178 Change subject: Typofix: less bunny hoppers .. Typofix: less bunny hoppers Change-Id: Ie3c067b369d794f1be73019b8e4a18f84461a17a --- M skins/common/shared.css 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/105178/1 diff --git a/skins/common/shared.css b/skins/common/shared.css index 310294a..e63898c 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -1176,7 +1176,7 @@ display: none; } -/* For developpers */ +/* For developers */ .xdebug-error { position: absolute; z-index: 99; -- To view, visit https://gerrit.wikimedia.org/r/105178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3c067b369d794f1be73019b8e4a18f84461a17a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding pdf tests for chrome - change (qa/browsertests)
Mayankmadan has uploaded a new change for review. https://gerrit.wikimedia.org/r/105179 Change subject: Adding pdf tests for chrome .. Adding pdf tests for chrome Bug: 57921 Change-Id: Ie2a881672226807115e4a8312f2fadedece8d07a --- M Gemfile M Gemfile.lock M features/pdf.feature M features/step_definitions/pdf_steps.rb M features/support/env.rb 5 files changed, 50 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/79/105179/1 diff --git a/Gemfile b/Gemfile index e4de9c4..18ade77 100755 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,8 @@ #ruby=ruby-2.0.0-p247 #ruby-gemset=browsertests -source 'https://rubygems.org' +source https://rubygems.org; -gem 'chunky_png' -gem 'mediawiki-selenium' +gem chunky_png +gem mediawiki-selenium +gem pdf-reader diff --git a/Gemfile.lock b/Gemfile.lock index 66d2f4b..709b295 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,8 @@ GEM remote: https://rubygems.org/ specs: +Ascii85 (1.0.2) +afm (0.2.0) builder (3.2.2) childprocess (0.3.9) ffi (~ 1.0, = 1.0.11) @@ -23,6 +25,7 @@ multi_json (~ 1.3) gherkin (2.12.2-x86-mingw32) multi_json (~ 1.3) +hashery (2.1.1) i18n (0.6.9) json (1.8.1) mediawiki-selenium (0.1.15) @@ -43,10 +46,17 @@ watir-webdriver (= 0.6.4) page_navigation (0.9) data_magic (= 0.14) +pdf-reader (1.3.3) + Ascii85 (~ 1.0.0) + afm (~ 0.2.0) + hashery (~ 2.0) + ruby-rc4 + ttfunk rest-client (1.6.7) mime-types (= 1.16) rspec-expectations (2.14.4) diff-lcs (= 1.1.3, 2.0) +ruby-rc4 (0.1.5) rubyzip (1.1.0) selenium-webdriver (2.39.0) childprocess (= 0.2.5) @@ -54,6 +64,7 @@ rubyzip (~ 1.0) websocket (~ 1.0.4) syntax (1.1.0) +ttfunk (1.0.3) watir-webdriver (0.6.4) selenium-webdriver (= 2.18.0) websocket (1.0.7) @@ -66,3 +77,4 @@ DEPENDENCIES chunky_png mediawiki-selenium + pdf-reader diff --git a/features/pdf.feature b/features/pdf.feature index 17771fb..0021df7 100644 --- a/features/pdf.feature +++ b/features/pdf.feature @@ -20,3 +20,13 @@ Given I am at random page When I click on Download as PDF Then Download the file link should be present + + Scenario: Check if text in the PDF file is same as on the page on chrome +Given I have created a page +When I download the PDF +Then Text in pdf file downloaded using chrome and page should be the same + + Scenario: Check if title in the PDF file is same as on the page on chrome +Given I have created a page +When I download the PDF +Then Title in pdf file downloaded using chrome and page should be the same diff --git a/features/step_definitions/pdf_steps.rb b/features/step_definitions/pdf_steps.rb index 2444b2d..23a5bfb 100644 --- a/features/step_definitions/pdf_steps.rb +++ b/features/step_definitions/pdf_steps.rb @@ -18,3 +18,25 @@ Then(/^Download the file link should be present$/) do on(RandomPage).download_the_file_element.when_present(30).should exist end +Then(/^Text in pdf file downloaded using chrome and page should be the same$/) do + file = open(@browser.url) + pdf_text= + reader = PDF::Reader.new(file) + reader.pages.each do |page| +pdf_text=pdf_text+page.text + end + pdf_text.should match /Starting a new page using the URL/ +end +Then(/^Title in pdf file downloaded using chrome and page should be the same$/) do + file = open(@browser.url) + pdf_text= + reader = PDF::Reader.new(file) + reader.pages.each do |page| +pdf_text=pdf_text+page.text + end + pdf_text.should match /#{@random_string}/ +end +When(/^I download the PDF$/) do + step I click on Download as PDF + step I click Download the file +end diff --git a/features/support/env.rb b/features/support/env.rb index 00b62d6..2b6f0e5 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -10,3 +10,5 @@ # https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS # require mediawiki/selenium +require open-uri +require pdf-reader -- To view, visit https://gerrit.wikimedia.org/r/105179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2a881672226807115e4a8312f2fadedece8d07a Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Mayankmadan maddiema...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Typofix: less bunny hoppers - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Typofix: less bunny hoppers .. Typofix: less bunny hoppers Change-Id: Ie3c067b369d794f1be73019b8e4a18f84461a17a --- M skins/common/shared.css 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/skins/common/shared.css b/skins/common/shared.css index 310294a..e63898c 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -1176,7 +1176,7 @@ display: none; } -/* For developpers */ +/* For developers */ .xdebug-error { position: absolute; z-index: 99; -- To view, visit https://gerrit.wikimedia.org/r/105178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3c067b369d794f1be73019b8e4a18f84461a17a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: Waldir wal...@email.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] bump to bundler 1.5.1 - change (integration/bundler)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105180 Change subject: bump to bundler 1.5.1 .. bump to bundler 1.5.1 Change-Id: I45bf09f6faf9121c1d443cf8073e5c393af703eb --- M README A bin/bundler D gems/bundler-1.3.5/.travis.yml D gems/bundler-1.3.5/CONTRIBUTING.md D gems/bundler-1.3.5/ISSUES.md D gems/bundler-1.3.5/README.md D gems/bundler-1.3.5/lib/bundler/gem_helpers.rb D gems/bundler-1.3.5/lib/bundler/man/bundle-exec.txt D gems/bundler-1.3.5/lib/bundler/man/gemfile.5.txt D gems/bundler-1.3.5/lib/bundler/source.rb D gems/bundler-1.3.5/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem D gems/bundler-1.3.5/lib/bundler/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem D gems/bundler-1.3.5/lib/bundler/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem D gems/bundler-1.3.5/lib/bundler/vendor/thor.rb D gems/bundler-1.3.5/lib/bundler/vendor/thor/core_ext/dir_escape.rb D gems/bundler-1.3.5/lib/bundler/vendor/thor/core_ext/file_binary_read.rb D gems/bundler-1.3.5/lib/bundler/vendor/thor/util.rb D gems/bundler-1.3.5/lib/bundler/vendor/thor/version.rb D gems/bundler-1.3.5/lib/bundler/vendored_persistent.rb D gems/bundler-1.3.5/spec/bundler/cli_rspec.rb D gems/bundler-1.3.5/spec/install/gems/groups_spec.rb D gems/bundler-1.3.5/spec/install/gems/simple_case_spec.rb D gems/bundler-1.3.5/spec/install/invalid_spec.rb D gems/bundler-1.3.5/spec/other/bundle_ruby_spec.rb D gems/bundler-1.3.5/spec/other/ext_spec.rb D gems/bundler-1.3.5/spec/resolver/basic_spec.rb R gems/bundler-1.5.1/.gitignore R gems/bundler-1.5.1/.rspec A gems/bundler-1.5.1/.travis.yml R gems/bundler-1.5.1/CHANGELOG.md A gems/bundler-1.5.1/CONTRIBUTING.md R gems/bundler-1.5.1/DEVELOPMENT.md A gems/bundler-1.5.1/ISSUES.md R gems/bundler-1.5.1/LICENSE.md A gems/bundler-1.5.1/README.md R gems/bundler-1.5.1/Rakefile R gems/bundler-1.5.1/UPGRADING.md R gems/bundler-1.5.1/bin/bundle R gems/bundler-1.5.1/bin/bundle_ruby A gems/bundler-1.5.1/bin/bundler R gems/bundler-1.5.1/bundler.gemspec R gems/bundler-1.5.1/lib/bundler.rb R gems/bundler-1.5.1/lib/bundler/capistrano.rb R gems/bundler-1.5.1/lib/bundler/cli.rb A gems/bundler-1.5.1/lib/bundler/constants.rb A gems/bundler-1.5.1/lib/bundler/current_ruby.rb R gems/bundler-1.5.1/lib/bundler/definition.rb R gems/bundler-1.5.1/lib/bundler/dep_proxy.rb R gems/bundler-1.5.1/lib/bundler/dependency.rb R gems/bundler-1.5.1/lib/bundler/deployment.rb R gems/bundler-1.5.1/lib/bundler/deprecate.rb R gems/bundler-1.5.1/lib/bundler/dsl.rb R gems/bundler-1.5.1/lib/bundler/endpoint_specification.rb R gems/bundler-1.5.1/lib/bundler/env.rb R gems/bundler-1.5.1/lib/bundler/environment.rb R gems/bundler-1.5.1/lib/bundler/fetcher.rb R gems/bundler-1.5.1/lib/bundler/friendly_errors.rb R gems/bundler-1.5.1/lib/bundler/gem_helper.rb A gems/bundler-1.5.1/lib/bundler/gem_helpers.rb R gems/bundler-1.5.1/lib/bundler/gem_installer.rb R gems/bundler-1.5.1/lib/bundler/gem_path_manipulation.rb R gems/bundler-1.5.1/lib/bundler/gem_tasks.rb R gems/bundler-1.5.1/lib/bundler/graph.rb R gems/bundler-1.5.1/lib/bundler/index.rb R gems/bundler-1.5.1/lib/bundler/injector.rb R gems/bundler-1.5.1/lib/bundler/installer.rb R gems/bundler-1.5.1/lib/bundler/lazy_specification.rb R gems/bundler-1.5.1/lib/bundler/lockfile_parser.rb R gems/bundler-1.5.1/lib/bundler/man/bundle R gems/bundler-1.5.1/lib/bundler/man/bundle-config R gems/bundler-1.5.1/lib/bundler/man/bundle-config.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-exec A gems/bundler-1.5.1/lib/bundler/man/bundle-exec.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-install R gems/bundler-1.5.1/lib/bundler/man/bundle-install.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-package R gems/bundler-1.5.1/lib/bundler/man/bundle-package.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-platform R gems/bundler-1.5.1/lib/bundler/man/bundle-platform.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-update R gems/bundler-1.5.1/lib/bundler/man/bundle-update.txt R gems/bundler-1.5.1/lib/bundler/man/bundle.txt R gems/bundler-1.5.1/lib/bundler/man/gemfile.5 A gems/bundler-1.5.1/lib/bundler/man/gemfile.5.txt R gems/bundler-1.5.1/lib/bundler/match_platform.rb A gems/bundler-1.5.1/lib/bundler/parallel_workers.rb A gems/bundler-1.5.1/lib/bundler/parallel_workers/thread_worker.rb A gems/bundler-1.5.1/lib/bundler/parallel_workers/unix_worker.rb A gems/bundler-1.5.1/lib/bundler/parallel_workers/worker.rb R gems/bundler-1.5.1/lib/bundler/psyched_yaml.rb R gems/bundler-1.5.1/lib/bundler/remote_specification.rb R gems/bundler-1.5.1/lib/bundler/resolver.rb A gems/bundler-1.5.1/lib/bundler/retry.rb R gems/bundler-1.5.1/lib/bundler/ruby_dsl.rb R gems/bundler-1.5.1/lib/bundler/ruby_version.rb R gems/bundler-1.5.1/lib/bundler/rubygems_ext.rb R gems/bundler-1.5.1/lib/bundler/rubygems_integration.rb R gems/bundler-1.5.1/lib/bundler/runtime.rb A gems/bundler-1.5.1/lib/bundler/safe_catch.rb R
[MediaWiki-commits] [Gerrit] bump bundler to 1.5.1 - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: bump bundler to 1.5.1 .. bump bundler to 1.5.1 Change-Id: I5e6299f9a68323fb5ddb6bdf36495e11e3a23fa4 --- M tools/bundler 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/tools/bundler b/tools/bundler index a890e94..3ea33f9 16 --- a/tools/bundler +++ b/tools/bundler -Subproject commit a890e94a7a27f0e8397268c1a223728bc8c65536 +Subproject commit 3ea33f910c7717148950b852eb9da3bab14ea738 -- To view, visit https://gerrit.wikimedia.org/r/105181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e6299f9a68323fb5ddb6bdf36495e11e3a23fa4 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins 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] bump bundler to 1.5.1 - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105181 Change subject: bump bundler to 1.5.1 .. bump bundler to 1.5.1 Change-Id: I5e6299f9a68323fb5ddb6bdf36495e11e3a23fa4 --- M tools/bundler 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/81/105181/1 diff --git a/tools/bundler b/tools/bundler index a890e94..3ea33f9 16 --- a/tools/bundler +++ b/tools/bundler -Subproject commit a890e94a7a27f0e8397268c1a223728bc8c65536 +Subproject commit 3ea33f910c7717148950b852eb9da3bab14ea738 -- To view, visit https://gerrit.wikimedia.org/r/105181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e6299f9a68323fb5ddb6bdf36495e11e3a23fa4 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins 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] bump to bundler 1.5.1 - change (integration/bundler)
Hashar has submitted this change and it was merged. Change subject: bump to bundler 1.5.1 .. bump to bundler 1.5.1 Change-Id: I45bf09f6faf9121c1d443cf8073e5c393af703eb --- M README A bin/bundler D gems/bundler-1.3.5/.travis.yml D gems/bundler-1.3.5/CONTRIBUTING.md D gems/bundler-1.3.5/ISSUES.md D gems/bundler-1.3.5/README.md D gems/bundler-1.3.5/lib/bundler/gem_helpers.rb D gems/bundler-1.3.5/lib/bundler/man/bundle-exec.txt D gems/bundler-1.3.5/lib/bundler/man/gemfile.5.txt D gems/bundler-1.3.5/lib/bundler/source.rb D gems/bundler-1.3.5/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem D gems/bundler-1.3.5/lib/bundler/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem D gems/bundler-1.3.5/lib/bundler/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem D gems/bundler-1.3.5/lib/bundler/vendor/thor.rb D gems/bundler-1.3.5/lib/bundler/vendor/thor/core_ext/dir_escape.rb D gems/bundler-1.3.5/lib/bundler/vendor/thor/core_ext/file_binary_read.rb D gems/bundler-1.3.5/lib/bundler/vendor/thor/util.rb D gems/bundler-1.3.5/lib/bundler/vendor/thor/version.rb D gems/bundler-1.3.5/lib/bundler/vendored_persistent.rb D gems/bundler-1.3.5/spec/bundler/cli_rspec.rb D gems/bundler-1.3.5/spec/install/gems/groups_spec.rb D gems/bundler-1.3.5/spec/install/gems/simple_case_spec.rb D gems/bundler-1.3.5/spec/install/invalid_spec.rb D gems/bundler-1.3.5/spec/other/bundle_ruby_spec.rb D gems/bundler-1.3.5/spec/other/ext_spec.rb D gems/bundler-1.3.5/spec/resolver/basic_spec.rb R gems/bundler-1.5.1/.gitignore R gems/bundler-1.5.1/.rspec A gems/bundler-1.5.1/.travis.yml R gems/bundler-1.5.1/CHANGELOG.md A gems/bundler-1.5.1/CONTRIBUTING.md R gems/bundler-1.5.1/DEVELOPMENT.md A gems/bundler-1.5.1/ISSUES.md R gems/bundler-1.5.1/LICENSE.md A gems/bundler-1.5.1/README.md R gems/bundler-1.5.1/Rakefile R gems/bundler-1.5.1/UPGRADING.md R gems/bundler-1.5.1/bin/bundle R gems/bundler-1.5.1/bin/bundle_ruby A gems/bundler-1.5.1/bin/bundler R gems/bundler-1.5.1/bundler.gemspec R gems/bundler-1.5.1/lib/bundler.rb R gems/bundler-1.5.1/lib/bundler/capistrano.rb R gems/bundler-1.5.1/lib/bundler/cli.rb A gems/bundler-1.5.1/lib/bundler/constants.rb A gems/bundler-1.5.1/lib/bundler/current_ruby.rb R gems/bundler-1.5.1/lib/bundler/definition.rb R gems/bundler-1.5.1/lib/bundler/dep_proxy.rb R gems/bundler-1.5.1/lib/bundler/dependency.rb R gems/bundler-1.5.1/lib/bundler/deployment.rb R gems/bundler-1.5.1/lib/bundler/deprecate.rb R gems/bundler-1.5.1/lib/bundler/dsl.rb R gems/bundler-1.5.1/lib/bundler/endpoint_specification.rb R gems/bundler-1.5.1/lib/bundler/env.rb R gems/bundler-1.5.1/lib/bundler/environment.rb R gems/bundler-1.5.1/lib/bundler/fetcher.rb R gems/bundler-1.5.1/lib/bundler/friendly_errors.rb R gems/bundler-1.5.1/lib/bundler/gem_helper.rb A gems/bundler-1.5.1/lib/bundler/gem_helpers.rb R gems/bundler-1.5.1/lib/bundler/gem_installer.rb R gems/bundler-1.5.1/lib/bundler/gem_path_manipulation.rb R gems/bundler-1.5.1/lib/bundler/gem_tasks.rb R gems/bundler-1.5.1/lib/bundler/graph.rb R gems/bundler-1.5.1/lib/bundler/index.rb R gems/bundler-1.5.1/lib/bundler/injector.rb R gems/bundler-1.5.1/lib/bundler/installer.rb R gems/bundler-1.5.1/lib/bundler/lazy_specification.rb R gems/bundler-1.5.1/lib/bundler/lockfile_parser.rb R gems/bundler-1.5.1/lib/bundler/man/bundle R gems/bundler-1.5.1/lib/bundler/man/bundle-config R gems/bundler-1.5.1/lib/bundler/man/bundle-config.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-exec A gems/bundler-1.5.1/lib/bundler/man/bundle-exec.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-install R gems/bundler-1.5.1/lib/bundler/man/bundle-install.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-package R gems/bundler-1.5.1/lib/bundler/man/bundle-package.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-platform R gems/bundler-1.5.1/lib/bundler/man/bundle-platform.txt R gems/bundler-1.5.1/lib/bundler/man/bundle-update R gems/bundler-1.5.1/lib/bundler/man/bundle-update.txt R gems/bundler-1.5.1/lib/bundler/man/bundle.txt R gems/bundler-1.5.1/lib/bundler/man/gemfile.5 A gems/bundler-1.5.1/lib/bundler/man/gemfile.5.txt R gems/bundler-1.5.1/lib/bundler/match_platform.rb A gems/bundler-1.5.1/lib/bundler/parallel_workers.rb A gems/bundler-1.5.1/lib/bundler/parallel_workers/thread_worker.rb A gems/bundler-1.5.1/lib/bundler/parallel_workers/unix_worker.rb A gems/bundler-1.5.1/lib/bundler/parallel_workers/worker.rb R gems/bundler-1.5.1/lib/bundler/psyched_yaml.rb R gems/bundler-1.5.1/lib/bundler/remote_specification.rb R gems/bundler-1.5.1/lib/bundler/resolver.rb A gems/bundler-1.5.1/lib/bundler/retry.rb R gems/bundler-1.5.1/lib/bundler/ruby_dsl.rb R gems/bundler-1.5.1/lib/bundler/ruby_version.rb R gems/bundler-1.5.1/lib/bundler/rubygems_ext.rb R gems/bundler-1.5.1/lib/bundler/rubygems_integration.rb R gems/bundler-1.5.1/lib/bundler/runtime.rb A gems/bundler-1.5.1/lib/bundler/safe_catch.rb R gems/bundler-1.5.1/lib/bundler/settings.rb R
[MediaWiki-commits] [Gerrit] some more extensions - change (mediawiki/extensions)
Hashar has submitted this change and it was merged. Change subject: some more extensions .. some more extensions Convert2Wiki DataValuesJavascript FirstSteps GlobalContributions PageBlock VideoJsPlayer Change-Id: I77a4c4f7bb0388f18ae54f102af139000f8af208 --- M .gitmodules A Convert2Wiki A DataValuesJavascript A FirstSteps A GlobalContributions A PageBlock A VideoJsPlayer 7 files changed, 24 insertions(+), 0 deletions(-) Approvals: Hashar: Verified; Looks good to me, approved diff --git a/.gitmodules b/.gitmodules index 4f2c517..e9bdad5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -422,6 +422,10 @@ path = ConventionExtension url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ConventionExtension.git branch = . +[submodule Convert2Wiki] + path = Convert2Wiki + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Convert2Wiki.git + branch = . [submodule CopyToClipboard] path = CopyToClipboard url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CopyToClipboard.git @@ -493,6 +497,10 @@ [submodule DataValuesInterfaces] path = DataValuesInterfaces url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataValuesInterfaces.git + branch = . +[submodule DataValuesJavascript] + path = DataValuesJavascript + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataValuesJavascript.git branch = . [submodule DebianISOCodes] path = DebianISOCodes @@ -694,6 +702,10 @@ path = FilterListUsers url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/FilterListUsers.git branch = . +[submodule FirstSteps] + path = FirstSteps + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/FirstSteps.git + branch = . [submodule FlaggedRevs] path = FlaggedRevs url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/FlaggedRevs.git @@ -781,6 +793,10 @@ [submodule GlobalBlocking] path = GlobalBlocking url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalBlocking.git + branch = . +[submodule GlobalContributions] + path = GlobalContributions + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalContributions.git branch = . [submodule GlobalCssJs] path = GlobalCssJs @@ -1405,6 +1421,10 @@ [submodule PHPExcel] path = PHPExcel url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PHPExcel.git + branch = . +[submodule PageBlock] + path = PageBlock + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PageBlock.git branch = . [submodule PageCreationNotif] path = PageCreationNotif @@ -2334,6 +2354,10 @@ path = Video url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Video.git branch = . +[submodule VideoJsPlayer] + path = VideoJsPlayer + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/VideoJsPlayer.git + branch = . [submodule ViewFiles] path = ViewFiles url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ViewFiles.git diff --git a/Convert2Wiki b/Convert2Wiki new file mode 16 index 000..f7eaa76 --- /dev/null +++ b/Convert2Wiki +Subproject commit f7eaa76664ab3479f419314589ef0e4bfdf3b416 diff --git a/DataValuesJavascript b/DataValuesJavascript new file mode 16 index 000..685e3af --- /dev/null +++ b/DataValuesJavascript +Subproject commit 685e3af71c5e9768d30fae41f84647e46e8409cb diff --git a/FirstSteps b/FirstSteps new file mode 16 index 000..b1a2bd4 --- /dev/null +++ b/FirstSteps +Subproject commit b1a2bd45e8694009201f237d8210af82d1c0e6e2 diff --git a/GlobalContributions b/GlobalContributions new file mode 16 index 000..5e247ca --- /dev/null +++ b/GlobalContributions +Subproject commit 5e247ca6495d838dad190d007a23280bc08308ee diff --git a/PageBlock b/PageBlock new file mode 16 index 000..c791ca1 --- /dev/null +++ b/PageBlock +Subproject commit c791ca13ceb576d54f83830f62c977b2e610ed3a diff --git a/VideoJsPlayer b/VideoJsPlayer new file mode 16 index 000..192092e --- /dev/null +++ b/VideoJsPlayer +Subproject commit 192092e69f048778920653816bfdba3c58b6a6df -- To view, visit https://gerrit.wikimedia.org/r/105182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77a4c4f7bb0388f18ae54f102af139000f8af208 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] some more extensions - change (mediawiki/extensions)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105182 Change subject: some more extensions .. some more extensions Convert2Wiki DataValuesJavascript FirstSteps GlobalContributions PageBlock VideoJsPlayer Change-Id: I77a4c4f7bb0388f18ae54f102af139000f8af208 --- M .gitmodules A Convert2Wiki A DataValuesJavascript A FirstSteps A GlobalContributions A PageBlock A VideoJsPlayer 7 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/82/105182/1 diff --git a/.gitmodules b/.gitmodules index 4f2c517..e9bdad5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -422,6 +422,10 @@ path = ConventionExtension url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ConventionExtension.git branch = . +[submodule Convert2Wiki] + path = Convert2Wiki + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Convert2Wiki.git + branch = . [submodule CopyToClipboard] path = CopyToClipboard url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CopyToClipboard.git @@ -493,6 +497,10 @@ [submodule DataValuesInterfaces] path = DataValuesInterfaces url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataValuesInterfaces.git + branch = . +[submodule DataValuesJavascript] + path = DataValuesJavascript + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataValuesJavascript.git branch = . [submodule DebianISOCodes] path = DebianISOCodes @@ -694,6 +702,10 @@ path = FilterListUsers url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/FilterListUsers.git branch = . +[submodule FirstSteps] + path = FirstSteps + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/FirstSteps.git + branch = . [submodule FlaggedRevs] path = FlaggedRevs url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/FlaggedRevs.git @@ -781,6 +793,10 @@ [submodule GlobalBlocking] path = GlobalBlocking url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalBlocking.git + branch = . +[submodule GlobalContributions] + path = GlobalContributions + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GlobalContributions.git branch = . [submodule GlobalCssJs] path = GlobalCssJs @@ -1405,6 +1421,10 @@ [submodule PHPExcel] path = PHPExcel url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PHPExcel.git + branch = . +[submodule PageBlock] + path = PageBlock + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PageBlock.git branch = . [submodule PageCreationNotif] path = PageCreationNotif @@ -2334,6 +2354,10 @@ path = Video url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Video.git branch = . +[submodule VideoJsPlayer] + path = VideoJsPlayer + url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/VideoJsPlayer.git + branch = . [submodule ViewFiles] path = ViewFiles url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ViewFiles.git diff --git a/Convert2Wiki b/Convert2Wiki new file mode 16 index 000..f7eaa76 --- /dev/null +++ b/Convert2Wiki +Subproject commit f7eaa76664ab3479f419314589ef0e4bfdf3b416 diff --git a/DataValuesJavascript b/DataValuesJavascript new file mode 16 index 000..685e3af --- /dev/null +++ b/DataValuesJavascript +Subproject commit 685e3af71c5e9768d30fae41f84647e46e8409cb diff --git a/FirstSteps b/FirstSteps new file mode 16 index 000..b1a2bd4 --- /dev/null +++ b/FirstSteps +Subproject commit b1a2bd45e8694009201f237d8210af82d1c0e6e2 diff --git a/GlobalContributions b/GlobalContributions new file mode 16 index 000..5e247ca --- /dev/null +++ b/GlobalContributions +Subproject commit 5e247ca6495d838dad190d007a23280bc08308ee diff --git a/PageBlock b/PageBlock new file mode 16 index 000..c791ca1 --- /dev/null +++ b/PageBlock +Subproject commit c791ca13ceb576d54f83830f62c977b2e610ed3a diff --git a/VideoJsPlayer b/VideoJsPlayer new file mode 16 index 000..192092e --- /dev/null +++ b/VideoJsPlayer +Subproject commit 192092e69f048778920653816bfdba3c58b6a6df -- To view, visit https://gerrit.wikimedia.org/r/105182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77a4c4f7bb0388f18ae54f102af139000f8af208 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions 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] Add dumpModelLoop button to demo - change (VisualEditor/VisualEditor)
Divec has uploaded a new change for review. https://gerrit.wikimedia.org/r/105183 Change subject: Add dumpModelLoop button to demo .. Add dumpModelLoop button to demo Add button to dump model every 500ms Change-Id: I220ef1a37bdf8ca66071372b19f2abd0d1f8f4ef --- M demos/ve/demo.js 1 file changed, 63 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/83/105183/1 diff --git a/demos/ve/demo.js b/demos/ve/demo.js index dd67fc1..a03ce67 100644 --- a/demos/ve/demo.js +++ b/demos/ve/demo.js @@ -11,6 +11,7 @@ var currentTarget, $targetContainer = $( '.ve-demo-editor' ).eq( 0 ), $errorbox = $( '.ve-demo-error' ), + dumpModelLoopTimeoutId = null, // Widgets startTextInput = new OO.ui.TextInputWidget( { 'readOnly': true } ), @@ -25,7 +26,8 @@ logRangeButton = new OO.ui.PushButtonWidget( { 'label': 'Log to console', 'disabled': true } ), - dumpModelButton = new OO.ui.PushButtonWidget( { 'label': 'Dump model' } ), + dumpModelOnceButton = new OO.ui.PushButtonWidget( { 'label': 'Dump model once' } ), + dumpModelLoopToggle = new OO.ui.ToggleButtonWidget( { 'label': 'Dump model every 500ms' } ), validateButton = new OO.ui.PushButtonWidget( { 'label': 'Validate view and model' } ); // Initialization @@ -38,7 +40,8 @@ endTextInput.$element, logRangeButton.$element, $( 'span class=ve-demo-utilities-commands-dividernbsp;/span' ), - dumpModelButton.$element, + dumpModelOnceButton.$element, + dumpModelLoopToggle.$element, validateButton.$element ); @@ -80,36 +83,7 @@ } ); } - // Open initial page - - if ( /^#!\/src\/.+$/.test( location.hash ) ) { - loadPage( location.hash.slice( 7 ) ); - } else { - loadPage( $( '.ve-demo-menu li a' ).data( 'pageSrc' ) ); - } - - $( '.ve-demo-menu' ).on( 'click', 'li a', function ( e ) { - loadPage( $( this ).data( 'pageSrc' ) ); - e.preventDefault(); - } ); - - // Events - - getRangeButton.on( 'click', function () { - var range = ve.instances[0].view.model.getSelection(); - startTextInput.setValue( range.start ); - endTextInput.setValue( range.end ); - logRangeButton.setDisabled( false ); - } ); - - logRangeButton.on( 'click', function () { - var start = startTextInput.getValue(), - end = endTextInput.getValue(); - // TODO: Validate input - console.dir( ve.instances[0].view.documentView.model.data.slice( start, end ) ); - } ); - - dumpModelButton.on( 'click', function () { + function dumpModelOnce () { /*jshint loopfunc:true */ // linear model dump var i, $li, $label, element, text, annotations, getKids, @@ -182,8 +156,65 @@ getKids( ve.instances[0].view.documentView.getDocumentNode() ) ); $( '#ve-dump' ).show(); + } + + function dumpModelLoop () { + cancelDumpModelLoop(); + dumpModelOnce(); + dumpModelLoopTimeoutId = setTimeout( function () { + if ( dumpModelLoopTimeoutId === null ) { + // don't trust browser clearTimeout + return; + } + dumpModelLoop(); + }, 500 ); + } + + function cancelDumpModelLoop () { + if ( dumpModelLoopTimeoutId ) { + clearTimeout( dumpModelLoopTimeoutId ); + dumpModelLoopTimeoutId = null; + } + } + + // Open initial page + + if ( /^#!\/src\/.+$/.test( location.hash ) ) { + loadPage( location.hash.slice( 7 ) ); + } else { + loadPage( $( '.ve-demo-menu li a' ).data( 'pageSrc' ) ); + } + + $( '.ve-demo-menu' ).on( 'click', 'li a', function ( e ) { + loadPage( $( this ).data( 'pageSrc' ) ); + e.preventDefault(); } ); + // Events + + getRangeButton.on( 'click', function () { + var range = ve.instances[0].view.model.getSelection(); + startTextInput.setValue( range.start ); + endTextInput.setValue( range.end ); + logRangeButton.setDisabled( false ); + } ); + + logRangeButton.on( 'click', function () { + var start = startTextInput.getValue(), +
[MediaWiki-commits] [Gerrit] Fixed bad bug in which minimum instances deleted all field... - change (mediawiki...SemanticForms)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/105184 Change subject: Fixed bad bug in which minimum instances deleted all field values .. Fixed bad bug in which minimum instances deleted all field values Change-Id: Ie79336c7a2e39593ef387fe7368595673659fab1 --- M includes/SF_FormPrinter.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/84/105184/1 diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php index a07295b..3847d9c 100644 --- a/includes/SF_FormPrinter.php +++ b/includes/SF_FormPrinter.php @@ -778,7 +778,6 @@ if ( $instance_num $minimumInstances ) { // Print another instance until we reach the minimum // instances, which is also the starting number. - continue; } else { $all_instances_printed = true; } -- To view, visit https://gerrit.wikimedia.org/r/105184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie79336c7a2e39593ef387fe7368595673659fab1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up meaningless post body language - change (mediawiki...Flow)
Cmcmahon has submitted this change and it was merged. Change subject: Clean up meaningless post body language .. Clean up meaningless post body language A post is the chunk of wiki text, it doesn't have a separate body (see https://www.mediawiki.org/wiki/Flow_Portal/Nomenclature ). So this rephrases some test language. Also fix a mistaken saved topic body reference. There's still mention of topic body and create a Body of Flow Topic into Flow body. When you create a topic you're invited to add a first post to it at the same time. FWIW I think the only reasonable meaning of topic body is the tree of posts under a topic that is hidden when you click a topic bar Change-Id: I7bcf5bccf98477534ad53dd0f084fb1539db9710 --- M tests/browser/features/edit_existing.feature M tests/browser/features/step_definitions/edit_existing_steps.rb 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Cmcmahon: Looks good to me, approved diff --git a/tests/browser/features/edit_existing.feature b/tests/browser/features/edit_existing.feature index f0a321b..e43819e 100644 --- a/tests/browser/features/edit_existing.feature +++ b/tests/browser/features/edit_existing.feature @@ -18,5 +18,5 @@ Given I am on Flow page When I click the Edit post pencil icon Then I should be able to edit the post field with Post edited - And I should be able to save the new post body - And the saved topic body should contain Post edited + And I should be able to save the new post + And the saved post should contain Post edited diff --git a/tests/browser/features/step_definitions/edit_existing_steps.rb b/tests/browser/features/step_definitions/edit_existing_steps.rb index 98a5603..21f5de7 100644 --- a/tests/browser/features/step_definitions/edit_existing_steps.rb +++ b/tests/browser/features/step_definitions/edit_existing_steps.rb @@ -20,7 +20,7 @@ on(FlowPage).title_edit_element.when_present.send_keys(edited_title + @random_string) end -Then(/^I should be able to save the new post body$/) do +Then(/^I should be able to save the new post/) do on(FlowPage).change_post_save_element.when_present.click end @@ -28,7 +28,7 @@ on(FlowPage).change_title_save_element.when_present.click end -Then(/^the saved topic body should contain (.+)$/) do |edited_post| +Then(/^the saved post should contain (.+)$/) do |edited_post| on(FlowPage) do |page| page.small_spinner_element.when_not_present page.topic_post.should match(edited_post + @random_string) -- To view, visit https://gerrit.wikimedia.org/r/102594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7bcf5bccf98477534ad53dd0f084fb1539db9710 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Spage sp...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@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] Fixed bad bug in which minimum instances deleted all field... - change (mediawiki...SemanticForms)
Yaron Koren has submitted this change and it was merged. Change subject: Fixed bad bug in which minimum instances deleted all field values .. Fixed bad bug in which minimum instances deleted all field values Change-Id: Ie79336c7a2e39593ef387fe7368595673659fab1 --- M includes/SF_FormPrinter.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Yaron Koren: Verified; Looks good to me, approved diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php index a07295b..3847d9c 100644 --- a/includes/SF_FormPrinter.php +++ b/includes/SF_FormPrinter.php @@ -778,7 +778,6 @@ if ( $instance_num $minimumInstances ) { // Print another instance until we reach the minimum // instances, which is also the starting number. - continue; } else { $all_instances_printed = true; } -- To view, visit https://gerrit.wikimedia.org/r/105184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie79336c7a2e39593ef387fe7368595673659fab1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren yaro...@gmail.com Gerrit-Reviewer: Yaron Koren yaro...@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] Fix indentation - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/105185 Change subject: Fix indentation .. Fix indentation Change-Id: I17fa286f72e6cbff028f6d5297f261f0c4487047 --- M manifests/misc/smokeping.pp 1 file changed, 6 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/105185/1 diff --git a/manifests/misc/smokeping.pp b/manifests/misc/smokeping.pp index 35b3f68..ba8a977 100644 --- a/manifests/misc/smokeping.pp +++ b/manifests/misc/smokeping.pp @@ -4,17 +4,15 @@ system::role { misc::smokeping: description = Smokeping server } -package { -smokeping: +package { smokeping: ensure = latest; } -package { -curl: +package { curl: ensure = latest; -} +} -file { /etc/smokeping/config.d/ : +file { /etc/smokeping/config.d/: require = Package[smokeping], ensure = directory, recurse = true, @@ -24,9 +22,8 @@ source = puppet:///files/smokeping; } -service { smokeping: -require = [ Package[smokeping], -File[/etc/smokeping/config.d ] ], +service { 'smokeping': +require = [ Package[smokeping], File[/etc/smokeping/config.d ] ], subscribe = File[/etc/smokeping/config.d ], ensure = running; } -- To view, visit https://gerrit.wikimedia.org/r/105185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17fa286f72e6cbff028f6d5297f261f0c4487047 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revoke sumanah keys after her request. - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/105186 Change subject: Revoke sumanah keys after her request. .. Revoke sumanah keys after her request. Her laptop is with WMF OIT for repairs Change-Id: Ic7a0652cb3067402b6b773c2319cceb993661c2e --- M manifests/admins.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/86/105186/1 diff --git a/manifests/admins.pp b/manifests/admins.pp index dc3534a..099d5de 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -636,7 +636,7 @@ Ssh_authorized_key { require = Unixaccount[$realname] } ssh_authorized_key { sumanah@sumana-ThinkPad-X220: - ensure = present, + ensure = absent, user= $username, type= ssh-rsa, key = B3NzaC1yc2EDAQABAAABAQDLxspOGfRjS0t6C7j2WVLFjxy5u0rdqt3gm8/RSZCkGGqpzdHNfRGIqWAd+BfKTAPwA1dk78p034bfAm6Rmyy8vsCX3+Rep9ZgwXuAguBZsMV91qumT4wG2gNMH1yuMFxL/TZzx7gZeb/Qb5VFpZ7qvmtWnwBqQBWoKg5qDGffwHJRS0CRxbrbB59mbJXKyEqij2FzFcTpLNIg+waBhAPIrjpzSBv5WHeGkLwx/1DS6McjuFifyNMl3FXLv2JBUYct0ja+N57aASXSHKBsQxdvMYM7FMgmB3+h/okX3NMrHcDLJs5kINepy4Mve7EcNZwUZb9m4f0zywFA16wzgukV -- To view, visit https://gerrit.wikimedia.org/r/105186 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7a0652cb3067402b6b773c2319cceb993661c2e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revoke sumanah keys after her request. - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Revoke sumanah keys after her request. .. Revoke sumanah keys after her request. Her laptop is with WMF OIT for repairs Change-Id: Ic7a0652cb3067402b6b773c2319cceb993661c2e --- M manifests/admins.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/manifests/admins.pp b/manifests/admins.pp index dc3534a..099d5de 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -636,7 +636,7 @@ Ssh_authorized_key { require = Unixaccount[$realname] } ssh_authorized_key { sumanah@sumana-ThinkPad-X220: - ensure = present, + ensure = absent, user= $username, type= ssh-rsa, key = B3NzaC1yc2EDAQABAAABAQDLxspOGfRjS0t6C7j2WVLFjxy5u0rdqt3gm8/RSZCkGGqpzdHNfRGIqWAd+BfKTAPwA1dk78p034bfAm6Rmyy8vsCX3+Rep9ZgwXuAguBZsMV91qumT4wG2gNMH1yuMFxL/TZzx7gZeb/Qb5VFpZ7qvmtWnwBqQBWoKg5qDGffwHJRS0CRxbrbB59mbJXKyEqij2FzFcTpLNIg+waBhAPIrjpzSBv5WHeGkLwx/1DS6McjuFifyNMl3FXLv2JBUYct0ja+N57aASXSHKBsQxdvMYM7FMgmB3+h/okX3NMrHcDLJs5kINepy4Mve7EcNZwUZb9m4f0zywFA16wzgukV -- To view, visit https://gerrit.wikimedia.org/r/105186 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic7a0652cb3067402b6b773c2319cceb993661c2e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Validate TeX input for all renderers, not just texvc - change (mediawiki...Math)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/105187 Change subject: Validate TeX input for all renderers, not just texvc .. Validate TeX input for all renderers, not just texvc The user input specified in the math tag a. la mathE=m scriptalert('attacked')/script^2 /math is verified in PNG rendering mode, but not in plaintext, MathJax or LaTeXML rendering mode. This is a potential security issue. Furthermore, the texvc specific commands such as $\reals$ that is expanded to $\mathbb{R}$ might be rendered differently depended on the rendering mode. Therefore, the security checking and rewriting portion of texvc have been extracted from the texvc source (see I1650e6ec2ccefff6335fbc36bbe8ca8f59db0faa) and are now available as a separate executable (texvccheck). This commit will now enable this enhancement in security and provide even more compatibility among the different rendering modes. Bug: 49169 Change-Id: Ida24b6bf339508753bed40d2e218c4a5b7fe7d0c --- M Math.hooks.php M Math.php A MathInputCheck.php A MathInputCheckTexvc.php M MathRenderer.php M MathTexvc.php A tests/MathInputCheckTest.php A tests/MathInputCheckTexvcTest.php 8 files changed, 360 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/87/105187/1 diff --git a/Math.hooks.php b/Math.hooks.php index 3c26d1f..714975b 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -42,7 +42,7 @@ * @return string */ static function mathTagHook( $content, $attributes, $parser ) { - global $wgContLang, $wgUseMathJax; + global $wgMathDisableTexFilter, $wgContLang, $wgUseMathJax; if ( trim( $content ) === ) { // bug 8372 return ; } @@ -51,6 +51,13 @@ $renderer = MathRenderer::getRenderer( $content, $attributes, $mode ); + if (! $wgMathDisableTexFilter){ + $checkResult = $renderer-checkTex(); + if ( $checkResult !== true ){ + //returns the error message + return $renderer-getLastError(); + } + } $renderedMath = $renderer-render(); if ( $wgUseMathJax $mode == MW_MATH_MATHJAX ) { $parser-getOutput()-addModules( array( 'ext.math.mathjax.enabler' ) ); diff --git a/Math.php b/Math.php index 57398e5..38cafb4 100644 --- a/Math.php +++ b/Math.php @@ -132,6 +132,16 @@ * See http://dlmf.nist.gov/LaTeXML/manual/commands/latexmlpost.xhtml for details. */ $wgDefaultLaTeXMLSetting = 'format=xhtmlwhatsin=mathwhatsout=mathpmmlcmmlnodefaultresourcespreload=LaTeX.poolpreload=article.clspreload=amsmath.stypreload=amsthm.stypreload=amstext.stypreload=amssymb.stypreload=eucal.stypreload=[dvipsnames]xcolor.stypreload=url.stypreload=hyperref.stypreload=[ids]latexml.stypreload=texvc'; +/** + * The link to the texvc executable + */ +$wgMathTexvcCheckExecutable = dirname( __FILE__ ) . '/texvccheck/texvccheck'; +/** + * Option to disable the tex filter. If set to true any LaTeX espression is parsed + * this can be a potential security risk. If set to false only a subset of the tex + * commands is allowed. See the wikipedia page Help:Math for details. + */ +$wgMathDisableTexFilter = is_executable( $wgMathTexvcCheckExecutable )? false : true; // end of config settings. $wgDefaultUserOptions['math'] = MW_MATH_PNG; @@ -150,6 +160,8 @@ $wgAutoloadClasses['MathTexvc'] = $dir . 'MathTexvc.php'; $wgAutoloadClasses['MathSource'] = $dir . 'MathSource.php'; $wgAutoloadClasses['MathLaTeXML'] = $dir . 'MathLaTeXML.php'; +$wgAutoloadClasses['MathInputCheck'] = $dir . 'MathInputCheck.php'; +$wgAutoloadClasses['MathInputCheckTexvc'] = $dir . 'MathInputCheckTexvc.php'; $wgExtensionMessagesFiles['Math'] = $dir . 'Math.i18n.php'; $wgParserTestFiles[] = $dir . 'mathParserTests.txt'; diff --git a/MathInputCheck.php b/MathInputCheck.php new file mode 100644 index 000..7e8359c --- /dev/null +++ b/MathInputCheck.php @@ -0,0 +1,51 @@ +?php +/** + * MediaWiki math extension + * + * (c) 2002-2013 Tomasz Wegrzanowski, Brion Vibber, Moritz Schubotz, and other MediaWiki contributors + * GPLv2 license; info in main package. + * + * @author Moritz Schubotz + */ +abstract class MathInputCheck { + protected $inputTeX; + protected $validTeX; + protected $isValid = false; + protected $lastError = null; + + /** +* Default contstructure +* (performs no checking) +* @param String $tex the TeX InputString to be checked +*/ + public function __construct( $tex = '') { + $this-inputTeX = $tex; + $this-isValid = false; + } + + /** +*
[MediaWiki-commits] [Gerrit] Fix indentation - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Fix indentation .. Fix indentation Change-Id: I17fa286f72e6cbff028f6d5297f261f0c4487047 --- M manifests/misc/smokeping.pp 1 file changed, 7 insertions(+), 10 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/smokeping.pp b/manifests/misc/smokeping.pp index 35b3f68..480eeaa 100644 --- a/manifests/misc/smokeping.pp +++ b/manifests/misc/smokeping.pp @@ -4,18 +4,16 @@ system::role { misc::smokeping: description = Smokeping server } -package { -smokeping: +package { smokeping: ensure = latest; } -package { -curl: +package { curl: ensure = latest; -} +} -file { /etc/smokeping/config.d/ : -require = Package[smokeping], +file { /etc/smokeping/config.d/: +require = Package['smokeping'], ensure = directory, recurse = true, owner = root, @@ -24,9 +22,8 @@ source = puppet:///files/smokeping; } -service { smokeping: -require = [ Package[smokeping], -File[/etc/smokeping/config.d ] ], +service { 'smokeping': +require = [ Package['smokeping'], File[/etc/smokeping/config.d] ], subscribe = File[/etc/smokeping/config.d ], ensure = running; } -- To view, visit https://gerrit.wikimedia.org/r/105185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I17fa286f72e6cbff028f6d5297f261f0c4487047 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@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] wgHTTPProxy test (DO NOT SUBMIT) - change (mediawiki...Math)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105188 Change subject: wgHTTPProxy test (DO NOT SUBMIT) .. wgHTTPProxy test (DO NOT SUBMIT) Change-Id: I2373fa34395cd4235ce53f6dc0a2f287c338427c --- M Math.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/88/105188/1 diff --git a/Math.php b/Math.php index 57398e5..384e6e9 100644 --- a/Math.php +++ b/Math.php @@ -18,6 +18,8 @@ die( This is not a valid entry point to MediaWiki.\n ); } +$wgHTTPProxy = 'brewster.wikimedia.org:8080'; + // Extension credits that will show up on Special:Version $wgExtensionCredits['parserhook'][] = array( 'path' = __FILE__, -- To view, visit https://gerrit.wikimedia.org/r/105188 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2373fa34395cd4235ce53f6dc0a2f287c338427c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math 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] webproxies service entries in wmnet. - change (operations/dns)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105189 Change subject: webproxies service entries in wmnet. .. webproxies service entries in wmnet. We have two web proxies (brewster and carbon) to reach the outside world. Since the machine could change, this patch introduce two new service entries: webproxy.pmtpa.wmnet (brewster) webproxy.eqiad.wmnet (carbon) This would let scripts and Jenkins jobs refer to a stable hostname regardless of future servers changes. Change-Id: I60b3e58a1bb7050758b8851cb6eafa1113352e74 --- M templates/wmnet 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/89/105189/1 diff --git a/templates/wmnet b/templates/wmnet index e7cc1c8..c039f83 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -28,6 +28,7 @@ mirror 1H IN CNAMEapt.wikimedia.org. smtp 1H IN CNAMEwiki-mail.wikimedia.org. +webproxy 1H IN CNAMEbrewster.wikimedia.org. apaches1H IN A10.2.1.1 apaches2 1H IN A10.0.5.5 @@ -700,6 +701,7 @@ ; Service aliases ntp1H IN CNAMElinne.wikimedia.org. syslog 1H IN CNAMEnfs-home.pmtpa.wmnet. +webproxy 1H IN CNAMEcarbon.wikimedia.org. s1-master 5M IN CNAMEdb1056.eqiad.wmnet. s2-master 5M IN CNAMEdb1036.eqiad.wmnet. s3-master 5M IN CNAMEdb1038.eqiad.wmnet. -- To view, visit https://gerrit.wikimedia.org/r/105189 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60b3e58a1bb7050758b8851cb6eafa1113352e74 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns 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] Call Database::makeInsertOptions from Database::insertSelect - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/105190 Change subject: Call Database::makeInsertOptions from Database::insertSelect .. Call Database::makeInsertOptions from Database::insertSelect This allows other database types to modify the options. Bug: 59233 Change-Id: I45a2c7944057f43453423c8edbe5d173b1fc067d --- M includes/db/Database.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/105190/1 diff --git a/includes/db/Database.php b/includes/db/Database.php index 3388297..fee3216 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2875,9 +2875,7 @@ ) { $destTable = $this-tableName( $destTable ); - if ( is_array( $insertOptions ) ) { - $insertOptions = implode( ' ', $insertOptions ); - } + $insertOptions = $this-makeInsertOptions( $insertOptions ); if ( !is_array( $selectOptions ) ) { $selectOptions = array( $selectOptions ); -- To view, visit https://gerrit.wikimedia.org/r/105190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45a2c7944057f43453423c8edbe5d173b1fc067d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tools: Install requested package python-pyexiv2 - change (operations/puppet)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/105192 Change subject: Tools: Install requested package python-pyexiv2 .. Tools: Install requested package python-pyexiv2 Bug: 59122 Change-Id: I7ce5c5c3ba4104cb5c6030a41f80df8d0627d32d --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/92/105192/1 diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index 92b7162..188d867 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -148,6 +148,7 @@ 'python-opencv', 'python-oursql', # For danilo et al. 'python-problem-report', +'python-pyexiv2', # Bug 59122. 'python-pyinotify',# Bug 57003 'python-svn', # Bug 56996 'python-rsvg', # Bug 56996 -- To view, visit https://gerrit.wikimedia.org/r/105192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ce5c5c3ba4104cb5c6030a41f80df8d0627d32d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production 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] Add systemuser creation - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/105193 Change subject: Add systemuser creation .. Add systemuser creation Change-Id: I4f1e76525acd219ca947aae7b8a79cf6b9724df8 --- M manifests/misc/rancid.pp 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/93/105193/1 diff --git a/manifests/misc/rancid.pp b/manifests/misc/rancid.pp index 637747d..402492d 100644 --- a/manifests/misc/rancid.pp +++ b/manifests/misc/rancid.pp @@ -6,9 +6,13 @@ system::role { misc::rancid: description = Really Awful Notorious CIsco config Differ (sp) } package { rancid: ensure = present } - + + generic::systemuser { 'rancid': + name = 'rancid' + } + file { /var/lib/rancid/core: - require = Package[rancid], + require = [ Package[rancid], Generic::Systemuser['rancid'] ], owner = rancid, group = rancid, mode = 0444, -- To view, visit https://gerrit.wikimedia.org/r/105193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f1e76525acd219ca947aae7b8a79cf6b9724df8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add systemuser creation - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add systemuser creation .. Add systemuser creation Change-Id: I4f1e76525acd219ca947aae7b8a79cf6b9724df8 --- M manifests/misc/rancid.pp 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/rancid.pp b/manifests/misc/rancid.pp index 637747d..402492d 100644 --- a/manifests/misc/rancid.pp +++ b/manifests/misc/rancid.pp @@ -6,9 +6,13 @@ system::role { misc::rancid: description = Really Awful Notorious CIsco config Differ (sp) } package { rancid: ensure = present } - + + generic::systemuser { 'rancid': + name = 'rancid' + } + file { /var/lib/rancid/core: - require = Package[rancid], + require = [ Package[rancid], Generic::Systemuser['rancid'] ], owner = rancid, group = rancid, mode = 0444, -- To view, visit https://gerrit.wikimedia.org/r/105193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f1e76525acd219ca947aae7b8a79cf6b9724df8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@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] Replace usage of deprecated Title::escapeLocalURL() - change (mediawiki...DumpHTML)
jenkins-bot has submitted this change and it was merged. Change subject: Replace usage of deprecated Title::escapeLocalURL() .. Replace usage of deprecated Title::escapeLocalURL() Change-Id: Ib4c36f5a3fb549bd494ddf10fa221904eda4a8f4 --- M dumpHTML.inc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/dumpHTML.inc b/dumpHTML.inc index 1b78aa2..9264bc0 100644 --- a/dumpHTML.inc +++ b/dumpHTML.inc @@ -825,7 +825,7 @@ * @return string */ function getRedirect( $rt ) { - $url = $rt-escapeLocalURL(); + $url = htmlspecialchars( $rt-getLocalURL() ); $text = $rt-getPrefixedText(); return ENDTEXT !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; -- To view, visit https://gerrit.wikimedia.org/r/104349 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4c36f5a3fb549bd494ddf10fa221904eda4a8f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DumpHTML Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] ChangesListSpecialPage: Stop mutating $opts in buildMainQuer... - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/105196 Change subject: ChangesListSpecialPage: Stop mutating $opts in buildMainQueryConds() .. ChangesListSpecialPage: Stop mutating $opts in buildMainQueryConds() Change-Id: I25bd15c3018e56ede05a529e38e577d6744c103e --- M includes/specialpage/ChangesListSpecialPage.php M includes/specials/SpecialRecentchanges.php 2 files changed, 10 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/96/105196/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index d5d3486..30c2aa0 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -189,7 +189,6 @@ /** * Return an array of conditions depending of options set in $opts -* @todo Wh is this mutating $opts… * * @param FormOptions $opts * @return array @@ -198,16 +197,16 @@ $dbr = $this-getDB(); $user = $this-getUser(); $conds = array(); - - // It makes no sense to hide both anons and logged-in users - // Where this occurs, force anons to be shown - $botsOnly = false; + + // It makes no sense to hide both anons and logged-in users. When this occurs, try a guess on + // what the user meant and either show only bots or force anons to be shown. + $botsonly = false; + $hideanons = $opts['hideanons']; if ( $opts['hideanons'] $opts['hideliu'] ) { - // Check if the user wants to show bots only if ( $opts['hidebots'] ) { - $opts['hideanons'] = false; + $hideanons = false; } else { - $botsOnly = true; + $botsonly = true; } } @@ -221,13 +220,13 @@ if ( $user-useRCPatrol() $opts['hidepatrolled'] ) { $conds['rc_patrolled'] = 0; } - if ( $botsOnly ) { + if ( $botsonly ) { $conds['rc_bot'] = 1; } else { if ( $opts['hideliu'] ) { $conds[] = 'rc_user = 0'; } - if ( $opts['hideanons'] ) { + if ( $hideanons ) { $conds[] = 'rc_user != 0'; } } diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 33b3a7f..af2af2f 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -144,11 +144,11 @@ public function validateOptions( FormOptions $opts ) { global $wgFeedLimit; $opts-validateIntBounds( 'limit', 0, $this-feedFormat ? $wgFeedLimit : 5000 ); + parent::validateOptions( $opts ); } /** * Return an array of conditions depending of options set in $opts -* @todo Wh is this mutating $opts… * * @param FormOptions $opts * @return array -- To view, visit https://gerrit.wikimedia.org/r/105196 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25bd15c3018e56ede05a529e38e577d6744c103e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ChangesListSpecialPage: Implement webOutput() - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/105195 Change subject: ChangesListSpecialPage: Implement webOutput() .. ChangesListSpecialPage: Implement webOutput() Split in two more functions: outputFeedLinks() and outputChangesList(). Change-Id: I62c6eab1c25c5ff3a71150205416e8f57764f6bc --- M includes/specialpage/ChangesListSpecialPage.php M includes/specials/SpecialRecentchanges.php M includes/specials/SpecialWatchlist.php 3 files changed, 78 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/95/105195/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index a2347d0..d5d3486 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -315,12 +315,33 @@ /** * Send output to the OutputPage object, only called if not used feeds -* @todo This should do most, if not all, of the outputting now done by subclasses * * @param array $rows Database rows * @param FormOptions $opts */ - abstract public function webOutput( $rows, $opts ); + public function webOutput( $rows, $opts ) { + if ( !$this-including() ) { + $this-outputFeedLinks(); + $this-doHeader( $opts ); + } + + $this-outputChangesList( $rows, $opts ); + } + + /** +* Output feed links. +*/ + public function outputFeedLinks() { + // nothing by default + } + + /** +* Build and output the actual changes list. +* +* @param array $rows Database rows +* @param FormOptions $opts +*/ + abstract public function outputChangesList( $rows, $opts ); /** * Return the text to be displayed above the changes diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 1c984b0..33b3a7f 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -182,6 +182,8 @@ * @return bool|ResultWrapper Result or false (for Recentchangeslinked only) */ public function doMainQuery( $conds, $opts ) { + global $wgAllowCategorizedRecentChanges; + $dbr = $this-getDB(); $user = $this-getUser(); @@ -225,7 +227,7 @@ // rc_new is not an ENUM, but adding a redundant rc_new IN (0,1) gives mysql enough // knowledge to use an index merge if it wants (it may use some other index though). - return $dbr-select( + $rows = $dbr-select( $tables, $fields, $conds + array( 'rc_new' = array( 0, 1 ) ), @@ -233,22 +235,35 @@ array( 'ORDER BY' = 'rc_timestamp DESC', 'LIMIT' = $opts['limit'] ) + $query_options, $join_conds ); + + // Build the final data + if ( $wgAllowCategorizedRecentChanges ) { + $this-filterByCategories( $rows, $opts ); + } + + return $rows; } /** -* Send output to the OutputPage object, only called if not used feeds +* Output feed links. +*/ + public function outputFeedLinks() { + $feedQuery = $this-getFeedQuery(); + if ( $feedQuery !== '' ) { + $this-getOutput()-setFeedAppendQuery( $feedQuery ); + } else { + $this-getOutput()-setFeedAppendQuery( false ); + } + } + + /** +* Build and output the actual changes list. * * @param array $rows Database rows * @param FormOptions $opts */ - public function webOutput( $rows, $opts ) { - global $wgRCShowWatchingUsers, $wgShowUpdatedMarker, $wgAllowCategorizedRecentChanges; - - // Build the final data - - if ( $wgAllowCategorizedRecentChanges ) { - $this-filterByCategories( $rows, $opts ); - } + public function outputChangesList( $rows, $opts ) { + global $wgRCShowWatchingUsers, $wgShowUpdatedMarker; $limit = $opts['limit']; @@ -298,21 +313,6 @@ } } $rclistOutput .= $list-endRecentChangesList(); - - // Print things out - - if ( !$this-including() ) { - // Output options box - $this-doHeader( $opts ); - } - - // And now for the content - $feedQuery =
[MediaWiki-commits] [Gerrit] ChangesListSpecialPage: Implement doMainQuery() - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/105194 Change subject: ChangesListSpecialPage: Implement doMainQuery() .. ChangesListSpecialPage: Implement doMainQuery() Here SpecialWatchlist and SpecialRecentChanges are different enough that I think it's clearer not to make them call parent; I just cleaned them up a little and extracted the common parts to ChangesListSpecialPage. Change-Id: I3b90e9a0d5017f61f5c50c6c6b35b2876c9644ee --- M includes/specialpage/ChangesListSpecialPage.php M includes/specials/SpecialRecentchanges.php M includes/specials/SpecialWatchlist.php 3 files changed, 67 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/105194/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 6feb546..a2347d0 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -266,13 +266,43 @@ /** * Process the query -* @todo This should build some basic processing here… * * @param array $conds * @param FormOptions $opts -* @return bool|ResultWrapper Result or false (for Recentchangeslinked only) +* @return bool|ResultWrapper Result or false */ - abstract public function doMainQuery( $conds, $opts ); + public function doMainQuery( $conds, $opts ) { + $tables = array( 'recentchanges' ); + $fields = RecentChange::selectFields(); + $query_options = array(); + $join_conds = array(); + + ChangeTags::modifyDisplayQuery( + $tables, + $fields, + $conds, + $join_conds, + $query_options, + '' + ); + + // @todo Fire a Special{$this-getName()}Query hook here + // @todo Uncomment and document + // if ( !wfRunHooks( 'ChangesListSpecialPageQuery', + // array( $tables, $fields, $conds, $query_options, $join_conds, $opts ) ) + // ) { + // return false; + // } + + return $dbr-select( + $tables, + $fields, + $conds, + __METHOD__, + $query_options, + $join_conds + ); + } /** * Return a DatabaseBase object for reading diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 887f4cc..1c984b0 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -182,35 +182,32 @@ * @return bool|ResultWrapper Result or false (for Recentchangeslinked only) */ public function doMainQuery( $conds, $opts ) { - $tables = array( 'recentchanges' ); - $join_conds = array(); - $query_options = array(); - - $uid = $this-getUser()-getId(); $dbr = $this-getDB(); - $limit = $opts['limit']; - $namespace = $opts['namespace']; - $invert = $opts['invert']; - $associated = $opts['associated']; + $user = $this-getUser(); + $tables = array( 'recentchanges' ); $fields = RecentChange::selectFields(); + $query_options = array(); + $join_conds = array(); + // JOIN on watchlist for users - if ( $uid $this-getUser()-isAllowed( 'viewmywatchlist' ) ) { + if ( $user-getId() $user-isAllowed( 'viewmywatchlist' ) ) { $tables[] = 'watchlist'; $fields[] = 'wl_user'; $fields[] = 'wl_notificationtimestamp'; $join_conds['watchlist'] = array( 'LEFT JOIN', array( - 'wl_user' = $uid, + 'wl_user' = $user-getId(), 'wl_title=rc_title', 'wl_namespace=rc_namespace' ) ); } - if ( $this-getUser()-isAllowed( 'rollback' ) ) { + + if ( $user-isAllowed( 'rollback' ) ) { $tables[] = 'page'; $fields[] = 'page_latest'; $join_conds['page'] = array( 'LEFT JOIN', 'rc_cur_id=page_id' ); } - // Tag stuff. + ChangeTags::modifyDisplayQuery( $tables, $fields, @@ -233,7 +230,7 @@
[MediaWiki-commits] [Gerrit] Replace usage of deprecated Title::escapeLocalURL() - change (mediawiki...ProtectSite)
Chad has submitted this change and it was merged. Change subject: Replace usage of deprecated Title::escapeLocalURL() .. Replace usage of deprecated Title::escapeLocalURL() Change-Id: I9c51f6d112b476390d5033eae4912c700fd45663 --- M ProtectSite.body.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/ProtectSite.body.php b/ProtectSite.body.php index 4bee26f..dc178c5 100644 --- a/ProtectSite.body.php +++ b/ProtectSite.body.php @@ -64,7 +64,7 @@ require_once( $IP . '/includes/BagOStuff.php' ); } $titleObj = SpecialPage::getTitleFor( 'ProtectSite' ); - $this-action = $titleObj-escapeLocalURL(); + $this-action = htmlspecialchars( $titleObj-getLocalURL() ); $this-mRequest = $request; $this-persist_data = new MediaWikiBagOStuff(); @@ -310,4 +310,4 @@ '/form' ); } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/104359 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c51f6d112b476390d5033eae4912c700fd45663 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProtectSite Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix bugzilla template Show other bugs link to show only op... - change (wikimedia...modifications)
Sn1per has uploaded a new change for review. https://gerrit.wikimedia.org/r/105197 Change subject: Fix bugzilla template Show other bugs link to show only open bugs instead of all bugs .. Fix bugzilla template Show other bugs link to show only open bugs instead of all bugs Bug: 58415 Change-Id: I82ad885791c589a48c8daf87a9250685d9d206f5 --- M template/en/custom/bug/edit.html.tmpl 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bugzilla/modifications refs/changes/97/105197/1 diff --git a/template/en/custom/bug/edit.html.tmpl b/template/en/custom/bug/edit.html.tmpl index 8c49762..85b0ffa 100644 --- a/template/en/custom/bug/edit.html.tmpl +++ b/template/en/custom/bug/edit.html.tmpl @@ -361,8 +361,8 @@ %] [%# WIKIMEDIA START 46413 %] (a href=buglist.cgi?component=[% bug.component FILTER - uri %]product=[% bug.product FILTER uri %] - target=new_windowShow other [% terms.bugs %]/a) + uri %]product=[% bug.product FILTER uri %]resolution=--- + target=new_windowOther open [% terms.bugs %]/a) [%# WIKIMEDIA END 46413 %] /td /tr -- To view, visit https://gerrit.wikimedia.org/r/105197 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82ad885791c589a48c8daf87a9250685d9d206f5 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/bugzilla/modifications Gerrit-Branch: master Gerrit-Owner: Sn1per geof...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Setup RANCID on netmon1001 - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/105191 Change subject: Setup RANCID on netmon1001 .. Setup RANCID on netmon1001 Change-Id: Ie8cdc8421ce727402b57265aab67232e6a33d289 --- M manifests/site.pp 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/91/105191/1 diff --git a/manifests/site.pp b/manifests/site.pp index 1b22acd..eb17801 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1869,9 +1869,6 @@ } } -# node 'netmon1001.wikimedia.org' { -#} - node nescio.esams.wikimedia.org { interface::ip { dns::recursor: interface = eth0, address = 91.198.174.6 } @@ -1889,6 +1886,11 @@ } +node 'netmon1001.wikimedia.org' { +include standard, +misc::rancid +} + node /^nfs[12].pmtpa.wmnet/ { $server_bind_ips = 127.0.0.1 $ipaddress_eth0 -- To view, visit https://gerrit.wikimedia.org/r/105191 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8cdc8421ce727402b57265aab67232e6a33d289 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace deprecated SpecialPage::executePath() - change (mediawiki...DumpHTML)
jenkins-bot has submitted this change and it was merged. Change subject: Replace deprecated SpecialPage::executePath() .. Replace deprecated SpecialPage::executePath() Change-Id: I5dd944067f391059d43c45295bbe0789ea97e3ae --- M dumpHTML.inc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/dumpHTML.inc b/dumpHTML.inc index 9264bc0..ae129ed 100644 --- a/dumpHTML.inc +++ b/dumpHTML.inc @@ -801,7 +801,7 @@ $ns = $title-getNamespace(); if ( $ns == NS_SPECIAL ) { - SpecialPage::executePath( $title, $context ); + SpecialPageFactory::executePath( $title, $context ); } else { $article = Article::newFromTitle( $title, $context ); $rt = $article-followRedirect(); -- To view, visit https://gerrit.wikimedia.org/r/104389 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5dd944067f391059d43c45295bbe0789ea97e3ae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DumpHTML Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Reedy re...@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] Setup RANCID on netmon1001 - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Setup RANCID on netmon1001 .. Setup RANCID on netmon1001 Change-Id: Ie8cdc8421ce727402b57265aab67232e6a33d289 --- M manifests/site.pp 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 1b22acd..eb17801 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1869,9 +1869,6 @@ } } -# node 'netmon1001.wikimedia.org' { -#} - node nescio.esams.wikimedia.org { interface::ip { dns::recursor: interface = eth0, address = 91.198.174.6 } @@ -1889,6 +1886,11 @@ } +node 'netmon1001.wikimedia.org' { +include standard, +misc::rancid +} + node /^nfs[12].pmtpa.wmnet/ { $server_bind_ips = 127.0.0.1 $ipaddress_eth0 -- To view, visit https://gerrit.wikimedia.org/r/105191 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8cdc8421ce727402b57265aab67232e6a33d289 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@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] webproxies service entries in wmnet. - change (operations/dns)
Mark Bergsma has submitted this change and it was merged. Change subject: webproxies service entries in wmnet. .. webproxies service entries in wmnet. We have two web proxies (brewster and carbon) to reach the outside world. Since the machine could change, this patch introduce two new service entries: webproxy.pmtpa.wmnet (brewster) webproxy.eqiad.wmnet (carbon) This would let scripts and Jenkins jobs refer to a stable hostname regardless of future servers changes. bug: 59253 Change-Id: I60b3e58a1bb7050758b8851cb6eafa1113352e74 --- M templates/wmnet 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/wmnet b/templates/wmnet index e7cc1c8..c039f83 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -28,6 +28,7 @@ mirror 1H IN CNAMEapt.wikimedia.org. smtp 1H IN CNAMEwiki-mail.wikimedia.org. +webproxy 1H IN CNAMEbrewster.wikimedia.org. apaches1H IN A10.2.1.1 apaches2 1H IN A10.0.5.5 @@ -700,6 +701,7 @@ ; Service aliases ntp1H IN CNAMElinne.wikimedia.org. syslog 1H IN CNAMEnfs-home.pmtpa.wmnet. +webproxy 1H IN CNAMEcarbon.wikimedia.org. s1-master 5M IN CNAMEdb1056.eqiad.wmnet. s2-master 5M IN CNAMEdb1036.eqiad.wmnet. s3-master 5M IN CNAMEdb1038.eqiad.wmnet. -- To view, visit https://gerrit.wikimedia.org/r/105189 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60b3e58a1bb7050758b8851cb6eafa1113352e74 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Mark Bergsma m...@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] mwconf: set $wgHTTPProxy based on wmf site - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105198 Change subject: mwconf: set $wgHTTPProxy based on wmf site .. mwconf: set $wgHTTPProxy based on wmf site Some tests rely on an internet access, for example the Math extension fetch material from latexml. Hacking $wgHTTPProxy does fix the issue : https://gerrit.wikimedia.org/r/#/c/105188/ Made an anonymous function to avoid polluting the global namespace. The default proxy is webproxy.eqiad.wmnet, it is changed for the pmtpa cluster. bug: 59253 Change-Id: Idb8ab2909aec3ee38ab724ca5dc2b232b1a7d267 --- A mediawiki/conf.d/10_set_wgHTTPProxy.php 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/98/105198/1 diff --git a/mediawiki/conf.d/10_set_wgHTTPProxy.php b/mediawiki/conf.d/10_set_wgHTTPProxy.php new file mode 100644 index 000..9706ea4 --- /dev/null +++ b/mediawiki/conf.d/10_set_wgHTTPProxy.php @@ -0,0 +1,24 @@ +?php +# Snippet coming from integration/jenkins.git +# mediawiki.d/10_set_wgHTTPProxy.php +# +# Set $wgHTTPProxy depending on the site the code is being executed. +# +# References: +# https://bugzilla.wikimedia.org/59253 +# https://wikitech.wikimedia.org/wiki/Http_proxy +# +$wgHTTPProxy = call_user_func( function() { + $proxy = 'webproxy.eqiad.wmnet:8080'; + $site_file = '/etc/wikimedia-site'; + if ( file_exists( $site_file ) ) { + $site = rtrim(file_get_contents('/etc/wikimedia-site')); + switch( $site ) { + case 'pmtpa': + $proxy = 'webproxy.pmtpa.wmnet:8080'; + break; + } + } + + return $proxy; +} ); -- To view, visit https://gerrit.wikimedia.org/r/105198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb8ab2909aec3ee38ab724ca5dc2b232b1a7d267 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins 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] Add /etc/rancid/rancid.conf to config management - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/105199 Change subject: Add /etc/rancid/rancid.conf to config management .. Add /etc/rancid/rancid.conf to config management Change-Id: I90068b08dbed77190691a59a0ab97d54812d6ffa --- A files/misc/rancid/rancid.conf M manifests/misc/rancid.pp 2 files changed, 91 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/105199/1 diff --git a/files/misc/rancid/rancid.conf b/files/misc/rancid/rancid.conf new file mode 100644 index 000..a319dd3 --- /dev/null +++ b/files/misc/rancid/rancid.conf @@ -0,0 +1,84 @@ +# rancid 2.3.6 +# This file sets up the environment used for rancid. see rancid.conf(5) +# +# This will be site specific +# +TERM=network;export TERM +# +# Create files w/o world read/write/exec permissions, but read/exec permissions +# for group. +umask 027 +# +# Under BASEDIR (i.e.: --localstatedir), there will be a logs directory for +# the logs from rancid and a directory for each group of routers defined in +# LIST_OF_GROUPS (below). In addition to these, there will be a CVS +# directory which is the cvs (or Subversion) repository. +# +# Use a full path (no sym-links) for BASEDIR. +# +TMPDIR=/tmp; export TMPDIR +# Be careful changing this, it affects CVSROOT below. +BASEDIR=/var/lib/rancid; export BASEDIR +PATH=/usr/lib/rancid/bin:/usr/bin:/usr/sbin:/bin:/usr/local/bin:/usr/bin; export PATH +# Location of the CVS/SVN repository. Be careful changing this. +CVSROOT=$BASEDIR/CVS; export CVSROOT +# Location of log files produced by rancid-run(1). +LOGDIR=$BASEDIR/logs; export LOGDIR +# +# Select which RCS system to use, cvs (default) or svn. Do not change +# this after CVSROOT has been created with rancid-cvs. Changing between these +# requires manual conversions. +RCSSYS=cvs; export RCSSYS +# +# if ACLSORT is NO, access-lists will NOT be sorted. +#ACLSORT=YES; export ACLSORT +# +# if NOPIPE is set, temp files will be used instead of a cmd pipe during +# collection from the router(s). +#NOPIPE=YES; export NOPIPE +# +# FILTER_PWDS determines which passwords are filtered from configs by the +# value set (NO | YES | ALL). see rancid.conf(5). +#FILTER_PWDS=YES; export FILTER_PWDS +# +# if NOCOMMSTR is set, snmp community strings will be stripped from the configs +#NOCOMMSTR=YES; export NOCOMMSTR +# +# How many times failed collections are retried (for each run) before +# giving up. Minimum: 1 +#MAX_ROUNDS=4; export MAX_ROUNDS +# +# How many hours should pass before complaining about routers that +# can not be reached. The value should be greater than the number +# of hours between your rancid-run cron job. Default: 24 +#OLDTIME=4; export OLDTIME +# +# How many hours should pass before complaining that a group's collection +# (the age of it's lock file) is hung. +#LOCKTIME=4; export LOCKTIME +# +# The number of devices to collect simultaneously. +#PAR_COUNT=5; export PAR_COUNT +# +# list of rancid groups +LIST_OF_GROUPS=core +# more groups... +#LIST_OF_GROUPS=$LIST_OF_GROUPS noc billybobisp +# +# For each group, define a list of people to receive the diffs. +# in sendmail's /etc/aliases. +# rancid-group: joe,moe@foo +# rancid-admin-group:hostmaster +# be sure to read ../README regarding aliases. +# +# If your MTA configuration is broken or you want mail to be forwarded to a +# domain not the same as the local one, define that domain here. @ must be +# included, as this is simply appended to the usual recipients. It is NOT +# appended to recipients specified in rancid-run's -m option. +MAILDOMAIN=@wikimedia.org; export MAILDOMAIN +# +# By default, rancid mail is marked with precedence bulk. This may be +# changed by setting the MAILHEADERS variable; for example no header by setting +# it to or adding X- style headers. Individual headers must be separated +# by a \n. +#MAILHEADERS=Precedence: bulk; export MAILHEADERS \ No newline at end of file diff --git a/manifests/misc/rancid.pp b/manifests/misc/rancid.pp index 402492d..55a2ed5 100644 --- a/manifests/misc/rancid.pp +++ b/manifests/misc/rancid.pp @@ -11,6 +11,13 @@ name = 'rancid' } + file { '/etc/rancid/rancid.conf': + require = Package['rancid'], + owner = root, + group = root, + source = 'puppet:///files/misc/rancid/rancid.conf' + } + file { /var/lib/rancid/core: require = [ Package[rancid], Generic::Systemuser['rancid'] ], owner = rancid, -- To view, visit https://gerrit.wikimedia.org/r/105199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90068b08dbed77190691a59a0ab97d54812d6ffa Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org
[MediaWiki-commits] [Gerrit] Add fastcgi_finish_request where appropriate - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add fastcgi_finish_request where appropriate .. Add fastcgi_finish_request where appropriate When using PHP-FPM to run PHP on a web server, the function fastcgi_finish_request is provided, which flushes all response data to the client and closes the connection, allowing PHP to perform additional work without delaying the client. This adds fastcgi_finish_request calls in index.php and api.php where appropriate and if the function exists, so that the connection is closed once the output is definitely finished. Change-Id: Ic67a8956545874e94df5198088c0f4aa58ca376e --- M api.php M includes/Wiki.php 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/api.php b/api.php index 8fab878..5e23585 100644 --- a/api.php +++ b/api.php @@ -72,12 +72,17 @@ // Process data print results $processor-execute(); +if ( function_exists( 'fastcgi_finish_request' ) ) { + fastcgi_finish_request(); +} + // Execute any deferred updates DeferredUpdates::doUpdates(); // Log what the user did, for book-keeping purposes. $endtime = microtime( true ); wfProfileOut( 'api.php' ); + wfLogProfilingData(); // Log the request diff --git a/includes/Wiki.php b/includes/Wiki.php index 50bba7b..c809339 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -458,6 +458,9 @@ try { $this-checkMaxLag(); $this-main(); + if ( function_exists( 'fastcgi_finish_request' ) ) { + fastcgi_finish_request(); + } $this-restInPeace(); } catch ( Exception $e ) { MWExceptionHandler::handle( $e ); -- To view, visit https://gerrit.wikimedia.org/r/96904 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic67a8956545874e94df5198088c0f4aa58ca376e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: PleaseStand pleasest...@live.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] mwconf: set $wgHTTPProxy based on wmf site - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: mwconf: set $wgHTTPProxy based on wmf site .. mwconf: set $wgHTTPProxy based on wmf site Some tests rely on an internet access, for example the Math extension fetch material from latexml. Hacking $wgHTTPProxy does fix the issue : https://gerrit.wikimedia.org/r/#/c/105188/ Made an anonymous function to avoid polluting the global namespace. The default proxy is webproxy.eqiad.wmnet, it is changed for the pmtpa cluster. bug: 59253 Change-Id: Idb8ab2909aec3ee38ab724ca5dc2b232b1a7d267 --- A mediawiki/conf.d/10_set_wgHTTPProxy.php 1 file changed, 24 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki/conf.d/10_set_wgHTTPProxy.php b/mediawiki/conf.d/10_set_wgHTTPProxy.php new file mode 100644 index 000..9706ea4 --- /dev/null +++ b/mediawiki/conf.d/10_set_wgHTTPProxy.php @@ -0,0 +1,24 @@ +?php +# Snippet coming from integration/jenkins.git +# mediawiki.d/10_set_wgHTTPProxy.php +# +# Set $wgHTTPProxy depending on the site the code is being executed. +# +# References: +# https://bugzilla.wikimedia.org/59253 +# https://wikitech.wikimedia.org/wiki/Http_proxy +# +$wgHTTPProxy = call_user_func( function() { + $proxy = 'webproxy.eqiad.wmnet:8080'; + $site_file = '/etc/wikimedia-site'; + if ( file_exists( $site_file ) ) { + $site = rtrim(file_get_contents('/etc/wikimedia-site')); + switch( $site ) { + case 'pmtpa': + $proxy = 'webproxy.pmtpa.wmnet:8080'; + break; + } + } + + return $proxy; +} ); -- To view, visit https://gerrit.wikimedia.org/r/105198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb8ab2909aec3ee38ab724ca5dc2b232b1a7d267 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Physikerwelt w...@physikerwelt.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] Corrections for PHP 5.4 and FF 26 - change (mediawiki...Drafts)
Gomoko has uploaded a new change for review. https://gerrit.wikimedia.org/r/105200 Change subject: Corrections for PHP 5.4 and FF 26 .. Corrections for PHP 5.4 and FF 26 Corrections needed for the Drafts extension to work in this environment: Mediawiki 1.22, PHP 5.4, Firefox 26: - parameter passed by reference for the new button - event handlers declared with jQuery syntax - save prevented on the draft button Change-Id: Idc8376ffe3e39851c71298b1306cd6b4e0665628 --- M Drafts.hooks.php M modules/ext.Drafts.js 2 files changed, 15 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Drafts refs/changes/00/105200/1 diff --git a/Drafts.hooks.php b/Drafts.hooks.php index b3069fd..7c920e0 100644 --- a/Drafts.hooks.php +++ b/Drafts.hooks.php @@ -180,7 +180,7 @@ * EditPageBeforeEditButtons hook * Add draft saving controls */ - public static function onEditPageBeforeEditButtons( EditPage $editpage, $buttons, $tabindex ) { + public static function onEditPageBeforeEditButtons( EditPage $editpage, $buttons, $tabindex ) { global $egDraftsAutoSaveWait, $egDraftsAutoSaveTimeout, $egDraftsAutoSaveInputBased; $context = $editpage-getArticle()-getContext(); diff --git a/modules/ext.Drafts.js b/modules/ext.Drafts.js index 11d38c0..afcf5d2 100644 --- a/modules/ext.Drafts.js +++ b/modules/ext.Drafts.js @@ -62,7 +62,8 @@ /** * Sends draft data to server to be saved */ - this.save = function() { + this.save = function( event ) { + event.prevantDefault(); // Checks if a save is already taking place if (state === 'saving') { // Exits function immediately @@ -143,20 +144,20 @@ // Check to see that the form and controls exist if ( form form.wpDraftSave ) { // Handle manual draft saving through clicking the save draft button - addHandler( form.wpDraftSave, 'click', self.save ); + $j( form.wpDraftSave ).on( 'click', self.save ); // Handle keeping track of state by watching for changes to fields - addHandler( form.wpTextbox1, 'keypress', self.change ); - addHandler( form.wpTextbox1, 'keyup', self.change ); - addHandler( form.wpTextbox1, 'keydown', self.change ); - addHandler( form.wpTextbox1, 'paste', self.change ); - addHandler( form.wpTextbox1, 'cut', self.change ); - addHandler( form.wpSummary, 'keypress', self.change ); - addHandler( form.wpSummary, 'keyup', self.change ); - addHandler( form.wpSummary, 'keydown', self.change ); - addHandler( form.wpSummary, 'paste', self.change ); - addHandler( form.wpSummary, 'cut', self.change ); + $j( form.wpTextbox1 ).on( 'keypress', self.change ); + $j( form.wpTextbox1 ).on( 'keyup', self.change ); + $j( form.wpTextbox1 ).on( 'keydown', self.change ); + $j( form.wpTextbox1 ).on( 'paste', self.change ); + $j( form.wpTextbox1 ).on( 'cut', self.change ); + $j( form.wpSummary ).on( 'keypress', self.change ); + $j( form.wpSummary ).on( 'keyup', self.change ); + $j( form.wpSummary ).on( 'keydown', self.change ); + $j( form.wpSummary ).on( 'paste', self.change ); + $j( form.wpSummary ).on( 'cut', self.change ); if ( form.wpMinoredit ) { - addHandler( form.wpMinoredit, 'change', self.change ); + $j( form.wpMinoredit ).on( 'change', self.change ); } // Gets configured specific values configuration = { -- To view, visit https://gerrit.wikimedia.org/r/105200 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc8376ffe3e39851c71298b1306cd6b4e0665628 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Drafts Gerrit-Branch: master Gerrit-Owner: Gomoko gom...@yahoo.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove commented calls to transformMsg() - change (mediawiki...DynamicPageList)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/105201 Change subject: Remove commented calls to transformMsg() .. Remove commented calls to transformMsg() They were removed on purpose in 0fb8eed5, see changelog. Change-Id: Iabdaff972c643876754503b5099dc95bed669b0c --- M DPLMain.php 1 file changed, 0 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DynamicPageList refs/changes/01/105201/1 diff --git a/DPLMain.php b/DPLMain.php index ed82393..021bb4f 100644 --- a/DPLMain.php +++ b/DPLMain.php @@ -415,13 +415,11 @@ if ($sParam[1]=='*')$sParamList = explode('|',self::getSubcategories(substr($sParam,2),$sPageTable,2)); else $sParamList = explode('|',self::getSubcategories(substr($sParam,1),$sPageTable,1)); foreach ($sParamList as $sPar) { -// $title = Title::newFromText($localParser-transformMsg($sPar, $pOptions)); $title = Title::newFromText($sPar); if( !is_null($title) ) $aCategories[] = $title-getDbKey(); } } else { -// $title = Title::newFromText($localParser-transformMsg($sParam, $pOptions)); $title = Title::newFromText($sParam); if( !is_null($title) ) $aCategories[] = $title-getDbKey(); } @@ -451,7 +449,6 @@ $output .= $logger-msgWrongParam('hiddencategories', $sArg); break; case 'notcategory': -//$title = Title::newFromText($localParser-transformMsg($sArg, $pOptions)); $title = Title::newFromText($sArg); if( !is_null($title) ) { $aExcludeCategories[] = $title-getDbKey(); @@ -463,7 +460,6 @@ $aParams = explode('|', $sArg); foreach($aParams as $sParam) { $sParam=trim($sParam); -//$sNs = $localParser-transformMsg($sParam, $pOptions); $sNs = $sParam; if( in_array($sNs, ExtDynamicPageList::$options['namespace']) ) { $aNamespaces[] = $wgContLang-getNsIndex($sNs); @@ -631,7 +627,6 @@ */ case 'notnamespace': $sArg=trim($sArg); -// $sNs = $localParser-transformMsg($sArg, $pOptions); $sNs = $sArg; if( !in_array($sNs, ExtDynamicPageList::$options['notnamespace']) ) return $logger-msgWrongParam('notnamespace', $sArg); @@ -762,7 +757,6 @@ case 'title': // we replace blanks by underscores to meet the internal representation // of page names in the database -// $sTitleGE = str_replace(' ','_',$localParser-transformMsg($sArg, $pOptions)); $sTitleGE = str_replace(' ','_',$sArg); $bSelectionCriteriaFound=true; break; @@ -770,7 +764,6 @@ case 'title': // we replace blanks by underscores to meet the internal representation // of page names in the database -// $sTitleLE = str_replace(' ','_',$localParser-transformMsg($sArg, $pOptions)); $sTitleLE = str_replace(' ','_',$sArg); $bSelectionCriteriaFound=true; break; @@ -1006,7 +999,6 @@ case 'titlematch': // we replace blanks by underscores to meet the internal representation // of page names in the database -// $aTitleMatch = explode('|', str_replace(' ','\_',$localParser-transformMsg($sArg, $pOptions))); $aTitleMatch = explode('|', str_replace(' ','\_',$sArg)); $bSelectionCriteriaFound=true; break; @@ -1393,7 +1385,6 @@ case 'nottitlematch': // we replace blanks by underscores to meet the internal representation // of page names in the database -// $aNotTitleMatch = explode('|', str_replace(' ','_',$localParser-transformMsg($sArg, $pOptions))); $aNotTitleMatch = explode('|', str_replace(' ','_',$sArg)); $bSelectionCriteriaFound=true; break; -- To view, visit
[MediaWiki-commits] [Gerrit] Search links - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/105202 Change subject: Search links .. Search links Links can be found both in plain text or as external links. We only try to search links when the term look like a supported link type. Bug: 52905 Change-Id: I7701ba31f276822efccb0f6aaa1272598a8d0f04 --- M CirrusSearch.i18n.php M includes/Result.php M includes/ResultsType.php M includes/Searcher.php M tests/browser/features/full_text.feature M tests/browser/features/full_text_highlighting.feature M tests/browser/features/support/hooks.rb 7 files changed, 94 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/02/105202/1 diff --git a/CirrusSearch.i18n.php b/CirrusSearch.i18n.php index fa062d5..601a2fe 100644 --- a/CirrusSearch.i18n.php +++ b/CirrusSearch.i18n.php @@ -43,6 +43,7 @@ 'cirrussearch-pref-label' = 'New search', 'cirrussearch-pref-desc' = 'Try our new search which supports a greater number of languages, provides more up-to-date results, and can even find text inside of templates.', 'cirrussearch-file-contents-match' = 'File contents match: $1', + 'cirrussearch-link-match' = 'Link match: $1', ); /** Message documentation (Message documentation) @@ -61,6 +62,8 @@ 'cirrussearch-pref-desc' = 'Description for option to enable CirrusSearch by default', 'cirrussearch-file-contents-match' = 'Parameters: * $1 is a part of the text extracted from the file that was found to match the search criteria.', + 'cirrussearch-link-match' = 'Patemeters: +* $1 is an external link that matches the search criteria.' ); /** Arabic (العربية) diff --git a/includes/Result.php b/includes/Result.php index 904e271..4e448b5 100644 --- a/includes/Result.php +++ b/includes/Result.php @@ -85,6 +85,11 @@ } } $this-textSnippet = self::escapeHighlightedText( $snippet ); + if ( isset( $highlights[ 'external_link' ] ) ) { + $match = wfMessage( 'cirrussearch-link-match', self::escapeHighlightedText( + $highlights[ 'external_link' ][ 0 ] ) )-toString(); + $this-textSnippet .= 'div class=textmatch' . $match . '/div'; + } } else { // This can happen if there the page was sent to Elasticsearch without text. This could be // a bug or it could be that the page simply doesn't have any text. diff --git a/includes/ResultsType.php b/includes/ResultsType.php index f714a75..b0473f7 100644 --- a/includes/ResultsType.php +++ b/includes/ResultsType.php @@ -102,6 +102,7 @@ 'file_text' = $text, 'redirect.title' = $entireValueInListField, 'heading' = $entireValueInListField, + 'external_link' = $entireValueInListField, 'title.plain' = $entireValue, 'text.plain' = $textWithNoMatch, 'file_text.plain' = $text, diff --git a/includes/Searcher.php b/includes/Searcher.php index 33806d4..488e765 100644 --- a/includes/Searcher.php +++ b/includes/Searcher.php @@ -217,11 +217,13 @@ global $wgCirrusSearchPhraseUseText; global $wgCirrusSearchPreferRecentDefaultDecayPortion; global $wgCirrusSearchPreferRecentDefaultHalfLife; + global $wgUrlProtocols; wfDebugLog( 'CirrusSearch', Searching: \$term\ ); // Transform Mediawiki specific syntax to filters and extra (pre-escaped) query string $originalTerm = $term; $this-term = trim( $term ); + // Handle title prefix notation wfProfileIn( __METHOD__ . '-prefix-filter' ); $prefixPos = strpos( $this-term, 'prefix:' ); @@ -337,6 +339,7 @@ $this-filters = $filters; $this-notFilters = $notFilters; wfProfileOut( __METHOD__ . '-other-filters' ); + wfProfileIn( __METHOD__ . '-find-phrase-queries' ); // Match quoted phrases including those containing escaped quotes // Those phrases can optionally be followed by ~ then a number (this is the phrase slop) @@ -348,9 +351,26 @@ if ( !isset( $matches[ 'fuzzy' ] ) ) { $main = Searcher::switchSearchToExact( $main, $showRedirects ); } - return array( 'escaped' = $main ); + return array( array( 'escaped' = $main )
[MediaWiki-commits] [Gerrit] Fix SearchEngineTest when $wgSearchType is set to non-default - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix SearchEngineTest when $wgSearchType is set to non-default .. Fix SearchEngineTest when $wgSearchType is set to non-default $wgSearchType needs to be controlled for at time the pages get created. This patch sets the $wgSearchType global. Also, the 'singleton' is removed from SearchEngine::getSearchTypes, which appears to provide little or no benefit while binding all tests to the global variable. SearchEngine::getSearchTypes() gets called in SearchUpdate which is run on page edits. This means the first page edit in the entire test suite causes the global variable to be set and subsequent tests cannot override it. These changes allow SearchEngineTest to pass, even if one has CirrusSearch or other such extensions enabled. Change-Id: I39050da8659dc69db31125f469f494a5fb4b8fca --- M includes/search/SearchEngine.php M tests/phpunit/includes/search/SearchEngineTest.php 2 files changed, 20 insertions(+), 21 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 71c05d8..1556961 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -485,11 +485,10 @@ */ public static function getSearchTypes() { global $wgSearchType, $wgSearchTypeAlternatives; - static $alternatives = null; - if ( $alternatives === null ) { - $alternatives = $wgSearchTypeAlternatives ?: array(); - array_unshift( $alternatives, $wgSearchType ); - } + + $alternatives = $wgSearchTypeAlternatives ?: array(); + array_unshift( $alternatives, $wgSearchType ); + return $alternatives; } diff --git a/tests/phpunit/includes/search/SearchEngineTest.php b/tests/phpunit/includes/search/SearchEngineTest.php index e460591..ff360e9 100644 --- a/tests/phpunit/includes/search/SearchEngineTest.php +++ b/tests/phpunit/includes/search/SearchEngineTest.php @@ -8,10 +8,12 @@ * @note Coverage will only ever show one of on of the Search* classes */ class SearchEngineTest extends MediaWikiLangTestCase { + /** * @var SearchEngine */ protected $search; + protected $pageList; /** @@ -22,17 +24,23 @@ parent::setUp(); // Search tests require MySQL or SQLite with FTS - # Get database type and version $dbType = $this-db-getType(); - $dbSupported = - ( $dbType === 'mysql' ) - || ( $dbType === 'sqlite' $this-db-getFulltextSearchModule() == 'FTS3' ); + $dbSupported = ( $dbType === 'mysql' ) + || ( $dbType === 'sqlite' $this-db-getFulltextSearchModule() == 'FTS3' ); if ( !$dbSupported ) { $this-markTestSkipped( MySQL or SQLite with FTS3 only ); } $searchType = $this-db-getSearchEngine(); + $this-setMwGlobals( array( + 'wgSearchType' = $searchType + ) ); + + if ( !isset( self::$pageList ) ) { + $this-addPages(); + } + $this-search = new $searchType( $this-db ); } @@ -42,15 +50,7 @@ parent::tearDown(); } - function pageExists( $title ) { - return false; - } - - function addDBData() { - if ( $this-pageExists( 'Not_Main_Page' ) ) { - return; - } - + protected function addPages() { if ( !$this-isWikitextNS( NS_MAIN ) ) { // @todo cover the case of non-wikitext content in the main namespace return; @@ -75,12 +75,11 @@ $this-insertPage( 'DomainName', 'example.com', 0 ); } - function fetchIds( $results ) { + protected function fetchIds( $results ) { if ( !$this-isWikitextNS( NS_MAIN ) ) { $this-markTestIncomplete( __CLASS__ . does no yet support non-wikitext content . in the main namespace ); } - $this-assertTrue( is_object( $results ) ); $matches = array(); @@ -105,7 +104,7 @@ * @param $text String: page's content * @param $n Integer: unused */ - function insertPage( $pageName, $text, $ns ) { + protected function insertPage( $pageName, $text, $ns ) { $title = Title::newFromText( $pageName, $ns ); $user = User::newFromName( 'WikiSysop' ); @@ -180,4 +179,5 @@
[MediaWiki-commits] [Gerrit] Add RANCID cron job - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/105203 Change subject: Add RANCID cron job .. Add RANCID cron job Change-Id: Ia4197f9704d0663210e8014dbb193061ed111c1d --- A files/misc/rancid/rancid.cron M manifests/misc/rancid.pp 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/105203/1 diff --git a/files/misc/rancid/rancid.cron b/files/misc/rancid/rancid.cron new file mode 100644 index 000..f0d93a4 --- /dev/null +++ b/files/misc/rancid/rancid.cron @@ -0,0 +1,4 @@ +# Run config differ hourly +1 * * * * rancid /usr/lib/rancid/bin/rancid-run +# Clean out rancid logs +50 23 * * *rancid /usr/bin/find /var/log/rancid -type f -mtime +2 -exec rm {} \; \ No newline at end of file diff --git a/manifests/misc/rancid.pp b/manifests/misc/rancid.pp index 55a2ed5..d2b60ee 100644 --- a/manifests/misc/rancid.pp +++ b/manifests/misc/rancid.pp @@ -15,6 +15,7 @@ require = Package['rancid'], owner = root, group = root, + mode = 0555, source = 'puppet:///files/misc/rancid/rancid.conf' } @@ -26,4 +27,12 @@ recurse = remote, source = puppet:///files/misc/rancid/core; } + + file { '/etc/cron.d/rancid': + require = File['/var/lib/rancid/core'], + owner = root, + group = root, + mode = 0555, + source = 'puppet:///files/misc/rancid/rancid.cron' + } } -- To view, visit https://gerrit.wikimedia.org/r/105203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4197f9704d0663210e8014dbb193061ed111c1d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove phpcs jobs from mw/core gating - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/105204 Change subject: remove phpcs jobs from mw/core gating .. remove phpcs jobs from mw/core gating The phpcs jobs take a while and are non voting, so give some fresh air to Zuul / Jenkins by removing phpcs jobs entirely when gating changes. Change-Id: Ie8dd1f05d473fab10f2ec182876f0b9a4df1e3c5 --- M layout.yaml 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/04/105204/1 diff --git a/layout.yaml b/layout.yaml index 289d39e..a6ca000 100644 --- a/layout.yaml +++ b/layout.yaml @@ -728,8 +728,8 @@ - mediawiki-core-phpunit-misc - mediawiki-core-phpunit-parser gate-and-submit: - - mediawiki-core-phpcs-lenient-HEAD - - mediawiki-core-phpcs-strict-HEAD +# - mediawiki-core-phpcs-lenient-HEAD +# - mediawiki-core-phpcs-strict-HEAD - mediawiki-core-jslint - mediawiki-core-jsduck - mediawiki-core-lint: -- To view, visit https://gerrit.wikimedia.org/r/105204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8dd1f05d473fab10f2ec182876f0b9a4df1e3c5 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] Add RANCID cron job - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add RANCID cron job .. Add RANCID cron job Change-Id: Ia4197f9704d0663210e8014dbb193061ed111c1d --- A files/misc/rancid/rancid.cron M manifests/misc/rancid.pp 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/files/misc/rancid/rancid.cron b/files/misc/rancid/rancid.cron new file mode 100644 index 000..f0d93a4 --- /dev/null +++ b/files/misc/rancid/rancid.cron @@ -0,0 +1,4 @@ +# Run config differ hourly +1 * * * * rancid /usr/lib/rancid/bin/rancid-run +# Clean out rancid logs +50 23 * * *rancid /usr/bin/find /var/log/rancid -type f -mtime +2 -exec rm {} \; \ No newline at end of file diff --git a/manifests/misc/rancid.pp b/manifests/misc/rancid.pp index 55a2ed5..d2b60ee 100644 --- a/manifests/misc/rancid.pp +++ b/manifests/misc/rancid.pp @@ -15,6 +15,7 @@ require = Package['rancid'], owner = root, group = root, + mode = 0555, source = 'puppet:///files/misc/rancid/rancid.conf' } @@ -26,4 +27,12 @@ recurse = remote, source = puppet:///files/misc/rancid/core; } + + file { '/etc/cron.d/rancid': + require = File['/var/lib/rancid/core'], + owner = root, + group = root, + mode = 0555, + source = 'puppet:///files/misc/rancid/rancid.cron' + } } -- To view, visit https://gerrit.wikimedia.org/r/105203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4197f9704d0663210e8014dbb193061ed111c1d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@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 /etc/rancid/rancid.conf to config management - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add /etc/rancid/rancid.conf to config management .. Add /etc/rancid/rancid.conf to config management Change-Id: I90068b08dbed77190691a59a0ab97d54812d6ffa --- A files/misc/rancid/rancid.conf M manifests/misc/rancid.pp 2 files changed, 91 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/files/misc/rancid/rancid.conf b/files/misc/rancid/rancid.conf new file mode 100644 index 000..a319dd3 --- /dev/null +++ b/files/misc/rancid/rancid.conf @@ -0,0 +1,84 @@ +# rancid 2.3.6 +# This file sets up the environment used for rancid. see rancid.conf(5) +# +# This will be site specific +# +TERM=network;export TERM +# +# Create files w/o world read/write/exec permissions, but read/exec permissions +# for group. +umask 027 +# +# Under BASEDIR (i.e.: --localstatedir), there will be a logs directory for +# the logs from rancid and a directory for each group of routers defined in +# LIST_OF_GROUPS (below). In addition to these, there will be a CVS +# directory which is the cvs (or Subversion) repository. +# +# Use a full path (no sym-links) for BASEDIR. +# +TMPDIR=/tmp; export TMPDIR +# Be careful changing this, it affects CVSROOT below. +BASEDIR=/var/lib/rancid; export BASEDIR +PATH=/usr/lib/rancid/bin:/usr/bin:/usr/sbin:/bin:/usr/local/bin:/usr/bin; export PATH +# Location of the CVS/SVN repository. Be careful changing this. +CVSROOT=$BASEDIR/CVS; export CVSROOT +# Location of log files produced by rancid-run(1). +LOGDIR=$BASEDIR/logs; export LOGDIR +# +# Select which RCS system to use, cvs (default) or svn. Do not change +# this after CVSROOT has been created with rancid-cvs. Changing between these +# requires manual conversions. +RCSSYS=cvs; export RCSSYS +# +# if ACLSORT is NO, access-lists will NOT be sorted. +#ACLSORT=YES; export ACLSORT +# +# if NOPIPE is set, temp files will be used instead of a cmd pipe during +# collection from the router(s). +#NOPIPE=YES; export NOPIPE +# +# FILTER_PWDS determines which passwords are filtered from configs by the +# value set (NO | YES | ALL). see rancid.conf(5). +#FILTER_PWDS=YES; export FILTER_PWDS +# +# if NOCOMMSTR is set, snmp community strings will be stripped from the configs +#NOCOMMSTR=YES; export NOCOMMSTR +# +# How many times failed collections are retried (for each run) before +# giving up. Minimum: 1 +#MAX_ROUNDS=4; export MAX_ROUNDS +# +# How many hours should pass before complaining about routers that +# can not be reached. The value should be greater than the number +# of hours between your rancid-run cron job. Default: 24 +#OLDTIME=4; export OLDTIME +# +# How many hours should pass before complaining that a group's collection +# (the age of it's lock file) is hung. +#LOCKTIME=4; export LOCKTIME +# +# The number of devices to collect simultaneously. +#PAR_COUNT=5; export PAR_COUNT +# +# list of rancid groups +LIST_OF_GROUPS=core +# more groups... +#LIST_OF_GROUPS=$LIST_OF_GROUPS noc billybobisp +# +# For each group, define a list of people to receive the diffs. +# in sendmail's /etc/aliases. +# rancid-group: joe,moe@foo +# rancid-admin-group:hostmaster +# be sure to read ../README regarding aliases. +# +# If your MTA configuration is broken or you want mail to be forwarded to a +# domain not the same as the local one, define that domain here. @ must be +# included, as this is simply appended to the usual recipients. It is NOT +# appended to recipients specified in rancid-run's -m option. +MAILDOMAIN=@wikimedia.org; export MAILDOMAIN +# +# By default, rancid mail is marked with precedence bulk. This may be +# changed by setting the MAILHEADERS variable; for example no header by setting +# it to or adding X- style headers. Individual headers must be separated +# by a \n. +#MAILHEADERS=Precedence: bulk; export MAILHEADERS \ No newline at end of file diff --git a/manifests/misc/rancid.pp b/manifests/misc/rancid.pp index 402492d..55a2ed5 100644 --- a/manifests/misc/rancid.pp +++ b/manifests/misc/rancid.pp @@ -11,6 +11,13 @@ name = 'rancid' } + file { '/etc/rancid/rancid.conf': + require = Package['rancid'], + owner = root, + group = root, + source = 'puppet:///files/misc/rancid/rancid.conf' + } + file { /var/lib/rancid/core: require = [ Package[rancid], Generic::Systemuser['rancid'] ], owner = rancid, -- To view, visit https://gerrit.wikimedia.org/r/105199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90068b08dbed77190691a59a0ab97d54812d6ffa Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
[MediaWiki-commits] [Gerrit] remove phpcs jobs from mw/core gating - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: remove phpcs jobs from mw/core gating .. remove phpcs jobs from mw/core gating The phpcs jobs take a while and are non voting, so give some fresh air to Zuul / Jenkins by removing phpcs jobs entirely when gating changes. Change-Id: Ie8dd1f05d473fab10f2ec182876f0b9a4df1e3c5 --- M layout.yaml 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 289d39e..a6ca000 100644 --- a/layout.yaml +++ b/layout.yaml @@ -728,8 +728,8 @@ - mediawiki-core-phpunit-misc - mediawiki-core-phpunit-parser gate-and-submit: - - mediawiki-core-phpcs-lenient-HEAD - - mediawiki-core-phpcs-strict-HEAD +# - mediawiki-core-phpcs-lenient-HEAD +# - mediawiki-core-phpcs-strict-HEAD - mediawiki-core-jslint - mediawiki-core-jsduck - mediawiki-core-lint: -- To view, visit https://gerrit.wikimedia.org/r/105204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8dd1f05d473fab10f2ec182876f0b9a4df1e3c5 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] Move $titleForParse setting up earlier and use it in remaini... - change (mediawiki...FeaturedFeeds)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/105205 Change subject: Move $titleForParse setting up earlier and use it in remaining transformMsg() call .. Move $titleForParse setting up earlier and use it in remaining transformMsg() call Change-Id: I313316b928d6d6fe64398471f74c4a18ce3dbdc3 --- M FeaturedFeeds.body.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FeaturedFeeds refs/changes/05/105205/1 diff --git a/FeaturedFeeds.body.php b/FeaturedFeeds.body.php index cdfacc3..d5f10df 100644 --- a/FeaturedFeeds.body.php +++ b/FeaturedFeeds.body.php @@ -406,7 +406,12 @@ self::$parserOptions-setTimestamp( $date ); self::$parserOptions-setUserLang( $this-getLanguage() ); - $titleText = self::$parser-transformMsg( $this-page, self::$parserOptions ); + if ( !isset( $this-titleForParse ) ) { + // parsing with such title makes stuff like {{CURRENTMONTH}} localised + $this-titleForParse = Title::newFromText( 'MediaWiki:Dummy/' . $this-languageCode ); + } + + $titleText = self::$parser-transformMsg( $this-page, self::$parserOptions, $this-titleForParse ); $title = Title::newFromText( $titleText ); if ( !$title ) { return false; @@ -424,11 +429,6 @@ $url = SpecialPage::getTitleFor( 'FeedItem' , $this-name . '/' . $ts-getTimestamp( TS_MW ) . '/' . $this-languageCode )-getFullURL(); - - if ( !isset( $this-titleForParse ) ) { - // parsing with such title makes stuff like {{CURRENTMONTH}} localised - $this-titleForParse = Title::newFromText( 'MediaWiki:Dummy/' . $this-languageCode ); - } return new FeaturedFeedItem( self::$parser-transformMsg( $this-entryName, self::$parserOptions, $this-titleForParse ), -- To view, visit https://gerrit.wikimedia.org/r/105205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I313316b928d6d6fe64398471f74c4a18ce3dbdc3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FeaturedFeeds Gerrit-Branch: master Gerrit-Owner: Chad ch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update documentation for ParserCache::save() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update documentation for ParserCache::save() .. Update documentation for ParserCache::save() The second parameter is a WikiPage, not an Article. Rename the variable to $page to avoid confusion. Change-Id: I4655aa9d8c7469805362c8ec43559bb5f9be4b06 --- M includes/parser/ParserCache.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Chad: Looks good to me, approved Parent5446: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index dae0c68..9eaa3e2 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -213,11 +213,11 @@ /** * @param ParserOutput $parserOutput -* @param Article $article +* @param WikiPage $page * @param ParserOptions $popts * @param string $cacheTime Time when the cache was generated */ - public function save( $parserOutput, $article, $popts, $cacheTime = null ) { + public function save( $parserOutput, $page, $popts, $cacheTime = null ) { $expire = $parserOutput-getCacheExpiry(); if ( $expire 0 ) { $cacheTime = $cacheTime ?: wfTimestampNow(); @@ -231,11 +231,11 @@ $optionsKey-setContainsOldMagic( $parserOutput-containsOldMagic() ); - $parserOutputKey = $this-getParserOutputKey( $article, - $popts-optionsHash( $optionsKey-mUsedOptions, $article-getTitle() ) ); + $parserOutputKey = $this-getParserOutputKey( $page, + $popts-optionsHash( $optionsKey-mUsedOptions, $page-getTitle() ) ); // Save the timestamp so that we don't have to load the revision row on view - $parserOutput-setTimestamp( $article-getTimestamp() ); + $parserOutput-setTimestamp( $page-getTimestamp() ); $parserOutput-mText .= \n!-- Saved in parser cache with key $parserOutputKey and timestamp $cacheTime\n --\n; wfDebug( Saved in parser cache with key $parserOutputKey and timestamp $cacheTime\n ); @@ -244,7 +244,7 @@ $this-mMemc-set( $parserOutputKey, $parserOutput, $expire ); // ...and its pointer - $this-mMemc-set( $this-getOptionsKey( $article ), $optionsKey, $expire ); + $this-mMemc-set( $this-getOptionsKey( $page ), $optionsKey, $expire ); } else { wfDebug( Parser output was marked as uncacheable and has not been saved.\n ); } -- To view, visit https://gerrit.wikimedia.org/r/104518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4655aa9d8c7469805362c8ec43559bb5f9be4b06 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Cscott canan...@wikimedia.org Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: Reedy re...@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 52430) Accept non-standard WS in extension tags: continued - change (mediawiki...parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/105206 Change subject: (Bug 52430) Accept non-standard WS in extension tags: continued .. (Bug 52430) Accept non-standard WS in extension tags: continued * Commit c55b629c added support for accepting non-standard WS in xmlish tags and added a parser test for ref tags. However, non-ref extension tags still had broken support. This patch fixes that. Ex: math 1+2/math now RTs without introducing an extra closing /math tag. * zhwiki:%E4%BD%9C%E7%94%A8%E9%87%8F-%E8%A7%92%E5%BA%A6%E5%9D%90%E6%A0%87 now RTs without a semantic error, just a syntactic diff around normalizing the whitespace in /math . * FIXME: Not sure how to add a parser test for this yet. Change-Id: Icbd236d8f6902359b9fab453b80aec81a878e399 --- M lib/mediawiki.Util.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/06/105206/1 diff --git a/lib/mediawiki.Util.js b/lib/mediawiki.Util.js index 143c499..ff5b72a 100644 --- a/lib/mediawiki.Util.js +++ b/lib/mediawiki.Util.js @@ -932,7 +932,7 @@ extractExtBody: function(extName, extTagSrc) { var re = + extName + [^]*/?([\\s\\S]*); return extTagSrc.replace(new RegExp(re, mi), function() { - return arguments[1].replace(new RegExp(/ + extName + , mi), ); + return arguments[1].replace(new RegExp(/ + extName + \\s*, mi), ); }); }, -- To view, visit https://gerrit.wikimedia.org/r/105206 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbd236d8f6902359b9fab453b80aec81a878e399 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/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] Declare visibility for class properties in DatabasePostgres.php - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Declare visibility for class properties in DatabasePostgres.php .. Declare visibility for class properties in DatabasePostgres.php * Add used by not declared class properties. * Rename private $numeric_version to $numericVersion. * Update some documentation. Change-Id: I233001e732724146fcee04f0e358a9563c9e9fd4 --- M includes/db/DatabasePostgres.php 1 file changed, 43 insertions(+), 18 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index cfa2074..a5a7a19 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -135,8 +135,7 @@ * @ingroup Database */ class PostgresTransactionState { - - static $WATCHED = array( + private static $WATCHED = array( array( desc = %s: Connection state changed from %s - %s\n, states = array( @@ -155,6 +154,12 @@ ) ) ); + + /** @var array */ + private $mNewState; + + /** @var array */ + private $mCurrentState; public function __construct( $conn ) { $this-mConn = $conn; @@ -284,10 +289,26 @@ * @ingroup Database */ class DatabasePostgres extends DatabaseBase { - var $mInsertId = null; - var $mLastResult = null; - var $numeric_version = null; - var $mAffectedRows = null; + /** @var resource */ + protected $mLastResult = null; + + /** @var int The number of rows affected as an integer */ + protected $mAffectedRows = null; + + /** @var int */ + private $mInsertId = null; + + /** @var float|string */ + private $numericVersion = null; + + /** @var string Connect string to open a PostgreSQL connection */ + private $connectString; + + /** @var PostgresTransactionState */ + private $mTransactionState; + + /** @var string */ + private $mCoreSchema; function getType() { return 'postgres'; @@ -602,7 +623,7 @@ * Return the result of the last call to nextSequenceValue(); * This must be called after nextSequenceValue(). * -* @return integer|null +* @return int|null */ function insertId() { return $this-mInsertId; @@ -791,7 +812,7 @@ } $table = $this-tableName( $table ); - if ( !isset( $this-numeric_version ) ) { + if ( !isset( $this-numericVersion ) ) { $this-getServerVersion(); } @@ -820,7 +841,7 @@ $sql = INSERT INTO $table ( . implode( ',', $keys ) . ') VALUES '; if ( $multi ) { - if ( $this-numeric_version = 8.2 !$savepoint ) { + if ( $this-numericVersion = 8.2 !$savepoint ) { $first = true; foreach ( $args as $row ) { if ( $first ) { @@ -984,7 +1005,9 @@ /** * Return the next in a sequence, save the value for retrieval via insertId() -* @return null +* +* @param string $seqName +* @return int|null */ function nextSequenceValue( $seqName ) { $safeseq = str_replace( ', '', $seqName ); @@ -997,6 +1020,8 @@ /** * Return the current value of a sequence. Assumes it has been nextval'ed in this session. +* +* @param string $seqName * @return */ function currentSequenceValue( $seqName ) { @@ -1126,7 +1151,7 @@ * Needs transaction * * @since 1.19 -* @return string return default schema for the current session +* @return string Default schema for the current session */ function getCurrentSchema() { $res = $this-query( SELECT current_schema(), __METHOD__ ); @@ -1239,21 +1264,21 @@ * @return string Version information from the database */ function getServerVersion() { - if ( !isset( $this-numeric_version ) ) { + if ( !isset( $this-numericVersion ) ) { $versionInfo = pg_version( $this-mConn ); if ( version_compare( $versionInfo['client'], '7.4.0', 'lt' ) ) { // Old client, abort install - $this-numeric_version = '7.3 or earlier'; + $this-numericVersion = '7.3 or earlier'; } elseif ( isset( $versionInfo['server'] ) ) { // Normal client -
[MediaWiki-commits] [Gerrit] Use box-sizing:border-box for textarea - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/105207 Change subject: Use box-sizing:border-box for textarea .. Use box-sizing:border-box for textarea Bug 40610 identified an overflowing textarea for #editform and fixed this. All textarea elements overflows because they use the following CSS definition from skins/common/commonElements.css: textarea { width: 100%; padding: .1em; } In standard compliance mode of the box model this generates a width of 100% plus .1em for the border box. To create a border box with a width of 100% definition box-sizing:border-box should be added: textarea { width: 100%; padding: .1em; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } Bug: 56692 Change-Id: Ife1cf74ca33b4f53ec052947bd8b7b2fd28705ce --- M resources/mediawiki/mediawiki.feedback.js M skins/cologneblue/screen.css M skins/common/commonContent.css M skins/common/commonElements.css M skins/common/config.css M skins/modern/main.css 6 files changed, 9 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/105207/1 diff --git a/resources/mediawiki/mediawiki.feedback.js b/resources/mediawiki/mediawiki.feedback.js index 1afe51e..9de69b2 100644 --- a/resources/mediawiki/mediawiki.feedback.js +++ b/resources/mediawiki/mediawiki.feedback.js @@ -106,12 +106,12 @@ $( 'div style=margin-top: 1em;/div' ).append( mw.msg( 'feedback-subject' ), $( 'br' ), - $( 'input type=text class=feedback-subject name=subject maxlength=60 style=width: 99%;/' ) + $( 'input type=text class=feedback-subject name=subject maxlength=60 style=width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;/' ) ), $( 'div style=margin-top: 0.4em;/div' ).append( mw.msg( 'feedback-message' ), $( 'br' ), - $( 'textarea name=message class=feedback-message style=width: 99%; rows=5 cols=60/textarea' ) + $( 'textarea name=message class=feedback-message rows=5 cols=60/textarea' ) ) ), $( 'div class=feedback-mode feedback-bugs/div' ).append( diff --git a/skins/cologneblue/screen.css b/skins/cologneblue/screen.css index bc5dd31..40a9432 100644 --- a/skins/cologneblue/screen.css +++ b/skins/cologneblue/screen.css @@ -56,9 +56,6 @@ textarea { overflow: auto; width: 100%; -} - -#editform textarea { display: block; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; diff --git a/skins/common/commonContent.css b/skins/common/commonContent.css index 35071a4..a869923 100644 --- a/skins/common/commonContent.css +++ b/skins/common/commonContent.css @@ -151,16 +151,6 @@ } /** - * Edit forms - */ -#editform textarea { - display: block; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -/** * Basic styles for the user login and create account forms */ #loginend { diff --git a/skins/common/commonElements.css b/skins/common/commonElements.css index 742f839..ad7942a 100644 --- a/skins/common/commonElements.css +++ b/skins/common/commonElements.css @@ -207,6 +207,10 @@ textarea { width: 100%; padding: .1em; + display: block; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } select { vertical-align: top; diff --git a/skins/common/config.css b/skins/common/config.css index 39206c3..d646273 100644 --- a/skins/common/config.css +++ b/skins/common/config.css @@ -138,5 +138,6 @@ } #config-live-log { - margin-right: 18em; + overflow: hidden; + min-width: 20em; } diff --git a/skins/modern/main.css b/skins/modern/main.css index 5da7d5b..6f73f0e 100644 --- a/skins/modern/main.css +++ b/skins/modern/main.css @@ -155,8 +155,7 @@ textarea { width: 100%; padding: .1em; -} -#editform textarea { + display: block; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -- To view, visit https://gerrit.wikimedia.org/r/105207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
[MediaWiki-commits] [Gerrit] Change Title::isExternal to use strict comparsion - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Change Title::isExternal to use strict comparsion .. Change Title::isExternal to use strict comparsion Change-Id: Ib4e646f98dc6d17a8cb1ca837dcdc9d48f85e2a7 --- M includes/Title.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Title.php b/includes/Title.php index 0b4b99c..64cea91 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -59,7 +59,7 @@ var $mDbkeyform = ''; // / Main part with underscores var $mUserCaseDBKey; // / DB key with the initial letter in the case specified by the user var $mNamespace = NS_MAIN;// / Namespace index, i.e. one of the NS_ constants - var $mInterwiki = ''; // / Interwiki prefix (or null string) + var $mInterwiki = ''; // / Interwiki prefix var $mFragment; // / Title fragment (i.e. the bit after the #) var $mArticleID = -1; // / Article ID, fetched from the link cache on demand var $mLatestID = false; // / ID of most recent revision @@ -700,11 +700,11 @@ * @return Bool */ public function isExternal() { - return ( $this-mInterwiki != '' ); + return $this-mInterwiki !== ''; } /** -* Get the interwiki prefix (or null string) +* Get the interwiki prefix * * @return String Interwiki prefix */ -- To view, visit https://gerrit.wikimedia.org/r/104936 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4e646f98dc6d17a8cb1ca837dcdc9d48f85e2a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: Nikerabbit niklas.laxst...@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] [browser test] change list_item to li - change (mediawiki...VisualEditor)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/105208 Change subject: [browser test] change list_item to li .. [browser test] change list_item to li Both are valid, but using li is the convention. Change-Id: Ic6929a1c8508760d0228c78fa132e1b1d92680a2 --- M modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/08/105208/1 diff --git a/modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb b/modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb index 3a0b2fe..02cc054 100644 --- a/modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb +++ b/modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb @@ -57,7 +57,7 @@ span(:leftarrowclose, class: oo-ui-iconedElement-icon oo-ui-icon-previous, frame: frame) text_field(:link_textfield, index: 0, frame: frame) span(:another_save_page, class: oo-ui-labeledElement-label, text: Save page, frame: frame) -list_item(:template_list_item, text: S, frame: frame) +li(:template_list_item, text: S, frame: frame) div(:ve_link_ui, class: oo-ui-window-title, frame: frame) end -- To view, visit https://gerrit.wikimedia.org/r/105208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6929a1c8508760d0228c78fa132e1b1d92680a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor 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] Declare visibility for class properties of LBFactoryMulti - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Declare visibility for class properties of LBFactoryMulti .. Declare visibility for class properties of LBFactoryMulti Punctuation in some comments was updated for consistency. Change-Id: Idaac104b4f39ce3a4de135cebea9eb20b0c3b5df --- M includes/db/LBFactoryMulti.php 1 file changed, 74 insertions(+), 10 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/db/LBFactoryMulti.php b/includes/db/LBFactoryMulti.php index 2f4cb57..2ab0554 100644 --- a/includes/db/LBFactoryMulti.php +++ b/includes/db/LBFactoryMulti.php @@ -26,7 +26,7 @@ * Ignores the old configuration globals * * Configuration: - * sectionsByDBA map of database names to section names + * sectionsByDBA map of database names to section names. * * sectionLoadsA 2-d map. For each section, gives a map of server names to * load ratios. For example: @@ -55,16 +55,16 @@ * * hostsByName A map of hostname to IP address. * - * externalLoads A map of external storage cluster name to server load map + * externalLoads A map of external storage cluster name to server load map. * * externalTemplateOverrides A set of server info keys overriding serverTemplate for external - * storage + * storage. * * templateOverridesByServer A 2-d map overriding serverTemplate and * externalTemplateOverrides on a server-by-server basis. Applies * to both core and external storage. * - * templateOverridesByCluster A 2-d map overriding the server info by external storage cluster + * templateOverridesByCluster A 2-d map overriding the server info by external storage cluster. * * masterTemplateOverrides An override array for all master servers. * @@ -75,14 +75,78 @@ */ class LBFactoryMulti extends LBFactory { // Required settings - var $sectionsByDB, $sectionLoads, $serverTemplate; + + /** @var array A map of database names to section names */ + protected $sectionsByDB; + + /** +* @var array A 2-d map. For each section, gives a map of server names to +* load ratios +*/ + protected $sectionLoads; + + /** +* @var array A server info associative array as documented for +* $wgDBservers. The host, hostName and load entries will be +* overridden +*/ + protected $serverTemplate; + // Optional settings - var $groupLoadsBySection = array(), $groupLoadsByDB = array(), $hostsByName = array(); - var $externalLoads = array(), $externalTemplateOverrides, $templateOverridesByServer; - var $templateOverridesByCluster, $masterTemplateOverrides, $readOnlyBySection = array(); + + /** @var array A 3-d map giving server load ratios for each section and group */ + protected $groupLoadsBySection = array(); + + /** @var array A 3-d map giving server load ratios by DB name */ + protected $groupLoadsByDB = array(); + + /** @var array A map of hostname to IP address */ + protected $hostsByName = array(); + + /** @var array A map of external storage cluster name to server load map */ + protected $externalLoads = array(); + + /** +* @var array A set of server info keys overriding serverTemplate for +* external storage +*/ + protected $externalTemplateOverrides; + + /** +* @var array A 2-d map overriding serverTemplate and +* externalTemplateOverrides on a server-by-server basis. Applies to both +* core and external storage +*/ + protected $templateOverridesByServer; + + /** @var array A 2-d map overriding the server info by external storage cluster */ + protected $templateOverridesByCluster; + + /** @var array An override array for all master servers */ + protected $masterTemplateOverrides; + + /** +* @var array|bool A map of section name to read-only message. Missing or +* false for read/write +*/ + protected $readOnlyBySection = array(); + // Other stuff - var $conf, $mainLBs = array(), $extLBs = array(); - var $lastWiki, $lastSection; + + /** @var array Load balancer factory configuration */ + protected $conf; + + /** @var LoadBalancer[] */ + protected $mainLBs = array(); + + /** @var LoadBalancer[] */ + protected $extLBs = array(); + + /** @var string */ + protected $lastWiki; + + /** @var string */ + protected $lastSection; /** * @param $conf