[MediaWiki-commits] [Gerrit] lists: add OCSP stapling to role::lists - change (operations/puppet)

2015-10-05 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: lists: add OCSP stapling to role::lists
..

lists: add OCSP stapling to role::lists

Change-Id: I954111aa4bf87101fb14595e12aff85664c1b1aa
---
M manifests/role/lists.pp
M templates/exim/exim4.conf.mailman.erb
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/98/243698/1

diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp
index 97018ab..82c0b8c 100644
--- a/manifests/role/lists.pp
+++ b/manifests/role/lists.pp
@@ -30,6 +30,10 @@
 group => 'Debian-exim',
 }
 
+sslcert::ocsp::conf { 'lists.wikimedia.org':
+before => Class['exim4'],
+}
+
 include mailman
 
 class { 'spamassassin':
diff --git a/templates/exim/exim4.conf.mailman.erb 
b/templates/exim/exim4.conf.mailman.erb
index abb4454..0b267fc 100644
--- a/templates/exim/exim4.conf.mailman.erb
+++ b/templates/exim/exim4.conf.mailman.erb
@@ -68,6 +68,7 @@
 # TLS
 tls_certificate = /etc/ssl/localcerts/lists.wikimedia.org.chained.crt
 tls_privatekey = /etc/ssl/private/lists.wikimedia.org.key
+tls_ocsp_file = /var/cache/ocsp/lists.wikimedia.org.ocsp
 tls_advertise_hosts = *
 
 # force Gmail over IPv4 due to reports of bad spam reputation over IPv6

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I954111aa4bf87101fb14595e12aff85664c1b1aa
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] TextInputWidget: Remove 'autocomplete' attribute on page nav... - change (oojs/ui)

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

Change subject: TextInputWidget: Remove 'autocomplete' attribute on page 
navigation
..


TextInputWidget: Remove 'autocomplete' attribute on page navigation

Turning off autocompletion also disables "form caching" when the user
navigates to a different page and then back. Re-enable it when
leaving, and re-disable when coming back.

Bug: T114134
Change-Id: I2df816ff80d6271eade60b6e9eb1aea870f098d5
---
M src/widgets/TextInputWidget.js
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index a902437..9dddc9e 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -140,6 +140,18 @@
}
if ( config.autocomplete === false ) {
this.$input.attr( 'autocomplete', 'off' );
+   // Turning off autocompletion also disables "form caching" when 
the user navigates to a
+   // different page and then clicks "Back". Re-enable it when 
leaving. Borrowed from jQuery UI.
+   $( window ).on( {
+   beforeunload: function () {
+   this.$input.removeAttr( 'autocomplete' );
+   }.bind( this ),
+   pageshow: function () {
+   // Browsers don't seem to actually fire this 
event on "Back", they instead just reload the
+   // whole page... it shouldn't hurt, though.
+   this.$input.attr( 'autocomplete', 'off' );
+   }.bind( this )
+   } );
}
if ( this.multiline && config.rows ) {
this.$input.attr( 'rows', config.rows );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2df816ff80d6271eade60b6e9eb1aea870f098d5
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] lists: add OCSP stapling to role::lists - change (operations/puppet)

2015-10-05 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: lists: add OCSP stapling to role::lists
..


lists: add OCSP stapling to role::lists

Change-Id: I954111aa4bf87101fb14595e12aff85664c1b1aa
---
M manifests/role/lists.pp
M templates/exim/exim4.conf.mailman.erb
2 files changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp
index 97018ab..82c0b8c 100644
--- a/manifests/role/lists.pp
+++ b/manifests/role/lists.pp
@@ -30,6 +30,10 @@
 group => 'Debian-exim',
 }
 
+sslcert::ocsp::conf { 'lists.wikimedia.org':
+before => Class['exim4'],
+}
+
 include mailman
 
 class { 'spamassassin':
diff --git a/templates/exim/exim4.conf.mailman.erb 
b/templates/exim/exim4.conf.mailman.erb
index abb4454..0b267fc 100644
--- a/templates/exim/exim4.conf.mailman.erb
+++ b/templates/exim/exim4.conf.mailman.erb
@@ -68,6 +68,7 @@
 # TLS
 tls_certificate = /etc/ssl/localcerts/lists.wikimedia.org.chained.crt
 tls_privatekey = /etc/ssl/private/lists.wikimedia.org.key
+tls_ocsp_file = /var/cache/ocsp/lists.wikimedia.org.ocsp
 tls_advertise_hosts = *
 
 # force Gmail over IPv4 due to reports of bad spam reputation over IPv6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I954111aa4bf87101fb14595e12aff85664c1b1aa
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert OCSP stapling to roles mail::mx and lists - change (operations/puppet)

2015-10-05 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Revert OCSP stapling to roles mail::mx and lists
..


Revert OCSP stapling to roles mail::mx and lists

Apparently this is buggy with jessie's version of GnuTLS and makes exim4
send the status TLS extension even when not requested, breaking most
clients in the process. Newer versions of exim4 (4.87+) even blacklist
those buggy GnuTLS versions and refuse to enable OCSP.

Exim bug #1664 has the gory details and links to upstream commit fixes:
https://bugs.exim.org/show_bug.cgi?id=1664

This reverts commits:
  - 9614ed8ae40b0ac95ea8831960e3d2dfd81e9212
  - 2fae676c247ed6f1532ed608456598e0da3cce1c

Change-Id: If1f469dc32fbb44b0b0242ab2822d9129f410774
---
M manifests/role/lists.pp
M manifests/role/mail.pp
M templates/exim/exim4.conf.mailman.erb
M templates/exim/exim4.conf.mx.erb
4 files changed, 0 insertions(+), 10 deletions(-)

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



diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp
index 82c0b8c..97018ab 100644
--- a/manifests/role/lists.pp
+++ b/manifests/role/lists.pp
@@ -30,10 +30,6 @@
 group => 'Debian-exim',
 }
 
-sslcert::ocsp::conf { 'lists.wikimedia.org':
-before => Class['exim4'],
-}
-
 include mailman
 
 class { 'spamassassin':
diff --git a/manifests/role/mail.pp b/manifests/role/mail.pp
index 3c0f4f5..e3ef8c7 100644
--- a/manifests/role/mail.pp
+++ b/manifests/role/mail.pp
@@ -28,10 +28,6 @@
 before => Class['exim4'],
 }
 
-sslcert::ocsp::conf { 'mail.wikimedia.org':
-before => Class['exim4'],
-}
-
 class { 'spamassassin':
 required_score   => '4.0',
 use_bayes=> '1',
diff --git a/templates/exim/exim4.conf.mailman.erb 
b/templates/exim/exim4.conf.mailman.erb
index 0b267fc..abb4454 100644
--- a/templates/exim/exim4.conf.mailman.erb
+++ b/templates/exim/exim4.conf.mailman.erb
@@ -68,7 +68,6 @@
 # TLS
 tls_certificate = /etc/ssl/localcerts/lists.wikimedia.org.chained.crt
 tls_privatekey = /etc/ssl/private/lists.wikimedia.org.key
-tls_ocsp_file = /var/cache/ocsp/lists.wikimedia.org.ocsp
 tls_advertise_hosts = *
 
 # force Gmail over IPv4 due to reports of bad spam reputation over IPv6
diff --git a/templates/exim/exim4.conf.mx.erb b/templates/exim/exim4.conf.mx.erb
index 8e7ff18..4fc0618 100644
--- a/templates/exim/exim4.conf.mx.erb
+++ b/templates/exim/exim4.conf.mx.erb
@@ -84,7 +84,6 @@
 # TLS
 tls_certificate = /etc/ssl/localcerts/mail.wikimedia.org.chained.crt
 tls_privatekey = /etc/ssl/private/mail.wikimedia.org.key
-tls_ocsp_file = /var/cache/ocsp/mail.wikimedia.org.ocsp
 tls_advertise_hosts = *
 
 # force Gmail over IPv4 due to reports of bad spam reputation over IPv6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1f469dc32fbb44b0b0242ab2822d9129f410774
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Small optimization for FileContentsHasher - change (mediawiki/core)

2015-10-05 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Small optimization for FileContentsHasher
..

Small optimization for FileContentsHasher

Make sure that PHP warnings are suppressed and restored once per invocation of
FileContentsHasher::getFileContentsHash(), rather than once or twice per file.

Change-Id: I814093f226d62e5e479411d0c3a7bbbe4998255a
---
M includes/utils/FileContentsHasher.php
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/243709/1

diff --git a/includes/utils/FileContentsHasher.php 
b/includes/utils/FileContentsHasher.php
index 655c1d0..22e2198 100644
--- a/includes/utils/FileContentsHasher.php
+++ b/includes/utils/FileContentsHasher.php
@@ -57,7 +57,7 @@
 * @return string|bool Hash of file contents, or false if the file 
could not be read.
 */
public function getFileContentsHashInternal( $filePath, $algo = 'md4' ) 
{
-   $mtime = MediaWiki\quietCall( 'filemtime', $filePath );
+   $mtime = filemtime( $filePath );
if ( $mtime === false ) {
return false;
}
@@ -69,7 +69,7 @@
return $hash;
}
 
-   $contents = MediaWiki\quietCall( 'file_get_contents', $filePath 
);
+   $contents = file_get_contents( $filePath );
if ( $contents === false ) {
return false;
}
@@ -96,6 +96,8 @@
$filePaths = (array)$filePaths;
}
 
+   MediaWiki\supressWarnings();
+
if ( count( $filePaths ) === 1 ) {
return $instance->getFileContentsHashInternal( 
$filePaths[0], $algo );
}
@@ -105,6 +107,8 @@
return $instance->getFileContentsHashInternal( 
$filePath, $algo ) ?: '';
}, $filePaths );
 
+   MediaWiki\restoreWarnings();
+
$hashes = implode( '', $hashes );
return $hashes ? hash( $algo, $hashes ) : false;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I814093f226d62e5e479411d0c3a7bbbe4998255a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.1
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Split CategorySelector widget to it's own module - change (mediawiki/core)

2015-10-05 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Split CategorySelector widget to it's own module
..

Split CategorySelector widget to it's own module

It's currently used by ForeignStructuredUpload only, so it's easy to split
it now and make mw.widgets as small as possible (you need to load only the
module of the widget(s) you want to use).

Bug: T108733
Change-Id: I147892eccdd5f7e0f53f824ea4d47e02984047f5
---
M resources/Resources.php
1 file changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/243701/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 9affe26..db96878 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1244,7 +1244,7 @@
'dependencies' => array(
'mediawiki.ForeignStructuredUpload',
'mediawiki.Upload.BookletLayout',
-   'mediawiki.widgets',
+   'mediawiki.widgets.CategorySelector',
'mediawiki.widgets.DateInputWidget',
'mediawiki.jqueryMsg',
),
@@ -1974,8 +1974,6 @@

'resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js',

'resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js',

'resources/src/mediawiki.widgets/mw.widgets.UserInputWidget.js',
-   
'resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js',
-   
'resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js',
),
'skinStyles' => array(
'default' => array(
@@ -2034,6 +2032,15 @@
),
'targets' => array( 'desktop', 'mobile' ),
),
+   'mediawiki.widgets.CategorySelector' => array(
+   'scripts' => array(
+   
'resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js',
+   
'resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js',
+   ),
+   'dependencies' => array(
+   'mediawiki.api',
+   ),
+   ),
 
/* es5-shim */
'es5-shim' => array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I147892eccdd5f7e0f53f824ea4d47e02984047f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Jenkins: enable client when repo is enabled - change (mediawiki...Wikibase)

2015-10-05 Thread JanZerebecki (Code Review)
JanZerebecki has uploaded a new change for review.

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

Change subject: Jenkins: enable client when repo is enabled
..

Jenkins: enable client when repo is enabled

Bug: T112136
Change-Id: Ie420a1d55ba037a35b0d0f0d4fd5c40537a20738
---
M build/jenkins/mw-apply-wb-settings.sh
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/build/jenkins/mw-apply-wb-settings.sh 
b/build/jenkins/mw-apply-wb-settings.sh
index 49d80b7..32a4e42 100755
--- a/build/jenkins/mw-apply-wb-settings.sh
+++ b/build/jenkins/mw-apply-wb-settings.sh
@@ -35,16 +35,19 @@
 
 function apply_repo_settings {
   echo '$wgEnableWikibaseRepo = true;' >> LocalSettings.php
-  echo '$wgEnableWikibaseClient = false;' >> LocalSettings.php
+  echo '$wgEnableWikibaseClient = true;' >> LocalSettings.php
   echo '$wmgUseWikibaseRepo = true;' >> LocalSettings.php
-  echo '$wmgUseWikibaseClient = false;' >> LocalSettings.php
+  echo '$wmgUseWikibaseClient = true;' >> LocalSettings.php
   if [ $BUILD = true ]
   then
 echo 'require_once __DIR__ . "/extensions/Wikidata/Wikidata.php";' >> 
LocalSettings.php
 echo 'require_once __DIR__ . 
"/extensions/Wikidata/extensions/Wikibase/repo/ExampleSettings.php";' >> 
LocalSettings.php
+echo 'require_once __DIR__ . 
"/extensions/Wikidata/extensions/Wikibase/client/ExampleSettings.php";' >> 
LocalSettings.php
   else
 echo 'require_once __DIR__ . "/extensions/Wikibase/repo/Wikibase.php";' >> 
LocalSettings.php
 echo 'require_once __DIR__ . 
"/extensions/Wikibase/repo/ExampleSettings.php";' >> LocalSettings.php
+echo 'require_once __DIR__ . 
"/extensions/Wikibase/client/WikibaseClient.php";' >> LocalSettings.php
+echo 'require_once __DIR__ . 
"/extensions/Wikibase/client/ExampleSettings.php";' >> LocalSettings.php
   fi
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] Add null to @return tags if a method can return null - change (mediawiki/core)

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

Change subject: Add null to @return tags if a method can return null
..


Add null to @return tags if a method can return null

Change-Id: I420998351663d92c4a101f61842e40591eebcd5f
---
M includes/Title.php
M includes/User.php
M includes/api/ApiModuleManager.php
M includes/cache/MessageBlobStore.php
M includes/filerepo/file/File.php
M includes/page/WikiPage.php
M includes/search/SearchResult.php
M includes/search/SearchResultSet.php
M includes/upload/UploadStash.php
M includes/utils/IP.php
10 files changed, 15 insertions(+), 15 deletions(-)

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



diff --git a/includes/Title.php b/includes/Title.php
index eac712b..9e78e10 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -530,7 +530,7 @@
 * @param string $title Database key form
 * @param string $fragment The link fragment (after the "#")
 * @param string $interwiki Interwiki prefix
-* @return Title The new object, or null on an error
+* @return Title|null The new object, or null on an error
 */
