[MediaWiki-commits] [Gerrit] Default encoding on win32 is problematic - change (pywikibot/core)

2015-04-14 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204018

Change subject: Default encoding on win32 is problematic
..

Default encoding on win32 is problematic

Change-Id: Id8a6c7b9b9ea29c0b92c8eb14f047bd792e20e24
---
M pywikibot/tools/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/18/204018/1

diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 67e0087..6df1659 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -418,7 +418,7 @@
 Return an encoding even if it's originally None.
 if encoding is None:
 if sys.platform == 'win32':
-return 'cp850'
+return 'utf8'
 else:
 return 'iso-8859-1'
 else:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8a6c7b9b9ea29c0b92c8eb14f047bd792e20e24
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg jay...@gmail.com

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


[MediaWiki-commits] [Gerrit] More Win32 os.environ issues - change (pywikibot/core)

2015-04-14 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204017

Change subject: More Win32 os.environ issues
..

More Win32 os.environ issues

Change-Id: I107bf72209d3d6f1ae62ecad4c3e8c989160ae05
---
M pwb.py
M tests/aspects.py
M tests/utils.py
3 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/17/204017/1

diff --git a/pwb.py b/pwb.py
index 365a22e..56a99fe 100644
--- a/pwb.py
+++ b/pwb.py
@@ -157,7 +157,7 @@
 # If successful, user-config.py already exists in one of the candidate
 # directories. See config2.py for details on search order.
 # Use env var to communicate to config2.py pwb.py location (bug 72918).
-os.environ['PYWIKIBOT2_DIR_PWB'] = os.path.split(__file__)[0]
+os.environ[str('PYWIKIBOT2_DIR_PWB')] = str(os.path.split(__file__)[0])
 import pywikibot  # noqa
 except RuntimeError as err:
 # user-config.py to be created
diff --git a/tests/aspects.py b/tests/aspects.py
index 78cd606..4071242 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -1157,14 +1157,14 @@
 self.orig_pywikibot_dir = None
 if 'PYWIKIBOT2_DIR' in os.environ:
 self.orig_pywikibot_dir = os.environ['PYWIKIBOT2_DIR']
-os.environ['PYWIKIBOT2_DIR'] = pywikibot.config.base_dir
+os.environ[str('PYWIKIBOT2_DIR')] = pywikibot.config.base_dir
 
 def tearDown(self):
 Restore the environment after running the pwb.py script.
 super(PwbTestCase, self).tearDown()
 del os.environ['PYWIKIBOT2_DIR']
 if self.orig_pywikibot_dir:
-os.environ['PYWIKIBOT2_DIR'] = self.orig_pywikibot_dir
+os.environ[str('PYWIKIBOT2_DIR')] = self.orig_pywikibot_dir
 
 def _execute(self, args, data_in=None, timeout=0, error=None):
 from tests.utils import execute_pwb
diff --git a/tests/utils.py b/tests/utils.py
index d23fd91..92727a5 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -260,13 +260,13 @@
 # str() on Python 2.
 env = os.environ.copy()
 # sys.path may have been modified by the test runner to load dependencies.
-env['PYTHONPATH'] = :.join(sys.path)
+env[str('PYTHONPATH')] = str(:.join(sys.path))
 # LC_ALL is used by i18n.input as an alternative for userinterface_lang
 if pywikibot.config.userinterface_lang:
-env['LC_ALL'] = str(pywikibot.config.userinterface_lang)
+env[str('LC_ALL')] = str(pywikibot.config.userinterface_lang)
 # Set EDITOR to an executable that ignores all arguments and does nothing.
 if sys.platform == 'win32':
-env['EDITOR'] = str('call')
+env[str('EDITOR')] = str('call')
 else:
 env['EDITOR'] = 'true'
 options = {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I107bf72209d3d6f1ae62ecad4c3e8c989160ae05
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg jay...@gmail.com

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


[MediaWiki-commits] [Gerrit] Correcting s/handlebars/mustache/ - change (mediawiki...DonationInterface)

2015-04-14 Thread Awight (Code Review)
Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204020

Change subject: Correcting s/handlebars/mustache/
..

Correcting s/handlebars/mustache/

After reading T379 and the code for TemplateParser, I see that we're running
the lightncandy library in pure Mustache mode, with none of the Handlebars
extensions...  To be revisited :) ...

Change-Id: I5481926ecf3bfb6367dd1d8a34784bd3afba71a5
---
M DonationInterface.php
M astropay_gateway/astropay.adapter.php
R gateway_forms/Mustache.php
R gateway_forms/mustache/index.html.mustache
4 files changed, 4 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/20/204020/1

diff --git a/DonationInterface.php b/DonationInterface.php
index 5f56ca6..a916f7e 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -118,7 +118,7 @@
 
 //load all possible form classes
 $wgAutoloadClasses['Gateway_Form'] = $donationinterface_dir . 
'gateway_forms/Form.php';
-$wgAutoloadClasses['Gateway_Form_Handlebars'] = $donationinterface_dir . 
'gateway_forms/Handlebars.php';
+$wgAutoloadClasses['Gateway_Form_Mustache'] = $donationinterface_dir . 
'gateway_forms/Mustache.php';
 $wgAutoloadClasses['Gateway_Form_RapidHtml'] = $donationinterface_dir . 
'gateway_forms/RapidHtml.php';
 $wgAutoloadClasses['CountryCodes'] = $donationinterface_dir . 
'gateway_forms/includes/CountryCodes.php';
 $wgAutoloadClasses['ProvinceAbbreviations'] = $donationinterface_dir . 
'gateway_forms/includes/ProvinceAbbreviations.php';
@@ -242,7 +242,7 @@
 /**
  * Default top-level template file.
  */
-$wgDonationInterfaceTemplate = __DIR__ . 
'/gateway_forms/handlebars/index.html.handlebars';
+$wgDonationInterfaceTemplate = __DIR__ . 
'/gateway_forms/mustache/index.html.mustache';
 
 //all of the following variables make sense to override directly,
 //or change DonationInterface to the gateway's id to override just for that 
gateway.
diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 9557675..ea454ed 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -26,7 +26,7 @@
const GLOBAL_PREFIX = 'wgAstropayGateway';
 
public function getFormClass() {
-   return 'Gateway_Form_Handlebars';
+   return 'Gateway_Form_Mustache';
}
 
public function getCommunicationType() {
diff --git a/gateway_forms/Handlebars.php b/gateway_forms/Mustache.php
similarity index 95%
rename from gateway_forms/Handlebars.php
rename to gateway_forms/Mustache.php
index 5e3497e..a290c6c 100644
--- a/gateway_forms/Handlebars.php
+++ b/gateway_forms/Mustache.php
@@ -1,6 +1,6 @@
 ?php
 
-class Gateway_Form_Handlebars extends Gateway_Form {
+class Gateway_Form_Mustache extends Gateway_Form {
protected $topLevelForm;
 
public function __construct( GatewayAdapter $gateway ) {
diff --git a/gateway_forms/handlebars/index.html.handlebars 
b/gateway_forms/mustache/index.html.mustache
similarity index 100%
rename from gateway_forms/handlebars/index.html.handlebars
rename to gateway_forms/mustache/index.html.mustache

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5481926ecf3bfb6367dd1d8a34784bd3afba71a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight awi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove a double space in sql file - change (mediawiki...ContentTranslation)

2015-04-14 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204021

Change subject: Remove a double space in sql file
..

Remove a double space in sql file

Change-Id: I7be540a4b8f14958e033c5bc6ed4e1dff92c62b8
---
M sql/contenttranslation.sql
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/21/204021/1

diff --git a/sql/contenttranslation.sql b/sql/contenttranslation.sql
index 90a0487..816bdc0 100644
--- a/sql/contenttranslation.sql
+++ b/sql/contenttranslation.sql
@@ -50,7 +50,7 @@
 -- Draft Id - foreign key to cx_translations.translation_id
 draft_id int primary key not null,
 -- Draft save timestamp
-draft_timestamp  varchar(14) binary not null,
+draft_timestamp varchar(14) binary not null,
 -- Translation draft content
 draft_content mediumblob
 ) /*$wgDBTableOptions*/;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7be540a4b8f14958e033c5bc6ed4e1dff92c62b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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] Fix a js error when publishing fails because of unknown reasons - change (mediawiki...ContentTranslation)

2015-04-14 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204019

Change subject: Fix a js error when publishing fails because of unknown reasons
..

Fix a js error when publishing fails because of unknown reasons

Change-Id: I2c635fa9b581a9bb3db11ebc2ca2dd986d34bdac
---
M modules/publish/ext.cx.publish.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/19/204019/1

diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index 42e9508..dc76dd4 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -63,7 +63,7 @@
} );
}
// Any other failure
-   self.fail( 'cxpublish', '[CX] Unexpected error 
while publishing: ' + response.cxpublish );
+   self.onFail( 'cxpublish', '[CX] Unexpected 
error while publishing: ' + response.cxpublish );
} ).fail( function ( code, details ) {
self.onFail( code, details );
} ).always( function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c635fa9b581a9bb3db11ebc2ca2dd986d34bdac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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] Fix a js error when publishing fails because of unknown reasons - change (mediawiki...ContentTranslation)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix a js error when publishing fails because of unknown reasons
..


Fix a js error when publishing fails because of unknown reasons

Bug: T94690 T89585
Change-Id: I2c635fa9b581a9bb3db11ebc2ca2dd986d34bdac
---
M modules/publish/ext.cx.publish.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index 42e9508..dc76dd4 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -63,7 +63,7 @@
} );
}
// Any other failure
-   self.fail( 'cxpublish', '[CX] Unexpected error 
while publishing: ' + response.cxpublish );
+   self.onFail( 'cxpublish', '[CX] Unexpected 
error while publishing: ' + response.cxpublish );
} ).fail( function ( code, details ) {
self.onFail( code, details );
} ).always( function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c635fa9b581a9bb3db11ebc2ca2dd986d34bdac
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@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] Remove a double space in sql file - change (mediawiki...ContentTranslation)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove a double space in sql file
..


Remove a double space in sql file

Change-Id: I7be540a4b8f14958e033c5bc6ed4e1dff92c62b8
---
M sql/contenttranslation.sql
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sql/contenttranslation.sql b/sql/contenttranslation.sql
index 90a0487..816bdc0 100644
--- a/sql/contenttranslation.sql
+++ b/sql/contenttranslation.sql
@@ -50,7 +50,7 @@
 -- Draft Id - foreign key to cx_translations.translation_id
 draft_id int primary key not null,
 -- Draft save timestamp
-draft_timestamp  varchar(14) binary not null,
+draft_timestamp varchar(14) binary not null,
 -- Translation draft content
 draft_content mediumblob
 ) /*$wgDBTableOptions*/;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7be540a4b8f14958e033c5bc6ed4e1dff92c62b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Springle sprin...@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] Disable mobile editor for entity pages - change (mediawiki...Wikibase)

2015-04-14 Thread Bene (Code Review)
Bene has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204024

Change subject: Disable mobile editor for entity pages
..

Disable mobile editor for entity pages

Bug: T95880
Change-Id: I52d28a825e02f9307a8a071877d1953f5739839a
---
M repo/Wikibase.hooks.php
M repo/Wikibase.php
2 files changed, 20 insertions(+), 0 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index d64b774..2b72ea9 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -1178,4 +1178,23 @@
return true;
}
 
+   /**
+* Disable mobile editor for entity pages.
+*
+* @param Skin $skin
+* @param array $modules
+*
+* @return bool
+*/
+   public static function onSkinMinervaDefaultModules( Skin $skin, array 
$modules ) {
+   $title = $skin-getTitle();
+   $entityNamespaceLookup = 
WikibaseRepo::getDefaultInstance()-getEntityNamespaceLookup();
+
+   if ( $entityNamespaceLookup-isEntityNamespace( 
$title-getNamespace() ) ) {
+   unset( $modules['editor'] );
+   }
+
+   return true;
+   }
+
 }
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 5a73d8e..6509446 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -226,6 +226,7 @@
$wgHooks['ImportHandleRevisionXMLTag'][]= 
'Wikibase\RepoHooks::onImportHandleRevisionXMLTag';
$wgHooks['BaseTemplateToolbox'][]   = 
'Wikibase\RepoHooks::onBaseTemplateToolbox';
$wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 
'Wikibase\RepoHooks::onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink';
+   $wgHooks['SkinMinervaDefaultModules'][] = 
'Wikibase\RepoHooks::onSkinMinervaDefaultModules';
 
// update hooks
$wgHooks['LoadExtensionSchemaUpdates'][] = 
'\Wikibase\Repo\Store\Sql\ChangesSubscriptionSchemaUpdater::onSchemaUpdate';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52d28a825e02f9307a8a071877d1953f5739839a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Bene benestar.wikime...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add tox-py27 to wikimedia/bots/jouncebot - change (integration/config)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add tox-py27 to wikimedia/bots/jouncebot
..


Add tox-py27 to wikimedia/bots/jouncebot

Bug: T95894
Change-Id: Ic7e97ae0e87864e0c6d9604e9b5ef13ea26aadf4
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e87958e..7a1184b 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7127,7 +7127,9 @@
   - name: wikimedia/bots/jouncebot
 test:
   - tox-flake8
+  - tox-py27
   - yamllint
 gate-and-submit:
   - tox-flake8
+  - tox-py27
   - yamllint

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7e97ae0e87864e0c6d9604e9b5ef13ea26aadf4
Gerrit-PatchSet: 1
Gerrit-Project: integration/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] add ResultToViolationTranslator (basic + CheckResult) - change (mediawiki...WikidataQuality)

2015-04-14 Thread Jonaskeutel (Code Review)
Jonaskeutel has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204030

Change subject: add ResultToViolationTranslator (basic + CheckResult)
..

add ResultToViolationTranslator (basic + CheckResult)

also save violations from constraint check in table; therefore slighlty
modified violation and violationStore with comments how to undo the
changes

Change-Id: I20ab86ae0eeaf5d7b0ce5c033b440256291b63a5

add

Change-Id: I9c5e492e145d3c1319d3fb6775610df7de284bac
---
A 
constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
M constraint-report/specials/SpecialConstraintReport.php
A includes/Result/ResultToViolationTranslator.php
M includes/Violations/Violation.php
M includes/Violations/ViolationStore.php
5 files changed, 92 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/30/204030/1

diff --git 
a/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
 
b/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
new file mode 100644
index 000..1c59710
--- /dev/null
+++ 
b/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
@@ -0,0 +1,48 @@
+?php
+
+namespace WikidataQuality\ConstraintReport\ConstraintCheck\Result;
+
+
+use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\DataModel\Entity\PropertyId;
+use Wikibase\Lib\ClaimGuidGenerator;
+use WikidataQuality\Result\ResultToViolationTranslator;
+use WikidataQuality\Violations\Violation;
+
+
+class CheckResultToViolationTranslator extends ResultToViolationTranslator{
+
+   public function translateToViolation( $checkResultOrArray ) {
+   if( $checkResultOrArray instanceof CheckResult ) {
+   $checkResultArray = array( $checkResultOrArray );
+   } else {
+   $checkResultArray = $checkResultOrArray;
+   }
+
+   $violationArray = array();
+   foreach( $checkResultArray as $checkResult ) {
+   if( $checkResult-getStatus() !== 'violation' ){
+   continue;
+   }
+
+   // TODO: Use these line when CheckResult has statement
+   //$statement = $checkResult-getStatement();
+   //$entityId = $statement-getClaim()-getEntityId();
+   $entityId = new ItemId( 'Q90' );
+   $statement = array();
+   $statement[ 'pid' ] = new PropertyId( 'P1' );
+   $statement[ 'claimGuid' ] = 'Q42';
+
+   //TODO: Use real claimGuid
+   $guidGenerator = new ClaimGuidGenerator();
+   $constraintClaimGuid = $guidGenerator-newGuid( 
$entityId );
+   $constraintTypeEntityId = 
$checkResult-getConstraintName();
+   $revisionId = $this-getRevisionIdForEntity( $entityId 
);
+   $status = 'violation';
+
+   $violationArray[] = new Violation( $entityId, 
$statement, $constraintClaimGuid, $constraintTypeEntityId, $revisionId, 
$status);
+   }
+
+   return $violationArray;
+   }
+}
\ No newline at end of file
diff --git a/constraint-report/specials/SpecialConstraintReport.php 
b/constraint-report/specials/SpecialConstraintReport.php
index 89050e3..f66010d 100644
--- a/constraint-report/specials/SpecialConstraintReport.php
+++ b/constraint-report/specials/SpecialConstraintReport.php
@@ -12,9 +12,11 @@
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Repo\WikibaseRepo;
 use WikidataQuality\ConstraintReport\ConstraintCheck\ConstraintChecker;
+use 
WikidataQuality\ConstraintReport\ConstraintCheck\Result\CheckResultToViolationTranslator;
 use WikidataQuality\Html\HtmlTable;
 use WikidataQuality\Html\HtmlTableHeader;
 use WikidataQuality\Specials\SpecialCheckResultPage;
+use WikidataQuality\Violations\ViolationStore;
 
 
 /**
@@ -96,6 +98,8 @@
// Run constraint checker
$constraintChecker = new ConstraintChecker( $this-entityLookup 
);
$results = $constraintChecker-execute( $entity );
+
+   $this-saveResultsInViolationsTable( $results );
 
return $results;
}
@@ -282,4 +286,14 @@
'violation' = 'error'
);
}
+
+   /**
+* @param array $results
+*/
+   protected function saveResultsInViolationsTable( $results ) {
+   $translator = new CheckResultToViolationTranslator();
+   $violations = $translator-translateToViolation( $results );
+   $violationStore = new ViolationStore();
+   $violationStore-insertViolation( $violations );
+   }
 }
\ No 

[MediaWiki-commits] [Gerrit] WIP Use bare PHP flag when rendering Mustache - change (mediawiki/core)

2015-04-14 Thread Awight (Code Review)
Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204023

Change subject: WIP Use bare PHP flag when rendering Mustache
..

WIP Use bare PHP flag when rendering Mustache

DO NOT MERGE: This requires LightnCandy 0.21

Change-Id: I931c149cb22e5b8b7e8ff2ef354406f958e6a79a
---
M includes/TemplateParser.php
1 file changed, 12 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/204023/1

diff --git a/includes/TemplateParser.php b/includes/TemplateParser.php
index 3de70fa2..130dd47 100644
--- a/includes/TemplateParser.php
+++ b/includes/TemplateParser.php
@@ -108,7 +108,7 @@
$code = $this-forceRecompile ? null : $cache-get( 
$key );
 
if ( !$code ) {
-   $code = $this-compileForEval( $fileContents, 
$filename );
+   $code = $this-compile( $fileContents, 
$filename );
 
// Prefix the cached code with a keyed hash (64 
hex chars) as an integrity check
$cache-set( $key, hash_hmac( 'sha256', $code, 
$secretKey ) . $code );
@@ -134,47 +134,29 @@
}
 
/**
-* Wrapper for compile() function that verifies successful compilation 
and strips
-* out the '?php' part so that the code is ready for eval()
-* @param string $fileContents Mustache code
-* @param string $filename Name of the template
+* Compile the Mustache code into PHP code using LightnCandy
+* @param string $template Mustache code
+* @param string $filename Template path (informational)
 * @return string PHP code (without '?php')
 * @throws RuntimeException
 */
