[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Re-enable ContentTranslation

2017-04-23 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349869 )

Change subject: Re-enable ContentTranslation
..

Re-enable ContentTranslation

Bug: T163344
Change-Id: Ia59ca091364b82f1b55a4e3d510a17ada777621e
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/69/349869/1

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 66781e5..0e2dbef 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16792,7 +16792,7 @@
 
 'wmgUseContentTranslation' => [
'default' => false,
-   'wikipedia' => false,
+   'wikipedia' => true,
'arbcom_cswiki' => false, // T151731
'arbcom_dewiki' => false,
'arbcom_enwiki' => false,

-- 
To view, visit https://gerrit.wikimedia.org/r/349869
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia59ca091364b82f1b55a4e3d510a17ada777621e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ArticlePlaceholder[master]: Very basic meta description tag

2017-04-23 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349868 )

Change subject: Very basic meta description tag
..

Very basic meta description tag

Bug: T157466
Change-Id: I63c8d98194217d9b531c5950ee4d40033581be3d
---
M includes/AboutTopicRenderer.php
M tests/phpunit/includes/AboutTopicRendererTest.php
2 files changed, 58 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder 
refs/changes/68/349868/1

diff --git a/includes/AboutTopicRenderer.php b/includes/AboutTopicRenderer.php
index 8d519c9..9c9bd57 100644
--- a/includes/AboutTopicRenderer.php
+++ b/includes/AboutTopicRenderer.php
@@ -110,6 +110,7 @@
 
$this->showLanguageLinks( $entityId, $output );
$this->setOtherProjectsLinks( $entityId, $output );
+   $this->addMetaTags( $entityId, $output, $language );
}
 
/**
@@ -161,6 +162,23 @@
 
if ( $label !== null ) {
return $label->getText();
+   }
+
+   return null;
+   }
+
+   /**
+* @param ItemId $entityId
+* @param Language $language
+*
+* @return string|null null if the item doesn't have a description
+*/
+   private function getDescription( ItemId $entityId, Language $language ) 
{
+   $description = 
$this->termLookupFactory->newLabelDescriptionLookup( $language )
+   ->getDescription( $entityId );
+
+   if ( $description !== null ) {
+   return $description->getText();
}
 
return null;
@@ -225,4 +243,20 @@
$output->setProperty( 'wikibase-otherprojects-sidebar', 
$otherProjects );
}
 
+   private function addMetaTags( ItemId $itemId, OutputPage $output, 
Language $language ) {
+   $title = $this->getLabel( $itemId, $language );
+   $description = $this->getDescription( $itemId, $language );
+
+   $descriptionTag = '';
+   if ( $title !== null ) {
+   $descriptionTag .= $title . '. ';
+   }
+   if ( $description !== null ) {
+   $descriptionTag .= $description . '. ';
+   }
+
+   if ( $descriptionTag !== '' ) {
+   $output->addMeta( 'description', trim( $descriptionTag 
) );
+   }
+   }
 }
diff --git a/tests/phpunit/includes/AboutTopicRendererTest.php 
b/tests/phpunit/includes/AboutTopicRendererTest.php
index 8a2d1e5..b919339 100644
--- a/tests/phpunit/includes/AboutTopicRendererTest.php
+++ b/tests/phpunit/includes/AboutTopicRendererTest.php
@@ -170,6 +170,17 @@
}
 
/**
+* Test meta tags
+*/
+   public function testMetaTags() {
+   $output = $this->getInstanceOutput( new ItemId( 'Q123' ) );
+   $this->assertSame(
+   [ [ 'description', 'Label of Q123. Description of 
Q123.' ] ],
+   $output->getMetaTags()
+   );
+   }
+
+   /**
 * @return LanguageFallbackLabelDescriptionLookupFactory
 */
private function getTermLookupFactory() {
@@ -178,10 +189,10 @@
)
->disableOriginalConstructor()
->getMock();
-   $labelDescriptionLookupFactory->expects( $this->once() )
+   $labelDescriptionLookupFactory->expects( $this->atLeastOnce() )
->method( 'newLabelDescriptionLookup' )
->with( Language::factory( 'eo' ) )
-   ->will( $this->returnValue( $this->getLabelLookup() ) );
+   ->will( $this->returnValue( 
$this->getLabelDescriptionLookup() ) );
 
return $labelDescriptionLookupFactory;
}
@@ -189,17 +200,24 @@
/**
 * @return LabelDescriptionLookup
 */
-   private function getLabelLookup() {
-   $labelLookup = $this->getMock( LabelDescriptionLookup::class );
-   $labelLookup->expects( $this->any() )
+   private function getLabelDescriptionLookup() {
+   $labelDescriptionLookup = $this->getMock( 
LabelDescriptionLookup::class );
+   $labelDescriptionLookup->expects( $this->any() )
->method( 'getLabel' )
->will( $this->returnCallback( function( ItemId $id ) {
return new Term( 'eo', 'Label of ' . 
$id->getSerialization() );
} ) );
 
-   return $labelLookup;
+   $labelDescriptionLookup->expects( $this->any() )
+   ->method( 'getDescription' )
+   ->will( $this->returnCallback( function( ItemId $id ) {
+

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: [WIP] [Code experiment] Try to select all columns from wb_terms

2017-04-23 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349867 )

Change subject: [WIP] [Code experiment] Try to select all columns from wb_terms
..

[WIP] [Code experiment] Try to select all columns from wb_terms

Bug: T123867
Change-Id: I169302dc38c5a5e1d20aea1ab3bc891b744b3b51
---
M lib/includes/Store/Sql/SqlEntityInfoBuilder.php
M lib/includes/Store/Sql/TermSqlIndex.php
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/67/349867/1

diff --git a/lib/includes/Store/Sql/SqlEntityInfoBuilder.php 
b/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
index a6c3103..ebb18c6 100644
--- a/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
+++ b/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
@@ -389,10 +389,11 @@
$dbw = $this->getConnection( DB_REPLICA );
 
// Do one query per term type here, this is way faster on 
MySQL: T147748
+   // Select all columns for b/c T162673
foreach ( $termTypes as $termType ) {
$res = $dbw->select(
$this->termTable,
-   array( 'term_entity_type', 'term_entity_id', 
'term_type', 'term_language', 'term_text' ),
+   '*',
array_merge( $where, $termType !== null ? [ 
'term_type' => $termType ] : [] ),
__METHOD__
);
diff --git a/lib/includes/Store/Sql/TermSqlIndex.php 
b/lib/includes/Store/Sql/TermSqlIndex.php
index 10ac82e..be5dca1 100644
--- a/lib/includes/Store/Sql/TermSqlIndex.php
+++ b/lib/includes/Store/Sql/TermSqlIndex.php
@@ -523,9 +523,10 @@
 
$dbr = $this->getReadDb();
 
+   // Select all columns T162673
$res = $dbr->select(
$this->tableName,
-   [ 'term_entity_type', 'term_type', 'term_language', 
'term_text', 'term_entity_id' ],
+   '*',
$conditions,
__METHOD__
);

-- 
To view, visit https://gerrit.wikimedia.org/r/349867
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I169302dc38c5a5e1d20aea1ab3bc891b744b3b51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Use tags in wikibase-validator-illegal-tabular-data-t...

2017-04-23 Thread Aude (Code Review)
Aude has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349866 )

Change subject: Use  tags in wikibase-validator-illegal-tabular-data-title
..

Use  tags in wikibase-validator-illegal-tabular-data-title

and in wikibase-validator-illegal-geo-shape-title

Bug: T163417
Change-Id: I96b4275b5d8536a391593709a845590d2d17c517
---
M repo/i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/66/349866/1

diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index c9d6e87..e29d21a 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -130,8 +130,8 @@
"wikibase-validator-label-with-description-conflict": "Item $3 already 
has label \"$1\" associated with language code $2, using the same description 
text.",
"wikibase-validator-label-no-entityid": "The label must not be a valid 
entity ID.",
"wikibase-validator-illegal-file-chars": "File names are not allowed to 
contain characters like colons or slashes. Only paste the file name after 
\"File:\", please.",
-   "wikibase-validator-illegal-geo-shape-title": "Value must start with 
\"Data:\" and end with \".map\". In addition title should not contain 
characters like colon, hash or pipe.",
-   "wikibase-validator-illegal-tabular-data-title": "Value must start with 
\"Data:\" and end with \".tab\". In addition title should not contain 
characters like colon, hash or pipe.",
+   "wikibase-validator-illegal-geo-shape-title": "Value must start with 
Data: and end with .map. In addition title should not 
contain characters like colon, hash or pipe.",
+   "wikibase-validator-illegal-tabular-data-title": "Value must start with 
Data: and end with .tab. In addition title should not 
contain characters like colon, hash or pipe.",
"wikibase-validator-no-such-media": "The file \"$1\" does not exist on 
[https://commons.wikimedia.org/ Wikimedia Commons].",
"wikibase-validator-no-such-sitelink": "Could not find a sitelink to 
\"$1\" when trying to edit badges.",
"wikibase-validator-page-not-exists": "The page \"$1\" does not exist.",

-- 
To view, visit https://gerrit.wikimedia.org/r/349866
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96b4275b5d8536a391593709a845590d2d17c517
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Fix language code for Norwegian

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349863 )

Change subject: Fix language code for Norwegian
..


Fix language code for Norwegian

Bug: T163647
Change-Id: Ie1ecd81bd2ac088ae6ae2ea1246ddd244b92c20a
---
M ProofreadPage.namespaces.php
1 file changed, 8 insertions(+), 8 deletions(-)

Approvals:
  jenkins-bot: Verified
  Tpt: Looks good to me, approved



diff --git a/ProofreadPage.namespaces.php b/ProofreadPage.namespaces.php
index ed601c7..f82dbb0 100644
--- a/ProofreadPage.namespaces.php
+++ b/ProofreadPage.namespaces.php
@@ -274,20 +274,20 @@
'index_talk' =>  'अनुक्रमणिका_चर्चा'
 ];
 
+/** Norwegian (bokmål)‬ (‪norsk (bokmål)‬) */
+$proofreadPageNamespacesNames['nb'] = [
+   'page' => 'Side',
+   'page_talk' => 'Sidediskusjon',
+   'index' => 'Indeks',
+   'index_talk' => 'Indeksdiskusjon'
+];
+
 /** Dutch (Nederlands) */
 $proofreadPageNamespacesNames['nl'] = [
'page' => 'Pagina',
'page_talk' => 'Overleg_pagina',
'index' => 'Index',
'index_talk' => 'Overleg_index'
-];
-
-/** Norwegian (bokmål)‬ (‪norsk (bokmål)‬) */
-$proofreadPageNamespacesNames['no'] = [
-   'page' => 'Side',
-   'page_talk' => 'Sidediskusjon',
-   'index' => 'Indeks',
-   'index_talk' => 'Indeksdiskusjon'
 ];
 
 /** Oriya (ଓଡ଼ିଆ) */

-- 
To view, visit https://gerrit.wikimedia.org/r/349863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1ecd81bd2ac088ae6ae2ea1246ddd244b92c20a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>
Gerrit-Reviewer: saper 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Also check ID in Lexeme::isSufficientlyInitialized

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349445 )

Change subject: Also check ID in Lexeme::isSufficientlyInitialized
..


Also check ID in Lexeme::isSufficientlyInitialized

The ID also is a field that can never be set back to null. All three
fields can be initialized once, but this decision can never be
reverted.

This does have zero impact on the code using this, because the ID is
already checked. But it makes the Lexeme implementation more consistent.

Change-Id: I3136d6cc8b09227bbc9c306ab83a2ffec0c5416b
---
M src/Content/LexemeContent.php
M src/DataModel/Lexeme.php
2 files changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/Content/LexemeContent.php b/src/Content/LexemeContent.php
index bbdd898..b86a59a 100644
--- a/src/Content/LexemeContent.php
+++ b/src/Content/LexemeContent.php
@@ -73,7 +73,8 @@
 * @return bool
 */
public function isValid() {
-   return parent::isValid() && 
$this->getEntity()->isSufficientlyInitialized();
+   return parent::isValid()
+   && $this->getEntity()->isSufficientlyInitialized();
}
 
 }
diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index 95bc80e..d725590 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -240,7 +240,9 @@
 * @return bool False if a non-optional field was never initialized, 
true otherwise.
 */
public function isSufficientlyInitialized() {
-   return $this->language !== null && $this->lexicalCategory !== 
null;
+   return $this->id !== null
+   && $this->language !== null
+   && $this->lexicalCategory !== null;
}
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/349445
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3136d6cc8b09227bbc9c306ab83a2ffec0c5416b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] oojs/ui[master]: TabOptionWidget: Cleanup & align paddings/position to dialog...

2017-04-23 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349865 )