public static function makeTitleSafe( $ns, $title, $fragment = '', 
$interwiki = '' ) {
if ( !MWNamespace::exists( $ns ) ) {
diff --git a/includes/User.php b/includes/User.php
index 4822f53..e523b68 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -935,7 +935,7 @@
 * the cached User object, we assume that whatever mechanism is setting
 * the expiration date is also expiring the User cache.
 * @since 1.23
-* @return string|bool The datestamp of the expiration, or null if not 
set
+* @return string|null The datestamp of the expiration, or null if not 
set
 */
public function getPasswordExpireDate() {
$this->load();
diff --git a/includes/api/ApiModuleManager.php 
b/includes/api/ApiModuleManager.php
index ba6c144..7c0a430 100644
--- a/includes/api/ApiModuleManager.php
+++ b/includes/api/ApiModuleManager.php
@@ -275,7 +275,7 @@
/**
 * Returns the group name for the given module
 * @param string $moduleName
-* @return string Group name or null if missing
+* @return string|null Group name or null if missing
 */
public function getModuleGroup( $moduleName ) {
if ( isset( $this->mModules[$moduleName] ) ) {
diff --git a/includes/cache/MessageBlobStore.php 
b/includes/cache/MessageBlobStore.php
index 19349b2..63d8c7e 100644
--- a/includes/cache/MessageBlobStore.php
+++ b/includes/cache/MessageBlobStore.php
@@ -167,7 +167,7 @@
 * @param string $name Module name
 * @param ResourceLoaderModule $module
 * @param string $lang Language code
-* @return string Regenerated message blob, or null if there was no 
blob for
+* @return string|null Regenerated message blob, or null if there was 
no blob for
 *   the given module/language pair.
 */
public function updateModule( $name, ResourceLoaderModule $module, 
$lang ) {
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index cde5e6a..fc9870a 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -574,7 +574,7 @@
 * In files that support multiple language, what is the default language
 * to use if none specified.
 *
-* @return string Lang code, or null if filetype doesn't support 
multiple languages.
+* @return string|null Lang code, or null if filetype doesn't support 
multiple languages.
 * @since 1.23
 */
public function getDefaultRenderLanguage() {
@@ -922,7 +922,7 @@
 *
 * @param array $params Handler-specific parameters
 * @param int $flags Bitfield that supports THUMB_* constants
-* @return string
+* @return string|null
 */
public function thumbName( $params, $flags = 0 ) {
$name = ( $this->repo && !( $flags & self::THUMB_FULL_NAME ) )
@@ -937,7 +937,7 @@
 *
 * @param string $name
 * @param array $params Parameters which will be passed to 
MediaHandler::makeParamString
-* @return string
+* @return string|null
 */
public function generateThumbName( $name, $params ) {
if ( !$this->getHandler() ) {
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index d3978ea..409e7ea 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -1421,7 +1421,7 @@
 * @param string $edittime Revision timestamp or null to use the 
current revision.
 *
 * @throws MWException
-* @return string New complete article text, or null if error.
+* @return string|null New complete article text, or null if error.
 *
 * 

[MediaWiki-commits] [Gerrit] Pass generated content error to inspector - change (VisualEditor/VisualEditor)

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

Change subject: Pass generated content error to inspector
..


Pass generated content error to inspector

If an error is returned in generated content, pass it
to the inspector so it can be rendered there.

Bug: T113172
Change-Id: I6002d9870d2b38275245fbf48f0e19b57c41de01
---
M src/ce/nodes/ve.ce.GeneratedContentNode.js
M src/dm/nodes/ve.dm.GeneratedContentNode.js
2 files changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/src/ce/nodes/ve.ce.GeneratedContentNode.js 
b/src/ce/nodes/ve.ce.GeneratedContentNode.js
index 444eb65..66747b1 100644
--- a/src/ce/nodes/ve.ce.GeneratedContentNode.js
+++ b/src/ce/nodes/ve.ce.GeneratedContentNode.js
@@ -159,6 +159,9 @@
this.$element.remove();
this.$element = $newElements;
}
+   } else {
+   this.generatedContentsValid = false;
+   this.model.emit( 'generatedContentsError', $newElements );
}
 
// Update focusable and resizable elements if necessary
diff --git a/src/dm/nodes/ve.dm.GeneratedContentNode.js 
b/src/dm/nodes/ve.dm.GeneratedContentNode.js
index a494432..a8a7fd2 100644
--- a/src/dm/nodes/ve.dm.GeneratedContentNode.js
+++ b/src/dm/nodes/ve.dm.GeneratedContentNode.js
@@ -19,6 +19,13 @@
 
 OO.initClass( ve.dm.GeneratedContentNode );
 
+/* Events */
+
+/**
+ * @event generatedContentsError
+ * @param {jQuery} $element Element containing the error message
+ */
+
 /* Static methods */
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6002d9870d2b38275245fbf48f0e19b57c41de01
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] lists: extend check_smtp check to TLS as well - change (operations/puppet)

2015-10-05 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: lists: extend check_smtp check to TLS as well
..

lists: extend check_smtp check to TLS as well

Similar to role::mail::mx. This also alerts for the certificate's
expiry.

Change-Id: I14613d596866882e0497f5b3cae0096621953a01
---
M manifests/role/lists.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/243706/1

diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp
index 97018ab..7fcccae 100644
--- a/manifests/role/lists.pp
+++ b/manifests/role/lists.pp
@@ -72,7 +72,7 @@
 
 monitoring::service { 'smtp':
 description   => 'Exim SMTP',
-check_command => 'check_smtp',
+check_command => 'check_smtp_tls',
 }
 
 monitoring::service { 'https':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14613d596866882e0497f5b3cae0096621953a01
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] graphite-web: fix incorrect variable name introduced in I1e4... - change (operations/puppet)

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

Change subject: graphite-web: fix incorrect variable name introduced in 
I1e41e6e3
..


graphite-web: fix incorrect variable name introduced in I1e41e6e3

REMOTE_USER_AUTHENTICATION -> USE_REMOTE_USER_AUTHENTICATION

Change-Id: Iaa903b411791be10ca89e32b48239b2e3631e10a
---
M modules/graphite/templates/local_settings.py.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/graphite/templates/local_settings.py.erb 
b/modules/graphite/templates/local_settings.py.erb
index 846879a..69131a1 100644
--- a/modules/graphite/templates/local_settings.py.erb
+++ b/modules/graphite/templates/local_settings.py.erb
@@ -15,7 +15,7 @@
 SECRET_KEY = '<%= @secret_key %>'
 DOCUMENTATION_URL = '<%= @documentation_url %>'
 DEFAULT_CACHE_DURATION = 120
-REMOTE_USER_AUTHENTICATION = <%= @remote_user_auth ? 'True' : 'False' %>
+USE_REMOTE_USER_AUTHENTICATION = <%= @remote_user_auth ? 'True' : 'False' %>
 
 
 ## Logging

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa903b411791be10ca89e32b48239b2e3631e10a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] graphite-web: fix incorrect variable name introduced in I1e4... - change (operations/puppet)

2015-10-05 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: graphite-web: fix incorrect variable name introduced in 
I1e41e6e3
..

graphite-web: fix incorrect variable name introduced in I1e41e6e3

REMOTE_USER_AUTHENTICATION -> USE_REMOTE_USER_AUTHENTICATION

Change-Id: Iaa903b411791be10ca89e32b48239b2e3631e10a
---
M modules/graphite/templates/local_settings.py.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/243710/1

diff --git a/modules/graphite/templates/local_settings.py.erb 
b/modules/graphite/templates/local_settings.py.erb
index 846879a..69131a1 100644
--- a/modules/graphite/templates/local_settings.py.erb
+++ b/modules/graphite/templates/local_settings.py.erb
@@ -15,7 +15,7 @@
 SECRET_KEY = '<%= @secret_key %>'
 DOCUMENTATION_URL = '<%= @documentation_url %>'
 DEFAULT_CACHE_DURATION = 120
-REMOTE_USER_AUTHENTICATION = <%= @remote_user_auth ? 'True' : 'False' %>
+USE_REMOTE_USER_AUTHENTICATION = <%= @remote_user_auth ? 'True' : 'False' %>
 
 
 ## Logging

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa903b411791be10ca89e32b48239b2e3631e10a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] apache: remove wikimedia.xyz redirect - change (operations/puppet)

2015-10-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: apache: remove wikimedia.xyz redirect
..


apache: remove wikimedia.xyz redirect

This domain has been deactived in I33fd1180204f1caf239
so there should be no traffic anymore.

Bug:T92547
Change-Id: I94637a75d0a38fa23f76bbc512231b6d5a5b80ca
---
M modules/mediawiki/files/apache/sites/redirects.conf
M modules/mediawiki/files/apache/sites/redirects/redirects.dat
2 files changed, 0 insertions(+), 11 deletions(-)

Approvals:
  RobH: Looks good to me, but someone else must approve
  John F. Lewis: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/mediawiki/files/apache/sites/redirects.conf 
b/modules/mediawiki/files/apache/sites/redirects.conf
index 412c374..f866f9f 100644
--- a/modules/mediawiki/files/apache/sites/redirects.conf
+++ b/modules/mediawiki/files/apache/sites/redirects.conf
@@ -203,8 +203,6 @@
ServerAlias *.wikimedia.community
ServerAlias wikimedia.us
ServerAlias *.wikimedia.us
-   ServerAlias wikimedia.xyz
-   ServerAlias *.wikimedia.xyz
ServerAlias tartupeedia.ee
ServerAlias *.tartupeedia.ee
ServerAlias indiawikipedia.com
@@ -1522,12 +1520,6 @@
RewriteRule . %{ENV:RW_PROTO}://www.wikimedia.org/ [R=301,L,NE]
# funnel*wikimedia.us   //www.wikimedia.org
RewriteCond %{HTTP_HOST} ^(.+)\.wikimedia\.us$
-   RewriteRule . %{ENV:RW_PROTO}://www.wikimedia.org/ [R=301,L,NE]
-   # funnel*wikimedia.xyz  //www.wikimedia.org
-   RewriteCond %{HTTP_HOST} =wikimedia.xyz
-   RewriteRule . %{ENV:RW_PROTO}://www.wikimedia.org/ [R=301,L,NE]
-   # funnel*wikimedia.xyz  //www.wikimedia.org
-   RewriteCond %{HTTP_HOST} ^(.+)\.wikimedia\.xyz$
RewriteRule . %{ENV:RW_PROTO}://www.wikimedia.org/ [R=301,L,NE]
# funnel*tartupeedia.ee 
//et.wikipedia.org/wiki/Portaal:Tartupeedia
RewriteCond %{HTTP_HOST} =tartupeedia.ee
diff --git a/modules/mediawiki/files/apache/sites/redirects/redirects.dat 
b/modules/mediawiki/files/apache/sites/redirects/redirects.dat
index 7ad29f1..57ce85a 100644
--- a/modules/mediawiki/files/apache/sites/redirects/redirects.dat
+++ b/modules/mediawiki/files/apache/sites/redirects/redirects.dat
@@ -439,9 +439,6 @@
 # wikimedia.us redirect
 funnel *wikimedia.us   //www.wikimedia.org
 
-# wikimedia.xyz redirect
-funnel *wikimedia.xyz  //www.wikimedia.org
-
 # tartupeedia.ee (WMEE-owned domain) - T46893
 funnel *tartupeedia.ee //et.wikipedia.org/wiki/Portaal:Tartupeedia
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94637a75d0a38fa23f76bbc512231b6d5a5b80ca
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: John F. Lewis 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [WIP] Article placeholder appear in search - change (mediawiki...ArticlePlaceholder)

2015-10-05 Thread Lucie Kaffee (Code Review)
Lucie Kaffee has uploaded a new change for review.

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

Change subject: [WIP] Article placeholder appear in search
..

[WIP] Article placeholder appear in search

Make the article placeholder appear in the search.
Very much work in progress

Bug: T109438
Change-Id: Icc359c5c5cbaad4fd628f54d3263e01d124e427a
---
M ArticlePlaceholder.php
M i18n/en.json
M i18n/qqq.json
A includes/SearchArticlePlaceholder.php
4 files changed, 122 insertions(+), 2 deletions(-)


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

diff --git a/ArticlePlaceholder.php b/ArticlePlaceholder.php
index 2d7e10c..b25a777 100644
--- a/ArticlePlaceholder.php
+++ b/ArticlePlaceholder.php
@@ -29,7 +29,9 @@
 
 $wgAutoloadClasses['ArticlePlaceholder\Specials\SpecialFancyUnicorn'] = $dir . 
'/Specials/SpecialFancyUnicorn.php';
 $wgAutoloadClasses['ArticlePlaceholder\Hooks'] = __DIR__ . 
'/includes/Hooks.php';
+$wgAutoloadClasses['ArticlePlaceholder\SearchArticlePlaceholder'] = __DIR__ . 
'/includes/SearchArticlePlaceholder.php';
 $wgHooks['ScribuntoExternalLibraryPaths'][] = 
'\ArticlePlaceholder\Hooks::registerScribuntoExternalLibraryPaths';
+$wgHooks['SpecialSearchResultsAppend'][] = 
'\ArticlePlaceholder\SearchArticlePlaceholder::onSpecialSearchResultsAppend';
 
 $wgMessagesDirs[ 'ArticlePlaceholder' ] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['ArticlePlaceholderAliases'] = __DIR__ . 
'/ArticlePlaceholder.alias.php';
diff --git a/i18n/en.json b/i18n/en.json
index 2d8890d..3cb1bf4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,5 +9,6 @@
"articleplaceholder-fancyunicorn": "Fancy Unicorn",
"articleplaceholder-fancyunicorn-intro": "This is the SpecialPage Fancy 
Unicorn of the ArticlePlaceholder extension. Much fancy, very unicorn. (so 
exciting)",
"articleplaceholder-fancyunicorn-entityid": "Enter a entity ID to get a 
auto generated Article Placeholder.",
-   "articleplaceholder-fancyunicorn-submit": "craft"
+   "articleplaceholder-fancyunicorn-submit": "craft",
+   "articleplaceholder-search-header": "Results in Article Placeholder"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7c111f0..da56fda 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -9,5 +9,6 @@
"articleplaceholder-fancyunicorn": "Title of SpecialFancyUnicorn.",
"articleplaceholder-fancyunicorn-intro": "Intro paragraph shown on 
SpecialFancyUnicorn.",
"articleplaceholder-fancyunicorn-entityid": "Text to encourage the user 
to enter an entity id.",
-   "articleplaceholder-fancyunicorn-submit": "Label on the submit button."
+   "articleplaceholder-fancyunicorn-submit": "Label on the submit button.",
+   "articleplaceholder-search-header": "Header in the search for the 
results of ArticlePlacholder Extension"
 }
diff --git a/includes/SearchArticlePlaceholder.php 
b/includes/SearchArticlePlaceholder.php
new file mode 100644
index 000..0eaffbe
--- /dev/null
+++ b/includes/SearchArticlePlaceholder.php
@@ -0,0 +1,116 @@
+getStore()->getTermIndex()
+   );
+   }
+
+   /**
+* @var TermIndex
+*/
+   private $termIndex;
+
+   public function __construct( TermIndex $termIndex ) {
+   $this->termIndex = $termIndex;
+   }
+
+   /**
+*
+* @param SpecialSearch $specialSearch
+* @param OutputPage $output
+* @param Array $term
+* @return boolean
+*/
+   public static function onSpecialSearchResultsAppend( $specialSearch, 
$output, $term ) {
+   $self = self::newFromGlobalState();
+   $self->addToSearch( $specialSearch, $output, $term );
+   return true;
+   }
+
+   /**
+*
+* @param SpecialSearch $specialSearch
+* @param OutputPage $output
+* @param string $term
+*/
+   public function addToSearch( SpecialSearch $specialSearch, OutputPage 
$output, $term ) {
+   //$termIndexEntries = $this->termIndex->getTopMatchingTerms(
+   //  array( $this->makeTermIndexEntryTemplate( $term, 
$this->getLanguage(), 'item' )),
+   //  array( 'item' ),
+   //  array(TermIndexEntry::TYPE_LABEL, 
TermIndexEntry::TYPE_ALIAS)
+   //);
+   //foreach ( $termIndexEntries as $termIndexEntry ) {
+   //  $output->addHTML( $termIndexEntry->getEntityId() );
+   //}
+   $output->addWikiText( $term );
+   $this->showSearchHeader( $output );
+   $output->addHTML( "Type:" . getType( $term ) );
+   }
+
+   private function showSearchHeader( OutputPage $output ) {
+   $header = wfMessage( 'articleplaceholder-search-header' );
+   $output->addWikiText( "==" . $header . "==" );
+   }
+
+   /**
+  

[MediaWiki-commits] [Gerrit] elasticsearch: Set nobelium cluster name explicitly - change (operations/puppet)

2015-10-05 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: elasticsearch: Set nobelium cluster name explicitly
..

elasticsearch: Set nobelium cluster name explicitly

To prevent it from trying to join the other cluster

Change-Id: I1326a2f6f7a1e042c042e8252568ea294d72be02
---
M hieradata/hosts/nobelium.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/243722/1

diff --git a/hieradata/hosts/nobelium.yaml b/hieradata/hosts/nobelium.yaml
index f2031a6..acba835 100644
--- a/hieradata/hosts/nobelium.yaml
+++ b/hieradata/hosts/nobelium.yaml
@@ -3,3 +3,4 @@
 
 elasticsearch::master_eligible: true
 elasticsearch::minimum_master_nodes: 1
+elasticsearch::cluster_name: labsearch

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

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

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


[MediaWiki-commits] [Gerrit] Enable setting default payment method - change (mediawiki...DonationInterface)

2015-10-05 Thread Cdentinger (Code Review)
Cdentinger has uploaded a new change for review.

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

Change subject: Enable setting default payment method
..

Enable setting default payment method

There's probably a better way to do this

Bug: T112946
Change-Id: I1da07fdf3fb81bf8a41f3306a39d10bcc3f531a4
---
M gateway_common/gateway.adapter.php
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 619bd77..9717fa8 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -402,6 +402,12 @@
// FIXME: this should not have side effects like setting 
order_id_meta['final']
$this->dataObj = new DonationData( $this, 
$options['external_data'] );
 
+   if ( ! $wgRequest->getVal( 'payment_method' ) ) {
+   $this->addRequestData( array(
+   'payment_method' => self::getGlobal( 
'DefaultPaymentMethod' )
+   ) );
+   }
+
$this->setValidationErrors( 
$this->getOriginalValidationErrors() );
 
$this->unstaged_data = $this->dataObj->getDataEscaped();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1da07fdf3fb81bf8a41f3306a39d10bcc3f531a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Cdentinger 

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


[MediaWiki-commits] [Gerrit] Remove UsageTracker::removeEntities and all implementations - change (mediawiki...Wikibase)

2015-10-05 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Remove UsageTracker::removeEntities and all implementations
..

Remove UsageTracker::removeEntities and all implementations

Unused, also we don't plan to unlink deleted entities.

Bug: 114654
Change-Id: Id126d968987d2e0aa39539a876276d74a9fe0e70
---
M client/includes/Usage/NullUsageTracker.php
M client/includes/Usage/Sql/EntityUsageTable.php
M client/includes/Usage/Sql/SqlUsageTracker.php
M client/includes/Usage/UsageTracker.php
M client/tests/phpunit/includes/Usage/Sql/EntityUsageTableTest.php
M client/tests/phpunit/includes/Usage/Sql/SqlUsageTrackerTest.php
M client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php
7 files changed, 0 insertions(+), 160 deletions(-)


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

diff --git a/client/includes/Usage/NullUsageTracker.php 
b/client/includes/Usage/NullUsageTracker.php
index 893efc9..58b2789 100644
--- a/client/includes/Usage/NullUsageTracker.php
+++ b/client/includes/Usage/NullUsageTracker.php
@@ -38,15 +38,6 @@
}
 
/**
-* @see UsageTracker::removeEntities
-*
-* @param EntityId[] $entityIds
-*/
-   public function removeEntities( array $entityIds ) {
-   // no-op
-   }
-
-   /**
 * @see UsageTracker::getUsagesForPage
 *
 * @param int $pageId
diff --git a/client/includes/Usage/Sql/EntityUsageTable.php 
b/client/includes/Usage/Sql/EntityUsageTable.php
index 72bbcc1..4a4cf36 100644
--- a/client/includes/Usage/Sql/EntityUsageTable.php
+++ b/client/includes/Usage/Sql/EntityUsageTable.php
@@ -333,36 +333,6 @@
}
 
/**
-* Removes usage tracking for the given set of entities.
-* This is used typically when entities were deleted.
-*
-* @see UsageTracker::removeEntities
-*
-* @param EntityId[] $entityIds
-*/
-   public function removeEntities( array $entityIds ) {
-   if ( empty( $entityIds ) ) {
-   return;
-   }
-
-   $idStrings = $this->getEntityIdStrings( $entityIds );
-
-   $batches = array_chunk( $idStrings, $this->batchSize );
-
-   foreach ( $batches as $batch ) {
-   $this->connection->begin( __METHOD__ );
-   $this->connection->delete(
-   $this->tableName,
-   array(
-   'eu_entity_id' => $batch,
-   ),
-   __METHOD__
-   );
-   $this->connection->commit( __METHOD__ );
-   }
-   }
-
-   /**
 * @see UsageLookup::getPagesUsing
 *
 * @param EntityId[] $entityIds
diff --git a/client/includes/Usage/Sql/SqlUsageTracker.php 
b/client/includes/Usage/Sql/SqlUsageTracker.php
index a72aba1..710f929 100644
--- a/client/includes/Usage/Sql/SqlUsageTracker.php
+++ b/client/includes/Usage/Sql/SqlUsageTracker.php
@@ -192,39 +192,6 @@
}
 
/**
-* @see UsageTracker::removeEntities
-*
-* @param EntityId[] $entityIds
-*
-* @throws UsageTrackerException
-* @throws Exception
-*/
-   public function removeEntities( array $entityIds ) {
-   if ( empty( $entityIds ) ) {
-   return;
-   }
-
-   // NOTE: while logically we'd like the below to be atomic, we 
don't wrap it in a
-   // transaction to prevent long lock retention during big 
updates.
-   $db = $this->connectionManager->getWriteConnection();
-
-   try {
-   $usageTable = $this->newUsageTable( $db );
-   $usageTable->removeEntities( $entityIds );
-
-   $this->connectionManager->releaseConnection( $db );
-   } catch ( Exception $ex ) {
-   $this->connectionManager->releaseConnection( $db );
-
-   if ( $ex instanceof DBError ) {
-   throw new UsageTrackerException( 
$ex->getMessage(), $ex->getCode(), $ex );
-   } else {
-   throw $ex;
-   }
-   }
-   }
-
-   /**
 * @see UsageLookup::getUsagesForPage
 *
 * @param int $pageId
diff --git a/client/includes/Usage/UsageTracker.php 
b/client/includes/Usage/UsageTracker.php
index b166e95..b593b87 100644
--- a/client/includes/Usage/UsageTracker.php
+++ b/client/includes/Usage/UsageTracker.php
@@ -41,15 +41,4 @@
 */
public function pruneStaleUsages( $pageId, $lastUpdatedBefore );
 
-   /**
-* Removes 

[MediaWiki-commits] [Gerrit] Revert OCSP stapling to roles mail::mx and lists - change (operations/puppet)

2015-10-05 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: Revert OCSP stapling to roles mail::mx and lists
..

Revert OCSP stapling to roles mail::mx and lists

Apparently this is buggy with jessie's version of GnuTLS and makes exim4
send the status TLS extension even when not requested, breaking most
clients in the process. Newer versions of exim4 (4.87+) even blacklist
those buggy GnuTLS versions and refuse to enable OCSP.

Exim bug #1664 has the gory details and links to upstream commit fixes:
https://bugs.exim.org/show_bug.cgi?id=1664

This reverts commits:
  - 9614ed8ae40b0ac95ea8831960e3d2dfd81e9212
  - 2fae676c247ed6f1532ed608456598e0da3cce1c

Change-Id: If1f469dc32fbb44b0b0242ab2822d9129f410774
---
M manifests/role/lists.pp
M manifests/role/mail.pp
M templates/exim/exim4.conf.mailman.erb
M templates/exim/exim4.conf.mx.erb
4 files changed, 0 insertions(+), 10 deletions(-)


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

diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp
index 82c0b8c..97018ab 100644
--- a/manifests/role/lists.pp
+++ b/manifests/role/lists.pp
@@ -30,10 +30,6 @@
 group => 'Debian-exim',
 }
 
-sslcert::ocsp::conf { 'lists.wikimedia.org':
-before => Class['exim4'],
-}
-
 include mailman
 
 class { 'spamassassin':
diff --git a/manifests/role/mail.pp b/manifests/role/mail.pp
index 3c0f4f5..e3ef8c7 100644
--- a/manifests/role/mail.pp
+++ b/manifests/role/mail.pp
@@ -28,10 +28,6 @@
 before => Class['exim4'],
 }
 
-sslcert::ocsp::conf { 'mail.wikimedia.org':
-before => Class['exim4'],
-}
-
 class { 'spamassassin':
 required_score   => '4.0',
 use_bayes=> '1',
diff --git a/templates/exim/exim4.conf.mailman.erb 
b/templates/exim/exim4.conf.mailman.erb
index 0b267fc..abb4454 100644
--- a/templates/exim/exim4.conf.mailman.erb
+++ b/templates/exim/exim4.conf.mailman.erb
@@ -68,7 +68,6 @@
 # TLS
 tls_certificate = /etc/ssl/localcerts/lists.wikimedia.org.chained.crt
 tls_privatekey = /etc/ssl/private/lists.wikimedia.org.key
-tls_ocsp_file = /var/cache/ocsp/lists.wikimedia.org.ocsp
 tls_advertise_hosts = *
 
 # force Gmail over IPv4 due to reports of bad spam reputation over IPv6
diff --git a/templates/exim/exim4.conf.mx.erb b/templates/exim/exim4.conf.mx.erb
index 8e7ff18..4fc0618 100644
--- a/templates/exim/exim4.conf.mx.erb
+++ b/templates/exim/exim4.conf.mx.erb
@@ -84,7 +84,6 @@
 # TLS
 tls_certificate = /etc/ssl/localcerts/mail.wikimedia.org.chained.crt
 tls_privatekey = /etc/ssl/private/mail.wikimedia.org.key
-tls_ocsp_file = /var/cache/ocsp/mail.wikimedia.org.ocsp
 tls_advertise_hosts = *
 
 # force Gmail over IPv4 due to reports of bad spam reputation over IPv6

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1f469dc32fbb44b0b0242ab2822d9129f410774
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] lists: extend check_smtp check to TLS as well - change (operations/puppet)

2015-10-05 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: lists: extend check_smtp check to TLS as well
..


lists: extend check_smtp check to TLS as well

Similar to role::mail::mx. This also alerts for the certificate's
expiry.

Change-Id: I14613d596866882e0497f5b3cae0096621953a01
---
M manifests/role/lists.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp
index 97018ab..7fcccae 100644
--- a/manifests/role/lists.pp
+++ b/manifests/role/lists.pp
@@ -72,7 +72,7 @@
 
 monitoring::service { 'smtp':
 description   => 'Exim SMTP',
-check_command => 'check_smtp',
+check_command => 'check_smtp_tls',
 }
 
 monitoring::service { 'https':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14613d596866882e0497f5b3cae0096621953a01
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Split module mediawiki.skinning.interface into three differe... - change (mediawiki/core)

2015-10-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Split module mediawiki.skinning.interface into three different 
modules
..

Split module mediawiki.skinning.interface into three different modules

Kept module mediawiki.skinning.interface since some skins want to use the
three css files without having to add dependance on three other modules.

Add new modules

mediawiki.skinning.interface.elements

mediawiki.skinning.interface.content

mediawiki.skinning.interface.interface

Bluesky currently is broken please see
https://gerrit.wikimedia.org/r/#/c/241471/

Change-Id: I1adba23a20d8a62d13180ff8047c63035533bda5
---
M resources/Resources.php
1 file changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/243719/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 9affe26..fd11ef4 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -114,6 +114,33 @@
),
),
 
+   // Bug: T114695
+   'mediawiki.skinning.interface.elements' => array(
+   'position' => 'top',
+   'class' => 'ResourceLoaderSkinModule',
+   'styles' => array(
+   'resources/src/mediawiki.skinning/elements.css' => 
array( 'media' => 'screen' ),
+   ),
+   ),
+
+   // Bug: T114695
+   'mediawiki.skinning.interface.content' => array(
+   'position' => 'top',
+   'class' => 'ResourceLoaderSkinModule',
+   'styles' => array(
+   'resources/src/mediawiki.skinning/content.css' => 
array( 'media' => 'screen' ),
+   ),
+   ),
+
+   // Bug: T114695
+   'mediawiki.skinning.interface.interface' => array(
+   'position' => 'top',
+   'class' => 'ResourceLoaderSkinModule',
+   'styles' => array(
+   'resources/src/mediawiki.skinning/interface.css' => 
array( 'media' => 'screen' ),
+   ),
+   ),
+
'mediawiki.skinning.content.parsoid' => array(
'position' => 'top',
// Style Parsoid HTML+RDFa output consistent with wikitext from 
PHP parser

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1adba23a20d8a62d13180ff8047c63035533bda5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] Use a DISTINCT query in EntityUsageTable::getUsedEntityIdStr... - change (mediawiki...Wikibase)

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

Change subject: Use a DISTINCT query in EntityUsageTable::getUsedEntityIdStrings
..


Use a DISTINCT query in EntityUsageTable::getUsedEntityIdStrings

Otherwise this might return a lot of rows, leading to
out of memory errors.

Bug: T114656
Change-Id: I170051eeba9980b4da8d3cd3e1be85ba8bba73ea
---
M client/includes/Usage/Sql/EntityUsageTable.php
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/client/includes/Usage/Sql/EntityUsageTable.php 
b/client/includes/Usage/Sql/EntityUsageTable.php
index 72bbcc1..d0a2295 100644
--- a/client/includes/Usage/Sql/EntityUsageTable.php
+++ b/client/includes/Usage/Sql/EntityUsageTable.php
@@ -84,7 +84,7 @@
}
 
$rowIds = $this->getAffectedRowIds( $pageId, $usages );
-   $batches  = array_chunk( $rowIds, $this->batchSize );
+   $batches = array_chunk( $rowIds, $this->batchSize );
 
foreach ( $batches as $batch ) {
$this->touchUsageBatch( $batch, $touched );
@@ -462,7 +462,8 @@
$this->tableName,
array( 'eu_entity_id' ),
$where,
-   __METHOD__
+   __METHOD__,
+   array( 'DISTINCT' )
);
 
return $this->extractProperty( $res, 'eu_entity_id' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I170051eeba9980b4da8d3cd3e1be85ba8bba73ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Rename nav menu "More" item to "Settings" - change (apps...wikipedia)

2015-10-05 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Rename nav menu "More" item to "Settings"
..

Rename nav menu "More" item to "Settings"

Bug: T108532
Change-Id: I9f1cc1cd47518a835c4a121ed35e306ed3df0ff1
---
M app/src/main/AndroidManifest.xml
M app/src/main/res/menu/menu_nav_drawer.xml
M app/src/main/res/values-af/strings.xml
M app/src/main/res/values-ak/strings.xml
M app/src/main/res/values-ar/strings.xml
M app/src/main/res/values-av/strings.xml
M app/src/main/res/values-bn/strings.xml
M app/src/main/res/values-br/strings.xml
M app/src/main/res/values-ca/strings.xml
M app/src/main/res/values-ce/strings.xml
M app/src/main/res/values-cs/strings.xml
M app/src/main/res/values-cu/strings.xml
M app/src/main/res/values-da/strings.xml
M app/src/main/res/values-de/strings.xml
M app/src/main/res/values-el/strings.xml
M app/src/main/res/values-eo/strings.xml
M app/src/main/res/values-es/strings.xml
M app/src/main/res/values-et/strings.xml
M app/src/main/res/values-eu/strings.xml
M app/src/main/res/values-fa/strings.xml
M app/src/main/res/values-fi/strings.xml
M app/src/main/res/values-fo/strings.xml
M app/src/main/res/values-fr/strings.xml
M app/src/main/res/values-gl/strings.xml
M app/src/main/res/values-gu/strings.xml
M app/src/main/res/values-hi/strings.xml
M app/src/main/res/values-hu/strings.xml
M app/src/main/res/values-ia/strings.xml
M app/src/main/res/values-in/strings.xml
M app/src/main/res/values-it/strings.xml
M app/src/main/res/values-iw/strings.xml
M app/src/main/res/values-ja/strings.xml
M app/src/main/res/values-ji/strings.xml
M app/src/main/res/values-ka/strings.xml
M app/src/main/res/values-km/strings.xml
M app/src/main/res/values-kn/strings.xml
M app/src/main/res/values-ko/strings.xml
M app/src/main/res/values-ku/strings.xml
M app/src/main/res/values-kw/strings.xml
M app/src/main/res/values-ky/strings.xml
M app/src/main/res/values-lb/strings.xml
M app/src/main/res/values-lt/strings.xml
M app/src/main/res/values-lv/strings.xml
M app/src/main/res/values-mk/strings.xml
M app/src/main/res/values-ml/strings.xml
M app/src/main/res/values-mr/strings.xml
M app/src/main/res/values-ms/strings.xml
M app/src/main/res/values-mt/strings.xml
M app/src/main/res/values-nb/strings.xml
M app/src/main/res/values-ne/strings.xml
M app/src/main/res/values-nl/strings.xml
M app/src/main/res/values-oc/strings.xml
M app/src/main/res/values-om/strings.xml
M app/src/main/res/values-or/strings.xml
M app/src/main/res/values-pa/strings.xml
M app/src/main/res/values-pl/strings.xml
M app/src/main/res/values-ps/strings.xml
M app/src/main/res/values-pt-rBR/strings.xml
M app/src/main/res/values-pt/strings.xml
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values-ro/strings.xml
M app/src/main/res/values-ru/strings.xml
M app/src/main/res/values-sa/strings.xml
M app/src/main/res/values-si/strings.xml
M app/src/main/res/values-sk/strings.xml
M app/src/main/res/values-sr/strings.xml
M app/src/main/res/values-sv/strings.xml
M app/src/main/res/values-sw/strings.xml
M app/src/main/res/values-ta/strings.xml
M app/src/main/res/values-te/strings.xml
M app/src/main/res/values-th/strings.xml
M app/src/main/res/values-tl/strings.xml
M app/src/main/res/values-tr/strings.xml
M app/src/main/res/values-uk/strings.xml
M app/src/main/res/values-uz/strings.xml
M app/src/main/res/values-vi/strings.xml
M app/src/main/res/values-zh-rTW/strings.xml
M app/src/main/res/values-zh/strings.xml
M app/src/main/res/values/strings.xml
79 files changed, 6 insertions(+), 164 deletions(-)


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

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 529f5f9..dc90734 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -72,7 +72,7 @@
   android:exported="false"
 />
 
diff --git a/app/src/main/res/menu/menu_nav_drawer.xml 
b/app/src/main/res/menu/menu_nav_drawer.xml
index a7482c2..04a0b88 100644
--- a/app/src/main/res/menu/menu_nav_drawer.xml
+++ b/app/src/main/res/menu/menu_nav_drawer.xml
@@ -42,7 +42,7 @@
 
 
 
 
 
\ No newline at end of file
diff --git a/app/src/main/res/values-af/strings.xml 
b/app/src/main/res/values-af/strings.xml
index 61be90e..e677787 100644
--- a/app/src/main/res/values-af/strings.xml
+++ b/app/src/main/res/values-af/strings.xml
@@ -155,8 +155,6 @@
   Hierdie blad is beskerm tot die volgende 
vlakke: %s
   U het nie die regte om hierdie 
blad te wysig nie
   Hierdie blad is 
beskerm
-  Meer
-  Meer
   Aangaande Wikipedia toep
   Privaatheidsbeleid
   Gebruiksvoorwaardes
diff --git a/app/src/main/res/values-ak/strings.xml 
b/app/src/main/res/values-ak/strings.xml
index 8cfe11c..37221a0 100644
--- a/app/src/main/res/values-ak/strings.xml
+++ b/app/src/main/res/values-ak/strings.xml
@@ -113,8 +113,6 @@

[MediaWiki-commits] [Gerrit] ve.ui.MWParameterPage: Use more natural DOM order for text f... - change (mediawiki...VisualEditor)

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

Change subject: ve.ui.MWParameterPage: Use more natural DOM order for text 
field and buttons
..


ve.ui.MWParameterPage: Use more natural DOM order for text field and buttons

OO.ui.BookletLayout does not respect tabindices when trying to focus
the first focusable element after a page is switched. Remove the need
for manually set tabindices in ve.ui.MWTemplateDialog by using natural
DOM order and absolutely positioning things to keep current design.

Bug: T114562
Change-Id: I7a18a455f9fa80eb3d2ea17bff8139e0194c0fbf
(cherry picked from commit 205beb2b498e6b3ec1e8b149a573fb3b32de1da0)
---
M modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
M modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
M modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css
3 files changed, 5 insertions(+), 19 deletions(-)

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
index f665c62..8e55a0a 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
@@ -213,22 +213,6 @@
} else {
this.onAddParameterBeforeLoad( page );
}
-
-   // Recalculate tab indexes
-   this.$body.find( '.ve-ui-mwParameterPage' ).each( function ( index ) {
-   $( this )
-   .find( '.ve-ui-mwParameterPage-field > 
.oo-ui-textInputWidget > textarea' )
-   .attr( 'tabindex', index * 3 + 1 )
-   .end()
-   .find( '.ve-ui-mwParameterPage-infoButton > a' )
-   .attr( 'tabindex', index * 3 + 2 )
-   .end()
-   .find( '.ve-ui-mwParameterPage-removeButton > a' )
-   .attr( 'tabindex', index * 3 + 3 )
-   .end()
-   .find( '.ve-ui-mwParameterPage-more a' )
-   .attr( 'tabindex', index * 3 + 4 );
-   } );
 };
 
 /**
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
index b852e87..569641c 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
@@ -110,7 +110,7 @@
.focus( this.onAddButtonFocus.bind( this ) );
this.$element
.addClass( 've-ui-mwParameterPage' )
-   .append( this.$info, this.$actions, this.$field, this.$more );
+   .append( this.$info, this.$field, this.$actions, this.$more );
this.$description
.addClass( 've-ui-mwParameterPage-description' )
.append( $( '' ).text( this.spec.getParameterDescription( 
paramName ) || '' ) );
diff --git a/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css 
b/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css
index 44baaf3..e323dbd 100644
--- a/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css
+++ b/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css
@@ -8,6 +8,7 @@
 .ve-ui-mwParameterPage.oo-ui-pageLayout {
padding-top: 0;
padding-bottom: 0;
+   position: relative;
 }
 
 .ve-ui-mwParameterPage.oo-ui-pageLayout:last-of-type {
@@ -29,9 +30,10 @@
 }
 
 .ve-ui-mwParameterPage-actions {
-   float: right;
cursor: default;
-   padding-right: 2.5em;
+   position: absolute;
+   top: 0;
+   right: 4em; /* 1.5em for PanelLayout's padding + 2.5em */
width: 20%;
text-align: right;
-webkit-box-sizing: border-box;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a18a455f9fa80eb3d2ea17bff8139e0194c0fbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.27.0-wmf.1
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mail: add OCSP stapling to role::mail::mx - change (operations/puppet)