-   protected function compileForEval( $fileContents, $filename ) {
-   // Compile the template into PHP code
-   $code = $this-compile( $fileContents );
-
-   if ( !$code ) {
-   throw new RuntimeException( Could not compile 
template: {$filename} );
-   }
-
-   // Strip the ?php added by lightncandy so that it can be 
eval()ed
-   if ( substr( $code, 0, 5 ) === '?php' ) {
-   $code = substr( $code, 5 );
-   }
-
-   return $code;
-   }
-
-   /**
-* Compile the Mustache code into PHP code using LightnCandy
-* @param string $code Mustache code
-* @return string PHP code (with '?php')
-* @throws RuntimeException
-*/
-   protected function compile( $code ) {
+   protected function compile( $template, $filename ) {
if ( !class_exists( 'LightnCandy' ) ) {
throw new RuntimeException( 'LightnCandy class not 
defined' );
}
-   return LightnCandy::compile(
-   $code,
+   $out = LightnCandy::compile(
+   $template,
array(
// Do not add more flags here without 
discussion.
// If you do add more flags, be sure to update 
unit tests as well.
'flags' = LightnCandy::FLAG_ERROR_EXCEPTION
+   | LightnCandy::FLAG_BARE
)
);
+   if ( !$out ) {
+   throw new RuntimeException( Could not compile 
template: {$filename} );
+   }
+   return $out;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I931c149cb22e5b8b7e8ff2ef354406f958e6a79a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Awight awi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Implemented ViolationQuery - change (mediawiki...WikidataQuality)

2015-04-14 Thread Jonaskeutel (Code Review)
Jonaskeutel has submitted this change and it was merged.

Change subject: Implemented ViolationQuery
..


Implemented ViolationQuery

ViolationQuery receives params for a database query and converts them to
an array. Also implemented comments from last commit: Refactored tests and
Violation holds now the original types of its variables, not strings.

Change-Id: Ie0de8568b391c27fe9bf0e03b92787cda623ad63
---
M includes/Violations/Violation.php
M includes/Violations/ViolationLookup.php
A includes/Violations/ViolationQuery.php
M includes/Violations/ViolationStore.php
M tests/phpunit/Violations/ViolationLookupTest.php
A tests/phpunit/Violations/ViolationQueryTest.php
M tests/phpunit/Violations/ViolationStoreTest.php
M tests/phpunit/Violations/ViolationTest.php
8 files changed, 394 insertions(+), 54 deletions(-)

Approvals:
  Jonaskeutel: Verified; Looks good to me, approved



diff --git a/includes/Violations/Violation.php 
b/includes/Violations/Violation.php
index 948d397..e07bf0b 100644
--- a/includes/Violations/Violation.php
+++ b/includes/Violations/Violation.php
@@ -4,13 +4,14 @@
 
 use Doctrine\Instantiator\Exception\InvalidArgumentException;
 use Wikibase\DataModel\Entity\EntityId;
+use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Statement\Statement;
 
 
 /**
  * Class Violation
  *
- * holds data that will be inserted into the violation table
+ * Holds data that will be inserted into the violation table
  *
  * @package WikidataQuality\Violation
  * @author BP2014N1
@@ -21,14 +22,14 @@
/**
 * entity that contains the violation
 *
-* @var string $entityId
+* @var EntityId $entityId
 */
private $entityId;
 
/**
 * property of the claim that contains the violation
 *
-* @var string $pid
+* @var PropertyId $pid
 */
private $pid;
 
@@ -49,7 +50,7 @@
/**
 * type of the constraint that is violated
 *
-* @var $constraintTypeEntityId
+* @var EntityId $constraintTypeEntityId
 */
private $constraintTypeEntityId;
 
@@ -89,11 +90,17 @@
 * @param string $additionalInfo
 */
public function __construct( EntityId $entityId, $statement, 
$constraintClaimGuid, EntityId $constraintTypeEntityId, $revisionId, $status, 
$additionalInfo = null, $updatedAt = null ) {
-   $this-entityId = $entityId-getSerialization();
+   $this-entityId = $entityId;
if ( $statement instanceof Statement ) {
-   $this-pid = 
$statement-getPropertyId()-getSerialization();
+   $this-pid = $statement-getPropertyId();
$this-claimGuid = $statement-getGuid();
} else if ( is_array( $statement ) ) {
+   if ( !( $statement[ 'pid' ] instanceof PropertyId ) ) {
+   throw new InvalidArgumentException( 'pid must 
be of type PropertyId' );
+   }
+   if ( !is_string( $statement[ 'claimGuid' ] ) ) {
+   throw new InvalidArgumentException( 'claimGuid 
must be of type string' );
+   }
$this-pid = $statement[ 'pid' ];
$this-claimGuid = $statement[ 'claimGuid' ];
} else {
@@ -104,7 +111,7 @@
} else {
throw new InvalidArgumentException( 
'$constraintClaimGuid must be of type string' );
}
-   $this-constraintTypeEntityId = 
$constraintTypeEntityId-getSerialization();
+   $this-constraintTypeEntityId = $constraintTypeEntityId;
if ( is_int( $revisionId ) ) {
$this-revisionId = $revisionId;
} else {
@@ -142,14 +149,14 @@
}
 
/**
-* @return string
+* @return EntityId
 */
public function getEntityId() {
return $this-entityId;
}
 
/**
-* @return string
+* @return PropertyId
 */
public function getPropertyId() {
return $this-pid;
@@ -170,7 +177,7 @@
}
 
/**
-* @return string
+* @return EntityId
 */
public function getConstraintTypeEntityId() {
return $this-constraintTypeEntityId;
diff --git a/includes/Violations/ViolationLookup.php 
b/includes/Violations/ViolationLookup.php
index c1d801d..6c4ec22 100644
--- a/includes/Violations/ViolationLookup.php
+++ b/includes/Violations/ViolationLookup.php
@@ -4,11 +4,13 @@
 
 use Doctrine\Instantiator\Exception\InvalidArgumentException;
 use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\DataModel\Entity\PropertyId;
 
 
 /**
  * Class ViolationLookup
  *
+ * Receives an object of ViolationQuery, performs the query and returns 

[MediaWiki-commits] [Gerrit] contint: +libxml2-dev +libxslt1-dev - change (operations/puppet)

2015-04-14 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204031

Change subject: contint: +libxml2-dev +libxslt1-dev
..

contint: +libxml2-dev +libxslt1-dev

The dev packages are needed to compile the lxml python module used by
wikimedia/bots/jouncebot.git

Bug: T95894
Change-Id: I1d9540507e21d865613154e6ef04c3c5e97acccf
---
M modules/contint/manifests/packages/labs.pp
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/204031/1

diff --git a/modules/contint/manifests/packages/labs.pp 
b/modules/contint/manifests/packages/labs.pp
index 41c603e..92fb6bb 100644
--- a/modules/contint/manifests/packages/labs.pp
+++ b/modules/contint/manifests/packages/labs.pp
@@ -81,6 +81,9 @@
 'python-dev',
 'libmysqlclient-dev',  # For python SQLAlchemy
 
+'libxml2-dev',   # For python lxml
+'libxslt1-dev',  # For python lxml
+
 # For 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
 # Provided by openstack::common:
 #'unzip',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d9540507e21d865613154e6ef04c3c5e97acccf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Fix example script: - change (mediawiki...OAuth)

2015-04-14 Thread Werdna (Code Review)
Werdna has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204022

Change subject: Fix example script:
..

Fix example script:

* Needs namespace.
* Needs CURLOPT_FOLLOWLOCATION

Change-Id: I8fc893b22e693b7287154f1387a57a917e8fa02b
---
M examples/testClient.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/examples/testClient.php b/examples/testClient.php
index b949257..511a948 100644
--- a/examples/testClient.php
+++ b/examples/testClient.php
@@ -1,5 +1,7 @@
 ?php
 
+namespace MediaWiki\Extensions\OAuth;
+
 if ( PHP_SAPI !== 'cli' ) {
die( CLI-only test script\n );
 }
@@ -219,6 +221,8 @@
 if( $moreVerbose === true ) {
curl_setopt( $ch, CURLOPT_VERBOSE, 1 );
 }
+curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
+curl_setopt( $ch, CURLOPT_POSTREDIR, true );
 $data = curl_exec( $ch );
 if( !$data ) {
echo 'Curl error: ' . curl_error( $ch );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8fc893b22e693b7287154f1387a57a917e8fa02b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Werdna agarr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add docs for ve.ui.ContextItem#embeddable - change (VisualEditor/VisualEditor)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add docs for ve.ui.ContextItem#embeddable
..


Add docs for ve.ui.ContextItem#embeddable

Change-Id: I25c90eb047818496e0c5f4a8c4657740d55ca536
---
M src/ui/ve.ui.ContextItem.js
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/ui/ve.ui.ContextItem.js b/src/ui/ve.ui.ContextItem.js
index 71fd6f2..8ce9628 100644
--- a/src/ui/ve.ui.ContextItem.js
+++ b/src/ui/ve.ui.ContextItem.js
@@ -82,6 +82,14 @@
 
 ve.ui.ContextItem.static.editable = true;
 
+/**
+ * Whether the context item should try (if space permits) to go inside the 
node,
+ * rather than below with an arrow
+ *
+ * @static
+ * @property {boolean}
+ * @inheritable
+ */
 ve.ui.ContextItem.static.embeddable = true;
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25c90eb047818496e0c5f4a8c4657740d55ca536
Gerrit-PatchSet: 3
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@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] Add namespace aliases for bgn - change (mediawiki...Scribunto)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add namespace aliases for bgn
..


Add namespace aliases for bgn

Change-Id: I9cf883f9c2647c2c6a79302853721d79a34f44a8
---
M Scribunto.namespaces.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/Scribunto.namespaces.php b/Scribunto.namespaces.php
index 8a50ad0..126c0ec 100644
--- a/Scribunto.namespaces.php
+++ b/Scribunto.namespaces.php
@@ -48,6 +48,11 @@
829 = 'Модул_беседа',
 );
 
+$namespaceNames['bgn'] = array(
+   828 = 'ماژول',
+   829 = 'ماژول_ئی_گپ',
+);
+
 $namespaceNames['bn'] = array(
828 = 'মডিউল',
829 = 'মডিউল_আলাপ',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9cf883f9c2647c2c6a79302853721d79a34f44a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Mjbmr mjb...@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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] Update to latest service-template-node - change (mediawiki...graphoid)

2015-04-14 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204027

Change subject: Update to latest service-template-node
..

Update to latest service-template-node

Includes:
- configurable CSP headers
- configurable HTTP(S) proxy
- configurable CORS headers

Change-Id: I82b270a27d01f42604ad98b518a98dba8e221bc9
---
M app.js
M lib/util.js
M package.json
M test/features/app/app.js
4 files changed, 52 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/graphoid 
refs/changes/27/204027/1

diff --git a/app.js b/app.js
index 88943b1..5f9e033 100644
--- a/app.js
+++ b/app.js
@@ -31,6 +31,31 @@
 if(!app.conf.port) { app.conf.port = ; }
 if(!app.conf.interface) { app.conf.interface = '0.0.0.0'; }
 if(!app.conf.compression_level) { app.conf.compression_level = 3; }
+if(app.conf.cors === undefined) { app.conf.cors = '*'; }
+if(!app.conf.csp) {
+app.conf.csp =
+default-src 'self'; object-src 'none'; media-src *; img-src *; 
style-src *; frame-ancestors 'self';
+}
+
+// set outgoing proxy
+if(app.conf.proxy) {
+process.env.HTTP_PROXY = app.conf.proxy;
+}
+
+// set the CORS and CSP headers
+app.all('*', function(req, res, next) {
+if(app.conf.cors !== false) {
+res.header('Access-Control-Allow-Origin', app.conf.cors);
+res.header('Access-Control-Allow-Headers', 'Accept, 
X-Requested-With, Content-Type');
+}
+res.header('X-XSS-Protection', '1; mode=block');
+res.header('X-Content-Type-Options', 'nosniff');
+res.header('X-Frame-Options', 'SAMEORIGIN');
+res.header('Content-Security-Policy', app.conf.csp);
+res.header('X-Content-Security-Policy', app.conf.csp);
+res.header('X-WebKit-CSP', app.conf.csp);
+next();
+});
 
 // disable the X-Powered-By header
 app.set('x-powered-by', false);
diff --git a/lib/util.js b/lib/util.js
index 58ed1e3..fb83c9c 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -190,8 +190,8 @@
 level = 'info';
 }
 // log the error
-req.logger.log(level +
-(errObj.component ? '/' + errObj.component : '/' + 
errObj.status),
+req.logger.log(level + '/' +
+(errObj.component ? errObj.component : errObj.status),
 errForLog(errObj));
 // let through only non-sensitive info
 var respBody = {
diff --git a/package.json b/package.json
index bbd3a0e..e352bf2 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
 js-yaml: ^3.2.7,
 node-uuid: ^1.4.3,
 preq: ^0.3.12,
-service-runner: ^0.1.5
+service-runner: ^0.1.6
   },
   devDependencies: {
 assert: ^1.3.0,
diff --git a/test/features/app/app.js b/test/features/app/app.js
index c7fb08c..6df85b4 100644
--- a/test/features/app/app.js
+++ b/test/features/app/app.js
@@ -25,6 +25,30 @@
 });
 });
 
+it('should set CORS headers', function() {
+return preq.get({
+uri: server.config.uri + 'robots.txt'
+}).then(function(res) {
+assert.deepEqual(res.status, 200);
+assert.deepEqual(res.headers['access-control-allow-origin'], '*');
+assert.notDeepEqual(res.headers['access-control-allow-headers'], 
undefined);
+});
+});
+
+it('should set CSP headers', function() {
+return preq.get({
+uri: server.config.uri + 'robots.txt'
+}).then(function(res) {
+assert.deepEqual(res.status, 200);
+assert.deepEqual(res.headers['x-xss-protection'], '1; mode=block');
+assert.deepEqual(res.headers['x-content-type-options'], 'nosniff');
+assert.deepEqual(res.headers['x-frame-options'], 'SAMEORIGIN');
+assert.deepEqual(res.headers['content-security-policy'], 
'default-src');
+assert.deepEqual(res.headers['x-content-security-policy'], 
'default-src');
+assert.deepEqual(res.headers['x-webkit-csp'], 'default-src');
+});
+});
+
 it('should get static content gzipped', function() {
 return preq.get({
 uri: server.config.uri + 'static/index.html',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82b270a27d01f42604ad98b518a98dba8e221bc9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid
Gerrit-Branch: master
Gerrit-Owner: Mobrovac mobro...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add wikidata people - change (integration/config)

2015-04-14 Thread Aude (Code Review)
Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204029

Change subject: Add wikidata people
..

Add wikidata people

Ebrahim is a volunteer and the others are students
working on Wikidata-related projects.

Change-Id: Ibd5c4a27bd77be4928bc0ea614afe3f55c8e3b30
---
M zuul/layout.yaml
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/29/204029/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e87958e..7c4af4f 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -51,6 +51,7 @@
 | admin@glados\.cc
 | alexsh@mail2000\.com\.tw
 | amir\.aharoni@mail\.huji\.ac\.il
+| andreas\.burmeister@student\.hpi\.de
 | andrew\.green\.df@gmail\.com
 | anomie\.wikipedia@gmail\.com
 | at\.light@live\.com\.au
@@ -67,8 +68,10 @@
 | david@sheetmusic\.org\.uk
 | d_entous@yahoo\.com
 | dereckson@espace-win\.org
+| dominic\.sauer@yahoo\.de
 | drenfro@vistaprint\.com
 | dr\.trigon@surfeu\.ch
+| ebrahim@gnu\.org
 | ecokpo@gmail\.com
 | federicoleva@tiscali\.it
 | florian\.schmidt\.welzow@t-online\.de
@@ -89,6 +92,7 @@
 | jeff\.janes@gmail\.com
 | jeroendedauw@gmail\.com
 | johnflewis93@gmail\.com
+| jonas@keutel\.de
 | kartik\.mistry@gmail\.com
 | krenair@gmail\.com
 | krinklemail@gmail\.com
@@ -135,9 +139,11 @@
 | siebrand@kitano\.nl
 | skizzerz@gmail\.com
 | s\.mazeland@xs4all\.nl
+| soeren_oldag@freenet\.de
 | stefan@garage-coding\.com
 | stefan\.petrea@gmail\.com
 | sucheta\.ghoshal@gmail\.com
+| tamaraslosarek@gmail\.com
 | thomaspt@hotmail\.fr
 | tim@tim-landscheidt\.de
 | trevorparscal@gmail\.com

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd5c4a27bd77be4928bc0ea614afe3f55c8e3b30
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Removed bug in HtmlTableCell class, which leads to horizonta... - change (mediawiki...WikidataQuality)

2015-04-14 Thread Soeren.oldag (Code Review)
Soeren.oldag has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204025

Change subject: Removed bug in HtmlTableCell class, which leads to horizontal 
arranged rows in Firefox and Opera.
..

Removed bug in HtmlTableCell class, which leads to horizontal arranged rows in 
Firefox and Opera.

Changed default value of html attributes 'rowspan' and 'colspan' from 0 to 1.

Change-Id: I86d4e3f319085b12e26f45ca2948256ca90de2fa
---
M includes/Html/HtmlTableCell.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/25/204025/1

diff --git a/includes/Html/HtmlTableCell.php b/includes/Html/HtmlTableCell.php
index f654fed..bcaa2b4 100644
--- a/includes/Html/HtmlTableCell.php
+++ b/includes/Html/HtmlTableCell.php
@@ -36,8 +36,10 @@
 
 /**
  * @param $content
+ * @param int $rowSpan
+ * @param int $colSpan
  */
-public function __construct( $content, $rowSpan = 0, $colSpan = 0 ) {
+public function __construct( $content, $rowSpan = 1, $colSpan = 1 ) {
 // Check parameters
 if ( !is_string( $content ) ) {
 throw new InvalidArgumentException( '$content must be string.' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86d4e3f319085b12e26f45ca2948256ca90de2fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Soeren.oldag soeren_ol...@freenet.de

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


[MediaWiki-commits] [Gerrit] OOUIPlayground display updates - change (mediawiki...OOUIPlayground)

2015-04-14 Thread Werdna (Code Review)
Werdna has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204026

Change subject: OOUIPlayground display updates
..

OOUIPlayground display updates

* (T95660) Style code snippets.
* Fix styling for language switch.

Bug: T95660
Change-Id: I9c1c9c91c0b208b1848248efddaff2d0a111ef3a
---
M resources/display.less
1 file changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground 
refs/changes/26/204026/1

diff --git a/resources/display.less b/resources/display.less
index ec20db5..6ee93eb 100644
--- a/resources/display.less
+++ b/resources/display.less
@@ -11,5 +11,19 @@
 
 .ooui-playground-language-selector {
font-size: 80%;
-   line-height: 2em;
+
+   .oo-ui-labelElement-label {
+   padding: 0 2px;
+   }
+
+   .oo-ui-optionWidget-selected .oo-ui-labelElement-label {
+   border: 1px inset #f8f8f8;
+   }
+}
+
+.ooui-playground-code .mw-geshi {
+   background-color: #f8f8f8;
+   font-size: 0.8em;
+   padding: 1.25em;
+   word-wrap: break-word;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c1c9c91c0b208b1848248efddaff2d0a111ef3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OOUIPlayground
Gerrit-Branch: master
Gerrit-Owner: Werdna agarr...@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] Database schema updates and bigger refactorings connected wi... - change (mediawiki...WikidataQuality)

2015-04-14 Thread Tamslo (Code Review)
Tamslo has submitted this change and it was merged.

Change subject: Database schema updates and bigger refactorings connected with 
it.
..


Database schema updates and bigger refactorings connected with it.

Changed table prefix to 'wdqa'. Table 'wdq_dump_meta_information' now contains 
information about single dumps instead of complete databases. 
License of a dump is saved as corresponding item id. 
Added 'wdqa_identifier_properties' table as relation between dumps and 
identifier properties. 
Table 'wdq_external_data' contains dump ids instead of identifier property ids. 
Entity ids are now stored as serialization instead of numeric id.
Serializers no longer extend deprecated SerializerObject class. 
Instead they implement Serializer interface from WMDE serialization package. 
Indexed tags are not supported in new used serializer package. 
That's why API module 'CrossCheck' is currently not working for xml output.
Refactored CheckResults to improve structure and consistency. Moved PropertyId, 
ClaimGuid and DumpMetaInformation from CompareResult to CrossCheckResult. 
Removed duplicate getters from CrossCheckResult.

Change-Id: I6993a4f42346926d0a2cd78e1bdfa86453352292
---
M WikidataQuality.php
M WikidataQualityHooks.php
M composer.json
M external-validation/api/CrossCheck.php
D external-validation/api/Serializer/CrossCheckResultListSerializer.php
D external-validation/api/Serializer/CrossCheckResultSerializer.php
D external-validation/api/Serializer/DumpMetaInformationSerializer.php
M external-validation/includes/CrossCheck/CrossChecker.php
M external-validation/includes/CrossCheck/ReferenceHandler.php
M external-validation/includes/CrossCheck/Result/CompareResult.php
M external-validation/includes/CrossCheck/Result/CrossCheckResult.php
M external-validation/includes/CrossCheck/Result/CrossCheckResultList.php
M external-validation/includes/CrossCheck/Result/ReferenceResult.php
M external-validation/includes/DumpMetaInformation.php
A external-validation/includes/Serializer/CompareResultSerializer.php
A external-validation/includes/Serializer/CrossCheckResultListSerializer.php
A external-validation/includes/Serializer/CrossCheckResultSerializer.php
A external-validation/includes/Serializer/DumpMetaInformationSerializer.php
A external-validation/includes/Serializer/ReferenceResultSerializer.php
A external-validation/includes/Serializer/SerializerFactory.php
M external-validation/includes/UpdateTable/ImportContext.php
M external-validation/includes/UpdateTable/Importer.php
M external-validation/maintenance/UpdateTable.php
M external-validation/specials/SpecialCrossCheck.php
M external-validation/specials/SpecialExternalDbs.php
D external-validation/sql/create_wdq_dump_information.sql
D external-validation/sql/create_wdq_external_data.sql
A external-validation/sql/create_wdqa_dump_information.sql
A external-validation/sql/create_wdqa_external_data.sql
A external-validation/sql/create_wdqa_identifier_properties.sql
M external-validation/tests/phpunit/Api/CrossCheckTest.php
D 
external-validation/tests/phpunit/Api/Serializer/CrossCheckResultListSerializerTest.php
D 
external-validation/tests/phpunit/Api/Serializer/CrossCheckResultSerializerTest.php
D 
external-validation/tests/phpunit/Api/Serializer/DumpMetaInformationSerializerTest.php
M external-validation/tests/phpunit/CrossCheck/CrossCheckerTest.php
M external-validation/tests/phpunit/CrossCheck/Result/CompareResultTest.php
M 
external-validation/tests/phpunit/CrossCheck/Result/CrossCheckResultListTest.php
M external-validation/tests/phpunit/CrossCheck/Result/CrossCheckResultTest.php
M external-validation/tests/phpunit/CrossCheck/Result/ReferenceResultTest.php
M external-validation/tests/phpunit/CrossCheck/testdata/Q1.json
M external-validation/tests/phpunit/CrossCheck/testdata/Q2.json
A external-validation/tests/phpunit/CrossCheck/testdata/Q3.json
M external-validation/tests/phpunit/DumpMetaInformationTest.php
M external-validation/tests/phpunit/ReferenceHandlerTest.php
A external-validation/tests/phpunit/Serializer/CompareResultSerializerTest.php
A 
external-validation/tests/phpunit/Serializer/CrossCheckResultListSerializerTest.php
A 
external-validation/tests/phpunit/Serializer/CrossCheckResultSerializerTest.php
A 
external-validation/tests/phpunit/Serializer/DumpMetaInformationSerializerTest.php
A external-validation/tests/phpunit/Serializer/ReferenceResultSerializerTest.php
A external-validation/tests/phpunit/Serializer/SerializerBaseTest.php
A external-validation/tests/phpunit/Serializer/SerializerFactoryTest.php
M external-validation/tests/phpunit/Specials/SpecialCrossCheckTest.php
M external-validation/tests/phpunit/Specials/SpecialExternalDbsTest.php
M external-validation/tests/phpunit/UpdateTable/UpdateTableTest.php
M external-validation/tests/phpunit/UpdateTable/testdata/entities.csv
A external-validation/tests/phpunit/UpdateTable/testdata/identifiers.csv
M 

[MediaWiki-commits] [Gerrit] Removed bug in HtmlTableCell class, which leads to horizonta... - change (mediawiki...WikidataQuality)

2015-04-14 Thread Jonaskeutel (Code Review)
Jonaskeutel has submitted this change and it was merged.

Change subject: Removed bug in HtmlTableCell class, which leads to horizontal 
arranged rows in Firefox and Opera.
..


Removed bug in HtmlTableCell class, which leads to horizontal arranged rows in 
Firefox and Opera.

Changed default value of html attributes 'rowspan' and 'colspan' from 0 to 1.

Change-Id: I86d4e3f319085b12e26f45ca2948256ca90de2fa
---
M includes/Html/HtmlTableCell.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Jonaskeutel: Verified; Looks good to me, approved



diff --git a/includes/Html/HtmlTableCell.php b/includes/Html/HtmlTableCell.php
index f654fed..bcaa2b4 100644
--- a/includes/Html/HtmlTableCell.php
+++ b/includes/Html/HtmlTableCell.php
@@ -36,8 +36,10 @@
 
 /**
  * @param $content
+ * @param int $rowSpan
+ * @param int $colSpan
  */
-public function __construct( $content, $rowSpan = 0, $colSpan = 0 ) {
+public function __construct( $content, $rowSpan = 1, $colSpan = 1 ) {
 // Check parameters
 if ( !is_string( $content ) ) {
 throw new InvalidArgumentException( '$content must be string.' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I86d4e3f319085b12e26f45ca2948256ca90de2fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Soeren.oldag soeren_ol...@freenet.de
Gerrit-Reviewer: Jonaskeutel jonas.keu...@student.hpi.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] Toolbar: Add example - change (oojs/ui)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Toolbar: Add example
..


Toolbar: Add example

If it looks unnecessarily complicated, it's because it is.

Change-Id: I45d9c2926612266db64ee7f648d333aeed1406a6
---
M src/Toolbar.js
1 file changed, 126 insertions(+), 0 deletions(-)

Approvals:
  Negative24: Looks good to me, but someone else must approve
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/Toolbar.js b/src/Toolbar.js
index b3a5fe6..7bc2cad 100644
--- a/src/Toolbar.js
+++ b/src/Toolbar.js
@@ -1,6 +1,132 @@
 /**
  * Collection of tool groups.
  *
+ * @example
+ * // Basic OOjs UI toolbar example
+ *
+ * // Create the toolbar
+ * var toolFactory = new OO.ui.ToolFactory();
+ * var toolGroupFactory = new OO.ui.ToolGroupFactory();
+ * var toolbar = new OO.ui.Toolbar( toolFactory, toolGroupFactory );
+ *
+ * // We will be placing status text in this element when tools are used
+ * var $area = $( 'p' ).css( 'font-size', '0.8em' ).text( 'Toolbar 
example' );
+ *
+ * // Define the tools that we're going to place in our toolbar
+ *
+ * // Create a class inheriting from OO.ui.Tool
+ * function PictureTool() {
+ * PictureTool.super.apply( this, arguments );
+ * };
+ * OO.inheritClass( PictureTool, OO.ui.Tool );
+ * // Each tool must have a 'name' (used as an internal identifier, see 
later) and at least one
+ * // of 'icon' and 'title' (displayed icon and text).
+ * PictureTool.static.name = 'picture';
+ * PictureTool.static.icon = 'picture';
+ * PictureTool.static.title = 'Insert picture';
+ * // Defines the action that will happen when this tool is selected 
(clicked).
+ * PictureTool.prototype.onSelect = function () {
+ * $area.text( 'Picture tool clicked!' );
+ * this.setActive( false );
+ * };
+ * // The toolbar can be synchronized with the state of some external 
stuff, like a text
+ * // editor's editing area, highlighting the tools (e.g. a 'bold' tool 
would be shown as active
+ * // when the text cursor was inside bolded text). Here we simply disable 
this feature.
+ * PictureTool.prototype.onUpdateState = function () {
+ * this.setActive( false );
+ * };
+ * // Make this tool available in our toolFactory and thus our toolbar
+ * toolFactory.register( PictureTool );
+ *
+ * // Register two more tools, nothing interesting here
+ * function SettingsTool() {
+ * SettingsTool.super.apply( this, arguments );
+ * };
+ * OO.inheritClass( SettingsTool, OO.ui.Tool );
+ * SettingsTool.static.name = 'settings';
+ * SettingsTool.static.icon = 'settings';
+ * SettingsTool.static.title = 'Change settings';
+ * SettingsTool.prototype.onSelect = function () {
+ * $area.text( 'Settings tool clicked!' );
+ * this.setActive( false );
+ * };
+ * SettingsTool.prototype.onUpdateState = function () {
+ * this.setActive( false );
+ * };
+ * toolFactory.register( SettingsTool );
+ *
+ * // Register two more tools, nothing interesting here
+ * function StuffTool() {
+ * StuffTool.super.apply( this, arguments );
+ * };
+ * OO.inheritClass( StuffTool, OO.ui.Tool );
+ * StuffTool.static.name = 'stuff';
+ * StuffTool.static.icon = 'ellipsis';
+ * StuffTool.static.title = 'More stuff';
+ * StuffTool.prototype.onSelect = function () {
+ * $area.text( 'More stuff tool clicked!' );
+ * this.setActive( false );
+ * };
+ * StuffTool.prototype.onUpdateState = function () {
+ * this.setActive( false );
+ * };
+ * toolFactory.register( StuffTool );
+ *
+ * // This is a PopupTool. Rather than having a custom 'onSelect' action, 
it will display a
+ * // little popup window (a PopupWidget). 'onUpdateState' is also already 
implemented.
+ * function HelpTool( toolGroup, config ) {
+ * OO.ui.PopupTool.call( this, toolGroup, $.extend( { popup: {
+ * padded: true,
+ * label: 'Help',
+ * head: true
+ * } }, config ) );
+ * this.popup.$body.append( 'pI am helpful!/p' );
+ * };
+ * OO.inheritClass( HelpTool, OO.ui.PopupTool );
+ * HelpTool.static.name = 'help';
+ * HelpTool.static.icon = 'help';
+ * HelpTool.static.title = 'Help';
+ * toolFactory.register( HelpTool );
+ *
+ * // Finally define which tools and in what order appear in the toolbar. 
Each tool may only be
+ * // used once (but not all defined tools must be used).
+ * toolbar.setup( [
+ * {
+ * // 'bar' tool groups display tools' icons only, side-by-side.
+ * type: 'bar',
+ * include: [ 'picture', 'help' ]
+ * },
+ * {
+ * // 'list' tool groups display both the titles and icons, in a 

[MediaWiki-commits] [Gerrit] Add tox-py27 to wikimedia/bots/jouncebot - change (integration/config)

2015-04-14 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204028

Change subject: Add tox-py27 to wikimedia/bots/jouncebot
..

Add tox-py27 to wikimedia/bots/jouncebot

Bug: T95894
Change-Id: Ic7e97ae0e87864e0c6d9604e9b5ef13ea26aadf4
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/28/204028/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e87958e..7a1184b 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7127,7 +7127,9 @@
   - name: wikimedia/bots/jouncebot
 test:
   - tox-flake8
+  - tox-py27
   - yamllint
 gate-and-submit:
   - tox-flake8
+  - tox-py27
   - yamllint

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7e97ae0e87864e0c6d9604e9b5ef13ea26aadf4
Gerrit-PatchSet: 1
Gerrit-Project: integration/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] Use tox lint yaml and run flake8 - change (wikimedia...jouncebot)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use tox lint yaml and run flake8
..


Use tox lint yaml and run flake8

Bug: T95894
Change-Id: Id74f153c940f90450f3db56c87f357074cde15fc
---
A .gitignore
A requirements.txt
A tests/lint_tests.py
A tests/requirements.txt
M tox.ini
5 files changed, 44 insertions(+), 1 deletion(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..3c7460f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.pyc
+/.tox/
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000..9468d4e
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,6 @@
+irc
+lxml
+mwclient
+python-dateutil
+pytz
+pyyaml
diff --git a/tests/lint_tests.py b/tests/lint_tests.py
new file mode 100644
index 000..5329424
--- /dev/null
+++ b/tests/lint_tests.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import os
+import yaml
+
+
+def lint_yaml(path):
+try:
+obj = yaml.safe_load(file(path, 'r'))
+assert obj, Parse failed for %s: empty result % path
+except yaml.error.YAMLError, exc:
+assert False, YAML parse error in %s: %s % (path, exc)
+
+
+def test_lint_DefaultConfig():
+lint_yaml(os.path.realpath(
+os.path.join(os.path.dirname(__file__), '../DefaultConfig.yaml')))
diff --git a/tests/requirements.txt b/tests/requirements.txt
new file mode 100644
index 000..4283f38
--- /dev/null
+++ b/tests/requirements.txt
@@ -0,0 +1,2 @@
+flake8
+nose
diff --git a/tox.ini b/tox.ini
index 8fb1e40..83dd5a4 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,12 +1,27 @@
 [tox]
 minversion = 1.6
 skipsdist = True
-envlist = flake8
+envlist = py27, flake8
 
 [flake8]
+count = 1
 exclude = bin,lib,include,.venv,.tox,dist,doc,build,*.egg
+ignore = E128
 max-line-length = 120
+show-pep8 = 1
+show-source = 1
+statistics = 1
+
+[nosetests]
+detailed-errors=1
+with-doctest=1
 
 [testenv:flake8]
 commands = flake8
 deps = flake8
+
+[testenv]
+setenv = VIRTUAL_ENV={envdir}
+deps = -r{toxinidir}/requirements.txt
+   -r{toxinidir}/tests/requirements.txt
+commands = nosetests {posargs}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id74f153c940f90450f3db56c87f357074cde15fc
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/bots/jouncebot
Gerrit-Branch: master
Gerrit-Owner: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Yuvipanda yuvipa...@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] Apply dir to site link wrapper on entering to edit - change (mediawiki...Wikibase)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Apply dir to site link wrapper on entering to edit
..


Apply dir to site link wrapper on entering to edit

Currently badge is misplaced on RTL items on RTL edit UI
e.g. http://test.wikidata.org/wiki/Q7?uselang=fa

Change-Id: I733c1af113e5f5611f68fb5a0bef969183a24079
---
M view/resources/jquery/wikibase/jquery.wikibase.sitelinkview.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/view/resources/jquery/wikibase/jquery.wikibase.sitelinkview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.sitelinkview.js
index 5deba41..fd7d0fb 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.sitelinkview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.sitelinkview.js
@@ -263,7 +263,9 @@
}
} );
 
-   this.$link.find( '.wikibase-sitelinkview-page' 
).empty().append( $pageNameInput );
+   this.$link.find( '.wikibase-sitelinkview-page' )
+   .attr( 'dir', dir )
+   .empty().append( $pageNameInput );
 
if( this.options.value ) {
this.updatePageNameInputAutoExpand();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I733c1af113e5f5611f68fb5a0bef969183a24079
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ebrahim ebra...@gnu.org
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Ebrahim ebra...@gnu.org
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Prevent database error resulting from duplicate unique key - change (mediawiki...WikiGrok)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prevent database error resulting from duplicate unique key
..


Prevent database error resulting from duplicate unique key

Bug: T95068
Change-Id: I8420edc8ccea49faae943a90d5c1bf5fc7979905
---
M includes/ResponseStoreDB.php
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  MaxSem: Looks good to me, but someone else must approve
  Phuedx: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/ResponseStoreDB.php b/includes/ResponseStoreDB.php
index bd9a2ba..8a1c217 100644
--- a/includes/ResponseStoreDB.php
+++ b/includes/ResponseStoreDB.php
@@ -99,9 +99,8 @@
$nonNewClaims = array();
foreach ( $res as $row ) {
$claim = $this-rowToClaim( $row );
-   if ( $claim-status == 'new' ) {
-   $claimsFromDb[] = $claim;
-   } else {
+   $claimsFromDb[] = $claim;
+   if ( $claim-status != 'new' ) {
$nonNewClaims[$claim-getKey()] = 1;
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8420edc8ccea49faae943a90d5c1bf5fc7979905
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Phuedx g...@samsmith.io
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] service::node: fix the look-up of undefined variables - change (operations/puppet)

2015-04-14 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: service::node: fix the look-up of undefined variables
..


service::node: fix the look-up of undefined variables

Some variables may not be defined when completing the template.
Unfortunately for us, scope#lookupvar does not return nil, but 'undef'
on such occasions (etiher as a string or symbol). This causes any
possible if-guards to be evaluated as true, and consequently we end up
with variables set to the string 'undef'. For instance, citoid's config
in the beta cluster does not have a proxy set, but the configuration
reads:

  proxy: undef

which is clearly wrong. This patch translates such look-ups into empty
strings, which represents perfectly-valid YAML.

Bug: T95533
Change-Id: I9eab4f1627070e031c33ee4640ba146cdc9fd600
---
M modules/service/templates/node/config.yaml.erb
1 file changed, 18 insertions(+), 9 deletions(-)

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



diff --git a/modules/service/templates/node/config.yaml.erb 
b/modules/service/templates/node/config.yaml.erb
index caa82cc..e073f18 100644
--- a/modules/service/templates/node/config.yaml.erb
+++ b/modules/service/templates/node/config.yaml.erb
@@ -1,3 +1,16 @@
+%
+cvars = {
+  'gelf_host' = scope.lookupvar('service::configuration::logstash_host'),
+  'gelf_port' = scope.lookupvar('service::configuration::logstash_port'),
+  'stat_host' = scope.lookupvar('service::configuration::statsd_host'),
+  'stat_port' = scope.lookupvar('service::configuration::statsd_port'),
+  'proxy' = scope.lookupvar('service::configuration::http_proxy')
+}
+
+cvars.keys.each do |k|
+  cvars[k] = '' if cvars[k].nil? or ['undef', ''].include? cvars[k].to_s
+end
+%
 # Number of worker processes to spawn.
 # Set to 0 to run everything in a single process without clustering.
 # Use 'ncpu' to run as many workers as there are CPU units
@@ -14,8 +27,8 @@
   streams:
   # Use gelf-stream - logstash
   - type: gelf
-host: %= scope.lookupvar('service::configuration::logstash_host') %
-port: %= scope.lookupvar('service::configuration::logstash_port') %
+host: %= cvars['gelf_host'] %
+port: %= cvars['gelf_port'] %
   - type: file
 path: %= @local_logfile %
 level: info
@@ -23,8 +36,8 @@
 # Statsd metrics reporter
 metrics:
   type: statsd
-  host: %= scope.lookupvar('service::configuration::statsd_host') %
-  port: %= scope.lookupvar('service::configuration::statsd_port') %
+  host: %= cvars['stat_host'] %
+  port: %= cvars['stat_port'] %
 
 services:
   - name: %= @title %
@@ -45,8 +58,4 @@
   # to restrict to a particular domain, use:
   # cors: restricted.domain.org
   # URL of the outbound proxy to use (complete with protocol)
-  % if scope.lookupvar('service::configuration::http_proxy') %
-  proxy: %= scope.lookupvar('service::configuration::http_proxy') %
-  % else %
-  # proxy: http://my.proxy.org:8080
-  % end %
+  proxy: %= cvars['proxy'] %

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9eab4f1627070e031c33ee4640ba146cdc9fd600
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mobrovac mobro...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@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] Merge commit 'refs/changes/39/204039/1' of ssh://gerrit.wiki... - change (mediawiki...WikidataQuality)

2015-04-14 Thread Jonaskeutel (Code Review)
Jonaskeutel has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204040

Change subject: Merge commit 'refs/changes/39/204039/1' of 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality into 
violationsTable
..

Merge commit 'refs/changes/39/204039/1' of 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality into 
violationsTable

Conflicts:

constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php

Change-Id: Iacfd1b1849c6737e5a6c78f03671f5e4e92b8975
---
M 
constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
M constraint-report/specials/SpecialConstraintReport.php
M includes/Violations/Violation.php
3 files changed, 4 insertions(+), 22 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/40/204040/1

diff --git 
a/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
 
b/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
index 9136958..fafcc36 100644
--- 
a/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
+++ 
b/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
@@ -2,29 +2,12 @@
 
 namespace WikidataQuality\ConstraintReport\ConstraintCheck\Result;
 
-
- HEAD   (164604 add ResultToViolationTranslator (basic + CheckResult))
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\Lib\ClaimGuidGenerator;
 use WikidataQuality\Result\ResultToViolationTranslator;
 use WikidataQuality\Violations\Violation;
-
-
-class CheckResultToViolationTranslator extends ResultToViolationTranslator{
-
-   public function translateToViolation( $checkResultOrArray ) {
-   if( $checkResultOrArray instanceof CheckResult ) {
-   $checkResultArray = array( $checkResultOrArray );
-   } else {
-   $checkResultArray = $checkResultOrArray;
-===
-use Doctrine\Instantiator\Exception\InvalidArgumentException;
-use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\Lib\ClaimGuidGenerator;
-use WikidataQuality\Result\ResultToViolationTranslator;
-use WikidataQuality\Violations\Violation;
+use InvalidArgumentException;
 
 
 class CheckResultToViolationTranslator extends ResultToViolationTranslator{
@@ -36,7 +19,6 @@
$checkResultArray = $checkResultOrArray;
} else {
throw new InvalidArgumentException;
- BRANCH (3946cd add ResultToViolationTranslator (basic + CheckResult))
}
 
$violationArray = array();
@@ -65,4 +47,4 @@
 
return $violationArray;
}
-}
+}
\ No newline at end of file
diff --git a/constraint-report/specials/SpecialConstraintReport.php 
b/constraint-report/specials/SpecialConstraintReport.php
index c0318cc..288ebee 100644
--- a/constraint-report/specials/SpecialConstraintReport.php
+++ b/constraint-report/specials/SpecialConstraintReport.php
@@ -297,4 +297,4 @@
$violationStore = new ViolationStore();
$violationStore-insertViolation( $violations );
}
-}
+}
\ No newline at end of file
diff --git a/includes/Violations/Violation.php 
b/includes/Violations/Violation.php
index 0dfa304..5ee46dd 100644
--- a/includes/Violations/Violation.php
+++ b/includes/Violations/Violation.php
@@ -215,4 +215,4 @@
public function getStatus() {
return $this-status;
}
-}
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacfd1b1849c6737e5a6c78f03671f5e4e92b8975
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Jonaskeutel jonas.keu...@student.hpi.de

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


[MediaWiki-commits] [Gerrit] Remove yamllint from wikimedia/bots/jouncebot - change (integration/config)

2015-04-14 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204033

Change subject: Remove yamllint from wikimedia/bots/jouncebot
..

Remove yamllint from wikimedia/bots/jouncebot

Superceeded by a test in the repo.

Bug: T95894
Change-Id: I831b76221b8533f79aebfe01a288a0b2fae58b51
---
M zuul/layout.yaml
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/33/204033/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 7a1184b..2d67c2e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7128,8 +7128,6 @@
 test:
   - tox-flake8
   - tox-py27
-  - yamllint
 gate-and-submit:
   - tox-flake8
   - tox-py27
-  - yamllint

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I831b76221b8533f79aebfe01a288a0b2fae58b51
Gerrit-PatchSet: 1
Gerrit-Project: integration/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] runcommand: Twisted 13.x compatibility - change (operations...pybal)

2015-04-14 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204035

Change subject: runcommand: Twisted 13.x compatibility
..

runcommand: Twisted 13.x compatibility

As twisted.internet.process.Process has evolved significantly over the
years, the old ProcessGroupProcess implementation was now incompatible
with it. By exploiting the better structure of newer version of the base
class, we avoid reimplementing parts of the logic, and just add our
additional features (process groups support and timeouts) to the base
class.

Please note that this is /not/ compatible with twisted 11.x which we
have on Ubuntu Precise, so if we decide to merge this we should probably
create a precise branch of pybal where we can backport other, compatible 
changes.

Change-Id: I84dd674cd803c523bcdad1072108266778965aa8
---
M pybal/monitors/runcommand.py
1 file changed, 42 insertions(+), 179 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/pybal 
refs/changes/35/204035/1

diff --git a/pybal/monitors/runcommand.py b/pybal/monitors/runcommand.py
index 38830de..140fb7c 100644
--- a/pybal/monitors/runcommand.py
+++ b/pybal/monitors/runcommand.py
@@ -16,165 +16,29 @@
 Derivative of twisted.internet.process that supports Unix
 process groups, sessions and timeouts
 
-
 def __init__(self,
  reactor, command, args, environment, path, proto,
  uid=None, gid=None, childFDs=None,
  sessionLeader=False, timeout=None):
-Spawn an operating-system process.
 
-This is where the hard work of disconnecting all currently open
-files / forking / executing the new process happens.  (This is
-executed automatically when a Process is instantiated.)
+self.sessionLeader = sessionLeader
+self.timeout = timeout
+self.timeoutCall = None
+super(ProcessGroupProcess, self).__init__(
+reactor, command, args, environment, path, proto,
+uid=uid, gid=gid, childFDs=childFDs
+)
 
-This will also run the subprocess as a given user ID and group ID, if
-specified.  (Implementation Note: this doesn't support all the arcane
-nuances of setXXuid on UNIX: it will assume that either your effective
-or real UID is 0.)
-
-if not proto:
-assert 'r' not in childFDs.values()
-assert 'w' not in childFDs.values()
-if not signal.getsignal(signal.SIGCHLD):
-log.msg(spawnProcess called, but the SIGCHLD handler is not 
-installed. This probably means you have not yet 
-called reactor.run, or called 
-reactor.run(installSignalHandler=0). You will probably 
-never see this process finish, and it may become a 
-zombie process.)
-# if you see this message during a unit test, look in
-# test-standard.xhtml or twisted.test.test_process.SignalMixin
-# for a workaround
+def _execChild(self, path, uid, gid, executable, args, environment):
+if self.sessionLeader:
+self._setupSession()
+super(ProcessGroupProcess, self)._execChild(path, uid, gid, 
executable, args, environment)
 
-self.lostProcess = False
-
-settingUID = (uid is not None) or (gid is not None)
-if settingUID:
-curegid = os.getegid()
-currgid = os.getgid()
-cureuid = os.geteuid()
-curruid = os.getuid()
-if uid is None:
-uid = cureuid
-if gid is None:
-gid = curegid
-# prepare to change UID in subprocess
-os.setuid(0)
-os.setgid(0)
-
-self.pipes = {}
-# keys are childFDs, we can sense them closing
-# values are ProcessReader/ProcessWriters
-
-helpers = {}
-# keys are childFDs
-# values are parentFDs
-
-if childFDs is None:
-childFDs = {0: w, # we write to the child's stdin
-1: r, # we read from their stdout
-2: r, # and we read from their stderr
-}
-
-debug = self.debug
-if debug: print childFDs, childFDs
-
-# fdmap.keys() are filenos of pipes that are used by the child.
-fdmap = {} # maps childFD to parentFD
-for childFD, target in childFDs.items():
-if debug: print [%d] % childFD, target
-if target == r:
-# we need a pipe that the parent can read from
-readFD, writeFD = os.pipe()
-if debug: print readFD=%d, writeFD%d % (readFD, writeFD)
-fdmap[childFD] = writeFD # child writes to this
-helpers[childFD] = readFD# parent reads from this
-  

[MediaWiki-commits] [Gerrit] Temporarily disable calendar model output in HtmlTimeFormatter - change (mediawiki...Wikibase)

2015-04-14 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204037

Change subject: Temporarily disable calendar model output in HtmlTimeFormatter
..

Temporarily disable calendar model output in HtmlTimeFormatter

Meant as a temporary step backwards, until the discussion is finished.

Change-Id: Ifeedcaa74e010ac3861de73c473a4fb8da37c861
---
M lib/includes/formatters/HtmlTimeFormatter.php
M lib/tests/phpunit/formatters/HtmlTimeFormatterTest.php
2 files changed, 17 insertions(+), 13 deletions(-)


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

diff --git a/lib/includes/formatters/HtmlTimeFormatter.php 
b/lib/includes/formatters/HtmlTimeFormatter.php
index 58cb24a..52b04e7 100644
--- a/lib/includes/formatters/HtmlTimeFormatter.php
+++ b/lib/includes/formatters/HtmlTimeFormatter.php
@@ -55,11 +55,15 @@
 
$formatted = $this-dateTimeFormatter-format( $value );
 
-   if ( $this-calendarNameNeeded( $value ) ) {
-   $formatted .= 'sup class=wb-calendar-name'
-   . $this-formatCalendarName( 
$value-getCalendarModel() )
-   . '/sup';
-   }
+   // FIXME: The current logic below uses the calendar model field 
as actual calendar model of
+   // the timestamp, not as prefered. The later was the 
original intention of the field and
+   // needs conversion from the always Gregorian timestamp to 
the prefered calendar model.
+   // FIXME: Temporarily disabled.
+   //if ( $this-calendarNameNeeded( $value ) ) {
+   //  $formatted .= 'sup class=wb-calendar-name'
+   //  . $this-formatCalendarName( 
$value-getCalendarModel() )
+   //  . '/sup';
+   //}
 
return $formatted;
}
diff --git a/lib/tests/phpunit/formatters/HtmlTimeFormatterTest.php 
b/lib/tests/phpunit/formatters/HtmlTimeFormatterTest.php
index d230f3d..b1432e8 100644
--- a/lib/tests/phpunit/formatters/HtmlTimeFormatterTest.php
+++ b/lib/tests/phpunit/formatters/HtmlTimeFormatterTest.php
@@ -65,7 +65,7 @@
1 * 60 * 60, 0, 0,
TimeValue::PRECISION_DAY,
TimeFormatter::CALENDAR_JULIAN ),
-   '/^MOCKDATEsup 
class=wb-calendar-name\(valueview-expert-timevalue-calendar-julian\)\/sup$/'
+   '/^MOCKDATE$/'
),
'a month in 1920' = array(
new TimeValue( '+1920-05-01T00:00:00Z',
@@ -79,21 +79,21 @@
1 * 60 * 60, 0, 0,
TimeValue::PRECISION_DAY,
TimeFormatter::CALENDAR_GREGORIAN ),
-   '/^MOCKDATEsup 
class=wb-calendar-name\(valueview-expert-timevalue-calendar-gregorian\)\/sup$/'
+   '/^MOCKDATE$/'
),
'a julian day in 1520' = array(
new TimeValue( '+1520-05-01T00:00:00Z',
1 * 60 * 60, 0, 0,
TimeValue::PRECISION_DAY,
TimeFormatter::CALENDAR_JULIAN ),
-   '/^MOCKDATEsup 
class=wb-calendar-name\(valueview-expert-timevalue-calendar-julian\)\/sup$/'
+   '/^MOCKDATE$/'
),
'a julian day in 1980' = array(
new TimeValue( '+1980-05-01T00:00:00Z',
1 * 60 * 60, 0, 0,
TimeValue::PRECISION_DAY,
TimeFormatter::CALENDAR_JULIAN ),
-   '/^MOCKDATEsup 
class=wb-calendar-name\(valueview-expert-timevalue-calendar-julian\)\/sup$/'
+   '/^MOCKDATE$/'
),
'2014-10-10' = array(
new TimeValue( '+2014-10-10T00:00:00Z',
@@ -121,28 +121,28 @@
0, 0, 0,
TimeValue::PRECISION_DAY,
TimeFormatter::CALENDAR_GREGORIAN ),
-   '/^MOCKDATEsup 
class=wb-calendar-name\(valueview-expert-timevalue-calendar-gregorian\)\/sup$/'
+   '/^MOCKDATE$/'
),
'32-bit integer overflow' = array(
new TimeValue( '-2147483649-01-01T00:00:00Z',
   

[MediaWiki-commits] [Gerrit] Re-enable Special:SupportedLanguages - change (operations/mediawiki-config)

2015-04-14 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204032

Change subject: Re-enable Special:SupportedLanguages
..

Re-enable Special:SupportedLanguages

Bug: T54728
Change-Id: I63a1bf47b1a7bf34aa528c9582b6a23b68a8956e
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 6b4ff4c..8b31e91 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2352,9 +2352,6 @@
unset( $wgSpecialPages['FirstSteps'] );
unset( $wgSpecialPages['ManageMessageGroups'] );
unset( $wgSpecialPages['TranslationStats'] );
-
-   // Caused apache overload 2013-08-11 TS
-   unset( $wgSpecialPages['SupportedLanguages'] );
 }
 
 if ( $wmgUseTranslationNotifications ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63a1bf47b1a7bf34aa528c9582b6a23b68a8956e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] New Wikidata Build - 2015-04-14T10:00:01+0000 - change (mediawiki...Wikidata)

2015-04-14 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204034

Change subject: New Wikidata Build - 2015-04-14T10:00:01+
..

New Wikidata Build - 2015-04-14T10:00:01+

Change-Id: I0e9b3630cce37db373cb2629bb524b548534ada0
---
M Wikidata.localisation.php
M Wikidata.php
M composer.lock
M extensions/Wikibase/client/i18n/ce.json
M extensions/Wikibase/client/i18n/fo.json
M extensions/Wikibase/client/i18n/gsw.json
M extensions/Wikibase/client/i18n/hsb.json
A extensions/Wikibase/client/i18n/khw.json
M extensions/Wikibase/client/i18n/ps.json
M extensions/Wikibase/client/i18n/sa.json
M extensions/Wikibase/client/i18n/si.json
A extensions/Wikibase/lib/i18n/fo.json
M extensions/Wikibase/lib/i18n/gsw.json
M extensions/Wikibase/lib/i18n/hsb.json
A extensions/Wikibase/lib/i18n/khw.json
M extensions/Wikibase/lib/i18n/pt-br.json
M extensions/Wikibase/lib/i18n/ru.json
M extensions/Wikibase/lib/includes/StringNormalizer.php
M extensions/Wikibase/lib/includes/store/sql/TermSqlIndex.php
M extensions/Wikibase/lib/tests/phpunit/store/MockTermIndex.php
M extensions/Wikibase/repo/i18n/azb.json
M extensions/Wikibase/repo/i18n/et.json
M extensions/Wikibase/repo/i18n/fa.json
M extensions/Wikibase/repo/i18n/gsw.json
M extensions/Wikibase/repo/i18n/hsb.json
M extensions/Wikibase/repo/i18n/hu.json
M extensions/Wikibase/repo/i18n/ja.json
A extensions/Wikibase/repo/i18n/khw.json
M extensions/Wikibase/repo/i18n/ko.json
M extensions/Wikibase/repo/i18n/ml.json
M extensions/Wikibase/repo/i18n/nb.json
M extensions/Wikibase/repo/i18n/oc.json
M extensions/Wikibase/repo/i18n/ps.json
M extensions/Wikibase/repo/i18n/pt-br.json
M extensions/Wikibase/repo/i18n/qqq.json
M extensions/Wikibase/repo/i18n/yi.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/CopyrightMessageBuilder.php
M extensions/Wikibase/repo/includes/Hooks/OutputPageJsConfigHookHandler.php
M extensions/Wikibase/repo/includes/api/SearchEntities.php
M extensions/Wikibase/repo/includes/specials/SpecialModifyEntity.php
M extensions/Wikibase/repo/includes/specials/SpecialNewEntity.php
M extensions/Wikibase/repo/includes/specials/SpecialPageCopyrightView.php
M extensions/Wikibase/repo/includes/store/sql/EntityPerPageBuilder.php
M extensions/Wikibase/repo/includes/store/sql/ItemsPerSiteBuilder.php
M extensions/Wikibase/repo/includes/store/sql/PropertyInfoTableBuilder.php
M extensions/Wikibase/repo/includes/store/sql/TermSearchKeyBuilder.php
M extensions/Wikibase/repo/maintenance/dispatchChanges.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Hooks/OutputPageJsConfigHookHandlerTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/api/SearchEntitiesTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/specials/SpecialPageCopyrightViewTest.php
M vendor/composer/installed.json
52 files changed, 616 insertions(+), 248 deletions(-)


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

diff --git a/Wikidata.localisation.php b/Wikidata.localisation.php
index 4a402e2..22708a5 100644
--- a/Wikidata.localisation.php
+++ b/Wikidata.localisation.php
@@ -8,11 +8,18 @@
 $wgEnableWikibaseRepo = false;
 $wgEnableWikibaseClient = false;
 
-require_once __DIR__ . '/vendor/autoload.php';
-require_once __DIR__ . '/extensions/Wikibase/repo/Wikibase.php';
-require_once __DIR__ . '/extensions/Wikidata.org/WikidataOrg.php';
-require_once __DIR__ . '/extensions/PropertySuggester/PropertySuggester.php';
-require_once __DIR__ . '/extensions/Wikibase/client/WikibaseClient.php';
+$wgWikidataBaseDir = $IP;
+
+if ( file_exists(  __DIR__ . '/vendor/autoload.php' ) ) {
+   $wgWikidataBaseDir = __DIR__;
+   require_once __DIR__ . '/vendor/autoload.php';
+}
+
+require_once $wgWikidataBaseDir/extensions/Wikibase/repo/Wikibase.php;
+require_once $wgWikidataBaseDir/extensions/Wikidata.org/WikidataOrg.php;
+require_once 
$wgWikidataBaseDir/extensions/WikimediaBadges/WikimediaBadges.php;
+require_once 
$wgWikidataBaseDir/extensions/PropertySuggester/PropertySuggester.php;
+require_once 
$wgWikidataBaseDir/extensions/Wikibase/client/WikibaseClient.php;
 
 $wgExtensionCredits['wikibase'][] = array(
'path' = __DIR__,
diff --git a/Wikidata.php b/Wikidata.php
index 0610e8e..c662ae3 100644
--- a/Wikidata.php
+++ b/Wikidata.php
@@ -18,18 +18,38 @@
 $wgEnableWikibaseRepo = false;
 $wgEnableWikibaseClient = false;
 
-include_once __DIR__ . '/vendor/autoload.php';
+$wgWikidataBaseDir = $IP;
+
+if ( file_exists(  __DIR__ . '/vendor/autoload.php' ) ) {
+   include_once __DIR__ . '/vendor/autoload.php';
+
+   // @fixme generating these settings with composer doesn't work with
+   // the composer-merge-plugin. We would need to fix that and probably
+   // handle this somewhat differently.  For now, this way at least
+   // works with the current Wikidata build process, with composer run
+   // here 

[MediaWiki-commits] [Gerrit] Remove yamllint from wikimedia/bots/jouncebot - change (integration/config)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove yamllint from wikimedia/bots/jouncebot
..


Remove yamllint from wikimedia/bots/jouncebot

Superceeded by a test in the repo.

Bug: T95894
Change-Id: I831b76221b8533f79aebfe01a288a0b2fae58b51
---
M zuul/layout.yaml
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 7a1184b..2d67c2e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7128,8 +7128,6 @@
 test:
   - tox-flake8
   - tox-py27
-  - yamllint
 gate-and-submit:
   - tox-flake8
   - tox-py27
-  - yamllint

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I831b76221b8533f79aebfe01a288a0b2fae58b51
Gerrit-PatchSet: 1
Gerrit-Project: integration/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] Do not load WikiGrok dialog if there are no suggestions - change (mediawiki...WikiGrok)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Do not load WikiGrok dialog if there are no suggestions
..


Do not load WikiGrok dialog if there are no suggestions

Bug: T95722
Change-Id: Ie31b1b6dc884f7166cc9b90b5d710da378880993
---
M includes/QuestionStore.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/QuestionStore.php b/includes/QuestionStore.php
index eb4d416..60edc49 100644
--- a/includes/QuestionStore.php
+++ b/includes/QuestionStore.php
@@ -80,7 +80,7 @@
$campaigns = array();
foreach ( $res as $row ) {
$campaignData = unserialize( $row-wgq_data );
-   if ( $campaignData ) {
+   if ( $campaignData  $campaignData['questions'] ) {
$campaigns[$row-wgq_campaign] = $campaignData;
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie31b1b6dc884f7166cc9b90b5d710da378880993
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Bmansurov bmansu...@wikimedia.org
Gerrit-Reviewer: Phuedx g...@samsmith.io
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Explicitly define allowed formats - change (mediawiki...citoid)

2015-04-14 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Explicitly define allowed formats
..


Explicitly define allowed formats

* Specify allowed formats in app.js

* Respond with response type specified
for given format

* Change error responses to be json

Bug: T95308
Change-Id: I59059c1938a644f33ddf6bbeb998f1ad0bb46d7b
---
M app.js
M routes/root.js
M test/features/errors/index.js
3 files changed, 62 insertions(+), 27 deletions(-)

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



diff --git a/app.js b/app.js
index d636a6b..cfb6a4d 100644
--- a/app.js
+++ b/app.js
@@ -64,6 +64,19 @@
// init the Citoid service object
app.citoid  = new CitoidService(app.conf, app.logger, app.metrics);
 
+   // set allowed export formats and expected response type
+   var nativeFormats = {
+   'mediawiki':'application/json',
+   'zotero':'application/json',
+   'mwDeprecated':'application/json'
+   };
+
+   var zoteroFormats = {
+   'bibtex':'application/x-bibtex'
+   };
+
+   app.formats = Object.assign({}, nativeFormats, zoteroFormats);
+
return BBPromise.resolve(app);
 
 }
diff --git a/routes/root.js b/routes/root.js
index 58d94ee..5744fca 100644
--- a/routes/root.js
+++ b/routes/root.js
@@ -14,7 +14,6 @@
  */
 var app;
 
-
 /**
  * GET /robots.txt
  * Instructs robots no indexing should occur on this domain.
@@ -47,8 +46,14 @@
}
 
if (!requestedURL) {
-   res.status(400).type('text/plain');
-   res.send('url is a required parameter');
+   res.status(400).type('application/json');
+   res.send({Error:No 'url' value specified});
+   return;
+   }
+
+   if (!app.formats[format]) {
+   res.status(400).type('application/json');
+   res.send({Error:'Invalid format requested ' + format});
return;
}
 
@@ -59,7 +64,7 @@
};
 
app.citoid.request(opts, function(error, responseCode, body){
-   res.status(responseCode).type('application/json');
+   res.status(responseCode).type(app.formats[format]);
res.send(body);
});
 
@@ -78,12 +83,16 @@
search = req.query.search;
 
if (!search) {
-   res.status(400).type('text/plain');
-   res.send(No 'search' value specified\n);
+   res.status(400).type('application/json');
+   res.send({Error:No 'search' value specified});
return;
} else if(!format) {
-   res.status(400).type('text/plain');
-   res.send(No 'format' value specified\nOptions are 
'mediawiki','zotero');
+   res.status(400).type('application/json');
+   res.send({Error:No 'format' value specified});
+   return;
+   } else if (!app.formats[format]) {
+   res.status(400).type('application/json');
+   res.send({Error:'Invalid format requested ' + format});
return;
}
 
@@ -95,12 +104,7 @@
};
 
app.citoid.request(opts, function(error, responseCode, body) {
-   res.status(responseCode);
-   if(format === 'bibtex') {
-   res.type('application/x-bibtex');
-   } else {
-   res.type('application/json');
-   }
+   res.status(responseCode).type(app.formats[format]);
res.send(body);
});
 
diff --git a/test/features/errors/index.js b/test/features/errors/index.js
index b56e120..87c3eaa 100644
--- a/test/features/errors/index.js
+++ b/test/features/errors/index.js
@@ -12,19 +12,6 @@
 
before(function () { return server.start(); });
 
-   it('missing format in query', function() {
-   return preq.get({
-   uri: server.config.q_uri,
-   query: {
-   search: '123456'
-   }
-   }).then(function(res) {
-   assert.status(res, 400);
-   }, function(err) {
-   assert.status(err, 400);
-   });
-   });
-
it('missing search in query', function() {
return preq.get({
uri: server.config.q_uri,
@@ -35,6 +22,37 @@
assert.status(res, 400);
}, function(err) {
assert.status(err, 400);
+   assert.deepEqual(err.body.Error, No 'search' value 
specified);
+   });
+   });
+
+   it('missing format in query', function() {
+   return preq.get({
+   uri: server.config.q_uri,
+   query: {
+   search: '123456'
+   

[MediaWiki-commits] [Gerrit] Use ParsoidVirtualRESTService for HTML to Wikitext transform... - change (mediawiki...ContentTranslation)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use ParsoidVirtualRESTService for HTML to Wikitext 
transformation
..


Use ParsoidVirtualRESTService for HTML to Wikitext transformation

Bug: T95542
Change-Id: I4b0c4c078efc9fdc98863c22cb72945b67b72733
---
M api/ApiContentTranslationPublish.php
1 file changed, 46 insertions(+), 20 deletions(-)

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



diff --git a/api/ApiContentTranslationPublish.php 
b/api/ApiContentTranslationPublish.php
index c0158cd..c776152 100644
--- a/api/ApiContentTranslationPublish.php
+++ b/api/ApiContentTranslationPublish.php
@@ -18,36 +18,62 @@
 class ApiContentTranslationPublish extends ApiBase {
 
/**
+* @var VirtualRESTServiceClient
+*/
+   protected $serviceClient;
+
+   public function __construct( ApiMain $main, $name ) {
+   global $wgContentTranslationParsoid;
+   parent::__construct( $main, $name );
+   $this-serviceClient = new VirtualRESTServiceClient( new 
MultiHttpClient( array() ) );
+   $parsoidConfig = $wgContentTranslationParsoid;
+   $this-serviceClient-mount( '/parsoid/', new 
ParsoidVirtualRESTService( array(
+   'URL' = $parsoidConfig['url'],
+   'prefix' = $parsoidConfig['prefix'],
+   'timeout' = $parsoidConfig['timeout'],
+   ) ) );
+   }
+
+   private function requestParsoid( $method, $path, $params ) {
+   $request = array(
+   'method' = $method,
+   'url' = '/parsoid/local/v1/' . $path
+   );
+   if ( $method === 'GET' ) {
+   $request['query'] = $params;
+   } else {
+   $request['body'] = $params;
+   }
+   $response = $this-serviceClient-run( $request );
+   if ( $response['code'] === 200  $response['error'] === '' ) {
+   return $response['body'];
+   } elseif ( $response['error'] !== '' ) {
+   $this-dieUsage( 'parsoidserver-http-error: ' . 
$response['code'], $response['error'] );
+   } else { // error null, code not 200
+   $this-dieUsage( 'parsoidserver-http: HTTP ' . 
$response['code'], $response['code'] );
+   }
+   }
+
+   /**
 * Converts html to wikitext
 *
 * @param Title $title
 * @param string $html
-* @return Status
-* @throw MWException
+* @return string wikitext
 */
protected function convertHtmlToWikitext( Title $title, $html ) {
-   global $wgContentTranslationParsoid;
-
-   $conf = $wgContentTranslationParsoid;
-   $page = urlencode( $title-getPrefixedDBkey() );
-
-   $req = MWHttpRequest::factory(
-   {$conf['url']}/{$conf['prefix']}/$page,
+   $wikitext = $this-requestParsoid(
+   'POST',
+   'transform/html/to/wikitext/' . urlencode( 
$title-getPrefixedDBkey() ),
array(
-   'method' = 'POST',
-   'postData' = array(
-   'content' = $html,
-   ),
-   'timeout' = $conf['timeout'],
+   'html' = $html,
+   'oldid' = $parserParams['oldid'],
)
);
-
-   $status = $req-execute();
-   if ( !$status-isOK() ) {
-   throw new MWException( $status );
+   if ( $wikitext === false ) {
+   $this-dieUsage( 'Error contacting the Parsoid server', 
'parsoidserver' );
}
-
-   return $req-getContent();
+   return $wikitext;
}
 
protected function saveWikitext( $title, $wikitext, $params ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b0c4c078efc9fdc98863c22cb72945b67b72733
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
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] Update to latest service-template-node - change (mediawiki...graphoid)

2015-04-14 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Update to latest service-template-node
..


Update to latest service-template-node

Includes:
- configurable CSP headers
- configurable HTTP(S) proxy
- configurable CORS headers

Change-Id: I82b270a27d01f42604ad98b518a98dba8e221bc9
---
M app.js
M lib/util.js
M package.json
M test/features/app/app.js
4 files changed, 52 insertions(+), 3 deletions(-)

Approvals:
  Yurik: Verified; Looks good to me, approved



diff --git a/app.js b/app.js
index 88943b1..5f9e033 100644
--- a/app.js
+++ b/app.js
@@ -31,6 +31,31 @@
 if(!app.conf.port) { app.conf.port = ; }
 if(!app.conf.interface) { app.conf.interface = '0.0.0.0'; }
 if(!app.conf.compression_level) { app.conf.compression_level = 3; }
+if(app.conf.cors === undefined) { app.conf.cors = '*'; }
+if(!app.conf.csp) {
+app.conf.csp =
+default-src 'self'; object-src 'none'; media-src *; img-src *; 
style-src *; frame-ancestors 'self';
+}
+
+// set outgoing proxy
+if(app.conf.proxy) {
+process.env.HTTP_PROXY = app.conf.proxy;
+}
+
+// set the CORS and CSP headers
+app.all('*', function(req, res, next) {
+if(app.conf.cors !== false) {
+res.header('Access-Control-Allow-Origin', app.conf.cors);
+res.header('Access-Control-Allow-Headers', 'Accept, 
X-Requested-With, Content-Type');
+}
+res.header('X-XSS-Protection', '1; mode=block');
+res.header('X-Content-Type-Options', 'nosniff');
+res.header('X-Frame-Options', 'SAMEORIGIN');
+res.header('Content-Security-Policy', app.conf.csp);
+res.header('X-Content-Security-Policy', app.conf.csp);
+res.header('X-WebKit-CSP', app.conf.csp);
+next();
+});
 
 // disable the X-Powered-By header
 app.set('x-powered-by', false);
diff --git a/lib/util.js b/lib/util.js
index 58ed1e3..fb83c9c 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -190,8 +190,8 @@
 level = 'info';
 }
 // log the error
-req.logger.log(level +
-(errObj.component ? '/' + errObj.component : '/' + 
errObj.status),
+req.logger.log(level + '/' +
+(errObj.component ? errObj.component : errObj.status),
 errForLog(errObj));
 // let through only non-sensitive info
 var respBody = {
diff --git a/package.json b/package.json
index bbd3a0e..e352bf2 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
 js-yaml: ^3.2.7,
 node-uuid: ^1.4.3,
 preq: ^0.3.12,
-service-runner: ^0.1.5
+service-runner: ^0.1.6
   },
   devDependencies: {
 assert: ^1.3.0,
diff --git a/test/features/app/app.js b/test/features/app/app.js
index c7fb08c..6df85b4 100644
--- a/test/features/app/app.js
+++ b/test/features/app/app.js
@@ -25,6 +25,30 @@
 });
 });
 
+it('should set CORS headers', function() {
+return preq.get({
+uri: server.config.uri + 'robots.txt'
+}).then(function(res) {
+assert.deepEqual(res.status, 200);
+assert.deepEqual(res.headers['access-control-allow-origin'], '*');
+assert.notDeepEqual(res.headers['access-control-allow-headers'], 
undefined);
+});
+});
+
+it('should set CSP headers', function() {
+return preq.get({
+uri: server.config.uri + 'robots.txt'
+}).then(function(res) {
+assert.deepEqual(res.status, 200);
+assert.deepEqual(res.headers['x-xss-protection'], '1; mode=block');
+assert.deepEqual(res.headers['x-content-type-options'], 'nosniff');
+assert.deepEqual(res.headers['x-frame-options'], 'SAMEORIGIN');
+assert.deepEqual(res.headers['content-security-policy'], 
'default-src');
+assert.deepEqual(res.headers['x-content-security-policy'], 
'default-src');
+assert.deepEqual(res.headers['x-webkit-csp'], 'default-src');
+});
+});
+
 it('should get static content gzipped', function() {
 return preq.get({
 uri: server.config.uri + 'static/index.html',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82b270a27d01f42604ad98b518a98dba8e221bc9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid
Gerrit-Branch: master
Gerrit-Owner: Mobrovac mobro...@wikimedia.org
Gerrit-Reviewer: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] add missing 'a' in sql script + use-clause in SpecialConstra... - change (mediawiki...WikidataQuality)

2015-04-14 Thread Jonaskeutel (Code Review)
Jonaskeutel has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204036

Change subject: add missing 'a' in sql script + use-clause in 
SpecialConstraintReportTest
..

add missing 'a' in sql script + use-clause in SpecialConstraintReportTest

Change-Id: I19c083f431790ba6adf675b731e0439981600f68
---
M constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php
M external-validation/sql/create_wdqa_external_data.sql
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/36/204036/1

diff --git 
a/constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php 
b/constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php
index fa23958..cd40061 100755
--- a/constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php
+++ b/constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php
@@ -26,6 +26,7 @@
  * @uses   WikidataQuality\ConstraintReport\ConstraintCheck\Result\CheckResult
  * @uses   WikidataQuality\Html\HtmlTable
  * @uses   WikidataQuality\Html\HtmlTableHeader
+ * @uses   WikidataQuality\Html\HtmlTableCell
  *
  * @author BP2014N1
  * @license GNU GPL v2+
diff --git a/external-validation/sql/create_wdqa_external_data.sql 
b/external-validation/sql/create_wdqa_external_data.sql
index a0e2e8b..1428169 100644
--- a/external-validation/sql/create_wdqa_external_data.sql
+++ b/external-validation/sql/create_wdqa_external_data.sql
@@ -6,4 +6,4 @@
   external_value  VARBINARY(255)   NOT NULL
 );
 
-CREATE INDEX dump_id_external_id ON wdq_external_data (dump_id, external_id);
+CREATE INDEX dump_id_external_id ON wdqa_external_data (dump_id, external_id);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19c083f431790ba6adf675b731e0439981600f68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Jonaskeutel jonas.keu...@student.hpi.de

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


[MediaWiki-commits] [Gerrit] add missing 'a' in sql script + use-clause in SpecialConstra... - change (mediawiki...WikidataQuality)

2015-04-14 Thread Tamslo (Code Review)
Tamslo has submitted this change and it was merged.

Change subject: add missing 'a' in sql script + use-clause in 
SpecialConstraintReportTest
..


add missing 'a' in sql script + use-clause in SpecialConstraintReportTest

Change-Id: I19c083f431790ba6adf675b731e0439981600f68
---
M constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php
M external-validation/sql/create_wdqa_external_data.sql
2 files changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Tamslo: Verified; Looks good to me, approved



diff --git 
a/constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php 
b/constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php
index fa23958..cd40061 100755
--- a/constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php
+++ b/constraint-report/tests/phpunit/Specials/SpecialConstraintReportTest.php
@@ -26,6 +26,7 @@
  * @uses   WikidataQuality\ConstraintReport\ConstraintCheck\Result\CheckResult
  * @uses   WikidataQuality\Html\HtmlTable
  * @uses   WikidataQuality\Html\HtmlTableHeader
+ * @uses   WikidataQuality\Html\HtmlTableCell
  *
  * @author BP2014N1
  * @license GNU GPL v2+
diff --git a/external-validation/sql/create_wdqa_external_data.sql 
b/external-validation/sql/create_wdqa_external_data.sql
index a0e2e8b..1428169 100644
--- a/external-validation/sql/create_wdqa_external_data.sql
+++ b/external-validation/sql/create_wdqa_external_data.sql
@@ -6,4 +6,4 @@
   external_value  VARBINARY(255)   NOT NULL
 );
 
-CREATE INDEX dump_id_external_id ON wdq_external_data (dump_id, external_id);
+CREATE INDEX dump_id_external_id ON wdqa_external_data (dump_id, external_id);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19c083f431790ba6adf675b731e0439981600f68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Jonaskeutel jonas.keu...@student.hpi.de
Gerrit-Reviewer: Tamslo tamaraslosa...@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] MWPopupTool: Don't assume editnotice html has a single wrapp... - change (mediawiki...VisualEditor)

2015-04-14 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204038

Change subject: MWPopupTool: Don't assume editnotice html has a single wrapping 
element
..

MWPopupTool: Don't assume editnotice html has a single wrapping element

In case of FlaggedRevs, for example, the software is given a loose
string of html with a Bold element, Text nodes, and Anchor element.

Bug: T95989
Change-Id: I3d345677507ffc08feec0f7785e148ac98f19cb7
---
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/38/204038/1

diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 545aa97..d66cacd 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -30,14 +30,14 @@
this.$items = $( 'div' ).addClass( 've-ui-mwNoticesPopupTool-items' );
 
// Initialization
-   items.forEach( function ( item ) {
-   var node = $.parseHTML( item )[0];
-   $( node )
+   items.forEach( function ( itemHtml ) {
+   var $node = $( 'div' )
.addClass( 've-ui-mwNoticesPopupTool-item' )
+   .append( $.parseHTML( itemHtml ) )
.find( 'a' )
.attr( 'target', '_blank' );
 
-   tool.$items.append( node );
+   tool.$items.append( $node );
} );
 
this.popup.$body.append( this.$items );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d345677507ffc08feec0f7785e148ac98f19cb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] add ResultToViolationTranslator (basic + CheckResult) - change (mediawiki...WikidataQuality)

2015-04-14 Thread Jonaskeutel (Code Review)
Jonaskeutel has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204039

Change subject: add ResultToViolationTranslator (basic + CheckResult)
..

add ResultToViolationTranslator (basic + CheckResult)

also save violations from constraint check in table; therefore slighlty
modified violation and violationStore with comments how to undo the
changes
+ add constants for status + error handling in translator
tests to come

Change-Id: I4bf76f2403f0691fb6c89013b0a4cd22cc8fb471
---
A 
constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
M constraint-report/specials/SpecialConstraintReport.php
A includes/Result/ResultToViolationTranslator.php
M includes/Violations/Violation.php
M includes/Violations/ViolationStore.php
5 files changed, 99 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/39/204039/1

diff --git 
a/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
 
b/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
new file mode 100644
index 000..46521a4
--- /dev/null
+++ 
b/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
@@ -0,0 +1,51 @@
+?php
+
+namespace WikidataQuality\ConstraintReport\ConstraintCheck\Result;
+
+
+use Doctrine\Instantiator\Exception\InvalidArgumentException;
+use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\DataModel\Entity\PropertyId;
+use Wikibase\Lib\ClaimGuidGenerator;
+use WikidataQuality\Result\ResultToViolationTranslator;
+use WikidataQuality\Violations\Violation;
+
+
+class CheckResultToViolationTranslator extends ResultToViolationTranslator{
+
+   public function translateToViolation( $checkResultOrArray ) {
+   if( $checkResultOrArray instanceof CheckResult ) {
+   $checkResultArray = array( $checkResultOrArray );
+   } else if( is_array( $checkResultOrArray ) ) {
+   $checkResultArray = $checkResultOrArray;
+   } else {
+   throw new InvalidArgumentException;
+   }
+
+   $violationArray = array();
+   foreach( $checkResultArray as $checkResult ) {
+   if( $checkResult-getStatus() !== 'violation' ){
+   continue;
+   }
+
+   // TODO: Use these line when CheckResult has statement
+   //$statement = $checkResult-getStatement();
+   //$entityId = $statement-getClaim()-getEntityId();
+   $entityId = new ItemId( 'Q90' );
+   $statement = array();
+   $statement[ 'pid' ] = new PropertyId( 'P1' );
+   $statement[ 'claimGuid' ] = 'Q42';
+
+   //TODO: Use real claimGuid
+   $guidGenerator = new ClaimGuidGenerator();
+   $constraintClaimGuid = $guidGenerator-newGuid( 
$entityId );
+   $constraintTypeEntityId = 
$checkResult-getConstraintName();
+   $revisionId = $this-getRevisionIdForEntity( $entityId 
);
+   $status = 'violation';
+
+   $violationArray[] = new Violation( $entityId, 
$statement, $constraintClaimGuid, $constraintTypeEntityId, $revisionId, 
$status);
+   }
+
+   return $violationArray;
+   }
+}
\ No newline at end of file
diff --git a/constraint-report/specials/SpecialConstraintReport.php 
b/constraint-report/specials/SpecialConstraintReport.php
index 1099505..288ebee 100644
--- a/constraint-report/specials/SpecialConstraintReport.php
+++ b/constraint-report/specials/SpecialConstraintReport.php
@@ -13,9 +13,11 @@
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Repo\WikibaseRepo;
 use WikidataQuality\ConstraintReport\ConstraintCheck\ConstraintChecker;
+use 
WikidataQuality\ConstraintReport\ConstraintCheck\Result\CheckResultToViolationTranslator;
 use WikidataQuality\Html\HtmlTable;
 use WikidataQuality\Html\HtmlTableHeader;
 use WikidataQuality\Specials\SpecialCheckResultPage;
+use WikidataQuality\Violations\ViolationStore;
 
 
 /**
@@ -97,6 +99,8 @@
// Run constraint checker
$constraintChecker = new ConstraintChecker( $this-entityLookup 
);
$results = $constraintChecker-execute( $entity );
+
+   $this-saveResultsInViolationsTable( $results );
 
return $results;
}
@@ -283,4 +287,14 @@
'violation' = 'error'
);
}
+
+   /**
+* @param array $results
+*/
+   protected function saveResultsInViolationsTable( $results ) {
+   $translator = new CheckResultToViolationTranslator();
+   

[MediaWiki-commits] [Gerrit] Beta: Add requested languages for ContentTranslation - change (operations/puppet)

2015-04-14 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Beta: Add requested languages for ContentTranslation
..


Beta: Add requested languages for ContentTranslation

* Aragonese (an),
* Asturian (ast),
* Bashkir (ba),
* Basque (eu)
* Chuvash (cv),
* Galician (gl)
* Komi (kv),
* Lezgi (lez),
* Occitan (oc),
* Perm-Komi (koi),
* Sakha (sah),
* Tuvan (tyv),
* Udmurt (udm)

Also, added missing Gujarati (gu) source languages.

Bug: T95536 T95842
Change-Id: I291d3163b856db69dbb77f6b885e0a6c193d3c09
---
M hieradata/labs/deployment-prep/common.yaml
1 file changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 76ea386..3f3407e 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -38,21 +38,31 @@
 cxserver::registry:
   source:
 - 'af'
+- 'an'
+- 'ast'
 - 'az'
+- 'ba'
 - 'bg'
 - 'ca'
+- 'cv'
 - 'da'
 - 'de'
 - 'en'
 - 'eo'
 - 'es'
+- 'eu'
 - 'fr'
+- 'gl'
+- 'gu'
 - 'hy'
 - 'id'
 - 'it'
 - 'kk'
 - 'kn'
+- 'koi'
+- 'kv'
 - 'ky'
+- 'lez'
 - 'min'
 - 'mk'
 - 'ms'
@@ -60,15 +70,19 @@
 - 'nn'
 - 'no'
 - 'mk'
+- 'oc'
 - 'pa'
 - 'pl'
 - 'pt'
 - 'ru'
+- 'sah'
 - 'sh'
 - 'simple'
 - 'sl'
 - 'sv'
 - 'tr'
+- 'tyv'
+- 'udm'
 - 'uk'
 - 'uz'
 - 'vi'
@@ -76,14 +90,20 @@
 - 'zh'
   target:
 - 'af'
+- 'an'
+- 'ast'
 - 'az'
+- 'ba'
 - 'bg'
 - 'ca'
+- 'cv'
 - 'da'
 - 'de'
 - 'eo'
 - 'es'
+- 'eu'
 - 'fr'
+- 'gl'
 - 'gu'
 - 'hy'
 - 'id'
@@ -91,10 +111,14 @@
 - 'ja'
 - 'kk'
 - 'kn'
+- 'koi'
+- 'kv'
 - 'ky'
+- 'lez'
 - 'min'
 - 'mk'
 - 'ms'
+- 'oc'
 - 'nl'
 - 'nn'
 - 'no'
@@ -102,11 +126,14 @@
 - 'pl'
 - 'pt'
 - 'ru'
+- 'sah'
 - 'sh'
 - 'simple'
 - 'sl'
 - 'sv'
 - 'tr'
+- 'tyv'
+- 'udm'
 - 'uk'
 - 'uz'
 - 'vi'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I291d3163b856db69dbb77f6b885e0a6c193d3c09
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Santhosh santhosh.thottin...@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] Allow moving flow boards - change (mediawiki...Flow)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow moving flow boards
..


Allow moving flow boards

* move added back to board menu, still removed from topic pages
* moves all related topics to the new location as well
* performs null edit to header with flow talkpage manager
* Requires flow-create-board to move to a place that was not a flow board 
previously

Bug: T90063
Change-Id: I4bdc665e21b16e4048c3c78c7083add803491dc7
---
M Flow.php
M Hooks.php
M autoload.php
M container.php
M i18n/en.json
M i18n/qqq.json
A includes/BoardMover.php
M includes/Model/Workflow.php
M includes/WorkflowLoaderFactory.php
9 files changed, 238 insertions(+), 7 deletions(-)

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



diff --git a/Flow.php b/Flow.php
index e66bd23..487dd06 100644
--- a/Flow.php
+++ b/Flow.php
@@ -132,6 +132,8 @@
 $wgHooks['CanonicalNamespaces'][] = 'FlowHooks::onCanonicalNamespaces';
 $wgHooks['MovePageIsValidMove'][] = 'FlowHooks::onMovePageIsValidMove';
 $wgHooks['AbortMove'][] = 'FlowHooks::onAbortMove';
+$wgHooks['TitleMove'][] = 'FlowHooks::onTitleMove';
+$wgHooks['TitleMoveComplete'][] = 'FlowHooks::onTitleMoveComplete';
 $wgHooks['TitleSquidURLs'][] = 'FlowHooks::onTitleSquidURLs';
 $wgHooks['WatchlistEditorBuildRemoveLine'][] = 
'FlowHooks::onWatchlistEditorBuildRemoveLine';
 $wgHooks['WatchlistEditorBeforeFormRender'][] = 
'FlowHooks::onWatchlistEditorBeforeFormRender';
@@ -343,7 +345,7 @@
 $wgFlowAbuseFilterEmergencyDisableAge = 86400; // One day.
 
 // Actions that must pass through to MediaWiki on flow enabled pages
-$wgFlowCoreActionWhitelist = array( 'info', 'protect', 'unprotect', 'unwatch', 
'watch', 'history', 'wikilove' );
+$wgFlowCoreActionWhitelist = array( 'info', 'protect', 'unprotect', 'unwatch', 
'watch', 'history', 'wikilove', 'move' );
 
 // When set to true Flow will compile templates into their intermediate forms
 // on every run.  When set to false Flow will use the versions already written
diff --git a/Hooks.php b/Hooks.php
index 8151b58..7e1daee 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1041,8 +1041,28 @@
}
 
public static function onMovePageIsValidMove( Title $oldTitle, Title 
$newTitle, Status $status ) {
-   if ( self::$occupationController-isTalkpageOccupied( $oldTitle 
) ) {
-   $status-fatal( 'flow-error-move' );
+   global $wgFlowOccupyNamespaces, $wgUser;
+
+   // We only care about moving flow boards
+   if ( $oldTitle-getContentModel() !== CONTENT_MODEL_FLOW_BOARD 
) {
+   return true;
+   }
+
+   // pages within the Topic namespace are not movable
+   if ( $oldTitle-getNamespace() === NS_TOPIC ) {
+   $status-fatal( 'flow-error-move-topic' );
+   return false;
+   }
+
+   $occupationController = self::getOccupationController();
+   if (
+   // If the destination is not already a valid flow 
location
+   !$occupationController-isTalkpageOccupied( $newTitle, 
false )
+   
+   // and the user is not allowed to create new flow boards
+   !$wgUser-isAllowed( 'flow-create-board' )
+   ) {
+   $status-fatal( 'flow-error-move-no-create-permissions' 
);
return false;
}
 
@@ -1328,4 +1348,29 @@
 
return true;
}
+
+   /**
+* Occurs at the begining of the MovePage process. Perhaps ContentModel 
should be
+* extended to be notified about moves explicitly.
+*/
+   public static function onTitleMove( Title $oldTitle, Title $newTitle, 
User $user ) {
+   if ( $oldTitle-getContentModel() === CONTENT_MODEL_FLOW_BOARD 
) {
+   // complete hack to make sure that when the page is 
saved to new
+   // location and rendered it doesn't throw an error 
about the wrong title
+   Container::get( 'factory.loader.workflow' 
)-pageMoveInProgress();
+   // open a database transaction and prepare everything 
for the move, but
+   // don't commit yet. That is done below in 
self::onTitleMoveComplete
+   Container::get( 'board_mover' )-prepareMove( 
$oldTitle, $newTitle );
+   }
+
+   return true;
+   }
+
+   public static function onTitleMoveComplete( Title $oldTitle, Title 
$newTitle, User $user, $pageid, $redirid, $reason ) {
+   if ( $newTitle-getContentModel() === CONTENT_MODEL_FLOW_BOARD 
) {
+   Container::get( 'board_mover' )-commit();
+   }
+
+   return true;
+   }
 }
diff --git a/autoload.php 

[MediaWiki-commits] [Gerrit] Disable mobile editor for entity pages - change (mediawiki...Wikibase)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Disable mobile editor for entity pages
..


Disable mobile editor for entity pages

The removed key prevents resource loader to load modules
for the mobile editor.

Bug: T95880
Change-Id: I52d28a825e02f9307a8a071877d1953f5739839a
---
M repo/Wikibase.hooks.php
M repo/Wikibase.php
2 files changed, 22 insertions(+), 0 deletions(-)

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



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index d64b774..97060e7 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -1178,4 +1178,25 @@
return true;
}
 
+   /**
+* Disable mobile editor for entity pages in Extension:MobileFrontend.
+* @see https://www.mediawiki.org/wiki/Extension:MobileFrontend
+*
+* @param Skin $skin
+* @param array $modules associative array of resource loader modules
+*
+* @return bool
+*/
+   public static function onSkinMinervaDefaultModules( Skin $skin, array 
$modules ) {
+   $title = $skin-getTitle();
+   $entityNamespaceLookup = 
WikibaseRepo::getDefaultInstance()-getEntityNamespaceLookup();
+
+   // remove the editor module so that it does not get loaded on 
entity pages
+   if ( $entityNamespaceLookup-isEntityNamespace( 
$title-getNamespace() ) ) {
+   unset( $modules['editor'] );
+   }
+
+   return true;
+   }
+
 }
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 5a73d8e..6509446 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -226,6 +226,7 @@
$wgHooks['ImportHandleRevisionXMLTag'][]= 
'Wikibase\RepoHooks::onImportHandleRevisionXMLTag';
$wgHooks['BaseTemplateToolbox'][]   = 
'Wikibase\RepoHooks::onBaseTemplateToolbox';
$wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 
'Wikibase\RepoHooks::onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink';
+   $wgHooks['SkinMinervaDefaultModules'][] = 
'Wikibase\RepoHooks::onSkinMinervaDefaultModules';
 
// update hooks
$wgHooks['LoadExtensionSchemaUpdates'][] = 
'\Wikibase\Repo\Store\Sql\ChangesSubscriptionSchemaUpdater::onSchemaUpdate';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52d28a825e02f9307a8a071877d1953f5739839a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Bene benestar.wikime...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update SSH pubkey for ebernhard...@wikimedia.org - change (operations/puppet)

2015-04-14 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Update SSH pubkey for ebernhard...@wikimedia.org
..


Update SSH pubkey for ebernhard...@wikimedia.org

Change-Id: If2ea82394e71bad55cc28a5913140b39a0233f61
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 875dc38..557d7af 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -570,7 +570,7 @@
 gid: 500
 name: ebernhardson
 realname: Erik Bernhardson
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDnafs6VPTCwrVEEqllEMpH6zhLreme1qGFuLxKD5uYQu2OJ01fhxICnswF7uuDrOSs5X9kTyj4zYjoGLHkEbucv3tBunEwYvzbrtRh+WxWkNjBNqhnUkM6T3IxOIpGlXwFxs6rD57i5ZtG2RPdRbOd+NYMjjkR/tELNSwuOfwi0vFeaumqhrbs5Q4XRqcdjPpMxE/BwqqAFA0SU/WeU5ewifF+FedAwYp5LRaeGmgWt0wuRnTjib8xxyyoH8ZJa79bYHK1CSWo4HU/EPsFdAgTWhrX59UQwOWTFOztQKU6zUc50bfh3cpv3wQ/4+VXFWG4J6XMdL4jLVxZwhCebYnf
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCw9RGPG974LGGgH43aZc6m0sWMbaTEaLlL91zNKzOazv0oQCuZKBlSv0SNoya1NXxK/c9XQBf4EoTaI1OLdgKr1sPA1xYHdm+aqnd3A7hT9suWctoH13sF0lq2gB+5FLvaRz0lBg8C0fHk3bLkB6XVWKedMu7Nshvtq/Si/ut+9cVSIyXk40PJgOGEUvmyi12w4MgdPKlPBbGiKBVh8/ehn1L3aloivyUdpckOqOstrP3KLfIn5AITjc4hZUM/OS0dYV0/XVOnNMHhL+IjHCBD9Ayf2NPGSCO5w7mXjXSQG21oVPIMyk4BuPgNMyf9ny3Iq0wZ1e+oTNcHFDRyag15
 ebernhard...@wikimedia.org]
 uid: 3088
   esanders:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2ea82394e71bad55cc28a5913140b39a0233f61
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 66c9d53..54afadf - change (mediawiki/extensions)

2015-04-14 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 66c9d53..54afadf
..


Syncronize VisualEditor: 66c9d53..54afadf

Change-Id: Iff6d5badaffc230d6c6e304c11fedcca78fae2ad
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 66c9d53..54afadf 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 66c9d538c504f5cd79061e869020768a0a2cf751
+Subproject commit 54afadf9d1b31c5ae979f593928aa6443c44d8a5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff6d5badaffc230d6c6e304c11fedcca78fae2ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Replace abstract functions that just throw with null - change (mediawiki...VisualEditor)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Replace abstract functions that just throw with null
..


Replace abstract functions that just throw with null

Per Timo, this avoids us having pointless code that is never
executed, and the replacement notification to the user (that
ve.blah.UnicornAnnotation.foo is null and not a method) is
sufficiently clear that the issue lies in the lack of existence
of the ve.blah.UnicornAnnotation#foo method.

Only ones in this repo appear to be in ve.init.mw.ApiResponseCache.

Bug: T54482
Change-Id: If44b8d63b8e7b2a5c289fe7278ad54e722b185fa
---
M modules/ve-mw/init/ve.init.mw.ApiResponseCache.js
1 file changed, 9 insertions(+), 6 deletions(-)

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



diff --git a/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js 
b/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js
index 6c3058f..ae29d29 100644
--- a/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js
+++ b/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js
@@ -83,12 +83,14 @@
 
/**
 * Fired when a new entry is added to the cache.
+*
 * @event add
 * @param {Object} entries Cache entries that were added. Object 
mapping names to data objects.
 */
 
/**
 * Add entries to the cache.
+*
 * @param {Object} entries Object keyed by page title, with the values 
being data objects
 * @fires add
 */
@@ -109,26 +111,27 @@
 
/**
 * Get an API request promise to deal with a list of titles
+*
 * @abstract
+* @method
 * @param subqueue
 * @return {jQuery.Promise}
 */
-   ve.init.mw.ApiResponseCache.prototype.getRequestPromise = function () {
-   throw new Error( 'Stub, override in subclass' );
-   };
+   ve.init.mw.ApiResponseCache.prototype.getRequestPromise = null;
 
/**
 * Process each page in the response of an API request
+*
 * @abstract
+* @method
 * @param {Object} page The page object
 * @return {Object|undefined} Any relevant info that we want to cache 
and return.
 */
-   ve.init.mw.ApiResponseCache.prototype.processPage = function () {
-   throw new Error( 'Stub, override in subclass' );
-   };
+   ve.init.mw.ApiResponseCache.prototype.processPage = null;
 
/**
 * Perform any scheduled API requests.
+*
 * @private
 * @fires add
 */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If44b8d63b8e7b2a5c289fe7278ad54e722b185fa
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@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] Don't use a inputFilter on LinkTargetInputWidget - change (VisualEditor/VisualEditor)

2015-04-14 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204077

Change subject: Don't use a inputFilter on LinkTargetInputWidget
..

Don't use a inputFilter on LinkTargetInputWidget

Fixes I4df99d2c1.

Input filters run on every change making it impossible to
type space at the end of a word, even if you intend to type
something else after it.

Apply the trim only to the annotation, and make sure we don't
reset the input value from the annotation if setValue is triggered
by a change event.

Bug: T94498
Change-Id: Ie01e0f4970757f2983eb3488be805f755f688291
(cherry picked from commit f696ef7da6874398a99bed138264800b70ea0aae)
---
M src/ui/widgets/ve.ui.LinkTargetInputWidget.js
1 file changed, 16 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/77/204077/1

diff --git a/src/ui/widgets/ve.ui.LinkTargetInputWidget.js 
b/src/ui/widgets/ve.ui.LinkTargetInputWidget.js
index e26a5e5..9d270c9 100644
--- a/src/ui/widgets/ve.ui.LinkTargetInputWidget.js
+++ b/src/ui/widgets/ve.ui.LinkTargetInputWidget.js
@@ -16,10 +16,7 @@
 ve.ui.LinkTargetInputWidget = function VeUiLinkTargetInputWidget( config ) {
// Parent constructor
OO.ui.TextInputWidget.call( this, $.extend( {
-   validate: 
/^(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi,
-   inputFilter: function ( target ) {
-   return target.trim();
-   }
+   validate: /^(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi
}, config ) );
 
// Properties
@@ -64,7 +61,7 @@
// If URL is external, flip to LTR. Otherwise, 
set back to RTL
widget.setRTL( !isExt );
}
-   widget.setValue( widget.$input.val() );
+   widget.setValue( widget.$input.val(), true );
} );
}
 };
@@ -76,8 +73,9 @@
  *
  * @method
  * @param {string} value New value
+ * @param {boolean} [fromInput] Value was generated from input element
  */
-ve.ui.LinkTargetInputWidget.prototype.setValue = function ( value ) {
+ve.ui.LinkTargetInputWidget.prototype.setValue = function ( value, fromInput ) 
{
// Keep annotation in sync with value
value = this.cleanUpValue( value );
if ( value === '' ) {
@@ -86,9 +84,9 @@
this.setAnnotation( new ve.dm.LinkAnnotation( {
type: 'link',
attributes: {
-   href: value
+   href: value.trim()
}
-   } ) );
+   } ), fromInput );
}
 
// Parent method
@@ -102,15 +100,20 @@
  *
  * @method
  * @param {ve.dm.LinkAnnotation} annotation Link annotation
+ * @param {boolean} [fromInput] Annotation was generated from input element 
value
  * @chainable
  */
-ve.ui.LinkTargetInputWidget.prototype.setAnnotation = function ( annotation ) {
+ve.ui.LinkTargetInputWidget.prototype.setAnnotation = function ( annotation, 
fromInput ) {
this.annotation = annotation;
 
-   // Parent method
-   OO.ui.TextInputWidget.prototype.setValue.call(
-   this, this.getTargetFromAnnotation( annotation )
-   );
+   // If this method was triggered by the user typing into the input, 
don't update
+   // the input element to avoid the cursor jumping as the user types
+   if ( !fromInput ) {
+   // Parent method
+   OO.ui.TextInputWidget.prototype.setValue.call(
+   this, this.getTargetFromAnnotation( annotation )
+   );
+   }
 
return this;
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie01e0f4970757f2983eb3488be805f755f688291
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.25wmf24
Gerrit-Owner: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] deprecate statsd meters - change (mediawiki...EventLogging)

2015-04-14 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: deprecate statsd meters
..


deprecate statsd meters

statsite doesn't support meters, switch to counters instead. This also means
that generated metrics lose their '.count' suffix.

Bug: T90111
Change-Id: I20e1da2c85379ee410786f2d4382f7de706e6017
---
M server/bin/eventlogging-reporter
M server/eventlogging/handlers.py
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/server/bin/eventlogging-reporter b/server/bin/eventlogging-reporter
index 6e41231..2962415 100755
--- a/server/bin/eventlogging-reporter
+++ b/server/bin/eventlogging-reporter
@@ -146,7 +146,7 @@
 os.read(fd, 8)
 for name, value in counts.iteritems():
 if value:
-stat = '%s.%s:%s|m' % (args.prefix, name, value)
+stat = '%s.%s:%s|c' % (args.prefix, name, value)
 sock.sendto(stat.encode('utf-8'), addr)
 counts.clear()
 except KeyboardInterrupt:
diff --git a/server/eventlogging/handlers.py b/server/eventlogging/handlers.py
index 5252001..892ce02 100644
--- a/server/eventlogging/handlers.py
+++ b/server/eventlogging/handlers.py
@@ -170,7 +170,7 @@
 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 while 1:
 event = (yield)
-stat = prefix + '.%(schema)s:1|m' % event
+stat = prefix + '.%(schema)s:1|c' % event
 sock.sendto(stat.encode('utf-8'), addr)
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I20e1da2c85379ee410786f2d4382f7de706e6017
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Nuria nu...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@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] Group1 wikis to 1.26wmf1 - change (operations/mediawiki-config)

2015-04-14 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204085

Change subject: Group1 wikis to 1.26wmf1
..

Group1 wikis to 1.26wmf1

Change-Id: I63f01de1476d63af8399ccd265b8cd939ba8d32f
---
M wikiversions.json
1 file changed, 595 insertions(+), 595 deletions(-)


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

diff --git a/wikiversions.json b/wikiversions.json
index b73c16e..e14c31a 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,890 +1,890 @@
 {
 aawiki: php-1.25wmf24,
-aawikibooks: php-1.25wmf24,
-aawiktionary: php-1.25wmf24,
+aawikibooks: php-1.26wmf1,
+aawiktionary: php-1.26wmf1,
 abwiki: php-1.25wmf24,
-abwiktionary: php-1.25wmf24,
+abwiktionary: php-1.26wmf1,
 acewiki: php-1.25wmf24,
-advisorywiki: php-1.25wmf24,
+advisorywiki: php-1.26wmf1,
 afwiki: php-1.25wmf24,
-afwikibooks: php-1.25wmf24,
-afwikiquote: php-1.25wmf24,
-afwiktionary: php-1.25wmf24,
+afwikibooks: php-1.26wmf1,
+afwikiquote: php-1.26wmf1,
+afwiktionary: php-1.26wmf1,
 akwiki: php-1.25wmf24,
-akwikibooks: php-1.25wmf24,
-akwiktionary: php-1.25wmf24,
+akwikibooks: php-1.26wmf1,
+akwiktionary: php-1.26wmf1,
 alswiki: php-1.25wmf24,
-alswikibooks: php-1.25wmf24,
-alswikiquote: php-1.25wmf24,
-alswiktionary: php-1.25wmf24,
+alswikibooks: php-1.26wmf1,
+alswikiquote: php-1.26wmf1,
+alswiktionary: php-1.26wmf1,
 amwiki: php-1.25wmf24,
-amwikiquote: php-1.25wmf24,
-amwiktionary: php-1.25wmf24,
+amwikiquote: php-1.26wmf1,
+amwiktionary: php-1.26wmf1,
 angwiki: php-1.25wmf24,
-angwikibooks: php-1.25wmf24,
-angwikiquote: php-1.25wmf24,
-angwikisource: php-1.25wmf24,
-angwiktionary: php-1.25wmf24,
+angwikibooks: php-1.26wmf1,
+angwikiquote: php-1.26wmf1,
+angwikisource: php-1.26wmf1,
+angwiktionary: php-1.26wmf1,
 anwiki: php-1.25wmf24,
-anwiktionary: php-1.25wmf24,
-arbcom_dewiki: php-1.25wmf24,
-arbcom_enwiki: php-1.25wmf24,
-arbcom_fiwiki: php-1.25wmf24,
-arbcom_nlwiki: php-1.25wmf24,
+anwiktionary: php-1.26wmf1,
+arbcom_dewiki: php-1.26wmf1,
+arbcom_enwiki: php-1.26wmf1,
+arbcom_fiwiki: php-1.26wmf1,
+arbcom_nlwiki: php-1.26wmf1,
 arcwiki: php-1.25wmf24,
 arwiki: php-1.25wmf24,
-arwikibooks: php-1.25wmf24,
-arwikimedia: php-1.25wmf24,
-arwikinews: php-1.25wmf24,
-arwikiquote: php-1.25wmf24,
-arwikisource: php-1.25wmf24,
-arwikiversity: php-1.25wmf24,
-arwiktionary: php-1.25wmf24,
+arwikibooks: php-1.26wmf1,
+arwikimedia: php-1.26wmf1,
+arwikinews: php-1.26wmf1,
+arwikiquote: php-1.26wmf1,
+arwikisource: php-1.26wmf1,
+arwikiversity: php-1.26wmf1,
+arwiktionary: php-1.26wmf1,
 arzwiki: php-1.25wmf24,
 astwiki: php-1.25wmf24,
-astwikibooks: php-1.25wmf24,
-astwikiquote: php-1.25wmf24,
-astwiktionary: php-1.25wmf24,
+astwikibooks: php-1.26wmf1,
+astwikiquote: php-1.26wmf1,
+astwiktionary: php-1.26wmf1,
 aswiki: php-1.25wmf24,
-aswikibooks: php-1.25wmf24,
-aswikisource: php-1.25wmf24,
-aswiktionary: php-1.25wmf24,
-auditcomwiki: php-1.25wmf24,
+aswikibooks: php-1.26wmf1,
+aswikisource: php-1.26wmf1,
+aswiktionary: php-1.26wmf1,
+auditcomwiki: php-1.26wmf1,
 avwiki: php-1.25wmf24,
-avwiktionary: php-1.25wmf24,
+avwiktionary: php-1.26wmf1,
 aywiki: php-1.25wmf24,
-aywikibooks: php-1.25wmf24,
-aywiktionary: php-1.25wmf24,
+aywikibooks: php-1.26wmf1,
+aywiktionary: php-1.26wmf1,
 azwiki: php-1.25wmf24,
-azwikibooks: php-1.25wmf24,
-azwikiquote: php-1.25wmf24,
-azwikisource: php-1.25wmf24,
-azwiktionary: php-1.25wmf24,
+azwikibooks: php-1.26wmf1,
+azwikiquote: php-1.26wmf1,
+azwikisource: php-1.26wmf1,
+azwiktionary: php-1.26wmf1,
 barwiki: php-1.25wmf24,
 bat_smgwiki: php-1.25wmf24,
 bawiki: php-1.25wmf24,
-bawikibooks: php-1.25wmf24,
+bawikibooks: php-1.26wmf1,
 bclwiki: php-1.25wmf24,
-bdwikimedia: php-1.25wmf24,
+bdwikimedia: php-1.26wmf1,
 be_x_oldwiki: php-1.25wmf24,
-betawikiversity: php-1.25wmf24,
+betawikiversity: php-1.26wmf1,
 bewiki: php-1.25wmf24,
-bewikibooks: php-1.25wmf24,
-bewikimedia: php-1.25wmf24,
-bewikiquote: php-1.25wmf24,
-bewikisource: php-1.25wmf24,
-bewiktionary: php-1.25wmf24,
+bewikibooks: php-1.26wmf1,
+bewikimedia: php-1.26wmf1,
+bewikiquote: php-1.26wmf1,
+bewikisource: php-1.26wmf1,
+bewiktionary: php-1.26wmf1,
 bgwiki: php-1.25wmf24,
-bgwikibooks: php-1.25wmf24,
-bgwikinews: php-1.25wmf24,
-bgwikiquote: php-1.25wmf24,
-bgwikisource: php-1.25wmf24,
-bgwiktionary: php-1.25wmf24,
+bgwikibooks: php-1.26wmf1,
+bgwikinews: 

[MediaWiki-commits] [Gerrit] Group1 wikis to 1.26wmf1 - change (operations/mediawiki-config)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Group1 wikis to 1.26wmf1
..


Group1 wikis to 1.26wmf1

Change-Id: I63f01de1476d63af8399ccd265b8cd939ba8d32f
---
M wikiversions.json
1 file changed, 595 insertions(+), 595 deletions(-)

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



diff --git a/wikiversions.json b/wikiversions.json
index b73c16e..e14c31a 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,890 +1,890 @@
 {
 aawiki: php-1.25wmf24,
-aawikibooks: php-1.25wmf24,
-aawiktionary: php-1.25wmf24,
+aawikibooks: php-1.26wmf1,
+aawiktionary: php-1.26wmf1,
 abwiki: php-1.25wmf24,
-abwiktionary: php-1.25wmf24,
+abwiktionary: php-1.26wmf1,
 acewiki: php-1.25wmf24,
-advisorywiki: php-1.25wmf24,
+advisorywiki: php-1.26wmf1,
 afwiki: php-1.25wmf24,
-afwikibooks: php-1.25wmf24,
-afwikiquote: php-1.25wmf24,
-afwiktionary: php-1.25wmf24,
+afwikibooks: php-1.26wmf1,
+afwikiquote: php-1.26wmf1,
+afwiktionary: php-1.26wmf1,
 akwiki: php-1.25wmf24,
-akwikibooks: php-1.25wmf24,
-akwiktionary: php-1.25wmf24,
+akwikibooks: php-1.26wmf1,
+akwiktionary: php-1.26wmf1,
 alswiki: php-1.25wmf24,
-alswikibooks: php-1.25wmf24,
-alswikiquote: php-1.25wmf24,
-alswiktionary: php-1.25wmf24,
+alswikibooks: php-1.26wmf1,
+alswikiquote: php-1.26wmf1,
+alswiktionary: php-1.26wmf1,
 amwiki: php-1.25wmf24,
-amwikiquote: php-1.25wmf24,
-amwiktionary: php-1.25wmf24,
+amwikiquote: php-1.26wmf1,
+amwiktionary: php-1.26wmf1,
 angwiki: php-1.25wmf24,
-angwikibooks: php-1.25wmf24,
-angwikiquote: php-1.25wmf24,
-angwikisource: php-1.25wmf24,
-angwiktionary: php-1.25wmf24,
+angwikibooks: php-1.26wmf1,
+angwikiquote: php-1.26wmf1,
+angwikisource: php-1.26wmf1,
+angwiktionary: php-1.26wmf1,
 anwiki: php-1.25wmf24,
-anwiktionary: php-1.25wmf24,
-arbcom_dewiki: php-1.25wmf24,
-arbcom_enwiki: php-1.25wmf24,
-arbcom_fiwiki: php-1.25wmf24,
-arbcom_nlwiki: php-1.25wmf24,
+anwiktionary: php-1.26wmf1,
+arbcom_dewiki: php-1.26wmf1,
+arbcom_enwiki: php-1.26wmf1,
+arbcom_fiwiki: php-1.26wmf1,
+arbcom_nlwiki: php-1.26wmf1,
 arcwiki: php-1.25wmf24,
 arwiki: php-1.25wmf24,
-arwikibooks: php-1.25wmf24,
-arwikimedia: php-1.25wmf24,
-arwikinews: php-1.25wmf24,
-arwikiquote: php-1.25wmf24,
-arwikisource: php-1.25wmf24,
-arwikiversity: php-1.25wmf24,
-arwiktionary: php-1.25wmf24,
+arwikibooks: php-1.26wmf1,
+arwikimedia: php-1.26wmf1,
+arwikinews: php-1.26wmf1,
+arwikiquote: php-1.26wmf1,
+arwikisource: php-1.26wmf1,
+arwikiversity: php-1.26wmf1,
+arwiktionary: php-1.26wmf1,
 arzwiki: php-1.25wmf24,
 astwiki: php-1.25wmf24,
-astwikibooks: php-1.25wmf24,
-astwikiquote: php-1.25wmf24,
-astwiktionary: php-1.25wmf24,
+astwikibooks: php-1.26wmf1,
+astwikiquote: php-1.26wmf1,
+astwiktionary: php-1.26wmf1,
 aswiki: php-1.25wmf24,
-aswikibooks: php-1.25wmf24,
-aswikisource: php-1.25wmf24,
-aswiktionary: php-1.25wmf24,
-auditcomwiki: php-1.25wmf24,
+aswikibooks: php-1.26wmf1,
+aswikisource: php-1.26wmf1,
+aswiktionary: php-1.26wmf1,
+auditcomwiki: php-1.26wmf1,
 avwiki: php-1.25wmf24,
-avwiktionary: php-1.25wmf24,
+avwiktionary: php-1.26wmf1,
 aywiki: php-1.25wmf24,
-aywikibooks: php-1.25wmf24,
-aywiktionary: php-1.25wmf24,
+aywikibooks: php-1.26wmf1,
+aywiktionary: php-1.26wmf1,
 azwiki: php-1.25wmf24,
-azwikibooks: php-1.25wmf24,
-azwikiquote: php-1.25wmf24,
-azwikisource: php-1.25wmf24,
-azwiktionary: php-1.25wmf24,
+azwikibooks: php-1.26wmf1,
+azwikiquote: php-1.26wmf1,
+azwikisource: php-1.26wmf1,
+azwiktionary: php-1.26wmf1,
 barwiki: php-1.25wmf24,
 bat_smgwiki: php-1.25wmf24,
 bawiki: php-1.25wmf24,
-bawikibooks: php-1.25wmf24,
+bawikibooks: php-1.26wmf1,
 bclwiki: php-1.25wmf24,
-bdwikimedia: php-1.25wmf24,
+bdwikimedia: php-1.26wmf1,
 be_x_oldwiki: php-1.25wmf24,
-betawikiversity: php-1.25wmf24,
+betawikiversity: php-1.26wmf1,
 bewiki: php-1.25wmf24,
-bewikibooks: php-1.25wmf24,
-bewikimedia: php-1.25wmf24,
-bewikiquote: php-1.25wmf24,
-bewikisource: php-1.25wmf24,
-bewiktionary: php-1.25wmf24,
+bewikibooks: php-1.26wmf1,
+bewikimedia: php-1.26wmf1,
+bewikiquote: php-1.26wmf1,
+bewikisource: php-1.26wmf1,
+bewiktionary: php-1.26wmf1,
 bgwiki: php-1.25wmf24,
-bgwikibooks: php-1.25wmf24,
-bgwikinews: php-1.25wmf24,
-bgwikiquote: php-1.25wmf24,
-bgwikisource: php-1.25wmf24,
-bgwiktionary: php-1.25wmf24,
+bgwikibooks: php-1.26wmf1,
+bgwikinews: php-1.26wmf1,
+bgwikiquote: php-1.26wmf1,
+bgwikisource: 

[MediaWiki-commits] [Gerrit] Don't ask for confirmation to leave the page when there is n... - change (mediawiki...Flow)

2015-04-14 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204056

Change subject: Don't ask for confirmation to leave the page when there is no 
unsaved modifications.
..

Don't ask for confirmation to leave the page when
there is no unsaved modifications.

IE8 does not support placeholder. It is simulated
using the value attribute. Before leaving the page,
a script compares the value of each textfield with
its default value to know if there is modifications.

With this change, a textfield is assumed to be
modified if its value is different than its
default value and different than its placeholder
attribute.

Bug: T95909
Change-Id: Ieedc5a1fbbfe18b7c6f60092ed6a2ab790c9be9d
---
M modules/engine/misc/mw-ui.enhance.js
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/56/204056/1

diff --git a/modules/engine/misc/mw-ui.enhance.js 
b/modules/engine/misc/mw-ui.enhance.js
index 3da4e70..43fdec3 100644
--- a/modules/engine/misc/mw-ui.enhance.js
+++ b/modules/engine/misc/mw-ui.enhance.js
@@ -429,10 +429,16 @@
 */
var _oldOnBeforeUnload = window.onbeforeunload;
window.onbeforeunload = function () {
-   var uncommitted;
+   var uncommitted,
+   hasValue, currentValue, defaultValue, placeholderText;
 
$( 'input, textarea' ).filter( '.mw-ui-input:visible' ).each( 
function () {
-   if ( $.trim( this.value )  this.value !== 
this.defaultValue ) {
+   hasValue = !!$.trim( this.value );
+   currentValue = this.value;
+   defaultValue = this.defaultValue;
+   placeholderText = $( this ).attr( 'placeholder' );
+
+   if ( hasValue  currentValue !== defaultValue  
currentValue !== placeholderText ) {
uncommitted = true;
return false;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieedc5a1fbbfe18b7c6f60092ed6a2ab790c9be9d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson sbis...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fixed bug in SpecialCheckResultPage, which prevents linking ... - change (mediawiki...WikidataQuality)

2015-04-14 Thread Soeren.oldag (Code Review)
Soeren.oldag has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204058

Change subject: Fixed bug in SpecialCheckResultPage, which prevents linking of 
EntityIdValues.
..

Fixed bug in SpecialCheckResultPage, which prevents linking of EntityIdValues.

Change-Id: I0479c147abfeb5c0fac8a9b3a99eff7865547047
---
M specials/SpecialCheckResultPage.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/58/204058/1

diff --git a/specials/SpecialCheckResultPage.php 
b/specials/SpecialCheckResultPage.php
index 0835616..fa718a9 100644
--- a/specials/SpecialCheckResultPage.php
+++ b/specials/SpecialCheckResultPage.php
@@ -8,6 +8,7 @@
 use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\EntityIdParsingException;
+use Wikibase\DataModel\Entity\EntityIdValue;
 
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0479c147abfeb5c0fac8a9b3a99eff7865547047
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Soeren.oldag soeren_ol...@freenet.de

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 95bffa2..66c9d53 - change (mediawiki/extensions)

2015-04-14 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204061

Change subject: Syncronize VisualEditor: 95bffa2..66c9d53
..

Syncronize VisualEditor: 95bffa2..66c9d53

Change-Id: Iade46e3ed39f3002cc8870bac82bb9faa2f18a42
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/61/204061/1

diff --git a/VisualEditor b/VisualEditor
index 95bffa2..66c9d53 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 95bffa22a0540186adaa5f52e653d4f603a77909
+Subproject commit 66c9d538c504f5cd79061e869020768a0a2cf751

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iade46e3ed39f3002cc8870bac82bb9faa2f18a42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 95bffa2..66c9d53 - change (mediawiki/extensions)

2015-04-14 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 95bffa2..66c9d53
..


Syncronize VisualEditor: 95bffa2..66c9d53

Change-Id: Iade46e3ed39f3002cc8870bac82bb9faa2f18a42
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 95bffa2..66c9d53 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 95bffa22a0540186adaa5f52e653d4f603a77909
+Subproject commit 66c9d538c504f5cd79061e869020768a0a2cf751

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iade46e3ed39f3002cc8870bac82bb9faa2f18a42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] added method getUserInGroups - change (mediawiki...BlueSpiceFoundation)

2015-04-14 Thread Tweichart (Code Review)
Tweichart has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204062

Change subject: added method getUserInGroups
..

added method getUserInGroups

Change-Id: Icf6952d1d991596a64736d19af81f73f49494b45
---
M includes/utility/GroupHelper.class.php
1 file changed, 21 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/62/204062/1

diff --git a/includes/utility/GroupHelper.class.php 
b/includes/utility/GroupHelper.class.php
index 5ee56c1..ec75b7f 100644
--- a/includes/utility/GroupHelper.class.php
+++ b/includes/utility/GroupHelper.class.php
@@ -140,5 +140,26 @@
 
return false;
}
+   
+   /**
+* Returns an array of User being in one or all groups given
+* @param mixed $aGroups
+* @return array Array of User objects
+*/
+   public static function getUserInGroups( $aGroups ) {
+   $dbr = wfGetDB( DB_SLAVE );
+   if ( !is_array( $aGroups ) ) {
+   $aGroups = array( $aGroups );
+   }
+   $aUser = array();
+   $res = $dbr-select( 'user_groups', array( 'ug_user' ), array( 
'ug_group' = $aGroups ), __METHOD__, array( 'DISTINCT' ) );
+   if ( !$res ) {
+   return $aUser;
+   }
+   while ( $row = $res-fetchObject() ) {
+   $aUser [] = User::newFromId( $row-ug_user );
+   }
+   return $aUser;
+   }
 
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf6952d1d991596a64736d19af81f73f49494b45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Tweichart weich...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] r::c::config::active_nodes - hiera cache::nodes - change (operations/puppet)

2015-04-14 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204068

Change subject: r::c::config::active_nodes - hiera cache::nodes
..

r::c::config::active_nodes - hiera cache::nodes

WIP! Not even remotely sane or tested yet!

Haven't even looked at the torrus fallout for this one...

Change-Id: I06f3fecf610524e14fd9256c9477931a735419b8
---
R hieradata/common/cache/nodes/bits.yaml
A hieradata/common/cache/nodes/misc.yaml
A hieradata/common/cache/nodes/mobile.yaml
A hieradata/common/cache/nodes/parsoid.yaml
R hieradata/common/cache/nodes/text.yaml
R hieradata/common/cache/nodes/upload.yaml
M hieradata/labs.yaml
A hieradata/role/common/cache.yaml
D hieradata/role/common/cache/misc.yaml
D hieradata/role/common/cache/mobile.yaml
D hieradata/role/common/cache/parsoid.yaml
M manifests/role/analytics/kafkatee.pp
M manifests/role/ipsec.pp
M modules/role/manifests/cache/configuration.pp
M modules/role/manifests/cache/mobile.pp
M modules/role/manifests/cache/parsoid.pp
M modules/role/manifests/cache/text.pp
M modules/role/manifests/cache/upload.pp
M templates/udp2log/filters.oxygen.erb
19 files changed, 84 insertions(+), 218 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/204068/1

diff --git a/hieradata/role/common/cache/bits.yaml 
b/hieradata/common/cache/nodes/bits.yaml
similarity index 69%
rename from hieradata/role/common/cache/bits.yaml
rename to hieradata/common/cache/nodes/bits.yaml
index 4dab273..49648d3 100644
--- a/hieradata/role/common/cache/bits.yaml
+++ b/hieradata/common/cache/nodes/bits.yaml
@@ -1,17 +1,15 @@
-cluster: cache_bits
-# data synced from manifests/role/cache.pp on 2015-04-08
-hosts_codfw: []
-hosts_eqiad:
+codfw: []
+eqiad:
   - 'cp1056.eqiad.wmnet'
   - 'cp1057.eqiad.wmnet'
   - 'cp1069.eqiad.wmnet'
   - 'cp1070.eqiad.wmnet'
-hosts_esams:
+esams:
   - 'cp3019.esams.wmnet'
   - 'cp3020.esams.wmnet'
   - 'cp3021.esams.wmnet'
   - 'cp3022.esams.wmnet'
-hosts_ulsfo:
+ulsfo:
   - 'cp4001.ulsfo.wmnet'
   - 'cp4002.ulsfo.wmnet'
   - 'cp4003.ulsfo.wmnet'
diff --git a/hieradata/common/cache/nodes/misc.yaml 
b/hieradata/common/cache/nodes/misc.yaml
new file mode 100644
index 000..38ea120
--- /dev/null
+++ b/hieradata/common/cache/nodes/misc.yaml
@@ -0,0 +1,3 @@
+eqiad:
+  - 'cp1043.eqiad.wmnet'
+  - 'cp1044.eqiad.wmnet'
diff --git a/hieradata/common/cache/nodes/mobile.yaml 
b/hieradata/common/cache/nodes/mobile.yaml
new file mode 100644
index 000..98a6d67
--- /dev/null
+++ b/hieradata/common/cache/nodes/mobile.yaml
@@ -0,0 +1,17 @@
+mobile:
+  codfw: []
+  eqiad:
+- 'cp1046.eqiad.wmnet'
+- 'cp1047.eqiad.wmnet'
+- 'cp1059.eqiad.wmnet'
+- 'cp1060.eqiad.wmnet'
+  esams:
+- 'cp3015.esams.wmnet'
+- 'cp3016.esams.wmnet'
+- 'cp3017.esams.wmnet'
+- 'cp3018.esams.wmnet'
+  ulsfo:
+- 'cp4011.ulsfo.wmnet'
+- 'cp4012.ulsfo.wmnet'
+- 'cp4019.ulsfo.wmnet'
+- 'cp4020.ulsfo.wmnet'
diff --git a/hieradata/common/cache/nodes/parsoid.yaml 
b/hieradata/common/cache/nodes/parsoid.yaml
new file mode 100644
index 000..cef3acc
--- /dev/null
+++ b/hieradata/common/cache/nodes/parsoid.yaml
@@ -0,0 +1,3 @@
+eqiad:
+  - 'cp1045.eqiad.wmnet'
+  - 'cp1058.eqiad.wmnet'
diff --git a/hieradata/role/common/cache/text.yaml 
b/hieradata/common/cache/nodes/text.yaml
similarity index 84%
rename from hieradata/role/common/cache/text.yaml
rename to hieradata/common/cache/nodes/text.yaml
index d94a3f4..543826d 100644
--- a/hieradata/role/common/cache/text.yaml
+++ b/hieradata/common/cache/nodes/text.yaml
@@ -1,7 +1,5 @@
-cluster: cache_text
-# data synced from manifests/role/cache.pp on 2015-04-08
-hosts_codfw: []
-hosts_eqiad:
+codfw: []
+eqiad:
   - 'cp1052.eqiad.wmnet'
   - 'cp1053.eqiad.wmnet'
   - 'cp1054.eqiad.wmnet'
@@ -10,7 +8,7 @@
   - 'cp1066.eqiad.wmnet'
   - 'cp1067.eqiad.wmnet'
   - 'cp1068.eqiad.wmnet'
-hosts_esams:
+esams:
   - 'cp3003.esams.wmnet'
   - 'cp3004.esams.wmnet'
   - 'cp3005.esams.wmnet'
@@ -27,7 +25,7 @@
   - 'cp3031.esams.wmnet'
   - 'cp3040.esams.wmnet'
   - 'cp3041.esams.wmnet'
-hosts_ulsfo:
+ulsfo:
   - 'cp4008.ulsfo.wmnet'
   - 'cp4009.ulsfo.wmnet'
   - 'cp4010.ulsfo.wmnet'
diff --git a/hieradata/role/common/cache/upload.yaml 
b/hieradata/common/cache/nodes/upload.yaml
similarity index 86%
rename from hieradata/role/common/cache/upload.yaml
rename to hieradata/common/cache/nodes/upload.yaml
index 1cf9c19..6b3dbf6 100644
--- a/hieradata/role/common/cache/upload.yaml
+++ b/hieradata/common/cache/nodes/upload.yaml
@@ -1,7 +1,5 @@
-cluster: cache_upload
-# data synced from manifests/role/cache.pp on 2015-04-08
-hosts_codfw: []
-hosts_eqiad:
+codfw: []
+eqiad:
   - 'cp1048.eqiad.wmnet'
   - 'cp1049.eqiad.wmnet'
   - 'cp1050.eqiad.wmnet'
@@ -14,7 +12,7 @@
   - 'cp1072.eqiad.wmnet'
   - 'cp1073.eqiad.wmnet'
   - 'cp1074.eqiad.wmnet'
-hosts_esams:
+esams:
   - 'cp3032.esams.wmnet'
   - 'cp3033.esams.wmnet'
   - 

[MediaWiki-commits] [Gerrit] Add i18n keys for placeholder strings in Add Campaign page - change (wikimedia/iegreview)

2015-04-14 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204069

Change subject: Add i18n keys for placeholder strings in Add Campaign page
..

Add i18n keys for placeholder strings in Add Campaign page

Change-Id: I5b14091c3f5abb07bff9d743156c117558d5cd7c
---
M data/i18n/en.json
M data/i18n/qqq.json
M data/templates/admin/campaign.html
3 files changed, 19 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/iegreview 
refs/changes/69/204069/1

diff --git a/data/i18n/en.json b/data/i18n/en.json
index 81005ee..38793d1 100644
--- a/data/i18n/en.json
+++ b/data/i18n/en.json
@@ -111,7 +111,12 @@
admin-new-campaign-in-progress: Cannot create a new campaign if one 
is already in progress. Please end the current campaign before starting a new 
one.,
admin-campaign-reviewers: Campaign reviewers:,
admin-campaign-question: Question $1:,
-   admin-campaign-question-placeholder: Add question text here,
+   admin-campaign-questionbody-placeholder: Add question text here,
+   admin-campaign-name-placeholder: Must be unique,
+   admin-campaign-date-placeholder: -MM-DD HH:MM:SS (UTC only),
+   admin-campaign-questiontitle-placeholder: Add question title here. 
For example: Criteria A: Innovation,
+   admin-campaign-questionfooter-placeholder: Add question footer 
string here,
+   admin-campaign-reporthead-placeholder: Aggregated report column 
header. For example: Innovation,
 
page-of-pages: Page $1 of $2,
no-results: No results found,
diff --git a/data/i18n/qqq.json b/data/i18n/qqq.json
index 736c41e..9c22523 100644
--- a/data/i18n/qqq.json
+++ b/data/i18n/qqq.json
@@ -47,7 +47,12 @@
admin-new-campaign-in-progress: Message shown to user when a new 
campaign creation fails because an exsting one is in progress,
admin-campaign-reviewers: Input label, followed by a checkbox group,
admin-campaign-question: Input label, followed by multi-line 
textarea. Parameters:\n* $1 - question number,
-   admin-campaign-question-placeholder: Placeholder text for a 
textarea,
+   admin-campaign-questionbody-placeholder: Placeholder text for a 
textarea,
+   admin-campaign-name-placeholder: Placeholder text for an input box,
+   admin-campaign-date-placeholder: Placeholder text for an input box,
+   admin-campaign-questiontitle-placeholder: Placeholder text for an 
input box,
+   admin-campaign-questionfooter-placeholder: Placeholder text for an 
input box,
+   admin-campaign-reporthead-placeholder: Placeholder text for an input 
box,
 
change-password: Navigation menu item, links to password change 
page.\n{{Identical|Change password}},
credits: Credits page heading,
diff --git a/data/templates/admin/campaign.html 
b/data/templates/admin/campaign.html
index 020acf1..878b9de 100644
--- a/data/templates/admin/campaign.html
+++ b/data/templates/admin/campaign.html
@@ -39,7 +39,7 @@
   {{ 'admin-campaign-new'|message }}
 /label
 div class=col-sm-6
-  input type=text class=form-control name=name id=name 
placeholder=Must be unique value={{ campaign.name }} required=required
+  input type=text class=form-control name=name id=name 
placeholder={{ 'admin-campaign-name-placeholder'|message }} value={{ 
campaign.name }} required=required
 /div
   /div
 
@@ -48,7 +48,7 @@
   {{ 'admin-campaign-start-date'|message }}
 /label
 div class=col-sm-6
-  input type=date class=form-control name=start_date 
id=start_date placeholder=-MM-DD HH:MM:SS (UTC only) value={{ 
campaign.start_date }} required=required
+  input type=date class=form-control name=start_date 
id=start_date placeholder={{ 'admin-campaign-date-placeholder'|message }} 
value={{ campaign.start_date }} required=required
 /div
   /div
 
@@ -57,7 +57,7 @@
   {{ 'admin-campaign-end-date'|message }}
 /label
 div class=col-sm-6
-  input type=date class=form-control name=end_date id=end_date 
placeholder=-MM-DD HH:MM:SS (UTC only) value={{ campaign.end_date }} 
required=required
+  input type=date class=form-control name=end_date id=end_date 
placeholder={{ 'admin-campaign-date-placeholder'|message }} value={{ 
campaign.end_date }} required=required
 /div
   /div
 
@@ -67,16 +67,16 @@
   {{ 'admin-campaign-question'|message( loop.index ) }}
 /label
 div class=col-sm-10 {{ qtitles[#{row.id}] in errors ? 'has-error' }}
-  input type=text class=form-control name=qtitles[{{ row.id }}] 
value={{ row.question_title }} placeholder=Add question title here required
+  input type=text class=form-control name=qtitles[{{ row.id }}] 
value={{ row.question_title }} placeholder={{ 
'admin-campaign-questiontitle-placeholder'|message }} required
 /div
 div class=col-sm-10 col-sm-offset-2 {{ questions[#{row.id}] in errors 
? 'has-error' }}
-  

[MediaWiki-commits] [Gerrit] LocalRenameUserJob: Pass session info onto LocalPageMoveJob - change (mediawiki...CentralAuth)

2015-04-14 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204073

Change subject: LocalRenameUserJob: Pass session info onto LocalPageMoveJob
..

LocalRenameUserJob: Pass session info onto LocalPageMoveJob

Change-Id: I787a9d936a717577caec875fd2568cf58f1d9f98
---
M includes/LocalRenameJob/LocalPageMoveJob.php
M includes/LocalRenameJob/LocalRenameUserJob.php
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/73/204073/1

diff --git a/includes/LocalRenameJob/LocalPageMoveJob.php 
b/includes/LocalRenameJob/LocalPageMoveJob.php
index 8d94db1..632f963 100644
--- a/includes/LocalRenameJob/LocalPageMoveJob.php
+++ b/includes/LocalRenameJob/LocalPageMoveJob.php
@@ -22,6 +22,9 @@
}
 
public function run() {
+   if ( isset( $this-params['session'] ) ) {
+   $callback = RequestContext::importScopedSession( 
$this-params['session'] );
+   }
$this-user = User::newFromName( $this-params['renamer'] );
foreach ( $this-params['pages'] as $current = $target ) {
$this-movePage(
diff --git a/includes/LocalRenameJob/LocalRenameUserJob.php 
b/includes/LocalRenameJob/LocalRenameUserJob.php
index f6f8255..dd4a583 100644
--- a/includes/LocalRenameJob/LocalRenameUserJob.php
+++ b/includes/LocalRenameJob/LocalRenameUserJob.php
@@ -115,6 +115,9 @@
'renamer' = $this-getRenameUser()-getName(),
'suppressredirects' = 
$this-params['suppressredirects'],
);
+   if ( isset( $this-params['session'] ) ) {
+   $jobParams['session'] = $this-params['session'];
+   }
$jobs = array();
 
foreach ( $rows as $row ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I787a9d936a717577caec875fd2568cf58f1d9f98
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
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] Make use of EntityPrefetcher in dumps, wbgetentities - change (mediawiki...Wikibase)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make use of EntityPrefetcher in dumps, wbgetentities
..


Make use of EntityPrefetcher in dumps, wbgetentities

And implement a NullEntityPrefetcher for usage in places
we don't need to actually do any prefetching.

Change-Id: Idb2e36a1fe255334253005f6d6416e26aacb940e
---
M client/includes/store/ClientStore.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/MockClientStore.php
M client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
A lib/includes/store/NullEntityPrefetcher.php
M repo/includes/Dumpers/DumpGenerator.php
M repo/includes/Dumpers/JsonDumpGenerator.php
M repo/includes/Dumpers/RdfDumpGenerator.php
M repo/includes/api/GetEntities.php
M repo/includes/store/Store.php
M repo/includes/store/sql/SqlStore.php
M repo/maintenance/dumpJson.php
M repo/maintenance/dumpRdf.php
M repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
M repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
15 files changed, 165 insertions(+), 21 deletions(-)

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



diff --git a/client/includes/store/ClientStore.php 
b/client/includes/store/ClientStore.php
index 5ab3f1c..bf63616 100644
--- a/client/includes/store/ClientStore.php
+++ b/client/includes/store/ClientStore.php
@@ -113,4 +113,14 @@
 * @since 0.2
 */
public function rebuild();
+
+   /**
+* Returns an EntityPrefetcher which can be used to prefetch a list of 
entity
+* ids in case we need to for example load a batch of entity ids.
+*
+* @since 0.5
+*
+* @return EntityPrefetcher
+*/
+   public function getEntityPrefetcher();
 }
diff --git a/client/includes/store/sql/DirectSqlStore.php 
b/client/includes/store/sql/DirectSqlStore.php
index ac7d5c5..dbbf3f4 100644
--- a/client/includes/store/sql/DirectSqlStore.php
+++ b/client/includes/store/sql/DirectSqlStore.php
@@ -144,6 +144,11 @@
private $subscriptionManager = null;
 
/**
+* @var PrefetchingWikiPageEntityMetaDataAccessor|null
+*/
+   private $entityPrefetcher = null;
+
+   /**
 * @var string
 */
private $siteId;
@@ -315,10 +320,7 @@
// NOTE: Keep cache key in sync with 
SqlStore::newEntityRevisionLookup in WikibaseRepo
$cacheKeyPrefix = $this-cacheKeyPrefix . 
':WikiPageEntityRevisionLookup';
 
-   $metaDataFetcher = new 
PrefetchingWikiPageEntityMetaDataAccessor(
-   new WikiPageEntityMetaDataLookup( 
$this-entityIdParser, $this-repoWiki )
-   );
-
+   $metaDataFetcher = $this-getEntityPrefetcher();
$rawLookup = new WikiPageEntityRevisionLookup(
$this-contentCodec,
$metaDataFetcher,
@@ -451,4 +453,16 @@
return $this-propertyInfoTable;
}
 
+   /**
+* @return PrefetchingWikiPageEntityMetaDataAccessor
+*/
+   public function getEntityPrefetcher() {
+   if ( $this-entityPrefetcher === null ) {
+   $this-entityPrefetcher = new 
PrefetchingWikiPageEntityMetaDataAccessor(
+   new WikiPageEntityMetaDataLookup( 
$this-entityIdParser )
+   );
+   }
+
+   return $this-entityPrefetcher;
+   }
 }
diff --git a/client/tests/phpunit/MockClientStore.php 
b/client/tests/phpunit/MockClientStore.php
index 6705537..a6aaa73 100644
--- a/client/tests/phpunit/MockClientStore.php
+++ b/client/tests/phpunit/MockClientStore.php
@@ -11,6 +11,7 @@
 use Wikibase\ClientStore;
 use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\Lib\Store\EntityRevisionLookup;
+use Wikibase\Lib\Store\NullEntityPrefetcher;
 use Wikibase\Lib\Store\SiteLinkLookup;
 use Wikibase\PropertyInfoStore;
 use Wikibase\PropertyLabelResolver;
@@ -177,4 +178,13 @@
return self::$propertyInfoStore;
}
 
+   /**
+* @see ClientStore::getEntityPrefetcher
+*
+* @return EntityPrefetcher
+*/
+   public function getEntityPrefetcher() {
+   return new NullEntityPrefetcher();
+   }
+
 }
diff --git a/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php 
b/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
index 7fa41fa..fc54f4f 100644
--- a/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
+++ b/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
@@ -54,6 +54,7 @@
array( 'getUsageLookup', 
'Wikibase\Client\Usage\UsageLookup' ),
array( 'getSubscriptionManager', 
'Wikibase\Client\Usage\SubscriptionManager' ),
array( 'getEntityIdLookup', 
'Wikibase\Store\EntityIdLookup' ),
+  

[MediaWiki-commits] [Gerrit] Ignore capitalization for label and description conflicts. - change (mediawiki...Wikibase)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Ignore capitalization for label and description conflicts.
..


Ignore capitalization for label and description conflicts.

DEPLOY: This is technically a breaking change, and may even affect some
existing pairs of items (which should probably be merged). Problems
should be rare, but the issue should still be announced.

Bug: T73785
Change-Id: I4a1a984648cd63b7bec220bfb4b739fd4b4fb579
---
M lib/includes/store/sql/TermSqlIndex.php
M lib/tests/phpunit/store/TermIndexTest.php
2 files changed, 23 insertions(+), 2 deletions(-)

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



diff --git a/lib/includes/store/sql/TermSqlIndex.php 
b/lib/includes/store/sql/TermSqlIndex.php
index 345742a..fd4fff2 100644
--- a/lib/includes/store/sql/TermSqlIndex.php
+++ b/lib/includes/store/sql/TermSqlIndex.php
@@ -828,6 +828,7 @@
$entityType,
array(
'LIMIT' = $this-maxConflicts,
+   'caseSensitive' = false
)
);
 
@@ -886,8 +887,8 @@
 
$matchConditions = array(
'L.term_language' = $lang,
-   'L.term_text' = $label,
-   'D.term_text' = $description,
+   'L.term_search_key' = $this-getSearchKey( 
$label, $lang ),
+   'D.term_search_key' = $this-getSearchKey( 
$description, $lang )
);
 
$termConditions[] = $dbr-makeList( $matchConditions, 
LIST_AND );
diff --git a/lib/tests/phpunit/store/TermIndexTest.php 
b/lib/tests/phpunit/store/TermIndexTest.php
index 0155d1d..4090b3b 100644
--- a/lib/tests/phpunit/store/TermIndexTest.php
+++ b/lib/tests/phpunit/store/TermIndexTest.php
@@ -389,6 +389,12 @@
array( 'de' = 'Foo' ),
array( 'P6' ),
),
+   'by label, different case' = array(
+   $entities,
+   Property::ENTITY_TYPE,
+   array( 'de' = 'fOO' ),
+   array( 'P6' ),
+   ),
'by label mismatch' = array(
$entities,
Item::ENTITY_TYPE,
@@ -446,6 +452,20 @@
array( 'de' = 'Bar' ),
array( 'Q1' ),
),
+   'by label and description, different label 
capitalization' = array(
+   $entities,
+   Item::ENTITY_TYPE,
+   array( 'de' = 'fOO' ),
+   array( 'de' = 'Bar' ),
+   array( 'Q1' ),
+   ),
+   'by label and description, different description 
capitalization' = array(
+   $entities,
+   Item::ENTITY_TYPE,
+   array( 'de' = 'Foo' ),
+   array( 'de' = 'bAR' ),
+   array( 'Q1' ),
+   ),
'two languages for label and description' = array(
$entities,
Item::ENTITY_TYPE,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a1a984648cd63b7bec220bfb4b739fd4b4fb579
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Bene benestar.wikime...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Bene benestar.wikime...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (bc37479) - change (mediawiki...VisualEditor)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update VE core submodule to master (bc37479)
..


Update VE core submodule to master (bc37479)

New changes:
eab6467 Add ve.dm.Document#getLength
310a040 ve.ui.Tool: Correct documentation
7a64825 Localisation updates from https://translatewiki.net.
d025658 ve.utils: Add ve.binarySearch() and port ve.dm.MetaList#findItem to it
8400efd demo: Fix another bug showing both LTR and RTL stylesheets
d3168f3 Factor out method which fills paste target with dummy contents for copy
363c804 Remove platform auto-instantiation
67ac409 Improve demo read mode
c2588bd Replace abstract functions that just throw with null
9073b6b Add docs for ve.ui.ContextItem#embeddable

Change-Id: I41b0ec10e0c085290944e8c3293bcad5e956e909
---
M .jsduck/eg-iframe.html
M lib/ve
2 files changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index 08ea270..61d3c78 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -4,10 +4,7 @@
meta charset=utf-8
titleVisualEditor Example/title
 
-   !-- visualEditor.standalone.read --
-   link rel=stylesheet 
href=lib/ve/src/init/sa/styles/ve.init.sa.css
-
-   !-- oojs-ui-apex --
+   !-- oojs-ui-apex --
link rel=stylesheet 
href=lib/ve/lib/oojs-ui/oojs-ui-apex.vector.css
link rel=stylesheet 
href=lib/ve/lib/oojs-ui/oojs-ui-apex-icons-editing-core.vector.css
 
diff --git a/lib/ve b/lib/ve
index 8c5917f..bc37479 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit 8c5917fa2b6c4e8c95162131c733648e36469e74
+Subproject commit bc37479d47a3d9d1fe71e45b3f8c327ae919e737

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41b0ec10e0c085290944e8c3293bcad5e956e909
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@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] Syncronize VisualEditor: 66c9d53..54afadf - change (mediawiki/extensions)

2015-04-14 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204076

Change subject: Syncronize VisualEditor: 66c9d53..54afadf
..

Syncronize VisualEditor: 66c9d53..54afadf

Change-Id: Iff6d5badaffc230d6c6e304c11fedcca78fae2ad
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/76/204076/1

diff --git a/VisualEditor b/VisualEditor
index 66c9d53..54afadf 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 66c9d538c504f5cd79061e869020768a0a2cf751
+Subproject commit 54afadf9d1b31c5ae979f593928aa6443c44d8a5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff6d5badaffc230d6c6e304c11fedcca78fae2ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] setting up labcontrol1001 mgmt dns - change (operations/dns)

2015-04-14 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: setting up labcontrol1001 mgmt dns
..


setting up labcontrol1001 mgmt dns

old search box is now labcontrol1001

Bug:T96048
Change-Id: I2de6ab08188db29d0cce84a1a0a1e4295432b573
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 00d15f8..d0b2b5d 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2320,7 +2320,7 @@
 22  1H  IN PTR  wmf3154.mgmt.eqiad.wmnet.
 23  1H  IN PTR  search1023.mgmt.eqiad.wmnet.
 23  1H  IN PTR  wmf3153.mgmt.eqiad.wmnet.
-24  1H  IN PTR  search1024.mgmt.eqiad.wmnet.
+24  1H  IN PTR  labcontrol1001.mgmt.eqiad.wmnet.
 24  1H  IN PTR  wmf3152.mgmt.eqiad.wmnet.
 25  1H  IN PTR wmf3542.mgmt.eqiad.wmnet.
 26  1H  IN PTR wmf3543.mgmt.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 1d13220..01f5e36 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -1723,6 +1723,7 @@
 WMF3155 1H  IN A10.65.7.21
 WMF3154 1H  IN A10.65.7.22
 WMF3153 1H  IN A10.65.7.23
+labcontrol1001  1H  IN A10.65.7.24
 WMF3152 1H  IN A10.65.7.24
 WMF3542 1H A10.65.7.25
 WMF3543 1H A10.65.7.26

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2de6ab08188db29d0cce84a1a0a1e4295432b573
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: RobH r...@wikimedia.org
Gerrit-Reviewer: RobH r...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Don't wipe out all the minerva specific styles - change (mediawiki...Gather)

2015-04-14 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204086

Change subject: Don't wipe out all the minerva specific styles
..

Don't wipe out all the minerva specific styles

Bug: T96011
Change-Id: I43c5bccd93be68df12d4dba3b5f0e45c77317263
---
M resources/Resources.php
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/86/204086/1

diff --git a/resources/Resources.php b/resources/Resources.php
index a1f6385..99af7e8 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -299,10 +299,8 @@
),
 );
 
-$wgResourceModuleSkinStyles['minerva'] = 
$wgGatherMobileSpecialPageResourceBoilerplate + array(
-   'ext.gather.styles' = array(
-   'ext.gather.styles/minerva.less',
-   ),
+$wgResourceModuleSkinStyles['minerva']['ext.gather.styles'] = 
$wgGatherMobileSpecialPageResourceBoilerplate + array(
+   'ext.gather.styles/minerva.less',
 );
 
 unset( $wgGatherResourceFileModuleBoilerplate );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43c5bccd93be68df12d4dba3b5f0e45c77317263
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] disable customer account creation in OTRS for phab T96023 - change (operations/puppet)

2015-04-14 Thread Jgreen (Code Review)
Jgreen has submitted this change and it was merged.

Change subject: disable customer account creation in OTRS for phab T96023
..


disable customer account creation in OTRS for phab T96023

Change-Id: I9590e8ed9d7eecb9e594850597bc65fff440bada
---
M templates/apache/sites/ticket.wikimedia.org.erb
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Jgreen: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/apache/sites/ticket.wikimedia.org.erb 
b/templates/apache/sites/ticket.wikimedia.org.erb
index 414f1d9..0280934 100644
--- a/templates/apache/sites/ticket.wikimedia.org.erb
+++ b/templates/apache/sites/ticket.wikimedia.org.erb
@@ -97,6 +97,7 @@
 RewriteRule ^/otrs$ /otrs/index.pl [R=301]
 RewriteRule ^/otrs/$ /otrs/index.pl [R=301]
 RewriteRule ^/$ /otrs/index.pl [R=301]
+RewriteRule /customer.pl /otrs/index.pl [R=301,L]
 
 # Fix incorrect TicketID links (common on Wikipedia)
 RewriteCond %{QUERY_STRING} 
^Action=AgentTicketZoom\TicketID=(200[0-9]{13})$

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9590e8ed9d7eecb9e594850597bc65fff440bada
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: Jgreen jgr...@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] Don't ask for confirmation to leave the page when there is n... - change (mediawiki...Flow)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't ask for confirmation to leave the page when there is no 
unsaved modifications.
..


Don't ask for confirmation to leave the page when
there is no unsaved modifications.

IE8 does not support placeholder. It is simulated
using the value attribute. Before leaving the page,
a script compares the value of each textfield with
its default value to know if there is modifications.

With this change, a textfield is assumed to be
modified if its value is different than its
default value and different than its placeholder
attribute.

Bug: T95909
Change-Id: Ieedc5a1fbbfe18b7c6f60092ed6a2ab790c9be9d
---
M modules/engine/misc/mw-ui.enhance.js
1 file changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/modules/engine/misc/mw-ui.enhance.js 
b/modules/engine/misc/mw-ui.enhance.js
index 3da4e70..43fdec3 100644
--- a/modules/engine/misc/mw-ui.enhance.js
+++ b/modules/engine/misc/mw-ui.enhance.js
@@ -429,10 +429,16 @@
 */
var _oldOnBeforeUnload = window.onbeforeunload;
window.onbeforeunload = function () {
-   var uncommitted;
+   var uncommitted,
+   hasValue, currentValue, defaultValue, placeholderText;
 
$( 'input, textarea' ).filter( '.mw-ui-input:visible' ).each( 
function () {
-   if ( $.trim( this.value )  this.value !== 
this.defaultValue ) {
+   hasValue = !!$.trim( this.value );
+   currentValue = this.value;
+   defaultValue = this.defaultValue;
+   placeholderText = $( this ).attr( 'placeholder' );
+
+   if ( hasValue  currentValue !== defaultValue  
currentValue !== placeholderText ) {
uncommitted = true;
return false;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieedc5a1fbbfe18b7c6f60092ed6a2ab790c9be9d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson sbis...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Autocreate some local accounts when global account is created - change (mediawiki...CentralAuth)

2015-04-14 Thread Code Review
Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204059

Change subject: Autocreate some local accounts when global account is created
..

Autocreate some local accounts when global account is created

Add $wgCentralAuthAutoCreateWikis site config option;
run a job on global account creation to create an attached
local account on all listed wikis.

Bug: T74469
Bug: T94885
Change-Id: I3937b9e6d0df1ef608d64388167a3b37a3ea5de3
---
M CentralAuth.php
M includes/CentralAuthPlugin.php
A includes/CreateLocalAccountJob.php
3 files changed, 117 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/59/204059/1

diff --git a/CentralAuth.php b/CentralAuth.php
index a5e9b1e..13089cf 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -134,6 +134,16 @@
 $wgCentralAuthAutoLoginWikis = array();
 
 /**
+ * List of wiki IDs on which an attached local account should be created 
automatically when the
+ * global account is created.
+ *
+ * The wiki ID is typically the database name, except when table prefixes are
+ * used, in which case it is the database name, a hyphen separator, and then
+ * the table prefix.
+ */
+$wgCentralAuthAutoCreateWikis = array();
+
+/**
  * Local filesystem path to the icon returned by Special:CentralAutoLogin
  * Should be a 20x20px PNG.
  */
@@ -275,6 +285,7 @@
 $wgAutoloadClasses['CentralAuthPlugin'] = 
$caBase/includes/CentralAuthPlugin.php;
 $wgAutoloadClasses['CentralAuthHooks'] = 
$caBase/includes/CentralAuthHooks.php;
 $wgAutoloadClasses['CentralAuthSuppressUserJob'] = 
$caBase/includes/SuppressUserJob.php;
+$wgAutoloadClasses['CentralAuthCreateLocalAccountJob'] = 
$caBase/includes/CreateLocalAccountJob.php;
 $wgAutoloadClasses['WikiSet'] = $caBase/includes/WikiSet.php;
 $wgAutoloadClasses['SpecialCentralAutoLogin'] = 
$caBase/includes/specials/SpecialCentralAutoLogin.php;
 $wgAutoloadClasses['CentralAuthUserArray'] = 
$caBase/includes/CentralAuthUserArray.php;
@@ -335,6 +346,7 @@
 $wgJobClasses['LocalRenameUserJob'] = 'LocalRenameUserJob';
 $wgJobClasses['LocalUserMergeJob'] = 'LocalUserMergeJob';
 $wgJobClasses['LocalPageMoveJob'] = 'LocalPageMoveJob';
+$wgJobClasses['CentralAuthCreateLocalAccountJob'] = 
'CentralAuthCreateLocalAccountJob';
 
 $wgHooks['SetupAfterCache'][] = 'CentralAuthHooks::onSetupAfterCache';
 $wgHooks['AuthPluginSetup'][] = 'CentralAuthHooks::onAuthPluginSetup';
diff --git a/includes/CentralAuthPlugin.php b/includes/CentralAuthPlugin.php
index fb903a9..5a893bd 100644
--- a/includes/CentralAuthPlugin.php
+++ b/includes/CentralAuthPlugin.php
@@ -270,6 +270,7 @@
// @fixme is this even vaguely reliable? pah
$central-register( $password, $email );
$central-attach( wfWikiID(), 'new' );
+   $this-autoCreateAccounts( $central );
}
// Note: If $wgCentralAuthPreventUnattached is enabled,
// accounts where a global does not exist, but there are
@@ -326,4 +327,27 @@
public function getUserInstance( User $user ) {
return CentralAuthUser::getInstance( $user );
}
+
+   /**
+* Sets up jobs to create and attach a local account for the given user 
on every wiki listed in
+* $wgCentralAuthAutoCreateWikis.
+* @param CentralAuthUser $centralUser
+*/
+   private function autoCreateAccounts( CentralAuthUser $centralUser ) {
+   global $wgCentralAuthAutoCreateWikis;
+
+   $name = $centralUser-getName();
+   $thisWiki = wfWikiID();
+   foreach ( $wgCentralAuthAutoCreateWikis as $wiki ) {
+   if ( $wiki === $thisWiki ) {
+   continue;
+   }
+   $job = Job::factory(
+   'CentralAuthCreateLocalAccountJob',
+   Title::makeTitleSafe( NS_USER, $name ),
+   array( 'name' = $name, 'from' = $thisWiki )
+   );
+   JobQueueGroup::singleton( $wiki )-push( $job );
+   }
+   }
 }
diff --git a/includes/CreateLocalAccountJob.php 
b/includes/CreateLocalAccountJob.php
new file mode 100644
index 000..6ca07e5
--- /dev/null
+++ b/includes/CreateLocalAccountJob.php
@@ -0,0 +1,81 @@
+?php
+
+/**
+ * Creates a local account and connects it to the global account.
+ * Used to ensure that all users have an attached local account on certain 
wikis which have some
+ * special central role (such as $wgMWOAuthCentralWiki for the OAuth 
extension).
+ * @see $wgCentralAuthAutoCreateWikis
+ */
+class CentralAuthCreateLocalAccountJob extends Job {
+   /**
+* @param Title $title Not used
+* @param 

[MediaWiki-commits] [Gerrit] Update CentralAuth to 1.26wmf1 HEAD - change (mediawiki/core)

2015-04-14 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204064

Change subject: Update CentralAuth to 1.26wmf1 HEAD
..

Update CentralAuth to 1.26wmf1 HEAD

Change-Id: I89576e8c1b354a7fe2d4a4d9760b43541cfc8064
---
M extensions/CentralAuth
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/204064/1

diff --git a/extensions/CentralAuth b/extensions/CentralAuth
index 19a7f94..d9bf7ea 16
--- a/extensions/CentralAuth
+++ b/extensions/CentralAuth
-Subproject commit 19a7f94c78a8ac5b53398f9bed431fd3ef4c28a2
+Subproject commit d9bf7ea45adc4c7cd5e35ceaa1c05b59dcfac687

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89576e8c1b354a7fe2d4a4d9760b43541cfc8064
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf1
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] Switch update from java built to string replaced - change (wikidata...rdf)

2015-04-14 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204074

Change subject: Switch update from java built to string replaced
..

Switch update from java built to string replaced

This should make them easier to read and modify.

Change-Id: I2a50b6b7a17a5cb6bdb5f62829076a4d3c67131b
---
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.java
A tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.sync.sparql
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/UpdateBuilder.java
M 
tools/src/test/java/org/wikidata/query/rdf/tool/rdf/RdfRepositoryIntegrationTest.java
4 files changed, 214 insertions(+), 246 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/74/204074/1

diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.java
index 2c6f75b..ab85823 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.java
@@ -1,9 +1,12 @@
 package org.wikidata.query.rdf.tool.rdf;
 
+import static com.google.common.io.Resources.getResource;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.net.URI;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
@@ -43,9 +46,11 @@
 import org.wikidata.query.rdf.common.uri.SchemaDotOrg;
 import org.wikidata.query.rdf.common.uri.WikibaseUris;
 import org.wikidata.query.rdf.tool.exception.ContainedException;
+import org.wikidata.query.rdf.tool.exception.FatalException;
 
 import com.google.common.base.Charsets;
 import com.google.common.io.CharStreams;
+import com.google.common.io.Resources;
 
 public class RdfRepository {
 private static final Logger log = 
LoggerFactory.getLogger(RdfRepository.class);
@@ -54,10 +59,17 @@
 .build();
 private final URI uri;
 private final WikibaseUris uris;
+private final String syncBody;
 
 public RdfRepository(URI uri, WikibaseUris uris) {
 this.uri = uri;
 this.uris = uris;
+URL syncBodyUrl = getResource(RdfRepository.class, 
RdfRepository.sync.sparql);
+try {
+syncBody = Resources.toString(syncBodyUrl, Charsets.UTF_8);
+} catch (IOException e) {
+throw new FatalException(Can't load  + syncBodyUrl);
+}
 }
 
 /**
@@ -76,101 +88,17 @@
 public int sync(String entityId, CollectionStatement statements) {
 // TODO this is becoming a mess too
 log.debug(Updating data for {}, entityId);
-String entity = entity: + entityId;
-UpdateBuilder siteLinksBuilder = updateBuilder();
-siteLinksBuilder.prefix(schema, SchemaDotOrg.NAMESPACE);
-siteLinksBuilder.delete(?s, ?p, ?o);
-siteLinksBuilder.where(?s, schema:about, entity: + entityId);
-siteLinksBuilder.where(?s, ?p, ?o);
-if (!statements.isEmpty()) {
-siteLinksBuilder.where().notExists().values(statements, ?s, 
?p, ?o);
-}
+UpdateBuilder b = new UpdateBuilder(syncBody);
+b.bindUri(entity:id, uris.entity() + entityId);
+b.bindUri(schema:about, SchemaDotOrg.ABOUT);
+b.bindUri(prov:wasDerivedFrom, Provenance.WAS_DERIVED_FROM);
+b.bind(uris.value, uris.value());
+b.bind(uris.statement, uris.statement());
+b.bindStatements(insertStatements, statements);
+b.bindValues(valueStatements, statements);
 
-UpdateBuilder valuesOnReferencesBuilder = updateBuilder();
-valuesOnReferencesBuilder.prefix(prov, Provenance.NAMESPACE);
-valuesOnReferencesBuilder.delete(?s, ?p, ?o);
-valuesOnReferencesBuilder.where(entity, ?statementPred, 
?statement);
-valuesOnReferencesBuilder.where().add(startsWith(?statement, 
uris.statement()));
-valuesOnReferencesBuilder.where(?statement, prov:wasDerivedFrom, 
?ref);
-valuesOnReferencesBuilder.where(?ref, ?expandedValuePred, ?s);
-valuesOnReferencesBuilder.where().add(startsWith(?s, uris.value()));
-valuesOnReferencesBuilder.where(?s, ?p, ?o);
-// We can't clear references that are still used elsewhere
-valuesOnReferencesBuilder.where().notExists()//
-.add(?otherStatement, prov:wasDerivedFrom, ?ref)//
-.add(?otherEntity, ?otherStatementPred, 
?otherStatement)//
-.add(FILTER (  + entity +  != ?otherEntity ) .);
-if (!statements.isEmpty()) {
-valuesOnReferencesBuilder.where().notExists().values(statements, 
?s, ?p, ?o);
-}
-
-UpdateBuilder referencesBuilder = updateBuilder();
-referencesBuilder.prefix(prov, Provenance.NAMESPACE);
-referencesBuilder.delete(?s, ?p, ?o);
- 

[MediaWiki-commits] [Gerrit] Add submodules to master checkoutMediaWiki - change (operations/mediawiki-config)

2015-04-14 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204080

Change subject: Add submodules to master checkoutMediaWiki
..

Add submodules to master checkoutMediaWiki

Builds on the ideas in I0a206a8b5c4beabcbd161fbabebf223f5bd104d2 adds
additional necessary repos.

Bug: T88442
Change-Id: I76ea0b71df6bfd89344b977660fa7e839602e7d7
---
M multiversion/checkoutMediaWiki.php
1 file changed, 61 insertions(+), 0 deletions(-)


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

diff --git a/multiversion/checkoutMediaWiki.php 
b/multiversion/checkoutMediaWiki.php
index d225ac4..1455a89 100644
--- a/multiversion/checkoutMediaWiki.php
+++ b/multiversion/checkoutMediaWiki.php
@@ -65,6 +65,67 @@
print Error checking out branch\n;
exit( 1 );
}
+
+   # master has no extensions, vendor, or skins in submodules
+   if ($checkoutVersion === 'master') {
+   $gerrit = 'https://gerrit.wikimedia.org';
+
+   $repos = array(
+   'extensions'= 
'r/p/mediawiki/extensions',
+   'vendor'= 'r/mediawiki/vendor.git',
+   'skins/CologneBlue' = 
'r/mediawiki/skins/CologneBlue',
+   'skins/Modern'  = 
'r/mediawiki/skins/Modern',
+   'skins/MonoBook'= 
'r/mediawiki/skins/MonoBook',
+   'skins/Vector'  = 
'r/mediawiki/skins/Vector',
+   );
+
+   foreach($repos as $dir = $upstream) {
+   $rawPath = ${destIP}/${dir};
+
+   list($path, $upstream) = array_map(
+   'escapeshellarg',
+   array(
+   $rawPath,
+   ${gerrit}/${upstream},
+   )
+   );
+
+   if (file_exists( $rawPath )) {
+   chdir( $rawPath );
+
+   $cmds = array(
+   'git init',
+   git remote add origin 
${upstream},
+   'git fetch',
+   'git checkout -f -t 
origin/master',
+   );
+
+   } else {
+   $cmds = array(
+   git clone ${upstream} ${path},
+   );
+   }
+
+   foreach ($cmds as $cmd) {
+   passthru( $cmd, $ret );
+
+   if ( $ret ) {
+   print '${cmd}' failed in 
${path}\n;
+   exit(1);
+   }
+   }
+
+   chdir( $rawPath );
+   passthru( 'git submodule update --init 
--recursive' , $ret );
+
+   if ( $ret ) {
+   print Submodule update failed in 
${dir}\n;
+   exit(1);
+   }
+   chdir( $destIP );
+   }
+   }
+
passthru( 'git submodule update --init --recursive', $ret );
if ( $ret ) {
print Error updating submodules\n;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76ea0b71df6bfd89344b977660fa7e839602e7d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Thcipriani tcipri...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add Special:Postfixindex - change (mediawiki/core)

2015-04-14 Thread Mjbmr (Code Review)
Mjbmr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204084

Change subject: Add Special:Postfixindex
..

Add Special:Postfixindex

Change-Id: I90d7db7ac3d20a5eb6fe6e0e7a0881e4888f8410
---
A includes/specials/SpecialPostfixindex.php
1 file changed, 307 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/204084/1

diff --git a/includes/specials/SpecialPostfixindex.php 
b/includes/specials/SpecialPostfixindex.php
new file mode 100644
index 000..5a67d92
--- /dev/null
+++ b/includes/specials/SpecialPostfixindex.php
@@ -0,0 +1,307 @@
+?php
+/**
+ * Implements Special:Prefixindex
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup SpecialPage
+ */
+
+/**
+ * Implements Special:Prefixindex
+ *
+ * @ingroup SpecialPage
+ */
+class SpecialPrefixindex extends SpecialAllPages {
+
+   /**
+* Whether to remove the searched prefix from the displayed link. Useful
+* for inclusion of a set of sub pages in a root page.
+*/
+   protected $stripPrefix = false;
+
+   protected $hideRedirects = false;
+
+   // number of columns in output table
+   protected $columns = 3;
+
+   // Inherit $maxPerPage
+
+   function __construct() {
+   parent::__construct( 'Prefixindex' );
+   }
+
+   /**
+* Entry point : initialise variables and call subfunctions.
+* @param string $par Becomes FOO when called like 
Special:Prefixindex/FOO (default null)
+*/
+   function execute( $par ) {
+   global $wgContLang;
+
+   $this-setHeaders();
+   $this-outputHeader();
+
+   $out = $this-getOutput();
+   $out-addModuleStyles( 'mediawiki.special' );
+
+   # GET values
+   $request = $this-getRequest();
+   $from = $request-getVal( 'from', '' );
+   $prefix = $request-getVal( 'prefix', '' );
+   $ns = $request-getIntOrNull( 'namespace' );
+   $namespace = (int)$ns; // if no namespace given, use 0 
(NS_MAIN).
+   $this-hideRedirects = $request-getBool( 'hideredirects', 
$this-hideRedirects );
+   $this-stripPrefix = $request-getBool( 'stripprefix', 
$this-stripPrefix );
+   $this-columns = $request-getInt( 'columns', $this-columns );
+
+   $namespaces = $wgContLang-getNamespaces();
+   $out-setPageTitle(
+   ( $namespace  0  array_key_exists( $namespace, 
$namespaces ) )
+   ? $this-msg( 'prefixindex-namespace', 
str_replace( '_', ' ', $namespaces[$namespace] ) )
+   : $this-msg( 'prefixindex' )
+   );
+
+   $showme = '';
+   if ( $par !== null ) {
+   $showme = $par;
+   } elseif ( $prefix != '' ) {
+   $showme = $prefix;
+   } elseif ( $from != ''  $ns === null ) {
+   // For back-compat with Special:Allpages
+   // Don't do this if namespace is passed, so paging 
works when doing NS views.
+   $showme = $from;
+   }
+
+   // Bug 27864: if transcluded, show all pages instead of the 
form.
+   if ( $this-including() || $showme != '' || $ns !== null ) {
+   $this-showPrefixChunk( $namespace, $showme, $from );
+   } else {
+   $out-addHTML( $this-namespacePrefixForm( $namespace, 
null ) );
+   }
+   }
+
+   /**
+* HTML for the top form
+* @param int $namespace A namespace constant (default NS_MAIN).
+* @param string $from DbKey we are starting listing at.
+* @return string
+*/
+   protected function namespacePrefixForm( $namespace = NS_MAIN, $from = 
'' ) {
+   $out = Xml::openElement( 'div', array( 'class' = 
'namespaceoptions' ) );
+   $out .= Xml::openElement(
+   'form',
+   array( 'method' = 'get', 'action' = 
$this-getConfig()-get( 

[MediaWiki-commits] [Gerrit] Special:CentralAuth: don't show global groups if 'none' - change (mediawiki...CentralAuth)

2015-04-14 Thread Glaisher (Code Review)
Glaisher has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204083

Change subject: Special:CentralAuth: don't show global groups if 'none'
..

Special:CentralAuth: don't show global groups if 'none'

This is not really helpful/useful and adds to
confusion for new users. We already don't show stuff
like locked, hidden if it's not needed.

Change-Id: I2233e538434fdd762662a64fbc4c1477ed5832bd
---
M i18n/en.json
M i18n/qqq.json
M includes/specials/SpecialCentralAuth.php
3 files changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/83/204083/1

diff --git a/i18n/en.json b/i18n/en.json
index ef00851..6707098 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -117,7 +117,6 @@
centralauth-admin-info-locked: Locked:,
centralauth-admin-info-hidden: Hidden level:,
centralauth-admin-info-groups: Global {{PLURAL:$1|group|groups}}:,
-   centralauth-admin-info-nogroups: none,
centralauth-admin-info-attached: Number of attached accounts:,
centralauth-admin-info-unattached: Number of unattached accounts:,
centralauth-admin-yes: yes,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f728a6c..3adb3b2 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -132,8 +132,7 @@
centralauth-admin-info-editcount: Label of information shown in box 
of 'Global user info' on 
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager] 
special page.,
centralauth-admin-info-locked: Label of information shown in box of 
'Global user info' on 
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager] 
special page. The following messages can appear after the 
colon:\n*{{msg-mw|Centralauth-admin-yes}}\n*{{msg-mw|Centralauth-admin-no}},
centralauth-admin-info-hidden: Label of information on status of 
user, recording whether the user is hidden to anyone but users with the right 
'oversight'. Used on [{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} 
Global user manager special page]. The following messages can appear after the 
colon:\n*{{msg-mw|Centralauth-admin-hidden-oversight}}\n*{{msg-mw|Centralauth-admin-hidden-list}}\n*{{msg-mw|Centralauth-admin-no}}\n\n{{Identical|Hidden}},
-   centralauth-admin-info-groups: Label of information shown in box of 
'Global user info' on 
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager] 
special page.\n\nA comma separated list will follow the message, or 
{{msg-mw|Centralauth-admin-info-nogroups}}\n\nParameters:\n* $1 - the number of 
groups the user is in,
-   centralauth-admin-info-nogroups: Shown when the user is not a member 
of any global groups.\n{{Identical|None}},
+   centralauth-admin-info-groups: Label of information shown in box of 
'Global user info' on 
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager] 
special page.\n\nA comma separated list will follow the 
message.\n\nParameters:\n* $1 - the number of groups the user is in,
centralauth-admin-info-attached: Label of information shown in box 
of 'Global user info' on 
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager] 
special page.,
centralauth-admin-info-unattached: Label of information shown in box 
of 'Global user info' on 
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager] 
special page.,
centralauth-admin-yes: Used in box of 'Global user info' on 
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager] 
special page. Can appear after 
{{msg-mw|Centralauth-admin-info-locked}}\n{{Identical|Yes}},
diff --git a/includes/specials/SpecialCentralAuth.php 
b/includes/specials/SpecialCentralAuth.php
index 0517791..ea773cf 100644
--- a/includes/specials/SpecialCentralAuth.php
+++ b/includes/specials/SpecialCentralAuth.php
@@ -314,8 +314,6 @@
);
}, $groups );
$attribs['groups'] = $this-getLanguage()-commaList( 
$groups );
-   } else {
-   $attribs['groups'] = $this-msg( 
'centralauth-admin-info-nogroups' )-escaped();
}
 
return $attribs;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2233e538434fdd762662a64fbc4c1477ed5832bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Glaisher glaisher.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update CentralAuth to 1.26wmf1 HEAD - change (mediawiki/core)

2015-04-14 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged.

Change subject: Update CentralAuth to 1.26wmf1 HEAD
..


Update CentralAuth to 1.26wmf1 HEAD

Change-Id: I89576e8c1b354a7fe2d4a4d9760b43541cfc8064
---
M extensions/CentralAuth
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/CentralAuth b/extensions/CentralAuth
index 19a7f94..d9bf7ea 16
--- a/extensions/CentralAuth
+++ b/extensions/CentralAuth
-Subproject commit 19a7f94c78a8ac5b53398f9bed431fd3ef4c28a2
+Subproject commit d9bf7ea45adc4c7cd5e35ceaa1c05b59dcfac687

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89576e8c1b354a7fe2d4a4d9760b43541cfc8064
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf1
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
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] Update SSH pubkey for ebernhard...@wikimedia.org - change (operations/puppet)

2015-04-14 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204072

Change subject: Update SSH pubkey for ebernhard...@wikimedia.org
..

Update SSH pubkey for ebernhard...@wikimedia.org

Change-Id: If2ea82394e71bad55cc28a5913140b39a0233f61
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/204072/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 2457648..3954f12 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -509,7 +509,7 @@
 gid: 500
 name: ebernhardson
 realname: Erik Bernhardson
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDnafs6VPTCwrVEEqllEMpH6zhLreme1qGFuLxKD5uYQu2OJ01fhxICnswF7uuDrOSs5X9kTyj4zYjoGLHkEbucv3tBunEwYvzbrtRh+WxWkNjBNqhnUkM6T3IxOIpGlXwFxs6rD57i5ZtG2RPdRbOd+NYMjjkR/tELNSwuOfwi0vFeaumqhrbs5Q4XRqcdjPpMxE/BwqqAFA0SU/WeU5ewifF+FedAwYp5LRaeGmgWt0wuRnTjib8xxyyoH8ZJa79bYHK1CSWo4HU/EPsFdAgTWhrX59UQwOWTFOztQKU6zUc50bfh3cpv3wQ/4+VXFWG4J6XMdL4jLVxZwhCebYnf
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCw9RGPG974LGGgH43aZc6m0sWMbaTEaLlL91zNKzOazv0oQCuZKBlSv0SNoya1NXxK/c9XQBf4EoTaI1OLdgKr1sPA1xYHdm+aqnd3A7hT9suWctoH13sF0lq2gB+5FLvaRz0lBg8C0fHk3bLkB6XVWKedMu7Nshvtq/Si/ut+9cVSIyXk40PJgOGEUvmyi12w4MgdPKlPBbGiKBVh8/ehn1L3aloivyUdpckOqOstrP3KLfIn5AITjc4hZUM/OS0dYV0/XVOnNMHhL+IjHCBD9Ayf2NPGSCO5w7mXjXSQG21oVPIMyk4BuPgNMyf9ny3Iq0wZ1e+oTNcHFDRyag15
 ebernhard...@wikimedia.org]
 uid: 3088
   esanders:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2ea82394e71bad55cc28a5913140b39a0233f61
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use the plain-text GPL - change (mediawiki...parsoid)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use the plain-text GPL
..


Use the plain-text GPL

Per Iaa30b8994b8e4034ace61df8202a8b5002093ff2
(commit a512ff8ab49b140e19306ff813caf2186a25f4b5 in MediaWiki core)

Strictly speaking, this isn't an extension, but let's be consistent.

Change-Id: Iabbd7a28fadd01228d5f9ff59ae1ebb637c3126e
---
M COPYING
1 file changed, 88 insertions(+), 91 deletions(-)

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



diff --git a/COPYING b/COPYING
index 019694a..d159169 100644
--- a/COPYING
+++ b/COPYING
@@ -1,65 +1,65 @@
-== GNU GENERAL PUBLIC LICENSE ==
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
 
-Version 2, June 1991
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
 
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
+Preamble
 
-=== Preamble ===
-
-The licenses for most software are designed to take away your
+  The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
 License is intended to guarantee your freedom to share and change free
 software--to make sure the software is free for all its users.  This
 General Public License applies to most of the Free Software
 Foundation's software and to any other program whose authors commit to
 using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
+the GNU Lesser General Public License instead.)  You can apply it to
 your programs, too.
 
-When we speak of free software, we are referring to freedom, not
+  When we speak of free software, we are referring to freedom, not
 price.  Our General Public Licenses are designed to make sure that you
 have the freedom to distribute copies of free software (and charge for
 this service if you wish), that you receive source code or can get it
 if you want it, that you can change the software or use pieces of it
 in new free programs; and that you know you can do these things.
 
-To protect your rights, we need to make restrictions that forbid
+  To protect your rights, we need to make restrictions that forbid
 anyone to deny you these rights or to ask you to surrender the rights.
 These restrictions translate to certain responsibilities for you if you
 distribute copies of the software, or if you modify it.
 
-For example, if you distribute copies of such a program, whether
+  For example, if you distribute copies of such a program, whether
 gratis or for a fee, you must give the recipients all the rights that
 you have.  You must make sure that they, too, receive or can get the
 source code.  And you must show them these terms so they know their
 rights.
 
-We protect your rights with two steps: (1) copyright the software, and
+  We protect your rights with two steps: (1) copyright the software, and
 (2) offer you this license which gives you legal permission to copy,
 distribute and/or modify the software.
 
-Also, for each author's protection and ours, we want to make certain
+  Also, for each author's protection and ours, we want to make certain
 that everyone understands that there is no warranty for this free
 software.  If the software is modified by someone else and passed on, we
 want its recipients to know that what they have is not the original, so
 that any problems introduced by others will not reflect on the original
 authors' reputations.
 
