[MediaWiki-commits] [Gerrit] Fix static call of non-static function - change (mediawiki...UploadWizard)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix static call of non-static function
..


Fix static call of non-static function

Bug: 70942
Change-Id: I1d631cae1c8bf8281317c1d74cf919953d35c27d
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/902
---
M includes/specials/SpecialUploadWizard.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialUploadWizard.php 
b/includes/specials/SpecialUploadWizard.php
index 98bffe7..d1b6d9c 100644
--- a/includes/specials/SpecialUploadWizard.php
+++ b/includes/specials/SpecialUploadWizard.php
@@ -236,13 +236,14 @@
$config['enableChunked'] = 
(bool)$this-getUser()-getOption( 'upwiz-chunked' );
}
 
+   $bitmapHandler = new BitmapHandler();
$this-getOutput()-addJsConfigVars(
array(
'UploadWizardConfig' = $config,
 
// Site name is a true global not specific to 
Upload Wizard
'wgSiteName' = $wgSitename,
-   'wgFileCanRotate' = BitmapHandler::canRotate()
+   'wgFileCanRotate' = 
$bitmapHandler-canRotate(),
)
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d631cae1c8bf8281317c1d74cf919953d35c27d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@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] cp300[12] do not exist - change (operations/puppet)

2014-09-18 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: cp300[12] do not exist
..

cp300[12] do not exist

Change-Id: Iad9bbc402c60c79d75a4d89aad136eba0e515a63
---
M manifests/site.pp
1 file changed, 0 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/161178/1

diff --git a/manifests/site.pp b/manifests/site.pp
index ba27c9f..11faa08 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -569,21 +569,6 @@
 include role::cache::bits
 }
 
-node /^cp300[12]\.esams\.wikimedia\.org$/ {
-
-include admin
-interface::aggregate { 'bond0':
-orig_interface = 'eth0',
-members= [ 'eth0', 'eth1' ],
-}
-
-interface::add_ip6_mapped { 'main':
-require   = Interface::Aggregate['bond0'],
-interface = 'bond0'
-}
-include standard
-}
-
 node /^cp30(0[3-9]|10|1[5-8])\.esams\.(wikimedia\.org|wmnet)$/ {
 
 include admin

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad9bbc402c60c79d75a4d89aad136eba0e515a63
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Create SiteMapper module - change (mediawiki...ContentTranslation)

2014-09-18 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Create SiteMapper module
..

Create SiteMapper module

Change-Id: I5289dd8d61892452f8513bd66e81098eebd871ad
---
M ContentTranslation.hooks.php
M ContentTranslation.php
M Resources.php
M modules/base/ext.cx.base.js
A modules/base/ext.cx.sitemapper.js
M modules/base/ext.cx.util.js
M modules/entrypoint/ext.cx.entrypoint.js
M modules/header/ext.cx.header.js
M modules/source/ext.cx.source.js
M modules/source/ext.cx.source.selector.js
A tests/qunit/base/ext.cx.sitemapper.test.js
D tests/qunit/base/ext.cx.util.test.js
12 files changed, 239 insertions(+), 165 deletions(-)


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

diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index baa414d..8409e6d 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -75,10 +75,12 @@
public static function addConfig( array $vars ) {
global $wgContentTranslationServerURL, 
$wgContentTranslationDomainTemplate,
$wgContentTranslationTranslateInTarget,
-   $wgContentTranslationExperimentalFeatures;
+   $wgContentTranslationExperimentalFeatures,
+   $wgContentTranslationSiteTemplates;
 
$vars['wgContentTranslationServerURL'] = 
$wgContentTranslationServerURL;
$vars['wgContentTranslationDomainTemplate'] = 
$wgContentTranslationDomainTemplate;
+   $vars['wgContentTranslationSiteTemplates'] = 
$wgContentTranslationSiteTemplates;
$vars['wgContentTranslationTranslateInTarget'] = 
$wgContentTranslationTranslateInTarget;
$vars['wgContentTranslationExperimentalFeatures'] = 
$wgContentTranslationExperimentalFeatures;
}
diff --git a/ContentTranslation.php b/ContentTranslation.php
index 007067c..90da953 100644
--- a/ContentTranslation.php
+++ b/ContentTranslation.php
@@ -113,6 +113,16 @@
 $GLOBALS['wgContentTranslationDomainTemplate'] = $1.wikipedia.org;
 
 /**
+ * Patterns to access MediaWiki pages, APIs and cxserver in different languages
+ * for the site family.
+ */
+$GLOBALS['wgContentTranslationSiteTemplates'] = array(
+   'view' = '//$1.wikipedia.org/wiki/$2',
+   'api' = '//$1.wikipedia.org/w/api.php',
+   'cx' = 'http://localhost:8080/page/$1/$2',
+);
+
+/**
  * Whether to open Special:ContentTranslation in the target wiki
  * when clicking the button in the entry point.
  * The domain will be based on $wgContentTranslationDomainTemplate.
diff --git a/Resources.php b/Resources.php
index a9284b4..fe65d4a 100644
--- a/Resources.php
+++ b/Resources.php
@@ -31,6 +31,7 @@
'ext.cx.model',
'ext.cx.header',
'ext.cx.source',
+   'ext.cx.sitemapper',
),
 ) + $resourcePaths;
 
@@ -39,8 +40,17 @@
'base/ext.cx.util.js',
),
'dependencies' = array(
-   'ext.cx.model',
'mediawiki.Uri',
+   ),
+) + $resourcePaths;
+
+$wgResourceModules['ext.cx.sitemapper'] = array(
+   'scripts' = array(
+   'base/ext.cx.sitemapper.js',
+   ),
+   'dependencies' = array(
+   'mediawiki.Uri',
+   'mediawiki.api',
),
 ) + $resourcePaths;
 
@@ -52,11 +62,10 @@
'header/styles/ext.cx.header.less',
),
'dependencies' = array(
-   'mediawiki.jqueryMsg',
-   'mediawiki.Uri',
-   'mediawiki.util',
'ext.cx.publish',
-   'ext.cx.util',
+   'mediawiki.Uri',
+   'mediawiki.jqueryMsg',
+   'mediawiki.util',
),
'messages' = array(
'cx-error-server-connection',
@@ -79,11 +88,12 @@
'base/styles/ext.cx.spinner.less',
),
'dependencies' = array(
-   'mediawiki.jqueryMsg',
-   'mediawiki.api',
+   'ext.cx.util',
'jquery.uls.data',
-   'mediawiki.Uri',
'mediawiki.Title',
+   'mediawiki.Uri',
+   'mediawiki.api',
+   'mediawiki.jqueryMsg',
),
'messages' = array(
'cx-source-view-page',
@@ -100,6 +110,7 @@
'source/styles/ext.cx.source.selector.less',
),
'dependencies' = array(
+   'ext.cx.sitemapper',
'ext.cx.util',
'jquery.uls.data',
),
@@ -117,12 +128,13 @@
'translation/ext.cx.translation.aligner.js',
),
'dependencies' = array(
-   'ext.cx.translation.progress',
-   'jquery.uls.data',
-   'mediawiki.Uri',
-   

[MediaWiki-commits] [Gerrit] Record redirect target in ParserOptions - change (mediawiki/core)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Record redirect target in ParserOptions
..


Record redirect target in ParserOptions

Since Id44d566a, the text passed to the parser when parsing a
redirect=no page no longer contains the #REDIRECT directive. For the
benefit of extensions that want to know the redirect target from various
parser hooks, record the target on the ParserOptions object associated
with the parse.

Bug: 62856
Change-Id: Icd1da9911a43eabacbd9e9a369a8326f67f270ff
---
M includes/content/AbstractContent.php
M includes/content/WikitextContent.php
M includes/parser/ParserOptions.php
M tests/phpunit/includes/content/WikitextContentTest.php
4 files changed, 97 insertions(+), 4 deletions(-)

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



diff --git a/includes/content/AbstractContent.php 
b/includes/content/AbstractContent.php
index 683c959..9d257a6 100644
--- a/includes/content/AbstractContent.php
+++ b/includes/content/AbstractContent.php
@@ -483,7 +483,12 @@
if ( wfRunHooks( 'ContentGetParserOutput',
array( $this, $title, $revId, $options, $generateHtml, 
$po ) ) ) {
 
+   // Save and restore the old value, just in case 
something is reusing
+   // the ParserOptions object in some weird way.
+   $oldRedir = $options-getRedirectTarget();
+   $options-setRedirectTarget( $this-getRedirectTarget() 
);
$this-fillParserOutput( $title, $revId, $options, 
$generateHtml, $po );
+   $options-setRedirectTarget( $oldRedir );
}
 
return $po;
diff --git a/includes/content/WikitextContent.php 
b/includes/content/WikitextContent.php
index 3ab6a6d..9a8ab3a 100644
--- a/includes/content/WikitextContent.php
+++ b/includes/content/WikitextContent.php
@@ -31,6 +31,7 @@
  * @ingroup Content
  */
 class WikitextContent extends TextContent {
+   private $redirectTargetAndText = null;
 
public function __construct( $text ) {
parent::__construct( $text, CONTENT_MODEL_WIKITEXT );
@@ -178,10 +179,17 @@
 */
protected function getRedirectTargetAndText() {
global $wgMaxRedirects;
+
+   if ( $this-redirectTargetAndText !== null ) {
+   return $this-redirectTargetAndText;
+   }
+
if ( $wgMaxRedirects  1 ) {
// redirects are disabled, so quit early
-   return array( null, $this-getNativeData() );
+   $this-redirectTargetAndText = array( null, 
$this-getNativeData() );
+   return $this-redirectTargetAndText;
}
+
$redir = MagicWord::get( 'redirect' );
$text = ltrim( $this-getNativeData() );
if ( $redir-matchStartAndRemove( $text ) ) {
@@ -199,14 +207,17 @@
$title = Title::newFromText( $m[1] );
// If the title is a redirect to bad special 
pages or is invalid, return null
if ( !$title instanceof Title || 
!$title-isValidRedirectTarget() ) {
-   return array( null, 
$this-getNativeData() );
+   $this-redirectTargetAndText = array( 
null, $this-getNativeData() );
+   return $this-redirectTargetAndText;
}
 
-   return array( $title, substr( $text, strlen( 
$m[0] ) ) );
+   $this-redirectTargetAndText = array( $title, 
substr( $text, strlen( $m[0] ) ) );
+   return $this-redirectTargetAndText;
}
}
 
-   return array( null, $this-getNativeData() );
+   $this-redirectTargetAndText = array( null, 
$this-getNativeData() );
+   return $this-redirectTargetAndText;
}
 
/**
diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index 2ca9d50..7e4059b 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -211,6 +211,13 @@
 */
protected $onAccessCallback = null;
 
+   /**
+* If the page being parsed is a redirect, this should hold the redirect
+* target.
+* @var Title|null
+*/
+   private $redirectTarget = null;
+
public function getInterwikiMagic() {
return $this-mInterwikiMagic;
}
@@ -516,6 +523,30 @@
}
 
/**
+* Set the redirect target.
+*
+* Note that setting or changing this does not *make* the page a 
redirect
+* or change its target, it merely records 

[MediaWiki-commits] [Gerrit] cp300[12] do not exist - change (operations/puppet)

2014-09-18 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: cp300[12] do not exist
..


cp300[12] do not exist

Change-Id: Iad9bbc402c60c79d75a4d89aad136eba0e515a63
---
M manifests/site.pp
1 file changed, 0 insertions(+), 15 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index ba27c9f..11faa08 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -569,21 +569,6 @@
 include role::cache::bits
 }
 
-node /^cp300[12]\.esams\.wikimedia\.org$/ {
-
-include admin
-interface::aggregate { 'bond0':
-orig_interface = 'eth0',
-members= [ 'eth0', 'eth1' ],
-}
-
-interface::add_ip6_mapped { 'main':
-require   = Interface::Aggregate['bond0'],
-interface = 'bond0'
-}
-include standard
-}
-
 node /^cp30(0[3-9]|10|1[5-8])\.esams\.(wikimedia\.org|wmnet)$/ {
 
 include admin

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad9bbc402c60c79d75a4d89aad136eba0e515a63
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@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] Unified nginx ssl on varnish at all sites - change (operations/puppet)

2014-09-18 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: Unified nginx ssl on varnish at all sites
..

Unified nginx ssl on varnish at all sites

This just starts the nginx process on the relevant
varnishes (text, mobile, upload, bits), it doesn't
modify the LVS part to switch traffic from lvsX00X
to nginx yet.

Change-Id: I8bb7349030ebb4e68107680444dabac64bee3d73
---
M manifests/role/cache.pp
M manifests/site.pp
2 files changed, 16 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/80/161180/1

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 9544675..8fc2497 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -735,6 +735,10 @@
 description = 'text Varnish cache server',
 }
 
+if $::realm == 'production' {
+include role::cache::ssl::unified
+}
+
 require geoip
 require geoip::dev # for VCL compilation using libGeoIP
 
@@ -887,6 +891,10 @@
 
 system::role { 'role::cache::upload':
 description = 'upload Varnish cache server',
+}
+
+if $::realm == 'production' {
+include role::cache::ssl::unified
 }
 
 class { 'lvs::realserver':
@@ -1106,6 +1114,10 @@
 description = 'bits Varnish cache server',
 }
 
+if $::realm == 'production' {
+include role::cache::ssl::unified
+}
+
 require geoip
 require geoip::dev # for VCL compilation using libGeoIP
 
@@ -1160,6 +1172,10 @@
 description = 'mobile Varnish cache server',
 }
 
+if $::realm == 'production' {
+include role::cache::ssl::unified
+}
+
 include standard
 include nrpe
 
diff --git a/manifests/site.pp b/manifests/site.pp
index 11faa08..5688672 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -620,7 +620,6 @@
 
 $cluster = 'cache_bits'
 include role::cache::bits
-include role::cache::ssl::unified
 }
 
 node /^cp40(0[5-7]|1[3-5])\.ulsfo\.wmnet$/ {
@@ -634,7 +633,6 @@
 
 $cluster = 'cache_upload'
 include role::cache::upload
-include role::cache::ssl::unified
 }
 
 node /^cp40(0[89]|1[0678])\.ulsfo\.wmnet$/ {
@@ -648,7 +646,6 @@
 
 $cluster = 'cache_text'
 include role::cache::text
-include role::cache::ssl::unified
 }
 
 node /^cp40(1[129]|20)\.ulsfo\.wmnet$/ {
@@ -662,7 +659,6 @@
 
 $cluster = 'cache_mobile'
 include role::cache::mobile
-include role::cache::ssl::unified
 }
 
 node 'dataset2.wikimedia.org' {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bb7349030ebb4e68107680444dabac64bee3d73
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Move Namespace.info into Namespace.__dict__ - change (pywikibot/core)

2014-09-18 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Move Namespace.info into Namespace.__dict__
..

Move Namespace.info into Namespace.__dict__

The use of __getattr__ to map Namespace.info into attributes
has caused unpickling bugs and recent build breakages.

Change-Id: I7d1ea917a10c585d57500ebcd41e059078f28fea
---
M pywikibot/site.py
M tests/namespace_tests.py
2 files changed, 16 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/81/161181/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 71f04c1..f884125 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -244,15 +244,8 @@
 else:
 self.aliases = aliases
 
-self.info = kwargs
-
-def __getattr__(self, attr):
-Look for undefined attributes in info.
-if hasattr(self, 'info') and attr in self.info:
-return self.info[attr]
-else:
-raise AttributeError(%s instance has no attribute '%s'
- % (self.__class__.__name__, attr))
+for key, value in kwargs.items():
+setattr(self, key, value)
 
 def _distinct(self):
 if self.custom_name == self.canonical_name:
@@ -358,13 +351,18 @@
 
 def __repr__(self):
 Return a reconstructable representation.
-if self.info:
+standard_attr = ['id', 'custom_name', 'canonical_name', 'aliases']
+extra = [(key, self.__dict__[key])
+ for key in self.__dict__
+ if key not in standard_attr]
+
+if extra:
 kwargs = ', ' + ', '.join([key + '=' + repr(value)
for (key, value) in
-   [(key, self.info[key])
-for key in sorted(self.info)]])
+   extra])
 else:
 kwargs = ''
+
 return '%s(id=%d, custom_name=%r, canonical_name=%r, aliases=%r%s)' \
% (self.__class__.__name__, self.id, self.custom_name,
   self.canonical_name, self.aliases, kwargs)
@@ -4650,7 +4648,10 @@
 self._property_namespace = False
 
 for namespace in self.namespaces().values():
-content_model = namespace.info.get('defaultcontentmodel')
+if not hasattr(namespace, 'defaultcontentmodel'):
+continue
+
+content_model = namespace.defaultcontentmodel
 if content_model == 'wikibase-item':
 self._item_namespace = namespace
 elif content_model == 'wikibase-property':
diff --git a/tests/namespace_tests.py b/tests/namespace_tests.py
index 5dbd47d..e3c3f60 100644
--- a/tests/namespace_tests.py
+++ b/tests/namespace_tests.py
@@ -193,19 +193,13 @@
 % (unicode('Foo'), unicode('Foo'))
 self.assertEqual(s, r)
 
-a.info['defaultcontentmodel'] = 'bar'
-r = {'defaultcontentmodel': 'bar'}
-self.assertEqual(a.info, r)
-
+a.defaultcontentmodel = 'bar'
 s = repr(a)
 r = Namespace(id=0, custom_name=%r, canonical_name=%r, aliases=[], 
defaultcontentmodel='bar') \
 % (unicode('Foo'), unicode('Foo'))
 self.assertEqual(s, r)
 
-a.info['case'] = 'upper'
-r = {'defaultcontentmodel': 'bar', 'case': 'upper'}
-self.assertEqual(a.info, r)
-
+a.case = 'upper'
 s = repr(a)
 r = Namespace(id=0, custom_name=%r, canonical_name=%r, aliases=[], 
case='upper', defaultcontentmodel='bar') \
 % (unicode('Foo'), unicode('Foo'))
@@ -213,7 +207,6 @@
 
 b = eval(repr(a))
 self.assertEqual(a, b)
-self.assertEqual(a.info, b.info)
 
 
 if __name__ == '__main__':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d1ea917a10c585d57500ebcd41e059078f28fea
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] Ensure snmp package on icinga for PDU monitoring - change (operations/puppet)

2014-09-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Ensure snmp package on icinga for PDU monitoring
..

Ensure snmp package on icinga for PDU monitoring

The PDU monitoring uses the commands provided by the snmp package.
Ensure it installed

Change-Id: Ic968b4db7e9ffb41e92cca7710fe268a1e2e9ca8
---
M manifests/facilities.pp
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/161182/1

diff --git a/manifests/facilities.pp b/manifests/facilities.pp
index d6fb1c1..b255eee 100644
--- a/manifests/facilities.pp
+++ b/manifests/facilities.pp
@@ -111,6 +111,13 @@
 
 
 class facilities::pdu_monitoring {
+
+# The PDUs are queried over SNMP using the snmp command provided by the 
snmp
+# package. For now ensure it here but it may need to be put in another 
place
+# in the future
+package { 'snmp':
+ensure = installed,
+}
 # pmtpa
 # C
 monitor_pdu_3phase { 'ps1-c1-pmtpa':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic968b4db7e9ffb41e92cca7710fe268a1e2e9ca8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] rename misc_web_https to misc_web-https for consistency - change (operations/puppet)

2014-09-18 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: rename misc_web_https to misc_web-https for consistency
..

rename misc_web_https to misc_web-https for consistency

(already created new symlink on palladium for pybal)

Change-Id: Icf71e43fda0be04001946d8fcd5985b5b784a0d5
---
M modules/lvs/manifests/configuration.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/83/161183/1

diff --git a/modules/lvs/manifests/configuration.pp 
b/modules/lvs/manifests/configuration.pp
index fbbdf68..b3bd2e9 100644
--- a/modules/lvs/manifests/configuration.pp
+++ b/modules/lvs/manifests/configuration.pp
@@ -581,7 +581,7 @@
 'IdleConnection' = $idleconnection_monitor_options
 },
 },
-'misc_web_https' = {
+'misc_web-https' = {
 'description' = 'Miscellaneous web sites Varnish cluster (HTTPS)',
 'class' = 'high-traffic2',
 'sites' = [ 'eqiad' ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf71e43fda0be04001946d8fcd5985b5b784a0d5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] rename misc_web_https to misc_web-https for consistency - change (operations/puppet)

2014-09-18 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: rename misc_web_https to misc_web-https for consistency
..


rename misc_web_https to misc_web-https for consistency

(already created new symlink on palladium for pybal)

Change-Id: Icf71e43fda0be04001946d8fcd5985b5b784a0d5
---
M modules/lvs/manifests/configuration.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/lvs/manifests/configuration.pp 
b/modules/lvs/manifests/configuration.pp
index fbbdf68..b3bd2e9 100644
--- a/modules/lvs/manifests/configuration.pp
+++ b/modules/lvs/manifests/configuration.pp
@@ -581,7 +581,7 @@
 'IdleConnection' = $idleconnection_monitor_options
 },
 },
-'misc_web_https' = {
+'misc_web-https' = {
 'description' = 'Miscellaneous web sites Varnish cluster (HTTPS)',
 'class' = 'high-traffic2',
 'sites' = [ 'eqiad' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf71e43fda0be04001946d8fcd5985b5b784a0d5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't show link to translation centre till it is ready - change (mediawiki...ContentTranslation)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't show link to translation centre till it is ready
..


Don't show link to translation centre till it is ready

Did not remove the code, just commented out the code to append it to
the header

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

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



diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js
index 617a263..ecf90bd 100644
--- a/modules/header/ext.cx.header.js
+++ b/modules/header/ext.cx.header.js
@@ -184,7 +184,7 @@
 
$headerBar = $( 'div' )
.addClass( 'cx-header__bar' )
-   .append( $translationCenter, this.$publishButton );
+   .append( /*$translationCenter,*/ this.$publishButton );
 
this.$infoBar = $( 'div' )
.addClass( 'cx-header__infobar' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica80f5737d35da6b504053da66c4a424f62f3825
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] varnish:qualify vars - change (operations/puppet)

2014-09-18 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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

Change subject: varnish:qualify vars
..

varnish:qualify vars

Change-Id: I2137b88b07e4d467321c073a8f54914cb7391378
---
M modules/varnish/templates/varnish-default.erb
M modules/varnish/templates/varnish.init.erb
M modules/varnish/templates/varnishncsa.init.erb
M modules/varnish/templates/vcl/wikimedia.vcl.erb
4 files changed, 46 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/84/161184/1

diff --git a/modules/varnish/templates/varnish-default.erb 
b/modules/varnish/templates/varnish-default.erb
index 74611f7..fc680da 100644
--- a/modules/varnish/templates/varnish-default.erb
+++ b/modules/varnish/templates/varnish-default.erb
@@ -53,17 +53,17 @@
 # See varnishd(1) for more information.
 #
 # # Main configuration file. You probably want to change it :)
-VARNISH_VCL_CONF=/etc/varnish/wikimedia_%= vcl %.vcl
+VARNISH_VCL_CONF=/etc/varnish/wikimedia_%= @vcl %.vcl
 #
 # # Default address and port to bind to
 # # Blank address means all IPv4 and IPv6 interfaces, otherwise specify
 # # a host name, an IPv4 dotted quad, or an IPv6 address in brackets.
 VARNISH_LISTEN_ADDRESS=
-VARNISH_LISTEN_PORT=%= varnish_port %
+VARNISH_LISTEN_PORT=%= @varnish_port %
 
 # # Telnet admin interface listen address and port
 VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
-VARNISH_ADMIN_LISTEN_PORT=%= varnish_admin_port %
+VARNISH_ADMIN_LISTEN_PORT=%= @varnish_admin_port %

 #
 # # The minimum number of worker threads to start
@@ -90,7 +90,7 @@
 # # Backend storage specification
 # VARNISH_STORAGE=file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}
 
-VARNISH_STORAGE=%= varnish_storage %
+VARNISH_STORAGE=%= @varnish_storage %
 
 # # Default TTL used when the backend does not specify one
 # VARNISH_TTL=120
@@ -106,9 +106,9 @@
 #  -s ${VARNISH_STORAGE}
 #
 
-EXTRA_OPTS=-p user=varnish -p thread_pool_add_delay=1 -p 
thread_pool_stack=131072 -p listen_depth=4096 -p session_max=20 -p 
vcc_err_unref=off -p nuke_limit=300 -p shm_reclen=1024 %= runtime_params %
+EXTRA_OPTS=-p user=varnish -p thread_pool_add_delay=1 -p 
thread_pool_stack=131072 -p listen_depth=4096 -p session_max=20 -p 
vcc_err_unref=off -p nuke_limit=300 -p shm_reclen=1024 %= @runtime_params %
 % if has_variable?(extraopts) then %
-EXTRA_OPTS=$EXTRA_OPTS %= extraopts %
+EXTRA_OPTS=$EXTRA_OPTS %= @extraopts %
 % end %
 
 ## Alternative 4, Do It Yourself
diff --git a/modules/varnish/templates/varnish.init.erb 
b/modules/varnish/templates/varnish.init.erb
index de7cb81..c96be95 100755
--- a/modules/varnish/templates/varnish.init.erb
+++ b/modules/varnish/templates/varnish.init.erb
@@ -16,7 +16,7 @@
 # Source function library
 . /lib/lsb/init-functions
 
-NAME=varnishd%= instancesuffix %
+NAME=varnishd%= @instancesuffix %
 DESC=HTTP accelerator
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/varnishd
@@ -25,8 +25,8 @@
 test -x $DAEMON || exit 0
 
 # Include varnish defaults if available
-if [ -f /etc/default/varnish%= instancesuffix % ] ; then
-. /etc/default/varnish%= instancesuffix %
+if [ -f /etc/default/varnish%= @instancesuffix % ] ; then
+. /etc/default/varnish%= @instancesuffix %
 fi
 
 # Open files (usually 1024, which is way too small for varnish)
@@ -40,7 +40,7 @@
 # installed application server.)
 DAEMON_OPTS=${DAEMON_OPTS:--b localhost}
 
-% if cluster_options.fetch( enable_geoiplookup, false ) -%
+% if @cluster_options.fetch( enable_geoiplookup, false ) -%
 # Bash sucks
 CC_COMMAND=exec cc -fpic -shared -Wl,-x -L/usr/local/lib/ -o %o %s -lGeoIP
 % end %
@@ -54,7 +54,7 @@
do
if start-stop-daemon \
--start --quiet --pidfile ${PIDFILE} --exec 
${DAEMON} -- \
-   -P ${PIDFILE} ${DAEMON_OPTS} % if 
cluster_options.fetch(enable_geoiplookup, false) -%-p 
cc_command=${CC_COMMAND}% end -%  ${output} 21; then
+   -P ${PIDFILE} ${DAEMON_OPTS} % if 
@cluster_options.fetch(enable_geoiplookup, false) -%-p 
cc_command=${CC_COMMAND}% end -%  ${output} 21; then
log_end_msg 0
break
else
@@ -82,7 +82,7 @@
reload)
log_daemon_msg Reloading $DESC
log_progress_msg $NAME
-   if /usr/share/varnish/reload-vcl %= extraopts % -q; then
+   if /usr/share/varnish/reload-vcl %= @extraopts % -q; then
log_end_msg 0
else
log_end_msg 1
diff --git a/modules/varnish/templates/varnishncsa.init.erb 
b/modules/varnish/templates/varnishncsa.init.erb
index 53ff4f3..bf87f0b 100755
--- a/modules/varnish/templates/varnishncsa.init.erb
+++ b/modules/varnish/templates/varnishncsa.init.erb
@@ -13,7 +13,7 @@
 # Source function 

[MediaWiki-commits] [Gerrit] Remove special Watchlist star handling on Flow boards - change (mediawiki...Flow)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove special Watchlist star handling on Flow boards
..


Remove special Watchlist star handling on Flow boards

Notice the slightly hacky way to still rely on MW's default watch star handling
(I didn't want to throw that away for consistency - don't want to go
reimplement triggered events, spinning stars, ...) but show our own tooltip
instead.

This patch simply adjusts the message within the standard mw notification
when watchlisting the board.  It replaces the default message with our
own.

Change-Id: I3f31544d83ee60f11454bdd8d4a8f31e508bd706
---
M Hooks.php
M Resources.php
M handlebars/Makefile
M handlebars/compiled/flow_board.handlebars.php
D handlebars/compiled/flow_board_watch_link.handlebars.php
M handlebars/flow_board.handlebars
D handlebars/flow_board_watch_link.handlebars
A handlebars/flow_subscribed.handlebars
M handlebars/flow_tooltip_subscribed.handlebars
M includes/View.php
M modules/new/components/flow-board.js
M modules/new/styles/common.less
12 files changed, 56 insertions(+), 124 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index 74bcca6..87f4683 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -353,9 +353,11 @@
 
$selected = $template-getRequest()-getVal( 'action' ) 
== 'history';
 
-   // watch star links are inside the board itself
-   unset( $links['actions']['watch'] );
-   unset( $links['actions']['unwatch'] );
+   // watch star links are inside the topic itself
+   if ( $title-getNamespace() === NS_TOPIC ) {
+   unset( $links['actions']['watch'] );
+   unset( $links['actions']['unwatch'] );
+   }
 