2015-10-05 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: mail: add OCSP stapling to role::mail::mx
..


mail: add OCSP stapling to role::mail::mx

Change-Id: I36e5e1173aa008526c86a7a9f5a8a2c3dbaed369
---
M manifests/role/mail.pp
M templates/exim/exim4.conf.mx.erb
2 files changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/mail.pp b/manifests/role/mail.pp
index e3ef8c7..3c0f4f5 100644
--- a/manifests/role/mail.pp
+++ b/manifests/role/mail.pp
@@ -28,6 +28,10 @@
 before => Class['exim4'],
 }
 
+sslcert::ocsp::conf { 'mail.wikimedia.org':
+before => Class['exim4'],
+}
+
 class { 'spamassassin':
 required_score   => '4.0',
 use_bayes=> '1',
diff --git a/templates/exim/exim4.conf.mx.erb b/templates/exim/exim4.conf.mx.erb
index 4fc0618..8e7ff18 100644
--- a/templates/exim/exim4.conf.mx.erb
+++ b/templates/exim/exim4.conf.mx.erb
@@ -84,6 +84,7 @@
 # TLS
 tls_certificate = /etc/ssl/localcerts/mail.wikimedia.org.chained.crt
 tls_privatekey = /etc/ssl/private/mail.wikimedia.org.key
+tls_ocsp_file = /var/cache/ocsp/mail.wikimedia.org.ocsp
 tls_advertise_hosts = *
 
 # force Gmail over IPv4 due to reports of bad spam reputation over IPv6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36e5e1173aa008526c86a7a9f5a8a2c3dbaed369
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Faidon Liambotis 
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 GM engine from thumbor role - change (mediawiki/vagrant)

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

Change subject: Remove GM engine from thumbor role
..


Remove GM engine from thumbor role

It takes forever to install (would require an even higher timeout)
and isn't used unless activated in thumbor's config.

Also adds missing dependency and increases the timeout, which is
still necessary when provisioning from scratch, even without the
GM engine.

Change-Id: I3aab7b6e55bc868b4ac51e4b7574d36cf72bd707
---
M puppet/modules/thumbor/manifests/init.pp
M puppet/modules/virtualenv/manifests/environment.pp
M puppet/modules/wmflib/lib/puppet/parser/functions/require_package.rb
3 files changed, 11 insertions(+), 2 deletions(-)

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



diff --git a/puppet/modules/thumbor/manifests/init.pp 
b/puppet/modules/thumbor/manifests/init.pp
index e7f519a..cbdee86 100644
--- a/puppet/modules/thumbor/manifests/init.pp
+++ b/puppet/modules/thumbor/manifests/init.pp
@@ -38,8 +38,12 @@
 'cv2',
 'numpy',
 'opencv-engine',
-'graphicsmagick-engine',
 ],
+require  => [
+Package['libjpeg-progs'],
+Package['python-opencv'],
+],
+timeout  => 600, # This venv can be particularly long to download and 
setup
 }
 
 # Hack because pip install cv2 inside a virtualenv is broken
diff --git a/puppet/modules/virtualenv/manifests/environment.pp 
b/puppet/modules/virtualenv/manifests/environment.pp
index 1a04492..5f78f64 100644
--- a/puppet/modules/virtualenv/manifests/environment.pp
+++ b/puppet/modules/virtualenv/manifests/environment.pp
@@ -25,12 +25,16 @@
 # [*group*]
 #   Group owner of the environment directory and created files.
 #
+# [*timeout*]
+#   Timeout for the command creating the environment.
+#
 define virtualenv::environment (
 $packages,
 $dir   = $title,
 $ensure= 'present',
 $owner = 'root',
 $group = 'root',
+$timeout   = 300,
 ) {
 require ::virtualenv
 
@@ -48,6 +52,7 @@
 user=> $owner,
 group   => $group,
 require => File[$dir],
+timeout => $timeout,
 }
 } elsif $ensure == 'absent' {
 file { $dir:
diff --git 
a/puppet/modules/wmflib/lib/puppet/parser/functions/require_package.rb 
b/puppet/modules/wmflib/lib/puppet/parser/functions/require_package.rb
index 91d69cd..cf32a7c 100644
--- a/puppet/modules/wmflib/lib/puppet/parser/functions/require_package.rb
+++ b/puppet/modules/wmflib/lib/puppet/parser/functions/require_package.rb
@@ -20,7 +20,7 @@
 module Puppet::Parser::Functions
   newfunction(:require_package, :arity => -2) do |args|
 args.each do |package_name|
-  class_name = 'packages::' + package_name.tr('-', '_')
+  class_name = 'packages::' + package_name.tr('-+', '_')
   unless compiler.topscope.find_hostclass(class_name)
 host = Puppet::Resource::Type.new(:hostclass, class_name)
 known_resource_types.add_hostclass(host)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aab7b6e55bc868b4ac51e4b7574d36cf72bd707
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gilles 
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 tests after testwiki protection has changed - change (mediawiki...mobileapps)

2015-10-05 Thread BearND (Code Review)
BearND has uploaded a new change for review.

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

Change subject: Fix tests after testwiki protection has changed
..

Fix tests after testwiki protection has changed

Change-Id: Ib361f463440f945735bf3ee7eded962377d223ec
---
M test/features/mobile-html-sections-lead/pagecontent.js
M test/features/mobile-html-sections/pagecontent.js
M test/features/mobile-html/pagecontent.js
3 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/05/243705/1

diff --git a/test/features/mobile-html-sections-lead/pagecontent.js 
b/test/features/mobile-html-sections-lead/pagecontent.js
index 3cfa06e..46b6ae2 100644
--- a/test/features/mobile-html-sections-lead/pagecontent.js
+++ b/test/features/mobile-html-sections-lead/pagecontent.js
@@ -24,8 +24,8 @@
 assert.deepEqual(res.status, 200);
 assert.ok(lead.lastmodified.startsWith('201'), 
lead.lastmodified + ' should start with 201'); // 2015-
 assert.deepEqual(lead.displaytitle, 'Test');
-//assert.deepEqual(lead.protection, {}); // TODO: not sure how 
to test for undefined
-assert.deepEqual(lead.editable, true);
+assert.deepEqual(lead.protection, 
{"edit":["autoconfirmed"],"move":["sysop"]});
+assert.deepEqual(lead.editable, false);
 assert.ok(lead.sections.length > 0, 'Expected at least one 
section element');
 assert.deepEqual(lead.sections[0].id, 0);
 assert.ok(lead.sections[0].text.length > 0, 'Expected text to 
be non-empty');
diff --git a/test/features/mobile-html-sections/pagecontent.js 
b/test/features/mobile-html-sections/pagecontent.js
index 709bffb..6f6a304 100644
--- a/test/features/mobile-html-sections/pagecontent.js
+++ b/test/features/mobile-html-sections/pagecontent.js
@@ -24,8 +24,8 @@
 assert.deepEqual(res.status, 200);
 assert.ok(lead.lastmodified.startsWith('201'), 
lead.lastmodified + ' should start with 201'); // 2015-
 assert.deepEqual(lead.displaytitle, 'Test');
-//assert.deepEqual(lead.protection, {}); // TODO: not sure how 
to test for undefined
-assert.deepEqual(lead.editable, true);
+assert.deepEqual(lead.protection, 
{"edit":["autoconfirmed"],"move":["sysop"]});
+assert.deepEqual(lead.editable, false);
 assert.ok(lead.sections.length > 0, 'Expected at least one 
section element');
 assert.deepEqual(lead.sections[0].id, 0);
 assert.ok(lead.sections[0].text.length > 0, 'Expected text to 
be non-empty');
diff --git a/test/features/mobile-html/pagecontent.js 
b/test/features/mobile-html/pagecontent.js
index d29b748..88b52b4 100644
--- a/test/features/mobile-html/pagecontent.js
+++ b/test/features/mobile-html/pagecontent.js
@@ -35,7 +35,7 @@
 var doc = domino.createDocument(res.body);
 assert.selectorExistsOnce(doc, 
'script[type="application/json"][id="mw-app-meta1"]');
 assert.selectorContainsValue(doc, 'script[id="mw-app-meta1"]',
-
'"displaytitle":"Test","protection":[],"editable":true,"toc":[{"id":0');
+
'"displaytitle":"Test","protection":{"edit":["autoconfirmed"],"move":["sysop"]},"editable":false,"toc":[{"id":0');
 
 assert.selectorExistsOnce(doc, 
'script[type="application/json"][id="mw-app-meta2"]');
 assert.selectorHasValue(doc, 'script[id="mw-app-meta2"]', '{}',
@@ -72,4 +72,4 @@
 assert.deepEqual(res.status, 200);
 });
 });
-});
\ No newline at end of file
+});

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib361f463440f945735bf3ee7eded962377d223ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 

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


[MediaWiki-commits] [Gerrit] ve.ui.MWParameterPage: Use more natural DOM order for text f... - change (mediawiki...VisualEditor)

2015-10-05 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: ve.ui.MWParameterPage: Use more natural DOM order for text 
field and buttons
..

ve.ui.MWParameterPage: Use more natural DOM order for text field and buttons

OO.ui.BookletLayout does not respect tabindices when trying to focus
the first focusable element after a page is switched. Remove the need
for manually set tabindices in ve.ui.MWTemplateDialog by using natural
DOM order and absolutely positioning things to keep current design.

Bug: T114562
Change-Id: I7a18a455f9fa80eb3d2ea17bff8139e0194c0fbf
(cherry picked from commit 205beb2b498e6b3ec1e8b149a573fb3b32de1da0)
---
M modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
M modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
M modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css
3 files changed, 5 insertions(+), 19 deletions(-)


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

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
index f665c62..8e55a0a 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
@@ -213,22 +213,6 @@
} else {
this.onAddParameterBeforeLoad( page );
}
-
-   // Recalculate tab indexes
-   this.$body.find( '.ve-ui-mwParameterPage' ).each( function ( index ) {
-   $( this )
-   .find( '.ve-ui-mwParameterPage-field > 
.oo-ui-textInputWidget > textarea' )
-   .attr( 'tabindex', index * 3 + 1 )
-   .end()
-   .find( '.ve-ui-mwParameterPage-infoButton > a' )
-   .attr( 'tabindex', index * 3 + 2 )
-   .end()
-   .find( '.ve-ui-mwParameterPage-removeButton > a' )
-   .attr( 'tabindex', index * 3 + 3 )
-   .end()
-   .find( '.ve-ui-mwParameterPage-more a' )
-   .attr( 'tabindex', index * 3 + 4 );
-   } );
 };
 
 /**
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
index b852e87..569641c 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
@@ -110,7 +110,7 @@
.focus( this.onAddButtonFocus.bind( this ) );
this.$element
.addClass( 've-ui-mwParameterPage' )
-   .append( this.$info, this.$actions, this.$field, this.$more );
+   .append( this.$info, this.$field, this.$actions, this.$more );
this.$description
.addClass( 've-ui-mwParameterPage-description' )
.append( $( '' ).text( this.spec.getParameterDescription( 
paramName ) || '' ) );
diff --git a/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css 
b/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css
index 44baaf3..e323dbd 100644
--- a/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css
+++ b/modules/ve-mw/ui/themes/default/pages/ve.ui.MWParameterPage.css
@@ -8,6 +8,7 @@
 .ve-ui-mwParameterPage.oo-ui-pageLayout {
padding-top: 0;
padding-bottom: 0;
+   position: relative;
 }
 
 .ve-ui-mwParameterPage.oo-ui-pageLayout:last-of-type {
@@ -29,9 +30,10 @@
 }
 
 .ve-ui-mwParameterPage-actions {
-   float: right;
cursor: default;
-   padding-right: 2.5em;
+   position: absolute;
+   top: 0;
+   right: 4em; /* 1.5em for PanelLayout's padding + 2.5em */
width: 20%;
text-align: right;
-webkit-box-sizing: border-box;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a18a455f9fa80eb3d2ea17bff8139e0194c0fbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.27.0-wmf.1
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] tools: Move toolswatcher into puppet - change (operations/puppet)

2015-10-05 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Move toolswatcher into puppet
..

tools: Move toolswatcher into puppet

Change-Id: I48b34f350031682891464a07d66e5c77ee3560c1
---
A modules/toollabs/files/toolwatcher
M modules/toollabs/files/toolwatcher.conf
M modules/toollabs/manifests/toolwatcher.pp
3 files changed, 53 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/243711/1

diff --git a/modules/toollabs/files/toolwatcher 
b/modules/toollabs/files/toolwatcher
new file mode 100755
index 000..35d0d50
--- /dev/null
+++ b/modules/toollabs/files/toolwatcher
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Copyright © 2013 Marc-André Pelletier 
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+cd /data/project
+export HOME=/root
+PREFIX=$(cat /etc/wmflabs-project)
+
+while true; do
+# Iterate over all service groups of this project.
+getent passwd | sed -ne "s/^$PREFIX\\.\([^:]\+\):.*\$/\\1/p;" | while read 
TOOL; do
+# If the service group's home directory doesn't exist already,
+# create it with a basic structure and especially set setgid
+# on the directories so that files created are owned by the
+# service group's group.
+if [ ! -d "$TOOL" ]; then
+logger -t toolwatcher "Creating tool $TOOL"
+
+mkdir -m u=rwx,g=rwsx,o=rx "$TOOL" "$TOOL/public_html"
+chown -R "$PREFIX.$TOOL:$PREFIX.$TOOL" "$TOOL"
+fi
+done
+
+# Sleep for two minutes.
+sleep 120
+done
diff --git a/modules/toollabs/files/toolwatcher.conf 
b/modules/toollabs/files/toolwatcher.conf
index 97ad7d9..7995022 100644
--- a/modules/toollabs/files/toolwatcher.conf
+++ b/modules/toollabs/files/toolwatcher.conf
@@ -5,4 +5,4 @@
 
 respawn
 
-exec /usr/sbin/toolwatcher
+exec /usr/local/sbin/toolwatcher
diff --git a/modules/toollabs/manifests/toolwatcher.pp 
b/modules/toollabs/manifests/toolwatcher.pp
index 35860f5..c5f86e1 100644
--- a/modules/toollabs/manifests/toolwatcher.pp
+++ b/modules/toollabs/manifests/toolwatcher.pp
@@ -3,19 +3,26 @@
 # yet.  For each such tool account, the toolwatcher creates the home
 # directory with the subdirectory public_html owned by the tool
 # account and its group and sets the permissions to g+srwx,o+rx.