-Finally, any free program is threatened constantly by software
+  Finally, any free program is threatened constantly by software
 patents.  We wish to avoid the danger that redistributors of a free
 program will individually obtain patent licenses, in effect making the
 program proprietary.  To prevent this, we have made it clear that any
 patent must be licensed for everyone's free use or not licensed at all.
 
-The precise terms and conditions for copying, distribution and
+  The precise terms and conditions for copying, distribution and
 modification follow.
 
-== TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ==
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
-'''0.''' This License applies to any program or other work which contains
+  0. This License applies to any program or other work which contains
 a notice placed by the copyright holder saying it may be distributed
 under the terms of this General Public 

[MediaWiki-commits] [Gerrit] Simplify CentralAuthHooks::onGetPreferences - change (mediawiki...CentralAuth)

2015-04-14 Thread Glaisher (Code Review)
Glaisher has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204081

Change subject: Simplify CentralAuthHooks::onGetPreferences
..

Simplify CentralAuthHooks::onGetPreferences

*If the user has a fully unified account, only a link
to Special:CentralAuth is now shown. (All in order! removed)
*If the user has unattached accounts and 'centralauth-merge',
also add a link to Special:MergeAccount.
*Show a status message if the account is not fully unified.

Bug: T18690
Change-Id: I6ac6271798104289dad03c90a737cb7e96ad1b33
---
M i18n/en.json
M i18n/qqq.json
M includes/CentralAuthHooks.php
3 files changed, 28 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/81/204081/1