$links['views'] = array( array(
'class' = $selected ? 'selected' : '',
diff --git a/Resources.php b/Resources.php
index 7f20588..199883b 100644
--- a/Resources.php
+++ b/Resources.php
@@ -42,7 +42,6 @@
flow_board.handlebars,
flow_board_collapsers_subcomponent.handlebars,
flow_board_navigation.handlebars,
-   'flow_board_watch_link.handlebars',
flow_edit_post.handlebars,
flow_edit_post_ajax.handlebars,
flow_edit_topic_title.handlebars,
@@ -65,6 +64,7 @@
flow_no_more.handlebars,
flow_tooltip.handlebars,
flow_tooltip_subscribed.handlebars,
+   flow_subscribed.handlebars,
flow_topic.handlebars,
flow_topic_titlebar.handlebars,
flow_topic_titlebar_lock.handlebars,
diff --git a/handlebars/Makefile b/handlebars/Makefile
index 9c58848..8f81db9 100644
--- a/handlebars/Makefile
+++ b/handlebars/Makefile
@@ -47,7 +47,6 @@
compiled/flow_block_topicsummary_single_view.handlebars.php \
compiled/flow_block_topicsummary_diff_view.handlebars.php \
compiled/flow_board.handlebars.php \
-   compiled/flow_board_watch_link.handlebars.php \
compiled/flow_form_buttons.handlebars.php \
compiled/flow_post.handlebars.php \
compiled/flow_tooltip.handlebars.php \
@@ -167,13 +166,8 @@
 
 compiled/flow_board.handlebars.php: \
flow_board.handlebars \
-   flow_block_loop.handlebars \
-   flow_board_watch_link.handlebars
+   flow_block_loop.handlebars
$(COMPILE) flow_board
-
-compiled/flow_board_watch_link.handlebars.php: \
-   flow_board_watch_link.handlebars
-   $(COMPILE) flow_board_watch_link
 
 compiled/flow_form_buttons.handlebars.php: \
flow_form_buttons.handlebars
diff --git a/handlebars/compiled/flow_board.handlebars.php 
b/handlebars/compiled/flow_board.handlebars.php
index e76d3c1..0c3af46 100644
--- a/handlebars/compiled/flow_board.handlebars.php
+++ b/handlebars/compiled/flow_board.handlebars.php
@@ -9,8 +9,7 @@
 'mustlok' = false,
 'debug' = $debugopt,
 ),
-'helpers' = Array('html' = 
'Flow\TemplateHelper::htmlHelper',
-'block' = 'Flow\TemplateHelper::block',
+'helpers' = Array('block' = 'Flow\TemplateHelper::block',
 ),
 'blockhelpers' = Array(),
 'hbhelpers' = Array(),
@@ -19,31 +18,6 @@
 
 );
 return 'div class=flow-component data-flow-component=board 
data-flow-id='.htmlentities(((is_array($in)  isset($in['workflow'])) ? 
$in['workflow'] : null), ENT_QUOTES, 'UTF-8').'
-   '.((LCRun3::ifvar($cx, 

[MediaWiki-commits] [Gerrit] Repair usage of ImmediateWatchTopicListener - change (mediawiki...Flow)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Repair usage of ImmediateWatchTopicListener
..


Repair usage of ImmediateWatchTopicListener

Change-Id: Ic0596f6ea2652764bd8fa324ae218c9f40010f93
---
M FlowActions.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/FlowActions.php b/FlowActions.php
index 4f767e5..888f4b5 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -145,7 +145,7 @@
),
'handler-class' = 'Flow\Actions\EditTitleAction',
'watch' = array(
-   'immediate' = array( 
'Flow\\Data\\ImmediateWatchTopicListener', 'getCurrentUser' ),
+   'immediate' = array( 
'Flow\\Data\\Listener\\ImmediateWatchTopicListener', 'getCurrentUser' ),
),
),
 
@@ -172,7 +172,7 @@
),
'handler-class' = 'Flow\Actions\NewTopicAction',
'watch' = array(
-   'immediate' = array( 
'Flow\\Data\\ImmediateWatchTopicListener', 'getCurrentUser' ),
+   'immediate' = array( 
'Flow\\Data\\Listener\\ImmediateWatchTopicListener', 'getCurrentUser' ),
),
),
 
@@ -204,7 +204,7 @@
),
'handler-class' = 'Flow\Actions\EditPostAction',
'watch' = array(
-   'immediate' = array( 
'Flow\\Data\\ImmediateWatchTopicListener', 'getCurrentUser' ),
+   'immediate' = array( 
'Flow\\Data\\Listener\\ImmediateWatchTopicListener', 'getCurrentUser' ),
),
),
 
@@ -556,7 +556,7 @@
),
'handler-class' = 'Flow\Actions\ReplyAction',
'watch' = array(
-   'immediate' = array( 
'Flow\\Data\\ImmediateWatchTopicListener', 'getCurrentUser' ),
+   'immediate' = array( 
'Flow\\Data\\Listener\\ImmediateWatchTopicListener', 'getCurrentUser' ),
),
),
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0596f6ea2652764bd8fa324ae218c9f40010f93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: SG shah...@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] AbstractRevision::getUser() should actually return the user - change (mediawiki...Flow)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: AbstractRevision::getUser() should actually return the user
..


AbstractRevision::getUser() should actually return the user

Change-Id: Ib0e5f2b544eff9ac5a27628b0ea87b431bd73502
---
M includes/Model/AbstractRevision.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/Model/AbstractRevision.php 
b/includes/Model/AbstractRevision.php
index 24fa3d4..7ffb609 100644
--- a/includes/Model/AbstractRevision.php
+++ b/includes/Model/AbstractRevision.php
@@ -375,8 +375,11 @@
return $this-user-wiki;
}
 
+   /**
+* @return User
+*/
public function getUser() {
-   $this-user-createUser();
+   return $this-user-createUser();
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0e5f2b544eff9ac5a27628b0ea87b431bd73502
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: SG shah...@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] Templates: Skip multipart templates - change (mediawiki...ContentTranslation)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Templates: Skip multipart templates
..


Templates: Skip multipart templates

Fixes a javascript error while loading articles like en:Debian
Uncaught TypeError: Cannot read property 'target' of undefined

Change-Id: Iaeea8b854d605084331f0dcfeb1c7a8b2f4f046b
---
M modules/source/ext.cx.source.filter.js
M modules/tools/ext.cx.tools.template.js
2 files changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/modules/source/ext.cx.source.filter.js 
b/modules/source/ext.cx.source.filter.js
index 42ad2d0..52d0845 100644
--- a/modules/source/ext.cx.source.filter.js
+++ b/modules/source/ext.cx.source.filter.js
@@ -68,7 +68,11 @@
$template = $( this );
 
mwData = $template.data( 'mw' );
-   if ( !mwData ) {
+   if ( !mwData || mwData.parts.length  1 ) {
+   // Either the template is missing mw data or 
having multiple
+   // parts. At present, we cannot handle them.
+   // An example: {{Version |o |1.1}}{{efn-ua |Due 
to an incident ...ref name=releases /}}
+   // in enwiki:Debian, Timeline table.
mw.log( '[CX] Skipping template!' );
return;
}
diff --git a/modules/tools/ext.cx.tools.template.js 
b/modules/tools/ext.cx.tools.template.js
index 5177c8b..86dad87 100644
--- a/modules/tools/ext.cx.tools.template.js
+++ b/modules/tools/ext.cx.tools.template.js
@@ -136,7 +136,11 @@
this.templateData = this.getTemplateData();
this.templateMapping = this.getTemplateMapping();
 
-   if ( !this.templateData ) {
+   if ( !this.templateData || this.templateData.parts.length  1 ) 
{
+   // Either the template is missing mw data or having 
multiple
+   // parts. At present, we cannot handle them.
+   // An example: {{Version |o |1.1}}{{efn-ua |Due to an 
incident ...ref name=releases /}}
+   // in enwiki:Debian, Timeline table.
mw.log( '[CX] Skipping template. Missing template 
data.' );
 
return;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaeea8b854d605084331f0dcfeb1c7a8b2f4f046b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: KartikMistry kartik.mis...@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] composer-compatible extension - change (mediawiki...UserFunctions)

2014-09-18 Thread Toniher (Code Review)
Toniher has uploaded a new change for review.

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

Change subject: composer-compatible extension
..

composer-compatible extension

making extension compatible with composer

Change-Id: I26c6cc85d2a4113b722ac8775fa0642a0420df7a

adding composer.json

Change-Id: Idb0cab56d1161a2676cc92c4db5523752fc3fd7e
---
M UserFunctions.php
A composer.json
2 files changed, 60 insertions(+), 37 deletions(-)


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

diff --git a/UserFunctions.php b/UserFunctions.php
index 5d0366f..dbf4563 100644
--- a/UserFunctions.php
+++ b/UserFunctions.php
@@ -1,7 +1,7 @@
 ?php
 /**
  * UserFunctions extension - Provides a set of dynamic parser functions that 
trigger on the current user.
- * @version 2.4.3 - 2014/03/16 (Based on ParserFunctions)
+ * @version 2.6.0 - 2014/09/18 (Based on ParserFunctions)
  *
  * @link http://www.mediawiki.org/wiki/Extension:UserFunctions Documentation
  *
@@ -23,38 +23,42 @@
die( 'This file is a MediaWiki extension, it is not a valid entry 
point' );
 }
 
-/**
- * Enable Personal Data Functions
- * Set this to true if you want your users to be able to use the following 
functions:
- * realname, username, useremail, nickname, ip
- * WARNING: These functions can be used to leak your user's email addresses 
and real names.
- * If unsure, don't activate these features.
-**/
-$wgUFEnablePersonalDataFunctions = false;
+//self executing anonymous function to prevent global scope assumptions
+call_user_func( function() {
 
-/** Allow to be used in places such as SF form **/
-$wgUFEnableSpecialContexts = true;
+   /**
+* Enable Personal Data Functions
+* Set this to true if you want your users to be able to use the 
following functions:
+* realname, username, useremail, nickname, ip
+* WARNING: These functions can be used to leak your user's email 
addresses and real names.
+* If unsure, don't activate these features.
+   **/
+   $GLOBALS['wgUFEnablePersonalDataFunctions'] = false;
 
-/** Restrict to certain namespaces **/
-$wgUFAllowedNamespaces = array(
-   NS_MEDIAWIKI = true
-);
+   /** Allow to be used in places such as SF form **/
+   $GLOBALS['wgUFEnableSpecialContexts'] = true;
 
-$wgExtensionCredits['parserhook'][] = array(
-   'path' = __FILE__,
-   'name' = 'UserFunctions',
-   'version' = '2.5.0',
-   'url' = 'https://www.mediawiki.org/wiki/Extension:UserFunctions',
-   'author' = array( 'Algorithm ', 'Toniher', 'Kghbln', 'Wikinaut', 
'Reedy', '...' ),
-   'descriptionmsg' = 'userfunctions-desc',
-);
+   /** Restrict to certain namespaces **/
+   $GLOBALS['wgUFAllowedNamespaces'] = array(
+   NS_MEDIAWIKI = true
+   );
 
-$wgAutoloadClasses['ExtUserFunctions'] = 
dirname(__FILE__).'/UserFunctions_body.php';
-$wgMessagesDirs['UserFunctions'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['UserFunctions'] = dirname( __FILE__ ) . 
'/UserFunctions.i18n.php';
-$wgExtensionMessagesFiles['UserFunctionsMagic'] = dirname( __FILE__ ) . 
'/UserFunctions.i18n.magic.php';
+   $GLOBALS['wgExtensionCredits']['parserhook'][] = array(
+   'path' = __FILE__,
+   'name' = 'UserFunctions',
+   'version' = '2.6.0',
+   'url' = 
'https://www.mediawiki.org/wiki/Extension:UserFunctions',
+   'author' = array( 'Algorithm ', 'Toniher', 'Kghbln', 
'Wikinaut', 'Reedy', '...' ),
+   'descriptionmsg' = 'userfunctions-desc',
+   );
 
-$wgHooks['ParserFirstCallInit'][] = 'wfRegisterUserFunctions';
+   $GLOBALS['wgAutoloadClasses']['ExtUserFunctions'] = 
dirname(__FILE__).'/UserFunctions_body.php';
+   $GLOBALS['wgMessagesDirs']['UserFunctions'] = __DIR__ . '/i18n';
+   $GLOBALS['wgExtensionMessagesFiles']['UserFunctions'] = dirname( 
__FILE__ ) . '/UserFunctions.i18n.php';
+   $GLOBALS['wgExtensionMessagesFiles']['UserFunctionsMagic'] = dirname( 
__FILE__ ) . '/UserFunctions.i18n.magic.php';
+
+   $GLOBALS['wgHooks']['ParserFirstCallInit'][] = 
'wfRegisterUserFunctions';
+});
 
 /**
  * @param $parser Parser
@@ -77,23 +81,22 @@
$process = false;
 
// As far it's not special case, check if current page NS is in the 
allowed list
-   if (!$special) {
-   if (isset($wgUFAllowedNamespaces[$cur_ns])) {
-   if ($wgUFAllowedNamespaces[$cur_ns]) {
+   if ( !$special ) {
+   if ( isset( $wgUFAllowedNamespaces[$cur_ns] ) ) {
+   if ( $wgUFAllowedNamespaces[$cur_ns] ) {
$process = true;
}
}
}
else {
-   if ($wgUFEnableSpecialContexts) {
-
-if ($special) {
-$process = true;
-   

[MediaWiki-commits] [Gerrit] kill dead/strange videos protoproxy - change (operations/puppet)

2014-09-18 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: kill dead/strange videos protoproxy
..

kill dead/strange videos protoproxy

Change-Id: Ib584615e66de13113ebab073b436e07f042efe18
---
M manifests/role/protoproxy.pp
1 file changed, 0 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/161186/1

diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index 367a860..7caa31c 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -134,20 +134,6 @@
 ipv6_enabled = true,
 enabled = true,
 }
-# Misc services
-protoproxy{ 'videos':
-proxy_addresses = {
-'eqiad' = [ '208.80.154.224', '[2620:0:862:3::80:2]' ],
-'esams' = [] },
-proxy_server_name = 'videos.wikimedia.org',
-proxy_server_cert_name = 'unified.wikimedia.org',
-proxy_backend = {
-'eqiad' = { 'primary' = '10.64.16.146' },
-'esams' = { 'primary' = '10.2.3.25', 'secondary' = 
'208.80.154.224' },
-},
-ssl_backend = { 'esams' = 'true' },
-enabled = true,
-}
 }
 
 class role::protoproxy::ssl::beta::common {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib584615e66de13113ebab073b436e07f042efe18
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] composer-compatible extension - change (mediawiki...UserFunctions)

2014-09-18 Thread Toniher (Code Review)
Toniher has submitted this change and it was merged.

Change subject: composer-compatible extension
..


composer-compatible extension

making extension compatible with composer

Change-Id: I26c6cc85d2a4113b722ac8775fa0642a0420df7a

adding composer.json

Change-Id: Idb0cab56d1161a2676cc92c4db5523752fc3fd7e
---
M UserFunctions.php
A composer.json
2 files changed, 60 insertions(+), 37 deletions(-)

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



diff --git a/UserFunctions.php b/UserFunctions.php
index 5d0366f..dbf4563 100644
--- a/UserFunctions.php
+++ b/UserFunctions.php
@@ -1,7 +1,7 @@
 ?php
 /**
  * UserFunctions extension - Provides a set of dynamic parser functions that 
trigger on the current user.
- * @version 2.4.3 - 2014/03/16 (Based on ParserFunctions)
+ * @version 2.6.0 - 2014/09/18 (Based on ParserFunctions)
  *
  * @link http://www.mediawiki.org/wiki/Extension:UserFunctions Documentation
  *
@@ -23,38 +23,42 @@
die( 'This file is a MediaWiki extension, it is not a valid entry 
point' );
 }
 
-/**
- * Enable Personal Data Functions
- * Set this to true if you want your users to be able to use the following 
functions:
- * realname, username, useremail, nickname, ip
- * WARNING: These functions can be used to leak your user's email addresses 
and real names.
- * If unsure, don't activate these features.
-**/
-$wgUFEnablePersonalDataFunctions = false;
+//self executing anonymous function to prevent global scope assumptions
+call_user_func( function() {
 
-/** Allow to be used in places such as SF form **/
-$wgUFEnableSpecialContexts = true;
+   /**
+* Enable Personal Data Functions
+* Set this to true if you want your users to be able to use the 
following functions:
+* realname, username, useremail, nickname, ip
+* WARNING: These functions can be used to leak your user's email 
addresses and real names.
+* If unsure, don't activate these features.
+   **/
+   $GLOBALS['wgUFEnablePersonalDataFunctions'] = false;
 
-/** Restrict to certain namespaces **/
-$wgUFAllowedNamespaces = array(
-   NS_MEDIAWIKI = true
-);
+   /** Allow to be used in places such as SF form **/
+   $GLOBALS['wgUFEnableSpecialContexts'] = true;
 
-$wgExtensionCredits['parserhook'][] = array(
-   'path' = __FILE__,
-   'name' = 'UserFunctions',
-   'version' = '2.5.0',
-   'url' = 'https://www.mediawiki.org/wiki/Extension:UserFunctions',
-   'author' = array( 'Algorithm ', 'Toniher', 'Kghbln', 'Wikinaut', 
'Reedy', '...' ),
-   'descriptionmsg' = 'userfunctions-desc',
-);
+   /** Restrict to certain namespaces **/
+   $GLOBALS['wgUFAllowedNamespaces'] = array(
+   NS_MEDIAWIKI = true
+   );
 
-$wgAutoloadClasses['ExtUserFunctions'] = 
dirname(__FILE__).'/UserFunctions_body.php';
-$wgMessagesDirs['UserFunctions'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['UserFunctions'] = dirname( __FILE__ ) . 
'/UserFunctions.i18n.php';
-$wgExtensionMessagesFiles['UserFunctionsMagic'] = dirname( __FILE__ ) . 
'/UserFunctions.i18n.magic.php';
+   $GLOBALS['wgExtensionCredits']['parserhook'][] = array(
+   'path' = __FILE__,
+   'name' = 'UserFunctions',
+   'version' = '2.6.0',
+   'url' = 
'https://www.mediawiki.org/wiki/Extension:UserFunctions',
+   'author' = array( 'Algorithm ', 'Toniher', 'Kghbln', 
'Wikinaut', 'Reedy', '...' ),
+   'descriptionmsg' = 'userfunctions-desc',
+   );
 
-$wgHooks['ParserFirstCallInit'][] = 'wfRegisterUserFunctions';
+   $GLOBALS['wgAutoloadClasses']['ExtUserFunctions'] = 
dirname(__FILE__).'/UserFunctions_body.php';
+   $GLOBALS['wgMessagesDirs']['UserFunctions'] = __DIR__ . '/i18n';
+   $GLOBALS['wgExtensionMessagesFiles']['UserFunctions'] = dirname( 
__FILE__ ) . '/UserFunctions.i18n.php';
+   $GLOBALS['wgExtensionMessagesFiles']['UserFunctionsMagic'] = dirname( 
__FILE__ ) . '/UserFunctions.i18n.magic.php';
+
+   $GLOBALS['wgHooks']['ParserFirstCallInit'][] = 
'wfRegisterUserFunctions';
+});
 
 /**
  * @param $parser Parser
@@ -77,23 +81,22 @@
$process = false;
 
// As far it's not special case, check if current page NS is in the 
allowed list
-   if (!$special) {
-   if (isset($wgUFAllowedNamespaces[$cur_ns])) {
-   if ($wgUFAllowedNamespaces[$cur_ns]) {
+   if ( !$special ) {
+   if ( isset( $wgUFAllowedNamespaces[$cur_ns] ) ) {
+   if ( $wgUFAllowedNamespaces[$cur_ns] ) {
$process = true;
}
}
}
else {
-   if ($wgUFEnableSpecialContexts) {
-
-if ($special) {
-$process = true;
-}
+   if ( $wgUFEnableSpecialContexts ) {
+  

[MediaWiki-commits] [Gerrit] kill dead/strange videos protoproxy - change (operations/puppet)

2014-09-18 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: kill dead/strange videos protoproxy
..


kill dead/strange videos protoproxy

Change-Id: Ib584615e66de13113ebab073b436e07f042efe18
---
M manifests/role/protoproxy.pp
1 file changed, 0 insertions(+), 14 deletions(-)

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



diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index 367a860..7caa31c 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -134,20 +134,6 @@
 ipv6_enabled = true,
 enabled = true,
 }
-# Misc services
-protoproxy{ 'videos':
-proxy_addresses = {
-'eqiad' = [ '208.80.154.224', '[2620:0:862:3::80:2]' ],
-'esams' = [] },
-proxy_server_name = 'videos.wikimedia.org',
-proxy_server_cert_name = 'unified.wikimedia.org',
-proxy_backend = {
-'eqiad' = { 'primary' = '10.64.16.146' },
-'esams' = { 'primary' = '10.2.3.25', 'secondary' = 
'208.80.154.224' },
-},
-ssl_backend = { 'esams' = 'true' },
-enabled = true,
-}
 }
 
 class role::protoproxy::ssl::beta::common {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib584615e66de13113ebab073b436e07f042efe18
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@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 upload if manual - change (analytics/zero-sms)

2014-09-18 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Don't upload if manual
..

Don't upload if manual

Change-Id: Ie2a080845a8915407c3806b734b05f7a408b1131
---
M scripts/weblogs.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms 
refs/changes/88/161188/1

diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index df9bc87..6a89fa1 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -30,6 +30,7 @@
 def __init__(self, settingsFile='settings/weblogs.json', 
logDatePattern=False):
 super(WebLogProcessor, self).__init__(settingsFile, 'web')
 
+self.enableUpload = not logDatePattern
 # zero.tsv.log-20140808.gz
 if not logDatePattern:
 logDatePattern = r'\d+'
@@ -320,7 +321,9 @@
 
 def run(self):
 newDataFound = self.processLogFiles()
-if not newDataFound and os.path.isfile(self.combinedFile):
+if not self.enableUpload:
+safePrint('Uploading disabled, quiting')
+elif not newDataFound and os.path.isfile(self.combinedFile):
 safePrint('No new data, we are done')
 else:
 stats = self.combineStats()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2a080845a8915407c3806b734b05f7a408b1131
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't upload if manual - change (analytics/zero-sms)

2014-09-18 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Don't upload if manual
..


Don't upload if manual

Change-Id: Ie2a080845a8915407c3806b734b05f7a408b1131
---
M scripts/weblogs.py
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index df9bc87..6a89fa1 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -30,6 +30,7 @@
 def __init__(self, settingsFile='settings/weblogs.json', 
logDatePattern=False):
 super(WebLogProcessor, self).__init__(settingsFile, 'web')
 
+self.enableUpload = not logDatePattern
 # zero.tsv.log-20140808.gz
 if not logDatePattern:
 logDatePattern = r'\d+'
@@ -320,7 +321,9 @@
 
 def run(self):
 newDataFound = self.processLogFiles()
-if not newDataFound and os.path.isfile(self.combinedFile):
+if not self.enableUpload:
+safePrint('Uploading disabled, quiting')
+elif not newDataFound and os.path.isfile(self.combinedFile):
 safePrint('No new data, we are done')
 else:
 stats = self.combineStats()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2a080845a8915407c3806b734b05f7a408b1131
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@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] Make use of dh_auto_install to install php.ini - change (operations...hhvm)

2014-09-18 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: Make use of dh_auto_install to install php.ini
..

Make use of dh_auto_install to install php.ini

Change-Id: I822733d1f3476f25e5b43c88f48122f56e980226
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M debian/hhvm.install
R debian/php.ini
M debian/rules
3 files changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm 
refs/changes/87/161187/1

diff --git a/debian/hhvm.install b/debian/hhvm.install
index 72eba63..22ff506 100644
--- a/debian/hhvm.install
+++ b/debian/hhvm.install
@@ -1 +1,2 @@
 usr/bin/hhvm
+debian/php.ini /etc/hhvm
diff --git a/debian/hhvm.ini b/debian/php.ini
similarity index 100%
rename from debian/hhvm.ini
rename to debian/php.ini
diff --git a/debian/rules b/debian/rules
index e18850b..50d804f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,9 +36,4 @@
[ -n $${hhvmapi} ]  echo 
hhvm:ApiVersion=hhvm-api-$${hhvmapi}  debian/hhvm.substvars
dh_gencontrol
 
-override_dh_auto_install:
-   dh_auto_install
-   # Install the default ini file.
-   install -m644 $(CURDIR)/debian/hhvm.ini 
$(CURDIR)/debian/hhvm/etc/hhvm/php.ini
-
-.PHONY: override_dh_auto_build override_dh_auto_configure 
override_dh_auto_test override_dh_strip override_dh_gencontrol 
override_dh_auto_install
+.PHONY: override_dh_auto_build override_dh_auto_configure 
override_dh_auto_test override_dh_strip override_dh_gencontrol

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I822733d1f3476f25e5b43c88f48122f56e980226
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/hhvm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Also fill above heading when clicking a placeholder - change (mediawiki...ContentTranslation)

2014-09-18 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Also fill above heading when clicking a placeholder
..

Also fill above heading when clicking a placeholder

The heading is only filled if it contains no translation yet and
it is a preceeding parent header of the section just clicked.

Change-Id: Ib6012d7bfa0fc8f12c82e64256fe02a12267d16c
---
M Resources.php
M hooks.md
M modules/source/ext.cx.source.js
M modules/translation/ext.cx.translation.js
A tests/qunit/translation/ext.cx.translation.test.js
5 files changed, 100 insertions(+), 4 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index a9284b4..548401a 100644
--- a/Resources.php
+++ b/Resources.php
@@ -451,6 +451,11 @@
),
) + $resourcePaths;
 
+   $modules['qunit']['ext.cx.translation.tests'] = array(
+   'scripts' = array( 
'tests/qunit/translation/ext.cx.translation.test.js' ),
+   'dependencies' = array( 'ext.cx.translation' ),
+   ) + $resourcePaths;
+
$modules['qunit']['ext.cx.util.test'] = array(
'scripts' = array( 'tests/qunit/base/ext.cx.util.test.js' ),
'dependencies' = array(
diff --git a/hooks.md b/hooks.md
index d048a8c..03773f2 100644
--- a/hooks.md
+++ b/hooks.md
@@ -88,7 +88,7 @@
 
 ## mw.cx.translation.add
 
-Used to trigger the pre-translation for a source section. Source section id is 
passed as argument. The translation module listens for this.
+Used to trigger the pre-translation for a source section. Source section id is 
passed as argument. Second argument is a boolean which controls whether machine 
translation should be applied to the text. The translation module listens for 
this.
 
 ## mw.cx.translation.change
 
diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index 4758926..b2550c4 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -198,6 +198,7 @@
// Disable link click
return false;
} );
+
this.$content.on( 'mouseenter', 'a', function ( e ) {
var $link = $( this ),
linkid = $( this ).data( 'linkid' );
diff --git a/modules/translation/ext.cx.translation.js 
b/modules/translation/ext.cx.translation.js
index 907af50..20479d6 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -202,10 +202,63 @@
}
};
 
+   /**
+* Checks whether a tag is a heading.
+*
+* @static
+* @param {string} tagName
+* @return {boolean}
+*/
+   ContentTranslationEditor.isHeading = function ( tagName ) {
+   return /^H[1-6]$/i.test( tagName );
+   }
+
+   /**
+* Checks whether one tag is a parent heading of another tag.
+*
+* @static
+* @param {string} preceding tagName
+* @param {string} current tagName
+* @return {boolean}
+*/
+   ContentTranslationEditor.isParentHeading = function ( preceding, 
current ) {
+   // Any header goes if this is a non-heading
+   if ( !ContentTranslationEditor.isHeading( current ) ) {
+   return ContentTranslationEditor.isHeading( preceding );
+   }
+
+   // Both are headings, check that the previous one is bigger
+   if ( ContentTranslationEditor.isHeading( preceding ) ) {
+   return preceding  current;
+   }
+
+   // Parent is not heading at all
+   return false;
+   }
+
function sectionClick() {
/*jshint validthis:true */
-   $( '#' + $( this ).data( 'source' ) ).removeClass( 
'cx-highlight' );
-   mw.hook( 'mw.cx.translation.add' ).fire( $( this ).data( 
'source' ), true );
+   var sourceSectionId, $currentSection, $previousSection;
+
+   $currentSection = $( this );
+   $previousSection = $currentSection.prev();
+   sourceSectionId = $currentSection.data( 'source' );
+
+   // The equivalent section in source column
+   $( '#' + sourceSectionId ).removeClass( 'cx-highlight' );
+
+   // Fill in the preceding parent heading, if not yet filled
+   if (
+   $previousSection.is( '.placeholder' ) 
+   ContentTranslationEditor.isParentHeading(
+   $previousSection.data( 'cx-section-type' ),
+   $currentSection.data( 'cx-section-type' )
+   )
+   ) {
+   

[MediaWiki-commits] [Gerrit] raise account creation throttle: Puget Sound - change (operations/mediawiki-config)

2014-09-18 Thread Jeremyb (Code Review)
Jeremyb has uploaded a new change for review.

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

Change subject: raise account creation throttle: Puget Sound
..

raise account creation throttle: Puget Sound

https://en.wikipedia.org/wiki/Wikipedia:Meetup/Collins_Memorial_Library/Edit-a-thon

Bug: 70953
Change-Id: If05ef0966ca2e5bb19a2f52fcfef114ae1187189
---
M wmf-config/throttle.php
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 635c2e3..1c87ec9 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -20,12 +20,12 @@
 # (default: any project)
 ## Add throttling definitions below.
 
-$wmgThrottlingExceptions[] = array( // bug 66822
-   'from'   = '2014-06-23T06:00 +5:30',
-   'to' = '2014-06-23T18:00 +5:30',
-   'IP' = array( '117.211.82.55' ),
-   'dbname' = array( 'tewiki' ),
-   'value'  = 200,
+$wmgThrottlingExceptions[] = array( // bug 70953
+   'from'   = '2014-09-20T13:00 -7:00',
+   'to' = '2014-09-20T17:00 -7:00',
+   'IP' = array( '207.207.127.233' ),
+   'dbname' = array( 'enwiki' ),
+   'value'  = 25,
 );
 ## Add throttling definitions above.
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If05ef0966ca2e5bb19a2f52fcfef114ae1187189
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jeremyb jer...@tuxmachine.com

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


[MediaWiki-commits] [Gerrit] add www.soumaya.com.mx to wgCopyUploadsDomains - change (operations/mediawiki-config)

2014-09-18 Thread Jeremyb (Code Review)
Jeremyb has uploaded a new change for review.

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

Change subject: add www.soumaya.com.mx to wgCopyUploadsDomains
..

add www.soumaya.com.mx to wgCopyUploadsDomains

(on commonswiki)

Bug: 70986
Change-Id: I66c2d27bcdc95724e2e20fc25ca81aa6071e6563
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 335bc6f..0a2d3b1 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10719,7 +10719,8 @@
'*.universiteitsmuseum.nl', // Universiteits Museum 
Utrecht
'data.kb.se',   // National Library of 
Sweden Open Data - bug 69439
'www.veikkos-archiv.com',   // Veikkos-archiv - bug 
69777
-   '*.scienceimage.csiro.au'   // CSIRO - bug 70771
+   '*.scienceimage.csiro.au',  // CSIRO - bug 70771
+   'www.soumaya.com.mx',   // Museo Soumaya - bug 70986
),
 ),
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66c2d27bcdc95724e2e20fc25ca81aa6071e6563
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jeremyb jer...@tuxmachine.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 role::cache::ssl::sni - change (operations/puppet)

2014-09-18 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: Add role::cache::ssl::sni
..

Add role::cache::ssl::sni

Change-Id: Ia4bbdb00113dfe8c6740568c6ed0fa16e2c338a1
---
M manifests/role/cache.pp
1 file changed, 61 insertions(+), 3 deletions(-)


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

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 9544675..4ab4a60 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -573,7 +573,7 @@
 }
 }
 
-class ssl($sitename, $certname) {
+class ssl($sitename, $certname, $default_server=false) {
 include certificates::wmf_ca, role::protoproxy::ssl::common
 
 # Assumes that LVS service IPs are setup elsewhere
@@ -582,7 +582,7 @@
 # mapping; in other cases we should be OK with the raw name
 $check_cert = $certname ? {
 'unified.wikimedia.org' = '*.wikipedia.org',
-/^star\.(wiki[mp]edia\.org)$/   = *.$1,
+/^star\.(.+)$/  = *.$1,
 default = $certname
 }
 
@@ -599,7 +599,7 @@
 protoproxy::localssl { $sitename:
 proxy_server_cert_name = $certname,
 upstream_port  = '80',
-default_server = true,
+default_server = $default_server,
 enabled= true,
 }
 }
@@ -608,6 +608,64 @@
 class { '::role::cache::ssl':
 sitename = 'unified',
 certname = 'unified.wikimedia.org',
+default_server = true,
+}
+}
+
+# To replace ssl::unified above after testing...
+class ssl::sni {
+class { '::role::cache::ssl':
+sitename = 'unified',
+certname = 'unified.wikimedia.org',
+default_server = true,
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikipedia',
+certname = 'star.wikipedia.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikimedia',
+certname = 'star.wikimedia.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wiktionary',
+certname = 'star.wiktionary.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikiquote',
+certname = 'star.wikiquote.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikibooks',
+certname = 'star.wikibooks.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikisource',
+certname = 'star.wikisource.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikinews',
+certname = 'star.wikinews.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikiversity',
+certname = 'star.wikiversity.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikimediafoundation',
+certname = 'star.wikimediafoundation.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikidata',
+certname = 'star.wikidata.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikivoyage',
+certname = 'star.wikivoyage.org',
+}
+class { '::role::cache::ssl':
+sitename = 'star-wikibooks',
+certname = 'star.wikibooks.org',
 }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4bbdb00113dfe8c6740568c6ed0fa16e2c338a1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Convert i18n to JSON - change (mediawiki...GoToShell)

2014-09-18 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: Convert i18n to JSON
..

Convert i18n to JSON

Change-Id: I3587cacc6827d03ea295ee4e47d1632848db4ef7
---
M GoToShell.i18n.php
M GoToShell.php
A i18n/en.json
3 files changed, 42 insertions(+), 16 deletions(-)


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

diff --git a/GoToShell.i18n.php b/GoToShell.i18n.php
index 6f98173..39c06dd 100644
--- a/GoToShell.i18n.php
+++ b/GoToShell.i18n.php
@@ -1,22 +1,35 @@
 ?php
 /**
- * Internationalization file for the GoToShell extension.
+ * This is a backwards-compatibility shim, generated by:
+ * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
  *
- * @since 1.0.0
+ * Beginning with MediaWiki 1.23, translation strings are stored in json files,
+ * and the EXTENSION.i18n.php file only exists to provide compatibility with
+ * older releases of MediaWiki. For more information about this migration, see:
+ * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
  *
- * @file
- *
- * @licence GNU GPL
- * @author Nathan Larson (Leucosticte)
+ * This shim maintains compatibility back to MediaWiki 1.17.
  */
- 
 $messages = array();
- 
-$messages['en'] = array(
-'gotoshell' = 'Go to shell',
-'gotoshell-desc' = 'Implements [[Special:GoToShell|a special page]] that 
takes the user to shell and back',
-'gotoshell-notallowed' = 'Your account does not have permission to go to 
shell.',
-'gotoshell-command' = 'Command:',
-'gotoshell-result' = 'Result:'
-);
+if ( !function_exists( 'wfJsonI18nShime53dda8db63c42e9' ) ) {
+   function wfJsonI18nShime53dda8db63c42e9( $cache, $code, $cachedData ) {
+   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+   foreach ( $codeSequence as $csCode ) {
+   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
+   if ( is_readable( $fileName ) ) {
+   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
+   foreach ( array_keys( $data ) as $key ) {
+   if ( $key === '' || $key[0] === '@' ) {
+   unset( $data[$key] );
+   }
+   }
+   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
+   }
 
+   $cachedData['deps'][] = new FileDependency( $fileName );
+   }
+   return true;
+   }
+
+   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShime53dda8db63c42e9';
+}
diff --git a/GoToShell.php b/GoToShell.php
index 21defea..7050932 100644
--- a/GoToShell.php
+++ b/GoToShell.php
@@ -32,11 +32,12 @@
 'author' = 'Nathan Larson',
 'url' = 'https://mediawiki.org/wiki/Extension:GoToShell',
 'descriptionmsg' = 'gotoshell-desc',
-'version' = '1.0.0'
+'version' = '1.0.1'
 );
  
 $wgGoToShellCommand = 'ls';
 $wgExtensionMessagesFiles['GoToShell'] = __DIR__ . '/GoToShell.i18n.php';
+$wgMessagesDirs['GoToShell'] = __DIR__ . '/i18n';
 $wgAutoloadClasses['SpecialGoToShell'] = __DIR__ . '/SpecialGoToShell.php';
 $wgSpecialPages['GoToShell'] = 'SpecialGoToShell';
 $wgSpecialPageGroups['GoToShell'] = 'other';
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 000..7ce3c7f
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,12 @@
+{
+   @metadata: {
+   authors: [
+   Nathan Larson (Leucosticte)
+   ]
+   },
+   gotoshell: Go to shell,
+   gotoshell-desc: Implements [[Special:GoToShell|a special page]] that 
takes the user to shell and back,
+   gotoshell-notallowed: Your account does not have permission to go to 
shell.,
+   gotoshell-command: Command:,
+   gotoshell-result: Result:
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3587cacc6827d03ea295ee4e47d1632848db4ef7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoToShell
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] [FIX] Close opened files - change (pywikibot/core)

2014-09-18 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FIX] Close opened files
..