-class toollabs::toolwatcher
-inherits toollabs {
-file { '/etc/init/toolwatcher.conf':
-ensure => file,
-source => 'puppet:///modules/toollabs/toolwatcher.conf',
+class toollabs::toolwatcher inherits toollabs {
+file { '/usr/local/sbin/toolwatcher':
+source => 'puppet:///modules/toollabs/toolwatcher',
 owner  => 'root',
 group  => 'root',
-mode   => '0444',
+mode   => '0555',
+}
+
+file { '/etc/init/toolwatcher.conf':
+ensure  => file,
+source  => 'puppet:///modules/toollabs/toolwatcher.conf',
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+require => File['/usr/local/sbin/toolwatcher'],
 }
 
 service { 'toolwatcher':
 ensure=> running,
 provider  => 'upstart',
-subscribe => [File['/etc/init/toolwatcher.conf'], 
Package['misctools']],
+subscribe => File['/etc/init/toolwatcher.conf'],
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Fix JPMorgan Importer - change (wikimedia...crm)

2015-10-05 Thread XenoRyet (Code Review)
XenoRyet has uploaded a new change for review.

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

Change subject: Fix JPMorgan Importer
..

Fix JPMorgan Importer

Strip commas from credits field to prevent field type error.

Bug: T113381
Change-Id: Icb12a674780c9f7bad7be32516e74dccbc58
---
M sites/all/modules/offline2civicrm/JpMorganFile.php
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/16/243716/1

diff --git a/sites/all/modules/offline2civicrm/JpMorganFile.php 
b/sites/all/modules/offline2civicrm/JpMorganFile.php
index 15c4fd3..5b550cc 100644
--- a/sites/all/modules/offline2civicrm/JpMorganFile.php
+++ b/sites/all/modules/offline2civicrm/JpMorganFile.php
@@ -50,4 +50,10 @@
 'restrictions' => 'Unrestricted - General',
 );
 }
+
+protected function mungeMessage( &$msg ) {
+$msg['gross'] = str_replace( ',' , '' , $msg['gross'] );
+
+parent::mungeMessage( $msg );
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb12a674780c9f7bad7be32516e74dccbc58
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: XenoRyet 

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


[MediaWiki-commits] [Gerrit] Move the TermIndexSearchInteractor to lib - change (mediawiki...Wikibase)

2015-10-05 Thread Lucie Kaffee (Code Review)
Lucie Kaffee has uploaded a new change for review.

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

Change subject: Move the TermIndexSearchInteractor to lib
..

Move the TermIndexSearchInteractor to lib

Change-Id: Ie7ca3435df8a9c37817d1ac5b70d21bf8ab000a4
---
R lib/Interactors/TermIndexSearchInteractor.php
M repo/includes/WikibaseRepo.php
M repo/includes/api/EntitySearchHelper.php
M repo/includes/specials/SpecialItemDisambiguation.php
M repo/tests/phpunit/includes/Interactors/TermIndexSearchInteractorTest.php
M repo/tests/phpunit/includes/api/EntitySearchHelperTest.php
M repo/tests/phpunit/includes/specials/SpecialItemDisambiguationTest.php
7 files changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/repo/includes/Interactors/TermIndexSearchInteractor.php 
b/lib/Interactors/TermIndexSearchInteractor.php
similarity index 100%
rename from repo/includes/Interactors/TermIndexSearchInteractor.php
rename to lib/Interactors/TermIndexSearchInteractor.php
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index b92c6e4..202e1de 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -70,7 +70,7 @@
 use Wikibase\Repo\Content\PropertyHandler;
 use Wikibase\Repo\Hooks\EditFilterHookRunner;
 use Wikibase\Repo\Interactors\RedirectCreationInteractor;
-use Wikibase\Repo\Interactors\TermIndexSearchInteractor;
+use Wikibase\Lib\Interactors\TermIndexSearchInteractor;
 use Wikibase\Repo\LinkedData\EntityDataFormatProvider;
 use Wikibase\Repo\Localizer\ChangeOpValidationExceptionLocalizer;
 use Wikibase\Repo\Localizer\DispatchingExceptionLocalizer;
diff --git a/repo/includes/api/EntitySearchHelper.php 
b/repo/includes/api/EntitySearchHelper.php
index 9740c79..f396507 100644
--- a/repo/includes/api/EntitySearchHelper.php
+++ b/repo/includes/api/EntitySearchHelper.php
@@ -9,7 +9,7 @@
 use Wikibase\DataModel\Services\Lookup\LabelDescriptionLookup;
 use Wikibase\DataModel\Term\Term;
 use Wikibase\Lib\Store\EntityTitleLookup;
-use Wikibase\Repo\Interactors\TermIndexSearchInteractor;
+use Wikibase\Lib\Interactors\TermIndexSearchInteractor;
 use Wikibase\Repo\Interactors\TermSearchResult;
 use Wikibase\TermIndex;
 use Wikibase\TermIndexEntry;
diff --git a/repo/includes/specials/SpecialItemDisambiguation.php 
b/repo/includes/specials/SpecialItemDisambiguation.php
index a31a76d..4a9af46 100644
--- a/repo/includes/specials/SpecialItemDisambiguation.php
+++ b/repo/includes/specials/SpecialItemDisambiguation.php
@@ -7,7 +7,7 @@
 use Language;
 use Wikibase\ItemDisambiguation;
 use Wikibase\Lib\LanguageNameLookup;
-use Wikibase\Repo\Interactors\TermIndexSearchInteractor;
+use Wikibase\Lib\Interactors\TermIndexSearchInteractor;
 use Wikibase\Repo\Interactors\TermSearchResult;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\TermIndexEntry;
diff --git 
a/repo/tests/phpunit/includes/Interactors/TermIndexSearchInteractorTest.php 
b/repo/tests/phpunit/includes/Interactors/TermIndexSearchInteractorTest.php
index b8b4359..4730ab0 100644
--- a/repo/tests/phpunit/includes/Interactors/TermIndexSearchInteractorTest.php
+++ b/repo/tests/phpunit/includes/Interactors/TermIndexSearchInteractorTest.php
@@ -9,14 +9,14 @@
 use Wikibase\DataModel\Term\Term;
 use Wikibase\DataModel\Term\TermFallback;
 use Wikibase\LanguageFallbackChainFactory;
-use Wikibase\Repo\Interactors\TermIndexSearchInteractor;
+use Wikibase\Lib\Interactors\TermIndexSearchInteractor;
 use Wikibase\Repo\Interactors\TermSearchResult;
 use Wikibase\Store\BufferingTermLookup;
 use Wikibase\TermIndexEntry;
 use Wikibase\Test\MockTermIndex;
 
 /**
- * @covers Wikibase\Repo\Interactors\TermIndexSearchInteractor
+ * @covers Wikibase\Lib\Interactors\TermIndexSearchInteractor
  *
  * @group Wikibase
  * @group WikibaseRepo
diff --git a/repo/tests/phpunit/includes/api/EntitySearchHelperTest.php 
b/repo/tests/phpunit/includes/api/EntitySearchHelperTest.php
index 32484e0..f14becb 100644
--- a/repo/tests/phpunit/includes/api/EntitySearchHelperTest.php
+++ b/repo/tests/phpunit/includes/api/EntitySearchHelperTest.php
@@ -11,7 +11,7 @@
 use Wikibase\DataModel\Term\Term;
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Repo\Api\EntitySearchHelper;
-use Wikibase\Repo\Interactors\TermIndexSearchInteractor;
+use Wikibase\Lib\Interactors\TermIndexSearchInteractor;
 use Wikibase\Repo\Interactors\TermSearchResult;
 use Wikibase\TermIndexEntry;
 use Wikibase\Test\MockTermIndex;
@@ -69,7 +69,7 @@
 * @return 
TermIndexSearchInteractor|\PHPUnit_Framework_MockObject_MockObject
 */
private function getMockSearchInteractor( $search, $language, $type, 
array $returnResults = array() ) {
-   $mock = $this->getMockBuilder( 
'Wikibase\Repo\Interactors\TermIndexSearchInteractor' )
+   $mock = $this->getMockBuilder( 

[MediaWiki-commits] [Gerrit] [Score] Add optional key - change (translatewiki)

2015-10-05 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [Score] Add optional key
..

[Score] Add optional key

https://gerrit.wikimedia.org/r/#/c/243216/1/i18n/en.json,unified

Change-Id: Id935fb0e229c230a488c1858a10dcc3dbe7543bc
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/25/243725/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 43d049c..739dec3 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -689,6 +689,7 @@
 
 Contribution Scores
 aliasfile = ContributionScores/ContributionScores.alias.php
+optional = score-visualeditor-mwscoreinspector-card-midi
 
 Contribution Tracking
 aliasfile = ContributionTracking/ContributionTracking.alias.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id935fb0e229c230a488c1858a10dcc3dbe7543bc
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] lint: fix 'variable not enclosed' pt2 - change (operations/puppet)

2015-10-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: lint: fix 'variable not enclosed' pt2
..


lint: fix 'variable not enclosed' pt2

Change-Id: I0faca37d4ebf7ab300f292ebdd37aa5287d4978b
---
M manifests/role/cassandra.pp
M manifests/role/designate.pp
M manifests/role/dumps.pp
M manifests/role/elasticsearch.pp
M manifests/role/glance.pp
M manifests/role/logging.pp
M manifests/role/puppet.pp
M manifests/role/puppetmaster.pp
8 files changed, 12 insertions(+), 12 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/manifests/role/cassandra.pp b/manifests/role/cassandra.pp
index 9ea987f..bfaa4b1 100644
--- a/manifests/role/cassandra.pp
+++ b/manifests/role/cassandra.pp
@@ -39,25 +39,25 @@
 ferm::service { 'cassandra-intra-node':
 proto  => 'tcp',
 port   => '7000',
-srange => "@resolve(($cassandra_hosts_ferm))",
+srange => "@resolve((${cassandra_hosts_ferm}))",
 }
 # Cassandra intra-node SSL messaging
 ferm::service { 'cassandra-intra-node-ssl':
 proto  => 'tcp',
 port   => '7001',
-srange => "@resolve(($cassandra_hosts_ferm))",
+srange => "@resolve((${cassandra_hosts_ferm}))",
 }
 # Cassandra JMX/RMI
 ferm::service { 'cassandra-jmx-rmi':
 proto  => 'tcp',
 port   => '7199',
-srange => "@resolve(($cassandra_hosts_ferm))",
+srange => "@resolve((${cassandra_hosts_ferm}))",
 }
 # Cassandra CQL query interface
 ferm::service { 'cassandra-cql':
 proto  => 'tcp',
 port   => '9042',
-srange => "@resolve(($cassandra_hosts_ferm))",
+srange => "@resolve((${cassandra_hosts_ferm}))",
 }
 
 }
diff --git a/manifests/role/designate.pp b/manifests/role/designate.pp
index df4d986..4766d01 100644
--- a/manifests/role/designate.pp
+++ b/manifests/role/designate.pp
@@ -46,7 +46,7 @@
 
 $auth_uri = $::realm ? {
 'production' => "http://${nova_controller}:5000;,
-'labs'   => "http://$::ipaddress_eth0:5000;,
+'labs'   => "http://${::ipaddress_eth0}:5000;,
 }
 
 $eqiaddesignateconfig = {
diff --git a/manifests/role/dumps.pp b/manifests/role/dumps.pp
index 7646159..0b4fd23 100644
--- a/manifests/role/dumps.pp
+++ b/manifests/role/dumps.pp
@@ -24,13 +24,13 @@
 ferm::service {'dumps_rsyncd_ipv4':
 port   => '873',
 proto  => 'tcp',
-srange => "@resolve(($rsync_clients_ferm))",
+srange => "@resolve((${rsync_clients_ferm}))",
 }
 
 ferm::service {'dumps_rsyncd_ipv6':
 port   => '873',
 proto  => 'tcp',
-srange => "@resolve(($rsync_clients_ipv6_ferm),)",
+srange => "@resolve((${rsync_clients_ipv6_ferm}),)",
 }
 
 ferm::service { 'dumps_http':
diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp
index d62f13d..f86f894 100644
--- a/manifests/role/elasticsearch.pp
+++ b/manifests/role/elasticsearch.pp
@@ -38,7 +38,7 @@
 proto => 'tcp',
 port  => '9300',
 notrack => true,
-srange  => "@resolve(($elastic_nodes_ferm))",
+srange  => "@resolve((${elastic_nodes_ferm}))",
 }
 
 ferm::service { 'elastic-zen-discovery':
diff --git a/manifests/role/glance.pp b/manifests/role/glance.pp
index e024252..9d82b76 100644
--- a/manifests/role/glance.pp
+++ b/manifests/role/glance.pp
@@ -25,7 +25,7 @@
 
 $auth_uri = $::realm ? {
 'production' => "http://${keystone_host}:5000;,
-'labs'   => "http://$::ipaddress_eth0:5000;,
+'labs'   => "http://${::ipaddress_eth0}:5000;,
 }
 
 $eqiadglanceconfig = {
diff --git a/manifests/role/logging.pp b/manifests/role/logging.pp
index 3125059..8cfb97c 100644
--- a/manifests/role/logging.pp
+++ b/manifests/role/logging.pp
@@ -204,7 +204,7 @@
 include role::logging::systemusers
 
 # udp2log::instance will ensure this is created
-$webrequest_log_directory= "$log_directory/webrequest"
+$webrequest_log_directory= "${log_directory}/webrequest"
 
 # keep fundraising logs in a subdir
 $fundraising_log_directory = "${log_directory}/fundraising"
diff --git a/manifests/role/puppet.pp b/manifests/role/puppet.pp
index 04a60fb..0738997 100644
--- a/manifests/role/puppet.pp
+++ b/manifests/role/puppet.pp
@@ -17,7 +17,7 @@
 ) {
 if $master != undef {
 if $master =~ /\./ {
-fail("$::puppetmaster must be a simple hostname.  The 
project-specific domain will be automatically appended.")
+fail("${::puppetmaster} must be a simple hostname.  The 
project-specific domain will be automatically appended.")
 }
 }
 
diff --git a/manifests/role/puppetmaster.pp b/manifests/role/puppetmaster.pp
index a643c7c..8edcbc2 100644
--- a/manifests/role/puppetmaster.pp
+++ 

[MediaWiki-commits] [Gerrit] Small optimization for FileContentsHasher - change (mediawiki/core)

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

Change subject: Small optimization for FileContentsHasher
..


Small optimization for FileContentsHasher

Make sure that PHP warnings are suppressed and restored once per invocation of
FileContentsHasher::getFileContentsHash(), rather than once or twice per file.

Change-Id: I814093f226d62e5e479411d0c3a7bbbe4998255a
---
M includes/utils/FileContentsHasher.php
1 file changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/utils/FileContentsHasher.php 
b/includes/utils/FileContentsHasher.php
index 655c1d0..c866919 100644
--- a/includes/utils/FileContentsHasher.php
+++ b/includes/utils/FileContentsHasher.php
@@ -57,7 +57,7 @@
 * @return string|bool Hash of file contents, or false if the file 
could not be read.
 */
public function getFileContentsHashInternal( $filePath, $algo = 'md4' ) 
{
-   $mtime = MediaWiki\quietCall( 'filemtime', $filePath );
+   $mtime = filemtime( $filePath );
if ( $mtime === false ) {
return false;
}
@@ -69,7 +69,7 @@
return $hash;
}
 
-   $contents = MediaWiki\quietCall( 'file_get_contents', $filePath 
);
+   $contents = file_get_contents( $filePath );
if ( $contents === false ) {
return false;
}
@@ -96,8 +96,12 @@
$filePaths = (array)$filePaths;
}
 
+   MediaWiki\suppressWarnings();
+
if ( count( $filePaths ) === 1 ) {
-   return $instance->getFileContentsHashInternal( 
$filePaths[0], $algo );
+   $hash = $instance->getFileContentsHashInternal( 
$filePaths[0], $algo );
+   MediaWiki\restoreWarnings();
+   return $hash;
}
 
sort( $filePaths );
@@ -105,6 +109,8 @@
return $instance->getFileContentsHashInternal( 
$filePath, $algo ) ?: '';
}, $filePaths );
 
+   MediaWiki\restoreWarnings();
+
$hashes = implode( '', $hashes );
return $hashes ? hash( $algo, $hashes ) : false;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I814093f226d62e5e479411d0c3a7bbbe4998255a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.1
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use mediawiki.widgets.CategorySelector module for CategorySe... - change (mediawiki...UploadWizard)

2015-10-05 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Use mediawiki.widgets.CategorySelector module for 
CategorySelector
..

Use mediawiki.widgets.CategorySelector module for CategorySelector

Depends on core change: I147892eccdd5f7e0f53

Bug: T108733
Change-Id: Ia9f18d1891ef9d595c15357429fd635e97db0d3a
---
M UploadWizardHooks.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 6198ada..64a383e 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -58,8 +58,7 @@
'oojs-ui.styles.icons-editing-core',
'oojs-ui.styles.icons-editing-advanced',
'mediawiki.widgets.DateInputWidget',
-   // CategorySelector
-   'mediawiki.widgets',
+   'mediawiki.widgets.CategorySelector',
),
'scripts' => array(
// jquery interface helpers

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9f18d1891ef9d595c15357429fd635e97db0d3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Tiny optimization to ResourceLoader::isValidModuleName() - change (mediawiki/core)

2015-10-05 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Tiny optimization to ResourceLoader::isValidModuleName()
..

Tiny optimization to ResourceLoader::isValidModuleName()

This is a micro-optimization, but ResourceLoader is so well-optimized at this
point that the call to PCRE accounts for 1.25% of all load.php CPU time. So
might as well making it a tiny bit faster.

Change-Id: Iefab804a6ca6d54ce230958513a3bea44f4e7c62
---
M includes/resourceloader/ResourceLoader.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/243718/1

diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 5e49555..631d140 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -1577,7 +1577,7 @@
 * @return bool Whether $moduleName is a valid module name
 */
public static function isValidModuleName( $moduleName ) {
-   return !preg_match( '/[|,!]/', $moduleName ) && strlen( 
$moduleName ) <= 255;
+   return strcspn( $moduleName, '!,|', 0, 255 ) === strlen( 
$moduleName );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefab804a6ca6d54ce230958513a3bea44f4e7c62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.1
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Tiny optimization to ResourceLoader::isValidModuleName() - change (mediawiki/core)

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

Change subject: Tiny optimization to ResourceLoader::isValidModuleName()
..


Tiny optimization to ResourceLoader::isValidModuleName()

This is a micro-optimization, but ResourceLoader is so well-optimized at this
point that the call to PCRE accounts for 1.25% of all load.php CPU time. So
might as well making it a tiny bit faster.

Change-Id: Iefab804a6ca6d54ce230958513a3bea44f4e7c62
---
M includes/resourceloader/ResourceLoader.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 5e49555..631d140 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -1577,7 +1577,7 @@
 * @return bool Whether $moduleName is a valid module name
 */
public static function isValidModuleName( $moduleName ) {
-   return !preg_match( '/[|,!]/', $moduleName ) && strlen( 
$moduleName ) <= 255;
+   return strcspn( $moduleName, '!,|', 0, 255 ) === strlen( 
$moduleName );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iefab804a6ca6d54ce230958513a3bea44f4e7c62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.1
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Split out UserInputWidgets from mediawiki.widgets - change (mediawiki/core)

2015-10-05 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Split out UserInputWidgets from mediawiki.widgets
..

Split out UserInputWidgets from mediawiki.widgets

Move it to it's own module mediawiki.widgets.UserInputWidget. It's currently
used in HTMLUserTextField only.

Bug: T108733
Change-Id: Id8c6dd5d9616086bdb0918442bfafe9ec708ab31
---
M includes/htmlform/HTMLUserTextField.php
M resources/Resources.php
2 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/243702/1

diff --git a/includes/htmlform/HTMLUserTextField.php 
b/includes/htmlform/HTMLUserTextField.php
index 5869002..9617c0a 100644
--- a/includes/htmlform/HTMLUserTextField.php
+++ b/includes/htmlform/HTMLUserTextField.php
@@ -40,7 +40,7 @@
}
 
protected function getInputWidget( $params ) {
-   $this->mParent->getOutput()->addModules( 'mediawiki.widgets' );
+   $this->mParent->getOutput()->addModules( 
'mediawiki.widgets.UserInputWidget' );
 
return new UserInputWidget( $params );
}
diff --git a/resources/Resources.php b/resources/Resources.php
index 9affe26..e52f185 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1973,7 +1973,6 @@

'resources/src/mediawiki.widgets/mw.widgets.TitleSearchWidget.js',

'resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js',

'resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js',
-   
'resources/src/mediawiki.widgets/mw.widgets.UserInputWidget.js',

'resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js',

'resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js',
),
@@ -2034,6 +2033,14 @@
),
'targets' => array( 'desktop', 'mobile' ),
),
+   'mediawiki.widgets.UserInputWidget' => array(
+   'scripts' => array(
+   
'resources/src/mediawiki.widgets/mw.widgets.UserInputWidget.js',
+   ),
+   'dependencies' => array(
+   'oojs-ui',
+   ),
+   ),
 
/* es5-shim */
'es5-shim' => array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8c6dd5d9616086bdb0918442bfafe9ec708ab31
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Small optimization for FileContentsHasher - change (mediawiki/core)

2015-10-05 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Small optimization for FileContentsHasher
..

Small optimization for FileContentsHasher

Make sure that PHP warnings are suppressed and restored once per invocation of
FileContentsHasher::getFileContentsHash(), rather than once or twice per file.

Change-Id: I814093f226d62e5e479411d0c3a7bbbe4998255a
---
M includes/utils/FileContentsHasher.php
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/243707/1

diff --git a/includes/utils/FileContentsHasher.php 
b/includes/utils/FileContentsHasher.php
index 655c1d0..22e2198 100644
--- a/includes/utils/FileContentsHasher.php
+++ b/includes/utils/FileContentsHasher.php
@@ -57,7 +57,7 @@
 * @return string|bool Hash of file contents, or false if the file 
could not be read.
 */
public function getFileContentsHashInternal( $filePath, $algo = 'md4' ) 
{
-   $mtime = MediaWiki\quietCall( 'filemtime', $filePath );
+   $mtime = filemtime( $filePath );
if ( $mtime === false ) {
return false;
}
@@ -69,7 +69,7 @@
return $hash;
}
 
-   $contents = MediaWiki\quietCall( 'file_get_contents', $filePath 
);
+   $contents = file_get_contents( $filePath );
if ( $contents === false ) {
return false;
}
@@ -96,6 +96,8 @@
$filePaths = (array)$filePaths;
}
 
+   MediaWiki\supressWarnings();
+
if ( count( $filePaths ) === 1 ) {
return $instance->getFileContentsHashInternal( 
$filePaths[0], $algo );
}
@@ -105,6 +107,8 @@
return $instance->getFileContentsHashInternal( 
$filePath, $algo ) ?: '';
}, $filePaths );
 
+   MediaWiki\restoreWarnings();
+
$hashes = implode( '', $hashes );
return $hashes ? hash( $algo, $hashes ) : false;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I814093f226d62e5e479411d0c3a7bbbe4998255a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Check, if the User object was created before accessing funct... - change (mediawiki...GoogleLogin)

2015-10-05 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Check, if the User object was created before accessing 
functions on it
..

Check, if the User object was created before accessing functions on it

Bug: T114686
Change-Id: I9855a15ebbdcadfee72999834391e83e60e95bbb
---
M includes/specials/SpecialGoogleLogin.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/08/243708/1

diff --git a/includes/specials/SpecialGoogleLogin.php 
b/includes/specials/SpecialGoogleLogin.php
index 56e89e2..92094af 100644
--- a/includes/specials/SpecialGoogleLogin.php
+++ b/includes/specials/SpecialGoogleLogin.php
@@ -447,8 +447,7 @@
'email' => 
$userInfo['emails'][0]['value'],
'real_name' => 
$userInfo['name']['givenName']
);
-   if ( !$db->googleIdExists( 
$userInfo['id'] ) ) {
-   $user = 
User::createNew( $userName, $userParam );
+   if ( !$db->googleIdExists( 
$userInfo['id'] ) && $user = User::createNew( $userName, $userParam ) ) {

$user->sendConfirmationMail();
$user->setCookies();
// create a log entry 
for the created user - bug 67245

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9855a15ebbdcadfee72999834391e83e60e95bbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Fix tests after testwiki protection has changed - change (mediawiki...mobileapps)

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

Change subject: Fix tests after testwiki protection has changed
..


Fix tests after testwiki protection has changed

Change-Id: Ib361f463440f945735bf3ee7eded962377d223ec
---
M test/features/mobile-html-sections-lead/pagecontent.js
M test/features/mobile-html-sections/pagecontent.js
M test/features/mobile-html/pagecontent.js
3 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/test/features/mobile-html-sections-lead/pagecontent.js 
b/test/features/mobile-html-sections-lead/pagecontent.js
index 3cfa06e..46b6ae2 100644
--- a/test/features/mobile-html-sections-lead/pagecontent.js
+++ b/test/features/mobile-html-sections-lead/pagecontent.js
@@ -24,8 +24,8 @@
 assert.deepEqual(res.status, 200);
 assert.ok(lead.lastmodified.startsWith('201'), 
lead.lastmodified + ' should start with 201'); // 2015-
 assert.deepEqual(lead.displaytitle, 'Test');
-//assert.deepEqual(lead.protection, {}); // TODO: not sure how 
to test for undefined
-assert.deepEqual(lead.editable, true);
+assert.deepEqual(lead.protection, 
{"edit":["autoconfirmed"],"move":["sysop"]});
+assert.deepEqual(lead.editable, false);
 assert.ok(lead.sections.length > 0, 'Expected at least one 
section element');
 assert.deepEqual(lead.sections[0].id, 0);
 assert.ok(lead.sections[0].text.length > 0, 'Expected text to 
be non-empty');
diff --git a/test/features/mobile-html-sections/pagecontent.js 
b/test/features/mobile-html-sections/pagecontent.js
index 709bffb..6f6a304 100644
--- a/test/features/mobile-html-sections/pagecontent.js
+++ b/test/features/mobile-html-sections/pagecontent.js
@@ -24,8 +24,8 @@
 assert.deepEqual(res.status, 200);
 assert.ok(lead.lastmodified.startsWith('201'), 
lead.lastmodified + ' should start with 201'); // 2015-
 assert.deepEqual(lead.displaytitle, 'Test');
-//assert.deepEqual(lead.protection, {}); // TODO: not sure how 
to test for undefined
-assert.deepEqual(lead.editable, true);
+assert.deepEqual(lead.protection, 
{"edit":["autoconfirmed"],"move":["sysop"]});
+assert.deepEqual(lead.editable, false);
 assert.ok(lead.sections.length > 0, 'Expected at least one 
section element');
 assert.deepEqual(lead.sections[0].id, 0);
 assert.ok(lead.sections[0].text.length > 0, 'Expected text to 
be non-empty');
diff --git a/test/features/mobile-html/pagecontent.js 
b/test/features/mobile-html/pagecontent.js
index d29b748..88b52b4 100644
--- a/test/features/mobile-html/pagecontent.js
+++ b/test/features/mobile-html/pagecontent.js
@@ -35,7 +35,7 @@
 var doc = domino.createDocument(res.body);
 assert.selectorExistsOnce(doc, 
'script[type="application/json"][id="mw-app-meta1"]');
 assert.selectorContainsValue(doc, 'script[id="mw-app-meta1"]',
-
'"displaytitle":"Test","protection":[],"editable":true,"toc":[{"id":0');
+
'"displaytitle":"Test","protection":{"edit":["autoconfirmed"],"move":["sysop"]},"editable":false,"toc":[{"id":0');
 
 assert.selectorExistsOnce(doc, 
'script[type="application/json"][id="mw-app-meta2"]');
 assert.selectorHasValue(doc, 'script[id="mw-app-meta2"]', '{}',
@@ -72,4 +72,4 @@
 assert.deepEqual(res.status, 200);
 });
 });
-});
\ No newline at end of file
+});

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib361f463440f945735bf3ee7eded962377d223ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Bgerstle 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] adding joal, milimetric, gwicke, eevans, mobrovac to aqs-admins - change (operations/puppet)

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

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

Change subject: adding joal, milimetric, gwicke, eevans, mobrovac to aqs-admins
..

adding joal, milimetric, gwicke, eevans, mobrovac to aqs-admins

adding joal, milimetric, gwicke, eevans, mobrovac to the aqs-admins
group.  allows admin access for aql service group

T113416
T114383

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/12/243712/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 24aac15..d35b932 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -407,7 +407,7 @@
   aqs-admins:
 description: Group of admins for the Analytics Query Service
 gid: 764
-members: []
+members: [joal, milimetric, gwicke, eevans, mobrovac]
 privileges: ['ALL = NOPASSWD: /usr/sbin/service cassandra *',
  'ALL = (cassandra) NOPASSWD: ALL',
  'ALL = NOPASSWD: /usr/sbin/service restbase *',

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

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

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


[MediaWiki-commits] [Gerrit] adding joal, milimetric, gwicke, eevans, mobrovac to aqs-admins - change (operations/puppet)

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

Change subject: adding joal, milimetric, gwicke, eevans, mobrovac to aqs-admins
..


adding joal, milimetric, gwicke, eevans, mobrovac to aqs-admins

adding joal, milimetric, gwicke, eevans, mobrovac to the aqs-admins
group.  allows admin access for aql service group

T113416
T114383

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

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 24aac15..d35b932 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -407,7 +407,7 @@
   aqs-admins:
 description: Group of admins for the Analytics Query Service
 gid: 764
-members: []
+members: [joal, milimetric, gwicke, eevans, mobrovac]
 privileges: ['ALL = NOPASSWD: /usr/sbin/service cassandra *',
  'ALL = (cassandra) NOPASSWD: ALL',
  'ALL = NOPASSWD: /usr/sbin/service restbase *',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3efc265e2461ea5b54cb0a22ff4b37b68a51ca72
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ishmael: remove module, decom service - change (operations/puppet)

2015-10-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: ishmael: remove module, decom service
..

ishmael: remove module, decom service

The service 'ishmael' is not really used,
asked DBAs per ticket. So we can remove it completely.

Bug:T109777
Change-Id: Id1ecdf8dfbf12aab853389192c9e327750eb814a
---
D manifests/role/ishmael.pp
M manifests/site.pp
D modules/ishmael/manifests/config.pp
D modules/ishmael/manifests/init.pp
D modules/ishmael/templates/apache/ishmael.wikimedia.org.erb
D modules/ishmael/templates/conf.php.erb
M templates/varnish/misc.inc.vcl.erb
7 files changed, 0 insertions(+), 124 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/243714/1

diff --git a/manifests/role/ishmael.pp b/manifests/role/ishmael.pp
deleted file mode 100644
index 517a355..000
--- a/manifests/role/ishmael.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# manifests/role/ishmael.pp
-# ishmael: A UI for mk-query-digest
-class role::ishmael {
-
-system::role { 'role::ishmael': description => 'ishmael server' }
-
-class { '::ishmael':
-site_name => 'ishmael.wikimedia.org',
-config_main   => '/srv/ishmael/conf.php',
-config_sample => '/srv/ishmael/sample/conf.php',
-docroot   => '/srv/ishmael',
-ldap_binddn   => 'cn=proxyagent,ou=profile,dc=wikimedia,dc=org',
-ldap_authurl  => 'ldaps://ldap-eqiad.wikimedia.org 
ldap-codfw.wikimedia.org/ou=people,dc=wikimedia,dc=org?cn',
-ldap_groups   => [ 'cn=ops,ou=groups,dc=wikimedia,dc=org', 
'cn=wmf,ou=groups,dc=wikimedia,dc=org', 'cn=nda,ou=groups,dc=wikimedia,dc=org' 
],
-auth_name => 'WMF Labs (use wiki login name not shell) - 
nda/ops/wmf',
-}
-
-}
diff --git a/manifests/site.pp b/manifests/site.pp
index 43b6656..a301f3d 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2163,7 +2163,6 @@
 
 include standard
 include role::icinga
-include role::ishmael
 include role::tendril
 include role::tcpircbot
 }
diff --git a/modules/ishmael/manifests/config.pp 
b/modules/ishmael/manifests/config.pp
deleted file mode 100644
index 33cb632..000
--- a/modules/ishmael/manifests/config.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# definition of an ishmael config
-
-define ishmael::config(
-$db_central_host = 'm1-master.eqiad.wmnet',
-$review_table= '%query_review',
-$history_table   = '%query_review_history',
-) {
-
-include passwords::mysql::querydigest
-
-file { $title:
-owner   => 'root',
-group   => 'root',
-mode=> '0444',
-content => template('ishmael/conf.php.erb');
-  }
-}
-
diff --git a/modules/ishmael/manifests/init.pp 
b/modules/ishmael/manifests/init.pp
deleted file mode 100644
index 96b0eff..000
--- a/modules/ishmael/manifests/init.pp
+++ /dev/null
@@ -1,36 +0,0 @@
-# ishmael: A UI for mk-query-digest
-# http://mihasya.com/blog/a-ui-for-mk-query-digest/
-# https://github.com/mihasya/ishmael
-
-# NOTE: this does not install ishmael.. it could be git deployed,
-# but it hasn't been moved to a wmf repo. for now:
-# cd /srv ; git clone https://github.com/asher/ishmael.git ;
-# cd ishmael ; git clone https://github.com/asher/ishmael.git sample
-#
-class ishmael (
-$site_name,
-$config_main,
-$config_sample,
-$docroot,
-$ldap_binddn,
-$ldap_authurl,
-$ldap_groups,
-$auth_name,
-) {
-
-include passwords::ldap::wmf_cluster
-$proxypass = $passwords::ldap::wmf_cluster::proxypass
-
-apache::site { $site_name:
-content => template("ishmael/apache/${site_name}.erb"),
-}
-
-include ::apache::mod::headers
-
-ishmael::config { $config_main: }
-
-ishmael::config { $config_sample:
-review_table  => '%tcpquery_review',
-history_table => '%tcpquery_review_history',
-}
-}
diff --git a/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb 
b/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb
deleted file mode 100644
index a3cf674..000
--- a/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb
+++ /dev/null
@@ -1,34 +0,0 @@
-# vim: filetype=apache
-# !! this file is managed by puppet !!
-
-NameVirtualHost *:80
-
-
-ServerName <%= @site_name %>
-DocumentRoot <%= @docroot %>
-
-RewriteEngine on
-RewriteCond %{HTTP:X-Forwarded-Proto} !https
-RewriteRule ^/(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} 
[R=301,E=ProtoRedirect]
-Header always merge Vary X-Forwarded-Proto env=ProtoRedirect
-Header always set Strict-Transport-Security "max-age=31536000"
-
-">
-Options FollowSymLinks
-Options ExecCGI
-DirectoryIndex index.php
-AllowOverride AuthConfig
-Order Allow,Deny
-Allow From All
-AuthName "<%= @auth_name %>"
-AuthType Basic
-AuthBasicProvider ldap
-AuthLDAPBindDN <%= 

[MediaWiki-commits] [Gerrit] Tiny optimization to ResourceLoader::isValidModuleName() - change (mediawiki/core)

2015-10-05 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Tiny optimization to ResourceLoader::isValidModuleName()
..

Tiny optimization to ResourceLoader::isValidModuleName()

This is a micro-optimization, but ResourceLoader is so well-optimized at this
point that the call to PCRE accounts for 1.25% of all load.php CPU time. So
might as well making it a tiny bit faster.

Change-Id: Iefab804a6ca6d54ce230958513a3bea44f4e7c62
---
M includes/resourceloader/ResourceLoader.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/17/243717/1

diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 002b4ea..77ceff6 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -1580,7 +1580,7 @@
 * @return bool Whether $moduleName is a valid module name
 */
public static function isValidModuleName( $moduleName ) {
-   return !preg_match( '/[|,!]/', $moduleName ) && strlen( 
$moduleName ) <= 255;
+   return strcspn( $moduleName, '!,|', 0, 255 ) === strlen( 
$moduleName );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefab804a6ca6d54ce230958513a3bea44f4e7c62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] test patch do not merge - change (mediawiki...CirrusSearch)

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

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

Change subject: test patch do not merge
..

test patch do not merge

Change-Id: I1b44860ca664c4f16b03320ed25369febb287cf9
---
M Makefile
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/Makefile b/Makefile
index 158cf10..076fa5c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
 MW_INSTALL_PATH ?= ../..
 
+
 # mediawiki-vagrant defaults to hhvm rather than php5, which is mostly
 # fine but crazy slow for commands like phplint
 PHP ?= `command -v php5 || command -v php`

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b44860ca664c4f16b03320ed25369febb287cf9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mw.widgets: Split CategorySelector widget to its own module - change (mediawiki/core)

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

Change subject: mw.widgets: Split CategorySelector widget to its own module
..


mw.widgets: Split CategorySelector widget to its own module

It's currently used by ForeignStructuredUpload only, so it's easy to split
it now and make mw.widgets as small as possible (you need to load only the
module of the widget(s) you want to use).

Bug: T108733
Change-Id: I147892eccdd5f7e0f53f824ea4d47e02984047f5
---
M resources/Resources.php
1 file changed, 14 insertions(+), 3 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index 9affe26..afcd589 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1244,7 +1244,7 @@
'dependencies' => array(
'mediawiki.ForeignStructuredUpload',
'mediawiki.Upload.BookletLayout',
-   'mediawiki.widgets',
+   'mediawiki.widgets.CategorySelector',
'mediawiki.widgets.DateInputWidget',
'mediawiki.jqueryMsg',
),
@@ -1974,8 +1974,6 @@

'resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js',

'resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js',

'resources/src/mediawiki.widgets/mw.widgets.UserInputWidget.js',
-   
'resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js',
-   
'resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js',
),
'skinStyles' => array(
'default' => array(
@@ -1991,6 +1989,8 @@
'jquery.byteLimit',
// TitleOptionWidget
'jquery.autoEllipsis',
+   // FIXME: Kept for bc
+   'mediawiki.widgets.CategorySelector',
),
'messages' => array(
// NamespaceInputWidget
@@ -2034,6 +2034,17 @@
),
'targets' => array( 'desktop', 'mobile' ),
),
+   'mediawiki.widgets.CategorySelector' => array(
+   'scripts' => array(
+   
'resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js',
+   
'resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js',
+   ),
+   'dependencies' => array(
+   'oojs-ui',
+   'mediawiki.api',
+   ),
+   'targets' => array( 'desktop', 'mobile' ),
+   ),
 