diff --git a/i18n/en.json b/i18n/en.json
index ef00851..e02366f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -204,8 +204,6 @@
centralauth-prefs-status: Global account status:,
centralauth-prefs-not-managed: Not using unified account,
centralauth-prefs-unattached: Unconfirmed,
-   centralauth-prefs-complete: All in order!,
-   centralauth-prefs-migration: In migration,
centralauth-prefs-count-attached: Your account is active on $1 
project {{PLURAL:$1|site|sites}}.,
centralauth-prefs-count-unattached: Unconfirmed accounts with your 
name remain on $1 {{PLURAL:$1|project|projects}}.,
centralauth-prefs-detail-unattached: This project site has not been 
confirmed as belonging to the global account.,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f728a6c..ca7680c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -217,11 +217,9 @@
centralauth-days-ago: Parameters:\n* $1 - number of 
days\n{{Related|Centralauth-ago}},
centralauth-months-ago: Parameters:\n* $1 - number of 
months\n{{Related|Centralauth-ago}},
centralauth-years-ago: Parameters:\n* $1 - number of 
years\n{{Related|Centralauth-ago}},
-   centralauth-prefs-status: Used as label in 
[[Special:Preferences]].\n\nFollowed by any one of the following messages:\n* 
{{msg-mw|Centralauth-prefs-not-managed}}\n* 
{{msg-mw|Centralauth-prefs-unattached}}\n* 
{{msg-mw|Centralauth-prefs-complete}}\n* 
{{msg-mw|Centralauth-prefs-migration}}\n\nSee example: 
[[mw:Special:Preferences]].,
+   centralauth-prefs-status: Used as label in 
[[Special:Preferences]].\n\nFollowed by any one of the following messages:\n* 
{{msg-mw|Centralauth-prefs-not-managed}}\n* 
{{msg-mw|Centralauth-prefs-unattached}}\n\nSee example: 
[[mw:Special:Preferences]].,
centralauth-prefs-not-managed: This message is displayed as the 
global account status at [[Special:Preferences|{{int:Preferences}}]] page, when 
the account is not merged at all.\n\nPreceded by the label 
{{msg-mw|Centralauth-prefs-status}}.\n\nSee example: 
[[mw:Special:Preferences]].\n{{Related|Centralauth-prefs}},
centralauth-prefs-unattached: This message is displayed as the 
global account status at [[Special:Preferences|{{int:Preferences}}]] page, when 
the account is in migration, but the local account is not attached.\n\nPreceded 
by the label {{msg-mw|Centralauth-prefs-status}}.\n\nFollowed by 
{{msg-mw|Centralauth-prefs-detail-unattached}}.\n\nSee example: 
[[mw:Special:Preferences]].\n{{Related|Centralauth-prefs}},
-   centralauth-prefs-complete: This message is displayed as the global 
account status at [[Special:Preferences|{{int:Preferences}}]] page, when 
everything is alright with the user's unified account.\n\nPreceded by the label 
{{msg-mw|Centralauth-prefs-status}}.\n\nSee example: 
[[mw:Special:Preferences]].\n{{Related|Centralauth-prefs}},
-   centralauth-prefs-migration: This message is displayed as the global 
account status at [[Special:Preferences|{{int:Preferences}}]] page, when the 
account unification is not yet compelte. Preceded by the label 
{{msg-mw|Centralauth-prefs-status}}. See example: 
[[mw:Special:Preferences]].\n{{Related|Centralauth-prefs}},
centralauth-prefs-count-attached: Used in 
[[Special:Preferences|{{int:Preferences}}]] special page. Parameters:\n* $1 - 
number of attached sites\nSee also:\n* 
{{msg-mw|Centralauth-prefs-count-unattached}},
centralauth-prefs-count-unattached: Used in 
[[Special:Preferences|{{int:Preferences}}]] special page.\n\nShown when the 
migration is incomplete.\n\nParameters:\n* $1 - number of unattached 
projects\nSee also:\n* {{msg-mw|Centralauth-prefs-count-attached}},
centralauth-prefs-detail-unattached: This message is displayed as 
the global account status at [[Special:Preferences|{{int:Preferences}}]] page, 
when the account is in migration, but the local account is not 
attached.\n\nPreceded by {{msg-mw|Centralauth-prefs-unattached}}.\n\nSee 
example: [[mw:Special:Preferences]].,
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index f82ed19..83cbec9 100644
--- 

[MediaWiki-commits] [Gerrit] setting up labcontrol1001 mgmt dns - change (operations/dns)

2015-04-14 Thread RobH (Code Review)
RobH has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204078

Change subject: setting up labcontrol1001 mgmt dns
..

setting up labcontrol1001 mgmt dns

old search box is now labcontrol1001

Bug:T96048
Change-Id: I2de6ab08188db29d0cce84a1a0a1e4295432b573
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/78/204078/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 00d15f8..d0b2b5d 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2320,7 +2320,7 @@
 22  1H  IN PTR  wmf3154.mgmt.eqiad.wmnet.
 23  1H  IN PTR  search1023.mgmt.eqiad.wmnet.
 23  1H  IN PTR  wmf3153.mgmt.eqiad.wmnet.
-24  1H  IN PTR  search1024.mgmt.eqiad.wmnet.
+24  1H  IN PTR  labcontrol1001.mgmt.eqiad.wmnet.
 24  1H  IN PTR  wmf3152.mgmt.eqiad.wmnet.
 25  1H  IN PTR wmf3542.mgmt.eqiad.wmnet.
 26  1H  IN PTR wmf3543.mgmt.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 1d13220..01f5e36 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -1723,6 +1723,7 @@
 WMF3155 1H  IN A10.65.7.21
 WMF3154 1H  IN A10.65.7.22
 WMF3153 1H  IN A10.65.7.23
+labcontrol1001  1H  IN A10.65.7.24
 WMF3152 1H  IN A10.65.7.24
 WMF3542 1H A10.65.7.25
 WMF3543 1H A10.65.7.26

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2de6ab08188db29d0cce84a1a0a1e4295432b573
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: RobH r...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] [DO NOT MERGE] - split SpecialListProperties code into separ... - change (mediawiki...Wikibase)

2015-04-14 Thread Aude (Code Review)
Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204079

Change subject: [DO NOT MERGE] - split SpecialListProperties code into separate 
class
..

[DO NOT MERGE] - split SpecialListProperties code into separate class

this is just an ugly example and proof of concept that
the special page code can be split.

this would help with testability.

Change-Id: Id8d63ae1428c62128bf598dee394783cb87721be
---
A repo/includes/specials/PropertyLister.php
M repo/includes/specials/SpecialListProperties.php
2 files changed, 157 insertions(+), 88 deletions(-)


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

diff --git a/repo/includes/specials/PropertyLister.php 
b/repo/includes/specials/PropertyLister.php
new file mode 100644
index 000..4857d97
--- /dev/null
+++ b/repo/includes/specials/PropertyLister.php
@@ -0,0 +1,152 @@
+?php
+
+namespace Wikibase\Repo\Specials;
+
+use DataTypes\DataTypeFactory;
+use Html;
+use Linker;
+use MWException;
+use Wikibase\DataModel\Entity\PropertyId;
+use Wikibase\DataTypeSelector;
+use Wikibase\PropertyInfoStore;
+use Wikibase\Repo\Content\EntityContentFactory;
+use Wikibase\Repo\WikibaseRepo;
+
+/**
+ * Special page to list properties by data type
+ *
+ * @since 0.5
+ * @licence GNU GPL v2+
+ * @author Bene*  benestar.wikime...@gmail.com 
+ */
+class PropertyLister {
+
+   /**
+* @var DataTypeFactory
+*/
+   private $dataTypeFactory;
+
+   /**
+* @var PropertyInfoStore
+*/
+   private $propertyInfoStore;
+
+   /**
+* @var EntityContentFactory
+*/
+   private $entityContentFactory;
+
+   /**
+* @var string
+*/
+   private $dataType;
+
+   /**
+* @since 0.5
+*/
+   public function __construct() {
+   $this-dataTypeFactory = 
WikibaseRepo::getDefaultInstance()-getDataTypeFactory();
+   $this-propertyInfoStore = 
WikibaseRepo::getDefaultInstance()-getStore()-getPropertyInfoStore();
+   $this-entityContentFactory = 
WikibaseRepo::getDefaultInstance()-getEntityContentFactory();
+   }
+
+   /**
+* @see SpecialWikibasePage::execute
+*
+* @since 0.5
+*
+* @param string|null $subPage
+*/
+   public function doExecute( $output, $request, $title, $languageCode, 
$subPage ) {
+   $this-prepareArguments( $request, $subPage );
+   $this-showForm( $output, $title, $languageCode );
+
+   if ( $this-dataType !== null ) {
+   $this-showQuery( $output );
+   }
+   }
+
+   private function prepareArguments( $request, $subPage ) {
+   $this-dataType = $request-getText( 'datatype', $subPage );
+   if ( !in_array( $this-dataType, 
$this-dataTypeFactory-getTypeIds() ) ) {
+   $this-dataType = null;
+   }
+   }
+
+   private function showForm( $output, $title, $languageCode ) {
+   $dataTypeSelect = new DataTypeSelector(
+   $this-dataTypeFactory-getTypes(),
+   $languageCode
+   );
+
+   $output-addHTML(
+   Html::openElement(
+   'form',
+   array(
+   'action' = $title-getLocalURL(),
+   'name' = 'listproperties',
+   'id' = 'wb-listproperties-form'
+   )
+   ) .
+   Html::input (
+   'title',
+   $title-getPrefixedText(),
+   'hidden',
+   array()
+   ) .
+   Html::openElement( 'fieldset' ) .
+   Html::element(
+   'legend',
+   array(),
+   wfMessage( 'wikibase-listproperties-legend' 
)-text()
+   ) .
+   Html::openElement( 'p' ) .
+   Html::element(
+   'label',
+   array(
+   'for' = 'wb-listproperties-datatype'
+   ),
+   wfMessage( 
'wikibase-listproperties-label-datatype' )-text()
+   ) . ' ' .
+   $dataTypeSelect-getHTML( 'wb-listproperties-datatype', 
'datatype', $this-dataType ) . ' ' .
+   Html::input(
+   'submit',
+   wfMessage( 'wikibase-listproperties-submit' 
)-text(),
+   

[MediaWiki-commits] [Gerrit] Don't use a inputFilter on LinkTargetInputWidget - change (VisualEditor/VisualEditor)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't use a inputFilter on LinkTargetInputWidget
..


Don't use a inputFilter on LinkTargetInputWidget

Fixes I4df99d2c1.

Input filters run on every change making it impossible to
type space at the end of a word, even if you intend to type
something else after it.

Apply the trim only to the annotation, and make sure we don't
reset the input value from the annotation if setValue is triggered
by a change event.

Bug: T94498
Change-Id: Ie01e0f4970757f2983eb3488be805f755f688291
(cherry picked from commit f696ef7da6874398a99bed138264800b70ea0aae)
---
M src/ui/widgets/ve.ui.LinkTargetInputWidget.js
1 file changed, 16 insertions(+), 13 deletions(-)

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



diff --git a/src/ui/widgets/ve.ui.LinkTargetInputWidget.js 
b/src/ui/widgets/ve.ui.LinkTargetInputWidget.js
index e26a5e5..9d270c9 100644
--- a/src/ui/widgets/ve.ui.LinkTargetInputWidget.js
+++ b/src/ui/widgets/ve.ui.LinkTargetInputWidget.js
@@ -16,10 +16,7 @@
 ve.ui.LinkTargetInputWidget = function VeUiLinkTargetInputWidget( config ) {
// Parent constructor
OO.ui.TextInputWidget.call( this, $.extend( {
-   validate: 
/^(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi,
-   inputFilter: function ( target ) {
-   return target.trim();
-   }
+   validate: /^(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi
}, config ) );
 
// Properties
@@ -64,7 +61,7 @@
// If URL is external, flip to LTR. Otherwise, 
set back to RTL
widget.setRTL( !isExt );
}
-   widget.setValue( widget.$input.val() );
+   widget.setValue( widget.$input.val(), true );
} );
}
 };
@@ -76,8 +73,9 @@
  *
  * @method
  * @param {string} value New value
+ * @param {boolean} [fromInput] Value was generated from input element
  */
-ve.ui.LinkTargetInputWidget.prototype.setValue = function ( value ) {
+ve.ui.LinkTargetInputWidget.prototype.setValue = function ( value, fromInput ) 
{
// Keep annotation in sync with value
value = this.cleanUpValue( value );
if ( value === '' ) {
@@ -86,9 +84,9 @@
this.setAnnotation( new ve.dm.LinkAnnotation( {
type: 'link',
attributes: {
-   href: value
+   href: value.trim()
}
-   } ) );
+   } ), fromInput );
}
 
// Parent method
@@ -102,15 +100,20 @@
  *
  * @method
  * @param {ve.dm.LinkAnnotation} annotation Link annotation
+ * @param {boolean} [fromInput] Annotation was generated from input element 
value
  * @chainable
  */
-ve.ui.LinkTargetInputWidget.prototype.setAnnotation = function ( annotation ) {
+ve.ui.LinkTargetInputWidget.prototype.setAnnotation = function ( annotation, 
fromInput ) {
this.annotation = annotation;
 
-   // Parent method
-   OO.ui.TextInputWidget.prototype.setValue.call(
-   this, this.getTargetFromAnnotation( annotation )
-   );
+   // If this method was triggered by the user typing into the input, 
don't update
+   // the input element to avoid the cursor jumping as the user types
+   if ( !fromInput ) {
+   // Parent method
+   OO.ui.TextInputWidget.prototype.setValue.call(
+   this, this.getTargetFromAnnotation( annotation )
+   );
+   }
 
return this;
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie01e0f4970757f2983eb3488be805f755f688291
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.25wmf24
Gerrit-Owner: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Esanders esand...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Use the plain-text GPL - change (mediawiki...parsoid)

2015-04-14 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204071

Change subject: Use the plain-text GPL
..

Use the plain-text GPL

Per Iaa30b8994b8e4034ace61df8202a8b5002093ff2
(commit a512ff8ab49b140e19306ff813caf2186a25f4b5 in MediaWiki core)

Strictly speaking, this isn't an extension, but let's be consistent.

Change-Id: Iabbd7a28fadd01228d5f9ff59ae1ebb637c3126e
---
M COPYING
1 file changed, 88 insertions(+), 91 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/71/204071/1

diff --git a/COPYING b/COPYING
index 019694a..d159169 100644
--- a/COPYING
+++ b/COPYING
@@ -1,65 +1,65 @@
-== GNU GENERAL PUBLIC LICENSE ==
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
 
-Version 2, June 1991
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
 
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
+Preamble
 
-=== Preamble ===
-
-The licenses for most software are designed to take away your
+  The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
 License is intended to guarantee your freedom to share and change free
 software--to make sure the software is free for all its users.  This
 General Public License applies to most of the Free Software
 Foundation's software and to any other program whose authors commit to
 using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
+the GNU Lesser General Public License instead.)  You can apply it to
 your programs, too.
 
-When we speak of free software, we are referring to freedom, not
+  When we speak of free software, we are referring to freedom, not
 price.  Our General Public Licenses are designed to make sure that you
 have the freedom to distribute copies of free software (and charge for
 this service if you wish), that you receive source code or can get it
 if you want it, that you can change the software or use pieces of it
 in new free programs; and that you know you can do these things.
 
-To protect your rights, we need to make restrictions that forbid
+  To protect your rights, we need to make restrictions that forbid
 anyone to deny you these rights or to ask you to surrender the rights.
 These restrictions translate to certain responsibilities for you if you
 distribute copies of the software, or if you modify it.
 
-For example, if you distribute copies of such a program, whether
+  For example, if you distribute copies of such a program, whether
 gratis or for a fee, you must give the recipients all the rights that
 you have.  You must make sure that they, too, receive or can get the
 source code.  And you must show them these terms so they know their
 rights.
 
-We protect your rights with two steps: (1) copyright the software, and
+  We protect your rights with two steps: (1) copyright the software, and
 (2) offer you this license which gives you legal permission to copy,
 distribute and/or modify the software.
 
-Also, for each author's protection and ours, we want to make certain
+  Also, for each author's protection and ours, we want to make certain
 that everyone understands that there is no warranty for this free
 software.  If the software is modified by someone else and passed on, we
 want its recipients to know that what they have is not the original, so
 that any problems introduced by others will not reflect on the original
 authors' reputations.
 
-Finally, any free program is threatened constantly by software
+  Finally, any free program is threatened constantly by software
 patents.  We wish to avoid the danger that redistributors of a free
 program will individually obtain patent licenses, in effect making the
 program proprietary.  To prevent this, we have made it clear that any
 patent must be licensed for everyone's free use or not licensed at all.
 
-The precise terms and conditions for copying, distribution and
+  The precise terms and conditions for copying, distribution and
 modification follow.
 
-== TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ==
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
-'''0.''' This License applies to any program or other work which contains
+  0. This License applies to any program or other work which contains
 a notice placed by the copyright holder saying it may be 

[MediaWiki-commits] [Gerrit] Support cleaning of git and puppet keys during instance dele... - change (sink_nova_ldap)

2015-04-14 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204075

Change subject: Support cleaning of git and puppet keys during instance deletion
..

Support cleaning of git and puppet keys during instance deletion

Change-Id: I28577fe63b05f027a083a8f1d45648a738030146
---
M nova_ldap/base.py
M nova_ldap/novaldap.py
2 files changed, 47 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/sink_nova_ldap 
refs/changes/75/204075/1

diff --git a/nova_ldap/base.py b/nova_ldap/base.py
index c00b144..6168003 100644
--- a/nova_ldap/base.py
+++ b/nova_ldap/base.py
@@ -25,6 +25,7 @@
 
 import ldap
 import ldap.modlist
+import paramiko
 
 LOG = logging.getLogger(__name__)
 central_api = central_rpcapi.CentralAPI()
@@ -77,10 +78,8 @@
 
 return None
 
-
 def _closeLdap(self):
 self.ds.unbind()
-
 
 def _create(self, addresses, extra, managed=True,
 resource_type=None, resource_id=None):
@@ -126,12 +125,14 @@
 hostEntry['dc'] = dc
 hostEntry['aRecord'] = addr
 hostEntry['puppetClass'] = cfg.CONF[self.name].get(
-   'puppetdefaultclasses')
+'puppetdefaultclasses')
 hostEntry['puppetVar'] = cfg.CONF[self.name].get(
-   'puppetdefaultvars')
+'puppetdefaultvars')
 hostEntry['associatedDomain'] = []
-hostEntry['puppetVar'].append('instanceproject=%s' % 
event_data['tenant_id'])
-hostEntry['puppetVar'].append('instancename=%s' % 
event_data['hostname'])
+hostEntry['puppetVar'].append('instanceproject=%s' %
+  event_data['tenant_id'])
+hostEntry['puppetVar'].append('instancename=%s' %
+  event_data['hostname'])
 
 for fmt in cfg.CONF[self.name].get('format'):
 hostEntry['associatedDomain'].append(fmt % event_data)
@@ -172,3 +173,38 @@
 self.ds.delete_s(dn)
 
 self._closeLdap()
+
+# WMF-specific add-on:  Clean salt and puppet keys for deleted
+#  instance
+if (cfg.CONF[self.name].puppet_key_format and
+cfg.CONF[self.name].puppet_master_host):
+puppetkey = cfg.CONF[self.name].puppet_key_format % event_data
+LOG.debug('Cleaning puppet key %s' % puppetkey)
+_run_remote_command(cfg.CONF[self.name].puppet_master_host,
+'root',
+'puppet cert clean %s' % puppetkey)
+
+if (cfg.CONF[self.name].salt_key_format and
+cfg.CONF[self.name].salt_master_host):
+saltkey = cfg.CONF[self.name].salt_key_format % event_data
+LOG.debug('Cleaning salt key %s' % saltkey)
+_run_remote_command(cfg.CONF[self.name].salt_master_host,
+'root',
+'puppet cert clean %s' % saltkey)
+
+def _run_remote_command(server, username, command):
+try:
+ssh = paramiko.SSHClient()
+ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+try:
+ssh.connect(server, username=username)
+except (paramiko.SSHException, socket.error):
+LOG.warning('Failed to connect to %s' % server)
+return
+stdin, stdout, stderr = ssh.exec_command(command)
+LOG.debug('remote call produced stdout %s' % stdout)
+LOG.debug('remote call produced stderr %s' % stderr)
+return stdout.readlines()
+except Exception:
+LOG.warning('Unable to connect to %s' % server)
+return
diff --git a/nova_ldap/novaldap.py b/nova_ldap/novaldap.py
index 88406fe..8d6d658 100644
--- a/nova_ldap/novaldap.py
+++ b/nova_ldap/novaldap.py
@@ -39,6 +39,11 @@
 
 cfg.MultiStrOpt('puppetdefaultclasses', default=None),
 cfg.MultiStrOpt('puppetdefaultvars', default=None),
+
+cfg.StrOpt('puppet_key_format', default=None),
+cfg.StrOpt('salt_key_format', default=None),
+cfg.StrOpt('puppet_master_host', default=None),
+cfg.StrOpt('salt_master_host', default=None),
 ], group='handler:nova_ldap')
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28577fe63b05f027a083a8f1d45648a738030146
Gerrit-PatchSet: 1
Gerrit-Project: sink_nova_ldap
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add 'CentralAuthSULRename' log group - change (operations/mediawiki-config)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add 'CentralAuthSULRename' log group
..


Add 'CentralAuthSULRename' log group

For forceRenameUsers.php script (SULF)

Change-Id: I1c5ab6132e166d09ce8b29e0436c8f7972b315b6
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6c46b82..7ab34fd 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4222,6 +4222,7 @@
'CentralAuth-Bug39996' = 
udp://$wmfUdp2logDest/centralauth-bug39996, // -legoktm 2014-07-14 for Bug 
T41996
'CentralAuthRename' = 
udp://$wmfUdp2logDest/centralauthrename, // -legoktm 2014-07-14 for Bug T69875
'CentralAuthUserMerge' = 
udp://$wmfUdp2logDest/centralauthusermerge,
+   'CentralAuthSULRename' = 
udp://$wmfUdp2logDest/centralauthsulrename,
'Renameuser' = udp://$wmfUdp2logDest/renameuser,
'GettingStarted' = udp://$wmfUdp2logDest/gettingstarted,
'zero' = udp://$wmfUdp2logDest/zero, // zero-rated debug log

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c5ab6132e166d09ce8b29e0436c8f7972b315b6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
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] Set $wgCentralAuthCheckSULMigration = true - change (operations/mediawiki-config)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Set $wgCentralAuthCheckSULMigration = true
..


Set $wgCentralAuthCheckSULMigration = true

Bug: T95735
Change-Id: Iec4e3ec005cc66c215bf36d4370b13f62957afff
---
M wmf-config/CommonSettings.php
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  BryanDavis: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 6b4ff4c..b0d1717 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1312,6 +1312,9 @@
 
// Enables Special:GlobalRenameRequest
$wgCentralAuthEnableGlobalRenameRequest = true;
+
+   // Enables login using pre-SULF username and notification
+   $wgCentralAuthCheckSULMigration = true;
 }
 
 // Config for GlobalCssJs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec4e3ec005cc66c215bf36d4370b13f62957afff
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: BryanDavis bda...@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] Clarify that Parsoid is GPLv2+ - change (mediawiki...parsoid)

2015-04-14 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204082

Change subject: Clarify that Parsoid is GPLv2+
..

Clarify that Parsoid is GPLv2+

Change-Id: Ie1710959bd2aa12b12d4f34fcd469e1bc6ec322f
---
R COPYING.txt
M README.md
M package.json
3 files changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/82/204082/1

diff --git a/COPYING b/COPYING.txt
similarity index 100%
rename from COPYING
rename to COPYING.txt
diff --git a/README.md b/README.md
index 51bfa7c..18bdb28 100644
--- a/README.md
+++ b/README.md
@@ -36,3 +36,21 @@
 ```
 
 More details are available at https://www.mediawiki.org/wiki/Parsoid/Setup
+
+== License ==
+Copyright (c) 2011-2015 Wikimedia Foundation and others; see
+`AUTHORS.txt`.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
diff --git a/package.json b/package.json
index 4ab5af2..24ed622 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
name: parsoid,
description: Mediawiki parser for the VisualEditor.,
version: 0.2.0-git,
+   license: GPL-2.0+,
dependencies: {
alea: ~0.0.9,
async: ~0.9.0,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1710959bd2aa12b12d4f34fcd469e1bc6ec322f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Updating new mac address for analytics1020 https://phabricat... - change (operations/puppet)

2015-04-14 Thread Cmjohnson (Code Review)
Cmjohnson has submitted this change and it was merged.

Change subject: Updating new mac address for analytics1020 
https://phabricator.wikimedia.org/T95263
..


Updating new mac address for analytics1020 
https://phabricator.wikimedia.org/T95263

Change-Id: I9d8a41993a46569d23a58fbc742588d53fc29971
---
M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
index 444146c..293dc0f 100644
--- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -293,7 +293,7 @@
 }
 
 host analytics1020 {
-   hardware ethernet 90:b1:1c:12:98:d9;
+   hardware ethernet 90:B1:1C:12:98:D9;
fixed-address analytics1020.eqiad.wmnet;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d8a41993a46569d23a58fbc742588d53fc29971
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org
Gerrit-Reviewer: Cmjohnson cmjohn...@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] Tweak paste target position hack - change (VisualEditor/VisualEditor)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Tweak paste target position hack
..


Tweak paste target position hack

Moving it down a bit more appears to stop the viewport
scrolling up in Chrome.

Change-Id: Id0a45a62c3a251bda8ea181894c75b40a6285da5
---
M src/ce/styles/ve.ce.Surface.css
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/src/ce/styles/ve.ce.Surface.css b/src/ce/styles/ve.ce.Surface.css
index 03277c5..8d92934 100644
--- a/src/ce/styles/ve.ce.Surface.css
+++ b/src/ce/styles/ve.ce.Surface.css
@@ -53,7 +53,8 @@
 
 .ve-ce-surface-paste {
position: fixed;
-   top: 1em; /* Hack: Stop the viewport scrolling when the paste target is 
typed into */
+   /* Hack: Stop the viewport scrolling when the paste target is typed 
into */
+   top: 3em;
left: 0;
/* Try to avoid wrapping by not setting a width because of 
https://code.google.com/p/chromium/issues/detail?id=318925 */
height: 1px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0a45a62c3a251bda8ea181894c75b40a6285da5
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Remove HTML escaping from createTextNode - change (mediawiki...VisualEditor)

2015-04-14 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204090

Change subject: Remove HTML escaping from createTextNode
..

Remove HTML escaping from createTextNode

Change-Id: Icb5ad749ed48808f6cf377bdd368bff3cf035913
---
M modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/90/204090/1

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
index e72584a..065110f 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
@@ -39,7 +39,7 @@
modes: [ 'edit', 'insert' ],
// HACK: Will be set later, but we want measurements to be 
accurate in the mean time, this
// will not be needed when T93290 is resolved
-   label: $( document.createTextNode( 'nbsp;' ) )
+   label: $( document.createTextNode( '\u00a0' ) )
}
 ] );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb5ad749ed48808f6cf377bdd368bff3cf035913
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] labcontrol1001 install-server updates - change (operations/puppet)

2015-04-14 Thread RobH (Code Review)
RobH has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204091

Change subject: labcontrol1001 install-server updates
..

labcontrol1001 install-server updates

adding mac address and partitioning info

Change-Id: Ib9e8289f1154bf7155c539b4d654928cc5fd7197
---
M modules/install-server/files/autoinstall/netboot.cfg
M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/91/204091/1

diff --git a/modules/install-server/files/autoinstall/netboot.cfg 
b/modules/install-server/files/autoinstall/netboot.cfg
index 1770c40..28fd8ff 100755
--- a/modules/install-server/files/autoinstall/netboot.cfg
+++ b/modules/install-server/files/autoinstall/netboot.cfg
@@ -89,7 +89,7 @@
osm-cp*) echo partman/mw.cfg ;; \
pc100[1-3]) echo partman/mw.cfg ;; \
rdb100[1-4]|logstash100[1-3]) echo partman/mw.cfg ;; \
-   labnodepool1001|mira|rdb200[1-4]) echo 
partman/raid1-lvm-ext4-srv.cfg ;; \
+   labcontrol1001|labnodepool1001|mira|rdb200[1-4]) echo 
partman/raid1-lvm-ext4-srv.cfg ;; \
snapshot[1-4]|snapshot100[1-4]) echo partman/snapshot.cfg ;; \
stat1002) echo partman/lvm-noraid-large.a.cfg ;; \

argon|bast4001|copper|neon|ruthenium|subra|suhail|titanium|ytterbium|zirconium) 
echo partman/raid1-lvm.cfg ;; \
diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
index 293dc0f..79c2a16 100644
--- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2195,6 +2195,14 @@
fixed-address iron.wikimedia.org;
 }
 
+host labcontrol1001 {
+   hardware ethernet 84:2b:2b:77:cf:ca;
+   fixed-address labcontrol1001.wikimedia.org;
+   option pxelinux.pathprefix jessie-installer/;
+   filename jessie-installer/debian-installer/amd64/pxelinux.0;
+
+}
+
 host labcontrol2001 {
hardware ethernet 90:B1:1C:2D:7F:19;
fixed-address labcontrol2001.wikimedia.org;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9e8289f1154bf7155c539b4d654928cc5fd7197
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Updating new mac address for analytics1020 https://phabricat... - change (operations/puppet)

2015-04-14 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204088

Change subject: Updating new mac address for analytics1020 
https://phabricator.wikimedia.org/T95263
..

Updating new mac address for analytics1020 
https://phabricator.wikimedia.org/T95263

Change-Id: I9d8a41993a46569d23a58fbc742588d53fc29971
---
M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/204088/1

diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
index 444146c..293dc0f 100644
--- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -293,7 +293,7 @@
 }
 
 host analytics1020 {
-   hardware ethernet 90:b1:1c:12:98:d9;
+   hardware ethernet 90:B1:1C:12:98:D9;
fixed-address analytics1020.eqiad.wmnet;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d8a41993a46569d23a58fbc742588d53fc29971
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] setting labcontrol1001.wikimedia.org dns - change (operations/dns)

2015-04-14 Thread RobH (Code Review)
RobH has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204087

Change subject: setting labcontrol1001.wikimedia.org dns
..

setting labcontrol1001.wikimedia.org dns

this has to be in public vlan, similar to virt1000

Bug:T96048
Change-Id: I59bef383eb3d25d9cc2530d1b0d447605368dce6
---
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/87/204087/1

diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index ab7fd01..41b270f 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -68,6 +68,7 @@
 89  1H  IN PTR  lead.wikimedia.org.
 90  1H  IN PTR  polonium.wikimedia.org.
 91  1H  IN PTR  wiki-mail-eqiad.wikimedia.org.
+92  1H  IN PTR  labcontrol1001.wikimedia.org
 
 ; 208.80.154.128/26 (public1-b-eqiad) (.128 - .191)
 
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 3c4a15a..f7a23e2 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -143,6 +143,7 @@
 1H  IN  2620:0:861:2:208:80:154:146
 iron1H  IN A208.80.154.151
 1H  IN  2620:0:861:2:208:80:154:151
+labcontrol1001  1H  IN A208.80.154.92
 labcontrol2001  1H  IN A208.80.153.14
 lead1H  IN A208.80.154.89
 1H  IN  2620:0:861:3:208:80:154:89

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59bef383eb3d25d9cc2530d1b0d447605368dce6
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: RobH r...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow citoid inspector to work within the basic reference di... - change (mediawiki...Citoid)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow citoid inspector to work within the basic reference dialog
..


Allow citoid inspector to work within the basic reference dialog

Avoid staging and insertion of ref if we are already in the
basic reference dialog.

Bug: T94621
Change-Id: I510ad0425c682c19897c39896770bb5216fab042
---
M Citoid.php
M modules/ve.ui.CiteFromIdInspector.js
M modules/ve.ui.CiteFromIdInspectorTool.js
A modules/ve.ui.CitoidAction.js
4 files changed, 88 insertions(+), 25 deletions(-)

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



diff --git a/Citoid.php b/Citoid.php
index 3defac4..384f928 100644
--- a/Citoid.php
+++ b/Citoid.php
@@ -38,7 +38,8 @@
'modules/ve.ui.CiteFromIdInspectorTool.js',
'modules/ve.ui.CiteFromIdGroupWidget.js',
'modules/ve.ui.CiteFromIdReferenceWidget.js',
-   'modules/ve.ui.CiteFromIdInspector.js'
+   'modules/ve.ui.CiteFromIdInspector.js',
+   'modules/ve.ui.CitoidAction.js'
),
'styles' = array(
'modules/ve.ui.CiteFromIdInspector.css'
diff --git a/modules/ve.ui.CiteFromIdInspector.js 
b/modules/ve.ui.CiteFromIdInspector.js
index 601c8d9..20bc81f 100644
--- a/modules/ve.ui.CiteFromIdInspector.js
+++ b/modules/ve.ui.CiteFromIdInspector.js
@@ -20,6 +20,7 @@
this.templateTypeMap = null;
this.lookupPromise = null;
this.service = null;
+   this.inDialog = '';
 
this.$element
.addClass( 've-ui-citeFromIdInspector' );
@@ -263,7 +264,7 @@
  * Respond to preview select widget choose event
  */
 ve.ui.CiteFromIdInspector.prototype.onPreviewSelectWidgetChoose = function ( 
item ) {
-   var fragment,
+   var fragment = this.fragment,
surfaceModel = this.getFragment().getSurface(),
doc = surfaceModel.getDocument(),
internalList = doc.getInternalList(),
@@ -274,23 +275,27 @@
this.getFragment().getSurface().applyStaging();
 
// Gets back contents of ref tag
-   item = this.referenceModel.findInternalItem( surfaceModel );
-   fragment = this.getFragment().clone(
-   new ve.dm.LinearSelection( doc, item.getChildren()[ 0 
].getRange() )
-   );
+   if ( this.inDialog !== 'reference' ) {
+   item = this.referenceModel.findInternalItem( 
surfaceModel );
+   fragment = this.getFragment().clone(
+   new ve.dm.LinearSelection( doc, 
item.getChildren()[ 0 ].getRange() )
+   );
+   }
 
this.results[ index ].transclusionModel.insertTransclusionNode( 
fragment );
-   // HACK: Scorch the earth - this is only needed because without 
it,
-   // the reference list won't re-render properly, and can be 
removed
-   // once someone fixes that
-   this.referenceModel.setDocument(
-   doc.cloneFromRange(
-   internalList.getItemNode( 
this.referenceModel.getListIndex() ).getRange()
-   )
-   );
-   this.referenceModel.updateInternalItem( surfaceModel );
-   this.doneStaging = true;
 
+   if ( this.inDialog !== 'reference' ) {
+   // HACK: Scorch the earth - this is only needed because 
without it,
+   // the reference list won't re-render properly, and can 
be removed
+   // once someone fixes that
+   this.referenceModel.setDocument(
+   doc.cloneFromRange(
+   internalList.getItemNode( 
this.referenceModel.getListIndex() ).getRange()
+   )
+   );
+   this.referenceModel.updateInternalItem( surfaceModel );
+   this.doneStaging = true;
+   }
// Close the inspector
this.close();
}
@@ -322,14 +327,13 @@
 ve.ui.CiteFromIdInspector.prototype.getSetupProcess = function ( data ) {
return ve.ui.CiteFromIdInspector.super.prototype.getSetupProcess.call( 
this, data )
.next( function () {
+
// Reset
this.lookupPromise = null;
this.doneStaging = false;
this.results = [];
this.lookupButton.setDisabled( true );
-
-   // Stage an empty reference
-   this.getFragment().getSurface().pushStaging();
+   this.inDialog = data.inDialog || '';
 
// Collapse returns a new fragment, so update 

[MediaWiki-commits] [Gerrit] Added class to remove group selector triangle callout. - change (mediawiki...Translate)

2015-04-14 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged.

Change subject: Added class to remove group selector triangle callout.
..


Added class to remove group selector triangle callout.

Follow-Id: I6e08fcb635ddc8170383d91927d1a2d6eb4be8bf

Change-Id: Ic789fc767eacb0243e748fc2c77b95a2ab49bc7b
---
M resources/css/ext.translate.groupselector.css
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/resources/css/ext.translate.groupselector.css 
b/resources/css/ext.translate.groupselector.css
index 74f0514..d3fdca5 100644
--- a/resources/css/ext.translate.groupselector.css
+++ b/resources/css/ext.translate.groupselector.css
@@ -90,6 +90,12 @@
top: -6px;
 }
 
+/* Remove the triangle shaped callout */
+.tux-groupselector.removecallout:before,
+.tux-groupselector.removecallout:after {
+   content: none;
+}
+
 .grid .tux-groupselector__title {
border: none;
color: #55;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic789fc767eacb0243e748fc2c77b95a2ab49bc7b
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Phoenix303 divyalife...@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Phoenix303 divyalife...@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] Set $wgStatsdServer - change (operations/mediawiki-config)

2015-04-14 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Set $wgStatsdServer
..


Set $wgStatsdServer

This will resume the transmission of stats to statsd.eqiad.wmnet.
For starters, this will send to port , so we can gauge load.

Change-Id: If7f77996bd0d9e14d164878750c3ae2e1d39cf10
---
M wmf-config/CommonSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index b0d1717..b11b203 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -456,7 +456,8 @@
require( getRealmSpecificFilename( $wmfConfigDir/squid.php ) );
 }
 
-if( $wmfRealm == 'production' ) {
+if ( $wmfRealm === 'production' ) {
+   $wgStatsdServer = 'statsd.eqiad.wmnet:';
$wgUDPProfilerHost = 'statsd.eqiad.wmnet';
$wgUDPProfilerPort = 8125;
$wgAggregateStatsID = $wgVersion;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7f77996bd0d9e14d164878750c3ae2e1d39cf10
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@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] UploadForm: Don't set a null context - change (mediawiki/core)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: UploadForm: Don't set a null context
..


UploadForm: Don't set a null context

Breaking Special:Specialpages on master now.

Bug: T96057
Change-Id: Ieb21b4d07af2dc8ea18016568c98b78e390ac2d5
---
M includes/specials/SpecialUpload.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialUpload.php 
b/includes/specials/SpecialUpload.php
index 8390feb..3f1ea42 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -787,7 +787,10 @@
protected $mMaxUploadSize = array();
 
public function __construct( array $options = array(), IContextSource 
$context = null ) {
-   $this-setContext( $context );
+   if ( $context instanceof IContextSource ) {
+   $this-setContext( $context );
+   }
+
$this-mWatch = !empty( $options['watch'] );
$this-mForReUpload = !empty( $options['forreupload'] );
$this-mSessionKey = isset( $options['sessionkey'] ) ? 
$options['sessionkey'] : '';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb21b4d07af2dc8ea18016568c98b78e390ac2d5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur mtrac...@member.fsf.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] Update CentralAuth to 1.25wmf24 HEAD - change (mediawiki/core)

2015-04-14 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204065

Change subject: Update CentralAuth to 1.25wmf24 HEAD
..

Update CentralAuth to 1.25wmf24 HEAD

Change-Id: Ie2d76e084d641ae9d20a513e834582c181cf9703
---
M extensions/CentralAuth
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/204065/1

diff --git a/extensions/CentralAuth b/extensions/CentralAuth
index 3d7bf89..d9bf7ea 16
--- a/extensions/CentralAuth
+++ b/extensions/CentralAuth
-Subproject commit 3d7bf89841421bee6c1147f79e4951a4b6672e10
+Subproject commit d9bf7ea45adc4c7cd5e35ceaa1c05b59dcfac687

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2d76e084d641ae9d20a513e834582c181cf9703
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf24
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] More useful debugging information on unsafe tag attributes - change (oojs/ui)

2015-04-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: More useful debugging information on unsafe tag attributes
..


More useful debugging information on unsafe tag attributes

Bug: T94900
Change-Id: Ifa6d11a433a6c267a6b3cbcb2415bf61013a2ef6
---
M php/Tag.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/php/Tag.php b/php/Tag.php
index 50fffc4..da8c2bf 100644
--- a/php/Tag.php
+++ b/php/Tag.php
@@ -313,7 +313,8 @@
// @codingStandardsIgnoreEnd
 
if ( !( $scheme === null || in_array( 
strtolower( $scheme ), $protocolWhitelist ) ) ) {
-   throw new Exception( Potentially 
unsafe '$key' attribute value );
+   throw new Exception( Potentially 
unsafe '$key' attribute value.  .
+   Scheme: '$scheme'; value: 
'$value'. );
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa6d11a433a6c267a6b3cbcb2415bf61013a2ef6
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Chad ch...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] add ResultToViolationTranslator (basic + CheckResult) - change (mediawiki...WikidataQuality)

2015-04-14 Thread Jonaskeutel (Code Review)
Jonaskeutel has submitted this change and it was merged.

Change subject: add ResultToViolationTranslator (basic + CheckResult)
..


add ResultToViolationTranslator (basic + CheckResult)

also save violations from constraint check in table; therefore slighlty
modified violation and violationStore with comments how to undo the
changes
+ add constants for status + error handling in translator
tests to come

Change-Id: I4bf76f2403f0691fb6c89013b0a4cd22cc8fb471
---
A 
constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
M constraint-report/specials/SpecialConstraintReport.php
A includes/Result/ResultToViolationTranslator.php
M includes/Violations/Violation.php
M includes/Violations/ViolationStore.php
5 files changed, 98 insertions(+), 3 deletions(-)

Approvals:
  Jonaskeutel: Verified; Looks good to me, approved



diff --git 
a/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
 
b/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
new file mode 100644
index 000..3830490
--- /dev/null
+++ 
b/constraint-report/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
@@ -0,0 +1,49 @@
+?php
+
+namespace WikidataQuality\ConstraintReport\ConstraintCheck\Result;
+
+use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\DataModel\Entity\PropertyId;
+use Wikibase\Lib\ClaimGuidGenerator;
+use WikidataQuality\Result\ResultToViolationTranslator;
+use WikidataQuality\Violations\Violation;
+
+
+class CheckResultToViolationTranslator extends ResultToViolationTranslator{
+
+   public function translateToViolation( $checkResultOrArray ) {
+   if( $checkResultOrArray instanceof CheckResult ) {
+   $checkResultArray = array( $checkResultOrArray );
+   } else if( is_array( $checkResultOrArray ) ) {
+   $checkResultArray = $checkResultOrArray;
+   } else {
+   throw new InvalidArgumentException;
+   }
+
+   $violationArray = array();
+   foreach( $checkResultArray as $checkResult ) {
+   if( $checkResult-getStatus() !== 'violation' ){
+   continue;
+   }
+
+   // TODO: Use these line when CheckResult has statement
+   //$statement = $checkResult-getStatement();
+   //$entityId = $statement-getClaim()-getEntityId();
+   $entityId = new ItemId( 'Q90' );
+   $statement = array();
+   $statement[ 'pid' ] = new PropertyId( 'P1' );
+   $statement[ 'claimGuid' ] = 'Q42';
+
+   //TODO: Use real claimGuid
+   $guidGenerator = new ClaimGuidGenerator();
+   $constraintClaimGuid = $guidGenerator-newGuid( 
$entityId );
+   $constraintTypeEntityId = 
$checkResult-getConstraintName();
+   $revisionId = $this-getRevisionIdForEntity( $entityId 
);
+   $status = 'violation';
+
+   $violationArray[] = new Violation( $entityId, 
$statement, $constraintClaimGuid, $constraintTypeEntityId, $revisionId, 
$status);
+   }
+
+   return $violationArray;
+   }
+}
\ No newline at end of file
diff --git a/constraint-report/specials/SpecialConstraintReport.php 
b/constraint-report/specials/SpecialConstraintReport.php
index 1099505..288ebee 100644
--- a/constraint-report/specials/SpecialConstraintReport.php
+++ b/constraint-report/specials/SpecialConstraintReport.php
@@ -13,9 +13,11 @@
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Repo\WikibaseRepo;
 use WikidataQuality\ConstraintReport\ConstraintCheck\ConstraintChecker;
+use 
WikidataQuality\ConstraintReport\ConstraintCheck\Result\CheckResultToViolationTranslator;
 use WikidataQuality\Html\HtmlTable;
 use WikidataQuality\Html\HtmlTableHeader;
 use WikidataQuality\Specials\SpecialCheckResultPage;
+use WikidataQuality\Violations\ViolationStore;
 
 
 /**
@@ -97,6 +99,8 @@
// Run constraint checker
$constraintChecker = new ConstraintChecker( $this-entityLookup 
);
$results = $constraintChecker-execute( $entity );
+
+   $this-saveResultsInViolationsTable( $results );
 
return $results;
}
@@ -283,4 +287,14 @@
'violation' = 'error'
);
}
+
+   /**
+* @param array $results
+*/
+   protected function saveResultsInViolationsTable( $results ) {
+   $translator = new CheckResultToViolationTranslator();
+   $violations = $translator-translateToViolation( $results );
+   $violationStore = new ViolationStore();
+   

  1   2   3   4   >