[FIX] Close opened files

Bug: 70969
Change-Id: Ic8454d0d1cc8c98458611efca32bbcd90620df12
---
M pywikibot/xmlreader.py
M tests/data_ingestion_tests.py
M tests/textlib_tests.py
M tests/wikibase_tests.py
4 files changed, 24 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/95/161195/1

diff --git a/pywikibot/xmlreader.py b/pywikibot/xmlreader.py
index 56993c4..5912251 100644
--- a/pywikibot/xmlreader.py
+++ b/pywikibot/xmlreader.py
@@ -123,18 +123,21 @@
 else:
 # assume it's an uncompressed XML file
 source = open(self.filename)
-context = iterparse(source, events=(start, end, start-ns))
-self.root = None
+try:
+context = iterparse(source, events=(start, end, start-ns))
+self.root = None
 
-for event, elem in context:
-if event == start-ns and elem[0] == :
-self.uri = elem[1]
-continue
-if event == start and self.root is None:
-self.root = elem
-continue
-for rev in self._parse(event, elem):
-yield rev
+for event, elem in context:
+if event == start-ns and elem[0] == :
+self.uri = elem[1]
+continue
+if event == start and self.root is None:
+self.root = elem
+continue
+for rev in self._parse(event, elem):
+yield rev
+finally:
+source.close()
 
 def _parse_only_latest(self, event, elem):
 Parser that yields only the latest revision.
diff --git a/tests/data_ingestion_tests.py b/tests/data_ingestion_tests.py
index f7f6711..bd18a35 100644
--- a/tests/data_ingestion_tests.py
+++ b/tests/data_ingestion_tests.py
@@ -53,8 +53,8 @@
 
 def setUp(self):
 super(TestCSVReader, self).setUp()
-fileobj = open(os.path.join(os.path.split(__file__)[0], 'data', 
'csv_ingestion.csv'))
-self.iterator = data_ingestion.CSVReader(fileobj, 'url')
+with open(os.path.join(os.path.split(__file__)[0], 'data', 
'csv_ingestion.csv')) as fileobj:
+self.iterator = data_ingestion.CSVReader(fileobj, 'url')
 self.obj = next(self.iterator)
 
 def test_PhotoURL(self):
diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py
index 299898f..49d5e5f 100644
--- a/tests/textlib_tests.py
+++ b/tests/textlib_tests.py
@@ -23,8 +23,9 @@
 dirname = os.path.join(os.path.dirname(__file__), pages)
 
 for f in [enwiki_help_editing]:
-files[f] = codecs.open(os.path.join(dirname, f + .page),
-   'r', 'utf-8').read()
+with codecs.open(os.path.join(dirname, f + .page),
+ 'r', 'utf-8') as content:
+files[f] = content.read()
 
 
 class TestSectionFunctions(TestCase):
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index b288484..7726433 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -545,7 +545,8 @@
 super(TestLinks, self).setUp()
 self.wdp = pywikibot.ItemPage(self.get_repo(), 'Q60')
 self.wdp.id = 'Q60'
-self.wdp._content = 
json.load(open(os.path.join(os.path.split(__file__)[0], 'pages', 
'Q60_only_sitelinks.wd')))
+with open(os.path.join(os.path.split(__file__)[0], 'pages', 
'Q60_only_sitelinks.wd')) as f:
+self.wdp._content = json.load(f)
 self.wdp.get()
 
 def test_iterlinks_page_object(self):
@@ -852,8 +853,8 @@
 wikidata = self.get_repo()
 self.wdp = pywikibot.ItemPage(wikidata, 'Q60')
 self.wdp.id = 'Q60'
-self.wdp._content = json.load(
-open(os.path.join(os.path.split(__file__)[0], 'pages', 'Q60.wd')))
+with open(os.path.join(os.path.split(__file__)[0], 'pages', 'Q60.wd')) 
as f:
+self.wdp._content = json.load(f)
 self.wdp.get()
 del self.wdp._content['id']
 del self.wdp._content['type']
@@ -863,7 +864,7 @@
 old = json.dumps(self.wdp._content, indent=2, sort_keys=True)
 new = json.dumps(self.wdp.toJSON(), indent=2, sort_keys=True)
 
-self.assertEquals(old, new)
+self.assertEqual(old, new)
 
 def test_json_diff(self):
 del self.wdp.labels['en']

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8454d0d1cc8c98458611efca32bbcd90620df12
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Fix typo - change (mediawiki...Flow)

2014-09-18 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Fix typo
..

Fix typo

Change-Id: Idf9ec4a69f7eaa67cb5699221079b72ffafccb64
---
M includes/Formatter/RevisionFormatter.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/Formatter/RevisionFormatter.php 
b/includes/Formatter/RevisionFormatter.php
index 30887b6..1f73fb3 100644
--- a/includes/Formatter/RevisionFormatter.php
+++ b/includes/Formatter/RevisionFormatter.php
@@ -723,7 +723,7 @@
$params = $actions-getValue( $changeType, 'history', 
'i18n-params' );
if ( !$params ) {
// should we have a sigil for i18n with no parameters?
-   wfDebugLog( 'Flow', __METHOD__ . : No i18n params for 
changeTyp4 $changeType on  . $revision-getRevisionId()-getAlphadecimal() );
+   wfDebugLog( 'Flow', __METHOD__ . : No i18n params for 
changeType $changeType on  . $revision-getRevisionId()-getAlphadecimal() );
return array();
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf9ec4a69f7eaa67cb5699221079b72ffafccb64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix typo - change (mediawiki...Flow)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix typo
..


Fix typo

Change-Id: Idf9ec4a69f7eaa67cb5699221079b72ffafccb64
---
M includes/Formatter/RevisionFormatter.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/Formatter/RevisionFormatter.php 
b/includes/Formatter/RevisionFormatter.php
index 30887b6..1f73fb3 100644
--- a/includes/Formatter/RevisionFormatter.php
+++ b/includes/Formatter/RevisionFormatter.php
@@ -723,7 +723,7 @@
$params = $actions-getValue( $changeType, 'history', 
'i18n-params' );
if ( !$params ) {
// should we have a sigil for i18n with no parameters?
-   wfDebugLog( 'Flow', __METHOD__ . : No i18n params for 
changeTyp4 $changeType on  . $revision-getRevisionId()-getAlphadecimal() );
+   wfDebugLog( 'Flow', __METHOD__ . : No i18n params for 
changeType $changeType on  . $revision-getRevisionId()-getAlphadecimal() );
return array();
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf9ec4a69f7eaa67cb5699221079b72ffafccb64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@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] backward-compatible pivot-table - change (analytics/zero-sms)

2014-09-18 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: backward-compatible pivot-table
..


backward-compatible pivot-table

Change-Id: I8da287f1c89711bb110436219980aab746d5abd1
---
M scripts/weblogs.py
1 file changed, 9 insertions(+), 12 deletions(-)

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



diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index 6a89fa1..ab5d3f1 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -4,8 +4,9 @@
 import re
 import collections
 import sys
-from pandas import read_table
+from pandas import read_table, pivot_table
 from pandas.core.frame import DataFrame
+import numpy as np
 import api
 
 from logprocessor import *
@@ -62,7 +63,6 @@
 
 def processLogFiles(self):
 
-newDataFound = False
 safePrint('Processing log files')
 statFiles = {}
 for f in os.listdir(self.pathLogs):
@@ -77,7 +77,8 @@
 fileDt = m.group(1)
 fileDt = '-'.join([fileDt[0:4], fileDt[4:6], fileDt[6:8]])
 self.processLogFile(logFile, statFile, fileDt)
-newDataFound = True
+if os.path.isfile(self.combinedFile):
+os.remove(self.combinedFile)
 
 # Clean up older stat files (if gz file size has changed)
 removeFiles = []
@@ -92,8 +93,6 @@
 removeFiles.append(statFile)
 for f in removeFiles:
 os.remove(f)
-
-return newDataFound
 
 def processLogFile(self, logFile, statFile, fileDt):
 
@@ -276,8 +275,6 @@
 return stats
 
 def generateGraphData(self, stats=None):
-from pandas import pivot_table
-import numpy as np
 safePrint('Generating data files to %s' % self.pathGraphs)
 
 if stats is None:
@@ -292,7 +289,7 @@
 for id in xcs:
 
 s = StringIO.StringIO()
-pivot_table(data[data.xcs == id], values='count', index=['date', 
'iszero'], aggfunc=np.sum).to_csv(s, header=True)
+pivot_table(data[data.xcs == id], 'count', ['date', 'iszero'], 
aggfunc=np.sum).to_csv(s, header=True)
 result = s.getvalue()
 
 # sortColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'zero']
@@ -320,10 +317,10 @@
 # ifilter(lambda v: v[1] == 'DATA', stats), columnHeaders11)
 
 def run(self):
-newDataFound = self.processLogFiles()
+self.processLogFiles()
 if not self.enableUpload:
 safePrint('Uploading disabled, quiting')
-elif not newDataFound and os.path.isfile(self.combinedFile):
+elif os.path.isfile(self.combinedFile):
 safePrint('No new data, we are done')
 else:
 stats = self.combineStats()
@@ -354,5 +351,5 @@
 
 
 if __name__ == '__main__':
-# WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).manualRun()
-WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).safeRun()
+WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).manualRun()
+# WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).safeRun()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8da287f1c89711bb110436219980aab746d5abd1
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@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] backward-compatible pivot-table - change (analytics/zero-sms)

2014-09-18 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: backward-compatible pivot-table
..

backward-compatible pivot-table

Change-Id: I8da287f1c89711bb110436219980aab746d5abd1
---
M scripts/weblogs.py
1 file changed, 9 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms 
refs/changes/97/161197/1

diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index 6a89fa1..ab5d3f1 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -4,8 +4,9 @@
 import re
 import collections
 import sys
-from pandas import read_table
+from pandas import read_table, pivot_table
 from pandas.core.frame import DataFrame
+import numpy as np
 import api
 
 from logprocessor import *
@@ -62,7 +63,6 @@
 
 def processLogFiles(self):
 
-newDataFound = False
 safePrint('Processing log files')
 statFiles = {}
 for f in os.listdir(self.pathLogs):
@@ -77,7 +77,8 @@
 fileDt = m.group(1)
 fileDt = '-'.join([fileDt[0:4], fileDt[4:6], fileDt[6:8]])
 self.processLogFile(logFile, statFile, fileDt)
-newDataFound = True
+if os.path.isfile(self.combinedFile):
+os.remove(self.combinedFile)
 
 # Clean up older stat files (if gz file size has changed)
 removeFiles = []
@@ -92,8 +93,6 @@
 removeFiles.append(statFile)
 for f in removeFiles:
 os.remove(f)
-
-return newDataFound
 
 def processLogFile(self, logFile, statFile, fileDt):
 
@@ -276,8 +275,6 @@
 return stats
 
 def generateGraphData(self, stats=None):
-from pandas import pivot_table
-import numpy as np
 safePrint('Generating data files to %s' % self.pathGraphs)
 
 if stats is None:
@@ -292,7 +289,7 @@
 for id in xcs:
 
 s = StringIO.StringIO()
-pivot_table(data[data.xcs == id], values='count', index=['date', 
'iszero'], aggfunc=np.sum).to_csv(s, header=True)
+pivot_table(data[data.xcs == id], 'count', ['date', 'iszero'], 
aggfunc=np.sum).to_csv(s, header=True)
 result = s.getvalue()
 
 # sortColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'zero']
@@ -320,10 +317,10 @@
 # ifilter(lambda v: v[1] == 'DATA', stats), columnHeaders11)
 
 def run(self):
-newDataFound = self.processLogFiles()
+self.processLogFiles()
 if not self.enableUpload:
 safePrint('Uploading disabled, quiting')
-elif not newDataFound and os.path.isfile(self.combinedFile):
+elif os.path.isfile(self.combinedFile):
 safePrint('No new data, we are done')
 else:
 stats = self.combineStats()
@@ -354,5 +351,5 @@
 
 
 if __name__ == '__main__':
-# WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).manualRun()
-WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).safeRun()
+WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).manualRun()
+# WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).safeRun()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8da287f1c89711bb110436219980aab746d5abd1
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] admin: add subbu and gwicke to ocg-render-admins - change (operations/puppet)

2014-09-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: admin: add subbu and gwicke to ocg-render-admins
..


admin: add subbu and gwicke to ocg-render-admins

RT #8363

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

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index d581aa4..1eb914c 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -128,7 +128,7 @@
   ocg-render-admins:
 gid: 721
 description: admins for pdf render (rt 6468)
-members: [cscott]
+members: [cscott, ssastry, gwicke]
 privs: ['ALL = (root) NOPASSWD: /usr/sbin/service ocg stop',
 'ALL = (root) NOPASSWD: /usr/sbin/service ocg start',
 'ALL = (root) NOPASSWD: /usr/sbin/service ocg restart',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idbcd84b093c5b64f874e5e9556402b053bb89497
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Matanya mata...@foss.co.il
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
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] Test commit - change (mediawiki...ContentTranslation)

2014-09-18 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Test commit
..

Test commit

Change-Id: I9e1131a29fc57e2f54309c9c69f6e8905c36203a
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/README.md b/README.md
index 616e22b..0448521 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# ContentTranslation
+a# ContentTranslation
 
 ContentTranslation is a tool that allows editors to translate
 pages from one language to another with the help of machine

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e1131a29fc57e2f54309c9c69f6e8905c36203a
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] Clarify the message for giving the title for a page - change (mediawiki...ContentTranslation)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Clarify the message for giving the title for a page
..


Clarify the message for giving the title for a page

See 
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Cx-publish-gt-move-page-description/sv

Change-Id: I1c7f8d4d9f9b4a82a21906904e3d2228c0973094
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index f03a788..d781bed 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -24,7 +24,7 @@
cx-publish-gt-first-step-title: The translation has been published 
as a draft under your user page for review,
cx-publish-gt-first-step-description: Click on the 
\{{int:vector-action-move}}\ action under this menu to make the content 
available to all users as a regular page.,
cx-publish-gt-move-page-title: Move the page,
-   cx-publish-gt-move-page-description: Select the \(main)\ namespace 
and give it the right title.,
+   cx-publish-gt-move-page-description: Select the \(main)\ namespace 
and give a right title for the page.,
cx-publish-gt-moved-title: The translated page was moved,
cx-publish-gt-moved-description: Click this link to read and improve 
your new translated page,
cx-publish-gt-published-title: Congratulations, the page has been 
published,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c7f8d4d9f9b4a82a21906904e3d2228c0973094
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] metrics: move from stat1001 to varnish - change (operations/puppet)

2014-09-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: metrics: move from stat1001 to varnish
..


metrics: move from stat1001 to varnish

RT: 7352

Change-Id: I571fb86aea7115eb12c3492f9c402e65b63065a3
---
M manifests/role/cache.pp
M templates/varnish/misc.inc.vcl.erb
2 files changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  jenkins-bot: Verified
  Dzahn: Looks good to me, but someone else must approve



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 9544675..27474cc 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -1466,6 +1466,7 @@
 'terbium.eqiad.wmnet', # public_html
 'neon.wikimedia.org', # monitoring tools (icinga et al)
 'magnesium.wikimedia.org', # RT and racktables
+'stat1001.wikimedia.org', # metrics and metrics-api
 ],
 backend_options = [
 {
diff --git a/templates/varnish/misc.inc.vcl.erb 
b/templates/varnish/misc.inc.vcl.erb
index 41aacc8..17798d5 100644
--- a/templates/varnish/misc.inc.vcl.erb
+++ b/templates/varnish/misc.inc.vcl.erb
@@ -38,6 +38,8 @@
set req.backend = neon;
} elsif (req.http.Host == racktables.wikimedia.org) {
set req.backend = magnesium;
+   } elsif (req.http.Host == metrics.wikimedia.org) {
+   set req.backend = stat1001;
} else {
error 404 Domain not served here;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I571fb86aea7115eb12c3492f9c402e65b63065a3
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Ottomata 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] metrics: point to misc-web-lb.eqiad - change (operations/dns)

2014-09-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: metrics: point to misc-web-lb.eqiad
..


metrics: point to misc-web-lb.eqiad

Change-Id: I950b1704681522b8c445ba741ab8f58560a9b038
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index a98d0fa..f47bc91 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -584,8 +584,7 @@
 labsconsole  1H  IN CNAMEwikitech
 legalpad 1H  IN CNAMEmisc-web-lb.eqiad
 logstash 1H  IN CNAMEmisc-web-lb.eqiad
-metrics-api  1H  IN CNAMEstat1001
-metrics  1H  IN CNAMEstat1001
+metrics  1H  IN CNAMEmisc-web-lb.eqiad
 noc  1H  IN CNAMEfenari
 nyc  600 IN DYNA geoip!text-addrs
 planet   1H  IN CNAMEzirconium

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I950b1704681522b8c445ba741ab8f58560a9b038
Gerrit-PatchSet: 3
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Ottomata 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] Keep Wikidata on mw1.24-wmf19 extension branch - change (mediawiki...release)

2014-09-18 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Keep Wikidata on mw1.24-wmf19 extension branch
..

Keep Wikidata on mw1.24-wmf19 extension branch

Change-Id: I2714fb97af9988abec27af68cf734cf933c4ac17
---
M make-wmf-branch/default.conf
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/99/161199/1

diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf
index 79e06f7..e704d69 100644
--- a/make-wmf-branch/default.conf
+++ b/make-wmf-branch/default.conf
@@ -174,7 +174,7 @@
'CentralNotice' = 'wmf_deploy',
 
// to use instead of the above
-   'Wikidata' = 'mw1.24-wmf20',
+   'Wikidata' = 'mw1.24-wmf19',
 
// For wikitech use only!
'SemanticMediaWiki' = '1.8.x',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2714fb97af9988abec27af68cf734cf933c4ac17
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
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] Revert disable wmfusercontent.org site on misc for now, ngi... - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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

Change subject: Revert disable wmfusercontent.org site on misc for now, nginx 
borked
..

Revert disable wmfusercontent.org site on misc for now, nginx borked

This reverts commit 4153e73e596ad0f78e15a5827e3e25073cc60ea2.

Change-Id: I7212c0e06f6690f175eff37e6450de6ca383eb3a
---
M manifests/role/cache.pp
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/161200/1

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 9544675..69bdbd8 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -627,10 +627,9 @@
 'wikimedia':
 proxy_server_cert_name = 'star.wikimedia.org',
 default_server = true;
-# This doesn't work right, disabling temporarily until it's sorted out
-#'wmfusercontent.org':
-#server_name= 'wmfusercontent.org',
-#proxy_server_cert_name = 'star.wmfusercontent.org';
+'wmfusercontent.org':
+server_name= 'wmfusercontent.org',
+proxy_server_cert_name = 'star.wmfusercontent.org';
 }
 
 # FIXME: Icinga monitoring with support for SNI

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7212c0e06f6690f175eff37e6450de6ca383eb3a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Revert disable wmfusercontent.org site on misc for now, ngi... - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Revert disable wmfusercontent.org site on misc for now, nginx 
borked
..


Revert disable wmfusercontent.org site on misc for now, nginx borked

This reverts commit 4153e73e596ad0f78e15a5827e3e25073cc60ea2.

Change-Id: I7212c0e06f6690f175eff37e6450de6ca383eb3a
---
M manifests/role/cache.pp
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 27474cc..605651c 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -627,10 +627,9 @@
 'wikimedia':
 proxy_server_cert_name = 'star.wikimedia.org',
 default_server = true;
-# This doesn't work right, disabling temporarily until it's sorted out
-#'wmfusercontent.org':
-#server_name= 'wmfusercontent.org',
-#proxy_server_cert_name = 'star.wmfusercontent.org';
+'wmfusercontent.org':
+server_name= 'wmfusercontent.org',
+proxy_server_cert_name = 'star.wmfusercontent.org';
 }
 
 # FIXME: Icinga monitoring with support for SNI

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7212c0e06f6690f175eff37e6450de6ca383eb3a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] [FIX] WikibasePage: Allow saving wikibase pages without mwpfh - change (pywikibot/core)

2014-09-18 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FIX] WikibasePage: Allow saving wikibase pages without mwpfh
..

[FIX] WikibasePage: Allow saving wikibase pages without mwpfh

Bug: 69664
Change-Id: I086dcaa88a1cae61ffa3a4811db9948cc34f9167
---
M pywikibot/page.py
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/01/161201/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index a9ca948..13a5010 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2779,6 +2779,20 @@
 return False
 return 'lastrevid' in self._content
 
+def botMayEdit(self):
+
+Return whether bots may edit this page.
+
+Because there is currently no system to mark a page that it shouldn't
+be edited by bots on Wikibase pages it always returns True. The content
+of the page is not text but a dict, the original way (to search for a
+template) doesn't apply.
+
+@return: True
+@rtype: boolean
+
+return True
+
 def get(self, force=False, *args, **kwargs):
 
 Fetch all page data, and cache it.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I086dcaa88a1cae61ffa3a4811db9948cc34f9167
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

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


[MediaWiki-commits] [Gerrit] Links: Various improvments - change (mediawiki...ContentTranslation)

2014-09-18 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Links: Various improvments
..

Links: Various improvments

* Avoid an API hit to show the target language card. Use the information
  from the link adaptation for the section(adapt api call when a link in
  source section clicked removed)
* Cache the api requests for getting the link information
* Simplified the start method of the module. Removed lot of redundant
  and unwanted method calls from the time of single card design.
* Associated minor code clean ups

Change-Id: I1a020ec050f0cb30c01b9feaa81a6a65daab0ced
---
M modules/tools/ext.cx.tools.link.js
1 file changed, 73 insertions(+), 56 deletions(-)


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

diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index 5ec7f14..3455acf 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -11,6 +11,7 @@
 ( function ( $, mw ) {
'use strict';
 
+   var cache = {};
/**
 * Link Card
 * @class
@@ -126,9 +127,16 @@
 * @return {jQuery.Promise}
 */
function getLink( title, language ) {
-   var api = new mw.Api();
+   var request, api;
 
-   return api.get( {
+   // Normalize
+   title = mw.Title.newFromText( title ).toString();
+   if ( cache[ title ]  cache[ title ][ language ] ) {
+   return cache[ title ][ language ];
+   }
+
+   api = new mw.Api();
+   request = api.get( {
action: 'query',
titles: title,
prop: 'pageimages',
@@ -142,6 +150,10 @@
// This prevents warnings about the unrecognized 
parameter _
cache: true
} );
+
+   cache[ title ] = cache[ title ] || {};
+   cache[ title ][ language ] = request;
+   return request;
}
 
/**
@@ -159,10 +171,10 @@
/**
 * Adapt the given title to a target language
 * @param {string|string[]} titles A title as string or array of titles
-* @param {string} targetLanguage Language to which the links are to be 
adapted
+* @param {string} language Language to which the links are to be 
adapted
 * @return {jQuery.Promise}
 */
-   LinkCard.prototype.adapt = function ( titles, targetLanguage ) {
+   LinkCard.prototype.adapt = function ( titles, language ) {
var api, deferred;
 
api = new mw.Api();
@@ -174,7 +186,7 @@
action: 'query',
titles: titles.join( '|' ),
prop: 'langlinks',
-   lllang: targetLanguage,
+   lllang: language,
redirects: true,
format: 'json'
}, {
@@ -195,7 +207,6 @@
for ( i in redirects ) {
if ( redirects[ i ].to === 
page.title ) {
key = redirects[ i 
].from;
-
break;
}
}
@@ -246,7 +257,7 @@
 * @return {string} Cleaned up href
 */
function cleanupLinkHref( href ) {
-   return href.replace( /^\.*\//, '' );
+   return href  href.replace( /^\.*\//, '' );
}
 
/**
@@ -300,6 +311,9 @@
var $parent, $parentSection;
 
restoreSelection( selection );
+   if ( !selection || !selection.toString().length ) {
+   return false;
+   }
$parent = getSelectionParent();
 
if ( $parent.is( '[contenteditable=false]' ) ) {
@@ -411,6 +425,10 @@
LinkCard.prototype.prepareSourceLinkCard = function ( title, language ) 
{
var linkCard = this;
 
+   if ( !title ) {
+   return;
+   }
+
getLink( title, language ).done( function ( response ) {
var imgSrc, pageId, range, page;
 
@@ -447,8 +465,11 @@
LinkCard.prototype.prepareTargetLinkCard = function ( title, language ) 
{
var linkCard = this;
 
+   if ( !title ) {
+   return;
+   }
getLink( title, language ).done( function ( response ) {
-   var imgSrc, pageId, range, page;
+   var imgSrc, pageId, selection, page;
 
 

[MediaWiki-commits] [Gerrit] swift: lower container availability threshold to 1 host - change (operations/puppet)

2014-09-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: swift: lower container availability threshold to 1 host
..

swift: lower container availability threshold to 1 host

Change-Id: I9294060f5e821b134ea761ea60475fa089161313
---
M manifests/swift.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/161203/1

diff --git a/manifests/swift.pp b/manifests/swift.pp
index 2b1af7c..0ab4a1c 100644
--- a/manifests/swift.pp
+++ b/manifests/swift.pp
@@ -208,8 +208,8 @@
 description = 'swift eqiad-prod container availability',
 metric  = 
'swift.eqiad-prod.dispersion.container.pct_found.value',
 from= '30min',
-warning = 98,
-critical= 96,
+warning = 92,
+critical= 88,
 under   = true,
 nagios_critical = false
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9294060f5e821b134ea761ea60475fa089161313
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] swift: lower container availability threshold to 1 host - change (operations/puppet)

2014-09-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: swift: lower container availability threshold to 1 host
..


swift: lower container availability threshold to 1 host

Change-Id: I9294060f5e821b134ea761ea60475fa089161313
---
M manifests/swift.pp
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/manifests/swift.pp b/manifests/swift.pp
index 2b1af7c..0ab4a1c 100644
--- a/manifests/swift.pp
+++ b/manifests/swift.pp
@@ -208,8 +208,8 @@
 description = 'swift eqiad-prod container availability',
 metric  = 
'swift.eqiad-prod.dispersion.container.pct_found.value',
 from= '30min',
-warning = 98,
-critical= 96,
+warning = 92,
+critical= 88,
 under   = true,
 nagios_critical = false
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9294060f5e821b134ea761ea60475fa089161313
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@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] ContentTranslation depends on ULS - change (integration/jenkins-job-builder-config)

2014-09-18 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: ContentTranslation depends on ULS
..

ContentTranslation depends on ULS

Per Niklas request.

Change-Id: Ifdc528e0c6e0312fb711442119671d66efd223f5
---
M mediawiki-extensions.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/04/161204/1

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index b388d79..b42b90a 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -401,6 +401,7 @@
  - ContactPage
  - ContactPageFundraiser
  - ContentTranslation
+dependencies: 'UniversalLanguageSelector'
  - Contest
  - ContributionReporting
  - ContributionScores
@@ -982,6 +983,7 @@
  - '{name}-{ext-name}-qunit':
 name: mwext
 ext-name: ContentTranslation
+dependencies: 'UniversalLanguageSelector'
  - '{name}-{ext-name}-qunit':
 name: mwext
 ext-name: DataValues

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdc528e0c6e0312fb711442119671d66efd223f5
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Change MediaWiki UI to use skinStyles so skins can customize - change (mediawiki/core)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Change MediaWiki UI to use skinStyles so skins can customize
..


Change MediaWiki UI to use skinStyles so skins can customize

Bug: 70351
Change-Id: I5d5725dba7e8e65b8fe3f5213b5e50d8dfeba755
---
M resources/Resources.php
1 file changed, 20 insertions(+), 10 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index 9f64da4..8e907ee 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1464,38 +1464,48 @@
/* MediaWiki UI */
 
'mediawiki.ui' = array(
-   'styles' = array(
-   'resources/src/mediawiki.ui/default.less',
+   'skinStyles' = array(
+   'default' = array(
+   'resources/src/mediawiki.ui/default.less',
+   ),
),
'position' = 'top',
'targets' = array( 'desktop', 'mobile' ),
),
'mediawiki.ui.checkbox' = array(
-   'styles' = array(
-   'resources/src/mediawiki.ui/components/checkbox.less',
+   'skinStyles' = array(
+   'default' = array(
+   
'resources/src/mediawiki.ui/components/checkbox.less',
+   ),
),
'position' = 'top',
'targets' = array( 'desktop', 'mobile' ),
),
// Lightweight module for anchor styles
'mediawiki.ui.anchor' = array(
-   'styles' = array(
-   'resources/src/mediawiki.ui/components/anchors.less',
+   'skinStyles' = array(
+   'default' = array(
+   
'resources/src/mediawiki.ui/components/anchors.less',
+   ),
),
'position' = 'top',
'targets' = array( 'desktop', 'mobile' ),
),
// Lightweight module for button styles
'mediawiki.ui.button' = array(
-   'styles' = array(
-   'resources/src/mediawiki.ui/components/buttons.less',
+   'skinStyles' = array(
+   'default' = array(
+   
'resources/src/mediawiki.ui/components/buttons.less',
+   ),
),
'position' = 'top',
'targets' = array( 'desktop', 'mobile' ),
),
'mediawiki.ui.input' = array(
-   'styles' = array(
-   'resources/src/mediawiki.ui/components/inputs.less',
+   'skinStyles' = array(
+   'default' = array(
+   
'resources/src/mediawiki.ui/components/inputs.less',
+   ),
),
'position' = 'top',
'targets' = array( 'desktop', 'mobile' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d5725dba7e8e65b8fe3f5213b5e50d8dfeba755
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Isarra zhoris...@gmail.com
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: SG shah...@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] Enforce some type hinting in Linker class - change (mediawiki/core)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enforce some type hinting in Linker class
..


Enforce some type hinting in Linker class

Specifically for link(), linkText(), makeImageLink(),
and makeBrokenImageLinkObj() functions

Change-Id: I4c397de289ae51bc463b5ae7c2968703d1424368
---
M RELEASE-NOTES-1.24
M includes/Linker.php
2 files changed, 11 insertions(+), 13 deletions(-)

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



diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 20aaad6..3bef5a0 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -464,6 +464,9 @@
   and jquery modules. In the past, this behavior was undefined, now it will
   throw an error.
 * Removed BagOStuff::replace(). (deprecated since 1.23)
+* In Linker.php, link(), linkText() and makeBrokenImageLinkObj() now display
+  warnings if their first parameter is not a Title object. Also makeImageLink()
+  now requires a Parser as its first parameter.
 
  Renamed classes 
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
diff --git a/includes/Linker.php b/includes/Linker.php
index 012bc1b..be850d0 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -192,11 +192,11 @@
public static function link(
$target, $html = null, $customAttribs = array(), $query = 
array(), $options = array()
) {
-   wfProfileIn( __METHOD__ );
if ( !$target instanceof Title ) {
-   wfProfileOut( __METHOD__ );
+   wfWarn( __METHOD__ . ': Requires $target to be a Title 
object.' );
return !-- ERROR --$html;
}
+   wfProfileIn( __METHOD__ );
 
if ( is_string( $query ) ) {
// some functions withing core using this still hand 
over query strings
@@ -380,11 +380,10 @@
 * @return string
 */
private static function linkText( $target ) {
-   // We might be passed a non-Title by make*LinkObj().  Fail 
gracefully.
if ( !$target instanceof Title ) {
+   wfWarn( __METHOD__ . ': Requires $target to be a Title 
object.' );
return '';
}
-
// If the target is just a fragment, with no title, we return 
the fragment
// text.  Otherwise, we return the title text itself.
if ( $target-getPrefixedText() === ''  
$target-hasFragment() ) {
@@ -544,7 +543,7 @@
 * @since 1.20
 * @return string HTML for an image, with links, wrappers, etc.
 */
-   public static function makeImageLink( /*Parser*/ $parser, Title $title,
+   public static function makeImageLink( Parser $parser, Title $title,
$file, $frameParams = array(), $handlerParams = array(), $time 
= false,
$query = , $widthOption = null
) {
@@ -637,13 +636,7 @@
# If a thumbnail width has not been provided, it is set
# to the default user option as specified in 
Language*.php
if ( $fp['align'] == '' ) {
-   if ( $parser instanceof Parser ) {
-   $fp['align'] = 
$parser-getTargetLanguage()-alignEnd();
-   } else {
-   # backwards compatibility, remove with 
makeImageLink2()
-   global $wgContLang;
-   $fp['align'] = $wgContLang-alignEnd();
-   }
+   $fp['align'] = 
$parser-getTargetLanguage()-alignEnd();
}
return $prefix . self::makeThumbLink2( $title, $file, 
$fp, $hp, $time, $query ) . $postfix;
}
@@ -932,10 +925,12 @@
public static function makeBrokenImageLinkObj( $title, $label = '',
$query = '', $unused1 = '', $unused2 = '', $time = false
) {
-   global $wgEnableUploads, $wgUploadMissingFileUrl, 
$wgUploadNavigationUrl;
if ( !$title instanceof Title ) {
+   wfWarn( __METHOD__ . ': Requires $title to be a Title 
object.' );
return !-- ERROR -- . htmlspecialchars( $label );
}
+
+   global $wgEnableUploads, $wgUploadMissingFileUrl, 
$wgUploadNavigationUrl;
wfProfileIn( __METHOD__ );
if ( $label == '' ) {
$label = $title-getPrefixedText();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c397de289ae51bc463b5ae7c2968703d1424368
Gerrit-PatchSet: 5

[MediaWiki-commits] [Gerrit] [FIX] WikibasePage: Allow saving wikibase pages without mwpfh - change (pywikibot/core)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [FIX] WikibasePage: Allow saving wikibase pages without mwpfh
..


[FIX] WikibasePage: Allow saving wikibase pages without mwpfh

Bug: 69664
Change-Id: I086dcaa88a1cae61ffa3a4811db9948cc34f9167
---
M pywikibot/page.py
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index a9ca948..13a5010 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2779,6 +2779,20 @@
 return False
 return 'lastrevid' in self._content
 
+def botMayEdit(self):
+
+Return whether bots may edit this page.
+
+Because there is currently no system to mark a page that it shouldn't
+be edited by bots on Wikibase pages it always returns True. The content
+of the page is not text but a dict, the original way (to search for a
+template) doesn't apply.
+
+@return: True
+@rtype: boolean
+
+return True
+
 def get(self, force=False, *args, **kwargs):
 
 Fetch all page data, and cache it.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I086dcaa88a1cae61ffa3a4811db9948cc34f9167
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] ContentTranslation depends on ULS - change (integration/jenkins-job-builder-config)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: ContentTranslation depends on ULS
..


ContentTranslation depends on ULS

Per Niklas request.

Change-Id: Ifdc528e0c6e0312fb711442119671d66efd223f5
---
M mediawiki-extensions.yaml
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index b388d79..fad9753 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -400,7 +400,8 @@
  - CongressLookup
  - ContactPage
  - ContactPageFundraiser
- - ContentTranslation
+ - ContentTranslation:
+dependencies: 'UniversalLanguageSelector'
  - Contest
  - ContributionReporting
  - ContributionScores
@@ -982,6 +983,7 @@
  - '{name}-{ext-name}-qunit':
 name: mwext
 ext-name: ContentTranslation
+dependencies: 'UniversalLanguageSelector'
  - '{name}-{ext-name}-qunit':
 name: mwext
 ext-name: DataValues

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdc528e0c6e0312fb711442119671d66efd223f5
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add protoproxy::localssl server_aliases parameter - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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

Change subject: Add protoproxy::localssl server_aliases parameter
..

Add protoproxy::localssl server_aliases parameter

This allows a vhost to be serve multiple hostnames, including wildcards.

*.wmfusercontent.org is added as an alias to the wmfusercontent.org vhost.

Change-Id: I811068fbff66a05aae44d9205701c9aba45e8bba
---
M manifests/role/cache.pp
M modules/protoproxy/manifests/localssl.pp
M modules/protoproxy/templates/localssl.erb
3 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/161205/1

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 605651c..1d65550 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -629,6 +629,7 @@
 default_server = true;
 'wmfusercontent.org':
 server_name= 'wmfusercontent.org',
+server_alias   = ['*.wmfusercontent.org'],
 proxy_server_cert_name = 'star.wmfusercontent.org';
 }
 
diff --git a/modules/protoproxy/manifests/localssl.pp 
b/modules/protoproxy/manifests/localssl.pp
index 67d2111..64e57a8 100644
--- a/modules/protoproxy/manifests/localssl.pp
+++ b/modules/protoproxy/manifests/localssl.pp
@@ -6,6 +6,9 @@
 # [*server_name*]
 #   Server name, used e.g. for SNI. Defaults to $::fqdn
 #
+# [*server_aliases*]
+#   List of server aliases, host names also served.
+#
 # [*proxy_server_cert_name*]
 #
 # [*upstream_port*]
@@ -20,6 +23,7 @@
 
 define protoproxy::localssl(
 $server_name= $::fqdn,
+$server_aliases = [],
 $proxy_server_cert_name,
 $default_server = false,
 $enabled= true,
diff --git a/modules/protoproxy/templates/localssl.erb 
b/modules/protoproxy/templates/localssl.erb
index 0394d60..f27f0ae 100644
--- a/modules/protoproxy/templates/localssl.erb
+++ b/modules/protoproxy/templates/localssl.erb
@@ -6,7 +6,7 @@
listen [::]:443 %= @default_server ? default_server ipv6only=on  : 
 %ssl;
listen 443 %= @default_server ? default_server  :  %ssl;
ssl on;
-   server_name  %= @server_name %;
+   server_name %= ([@server_name] + @server_aliases).join( ) %;
 
error_log   /var/log/nginx/%= @name %.error.log;
access_log   off;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I811068fbff66a05aae44d9205701c9aba45e8bba
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 18/09/2014 10:00 - change (mediawiki...Wikidata)

2014-09-18 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review.

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

Change subject: New Wikidata Build - 18/09/2014 10:00
..

New Wikidata Build - 18/09/2014 10:00

Change-Id: I9e14a7ab00bcb65953e73f03d5431779d099c100
---
M composer.lock
M extensions/PropertySuggester/PropertySuggester.php
M extensions/PropertySuggester/README.md
M extensions/PropertySuggester/src/PropertySuggester/GetSuggestions.php
M 
extensions/PropertySuggester/src/PropertySuggester/Suggesters/SimpleSuggester.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
M extensions/ValueView/README.md
M extensions/ValueView/ValueView.mw.php
M extensions/ValueView/ValueView.php
M extensions/ValueView/composer.json
M extensions/ValueView/lib/jquery.event/jquery.event.special.eachchange.js
R extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js
M extensions/ValueView/lib/jquery.ui/jquery.ui.inputextender.js
A extensions/ValueView/lib/jquery.ui/jquery.ui.languagesuggester.js
M extensions/ValueView/lib/jquery.ui/jquery.ui.suggester.js
M extensions/ValueView/lib/jquery.ui/jquery.ui.toggler.css
M extensions/ValueView/lib/resources.php
M extensions/ValueView/src/ExpertExtender/ExpertExtender.LanguageSelector.js
M extensions/ValueView/src/ExpertExtender/ExpertExtender.Listrotator.js
M extensions/ValueView/src/ExpertExtender/resources.php
M extensions/ValueView/src/experts/CommonsMediaType.js
M extensions/ValueView/src/experts/TimeInput.js
M extensions/ValueView/src/experts/resources.php
M extensions/ValueView/src/jquery.valueview.valueview.js
M extensions/Wikibase/.jshintignore
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/WikibaseClient.php
M extensions/Wikibase/client/i18n/ar.json
M extensions/Wikibase/client/i18n/bn.json
M extensions/Wikibase/client/i18n/ca.json
M extensions/Wikibase/client/i18n/ce.json
M extensions/Wikibase/client/i18n/da.json
M extensions/Wikibase/client/i18n/el.json
M extensions/Wikibase/client/i18n/es.json
M extensions/Wikibase/client/i18n/fa.json
M extensions/Wikibase/client/i18n/hr.json
M extensions/Wikibase/client/i18n/is.json
M extensions/Wikibase/client/i18n/ja.json
M extensions/Wikibase/client/i18n/ml.json
M extensions/Wikibase/client/i18n/oc.json
M extensions/Wikibase/client/i18n/pl.json
M extensions/Wikibase/client/i18n/qqq.json
A extensions/Wikibase/client/i18n/sc.json
M extensions/Wikibase/client/i18n/tr.json
D extensions/Wikibase/client/includes/ClientSiteLinkLookup.php
D extensions/Wikibase/client/includes/EntityIdPropertyUpdater.php
M extensions/Wikibase/client/includes/LangLinkHandler.php
M extensions/Wikibase/client/includes/WikibaseClient.php
M extensions/Wikibase/client/includes/hooks/LanguageLinkBadgeDisplay.php
A extensions/Wikibase/client/includes/hooks/SidebarHookHandlers.php
M extensions/Wikibase/client/includes/parserhooks/NoLangLinkHandler.php
M extensions/Wikibase/client/resources/wikibase.client.changeslist.css
D extensions/Wikibase/client/tests/phpunit/includes/ClientSiteLinkLookupTest.php
M extensions/Wikibase/client/tests/phpunit/includes/LangLinkHandlerTest.php
M extensions/Wikibase/client/tests/phpunit/includes/WikibaseClientTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/hooks/LanguageLinkBadgeDisplayTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/hooks/ParserFunctionRegistrantTest.php
A 
extensions/Wikibase/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
M extensions/Wikibase/composer.json
A extensions/Wikibase/docs/hooks.txt
M extensions/Wikibase/lib/WikibaseLib.hooks.php
M extensions/Wikibase/lib/WikibaseLib.php
A extensions/Wikibase/lib/i18n/az.json
M extensions/Wikibase/lib/i18n/cs.json
M extensions/Wikibase/lib/i18n/da.json
M extensions/Wikibase/lib/i18n/de.json
M extensions/Wikibase/lib/i18n/en.json
M extensions/Wikibase/lib/i18n/es.json
M extensions/Wikibase/lib/i18n/et.json
M extensions/Wikibase/lib/i18n/fa.json
M extensions/Wikibase/lib/i18n/fr.json
M extensions/Wikibase/lib/i18n/he.json
M extensions/Wikibase/lib/i18n/hr.json
M extensions/Wikibase/lib/i18n/is.json
M extensions/Wikibase/lib/i18n/it.json
M extensions/Wikibase/lib/i18n/ja.json
M extensions/Wikibase/lib/i18n/lb.json
M extensions/Wikibase/lib/i18n/mk.json
M extensions/Wikibase/lib/i18n/ml.json
M extensions/Wikibase/lib/i18n/nap.json
M extensions/Wikibase/lib/i18n/nb.json
M extensions/Wikibase/lib/i18n/nl.json
M extensions/Wikibase/lib/i18n/pl.json
M extensions/Wikibase/lib/i18n/pt.json
M extensions/Wikibase/lib/i18n/qqq.json
M extensions/Wikibase/lib/i18n/ro.json
M extensions/Wikibase/lib/i18n/ru.json
M extensions/Wikibase/lib/i18n/sl.json
M extensions/Wikibase/lib/i18n/sr-ec.json
M extensions/Wikibase/lib/i18n/sr-el.json
M extensions/Wikibase/lib/i18n/sv.json
M extensions/Wikibase/lib/i18n/vi.json
M 

[MediaWiki-commits] [Gerrit] Add i18n file - change (mediawiki...Graph)

2014-09-18 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: Add i18n file
..

Add i18n file

Add URL and description message key to extension credits

Change-Id: Ia802e1366a9ad900756c98a46b7829450fc983e0
---
M Graph.php
A i18n/en.json
A i18n/qqq.json
3 files changed, 24 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/07/161207/1

diff --git a/Graph.php b/Graph.php
index 87e17d0..e909084 100644
--- a/Graph.php
+++ b/Graph.php
@@ -19,11 +19,15 @@
 }
 
 $wgExtensionCredits['other'][] = array(
-'path' = __FILE__,
-'name' = 'Graph',
-'author' = array( 'Dan Andreescu', 'Yuri Astrakhan' ),
+   'path' = __FILE__,
+   'name' = 'Graph',
+   'author' = array( 'Dan Andreescu', 'Yuri Astrakhan' ),
+   'url' = 'https://www.mediawiki.org/wiki/Extension:Graph',
+   'descriptionmsg' = 'graph-desc',
 );
 
+$wgMessagesDirs['Graph'] = __DIR__ . '/i18n';
+
 $graphBodyFile = __DIR__ . DIRECTORY_SEPARATOR . 'Graph.body.php';
 $wgAutoloadClasses['Graph\Singleton'] = $graphBodyFile;
 $wgAutoloadClasses['Graph\Content'] = $graphBodyFile;
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 000..4ff5a87
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,9 @@
+{
+   @metadata: {
+   authors: [
+   Dan Andreescu,
+   Yuri Astrakhan
+   ]
+   },
+   graph-desc: Allows nowikigraph/nowiki tags or entire pages to 
become [http://trifacta.github.io/vega/ Vega]-based graphs
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..3ea39ec
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,8 @@
+{
+   @metadata: {
+   authors: [
+   Raimond Spekking
+   ]
+   },
+   graph-desc: 
{{desc|name=Graph|url=https://www.mediawiki.org/wiki/Graph}};
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia802e1366a9ad900756c98a46b7829450fc983e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add protoproxy::localssl server_aliases parameter - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Add protoproxy::localssl server_aliases parameter
..


Add protoproxy::localssl server_aliases parameter

This allows a vhost to be serve multiple hostnames, including wildcards.

*.wmfusercontent.org is added as an alias to the wmfusercontent.org vhost.

Change-Id: I811068fbff66a05aae44d9205701c9aba45e8bba
---
M manifests/role/cache.pp
M modules/protoproxy/manifests/localssl.pp
M modules/protoproxy/templates/localssl.erb
3 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 605651c..8e393b3 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -629,6 +629,7 @@
 default_server = true;
 'wmfusercontent.org':
 server_name= 'wmfusercontent.org',
+server_aliases = ['*.wmfusercontent.org'],
 proxy_server_cert_name = 'star.wmfusercontent.org';
 }
 
diff --git a/modules/protoproxy/manifests/localssl.pp 
b/modules/protoproxy/manifests/localssl.pp
index 67d2111..64e57a8 100644
--- a/modules/protoproxy/manifests/localssl.pp
+++ b/modules/protoproxy/manifests/localssl.pp
@@ -6,6 +6,9 @@
 # [*server_name*]
 #   Server name, used e.g. for SNI. Defaults to $::fqdn
 #
+# [*server_aliases*]
+#   List of server aliases, host names also served.
+#
 # [*proxy_server_cert_name*]
 #
 # [*upstream_port*]
@@ -20,6 +23,7 @@
 
 define protoproxy::localssl(
 $server_name= $::fqdn,
+$server_aliases = [],
 $proxy_server_cert_name,
 $default_server = false,
 $enabled= true,
diff --git a/modules/protoproxy/templates/localssl.erb 
b/modules/protoproxy/templates/localssl.erb
index 0394d60..f27f0ae 100644
--- a/modules/protoproxy/templates/localssl.erb
+++ b/modules/protoproxy/templates/localssl.erb
@@ -6,7 +6,7 @@
listen [::]:443 %= @default_server ? default_server ipv6only=on  : 
 %ssl;
listen 443 %= @default_server ? default_server  :  %ssl;
ssl on;
-   server_name  %= @server_name %;
+   server_name %= ([@server_name] + @server_aliases).join( ) %;
 
error_log   /var/log/nginx/%= @name %.error.log;
access_log   off;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I811068fbff66a05aae44d9205701c9aba45e8bba
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Remove protoproxy::localssl enabled parameter - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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

Change subject: Remove protoproxy::localssl enabled parameter
..

Remove protoproxy::localssl enabled parameter

Ori wants to remove the nginx::site enabled parameter in
I9dc3c59fbb7825f96cf675256b45a92b5bf55f2c

Before we do that, let's drop it from the classes that use it, too.

Change-Id: I8a449146fe04f27594de6d89ea3642a10d743c3b
---
M manifests/role/cache.pp
M modules/protoproxy/manifests/localssl.pp
2 files changed, 2 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/161208/1

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 8e393b3..02205d1 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -599,8 +599,7 @@
 protoproxy::localssl { $sitename:
 proxy_server_cert_name = $certname,
 upstream_port  = '80',
-default_server = true,
-enabled= true,
+default_server = true
 }
 }
 
diff --git a/modules/protoproxy/manifests/localssl.pp 
b/modules/protoproxy/manifests/localssl.pp
index 64e57a8..8ed333c 100644
--- a/modules/protoproxy/manifests/localssl.pp
+++ b/modules/protoproxy/manifests/localssl.pp
@@ -17,16 +17,12 @@
 # [*default_server*]
 #   Boolean. Adds the 'default_server' option to the listen statement.
 #   Exactly one instance should have this set to true.
-#
-# [*enabled*]
-#   Boolean. Whether the site is enabled in the nginx sites-enabled directory.
 
 define protoproxy::localssl(
 $server_name= $::fqdn,
 $server_aliases = [],
 $proxy_server_cert_name,
 $default_server = false,
-$enabled= true,
 $upstream_port  = '80'
 ) {
 
@@ -41,7 +37,6 @@
 
 nginx::site { $name:
 require = Notify['protoproxy localssl default_server'],# Ensure a 
default_server has been defined
-content = template('protoproxy/localssl.erb'),
-enabled = $enabled
+content = template('protoproxy/localssl.erb')
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a449146fe04f27594de6d89ea3642a10d743c3b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove protoproxy::localssl enabled parameter - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Remove protoproxy::localssl enabled parameter
..


Remove protoproxy::localssl enabled parameter

Ori wants to remove the nginx::site enabled parameter in
I9dc3c59fbb7825f96cf675256b45a92b5bf55f2c

Before we do that, let's drop it from the classes that use it, too.

Change-Id: I8a449146fe04f27594de6d89ea3642a10d743c3b
---
M manifests/role/cache.pp
M modules/protoproxy/manifests/localssl.pp
2 files changed, 2 insertions(+), 8 deletions(-)

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



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 8e393b3..02205d1 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -599,8 +599,7 @@
 protoproxy::localssl { $sitename:
 proxy_server_cert_name = $certname,
 upstream_port  = '80',
-default_server = true,
-enabled= true,
+default_server = true
 }
 }
 
diff --git a/modules/protoproxy/manifests/localssl.pp 
b/modules/protoproxy/manifests/localssl.pp
index 64e57a8..8ed333c 100644
--- a/modules/protoproxy/manifests/localssl.pp
+++ b/modules/protoproxy/manifests/localssl.pp
@@ -17,16 +17,12 @@
 # [*default_server*]
 #   Boolean. Adds the 'default_server' option to the listen statement.
 #   Exactly one instance should have this set to true.
-#
-# [*enabled*]
-#   Boolean. Whether the site is enabled in the nginx sites-enabled directory.
 
 define protoproxy::localssl(
 $server_name= $::fqdn,
 $server_aliases = [],
 $proxy_server_cert_name,
 $default_server = false,
-$enabled= true,
 $upstream_port  = '80'
 ) {
 
@@ -41,7 +37,6 @@
 
 nginx::site { $name:
 require = Notify['protoproxy localssl default_server'],# Ensure a 
default_server has been defined
-content = template('protoproxy/localssl.erb'),
-enabled = $enabled
+content = template('protoproxy/localssl.erb')
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a449146fe04f27594de6d89ea3642a10d743c3b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Remove separate import user group - change (translatewiki)

2014-09-18 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: Remove separate import user group
..

Remove separate import user group

I was the only user in this group, for whatever reasons
sysop have still the import rights

Per discussion on
https://translatewiki.net/wiki/Thread:Support/Special:ListGroupRights

Change-Id: I0d43aed263573d37a9771be740b80613ee93aef5
---
M PermissionSettings.php
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/09/161209/1

diff --git a/PermissionSettings.php b/PermissionSettings.php
index 17d8c14..67bfec2 100644
--- a/PermissionSettings.php
+++ b/PermissionSettings.php
@@ -44,9 +44,6 @@
 $wgGroupPermissions['sysop']['delete']  = true;
 $wgGroupPermissions['translator'   ]['deletedhistory']  = true;
 
-$wgGroupPermissions['import'   ]['import']  = true;
-$wgGroupPermissions['import'   ]['importupload']= true;
-
 $wgGroupPermissions['sysop']['import']  = false;
 $wgGroupPermissions['sysop']['importupload']= false;
 $wgGroupPermissions['sysop']['suppressredirect']= true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d43aed263573d37a9771be740b80613ee93aef5
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix ULS QUnit tests - change (mediawiki...UniversalLanguageSelector)

2014-09-18 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Fix ULS QUnit tests
..

Fix ULS QUnit tests

This also rises minimum MediaWiki version to 1.22. This allowed
removing hundred lines of code. MLEB is already 1.22 and above.

Change-Id: I46a1674e4ede48a0e331c8d201d1d847db51d9dd
---
M UniversalLanguageSelector.hooks.php
M resources/js/ext.uls.preferences.js
M tests/qunit/ext.uls.tests.js
3 files changed, 36 insertions(+), 100 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/10/161210/1

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 0b2878a..36c292b 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -102,7 +102,7 @@
public static function addTestModules( array $testModules, 
ResourceLoader $resourceLoader ) {
$testModules['qunit']['ext.uls.tests'] = array(
'scripts' = array( 'tests/qunit/ext.uls.tests.js' ),
-   'dependencies' = array( 'ext.uls.init', 
'ext.uls.interface' ),
+   'dependencies' = array( 'jquery.uls', 
'ext.uls.preferences' ),
'localBasePath' = __DIR__,
'remoteExtPath' = 'UniversalLanguageSelector',
);
diff --git a/resources/js/ext.uls.preferences.js 
b/resources/js/ext.uls.preferences.js
index cebc20e..ef91da6 100644
--- a/resources/js/ext.uls.preferences.js
+++ b/resources/js/ext.uls.preferences.js
@@ -20,86 +20,7 @@
 ( function ( $, mw ) {
'use strict';
 
-   var ULSPreferences,
-   cachedOptionsToken = null;
-
-   /**
-* Post to options API with correct token.
-* If we have no token, get one and try to post.
-* If we have a cached token try using that,
-* and if it fails, blank out the cached token and start over.
-*
-* @param params {Object} API parameters
-* @param ok {Function} callback for success
-* @param err {Function} [optional] error callback
-* @return {jqXHR}
-*/
-   function saveOptionsWithToken( params, ok, err ) {
-   if ( cachedOptionsToken === null ) {
-   // We don't have a valid cached token, so get a fresh 
one and try posting.
-   // We do not trap any 'badtoken' or 'notoken' errors, 
because we don't want
-   // an infinite loop. If this fresh token is bad, 
something else is very wrong.
-   return getOptionsToken( function ( token ) {
-   params.token = token;
-   new mw.Api().post( params, ok, err );
-   }, err );
-   } else {
-   params.token = cachedOptionsToken;
-
-   return new mw.Api().post( params, {
-   ok: ok,
-   err: function ( code, result ) {
-   // We do have a token, but it might be 
expired.
-   // So if it is 'bad', then start over 
with a new token.
-   if ( code === 'badtoken' ) {
-   // force a new token, clear any 
old one
-   cachedOptionsToken = null;
-   saveOptionsWithToken( params, 
ok, err );
-   } else {
-   err( code, result );
-   }
-   }
-   } );
-   }
-   }
-
-   /**
-* Api helper to grab an options token
-*
-* token callback has signature ( String token )
-* error callback has signature ( String code, Object results, 
XmlHttpRequest xhr, Exception exception )
-* Note that xhr and exception are only available for 'http_*' errors
-* code may be any http_* error code (see mw.Api), or 'token_missing'
-*
-* @param tokenCallback {Function} received token callback
-* @param err {Function} error callback
-* @return {jqXHR}
-*/
-   function getOptionsToken( tokenCallback, err ) {
-   return new mw.Api().get( {
-   action: 'tokens',
-   type: 'options'
-   }, {
-   ok: function ( data ) {
-   var token;
-
-   // If token type is not available for this user,
-   // key 'translationreviewtoken' is missing or 
can contain Boolean false
-   

[MediaWiki-commits] [Gerrit] nginx: drop 'enabled' parameter - change (operations...nginx)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: nginx: drop 'enabled' parameter
..


nginx: drop 'enabled' parameter

With the Apache module, we decided not to support the (rather bizarre) use-case
of provisioning a site on a host but not enabling it. I think it makes sense to
make the same decision here.

Change-Id: I9dc3c59fbb7825f96cf675256b45a92b5bf55f2c
---
M manifests/site.pp
1 file changed, 7 insertions(+), 20 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index fe7df89..49e9492 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -19,9 +19,6 @@
 #   'present' or 'absent'; whether the site configuration is
 #   installed or removed in sites-available/
 #
-# [*enabled*]
-#   Boolean; true by default.
-#
 # === Examples
 #
 #  nginx::site { 'graphite':
@@ -29,32 +26,22 @@
 #  }
 #
 define nginx::site(
+$ensure  = present,
 $content = undef,
 $source  = undef,
-$ensure  = present,
-$enabled = true,
-)
-{
+) {
 include ::nginx
 
-$basename = regsubst($title, '\W', '-', 'G')
+$basename = regsubst($title, '[\W_]', '-', 'G')
 
 file { /etc/nginx/sites-available/${basename}:
+ensure  = $ensure,
 content = $content,
 source  = $source,
-ensure  = $ensure
 }
 
-if $ensure == 'present' and $enabled == true {
-file { /etc/nginx/sites-enabled/${basename}:
-require = File[/etc/nginx/sites-available/${basename}],
-ensure  = link,
-target  = /etc/nginx/sites-available/${basename},
-}
-}
-else {
-file { /etc/nginx/sites-enabled/${basename}:
-ensure = absent
-}
+file { /etc/nginx/sites-enabled/${basename}:
+ensure = ensure_link($ensure),
+target = /etc/nginx/sites-available/${basename},
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9dc3c59fbb7825f96cf675256b45a92b5bf55f2c
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet/nginx
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix tag names generated in API XML output. - change (mediawiki...Wikibase)

2014-09-18 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Fix tag names generated in API XML output.
..

Fix tag names generated in API XML output.

This fixes ResultBuilder misbehaving if a serializer already set
the magic _element field for specifying the tag name to use in XML
output.

Deploy: this is technically a breaking chance, since it changes
the structure of the API's XML output; However, the previous output
was obviously broken and should not be considered canonical.
So this is really an un-breaking change.

Bug: 70531
Change-Id: I98922c0f0566f57e4a8dc88f69c8ef4023d2e3ea
---
M repo/includes/api/ResultBuilder.php
M repo/tests/phpunit/data/api/getclaims.xml
M repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
M repo/tests/phpunit/includes/api/ResultBuilderTest.php
4 files changed, 19 insertions(+), 7 deletions(-)


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

diff --git a/repo/includes/api/ResultBuilder.php 
b/repo/includes/api/ResultBuilder.php
index 732562a..1f4e6dc 100644
--- a/repo/includes/api/ResultBuilder.php
+++ b/repo/includes/api/ResultBuilder.php
@@ -23,6 +23,7 @@
  *
  * @licence GNU GPL v2+
  * @author Adam Shorland
+ * @author Daniel Kinzler
  */
 class ResultBuilder {
 
@@ -132,10 +133,11 @@
$this-checkTagIsString( $tag );
 
if ( $this-result-getIsRawMode() ) {
-   $values = array_values( $values );
-   }
+   // Unset first, so we don't make the tag name an actual 
value.
+   // We'll be setting this to $tag by calling 
setIndexedTagName().
+   unset( $values['_element'] );
 
-   if ( $this-result-getIsRawMode() ) {
+   $values = array_values( $values );
$this-result-setIndexedTagName( $values, $tag );
}
 
@@ -438,7 +440,10 @@
$claimsSerializer = 
$this-serializerFactory-newClaimsSerializer( $this-getOptions() );
 
$values = $claimsSerializer-getSerialized( new Claims( $claims 
) );
-   $this-setList( $path, 'claims', $values, 'claim' );
+
+   // HACK: comply with ApiResult::setIndexedTagName
+   $tag = isset( $values['_element'] ) ? $values['_element'] : 
'claim';
+   $this-setList( $path, 'claims', $values, $tag );
}
 
/**
diff --git a/repo/tests/phpunit/data/api/getclaims.xml 
b/repo/tests/phpunit/data/api/getclaims.xml
index 8a0c7e4..37cd157 100644
--- a/repo/tests/phpunit/data/api/getclaims.xml
+++ b/repo/tests/phpunit/data/api/getclaims.xml
@@ -1 +1 @@
-?xml version=1.0?apiclaimsclaim id=P1491009claim 
id=Q80050245$kittens type=statement rank=normalmainsnak 
snaktype=novalue property=P1491009 /qualifiers /qualifiers-order 
//claim/claimclaimproperty/claim/claims/api
+?xml version=1.0?apiclaimsproperty id=P1491009claim 
id=Q80050245$kittens type=statement rank=normalmainsnak 
snaktype=novalue property=P1491009 /qualifiers /qualifiers-order 
//claim/property/claims/api
diff --git a/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php 
b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
index c70dab5..aeed347 100644
--- a/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
+++ b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
@@ -15,8 +15,6 @@
 use Wikibase\Repo\WikibaseRepo;
 
 /**
- * @fixme wbgetclaims adds an extra claimproperty/claim in output! see bug 
70531
- *
  * @group API
  * @group Wikibase
  * @group WikibaseAPI
diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php 
b/repo/tests/phpunit/includes/api/ResultBuilderTest.php
index afc2ead..cda9e64 100644
--- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php
+++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php
@@ -789,6 +789,13 @@
'ROOT' = array(
'foo' = array( 'x', 'y', 
'_element' = 'letter' ) )
) ),
+
+   'pre-set element name' = array( 'ROOT', 'foo', array( 
'x', 'y', '_element' = '_thingy' ), 'letter', true,
+   array(
+   'ROOT' = array(
+   'foo' = array( 'x', 'y', 
'_element' = 'letter' ) )
+   ) ),
+
);
}
 
@@ -980,6 +987,8 @@
$this-assertEquals( $value, $actual[$key] );
}
}
+
+   $this-assertEquals( array_keys( $expected ), array_keys( 
$actual ), Keys of $path: );
}
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] Fix missing options bug in GetClaims - change (mediawiki...Wikibase)

2014-09-18 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Fix missing options bug in GetClaims
..

Fix missing options bug in GetClaims

The problem is that the raw mode setting is false when the builder
is constructed. Using lazy initialization to create the serialization
options seems to work.

(This also fixes GetClaimsTest, which misfired on snak's datatypes
now correctly being included in the output.)

Change-Id: Ieb1dfec050a2963eab675fd831f8da8bede17db3
---
M repo/includes/api/ResultBuilder.php
M repo/tests/phpunit/includes/api/GetClaimsTest.php
2 files changed, 80 insertions(+), 41 deletions(-)


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

diff --git a/repo/includes/api/ResultBuilder.php 
b/repo/includes/api/ResultBuilder.php
index 7cf6fd4..732562a 100644
--- a/repo/includes/api/ResultBuilder.php
+++ b/repo/includes/api/ResultBuilder.php
@@ -71,9 +71,6 @@
$this-entityTitleLookup = $entityTitleLookup;
$this-serializerFactory = $serializerFactory;
$this-missingEntityCounter = -1;
-
-   $this-options = new SerializationOptions();
-   $this-options-setOption( EntitySerializer::OPT_SORT_ORDER, 
EntitySerializer::SORT_NONE );
}
 
/**
@@ -83,6 +80,12 @@
 * @return SerializationOptions
 */
public function getOptions() {
+   if ( !$this-options ) {
+   $this-options = new SerializationOptions();
+   $this-options-setIndexTags( 
$this-result-getIsRawMode() );
+   $this-options-setOption( 
EntitySerializer::OPT_SORT_ORDER, EntitySerializer::SORT_NONE );
+   }
+
return $this-options;
}
 
@@ -275,7 +278,14 @@
 *
 * @since 0.5
 */
-   public function addEntityRevision( $key, EntityRevision 
$entityRevision, SerializationOptions $options = null, $props = 'all', $siteIds 
= array() ) {
+   public function addEntityRevision(
+   $key,
+   EntityRevision $entityRevision,
+   SerializationOptions
+   $options = null,
+   $props = 'all',
+   $siteIds = array()
+   ) {
$entity = $entityRevision-getEntity();
$entityId = $entity-getId();
 
@@ -285,12 +295,9 @@
 
$record = array();
 
+   $serializerOptions = $this-getOptions();
if ( $options ) {
-   $serializerOptions = new SerializationOptions();
-   $serializerOptions-merge( $this-options );
$serializerOptions-merge( $options );
-   } else {
-   $serializerOptions = $this-options;
}
 
//if there are no props defined only return type and id..
@@ -348,7 +355,7 @@
 * @param array|string $path where the data is located
 */
public function addLabels( array $labels, $path ) {
-   $labelSerializer = 
$this-serializerFactory-newLabelSerializer( $this-options );
+   $labelSerializer = 
$this-serializerFactory-newLabelSerializer( $this-getOptions() );
 
$values = $labelSerializer-getSerialized( $labels );
$this-setList( $path, 'labels', $values, 'label' );
@@ -363,7 +370,7 @@
 * @param array|string $path where the data is located
 */
public function addDescriptions( array $descriptions, $path ) {
-   $descriptionSerializer = 
$this-serializerFactory-newDescriptionSerializer( $this-options );
+   $descriptionSerializer = 
$this-serializerFactory-newDescriptionSerializer( $this-getOptions() );
 
$values = $descriptionSerializer-getSerialized( $descriptions 
);
$this-setList( $path, 'descriptions', $values, 'description' );
@@ -378,7 +385,7 @@
 * @param array|string $path where the data is located
 */
public function addAliases( array $aliases, $path ) {
-   $aliasSerializer = 
$this-serializerFactory-newAliasSerializer( $this-options );
+   $aliasSerializer = 
$this-serializerFactory-newAliasSerializer( $this-getOptions() );
$values = $aliasSerializer-getSerialized( $aliases );
$this-setList( $path, 'aliases', $values, 'alias' );
}
@@ -393,8 +400,7 @@
 * @param array|null $options
 */
public function addSiteLinks( array $siteLinks, $path, $options = null 
) {
-   $serializerOptions = new SerializationOptions();
-   $serializerOptions-merge( $this-options );
+   $serializerOptions = $this-getOptions();
 
if ( is_array( $options ) ) {
if ( in_array( 

[MediaWiki-commits] [Gerrit] Add tests for api xml format - change (mediawiki...Wikibase)

2014-09-18 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Add tests for api xml format
..

Add tests for api xml format

Tests for wbgetclaims and wbgetentities xml format

Change-Id: Icb29307d44c79059e59c7e0fc275d2abb5fc0ecd
---
A repo/tests/phpunit/data/api/getclaims.xml
A repo/tests/phpunit/data/api/getentities.xml
A repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
3 files changed, 194 insertions(+), 0 deletions(-)


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

diff --git a/repo/tests/phpunit/data/api/getclaims.xml 
b/repo/tests/phpunit/data/api/getclaims.xml
new file mode 100644
index 000..8a0c7e4
--- /dev/null
+++ b/repo/tests/phpunit/data/api/getclaims.xml
@@ -0,0 +1 @@
+?xml version=1.0?apiclaimsclaim id=P1491009claim 
id=Q80050245$kittens type=statement rank=normalmainsnak 
snaktype=novalue property=P1491009 /qualifiers /qualifiers-order 
//claim/claimclaimproperty/claim/claims/api
diff --git a/repo/tests/phpunit/data/api/getentities.xml 
b/repo/tests/phpunit/data/api/getentities.xml
new file mode 100644
index 000..5f6ceb6
--- /dev/null
+++ b/repo/tests/phpunit/data/api/getentities.xml
@@ -0,0 +1 @@
+?xml version=1.0?api success=1entitiesentity pageid=2276 ns=0 
title=Q80050245 lastrevid=4089 modified=2014-09-07T20:39:03Z 
id=Q80050245 type=itemaliases /labels /descriptions 
/claimsproperty id=P1491009claim id=Q80050245$kittens 
type=statement rank=normalmainsnak snaktype=novalue property=P1491009 
/qualifiers /qualifiers-order //claim/property/claimssitelinks 
//entity/entities/api
diff --git a/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php 
b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
new file mode 100644
index 000..c70dab5
--- /dev/null
+++ b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
@@ -0,0 +1,192 @@
+?php
+
+namespace Wikibase\Test\Api;
+
+use ApiBase;
+use ApiMain;
+use Exception;
+use FauxRequest;
+use Wikibase\DataModel\ByPropertyIdArray;
+use Wikibase\DataModel\Claim\Statement;
+use Wikibase\DataModel\Entity\Item;
+use Wikibase\DataModel\Entity\Property;
+use Wikibase\DataModel\Snak\PropertyNoValueSnak;
+use Wikibase\EntityRevision;
+use Wikibase\Repo\WikibaseRepo;
+
+/**
+ * @fixme wbgetclaims adds an extra claimproperty/claim in output! see bug 
70531
+ *
+ * @group API
+ * @group Wikibase
+ * @group WikibaseAPI
+ * @group WikibaseRepo
+ * @group medium
+ *
+ * @licence GNU GPL v2+
+ * @author Katie Filbert  aude.w...@gmail.com 
+ */
+class ApiXmlFormatTest extends \PHPUnit_Framework_TestCase {
+
+   /**
+* @var EntityRevision
+*/
+   private $entityRevision;
+
+   public function testGetEntitiesXmlFormat() {
+   $entityRevision = $this-getEntityRevision();
+   $entityId = 
$entityRevision-getEntity()-getId()-getSerialization();
+
+   $params = array(
+   'action' = 'wbgetentities',
+   'ids' = $entityId
+   );
+
+   $module = $this-getApiModule( '\Wikibase\Api\GetEntities', 
'wbgetentities', $params );
+   $result = $this-doApiRequest( $module );
+   $actual = $this-removeGetEntitiesAttributes( $result, 
$entityId );
+
+   $expected = $this-getExpectedGetEntitiesXml( $entityRevision );
+
+   $this-assertEquals( $expected, $actual );
+   }
+
+   private function getExpectedGetEntitiesXml( EntityRevision 
$entityRevision ) {
+   $xml = trim( file_get_contents( __DIR__ . 
'/../../data/api/getentities.xml' ) );
+
+   $expected = $this-replaceIdsInExpectedXml( $xml, 
$entityRevision );
+   $expected = $this-removeGetEntitiesAttributes(
+   $expected,
+   
$entityRevision-getEntity()-getId()-getSerialization()
+   );
+
+   return $expected;
+   }
+
+   private function replaceIdsInExpectedXml( $xml, EntityRevision 
$entityRevision ) {
+   $xml = $this-replacePropertyId( $xml, $entityRevision );
+   $xml = $this-replaceEntityId(
+   $xml,
+   
$entityRevision-getEntity()-getId()-getSerialization()
+   );
+
+   return $xml;
+   }
+
+   private function replaceEntityId( $xml, $entityId ) {
+   return str_replace( 'Q80050245', $entityId, $xml );
+   }
+
+   private function replacePropertyId( $xml, EntityRevision 
$entityRevision ) {
+   $claims = $entityRevision-getEntity()-getClaims();
+
+   $byPropertyIdArray = new ByPropertyIdArray( $claims );
+   $byPropertyIdArray-buildIndex();
+
+   $propertyIds = $byPropertyIdArray-getPropertyIds();
+
+   foreach( $propertyIds as $propertyId ) {
+   $propertyIdText = 

[MediaWiki-commits] [Gerrit] Version bump - change (operations...hhvm)

2014-09-18 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: Version bump
..

Version bump

Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M debian/changelog
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm 
refs/changes/16/161216/1

diff --git a/debian/changelog b/debian/changelog
index 67d2bfb..4c7a32e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+hhvm (3.3.0+20140918+wmf1) trusty-wikimedia; urgency=medium
+
+  * New upstream version 
+
+ -- Giuseppe Lavagetto glavage...@wikimedia.org  Thu, 18 Sep 2014 12:39:00 
+0200
+
 hhvm (3.3-dev+20140728+wmf7) trusty-wikimedia; urgency=low
 
   * debian/patches:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4375a80a7f60bc552590bdc4baf6cde3ca8a8ef
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/hhvm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Updating patches to sync with upstream - change (operations...hhvm)

2014-09-18 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: Updating patches to sync with upstream
..

Updating patches to sync with upstream

Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
D debian/patches/ArrayObject-append-should-delegate-to-ArrayObject-of.patch
D debian/patches/ExposeApiVersion
D debian/patches/Fix-handling-of-pcre-overflow-expressions.patch
D 
debian/patches/Support-stream-wrappers-in-XML-parser-extensions-add-external-entity-loader.patch
D debian/patches/change_api_version
A debian/patches/fix-sql-warning.patch
D debian/patches/fix_fastcgi_handling
D debian/patches/fix_freetype_include
R debian/patches/remove_libpam.patch
M debian/patches/series
R debian/patches/typos.patch
11 files changed, 45 insertions(+), 1,978 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm 
refs/changes/15/161215/1

diff --git 
a/debian/patches/ArrayObject-append-should-delegate-to-ArrayObject-of.patch 
b/debian/patches/ArrayObject-append-should-delegate-to-ArrayObject-of.patch
deleted file mode 100644
index c4cbc51..000
--- a/debian/patches/ArrayObject-append-should-delegate-to-ArrayObject-of.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From be5c755780e52193e00d55cca9475381b3913c35 Mon Sep 17 00:00:00 2001
-From: aude aude.w...@gmail.com
-Date: Fri, 15 Aug 2014 15:07:14 -0700
-Subject: [PATCH] ArrayObject::append() should delegate to
- ArrayObject::offsetSet()
-
-Summary: Match php5 implementation by delegating rather than direct 
manipulation of internal state.
-Fixes issue #3403.
-Closes https://github.com/facebook/hhvm/pull/3404
-
-Reviewed By: @fredemmott
-
-Differential Revision: D1486300
-
-Pulled By: svcscm

- hphp/system/php/spl/miscellaneous/ArrayObject.php |  2 +-
- hphp/test/slow/array_object/append.php| 15 +++
- hphp/test/slow/array_object/append.php.expect | 18 ++
- 3 files changed, 34 insertions(+), 1 deletion(-)
-
-diff --git a/hphp/system/php/spl/miscellaneous/ArrayObject.php 
b/hphp/system/php/spl/miscellaneous/ArrayObject.php
-index d405cc0..ed020c1 100644
 a/hphp/system/php/spl/miscellaneous/ArrayObject.php
-+++ b/hphp/system/php/spl/miscellaneous/ArrayObject.php
-@@ -72,7 +72,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess,
- 'use ArrayObject::offsetSet() instead'
-   );
- }
--$this-storage[] = $value;
-+$this-offsetSet(null, $value);
-   }
- 
-   // This doc comment block generated by idl/sysdoc.php
-diff --git a/hphp/test/slow/array_object/append.php 
b/hphp/test/slow/array_object/append.php
-index da7f7ca..ba5c292 100644
 a/hphp/test/slow/array_object/append.php
-+++ b/hphp/test/slow/array_object/append.php
-@@ -1,6 +1,21 @@
- ?php
- 
-+class ExtendedArrayObject extends ArrayObject {
-+  public function offsetSet($key, $value) {
-+$key = 'q1';
-+parent::offsetSet($key, $value);
-+  }
-+}
-+
- $arrayobj = new ArrayObject(array('first','second','third'));
- $arrayobj-append('fourth');
- $arrayobj-append(array('five', 'six'));
- var_dump($arrayobj);
-+
-+$arrayobj = new ExtendedArrayObject(array('y'));
-+$arrayobj-append('x');
-+var_dump($arrayobj);
-+
-+$arrayobj = new ExtendedArrayObject(array('q2' = 'y'));
-+$arrayobj-append('z');
-+var_dump($arrayobj);
-diff --git a/hphp/test/slow/array_object/append.php.expect 
b/hphp/test/slow/array_object/append.php.expect
-index 194af66..45e2fdb 100644
 a/hphp/test/slow/array_object/append.php.expect
-+++ b/hphp/test/slow/array_object/append.php.expect
-@@ -18,3 +18,21 @@ object(ArrayObject)#1 (1) {
- }
-   }
- }
-+object(ExtendedArrayObject)#2 (1) {
-+  [storage:ArrayObject:private]=
-+  array(2) {
-+[0]=
-+string(1) y
-+[q1]=
-+string(1) x
-+  }
-+}
-+object(ExtendedArrayObject)#3 (1) {
-+  [storage:ArrayObject:private]=
-+  array(2) {
-+[q2]=
-+string(1) y
-+[q1]=
-+string(1) z
-+  }
-+}
--- 
-2.1.0.rc1
-
diff --git a/debian/patches/ExposeApiVersion b/debian/patches/ExposeApiVersion
deleted file mode 100644
index 8f7edab..000
--- a/debian/patches/ExposeApiVersion
+++ /dev/null
@@ -1,26 +0,0 @@
-From eeec7e0b09c8770763596942e646ab69a5436de7 Mon Sep 17 00:00:00 2001
-From: Ori Livneh o...@wikimedia.org
-Date: Wed, 30 Jul 2014 17:00:13 -0700
-Subject: [PATCH] Expose extension API version in output of 'hhvm --version'
-
-It's useful for packaging and configuration management scripts that want to
-determine where dynamic extension files should be placed.

- hphp/runtime/base/program-functions.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/hphp/runtime/base/program-functions.cpp 
b/hphp/runtime/base/program-functions.cpp
-index 1a8673f..2520090 100644
 a/hphp/runtime/base/program-functions.cpp
-+++ b/hphp/runtime/base/program-functions.cpp
-@@ -1188,6 +1188,7 @@ static int execute_program_impl(int argc, char** argv) {
-  

[MediaWiki-commits] [Gerrit] Update submodule nginx - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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

Change subject: Update submodule nginx
..

Update submodule nginx

Change-Id: I9990c0f28db9af47d029eef5c23d93fbcbe7c915
---
M modules/nginx
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/161217/1

diff --git a/modules/nginx b/modules/nginx
index 597d829..366737b 16
--- a/modules/nginx
+++ b/modules/nginx
-Subproject commit 597d8292a1e222a2817e116078d1de6034b992de
+Subproject commit 366737bca871049accaef8c6d5b7910ed1a71a70

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9990c0f28db9af47d029eef5c23d93fbcbe7c915
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update submodule nginx - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Update submodule nginx
..


Update submodule nginx

Change-Id: I9990c0f28db9af47d029eef5c23d93fbcbe7c915
---
M modules/nginx
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/modules/nginx b/modules/nginx
index 597d829..366737b 16
--- a/modules/nginx
+++ b/modules/nginx
-Subproject commit 597d8292a1e222a2817e116078d1de6034b992de
+Subproject commit 366737bca871049accaef8c6d5b7910ed1a71a70

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9990c0f28db9af47d029eef5c23d93fbcbe7c915
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] metrics: disable SSL virtualhost and cert - change (operations/puppet)

2014-09-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: metrics: disable SSL virtualhost and cert
..


metrics: disable SSL virtualhost and cert

RT: 7352

Change-Id: Ia00f14e1fc93869117178ed4e9fe95dfb26dd33e
---
M manifests/misc/statistics.pp
M templates/apache/sites/metrics.wikimedia.org.erb
2 files changed, 0 insertions(+), 33 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  Ottomata: Looks good to me, approved
  Dzahn: Looks good to me, but someone else must approve



diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 5b788a7..8675d30 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -416,10 +416,6 @@
 
 include webserver::apache
 include ::apache::mod::alias
-include ::apache::mod::ssl
-
-# install metrics.wikimedia.org SSL certificate
-install_certificate{ $site_name: }
 
 # Set up the VirtualHost
 apache::site { $site_name:
diff --git a/templates/apache/sites/metrics.wikimedia.org.erb 
b/templates/apache/sites/metrics.wikimedia.org.erb
index 6853c97..9bac6be 100644
--- a/templates/apache/sites/metrics.wikimedia.org.erb
+++ b/templates/apache/sites/metrics.wikimedia.org.erb
@@ -25,32 +25,3 @@
   LogLevel warn
   CustomLog /var/log/apache2/access.metrics.log combined
 /VirtualHost
-
-VirtualHost *:443
-  # Same as above VirtualHost *:80 /, but as we do not want to
-  # pollute puppet with a separate configuration that we can include
-  # both above and here, and until we can use Apache 2.4 to use
-  # If /, we have to duplicate the above configuration verbatim.
-
-  # Copied configuration from above VirtualHost *:80 / ---
-
-  ServerName %= @site_name %
-  ServerAlias metrics-api.wikimedia.org
-  ServerAdmin n...@wikimedia.org
-
-  Redirect permanent / %= @redirect_target %
-
-  ErrorLog /var/log/apache2/error.metrics.log
-  LogLevel warn
-  CustomLog /var/log/apache2/access.metrics.log combined
-
-  # SSL configuration --
-
-  SSLEngine on
-  SSLProtocol +ALL -SSLv2
-  SSLCipherSuite 
ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:AES128:AES256:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!DH
-  SSLHonorCipherOrder on
-  SSLCertificateFile/etc/ssl/certs/%= @site_name %.pem
-  SSLCertificateChainFile /etc/ssl/certs/%= @site_name %.chained.pem
-  SSLCertificateKeyFile /etc/ssl/private/%= @site_name %.key
-/VirtualHost

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia00f14e1fc93869117178ed4e9fe95dfb26dd33e
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Ottomata 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] Make use of dh_auto_install to install php.ini - change (operations...hhvm)

2014-09-18 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: Make use of dh_auto_install to install php.ini
..


Make use of dh_auto_install to install php.ini

Change-Id: I822733d1f3476f25e5b43c88f48122f56e980226
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M debian/hhvm.install
R debian/php.ini
M debian/rules
3 files changed, 2 insertions(+), 6 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/debian/hhvm.install b/debian/hhvm.install
index 72eba63..22ff506 100644
--- a/debian/hhvm.install
+++ b/debian/hhvm.install
@@ -1 +1,2 @@
 usr/bin/hhvm
+debian/php.ini /etc/hhvm
diff --git a/debian/hhvm.ini b/debian/php.ini
similarity index 100%
rename from debian/hhvm.ini
rename to debian/php.ini
diff --git a/debian/rules b/debian/rules
index e18850b..50d804f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,9 +36,4 @@
[ -n $${hhvmapi} ]  echo 
hhvm:ApiVersion=hhvm-api-$${hhvmapi}  debian/hhvm.substvars
dh_gencontrol
 
-override_dh_auto_install:
-   dh_auto_install
-   # Install the default ini file.
-   install -m644 $(CURDIR)/debian/hhvm.ini 
$(CURDIR)/debian/hhvm/etc/hhvm/php.ini
-
-.PHONY: override_dh_auto_build override_dh_auto_configure 
override_dh_auto_test override_dh_strip override_dh_gencontrol 
override_dh_auto_install
+.PHONY: override_dh_auto_build override_dh_auto_configure 
override_dh_auto_test override_dh_strip override_dh_gencontrol

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I822733d1f3476f25e5b43c88f48122f56e980226
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/hhvm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove protoproxy::init enabled parameter - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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

Change subject: Remove protoproxy::init enabled parameter
..

Remove protoproxy::init enabled parameter

This was used for nginx::site's enabled parameter, which has been
removed as well.

Change-Id: I579122cee7c0fd8789494d4915c320790915815e
---
M manifests/role/protoproxy.pp
M modules/protoproxy/manifests/init.pp
2 files changed, 2 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/19/161219/1

diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index 7caa31c..d3fdfa4 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -89,7 +89,6 @@
 'esams' = { 'primary' = '10.2.3.25', 'secondary' = 
'208.80.154.224' },
 },
 ipv6_enabled   = true,
-enabled = true,
 proxy_listen_flags = 'default ssl',
 }
 protoproxy{ 'bits':
@@ -104,7 +103,6 @@
 'esams' = { 'primary' = '10.2.3.23', 'secondary' = 
'208.80.154.234' },
 },
 ipv6_enabled = true,
-enabled = true,
 }
 protoproxy{ 'upload':
 proxy_addresses = {
@@ -118,7 +116,6 @@
 'esams' = { 'primary' = '10.2.3.24', 'secondary' = 
'208.80.154.240' },
 },
 ipv6_enabled = true,
-enabled = true,
 }
 protoproxy{ 'mobilewikipedia':
 proxy_addresses = {
@@ -132,7 +129,6 @@
 'esams' = { 'primary' = '10.2.3.26', 'secondary' = 
'208.80.154.236' },
 },
 ipv6_enabled = true,
-enabled = true,
 }
 }
 
@@ -170,7 +166,6 @@
 'eqiad' = { 'primary' = '127.0.0.1' }
 },
 ipv6_enabled = false,
-enabled = true,
 }
 
 $instances = {
diff --git a/modules/protoproxy/manifests/init.pp 
b/modules/protoproxy/manifests/init.pp
index 20ac670..8471a07 100644
--- a/modules/protoproxy/manifests/init.pp
+++ b/modules/protoproxy/manifests/init.pp
@@ -22,12 +22,6 @@
 #
 # [*proxy_backend*]
 #
-# [*enabled*]
-# Whether to enable the site configuration. It will always be generated under
-# /etc/nginx/sites-available , enabling this parameter will create a symbolic
-# link under /etc/nginx/sites-enabled.
-# Defaults to false
-#
 # [*proxy_listen_flags*]
 # Defaults to ''
 #
@@ -53,8 +47,7 @@
 #proxy_backend = {
 # 'pmtpa' = {'primary' = 'apaches.wmnet' },
 #},
-#ipv6_enabled = false,
-#enabled = true,
+#ipv6_enabled = false
 #  }
 #
 define protoproxy(
@@ -62,14 +55,12 @@
 $proxy_server_cert_name,
 $proxy_backend,
 $proxy_addresses={},
-$enabled=false,
 $proxy_listen_flags='',
 $proxy_port='80',
 $ipv6_enabled=false,
 $ssl_backend={},
 ) {
 nginx::site { $name:
-content  = template('protoproxy/proxy.erb'),
-enabled  = $enabled,
+content  = template('protoproxy/proxy.erb')
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I579122cee7c0fd8789494d4915c320790915815e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove protoproxy::init enabled parameter - change (operations/puppet)

2014-09-18 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Remove protoproxy::init enabled parameter
..


Remove protoproxy::init enabled parameter

This was used for nginx::site's enabled parameter, which has been
removed as well.

Change-Id: I579122cee7c0fd8789494d4915c320790915815e
---
M manifests/role/protoproxy.pp
M modules/protoproxy/manifests/init.pp
2 files changed, 2 insertions(+), 16 deletions(-)

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



diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index 7caa31c..d3fdfa4 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -89,7 +89,6 @@
 'esams' = { 'primary' = '10.2.3.25', 'secondary' = 
'208.80.154.224' },
 },
 ipv6_enabled   = true,
-enabled = true,
 proxy_listen_flags = 'default ssl',
 }
 protoproxy{ 'bits':
@@ -104,7 +103,6 @@
 'esams' = { 'primary' = '10.2.3.23', 'secondary' = 
'208.80.154.234' },
 },
 ipv6_enabled = true,
-enabled = true,
 }
 protoproxy{ 'upload':
 proxy_addresses = {
@@ -118,7 +116,6 @@
 'esams' = { 'primary' = '10.2.3.24', 'secondary' = 
'208.80.154.240' },
 },
 ipv6_enabled = true,
-enabled = true,
 }
 protoproxy{ 'mobilewikipedia':
 proxy_addresses = {
@@ -132,7 +129,6 @@
 'esams' = { 'primary' = '10.2.3.26', 'secondary' = 
'208.80.154.236' },
 },
 ipv6_enabled = true,
-enabled = true,
 }
 }
 
@@ -170,7 +166,6 @@
 'eqiad' = { 'primary' = '127.0.0.1' }
 },
 ipv6_enabled = false,
-enabled = true,
 }
 
 $instances = {
diff --git a/modules/protoproxy/manifests/init.pp 
b/modules/protoproxy/manifests/init.pp
index 20ac670..8471a07 100644
--- a/modules/protoproxy/manifests/init.pp
+++ b/modules/protoproxy/manifests/init.pp
@@ -22,12 +22,6 @@
 #
 # [*proxy_backend*]
 #
-# [*enabled*]
-# Whether to enable the site configuration. It will always be generated under
-# /etc/nginx/sites-available , enabling this parameter will create a symbolic
-# link under /etc/nginx/sites-enabled.
-# Defaults to false
-#
 # [*proxy_listen_flags*]
 # Defaults to ''
 #
@@ -53,8 +47,7 @@
 #proxy_backend = {
 # 'pmtpa' = {'primary' = 'apaches.wmnet' },
 #},
-#ipv6_enabled = false,
-#enabled = true,
+#ipv6_enabled = false
 #  }
 #
 define protoproxy(
@@ -62,14 +55,12 @@
 $proxy_server_cert_name,
 $proxy_backend,
 $proxy_addresses={},
-$enabled=false,
 $proxy_listen_flags='',
 $proxy_port='80',
 $ipv6_enabled=false,
 $ssl_backend={},
 ) {
 nginx::site { $name:
-content  = template('protoproxy/proxy.erb'),
-enabled  = $enabled,
+content  = template('protoproxy/proxy.erb')
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I579122cee7c0fd8789494d4915c320790915815e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add empty .jshintrc and .jshintignore - change (mediawiki...Graph)

2014-09-18 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Add empty .jshintrc and .jshintignore
..

Add empty .jshintrc and .jshintignore

.jshintrc for CI, otherwise mediawiki/core's one is used.

Change-Id: Ic37d6b8f40369ac59e8cfae8797fa680c5c588cf
---
A .jshintignore
A .jshintrc
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/18/161218/4

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..fc0e352
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+lib/*
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..0967ef4
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1 @@
+{}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic37d6b8f40369ac59e8cfae8797fa680c5c588cf
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: 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 empty .jshintrc and .jshintignore - change (mediawiki...Graph)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add empty .jshintrc and .jshintignore
..


Add empty .jshintrc and .jshintignore

.jshintrc for CI, otherwise mediawiki/core's one is used.

Change-Id: Ic37d6b8f40369ac59e8cfae8797fa680c5c588cf
---
A .jshintignore
A .jshintrc
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..fc0e352
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+lib/*
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..0967ef4
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1 @@
+{}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic37d6b8f40369ac59e8cfae8797fa680c5c588cf
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
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] Ensure snmp package on icinga for PDU monitoring - change (operations/puppet)

2014-09-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Ensure snmp package on icinga for PDU monitoring
..


Ensure snmp package on icinga for PDU monitoring

The PDU monitoring uses the commands provided by the snmp package.
Ensure it installed

Change-Id: Ic968b4db7e9ffb41e92cca7710fe268a1e2e9ca8
---
M manifests/facilities.pp
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/manifests/facilities.pp b/manifests/facilities.pp
index d6fb1c1..b255eee 100644
--- a/manifests/facilities.pp
+++ b/manifests/facilities.pp
@@ -111,6 +111,13 @@
 
 
 class facilities::pdu_monitoring {
+
+# The PDUs are queried over SNMP using the snmp command provided by the 
snmp
+# package. For now ensure it here but it may need to be put in another 
place
+# in the future
+package { 'snmp':
+ensure = installed,
+}
 # pmtpa
 # C
 monitor_pdu_3phase { 'ps1-c1-pmtpa':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic968b4db7e9ffb41e92cca7710fe268a1e2e9ca8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@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] Remove separate import user group - change (translatewiki)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove separate import user group
..


Remove separate import user group

I was the only user in this group, for whatever reasons
sysop have still the import rights

Per discussion on
https://translatewiki.net/wiki/Thread:Support/Special:ListGroupRights

Change-Id: I0d43aed263573d37a9771be740b80613ee93aef5
---
M PermissionSettings.php
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  Nemo bis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/PermissionSettings.php b/PermissionSettings.php
index 17d8c14..67bfec2 100644
--- a/PermissionSettings.php
+++ b/PermissionSettings.php
@@ -44,9 +44,6 @@
 $wgGroupPermissions['sysop']['delete']  = true;
 $wgGroupPermissions['translator'   ]['deletedhistory']  = true;
 
-$wgGroupPermissions['import'   ]['import']  = true;
-$wgGroupPermissions['import'   ]['importupload']= true;
-
 $wgGroupPermissions['sysop']['import']  = false;
 $wgGroupPermissions['sysop']['importupload']= false;
 $wgGroupPermissions['sysop']['suppressredirect']= true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d43aed263573d37a9771be740b80613ee93aef5
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix ULS QUnit tests - change (mediawiki...UniversalLanguageSelector)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix ULS QUnit tests
..


Fix ULS QUnit tests

Tests were failing for two reasons: wrong modules as dependencies of the
test module and test timing out due to incorrect usage of QUnit.asyncTest
and QUnit.start() and QUnit.Stop.

While at it, did some small cleanups and converted the number of
assertions to use non-deprecated QUnit.expect() instead.

Options are saved using postWithToken of mw.API. This also rises minimum
MediaWiki version to 1.22. This allowed removing hundred lines of code.
MLEB is already 1.22 and above.

Change-Id: I46a1674e4ede48a0e331c8d201d1d847db51d9dd
---
M UniversalLanguageSelector.hooks.php
M resources/js/ext.uls.preferences.js
M tests/qunit/ext.uls.tests.js
3 files changed, 35 insertions(+), 100 deletions(-)

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



diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 0b2878a..36c292b 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -102,7 +102,7 @@
public static function addTestModules( array $testModules, 
ResourceLoader $resourceLoader ) {
$testModules['qunit']['ext.uls.tests'] = array(
'scripts' = array( 'tests/qunit/ext.uls.tests.js' ),
-   'dependencies' = array( 'ext.uls.init', 
'ext.uls.interface' ),
+   'dependencies' = array( 'jquery.uls', 
'ext.uls.preferences' ),
'localBasePath' = __DIR__,
'remoteExtPath' = 'UniversalLanguageSelector',
);
diff --git a/resources/js/ext.uls.preferences.js 
b/resources/js/ext.uls.preferences.js
index cebc20e..0229e01 100644
--- a/resources/js/ext.uls.preferences.js
+++ b/resources/js/ext.uls.preferences.js
@@ -20,86 +20,7 @@
 ( function ( $, mw ) {
'use strict';
 
-   var ULSPreferences,
-   cachedOptionsToken = null;
-
-   /**
-* Post to options API with correct token.
-* If we have no token, get one and try to post.
-* If we have a cached token try using that,
-* and if it fails, blank out the cached token and start over.
-*
-* @param params {Object} API parameters
-* @param ok {Function} callback for success
-* @param err {Function} [optional] error callback
-* @return {jqXHR}
-*/
-   function saveOptionsWithToken( params, ok, err ) {
-   if ( cachedOptionsToken === null ) {
-   // We don't have a valid cached token, so get a fresh 
one and try posting.
-   // We do not trap any 'badtoken' or 'notoken' errors, 
because we don't want
-   // an infinite loop. If this fresh token is bad, 
something else is very wrong.
-   return getOptionsToken( function ( token ) {
-   params.token = token;
-   new mw.Api().post( params, ok, err );
-   }, err );
-   } else {
-   params.token = cachedOptionsToken;
-
-   return new mw.Api().post( params, {
-   ok: ok,
-   err: function ( code, result ) {
-   // We do have a token, but it might be 
expired.
-   // So if it is 'bad', then start over 
with a new token.
-   if ( code === 'badtoken' ) {
-   // force a new token, clear any 
old one
-   cachedOptionsToken = null;
-   saveOptionsWithToken( params, 
ok, err );
-   } else {
-   err( code, result );
-   }
-   }
-   } );
-   }
-   }
-
-   /**
-* Api helper to grab an options token
-*
-* token callback has signature ( String token )
-* error callback has signature ( String code, Object results, 
XmlHttpRequest xhr, Exception exception )
-* Note that xhr and exception are only available for 'http_*' errors
-* code may be any http_* error code (see mw.Api), or 'token_missing'
-*
-* @param tokenCallback {Function} received token callback
-* @param err {Function} error callback
-* @return {jqXHR}
-*/
-   function getOptionsToken( tokenCallback, err ) {
-   return new mw.Api().get( {
-   action: 'tokens',
-   type: 'options'
-   }, {
-   ok: 

[MediaWiki-commits] [Gerrit] Removed dependency - change (mediawiki...BlueSpiceSkin)

2014-09-18 Thread Swidmann (Code Review)
Swidmann has uploaded a new change for review.

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

Change subject: Removed dependency
..

Removed dependency

This dependency causes a javascript error. The dependency is no longer
necessary

Change-Id: I853fa113e66392b6cf520b9cf40a28d45e4195d2
---
M BlueSpiceSkin.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSpiceSkin 
refs/changes/20/161220/1

diff --git a/BlueSpiceSkin.php b/BlueSpiceSkin.php
index 721a1e1..587c715 100644
--- a/BlueSpiceSkin.php
+++ b/BlueSpiceSkin.php
@@ -90,7 +90,6 @@
'dependencies' = array(
'ext.bluespice',
'mediawiki.jqueryMsg',
-   'ext.echo.overlay'
),
'messages' = array(
'bs-top-bar-messages',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I853fa113e66392b6cf520b9cf40a28d45e4195d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: REL1_22
Gerrit-Owner: Swidmann widm...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Updating patches to sync with upstream - change (operations...hhvm)

2014-09-18 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: Updating patches to sync with upstream
..

Updating patches to sync with upstream

Change-Id: Ib34875196b9abfaf8208816bd3f68c6a1129443a
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
D debian/patches/ArrayObject-append-should-delegate-to-ArrayObject-of.patch
D debian/patches/ExposeApiVersion
D debian/patches/Fix-handling-of-pcre-overflow-expressions.patch
D 
debian/patches/Support-stream-wrappers-in-XML-parser-extensions-add-external-entity-loader.patch
D debian/patches/change_api_version
A debian/patches/fix-sql-warning.patch
D debian/patches/fix_fastcgi_handling
D debian/patches/fix_freetype_include
R debian/patches/remove_libpam.patch
M debian/patches/series
R debian/patches/typos.patch
11 files changed, 46 insertions(+), 1,997 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm 
refs/changes/21/161221/1

diff --git 
a/debian/patches/ArrayObject-append-should-delegate-to-ArrayObject-of.patch 
b/debian/patches/ArrayObject-append-should-delegate-to-ArrayObject-of.patch
deleted file mode 100644
index c4cbc51..000
--- a/debian/patches/ArrayObject-append-should-delegate-to-ArrayObject-of.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From be5c755780e52193e00d55cca9475381b3913c35 Mon Sep 17 00:00:00 2001
-From: aude aude.w...@gmail.com
-Date: Fri, 15 Aug 2014 15:07:14 -0700
-Subject: [PATCH] ArrayObject::append() should delegate to
- ArrayObject::offsetSet()
-
-Summary: Match php5 implementation by delegating rather than direct 
manipulation of internal state.
-Fixes issue #3403.
-Closes https://github.com/facebook/hhvm/pull/3404
-
-Reviewed By: @fredemmott
-
-Differential Revision: D1486300
-
-Pulled By: svcscm

- hphp/system/php/spl/miscellaneous/ArrayObject.php |  2 +-
- hphp/test/slow/array_object/append.php| 15 +++
- hphp/test/slow/array_object/append.php.expect | 18 ++
- 3 files changed, 34 insertions(+), 1 deletion(-)
-
-diff --git a/hphp/system/php/spl/miscellaneous/ArrayObject.php 
b/hphp/system/php/spl/miscellaneous/ArrayObject.php
-index d405cc0..ed020c1 100644
 a/hphp/system/php/spl/miscellaneous/ArrayObject.php
-+++ b/hphp/system/php/spl/miscellaneous/ArrayObject.php
-@@ -72,7 +72,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess,
- 'use ArrayObject::offsetSet() instead'
-   );
- }
--$this-storage[] = $value;
-+$this-offsetSet(null, $value);
-   }
- 
-   // This doc comment block generated by idl/sysdoc.php
-diff --git a/hphp/test/slow/array_object/append.php 
b/hphp/test/slow/array_object/append.php
-index da7f7ca..ba5c292 100644
 a/hphp/test/slow/array_object/append.php
-+++ b/hphp/test/slow/array_object/append.php
-@@ -1,6 +1,21 @@
- ?php
- 
-+class ExtendedArrayObject extends ArrayObject {
-+  public function offsetSet($key, $value) {
-+$key = 'q1';
-+parent::offsetSet($key, $value);
-+  }
-+}
-+
- $arrayobj = new ArrayObject(array('first','second','third'));
- $arrayobj-append('fourth');
- $arrayobj-append(array('five', 'six'));
- var_dump($arrayobj);
-+
-+$arrayobj = new ExtendedArrayObject(array('y'));
-+$arrayobj-append('x');
-+var_dump($arrayobj);
-+
-+$arrayobj = new ExtendedArrayObject(array('q2' = 'y'));
-+$arrayobj-append('z');
-+var_dump($arrayobj);
-diff --git a/hphp/test/slow/array_object/append.php.expect 
b/hphp/test/slow/array_object/append.php.expect
-index 194af66..45e2fdb 100644
 a/hphp/test/slow/array_object/append.php.expect
-+++ b/hphp/test/slow/array_object/append.php.expect
-@@ -18,3 +18,21 @@ object(ArrayObject)#1 (1) {
- }
-   }
- }
-+object(ExtendedArrayObject)#2 (1) {
-+  [storage:ArrayObject:private]=
-+  array(2) {
-+[0]=
-+string(1) y
-+[q1]=
-+string(1) x
-+  }
-+}
-+object(ExtendedArrayObject)#3 (1) {
-+  [storage:ArrayObject:private]=
-+  array(2) {
-+[q2]=
-+string(1) y
-+[q1]=
-+string(1) z
-+  }
-+}
--- 
-2.1.0.rc1
-
diff --git a/debian/patches/ExposeApiVersion b/debian/patches/ExposeApiVersion
deleted file mode 100644
index 8f7edab..000
--- a/debian/patches/ExposeApiVersion
+++ /dev/null
@@ -1,26 +0,0 @@
-From eeec7e0b09c8770763596942e646ab69a5436de7 Mon Sep 17 00:00:00 2001
-From: Ori Livneh o...@wikimedia.org
-Date: Wed, 30 Jul 2014 17:00:13 -0700
-Subject: [PATCH] Expose extension API version in output of 'hhvm --version'
-
-It's useful for packaging and configuration management scripts that want to
-determine where dynamic extension files should be placed.

- hphp/runtime/base/program-functions.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/hphp/runtime/base/program-functions.cpp 
b/hphp/runtime/base/program-functions.cpp
-index 1a8673f..2520090 100644
 a/hphp/runtime/base/program-functions.cpp
-+++ b/hphp/runtime/base/program-functions.cpp
-@@ -1188,6 +1188,7 @@ static 

[MediaWiki-commits] [Gerrit] Implement item-centric WikidataBot.run - change (pywikibot/core)

2014-09-18 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Implement item-centric WikidataBot.run
..

Implement item-centric WikidataBot.run

All wikidata scripts need to get the item for a page.
Convert them to using run() and treat() semantics.
Adds 'treat_missing_item' keyword, so newitem.py can
indicate that it wants to perform custom handling of
missing items for a page.

Also fix bug 66523 for all scripts, including category.py.
The bug was introduced by 431cb77.

And fix all pep257 errors except missing docstrings.

Bug: 66523
Change-Id: Iaaaf3fa583a3e299899197ac9c67530f1972a861
---
M pywikibot/bot.py
M scripts/category.py
M scripts/claimit.py
M scripts/coordinate_import.py
M scripts/harvest_template.py
M scripts/illustrate_wikidata.py
M scripts/newitem.py
7 files changed, 229 insertions(+), 183 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/22/161222/1

diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 2be8a2f..941f4b0 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -980,3 +980,38 @@
 source = pywikibot.Claim(self.repo, 'P143')
 
source.setTarget(self.source_values.get(site.family.name).get(site.code))
 return source
+
+def run(self):
+Process all pages in generator.
+if not hasattr(self, 'generator'):
+raise NotImplementedError('Variable %s.generator not set.'
+  % self.__class__.__name__)
+
+treat_missing_item = hasattr(self, 'treat_missing_item')
+
+try:
+for page in self.generator:
+if not page.exists():
+pywikibot.output('%s doesn\'t exist.' % page)
+try:
+item = pywikibot.ItemPage.fromPage(page)
+except pywikibot.NoPage:
+item = None
+if not item:
+if not treat_missing_item:
+pywikibot.output(
+'%s doesn\'t have a wikidata item.' % page)
+#TODO FIXME: Add an option to create the item
+continue
+self.treat(page, item)
+except QuitKeyboardInterrupt:
+pywikibot.output('\nUser quit %s bot run...' %
+ self.__class__.__name__)
+except KeyboardInterrupt:
+if config.verbose_output:
+raise
+else:
+pywikibot.output('\nKeyboardInterrupt during %s bot run...' %
+ self.__class__.__name__)
+except Exception as e:
+pywikibot.exception(msg=e, tb=True)
diff --git a/scripts/category.py b/scripts/category.py
index d5044a8..efa5028 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -642,8 +642,11 @@
 Do not use this function from outside the class.
 
 if self.oldcat.exists():
-item = pywikibot.ItemPage.fromPage(self.oldcat)
-if item.exists():
+try:
+item = pywikibot.ItemPage.fromPage(self.oldcat)
+except pywikibot.NoPage:
+item = None
+if item and item.exists():
 comment = i18n.twtranslate(self.site, 'category-was-moved',
{'newcat': self.newcat.title(),
 'title': self.newcat.title()})
diff --git a/scripts/claimit.py b/scripts/claimit.py
index 39fcf11..d389c93 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
 
-This script adds claims to Wikidata items based on categories.
+A script that adds claims to Wikidata items based on categories.
 
 --
 
@@ -68,11 +68,13 @@
 
 
 class ClaimRobot(WikidataBot):
-
-A bot to add Wikidata claims
-
+
+A bot to add Wikidata claims.
+
 def __init__(self, generator, claims, exists_arg=''):
 
+Constructor.
+
 Arguments:
 * generator- A generator that yields Page objects.
 * claims   - A list of wikidata claims
@@ -84,18 +86,14 @@
 self.exists_arg = exists_arg
 self.repo = pywikibot.Site().data_repository()
 self.cacheSources()
-
-def run(self):
-Starts the robot.
 if self.exists_arg:
 pywikibot.output('\'exists\' argument set to \'%s\'' % 
self.exists_arg)
-for page in self.generator:
-self.current_page = page
-item = pywikibot.ItemPage.fromPage(page)
-if not item.exists():
-# TODO FIXME: We should provide an option to create the page
-pywikibot.output('%s doesn\'t have a wikidata item 

[MediaWiki-commits] [Gerrit] Revert EventLogging role: set a local $wgEventLoggingSchema... - change (mediawiki/vagrant)

2014-09-18 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Revert EventLogging role: set a local 
$wgEventLoggingSchemaApiUri
..

Revert EventLogging role: set a local $wgEventLoggingSchemaApiUri

This reverts commit c0ddfd28f28b4ccc7410a262c645635264a255cb.

Making the meta.wikimedia.org schemas unavailable for development is not 
helpful; see the bug for details.

Bug: 70979
Change-Id: I1b0337f7c07bdfae4e79b0dd107d66e901c3facb
---
M puppet/manifests/roles/eventlogging.pp
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/23/161223/1

diff --git a/puppet/manifests/roles/eventlogging.pp 
b/puppet/manifests/roles/eventlogging.pp
index 70d3115..5bedcb3 100644
--- a/puppet/manifests/roles/eventlogging.pp
+++ b/puppet/manifests/roles/eventlogging.pp
@@ -8,9 +8,8 @@
 mediawiki::extension { 'EventLogging':
 priority = $::LOAD_EARLY,
 settings = {
-wgEventLoggingBaseUri  = '//localhost:8100/event.gif',
-wgEventLoggingFile = '/vagrant/logs/eventlogging.log',
-wgEventLoggingSchemaApiUri = 'http://localhost/w/api.php',
+wgEventLoggingBaseUri = '//localhost:8100/event.gif',
+wgEventLoggingFile= '/vagrant/logs/eventlogging.log',
 }
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b0337f7c07bdfae4e79b0dd107d66e901c3facb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] make-wmf-branch: forge Zuul cloner parameters - change (mediawiki...release)

2014-09-18 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: make-wmf-branch: forge Zuul cloner parameters
..

make-wmf-branch: forge Zuul cloner parameters

When using Zuul cloner against a mediawiki/core wmf branch, we will want
to reuse the same extensions being used with the proper overriden
version if needed.

The output of zuulparams is meant to be passed directly to zuul-cloner.

An issue we have is that mediawiki/tools/release does not have wmf
branches, so it is hard to know the list of extensions / versions to use
for each of the wmf version :(  We could solve that by adding
wmfbranches to this repository.

Change-Id: Idcd0aa30edb53bb58cf6dba4d6374b872fe92e0c
---
A make-wmf-branch/zuulparams
1 file changed, 25 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/25/161225/1

diff --git a/make-wmf-branch/zuulparams b/make-wmf-branch/zuulparams
new file mode 100755
index 000..6d04c99
--- /dev/null
+++ b/make-wmf-branch/zuulparams
@@ -0,0 +1,25 @@
+#!/usr/bin/env php
+?php
+require( __DIR__ . '/cli.php' );
+require_once( __DIR__ . '/MakeWmfBranch.php' );
+
+$obj = new MakeWmfBranch( '', '' );
+
+$frozen = array();
+foreach( $obj-specialExtensions as $name = $version ) {
+   $frozen[mediawiki/extensions/{$name}] = $version;
+}
+$projects = array_keys($frozen);
+foreach( $obj-branchedExtensions as $name ) {
+   $projects[] = mediawiki/extensions/{$name};
+}
+foreach( $obj-branchedSkins as $name ) {
+   $projects[] = mediawiki/skins/{$name};
+}
+
+foreach( $frozen as $name = $branch ) {
+   print --project-branch {$name}={$branch}\n;
+}
+foreach( $projects as $name ) {
+   print $name\n;
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcd0aa30edb53bb58cf6dba4d6374b872fe92e0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
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] make-wmf-branch: factor out php sapi == cli check - change (mediawiki...release)

2014-09-18 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: make-wmf-branch: factor out php sapi == cli check
..

make-wmf-branch: factor out php sapi == cli check

Will add a second utlity based on the MakeWmfBranch class, move the
check for sapi == PHP in a different file so it can be reused.

Change-Id: Ia4945a1b1eecbd82d2787a8dea66bfa1bcdd5633
---
A make-wmf-branch/cli.php
M make-wmf-branch/make-wmf-branch
2 files changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/24/161224/1

diff --git a/make-wmf-branch/cli.php b/make-wmf-branch/cli.php
new file mode 100644
index 000..0c90011
--- /dev/null
+++ b/make-wmf-branch/cli.php
@@ -0,0 +1,5 @@
+?php
+if ( php_sapi_name() !== 'cli' ) {
+   echo This script only works in CLI mode\n;
+   exit( 1 );
+}
diff --git a/make-wmf-branch/make-wmf-branch b/make-wmf-branch/make-wmf-branch
index d057829..f9315a1 100755
--- a/make-wmf-branch/make-wmf-branch
+++ b/make-wmf-branch/make-wmf-branch
@@ -1,10 +1,6 @@
 #!/usr/bin/env php
 ?php
-
-if ( php_sapi_name() !== 'cli' ) {
-   echo This script only works in CLI mode\n;
-   exit( 1 );
-}
+require( __DIR__ . '/cli.php' );
 
 if ( count( $argv )  3 ) {
echo Usage: make-wmf-branch new-version old-version path to 
clone\n;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4945a1b1eecbd82d2787a8dea66bfa1bcdd5633
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
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] Ignore mostgloballylinkedfiles-summary - change (translatewiki)

2014-09-18 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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

Change subject: Ignore mostgloballylinkedfiles-summary
..

Ignore mostgloballylinkedfiles-summary

According to its qqq, it's not exported.

Change-Id: I4c07e103c9a6791857ab33469f1eec9fe7f155cb
---
M groups/MediaWiki/MediaWiki.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/26/161226/1

diff --git a/groups/MediaWiki/MediaWiki.yaml b/groups/MediaWiki/MediaWiki.yaml
index 68025d4..8250ae1 100644
--- a/groups/MediaWiki/MediaWiki.yaml
+++ b/groups/MediaWiki/MediaWiki.yaml
@@ -394,6 +394,7 @@
 - mainpage-nstab
 - markaspatrolledlink
 - mostcategories-summary
+- mostgloballylinkedfiles-summary
 - mostimages-summary
 - mostinterwikis-summary
 - mostlinked-summary

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c07e103c9a6791857ab33469f1eec9fe7f155cb
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] [FIX] Close opened files and open XMLs in binary mode - change (pywikibot/core)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [FIX] Close opened files and open XMLs in binary mode
..


[FIX] Close opened files and open XMLs in binary mode

Close various files which have just been open. Also verify that
the XmlDump instance can not just handle uncompressed UTF-8 files.

Contains also one unrelated assertEqual(s) fix.

Bug: 70969
Bug: 70977
Change-Id: Ic8454d0d1cc8c98458611efca32bbcd90620df12
---
M pywikibot/xmlreader.py
A tests/data/article-pyrus-utf16.xml
A tests/data/article-pyrus-utf16.xml.bz2
A tests/data/article-pyrus.xml.bz2
M tests/data_ingestion_tests.py
M tests/textlib_tests.py
M tests/wikibase_tests.py
M tests/xmlreader_tests.py
8 files changed, 47 insertions(+), 21 deletions(-)

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



diff --git a/pywikibot/xmlreader.py b/pywikibot/xmlreader.py
index 56993c4..4f19a73 100644
--- a/pywikibot/xmlreader.py
+++ b/pywikibot/xmlreader.py
@@ -122,19 +122,22 @@
   bufsize=65535).stdout
 else:
 # assume it's an uncompressed XML file
-source = open(self.filename)
-context = iterparse(source, events=(start, end, start-ns))
-self.root = None
+source = open(self.filename, 'rb')
+try:
+context = iterparse(source, events=(start, end, start-ns))
+self.root = None
 
-for event, elem in context:
-if event == start-ns and elem[0] == :
-self.uri = elem[1]
-continue
-if event == start and self.root is None:
-self.root = elem
-continue
-for rev in self._parse(event, elem):
-yield rev
+for event, elem in context:
+if event == start-ns and elem[0] == :
+self.uri = elem[1]
+continue
+if event == start and self.root is None:
+self.root = elem
+continue
+for rev in self._parse(event, elem):
+yield rev
+finally:
+source.close()
 
 def _parse_only_latest(self, event, elem):
 Parser that yields only the latest revision.
diff --git a/tests/data/article-pyrus-utf16.xml 
b/tests/data/article-pyrus-utf16.xml
new file mode 100644
index 000..8bd2461
--- /dev/null
+++ b/tests/data/article-pyrus-utf16.xml
Binary files differ
diff --git a/tests/data/article-pyrus-utf16.xml.bz2 
b/tests/data/article-pyrus-utf16.xml.bz2
new file mode 100644
index 000..9ef4634
--- /dev/null
+++ b/tests/data/article-pyrus-utf16.xml.bz2
Binary files differ
diff --git a/tests/data/article-pyrus.xml.bz2 b/tests/data/article-pyrus.xml.bz2
new file mode 100644
index 000..62371d0
--- /dev/null
+++ b/tests/data/article-pyrus.xml.bz2
Binary files differ
diff --git a/tests/data_ingestion_tests.py b/tests/data_ingestion_tests.py
index f7f6711..1735a89 100644
--- a/tests/data_ingestion_tests.py
+++ b/tests/data_ingestion_tests.py
@@ -53,9 +53,9 @@
 
 def setUp(self):
 super(TestCSVReader, self).setUp()
-fileobj = open(os.path.join(os.path.split(__file__)[0], 'data', 
'csv_ingestion.csv'))
-self.iterator = data_ingestion.CSVReader(fileobj, 'url')
-self.obj = next(self.iterator)
+with open(os.path.join(os.path.split(__file__)[0], 'data', 
'csv_ingestion.csv')) as fileobj:
+self.iterator = data_ingestion.CSVReader(fileobj, 'url')
+self.obj = next(self.iterator)
 
 def test_PhotoURL(self):
 self.assertEqual(self.obj.URL, 
'http://upload.wikimedia.org/wikipedia/commons/f/fc/MP_sounds.png')
diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py
index 299898f..49d5e5f 100644
--- a/tests/textlib_tests.py
+++ b/tests/textlib_tests.py
@@ -23,8 +23,9 @@
 dirname = os.path.join(os.path.dirname(__file__), pages)
 
 for f in [enwiki_help_editing]:
-files[f] = codecs.open(os.path.join(dirname, f + .page),
-   'r', 'utf-8').read()
+with codecs.open(os.path.join(dirname, f + .page),
+ 'r', 'utf-8') as content:
+files[f] = content.read()
 
 
 class TestSectionFunctions(TestCase):
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index b288484..7726433 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -545,7 +545,8 @@
 super(TestLinks, self).setUp()
 self.wdp = pywikibot.ItemPage(self.get_repo(), 'Q60')
 self.wdp.id = 'Q60'
-self.wdp._content = 
json.load(open(os.path.join(os.path.split(__file__)[0], 'pages', 
'Q60_only_sitelinks.wd')))
+with open(os.path.join(os.path.split(__file__)[0], 'pages', 
'Q60_only_sitelinks.wd')) as f:
+self.wdp._content = json.load(f)
 self.wdp.get()
 
 def 

[MediaWiki-commits] [Gerrit] Fix OPT_INDEX_TAGS not properly delegated - change (mediawiki...Wikibase)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix OPT_INDEX_TAGS not properly delegated
..


Fix OPT_INDEX_TAGS not properly delegated

The options object did not do anything in this class. Now it caused
a bug. The raw mode is set to false while the constructor is called
and later changes to true.

This is the easiest way of fixing this. The underlying problem may
need more investigation.

Change-Id: I2fa8c686bd67c983fde75a91b1fa0fa2bbced6c8
---
M repo/includes/api/ResultBuilder.php
1 file changed, 10 insertions(+), 18 deletions(-)

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



diff --git a/repo/includes/api/ResultBuilder.php 
b/repo/includes/api/ResultBuilder.php
index 701a321..7cf6fd4 100644
--- a/repo/includes/api/ResultBuilder.php
+++ b/repo/includes/api/ResultBuilder.php
@@ -73,7 +73,6 @@
$this-missingEntityCounter = -1;
 
$this-options = new SerializationOptions();
-   $this-options-setIndexTags( 
$this-getResult()-getIsRawMode() );
$this-options-setOption( EntitySerializer::OPT_SORT_ORDER, 
EntitySerializer::SORT_NONE );
}
 
@@ -85,13 +84,6 @@
 */
public function getOptions() {
return $this-options;
-   }
-
-   /**
-* @return ApiResult
-*/
-   private function getResult() {
-   return $this-result;
}
 
/**
@@ -136,15 +128,15 @@
$this-checkNameIsString( $name );
$this-checkTagIsString( $tag );
 
-   if ( $this-options-shouldIndexTags() ) {
+   if ( $this-result-getIsRawMode() ) {
$values = array_values( $values );
}
 
-   if ( $this-getResult()-getIsRawMode() ) {
-   $this-getResult()-setIndexedTagName( $values, $tag );
+   if ( $this-result-getIsRawMode() ) {
+   $this-result-setIndexedTagName( $values, $tag );
}
 
-   $this-getResult()-addValue( $path, $name, $values );
+   $this-result-addValue( $path, $name, $values );
}
 
/**
@@ -169,7 +161,7 @@
$this-checkNameIsString( $name );
$this-checkValueIsNotList( $value );
 
-   $this-getResult()-addValue( $path, $name, $value );
+   $this-result-addValue( $path, $name, $value );
}
 
/**
@@ -188,7 +180,7 @@
 *
 * @param $path array|string|null
 * @param $key int|string|null the key to use when appending, or null 
for automatic.
-* May be ignored even if given, based on 
$this-options-shouldIndexTags().
+* May be ignored even if given, based on $this-result-getIsRawMode().
 * @param $value mixed
 * @param string $tag tag name to use for $value in indexed mode
 *
@@ -201,14 +193,14 @@
 
$this-checkValueIsNotList( $value );
 
-   if ( $this-options-shouldIndexTags() ) {
+   if ( $this-result-getIsRawMode() ) {
$key = null;
}
 
-   $this-getResult()-addValue( $path, $key, $value );
+   $this-result-addValue( $path, $key, $value );
 
-   if ( $this-getResult()-getIsRawMode()  !is_string( $key ) ) 
{
-   $this-getResult()-setIndexedTagName_internal( $path, 
$tag );
+   if ( $this-result-getIsRawMode()  !is_string( $key ) ) {
+   $this-result-setIndexedTagName_internal( $path, $tag 
);
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fa8c686bd67c983fde75a91b1fa0fa2bbced6c8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.24-wmf19
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@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] [FIX] Close csv file and subprocess stdout streams - change (pywikibot/core)

2014-09-18 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FIX] Close csv file and subprocess stdout streams
..

[FIX] Close csv file and subprocess stdout streams

Bug: 70969
Change-Id: I839ef18cd40758fb331a85e615b39063e95f9915
---
M pywikibot/version.py
M scripts/data_ingestion.py
2 files changed, 19 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/27/161227/1

diff --git a/pywikibot/version.py b/pywikibot/version.py
index c8cb36c..994f387 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -204,19 +204,21 @@
 tag = tag[(s + 6):e]
 t = tag.strip().split('/')
 tag = '[%s] %s' % (t[0][:-1], '-'.join(t[3:]))
-info = subprocess.Popen([cmd, '--no-pager',
- 'log', '-1',
- '--pretty=format:%ad|%an|%h|%H|%d'
- '--abbrev-commit',
- '--date=iso'],
-cwd=_program_dir,
-stdout=subprocess.PIPE).stdout.read()
+with subprocess.Popen([cmd, '--no-pager',
+   'log', '-1',
+   '--pretty=format:%ad|%an|%h|%H|%d'
+   '--abbrev-commit',
+   '--date=iso'],
+  cwd=_program_dir,
+  stdout=subprocess.PIPE).stdout as stdout:
+info = stdout.read()
 info = info.decode(config.console_encoding).split('|')
 date = info[0][:-6]
 date = time.strptime(date.strip(''), '%Y-%m-%d %H:%M:%S')
-rev = subprocess.Popen([cmd, 'rev-list', 'HEAD'],
-   cwd=_program_dir,
-   stdout=subprocess.PIPE).stdout.read()
+with subprocess.Popen([cmd, 'rev-list', 'HEAD'],
+  cwd=_program_dir,
+  stdout=subprocess.PIPE).stdout as stdout:
+rev = stdout.read()
 rev = 'g%s' % len(rev.splitlines())
 hsh = info[3]  # also stored in '.git/refs/heads/master'
 if (not date or not tag or not rev) and not path:
diff --git a/scripts/data_ingestion.py b/scripts/data_ingestion.py
index 70856eb..a832745 100755
--- a/scripts/data_ingestion.py
+++ b/scripts/data_ingestion.py
@@ -146,12 +146,13 @@
 self._doUpload(photo)
 
 if __name__ == __main__:
-reader = CSVReader(open('tests/data/csv_ingestion.csv'), 'url')
-bot = DataIngestionBot(
-reader,
-%(name)s - %(set)s.%(_ext)s, :user:valhallasw/test_template,
-pywikibot.Site('test', 'test'))
-bot.run()
+with open('tests/data/csv_ingestion.csv') as f:
+reader = CSVReader(f, 'url')
+bot = DataIngestionBot(
+reader,
+%(name)s - %(set)s.%(_ext)s, :user:valhallasw/test_template,
+pywikibot.Site('test', 'test'))
+bot.run()
 
 '''
 class DataIngestionBot:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I839ef18cd40758fb331a85e615b39063e95f9915
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

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


[MediaWiki-commits] [Gerrit] mediawiki-gate idling job - change (integration/jenkins-job-builder-config)

2014-09-18 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: mediawiki-gate idling job
..

mediawiki-gate idling job

This job does nothing. It is meant to be added in gate-and-submit for
all jobs that depends on mediawiki/core somehow.

Change-Id: I7bd20426a1674e8279a8c10469ce98b1df072bf8
---
M mediawiki.yaml
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/28/161228/1

diff --git a/mediawiki.yaml b/mediawiki.yaml
index fe7062e..e5bfa12 100644
--- a/mediawiki.yaml
+++ b/mediawiki.yaml
@@ -154,6 +154,15 @@
  - archive-log-dir
 
 - job-template:
+name: 'mediawiki-gate'
+node: productionSlaves
+concurrent: true
+builders:
+ - shell: |
+ #!/bin/bash -e
+ echo Noop job, meant to gate jobs properly
+
+- job-template:
 name: 'mediawiki-vendor-integration'
 node: productionSlaves  # not on labs for now
 concurrent: true

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bd20426a1674e8279a8c10469ce98b1df072bf8
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Fix missing options bug in GetClaims - change (mediawiki...Wikibase)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix missing options bug in GetClaims
..


Fix missing options bug in GetClaims

The problem is that the raw mode setting is false when the builder
is constructed. Using lazy initialization to create the serialization
options seems to work.

(This also fixes GetClaimsTest, which misfired on snak's datatypes
now correctly being included in the output.)

Change-Id: Ieb1dfec050a2963eab675fd831f8da8bede17db3
---
M repo/includes/api/ResultBuilder.php
M repo/tests/phpunit/includes/api/GetClaimsTest.php
2 files changed, 80 insertions(+), 41 deletions(-)

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



diff --git a/repo/includes/api/ResultBuilder.php 
b/repo/includes/api/ResultBuilder.php
index 7cf6fd4..732562a 100644
--- a/repo/includes/api/ResultBuilder.php
+++ b/repo/includes/api/ResultBuilder.php
@@ -71,9 +71,6 @@
$this-entityTitleLookup = $entityTitleLookup;
$this-serializerFactory = $serializerFactory;
$this-missingEntityCounter = -1;
-
-   $this-options = new SerializationOptions();
-   $this-options-setOption( EntitySerializer::OPT_SORT_ORDER, 
EntitySerializer::SORT_NONE );
}
 
/**
@@ -83,6 +80,12 @@
 * @return SerializationOptions
 */
public function getOptions() {
+   if ( !$this-options ) {
+   $this-options = new SerializationOptions();
+   $this-options-setIndexTags( 
$this-result-getIsRawMode() );
+   $this-options-setOption( 
EntitySerializer::OPT_SORT_ORDER, EntitySerializer::SORT_NONE );
+   }
+
return $this-options;
}
 
@@ -275,7 +278,14 @@
 *
 * @since 0.5
 */
-   public function addEntityRevision( $key, EntityRevision 
$entityRevision, SerializationOptions $options = null, $props = 'all', $siteIds 
= array() ) {
+   public function addEntityRevision(
+   $key,
+   EntityRevision $entityRevision,
+   SerializationOptions
+   $options = null,
+   $props = 'all',
+   $siteIds = array()
+   ) {
$entity = $entityRevision-getEntity();
$entityId = $entity-getId();
 
@@ -285,12 +295,9 @@
 
$record = array();
 
+   $serializerOptions = $this-getOptions();
if ( $options ) {
-   $serializerOptions = new SerializationOptions();
-   $serializerOptions-merge( $this-options );
$serializerOptions-merge( $options );
-   } else {
-   $serializerOptions = $this-options;
}
 
//if there are no props defined only return type and id..
@@ -348,7 +355,7 @@
 * @param array|string $path where the data is located
 */
public function addLabels( array $labels, $path ) {
-   $labelSerializer = 
$this-serializerFactory-newLabelSerializer( $this-options );
+   $labelSerializer = 
$this-serializerFactory-newLabelSerializer( $this-getOptions() );
 
$values = $labelSerializer-getSerialized( $labels );
$this-setList( $path, 'labels', $values, 'label' );
@@ -363,7 +370,7 @@
 * @param array|string $path where the data is located
 */
public function addDescriptions( array $descriptions, $path ) {
-   $descriptionSerializer = 
$this-serializerFactory-newDescriptionSerializer( $this-options );
+   $descriptionSerializer = 
$this-serializerFactory-newDescriptionSerializer( $this-getOptions() );
 
$values = $descriptionSerializer-getSerialized( $descriptions 
);
$this-setList( $path, 'descriptions', $values, 'description' );
@@ -378,7 +385,7 @@
 * @param array|string $path where the data is located
 */
public function addAliases( array $aliases, $path ) {
-   $aliasSerializer = 
$this-serializerFactory-newAliasSerializer( $this-options );
+   $aliasSerializer = 
$this-serializerFactory-newAliasSerializer( $this-getOptions() );
$values = $aliasSerializer-getSerialized( $aliases );
$this-setList( $path, 'aliases', $values, 'alias' );
}
@@ -393,8 +400,7 @@
 * @param array|null $options
 */
public function addSiteLinks( array $siteLinks, $path, $options = null 
) {
-   $serializerOptions = new SerializationOptions();
-   $serializerOptions-merge( $this-options );
+   $serializerOptions = $this-getOptions();
 
if ( is_array( $options ) ) {
if ( in_array( EntitySerializer::SORT_ASC, $options ) ) 
{
@@ -429,7 +435,7 

[MediaWiki-commits] [Gerrit] Add tests for api xml format - change (mediawiki...Wikibase)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add tests for api xml format
..


Add tests for api xml format

Tests for wbgetclaims and wbgetentities xml format

Change-Id: Icb29307d44c79059e59c7e0fc275d2abb5fc0ecd
---
A repo/tests/phpunit/data/api/getclaims.xml
A repo/tests/phpunit/data/api/getentities.xml
A repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
3 files changed, 194 insertions(+), 0 deletions(-)

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



diff --git a/repo/tests/phpunit/data/api/getclaims.xml 
b/repo/tests/phpunit/data/api/getclaims.xml
new file mode 100644
index 000..8a0c7e4
--- /dev/null
+++ b/repo/tests/phpunit/data/api/getclaims.xml
@@ -0,0 +1 @@
+?xml version=1.0?apiclaimsclaim id=P1491009claim 
id=Q80050245$kittens type=statement rank=normalmainsnak 
snaktype=novalue property=P1491009 /qualifiers /qualifiers-order 
//claim/claimclaimproperty/claim/claims/api
diff --git a/repo/tests/phpunit/data/api/getentities.xml 
b/repo/tests/phpunit/data/api/getentities.xml
new file mode 100644
index 000..5f6ceb6
--- /dev/null
+++ b/repo/tests/phpunit/data/api/getentities.xml
@@ -0,0 +1 @@
+?xml version=1.0?api success=1entitiesentity pageid=2276 ns=0 
title=Q80050245 lastrevid=4089 modified=2014-09-07T20:39:03Z 
id=Q80050245 type=itemaliases /labels /descriptions 
/claimsproperty id=P1491009claim id=Q80050245$kittens 
type=statement rank=normalmainsnak snaktype=novalue property=P1491009 
/qualifiers /qualifiers-order //claim/property/claimssitelinks 
//entity/entities/api
diff --git a/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php 
b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
new file mode 100644
index 000..c70dab5
--- /dev/null
+++ b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
@@ -0,0 +1,192 @@
+?php
+
+namespace Wikibase\Test\Api;
+
+use ApiBase;
+use ApiMain;
+use Exception;
+use FauxRequest;
+use Wikibase\DataModel\ByPropertyIdArray;
+use Wikibase\DataModel\Claim\Statement;
+use Wikibase\DataModel\Entity\Item;
+use Wikibase\DataModel\Entity\Property;
+use Wikibase\DataModel\Snak\PropertyNoValueSnak;
+use Wikibase\EntityRevision;
+use Wikibase\Repo\WikibaseRepo;
+
+/**
+ * @fixme wbgetclaims adds an extra claimproperty/claim in output! see bug 
70531
+ *
+ * @group API
+ * @group Wikibase
+ * @group WikibaseAPI
+ * @group WikibaseRepo
+ * @group medium
+ *
+ * @licence GNU GPL v2+
+ * @author Katie Filbert  aude.w...@gmail.com 
+ */
+class ApiXmlFormatTest extends \PHPUnit_Framework_TestCase {
+
+   /**
+* @var EntityRevision
+*/
+   private $entityRevision;
+
+   public function testGetEntitiesXmlFormat() {
+   $entityRevision = $this-getEntityRevision();
+   $entityId = 
$entityRevision-getEntity()-getId()-getSerialization();
+
+   $params = array(
+   'action' = 'wbgetentities',
+   'ids' = $entityId
+   );
+
+   $module = $this-getApiModule( '\Wikibase\Api\GetEntities', 
'wbgetentities', $params );
+   $result = $this-doApiRequest( $module );
+   $actual = $this-removeGetEntitiesAttributes( $result, 
$entityId );
+
+   $expected = $this-getExpectedGetEntitiesXml( $entityRevision );
+
+   $this-assertEquals( $expected, $actual );
+   }
+
+   private function getExpectedGetEntitiesXml( EntityRevision 
$entityRevision ) {
+   $xml = trim( file_get_contents( __DIR__ . 
'/../../data/api/getentities.xml' ) );
+
+   $expected = $this-replaceIdsInExpectedXml( $xml, 
$entityRevision );
+   $expected = $this-removeGetEntitiesAttributes(
+   $expected,
+   
$entityRevision-getEntity()-getId()-getSerialization()
+   );
+
+   return $expected;
+   }
+
+   private function replaceIdsInExpectedXml( $xml, EntityRevision 
$entityRevision ) {
+   $xml = $this-replacePropertyId( $xml, $entityRevision );
+   $xml = $this-replaceEntityId(
+   $xml,
+   
$entityRevision-getEntity()-getId()-getSerialization()
+   );
+
+   return $xml;
+   }
+
+   private function replaceEntityId( $xml, $entityId ) {
+   return str_replace( 'Q80050245', $entityId, $xml );
+   }
+
+   private function replacePropertyId( $xml, EntityRevision 
$entityRevision ) {
+   $claims = $entityRevision-getEntity()-getClaims();
+
+   $byPropertyIdArray = new ByPropertyIdArray( $claims );
+   $byPropertyIdArray-buildIndex();
+
+   $propertyIds = $byPropertyIdArray-getPropertyIds();
+
+   foreach( $propertyIds as $propertyId ) {
+   $propertyIdText = $propertyId-getSerialization();
+   }
+
+ 

[MediaWiki-commits] [Gerrit] Fix tag names generated in API XML output. - change (mediawiki...Wikibase)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix tag names generated in API XML output.
..


Fix tag names generated in API XML output.

This fixes ResultBuilder misbehaving if a serializer already set
the magic _element field for specifying the tag name to use in XML
output.

Deploy: this is technically a breaking chance, since it changes
the structure of the API's XML output; However, the previous output
was obviously broken and should not be considered canonical.
So this is really an un-breaking change.

Bug: 70531
Change-Id: I98922c0f0566f57e4a8dc88f69c8ef4023d2e3ea
---
M repo/includes/api/ResultBuilder.php
M repo/tests/phpunit/data/api/getclaims.xml
M repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
M repo/tests/phpunit/includes/api/ResultBuilderTest.php
4 files changed, 19 insertions(+), 7 deletions(-)

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



diff --git a/repo/includes/api/ResultBuilder.php 
b/repo/includes/api/ResultBuilder.php
index 732562a..1f4e6dc 100644
--- a/repo/includes/api/ResultBuilder.php
+++ b/repo/includes/api/ResultBuilder.php
@@ -23,6 +23,7 @@
  *
  * @licence GNU GPL v2+
  * @author Adam Shorland
+ * @author Daniel Kinzler
  */
 class ResultBuilder {
 
@@ -132,10 +133,11 @@
$this-checkTagIsString( $tag );
 
if ( $this-result-getIsRawMode() ) {
-   $values = array_values( $values );
-   }
+   // Unset first, so we don't make the tag name an actual 
value.
+   // We'll be setting this to $tag by calling 
setIndexedTagName().
+   unset( $values['_element'] );
 
-   if ( $this-result-getIsRawMode() ) {
+   $values = array_values( $values );
$this-result-setIndexedTagName( $values, $tag );
}
 
@@ -438,7 +440,10 @@
$claimsSerializer = 
$this-serializerFactory-newClaimsSerializer( $this-getOptions() );
 
$values = $claimsSerializer-getSerialized( new Claims( $claims 
) );
-   $this-setList( $path, 'claims', $values, 'claim' );
+
+   // HACK: comply with ApiResult::setIndexedTagName
+   $tag = isset( $values['_element'] ) ? $values['_element'] : 
'claim';
+   $this-setList( $path, 'claims', $values, $tag );
}
 
/**
diff --git a/repo/tests/phpunit/data/api/getclaims.xml 
b/repo/tests/phpunit/data/api/getclaims.xml
index 8a0c7e4..37cd157 100644
--- a/repo/tests/phpunit/data/api/getclaims.xml
+++ b/repo/tests/phpunit/data/api/getclaims.xml
@@ -1 +1 @@
-?xml version=1.0?apiclaimsclaim id=P1491009claim 
id=Q80050245$kittens type=statement rank=normalmainsnak 
snaktype=novalue property=P1491009 /qualifiers /qualifiers-order 
//claim/claimclaimproperty/claim/claims/api
+?xml version=1.0?apiclaimsproperty id=P1491009claim 
id=Q80050245$kittens type=statement rank=normalmainsnak 
snaktype=novalue property=P1491009 /qualifiers /qualifiers-order 
//claim/property/claims/api
diff --git a/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php 
b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
index c70dab5..aeed347 100644
--- a/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
+++ b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
@@ -15,8 +15,6 @@
 use Wikibase\Repo\WikibaseRepo;
 
 /**
- * @fixme wbgetclaims adds an extra claimproperty/claim in output! see bug 
70531
- *
  * @group API
  * @group Wikibase
  * @group WikibaseAPI
diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php 
b/repo/tests/phpunit/includes/api/ResultBuilderTest.php
index afc2ead..cda9e64 100644
--- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php
+++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php
@@ -789,6 +789,13 @@
'ROOT' = array(
'foo' = array( 'x', 'y', 
'_element' = 'letter' ) )
) ),
+
+   'pre-set element name' = array( 'ROOT', 'foo', array( 
'x', 'y', '_element' = '_thingy' ), 'letter', true,
+   array(
+   'ROOT' = array(
+   'foo' = array( 'x', 'y', 
'_element' = 'letter' ) )
+   ) ),
+
);
}
 
@@ -980,6 +987,8 @@
$this-assertEquals( $value, $actual[$key] );
}
}
+
+   $this-assertEquals( array_keys( $expected ), array_keys( 
$actual ), Keys of $path: );
}
 
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98922c0f0566f57e4a8dc88f69c8ef4023d2e3ea
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] mediawiki-gate idling job - change (integration/jenkins-job-builder-config)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mediawiki-gate idling job
..


mediawiki-gate idling job

This job does nothing. It is meant to be added in gate-and-submit for
all jobs that depends on mediawiki/core somehow.

Change-Id: I7bd20426a1674e8279a8c10469ce98b1df072bf8
---
M mediawiki.yaml
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/mediawiki.yaml b/mediawiki.yaml
index fe7062e..e5bfa12 100644
--- a/mediawiki.yaml
+++ b/mediawiki.yaml
@@ -154,6 +154,15 @@
  - archive-log-dir
 
 - job-template:
+name: 'mediawiki-gate'
+node: productionSlaves
+concurrent: true
+builders:
+ - shell: |
+ #!/bin/bash -e
+ echo Noop job, meant to gate jobs properly
+
+- job-template:
 name: 'mediawiki-vendor-integration'
 node: productionSlaves  # not on labs for now
 concurrent: true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7bd20426a1674e8279a8c10469ce98b1df072bf8
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix UploadWizard logging for reals - change (mediawiki...UploadWizard)

2014-09-18 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Fix UploadWizard logging for reals
..

Fix UploadWizard logging for reals

- schemas had to be added as dependencies
- EventLogging does not clobber $wgEventLoggingSchemas when it
  initializes, so there is no point in putting the declarations
  to clever places

Change-Id: I627ea141515ec757b34b43b2ca3f707eb5842e16
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/862
---
M UploadWizard.php
M UploadWizardHooks.php
2 files changed, 10 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/29/161229/1

diff --git a/UploadWizard.php b/UploadWizard.php
index df0dba9..1c4c254 100644
--- a/UploadWizard.php
+++ b/UploadWizard.php
@@ -134,14 +134,11 @@
'position' = 'top'
 ) + $uploadWizardModuleInfo;
 
-$wgExtensionFunctions[] = function () {
-   global $wgEventLoggingSchemas;
-
-   $wgEventLoggingSchemas[ 'UploadWizardUploadActions' ] = 5811620;
-   $wgEventLoggingSchemas[ 'UploadWizardStep' ] = 8851805;
-   $wgEventLoggingSchemas[ 'UploadWizardFlowEvent' ] = 8851807;
-   $wgEventLoggingSchemas[ 'UploadWizardUploadFlowEvent' ] = 9609883;
-};
+$wgEventLoggingSchemas[ 'UploadWizardTutorialActions' ] = 5803466;
+$wgEventLoggingSchemas[ 'UploadWizardUploadActions' ] = 5811620;
+$wgEventLoggingSchemas[ 'UploadWizardStep' ] = 8851805;
+$wgEventLoggingSchemas[ 'UploadWizardFlowEvent' ] = 8851807;
+$wgEventLoggingSchemas[ 'UploadWizardUploadFlowEvent' ] = 9609883;
 
 // Campaign hook handlers
 $wgHooks[ 'BeforePageDisplay' ][] = 'CampaignHooks::onBeforePageDisplay';
diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 0fceed1..0546e14 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -645,18 +645,17 @@
}
 
if ( class_exists( 'ResourceLoaderSchemaModule' ) ) {
-   $resourceLoader-register( 
'schema.UploadWizardTutorialActions', array(
-   'class' = 'ResourceLoaderSchemaModule',
-   'schema' = 
'UploadWizardTutorialActions',
-   'revision' = 5803466,
-   ) );
-

self::$modules['ext.uploadWizard.events']['dependencies'] = array(
'ext.eventLogging',
+   'schema.UploadWizardTutorialActions',
+   'schema.UploadWizardUploadActions',
);
 
self::$modules['uw.EventFlowLogger']['dependencies'] += 
array(
'ext.eventLogging',
+   'schema.UploadWizardStep',
+   'schema.UploadWizardFlowEvent',
+   'schema.UploadWizardUploadFlowEvent',
);
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I627ea141515ec757b34b43b2ca3f707eb5842e16
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Group MediaWiki job in the same gate queue - change (integration/zuul-config)

2014-09-18 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Group MediaWiki job in the same gate queue
..

Group MediaWiki job in the same gate queue

Repositories depending on mediawiki/core.git should all be in the same
dependent pipeline (the gate-and-submit with queue name 'mediawiki').

This way, whenever a patch for core enter the queue and can potentially
break a patch that has been enqueued later on, we will properly fails.

Use the dummy mediawiki-gate.

Change-Id: I3d4298695216016bea0ee437788e03597e54fe26
---
M layout.yaml
1 file changed, 24 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config 
refs/changes/30/161230/1

diff --git a/layout.yaml b/layout.yaml
index 1771500..2228212 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1659,6 +1659,7 @@
# Extensions tests with core+vendor
- 'mwext-{name}-testextension'
 gate-and-submit:
+ - mediawiki-gate
  - 'mwext-{name}-jslint'
  - 'mwext-{name}-lint':
# Extensions tests with core+vendor
@@ -1702,6 +1703,7 @@
  - 'mwext-{name}-jslint'
  - 'mwext-{name}-lint'
 gate-and-submit:
+ - mediawiki-gate
  - 'mwext-{name}-jslint'
  - 'mwext-{name}-lint'
 
@@ -1709,6 +1711,7 @@
 check-voter:
  - 'mw-skins-{name}-phplint'
 gate-and-submit:
+ - mediawiki-gate
  - 'mw-skins-{name}-phplint'
 
   - name: python
@@ -1828,6 +1831,7 @@
 # Non voting jobs are commented out
 #  - mediawiki-core-phpcs-lenient-HEAD
 #  - mediawiki-core-phpcs-strict-HEAD
+  - mediawiki-gate
   - mediawiki-core-jsduck
   - mediawiki-core-npm
   - mediawiki-core-lint:
@@ -2620,6 +2624,7 @@
   - mwext-BlameMaps-pep8
   - mwext-BlameMaps-pyflakes
 gate-and-submit:
+  - mediawiki-gate
   - mwext-BlameMaps-jslint
   - mwext-BlameMaps-lint
   - mwext-BlameMaps-pep8
@@ -2745,6 +2750,7 @@
   - mwext-Collection-OfflineContentGenerator-jslint
   - mwext-Collection-OfflineContentGenerator-npm
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Collection-OfflineContentGenerator-jslint
   - mwext-Collection-OfflineContentGenerator-npm
 
@@ -2755,6 +2761,7 @@
   - mwext-Collection-OfflineContentGenerator-bundler-jslint
   - mwext-Collection-OfflineContentGenerator-bundler-npm
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Collection-OfflineContentGenerator-bundler-jslint
   - mwext-Collection-OfflineContentGenerator-bundler-npm
 
@@ -2765,6 +2772,7 @@
   - mwext-Collection-OfflineContentGenerator-latex_renderer-jslint
   - mwext-Collection-OfflineContentGenerator-latex_renderer-npm
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Collection-OfflineContentGenerator-latex_renderer-jslint
   - mwext-Collection-OfflineContentGenerator-latex_renderer-npm
 
@@ -2775,6 +2783,7 @@
   - mwext-Collection-OfflineContentGenerator-text_renderer-jslint
   - mwext-Collection-OfflineContentGenerator-text_renderer-npm
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Collection-OfflineContentGenerator-text_renderer-jslint
   - mwext-Collection-OfflineContentGenerator-text_renderer-npm
 
@@ -2812,6 +2821,7 @@
   - mwext-ContentTranslation-yamllint
   - mwext-ContentTranslation-qunit
 gate-and-submit:
+  - mediawiki-gate
   - mwext-ContentTranslation-phpcs-strict-HEAD # Experiment, bug 48420
   - mwext-ContentTranslation-jslint
   - mwext-ContentTranslation-lint
@@ -2929,6 +2939,7 @@
   - mwext-DumpHTML-jslint
   - mwext-DumpHTML-lint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-DumpHTML-jslint
   - mwext-DumpHTML-lint
 
@@ -3144,6 +3155,7 @@
   - mwext-Interwiki-jslint
   - mwext-Interwiki-lint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Interwiki-phpcs-strict-HEAD # Experiment, bug 48420
   - mwext-Interwiki-jslint
   - mwext-Interwiki-lint
@@ -3268,6 +3280,7 @@
   - mwext-MultimediaViewer-jslint
   - mwext-MultimediaViewer-doc-test
 gate-and-submit:
+  - mediawiki-gate
   - mwext-MultimediaViewer-lint
   - mwext-MultimediaViewer-jslint
   - mwext-MultimediaViewer-doc-test
@@ -3339,6 +3352,7 @@
   - mwext-Offline-jslint
   - mwext-Offline-lint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Offline-jslint
   - mwext-Offline-lint
 
@@ -3362,6 +3376,7 @@
   - mwext-OpenStackManager-jslint
   - mwext-OpenStackManager-lint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-OpenStackManager-jslint
   - mwext-OpenStackManager-lint
 
@@ -4960,6 +4975,7 @@
 test:
   - mwext-Parsoid-jslint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Parsoid-jslint
 
   - name: mediawiki/extensions/PdfHandler
@@ -4996,6 +5012,7 @@
   - mwext-PoolCounter-lint
   - 

[MediaWiki-commits] [Gerrit] Properly register mediawiki-gate template - change (integration/jenkins-job-builder-config)

2014-09-18 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Properly register mediawiki-gate template
..

Properly register mediawiki-gate template

Add it the template to a project so it can be realized.

Change-Id: I10a53f01d51f377f3437ea25ac4791cd42f298b7
---
M mediawiki.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/31/161231/1

diff --git a/mediawiki.yaml b/mediawiki.yaml
index e5bfa12..b9d78f7 100644
--- a/mediawiki.yaml
+++ b/mediawiki.yaml
@@ -289,6 +289,7 @@
 databasetype:
   - sqlite
 jobs:
+  - mediawiki-gate
   - mediawiki-jobs
   - '{name}-phpcs-HEAD'
   - mediawiki-core-release

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10a53f01d51f377f3437ea25ac4791cd42f298b7
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Group MediaWiki jobs in the same gate queue - change (integration/zuul-config)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Group MediaWiki jobs in the same gate queue
..


Group MediaWiki jobs in the same gate queue

Repositories depending on mediawiki/core.git should all be in the same
dependent pipeline (the gate-and-submit with queue name 'mediawiki').

This way, whenever a patch for core enter the queue and can potentially
break a patch that has been enqueued later on, we will properly fails.

Use the dummy mediawiki-gate.

Bug: 58772
Change-Id: I3d4298695216016bea0ee437788e03597e54fe26
---
M layout.yaml
1 file changed, 24 insertions(+), 1 deletion(-)

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



diff --git a/layout.yaml b/layout.yaml
index 1771500..2228212 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1659,6 +1659,7 @@
# Extensions tests with core+vendor
- 'mwext-{name}-testextension'
 gate-and-submit:
+ - mediawiki-gate
  - 'mwext-{name}-jslint'
  - 'mwext-{name}-lint':
# Extensions tests with core+vendor
@@ -1702,6 +1703,7 @@
  - 'mwext-{name}-jslint'
  - 'mwext-{name}-lint'
 gate-and-submit:
+ - mediawiki-gate
  - 'mwext-{name}-jslint'
  - 'mwext-{name}-lint'
 
@@ -1709,6 +1711,7 @@
 check-voter:
  - 'mw-skins-{name}-phplint'
 gate-and-submit:
+ - mediawiki-gate
  - 'mw-skins-{name}-phplint'
 
   - name: python
@@ -1828,6 +1831,7 @@
 # Non voting jobs are commented out
 #  - mediawiki-core-phpcs-lenient-HEAD
 #  - mediawiki-core-phpcs-strict-HEAD
+  - mediawiki-gate
   - mediawiki-core-jsduck
   - mediawiki-core-npm
   - mediawiki-core-lint:
@@ -2620,6 +2624,7 @@
   - mwext-BlameMaps-pep8
   - mwext-BlameMaps-pyflakes
 gate-and-submit:
+  - mediawiki-gate
   - mwext-BlameMaps-jslint
   - mwext-BlameMaps-lint
   - mwext-BlameMaps-pep8
@@ -2745,6 +2750,7 @@
   - mwext-Collection-OfflineContentGenerator-jslint
   - mwext-Collection-OfflineContentGenerator-npm
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Collection-OfflineContentGenerator-jslint
   - mwext-Collection-OfflineContentGenerator-npm
 
@@ -2755,6 +2761,7 @@
   - mwext-Collection-OfflineContentGenerator-bundler-jslint
   - mwext-Collection-OfflineContentGenerator-bundler-npm
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Collection-OfflineContentGenerator-bundler-jslint
   - mwext-Collection-OfflineContentGenerator-bundler-npm
 
@@ -2765,6 +2772,7 @@
   - mwext-Collection-OfflineContentGenerator-latex_renderer-jslint
   - mwext-Collection-OfflineContentGenerator-latex_renderer-npm
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Collection-OfflineContentGenerator-latex_renderer-jslint
   - mwext-Collection-OfflineContentGenerator-latex_renderer-npm
 
@@ -2775,6 +2783,7 @@
   - mwext-Collection-OfflineContentGenerator-text_renderer-jslint
   - mwext-Collection-OfflineContentGenerator-text_renderer-npm
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Collection-OfflineContentGenerator-text_renderer-jslint
   - mwext-Collection-OfflineContentGenerator-text_renderer-npm
 
@@ -2812,6 +2821,7 @@
   - mwext-ContentTranslation-yamllint
   - mwext-ContentTranslation-qunit
 gate-and-submit:
+  - mediawiki-gate
   - mwext-ContentTranslation-phpcs-strict-HEAD # Experiment, bug 48420
   - mwext-ContentTranslation-jslint
   - mwext-ContentTranslation-lint
@@ -2929,6 +2939,7 @@
   - mwext-DumpHTML-jslint
   - mwext-DumpHTML-lint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-DumpHTML-jslint
   - mwext-DumpHTML-lint
 
@@ -3144,6 +3155,7 @@
   - mwext-Interwiki-jslint
   - mwext-Interwiki-lint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Interwiki-phpcs-strict-HEAD # Experiment, bug 48420
   - mwext-Interwiki-jslint
   - mwext-Interwiki-lint
@@ -3268,6 +3280,7 @@
   - mwext-MultimediaViewer-jslint
   - mwext-MultimediaViewer-doc-test
 gate-and-submit:
+  - mediawiki-gate
   - mwext-MultimediaViewer-lint
   - mwext-MultimediaViewer-jslint
   - mwext-MultimediaViewer-doc-test
@@ -3339,6 +3352,7 @@
   - mwext-Offline-jslint
   - mwext-Offline-lint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Offline-jslint
   - mwext-Offline-lint
 
@@ -3362,6 +3376,7 @@
   - mwext-OpenStackManager-jslint
   - mwext-OpenStackManager-lint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-OpenStackManager-jslint
   - mwext-OpenStackManager-lint
 
@@ -4960,6 +4975,7 @@
 test:
   - mwext-Parsoid-jslint
 gate-and-submit:
+  - mediawiki-gate
   - mwext-Parsoid-jslint
 
   - name: mediawiki/extensions/PdfHandler
@@ -4996,6 +5012,7 @@
   - mwext-PoolCounter-lint
   - mwext-PoolCounter-build
 

[MediaWiki-commits] [Gerrit] Properly register mediawiki-gate template - change (integration/jenkins-job-builder-config)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Properly register mediawiki-gate template
..


Properly register mediawiki-gate template

Add it the template to a project so it can be realized.

Change-Id: I10a53f01d51f377f3437ea25ac4791cd42f298b7
---
M mediawiki.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/mediawiki.yaml b/mediawiki.yaml
index e5bfa12..b9d78f7 100644
--- a/mediawiki.yaml
+++ b/mediawiki.yaml
@@ -289,6 +289,7 @@
 databasetype:
   - sqlite
 jobs:
+  - mediawiki-gate
   - mediawiki-jobs
   - '{name}-phpcs-HEAD'
   - mediawiki-core-release

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I10a53f01d51f377f3437ea25ac4791cd42f298b7
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add MultiConfig for fallback logic - change (mediawiki/core)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add MultiConfig for fallback logic
..


Add MultiConfig for fallback logic

This change adds MultiConfig and HashConfig classes,
but does not actually use them anywhere. In a future
change, we can convert DefaultSettings.php into
a HashConfig instance and use MultiConfig as the
'main' config instance.

Bug: 69418
Change-Id: I0ef2fbb86d5c27602d70240219ee08be31e2d09b
---
M includes/AutoLoader.php
M includes/config/Config.php
M includes/config/GlobalVarConfig.php
A includes/config/HashConfig.php
A includes/config/MultiConfig.php
M tests/phpunit/includes/config/GlobalVarConfigTest.php
A tests/phpunit/includes/config/HashConfigTest.php
A tests/phpunit/includes/config/MultiConfigTest.php
8 files changed, 294 insertions(+), 6 deletions(-)

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



diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 4c35bfd..4144325 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -374,6 +374,8 @@
'ConfigException' = 'includes/config/ConfigException.php',
'ConfigFactory' = 'includes/config/ConfigFactory.php',
'GlobalVarConfig' = 'includes/config/GlobalVarConfig.php',
+   'HashConfig' = 'includes/config/HashConfig.php',
+   'MultiConfig' = 'includes/config/MultiConfig.php',
'MutableConfig' = 'includes/config/MutableConfig.php',
 
# includes/content
diff --git a/includes/config/Config.php b/includes/config/Config.php
index 03d2cb9..38f589d 100644
--- a/includes/config/Config.php
+++ b/includes/config/Config.php
@@ -35,4 +35,13 @@
 * @throws ConfigException
 */
public function get( $name );
+
+   /**
+* Check whether a configuration option is set for the given name
+*
+* @param string $name Name of configuration option
+* @return bool
+* @since 1.24
+*/
+   public function has( $name );
 }
diff --git a/includes/config/GlobalVarConfig.php 
b/includes/config/GlobalVarConfig.php
index 1144384..39d6e8e 100644
--- a/includes/config/GlobalVarConfig.php
+++ b/includes/config/GlobalVarConfig.php
@@ -49,7 +49,17 @@
 * @see Config::get
 */
public function get( $name ) {
+   if ( !$this-has( $name ) ) {
+   throw new ConfigException( __METHOD__ . : undefined 
option: '$name' );
+   }
return $this-getWithPrefix( $this-prefix, $name );
+   }
+
+   /**
+* @see Config::has
+*/
+   public function has( $name ) {
+   return $this-hasWithPrefix( $this-prefix, $name );
}
 
/**
@@ -66,15 +76,22 @@
 *
 * @param string $prefix Prefix to use on the variable, if one.
 * @param string $name Variable name without prefix
-* @throws ConfigException
 * @return mixed
 */
protected function getWithPrefix( $prefix, $name ) {
+   return $GLOBALS[$prefix . $name];
+   }
+
+   /**
+* Check if a variable with a given prefix is set
+*
+* @param string $prefix Prefix to use on the variable
+* @param string $name Variable name without prefix
+* @return bool
+*/
+   protected function hasWithPrefix( $prefix, $name ) {
$var = $prefix . $name;
-   if ( !array_key_exists( $var, $GLOBALS ) ) {
-   throw new ConfigException( __METHOD__ . : undefined 
variable: '$var' );
-   }
-   return $GLOBALS[$var];
+   return array_key_exists( $var, $GLOBALS );
}
 
/**
diff --git a/includes/config/HashConfig.php b/includes/config/HashConfig.php
new file mode 100644
index 000..a09a0a4
--- /dev/null
+++ b/includes/config/HashConfig.php
@@ -0,0 +1,75 @@
+?php
+/**
+ * Copyright 2014
+ *
+ * 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
+ */
+
+/**
+ * A Config instance which stores all settings as a member variable
+ *
+ * @since 1.24
+ */
+class HashConfig implements Config, MutableConfig {
+
+   /**
+* Array of config 

[MediaWiki-commits] [Gerrit] Allow callback functions for creating SpecialPages. - change (mediawiki/core)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow callback functions for creating SpecialPages.
..


Allow callback functions for creating SpecialPages.

This enables factory functions to be registered for special
pages, as an alterative to giving a class name. This follows the
same rationale as Ieb85493a7765, which introduced factory functions
for API modules.

Change-Id: Ia2107dc5af7869187ba5dc02a1bef46d6801e138
---
M RELEASE-NOTES-1.24
M includes/DefaultSettings.php
M includes/PrefixSearch.php
M includes/api/ApiQuerySiteinfo.php
M includes/specialpage/SpecialPageFactory.php
A tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php
6 files changed, 183 insertions(+), 28 deletions(-)

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



diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 771a821..79b8a49 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -47,6 +47,8 @@
 * $wgCompiledFiles has been removed.
 * $wgSortSpecialPages was removed, the listing on Special:SpecialPages is
   now always sorted.
+* $wgSpecialPages may now use callback functions as an alternative to plain 
class names.
+  This allows more control over constructor parameters.
 * $wgHTCPMulticastAddress, $wgHTCPMulticastRouting and $wgHTCPPort were 
removed.
 * $wgRC2UDPAddress, $wgRC2UDPInterwikiPrefix, $wgRC2UDPOmitBots, $wgRC2UDPPort
   and $wgRC2UDPPrefix have been removed.
@@ -440,6 +442,8 @@
   meaning that JavaScript is no longer executed in these browser versions.
 * Browser support for Opera 11 lowered from Grade A to Grade C.
 * Removed IEFixes module which existed purely to provide support for MSIE 
versions
+* Deprecated SpecialPageFactory::getList() in favor of
+  SpecialPageFactory::getNames()
   below 7 (conditionally loaded only for those browsers).
 * Action::checkCanExecute() no longer has a return value.
 * Removed cleanupForIRC(), loadFromCurRow(), newFromCurRow(), notifyRC2UDP()
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 2123af1..9f1b4c7 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6189,8 +6189,10 @@
 $wgValidSkinNames = array();
 
 /**
- * Special page list.
- * See the top of SpecialPage.php for documentation.
+ * Special page list. This is an associative array mapping the (canonical) 
names of
+ * special pages to either a class name to be instantiated, or a callback to 
use for
+ * creating the special page object. In both cases, the result must be an 
instance of
+ * SpecialPage.
  */
 $wgSpecialPages = array();
 
diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php
index 295183c..718750f 100644
--- a/includes/PrefixSearch.php
+++ b/includes/PrefixSearch.php
@@ -195,12 +195,12 @@
// Unlike SpecialPage itself, we want the canonical forms of 
both
// canonical and alias title forms...
$keys = array();
-   foreach ( SpecialPageFactory::getList() as $page = $class ) {
+   foreach ( SpecialPageFactory::getNames() as $page  ) {
$keys[$wgContLang-caseFold( $page )] = $page;
}
 
foreach ( $wgContLang-getSpecialPageAliases() as $page = 
$aliases ) {
-   if ( !array_key_exists( $page, 
SpecialPageFactory::getList() ) ) {# bug 20885
+   if ( !in_array( $page, SpecialPageFactory::getNames() ) 
) {# bug 20885
continue;
}
 
diff --git a/includes/api/ApiQuerySiteinfo.php 
b/includes/api/ApiQuerySiteinfo.php
index fd0c429..311438f 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -344,7 +344,7 @@
global $wgContLang;
$data = array();
$aliases = $wgContLang-getSpecialPageAliases();
-   foreach ( SpecialPageFactory::getList() as $specialpage = 
$stuff ) {
+   foreach ( SpecialPageFactory::getNames() as $specialpage ) {
if ( isset( $aliases[$specialpage] ) ) {
$arr = array( 'realname' = $specialpage, 
'aliases' = $aliases[$specialpage] );
$this-getResult()-setIndexedTagName( 
$arr['aliases'], 'alias' );
diff --git a/includes/specialpage/SpecialPageFactory.php 
b/includes/specialpage/SpecialPageFactory.php
index 0138cf9..e0737a0 100644
--- a/includes/specialpage/SpecialPageFactory.php
+++ b/includes/specialpage/SpecialPageFactory.php
@@ -176,11 +176,43 @@
private static $aliases;
 
/**
-* Get the special page list
-*
-* @return array
+* Reset the internal list of special pages. Useful when changing 
$wgSpecialPages after
+* the internal list has already been initialized, e.g. during testing.
 */
-   static function getList() 

[MediaWiki-commits] [Gerrit] Improve styleability of RecentChanges form - change (mediawiki/core)

2014-09-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve styleability of RecentChanges form
..


Improve styleability of RecentChanges form

The current form is a sequence of text and links without
any structure which makes it impossible to apply styles.

This patch wraps some elements in spans and assigns class
names, so that they can be targeted by CSS rules.

Change-Id: If3ca99b0bd251528ced856822c8e52a18657deb8
---
M includes/specials/SpecialRecentchanges.php
1 file changed, 8 insertions(+), 5 deletions(-)

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



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 5938f01..25da16d 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -732,7 +732,7 @@
 
$link = $this-makeOptionsLink( $linkMessage-text(),
array( $key = 1 - $options[$key] ), 
$nondefaults );
-   $links[] = $this-msg( $msg )-rawParams( $link 
)-escaped();
+   $links[] = span class=\$msg rcshowhideoption\ . 
$this-msg( $msg )-rawParams( $link )-escaped() . '/span';
}
 
// show from this onward link
@@ -740,13 +740,16 @@
$now = $lang-userTimeAndDate( $timestamp, $user );
$timenow = $lang-userTime( $timestamp, $user );
$datenow = $lang-userDate( $timestamp, $user );
-   $rclinks = $this-msg( 'rclinks' )-rawParams( $cl, $dl, 
$lang-pipeList( $links ) )
-   -parse();
-   $rclistfrom = $this-makeOptionsLink(
+   $pipedLinks = 'span class=rcshowhide' . $lang-pipeList( 
$links ) . '/span';
+
+   $rclinks = 'span class=rclinks' . $this-msg( 'rclinks' 
)-rawParams( $cl, $dl, $pipedLinks )
+   -parse() . '/span';
+
+   $rclistfrom = 'span class=rclistfrom' . 
$this-makeOptionsLink(
$this-msg( 'rclistfrom' )-rawParams( $now, $timenow, 
$datenow )-parse(),
array( 'from' = $timestamp ),
$nondefaults
-   );
+   ) . '/span';
 
return {$note}$rclinksbr /$rclistfrom;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3ca99b0bd251528ced856822c8e52a18657deb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Foxtrott s7ep...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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 Wikidata, fix broken xml api output - change (mediawiki...Wikidata)

2014-09-18 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Update Wikidata, fix broken xml api output
..

Update Wikidata, fix broken xml api output

Change-Id: I3eeb033887ff76825e83c76aba1685fce297faf9
---
M composer.lock
M extensions/Wikibase/repo/includes/api/ResultBuilder.php
A extensions/Wikibase/repo/tests/phpunit/data/api/getclaims.xml
A extensions/Wikibase/repo/tests/phpunit/data/api/getentities.xml
A extensions/Wikibase/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/api/GetClaimsTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/api/ResultBuilderTest.php
M vendor/composer/autoload_classmap.php
M vendor/composer/installed.json
9 files changed, 324 insertions(+), 76 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index 92a8a67..f58c153 100644
--- a/composer.lock
+++ b/composer.lock
@@ -748,7 +748,9 @@
 psr-4: {
 PropertySuggester\\: src/PropertySuggester/
 },
-files: [],
+files: [
+
+],
 classmap: [
 PropertySuggesterHooks.php,
 maintenance/UpdateTable.php
@@ -1183,12 +1185,12 @@
 source: {
 type: git,
 url: 
https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-reference: 17b4efe972b4ba777e00df6a04bef0ddc3b4bf3e
+reference: bba838e08a89e33d462259c4aee77987c6ba773b
 },
 dist: {
 type: zip,
-url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/17b4efe972b4ba777e00df6a04bef0ddc3b4bf3e;,
-reference: 17b4efe972b4ba777e00df6a04bef0ddc3b4bf3e,
+url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/bba838e08a89e33d462259c4aee77987c6ba773b;,
+reference: bba838e08a89e33d462259c4aee77987c6ba773b,
 shasum: 
 },
 require: {
@@ -1257,7 +1259,7 @@
 wikibaserepo,
 wikidata
 ],
-time: 2014-09-16 13:32:44
+time: 2014-09-18 12:50:07
 },
 {
 name: wikibase/wikimedia-badges,
@@ -1310,8 +1312,12 @@
 time: 2014-09-02 17:56:18
 }
 ],
-packages-dev: [],
-aliases: [],
+packages-dev: [
+
+],
+aliases: [
+
+],
 minimum-stability: stable,
 stability-flags: {
 wikibase/wikibase: 20,
@@ -1322,5 +1328,7 @@
 platform: {
 php: =5.3.0
 },
-platform-dev: []
+platform-dev: [
+
+]
 }
diff --git a/extensions/Wikibase/repo/includes/api/ResultBuilder.php 
b/extensions/Wikibase/repo/includes/api/ResultBuilder.php
index 701a321..1f4e6dc 100644
--- a/extensions/Wikibase/repo/includes/api/ResultBuilder.php
+++ b/extensions/Wikibase/repo/includes/api/ResultBuilder.php
@@ -23,6 +23,7 @@
  *
  * @licence GNU GPL v2+
  * @author Adam Shorland
+ * @author Daniel Kinzler
  */
 class ResultBuilder {
 
@@ -71,10 +72,6 @@
$this-entityTitleLookup = $entityTitleLookup;
$this-serializerFactory = $serializerFactory;
$this-missingEntityCounter = -1;
-
-   $this-options = new SerializationOptions();
-   $this-options-setIndexTags( 
$this-getResult()-getIsRawMode() );
-   $this-options-setOption( EntitySerializer::OPT_SORT_ORDER, 
EntitySerializer::SORT_NONE );
}
 
/**
@@ -84,14 +81,13 @@
 * @return SerializationOptions
 */
public function getOptions() {
-   return $this-options;
-   }
+   if ( !$this-options ) {
+   $this-options = new SerializationOptions();
+   $this-options-setIndexTags( 
$this-result-getIsRawMode() );
+   $this-options-setOption( 
EntitySerializer::OPT_SORT_ORDER, EntitySerializer::SORT_NONE );
+   }
 
-   /**
-* @return ApiResult
-*/
-   private function getResult() {
-   return $this-result;
+   return $this-options;
}
 
/**
@@ -136,15 +132,16 @@
$this-checkNameIsString( $name );
$this-checkTagIsString( $tag );
 
-   if ( $this-options-shouldIndexTags() ) {
+   if ( $this-result-getIsRawMode() ) {
+   // Unset first, so we don't make the tag name an actual 
value.
+   // We'll be setting this to $tag by calling 
setIndexedTagName().
+   unset( $values['_element'] );
+
$values = array_values( $values );
+ 

[MediaWiki-commits] [Gerrit] Add stats group for mwgrep - change (operations/puppet)

2014-09-18 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Add stats group for mwgrep
..

Add stats group for mwgrep

This will let us know how many resources mwgrep consumes.  We see spikes in
load periodically caused by lots of extra queries that don't _look_ _like_
natural cirrus traffic.

Change-Id: Icdf6de1f72dd85c8b5ee5c466c069dbc9e81973c
---
M files/misc/scripts/mwgrep
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/161233/1

diff --git a/files/misc/scripts/mwgrep b/files/misc/scripts/mwgrep
index 82efaa2..d3fca74 100755
--- a/files/misc/scripts/mwgrep
+++ b/files/misc/scripts/mwgrep
@@ -98,6 +98,7 @@
 'size': args.max_results,
 '_source': ['namespace', 'title'],
 'query': {'filtered': {'filter': {'bool': {'must': filters,
+'stats': ['mwgrep'],
 }
 
 query = {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdf6de1f72dd85c8b5ee5c466c069dbc9e81973c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


  1   2   3   4   5   >