/* es5-shim */
'es5-shim' => array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I147892eccdd5f7e0f53f824ea4d47e02984047f5
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [Score] Add optional key - change (translatewiki)

2015-10-05 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [Score] Add optional key
..


[Score] Add optional key

https://gerrit.wikimedia.org/r/#/c/243216/1/i18n/en.json,unified

Change-Id: Id935fb0e229c230a488c1858a10dcc3dbe7543bc
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 43d049c..739dec3 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -689,6 +689,7 @@
 
 Contribution Scores
 aliasfile = ContributionScores/ContributionScores.alias.php
+optional = score-visualeditor-mwscoreinspector-card-midi
 
 Contribution Tracking
 aliasfile = ContributionTracking/ContributionTracking.alias.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id935fb0e229c230a488c1858a10dcc3dbe7543bc
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Civi46 reset Navigation menu - change (wikimedia...crm)

2015-10-05 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Civi46 reset Navigation menu
..

Civi46 reset Navigation menu

Reset the navigation menu using the new function provided by Giant Rabbit.

Randomly I have put this against that ticket and Everything else against T99836 

Do I need to adjust some commits over?

Bug: T99837
Change-Id: I6b5a919fda66d8c3807ddec64dcb289c1b3b8a9d
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/72/243872/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index a72c148..8953be8 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -42,6 +42,7 @@
 wmf_civicrm_update_7060();
 wmf_civicrm_update_7061();
 wmf_civicrm_update_7062();
+wmf_civicrm_update_7063();
 }
 
 /**
@@ -1487,3 +1488,16 @@
 'contact_default_language' => "undefined",
 ));
 }
+
+/**
+ * Reset navigation menu.
+ *
+ * CRM-17176
+ *
+ * @throws \CiviCRM_API3_Exception
+ */
+function wmf_civicrm_update_7063() {
+civicrm_api3('Navigation', 'reset', array(
+  'for' => "report",
+));
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b5a919fda66d8c3807ddec64dcb289c1b3b8a9d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Remove bogus wfGetDB() param - change (mediawiki...Gather)

2015-10-05 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Remove bogus wfGetDB() param
..

Remove bogus wfGetDB() param

Change-Id: Iac653a89489645892ab0786a246ac43e14e92048
---
M includes/api/ApiEditList.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/api/ApiEditList.php b/includes/api/ApiEditList.php
index cd6c8f2..85ead7f 100644
--- a/includes/api/ApiEditList.php
+++ b/includes/api/ApiEditList.php
@@ -127,7 +127,7 @@
$isNew = $listId === null;
$isWatchlist = $listId === 0;
 
-   $dbw = wfGetDB( DB_MASTER, 'api' );
+   $dbw = wfGetDB( DB_MASTER );
$logEventName = false;
 
if ( $isNew || $isWatchlist ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac653a89489645892ab0786a246ac43e14e92048
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Change getCacheSetOptions() callers to use "Database" - change (mediawiki/core)

2015-10-05 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Change getCacheSetOptions() callers to use "Database"
..

Change getCacheSetOptions() callers to use "Database"

* This is less verbose that DatabaseBase
* Also add a few WAN cache doc comments

Change-Id: I5b6de6d0ffa06753ea96c50b63db7dae796475dc
---
M includes/User.php
M includes/actions/InfoAction.php
M includes/changetags/ChangeTags.php
M includes/filerepo/LocalRepo.php
M includes/filerepo/file/LocalFile.php
M includes/interwiki/Interwiki.php
M includes/libs/objectcache/WANObjectCache.php
7 files changed, 17 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/243876/1

diff --git a/includes/User.php b/includes/User.php
index 20b75bf..75649a7 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -458,7 +458,7 @@
$data['mVersion'] = self::VERSION;
$key = wfMemcKey( 'user', 'id', $this->mId );
 
-   $opts = DatabaseBase::getCacheSetOptions( wfGetDB( DB_SLAVE ) );
+   $opts = Database::getCacheSetOptions( wfGetDB( DB_SLAVE ) );
ObjectCache::getMainWANInstance()->set( $key, $data, 3600, 
$opts );
}
 
diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php
index 4e74ed3..78dd5fe 100644
--- a/includes/actions/InfoAction.php
+++ b/includes/actions/InfoAction.php
@@ -682,7 +682,7 @@
$dbr = wfGetDB( DB_SLAVE );
$dbrWatchlist = wfGetDB( DB_SLAVE, 'watchlist' 
);
 
-   $setOpts += DatabaseBase::getCacheSetOptions( 
$dbr, $dbrWatchlist );
+   $setOpts += Database::getCacheSetOptions( $dbr, 
$dbrWatchlist );
 
$result = array();
 
diff --git a/includes/changetags/ChangeTags.php 
b/includes/changetags/ChangeTags.php
index e1b9b27..5531245 100644
--- a/includes/changetags/ChangeTags.php
+++ b/includes/changetags/ChangeTags.php
@@ -1091,7 +1091,7 @@
return ObjectCache::getMainWANInstance()->getWithSetCallback(
wfMemcKey( 'active-tags' ),
function ( $oldValue, &$ttl, array &$setOpts ) {
-   $setOpts += DatabaseBase::getCacheSetOptions( 
wfGetDB( DB_SLAVE ) );
+   $setOpts += Database::getCacheSetOptions( 
wfGetDB( DB_SLAVE ) );
 
// Ask extensions which tags they consider 
active
$extensionActive = array();
@@ -1135,7 +1135,7 @@
function ( $oldValue, &$ttl, array &$setOpts ) use ( 
$fname ) {
$dbr = wfGetDB( DB_SLAVE );
 
-   $setOpts += DatabaseBase::getCacheSetOptions( 
$dbr );
+   $setOpts += Database::getCacheSetOptions( $dbr 
);
 
$tags = $dbr->selectFieldValues( 'valid_tag', 
'vt_tag', array(), $fname );
 
@@ -1160,7 +1160,7 @@
return ObjectCache::getMainWANInstance()->getWithSetCallback(
wfMemcKey( 'valid-tags-hook' ),
function ( $oldValue, &$ttl, array &$setOpts ) {
-   $setOpts += DatabaseBase::getCacheSetOptions( 
wfGetDB( DB_SLAVE ) );
+   $setOpts += Database::getCacheSetOptions( 
wfGetDB( DB_SLAVE ) );
 
$tags = array();
Hooks::run( 'ListDefinedTags', array( &$tags ) 
);
@@ -1221,7 +1221,7 @@
function ( $oldValue, &$ttl, array &$setOpts ) use ( 
$fname ) {
$dbr = wfGetDB( DB_SLAVE, 'vslow' );
 
-   $setOpts += DatabaseBase::getCacheSetOptions( 
$dbr );
+   $setOpts += Database::getCacheSetOptions( $dbr 
);
 
$res = $dbr->select(
'change_tag',
diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index 389f081..02d859f 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -205,7 +205,7 @@
function ( $oldValue, &$ttl, array &$setOpts ) use ( 
$that, $title ) {
$dbr = $that->getSlaveDB(); // possibly remote 
DB
 
-   $setOpts += DatabaseBase::getCacheSetOptions( 
$dbr );
+   $setOpts += Database::getCacheSetOptions( $dbr 
);
 
if ( $title instanceof Title ) {
$row = $dbr->selectRow(
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index d5179cb..50b9caf 100644
--- 

[MediaWiki-commits] [Gerrit] move netmapper processing to common VCL - change (operations/puppet)

2015-10-05 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: move netmapper processing to common VCL
..


move netmapper processing to common VCL

This moves the netmapper "carriers" and "proxies" database lookups
to common VCL across all clusters, and integrates them with the
early vcl_recv IP processing done there to generate a standard set
of headers related to client IPs, trusted proxies, carriers, etc.

Note that new header names were invented here for the netmapper
results: "X-Carrier" contains MCC-MNC, and "X-Carrier-Meta"
contains the zeronet metadata like "wap".  Combined, these are
what what Zero calls "X-CS2".  "X-Trusted-Proxy" also contains
what Zero has traditionally calls "X-Forwarded-By".

This allows for an easier transition of the zero.inc.vcl code to
use the headers supplied from the common VCL, which copies the
data to its legacy headers and then possibly further
manipulates/uses/deletes those legacy headers.

Doing that also removes any fears about the sudden appearance of
previously mobile/zero -specific headers in text/upload requests
causing issues at the MediaWiki layer.

Bug: T89177
Bug: T96847
Bug: T109286
Change-Id: Ib92353d478c06548c4082af970f4561f2c6332f3
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
M templates/varnish/zero.inc.vcl.erb
2 files changed, 167 insertions(+), 145 deletions(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 1257de3..ddb2bdd 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -7,6 +7,11 @@
 #   being set from different code.
 import header;
 
+<% if @vcl_config.fetch("layer", "") == "frontend" -%>
+# only used in recv_fe_ip_processing on frontends
+import netmapper;
+<% end %>
+
 <%
 def backend_option(backend, option, default)
if @varnish_backend_options.kind_of?(Array)
@@ -358,30 +363,143 @@
}
 }
 
-// XFF / XFP / XRIP -handling (order is important below, should be at start of 
recv)
-// TODO: Integration with zero-like XFF-handling, to skip over authorized 
proxies for XRIP
-sub recv_ip_processing {
-   // Everything here is req-mangling based on the req
-   // itself, and some parts are non-idempotent, so do not
-   // re-run this on a request restart
+<% if @vcl_config.fetch("layer", "") == "frontend" -%>
+// Must be done at the top of vcl_recv, in our varnish-frontend layer only,
+// and should be guarded against running on request restarts.
+sub recv_fe_ip_processing {
+   // this subroutine "owns" these 4 headers - nothing else in our VCL or
+   // anywhere in our network should be setting them.
+   unset req.http.X-Trusted-Proxy;
+   unset req.http.X-Client-IP;
+   unset req.http.X-Carrier;
+   unset req.http.X-Carrier-Meta;
+
+   if (client.ip !~ wikimedia_nets) {
+   // Ensure we only accept XFP from our own networks.  Ideally
+   // it should only be set by our nginx TLS terminator
+   // specifically, but there are known cases where internal apps
+   // set XFP to fake HTTPS when making a request to our public
+   // endpoints from the inside.
+   unset req.http.X-Forwarded-Proto;
+   // only the nginx TLS terminator should be setting this one at
+   // all - there are no other internal exceptions to that rule
+   unset req.http.X-Real-IP;
+   }
+
+   // There are two possible cases here: either nginx acted as our TLS
+   // proxy and already set X-Real-IP (as well as appended the same value
+   // as XFF), or the traffic was direct to varnish-fe, in which case
+   // XRIP is not yet set and XFF is directly from external.
+   if (!req.http.X-Real-IP) {
+   // direct-to-port-80 case, set XRIP ourselves
+   set req.http.X-Real-IP = client.ip;
+   set req.http.X-Trusted-Proxy = netmapper.map("proxies", 
req.http.X-Real-IP);
+   // normalize to boolean post-netmapper (varnish-3.0.4...)
+   if (req.http.X-Trusted-Proxy == "") {
+   unset req.http.X-Trusted-Proxy;
+   }
+   if (req.http.X-Trusted-Proxy && req.http.X-Forwarded-For) {
+   // get last from trusted-proxy-supplied XFF
+   set req.http.X-Client-IP = 
regsub(req.http.X-Forwarded-For, "^([^,]+, ?)+", "")
+   }
+   } else {
+   // XRIP from nginx, XFF assumed to be set and contain at least
+   // XRIP at the end, possibly prepended by other addrs set
+   // externally by some proxy.
+   set req.http.X-Trusted-Proxy = netmapper.map("proxies", 
req.http.X-Real-IP);
+   // normalize to boolean 

[MediaWiki-commits] [Gerrit] Added @since to Database - change (mediawiki/core)

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

Change subject: Added @since to Database
..


Added @since to Database

Change-Id: Ia4396317bb3c78ab6b60ecbf0e1825e44ed08589
---
M includes/db/Database.php
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/includes/db/Database.php b/includes/db/Database.php
index 86ea0c4..f044002 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -4307,6 +4307,9 @@
}
 }
 
+/**
+ * @since 1.27
+ */
 abstract class Database extends DatabaseBase {
// B/C until nothing type hints for DatabaseBase
// @TODO: finish renaming DatabaseBase => Database

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4396317bb3c78ab6b60ecbf0e1825e44ed08589
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Civi46 set contact_default_language on upgrade - change (wikimedia...crm)

2015-10-05 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Civi46 set contact_default_language on upgrade
..

Civi46 set contact_default_language on upgrade

Bug: T99836
Change-Id: I8087ed70b81a2ee0ee854c13e76da0affe4874cc
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/74/243874/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index ad90b03..a72c148 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -41,6 +41,7 @@
 wmf_civicrm_update_7034();
 wmf_civicrm_update_7060();
 wmf_civicrm_update_7061();
+wmf_civicrm_update_7062();
 }
 
 /**
@@ -1471,3 +1472,18 @@
 AND url NOT LIKE '%output=criteria%'"
 );
 }
+
+/**
+ * Set default language for contacts to 'undefined'.
+ *
+ * This means a new contact created will have an empty language rather than a 
guessed one.
+ *
+ * CRM-14232
+ *
+ * @throws \CiviCRM_API3_Exception
+ */
+function wmf_civicrm_update_7062() {
+civicrm_api3('Setting', 'create', array(
+'contact_default_language' => "undefined",
+));
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8087ed70b81a2ee0ee854c13e76da0affe4874cc
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Civi46 Update report urls to open as criteria - change (wikimedia...crm)

2015-10-05 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Civi46 Update report urls to open as criteria
..

Civi46 Update report urls to open as criteria

Issue CRM-17225 We can't really change the meaning of the core urls to show 
without
rendering results  we have to create an option because otherwise
we'll never get it upstreamed. Giant Rabbit did add a critieria to the output
but they also removed the code that stopped reset being treated like force
which meant a behaviour change which would have been mandatory for all sites
and hence was a problem to upstream. I have been discussing with Coleman and
although this may not be the final cut this change to the urls is what I am
currently getting him to review too.

Basically if output=critieria is in the url the rows won't be rendered until you
take an action. Otherwise they will. For new reports you can choose at the 
point of
creation, this alters all existing reports

Commits in the CiviCRM repo make the output=criteria

BUG: T99837
Change-Id: Ie733ae9f4becba160b3a4d39cc0a2a4a0f988b3c
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 24 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/73/243873/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 75c8c7b..ad90b03 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -40,6 +40,7 @@
 wmf_civicrm_update_7033();
 wmf_civicrm_update_7034();
 wmf_civicrm_update_7060();
+wmf_civicrm_update_7061();
 }
 
 /**
@@ -1432,7 +1433,6 @@
 return array();
 }
 
-
 /**
  * Add option value 'tag_used_for' for civicrm_contribution.
  *
@@ -1448,3 +1448,26 @@
 ));
 return array();
 }
+
+/**
+ * Append '=context' to all report instances.
+ *
+ * This 'upgrades' existing reports to not render results when opened by 
default.
+ *
+ * Although the GR work changed the default this isn't going to fly upstream 
so we
+ * need to change the behaviour of all of the WMF reports in a way that won't 
be
+ * later reverted so adding a parameter & upstreaming the meaning of that 
parameter provides
+ * future proofing.
+ *
+ * CRM-17225
+ */
+function wmf_civicrm_update_7061() {
+$dbs = wmf_civicrm_get_dbs();
+$dbs->push('civicrm');
+db_query(
+"UPDATE civicrm_navigation
+SET url = CONCAT(url, '=criteria')
+WHERE url LIKE 'civicrm\/report\/instance%'
+AND url NOT LIKE '%output=criteria%'"
+);
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie733ae9f4becba160b3a4d39cc0a2a4a0f988b3c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Update jquery.uls to d4de09ffb94dd9682 - change (mediawiki...UniversalLanguageSelector)

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

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

Change subject: Update jquery.uls to d4de09ffb94dd9682
..

Update jquery.uls to d4de09ffb94dd9682

* Improve the hide-show logic of ULS

Bug: T114123
Change-Id: If7a23b035edf3117520a9c313997a26c7b6c4857
---
M lib/jquery.uls/src/jquery.uls.core.js
1 file changed, 6 insertions(+), 8 deletions(-)


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

diff --git a/lib/jquery.uls/src/jquery.uls.core.js 
b/lib/jquery.uls/src/jquery.uls.core.js
index 201d384..529b47a 100644
--- a/lib/jquery.uls/src/jquery.uls.core.js
+++ b/lib/jquery.uls/src/jquery.uls.core.js
@@ -177,9 +177,6 @@
this.initialized = true;
}
 
-   // hide any other visible ULS
-   $( '.uls-menu' ).hide();
-
this.$menu.show();
this.$menu.scrollIntoView();
this.shown = true;
@@ -321,7 +318,11 @@
/**
 * On cancel handler for the uls menu
 */
-   cancel: function () {
+   cancel: function ( e ) {
+   if ( e && this.$element.is( e.target ) ) {
+   return;
+   }
+
this.hide();
 
if ( this.options.onCancel ) {
@@ -353,10 +354,7 @@
}
},
 
-   click: function ( e ) {
-   e.stopPropagation();
-   e.preventDefault();
-
+   click: function () {
if ( this.shown ) {
this.hide();
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7a23b035edf3117520a9c313997a26c7b6c4857
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] Update more docs and type hints to use IDatabase - change (mediawiki/core)

2015-10-05 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Update more docs and type hints to use IDatabase
..

Update more docs and type hints to use IDatabase

Change-Id: I8c8d85b32a8aba21e14d2a2dde4c25eb509186c1
---
M includes/CategoryFinder.php
M includes/LinkFilter.php
M includes/RevisionList.php
M includes/SiteStats.php
M includes/UserRightsProxy.php
M includes/externalstore/ExternalStoreDB.php
M includes/filebackend/filejournal/DBFileJournal.php
M includes/filebackend/lockmanager/DBLockManager.php
M includes/filerepo/ForeignDBRepo.php
M includes/filerepo/ForeignDBViaLBRepo.php
M includes/jobqueue/JobRunner.php
M includes/libs/ObjectFactory.php
M includes/objectcache/SqlBagOStuff.php
M includes/pager/IndexPager.php
M includes/utils/BatchRowIterator.php
M includes/utils/BatchRowWriter.php
16 files changed, 35 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/243878/1

diff --git a/includes/CategoryFinder.php b/includes/CategoryFinder.php
index 77c43bf..d779141 100644
--- a/includes/CategoryFinder.php
+++ b/includes/CategoryFinder.php
@@ -64,7 +64,7 @@
/** @var string "AND" or "OR" */
protected $mode;
 
-   /** @var DatabaseBase Read-DB slave */
+   /** @var IDatabase Read-DB slave */
protected $dbr;
 
/**
diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php
index 7215cec..d15232a 100644
--- a/includes/LinkFilter.php
+++ b/includes/LinkFilter.php
@@ -71,7 +71,7 @@
}
 
/**
-* Make an array to be used for calls to DatabaseBase::buildLike(), 
which
+* Make an array to be used for calls to IDatabase::buildLike(), which
 * will match the specified string. There are several kinds of filter 
entry:
 * *.domain.com-  Produces http://com.domain.%, matches 
domain.com
 *and www.domain.com
@@ -89,7 +89,7 @@
 *
 * @param string $filterEntry Domainparts
 * @param string $protocol Protocol (default http://)
-* @return array Array to be passed to DatabaseBase::buildLike() or 
false on error
+* @return array Array to be passed to IDatabase::buildLike() or false 
on error
 */
public static function makeLikeArray( $filterEntry, $protocol = 
'http://' ) {
$db = wfGetDB( DB_SLAVE );
diff --git a/includes/RevisionList.php b/includes/RevisionList.php
index 1df0ca0..4d72c24 100644
--- a/includes/RevisionList.php
+++ b/includes/RevisionList.php
@@ -121,7 +121,7 @@
 
/**
 * Do the DB query to iterate through the objects.
-* @param IDatabase $db DatabaseBase object to use for the query
+* @param IDatabase $db DB object to use for the query
 */
abstract public function doQuery( $db );
 
diff --git a/includes/SiteStats.php b/includes/SiteStats.php
index 64e5ea0..4c76b87 100644
--- a/includes/SiteStats.php
+++ b/includes/SiteStats.php
@@ -281,12 +281,12 @@
 
/**
 * Constructor
-* @param bool|DatabaseBase $database
+* @param bool|IDatabase $database
 * - Boolean: whether to use the master DB
-* - DatabaseBase: database connection to use
+* - IDatabase: database connection to use
 */
public function __construct( $database = false ) {
-   if ( $database instanceof DatabaseBase ) {
+   if ( $database instanceof IDatabase ) {
$this->db = $database;
} else {
$this->db = wfGetDB( $database ? DB_MASTER : DB_SLAVE );
@@ -366,7 +366,7 @@
 *
 * @param IDatabase|bool $database
 * - Boolean: whether to use the master DB
-* - DatabaseBase: database connection to use
+* - IDatabase: database connection to use
 * @param array $options Array of options, may contain the following 
values
 * - activeUsers Boolean: whether to update the number of active users 
(default: false)
 */
diff --git a/includes/UserRightsProxy.php b/includes/UserRightsProxy.php
index 0d1708f..3a3eb53 100644
--- a/includes/UserRightsProxy.php
+++ b/includes/UserRightsProxy.php
@@ -146,7 +146,7 @@
 *
 * @param string $database
 * @param bool $ignoreInvalidDB If true, don't check if $database is in 
$wgLocalDatabases
-* @return DatabaseBase|null If invalid selection
+* @return IDatabase|null If invalid selection
 */
public static function getDB( $database, $ignoreInvalidDB = false ) {
global $wgDBname;
diff --git a/includes/externalstore/ExternalStoreDB.php 
b/includes/externalstore/ExternalStoreDB.php
index cc70960..57d9d71 100644
--- a/includes/externalstore/ExternalStoreDB.php
+++ b/includes/externalstore/ExternalStoreDB.php
@@ -116,7 +116,7 @@
 * 

[MediaWiki-commits] [Gerrit] Added @since to Database - change (mediawiki/core)

2015-10-05 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Added @since to Database
..

Added @since to Database

Change-Id: Ia4396317bb3c78ab6b60ecbf0e1825e44ed08589
---
M includes/db/Database.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/243879/1

diff --git a/includes/db/Database.php b/includes/db/Database.php
index 86ea0c4..f044002 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -4307,6 +4307,9 @@
}
 }
 
+/**
+ * @since 1.27
+ */
 abstract class Database extends DatabaseBase {
// B/C until nothing type hints for DatabaseBase
// @TODO: finish renaming DatabaseBase => Database

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4396317bb3c78ab6b60ecbf0e1825e44ed08589
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] post-merge syntax fixup for f092ee39 - change (operations/puppet)

2015-10-05 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: post-merge syntax fixup for f092ee39
..


post-merge syntax fixup for f092ee39

Change-Id: I733af9f4495f55b17cf7eeae42eb1aa00aa4f94e
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index ddb2bdd..48a1a08 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -400,7 +400,7 @@
}
if (req.http.X-Trusted-Proxy && req.http.X-Forwarded-For) {
// get last from trusted-proxy-supplied XFF
-   set req.http.X-Client-IP = 
regsub(req.http.X-Forwarded-For, "^([^,]+, ?)+", "")
+   set req.http.X-Client-IP = 
regsub(req.http.X-Forwarded-For, "^([^,]+, ?)+", "");
}
} else {
// XRIP from nginx, XFF assumed to be set and contain at least

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I733af9f4495f55b17cf7eeae42eb1aa00aa4f94e
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] post-merge syntax fixup for f092ee39 - change (operations/puppet)

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

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

Change subject: post-merge syntax fixup for f092ee39
..

post-merge syntax fixup for f092ee39

Change-Id: I733af9f4495f55b17cf7eeae42eb1aa00aa4f94e
---
M modules/cdh
M modules/varnish/templates/vcl/wikimedia.vcl.erb
2 files changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/cdh b/modules/cdh
index ccfe4d1..6382780 16
--- a/modules/cdh
+++ b/modules/cdh
-Subproject commit ccfe4d1084a81015397befc68fb3381477f1045d
+Subproject commit 6382780d404d04ecf71c0416e92b4b2972324885
diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index ddb2bdd..48a1a08 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -400,7 +400,7 @@
}
if (req.http.X-Trusted-Proxy && req.http.X-Forwarded-For) {
// get last from trusted-proxy-supplied XFF
-   set req.http.X-Client-IP = 
regsub(req.http.X-Forwarded-For, "^([^,]+, ?)+", "")
+   set req.http.X-Client-IP = 
regsub(req.http.X-Forwarded-For, "^([^,]+, ?)+", "");
}
} else {
// XRIP from nginx, XFF assumed to be set and contain at least

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

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

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


[MediaWiki-commits] [Gerrit] Clean up in mobile.contentOverlays module - change (mediawiki...MobileFrontend)

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

Change subject: Clean up in mobile.contentOverlays module
..


Clean up in mobile.contentOverlays module

Follow-up 2d0ef88d.

* Use valid HTML when using jQuery for parsing (rather than node creation).
  $( '' );
  $( '[ .. ]' );
  https://www.mediawiki.org/wiki/CC/JS#Creating_elements

* Shorthand syntax for border is " 

[MediaWiki-commits] [Gerrit] Add User-Agent support to MultiHttpClient requests - change (mediawiki/core)

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

Change subject: Add User-Agent support to MultiHttpClient requests
..


Add User-Agent support to MultiHttpClient requests

Because it is polite to send a User-Agent (and as part of T114558
investigation).

Change-Id: I5096896d0891c0c9674ff8b4284aaa3ac7293c67
---
M includes/libs/MultiHttpClient.php
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/includes/libs/MultiHttpClient.php 
b/includes/libs/MultiHttpClient.php
index 6af3ed5..49966cf 100644
--- a/includes/libs/MultiHttpClient.php
+++ b/includes/libs/MultiHttpClient.php
@@ -55,6 +55,8 @@
protected $maxConnsPerHost = 50;
/** @var string|null proxy */
protected $proxy;
+   /** @var string */
+   protected $userAgent = 'MW-MultiHttpClient';
 
/**
 * @param array $options
@@ -63,6 +65,7 @@
 *   - proxy   : HTTP proxy to use
 *   - usePipelining   : whether to use HTTP pipelining if possible 
(for all hosts)
 *   - maxConnsPerHost : maximum number of concurrent connections (per 
host)
+*   - userAgent   : The User-Agent header value to send
 * @throws Exception
 */
public function __construct( array $options ) {
@@ -73,7 +76,7 @@
}
}
static $opts = array(
-   'connTimeout', 'reqTimeout', 'usePipelining', 
'maxConnsPerHost', 'proxy'
+   'connTimeout', 'reqTimeout', 'usePipelining', 
'maxConnsPerHost', 'proxy', 'userAgent'
);
foreach ( $opts as $key ) {
if ( isset( $options[$key] ) ) {
@@ -343,6 +346,10 @@
$req['headers']['content-length'] = 0;
}
 
+   if ( !isset( $req['headers']['user-agent'] ) ) {
+   $req['headers']['user-agent'] = $this->userAgent;
+   }
+
$headers = array();
foreach ( $req['headers'] as $name => $value ) {
if ( strpos( $name, ': ' ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5096896d0891c0c9674ff8b4284aaa3ac7293c67
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use mw.loader.load() instead of using() inside try-catch - change (mediawiki...ContentTranslation)

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

Change subject: Use mw.loader.load() instead of using() inside try-catch
..


Use mw.loader.load() instead of using() inside try-catch

Follows-up 726207a668.

Load() is the method exactly for this purpose, where something is
intended to be loaded for the page without a hard requirement on
it existing, nor will it affect other modules in the same batch.

Change-Id: I75c01b0ff29abbf8dca81f2dcd5425e6fd26268f
---
M modules/source/ext.cx.source.js
1 file changed, 2 insertions(+), 6 deletions(-)

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



diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index cfba1af..8498c45 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -166,12 +166,8 @@
this.$content.find( 'base' ).detach();
 
mw.hook( 'mw.cx.source.ready' ).fire();
-   // Try to load ext.cite.style module. If Cite extension is not 
present, this can fail.
-   try {
-   mw.loader.using( 'ext.cite.style' );
-   } catch ( e ) {
-   mw.log( 'Could not load ext.cite.style, References will 
fallback to default style' );
-   }
+   // Try to load Cite styles. Silently ignored if not installed.
+   mw.loader.load( 'ext.cite.style' );
 
// Set absolute URLs for source links href attributes so that 
the links
// point to correct wiki instead of relative URL to current wiki

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75c01b0ff29abbf8dca81f2dcd5425e6fd26268f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
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 bogus wfGetDB() param - change (mediawiki...Gather)

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

Change subject: Remove bogus wfGetDB() param
..


Remove bogus wfGetDB() param

Change-Id: Iac653a89489645892ab0786a246ac43e14e92048
---
M includes/api/ApiEditList.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/api/ApiEditList.php b/includes/api/ApiEditList.php
index cd6c8f2..85ead7f 100644
--- a/includes/api/ApiEditList.php
+++ b/includes/api/ApiEditList.php
@@ -127,7 +127,7 @@
$isNew = $listId === null;
$isWatchlist = $listId === 0;
 
-   $dbw = wfGetDB( DB_MASTER, 'api' );
+   $dbw = wfGetDB( DB_MASTER );
$logEventName = false;
 
if ( $isNew || $isWatchlist ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac653a89489645892ab0786a246ac43e14e92048
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] OO.EventEmitter: Allow disconnecting events given by array - change (oojs/core)

2015-10-05 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: OO.EventEmitter: Allow disconnecting events given by array
..

OO.EventEmitter: Allow disconnecting events given by array

OO.EventEmitter allows to connect events by array shorthand, it
should also allow to disconnect these events.

Change-Id: I41d50d8034282131ba3512c5cc0d61c4214663bb
---
M src/EventEmitter.js
M tests/unit/EventEmitter.test.js
2 files changed, 34 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/26/243726/1

diff --git a/src/EventEmitter.js b/src/EventEmitter.js
index 7b57193..dbb337f 100644
--- a/src/EventEmitter.js
+++ b/src/EventEmitter.js
@@ -222,12 +222,16 @@
 * @chainable
 */
oo.EventEmitter.prototype.disconnect = function ( context, methods ) {
-   var i, event, bindings;
+   var i, event, method, bindings;
 
if ( methods ) {
// Remove specific connections to the context
for ( event in methods ) {
-   this.off( event, methods[ event ], context );
+   method = methods[ event ];
+   if ( Array.isArray( method ) ) {
+   method = method[ 0 ];
+   }
+   this.off( event, method, context );
}
} else {
// Remove all connections to the context
diff --git a/tests/unit/EventEmitter.test.js b/tests/unit/EventEmitter.test.js
index fdf0637..c3070de 100644
--- a/tests/unit/EventEmitter.test.js
+++ b/tests/unit/EventEmitter.test.js
@@ -251,6 +251,34 @@
assert.deepEqual( hits, { foo: 1, bar: 2 } );
} );
 
+   QUnit.test( 'disconnect( host, array methods )', 1, function ( assert ) 
{
+   var host,
+   hits = { foo: 0, barbara: 0 },
+   ee = new oo.EventEmitter();
+
+   host = {
+   onFoo: function () {
+   hits.foo++;
+   },
+   barbara: function () {
+   hits.barbara++;
+   }
+   };
+
+   ee.connect( host, {
+   foo: 'onFoo',
+   bar: [ 'barbara', 'some', 'parameter' ]
+   } );
+   ee.emit( 'foo' );
+   ee.emit( 'bar' );
+
+   ee.disconnect( host, { bar: [ 'barbara' ] } );
+   ee.emit( 'foo' );
+   ee.emit( 'bar' );
+
+   assert.deepEqual( hits, { foo: 2, barbara: 1 } );
+   } );
+
QUnit.test( 'disconnect( host, unbound methods )', 1, function ( assert 
) {
var host,
ee = new oo.EventEmitter();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41d50d8034282131ba3512c5cc0d61c4214663bb
Gerrit-PatchSet: 1
Gerrit-Project: oojs/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 

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


[MediaWiki-commits] [Gerrit] remove ishmael service - change (operations/dns)

2015-10-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: remove ishmael service
..

remove ishmael service

Bug:T109777
Change-Id: If61c9fa3fe5f47dff7d780dbcee61a979d1d4aa8
---
M templates/wikimedia.org
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/27/243727/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 219bb8c..51e6bb6 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -615,7 +615,6 @@
 ganglia  1H  IN CNAMEuranium
 hue  1H  IN CNAMEmisc-web-lb.eqiad
 iegreview1H  IN CNAMEmisc-web-lb.eqiad
-ishmael  1H  IN CNAMEmisc-web-lb.eqiad
 tendril  1H  IN CNAMEneon
 jobs 600 IN DYNA geoip!text-addrs
 labs 600 IN DYNA geoip!text-addrs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If61c9fa3fe5f47dff7d780dbcee61a979d1d4aa8
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] Categories in templates shouldn't force a line break during ... - change (mediawiki...parsoid)

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

Change subject: Categories in templates shouldn't force a line break during 
html2wt
..


Categories in templates shouldn't force a line break during html2wt

* Followup to 0337bb3b.
* Bug found in rt-testing.
* Added couple explicit tests to clarify expectation.
* Undid changes to:
  - the parser test that was incorrectly updated
in 0337bb3b to prevent it from failing.
  - mocha tests that were also incorrectly updated
in 0337bb3b to prevent them from failing.

Change-Id: I04f7ade6c4da701e57ba927dba4e2a3752bf5f40
---
M lib/wts.TagHandlers.js
M tests/mocha/jsapi.js
M tests/parserTests.txt
3 files changed, 29 insertions(+), 5 deletions(-)

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



diff --git a/lib/wts.TagHandlers.js b/lib/wts.TagHandlers.js
index 0f42bd4..2c1a605 100644
--- a/lib/wts.TagHandlers.js
+++ b/lib/wts.TagHandlers.js
@@ -1171,7 +1171,9 @@
sepnls: {
before: function(node, otherNode) {
// sol-transparent link nodes are the only 
thing on their line
-   if (DU.isSolTransparentLink(node) && 
!DU.isBody(otherNode)) {
+   if (DU.isSolTransparentLink(node) &&
+   !DU.isEncapsulationWrapper(node) &&
+   !DU.isBody(otherNode)) {
return { min: 1 };
} else {
return {};
@@ -1179,7 +1181,9 @@
},
after: function(node, otherNode, state) {
// sol-transparent link nodes are the only 
thing on their line
-   if (DU.isSolTransparentLink(node) && 
!DU.isBody(otherNode)) {
+   if (DU.isSolTransparentLink(node) &&
+   !DU.isEncapsulationWrapper(node) &&
+   !DU.isBody(otherNode)) {
return { min: 1 };
} else {
return {};
diff --git a/tests/mocha/jsapi.js b/tests/mocha/jsapi.js
index 8acad1b..c777365 100644
--- a/tests/mocha/jsapi.js
+++ b/tests/mocha/jsapi.js
@@ -87,7 +87,7 @@
template.name = 'bar-stub';
}
});
-   String(pdoc).should.equal("{{cleanup|date = July 2012}} 
'''Foo''' is a [[bar]]. {{bar-stub}}\n");
+   String(pdoc).should.equal("{{cleanup|date = July 2012}} 
'''Foo''' is a [[bar]]. {{bar-stub}}");
});
});
 });
@@ -105,7 +105,7 @@
template.add('test2', 
Parsoid.PNodeList.fromHTML(pdoc, "I'm so bold!"));
}
});
-   String(pdoc).should.equal("{{echo|{{cleanup|date = July 
2012|test1 = {{foo}}{{!}}bat|test2 = 
I'm so '''bold'''!}} '''Foo''' is a [[bar]].}} {{uncategorized}}\n");
+   String(pdoc).should.equal("{{echo|{{cleanup|date = July 
2012|test1 = {{foo}}{{!}}bat|test2 = 
I'm so '''bold'''!}} '''Foo''' is a [[bar]].}} {{uncategorized}}");
});
});
it('is safe to mutate template arguments', function() {
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 15f1cd1..89386a1 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -24932,7 +24932,7 @@
 !! html/parsoid
 foo 
 !! wikitext
-== {{echo|foo [[Category:Foo]]}}  ==
+== {{echo|foo [[Category:Foo]]}} ==
 !! end
 
 !! test
@@ -25682,6 +25682,26 @@
 # 
 
 !! test
+1. Categories should always be serialized on their own line
+!! options
+parsoid=html2wt
+!! html/parsoid
+foobar
+!! wikitext
+foo
+[[Category:Foo]]
+bar
+!! end
+
+!! test
+2. Categories that are part of templates should not introduce a line break
+!! wikitext
+foo {{echo|bar [[Category:baz]]}} bar
+!! html/parsoid
+foo bar 
 bar
+!! end
+
+!! test
 Lists: Add space after bullets
 !! options
 parsoid=html2wt

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04f7ade6c4da701e57ba927dba4e2a3752bf5f40
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] Fix DatabaseMysqlBase.php IDEA errors - change (mediawiki/core)

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

Change subject: Fix DatabaseMysqlBase.php IDEA errors
..


Fix DatabaseMysqlBase.php IDEA errors

* Declare base mysqlRealEscapeString()
* Fix MySQLField::tableName() return value

Change-Id: I1277166e741e69cb1c045b3baa6ed8de664e9255
---
M includes/db/DatabaseMysqlBase.php
M tests/phpunit/includes/db/DatabaseMysqlBaseTest.php
2 files changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/includes/db/DatabaseMysqlBase.php 
b/includes/db/DatabaseMysqlBase.php
index ac7ce10..d2ccbf4 100644
--- a/includes/db/DatabaseMysqlBase.php
+++ b/includes/db/DatabaseMysqlBase.php
@@ -573,6 +573,12 @@
}
 
/**
+* @param string $s
+* @return mixed
+*/
+   abstract protected function mysqlRealEscapeString( $s );
+
+   /**
 * MySQL uses `backticks` for identifier quoting instead of the sql 
standard "double quotes".
 *
 * @param string $s
@@ -1250,7 +1256,7 @@
 * @return string
 */
function tableName() {
-   return $this->tableName;
+   return $this->tablename;
}
 
/**
diff --git a/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php 
b/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php
index 42ea58e..8c09471 100644
--- a/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php
+++ b/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php
@@ -79,6 +79,10 @@
protected function mysqlPing() {
}
 
+   protected function mysqlRealEscapeString( $s ) {
+
+   }
+
// From interface DatabaseType
function insertId() {
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1277166e741e69cb1c045b3baa6ed8de664e9255
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Parent5446 
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 tox-jessie to pywikibot/core - change (integration/config)

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

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

Change subject: Add tox-jessie to pywikibot/core
..

Add tox-jessie to pywikibot/core

So we can play test running all the envs in a Jessie instance.

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/98/243798/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index f653805..8a6b05d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7703,6 +7703,8 @@
   - pywikibot-core-tox-nose
   - pywikibot-core-tox-nose34-jessie
   - tox-doc-jessie
+experimental:
+  - tox-jessie
 postmerge:
   - pywikibot-core-tox-doc-publish
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9cae59e1122ae494911cd6faa7041cc9e957fe5
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] puppetmaster: Quote variable inclusions - change (operations/puppet)

2015-10-05 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: puppetmaster: Quote variable inclusions
..

puppetmaster: Quote variable inclusions

Change-Id: I7f64a5d4b544c055a56e7ade830dd10c1600c842
---
M modules/puppetmaster/manifests/gitsync.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/243804/1

diff --git a/modules/puppetmaster/manifests/gitsync.pp 
b/modules/puppetmaster/manifests/gitsync.pp
index c190b50..bb3f2b5 100644
--- a/modules/puppetmaster/manifests/gitsync.pp
+++ b/modules/puppetmaster/manifests/gitsync.pp
@@ -17,7 +17,7 @@
 cron { 'rebase_operations_puppet':
 ensure  => present,
 user=> 'root',
-minute  => "*/$run_every_minutes",
+minute  => "*/${run_every_minutes}",
 command => '/usr/local/bin/git-sync-upstream 
>>/var/log/git-sync-upstream.log 2>&1',
 require => File['/usr/local/bin/git-sync-upstream'],
 }

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

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

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


[MediaWiki-commits] [Gerrit] tools: Fix typo - change (operations/puppet)

2015-10-05 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Fix typo
..

tools: Fix typo

Change-Id: I7b2780383f375f1203562cfdbf6ab0d549cb46ae
---
M manifests/role/tools.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/manifests/role/tools.pp b/manifests/role/tools.pp
index 64b98c6..71a3b7e 100644
--- a/manifests/role/tools.pp
+++ b/manifests/role/tools.pp
@@ -20,7 +20,7 @@
 
 class role::toollabs::puppet::master {
 include ::toollabs::infrastructure
-include ::toollabs;:puppetmaster
+include ::toollabs::puppetmaster
 }
 
 class role::toollabs::puppet::client {

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

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

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


[MediaWiki-commits] [Gerrit] Do Not Track: Don't even accumulate log or call EL - change (mediawiki...CentralNotice)

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

Change subject: Do Not Track: Don't even accumulate log or call EL
..


Do Not Track: Don't even accumulate log or call EL

Change-Id: I45fc9306642ff9c291e7c6caa9bf3730d63ccb49
---
M resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
1 file changed, 18 insertions(+), 1 deletion(-)

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



diff --git a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js 
b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
index 9eaa1e7..8f30a44 100644
--- a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
+++ b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
@@ -10,6 +10,7 @@
var cn = mw.centralNotice, // Guaranteed to exist; we depend on display 
RL module
bhLogger,
mixin = new cn.Mixin( 'bannerHistoryLogger' ),
+   doNotTrackEnabled = /1|yes/.test( navigator.doNotTrack ),
now = Math.round( ( new Date() ).getTime() / 1000 ),
log,
readyToLogDeferredObj = $.Deferred(),
@@ -221,12 +222,22 @@
} else {
// If KV storage works here, do our stuff
loadLog();
-   log.push( makeLogEntry() );
+
+   // Only don't accumulate log entries if DNT is 
enabled... But do
+   // purge old entries.
+   if ( !doNotTrackEnabled ) {
+   log.push( makeLogEntry() );
+   }
 
purgeOldLogEntries( mixinParams.maxEntryAge,
mixinParams.maxEntries );
 
storeLog();
+   }
+
+   // Bow out now if DNT
+   if ( doNotTrackEnabled ) {
+   return;
}
 
// Load needed resources
@@ -301,6 +312,12 @@
 
var deferred = $.Deferred();
 
+   // Bow out if DNT
+   if ( doNotTrackEnabled ) {
+   deferred.resolve();
+   return deferred.promise();
+   }
+
// It's likely that this will be resolved by the time 
we get here
readyToLogDeferredObj.done( function() {
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45fc9306642ff9c291e7c6caa9bf3730d63ccb49
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
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 DatabaseSqlite::__toString - change (mediawiki/core)

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

Change subject: Fix DatabaseSqlite::__toString
..


Fix DatabaseSqlite::__toString

Failed with "Catchable fatal error: Object of class
PDO could not be converted to string in".

The message I used was a rather arbitrary choice, but
I think it makes sense.

Bug: T114709
Change-Id: I0023fae3fa2a0c2b37cb3c34751706fe0d481d19
---
M includes/db/DatabaseSqlite.php
M tests/phpunit/includes/db/DatabaseSqliteTest.php
2 files changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php
index e909597..dd65042 100644
--- a/includes/db/DatabaseSqlite.php
+++ b/includes/db/DatabaseSqlite.php
@@ -1032,6 +1032,14 @@
 
return $endArray;
}
+
+   /**
+* @return string
+*/
+   public function __toString() {
+   return 'SQLite ' . (string)$this->mConn->getAttribute( 
PDO::ATTR_SERVER_VERSION );
+   }
+
 } // end DatabaseSqlite class
 
 /**
diff --git a/tests/phpunit/includes/db/DatabaseSqliteTest.php 
b/tests/phpunit/includes/db/DatabaseSqliteTest.php
index 9307b0c..0db7af9 100644
--- a/tests/phpunit/includes/db/DatabaseSqliteTest.php
+++ b/tests/phpunit/includes/db/DatabaseSqliteTest.php
@@ -482,4 +482,12 @@
 
$this->assertTrue( $db->close(), "closing database" );
}
+
+   public function testToString() {
+   $db = DatabaseSqlite::newStandaloneInstance( ':memory:' );
+
+   $toString = (string)$db;
+
+   $this->assertContains( 'SQLite ', $toString );
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0023fae3fa2a0c2b37cb3c34751706fe0d481d19
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] proofreadpage.py: purge IndexPage when Index has no required... - change (pywikibot/core)

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

Change subject: proofreadpage.py: purge IndexPage when Index has no required 
class set
..


proofreadpage.py: purge IndexPage when Index has no required class set

Purge index if class="qualityN prp-pagequality-N" is not found in HTML
parsing of IndexPage.

Raise ValueError if page.purge() has no effect.

Bug: T114318
Change-Id: I342df4e5b5e2743dbb5bdb8f55296e07242b6b58
---
M pywikibot/proofreadpage.py
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py
index a14e2f2..1bc70cd 100644
--- a/pywikibot/proofreadpage.py
+++ b/pywikibot/proofreadpage.py
@@ -385,6 +385,16 @@
 #href="/wiki/Page:xxx.djvu/n"
 #title="Page:xxx.djvu/n">m
 # 
+# Try to purge or raise ValueError.
+if not self._soup.find_all('a', attrs=attrs):
+self.purge()
+del self._parsed_text
+self._parsed_text = self._get_parsed_page()
+self._soup = BeautifulSoup(self._parsed_text, 'html.parser')
+if not self._soup.find_all('a', attrs=attrs):
+raise ValueError(
+'Missing class="qualityN prp-pagequality-N" in: %s.'
+% self)
 
 page_cnt = 0
 for a_tag in self._soup.find_all('a', attrs=attrs):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I342df4e5b5e2743dbb5bdb8f55296e07242b6b58
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] resourceloader: Tiny optimization to ResourceLoader::isValid... - change (mediawiki/core)

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

Change subject: resourceloader: Tiny optimization to 
ResourceLoader::isValidModuleName()
..


resourceloader: Tiny optimization to ResourceLoader::isValidModuleName()

This is a micro-optimization, but ResourceLoader is so well-optimized at this
point that the call to PCRE accounts for 1.25% of all load.php CPU time. So
might as well making it a tiny bit faster.

Change-Id: Iefab804a6ca6d54ce230958513a3bea44f4e7c62
---
M includes/resourceloader/ResourceLoader.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 002b4ea..77ceff6 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -1580,7 +1580,7 @@
 * @return bool Whether $moduleName is a valid module name
 */
public static function isValidModuleName( $moduleName ) {
-   return !preg_match( '/[|,!]/', $moduleName ) && strlen( 
$moduleName ) <= 255;
+   return strcspn( $moduleName, '!,|', 0, 255 ) === strlen( 
$moduleName );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iefab804a6ca6d54ce230958513a3bea44f4e7c62
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CRM-17176 further fix to navigation reset - change (wikimedia...civicrm)

2015-10-05 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17176 further fix to navigation reset
..

CRM-17176 further fix to navigation reset

The reset was stealing menu items from other menus as a result of the having 
the same name

Change-Id: I806b037254f51c04b94f0d07bb897d05bcf8b6fd
---
M CRM/Core/BAO/Navigation.php
1 file changed, 23 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/37/243737/1

diff --git a/CRM/Core/BAO/Navigation.php b/CRM/Core/BAO/Navigation.php
index 4319e07..9d2ad9f 100644
--- a/CRM/Core/BAO/Navigation.php
+++ b/CRM/Core/BAO/Navigation.php
@@ -874,7 +874,8 @@
   elseif ($component['name'] === 'CiviCampaign') {
 $permission = "access CiviReport";
   }
-  $component_nav = self::createOrUpdateReportNavItem($component_nav_name, 
'civicrm/report/list', "compid={$component_id}=1", $reports_nav->id, 
$permission, $domain_id);
+  $component_nav = self::createOrUpdateReportNavItem($component_nav_name, 
'civicrm/report/list',
+"compid={$component_id}=1", $reports_nav->id, $permission, 
$domain_id, TRUE);
   foreach ($component['reports'] as $report_id => $report) {
 // Create or update the report instance links.
 $report_nav = self::createOrUpdateReportNavItem($report['title'], 
$report['url'], 'reset=1', $component_nav->id, $report['permission'], 
$domain_id);
@@ -922,17 +923,17 @@
* @param string $url
* @param array $url_params
*
-   * @return bool|\CRM_Core_DAO
+   * @param int|null $parent_id
+   *   Optionally restrict to one parent.
+   *
+   * @return bool|\CRM_Core_BAO_Navigation
*/
-  public static function getNavItemByUrl($url, $url_params) {
-$query = "SELECT * FROM civicrm_navigation WHERE url = %1";
-$params = array(
-  1 => array("{$url}?{$url_params}", 'String'),
-);
-$dao = CRM_Core_DAO::executeQuery($query, $params, TRUE, 
'CRM_Core_DAO_Navigation');
-$dao->fetch();
-if (isset($dao->id)) {
-  return $dao;
+  public static function getNavItemByUrl($url, $url_params, $parent_id = NULL) 
{
+$nav = new CRM_Core_BAO_Navigation();
+$nav->url = "{$url}?{$url_params}";
+$nav->parent_id = $parent_id;
+if ($nav->find(TRUE)) {
+  return $nav;
 }
 return FALSE;
   }
@@ -991,14 +992,21 @@
* @param string $permission
* @param int $domain_id
*
+   * @param bool $onlyMatchParentID
+   *   If True then do not match with a url that has a different parent
+   *   (This is because for top level items there is a risk of 'stealing' rows 
that normally
+   *   live under 'Contact' and intentionally duplicate the report examples.)
+   *
* @return \CRM_Core_DAO_Navigation
*/
-  protected static function createOrUpdateReportNavItem($name, $url, 
$url_params, $parent_id, $permission, $domain_id) {
+  protected static function createOrUpdateReportNavItem($name, $url, 
$url_params, $parent_id, $permission,
+$domain_id, 
$onlyMatchParentID = FALSE) {
 $id = NULL;
-$existing_nav = CRM_Core_BAO_Navigation::getNavItemByUrl($url, 
$url_params);
+$existing_nav = CRM_Core_BAO_Navigation::getNavItemByUrl($url, 
$url_params, ($onlyMatchParentID ? $parent_id : NULL));
 if ($existing_nav) {
   $id = $existing_nav->id;
 }
+
 $nav = self::createReportNavItem($name, $url, $url_params, $parent_id, 
$permission, $id, $domain_id);
 return $nav;
   }
@@ -1032,11 +1040,10 @@
   ),
   'domain_id' => $domain_id,
 );
-if ($id !== NULL) {
+if ($id) {
   $params['id'] = $id;
 }
-$nav = CRM_Core_BAO_Navigation::add($params);
-return $nav;
+return CRM_Core_BAO_Navigation::add($params);
   }
 
   /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I806b037254f51c04b94f0d07bb897d05bcf8b6fd
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] CRM-17326 add isset check to timezone retrieval - change (wikimedia...civicrm)

2015-10-05 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17326 add isset check to timezone retrieval
..

CRM-17326 add isset check to timezone retrieval

This addresses an e-notice

Change-Id: I82d3314bc2e28cca64ec9f4ed4d64477c50b7303
---
M CRM/Utils/System/Drupal.php
M CRM/Utils/System/Drupal6.php
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/38/243738/1

diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php
index 105bab5..df65787 100644
--- a/CRM/Utils/System/Drupal.php
+++ b/CRM/Utils/System/Drupal.php
@@ -761,7 +761,8 @@
*/
   public function getTimeZoneString() {
 global $user;
-if (variable_get('configurable_timezones', 1) && $user->uid && 
strlen($user->timezone)) {
+// Note that 0 is a valid timezone (GMT) so we use strlen not empty to 
check.
+if (variable_get('configurable_timezones', 1) && $user->uid && 
isset($user->timezone) && strlen($user->timezone)) {
   $timezone = $user->timezone;
 }
 else {
diff --git a/CRM/Utils/System/Drupal6.php b/CRM/Utils/System/Drupal6.php
index 9a9d69d..a06cf3e 100644
--- a/CRM/Utils/System/Drupal6.php
+++ b/CRM/Utils/System/Drupal6.php
@@ -729,7 +729,8 @@
*/
   public function getTimeZoneString() {
 global $user;
-if (variable_get('configurable_timezones', 1) && $user->uid && 
strlen($user->timezone)) {
+// Note that 0 is a valid timezone (GMT) so we use strlen not empty to 
check.
+if (variable_get('configurable_timezones', 1) && $user->uid && 
isset($user->timezone) && strlen($user->timezone)) {
   $timezone = $user->timezone;
 }
 else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82d3314bc2e28cca64ec9f4ed4d64477c50b7303
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] lint: re-enable 'variable not enclosed' check - change (operations/puppet)

2015-10-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: lint: re-enable 'variable not enclosed' check
..

lint: re-enable 'variable not enclosed' check

All 'variable not enclosed'-warnings have recently been fixed
in the entire repo.

So now we can (re-)-enable this check.

Change-Id: I135ee48d890b87fcddb6c568b98c1bd3b5bb9852
---
M .puppet-lint.rc
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/.puppet-lint.rc b/.puppet-lint.rc
index 38c888f..a25cbd0 100644
--- a/.puppet-lint.rc
+++ b/.puppet-lint.rc
@@ -22,7 +22,7 @@
 --no-documentation-check
 
 # Variables should be enclosed in {}
---no-variables_not_enclosed-check
+# --no-variables_not_enclosed-check
 
 # We use dash in class and variables.
 --no-names_containing_dash-check

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

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

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


[MediaWiki-commits] [Gerrit] Fix deprecation warnings - change (mediawiki...ZeroBanner)

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

Change subject: Fix deprecation warnings
..


Fix deprecation warnings

Will hopefully fix unknown error with banner
rendering in middle of page.

Bug: T114128
Change-Id: If71b039e0472e99744e0e26c543f497461ca764c
(cherry picked from commit 0f6c2af536b73239884b2cd2a48ea36523d4e01b)
---
M ZeroBanner.php
M includes/ZeroSpecialPage.php
M modules/ZeroInfo.js
M modules/ZeroOverlay.js
M modules/banner.js
M modules/interstitial.js
M modules/interstitial.less
7 files changed, 15 insertions(+), 9 deletions(-)

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



diff --git a/ZeroBanner.php b/ZeroBanner.php
index 52737c6..aba96ec 100644
--- a/ZeroBanner.php
+++ b/ZeroBanner.php
@@ -72,6 +72,8 @@
 $wgResourceModules['zerobanner'] = array(
'dependencies' => array(
'mobile.overlays',
+   'mobile.settings',
+   'mobile.startup',
'oojs-ui',
'zerobanner.styles'
),
diff --git a/includes/ZeroSpecialPage.php b/includes/ZeroSpecialPage.php
index a907488..263a70f 100644
--- a/includes/ZeroSpecialPage.php
+++ b/includes/ZeroSpecialPage.php
@@ -462,7 +462,7 @@
$cfg = PageRendering::getJsConfigBlock( 
$this, $xcs, $config, false );
}
if ( $banner ) {
-   $banner = 'document.write(' . 
Xml::encodeJsVar( $banner ) . ');';
+   $banner = '$(\'body\').prepend(' . 
Xml::encodeJsVar( $banner ) . ');';
}
$banner = $cfg . $banner;
}
@@ -516,7 +516,7 @@
} else {
$response->header( 'Content-type: image/gif' );
}
-   echo $banner;
+   echo ResourceLoader::makeInlineScript( $banner );
return true;
}
 
diff --git a/modules/ZeroInfo.js b/modules/ZeroInfo.js
index 49344b6..8af9cb6 100644
--- a/modules/ZeroInfo.js
+++ b/modules/ZeroInfo.js
@@ -1,8 +1,8 @@
 /* global mw, OO, jQuery */
 ( function( M, $ ) {
'use strict';
-   var settings = M.require( 'settings' ),
-   router = M.require( 'router' ),
+   var settings = M.require( 'mobile.settings/settings' ),
+   router = M.require( 'mobile.startup/router' ),
ZeroInfo,
windowManager;
 
diff --git a/modules/ZeroOverlay.js b/modules/ZeroOverlay.js
index 6c10fca..b326e51 100644
--- a/modules/ZeroOverlay.js
+++ b/modules/ZeroOverlay.js
@@ -1,9 +1,9 @@
 /* global mw, jQuery */
 ( function( M, $ ) {
'use strict';
-   var settings = M.require( 'settings' ),
-   router = M.require( 'router' ),
-   ContentOverlay = M.require( 'ContentOverlay' ),
+   var settings = M.require( 'mobile.settings/settings' ),
+   router = M.require( 'mobile.startup/router' ),
+   ContentOverlay = M.require( 'mobile.overlays/ContentOverlay' ),
ZeroOverlay,
cfg = window && window.zeroGlobalConfig || false;
 
diff --git a/modules/banner.js b/modules/banner.js
index 43fd189..4fbe9a4 100644
--- a/modules/banner.js
+++ b/modules/banner.js
@@ -3,7 +3,7 @@
var m = ( function() {
function initBanner( banner ) {
var cookieNameZeroVisibility = banner.getAttribute( 
'id' ),
-   settings = M.require('settings'),
+   settings = M.require( 
'mobile.settings/settings' ),
saveUserSetting = settings.save,
getUserSetting = settings.get,
visibility,
diff --git a/modules/interstitial.js b/modules/interstitial.js
index 557f487..ce05974 100644
--- a/modules/interstitial.js
+++ b/modules/interstitial.js
@@ -6,7 +6,7 @@
hostname = document.location.hostname.toLowerCase(), // 
hostname of the current page
isMdot = hostname.indexOf( '.m.' ) !== -1,
isHttps = window.location.protocol === 'https:',
-   settings = M.require('settings'), // module for 
reading/writing user settings
+   settings = M.require( 'mobile.settings/settings' ), // 
module for reading/writing user settings
// this is set if operator zero-rates HTTPS
supportsTls = config ? config.enabled && 
config.enableHttps : $.cookie( 'ZeroOpts' ) === 'tls',
getConfig = config ? config : ( function () {
diff --git a/modules/interstitial.less b/modules/interstitial.less
index ff5131f..9e01631 100644
--- a/modules/interstitial.less
+++ b/modules/interstitial.less
@@ 

[MediaWiki-commits] [Gerrit] puppetmaster: Quote variable inclusions - change (operations/puppet)

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

Change subject: puppetmaster: Quote variable inclusions
..


puppetmaster: Quote variable inclusions

Change-Id: I7f64a5d4b544c055a56e7ade830dd10c1600c842
---
M modules/puppetmaster/manifests/gitsync.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/puppetmaster/manifests/gitsync.pp 
b/modules/puppetmaster/manifests/gitsync.pp
index c190b50..bb3f2b5 100644
--- a/modules/puppetmaster/manifests/gitsync.pp
+++ b/modules/puppetmaster/manifests/gitsync.pp
@@ -17,7 +17,7 @@
 cron { 'rebase_operations_puppet':
 ensure  => present,
 user=> 'root',
-minute  => "*/$run_every_minutes",
+minute  => "*/${run_every_minutes}",
 command => '/usr/local/bin/git-sync-upstream 
>>/var/log/git-sync-upstream.log 2>&1',
 require => File['/usr/local/bin/git-sync-upstream'],
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f64a5d4b544c055a56e7ade830dd10c1600c842
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] tools.pp: typo fix - change (operations/puppet)

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

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

Change subject: tools.pp:  typo fix
..

tools.pp:  typo fix

Change-Id: If133f8d4ce39eabe9d6ed3a86ce26ea60b111ab0
---
M manifests/role/tools.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/07/243807/1

diff --git a/manifests/role/tools.pp b/manifests/role/tools.pp
index 64b98c6..71a3b7e 100644
--- a/manifests/role/tools.pp
+++ b/manifests/role/tools.pp
@@ -20,7 +20,7 @@
 
 class role::toollabs::puppet::master {
 include ::toollabs::infrastructure
-include ::toollabs;:puppetmaster
+include ::toollabs::puppetmaster
 }
 
 class role::toollabs::puppet::client {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If133f8d4ce39eabe9d6ed3a86ce26ea60b111ab0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] tools: Fix typo - change (operations/puppet)

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

Change subject: tools: Fix typo
..


tools: Fix typo

Change-Id: I7b2780383f375f1203562cfdbf6ab0d549cb46ae
---
M manifests/role/tools.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/role/tools.pp b/manifests/role/tools.pp
index 64b98c6..71a3b7e 100644
--- a/manifests/role/tools.pp
+++ b/manifests/role/tools.pp
@@ -20,7 +20,7 @@
 
 class role::toollabs::puppet::master {
 include ::toollabs::infrastructure
-include ::toollabs;:puppetmaster
+include ::toollabs::puppetmaster
 }
 
 class role::toollabs::puppet::client {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b2780383f375f1203562cfdbf6ab0d549cb46ae
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] tools: Move toolswatcher into puppet - change (operations/puppet)

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

Change subject: tools: Move toolswatcher into puppet
..


tools: Move toolswatcher into puppet

Change-Id: I48b34f350031682891464a07d66e5c77ee3560c1
---
A modules/toollabs/files/toolwatcher
M modules/toollabs/files/toolwatcher.conf
M modules/toollabs/manifests/toolwatcher.pp
3 files changed, 53 insertions(+), 8 deletions(-)

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



diff --git a/modules/toollabs/files/toolwatcher 
b/modules/toollabs/files/toolwatcher
new file mode 100755
index 000..35d0d50
--- /dev/null
+++ b/modules/toollabs/files/toolwatcher
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Copyright © 2013 Marc-André Pelletier 
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+cd /data/project
+export HOME=/root
+PREFIX=$(cat /etc/wmflabs-project)
+
+while true; do
+# Iterate over all service groups of this project.
+getent passwd | sed -ne "s/^$PREFIX\\.\([^:]\+\):.*\$/\\1/p;" | while read 
TOOL; do
+# If the service group's home directory doesn't exist already,
+# create it with a basic structure and especially set setgid
+# on the directories so that files created are owned by the
+# service group's group.
+if [ ! -d "$TOOL" ]; then
+logger -t toolwatcher "Creating tool $TOOL"
+
+mkdir -m u=rwx,g=rwsx,o=rx "$TOOL" "$TOOL/public_html"
+chown -R "$PREFIX.$TOOL:$PREFIX.$TOOL" "$TOOL"
+fi
+done
+
+# Sleep for two minutes.
+sleep 120
+done
diff --git a/modules/toollabs/files/toolwatcher.conf 
b/modules/toollabs/files/toolwatcher.conf
index 97ad7d9..7995022 100644
--- a/modules/toollabs/files/toolwatcher.conf
+++ b/modules/toollabs/files/toolwatcher.conf
@@ -5,4 +5,4 @@
 
 respawn
 
-exec /usr/sbin/toolwatcher
+exec /usr/local/sbin/toolwatcher
diff --git a/modules/toollabs/manifests/toolwatcher.pp 
b/modules/toollabs/manifests/toolwatcher.pp
index 35860f5..c5f86e1 100644
--- a/modules/toollabs/manifests/toolwatcher.pp
+++ b/modules/toollabs/manifests/toolwatcher.pp
@@ -3,19 +3,26 @@
 # yet.  For each such tool account, the toolwatcher creates the home
 # directory with the subdirectory public_html owned by the tool
 # account and its group and sets the permissions to g+srwx,o+rx.
-class toollabs::toolwatcher
-inherits toollabs {
-file { '/etc/init/toolwatcher.conf':
-ensure => file,
-source => 'puppet:///modules/toollabs/toolwatcher.conf',
+class toollabs::toolwatcher inherits toollabs {
+file { '/usr/local/sbin/toolwatcher':
+source => 'puppet:///modules/toollabs/toolwatcher',
 owner  => 'root',
 group  => 'root',
-mode   => '0444',
+mode   => '0555',
+}
+
+file { '/etc/init/toolwatcher.conf':
+ensure  => file,
+source  => 'puppet:///modules/toollabs/toolwatcher.conf',
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+require => File['/usr/local/sbin/toolwatcher'],
 }
 
 service { 'toolwatcher':
 ensure=> running,
 provider  => 'upstart',
-subscribe => [File['/etc/init/toolwatcher.conf'], 
Package['misctools']],
+subscribe => File['/etc/init/toolwatcher.conf'],
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48b34f350031682891464a07d66e5c77ee3560c1
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] elasticsearch: Set nobelium cluster name explicitly - change (operations/puppet)

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

Change subject: elasticsearch: Set nobelium cluster name explicitly
..


elasticsearch: Set nobelium cluster name explicitly

To prevent it from trying to join the other cluster

Change-Id: I1326a2f6f7a1e042c042e8252568ea294d72be02
---
M hieradata/hosts/nobelium.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/hosts/nobelium.yaml b/hieradata/hosts/nobelium.yaml
index f2031a6..acba835 100644
--- a/hieradata/hosts/nobelium.yaml
+++ b/hieradata/hosts/nobelium.yaml
@@ -3,3 +3,4 @@
 
 elasticsearch::master_eligible: true
 elasticsearch::minimum_master_nodes: 1
+elasticsearch::cluster_name: labsearch

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1326a2f6f7a1e042c042e8252568ea294d72be02
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Yuvipanda 
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 unused checkExecutePermissions() return value - change (mediawiki/core)

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

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

Change subject: Remove unused checkExecutePermissions() return value
..

Remove unused checkExecutePermissions() return value

Change-Id: I9827a34ab0770f5a097df31fd15aec7bf00fed5d
---
M includes/specials/SpecialPasswordReset.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/243731/1

diff --git a/includes/specials/SpecialPasswordReset.php 
b/includes/specials/SpecialPasswordReset.php
index 9e72807..f1eb8c2 100644
--- a/includes/specials/SpecialPasswordReset.php
+++ b/includes/specials/SpecialPasswordReset.php
@@ -58,7 +58,7 @@
throw new ErrorPageError( 'internalerror', 
'resetpass_forbidden' );
}
 
-   return parent::checkExecutePermissions( $user );
+   parent::checkExecutePermissions( $user );
}
 
protected function getFormFields() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9827a34ab0770f5a097df31fd15aec7bf00fed5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Database debug log cleanup (remove wgDebugDumpSqlLength/wgDe... - change (mediawiki/core)

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

Change subject: Database debug log cleanup (remove 
wgDebugDumpSqlLength/wgDebugDBTransactions)
..


Database debug log cleanup (remove wgDebugDumpSqlLength/wgDebugDBTransactions)

* Simplify the debug log call and use queries group
* Remove $wgDebugDumpSqlLength, as profiler output
  already has shortened query strings (one can use
  profiling without DBO_DEBUG)
* Removed $wgDebugDBTransactions as BEGIN/COMMIT already show
* Removed PostgresTransactionState as it was only used for
  $wgDebugDBTransactions handling
* This cuts down on lots of global variable usage

Change-Id: I185adb1694441d074dea965960429b4910727620
---
M RELEASE-NOTES-1.27
M autoload.php
M includes/DefaultSettings.php
M includes/db/Database.php
M includes/db/DatabasePostgres.php
M includes/objectcache/SqlBagOStuff.php
6 files changed, 8 insertions(+), 149 deletions(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 1670552..65e0799 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -14,6 +14,8 @@
   $wgResourceLoaderMinifierMaxLineLength, because there was little value in
   making the behavior configurable. The default values (`false` for the former,
   1000 for the latter) are now hard-coded.
+* $wgDebugDumpSqlLength was removed (deprecated in 1.24).
+* $wgDebugDBTransactions was removed (deprecated in 1.20).
 
 === New features in 1.27 ===
 * $wgDataCenterId and $wgDataCenterRoles where added, which will serve as
diff --git a/autoload.php b/autoload.php
index 9c859b7..413a0f1 100644
--- a/autoload.php
+++ b/autoload.php
@@ -933,7 +933,6 @@
'PostgresBlob' => __DIR__ . '/includes/db/DatabasePostgres.php',
'PostgresField' => __DIR__ . '/includes/db/DatabasePostgres.php',
'PostgresInstaller' => __DIR__ . 
'/includes/installer/PostgresInstaller.php',
-   'PostgresTransactionState' => __DIR__ . 
'/includes/db/DatabasePostgres.php',
'PostgresUpdater' => __DIR__ . 
'/includes/installer/PostgresUpdater.php',
'Preferences' => __DIR__ . '/includes/Preferences.php',
'PreferencesForm' => __DIR__ . '/includes/Preferences.php',
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 339ae9b..deb85f5 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5454,13 +5454,6 @@
 $wgDebugComments = false;
 
 /**
- * Extensive database transaction state debugging
- *
- * @since 1.20
- */
-$wgDebugDBTransactions = false;
-
-/**
  * Write SQL queries to the debug log.
  *
  * This setting is only used $wgLBFactoryConf['class'] is set to
@@ -5469,13 +5462,6 @@
  * connection to achieve the same functionality.
  */
 $wgDebugDumpSql = false;
-
-/**
- * Trim logged SQL queries to this many bytes. Set 0/false/null to do no
- * trimming.
- * @since 1.24
- */
-$wgDebugDumpSqlLength = 500;
 
 /**
  * Performance expectations for DB usage
diff --git a/includes/db/Database.php b/includes/db/Database.php
index 05d1934..41e6e77 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -479,11 +479,7 @@
 *   - DBO_PERSISTENT: use persistant database connection
 */
public function setFlag( $flag ) {
-   global $wgDebugDBTransactions;
$this->mFlags |= $flag;
-   if ( ( $flag & DBO_TRX ) && $wgDebugDBTransactions ) {
-   wfDebug( "Implicit transactions are now enabled.\n" );
-   }
}
 
/**
@@ -498,11 +494,7 @@
 *   - DBO_PERSISTENT: use persistant database connection
 */
public function clearFlag( $flag ) {
-   global $wgDebugDBTransactions;
$this->mFlags &= ~$flag;
-   if ( ( $flag & DBO_TRX ) && $wgDebugDBTransactions ) {
-   wfDebug( "Implicit transactions are now disabled.\n" );
-   }
}
 
/**
@@ -607,7 +599,7 @@
 * @param array $params Parameters passed from DatabaseBase::factory()
 */
function __construct( array $params ) {
-   global $wgDBprefix, $wgDBmwschema, $wgCommandLineMode, 
$wgDebugDBTransactions;
+   global $wgDBprefix, $wgDBmwschema, $wgCommandLineMode;
 
$server = $params['host'];
$user = $params['user'];
@@ -622,14 +614,8 @@
if ( $this->mFlags & DBO_DEFAULT ) {
if ( $wgCommandLineMode ) {
$this->mFlags &= ~DBO_TRX;
-   if ( $wgDebugDBTransactions ) {
-   wfDebug( "Implicit transaction open 
disabled.\n" );
-   }
} else {
$this->mFlags |= DBO_TRX;
-   if ( $wgDebugDBTransactions ) {
-  

[MediaWiki-commits] [Gerrit] Use beta labs logo for login form on beta cluster - change (operations/mediawiki-config)

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

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

Change subject: Use beta labs logo for login form on beta cluster
..

Use beta labs logo for login form on beta cluster

Bug: T114552
Change-Id: I8e6ca67736b03807c12268dde6849b8a17e9e591
---
M wmf-config/mobile-labs.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php
index 24b6eb3..7ca572a 100644
--- a/wmf-config/mobile-labs.php
+++ b/wmf-config/mobile-labs.php
@@ -19,6 +19,9 @@
}
 }
 
+// T114552
+$wgMobileFrontendLogo = '/static/images/project-logos/betawiki.png';
+
 $wgMFForceSecureLogin = false;
 $wgMFUseCentralAuthToken = $wmgMFUseCentralAuthToken;
 $wgMFSpecialCaseMainPage = $wmgMFSpecialCaseMainPage;

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

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

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


[MediaWiki-commits] [Gerrit] CRM-17311 wrap call to watchdog in function_exists - change (wikimedia...civicrm)

2015-10-05 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17311 wrap call to watchdog in function_exists
..

CRM-17311 wrap call to watchdog in function_exists

Change-Id: Ie9aafcdfd6ddc6074716db6802027400cf4bef5a
---
M CRM/Utils/System/DrupalBase.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/39/243739/1

diff --git a/CRM/Utils/System/DrupalBase.php b/CRM/Utils/System/DrupalBase.php
index 4775192..b2c1274 100644
--- a/CRM/Utils/System/DrupalBase.php
+++ b/CRM/Utils/System/DrupalBase.php
@@ -268,7 +268,7 @@
* @inheritDoc
*/
   public function logger($message) {
-if (CRM_Core_Config::singleton()->userFrameworkLogging) {
+if (CRM_Core_Config::singleton()->userFrameworkLogging && 
function_exists('watchdog')) {
   watchdog('civicrm', '%message', array('%message' => $message), NULL, 
WATCHDOG_DEBUG);
 }
   }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9aafcdfd6ddc6074716db6802027400cf4bef5a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3f2a885..e75fb6a - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 3f2a885..e75fb6a
..

Syncronize VisualEditor: 3f2a885..e75fb6a

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/95/243795/1

diff --git a/VisualEditor b/VisualEditor
index 3f2a885..e75fb6a 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 3f2a885e3ecc32e8d94c6769cf64331b6d0c8f6f
+Subproject commit e75fb6a2dad69bc813106991d9978644d10ed9bb

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1200fb6a08d9910dcebcca3ed24b08d0a1ecd6cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3f2a885..e75fb6a - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 3f2a885..e75fb6a
..


Syncronize VisualEditor: 3f2a885..e75fb6a

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

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



diff --git a/VisualEditor b/VisualEditor
index 3f2a885..e75fb6a 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 3f2a885e3ecc32e8d94c6769cf64331b6d0c8f6f
+Subproject commit e75fb6a2dad69bc813106991d9978644d10ed9bb

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1200fb6a08d9910dcebcca3ed24b08d0a1ecd6cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] bump cdh submodule (lint fixes) - change (operations/puppet)

2015-10-05 Thread John F. Lewis (Code Review)
John F. Lewis has uploaded a new change for review.

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

Change subject: bump cdh submodule (lint fixes)
..

bump cdh submodule (lint fixes)

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/243799/1

diff --git a/modules/cdh b/modules/cdh
index 6382780..ccfe4d1 16
--- a/modules/cdh
+++ b/modules/cdh
-Subproject commit 6382780d404d04ecf71c0416e92b4b2972324885
+Subproject commit ccfe4d1084a81015397befc68fb3381477f1045d

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf4ae4c477ccbcc8f59f1e8a9dc68fd220282c72
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: John F. Lewis 

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


[MediaWiki-commits] [Gerrit] tools: Add puppetmaster/client roles - change (operations/puppet)

2015-10-05 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Add puppetmaster/client roles
..

tools: Add puppetmaster/client roles

- Only applied on k8s related nodes
- Deny access to all non-admins
- Also make gitsync configurable so it can sync the
  puppet repositories more frequently

Bug: T112005
Change-Id: I23e64a138a287fa1e69b4d2ce894cf95f1c22592
---
M manifests/role/tools.pp
M modules/puppetmaster/manifests/gitsync.pp
A modules/toollabs/manifests/puppetmaster.pp
3 files changed, 37 insertions(+), 2 deletions(-)


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

diff --git a/manifests/role/tools.pp b/manifests/role/tools.pp
index cf25712..64b98c6 100644
--- a/manifests/role/tools.pp
+++ b/manifests/role/tools.pp
@@ -1,10 +1,14 @@
 # Roles for Kubernetes and co on Tool Labs
 class role::toollabs::etcd {
+include role::toollabs::puppet::client
+
 # To deny access to etcd - atm the kubernetes master
 # and etcd will be on the same host, so ok to just deny
 # access to everyone else
 include base::firewall
 include toollabs::infrastructure
+
+include role::toollabs::puppet::client
 
 include etcd
 
@@ -14,7 +18,20 @@
 }
 }
 
+class role::toollabs::puppet::master {
+include ::toollabs::infrastructure
+include ::toollabs;:puppetmaster
+}
+
+class role::toollabs::puppet::client {
+$master = hiera('puppetmaster')
+class { '::puppet::self::client':
+server => $master,
+}
+}
+
 class role::toollabs::k8s::master {
+include role::toollabs::puppet::client
 # This requires that etcd is on the same host
 # And is not HA. Will re-evaluate when it is HA
 
@@ -48,6 +65,7 @@
 }
 
 class role::toollabs::k8s::worker {
+include role::toollabs::puppet::client
 # NOTE: No base::firewall!
 # ferm and kube-proxy will conflict
 
@@ -71,6 +89,8 @@
 }
 
 class role::toollabs::k8s::webproxy {
+include role::toollabs::puppet::client
+
 $master_host = hiera('k8s_master')
 $etcd_url = join(prefix(suffix(hiera('etcd_hosts', [$master_host]), 
':2379'), 'https://'), ',')
 
@@ -90,6 +110,8 @@
 }
 
 class role::toollabs::k8s::bastion {
+include role::toollabs::puppet::client
+
 # kubectl and things
 include k8s::client
 }
diff --git a/modules/puppetmaster/manifests/gitsync.pp 
b/modules/puppetmaster/manifests/gitsync.pp
index b0363b9..c190b50 100644
--- a/modules/puppetmaster/manifests/gitsync.pp
+++ b/modules/puppetmaster/manifests/gitsync.pp
@@ -2,7 +2,9 @@
 #
 # Sync local operations/puppet.git checkout with upstream.
 # Meant for use with local puppetmasters.
-class puppetmaster::gitsync{
+class puppetmaster::gitsync(
+$run_every_minutes = '10',
+) {
 
 file { '/usr/local/bin/git-sync-upstream':
 ensure  => present,
@@ -15,7 +17,7 @@
 cron { 'rebase_operations_puppet':
 ensure  => present,
 user=> 'root',
-minute  => '*/10',
+minute  => "*/$run_every_minutes",
 command => '/usr/local/bin/git-sync-upstream 
>>/var/log/git-sync-upstream.log 2>&1',
 require => File['/usr/local/bin/git-sync-upstream'],
 }
diff --git a/modules/toollabs/manifests/puppetmaster.pp 
b/modules/toollabs/manifests/puppetmaster.pp
new file mode 100644
index 000..7c4dd1d
--- /dev/null
+++ b/modules/toollabs/manifests/puppetmaster.pp
@@ -0,0 +1,11 @@
+# Puppetmaster used in toollabs only for k8s nodes
+class toollabs::puppetmaster {
+class { '::puppet::self::master':
+server => $::fqdn,
+}
+
+# Auto pull everything every minute!
+class { 'puppetmaster::gitsync':
+run_every_minutes => '1',
+}
+}

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

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

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


[MediaWiki-commits] [Gerrit] EventEmitter: Allow disconnecting event handlers given by array - change (oojs/core)

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

Change subject: EventEmitter: Allow disconnecting event handlers given by array
..


EventEmitter: Allow disconnecting event handlers given by array

OO.EventEmitter allows to connect events by array shorthand, it
should also allow to disconnect these events.

Change-Id: I41d50d8034282131ba3512c5cc0d61c4214663bb
---
M src/EventEmitter.js
M tests/unit/EventEmitter.test.js
2 files changed, 34 insertions(+), 2 deletions(-)

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



diff --git a/src/EventEmitter.js b/src/EventEmitter.js
index 7b57193..dbb337f 100644
--- a/src/EventEmitter.js
+++ b/src/EventEmitter.js
@@ -222,12 +222,16 @@
 * @chainable
 */
oo.EventEmitter.prototype.disconnect = function ( context, methods ) {
-   var i, event, bindings;
+   var i, event, method, bindings;
 
if ( methods ) {
// Remove specific connections to the context
for ( event in methods ) {
-   this.off( event, methods[ event ], context );
+   method = methods[ event ];
+   if ( Array.isArray( method ) ) {
+   method = method[ 0 ];
+   }
+   this.off( event, method, context );
}
} else {
// Remove all connections to the context
diff --git a/tests/unit/EventEmitter.test.js b/tests/unit/EventEmitter.test.js
index fdf0637..c3070de 100644
--- a/tests/unit/EventEmitter.test.js
+++ b/tests/unit/EventEmitter.test.js
@@ -251,6 +251,34 @@
assert.deepEqual( hits, { foo: 1, bar: 2 } );
} );
 
+   QUnit.test( 'disconnect( host, array methods )', 1, function ( assert ) 
{
+   var host,
+   hits = { foo: 0, barbara: 0 },
+   ee = new oo.EventEmitter();
+
+   host = {
+   onFoo: function () {
+   hits.foo++;
+   },
+   barbara: function () {
+   hits.barbara++;
+   }
+   };
+
+   ee.connect( host, {
+   foo: 'onFoo',
+   bar: [ 'barbara', 'some', 'parameter' ]
+   } );
+   ee.emit( 'foo' );
+   ee.emit( 'bar' );
+
+   ee.disconnect( host, { bar: [ 'barbara' ] } );
+   ee.emit( 'foo' );
+   ee.emit( 'bar' );
+
+   assert.deepEqual( hits, { foo: 2, barbara: 1 } );
+   } );
+
QUnit.test( 'disconnect( host, unbound methods )', 1, function ( assert 
) {
var host,
ee = new oo.EventEmitter();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41d50d8034282131ba3512c5cc0d61c4214663bb
Gerrit-PatchSet: 2
Gerrit-Project: oojs/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Trevor Parscal 
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 link(s) to spoken version of article, if available - change (mediawiki...mobileapps)

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

Change subject: Add link(s) to spoken version of article, if available
..


Add link(s) to spoken version of article, if available

Adds logic to parse the HTML for each section for a Spoken Wikipedia
div and, if found, add the URL(s) of the audio file to the lead section
properties.

Bug: T108372
Change-Id: I207d913a7ca3a6363ff442731121d25d89caecba
---
M lib/transforms.js
M routes/mobile-html-sections.js
M routes/mobile-html.js
M spec.yaml
M test/features/mobile-html-sections-lead/pagecontent.js
5 files changed, 49 insertions(+), 15 deletions(-)

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



diff --git a/lib/transforms.js b/lib/transforms.js
index d08159d..dd5e2bb 100644
--- a/lib/transforms.js
+++ b/lib/transforms.js
@@ -78,16 +78,48 @@
 }
 
 function moveFirstParagraphUpInLeadSection(text) {
-var doc = domino.createDocument(text);
+// var doc = domino.createDocument(text);
+//
 // TODO: mhurd: feel free to add your lead section magic here
-return doc.body.innerHTML;
+//
+// return doc.body.innerHTML;
+}
+
+/**
+ * Searches for Spoken Wikipedia audio files and makes them available to 
buildLead().
+ */
+function parseSpokenWikipedia(doc, page) {
+var spokenFileSelectors = [
+'div#section_SpokenWikipedia div.mediaContainer 
a[href^=\'\/\/upload.wikimedia.org\']',
+'div#section_SpokenWikipedia > div > i > 
a[href^=\'\/\/upload.wikimedia.org\']'
+];
+var spokenFiles = doc.querySelectorAll(spokenFileSelectors.join(', '));
+
+if (spokenFiles) {
+for (var i = 0; i < spokenFiles.length; i++) {
+if (!page.spoken) {
+page.spoken = {};
+page.spoken.urls = [];
+}
+page.spoken.urls.push(spokenFiles[i].getAttribute('href'));
+}
+}
+}
+
+function removeUnwantedElements(doc, rmSelectors) {
+rmSelectorAll(doc, rmSelectors.join(', '));
+rmAttributeAll(doc, 'a,span', 'title');
+rmAttributeAll(doc, 'img', 'alt');
+rmBracketSpans(doc);
 }
 
 /**
  * Nukes stuff from the DOM we don't want.
  */
-function runDomTransforms(text, sectionIndex) {
+function runDomTransforms(text, sectionIndex, page) {
 var doc = domino.createDocument(text);
+
+parseSpokenWikipedia(doc, page);
 
 var rmSelectors = [
 'div.noprint',
@@ -101,12 +133,8 @@
 if (sectionIndex === 0) {
 rmSelectors.push('div.hatnote');
 }
-rmSelectorAll(doc, rmSelectors.join(', '));// Do single call to 
rmSelectorAll.
 
-rmAttributeAll(doc, 'a,span', 'title');
-rmAttributeAll(doc, 'img', 'alt');
-
-rmBracketSpans(doc);
+removeUnwantedElements(doc, rmSelectors);
 
 // TODO: mhurd: add more references to functions where you do more 
transforms here
 
diff --git a/routes/mobile-html-sections.js b/routes/mobile-html-sections.js
index 83760bb..6a2172b 100644
--- a/routes/mobile-html-sections.js
+++ b/routes/mobile-html-sections.js
@@ -46,20 +46,22 @@
 function pageContentPromise(logger, domain, title) {
 return mwapi.getAllSections(logger, domain, title)
 .then(function (response) {
+var page = response.body.mobileview;
 var sections = response.body.mobileview.sections;
+var section;
 
 // transform all sections
 for (var idx = 0; idx < sections.length; idx++) {
-var section = sections[idx];
-section.text = transforms.runDomTransforms(section.text, idx);
+section = sections[idx];
+section.text = transforms.runDomTransforms(section.text, idx, 
page);
 }
 
-if (!response.body.mobileview.mainpage) {
+// if (!response.body.mobileview.mainpage) {
 // don't do anything if this is the main page, since many wikis
 // arrange the main page in a series of tables.
 // TODO: should we also exclude file and other special pages?
-sections[0].text = 
transforms.moveFirstParagraphUpInLeadSection(sections[0].text);
-}
+// sections[0].text = 
transforms.moveFirstParagraphUpInLeadSection(sections[0].text);
+// }
 
 return response.body.mobileview;
 });
@@ -118,6 +120,7 @@
 extract: input.extract && parseExtract(input.extract.body),
 infobox: transforms.parseInfobox(lead),
 pronunciation: transforms.parsePronunciation(lead),
+spoken: input.page.spoken,
 geo: transforms.parseGeo(lead),
 sections: buildLeadSections(input.page.sections),
 media: input.media
@@ -192,4 +195,3 @@
 router: router
 };
 };
-
diff --git a/routes/mobile-html.js b/routes/mobile-html.js
index 4645a25..d3ff904 100644
--- a/routes/mobile-html.js
+++ b/routes/mobile-html.js
@@ -284,4 +284,3 @@
 router: router
 };
 };
-
diff --git a/spec.yaml b/spec.yaml
index 

[MediaWiki-commits] [Gerrit] Update various @params from DatabaseBase to IDatabase - change (mediawiki/core)

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

Change subject: Update various @params from DatabaseBase to IDatabase
..


Update various @params from DatabaseBase to IDatabase

Change-Id: I98e44cdffb0fc0d729f69f702799139afb988c20
---
M includes/Block.php
M includes/Export.php
M includes/Revision.php
M includes/RevisionList.php
M includes/SiteStats.php
M includes/Title.php
M includes/UserRightsProxy.php
M includes/api/ApiBase.php
M includes/api/ApiPageSet.php
M includes/cache/BacklinkCache.php
M includes/cache/LinkBatch.php
M includes/changetags/ChangeTagsLogList.php
M includes/changetags/ChangeTagsRevisionList.php
M includes/deferred/SiteStatsUpdate.php
M includes/externalstore/ExternalStoreDB.php
M includes/filerepo/file/LocalFile.php
M includes/logging/LogEventsList.php
M includes/page/WikiPage.php
M includes/search/SearchDatabase.php
M includes/utils/BatchRowIterator.php
M includes/utils/BatchRowWriter.php
21 files changed, 46 insertions(+), 46 deletions(-)

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



diff --git a/includes/Block.php b/includes/Block.php
index c5a16fc..0ec4ad1 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -452,7 +452,7 @@
 * Insert a block into the block table. Will fail if there is a 
conflicting
 * block (same name and options) already in the database.
 *
-* @param DatabaseBase $dbw If you have one available
+* @param IDatabase $dbw If you have one available
 * @return bool|array False on failure, assoc array on success:
 *  ('id' => block ID, 'autoIds' => array of autoblock IDs)
 */
@@ -556,7 +556,7 @@
 
/**
 * Get an array suitable for passing to $dbw->insert() or $dbw->update()
-* @param DatabaseBase $db
+* @param IDatabase $db
 * @return array
 */
protected function getDatabaseArray( $db = null ) {
diff --git a/includes/Export.php b/includes/Export.php
index adab21c..b4d7737 100644
--- a/includes/Export.php
+++ b/includes/Export.php
@@ -79,7 +79,7 @@
 * make additional queries to pull source data while the
 * main query is still running.
 *
-* @param DatabaseBase $db
+* @param IDatabase $db
 * @param int|array $history One of WikiExporter::FULL, 
WikiExporter::CURRENT,
 *   WikiExporter::RANGE or WikiExporter::STABLE, or an associative 
array:
 *   - offset: non-inclusive offset at which to start the query
diff --git a/includes/Revision.php b/includes/Revision.php
index a7a87e8..24c025f 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -223,7 +223,7 @@
 * Load a page revision from a given revision ID number.
 * Returns null if no such revision can be found.
 *
-* @param DatabaseBase $db
+* @param IDatabase $db
 * @param int $id
 * @return Revision|null
 */
@@ -236,7 +236,7 @@
 * that's attached to a given page. If not attached
 * to that page, will return null.
 *
-* @param DatabaseBase $db
+* @param IDatabase $db
 * @param int $pageid
 * @param int $id
 * @return Revision|null
@@ -256,7 +256,7 @@
 * that's attached to a given page. If not attached
 * to that page, will return null.
 *
-* @param DatabaseBase $db
+* @param IDatabase $db
 * @param Title $title
 * @param int $id
 * @return Revision|null
@@ -281,7 +281,7 @@
 * WARNING: Timestamps may in some circumstances not be unique,
 * so this isn't the best key to use.
 *
-* @param DatabaseBase $db
+* @param IDatabase $db
 * @param Title $title
 * @param string $timestamp
 * @return Revision|null
@@ -333,7 +333,7 @@
 * Given a set of conditions, fetch a revision from
 * the given database connection.
 *
-* @param DatabaseBase $db
+* @param IDatabase $db
 * @param array $conditions
 * @param int $flags (optional)
 * @return Revision|null
@@ -375,7 +375,7 @@
 * which will return matching database rows with the
 * fields necessary to build Revision objects.
 *
-* @param DatabaseBase $db
+* @param IDatabase $db
 * @param array $conditions
 * @param int $flags (optional)
 * @return ResultWrapper
@@ -519,7 +519,7 @@
 
/**
 * Do a batched query to get the parent revision lengths
-* @param DatabaseBase $db
+* @param IDatabase $db
 * @param array $revIds
 * @return array
 */
@@ -1206,7 +1206,7 @@
 * Get previous revision Id for this page_id
 * This is used to populate rev_parent_id on save
 *
-* @param DatabaseBase $db
+* @param IDatabase $db
   

[MediaWiki-commits] [Gerrit] Remove unused checkExecutePermissions() return value - change (mediawiki...ListSignup)

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

Change subject: Remove unused checkExecutePermissions() return value
..


Remove unused checkExecutePermissions() return value

Change-Id: I9827a34ab0770f5a097df31fd15aec7bf00fed5d
---
M specials/SpecialListSignupPurge.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/specials/SpecialListSignupPurge.php 
b/specials/SpecialListSignupPurge.php
index ad392c5..8706d92 100644
--- a/specials/SpecialListSignupPurge.php
+++ b/specials/SpecialListSignupPurge.php
@@ -20,7 +20,7 @@
if ( !$this->getUser()->isAllowed( 'purgelistsignupdisplay' ) ) 
{
throw new PermissionsError( 'purgelistsignupdisplay' );
}
-   return parent::checkExecutePermissions( $user );
+   parent::checkExecutePermissions( $user );
}
 
protected function alterForm( HTMLForm $form ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9827a34ab0770f5a097df31fd15aec7bf00fed5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ListSignup
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


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

2015-10-05 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

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

Update VE core submodule to master (737a235)

New changes:
6e38f99 Pass generated content error to inspector

Change-Id: I362972dcdffc72b906263670d034872f0af03a01
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/lib/ve b/lib/ve
index 8feaeef..737a235 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit 8feaeefe372397e77fd716000279aba48426031d
+Subproject commit 737a235cf0270c63705d5e433ff7a4068322a06e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I362972dcdffc72b906263670d034872f0af03a01
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] lint: fix the last "variable not enclosed" - change (operations/puppet)

2015-10-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: lint: fix the last "variable not enclosed"
..


lint: fix the last "variable not enclosed"

Change-Id: I078fe3baa6bc8f413dd0ea3554c43fb291eb7899
---
M manifests/role/labsproxy.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/role/labsproxy.pp b/manifests/role/labsproxy.pp
index d337617..f870c42 100644
--- a/manifests/role/labsproxy.pp
+++ b/manifests/role/labsproxy.pp
@@ -12,7 +12,7 @@
 ferm::service { 'redis-replication':
 proto  => 'tcp',
 port   => '6379',
-srange => "@resolve(($proxy_nodes))",
+srange => "@resolve((${proxy_nodes}))",
 }
 
 if $::hostname != $active_proxy {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I078fe3baa6bc8f413dd0ea3554c43fb291eb7899
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] lint: enclose variables - change (operations...cdh)

2015-10-05 Thread John F. Lewis (Code Review)
John F. Lewis has uploaded a new change for review.

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

Change subject: lint: enclose variables
..

lint: enclose variables

Change-Id: If3fd5139ee8e68d5b670fd1da5d04678b3e2edee
---
M manifests/hadoop.pp
M manifests/hue/defaults.pp
M manifests/oozie.pp
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/cdh 
refs/changes/97/243797/1

diff --git a/manifests/hadoop.pp b/manifests/hadoop.pp
index 1fd82f8..e794ea0 100644
--- a/manifests/hadoop.pp
+++ b/manifests/hadoop.pp
@@ -293,7 +293,7 @@
 content => template('cdh/hadoop/core-site.xml.erb'),
 }
 
-file { "$config_directory/hdfs-site.xml":
+file { "${config_directory}/hdfs-site.xml":
 content => template('cdh/hadoop/hdfs-site.xml.erb'),
 }
 
diff --git a/manifests/hue/defaults.pp b/manifests/hue/defaults.pp
index 8b010c9..0b694fd 100644
--- a/manifests/hue/defaults.pp
+++ b/manifests/hue/defaults.pp
@@ -12,7 +12,7 @@
 # set in the cdh::oozie class.
 if (defined(Class['cdh::oozie'])) {
 $oozie_url  = $cdh::oozie::url
-$oozie_proxy_regex  = "$cdh::oozie::oozie_host:(11000|11443)"
+$oozie_proxy_regex  = "${cdh::oozie::oozie_host}:(11000|11443)"
 }
 # Otherwise disable Oozie interface for Hue.
 else {
@@ -63,4 +63,4 @@
 $hue_log4j_template = 'cdh/hue/log4j.properties.erb'
 $hue_log_conf_template  = 'cdh/hue/log.conf.erb'
 
-}
\ No newline at end of file
+}
diff --git a/manifests/oozie.pp b/manifests/oozie.pp
index 5e20556..16d4982 100644
--- a/manifests/oozie.pp
+++ b/manifests/oozie.pp
@@ -7,7 +7,7 @@
 )
 {
 # oozie server url
-$url = "http://$oozie_host:11000/oozie;
+$url = "http://${oozie_host}:11000/oozie;
 
 package { 'oozie-client':
 ensure => 'installed',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3fd5139ee8e68d5b670fd1da5d04678b3e2edee
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/cdh
Gerrit-Branch: master
Gerrit-Owner: John F. Lewis 

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


[MediaWiki-commits] [Gerrit] lint: fix the last "variable not enclosed" - change (operations/puppet)

2015-10-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: lint: fix the last "variable not enclosed"
..

lint: fix the last "variable not enclosed"

Change-Id: I078fe3baa6bc8f413dd0ea3554c43fb291eb7899
---
M manifests/role/labsproxy.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/243796/1

diff --git a/manifests/role/labsproxy.pp b/manifests/role/labsproxy.pp
index d337617..f870c42 100644
--- a/manifests/role/labsproxy.pp
+++ b/manifests/role/labsproxy.pp
@@ -12,7 +12,7 @@
 ferm::service { 'redis-replication':
 proto  => 'tcp',
 port   => '6379',
-srange => "@resolve(($proxy_nodes))",
+srange => "@resolve((${proxy_nodes}))",
 }
 
 if $::hostname != $active_proxy {

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

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

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


[MediaWiki-commits] [Gerrit] Fix deprecation warnings - change (mediawiki...ZeroBanner)

2015-10-05 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Fix deprecation warnings
..

Fix deprecation warnings

Will hopefully fix unknown error with banner
rendering in middle of page.

Bug: T114128
Change-Id: If71b039e0472e99744e0e26c543f497461ca764c
(cherry picked from commit 0f6c2af536b73239884b2cd2a48ea36523d4e01b)
---
M ZeroBanner.php
M includes/ZeroSpecialPage.php
M modules/ZeroInfo.js
M modules/ZeroOverlay.js
M modules/banner.js
M modules/interstitial.js
M modules/interstitial.less
7 files changed, 15 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner 
refs/changes/01/243801/1

diff --git a/ZeroBanner.php b/ZeroBanner.php
index 52737c6..aba96ec 100644
--- a/ZeroBanner.php
+++ b/ZeroBanner.php
@@ -72,6 +72,8 @@
 $wgResourceModules['zerobanner'] = array(
'dependencies' => array(
'mobile.overlays',
+   'mobile.settings',
+   'mobile.startup',
'oojs-ui',
'zerobanner.styles'
),
diff --git a/includes/ZeroSpecialPage.php b/includes/ZeroSpecialPage.php
index a907488..263a70f 100644
--- a/includes/ZeroSpecialPage.php
+++ b/includes/ZeroSpecialPage.php
@@ -462,7 +462,7 @@
$cfg = PageRendering::getJsConfigBlock( 
$this, $xcs, $config, false );
}
if ( $banner ) {
-   $banner = 'document.write(' . 
Xml::encodeJsVar( $banner ) . ');';
+   $banner = '$(\'body\').prepend(' . 
Xml::encodeJsVar( $banner ) . ');';
}
$banner = $cfg . $banner;
}
@@ -516,7 +516,7 @@
} else {
$response->header( 'Content-type: image/gif' );
}
-   echo $banner;
+   echo ResourceLoader::makeInlineScript( $banner );
return true;
}
 
diff --git a/modules/ZeroInfo.js b/modules/ZeroInfo.js
index 49344b6..8af9cb6 100644
--- a/modules/ZeroInfo.js
+++ b/modules/ZeroInfo.js
@@ -1,8 +1,8 @@
 /* global mw, OO, jQuery */
 ( function( M, $ ) {
'use strict';
-   var settings = M.require( 'settings' ),
-   router = M.require( 'router' ),
+   var settings = M.require( 'mobile.settings/settings' ),
+   router = M.require( 'mobile.startup/router' ),
ZeroInfo,
windowManager;
 
diff --git a/modules/ZeroOverlay.js b/modules/ZeroOverlay.js
index 6c10fca..b326e51 100644
--- a/modules/ZeroOverlay.js
+++ b/modules/ZeroOverlay.js
@@ -1,9 +1,9 @@
 /* global mw, jQuery */
 ( function( M, $ ) {
'use strict';
-   var settings = M.require( 'settings' ),
-   router = M.require( 'router' ),
-   ContentOverlay = M.require( 'ContentOverlay' ),
+   var settings = M.require( 'mobile.settings/settings' ),
+   router = M.require( 'mobile.startup/router' ),
+   ContentOverlay = M.require( 'mobile.overlays/ContentOverlay' ),
ZeroOverlay,
cfg = window && window.zeroGlobalConfig || false;
 
diff --git a/modules/banner.js b/modules/banner.js
index 43fd189..4fbe9a4 100644
--- a/modules/banner.js
+++ b/modules/banner.js
@@ -3,7 +3,7 @@
var m = ( function() {
function initBanner( banner ) {
var cookieNameZeroVisibility = banner.getAttribute( 
'id' ),
-   settings = M.require('settings'),
+   settings = M.require( 
'mobile.settings/settings' ),
saveUserSetting = settings.save,
getUserSetting = settings.get,
visibility,
diff --git a/modules/interstitial.js b/modules/interstitial.js
index 557f487..ce05974 100644
--- a/modules/interstitial.js
+++ b/modules/interstitial.js
@@ -6,7 +6,7 @@
hostname = document.location.hostname.toLowerCase(), // 
hostname of the current page
isMdot = hostname.indexOf( '.m.' ) !== -1,
isHttps = window.location.protocol === 'https:',
-   settings = M.require('settings'), // module for 
reading/writing user settings
+   settings = M.require( 'mobile.settings/settings' ), // 
module for reading/writing user settings
// this is set if operator zero-rates HTTPS
supportsTls = config ? config.enabled && 
config.enableHttps : $.cookie( 'ZeroOpts' ) === 'tls',
getConfig = config ? config : ( function () {
diff --git a/modules/interstitial.less b/modules/interstitial.less
index ff5131f..9e01631 100644
--- 

  1   2   3   4   5   >