Change subject: TabOptionWidget: Cleanup & align paddings/position to dialog 
environment
..

TabOptionWidget: Cleanup & align paddings/position to dialog environment

Cleaning up TabOptionWidget's selectors, removing unused indicatorElement
selectors and simplifying others.
Also
 - aligning padding/positioning to dialogs layout, especially
to button in `.oo-ui-window-head` and
 - adding `box-sizing: border-box` as general approach.

Change-Id: I6fa788a14325a50dfa2a36201d31b4786e736fa2
---
M src/styles/widgets/TabOptionWidget.less
M src/themes/apex/common.less
M src/themes/apex/widgets.less
M src/themes/mediawiki/common.less
M src/themes/mediawiki/widgets.less
5 files changed, 35 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/65/349865/1

diff --git a/src/styles/widgets/TabOptionWidget.less 
b/src/styles/widgets/TabOptionWidget.less
index 0b83154..fdc3bf0 100644
--- a/src/styles/widgets/TabOptionWidget.less
+++ b/src/styles/widgets/TabOptionWidget.less
@@ -2,6 +2,7 @@
 
 .oo-ui-tabOptionWidget {
display: inline-block;
+   .oo-ui-box-sizing( border-box );
vertical-align: bottom;
 
.theme-oo-ui-tabOptionWidget();
diff --git a/src/themes/apex/common.less b/src/themes/apex/common.less
index 622e4c9..5526db1 100644
--- a/src/themes/apex/common.less
+++ b/src/themes/apex/common.less
@@ -35,6 +35,7 @@
 @size-indicator: unit( 12 / 16 / 0.8, em );
 
 @border-radius-default: 0.25em;
+@border-radius-taboption: 0.5em;
 
 @line-height-default: 1.4;
 
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index 2d5a14f..13bd86c 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -959,23 +959,17 @@
 }
 
 .theme-oo-ui-tabOptionWidget () {
-   padding: 0.5em 1em;
margin: 0.5em 0 0 0.75em;
-   border: 1px solid transparent;
-   border-bottom: 0;
-   border-top-left-radius: 0.5em;
-   border-top-right-radius: 0.5em;
+   border-color: transparent;
+   border-style: solid;
+   border-width: 1px 1px 0 1px;
+   border-top-left-radius: @border-radius-taboption;
+   border-top-right-radius: @border-radius-taboption;
+   padding: 0.5em 1em;
 
-   &.oo-ui-indicatorElement .oo-ui-labelElement-label {
-   padding-right: 1.5em;
-   }
-
-   &.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
-   opacity: 0.5;
-   }
-
-   .oo-ui-selectWidget-pressed &.oo-ui-optionWidget-pressed {
-   background-color: transparent;
+   &.oo-ui-optionWidget-selected {
+   background-color: @background-color-main;
+   border-color: #ddd;
}
 
&.oo-ui-widget-enabled {
@@ -988,13 +982,10 @@
background-color: @background-color-main;
border-color: #ddd;
}
-   }
 
-   .oo-ui-selectWidget-pressed &.oo-ui-optionWidget-selected,
-   .oo-ui-selectWidget-depressed &.oo-ui-optionWidget-selected,
-   &.oo-ui-optionWidget-selected:hover {
-   background-color: @background-color-main;
-   border-color: #ddd;
+   &.oo-ui-optionWidget-selected:hover {
+   background-color: @background-color-main;
+   }
}
 }
 
diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 0907636..fa6d520 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -90,6 +90,7 @@
 @height-icon-element: 100%;
 
 @margin-dialog-bar-button-framed: 6 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.46875em`≈`6px`
+@margin-taboption: @margin-dialog-bar-button-framed;
 
 @border-default: @border-width-default solid @border-color-default;
 @border-disabled: @border-width-default solid @border-color-disabled;
@@ -128,8 +129,10 @@
 @padding-input-text: @padding-top-default @padding-horizontal-input-text 
@padding-bottom-default;
 @padding-menu: @padding-top-menu @padding-horizontal-default 
@padding-bottom-menu;
 @padding-menu-large: ( @padding-top-menu * 1.5 ) @padding-horizontal-default ( 
@padding-bottom-menu * 1.5 );
+@padding-taboption: @padding-top-default @padding-horizontal-taboption 
@padding-bottom-default;
 @padding-horizontal-default: 12 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.9375em`≈`12px`
 @padding-horizontal-input-text: 8 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default;
+@padding-horizontal-taboption: 13 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.9375em`≈`13px`; 
@padding-horizontal-default = @border-width-default
 @padding-vertical-label: 4 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.3125em`≈`4px`
 @padding-top-default: 8 / 

[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[wmf/1.29.0-wmf.20]: Fix language code for Norwegian

2017-04-23 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349864 )

Change subject: Fix language code for Norwegian
..

Fix language code for Norwegian

Change-Id: Ie1ecd81bd2ac088ae6ae2ea1246ddd244b92c20a
---
M ProofreadPage.namespaces.php
1 file changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/64/349864/1

diff --git a/ProofreadPage.namespaces.php b/ProofreadPage.namespaces.php
index ed601c7..f82dbb0 100644
--- a/ProofreadPage.namespaces.php
+++ b/ProofreadPage.namespaces.php
@@ -274,20 +274,20 @@
'index_talk' =>  'अनुक्रमणिका_चर्चा'
 ];
 
+/** Norwegian (bokmål)‬ (‪norsk (bokmål)‬) */
+$proofreadPageNamespacesNames['nb'] = [
+   'page' => 'Side',
+   'page_talk' => 'Sidediskusjon',
+   'index' => 'Indeks',
+   'index_talk' => 'Indeksdiskusjon'
+];
+
 /** Dutch (Nederlands) */
 $proofreadPageNamespacesNames['nl'] = [
'page' => 'Pagina',
'page_talk' => 'Overleg_pagina',
'index' => 'Index',
'index_talk' => 'Overleg_index'
-];
-
-/** Norwegian (bokmål)‬ (‪norsk (bokmål)‬) */
-$proofreadPageNamespacesNames['no'] = [
-   'page' => 'Side',
-   'page_talk' => 'Sidediskusjon',
-   'index' => 'Indeks',
-   'index_talk' => 'Indeksdiskusjon'
 ];
 
 /** Oriya (ଓଡ଼ିଆ) */

-- 
To view, visit https://gerrit.wikimedia.org/r/349864
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1ecd81bd2ac088ae6ae2ea1246ddd244b92c20a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: wmf/1.29.0-wmf.20
Gerrit-Owner: Dereckson 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Fix language code for Norwegian

2017-04-23 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349863 )

Change subject: Fix language code for Norwegian
..

Fix language code for Norwegian

Change-Id: Ie1ecd81bd2ac088ae6ae2ea1246ddd244b92c20a
---
M ProofreadPage.namespaces.php
1 file changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/63/349863/1

diff --git a/ProofreadPage.namespaces.php b/ProofreadPage.namespaces.php
index ed601c7..f82dbb0 100644
--- a/ProofreadPage.namespaces.php
+++ b/ProofreadPage.namespaces.php
@@ -274,20 +274,20 @@
'index_talk' =>  'अनुक्रमणिका_चर्चा'
 ];
 
+/** Norwegian (bokmål)‬ (‪norsk (bokmål)‬) */
+$proofreadPageNamespacesNames['nb'] = [
+   'page' => 'Side',
+   'page_talk' => 'Sidediskusjon',
+   'index' => 'Indeks',
+   'index_talk' => 'Indeksdiskusjon'
+];
+
 /** Dutch (Nederlands) */
 $proofreadPageNamespacesNames['nl'] = [
'page' => 'Pagina',
'page_talk' => 'Overleg_pagina',
'index' => 'Index',
'index_talk' => 'Overleg_index'
-];
-
-/** Norwegian (bokmål)‬ (‪norsk (bokmål)‬) */
-$proofreadPageNamespacesNames['no'] = [
-   'page' => 'Side',
-   'page_talk' => 'Sidediskusjon',
-   'index' => 'Indeks',
-   'index_talk' => 'Indeksdiskusjon'
 ];
 
 /** Oriya (ଓଡ଼ିଆ) */

-- 
To view, visit https://gerrit.wikimedia.org/r/349863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1ecd81bd2ac088ae6ae2ea1246ddd244b92c20a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Dereckson 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...DuskToDawn[master]: Remove HTML5 backwards-compatibility file

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349795 )

Change subject: Remove HTML5 backwards-compatibility file
..


Remove HTML5 backwards-compatibility file

Change-Id: I4b00d69cc29cb4b355c1d8d81138c78250312117
---
M DuskToDawn.skin.php
D resources/js/html5.js
M skin.json
3 files changed, 1 insertion(+), 13 deletions(-)

Approvals:
  SamanthaNguyen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/DuskToDawn.skin.php b/DuskToDawn.skin.php
index ed6323c..49eb3d2 100644
--- a/DuskToDawn.skin.php
+++ b/DuskToDawn.skin.php
@@ -33,15 +33,6 @@
'skins.dusktodawn'
) );
 
-   // HTML5 shim has to be loaded this way for older IEs...
-   $out->addHeadItem( 'html5shim',
-   ''
-   );
-
// And JS too!
$out->addModuleScripts( 'skins.dusktodawn' );
}
diff --git a/resources/js/html5.js b/resources/js/html5.js
deleted file mode 100644
index 6dd03a4..000
--- a/resources/js/html5.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// html5shiv MIT @rem remysharp.com/html5-enabling-script
-// iepp v1.6.2 MIT @jon_neal iecss.com/print-protector
-/*@cc_on(function(a,b){function r(a){var 
b=-1;while(++b
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: If the user scrolls through the list of languages hide the s...

2017-04-23 Thread Graviton57 (Code Review)
Graviton57 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349862 )

Change subject: If the user scrolls through the list of languages hide the 
software keyboard.
..

If the user scrolls through the list of languages hide the software keyboard.

Change-Id: I120aed32f7c6318567ed4313fc106e716da273be
---
M app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
1 file changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/62/349862/1

diff --git 
a/app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java 
b/app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
index b4ce530..04aeef8 100644
--- a/app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
+++ b/app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
@@ -10,6 +10,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.WindowManager;
+import android.widget.AbsListView;
 import android.widget.AdapterView;
 import android.widget.BaseAdapter;
 import android.widget.EditText;
@@ -20,6 +21,7 @@
 import org.wikipedia.WikipediaApp;
 import org.wikipedia.analytics.AppLanguageSelectFunnel;
 import org.wikipedia.language.AppLanguageState;
+import org.wikipedia.util.DeviceUtil;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -61,7 +63,7 @@
 }
 
 languagesList = (ListView) 
findViewById(R.id.preference_languages_list);
-EditText languagesFilter = (EditText) 
findViewById(R.id.preference_languages_filter);
+final EditText languagesFilter = (EditText) 
findViewById(R.id.preference_languages_filter);
 
 languagesList.setOnItemClickListener(new 
AdapterView.OnItemClickListener() {
 @Override
@@ -87,6 +89,20 @@
 }
 });
 
+languagesList.setOnScrollListener(new AbsListView.OnScrollListener() {
+@Override
+public void onScrollStateChanged(AbsListView view, int 
scrollState) {
+if (null != languagesFilter) {
+DeviceUtil.hideSoftKeyboard(languagesFilter);
+}
+}
+
+@Override
+public void onScroll(AbsListView view, int firstVisibleItem, int 
visibleItemCount, int totalItemCount) {
+
+}
+});
+
 languagesList.setAdapter(new LanguagesAdapter(languageCodes, app));
 
 int selectedLanguageIndex = 
languageCodes.indexOf(app.getAppLanguageCode());

-- 
To view, visit https://gerrit.wikimedia.org/r/349862
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I120aed32f7c6318567ed4313fc106e716da273be
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Graviton57 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityExternalValidation[master]: Group extension with Wikibase extensions on Special:Version

2017-04-23 Thread Aude (Code Review)
Aude has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349822 )

Change subject: Group extension with Wikibase extensions on Special:Version
..

Group extension with Wikibase extensions on Special:Version

Change-Id: Id055138f476812327ae092b8d7534b1ac6a31d67
---
M WikibaseQualityExternalValidation.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityExternalValidation
 refs/changes/22/349822/1

diff --git a/WikibaseQualityExternalValidation.php 
b/WikibaseQualityExternalValidation.php
index b32adc3..1691412 100644
--- a/WikibaseQualityExternalValidation.php
+++ b/WikibaseQualityExternalValidation.php
@@ -6,7 +6,7 @@
 
 call_user_func( function () {
// Set credits
-   $GLOBALS['wgExtensionCredits']['specialpage'][] = array(
+   $GLOBALS['wgExtensionCredits']['wikibase'][] = array(
'path' => __FILE__,
'name' => 'WikibaseQualityExternalValidation',
'author' => 'BP2014N1',

-- 
To view, visit https://gerrit.wikimedia.org/r/349822
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id055138f476812327ae092b8d7534b1ac6a31d67
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Aude 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: are property suggester tests run?

2017-04-23 Thread Aude (Code Review)
Aude has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349796 )

Change subject: are property suggester tests run?
..

are property suggester tests run?

checking if T152066 is still valid

Change-Id: I730cfab817c4a61f11af25d5676f094827a9a91f
---
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata 
refs/changes/96/349796/1

diff --git 
a/extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
 
b/extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
index c5143e8..6b540a5 100644
--- 
a/extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
+++ 
b/extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
@@ -32,6 +32,8 @@
}
 
public function testMergeWithTraditionalSearchResults() {
+   $this->assertTrue( false );
+
$suggesterResult = array(
array( 'id' =>  '8' ),
array( 'id' => '14' ),
diff --git 
a/extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
 
b/extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
index 9e66699..3d55455 100644
--- 
a/extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
+++ 
b/extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
@@ -81,6 +81,7 @@
) );
 
$result = $this->suggestionGenerator->filterSuggestions( 
$suggestions, 'foo', 'en', $resultSize );
+   $result = 'T152066';
 
$this->assertEquals( array( $suggestions[0], $suggestions[2] ), 
$result );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/349796
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I730cfab817c4a61f11af25d5676f094827a9a91f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: Aude 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...DuskToDawn[master]: Remove HTML5 backwards-compatibility file

2017-04-23 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349795 )

Change subject: Remove HTML5 backwards-compatibility file
..

Remove HTML5 backwards-compatibility file

Change-Id: I4b00d69cc29cb4b355c1d8d81138c78250312117
---
M DuskToDawn.skin.php
D resources/js/html5.js
M skin.json
3 files changed, 1 insertion(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/DuskToDawn 
refs/changes/95/349795/1

diff --git a/DuskToDawn.skin.php b/DuskToDawn.skin.php
index ed6323c..49eb3d2 100644
--- a/DuskToDawn.skin.php
+++ b/DuskToDawn.skin.php
@@ -33,15 +33,6 @@
'skins.dusktodawn'
) );
 
-   // HTML5 shim has to be loaded this way for older IEs...
-   $out->addHeadItem( 'html5shim',
-   ''
-   );
-
// And JS too!
$out->addModuleScripts( 'skins.dusktodawn' );
}
diff --git a/resources/js/html5.js b/resources/js/html5.js
deleted file mode 100644
index 6dd03a4..000
--- a/resources/js/html5.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// html5shiv MIT @rem remysharp.com/html5-enabling-script
-// iepp v1.6.2 MIT @jon_neal iecss.com/print-protector
-/*@cc_on(function(a,b){function r(a){var 
b=-1;while(++b

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Typo

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349794 )

Change subject: Typo
..


Typo

And added some missing parameter to make it explicit instead of implicit.

Change-Id: Ife3fc738c673b3516be5fda0c7cb270e162dbe6d
---
M src/AbstractMediaWikiFarmScript.php
M src/MediaWikiFarmComposerScript.php
M src/MediaWikiFarmScript.php
M tests/perfs/MediaWikiFarmTestPerfs.php
M tests/perfs/perfs.php
M tests/phpunit/MediaWikiFarmTestCase.php
6 files changed, 25 insertions(+), 19 deletions(-)

Approvals:
  Seb35: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/AbstractMediaWikiFarmScript.php 
b/src/AbstractMediaWikiFarmScript.php
index efe3705..caa0659 100644
--- a/src/AbstractMediaWikiFarmScript.php
+++ b/src/AbstractMediaWikiFarmScript.php
@@ -65,7 +65,7 @@
/**
 * Get a command line parameter.
 *
-* The parameter can be removed from the list.
+* Optionally the parameter can be removed from the list.
 *
 * @internal
 *
@@ -99,7 +99,7 @@
 
# Search a positional parameter
elseif( is_int( $name ) ) {
-   if( $name >= $this->argc ) {
+   if( $name < 0 || $name >= $this->argc ) {
return null;
}
$value = $this->argv[$name];
@@ -123,7 +123,7 @@
 * @api
 *
 * @param bool $long Show extended usage.
-* @return void.
+* @return void
 */
function usage( $long = false ) {
 
@@ -148,7 +148,7 @@
 * @api
 * @codeCoverageIgnore
 *
-* @return void.
+* @return void
 */
function load() {
 
@@ -158,6 +158,7 @@
$wgMediaWikiFarmCodeDir = dirname( dirname( dirname( __FILE__ ) 
) );
$wgMediaWikiFarmConfigDir = '/etc/mediawiki';
$wgMediaWikiFarmCacheDir = '/tmp/mw-cache';
+   $wgMediaWikiFarmSyslog = 'mediawikifarm';
 
if( is_file( dirname( dirname( dirname( dirname( __FILE__ ) ) ) 
) . '/includes/DefaultSettings.php' ) ) {
 
@@ -183,7 +184,7 @@
 *
 * @api
 *
-* @return void.
+* @return void
 */
function exportArguments() {
 
@@ -231,7 +232,7 @@
 *
 * @api
 *
-* @return void.
+* @return void
 */
function restInPeace() {}
 
@@ -242,13 +243,13 @@
 * - */
 
/**
-* Recursively delete a directory.
+* Delete recursively a directory or a file.
 *
 * @api
 *
-* @param string $dir Directory path.
-* @param bool $deleteDir Delete the root directory (or leave it empty).
-* @return void.
+* @param string $dir Directory or file path.
+* @param bool $deleteDir Delete the root directory? (Else leave it 
empty.)
+* @return void
 */
static function rmdirr( $dir, $deleteDir = true ) {
 
@@ -281,12 +282,12 @@
 * @param string $source Source path, can be a normal file or a 
directory.
 * @param string $dest Destination path, should be a directory.
 * @param bool $force If true, delete the destination directory before 
beginning.
-* @param string[] $blacklist Regular expression to blacklist some 
files; if begins
+* @param string[] $blacklist Regular expressions to blacklist some 
files; if it begins
 * with '/', only files from the root directory will be 
considered.
-* @param string[] $whitelist Regular expression to whitelist only some 
files; if begins
+* @param string[] $whitelist Regular expression to whitelist only some 
files; if it begins
 * with '/', only files from the root directory will be 
considered.
 * @param string $base Internal parameter to track the base directory.
-* @return void.
+* @return void
 */
static function copyr( $source, $dest, $force = false, $blacklist = 
array(), $whitelist = null, $base = '' ) {
 
diff --git a/src/MediaWikiFarmComposerScript.php 
b/src/MediaWikiFarmComposerScript.php
index cb48d07..ea755b4 100644
--- a/src/MediaWikiFarmComposerScript.php
+++ b/src/MediaWikiFarmComposerScript.php
@@ -62,7 +62,7 @@
 *
 * @api
 *
-* @return void.
+* @return void
 */
function main() {
 
diff --git a/src/MediaWikiFarmScript.php b/src/MediaWikiFarmScript.php
index 5d23178..3ec6e88 100644
--- a/src/MediaWikiFarmScript.php
+++ b/src/MediaWikiFarmScript.php
@@ -146,7 +146,7 @@
 *
 * @api
 *
-* @return void.
+* @return void
 */
function restInPeace() {
 
diff --git a/tests/perfs/MediaWikiFarmTestPerfs.php 

[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Typo

2017-04-23 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349794 )

Change subject: Typo
..

Typo

And added some missing parameter to make it explicit instead of implicit.

Change-Id: Ife3fc738c673b3516be5fda0c7cb270e162dbe6d
---
M src/AbstractMediaWikiFarmScript.php
M src/MediaWikiFarmComposerScript.php
M src/MediaWikiFarmScript.php
M tests/perfs/MediaWikiFarmTestPerfs.php
M tests/perfs/perfs.php
M tests/phpunit/MediaWikiFarmTestCase.php
6 files changed, 25 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiFarm 
refs/changes/94/349794/1

diff --git a/src/AbstractMediaWikiFarmScript.php 
b/src/AbstractMediaWikiFarmScript.php
index efe3705..caa0659 100644
--- a/src/AbstractMediaWikiFarmScript.php
+++ b/src/AbstractMediaWikiFarmScript.php
@@ -65,7 +65,7 @@
/**
 * Get a command line parameter.
 *
-* The parameter can be removed from the list.
+* Optionally the parameter can be removed from the list.
 *
 * @internal
 *
@@ -99,7 +99,7 @@
 
# Search a positional parameter
elseif( is_int( $name ) ) {
-   if( $name >= $this->argc ) {
+   if( $name < 0 || $name >= $this->argc ) {
return null;
}
$value = $this->argv[$name];
@@ -123,7 +123,7 @@
 * @api
 *
 * @param bool $long Show extended usage.
-* @return void.
+* @return void
 */
function usage( $long = false ) {
 
@@ -148,7 +148,7 @@
 * @api
 * @codeCoverageIgnore
 *
-* @return void.
+* @return void
 */
function load() {
 
@@ -158,6 +158,7 @@
$wgMediaWikiFarmCodeDir = dirname( dirname( dirname( __FILE__ ) 
) );
$wgMediaWikiFarmConfigDir = '/etc/mediawiki';
$wgMediaWikiFarmCacheDir = '/tmp/mw-cache';
+   $wgMediaWikiFarmSyslog = 'mediawikifarm';
 
if( is_file( dirname( dirname( dirname( dirname( __FILE__ ) ) ) 
) . '/includes/DefaultSettings.php' ) ) {
 
@@ -183,7 +184,7 @@
 *
 * @api
 *
-* @return void.
+* @return void
 */
function exportArguments() {
 
@@ -231,7 +232,7 @@
 *
 * @api
 *
-* @return void.
+* @return void
 */
function restInPeace() {}
 
@@ -242,13 +243,13 @@
 * - */
 
/**
-* Recursively delete a directory.
+* Delete recursively a directory or a file.
 *
 * @api
 *
-* @param string $dir Directory path.
-* @param bool $deleteDir Delete the root directory (or leave it empty).
-* @return void.
+* @param string $dir Directory or file path.
+* @param bool $deleteDir Delete the root directory? (Else leave it 
empty.)
+* @return void
 */
static function rmdirr( $dir, $deleteDir = true ) {
 
@@ -281,12 +282,12 @@
 * @param string $source Source path, can be a normal file or a 
directory.
 * @param string $dest Destination path, should be a directory.
 * @param bool $force If true, delete the destination directory before 
beginning.
-* @param string[] $blacklist Regular expression to blacklist some 
files; if begins
+* @param string[] $blacklist Regular expressions to blacklist some 
files; if it begins
 * with '/', only files from the root directory will be 
considered.
-* @param string[] $whitelist Regular expression to whitelist only some 
files; if begins
+* @param string[] $whitelist Regular expression to whitelist only some 
files; if it begins
 * with '/', only files from the root directory will be 
considered.
 * @param string $base Internal parameter to track the base directory.
-* @return void.
+* @return void
 */
static function copyr( $source, $dest, $force = false, $blacklist = 
array(), $whitelist = null, $base = '' ) {
 
diff --git a/src/MediaWikiFarmComposerScript.php 
b/src/MediaWikiFarmComposerScript.php
index cb48d07..ea755b4 100644
--- a/src/MediaWikiFarmComposerScript.php
+++ b/src/MediaWikiFarmComposerScript.php
@@ -62,7 +62,7 @@
 *
 * @api
 *
-* @return void.
+* @return void
 */
function main() {
 
diff --git a/src/MediaWikiFarmScript.php b/src/MediaWikiFarmScript.php
index 5d23178..3ec6e88 100644
--- a/src/MediaWikiFarmScript.php
+++ b/src/MediaWikiFarmScript.php
@@ -146,7 +146,7 @@
 *
 * @api
 *
-* @return void.
+* @return void
 */
function restInPeace() {
 
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Improve cache consistency

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349785 )

Change subject: Improve cache consistency
..


Improve cache consistency

* Check if origin file is still present, else cache is considered outdated
* When the main cache file becomes outdated, delete also the other cache files
  to avoid cache inconsistency.

Change-Id: I487ffdc8b806f807ecd2a8d9010bee8ba05821db
---
M src/MediaWikiFarm.php
M tests/phpunit/MediaWikiFarmTestCase.php
2 files changed, 11 insertions(+), 3 deletions(-)

Approvals:
  Seb35: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php
index 055e529..6705369 100644
--- a/src/MediaWikiFarm.php
+++ b/src/MediaWikiFarm.php
@@ -712,7 +712,8 @@
$fresh = true;
$myfreshness = filemtime( $this->cacheDir . '/wikis/' . 
$host . '.php' );
foreach( $result['$CORECONFIG'] as $coreconfig ) {
-   if( filemtime( $this->configDir . '/' . 
$coreconfig ) > $myfreshness ) {
+   if( !is_file( $this->configDir . '/' . 
$coreconfig ) ||
+   filemtime( $this->configDir . '/' . 
$coreconfig ) > $myfreshness ) {
$fresh = false;
break;
}
@@ -723,8 +724,14 @@
unset( $result['$CORECONFIG'] );
$this->variables = $result;
return;
-   } elseif( is_file( $this->cacheDir . '/LocalSettings/' 
. $host . '.php' ) ) {
-   unlink( $this->cacheDir . '/LocalSettings/' . 
$host . '.php' );
+   } else {
+   unlink( $this->cacheDir . '/wikis/' . $host . 
'.php' );
+   if( is_file( $this->cacheDir . 
'/LocalSettings/' . $host . '.php' ) ) {
+   unlink( $this->cacheDir . 
'/LocalSettings/' . $host . '.php' );
+   }
+   if( is_file( $this->cacheDir . '/composer/' . 
$host . '.php' ) ) {
+   unlink( $this->cacheDir . '/composer/' 
. $host . '.php' );
+   }
}
}
 
diff --git a/tests/phpunit/MediaWikiFarmTestCase.php 
b/tests/phpunit/MediaWikiFarmTestCase.php
index 479c45a..696a453 100644
--- a/tests/phpunit/MediaWikiFarmTestCase.php
+++ b/tests/phpunit/MediaWikiFarmTestCase.php
@@ -93,6 +93,7 @@
'wgParamDefinitions',
'wgParser',
'wgFlowActions',
+   'wgReadOnly', // T163640 - bug in PHPUnit 
subprogram global-state (issue #10)
)
);
}

-- 
To view, visit https://gerrit.wikimedia.org/r/349785
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I487ffdc8b806f807ecd2a8d9010bee8ba05821db
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 
Gerrit-Reviewer: Seb35 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...GraphViz[master]: Re-write the fix for T151294 which caused all graph links to...

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348522 )

Change subject: Re-write the fix for T151294 which caused all graph links to be 
the same.
..


Re-write the fix for T151294 which caused all graph links to be the same.

Bug: T163103
Change-Id: I4465483442339829398fc02bdc543a66b29b73f0
---
M GraphViz.php
M GraphViz_body.php
M RELEASE-NOTES.md
M composer.json
A phpcs.xml
5 files changed, 30 insertions(+), 9 deletions(-)

Approvals:
  Welterkj: Verified; Looks good to me, approved
  jenkins-bot: Verified
  Samwilson: Looks good to me, but someone else must approve



diff --git a/GraphViz.php b/GraphViz.php
index 7299154..7752351 100644
--- a/GraphViz.php
+++ b/GraphViz.php
@@ -33,7 +33,7 @@
 
 if ( !defined( 'MEDIAWIKI' ) ) die();
 
-define( 'GraphViz_VERSION', '2.0.0' );
+define( 'GraphViz_VERSION', '2.0.1' );
 
 /**
  * The GraphViz settings class.
diff --git a/GraphViz_body.php b/GraphViz_body.php
index 6307289..c13c06a 100644
--- a/GraphViz_body.php
+++ b/GraphViz_body.php
@@ -980,11 +980,16 @@
// has already encoded them and we want to pass 
them to ImageMap::render
// unencoded.
$hrefPattern = '~href="([^"]+)"~';
-   preg_match( $hrefPattern, $map, $matches );
-   if ( isset( $matches[1] ) ) {
-   $decodedHref = 
Sanitizer::decodeCharReferences( $matches[1] );
-   $map = preg_replace( $hrefPattern, 
"href=\"$decodedHref\"", $map );
-   }
+   $map = preg_replace_callback(
+   $hrefPattern,
+   function ( $matches ) {
+   if ( $matches[1] !== '' ) {
+   $decoded = 
Sanitizer::decodeCharReferences( $matches[1] );
+   return 'href="' . 
$decoded . '"';
+   }
+   return $matches[0];
+   },
+   $map );
 
// reorder map lines to the pattern shape name, 
coordinates, URL
$map = preg_replace( 
'~.+shape="([^"]+).+href="([^"]+).+coords="([^"]+).+~',
@@ -995,6 +1000,8 @@
// eliminate blank lines (platform independent)
$map = 
preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", '', $map);
 
+   wfDebug( __METHOD__ . ": map($map)\n" ); //KJW
+
// write the normalized map contents back to the file
if ( file_put_contents( $mapPath, $map ) === false ) {
wfDebug( __METHOD__ . ": file_put_contents( 
$mapPath, map ) failed.\n" );
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index cc0221a..f6c5b4e 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -1,5 +1,8 @@
 These are the release notes for the [MediaWiki][mediawiki] [GraphViz 
extension][gv_ext].
 
+## GraphViz 2.0.0 ## (2017-4-18)
+* Fix for [bug T163103](https://phabricator.wikimedia.org/T163103).
+
 ## GraphViz 2.0.0 ## (2017-3-23)
 * Redesign to eliminate creation of file pages for uploaded graph images.
 * Fix for [bug T100795](https://phabricator.wikimedia.org/T100795).
diff --git a/composer.json b/composer.json
index 2229e6f..9a4d238 100644
--- a/composer.json
+++ b/composer.json
@@ -29,11 +29,14 @@
]
},
"require-dev": {
-   "jakub-onderka/php-parallel-lint": "0.9.2"
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "mediawiki/mediawiki-codesniffer": "0.7.2"
},
"scripts": {
"test": [
-   "parallel-lint . --exclude vendor"
-   ]
+   "parallel-lint . --exclude vendor",
+   "phpcs -p -s"
+   ],
+   "fix": "phpcbf"
}
 }
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 000..d81a292
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,8 @@
+
+
+   
+   .
+   
+   
+   vendor
+

-- 
To view, visit https://gerrit.wikimedia.org/r/348522
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4465483442339829398fc02bdc543a66b29b73f0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GraphViz
Gerrit-Branch: master
Gerrit-Owner: Welterkj 
Gerrit-Reviewer: Samwilson 
Gerrit-Reviewer: Welterkj 
Gerrit-Reviewer: jenkins-bot <>


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Install php5-apcu on debian jessie

2017-04-23 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349793 )

Change subject: Phabricator: Install php5-apcu on debian jessie
..

Phabricator: Install php5-apcu on debian jessie

The apc package we have installed is actually a dummy package and dosent work 
with php 5.5+. 

Instead lets install php5-apcu on jessie but not on trusty as there is no apace 
package there except from ubuntu 16.04+

See https://en.wikipedia.org/wiki/List_of_PHP_accelerators#Compatibility_chart

Change-Id: I25bc4dfe4ac32b342d7b8288342fc79085b6a9ce
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/349793/1


-- 
To view, visit https://gerrit.wikimedia.org/r/349793
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25bc4dfe4ac32b342d7b8288342fc79085b6a9ce
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Rely on ContentHandler::supportsDirectEditing being false

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348905 )

Change subject: Rely on ContentHandler::supportsDirectEditing being false
..


Rely on ContentHandler::supportsDirectEditing being false

Instead of hacking this ourselves using a permission hook.

I only tested this briefly, but it seems to be equivalent
to doing this per hand. This also fixes T163144.

Bug: T163144
Change-Id: Ie60bf1ac217bd3757e7b2a0aa269f856f346e096
---
M repo/Wikibase.hooks.php
M repo/Wikibase.php
2 files changed, 2 insertions(+), 38 deletions(-)

Approvals:
  Aude: Looks good to me, but someone else must approve
  WMDE-leszek: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 280325a..26860c2 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -546,6 +546,8 @@
$handler = ContentHandler::getForModelID( 
$contentModel );
 
if ( $handler->getEntityNamespace() === 
$namespace ) {
+   // XXX: This is most probably redundant 
with setting
+   // 
ContentHandler::supportsDirectApiEditing to false.
// trying to use ApiEditPage on an 
entity namespace
$params = 
$module->extractRequestParams();
 
@@ -666,43 +668,6 @@
if ( $namespaceLookup->isEntityNamespace( 
$title->getNamespace() ) ) {
// Remove create and move protection for Wikibase 
namespaces
$types = array_diff( $types, array( 'create', 'move' ) 
);
-   }
-
-   return true;
-   }
-
-   /**
-* Handler for the TitleQuickPermissions hook, implemented to point out 
that entity pages cannot
-* be "created" normally.
-*
-* @see 
https://www.mediawiki.org/wiki/Manual:Hooks/TitleQuickPermissions
-*
-* @param Title $title The Title being checked
-* @param User $user The User performing the action
-* @param string $action The action being performed
-* @param array[] &$errors
-* @param bool $doExpensiveQueries Whether to do expensive DB queries
-* @param bool $short Whether to return immediately on first error
-*
-* @return bool
-*/
-   public static function onTitleQuickPermissions(
-   Title $title,
-   User $user,
-   $action,
-   array &$errors,
-   $doExpensiveQueries,
-   $short
-   ) {
-   if ( $action === 'create' ) {
-   $namespaceLookup = 
WikibaseRepo::getDefaultInstance()->getEntityNamespaceLookup();
-
-   if ( $namespaceLookup->isEntityNamespace( 
$title->getNamespace() ) ) {
-   // Do not allow normal creation of pages in 
Wikibase namespaces
-   $errors[] = array( 
'wikibase-no-direct-editing', $title->getNsText() );
-
-   return false;
-   }
}
 
return true;
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index cfb8947..d239470 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -870,7 +870,6 @@
$wgHooks['ShowSearchHit'][] = 'Wikibase\RepoHooks::onShowSearchHit';
$wgHooks['ShowSearchHitTitle'][] = 
'Wikibase\RepoHooks::onShowSearchHitTitle';
$wgHooks['TitleGetRestrictionTypes'][] = 
'Wikibase\RepoHooks::onTitleGetRestrictionTypes';
-   $wgHooks['TitleQuickPermissions'][] = 
'Wikibase\RepoHooks::onTitleQuickPermissions';
$wgHooks['AbuseFilter-contentToString'][] = 
'Wikibase\RepoHooks::onAbuseFilterContentToString';
$wgHooks['SpecialPage_reorderPages'][] = 
'Wikibase\RepoHooks::onSpecialPageReorderPages';
$wgHooks['OutputPageParserOutput'][] = 
'Wikibase\RepoHooks::onOutputPageParserOutput';

-- 
To view, visit https://gerrit.wikimedia.org/r/348905
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie60bf1ac217bd3757e7b2a0aa269f856f346e096
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Use smaller batches in TermSqlIndex::getTermsOfEntities

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349424 )

Change subject: Use smaller batches in TermSqlIndex::getTermsOfEntities
..


Use smaller batches in TermSqlIndex::getTermsOfEntities

The batch size was suggested by the DBA.

Bug: T163544
Change-Id: I983f2a51d79e913308f1730a3b4b2cb014cf0461
---
M lib/includes/Store/Sql/TermSqlIndex.php
1 file changed, 13 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/lib/includes/Store/Sql/TermSqlIndex.php 
b/lib/includes/Store/Sql/TermSqlIndex.php
index 32e8f6a..7a1b5ce 100644
--- a/lib/includes/Store/Sql/TermSqlIndex.php
+++ b/lib/includes/Store/Sql/TermSqlIndex.php
@@ -462,7 +462,19 @@
$this->assertEntityIdFromRightRepository( $id );
}
 
-   return $this->fetchTerms( $entityIds, $termTypes, 
$languageCodes );
+   // Fetch up to 9 (as suggested by the DBA) terms each time:
+   // https://phabricator.wikimedia.org/T163544#3201562
+   $entityIdBatches = array_chunk( $entityIds, 9 );
+   $terms = [];
+
+   foreach ( $entityIdBatches as $entityIdBatch ) {
+   $terms = array_merge(
+   $terms,
+   $this->fetchTerms( $entityIdBatch, $termTypes, 
$languageCodes )
+   );
+   }
+
+   return $terms;
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/349424
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I983f2a51d79e913308f1730a3b4b2cb014cf0461
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Fix broken PHPDoc comment syntax

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349791 )

Change subject: Fix broken PHPDoc comment syntax
..


Fix broken PHPDoc comment syntax

Change-Id: I4b5a02b1b6295fa3f4302fd8e3acd69fdffb9631
---
M scripts/fuzzy.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Nikerabbit: Looks good to me, approved



diff --git a/scripts/fuzzy.php b/scripts/fuzzy.php
index 1188fda..eace88d 100644
--- a/scripts/fuzzy.php
+++ b/scripts/fuzzy.php
@@ -84,7 +84,7 @@
  */
 class FuzzyScript {
/**
-   /* @var string[] List of patterns to mark.
+* @var string[] List of patterns to mark.
 */
private $titles = [];
 

-- 
To view, visit https://gerrit.wikimedia.org/r/349791
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b5a02b1b6295fa3f4302fd8e3acd69fdffb9631
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Streamline dec to hex color calculation

2017-04-23 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349792 )

Change subject: Streamline dec to hex color calculation
..

Streamline dec to hex color calculation

This avoids the "33" which happens to be the only hex number in the
entire code.

Change-Id: I3e22e3315b8d643e071441bfd1c8a5c21283beb8
---
M utils/StatsTable.php
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/92/349792/1

diff --git a/utils/StatsTable.php b/utils/StatsTable.php
index fb46fb8..4d78d2d 100644
--- a/utils/StatsTable.php
+++ b/utils/StatsTable.php
@@ -89,17 +89,17 @@
 
if ( $v < 128 ) {
// Red to Yellow
-   $red = sprintf( '%02X', ( 0.26 * $v ) + 221 );
-   $green = sprintf( '%02X', ( 1.33 * $v ) + 33 );
-   $blue = '33';
+   $red = 0.26 * $v + 221;
+   $green = 1.33 * $v + 33;
+   $blue = 51;
} else {
// Yellow to Green
-   $red = sprintf( '%02X', 2 * ( 255 - $v ) );
-   $green = sprintf( '%02X', ( 0.22 * ( 255 - $v ) ) + 175 
);
-   $blue = sprintf( '%02X', ( 0.67 * $v ) - 34 );
+   $red = 2 * ( 255 - $v );
+   $green = 0.22 * ( 255 - $v ) + 175;
+   $blue = 0.67 * $v - 34;
}
 
-   return $red . $green . $blue;
+   return sprintf( '%02X%02X%02X', $red, $green, $blue );
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/349792
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e22e3315b8d643e071441bfd1c8a5c21283beb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Fix broken PHPDoc comment syntax

2017-04-23 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349791 )

Change subject: Fix broken PHPDoc comment syntax
..

Fix broken PHPDoc comment syntax

Change-Id: I4b5a02b1b6295fa3f4302fd8e3acd69fdffb9631
---
M scripts/fuzzy.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/91/349791/1

diff --git a/scripts/fuzzy.php b/scripts/fuzzy.php
index 1188fda..eace88d 100644
--- a/scripts/fuzzy.php
+++ b/scripts/fuzzy.php
@@ -84,7 +84,7 @@
  */
 class FuzzyScript {
/**
-   /* @var string[] List of patterns to mark.
+* @var string[] List of patterns to mark.
 */
private $titles = [];
 

-- 
To view, visit https://gerrit.wikimedia.org/r/349791
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b5a02b1b6295fa3f4302fd8e3acd69fdffb9631
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Replace deprecated 'nocapitalize' in interwiki.py

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/234421 )

Change subject: Replace deprecated 'nocapitalize' in interwiki.py
..


Replace deprecated 'nocapitalize' in interwiki.py

While processing pages in Wiktionaries, when langlinks differed
from page title only in capitalization, a DeprecationWarning was
issued regarding the use of obsolete property BaseSite.nocapitalize.

Change-Id: I0e2e3822601257cb3b741d92971e071d73ba635c
---
M scripts/interwiki.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved



diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 7b4f5bc..bc4af48 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -1125,8 +1125,8 @@
  % (page, self.originPage))
 return True
 elif (page.title() != self.originPage.title() and
-  self.originPage.site.nocapitalize and
-  page.site.nocapitalize):
+  self.originPage.namespace().case == 'case-sensitive' and
+  page.namespace().case == 'case-sensitive'):
 pywikibot.output(
 u"NOTE: Ignoring %s for %s in wiktionary mode because both 
"
 u"languages are uncapitalized."

-- 
To view, visit https://gerrit.wikimedia.org/r/234421
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e2e3822601257cb3b741d92971e071d73ba635c
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Gerrit Patch Uploader 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Malafaya 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: XZise 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: config2.py: Increase the default socket_timeout to 75 seconds

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349790 )

Change subject: config2.py: Increase the default socket_timeout to 75 seconds
..


config2.py: Increase the default socket_timeout to 75 seconds

Bug: T163635
Change-Id: Ie0c24aa7831cdd1679afef3ee4f43a681a932538
---
M pywikibot/config2.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved



diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index e0bac1e..fd5a2df 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -783,7 +783,7 @@
 # DO NOT set to None to disable timeouts. Otherwise this may freeze your 
script.
 # You may assign either a tuple of two int or float values for connection and
 # read timeout, or a single value for both in a tuple (since requests 2.4.0).
-socket_timeout = 30
+socket_timeout = 75
 
 
 # # COSMETIC CHANGES SETTINGS ##

-- 
To view, visit https://gerrit.wikimedia.org/r/349790
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0c24aa7831cdd1679afef3ee4f43a681a932538
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: config2.py: Increase the default timeout to 75 seconds

2017-04-23 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349790 )

Change subject: config2.py: Increase the default timeout to 75 seconds
..

config2.py: Increase the default timeout to 75 seconds

Bug: T163635
Change-Id: Ie0c24aa7831cdd1679afef3ee4f43a681a932538
---
M pywikibot/config2.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/90/349790/1

diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index e0bac1e..fd5a2df 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -783,7 +783,7 @@
 # DO NOT set to None to disable timeouts. Otherwise this may freeze your 
script.
 # You may assign either a tuple of two int or float values for connection and
 # read timeout, or a single value for both in a tuple (since requests 2.4.0).
-socket_timeout = 30
+socket_timeout = 75
 
 
 # # COSMETIC CHANGES SETTINGS ##

-- 
To view, visit https://gerrit.wikimedia.org/r/349790
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0c24aa7831cdd1679afef3ee4f43a681a932538
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] Raise NotImplementedError if no editor is available

2017-04-23 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349789 )

Change subject: [bugfix] Raise NotImplementedError if no editor is available
..

[bugfix] Raise NotImplementedError if no editor is available

- specialbot may catch NotImplementedError first and stop the script
  whereas other exceptions may continue looping

Bug: T163632
Change-Id: Ic1dde77337ac9fd378e7105fc675c3f8cc52fbd2
---
M pywikibot/editor.py
M pywikibot/specialbots.py
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/89/349789/1

diff --git a/pywikibot/editor.py b/pywikibot/editor.py
index e878a5d..f8e31fd 100644
--- a/pywikibot/editor.py
+++ b/pywikibot/editor.py
@@ -5,7 +5,7 @@
 
 #
 # (C) Gerrit Holl, 2004
-# (C) Pywikibot team, 2004-2015
+# (C) Pywikibot team, 2004-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -118,7 +118,7 @@
 os.unlink(tempFilename)
 
 if isinstance(gui, ImportError):
-raise pywikibot.Error(
+raise NotImplementedError(
 'Could not load GUI modules: %s\nNo editor available.\n'
 'Set your favourite editor in user-config.py "editor", '
 'or install python packages tkinter and idlelib, which '
diff --git a/pywikibot/specialbots.py b/pywikibot/specialbots.py
index 72e079c..c80cb45 100644
--- a/pywikibot/specialbots.py
+++ b/pywikibot/specialbots.py
@@ -354,6 +354,8 @@
 editor = editarticle.TextEditor()
 try:
 newDescription = editor.edit(self.description)
+except NotImplementedError:
+raise
 except Exception as e:
 pywikibot.error(e)
 continue

-- 
To view, visit https://gerrit.wikimedia.org/r/349789
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1dde77337ac9fd378e7105fc675c3f8cc52fbd2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Allow builds to retry twice

2017-04-23 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349788 )

Change subject: Allow builds to retry twice
..

Allow builds to retry twice

This should reduce TimeoutError failures

Bug: T163635
Change-Id: I56e441e2d9838cb214ea950516a57b245e7ca84b
---
M tests/__init__.py
1 file changed, 4 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/88/349788/1

diff --git a/tests/__init__.py b/tests/__init__.py
index 9b5de60..dc3917c 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Package tests."""
 #
-# (C) Pywikibot team, 2007-2015
+# (C) Pywikibot team, 2007-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -253,13 +253,11 @@
 # Travis-CI builds are set to retry twice, which aims to reduce the number
 # of 'red' builds caused by intermittant server problems, while also avoiding
 # the builds taking a long time due to retries.
-# The following allows builds to retry twice, but higher default values are
-# overridden here to restrict retries to only 1, so developer builds fail more
-# frequently in code paths resulting from mishandled server problems.
+# The following allows builds to retry twice but not higher.
 if config.max_retries > 2:
 if 'PYWIKIBOT_TEST_QUIET' not in os.environ:
-print('tests: max_retries reduced from %d to 1' % config.max_retries)
-config.max_retries = 1
+print('tests: max_retries reduced from %d to 2' % config.max_retries)
+config.max_retries = 2
 
 cache_misses = 0
 cache_hits = 0

-- 
To view, visit https://gerrit.wikimedia.org/r/349788
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56e441e2d9838cb214ea950516a57b245e7ca84b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: MediaWiki: reduce verbosity of the cache warmup

2017-04-23 Thread Volans (Code Review)
Volans has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349787 )

Change subject: MediaWiki: reduce verbosity of the cache warmup
..

MediaWiki: reduce verbosity of the cache warmup

Bug: T163369
Change-Id: I2bae3c923d3d5ca665044919a97fa6d9ec38e4bc
---
M modules/mediawiki/files/maintenance/mediawiki-cache-warmup/warmup.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/349787/1

diff --git 
a/modules/mediawiki/files/maintenance/mediawiki-cache-warmup/warmup.js 
b/modules/mediawiki/files/maintenance/mediawiki-cache-warmup/warmup.js
index b5a1e3f..d0a36d5 100644
--- a/modules/mediawiki/files/maintenance/mediawiki-cache-warmup/warmup.js
+++ b/modules/mediawiki/files/maintenance/mediawiki-cache-warmup/warmup.js
@@ -98,7 +98,7 @@
function ( uri, group ) {
var target = options.target || ( group !== 'main' && 
group !== 'debug' ? group : null ),
reqOptions = createOptions( baseOptions, uri, 
target );
-   console.log( `[${new Date().toISOString()}] Request 
${uri} (${group})` );
+   // console.log( `[${new Date().toISOString()}] Request 
${uri} (${group})` );
return util.fetchUrl( reqOptions );
}
).then( function ( stats ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/349787
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bae3c923d3d5ca665044919a97fa6d9ec38e4bc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Volans 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Remove featured.py out of the script_tests.py

2017-04-23 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349786 )

Change subject: Remove featured.py out of the script_tests.py
..

Remove featured.py out of the script_tests.py

- featured.py is archived and  longer compatible with Wikimedia sites.
  It is not tested anymore because it resides in archive folder.
  The featured parts could be removed then.

Change-Id: I4ebb7de9a234a2da646f4b5a634851248a6ba478
---
M tests/script_tests.py
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/86/349786/1

diff --git a/tests/script_tests.py b/tests/script_tests.py
index 6bc8c32..7743c73 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Test that each script can be compiled and executed."""
 #
-# (C) Pywikibot team, 2014-2016
+# (C) Pywikibot team, 2014-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -120,7 +120,6 @@
 'checkimages',
 'clean_sandbox',
 'disambredir',
-'featured',
 'imagerecat',
 'login',
 'lonelypages',
@@ -145,7 +144,6 @@
 no_args_expected_results = {
 # TODO: until done here, remember to set editor = None in user_config.py
 'editarticle': 'Nothing changed',
-'featured': '0 pages written.',
 'freebasemappingupload': 'Cannot find ',
 'harvest_template': 'ERROR: Please specify',
 'imageuncat': 'WARNING: This script is primarily written for Wikimedia 
Commons',

-- 
To view, visit https://gerrit.wikimedia.org/r/349786
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ebb7de9a234a2da646f4b5a634851248a6ba478
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Avoid KeyError in PropertyPage.get

2017-04-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348451 )

Change subject: Avoid KeyError in PropertyPage.get
..


Avoid KeyError in PropertyPage.get

Change-Id: I3dcdd748191fc653544524255a6f72518e3a7627
---
M pywikibot/page.py
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 7e9a1ee..7707567 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4443,8 +4443,9 @@
 'PropertyPage.get only implements "force".')
 
 data = WikibasePage.get(self, force)
-self._type = self._content['datatype']
-data['datatype'] = self._content['datatype']
+if 'datatype' in self._content:
+self._type = self._content['datatype']
+data['datatype'] = self._type
 return data
 
 def newClaim(self, *args, **kwargs):

-- 
To view, visit https://gerrit.wikimedia.org/r/348451
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3dcdd748191fc653544524255a6f72518e3a7627
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Matěj Suchánek 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Improve cache consistency

2017-04-23 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349785 )

Change subject: Improve cache consistency
..

Improve cache consistency

* Check if origin file is still present, else cache is considered outdated
* When the main cache file becomes outdated, delete also the other cache files
  to avoid cache inconsistency.

Change-Id: I487ffdc8b806f807ecd2a8d9010bee8ba05821db
---
M src/MediaWikiFarm.php
1 file changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiFarm 
refs/changes/85/349785/1

diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php
index 055e529..6705369 100644
--- a/src/MediaWikiFarm.php
+++ b/src/MediaWikiFarm.php
@@ -712,7 +712,8 @@
$fresh = true;
$myfreshness = filemtime( $this->cacheDir . '/wikis/' . 
$host . '.php' );
foreach( $result['$CORECONFIG'] as $coreconfig ) {
-   if( filemtime( $this->configDir . '/' . 
$coreconfig ) > $myfreshness ) {
+   if( !is_file( $this->configDir . '/' . 
$coreconfig ) ||
+   filemtime( $this->configDir . '/' . 
$coreconfig ) > $myfreshness ) {
$fresh = false;
break;
}
@@ -723,8 +724,14 @@
unset( $result['$CORECONFIG'] );
$this->variables = $result;
return;
-   } elseif( is_file( $this->cacheDir . '/LocalSettings/' 
. $host . '.php' ) ) {
-   unlink( $this->cacheDir . '/LocalSettings/' . 
$host . '.php' );
+   } else {
+   unlink( $this->cacheDir . '/wikis/' . $host . 
'.php' );
+   if( is_file( $this->cacheDir . 
'/LocalSettings/' . $host . '.php' ) ) {
+   unlink( $this->cacheDir . 
'/LocalSettings/' . $host . '.php' );
+   }
+   if( is_file( $this->cacheDir . '/composer/' . 
$host . '.php' ) ) {
+   unlink( $this->cacheDir . '/composer/' 
. $host . '.php' );
+   }
}
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/349785
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I487ffdc8b806f807ecd2a8d9010bee8ba05821db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits