[MediaWiki-commits] [Gerrit] logstash: hadoop: disable output temporarily - change (operations/puppet)

2014-10-28 Thread Gage (Code Review)
Gage has submitted this change and it was merged.

Change subject: logstash: hadoop: disable output temporarily
..


logstash: hadoop: disable output temporarily

to avoid filling disks

Change-Id: I16738d70e4b535af3a6df9f637a0d133c29e5d80
---
M manifests/role/analytics/hadoop.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/role/analytics/hadoop.pp 
b/manifests/role/analytics/hadoop.pp
index 1487d7f..20a6bc5 100644
--- a/manifests/role/analytics/hadoop.pp
+++ b/manifests/role/analytics/hadoop.pp
@@ -56,7 +56,7 @@
 $mapreduce_job_reuse_jvm_num_tasks= 1
 $fair_scheduler_template  = 'hadoop/fair-scheduler.xml.erb'
 # setting this to false or undef interferes with defining it within a node
-$gelf_logging_enabled = true
+$gelf_logging_enabled = false
 
 
 # Configs specific to Production.

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

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

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


[MediaWiki-commits] [Gerrit] logstash: hadoop: disable output temporarily - change (operations/puppet)

2014-10-28 Thread Gage (Code Review)
Gage has uploaded a new change for review.

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

Change subject: logstash: hadoop: disable output temporarily
..

logstash: hadoop: disable output temporarily

to avoid filling disks

Change-Id: I16738d70e4b535af3a6df9f637a0d133c29e5d80
---
M manifests/role/analytics/hadoop.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/169655/1

diff --git a/manifests/role/analytics/hadoop.pp 
b/manifests/role/analytics/hadoop.pp
index 1487d7f..20a6bc5 100644
--- a/manifests/role/analytics/hadoop.pp
+++ b/manifests/role/analytics/hadoop.pp
@@ -56,7 +56,7 @@
 $mapreduce_job_reuse_jvm_num_tasks= 1
 $fair_scheduler_template  = 'hadoop/fair-scheduler.xml.erb'
 # setting this to false or undef interferes with defining it within a node
-$gelf_logging_enabled = true
+$gelf_logging_enabled = false
 
 
 # Configs specific to Production.

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

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

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


[MediaWiki-commits] [Gerrit] Handle the return value of getOriginalEmail efficiently - change (mediawiki...BounceHandler)

2014-10-28 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review.

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

Change subject: Handle the return value of getOriginalEmail efficiently
..

Handle the return value of getOriginalEmail efficiently

This patch:
* Check for the return value of getOriginalEmail before committing into the DB
* make getOriginalEmail() call reuseConnection()

Bug: 69100
Change-Id: I7cd88e6041ff9e64aefb1ec3468f83d88569df64
---
M includes/ProcessBounceEmails.php
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BounceHandler 
refs/changes/54/169654/1

diff --git a/includes/ProcessBounceEmails.php b/includes/ProcessBounceEmails.php
index b2c82a8..fb38e7c 100644
--- a/includes/ProcessBounceEmails.php
+++ b/includes/ProcessBounceEmails.php
@@ -97,7 +97,8 @@
&& $currentTime - $bounceTime < $wgVERPAcceptTime ) {
$failedUser['wikiId'] = str_replace( '.', '-', 
$hashedVERPPart[1] );
$failedUser['rawUserId'] = base_convert( 
$hashedVERPPart[2], 36, 10 );
-   $failedUser['rawEmail'] = self::getOriginalEmail( 
$failedUser );
+   $failedEmail = self::getOriginalEmail( $failedUser );
+   $failedUser['rawEmail'] = $failedEmail ? : null;
$failedUser['bounceTime'] = $bounceTime;
} else {
wfDebugLog( 'BounceHandler',
@@ -123,14 +124,16 @@
array( 'user_email' ),
array(
'user_id' => $rawUserId,
-   ),
+   ),
__METHOD__
-   );
+   );
+   wfGetLB( $wikiId )->reuseConnection( $dbr );
if( $res !== false ) {
$rawEmail = $res->user_email;
return $rawEmail;
} else {
wfDebugLog( 'BounceHandler',"Error fetching email_id of 
user_id $rawUserId from Database $wikiId." );
+   return false;
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cd88e6041ff9e64aefb1ec3468f83d88569df64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BounceHandler
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>

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


[MediaWiki-commits] [Gerrit] Updates after performance review - change (mediawiki...GlobalUserPage)

2014-10-28 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Updates after performance review
..

Updates after performance review

* Use MapCacheLRU in displayGlobalPage()
* Optimize brokenLink to avoid DB queries if already known
* Don't check prefs if GlobalPreferences is disabled
* Use MapCacheLRU in getCentralTouched() and call
  reuseConnection()
* getRemoteParsedText() has a fixed length memcached key
* Optionally use $wgConf in getRemoteURL()
* Use a custom timeout for internal API requests
* Gracefully fail if an internal API request fails

Change-Id: I7440151f29bf38b6c135d8508ac1a0cf24a5677e
---
M GlobalUserPage.body.php
M GlobalUserPage.hooks.php
M GlobalUserPage.php
3 files changed, 116 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage 
refs/changes/53/169653/1

diff --git a/GlobalUserPage.body.php b/GlobalUserPage.body.php
index 421aeb6..e523115 100644
--- a/GlobalUserPage.body.php
+++ b/GlobalUserPage.body.php
@@ -12,6 +12,16 @@
 */
private $cache;
 
+   /**
+* @var MapCacheLRU
+*/
+   private static $displayCache;
+
+   /**
+* @var MapCacheLRU
+*/
+   private static $touchedCache;
+
public function __construct( Title $title, Config $config ) {
global $wgMemc;
parent::__construct( $title );
@@ -32,8 +42,9 @@
$out = $this->getContext()->getOutput();
$parsedOutput = $this->getRemoteParsedText( 
self::getCentralTouched( $user ) );
 
-   // If the user page is empty, don't use it
-   if ( !trim( $parsedOutput['text']['*'] ) ) {
+   // If the user page is empty or the API request failed, show 
the normal
+   // missing article page
+   if ( !$parsedOutput || !trim( $parsedOutput['text']['*'] ) ) {
parent::showMissingArticle();
return;
}
@@ -79,15 +90,6 @@
}
 
/**
-* @param int $type DB_SLAVE or DB_MASTER
-* @return DatabaseBase
-*/
-   protected static function getRemoteDB( $type ) {
-   global $wgGlobalUserPageDBname;
-   return wfGetDB( $type, array(), $wgGlobalUserPageDBname );
-   }
-
-   /**
 * Given a Title, assuming it doesn't exist, should
 * we display a global user page on it
 *
@@ -96,28 +98,33 @@
 */
public static function displayGlobalPage( Title $title ) {
global $wgGlobalUserPageDBname;
-   static $cache = array();
+   if ( !self::$displayCache ) {
+   self::$displayCache = new MapCacheLRU( 100 );
+   }
$text = $title->getPrefixedText();
// Do some instance caching since this can be
// called frequently due do the Linker hook
-   if ( isset( $cache[$text] ) ) {
-   return $cache[$text];
+   if ( self::$displayCache->has( $text ) ) {
+   return self::$displayCache->get( $text );
}
if ( !self::canBeGlobal( $title ) ) {
-   $cache[$text] = false;
+   self::$displayCache->set( $text, false );
return false;
}
 
$user = User::newFromName( $title->getText() );
 
if ( !$user || $user->getId() === 0 ) {
-   $cache[$text] = false;
+   self::$displayCache->set( $text, false );
return false;
}
 
-   if ( !$user->getOption( 'globaluserpage' ) ) {
-   $cache[$text] = false;
-   return false;
+   // Only check preferences if E:GlobalPreferences is installed
+   if ( class_exists( 'GlobalPreferences' ) ) {
+   if ( !$user->getOption( 'globaluserpage' ) ) {
+   self::$displayCache->set( $text, false );
+   return false;
+   }
}
 
// Allow for authorization extensions to determine
@@ -125,12 +132,13 @@
// This hook intentionally functions the same
// as the one in Extension:GlobalCssJs.
if ( !wfRunHooks( 'LoadGlobalUserPage', array( $user, 
$wgGlobalUserPageDBname, wfWikiID() ) ) ) {
-   $cache[$text] = false;
+   self::$displayCache->set( $text, false );
return false;
}
 
-   $cache[$text] = (bool)self::getCentralTouched( $user );
-   return $cache[$text];
+   $touched = (bool)self::getCentralTouche

[MediaWiki-commits] [Gerrit] CosmeticChangesBot shows diff twice - change (pywikibot/core)

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

Change subject: CosmeticChangesBot shows diff twice
..


CosmeticChangesBot shows diff twice

Rename CosmeticChangesToolkit option 'debug' to 'diff', as that
is its only function.

CosmeticChangesBot should call CosmeticChangesToolkit with the diff
option disabled, as userPut will show the diff.

Change-Id: Ia44ca916e5aaaef08f9b4ea5ebcdcd24cddf3f08
---
M scripts/cosmetic_changes.py
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  XZise: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index f0c892d..a59b217 100755
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -79,6 +79,7 @@
 import isbn
 from pywikibot import config, i18n, textlib, pagegenerators, Bot
 from pywikibot.page import url2unicode
+from pywikibot.tools import deprecate_arg
 
 warning = """
 ATTENTION: You can run this script as a stand-alone for testing purposes.
@@ -159,10 +160,11 @@
 
 """Cosmetic changes toolkit."""
 
-def __init__(self, site, debug=False, redirect=False, namespace=None,
+@deprecate_arg('debug', 'diff')
+def __init__(self, site, diff=False, redirect=False, namespace=None,
  pageTitle=None, ignore=CANCEL_ALL):
 self.site = site
-self.debug = debug
+self.diff = diff
 self.redirect = redirect
 self.namespace = namespace
 self.template = (self.namespace == 10)
@@ -236,7 +238,7 @@
 else:
 raise
 else:
-if self.debug:
+if self.diff:
 pywikibot.showDiff(text, new_text)
 return new_text
 
@@ -907,7 +909,7 @@
 def treat(self, page):
 try:
 self.current_page = page
-ccToolkit = CosmeticChangesToolkit(page.site, debug=True,
+ccToolkit = CosmeticChangesToolkit(page.site, diff=False,
namespace=page.namespace(),
pageTitle=page.title(),
ignore=self.getOption('ignore'))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia44ca916e5aaaef08f9b4ea5ebcdcd24cddf3f08
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: XZise 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CosmeticChangesBot shows diff twice - change (pywikibot/core)

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

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

Change subject: CosmeticChangesBot shows diff twice
..

CosmeticChangesBot shows diff twice

Rename CosmeticChangesToolkit option 'debug' to 'diff', as that
is its only function.

CosmeticChangesBot should call CosmeticChangesToolkit with the diff
option disabled, as userPut will show the diff.

Change-Id: Ia44ca916e5aaaef08f9b4ea5ebcdcd24cddf3f08
---
M scripts/cosmetic_changes.py
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/52/169652/1

diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index f0c892d..a59b217 100755
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -79,6 +79,7 @@
 import isbn
 from pywikibot import config, i18n, textlib, pagegenerators, Bot
 from pywikibot.page import url2unicode
+from pywikibot.tools import deprecate_arg
 
 warning = """
 ATTENTION: You can run this script as a stand-alone for testing purposes.
@@ -159,10 +160,11 @@
 
 """Cosmetic changes toolkit."""
 
-def __init__(self, site, debug=False, redirect=False, namespace=None,
+@deprecate_arg('debug', 'diff')
+def __init__(self, site, diff=False, redirect=False, namespace=None,
  pageTitle=None, ignore=CANCEL_ALL):
 self.site = site
-self.debug = debug
+self.diff = diff
 self.redirect = redirect
 self.namespace = namespace
 self.template = (self.namespace == 10)
@@ -236,7 +238,7 @@
 else:
 raise
 else:
-if self.debug:
+if self.diff:
 pywikibot.showDiff(text, new_text)
 return new_text
 
@@ -907,7 +909,7 @@
 def treat(self, page):
 try:
 self.current_page = page
-ccToolkit = CosmeticChangesToolkit(page.site, debug=True,
+ccToolkit = CosmeticChangesToolkit(page.site, diff=False,
namespace=page.namespace(),
pageTitle=page.title(),
ignore=self.getOption('ignore'))

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia44ca916e5aaaef08f9b4ea5ebcdcd24cddf3f08
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] Cosmetic changes fixup - change (pywikibot/core)

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

Change subject: Cosmetic changes fixup
..


Cosmetic changes fixup

f0543d6 heavily revised to flow and error control of the script
cosmetic_changes.  However a bug meant the changes made by the
change methods were discarded.

Change-Id: I2adecb09876bdf64ff4e9e03dd095368fa6135b2
---
M scripts/cosmetic_changes.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index f0c892d..07f9c33 100755
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -206,7 +206,7 @@
 pywikibot.exception(e)
 else:
 raise
-return text if result is None else text
+return text if result is None else result
 
 @staticmethod
 def isbn_execute(text):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2adecb09876bdf64ff4e9e03dd095368fa6135b2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: XZise 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Cosmetic changes fixup - change (pywikibot/core)

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

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

Change subject: Cosmetic changes fixup
..

Cosmetic changes fixup

f0543d6 heavily revised to flow and error control of the script
cosmetic_changes.  However a bug meant the changes made by the
change methods were discarded.

Change-Id: I2adecb09876bdf64ff4e9e03dd095368fa6135b2
---
M scripts/cosmetic_changes.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/51/169651/1

diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index f0c892d..07f9c33 100755
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -206,7 +206,7 @@
 pywikibot.exception(e)
 else:
 raise
-return text if result is None else text
+return text if result is None else result
 
 @staticmethod
 def isbn_execute(text):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2adecb09876bdf64ff4e9e03dd095368fa6135b2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] Convince jsduck mw.Title exists - change (mediawiki...VisualEditor)

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

Change subject: Convince jsduck mw.Title exists
..


Convince jsduck mw.Title exists

Apparently we didn't have any functions taking or returning
an mw.Title object, which is kind of concerning. But now that
we're introducing one, we need jsduck to shut up about mw.Title
not existing.

Change-Id: I04028e0e3d55ed9901878cce593f857183246ab3
---
M .docs/categories.json
M .docs/external.js
M .docs/mw-categories.json
3 files changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/.docs/categories.json b/.docs/categories.json
index cfc55f9..36d12e5 100644
--- a/.docs/categories.json
+++ b/.docs/categories.json
@@ -18,6 +18,17 @@
]
},
{
+   "name": "Upstream (MediaWiki)",
+   "groups": [
+   {
+   "name": "MediaWiki",
+   "classes": [
+   "mw.Title"
+   ]
+   }
+   ]
+   },
+   {
"name": "VisualEditor (core)",
"groups": [
{
diff --git a/.docs/external.js b/.docs/external.js
index e9010af..a2ae41e 100644
--- a/.docs/external.js
+++ b/.docs/external.js
@@ -20,3 +20,8 @@
 /**
  * @property {string} [dateString=""] Formatted date or empty string
  */
+
+/**
+ * @class mw.Title
+ * @source 
+ */
diff --git a/.docs/mw-categories.json b/.docs/mw-categories.json
index 89067d6..755c08d 100644
--- a/.docs/mw-categories.json
+++ b/.docs/mw-categories.json
@@ -16,5 +16,16 @@
]
}
]
+   },
+   {
+   "name": "Upstream (MediaWiki)",
+   "groups": [
+   {
+   "name": "MediaWiki",
+   "classes": [
+   "mw.Title"
+   ]
+   }
+   ]
}
 ]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04028e0e3d55ed9901878cce593f857183246ab3
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
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] Syncronize VisualEditor: d73a692..cbb113b - change (mediawiki/extensions)

2014-10-28 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: d73a692..cbb113b
..


Syncronize VisualEditor: d73a692..cbb113b

Change-Id: I2b53f7b2344b788e4cd7420d996e8d078177298c
---
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 d73a692..cbb113b 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit d73a692f57be1e00f14a8b24163eff1eec08e26b
+Subproject commit cbb113bcccf71a2f4ed1cdff626e9a7a7f527238

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b53f7b2344b788e4cd7420d996e8d078177298c
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] Syncronize VisualEditor: d73a692..cbb113b - change (mediawiki/extensions)

2014-10-28 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: d73a692..cbb113b
..

Syncronize VisualEditor: d73a692..cbb113b

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/50/169650/1

diff --git a/VisualEditor b/VisualEditor
index d73a692..cbb113b 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit d73a692f57be1e00f14a8b24163eff1eec08e26b
+Subproject commit cbb113bcccf71a2f4ed1cdff626e9a7a7f527238

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b53f7b2344b788e4cd7420d996e8d078177298c
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] Increase HHVM server thread count - change (operations/puppet)

2014-10-28 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged.

Change subject: Increase HHVM server thread count
..


Increase HHVM server thread count

It is 2*cpu by default, i.e. 32 on mw1114. This formula, based on the
apache one, will increase it to somewhere between 100 and 530.

Change-Id: I6cf9099c0de3e454c7179d84ebf4f26f70162378
---
M modules/mediawiki/manifests/hhvm.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/mediawiki/manifests/hhvm.pp 
b/modules/mediawiki/manifests/hhvm.pp
index e9e80dc..fd419a8 100644
--- a/modules/mediawiki/manifests/hhvm.pp
+++ b/modules/mediawiki/manifests/hhvm.pp
@@ -23,6 +23,7 @@
 error_document500 => 
'/srv/mediawiki/hhvm-fatal-error.php',
 error_document404 => '/srv/mediawiki/w/404.php',
 request_init_document => 
'/srv/mediawiki/wmf-config/HHVMRequestInit.php',
+thread_count  => floor(to_bytes($::memorytotal) / 
to_bytes('120M')),
 },
 },
 },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6cf9099c0de3e454c7179d84ebf4f26f70162378
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Starling 
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] Increase HHVM server thread count - change (operations/puppet)

2014-10-28 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review.

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

Change subject: Increase HHVM server thread count
..

Increase HHVM server thread count

It is 2*cpu by default, i.e. 32 on mw1114. This formula, based on the
apache one, will increase it to somewhere between 100 and 530.

Change-Id: I6cf9099c0de3e454c7179d84ebf4f26f70162378
---
M modules/mediawiki/manifests/hhvm.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/49/169649/1

diff --git a/modules/mediawiki/manifests/hhvm.pp 
b/modules/mediawiki/manifests/hhvm.pp
index e9e80dc..fd419a8 100644
--- a/modules/mediawiki/manifests/hhvm.pp
+++ b/modules/mediawiki/manifests/hhvm.pp
@@ -23,6 +23,7 @@
 error_document500 => 
'/srv/mediawiki/hhvm-fatal-error.php',
 error_document404 => '/srv/mediawiki/w/404.php',
 request_init_document => 
'/srv/mediawiki/wmf-config/HHVMRequestInit.php',
+thread_count  => floor(to_bytes($::memorytotal) / 
to_bytes('120M')),
 },
 },
 },

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cf9099c0de3e454c7179d84ebf4f26f70162378
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Starling 

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


[MediaWiki-commits] [Gerrit] [FIX] DequeGenerator tests: always add talk page - change (pywikibot/core)

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

Change subject: [FIX] DequeGenerator tests: always add talk page
..


[FIX] DequeGenerator tests: always add talk page

The tests for wikidata and wiktionary fail because their main pages are
not in the main namespace.

Change-Id: I46c4e507f0839023fe355161bb299e74c42c5367
---
M tests/pagegenerators_tests.py
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index dd85f1b..96e5dfa 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -173,14 +173,14 @@
 for page in gen:
 pages_out.append(page)
 # Add a page to the generator
-if page.namespace() == 0:
+if not page.isTalkPage():
 pages.extend([page.toggleTalkPage()])
 
 self.assertTrue(all(isinstance(page, pywikibot.Page) for page in 
pages_out))
-self.assertEqual(len(pages_out), 2)
-self.assertEqual(pages_out[1].namespace(), 1)
 self.assertIn(mainpage, pages_out)
 self.assertIn(mainpage.toggleTalkPage(), pages_out)
+self.assertEqual(len(pages_out), 2)
+self.assertTrue(pages_out[1].isTalkPage())
 
 
 class TestPreloadingItemGenerator(WikidataTestCase):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46c4e507f0839023fe355161bb299e74c42c5367
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
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 test_deque_preloading mainpage namespace != 0 - change (pywikibot/core)

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

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

Change subject: Fix test_deque_preloading mainpage namespace != 0
..

Fix test_deque_preloading mainpage namespace != 0

Change-Id: I084e109b075675bb2037ca49d064a8e352662523
---
M tests/pagegenerators_tests.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/48/169648/1

diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index dd85f1b..33a9c82 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -173,12 +173,12 @@
 for page in gen:
 pages_out.append(page)
 # Add a page to the generator
-if page.namespace() == 0:
+if page.namespace() % 2 == 0:
 pages.extend([page.toggleTalkPage()])
 
 self.assertTrue(all(isinstance(page, pywikibot.Page) for page in 
pages_out))
 self.assertEqual(len(pages_out), 2)
-self.assertEqual(pages_out[1].namespace(), 1)
+self.assertEqual(pages_out[1].namespace() % 2, 1)
 self.assertIn(mainpage, pages_out)
 self.assertIn(mainpage.toggleTalkPage(), pages_out)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I084e109b075675bb2037ca49d064a8e352662523
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] [FIX] DequeGenerator tests: always add talk page - change (pywikibot/core)

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

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

Change subject: [FIX] DequeGenerator tests: always add talk page
..

[FIX] DequeGenerator tests: always add talk page

The tests for wikidata and wiktionary fail because their main pages are
not in the main namespace.

Change-Id: I46c4e507f0839023fe355161bb299e74c42c5367
---
M tests/pagegenerators_tests.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/47/169647/1

diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index dd85f1b..96e5dfa 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -173,14 +173,14 @@
 for page in gen:
 pages_out.append(page)
 # Add a page to the generator
-if page.namespace() == 0:
+if not page.isTalkPage():
 pages.extend([page.toggleTalkPage()])
 
 self.assertTrue(all(isinstance(page, pywikibot.Page) for page in 
pages_out))
-self.assertEqual(len(pages_out), 2)
-self.assertEqual(pages_out[1].namespace(), 1)
 self.assertIn(mainpage, pages_out)
 self.assertIn(mainpage.toggleTalkPage(), pages_out)
+self.assertEqual(len(pages_out), 2)
+self.assertTrue(pages_out[1].isTalkPage())
 
 
 class TestPreloadingItemGenerator(WikidataTestCase):

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

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

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


[MediaWiki-commits] [Gerrit] added handling for talk pages; code clean up - change (mediawiki...SemanticTitle)

2014-10-28 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review.

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

Change subject: added handling for talk pages; code clean up
..

added handling for talk pages; code clean up

Change-Id: Ib02ac5b3067652be8b8ab1ce3d9c75d564650bd9
---
M SemanticTitle.class.php
A SemanticTitle.i18n.magic.php
M SemanticTitle.php
M i18n/en.json
M i18n/qqq.json
5 files changed, 302 insertions(+), 186 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticTitle 
refs/changes/46/169646/1

diff --git a/SemanticTitle.class.php b/SemanticTitle.class.php
index 13b8f59..3e2c3a4 100644
--- a/SemanticTitle.class.php
+++ b/SemanticTitle.class.php
@@ -1,4 +1,4 @@
-https://www.gnu.org/licenses/>.
+   program.If not, see .


 */
 
-if ( ! defined( 'MEDIAWIKI' ) ) {
-   die( 'Not an entry point.' );
-}; // if
-
 class SemanticTitle {
 
+   /**
+* @since 2.0
+*
+* @param Parser &$parser
+*/
+   public static function setup( &$parser ) {
 
-   // Returns semantic title text for the specified title.
-   // May be used by other extensions to get semantic title for specified 
page.
-   static public function getText( Title $title ) {
+   if ( !isset( $GLOBALS['wgSemanticTitleProperties'] ) ) {
+   $GLOBALS['wgSemanticTitleProperties'] = array();
+   }
 
-   global $wgSemanticTitleProperties;
+   if ( !isset( $GLOBALS['wgSemanticTitleHideSubtitle'] ) ) {
+   $GLOBALS['wgSemanticTitleHideSubtitle'] = false;
+   }
 
-   // TODO: Cache for semantic titles?
+   $parser->setFunctionHook( 'semantic-title',
+   __CLASS__ . '::hookSemanticTitle' );
 
-   $ns = $title->getNamespace();
-   if ( array_key_exists( $ns, $wgSemanticTitleProperties ) && ! 
$title->isRedirect() ) {
-   $label = $wgSemanticTitleProperties[ $ns ];
-   $store = smwfGetStore();
+   return true;
+
+   }
+
+
+   /**
+* Handle links. Implements LinkBegin hook of Linker class.
+* If a link is customized by a user (e. g. [[Target|Text]]) it should
+* remain intact. Let us assume a link is not customized if its text is
+* the prefixed or (to support semantic queries) non-prefixed title of
+* the target page.
+*
+* @since 1.0
+*
+* @param $dummy
+* @param Title $target
+* @param &$text
+* @param &$customAttribs
+* @param &$query
+* @param &$options
+* @param &$ret
+*/
+   public static function onLinkBegin( $dummy, Title $target, &$text,
+   &$customAttribs, &$query, &$options, &$ret ) {
+
+   $instance = new self( $target );
+
+   if ( isset( $text ) ) {
+
+   if ( !is_string( $text ) ) {
+
+   return true;
+
+   }
+
+   $title = Title::newFromText( $text );
+
+   if ( is_null( $title ) ) {
+
+   return true;
+
+   }
+
+   if ( $title->getText() != $target->getText() ) {
+
+   return true;
+
+   }
+
+   if ( $title->getSubjectNsText() == 
$target->getSubjectNsText() ||
+   $title->getSubjectNsText() == '' ) {
+
+   $instance->getSemanticTitle( $text );
+
+   }
+
+   } else {
+
+   $instance->getSemanticTitle( $text );
+
+   }
+
+   return true;
+
+   }
+
+   /**
+* Handle self links.
+*
+* @since 1.3
+*
+* @param Title $nt
+* @param &$html
+* @param &$trail
+* @param &$prefix
+*/
+   public static function onSelfLinkBegin( Title $nt, &$html, &$trail,
+   &$prefix, &$ret ) {
+
+   $instance = new self( $nt );
+
+   $instance->getSemanticTitle( $html );
+
+   return true;
+
+   }
+
+   /**
+* Handle page title.
+*
+* @since 1.0
+*
+* @param OutputPage &$out
+* @param Skin &$sk
+*/
+   static function onBeforePageDisplay( OutputPage &$out, Skin &$sk ) {
+
+   $title = $out->getTitle();
+   if ( ! $title instanceof Title ) {
+
+   return true;
+
+   }
+
+   // remove fragment (LiquidThreads interaction)
+   $title = Title::newFromText( $titl

[MediaWiki-commits] [Gerrit] [FEAT] Diff: Use PatchManager for showDiff - change (pywikibot/core)

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

Change subject: [FEAT] Diff: Use PatchManager for showDiff
..


[FEAT] Diff: Use PatchManager for showDiff

This uses PatchManager for pywikibot.showDiff and also includes now a
header.

It also fixes the missing space in front of a line if it was added or
removed. This makes it consistent with lines where only parts of it were
changed which use difflib.ndiff. And it fixes a crash if both texts are
equal and not empty.

Also a minor change that the state which stores if it ends with the
default color is now represented as a boolean.

Change-Id: Ic59df944b4c64b8536a5178e1aabc0b1adfeab47
---
M pywikibot/__init__.py
M pywikibot/diff.py
2 files changed, 18 insertions(+), 65 deletions(-)

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



diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index d70dc86..fc1a708 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -9,7 +9,6 @@
 __version__ = '$Id$'
 
 import datetime
-import difflib
 import math
 import re
 import sys
@@ -49,6 +48,7 @@
 from pywikibot.tools import UnicodeMixin, redirect_func
 from pywikibot.i18n import translate
 from pywikibot.data.api import UploadWarning
+from pywikibot.diff import PatchManager
 import pywikibot.textlib as textlib
 import pywikibot.tools
 
@@ -602,60 +602,7 @@
 The differences are highlighted (only on compatible systems) to show which
 changes were made.
 """
-# This is probably not portable to non-terminal interfaces
-# For information on difflib, see http://pydoc.org/2.1/difflib.html
-color = {
-'+': 'lightgreen',
-'-': 'lightred',
-}
-diff = u''
-colors = []
-# This will store the last line beginning with + or -.
-lastline = None
-# For testing purposes only: show original, uncolored diff
-# for line in difflib.ndiff(oldtext.splitlines(), 
newtext.splitlines()):
-# print line
-for line in difflib.ndiff(oldtext.splitlines(), newtext.splitlines()):
-if line.startswith('?'):
-# initialize color vector with None, which means default color
-lastcolors = [None for c in lastline]
-# colorize the + or - sign
-lastcolors[0] = color[lastline[0]]
-# colorize changed parts in red or green
-for i in range(min(len(line), len(lastline))):
-if line[i] != ' ':
-lastcolors[i] = color[lastline[0]]
-diff += lastline + '\n'
-# append one None (default color) for the newline character
-colors += lastcolors + [None]
-elif lastline:
-diff += lastline + '\n'
-# colorize the + or - sign only
-lastcolors = [None for c in lastline]
-lastcolors[0] = color[lastline[0]]
-colors += lastcolors + [None]
-lastline = None
-if line[0] in ('+', '-'):
-lastline = line
-# there might be one + or - line left that wasn't followed by a ? line.
-if lastline:
-diff += lastline + '\n'
-# colorize the + or - sign only
-lastcolors = [None for c in lastline]
-lastcolors[0] = color[lastline[0]]
-colors += lastcolors + [None]
-
-result = u''
-lastcolor = None
-for i in range(len(diff)):
-if colors[i] != lastcolor:
-if lastcolor is None:
-result += '\03{%s}' % colors[i]
-else:
-result += '\03{default}'
-lastcolor = colors[i]
-result += diff[i]
-output(result)
+PatchManager(oldtext, newtext).print_hunks()
 
 
 # Throttle and thread handling
diff --git a/pywikibot/diff.py b/pywikibot/diff.py
index 7ac30dc..e118770 100644
--- a/pywikibot/diff.py
+++ b/pywikibot/diff.py
@@ -77,15 +77,17 @@
 return l
 
 for tag, i1, i2, j1, j2 in self.group:
+# equal/delete/insert add additional space after the sign as it's
+# what difflib.ndiff does do too.
 if tag == 'equal':
 for line in self.a[i1:i2]:
-yield ' ' + check_line(line)
+yield '  ' + check_line(line)
 if tag in ('delete'):
 for line in self.a[i1:i2]:
-yield '-' + check_line(line)
+yield '- ' + check_line(line)
 if tag in ('insert'):
 for line in self.b[j1:j2]:
-yield '+' + check_line(line)
+yield '+ ' + check_line(line)
 if tag in ('replace'):
 for line in difflib.ndiff(self.a[i1:i2], self.b[j1:j2]):
 yield check_line(line)
@@ -132,20 +134,20 @@
 return line
 
 colored_line = u''
-state = 'Close'
+color_closed = True
 for char, char_ref i

[MediaWiki-commits] [Gerrit] [IMPROV] TestBaseCase: Only add backward compatible aliases ... - change (pywikibot/core)

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

Change subject: [IMPROV] TestBaseCase: Only add backward compatible aliases if 
needed
..


[IMPROV] TestBaseCase: Only add backward compatible aliases if needed

Instead of assuming that Python 2 won't support currently Python 3
specific methods this just adds a wrapper for the old name if the new
name isn't implemented.

Change-Id: I1022d27fcecdc516b3ebf42dc3380458163b2aa4
---
M tests/aspects.py
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/tests/aspects.py b/tests/aspects.py
index d6da7b8..40edb6d 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -49,7 +49,7 @@
 
 """Base class for all tests."""
 
-if sys.version_info[0] == 2:
+if not hasattr(unittest.TestCase, 'assertRaisesRegex'):
 def assertRaisesRegex(self, *args, **kwargs):
 """
 Wrapper of unittest.assertRaisesRegexp for Python 2 unittest.
@@ -58,6 +58,7 @@
 """
 return self.assertRaisesRegexp(*args, **kwargs)
 
+if not hasattr(unittest.TestCase, 'assertRegex'):
 def assertRegex(self, *args, **kwargs):
 """
 Wrapper of unittest.assertRegexpMatches for Python 2 unittest.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1022d27fcecdc516b3ebf42dc3380458163b2aa4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [IMPROV] TestBaseCase: Only add backward compatible aliases ... - change (pywikibot/core)

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

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

Change subject: [IMPROV] TestBaseCase: Only add backward compatible aliases if 
needed
..

[IMPROV] TestBaseCase: Only add backward compatible aliases if needed

Instead of assuming that Python 2 won't support currently Python 3
specific methods this just adds a wrapper for the old name if the new
name isn't implemented.

Change-Id: I1022d27fcecdc516b3ebf42dc3380458163b2aa4
---
M tests/aspects.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/45/169645/1

diff --git a/tests/aspects.py b/tests/aspects.py
index d6da7b8..40edb6d 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -49,7 +49,7 @@
 
 """Base class for all tests."""
 
-if sys.version_info[0] == 2:
+if not hasattr(unittest.TestCase, 'assertRaisesRegex'):
 def assertRaisesRegex(self, *args, **kwargs):
 """
 Wrapper of unittest.assertRaisesRegexp for Python 2 unittest.
@@ -58,6 +58,7 @@
 """
 return self.assertRaisesRegexp(*args, **kwargs)
 
+if not hasattr(unittest.TestCase, 'assertRegex'):
 def assertRegex(self, *args, **kwargs):
 """
 Wrapper of unittest.assertRegexpMatches for Python 2 unittest.

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

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

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


[MediaWiki-commits] [Gerrit] Update and add missing documentation - change (mediawiki...MobileFrontend)

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

Change subject: Update and add missing documentation
..


Update and add missing documentation


Change-Id: I974b98997bb168d2db956316f80a9e20865e177f
---
M javascripts/LoadingOverlay.js
M javascripts/modules/editor/VisualEditorOverlay.js
M javascripts/modules/issues/CleanupOverlay.js
M javascripts/modules/languages/LanguageOverlay.js
M javascripts/modules/mediaViewer/ImageApi.js
M javascripts/modules/mediaViewer/ImageOverlay.js
M javascripts/modules/nearby/Nearby.js
M javascripts/modules/nearby/NearbyApi.js
M javascripts/modules/notifications/NotificationsOverlay.js
M javascripts/modules/references/references.js
M javascripts/modules/search/SearchApi.js
M javascripts/modules/search/SearchOverlay.js
M javascripts/modules/talk/TalkOverlay.js
M javascripts/modules/talk/TalkSectionAddOverlay.js
M javascripts/modules/talk/TalkSectionOverlay.js
M javascripts/modules/toc/toc.js
M javascripts/modules/tutorials/PageActionOverlay.js
M javascripts/modules/uploads/LeadPhoto.js
M javascripts/modules/uploads/LeadPhotoUploaderButton.js
M javascripts/modules/uploads/PhotoUploadOverlay.js
M javascripts/modules/uploads/PhotoUploadProgress.js
M javascripts/modules/uploads/UploadTutorial.js
M javascripts/specials/mobileoptions.js
23 files changed, 32 insertions(+), 1 deletion(-)

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



diff --git a/javascripts/LoadingOverlay.js b/javascripts/LoadingOverlay.js
index 8cda9f3..df6e69c 100644
--- a/javascripts/LoadingOverlay.js
+++ b/javascripts/LoadingOverlay.js
@@ -2,6 +2,8 @@
var Overlay = M.require( 'Overlay' ), LoadingOverlay;
 
/**
+* Overlay that initially shows loading animation until
+** caller hides it with .hide()
 * @class LoadingOverlay
 * @extends Overlay
 */
diff --git a/javascripts/modules/editor/VisualEditorOverlay.js 
b/javascripts/modules/editor/VisualEditorOverlay.js
index 7ab3392..1228aa2 100644
--- a/javascripts/modules/editor/VisualEditorOverlay.js
+++ b/javascripts/modules/editor/VisualEditorOverlay.js
@@ -3,6 +3,7 @@
VisualEditorOverlay;
 
/**
+* Overlay for VisualEditor view
 * @class VisualEditorOverlay
 * @extends EditorOverlayBase
 */
diff --git a/javascripts/modules/issues/CleanupOverlay.js 
b/javascripts/modules/issues/CleanupOverlay.js
index a4bb547..6264d8f 100644
--- a/javascripts/modules/issues/CleanupOverlay.js
+++ b/javascripts/modules/issues/CleanupOverlay.js
@@ -4,6 +4,7 @@
icon = new Icon( { name: 'cleanup-gray', additionalClassNames: 
'issue-notice', hasText: true } ),
 
/**
+* Overlay for displaying page issues
 * @class CleanupOverlay
 * @extends Overlay
 */
diff --git a/javascripts/modules/languages/LanguageOverlay.js 
b/javascripts/modules/languages/LanguageOverlay.js
index 771a3e5..c65ca4c 100644
--- a/javascripts/modules/languages/LanguageOverlay.js
+++ b/javascripts/modules/languages/LanguageOverlay.js
@@ -4,6 +4,7 @@
LanguageOverlay;
 
/**
+* Overlay displaying list of languages for a page
 * @class LanguageOverlay
 * @extends Overlay
 */
diff --git a/javascripts/modules/mediaViewer/ImageApi.js 
b/javascripts/modules/mediaViewer/ImageApi.js
index 72ce944..fee9ad3 100644
--- a/javascripts/modules/mediaViewer/ImageApi.js
+++ b/javascripts/modules/mediaViewer/ImageApi.js
@@ -15,6 +15,7 @@
}
 
/**
+* API for retrieving image thumbnails for a given page
 * @class ImageApi
 * @extends Api
 */
diff --git a/javascripts/modules/mediaViewer/ImageOverlay.js 
b/javascripts/modules/mediaViewer/ImageOverlay.js
index 7c66bda..7a1cb94 100644
--- a/javascripts/modules/mediaViewer/ImageOverlay.js
+++ b/javascripts/modules/mediaViewer/ImageOverlay.js
@@ -6,6 +6,7 @@
api = new ImageApi();
 
/**
+* Displays images in full screen overlay
 * @class ImageOverlay
 * @extends Overlay
 */
diff --git a/javascripts/modules/nearby/Nearby.js 
b/javascripts/modules/nearby/Nearby.js
index 48c8a47..087ca78 100644
--- a/javascripts/modules/nearby/Nearby.js
+++ b/javascripts/modules/nearby/Nearby.js
@@ -4,8 +4,11 @@
Nearby;
 
/**
-* @extends View
+* List of nearby pages
+
 * @class Nearby
+* @uses NearbyApi
+* @extends PageList
 */
Nearby = PageList.extend( {
errorMessages: {
@@ -59,6 +62,10 @@
}
return result;
},
+   /**
+* Get pages within a nearby range of current location
+* @inheritDoc
+*/
initialize: function ( options ) {
var self = this,

[MediaWiki-commits] [Gerrit] Fix off-by-one error in mw.track subscriber - change (mediawiki...EventLogging)

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

Change subject: Fix off-by-one error in mw.track subscriber
..


Fix off-by-one error in mw.track subscriber

For mw.track( 'event.foo' ), it would try to load
'schema..foo'.

Also listen for 'event.' instead of 'event', in case
someone decides to use 'events.' or 'eventually.'
or whatever.

Bug: 72197
Change-Id: Idb7db8dfa12d24955ea8d51d7280f9438f8b87a7
---
M modules/ext.eventLogging.subscriber.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/ext.eventLogging.subscriber.js 
b/modules/ext.eventLogging.subscriber.js
index b78bc1a..6c812fa 100644
--- a/modules/ext.eventLogging.subscriber.js
+++ b/modules/ext.eventLogging.subscriber.js
@@ -31,7 +31,7 @@
 * @param {Object} event
 */
function handleTrackedEvent( topic, event ) {
-   var schema = titleCase( topic.slice( topic.indexOf( '.' ) ) ),
+   var schema = titleCase( topic.slice( topic.indexOf( '.' ) + 1 ) 
),
dependencies = [ 'ext.eventLogging', 'schema.' + schema 
];
 
mediaWiki.loader.using( dependencies, function () {
@@ -40,7 +40,7 @@
}
 
$( window ).on( 'load', function () {
-   mw.trackSubscribe( 'event', handleTrackedEvent );
+   mw.trackSubscribe( 'event.', handleTrackedEvent );
} );
 
 } ( mediaWiki, jQuery ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb7db8dfa12d24955ea8d51d7280f9438f8b87a7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Jforrester 
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] RT - add mail aliases - change (operations/puppet)

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

Change subject: RT - add mail aliases
..


RT - add mail aliases

on the RT server, magnesium, exim is configured like
"# Use the system aliasfile /etc/aliases for system domains"
and rt.wikimedia.org is a system domain

in T675 for phabricator, we will want to be able to
redirect just some of the RT queues over to phab
but without redirecting them all

first i wanted to puppetize the entire /etc/aliases
but paravoid pointed out how there is the native puppet
type mailalias for that. so i'm using that.

the "ops-request"->"ops-requests" thing already exists
on the server like that. and the other redirect is to
test forwarding things to phabricator

later we will forward some queues over to phabricator
but not all of them at once

Bug: T675
Change-Id: I0f81033477188dae4821b8b25eb729078a4d83d2
---
A modules/requesttracker/manifests/aliases.pp
M modules/requesttracker/manifests/init.pp
2 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/modules/requesttracker/manifests/aliases.pp 
b/modules/requesttracker/manifests/aliases.pp
new file mode 100644
index 000..9c39817
--- /dev/null
+++ b/modules/requesttracker/manifests/aliases.pp
@@ -0,0 +1,11 @@
+class requesttracker::aliases {
+
+mailalias { 'ops-request':
+recipient => 'ops-reque...@rt.wikimedia.org',
+}
+
+mailalias { 'phabricator':
+recipient => 'r...@phabricator.wikimedia.org',
+}
+
+}
diff --git a/modules/requesttracker/manifests/init.pp 
b/modules/requesttracker/manifests/init.pp
index e1c4ee7..ec60cd2 100644
--- a/modules/requesttracker/manifests/init.pp
+++ b/modules/requesttracker/manifests/init.pp
@@ -20,6 +20,7 @@
 include requesttracker::config
 include requesttracker::forms
 include requesttracker::plugins
+include requesttracker::aliases
 
 class { 'requesttracker::apache':
 apache_site => $apache_site,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f81033477188dae4821b8b25eb729078a4d83d2
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Jeremyb 
Gerrit-Reviewer: Jgreen 
Gerrit-Reviewer: John F. Lewis 
Gerrit-Reviewer: Matanya 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Rush 
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 more references to ve.bind - change (mediawiki...VisualEditor)

2014-10-28 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Remove more references to ve.bind
..

Remove more references to ve.bind

Seems some of them have crept back in since I1a7fc7f2 (and we missed one 
somehow)

Bug: 72156
Change-Id: I5631fb7d5963d06aeb238c1daa44344b2060ef1a
---
M modules/ve-mw/dm/models/ve.dm.MWImageModel.js
M modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
M modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
M modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
5 files changed, 13 insertions(+), 13 deletions(-)


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

diff --git a/modules/ve-mw/dm/models/ve.dm.MWImageModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWImageModel.js
index b0cd7b2..7f350b8 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWImageModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWImageModel.js
@@ -274,7 +274,7 @@
 
// Call for updated scalable
if ( remoteFilename ) {
-   ve.dm.MWImageNode.static.getScalablePromise( remoteFilename 
).done( ve.bind( function ( info ) {
+   ve.dm.MWImageNode.static.getScalablePromise( remoteFilename 
).done( function ( info ) {
this.scalable.setOriginalDimensions( {
width: info.width,
height: info.height
@@ -287,7 +287,7 @@
info.mediatype,
this.scalable
);
-   }, this ) );
+   }.bind( this ) );
}
 
// Resize the new image's current dimensions to default or based on the 
bounding box
@@ -1049,7 +1049,7 @@
 
// Call for updated scalable
if ( imageName ) {
-   ve.dm.MWImageNode.static.getScalablePromise( imageName ).done( 
ve.bind( function ( info ) {
+   ve.dm.MWImageNode.static.getScalablePromise( imageName ).done( 
function ( info ) {
this.scalable.setOriginalDimensions( {
width: info.width,
height: info.height
@@ -1070,7 +1070,7 @@
this.initialHash.scalable.currentDimensions = 
this.scalable.getDefaultDimensions();
}
 
-   }, this ) );
+   }.bind( this ) );
}
 };
 
diff --git a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
index 42ec7f1..2038144 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
@@ -237,8 +237,8 @@
lang: mw.config.get( 'wgUserLanguage' ),
redirects: '1'
} )
-   .done( ve.bind( this.fetchRequestDone, this, titles, 
specs ) )
-   .always( ve.bind( this.fetchRequestAlways, this, queue 
) );
+   .done( this.fetchRequestDone.bind( this, titles, specs 
) )
+   .always( this.fetchRequestAlways.bind( this, queue ) );
};
 
ve.dm.MWTransclusionModel.prototype.fetchRequestDone = function ( 
titles, specs, data ) {
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
index 2d8e3cb..3054c37 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
@@ -273,7 +273,7 @@
 ve.dm.MWImageNode.prototype.getScalable = function () {
if ( !this.scalablePromise ) {
this.scalablePromise = 
ve.dm.MWImageNode.static.getScalablePromise( this.getFilename() )
-   .done( ve.bind( function ( info ) {
+   .done( function ( info ) {
if ( info ) {

this.getScalable().setOriginalDimensions( {
width: info.width,
@@ -288,7 +288,7 @@
this.getScalable()
);
}
-   }, this ) );
+   }.bind( this ) );
}
// Parent method
return ve.dm.ResizableNode.prototype.getScalable.call( this );
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index ca10ef4..b7f3c47 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -1205,9 +1205,9 @@
{ dir: this.surface.getModel().getDocument().getLang() }
)
// Call onSaveDialogClose() when the save

[MediaWiki-commits] [Gerrit] Simplify initialisation logic - change (pywikibot/core)

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

Change subject: Simplify initialisation logic
..


Simplify initialisation logic

Change-Id: Ia8df25bc2d06c7a53c18e869aae87bac901321ac
---
M scripts/makecat.py
1 file changed, 12 insertions(+), 8 deletions(-)

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



diff --git a/scripts/makecat.py b/scripts/makecat.py
index cb2acf4..0b28870 100644
--- a/scripts/makecat.py
+++ b/scripts/makecat.py
@@ -235,10 +235,13 @@
 except IOError:
 # File does not exist
 excludefile = codecs.open(filename, 'w', encoding=mysite.encoding())
+
+# Get parent categories in order to `removeparent`
 try:
 parentcats = workingcat.categories()
 except pywikibot.Error:
 parentcats = []
+
 # Do not include articles already in subcats; only checking direct subcats
 subcatlist = list(workingcat.subcategories())
 if subcatlist:
@@ -247,14 +250,12 @@
 artlist = list(cat.articles())
 for page in artlist:
 checked[page] = page
-list = [x for x in workingcat.articles()]
-if list:
-for pl in list:
-checked[pl] = pl
-list = pagegenerators.PreloadingGenerator(list)
-for pl in list:
-include(pl)
-else:
+
+# Fetch articles in category, and mark as already checked (seen)
+# If category is empty, ask user if they want to look for pages
+# in a diferent category.
+articles = list(workingcat.articles(content=True))
+if not articles:
 pywikibot.output(
 u"Category %s does not exist or is empty. Which page to start 
with?"
 % workingcatname)
@@ -263,6 +264,9 @@
 answer = workingcatname
 pywikibot.output(u'' + answer)
 pl = pywikibot.Page(mysite, answer)
+articles = [pl]
+
+for pl in articles:
 checked[pl] = pl
 include(pl)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8df25bc2d06c7a53c18e869aae87bac901321ac
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Nullzero 
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 "Add ::apt to stage => first" - change (operations/puppet)

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

Change subject: Revert "Add ::apt to stage => first"
..


Revert "Add ::apt to stage => first"

Creates a dependency cycle.

This reverts commit 134de68a53d7d842490ad7579771637c9e20808f.

Change-Id: Iecc000fd0c93a428af9c9e8ea2aefa0dbe03313d
---
M manifests/stages.pp
1 file changed, 5 insertions(+), 20 deletions(-)

Approvals:
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/manifests/stages.pp b/manifests/stages.pp
index d9b8ab5..758472d 100644
--- a/manifests/stages.pp
+++ b/manifests/stages.pp
@@ -1,21 +1,6 @@
-# == Manifest: ::stages
-#
-# Puppet segments its run into run stages. By default, there is only
-# the 'main' stage. We add a 'first' stage (which runs before 'main')
-# and a 'last' stage (which runs after it) as a way of ensuring that
-# certain actions happen at the very beginning or very end of a run.
-#
+stage { 'first': before => Stage[main] }
+stage { 'last': require => Stage[main] }
 
-## Stages
-
-stage { 'first': before => Stage['main'], }
-stage { 'last': require => Stage['main'], }
-
-
-## Run first
-
-class { '::apt': stage => 'first', } ->
-class { '::apt::update': stage => 'first', }
-
-
-## Run last
+class {
+'apt::update': stage => first;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iecc000fd0c93a428af9c9e8ea2aefa0dbe03313d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] Revert "Add ::apt to stage => first" - change (operations/puppet)

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

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

Change subject: Revert "Add ::apt to stage => first"
..

Revert "Add ::apt to stage => first"

Creates a dependency cycle.

This reverts commit 134de68a53d7d842490ad7579771637c9e20808f.

Change-Id: Iecc000fd0c93a428af9c9e8ea2aefa0dbe03313d
---
M manifests/stages.pp
1 file changed, 5 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/169643/1

diff --git a/manifests/stages.pp b/manifests/stages.pp
index d9b8ab5..758472d 100644
--- a/manifests/stages.pp
+++ b/manifests/stages.pp
@@ -1,21 +1,6 @@
-# == Manifest: ::stages
-#
-# Puppet segments its run into run stages. By default, there is only
-# the 'main' stage. We add a 'first' stage (which runs before 'main')
-# and a 'last' stage (which runs after it) as a way of ensuring that
-# certain actions happen at the very beginning or very end of a run.
-#
+stage { 'first': before => Stage[main] }
+stage { 'last': require => Stage[main] }
 
-## Stages
-
-stage { 'first': before => Stage['main'], }
-stage { 'last': require => Stage['main'], }
-
-
-## Run first
-
-class { '::apt': stage => 'first', } ->
-class { '::apt::update': stage => 'first', }
-
-
-## Run last
+class {
+'apt::update': stage => first;
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecc000fd0c93a428af9c9e8ea2aefa0dbe03313d
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] Add ::apt to stage => first - change (operations/puppet)

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

Change subject: Add ::apt to stage => first
..


Add ::apt to stage => first

To ensure that apt configs are applied before we start installing packages.

Change-Id: I481bc29ba5f0b6fef8c61d16e9d1b5e1cfeb0c55
---
M manifests/stages.pp
1 file changed, 20 insertions(+), 5 deletions(-)

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



diff --git a/manifests/stages.pp b/manifests/stages.pp
index 758472d..d9b8ab5 100644
--- a/manifests/stages.pp
+++ b/manifests/stages.pp
@@ -1,6 +1,21 @@
-stage { 'first': before => Stage[main] }
-stage { 'last': require => Stage[main] }
+# == Manifest: ::stages
+#
+# Puppet segments its run into run stages. By default, there is only
+# the 'main' stage. We add a 'first' stage (which runs before 'main')
+# and a 'last' stage (which runs after it) as a way of ensuring that
+# certain actions happen at the very beginning or very end of a run.
+#
 
-class {
-'apt::update': stage => first;
-}
+## Stages
+
+stage { 'first': before => Stage['main'], }
+stage { 'last': require => Stage['main'], }
+
+
+## Run first
+
+class { '::apt': stage => 'first', } ->
+class { '::apt::update': stage => 'first', }
+
+
+## Run last

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I481bc29ba5f0b6fef8c61d16e9d1b5e1cfeb0c55
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
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] [IMPROV] Check version via > 2 or == 2 - change (pywikibot/core)

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

Change subject: [IMPROV] Check version via > 2 or == 2
..


[IMPROV] Check version via > 2 or == 2

This unifies the Python version check. Instead of different kind of
checks (> 2, == 3, >= 3 or == 2, < 3, <= 2) this always uses the first
variant (> 2 and == 2) and if it's like a switch it always does the
Python 3 specific code first and the Python 2 specific code in the else
branch.

Change-Id: I826fd50b7343ff5f6e775936957cdbb5e18cd40f
---
M generate_family_file.py
M pwb.py
M pywikibot/__init__.py
M pywikibot/comms/http.py
M pywikibot/comms/threadedhttp.py
M pywikibot/data/wikidataquery.py
M pywikibot/family.py
M pywikibot/i18n.py
M pywikibot/page.py
M pywikibot/textlib.py
M pywikibot/tools.py
M pywikibot/userinterfaces/terminal_interface_base.py
M pywikibot/weblib.py
M tests/aspects.py
M tests/http_tests.py
M tests/weblib_tests.py
16 files changed, 62 insertions(+), 68 deletions(-)

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



diff --git a/generate_family_file.py b/generate_family_file.py
index 78e663f..f98de19 100644
--- a/generate_family_file.py
+++ b/generate_family_file.py
@@ -21,19 +21,20 @@
 import codecs
 from collections import defaultdict
 from distutils.version import LooseVersion as V
-
-if sys.version_info[0] == 3:
-raw_input = input
+import json
 
 # creating & retrieving urls
-if sys.version_info[0] == 2:
-from urlparse import urlparse, urljoin
-import urllib2
-from urllib2 import HTTPError
-else:
+if sys.version_info[0] > 2:
 from urllib.parse import urlparse, urljoin
 from urllib.error import HTTPError
 import urllib.request as urllib2
+from html.parser import HTMLParser
+raw_input = input
+else:
+from urlparse import urlparse, urljoin
+import urllib2
+from urllib2 import HTTPError
+from HTMLParser import HTMLParser
 
 
 def urlopen(url):
@@ -43,20 +44,13 @@
' - https://www.mediawiki.org/wiki/Pywikibot'})
 uo = urllib2.urlopen(req)
 try:
-if sys.version_info[0] == 2:
-uo.charset = 
uo.headers.getfirstmatchingheader('Content-Type')[0].strip().split('charset=')[1]
-else:
+if sys.version_info[0] > 2:
 uo.charset = uo.headers.get_content_charset()
+else:
+uo.charset = 
uo.headers.getfirstmatchingheader('Content-Type')[0].strip().split('charset=')[1]
 except IndexError:
 uo.charset = 'latin-1'
 return uo
-
-# parsing response data
-import json
-if sys.version_info[0] == 2:
-from HTMLParser import HTMLParser
-else:
-from html.parser import HTMLParser
 
 
 class WikiHTMLPageParser(HTMLParser):
diff --git a/pwb.py b/pwb.py
index 16efbca..3a53ef2 100644
--- a/pwb.py
+++ b/pwb.py
@@ -56,10 +56,10 @@
 main_mod = imp.new_module('__main__')
 sys.modules['__main__'] = main_mod
 main_mod.__file__ = filename
-if sys.version_info[0] == 2:
-main_mod.__builtins__ = sys.modules['__builtin__']
-else:
+if sys.version_info[0] > 2:
 main_mod.builtins = sys.modules['builtins']
+else:
+main_mod.__builtins__ = sys.modules['__builtin__']
 
 # Set sys.argv and the first path element properly.
 old_argv = sys.argv
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index d70dc86..3dbfb2d 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -16,11 +16,11 @@
 import threading
 import json
 
-if sys.version_info[0] == 2:
-from Queue import Queue
-else:
+if sys.version_info[0] > 2:
 from queue import Queue
 long = int
+else:
+from Queue import Queue
 
 # Use pywikibot. prefix for all in-package imports; this is to prevent
 # confusion with similarly-named modules in version 1 framework, for users
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 8822c6f..92eeb5d 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -42,7 +42,14 @@
   httplib2.__file__)
 sys.exit(1)
 
-if sys.version_info[0] == 2:
+if sys.version_info[0] > 2:
+from ssl import SSLError as SSLHandshakeError
+SSL_CERT_VERIFY_FAILED_MSG = "SSL: CERTIFICATE_VERIFY_FAILED"
+import queue as Queue
+import urllib.parse as urlparse
+from http import cookiejar as cookielib
+from urllib.parse import quote
+else:
 if 'SSLHandshakeError' in httplib2.__dict__:
 from httplib2 import SSLHandshakeError
 elif httplib2.__version__ == '0.6.0':
@@ -57,13 +64,6 @@
 import urlparse
 import cookielib
 from urllib2 import quote
-else:
-from ssl import SSLError as SSLHandshakeError
-SSL_CERT_VERIFY_FAILED_MSG = "SSL: CERTIFICATE_VERIFY_FAILED"
-import queue as Queue
-import urllib.parse as urlparse
-from http import cookiejar as cookielib
-from urllib.parse import quote
 
 from pywikibot import config
 from pywikibot.exceptio

[MediaWiki-commits] [Gerrit] WIP: Experiment with populating the icon library from Wikifont - change (mediawiki...MobileFrontend)

2014-10-28 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: WIP: Experiment with populating the icon library from Wikifont
..

WIP: Experiment with populating the icon library from Wikifont

Run grunt build-icons

Change-Id: I4e7171542195de6b8ebccf52d553d0160b4f28af
---
M less/iconsNew.less
A less/images/icons/E001 search.png
A less/images/icons/E001 search.svg
A less/images/icons/E003 close.png
A less/images/icons/E003 close.svg
A less/images/icons/E004 clear.png
A less/images/icons/E004 clear.svg
A less/images/icons/E005 watch.png
A less/images/icons/E005 watch.svg
A less/images/icons/E006 watched.png
A less/images/icons/E006 watched.svg
A less/images/icons/E007 watchlist.png
A less/images/icons/E007 watchlist.svg
A less/images/icons/E016 random.png
A less/images/icons/E016 random.svg
A less/images/icons/E018 settings.png
A less/images/icons/E018 settings.svg
A less/images/icons/E022 upload.png
A less/images/icons/E022 upload.svg
A less/images/icons/E025 bell.svg
A less/images/icons/E027 arrow left.png
A less/images/icons/E027 arrow left.svg
A less/images/icons/E028 arrow down.png
A less/images/icons/E028 arrow down.svg
A less/images/icons/E600 man.png
A less/images/icons/E600 man.svg
A less/images/icons/E601 profile.png
A less/images/icons/E601 profile.svg
A less/images/icons/E602 loggedout.png
A less/images/icons/E602 loggedout.svg
A less/images/icons/E800 edit.png
A less/images/icons/E800 edit.svg
A less/images/icons/E804 edit-locked.png
A less/images/icons/E804 edit-locked.svg
A less/images/icons/E811 talk.png
A less/images/icons/E811 talk.svg
A less/images/icons/E813 thank.png
A less/images/icons/E813 thank.svg
A less/images/icons/E841 upload locked.png
A less/images/icons/E841 upload locked.svg
A less/images/icons/E842 upload.png
A less/images/icons/E842 upload.svg
A less/images/icons/E851 nearby.png
A less/images/icons/E851 nearby.svg
D less/images/icons/bell.png
D less/images/icons/bell.svg
M less/images/icons/blue-triangle.png
M less/images/icons/contents-ltr.png
A less/images/icons/editSourceNormal.png
A less/images/icons/editToggle.png
A less/images/icons/editVeNormal.png
M less/images/icons/gray-triangle.png
M less/images/icons/hamburger.png
M less/images/icons/userAnonymous.png
M less/images/icons/userNormal.png
55 files changed, 254 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/42/169642/1

diff --git a/less/iconsNew.less b/less/iconsNew.less
index f4a2e2f..ff97338 100644
--- a/less/iconsNew.less
+++ b/less/iconsNew.less
@@ -3,123 +3,132 @@
 @import "minerva.mixins";
 @import "mediawiki.mixins";
 
-// FIXME: BEGIN: Find svg versions of all of these and add to icons folder
 // UI set
 .mw-ui-icon-talk {
-   .m-background-image('images/pagemenu/talk.png');
+   .m-background-image-svg-quick( 'images/icons/E811 talk' );
 }
 
 .mw-ui-icon-watch {
-   .m-background-image('images/watch.png');
-}
-
-.mw-ui-icon-edit {
-   .m-background-image('images/pagemenu/edit-locked.png');
-}
-
-.mw-ui-icon-edit-enabled {
-   .m-background-image('images/pagemenu/edit.png');
-}
-
-.mw-ui-icon-arrow-down {
-   .m-background-image('images/show.png');
-}
-
-.mw-ui-icon-arrow-up {
-   .m-background-image('images/hide.png');
+   .m-background-image-svg-quick( 'images/icons/E005 watch' );
 }
 
 .mw-ui-icon-watched {
-   .m-background-image('images/watched.png');
+   .m-background-image-svg-quick( 'images/icons/E006 watched' );
+}
+
+.mw-ui-icon-edit {
+   .m-background-image-svg-quick( 'images/icons/E804 edit-locked' );
+}
+
+.mw-ui-icon-edit-enabled {
+   .m-background-image-svg-quick( 'images/icons/E800 edit' );
+}
+
+// FIXME: Class name doesn't match with icon
+.mw-ui-icon-arrow-down {
+   .m-background-image-svg-quick( 'images/icons/E027 arrow left' );
+}
+
+.mw-ui-icon-arrow-up {
+   .m-background-image-svg-quick( 'images/icons/E028 arrow down' );
 }
 
 // Menu set
 .mw-ui-icon-home {
+   // FIXME: Get SVG for this.
.m-background-image('images/menu/home.png');
 }
 
 .mw-ui-icon-random {
-   .m-background-image('images/menu/random.png');
+   .m-background-image-svg-quick( 'images/icons/E016 random' );
 }
 
 .mw-ui-icon-watchlist {
-   .m-background-image('images/menu/watchlist.png');
+   .m-background-image-svg-quick( 'images/icons/E007 watchlist' );
 }
 
 .mw-ui-icon-uploads {
-   .m-background-image('images/menu/uploads.png');
+   .m-background-image-svg-quick( 'images/icons/E022 upload' );
 }
 
 .mw-ui-icon-nearby {
-   .m-background-image('images/menu/nearby.png');
+   .m-background-image-svg-quick( 'images/icons/E851 nearby' );
 }
 
 .mw-ui-icon-settings {
-   .m-background-image('images/menu/settings.png');
+   .m-background-image-svg-quick( 'images/icons/E018 settings' );
 }
 
 .mw-ui-icon-secondary-logout {

[MediaWiki-commits] [Gerrit] Tools: Use gruntfile to generate pngs - change (mediawiki...MobileFrontend)

2014-10-28 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Tools: Use gruntfile to generate pngs
..

Tools: Use gruntfile to generate pngs

Change-Id: I07fa0cf0325bceeaffe89d02ccb63bebded7f572
---
M Gruntfile.js
M package.json
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/41/169641/1

diff --git a/Gruntfile.js b/Gruntfile.js
index c46c67f..d0d6c16 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -13,6 +13,7 @@
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-notify' );
+   grunt.loadNpmTasks( 'grunt-svg2png' );
 
grunt.initConfig( {
URL: process.env.URL || 'http://127.0.0.1:8080/w/index.php/',
@@ -20,6 +21,11 @@
files: {
js: 'javascripts/**/*.js',
jsTests: 'tests/qunit/**/*.js'
+   },
+   svg2png: {
+   dist: {
+   src: 'less/images/icons/*.svg'
+   }
},
jshint: {
options: {
@@ -62,5 +68,5 @@
// Jenkins automatically runs grunt test for us
grunt.registerTask( 'test', [ 'lint', 'qunit' ] );
grunt.registerTask( 'default', [ 'test' ] );
-
+   grunt.registerTask( 'build-icons', [ 'svg2png' ] );
 };
diff --git a/package.json b/package.json
index 758b36d..ed1bf35 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
"svgo": ">=0.4.4"
},
"devDependencies": {
+   "grunt-svg2png": "0.2.5",
"grunt-contrib-jshint": "0.10.0",
"grunt-jscs": "0.8.1",
"js-beautify": "^1.5.4",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07fa0cf0325bceeaffe89d02ccb63bebded7f572
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] Simplify initialisation logic - change (pywikibot/core)

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

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

Change subject: Simplify initialisation logic
..

Simplify initialisation logic

Change-Id: Ia8df25bc2d06c7a53c18e869aae87bac901321ac
---
M scripts/makecat.py
1 file changed, 12 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/40/169640/1

diff --git a/scripts/makecat.py b/scripts/makecat.py
index cb2acf4..0b28870 100644
--- a/scripts/makecat.py
+++ b/scripts/makecat.py
@@ -235,10 +235,13 @@
 except IOError:
 # File does not exist
 excludefile = codecs.open(filename, 'w', encoding=mysite.encoding())
+
+# Get parent categories in order to `removeparent`
 try:
 parentcats = workingcat.categories()
 except pywikibot.Error:
 parentcats = []
+
 # Do not include articles already in subcats; only checking direct subcats
 subcatlist = list(workingcat.subcategories())
 if subcatlist:
@@ -247,14 +250,12 @@
 artlist = list(cat.articles())
 for page in artlist:
 checked[page] = page
-list = [x for x in workingcat.articles()]
-if list:
-for pl in list:
-checked[pl] = pl
-list = pagegenerators.PreloadingGenerator(list)
-for pl in list:
-include(pl)
-else:
+
+# Fetch articles in category, and mark as already checked (seen)
+# If category is empty, ask user if they want to look for pages
+# in a diferent category.
+articles = list(workingcat.articles(content=True))
+if not articles:
 pywikibot.output(
 u"Category %s does not exist or is empty. Which page to start 
with?"
 % workingcatname)
@@ -263,6 +264,9 @@
 answer = workingcatname
 pywikibot.output(u'' + answer)
 pl = pywikibot.Page(mysite, answer)
+articles = [pl]
+
+for pl in articles:
 checked[pl] = pl
 include(pl)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8df25bc2d06c7a53c18e869aae87bac901321ac
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] DequeGenerator - change (pywikibot/core)

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

Change subject: DequeGenerator
..


DequeGenerator

Scripts may be written to dynamically populate a list of pages to work on.
Ideally this list would be created using a generator, however that can
require a large rewrite in the flow control.

To simplify the porting of scripts, this changeset adds classes
DequeGenerator and DequePreloadingGenerator classes that allow the page
list to be extended during iteration.

Implemented in makecat.

Change-Id: I9e67a4d9d0f1736071434fa84796f22732896088
---
M pywikibot/pagegenerators.py
M pywikibot/tools.py
M scripts/makecat.py
M tests/pagegenerators_tests.py
4 files changed, 72 insertions(+), 22 deletions(-)

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



diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index eb8930a..b79dfda 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -28,7 +28,7 @@
 import time
 import pywikibot
 from pywikibot import date, config, i18n
-from pywikibot.tools import deprecated_args
+from pywikibot.tools import deprecated_args, DequeGenerator
 from pywikibot.comms import http
 import pywikibot.data.wikidataquery as wdquery
 
@@ -1143,6 +1143,18 @@
 yield i
 
 
+def DequePreloadingGenerator(generator, step=50):
+assert(isinstance(generator, DequeGenerator))
+
+while True:
+page_count = min(len(generator), step)
+if not page_count:
+raise StopIteration
+
+for page in PreloadingGenerator(generator, page_count):
+yield page
+
+
 def PreloadingItemGenerator(generator, step=50):
 """
 Yield preloaded pages taken from another generator.
diff --git a/pywikibot/tools.py b/pywikibot/tools.py
index 6064d86..dcf4fd4 100644
--- a/pywikibot/tools.py
+++ b/pywikibot/tools.py
@@ -13,7 +13,7 @@
 import time
 import inspect
 import re
-from collections import Mapping
+from collections import Mapping, deque
 from distutils.version import Version
 
 if sys.version_info[0] > 2:
@@ -320,6 +320,26 @@
 
 EMPTY_DEFAULT = EmptyDefault()
 
+
+class DequeGenerator(deque):
+
+"""A generator that allows items to be added during generating."""
+
+def __iter__(self):
+"""Return the object which will be iterated."""
+return self
+
+def next(self):
+"""Python 3 iterator method."""
+if len(self):
+return self.popleft()
+else:
+raise StopIteration
+
+def __next__(self):
+"""Python 3 iterator method."""
+return self.next()
+
 # Decorators
 #
 # Decorator functions without parameters are _invoked_ differently from
diff --git a/scripts/makecat.py b/scripts/makecat.py
index e523cff..42f4a7e 100644
--- a/scripts/makecat.py
+++ b/scripts/makecat.py
@@ -44,6 +44,7 @@
 import codecs
 import pywikibot
 from pywikibot import date, pagegenerators, i18n, textlib
+from pywikibot.tools import DequeGenerator
 
 
 def isdate(s):
@@ -197,7 +198,7 @@
 removeparent = True
 main = True
 workingcatname = ''
-tocheck = []
+tocheck = DequeGenerator()
 for arg in pywikibot.handleArgs():
 if arg.startswith('-nodate'):
 skipdates = True
@@ -271,26 +272,14 @@
 answer = workingcatname
 pywikibot.output(u'' + answer)
 pl = pywikibot.Page(mysite, answer)
-tocheck = []
 checked[pl] = pl
 include(pl)
-loaded = 0
-while tocheck:
-if loaded == 0:
-if len(tocheck) < 50:
-loaded = len(tocheck)
-else:
-loaded = 50
-tocheck = [x for x in 
pagegenerators.PreloadingGenerator(tocheck[:loaded])]
-if not checkbroken:
-if not tocheck[0].exists():
-pass
-else:
-asktoadd(tocheck[0])
-else:
-asktoadd(tocheck[0])
-tocheck = tocheck[1:]
-loaded -= 1
+
+gen = pagegenerators.DequePreloadingGenerator(tocheck)
+
+for page in gen:
+if checkbroken or page.exists():
+asktoadd(page)
 
 finally:
 try:
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index 44a99cd..dd85f1b 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -11,7 +11,12 @@
 import pywikibot
 from pywikibot import pagegenerators
 
-from tests.aspects import unittest, TestCase, WikidataTestCase
+from tests.aspects import (
+unittest,
+TestCase,
+WikidataTestCase,
+DefaultSiteTestCase,
+)
 
 
 class TestPageGenerators(TestCase):
@@ -154,6 +159,30 @@
 self.assertEqual(len(set(item['revid'] for item in items)), 4)
 
 
+class TestDequePreloadingGenerator(DefaultSiteTestCase):
+
+"""Test preloading generator on lists."""
+
+def test_deque_preloading(self):
+"""Test pages being added to a DequePreloadingGen

[MediaWiki-commits] [Gerrit] Expose ID of relevant page in JS variables - change (mediawiki/core)

2014-10-28 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Expose ID of relevant page in JS variables
..

Expose ID of relevant page in JS variables

Bug: 53774
Change-Id: I06cd037804daba59e4f42e3be5f2883a82fcaa27
---
M includes/OutputPage.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/39/169639/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 3bb2175..f432a53 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3154,6 +3154,7 @@
'wgMonthNames' => $lang->getMonthNamesArray(),
'wgMonthNamesShort' => 
$lang->getMonthAbbreviationsArray(),
'wgRelevantPageName' => 
$relevantTitle->getPrefixedDBkey(),
+   'wgRelevantArticleId' => WikiPage::factory( 
$relevantTitle )->getId()
);
 
if ( $user->isLoggedIn() ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06cd037804daba59e4f42e3be5f2883a82fcaa27
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] MWTransclusionModel: Exclude parts serialising to '' from th... - change (mediawiki...VisualEditor)

2014-10-28 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: MWTransclusionModel: Exclude parts serialising to '' from the 
plain object
..

MWTransclusionModel: Exclude parts serialising to '' from the plain object

So we get rid of empty content nodes

Bug: 63341
Change-Id: I1d49cc709bf92cc53ba064d148a76650c5143935
---
M modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
index 42ec7f1..515014f 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
@@ -312,7 +312,7 @@
for ( i = 0, len = this.parts.length; i < len; i++ ) {
part = this.parts[i];
serialization = part.serialize();
-   if ( serialization !== undefined ) {
+   if ( serialization !== undefined && serialization !== 
'' ) {
obj.parts.push( serialization );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d49cc709bf92cc53ba064d148a76650c5143935
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] phab - remove duplicate check command - change (operations/puppet)

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

Change subject: phab - remove duplicate check command
..


phab - remove duplicate check command

this is now already in the checkcommands.cfg
as we used it in the past. adding it here as well
is duplicate

Change-Id: I238bfef6cd1f57fd330161a1304673d32d62ddbf
---
D modules/nagios_common/files/check_commands/phab.cfg
1 file changed, 0 insertions(+), 8 deletions(-)

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



diff --git a/modules/nagios_common/files/check_commands/phab.cfg 
b/modules/nagios_common/files/check_commands/phab.cfg
deleted file mode 100644
index 682fe3f..000
--- a/modules/nagios_common/files/check_commands/phab.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-# custom command to check phabricator behind misc-web
-# using the -S should also give us cert expiry monitoring
-# we are also checking for string 'Wikimedia' to be in there
-# so it should trigger if 200 but shows something else
-define command{
-command_namecheck_https_phabricator
-command_line/usr/lib/nagios/plugins/check_http -S -H 
'phabricator.wikimedia.org' -I misc-web-lb.eqiad.wikimedia.org -u 
'https://phabricator.wikimedia.org/' -s 'Wikimedia and MediaWiki'
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I238bfef6cd1f57fd330161a1304673d32d62ddbf
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] phab - remove duplicate check command - change (operations/puppet)

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

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

Change subject: phab - remove duplicate check command
..

phab - remove duplicate check command

this is now already in the checkcommands.cfg
as we used it in the past. adding it here as well
is duplicate

Change-Id: I238bfef6cd1f57fd330161a1304673d32d62ddbf
---
D modules/nagios_common/files/check_commands/phab.cfg
1 file changed, 0 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/169637/1

diff --git a/modules/nagios_common/files/check_commands/phab.cfg 
b/modules/nagios_common/files/check_commands/phab.cfg
deleted file mode 100644
index 682fe3f..000
--- a/modules/nagios_common/files/check_commands/phab.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-# custom command to check phabricator behind misc-web
-# using the -S should also give us cert expiry monitoring
-# we are also checking for string 'Wikimedia' to be in there
-# so it should trigger if 200 but shows something else
-define command{
-command_namecheck_https_phabricator
-command_line/usr/lib/nagios/plugins/check_http -S -H 
'phabricator.wikimedia.org' -I misc-web-lb.eqiad.wikimedia.org -u 
'https://phabricator.wikimedia.org/' -s 'Wikimedia and MediaWiki'
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I238bfef6cd1f57fd330161a1304673d32d62ddbf
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] Include workflow title in TopicList API response - change (mediawiki...Flow)

2014-10-28 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Include workflow title in TopicList API response
..

Include workflow title in TopicList API response

This is already used by the new topic placeholder, but it only works
on the server rendering.

Bug: 72655
Change-Id: Ib571bf0332cd798bfec63be42d24a6074fd9fdf1
---
M includes/Formatter/TopicListFormatter.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/includes/Formatter/TopicListFormatter.php 
b/includes/Formatter/TopicListFormatter.php
index 169c470..dd06e0d 100644
--- a/includes/Formatter/TopicListFormatter.php
+++ b/includes/Formatter/TopicListFormatter.php
@@ -60,6 +60,7 @@
$pagingOption
);
$title = $listWorkflow->getArticleTitle();
+   $res['title'] = $title->getPrefixedText();
$saveSortBy = true;
$res['links']['board-sort']['updated'] = 
$this->urlGenerator->boardLink( $title, 'updated', $saveSortBy )->getLinkURL();
$res['links']['board-sort']['newest'] = 
$this->urlGenerator->boardLink( $title, 'newest', $saveSortBy )->getLinkURL();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib571bf0332cd798bfec63be42d24a6074fd9fdf1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Fix-up for I777ae49ca - change (operations/puppet)

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

Change subject: Fix-up for I777ae49ca
..


Fix-up for I777ae49ca

I'm not sure why require_package() didn't work here, but I want to fix this
first and worry about that later.

Includes an unrelated change to one of my dotfiles. I don't like to
bundle unrelated changes, but since dotfile commits are noise I'm
slipping it in.

Change-Id: I2812be33199b684851902e3f5778c3d305992540
---
M modules/admin/files/home/ori/.binned/mw
M modules/hhvm/manifests/init.pp
M modules/hhvm/manifests/packages.pp
3 files changed, 24 insertions(+), 4 deletions(-)

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



diff --git a/modules/admin/files/home/ori/.binned/mw 
b/modules/admin/files/home/ori/.binned/mw
index 50ea7c3..f286654 100755
--- a/modules/admin/files/home/ori/.binned/mw
+++ b/modules/admin/files/home/ori/.binned/mw
@@ -1,13 +1,34 @@
 #!/usr/bin/env php
  template('hhvm/install_hhvm_source_files.sh.erb'),
 creates  => '/usr/local/src/hhvm',
diff --git a/modules/hhvm/manifests/packages.pp 
b/modules/hhvm/manifests/packages.pp
index bbd5fd3..5c64511 100644
--- a/modules/hhvm/manifests/packages.pp
+++ b/modules/hhvm/manifests/packages.pp
@@ -51,6 +51,7 @@
 ## Profiling and debugging tools
 
 package { [
+'dpkg-dev',
 'google-perftools',
 'graphviz',
 'gv',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2812be33199b684851902e3f5778c3d305992540
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] Fix-up for I777ae49ca - change (operations/puppet)

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

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

Change subject: Fix-up for I777ae49ca
..

Fix-up for I777ae49ca

I'm not sure why require_package() didn't work here, but I want to fix this
first and worry about that later.

Change-Id: I2812be33199b684851902e3f5778c3d305992540
---
M modules/admin/files/home/ori/.binned/mw
M modules/hhvm/manifests/init.pp
M modules/hhvm/manifests/packages.pp
3 files changed, 24 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/35/169635/1

diff --git a/modules/admin/files/home/ori/.binned/mw 
b/modules/admin/files/home/ori/.binned/mw
index 50ea7c3..f286654 100755
--- a/modules/admin/files/home/ori/.binned/mw
+++ b/modules/admin/files/home/ori/.binned/mw
@@ -1,13 +1,34 @@
 #!/usr/bin/env php
  template('hhvm/install_hhvm_source_files.sh.erb'),
 creates  => '/usr/local/src/hhvm',
diff --git a/modules/hhvm/manifests/packages.pp 
b/modules/hhvm/manifests/packages.pp
index bbd5fd3..5c64511 100644
--- a/modules/hhvm/manifests/packages.pp
+++ b/modules/hhvm/manifests/packages.pp
@@ -51,6 +51,7 @@
 ## Profiling and debugging tools
 
 package { [
+'dpkg-dev',
 'google-perftools',
 'graphviz',
 'gv',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2812be33199b684851902e3f5778c3d305992540
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] Hygiene: Standardize spelling of API classes and methods. - change (mediawiki...Flow)

2014-10-28 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Hygiene: Standardize spelling of API classes and methods.
..

Hygiene: Standardize spelling of API classes and methods.

Before it was mixed between api/Api and API, even in the same file.
There was also e.g. renderAPI but formatApi.

Since core using Api for API class names and mw.Api on the client,
standardize on that.

Change-Id: I5a316b4c3f1148f1a5dad1e4d731a25f4b162d4c
---
M Resources.php
M includes/Block/Block.php
M includes/Block/BoardHistory.php
M includes/Block/Header.php
M includes/Block/Topic.php
M includes/Block/TopicList.php
M includes/Block/TopicSummary.php
M includes/View.php
M includes/api/ApiFlowBaseGet.php
M includes/api/ApiFlowBasePost.php
M modules/engine/components/board/base/flow-board-api-events.js
M modules/engine/components/board/base/flow-board-interactive-events.js
M modules/engine/components/board/flow-board.js
M modules/engine/components/common/flow-component-engines.js
M modules/engine/components/common/flow-component-events.js
M modules/engine/components/flow-component.js
M modules/engine/misc/flow-api.js
M tests/qunit/engine/components/board/test_flow-board.js
18 files changed, 68 insertions(+), 68 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index 08365c8..1fcc1ec 100644
--- a/Resources.php
+++ b/Resources.php
@@ -310,7 +310,7 @@
// MW UI
'engine/misc/mw-ui.enhance.js',
'engine/misc/mw-ui.modal.js',
-   // FlowAPI
+   // FlowApi
'engine/misc/flow-api.js',
// Component registry
'engine/components/flow-registry.js',
diff --git a/includes/Block/Block.php b/includes/Block/Block.php
index 3fdf2f8..1d540c0 100644
--- a/includes/Block/Block.php
+++ b/includes/Block/Block.php
@@ -41,7 +41,7 @@
 * @param array $options
 * @return array
 */
-   function renderAPI( array $options );
+   function renderApi( array $options );
 
/**
 * @return string Unique name among all blocks on an object
diff --git a/includes/Block/BoardHistory.php b/includes/Block/BoardHistory.php
index 9e8ae94..8c6df45 100644
--- a/includes/Block/BoardHistory.php
+++ b/includes/Block/BoardHistory.php
@@ -29,7 +29,7 @@
throw new DataModelException( __CLASS__ . ' should not invoke 
commit()', 'process-data' );
}
 
-   public function renderAPI( array $options ) {
+   public function renderApi( array $options ) {
if ( $this->workflow->isNew() ) {
return array(
'type' => $this->getName(),
diff --git a/includes/Block/Header.php b/includes/Block/Header.php
index 27f6d7e..feac2b6 100644
--- a/includes/Block/Header.php
+++ b/includes/Block/Header.php
@@ -175,7 +175,7 @@
$this->storage->put( $this->newRevision, array(
'workflow' => $this->workflow,
) );
-   // Reload $this->header for renderAPI() after 
save
+   // Reload $this->header for renderApi() after 
save
$this->header = $this->newRevision;
return array(
'new-revision-id' => 
$this->newRevision->getRevisionId(),
@@ -186,7 +186,7 @@
}
}
 
-   public function renderAPI( array $options ) {
+   public function renderApi( array $options ) {
$output = array(
'type' => $this->getName(),
'editToken' => $this->getEditToken(),
@@ -195,22 +195,22 @@
switch ( $this->action ) {
case 'view':
case 'edit-header':
-   $output += $this->renderRevisionAPI();
+   $output += $this->renderRevisionApi();
break;
 
case 'view-header':
if ( isset( $options['revId'] ) && 
$options['revId'] ) {
-   $output += $this->renderSingleViewAPI( 
$options['revId'] );
+   $output += $this->renderSingleViewApi( 
$options['revId'] );
} else {
if ( isset( $options['contentFormat'] ) 
&& $options['contentFormat'] === 'wikitext' ) {
$this->requiresWikitext[] = 
'view-header';
}
-  

[MediaWiki-commits] [Gerrit] Update interstitial to use OOjs-UI - change (mediawiki...ZeroBanner)

2014-10-28 Thread Jhobs (Code Review)
Jhobs has uploaded a new change for review.

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

Change subject: Update interstitial to use OOjs-UI
..

Update interstitial to use OOjs-UI

Move "leaving zero-rated access" warning screen to an OO-UI
ProcessDialog with close and accept actions
Also fix a bug with turning off "Don't Ask Again" feature

Change-Id: Iec2488a67a0615591466309d85e5163d9c23f8f3
---
M ZeroBanner.php
M i18n/en.json
M i18n/qqq.json
M modules/ZeroInfo.js
M modules/ZeroOverlay.js
M modules/interstitial.js
M templates/interstitial.hogan
M templates/zeroinfo.hogan
8 files changed, 85 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner 
refs/changes/33/169633/1

diff --git a/ZeroBanner.php b/ZeroBanner.php
index b07ef74..75679f5 100644
--- a/ZeroBanner.php
+++ b/ZeroBanner.php
@@ -95,6 +95,7 @@
'zero-accept',
'zero-go-back',
'zero-dont-ask',
+   'zero-interstitial-title',
'zero-info-title',
'zero-info-intro',
'zero-info-buttonText',
diff --git a/i18n/en.json b/i18n/en.json
index 376b727..d6ec523 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,6 +9,7 @@
},
"zerobanner": "Zero Rated Mobile Access",
"zero-landing-welcome": "Real knowledge never promoted 
either turbulence or unbelief; but its progress is the forerunner of liberality 
and enlightened toleration.— ''Henry 
Brougham''",
+   "zero-interstitial-title": "Warning",
"zero-info-title": "Wikipedia Zero Details",
"zero-info-intro": "$1 is providing access to {{SITENAME}} free of 
charge.",
"zero-info-buttonText": "More Information",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b859d97..cda3e9c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -25,6 +25,7 @@
},
"zerobanner": "{{doc-special|ZeroBanner}}\nWikipedia Zero is an 
initiative of the Wikimedia Foundation to enable free mobile access to 
Wikipedia in developing countries. The objective of the program is to reduce 
barriers to accessing free knowledge -- two of the largest barriers being cost 
of data usage and network speed. See [[mw:Wikipedia Zero]].",
"zero-landing-welcome": "'''ATTENTION'''. Please read 
[[meta:Special:MyLanguage/Wikipedia Zero Starting Page|about this message]] 
before translating. This welcome message is shown at the top of the starting 
page to the entire community, and should be different, depending on the 
language-specific culture and customs. It is OK to set this message to some 
generic text like \"''Welcome to Wikipedia, the free encyclopedia anyone can 
edit. Please choose your language.''\" until the community decides what text to 
use here.",
+   "zero-interstitial-title": "Title of the warning dialog when user is 
about to leave zero-rated access",
"zero-info-title": "Title of the dialog describing details about 
Wikipedia Zero",
"zero-info-intro": "Short explanation that the user is browsing 
Wikipedia without being charged for bandwidth.\n\nParameters:\n* $1 - localized 
partner name",
"zero-info-buttonText": "Text to describe button with link to more 
information\n{{Identical|More information}}",
diff --git a/modules/ZeroInfo.js b/modules/ZeroInfo.js
index a7b0aac..bd9ea22 100644
--- a/modules/ZeroInfo.js
+++ b/modules/ZeroInfo.js
@@ -28,11 +28,11 @@
var content = M.template.get( 'zeroinfo.hogan' 
).render( tplData );
 
this.$body.append( content );
-   if ( conf.bannerWarning ) {
+   if ( conf.bannerWarning && M.settings.getUserSetting( 
'zerodontask', true ) !== 'true' ) {
$( '#banner-link' ).click( function ( ev ) {
ev.preventDefault();
M.require( 'ZeroOverlay' );
-   window.location.hash = '#zerosite/' + 
this.href;
+   window.location.hash = '#/zerosite/' + 
this.href;
} );
}
};
diff --git a/modules/ZeroOverlay.js b/modules/ZeroOverlay.js
index 2862c7b..a637f70 100644
--- a/modules/ZeroOverlay.js
+++ b/modules/ZeroOverlay.js
@@ -1,35 +1,75 @@
-/* global mw */
-( function( M ) {
+/* global mw, OO, jQuery */
+( function( M, $ ) {
'use strict';
-   var Overlay = M.require( 'Overlay' ),
-   ZeroOverlay = Overlay.extend( {
-   template: M.template.get( 'interstitial.hogan' ),
-   closeOnBack: true,
-   defaults: {
-   yes: mw.msg( 'zero-accept' ),
-   no: mw.msg( 'zero-go-back' ),
-   dontask: mw.msg( 'zero-dont-ask' )
-   },
-   initialize: functio

[MediaWiki-commits] [Gerrit] Show WikiGrok to readers in alpha/beta - change (mediawiki...MobileFrontend)

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

Change subject: Show WikiGrok to readers in alpha/beta
..


Show WikiGrok to readers in alpha/beta

Logged out users can see wikigrok versions a & b now.
User tokens are persistent through anonymous->logged in.
Anonymous wikigrok version is persistent with cookies for 90 days.

* If logged in:
* If Alpha, use B
* Otherwise use A
* If anonymous:
* If it had any particular version assigned, use that one.
* Else, assign randomly a wikigrok version to use.

Change-Id: I6af487ad3d87f9639c5575b5902ee27efd4a4b18
---
M includes/MobileFrontend.hooks.php
M javascripts/loggingSchemas/mobileWebWikiGrok.js
M javascripts/modules/wikigrok/wikigrok.js
3 files changed, 55 insertions(+), 13 deletions(-)

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



diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index c9599c6..4d86697 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -832,7 +832,7 @@
'MobileWebEditing'   => 8599025,
'MobileWebCta'   => 5972684,
'MobileWebClickTracking' => 5929948,
-   'MobileWebWikiGrok'  => 10286500,
+   'MobileWebWikiGrok'  => 10352247,
);
 
$schemas += $mobileEventLoggingSchemas;
diff --git a/javascripts/loggingSchemas/mobileWebWikiGrok.js 
b/javascripts/loggingSchemas/mobileWebWikiGrok.js
index 0d30f9f..750802d 100644
--- a/javascripts/loggingSchemas/mobileWebWikiGrok.js
+++ b/javascripts/loggingSchemas/mobileWebWikiGrok.js
@@ -4,7 +4,8 @@
function log( data ) {
var options = {
pageId: mw.config.get( 'wgArticleId' ),
-   mobileMode: mw.config.get( 'wgMFMode' )
+   mobileMode: mw.config.get( 'wgMFMode' ),
+   isLoggedIn: !user.isAnon()
};
// If the user is logged in, record username and edit count
if ( !user.isAnon() ) {
diff --git a/javascripts/modules/wikigrok/wikigrok.js 
b/javascripts/modules/wikigrok/wikigrok.js
index a0e05d2..d587d2e 100644
--- a/javascripts/modules/wikigrok/wikigrok.js
+++ b/javascripts/modules/wikigrok/wikigrok.js
@@ -2,9 +2,52 @@
 ( function ( M, $ ) {
var wikidataID = mw.config.get( 'wgWikibaseItemId' ),
permittedOnThisDevice = mw.config.get( 
'wgMFEnableWikiGrokOnAllDevices' ) || !M.isWideScreen(),
-   useDialogB = M.isAlphaGroupMember(),
-   rlModuleName = useDialogB ? 'mobile.wikigrok.dialog.b' : 
'mobile.wikigrok.dialog',
-   idOverride;
+   idOverride,
+   versions = {
+   A: {
+   module: 'mobile.wikigrok.dialog',
+   view: 'modules/wikigrok/WikiGrokDialog'
+   },
+   B: {
+   module: 'mobile.wikigrok.dialog.b',
+   view: 'modules/wikigrok/WikiGrokDialogB'
+   }
+   },
+   version;
+
+   /**
+* Gets the version of wikigrok to use.
+*
+* If logged in:
+*   * If Alpha, use B
+*   * Otherwise use A
+* If anonymous:
+*   * If it had any particular version assigned, use that one.
+*   * Else, assign randomly a wikigrok version to use.
+*/
+   function getWikigrokVersion() {
+   var cookieName = mw.config.get( 'wgCookiePrefix' ) + 
'-wikiGrokAnonymousVersion',
+   anonVersion = $.cookie( cookieName );
+
+   if ( !mw.user.isAnon() ) {
+   if ( M.isAlphaGroupMember() ) {
+   return versions.B;
+   } else {
+   return versions.A;
+   }
+   } else {
+   if ( anonVersion ) {
+   return versions[anonVersion];
+   } else {
+   anonVersion = Math.round( Math.random() ) ? 'A' 
: 'B';
+   $.cookie( cookieName, anonVersion, {
+   expires: 90, // (days)
+   path: '/'
+   } );
+   return versions[anonVersion];
+   }
+   }
+   }
 
/**
 * Gets the user's token from 'cookie prefix' + "-wikiGrokUserToken"
@@ -13,7 +56,7 @@
 *
 * @return {string}
 */
-   function getUserToken () {
+   function getUserToken() {
var cookieName = mw.config.get( 'wgCook

[MediaWiki-commits] [Gerrit] Change MIME type of the raw lua - change (mediawiki...ZeroPortal)

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

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

Change subject: Change MIME type of the raw lua
..

Change MIME type of the raw lua

Per comments in Ibb97523f6b3164268eaa80d94ddb001e7f6a6088, changing
mime type to be less likely to be mis-used/interpreted by the browser.

Change-Id: I02ed1f11b32e9e3a0bad3b5f8c7ad2689d34f53e
---
M includes/LuaLibrary.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroPortal 
refs/changes/32/169632/1

diff --git a/includes/LuaLibrary.php b/includes/LuaLibrary.php
index d4a8e87..d60ab96 100644
--- a/includes/LuaLibrary.php
+++ b/includes/LuaLibrary.php
@@ -68,7 +68,7 @@
 
if ( self::$result ) {
$out->disable();
-   $resp->header( 'Content-Type: text/plain; 
charset=UTF-8' );
+   $resp->header( 'Content-Type: application/json; 
charset=UTF-8' );
echo self::$result;
return true;
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02ed1f11b32e9e3a0bad3b5f8c7ad2689d34f53e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroPortal
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] Remove back-compat profiling configuration - change (mediawiki/core)

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

Change subject: Remove back-compat profiling configuration
..


Remove back-compat profiling configuration

This old style was deprecated like 3 or 4 releases ago

Change-Id: Ic61424aacb376151019a08ade214fea655d82a3f
---
M includes/profiler/Profiler.php
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php
index 418b5d4..aaf899f 100644
--- a/includes/profiler/Profiler.php
+++ b/includes/profiler/Profiler.php
@@ -143,14 +143,10 @@
if ( is_array( $wgProfiler ) ) {
if ( !isset( $wgProfiler['class'] ) ) {
$class = 'ProfilerStub';
-   } elseif ( $wgProfiler['class'] === 'Profiler' 
) {
-   $class = 'ProfilerStub'; // b/c; don't 
explode
} else {
$class = $wgProfiler['class'];
}
self::$__instance = new $class( $wgProfiler );
-   } elseif ( $wgProfiler instanceof Profiler ) {
-   self::$__instance = $wgProfiler; // back-compat
} else {
self::$__instance = new ProfilerStub( array() );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic61424aacb376151019a08ade214fea655d82a3f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fixed RuboCop offense Style/SpaceInsideParens - change (mediawiki...api)

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

Change subject: Fixed RuboCop offense Style/SpaceInsideParens
..


Fixed RuboCop offense Style/SpaceInsideParens

Bug: 63307
Change-Id: I297045771bbfdd62894a23d9036d7b103a1c1aad
---
M .rubocop_todo.yml
M spec/client_spec.rb
2 files changed, 9 insertions(+), 14 deletions(-)

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



diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 28e1734..402e63a 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -52,11 +52,6 @@
 Style/SignalException:
   Enabled: false
 
-# Offense count: 9
-# Cop supports --auto-correct.
-Style/SpaceInsideParens:
-  Enabled: false
-
 # Offense count: 1
 # Cop supports --auto-correct.
 Style/SpecialGlobalVars:
diff --git a/spec/client_spec.rb b/spec/client_spec.rb
index 4787347..c7c5243 100644
--- a/spec/client_spec.rb
+++ b/spec/client_spec.rb
@@ -150,7 +150,7 @@
 it "logs in when API returns Success" do
   stub_request(:post, api_url).
 with(body: { format: "json", action: "login", lgname: "Test", 
lgpassword: "qwe123" }).
-to_return(body: { login: body_base.merge(result: "Success") }.to_json )
+to_return(body: { login: body_base.merge(result: "Success") }.to_json)
 
   subject.log_in "Test", "qwe123"
   expect(subject.logged_in).to be true
@@ -170,7 +170,7 @@
 @success_req = stub_request(:post, api_url).
   with(body: { format: "json", action: "login", lgname: "Test", 
lgpassword: "qwe123", lgtoken: "456" }).
   with(headers: { "Cookie" => "prefixSession=789" }).
-  to_return(body: { login: body_base.merge(result: "Success") 
}.to_json )
+  to_return(body: { login: body_base.merge(result: "Success") 
}.to_json)
   end
 
   it "logs in" do
@@ -191,7 +191,7 @@
   before do
 stub_request(:post, api_url).
   with(body: { format: "json", action: "login", lgname: "Test", 
lgpassword: "qwe123" }).
-  to_return(body: { login: body_base.merge(result: "EmptyPass") 
}.to_json )
+  to_return(body: { login: body_base.merge(result: "EmptyPass") 
}.to_json)
   end
 
   it "does not log in" do
@@ -228,7 +228,7 @@
 before do
   stub_request(:get, api_url).
 with(query: { format: "json", action: "tokens", type: "delete" }).
-to_return(body: { tokens: { deletetoken: "t123" } }.to_json )
+to_return(body: { tokens: { deletetoken: "t123" } }.to_json)
   @delete_req = stub_request(:post, api_url).
 with(body: { format: "json", action: "delete", title: "Test", reason: 
"deleting", token: "t123" })
 end
@@ -281,7 +281,7 @@
 it "creates an account when API returns Success" do
   stub_request(:post, api_url).
 with(body: { format: "json", action: "createaccount", name: "Test", 
password: "qwe123" }).
-to_return(body: { createaccount: body_base.merge(result: "Success") 
}.to_json )
+to_return(body: { createaccount: body_base.merge(result: "Success") 
}.to_json)
 
   expect(subject.create_account("Test", "qwe123")).to include("result" => 
"Success")
 end
@@ -300,7 +300,7 @@
 @success_req = stub_request(:post, api_url).
   with(body: { format: "json", action: "createaccount", name: "Test", 
password: "qwe123", token: "456" }).
   with(headers: { "Cookie" => "prefixSession=789" }).
-  to_return(body: { createaccount: body_base.merge(result: "Success") 
}.to_json )
+  to_return(body: { createaccount: body_base.merge(result: "Success") 
}.to_json)
   end
 
   it "creates an account" do
@@ -319,7 +319,7 @@
   before do
 stub_request(:post, api_url).
   with(body: { format: "json", action: "createaccount", name: "Test", 
password: "qwe123" }).
-  to_return(body: { createaccount: body_base.merge(result: "WhoKnows") 
}.to_json )
+  to_return(body: { createaccount: body_base.merge(result: "WhoKnows") 
}.to_json)
   end
 
   it "raises error with proper message" do
@@ -332,7 +332,7 @@
 before do
   stub_request(:get, api_url).
 with(query: { format: "json", action: "tokens", type: "watch" }).
-to_return(body: { tokens: { watchtoken: "t123" } }.to_json )
+to_return(body: { tokens: { watchtoken: "t123" } }.to_json)
   @watch_req = stub_request(:post, api_url).
 with(body: { format: "json", token: "t123", action: "watch", titles: 
"Test" })
 end
@@ -347,7 +347,7 @@
 before do
   stub_request(:get, api_url).
 with(query: { format: "json", action: "tokens", type: "watch" }).
-to_return(body: { tokens: { watchtoken: "t123" } }.to_json )
+to_return(body: { tokens: { watchtoken: "t123" } }.to_json)
   @watch_req = stub_request(:post, api_url).
 with(body: { format: "json", token: "t123", action: "watch", titles: 
"Test", unwatch: 

[MediaWiki-commits] [Gerrit] Remove back-compat profiling configuration - change (mediawiki/core)

2014-10-28 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Remove back-compat profiling configuration
..

Remove back-compat profiling configuration

This old style was deprecated like 3 or 4 releases ago

Change-Id: Ic61424aacb376151019a08ade214fea655d82a3f
---
M includes/profiler/Profiler.php
1 file changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php
index 418b5d4..aaf899f 100644
--- a/includes/profiler/Profiler.php
+++ b/includes/profiler/Profiler.php
@@ -143,14 +143,10 @@
if ( is_array( $wgProfiler ) ) {
if ( !isset( $wgProfiler['class'] ) ) {
$class = 'ProfilerStub';
-   } elseif ( $wgProfiler['class'] === 'Profiler' 
) {
-   $class = 'ProfilerStub'; // b/c; don't 
explode
} else {
$class = $wgProfiler['class'];
}
self::$__instance = new $class( $wgProfiler );
-   } elseif ( $wgProfiler instanceof Profiler ) {
-   self::$__instance = $wgProfiler; // back-compat
} else {
self::$__instance = new ProfilerStub( array() );
}

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

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

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


[MediaWiki-commits] [Gerrit] hhvm: make HHVM's working directory be /var/tmp/hhvm - change (operations/puppet)

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

Change subject: hhvm: make HHVM's working directory be /var/tmp/hhvm
..


hhvm: make HHVM's working directory be /var/tmp/hhvm

jemalloc heap dumps go to the process's working directory by default.
Presumably there are other code-paths in HHVM that default to writing data to
the current working directory. It's important, therefore, that HHVM's working
directory not be in the /run ramdisk, because that can easily fill up.

Also make Exec['install_hhvm_source_files'] require Package['dpkg-dev']

Change-Id: I777ae49cae7cb8bdbdf5bb59c5037ce514c51bb4
---
M modules/admin/files/home/ori/.binned/mw
M modules/hhvm/files/hhvm.conf
M modules/hhvm/manifests/init.pp
3 files changed, 8 insertions(+), 7 deletions(-)

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



diff --git a/modules/admin/files/home/ori/.binned/mw 
b/modules/admin/files/home/ori/.binned/mw
index b6aced6..50ea7c3 100755
--- a/modules/admin/files/home/ori/.binned/mw
+++ b/modules/admin/files/home/ori/.binned/mw
@@ -1,7 +1,6 @@
 #!/usr/bin/env php
  template('hhvm/install_hhvm_source_files.sh.erb'),
-creates => '/usr/local/src/hhvm',
-provider=> 'shell',
+command  => template('hhvm/install_hhvm_source_files.sh.erb'),
+creates  => '/usr/local/src/hhvm',
+provider => 'shell',
+require  => Package['dpkg-dev'],
 }
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I777ae49cae7cb8bdbdf5bb59c5037ce514c51bb4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] hhvm: make HHVM's working directory be /var/tmp/hhvm - change (operations/puppet)

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

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

Change subject: hhvm: make HHVM's working directory be /var/tmp/hhvm
..

hhvm: make HHVM's working directory be /var/tmp/hhvm

jemalloc heap dumps go to the process's working directory by default.
Presumably there are other code-paths in HHVM that default to writing data to
the current working directory. It's important, therefore, that HHVM's working
directory not be in the /run ramdisk, because that can easily fill up.

Also make Exec['install_hhvm_source_files'] require Package['dpkg-dev']

Change-Id: I777ae49cae7cb8bdbdf5bb59c5037ce514c51bb4
---
M modules/admin/files/home/ori/.binned/mw
M modules/hhvm/files/hhvm.conf
M modules/hhvm/manifests/init.pp
3 files changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/169630/1

diff --git a/modules/admin/files/home/ori/.binned/mw 
b/modules/admin/files/home/ori/.binned/mw
index b6aced6..50ea7c3 100755
--- a/modules/admin/files/home/ori/.binned/mw
+++ b/modules/admin/files/home/ori/.binned/mw
@@ -1,7 +1,6 @@
 #!/usr/bin/env php
  template('hhvm/install_hhvm_source_files.sh.erb'),
-creates => '/usr/local/src/hhvm',
-provider=> 'shell',
+command  => template('hhvm/install_hhvm_source_files.sh.erb'),
+creates  => '/usr/local/src/hhvm',
+provider => 'shell',
+require  => Package['dpkg-dev'],
 }
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I777ae49cae7cb8bdbdf5bb59c5037ce514c51bb4
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] Hygiene: Correct the icon documentation - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Correct the icon documentation
..


Hygiene: Correct the icon documentation

Change-Id: I0cefd306b40f7fb5cb67b17ca67386dc8eea45e4
---
M javascripts/Icon.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/javascripts/Icon.js b/javascripts/Icon.js
index 69e21a4..0c052f5 100644
--- a/javascripts/Icon.js
+++ b/javascripts/Icon.js
@@ -5,9 +5,9 @@
Icon;
 
/**
-* A {@link View} that pops up from the bottom of the screen.
-* @class Drawer
-* @extends Panel
+* A wrapper for creating an icon.
+* @class Icon
+* @extends View
 */
Icon = View.extend( {
defaults: {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cefd306b40f7fb5cb67b17ca67386dc8eea45e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Robmoen 
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 "address" to "IP" (s/IP/IP address) - change (apps...wikipedia)

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

Change subject: Add "address" to "IP" (s/IP/IP address)
..


Add "address" to "IP" (s/IP/IP address)

Thanks to Siebrand for reporting this, 
https://translatewiki.net/wiki/Thread:Support/About_Wikimedia:Wikipedia-android-strings-create_account_blocked_anon_error/en.

Change-Id: I0b20bedc181af173170a4a7173b5f28c4c76d7f7
---
M wikipedia/res/values-qq/strings.xml
M wikipedia/res/values/strings.xml
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wikipedia/res/values-qq/strings.xml 
b/wikipedia/res/values-qq/strings.xml
index 23a5e31..97c6752 100644
--- a/wikipedia/res/values-qq/strings.xml
+++ b/wikipedia/res/values-qq/strings.xml
@@ -175,7 +175,7 @@
   Used as an error message during 
account creation when the account creation failed because username that was 
provided is invalid.
   Used as an error message 
during account creation when the account creation failed because the email that 
was provided is invalid.
   Used as an error 
message during account creation when the account creation failed because the 
password that was entered is too short.
-  Used as an error message 
during account creation when the account creation failed because their IP is 
blocked.
+  Used as an error message 
during account creation when the account creation failed because their IP 
address is blocked.
 
 See also:
 * {{msg-wm|Wikipedia-android-strings-create account blocked error}}
diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml
index 9f5d8be..f3fe603 100644
--- a/wikipedia/res/values/strings.xml
+++ b/wikipedia/res/values/strings.xml
@@ -134,7 +134,7 @@
 The username you provided is 
invalid. Please provide another username.
 The email address you 
provided is invalid.
 The password you 
provided is too short.
-You cannot create an 
account because your IP is blocked.
+You cannot create an 
account because your IP address is blocked.
 You cannot create an account 
because your account is blocked.
 Your username and 
your password must be different.
 Could not create 
account

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0b20bedc181af173170a4a7173b5f28c4c76d7f7
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Southparkfan 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Hygiene: Rename articleList->PageList for consistency - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Rename articleList->PageList for consistency
..


Hygiene: Rename articleList->PageList for consistency

This has really been bugging me.

Change-Id: I809ae4b9da1c662aee22c40014cf226855c8ef39
---
M includes/Resources.php
M includes/specials/SpecialMobileWatchlist.php
M javascripts/modules/PageList.js
M javascripts/modules/nearby/Nearby.js
R templates/modules/PageList.hogan
M templates/modules/nearby/nearby.hogan
6 files changed, 8 insertions(+), 6 deletions(-)

Approvals:
  Jhernandez: Looks good to me, but someone else must approve
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  Bmansurov: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Resources.php b/includes/Resources.php
index 59b8b34..bf4ac15 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -46,6 +46,9 @@
'dependencies' => array(
'mobile.watchstar',
),
+   'templates' => array(
+   'modules/PageList.hogan',
+   ),
'scripts' => array(
'javascripts/modules/PageList.js',
),
@@ -612,8 +615,6 @@
),
'templates' => array(
'modules/uploads/commons-upload.hogan',
-   // SearchOverlay.js and Nearby.js
-   'modules/articleList.hogan',
// PhotoUploaderButton.js
// For new page action menu
'modules/uploads/LeadPhotoUploaderButton.hogan',
diff --git a/includes/specials/SpecialMobileWatchlist.php 
b/includes/specials/SpecialMobileWatchlist.php
index 0160eda..f62b630 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -280,7 +280,8 @@
 * When ?from not set, adds a link "more" to see the other watchlist 
items.
 * @param ResultWrapper $res ResultWrapper from db
 * @param boolean $feed Render as feed (true) or list (false) view?
-* @todo FIXME: use templates/articleList.html to keep consistent with 
nearby view
+* @todo FIXME: use templates/PageList.html when server side templates
+* are available to keep consistent with nearby view
 */
protected function showResults( ResultWrapper $res, $feed ) {
wfProfileIn( __METHOD__ );
diff --git a/javascripts/modules/PageList.js b/javascripts/modules/PageList.js
index 2f9ea28..73afecd 100644
--- a/javascripts/modules/PageList.js
+++ b/javascripts/modules/PageList.js
@@ -72,7 +72,7 @@
this.api = new WatchstarApi( options );
View.prototype.initialize.apply( this, arguments );
},
-   template: M.template.get( 'modules/articleList.hogan' ),
+   template: M.template.get( 'modules/PageList.hogan' ),
postRender: function ( options ) {
View.prototype.postRender.apply( this, arguments );
var pages = [], $li = this.$( 'li' ),
diff --git a/javascripts/modules/nearby/Nearby.js 
b/javascripts/modules/nearby/Nearby.js
index 948057a..48c8a47 100644
--- a/javascripts/modules/nearby/Nearby.js
+++ b/javascripts/modules/nearby/Nearby.js
@@ -32,7 +32,7 @@
},
templatePartials: {
spinner: M.template.get( 'spinner.hogan' ),
-   articleList: M.template.get( 
'modules/articleList.hogan' )
+   pageList: PageList.prototype.template
},
template: M.template.get( 'modules/nearby/nearby.hogan' ),
getCurrentPosition: function () {
diff --git a/templates/modules/articleList.hogan 
b/templates/modules/PageList.hogan
similarity index 100%
rename from templates/modules/articleList.hogan
rename to templates/modules/PageList.hogan
diff --git a/templates/modules/nearby/nearby.hogan 
b/templates/modules/nearby/nearby.hogan
index a449190..9b52bab 100644
--- a/templates/modules/nearby/nearby.hogan
+++ b/templates/modules/nearby/nearby.hogan
@@ -1,2 +1,2 @@
 {{>spinner}}
-{{>articleList}}
+{{>pageList}}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I809ae4b9da1c662aee22c40014cf226855c8ef39
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@list

[MediaWiki-commits] [Gerrit] Add custom channel and package - change (apps...wikipedia)

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

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

Change subject: Add custom channel and package
..

Add custom channel and package

Add ability to specify a custom channel and package name (app id)
for channel partners.
Added a new 'custom' flavor that can take a custom
channel and applicationId.

Change-Id: Ia57edb7aa06427a2ce78ddeabf5da6b20e9d7ad7
---
M scripts/make-release.py
M wikipedia/build.gradle
A wikipedia/gradle.properties
A wikipedia/src/custom/AndroidManifest.xml
4 files changed, 42 insertions(+), 17 deletions(-)


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

diff --git a/scripts/make-release.py b/scripts/make-release.py
index 551373b..aa912e0 100755
--- a/scripts/make-release.py
+++ b/scripts/make-release.py
@@ -79,10 +79,10 @@
 sh.git.push('gerrit', tag_name)
 
 
-def make_release(flavors):
+def make_release(flavors, custom_channel, custom_app):
 sh.cd(PATH_PREFIX)
 # ./gradlew -q assembleDevDebug
-args = [GRADLEW, '-q', 'clean']
+args = [GRADLEW, '-q', 'clean', '-PcustomChannel=' + custom_channel, 
'-PcustomApplicationId=' + custom_app]
 tasks = ['assemble{0}Release'.format(flavor.title()) for flavor in flavors]
 args += tasks
 subprocess.call(args)
@@ -106,22 +106,21 @@
 #help='Do not use manually, only for the automated 
build script',
 #action='store_true')
 group.add_argument('--prod',
-   help='Step 1: Google Play stable. git checkout BUMPTAG 
first!',
+   help='Step 1: Google Play stable.',
action='store_true')
-# group.add_argument('--releasesprod',
-#help='Step 1: releasesdot stable. git checkout 
BUMPTAG first!',
-#action='store_true')
 group.add_argument('--amazon',
-   help='Step 1: Amazon stable release. git checkout 
BUMPTAG first!',
+   help='Step 1: Amazon stable release.',
action='store_true')
-# group.add_argument('--channel',
-#help='Step 1: Alphabetic versionName&channel. '
-# 'Usually, git checkout BUMPTAG first. OEMs w/ 
Play')
-# group.add_argument('--custompackage',
-#help='Step 1: Alphabetic versionName&channel&package; 
OEMs wout/ Play.')
-parser.add_argument('--push', help='Step 2: push git tag created in step 1 
to gerrit remote.',
+group.add_argument('--channel',
+   help='Step 1: Custom versionName&channel. OEMs w/ Play')
+group.add_argument('--app',
+   help='Step 1: Custom versionName&channel&applicationId '
+'(aka. package name). OEMs wout/ Play.')
+parser.add_argument('--push', help='Step 2: create&push git tag to gerrit 
remote.',
 action='store_true')
 args = parser.parse_args()
+custom_channel = 'ignore'
+custom_app = 'ignore'
 if args.beta:
 flavors = ['beta']
 targets = flavors
@@ -131,9 +130,15 @@
 elif args.amazon:
 flavors = ['amazon']
 targets = flavors
-# elif args.channel:
-# flavors = [args.channel]
-# targets = flavors
+elif args.channel:
+flavors = ['custom']
+targets = [args.channel]
+custom_channel = args.channel
+elif args.app:
+flavors = ['custom']
+targets = [args.app]
+custom_channel = args.app
+custom_app = 'org.wikipedia' + args.app
 else:
 print('Error. Please specify --beta, --prod, or --amazon')
 sys.exit(-1)
@@ -143,7 +148,7 @@
 git_tag(target)
 push_to_gerrit(target)
 else:
-make_release(flavors)
+make_release(flavors, custom_channel, custom_app)
 copy_apk(flavors[0], targets[0])
 if flavors[0] == 'prod':
 copy_apk(flavors[1], flavors[1])
diff --git a/wikipedia/build.gradle b/wikipedia/build.gradle
index 790188f..ac6042d 100644
--- a/wikipedia/build.gradle
+++ b/wikipedia/build.gradle
@@ -43,6 +43,12 @@
 amazon {
 versionName "${versionStart}-amazon-${date}"
 }
+custom {
+versionName "${versionStart}-${customChannel}-${date}"
+applicationId getProperty('customApplicationId')
+// next line is for injecting a custom channel value into the 
custom/AndroidManifest.xml
+manifestPlaceholders = 
[customChannel:getProperty('customChannel').toString()]
+}
 }
 sourceSets {
 // Still using old Maven archetype based directory structure and
diff --git a/wikipedia/gradle.properties b/wikipedia/gradle.properties
new file mode 100644
index 000..d90ae5b
--- /dev/null
+++ b/wikipedia/gradle.properties
@@ -0,0 +1,3

[MediaWiki-commits] [Gerrit] Hygiene: Correct the icon documentation - change (mediawiki...MobileFrontend)

2014-10-28 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Hygiene: Correct the icon documentation
..

Hygiene: Correct the icon documentation

Change-Id: I0cefd306b40f7fb5cb67b17ca67386dc8eea45e4
---
M javascripts/Icon.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/28/169628/1

diff --git a/javascripts/Icon.js b/javascripts/Icon.js
index 69e21a4..0c052f5 100644
--- a/javascripts/Icon.js
+++ b/javascripts/Icon.js
@@ -5,9 +5,9 @@
Icon;
 
/**
-* A {@link View} that pops up from the bottom of the screen.
-* @class Drawer
-* @extends Panel
+* A wrapper for creating an icon.
+* @class Icon
+* @extends View
 */
Icon = View.extend( {
defaults: {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cefd306b40f7fb5cb67b17ca67386dc8eea45e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] Add missing documentation - change (mediawiki...MobileFrontend)

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

Change subject: Add missing documentation
..


Add missing documentation

Add missing documentation for:
Overlay.js
Page.js
PageApi.js
Panel.js
modes.js

Change-Id: I61900a88fdab81e1923fe0e1f97000b607f08095
---
M javascripts/Overlay.js
M javascripts/Page.js
M javascripts/PageApi.js
M javascripts/Panel.js
M javascripts/modes.js
5 files changed, 28 insertions(+), 2 deletions(-)

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



diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js
index 8533e2e..c7dd759 100644
--- a/javascripts/Overlay.js
+++ b/javascripts/Overlay.js
@@ -8,6 +8,7 @@
Overlay;
 
/**
+* Mobile modal window
 * @class Overlay
 * @extends View
 */
@@ -23,6 +24,7 @@
 */
closeOnBack: false,
/**
+* Is overlay fullscreen
 * @type {Boolean}
 */
fullScreen: true,
@@ -35,6 +37,7 @@
appendTo: '#mw-mf-viewport',
 
/**
+* Default classname
 * @type {String}
 */
className: 'overlay',
@@ -55,6 +58,7 @@
fixedHeader: true
},
/**
+* Flag overlay to close on content tap
 * @type {Boolean}
 */
closeOnContentTap: false,
@@ -122,6 +126,7 @@
},
 
/**
+* Attach overlay to current view
 * @method
 */
show: function () {
diff --git a/javascripts/Page.js b/javascripts/Page.js
index a447ffd..c62ebb9 100644
--- a/javascripts/Page.js
+++ b/javascripts/Page.js
@@ -47,6 +47,7 @@
},
 
/**
+* Determines if content model is wikitext
 * @method
 * @return {Boolean}
 */
@@ -55,6 +56,7 @@
},
 
/**
+* Checks whether the current page is the main page
 * @method
 * @return {Boolean}
 */
@@ -95,6 +97,7 @@
},
 
/**
+* Return prefixed page title
 * @method
 * @return {string}
 */
@@ -103,6 +106,7 @@
},
 
/**
+* Return page id
 * @method
 * @return {Number}
 */
@@ -111,6 +115,7 @@
},
 
/**
+* return namespace id
 * @method
 * @return {Number} namespace Number
 */
@@ -125,6 +130,7 @@
},
 
/**
+* Determines if current page is a talk page
 * @method
 * @return {Boolean} Whether the page is a talk page or not
 */
@@ -134,6 +140,9 @@
return ns > 0 && ns % 2 === 1;
},
 
+   /**
+* @inheritDoc
+*/
preRender: function ( options ) {
var self = this;
this.sections = [];
@@ -149,6 +158,7 @@
},
 
/**
+* Return reference section
 * @method
 */
getReferenceSection: function () {
diff --git a/javascripts/PageApi.js b/javascripts/PageApi.js
index 33d4f29..07cc038 100644
--- a/javascripts/PageApi.js
+++ b/javascripts/PageApi.js
@@ -8,7 +8,7 @@
 * section of listOfSections. If listOfSections is empty, just add 
child to it.
 * @method
 * @private
-* @param {Array} listOfSections
+* @param {Array} listOfSections - Array of section ids
 * @param {Object} child - Section to be added to listOfSections
 */
function assignToParent( listOfSections, child ) {
@@ -32,7 +32,7 @@
 * Order sections hierarchically
 * @method
 * @private
-* @param {Array} sections
+* @param {Array} sections Array of section objects created from 
response HTML
 * @returns {Array}
 */
function transformSections( sections ) {
@@ -80,6 +80,7 @@
}
 
/**
+* API for providing Page data
 * @class PageApi
 * @extends Api
 */
diff --git a/javascripts/Panel.js b/javascripts/Panel.js
index 34e01e5..da80f70 100644
--- a/javascripts/Panel.js
+++ b/javascripts/Panel.js
@@ -28,6 +28,7 @@
},
 
/**
+* Shows panel after a slight delay
 * @method
 */
show: function () {
@@ -45,6 +46,7 @@
},

[MediaWiki-commits] [Gerrit] Convert string to integer - change (mediawiki...MobileFrontend)

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

Change subject: Convert string to integer
..


Convert string to integer

toFixed returns a string when the schema says it should be a number.

Bug: 72639
Change-Id: I1564502e14b2d2bc307e6e6052e74c2cd5ccc59c
---
M javascripts/modules/wikigrok/WikiGrokDialog.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js 
b/javascripts/modules/wikigrok/WikiGrokDialog.js
index af4c71c..ef4678b 100644
--- a/javascripts/modules/wikigrok/WikiGrokDialog.js
+++ b/javascripts/modules/wikigrok/WikiGrokDialog.js
@@ -64,9 +64,9 @@
taskToken: this.defaults.taskToken,
userToken: this.options.userToken,
// the position of the top of the widget in 
viewports (as a unit)
-   widgetOffset: ( this.$el.offset().top / 
$window.height() ).toFixed( 2 ),
+   widgetOffset: parseFloat( ( 
this.$el.offset().top / $window.height() ).toFixed( 2 ) ),
// top of the document - top of the viewport in 
viewports (as a unit)
-   scrollOffset: ( $window.scrollTop() / 
$window.height() ).toFixed( 2 )
+   scrollOffset: parseFloat( ( $window.scrollTop() 
/ $window.height() ).toFixed( 2 ) )
};
if ( this.options.testing ) {
data.testing = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1564502e14b2d2bc307e6e6052e74c2cd5ccc59c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] hhvm: make HHVM's working directory be /var/tmp/hhvm - change (operations/puppet)

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

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

Change subject: hhvm: make HHVM's working directory be /var/tmp/hhvm
..

hhvm: make HHVM's working directory be /var/tmp/hhvm

jemalloc heap dumps go to the process's working directory by default.
Presumably there are other code-paths in HHVM that default to writing data to
the current working directory. It's important, therefore, that HHVM's working
directory not be in the /run ramdisk, because that can easily fill up.

Change-Id: I002b838e9c7afc1274b6382a30c556cd8dd6c80f
---
M modules/hhvm/files/hhvm.conf
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/169627/1

diff --git a/modules/hhvm/files/hhvm.conf b/modules/hhvm/files/hhvm.conf
index fc19065..523fd6f 100644
--- a/modules/hhvm/files/hhvm.conf
+++ b/modules/hhvm/files/hhvm.conf
@@ -11,7 +11,8 @@
   mkdir -p -m0755 "${HHVM_RUN_DIR:=/run/hhvm}"
   mkdir -p -m0750 "${HHVM_RUN_DIR}/cache"
   mkdir -p -m0775 "${HHVM_LOG_DIR:=/var/log/hhvm}"
-  chown -R "${HHVM_USER:=www-data}:${HHVM_GROUP:=www-data}" "$HHVM_RUN_DIR"
+  mkdir -p -m0775 "${HHVM_TMP_DIR:=/var/tmp/hhvm}"
+  chown -R "${HHVM_USER:=www-data}:${HHVM_GROUP:=www-data}" "$HHVM_RUN_DIR" 
"$HHVM_TMP_DIR"
   chown -R "syslog:${HHVM_GROUP}" "$HHVM_LOG_DIR"
 
   # Update the symlink `/usr/lib/x86_64-linux-gnu/hhvm/extensions/current`
@@ -36,7 +37,7 @@
   exec /sbin/start-stop-daemon --quiet --start \
 --chuid "${HHVM_USER:-www-data}:${HHVM_GROUP:-www-data}" \
 --make-pidfile --pidfile "${HHVM_RUN_DIR:-/run/hhvm}/hhvm.pid" \
---chdir "${HHVM_RUN_DIR:-/run/hhvm}" \
+--chdir "${HHVM_TMP_DIR:-/var/tmp/hhvm}" \
 --startas /usr/bin/hhvm -- \
   --config "${HHVM_CONFIG_DIR:-/etc/hhvm}/fcgi.ini" \
   --mode server

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I002b838e9c7afc1274b6382a30c556cd8dd6c80f
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] WIP: WikiGrok error logging - change (mediawiki...MobileFrontend)

2014-10-28 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: WIP: WikiGrok error logging
..

WIP: WikiGrok error logging

Change-Id: Ife929050b118724c10bf1df27ca71e72f187330b
---
M includes/MobileFrontend.hooks.php
A javascripts/loggingSchemas/mobileWebWikiGrokError.js
M javascripts/modules/wikigrok/WikiDataApi.js
M javascripts/modules/wikigrok/WikiGrokDialog.js
4 files changed, 58 insertions(+), 5 deletions(-)


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

diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index c9599c6..35b6e3d 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -833,6 +833,7 @@
'MobileWebCta'   => 5972684,
'MobileWebClickTracking' => 5929948,
'MobileWebWikiGrok'  => 10286500,
+   'MobileWebWikiGrokError' => 10352248,
);
 
$schemas += $mobileEventLoggingSchemas;
@@ -872,6 +873,7 @@
'javascripts/loggingSchemas/mobileWebEditing.js',
'javascripts/loggingSchemas/MobileWebClickTracking.js',
'javascripts/loggingSchemas/mobileWebWikiGrok.js',
+   'javascripts/loggingSchemas/mobileWebWikiGrokError.js',
);
 
$wgResourceModules['mobile.loggingSchemas'] = 
$wgMFMobileResourceBoilerplate + array(
diff --git a/javascripts/loggingSchemas/mobileWebWikiGrokError.js 
b/javascripts/loggingSchemas/mobileWebWikiGrokError.js
new file mode 100644
index 000..f50c4cc
--- /dev/null
+++ b/javascripts/loggingSchemas/mobileWebWikiGrokError.js
@@ -0,0 +1,13 @@
+( function ( M, $ ) {
+   function log( data ) {
+   var options = {
+   pageId: mw.config.get( 'wgArticleId' ),
+   mobileMode: mw.config.get( 'wgMFMode' )
+   };
+   return M.log( 'MobileWebWikiGrokError', $.extend( options, data 
) );
+   }
+
+   M.define( 'loggingSchemas/mobileWebWikiGrokError', { log: log } );
+
+} )( mw.mobileFrontend, jQuery );
+
diff --git a/javascripts/modules/wikigrok/WikiDataApi.js 
b/javascripts/modules/wikigrok/WikiDataApi.js
index c0d3fe0..142fb7e 100644
--- a/javascripts/modules/wikigrok/WikiDataApi.js
+++ b/javascripts/modules/wikigrok/WikiDataApi.js
@@ -14,7 +14,9 @@
Api.prototype.initialize.apply( this, arguments );
},
getClaims: function () {
-   var id = this.subjectId;
+   var self = this,
+   id = this.subjectId;
+
return this.ajax( {
action: 'wbgetentities',
ids: id,
@@ -24,7 +26,8 @@
var instanceClaims, entityClaims,
claims = {};
// See if the page has any 'instance of' claims.
-   if ( data.entities !== undefined && 
data.entities[id].claims.P31 !== undefined ) {
+   if ( data.entities !== undefined && 
data.entities[id ].claims !== undefined &&
+   data.entities[id].claims.P31 !== 
undefined ) {
entityClaims = data.entities[id].claims;
instanceClaims = entityClaims.P31;
 
@@ -38,8 +41,11 @@
} );
return claims;
} else {
+   self.logError( 
'no-impression-cannot-fetch-claims' );
return false;
}
+   } ).fail( function () {
+   self.logError( 
'no-impression-cannot-fetch-claims' );
} );
},
/**
diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js 
b/javascripts/modules/wikigrok/WikiGrokDialog.js
index af4c71c..592a131 100644
--- a/javascripts/modules/wikigrok/WikiGrokDialog.js
+++ b/javascripts/modules/wikigrok/WikiGrokDialog.js
@@ -5,6 +5,7 @@
WikiGrokApi = M.require( 'modules/wikigrok/WikiGrokApi' ),
WikiDataApi = M.require( 'modules/wikigrok/WikiDataApi' ),
schema = M.require( 'loggingSchemas/mobileWebWikiGrok' ),
+   errorSchema = M.require( 
'loggingSchemas/mobileWebWikiGrokError' ),
WikiGrokDialog,
timer = null,
$window = $( window );
@@ -57,6 +58,11 @@
} );
},
 
+   /*

[MediaWiki-commits] [Gerrit] Fix incorrect collapsed form state when topic sort changes. - change (mediawiki...Flow)

2014-10-28 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Fix incorrect collapsed form state when topic sort changes.
..

Fix incorrect collapsed form state when topic sort changes.

Currently, a manual hideForm step is needed to sync up the initial
state after the template does the rendering.  This is called by
makeContentInteractive.

This was previously called by FlowBoardComponent.prototype.reinitializeBoard
(the equivalent of FlowBoardComponent.prototype.reinitializeContainer),
so this adds it back.

Bug: 72602
Change-Id: Ieb481e4b9290ce1b65cebd57d2c7910faaa8e2d8
---
M modules/engine/components/board/flow-board.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/engine/components/board/flow-board.js 
b/modules/engine/components/board/flow-board.js
index 1781131..a23efc3 100644
--- a/modules/engine/components/board/flow-board.js
+++ b/modules/engine/components/board/flow-board.js
@@ -114,6 +114,8 @@
return false;
}
 
+   this.emitWithReturn( 'makeContentInteractive', this );
+
return $retObj;
}
FlowBoardComponent.prototype.reinitializeContainer = 
flowBoardComponentReinitializeContainer;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb481e4b9290ce1b65cebd57d2c7910faaa8e2d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Added node-uuid to the repo - change (mediawiki...deploy)

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

Change subject: Added node-uuid to the repo
..


Added node-uuid to the repo

Change-Id: Id630eb24e19dae2d285e11ffd8a418076e6a873f
---
A node_modules/node-uuid/.npmignore
A node_modules/node-uuid/LICENSE.md
A node_modules/node-uuid/README.md
A node_modules/node-uuid/benchmark/README.md
A node_modules/node-uuid/benchmark/bench.gnu
A node_modules/node-uuid/benchmark/bench.sh
A node_modules/node-uuid/benchmark/benchmark-native.c
A node_modules/node-uuid/benchmark/benchmark.js
A node_modules/node-uuid/component.json
A node_modules/node-uuid/package.json
A node_modules/node-uuid/test/compare_v1.js
A node_modules/node-uuid/test/test.html
A node_modules/node-uuid/test/test.js
A node_modules/node-uuid/uuid.js
14 files changed, 1,196 insertions(+), 0 deletions(-)

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



diff --git a/node_modules/node-uuid/.npmignore 
b/node_modules/node-uuid/.npmignore
new file mode 100644
index 000..fd4f2b0
--- /dev/null
+++ b/node_modules/node-uuid/.npmignore
@@ -0,0 +1,2 @@
+node_modules
+.DS_Store
diff --git a/node_modules/node-uuid/LICENSE.md 
b/node_modules/node-uuid/LICENSE.md
new file mode 100644
index 000..f039427
--- /dev/null
+++ b/node_modules/node-uuid/LICENSE.md
@@ -0,0 +1,2 @@
+Copyright (c) 2010-2012 Robert Kieffer
+MIT License - http://opensource.org/licenses/mit-license.php
diff --git a/node_modules/node-uuid/README.md b/node_modules/node-uuid/README.md
new file mode 100644
index 000..e436a89
--- /dev/null
+++ b/node_modules/node-uuid/README.md
@@ -0,0 +1,207 @@
+# node-uuid
+
+Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) 
UUIDS.
+
+Features:
+
+* Generate RFC4122 version 1 or version 4 UUIDs
+* Runs in node.js and all browsers.
+* Registered as a [ComponentJS](https://github.com/component/component) 
[component](https://github.com/component/component/wiki/Components) 
('broofa/node-uuid').
+* Cryptographically strong random # generation on supporting platforms
+* 1.1K minified and gzip'ed  (Want something smaller?  Check this [crazy 
shit](https://gist.github.com/982883) out! )
+* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)
+
+## Getting Started
+
+Install it in your browser:
+
+```html
+
+```
+
+Or in node.js:
+
+```
+npm install node-uuid
+```
+
+```javascript
+var uuid = require('node-uuid');
+```
+
+Then create some ids ...
+
+```javascript
+// Generate a v1 (time-based) id
+uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
+
+// Generate a v4 (random) id
+uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
+```
+
+## API
+
+### uuid.v1([`options` [, `buffer` [, `offset`]]])
+
+Generate and return a RFC4122 v1 (timestamp-based) UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+
+  * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: 
Randomly generated ID.  See note 1.
+  * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence.  Default: An 
internally maintained clockseq is used.
+  * `msecs` - (Number | Date) Time in milliseconds since unix Epoch.  Default: 
The current time is used.
+  * `nsecs` - (Number between 0-) additional time, in 100-nanosecond 
units. Ignored if `msecs` is unspecified. Default: internal uuid counter is 
used, as per 4.2.1.2.
+
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be 
written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing.
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Notes:
+
+1. The randomly generated node id is only guaranteed to stay constant for the 
lifetime of the current JS runtime. (Future versions of this module may use 
persistent storage mechanisms to extend this guarantee.)
+
+Example: Generate string UUID with fully-specified options
+
+```javascript
+uuid.v1({
+  node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
+  clockseq: 0x1234,
+  msecs: new Date('2011-11-01').getTime(),
+  nsecs: 5678
+});   // -> "710b962e-041c-11e1-9234-0123456789ab"
+```
+
+Example: In-place generation of two binary IDs
+
+```javascript
+// Generate two ids in an array
+var arr = new Array(32); // -> []
+uuid.v1(null, arr, 0);   // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 
15]
+uuid.v1(null, arr, 16);  // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 
15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
+
+// Optionally use uuid.unparse() to get stringify the ids
+uuid.unparse(buffer);// -> '02a2ce90-1432-11e1-8558-0b488e4fc115'
+uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'
+```
+
+### uuid.v4([`options` [, `buffer` [, `offset`]]])
+
+Generate and return a RFC4122 v4 UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+
+  * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of 
rand

[MediaWiki-commits] [Gerrit] Convert string to integer - change (mediawiki...MobileFrontend)

2014-10-28 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Convert string to integer
..

Convert string to integer

toFixed returns a string when the schema says it should be a number.

Bug: 72639
Change-Id: I1564502e14b2d2bc307e6e6052e74c2cd5ccc59c
---
M javascripts/modules/wikigrok/WikiGrokDialog.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js 
b/javascripts/modules/wikigrok/WikiGrokDialog.js
index af4c71c..ef4678b 100644
--- a/javascripts/modules/wikigrok/WikiGrokDialog.js
+++ b/javascripts/modules/wikigrok/WikiGrokDialog.js
@@ -64,9 +64,9 @@
taskToken: this.defaults.taskToken,
userToken: this.options.userToken,
// the position of the top of the widget in 
viewports (as a unit)
-   widgetOffset: ( this.$el.offset().top / 
$window.height() ).toFixed( 2 ),
+   widgetOffset: parseFloat( ( 
this.$el.offset().top / $window.height() ).toFixed( 2 ) ),
// top of the document - top of the viewport in 
viewports (as a unit)
-   scrollOffset: ( $window.scrollTop() / 
$window.height() ).toFixed( 2 )
+   scrollOffset: parseFloat( ( $window.scrollTop() 
/ $window.height() ).toFixed( 2 ) )
};
if ( this.options.testing ) {
data.testing = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1564502e14b2d2bc307e6e6052e74c2cd5ccc59c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] Introducing isValid() in MWTitileInputWidget - change (mediawiki...VisualEditor)

2014-10-28 Thread SuchetaG (Code Review)
SuchetaG has uploaded a new change for review.

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

Change subject: Introducing isValid() in MWTitileInputWidget
..

Introducing isValid() in MWTitileInputWidget

A method isValid() is added to MWTitleInputWidget which would validate the 
titles given as inputs

Bug: 71249
Change-Id: I7749165652bd3c0bb08ca42289a425fe8e25483d
---
M modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js
index d7666c3..f2f8f46 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js
@@ -137,3 +137,12 @@
 
return titleObj;
 };
+
+/**
+ * Returns whether or not the current title is considered valid
+ *
+ * @return {jQuery.Deferred}
+ */
+OO.ui.TextInputWidget.prototype.isValid = function () {
+   return $.Deferred().resolve( !!this.getTitle() ).promise();
+};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7749165652bd3c0bb08ca42289a425fe8e25483d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: SuchetaG 

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


[MediaWiki-commits] [Gerrit] ZeroPortal setRawResult lua mode - change (mediawiki...ZeroPortal)

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

Change subject: ZeroPortal setRawResult lua mode
..


ZeroPortal setRawResult lua mode

This replaces the very hacky (and partially escaping broken) mode
where lua module decides to output data in the raw format.
Now, lua can set raw output data directly with
  mw.zeroportal.setRawResult(text)

This function is only enabled when used from Special:ZeroPortal.

Eventually, we might want to port this to the scribunto ext.

A second patch will remove current raw=1 code once code is fixed.

Change-Id: Ibb97523f6b3164268eaa80d94ddb001e7f6a6088
---
M ZeroPortal.php
A includes/LuaLibrary.lua
A includes/LuaLibrary.php
M includes/PortalSpecialPage.php
4 files changed, 139 insertions(+), 2 deletions(-)

Approvals:
  Dr0ptp4kt: Looks good to me, approved
  Brion VIBBER: Looks good to me, but someone else must approve
  Jhobs: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/ZeroPortal.php b/ZeroPortal.php
index 611d611..5f7056b 100644
--- a/ZeroPortal.php
+++ b/ZeroPortal.php
@@ -40,6 +40,7 @@
 foreach ( array(
  'ApiZeroPortal',
  'ConfigPageHooks',
+ 'LuaLibrary',
  'PortalSpecialPage',
  'ZeroConfigView',
   ) as $key => $class ) {
@@ -64,6 +65,7 @@
 
 $wgAPIModules['zeroportal'] = 'ZeroPortal\ApiZeroPortal';
 $wgHooks['BeforePageDisplay'][] = 
'ZeroPortal\ConfigPageHooks::onBeforePageDisplay';
+$wgHooks['ScribuntoExternalLibraries'][] = 
'ZeroPortal\LuaLibrary::onScribuntoExternalLibraries';
 
 // Set our own view class for the JsonZeroConfig model, and configure local 
storage
 $wgJsonConfigModels['JsonZeroConfig']['view'] = 'ZeroPortal\ZeroConfigView';
diff --git a/includes/LuaLibrary.lua b/includes/LuaLibrary.lua
new file mode 100644
index 000..04be097
--- /dev/null
+++ b/includes/LuaLibrary.lua
@@ -0,0 +1,24 @@
+local p = {}
+local php
+
+function p.setupInterface( options )
+-- Copy the PHP callbacks to a local variable, and remove the global
+p.setupInterface = nil
+php = mw_interface
+mw_interface = nil
+
+-- Register this library in the "mw" global as mw.zeroportal.*
+mw = mw or {}
+mw.zeroportal = p
+
+-- Indicate that we're loaded
+package.loaded['mw.zeroportal'] = p
+end
+
+-- Each of the following functions should be documented in the corresponding 
LuaLibrary.php function
+
+function p.setRawResult( result )
+return php.setRawResult( result )
+end
+
+return p
diff --git a/includes/LuaLibrary.php b/includes/LuaLibrary.php
new file mode 100644
index 000..d4a8e87
--- /dev/null
+++ b/includes/LuaLibrary.php
@@ -0,0 +1,103 @@
+getOutput();
+   $req = $ctx->getRequest();
+   $resp = $req->response();
+   self::setContext( null ); // Ensure that subsequent lua 
invocations don't permit
+
+   if ( !$req->wasPosted() ) {
+   $expiryUnixTime = time() + 300; // default 300 seconds 
caching
+   $resp->header( 'Expires: ' . wfTimestamp( TS_RFC2822, 
$expiryUnixTime ) );
+
+   $cacheMode = $ctx->getUser()->isAnon() ? 'public' : 
'private';
+   $resp->header( 'Cache-Control: ' . $cacheMode . ', 
must-revalidate, max-age=0' );
+   }
+
+   if ( self::$result ) {
+   $out->disable();
+   $resp->header( 'Content-Type: text/plain; 
charset=UTF-8' );
+   echo self::$result;
+   return true;
+   } else {
+   return false;
+   }
+   }
+
+   public function register() {
+   $title = $this->getTitle();
+   if ( $title && $title->inNamespace( NS_SPECIAL ) && 
$title->getText() === 'ZeroPortal' ) {
+   $functions = array();
+   foreach ( array(
+ 'setRawResult',
+ ) as $f ) {
+   $functions[$f] = array( $this, $f );
+   }
+   $moduleFileName = __DIR__ . DIRECTORY_SEPARATOR . 
'LuaLibrary.lua';
+   $this->getEngine()->registerInterface( $moduleFileName, 
$functions, array() );
+   }
+   }
+
+   /**
+* Set raw result of the special page
+* @param mixed $result
+*/
+   public function setRawResult( $result = null ) {
+   self::getContext(); // ensure special page is enabled
+   $this->checkType( self::luaNamespace . __FUNCTION__, 1, 
$result, 'string' );
+   self::$result = $result;
+   }
+
+}
diff --git a/includes/PortalSpecialPage.php b/includes/PortalSpecialPage.php
index d5d5b67..5b37b73 100644
--- a/includes/PortalSpecialPage.php
+++ b/includes/P

[MediaWiki-commits] [Gerrit] Fix Parsoid in beta - change (operations/puppet)

2014-10-28 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Fix Parsoid in beta
..

Fix Parsoid in beta

Point Varnish to the new instance (the old one is fried).

Bonus: fix incorrect path in Parsoid settings (worked around
this with a symlink in the meantime).

Change-Id: I6a001f6e28c2b5ae25b08ae9d75bdb15469404a9
---
M manifests/role/cache.pp
M manifests/role/parsoid.pp
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 4a65e55..95ccb4b 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -465,7 +465,7 @@
 'eqiad' => [ '10.68.17.96' ],  # deployment-mediawiki01
 },
 'parsoid' => {
-'eqiad' => [ '10.68.16.17' ],  # deployment-parsoid04
+'eqiad' => [ '10.68.16.120' ],  # deployment-parsoid05
 }
 }
 }
diff --git a/manifests/role/parsoid.pp b/manifests/role/parsoid.pp
index c1c9860..f2f18fe 100644
--- a/manifests/role/parsoid.pp
+++ b/manifests/role/parsoid.pp
@@ -199,7 +199,7 @@
 $parsoid_settings_file = '/srv/deployment/parsoid/localsettings.js'
 
 # Checkout of mediawiki/services/parsoid
-$parsoid_base_path = '/srv/deployment/parsoid/parsoid'
+$parsoid_base_path = '/srv/deployment/parsoid/deploy/src'
 
 file { '/etc/default/parsoid':
 ensure  => present,

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

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

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


[MediaWiki-commits] [Gerrit] Update Wikidata, fix rtl issue in statements js - change (mediawiki/core)

2014-10-28 Thread Chad (Code Review)
Chad has submitted this change and it was merged.

Change subject: Update Wikidata, fix rtl issue in statements js
..


Update Wikidata, fix rtl issue in statements js

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

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



diff --git a/extensions/Wikidata b/extensions/Wikidata
index 91969e7..74a5d88 16
--- a/extensions/Wikidata
+++ b/extensions/Wikidata
-Subproject commit 91969e747ba67eae5932edf69dfd1022de85b4c1
+Subproject commit 74a5d883606fe4be39993ecadb26b0d617a3ce0e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia73f070cb554b45931801e54d62b69adf1f2a30e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf5
Gerrit-Owner: Aude 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update Wikidata, fix rtl issue in statements js - change (mediawiki/core)

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

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

Change subject: Update Wikidata, fix rtl issue in statements js
..

Update Wikidata, fix rtl issue in statements js

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/169621/1

diff --git a/extensions/Wikidata b/extensions/Wikidata
index 91969e7..74a5d88 16
--- a/extensions/Wikidata
+++ b/extensions/Wikidata
-Subproject commit 91969e747ba67eae5932edf69dfd1022de85b4c1
+Subproject commit 74a5d883606fe4be39993ecadb26b0d617a3ce0e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia73f070cb554b45931801e54d62b69adf1f2a30e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf5
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] Tools: Add lint task for grunt - change (mediawiki...MobileFrontend)

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

Change subject: Tools: Add lint task for grunt
..


Tools: Add lint task for grunt

Try it with: (pretty useful for development)
grunt watch:lint

Change-Id: Ia0b20f7567df8c116ef5d0d880aedf992ffb19ec
---
M Gruntfile.js
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index ca8a850..597da8a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -40,6 +40,10 @@
}
},
watch: {
+   lint: {
+   files: [ '<%= files.js %>', '<%= files.jsTests 
%>' ],
+   tasks: [ 'lint' ]
+   },
scripts: {
files: [ '<%= files.js %>', '<%= files.jsTests 
%>' ],
tasks: [ 'test' ]
@@ -53,8 +57,9 @@
}
} );
 
+   grunt.registerTask( 'lint', [ 'jshint', 'jscs' ] );
// Jenkins automatically runs grunt test for us
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'qunit' ] );
+   grunt.registerTask( 'test', [ 'lint', 'qunit' ] );
grunt.registerTask( 'default', [ 'test' ] );
 
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0b20f7567df8c116ef5d0d880aedf992ffb19ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Hygiene: Grunt file code style - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Grunt file code style
..


Hygiene: Grunt file code style

Change-Id: Ibe75c4fe5f8273c5552fea65a694b87ac076ead1
---
M Gruntfile.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index 58ee11f..ca8a850 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,12 +10,12 @@
 
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jscs' );
-   grunt.loadNpmTasks('grunt-contrib-qunit');
-   grunt.loadNpmTasks('grunt-contrib-watch');
+   grunt.loadNpmTasks( 'grunt-contrib-qunit' );
+   grunt.loadNpmTasks( 'grunt-contrib-watch' );
 
grunt.initConfig( {
URL: process.env.URL || 'http://127.0.0.1:8080/w/index.php/',
-   QUNIT_FILTER: (process.env.QUNIT_FILTER && 
'&filter='+process.env.QUNIT_FILTER) || '',
+   QUNIT_FILTER: ( process.env.QUNIT_FILTER && '&filter=' + 
process.env.QUNIT_FILTER ) || '',
files: {
js: 'javascripts/**/*.js',
jsTests: 'tests/qunit/**/*.js'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe75c4fe5f8273c5552fea65a694b87ac076ead1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update Wikidata, fix rtl issue in statements js - change (mediawiki...Wikidata)

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

Change subject: Update Wikidata, fix rtl issue in statements js
..


Update Wikidata, fix rtl issue in statements js

Change-Id: I9aa54883ae1b89316b09ad7f975778e983f40480
---
M composer.lock
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
M vendor/composer/installed.json
3 files changed, 7 insertions(+), 6 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 16781af..922be13 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1205,7 +1205,7 @@
 "source": {
 "type": "git",
 "url": 
"https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git";,
-"reference": "f619d7c20e63077ce89e995e6f53beb4477f59c9"
+"reference": "85c64994ab955a2488e25261c5e658e71db4434c"
 },
 "require": {
 "data-values/common": "~0.2.0",
@@ -1273,7 +1273,7 @@
 "issues": "https://bugzilla.wikimedia.org/";,
 "irc": "irc://irc.freenode.net/wikidata"
 },
-"time": "2014-10-28 14:12:27"
+"time": "2014-10-28 22:53:07"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git 
a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
 
b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
index a3dc679..ae19b6d 100644
--- 
a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
+++ 
b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
@@ -243,11 +243,12 @@
 * @param {jQuery} $within
 */
function positionElementInOneLineWithAnother( $element, $target, 
$within ) {
+   var side = $( 'html' ).prop( 'dir' ) === 'ltr' ? 'left' : 
'right';
$element
.stop( ANIMATION_QUEUE, true, false ) // stop all queued 
animations, don't jump to end
.position( {
-   my: 'left top',
-   at: 'left top',
+   my: side + ' top',
+   at: side + ' top',
of: $target,
within: $within,
using: function( css, calc ) {
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index fa1ab79..3c365ab 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1295,7 +1295,7 @@
 "source": {
 "type": "git",
 "url": 
"https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git";,
-"reference": "f619d7c20e63077ce89e995e6f53beb4477f59c9"
+"reference": "85c64994ab955a2488e25261c5e658e71db4434c"
 },
 "require": {
 "data-values/common": "~0.2.0",
@@ -1321,7 +1321,7 @@
 "conflict": {
 "mediawiki/mediawiki": "<1.23"
 },
-"time": "2014-10-28 14:07:42",
+"time": "2014-10-28 22:21:47",
 "type": "mediawiki-extension",
 "installation-source": "source",
 "autoload": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9aa54883ae1b89316b09ad7f975778e983f40480
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: wmf/1.25wmf5
Gerrit-Owner: Aude 
Gerrit-Reviewer: Aude 
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: Add notifications to grunt - change (mediawiki...MobileFrontend)

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

Change subject: Tools: Add notifications to grunt
..


Tools: Add notifications to grunt

Failed tasks will show notifications that they failed.

Pretty useful if you run `grunt watch:lint` or `grunt watch` in the background
to know that errors were found.

Change-Id: I214ccaa836459ac175e1afea0d16d24734567cd3
---
M Gruntfile.js
M package.json
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index 597da8a..c46c67f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -12,6 +12,7 @@
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
+   grunt.loadNpmTasks( 'grunt-notify' );
 
grunt.initConfig( {
URL: process.env.URL || 'http://127.0.0.1:8080/w/index.php/',
diff --git a/package.json b/package.json
index 73c3924..758b36d 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"grunt-contrib-jshint": "0.10.0",
"grunt-jscs": "0.8.1",
"js-beautify": "^1.5.4",
+   "grunt-notify": "^0.3.1",
"grunt-contrib-qunit": "^0.5.2",
"grunt-contrib-watch": "0.6.1"
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I214ccaa836459ac175e1afea0d16d24734567cd3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] initial commit - change (mediawiki...ContributionsList)

2014-10-28 Thread tosfos (Code Review)
tosfos has submitted this change and it was merged.

Change subject: initial commit
..


initial commit

Change-Id: I08280bfa5bf5f6e76be19c52faece90f98e5a2f2
---
A .jshintrc
A ContributionsList.class.php
A ContributionsList.hooks.php
A ContributionsList.magic.php
A ContributionsList.php
A i18n/en.json
A i18n/qqq.json
7 files changed, 499 insertions(+), 0 deletions(-)

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



diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..4cd914b
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,8 @@
+{
+   "predef": [
+   "mediaWiki",
+   "jQuery"
+   ],
+   "browser": true,
+   "smarttabs": true
+}
diff --git a/ContributionsList.class.php b/ContributionsList.class.php
new file mode 100644
index 000..f319867
--- /dev/null
+++ b/ContributionsList.class.php
@@ -0,0 +1,358 @@
+setContext( $context );
+   }
+
+   $this->db = wfGetDB( DB_SLAVE, 'contributionslist' );
+
+   $this->user = $user;
+
+   if ( $category ) {
+   $this->category = Title::newFromText( $category, 
NS_CATEGORY );
+   }
+
+   if ( $type ) {
+   $this->type = $type;
+   }
+
+   if ( $dateFrom ) {
+   $this->dateFrom = wfTimestamp( TS_MW, strtotime( 
$dateFrom ) );
+   }
+   if ( $dateTo ) {
+   // We want the end of the $dateTo, not the beginning.
+   $this->dateTo = wfTimestamp( TS_MW, strtotime( 
"tomorrow", strtotime( $dateTo ) ) - 1 );
+   }
+
+   $this->doQuery();
+   }
+
+   /**
+* Perform the db query
+* The query code is based on ContribsPager
+*/
+   public function doQuery() {
+   # Use the child class name for profiling
+   $fname = __METHOD__ . ' (' . get_class( $this ) . ')';
+   wfProfileIn( $fname );
+
+   list( $tables, $fields, $conds, $fname, $options, $join_conds ) 
= $this->buildQueryInfo();
+   $this->result = $this->db->select(
+   $tables, $fields, $conds, $fname, $options, $join_conds
+   );
+
+   $this->result->rewind(); // Paranoia
+
+   wfProfileOut( $fname );
+   }
+
+   /**
+* @return string
+*/
+   function getSqlComment() {
+   return get_class( $this );
+   }
+
+   /**
+* Generate an array to be turned into the full and final query.
+*
+* @return array
+*/
+   protected function buildQueryInfo() {
+   $fname = __METHOD__ . ' (' . $this->getSqlComment() . ')';
+   $info = $this->getQueryInfo();
+   $tables = $info['tables'];
+   $fields = $info['fields'];
+   $conds = isset( $info['conds'] ) ? $info['conds'] : array();
+   $options = isset( $info['options'] ) ? $info['options'] : 
array();
+   $join_conds = isset( $info['join_conds'] ) ? 
$info['join_conds'] : array();
+
+   $options['ORDER BY'] = $this->indexField . ' DESC';
+
+   if ( $this->dateFrom ) {
+   $conds[] = $this->indexField .
+   '>=' . $this->db->addQuotes( $this->dateFrom );
+   }
+   if ( $this->dateTo ) {
+   $conds[] = $this->indexField .
+   '<=' . $this->db->addQuotes( $this->dateTo );
+   }
+
+   return array( $tables, $fields, $conds, $fname, $options, 
$join_conds );
+   }
+
+   /**
+* Generate an array of basic query info.
+*
+* @return array
+*/
+   function getQueryInfo() {
+   list( $tables, $index, $userCond, $join_cond ) = 
$this->getUserCond();
+
+   if ( $this->category instanceof Title ) {
+   $tables[] = 'categorylinks';
+   $conds = array_merge( $userCond, array( 'cl_to' => 
$this->category->getDBkey() ) );
+   $join_cond['categorylinks'] = array( 'INNER JOIN', 
'cl_from = page_id' );
+   } else {
+   $conds = $userCond;
+   }
+
+   $user = $this->getUser();
+   // Paranoia: avoid brute force searches (bug 17342)
+   if ( !$user->isAllowed( 'deletedhistory' ) ) {
+   $conds[] = $this->db->bitAnd( 'rev_deleted', 
Revision::DELETED_USER ) . ' = 0';
+   } elseif ( !$user->isAllowed( 'suppressrevision' ) ) {
+   $conds[] = $this->db->bitAnd( 'rev_deleted', 
Revision::SUPPRESSED_USER ) .
+   ' != ' . Revision::SUPPRESSED_USER;
+   }
+
+   # Don'

[MediaWiki-commits] [Gerrit] Update Wikidata, fix rtl issue in statements js - change (mediawiki...Wikidata)

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

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

Change subject: Update Wikidata, fix rtl issue in statements js
..

Update Wikidata, fix rtl issue in statements js

Change-Id: I9aa54883ae1b89316b09ad7f975778e983f40480
---
M composer.lock
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
M vendor/composer/installed.json
3 files changed, 7 insertions(+), 6 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index 16781af..922be13 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1205,7 +1205,7 @@
 "source": {
 "type": "git",
 "url": 
"https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git";,
-"reference": "f619d7c20e63077ce89e995e6f53beb4477f59c9"
+"reference": "85c64994ab955a2488e25261c5e658e71db4434c"
 },
 "require": {
 "data-values/common": "~0.2.0",
@@ -1273,7 +1273,7 @@
 "issues": "https://bugzilla.wikimedia.org/";,
 "irc": "irc://irc.freenode.net/wikidata"
 },
-"time": "2014-10-28 14:12:27"
+"time": "2014-10-28 22:53:07"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git 
a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
 
b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
index a3dc679..ae19b6d 100644
--- 
a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
+++ 
b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
@@ -243,11 +243,12 @@
 * @param {jQuery} $within
 */
function positionElementInOneLineWithAnother( $element, $target, 
$within ) {
+   var side = $( 'html' ).prop( 'dir' ) === 'ltr' ? 'left' : 
'right';
$element
.stop( ANIMATION_QUEUE, true, false ) // stop all queued 
animations, don't jump to end
.position( {
-   my: 'left top',
-   at: 'left top',
+   my: side + ' top',
+   at: side + ' top',
of: $target,
within: $within,
using: function( css, calc ) {
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index fa1ab79..3c365ab 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1295,7 +1295,7 @@
 "source": {
 "type": "git",
 "url": 
"https://git.wikimedia.org/git/mediawiki/extensions/Wikibase.git";,
-"reference": "f619d7c20e63077ce89e995e6f53beb4477f59c9"
+"reference": "85c64994ab955a2488e25261c5e658e71db4434c"
 },
 "require": {
 "data-values/common": "~0.2.0",
@@ -1321,7 +1321,7 @@
 "conflict": {
 "mediawiki/mediawiki": "<1.23"
 },
-"time": "2014-10-28 14:07:42",
+"time": "2014-10-28 22:21:47",
 "type": "mediawiki-extension",
 "installation-source": "source",
 "autoload": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9aa54883ae1b89316b09ad7f975778e983f40480
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: wmf/1.25wmf5
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] Choose correct side for positioning - change (mediawiki...Wikibase)

2014-10-28 Thread Aude (Code Review)
Aude has submitted this change and it was merged.

Change subject: Choose correct side for positioning
..


Choose correct side for positioning

fixes rtl display of statements

Bug: 72647
Change-Id: I9a9c62643af6dd29afdc1e195e6496e86c4ae048
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
index a3dc679..ae19b6d 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
@@ -243,11 +243,12 @@
 * @param {jQuery} $within
 */
function positionElementInOneLineWithAnother( $element, $target, 
$within ) {
+   var side = $( 'html' ).prop( 'dir' ) === 'ltr' ? 'left' : 
'right';
$element
.stop( ANIMATION_QUEUE, true, false ) // stop all queued 
animations, don't jump to end
.position( {
-   my: 'left top',
-   at: 'left top',
+   my: side + ' top',
+   at: side + ' top',
of: $target,
within: $within,
using: function( css, calc ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a9c62643af6dd29afdc1e195e6496e86c4ae048
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.25wmf5
Gerrit-Owner: Aude 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Ebrahim 
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 phab check command to old checkcommands.cfg - change (operations/puppet)

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

Change subject: add phab check command to old checkcommands.cfg
..


add phab check command to old checkcommands.cfg

since adding a new file into the check_commands
does not make Icinga find the command

so i'm using the old file we always used until
YuviPanda can teach me what the current way should be

honestly, the different places and ways to add them
is a bit confusing

Change-Id: I100dffb5a829aef8183c5e884c392fca857187d2
---
M modules/nagios_common/files/checkcommands.cfg
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/modules/nagios_common/files/checkcommands.cfg 
b/modules/nagios_common/files/checkcommands.cfg
index 81c4a14..cb633bb 100644
--- a/modules/nagios_common/files/checkcommands.cfg
+++ b/modules/nagios_common/files/checkcommands.cfg
@@ -453,3 +453,12 @@
 command_namenrpe_check_ocg_health
 command_line/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c 
check_ocg_health
 }
+
+# custom command to check phabricator behind misc-web
+# using the -S should also give us cert expiry monitoring
+# we are also checking for string 'Wikimedia' to be in there
+# so it should trigger if 200 but shows something else
+define command{
+command_namecheck_https_phabricator
+command_line/usr/lib/nagios/plugins/check_http -S -H 
'phabricator.wikimedia.org' -I misc-web-lb.eqiad.wikimedia.org -u 
'https://phabricator.wikimedia.org/' -s 'Wikimedia and MediaWiki'
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I100dffb5a829aef8183c5e884c392fca857187d2
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] add phab check command to old checkcommands.cfg - change (operations/puppet)

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

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

Change subject: add phab check command to old checkcommands.cfg
..

add phab check command to old checkcommands.cfg

since adding a new file into the check_commands
does not make Icinga find the command

so i'm using the old file we always used until
YuviPanda can teach me what the current way should be

honestly, the different places and ways to add them
is a bit confusing

Change-Id: I100dffb5a829aef8183c5e884c392fca857187d2
---
M modules/nagios_common/files/checkcommands.cfg
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/modules/nagios_common/files/checkcommands.cfg 
b/modules/nagios_common/files/checkcommands.cfg
index 81c4a14..cb633bb 100644
--- a/modules/nagios_common/files/checkcommands.cfg
+++ b/modules/nagios_common/files/checkcommands.cfg
@@ -453,3 +453,12 @@
 command_namenrpe_check_ocg_health
 command_line/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c 
check_ocg_health
 }
+
+# custom command to check phabricator behind misc-web
+# using the -S should also give us cert expiry monitoring
+# we are also checking for string 'Wikimedia' to be in there
+# so it should trigger if 200 but shows something else
+define command{
+command_namecheck_https_phabricator
+command_line/usr/lib/nagios/plugins/check_http -S -H 
'phabricator.wikimedia.org' -I misc-web-lb.eqiad.wikimedia.org -u 
'https://phabricator.wikimedia.org/' -s 'Wikimedia and MediaWiki'
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I100dffb5a829aef8183c5e884c392fca857187d2
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] Update ExtensionDistributor config - change (operations/mediawiki-config)

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

Change subject: Update ExtensionDistributor config
..


Update ExtensionDistributor config

* Add extensionListUrl setting
* Disable REL1_24 as it's confusing people

Change-Id: I36fdcce7aee69c62a7a79cb614f31be36d46168e
---
M wmf-config/CommonSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index c5130af..e080c7d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -804,13 +804,14 @@
'apiUrl' => 
'https://gerrit.wikimedia.org/r/projects/mediawiki%2Fextensions%2F$EXT/branches',
'tarballUrl' => 
'https://extdist.wmflabs.org/dist/$EXT-$REF-$SHA.tar.gz',
'tarballName' => '$EXT-$REF-$SHA.tar.gz',
+   'extensionListUrl' => 
'https://gerrit.wikimedia.org/r/projects/?p=mediawiki/extensions/',
);
 
// When changing the Snapshot Refs please change the corresponding
// extension distributor messages for mediawiki.org in 
WikimediaMessages/i18n/wikimedia/*.json too
$wgExtDistSnapshotRefs = array(
'master',
-   'REL1_24',
+   // 'REL1_24', // Remove 1.24 since it's confusing people by 
being the default
'REL1_23',
'REL1_22',
'REL1_21',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36fdcce7aee69c62a7a79cb614f31be36d46168e
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Chad 
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] Add missing documentation - change (mediawiki...MobileFrontend)

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

Change subject: Add missing documentation
..


Add missing documentation

Add missing documentation for:
Section.js
ContentOverlay.js
settings.js
uploads.js
toast.js
user.js

Change-Id: Iab9585daafd9c8fe4becd6e0f480b38fe8a5b293
---
M javascripts/Section.js
M javascripts/modules/tutorials/ContentOverlay.js
M javascripts/settings.js
M javascripts/specials/uploads.js
M javascripts/toast.js
M javascripts/user.js
6 files changed, 18 insertions(+), 2 deletions(-)

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



diff --git a/javascripts/Section.js b/javascripts/Section.js
index 7103e13..912105f 100644
--- a/javascripts/Section.js
+++ b/javascripts/Section.js
@@ -5,6 +5,7 @@
Section;
 
/**
+* Builds a section of a page
 * @class Section
 * @extends View
 */
diff --git a/javascripts/modules/tutorials/ContentOverlay.js 
b/javascripts/modules/tutorials/ContentOverlay.js
index 25d4d04..89db1fb 100644
--- a/javascripts/modules/tutorials/ContentOverlay.js
+++ b/javascripts/modules/tutorials/ContentOverlay.js
@@ -10,14 +10,17 @@
ContentOverlay = Overlay.extend( {
className: 'overlay content-overlay',
/**
+* @inheritDoc
 * @type Boolean
 */
fullScreen: false,
/**
+* @inheritDoc
 * @type Boolean
 */
closeOnContentTap: true,
/**
+* @inheritDoc
 * @type String
 */
appendTo: '#mw-mf-page-center',
@@ -45,6 +48,8 @@
this.addPointerArrow( $( target ) );
},
/**
+* Position the overlay under a specified element
+* @private
 * @param {jQuery.Object} $pa An element that should be pointed 
at by the overlay
 */
_position: function ( $pa ) {
@@ -54,6 +59,8 @@
this.$el.css( 'top', paOffset.top + h );
},
/**
+* Position overlay and add pointer arrow
+** so that it points at specified element
 * @method
 * @param {jQuery.Object} $pa An element that should be pointed 
at by the overlay
 */
diff --git a/javascripts/settings.js b/javascripts/settings.js
index b138ee7..b0cba1b 100644
--- a/javascripts/settings.js
+++ b/javascripts/settings.js
@@ -1,4 +1,6 @@
 /**
+ * Helper library for managing user and device specific settings
+ ** making use of localStorage and cookies as a fallback.
  * @class mw.mobileFrontend.settings
  * @singleton
  */
diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js
index 4b4d380..1e1cd82 100644
--- a/javascripts/specials/uploads.js
+++ b/javascripts/specials/uploads.js
@@ -13,6 +13,7 @@
UserGalleryApi, PhotoItem, PhotoList;
 
/**
+* API for retrieving gallery photos
 * @class UserGalleryApi
 * @extends Api
 */
@@ -67,6 +68,7 @@
} );
 
/**
+* Single photo item in gallery
 * @class PhotoItem
 * @extends View
 */
@@ -76,7 +78,9 @@
} );
 
/**
+* Creates a list of photo items
 * @class PhotoList
+* @uses UserGalleryApi
 * @extends View
 */
PhotoList = View.extend( {
diff --git a/javascripts/toast.js b/javascripts/toast.js
index 317d6c6..84dd528 100644
--- a/javascripts/toast.js
+++ b/javascripts/toast.js
@@ -10,9 +10,10 @@
className: 'toast position-fixed',
minHideDelay: 1000,
/**
+* Show the toast message with a given class and content
 * @method
-* @param {String} content
-* @param {String} className
+* @param {String} content Content to be placed in element
+* @param {String} className class to add to elemenet
 */
show: function ( content, className ) {
this.$el.
diff --git a/javascripts/user.js b/javascripts/user.js
index 3fe1616..aaf403b 100644
--- a/javascripts/user.js
+++ b/javascripts/user.js
@@ -2,6 +2,7 @@
var user;
 
/**
+* Utility library for looking up details on the current user
 * @class user
 * @singleton
*/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab9585daafd9c8fe4becd6e0f480b38fe8a5b293
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen 
Gerrit-R

[MediaWiki-commits] [Gerrit] Choose correct side for positioning - change (mediawiki...Wikibase)

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

Change subject: Choose correct side for positioning
..


Choose correct side for positioning

Bug: 72647
Change-Id: I9a9c62643af6dd29afdc1e195e6496e86c4ae048
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
index a3dc679..ae19b6d 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
@@ -243,11 +243,12 @@
 * @param {jQuery} $within
 */
function positionElementInOneLineWithAnother( $element, $target, 
$within ) {
+   var side = $( 'html' ).prop( 'dir' ) === 'ltr' ? 'left' : 
'right';
$element
.stop( ANIMATION_QUEUE, true, false ) // stop all queued 
animations, don't jump to end
.position( {
-   my: 'left top',
-   at: 'left top',
+   my: side + ' top',
+   at: side + ' top',
of: $target,
within: $within,
using: function( css, calc ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a9c62643af6dd29afdc1e195e6496e86c4ae048
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ebrahim 
Gerrit-Reviewer: Adrian Lang 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Choose correct side for positioning - change (mediawiki...Wikibase)

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

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

Change subject: Choose correct side for positioning
..

Choose correct side for positioning

fixes rtl display of statements

Bug: 72647
Change-Id: I9a9c62643af6dd29afdc1e195e6496e86c4ae048
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
index a3dc679..ae19b6d 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
@@ -243,11 +243,12 @@
 * @param {jQuery} $within
 */
function positionElementInOneLineWithAnother( $element, $target, 
$within ) {
+   var side = $( 'html' ).prop( 'dir' ) === 'ltr' ? 'left' : 
'right';
$element
.stop( ANIMATION_QUEUE, true, false ) // stop all queued 
animations, don't jump to end
.position( {
-   my: 'left top',
-   at: 'left top',
+   my: side + ' top',
+   at: side + ' top',
of: $target,
within: $within,
using: function( css, calc ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a9c62643af6dd29afdc1e195e6496e86c4ae048
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.25wmf5
Gerrit-Owner: Aude 
Gerrit-Reviewer: Ebrahim 

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


[MediaWiki-commits] [Gerrit] Convince jsduck mw.Title exists - change (mediawiki...VisualEditor)

2014-10-28 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Convince jsduck mw.Title exists
..

Convince jsduck mw.Title exists

Apparently we didn't have any functions taking or returning
an mw.Title object, which is kind of concerning. But now that
we're introducing one, we need jsduck to shut up about mw.Title
not existing.

Change-Id: I04028e0e3d55ed9901878cce593f857183246ab3
---
M .docs/categories.json
M .docs/external.js
M .docs/mw-categories.json
3 files changed, 28 insertions(+), 0 deletions(-)


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

diff --git a/.docs/categories.json b/.docs/categories.json
index cfc55f9..f4f88d3 100644
--- a/.docs/categories.json
+++ b/.docs/categories.json
@@ -18,6 +18,17 @@
]
},
{
+   "name": "Upstream",
+   "groups": [
+   {
+   "name": "MediaWiki",
+   "classes": [
+   "mw.Title"
+   ]
+   }
+   ]
+   },
+   {
"name": "VisualEditor (core)",
"groups": [
{
diff --git a/.docs/external.js b/.docs/external.js
index e9010af..006b1be 100644
--- a/.docs/external.js
+++ b/.docs/external.js
@@ -20,3 +20,9 @@
 /**
  * @property {string} [dateString=""] Formatted date or empty string
  */
+
+
+/**
+ * Provided by MediaWiki
+ * @class mw.Title
+ */
diff --git a/.docs/mw-categories.json b/.docs/mw-categories.json
index 89067d6..a246406 100644
--- a/.docs/mw-categories.json
+++ b/.docs/mw-categories.json
@@ -16,5 +16,16 @@
]
}
]
+   },
+   {
+   "name": "Upstream",
+   "groups": [
+   {
+   "name": "MediaWiki",
+   "classes": [
+   "mw.Title"
+   ]
+   }
+   ]
}
 ]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04028e0e3d55ed9901878cce593f857183246ab3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] add check for https://phabricator.wikimedia.org - change (operations/puppet)

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

Change subject: add check for https://phabricator.wikimedia.org
..


add check for https://phabricator.wikimedia.org

adds a custom check to monitor phab behind misc-web
using check_http with -S gives us certificate monitoring as
well. we ask misc-web-lb for a specific URL and we also
check for string "Wikimedia and MediaWiki" in there to make
sure we are not getting just a 200 with some other content

T957

Change-Id: Ie790fd2e3b607e927260288c1c1adfaf95be0fee
---
A modules/nagios_common/files/check_commands/phab.cfg
M modules/phabricator/manifests/monitoring.pp
2 files changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/modules/nagios_common/files/check_commands/phab.cfg 
b/modules/nagios_common/files/check_commands/phab.cfg
new file mode 100644
index 000..682fe3f
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/phab.cfg
@@ -0,0 +1,8 @@
+# custom command to check phabricator behind misc-web
+# using the -S should also give us cert expiry monitoring
+# we are also checking for string 'Wikimedia' to be in there
+# so it should trigger if 200 but shows something else
+define command{
+command_namecheck_https_phabricator
+command_line/usr/lib/nagios/plugins/check_http -S -H 
'phabricator.wikimedia.org' -I misc-web-lb.eqiad.wikimedia.org -u 
'https://phabricator.wikimedia.org/' -s 'Wikimedia and MediaWiki'
+}
diff --git a/modules/phabricator/manifests/monitoring.pp 
b/modules/phabricator/manifests/monitoring.pp
index 3f589fc..605459b 100644
--- a/modules/phabricator/manifests/monitoring.pp
+++ b/modules/phabricator/manifests/monitoring.pp
@@ -5,4 +5,9 @@
 nrpe_command => "/usr/lib/nagios/plugins/check_procs -w 10:30 -c 10:30 
--ereg-argument-array 'PhabricatorTaskmasterDaemon'",
 }
 
+monitor_service { 'phabricator-https':
+description   => 'https://phabricator.wikimedia.org',
+check_command => 'check_https_phabricator',
+}
+
 }

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

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

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


[MediaWiki-commits] [Gerrit] phab: add monitoring class, monitor TaskMaster - change (operations/puppet)

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

Change subject: phab: add monitoring class, monitor TaskMaster
..


phab: add monitoring class, monitor TaskMaster

add a monitoring class and include it

add process monitoring of PhabricatorTaskmasterDaemon

currently we have around 20 processes running that match this

setting it to warn/crit under 10 and over 30

also, want me to additionally monitor processes matching these?

"PhabricatorGarbageCollectorDaemon"
"PhabricatorRepositoryPullLocalDaemon"

T957

Change-Id: Ibde3f548c7de34c038346ed62abf213b5d9384c2
---
M manifests/role/phabricator.pp
A modules/phabricator/manifests/monitoring.pp
2 files changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Rush: 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/manifests/role/phabricator.pp b/manifests/role/phabricator.pp
index 13217fd..1245394 100644
--- a/manifests/role/phabricator.pp
+++ b/manifests/role/phabricator.pp
@@ -86,6 +86,8 @@
 include passwords::phabricator
 $emailbotcert = $passwords::phabricator::emailbot_cert
 
+include phabricator::monitoring
+
 class { '::phabricator::mailrelay':
 default   => { security => 'default'},
 address_routing   => { testproj => 'demoproject'},
diff --git a/modules/phabricator/manifests/monitoring.pp 
b/modules/phabricator/manifests/monitoring.pp
new file mode 100644
index 000..3f589fc
--- /dev/null
+++ b/modules/phabricator/manifests/monitoring.pp
@@ -0,0 +1,8 @@
+class phabricator::monitoring {
+
+nrpe::monitor_service { 'check_phab_taskmaster':
+description  => 'check if phabricator taskmaster is running',
+nrpe_command => "/usr/lib/nagios/plugins/check_procs -w 10:30 -c 10:30 
--ereg-argument-array 'PhabricatorTaskmasterDaemon'",
+}
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibde3f548c7de34c038346ed62abf213b5d9384c2
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: John F. Lewis 
Gerrit-Reviewer: Matanya 
Gerrit-Reviewer: Rush 
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] EditorApi: Check for sections - change (mediawiki...MobileFrontend)

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

Change subject: EditorApi: Check for sections
..


EditorApi: Check for sections

Don't try to access an undefined object.

Add tests for it.

Bug: 72521
Change-Id: I8b88bda22e2219cf65233fd6f0a6ee15444fac3d
---
M javascripts/modules/editor/EditorApi.js
M tests/qunit/modules/editor/test_EditorApi.js
2 files changed, 35 insertions(+), 1 deletion(-)

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



diff --git a/javascripts/modules/editor/EditorApi.js 
b/javascripts/modules/editor/EditorApi.js
index 5585797..a74b0a2 100644
--- a/javascripts/modules/editor/EditorApi.js
+++ b/javascripts/modules/editor/EditorApi.js
@@ -192,7 +192,8 @@
if ( resp && resp.parse && resp.parse.text ) {
// section 0 haven't a section name so 
skip
if ( self.sectionId !== 0 &&
-   resp.parse.sections &&
+   resp.parse.sections !== 
undefined &&
+   resp.parse.sections[0] !== 
undefined &&
resp.parse.sections[0].line !== 
undefined
) {
sectionLine = 
resp.parse.sections[0].line;
diff --git a/tests/qunit/modules/editor/test_EditorApi.js 
b/tests/qunit/modules/editor/test_EditorApi.js
index 4efc082..b10868f 100644
--- a/tests/qunit/modules/editor/test_EditorApi.js
+++ b/tests/qunit/modules/editor/test_EditorApi.js
@@ -373,6 +373,39 @@
assert.ok( doneSpy.calledWith( 'Heading 1Heading 
2test content' ) );
} );
 
+   QUnit.test( '#getPreview, check without sectionLine', 1, function( 
assert ) {
+   var editorApi = new EditorApi( { title: 'Test', sectionId: 1 } 
);
+   this.sandbox.stub( editorApi, 'post' ).returns( 
$.Deferred().resolve( {
+   "parse": {
+   "title": "test",
+   "text": { "*": "test content" },
+   "sections": {}
+   }
+   } ) );
+
+   editorApi.getPreview( { text: "test content" } ).done( 
function( text, sectionLine ) {
+   assert.strictEqual( sectionLine, '', 'Ok, no section 
line returned' );
+   } );
+   } );
+
+   QUnit.test( '#getPreview, check with sectionLine', 1, function( assert 
) {
+   var editorApi = new EditorApi( { title: 'Test', sectionId: 1 } 
);
+   this.sandbox.stub( editorApi, 'post' ).returns( 
$.Deferred().resolve( {
+   "parse": {
+   "title": "test",
+   "text": { "*": "test content" },
+   "sections": {
+   0: { "line": "Testsection" },
+   1: { "line": "Testsection2" }
+   }
+   }
+   } ) );
+
+   editorApi.getPreview( { text: "test content" } ).done( 
function( text, sectionLine ) {
+   assert.strictEqual( sectionLine, 'Testsection', 'Ok, 
section line returned' );
+   } );
+   } );
+
QUnit.test( '#save, when token has expired', 2, function( assert ) {
var editorApi = new EditorApi( { title: 'MediaWiki:Test.css' } 
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b88bda22e2219cf65233fd6f0a6ee15444fac3d
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Introduce WatchList class - change (mediawiki...MobileFrontend)

2014-10-28 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Introduce WatchList class
..

Introduce WatchList class

Introduce new class that extends PageList
Move logic over there.

Also:
* Fix event logging for Watchlist schema watch and unwatch actions.
* Correctly identify watchlist A-Z actions as being on watchlist page

Change-Id: I1839d19de55633f1a99f7bfd06a4e8e2ceaba93c
---
M includes/Resources.php
M javascripts/modules/PageList.js
A javascripts/modules/watchlist/Watchlist.js
M javascripts/modules/watchstar/Watchstar.js
M javascripts/specials/watchlist.js
5 files changed, 69 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/16/169616/1

diff --git a/includes/Resources.php b/includes/Resources.php
index bf4ac15..36fe297 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -1125,6 +1125,7 @@
'mobile.pagelist.scripts',
),
'scripts' => array(
+   'javascripts/modules/watchlist/Watchlist.js',
'javascripts/specials/watchlist.js',
),
),
diff --git a/javascripts/modules/PageList.js b/javascripts/modules/PageList.js
index 73afecd..7008bd1 100644
--- a/javascripts/modules/PageList.js
+++ b/javascripts/modules/PageList.js
@@ -21,6 +21,11 @@
enhance: false
},
/**
+* Whether all pages contained in the PageList are known to be 
watched
+* @type Boolean
+*/
+   isWatchList: false,
+   /**
 * Render page images for the existing page list. Assumes no 
page images have been loaded.
 * Only load when wgImagesDisabled has not been activated via 
Special:MobileOptions.
 *
@@ -68,15 +73,22 @@
if ( options.enhance ) {
this.template = false;
}
+   if ( options.isWatchList ) {
+   this.isWatchList = true;
+   }
 
this.api = new WatchstarApi( options );
View.prototype.initialize.apply( this, arguments );
},
template: M.template.get( 'modules/PageList.hogan' ),
-   postRender: function ( options ) {
-   View.prototype.postRender.apply( this, arguments );
-   var pages = [], $li = this.$( 'li' ),
+   postRender: function () {
+   var $li,
+   self = this,
+   pages = [],
api = this.api;
+
+   View.prototype.postRender.apply( this, arguments );
+   $li = this.$( 'li' );
 
// Check what we have in the page list
$li.each( function () {
@@ -85,21 +97,24 @@
 
// Create watch stars for each entry in list
if ( !user.isAnon() && pages.length > 0 ) {
-   api.load( pages, options.isWatchList ).done( 
function () {
+   api.load( pages, this.isWatchList ).done( 
function () {
$li.each( function () {
-   var page = new Page( {
-   // FIXME: Set sections 
so we don't hit the api (hacky)
-   sections: [],
-   title: $( this ).attr( 
'title' ),
-   id: $( this ).data( 
'id' )
-   } );
+   var watchstar,
+   page = new Page( {
+   // FIXME: Set 
sections so we don't hit the api (hacky)
+   sections: [],
+   title: $( this 
).attr( 'title' ),
+   id: $( this 
).data( 'id' )
+   } );
 
-   new Watchstar( {
+   watchstar = new Watchstar( {
isAnon: false,
isWatched: 
api.isWatchedPage( page ),
page: page,
   

[MediaWiki-commits] [Gerrit] Tools: Add lint task for grunt - change (mediawiki...MobileFrontend)

2014-10-28 Thread Jhernandez (Code Review)
Jhernandez has uploaded a new change for review.

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

Change subject: Tools: Add lint task for grunt
..

Tools: Add lint task for grunt

Try it with: (pretty useful for development)
grunt watch:lint

Change-Id: Ia0b20f7567df8c116ef5d0d880aedf992ffb19ec
---
M Gruntfile.js
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index ca8a850..597da8a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -40,6 +40,10 @@
}
},
watch: {
+   lint: {
+   files: [ '<%= files.js %>', '<%= files.jsTests 
%>' ],
+   tasks: [ 'lint' ]
+   },
scripts: {
files: [ '<%= files.js %>', '<%= files.jsTests 
%>' ],
tasks: [ 'test' ]
@@ -53,8 +57,9 @@
}
} );
 
+   grunt.registerTask( 'lint', [ 'jshint', 'jscs' ] );
// Jenkins automatically runs grunt test for us
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'qunit' ] );
+   grunt.registerTask( 'test', [ 'lint', 'qunit' ] );
grunt.registerTask( 'default', [ 'test' ] );
 
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0b20f7567df8c116ef5d0d880aedf992ffb19ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 

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


[MediaWiki-commits] [Gerrit] Tools: Add notifications to grunt - change (mediawiki...MobileFrontend)

2014-10-28 Thread Jhernandez (Code Review)
Jhernandez has uploaded a new change for review.

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

Change subject: Tools: Add notifications to grunt
..

Tools: Add notifications to grunt

Failed tasks will show notifications that they failed.

Pretty useful if you run `grunt watch:lint` or `grunt watch` in the background
to know that errors were found.

Change-Id: I214ccaa836459ac175e1afea0d16d24734567cd3
---
M Gruntfile.js
M package.json
2 files changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index 597da8a..c46c67f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -12,6 +12,7 @@
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
+   grunt.loadNpmTasks( 'grunt-notify' );
 
grunt.initConfig( {
URL: process.env.URL || 'http://127.0.0.1:8080/w/index.php/',
diff --git a/package.json b/package.json
index 73c3924..758b36d 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"grunt-contrib-jshint": "0.10.0",
"grunt-jscs": "0.8.1",
"js-beautify": "^1.5.4",
+   "grunt-notify": "^0.3.1",
"grunt-contrib-qunit": "^0.5.2",
"grunt-contrib-watch": "0.6.1"
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I214ccaa836459ac175e1afea0d16d24734567cd3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 

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


[MediaWiki-commits] [Gerrit] Hygiene: Grunt file code style - change (mediawiki...MobileFrontend)

2014-10-28 Thread Jhernandez (Code Review)
Jhernandez has uploaded a new change for review.

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

Change subject: Hygiene: Grunt file code style
..

Hygiene: Grunt file code style

Change-Id: Ibe75c4fe5f8273c5552fea65a694b87ac076ead1
---
M Gruntfile.js
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index 58ee11f..ca8a850 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,12 +10,12 @@
 
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jscs' );
-   grunt.loadNpmTasks('grunt-contrib-qunit');
-   grunt.loadNpmTasks('grunt-contrib-watch');
+   grunt.loadNpmTasks( 'grunt-contrib-qunit' );
+   grunt.loadNpmTasks( 'grunt-contrib-watch' );
 
grunt.initConfig( {
URL: process.env.URL || 'http://127.0.0.1:8080/w/index.php/',
-   QUNIT_FILTER: (process.env.QUNIT_FILTER && 
'&filter='+process.env.QUNIT_FILTER) || '',
+   QUNIT_FILTER: ( process.env.QUNIT_FILTER && '&filter=' + 
process.env.QUNIT_FILTER ) || '',
files: {
js: 'javascripts/**/*.js',
jsTests: 'tests/qunit/**/*.js'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe75c4fe5f8273c5552fea65a694b87ac076ead1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 

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


[MediaWiki-commits] [Gerrit] Only enable Extension:Oversight on enwiki - change (operations/mediawiki-config)

2014-10-28 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Only enable Extension:Oversight on enwiki
..

Only enable Extension:Oversight on enwiki

Bug: 60373
Change-Id: Iec374956cb957efa7afdccc88e926fae6d03a61f
---
M wmf-config/CommonSettings.php
1 file changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 5f389d2..b95b8fe 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1206,9 +1206,11 @@
}
 }
 
-require( "$IP/extensions/Oversight/HideRevision.php" );
-$wgGroupPermissions['oversight']['hiderevision'] = false;
-// $wgGroupPermissions['oversight']['oversight'] = true;
+if ( $wgDBname === 'enwiki' ) {
+   require( "$IP/extensions/Oversight/HideRevision.php" );
+   $wgGroupPermissions['oversight']['hiderevision'] = false;
+   // $wgGroupPermissions['oversight']['oversight'] = true;
+}
 
 if ( extension_loaded( 'wikidiff2' ) ) {
$wgExternalDiffEngine = 'wikidiff2';

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

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

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


[MediaWiki-commits] [Gerrit] Disable Extension:Oversight - change (operations/mediawiki-config)

2014-10-28 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Disable Extension:Oversight
..

Disable Extension:Oversight

Bug: 60373
Change-Id: I41a953d545533b890e305981302af4d5a6261ea9
---
M wmf-config/CommonSettings.php
M wmf-config/extension-list
2 files changed, 0 insertions(+), 7 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index b95b8fe..43b22ce 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1206,12 +1206,6 @@
}
 }
 
-if ( $wgDBname === 'enwiki' ) {
-   require( "$IP/extensions/Oversight/HideRevision.php" );
-   $wgGroupPermissions['oversight']['hiderevision'] = false;
-   // $wgGroupPermissions['oversight']['oversight'] = true;
-}
-
 if ( extension_loaded( 'wikidiff2' ) ) {
$wgExternalDiffEngine = 'wikidiff2';
 }
diff --git a/wmf-config/extension-list b/wmf-config/extension-list
index c52c636..ba6e360 100644
--- a/wmf-config/extension-list
+++ b/wmf-config/extension-list
@@ -81,7 +81,6 @@
 $IP/extensions/OAI/OAIRepo.php
 $IP/extensions/OAuth/OAuth.php
 $IP/extensions/OpenSearchXml/OpenSearchXml.php
-$IP/extensions/Oversight/HideRevision.php
 $IP/extensions/PagedTiffHandler/PagedTiffHandler.php
 $IP/extensions/PageImages/PageImages.php
 $IP/extensions/PageTriage/PageTriage.php

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

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

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


[MediaWiki-commits] [Gerrit] Parameterize adminscripts class - change (operations/puppet)

2014-10-28 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Parameterize adminscripts class
..


Parameterize adminscripts class

This should increase the chances of novaenv.sh working
places other than virt1000.

Change-Id: I2508ef070dd8bcab98f9e8b6d28b092a1177250d
---
M manifests/role/nova.pp
M modules/openstack/manifests/adminscripts.pp
M modules/openstack/templates/novaenv.sh.erb
3 files changed, 9 insertions(+), 4 deletions(-)

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



diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp
index b62e6d0..5c70dc4 100644
--- a/manifests/role/nova.pp
+++ b/manifests/role/nova.pp
@@ -284,7 +284,9 @@
 class { 'role::puppet::server::labs': }
 }
 
-include openstack::adminscripts
+class { 'openstack::adminscripts':
+novaconfig => $novaconfig
+}
 }
 
 class role::nova::api {
diff --git a/modules/openstack/manifests/adminscripts.pp 
b/modules/openstack/manifests/adminscripts.pp
index fa5696c..56d7d93 100644
--- a/modules/openstack/manifests/adminscripts.pp
+++ b/modules/openstack/manifests/adminscripts.pp
@@ -1,6 +1,9 @@
-class openstack::adminscripts {
+class openstack::adminscripts(
+$novaconfig) {
 include passwords::openstack::nova
 $wikitech_nova_ldap_user_pass = 
$passwords::openstack::nova::nova_ldap_user_pass
+$nova_controller_hostname = $novaconfig["controller_hostname"]
+$nova_region = $::site
 
 # Handy script to set up environment for commandline nova magic
 file { '/root/novaenv.sh':
diff --git a/modules/openstack/templates/novaenv.sh.erb 
b/modules/openstack/templates/novaenv.sh.erb
index 825c434..7adf2e1 100644
--- a/modules/openstack/templates/novaenv.sh.erb
+++ b/modules/openstack/templates/novaenv.sh.erb
@@ -1,6 +1,6 @@
 export OS_USERNAME="novaadmin"
 export OS_PASSWORD="<%= @wikitech_nova_ldap_user_pass %>"
-export OS_AUTH_URL="http://virt1000.wikimedia.org:35357/v2.0";
-export OS_REGION_NAME="eqiad"
+export OS_AUTH_URL="http://<%= @nova_controller_hostname %>:35357/v2.0"
+export OS_REGION_NAME="<%= @nova_region %>"
 export OS_TENANT_NAME="testlabs"
 export OS_NO_CACHE=1

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

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

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


[MediaWiki-commits] [Gerrit] Fixed RuboCop offense Style/PercentLiteralDelimiters - change (mediawiki...api)

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

Change subject: Fixed RuboCop offense Style/PercentLiteralDelimiters
..


Fixed RuboCop offense Style/PercentLiteralDelimiters

Bug: 63307
Change-Id: Ic2eaae2eabda80d28dde89d6036c20239430e546
---
M .rubocop_todo.yml
M mediawiki_api.gemspec
2 files changed, 2 insertions(+), 8 deletions(-)

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



diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 298dc3b..28e1734 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -42,12 +42,6 @@
 Style/Documentation:
   Enabled: false
 
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: PreferredDelimiters.
-Style/PercentLiteralDelimiters:
-  Enabled: false
-
 # Offense count: 1
 Style/RegexpLiteral:
   MaxSlashes: 0
diff --git a/mediawiki_api.gemspec b/mediawiki_api.gemspec
index 546b0ed..9064d35 100644
--- a/mediawiki_api.gemspec
+++ b/mediawiki_api.gemspec
@@ -8,8 +8,8 @@
   spec.version   = MediawikiApi::VERSION
   spec.authors   = ["Amir Aharoni", "Chris McMahon", "Dan Duvall", "Jeff 
Hall", "Juliusz Gonera", "Zeljko Filipin"]
   spec.email = ["amir.ahar...@mail.huji.ac.il", 
"cmcma...@wikimedia.org", "dduv...@wikimedia.org", "jh...@wikimedia.org", 
"jgon...@wikimedia.org", "zeljko.fili...@gmail.com"]
-  spec.summary   = %q{A library for interacting with MediaWiki API from 
Ruby.}
-  spec.description   = %q{Uses adapter-agnostic Faraday gem to talk to 
MediaWiki API.}
+  spec.summary   = %q(A library for interacting with MediaWiki API from 
Ruby.)
+  spec.description   = %q(Uses adapter-agnostic Faraday gem to talk to 
MediaWiki API.)
   spec.homepage  = "https://github.com/wikimedia/mediawiki-ruby-api";
   spec.license   = "GPL-2"
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2eaae2eabda80d28dde89d6036c20239430e546
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/ruby/api
Gerrit-Branch: master
Gerrit-Owner: Zfilipin 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Zfilipin 
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 for scrolling when TOC onscreen. - change (apps...wikipedia)

2014-10-28 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for scrolling when TOC onscreen.
..


Fix for scrolling when TOC onscreen.

Needed because we added doctype so no longer using "quirks" mode.
So we we need to specify "px" for spacer height now.

Change-Id: Iea4422fbdad723daffb0201c95211bede07fb8b8
---
M wikipedia/View Controllers/WebView/WebViewController.m
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index ea78b64..3ef3862 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1844,7 +1844,10 @@
 
 // This is important! Ensures bottom of web view article can be 
scrolled closer to the top of
 // the screen. Works in conjunction with "limitScrollUp:" method.
-[sectionTextArray addObject: [NSString stringWithFormat:@"", BOTTOM_SCROLL_LIMIT_HEIGHT]];
+// Note: had to add "px" to the height because we added "" to the top
+// of the index.html - it won't actually give the div height w/o 
this now (no longer
+// using quirks mode now that doctype specified).
+[sectionTextArray addObject: [NSString stringWithFormat:@"", 
BOTTOM_SCROLL_LIMIT_HEIGHT]];
 }
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea4422fbdad723daffb0201c95211bede07fb8b8
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Brion VIBBER 
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 for scrolling when TOC onscreen. - change (apps...wikipedia)

2014-10-28 Thread Mhurd (Code Review)
Mhurd has uploaded a new change for review.

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

Change subject: Fix for scrolling when TOC onscreen.
..

Fix for scrolling when TOC onscreen.

Needed because we added doctype so no longer using "quirks" mode.
So we we need to specify "px" for spacer height now.

Change-Id: Iea4422fbdad723daffb0201c95211bede07fb8b8
---
M wikipedia/View Controllers/WebView/WebViewController.m
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/10/169610/1

diff --git a/wikipedia/View Controllers/WebView/WebViewController.m 
b/wikipedia/View Controllers/WebView/WebViewController.m
index ea78b64..3ef3862 100644
--- a/wikipedia/View Controllers/WebView/WebViewController.m
+++ b/wikipedia/View Controllers/WebView/WebViewController.m
@@ -1844,7 +1844,10 @@
 
 // This is important! Ensures bottom of web view article can be 
scrolled closer to the top of
 // the screen. Works in conjunction with "limitScrollUp:" method.
-[sectionTextArray addObject: [NSString stringWithFormat:@"", BOTTOM_SCROLL_LIMIT_HEIGHT]];
+// Note: had to add "px" to the height because we added "" to the top
+// of the index.html - it won't actually give the div height w/o 
this now (no longer
+// using quirks mode now that doctype specified).
+[sectionTextArray addObject: [NSString stringWithFormat:@"", 
BOTTOM_SCROLL_LIMIT_HEIGHT]];
 }
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea4422fbdad723daffb0201c95211bede07fb8b8
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 

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


[MediaWiki-commits] [Gerrit] Fixed RuboCop offense Style/LeadingCommentSpace - change (mediawiki...api)

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

Change subject: Fixed RuboCop offense Style/LeadingCommentSpace
..


Fixed RuboCop offense Style/LeadingCommentSpace

Bug: 63307
Change-Id: I7ed8a0d559b7527ce5a3492878b32c2a4c32186f
---
M .rubocop_todo.yml
M Gemfile
2 files changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 34dcf06..298dc3b 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -44,11 +44,6 @@
 
 # Offense count: 2
 # Cop supports --auto-correct.
-Style/LeadingCommentSpace:
-  Enabled: false
-
-# Offense count: 2
-# Cop supports --auto-correct.
 # Configuration parameters: PreferredDelimiters.
 Style/PercentLiteralDelimiters:
   Enabled: false
diff --git a/Gemfile b/Gemfile
index 913c323..a44dd4e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,5 @@
-#ruby=ruby-2.1.2
-#ruby-gemset=mediawiki_api
+# ruby=ruby-2.1.2
+# ruby-gemset=mediawiki_api
 
 source "https://rubygems.org";
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ed8a0d559b7527ce5a3492878b32c2a4c32186f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/ruby/api
Gerrit-Branch: master
Gerrit-Owner: Zfilipin 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Choose right side for positioning - change (mediawiki...Wikibase)

2014-10-28 Thread Ebrahim (Code Review)
Ebrahim has uploaded a new change for review.

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

Change subject: Choose right side for positioning
..

Choose right side for positioning

Bug: 72648
Change-Id: I9a9c62643af6dd29afdc1e195e6496e86c4ae048
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
index a3dc679..ae19b6d 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
@@ -243,11 +243,12 @@
 * @param {jQuery} $within
 */
function positionElementInOneLineWithAnother( $element, $target, 
$within ) {
+   var side = $( 'html' ).prop( 'dir' ) === 'ltr' ? 'left' : 
'right';
$element
.stop( ANIMATION_QUEUE, true, false ) // stop all queued 
animations, don't jump to end
.position( {
-   my: 'left top',
-   at: 'left top',
+   my: side + ' top',
+   at: side + ' top',
of: $target,
within: $within,
using: function( css, calc ) {

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

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

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


[MediaWiki-commits] [Gerrit] Parameterize adminscripts class - change (operations/puppet)

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

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

Change subject: Parameterize adminscripts class
..

Parameterize adminscripts class

This should increase the chances of novaenv.sh working
places other than virt1000.

Change-Id: I2508ef070dd8bcab98f9e8b6d28b092a1177250d
---
M manifests/role/nova.pp
M modules/openstack/manifests/adminscripts.pp
M modules/openstack/templates/novaenv.sh.erb
3 files changed, 9 insertions(+), 4 deletions(-)


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

diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp
index b62e6d0..5c70dc4 100644
--- a/manifests/role/nova.pp
+++ b/manifests/role/nova.pp
@@ -284,7 +284,9 @@
 class { 'role::puppet::server::labs': }
 }
 
-include openstack::adminscripts
+class { 'openstack::adminscripts':
+novaconfig => $novaconfig
+}
 }
 
 class role::nova::api {
diff --git a/modules/openstack/manifests/adminscripts.pp 
b/modules/openstack/manifests/adminscripts.pp
index fa5696c..56d7d93 100644
--- a/modules/openstack/manifests/adminscripts.pp
+++ b/modules/openstack/manifests/adminscripts.pp
@@ -1,6 +1,9 @@
-class openstack::adminscripts {
+class openstack::adminscripts(
+$novaconfig) {
 include passwords::openstack::nova
 $wikitech_nova_ldap_user_pass = 
$passwords::openstack::nova::nova_ldap_user_pass
+$nova_controller_hostname = $novaconfig["controller_hostname"]
+$nova_region = $::site
 
 # Handy script to set up environment for commandline nova magic
 file { '/root/novaenv.sh':
diff --git a/modules/openstack/templates/novaenv.sh.erb 
b/modules/openstack/templates/novaenv.sh.erb
index 825c434..7adf2e1 100644
--- a/modules/openstack/templates/novaenv.sh.erb
+++ b/modules/openstack/templates/novaenv.sh.erb
@@ -1,6 +1,6 @@
 export OS_USERNAME="novaadmin"
 export OS_PASSWORD="<%= @wikitech_nova_ldap_user_pass %>"
-export OS_AUTH_URL="http://virt1000.wikimedia.org:35357/v2.0";
-export OS_REGION_NAME="eqiad"
+export OS_AUTH_URL="http://<%= @nova_controller_hostname %>:35357/v2.0"
+export OS_REGION_NAME="<%= @nova_region %>"
 export OS_TENANT_NAME="testlabs"
 export OS_NO_CACHE=1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2508ef070dd8bcab98f9e8b6d28b092a1177250d
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] Minor changes for labs testing - change (operations/puppet)

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

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

Change subject: Minor changes for labs testing
..

Minor changes for labs testing

Change-Id: I8bcdb15da1a0ecb30d9350d2e9b8616556576f54
---
M manifests/role/nova.pp
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp
index 5c70dc4..6ab881a 100644
--- a/manifests/role/nova.pp
+++ b/manifests/role/nova.pp
@@ -160,7 +160,10 @@
 class { 'openstack::common':
 openstack_version=> $openstack_version,
 novaconfig   => $novaconfig,
-instance_status_wiki_host=> 'wikitech.wikimedia.org',
+instance_status_wiki_host=> $::realm ? {
+'production' => 'wikitech.wikimedia.org',
+'labs'   => $::osm_hostname,
+},
 instance_status_wiki_domain  => 'labs',
 instance_status_wiki_page_prefix => 'Nova_Resource:',
 instance_status_wiki_region  => $::site,
@@ -209,6 +212,7 @@
 
 include role::keystone::config::eqiad
 include role::glance::config::eqiad
+include role::nova::wikiupdates
 
 if $::realm == 'labs' and $::openstack_site_override != undef {
 $glanceconfig = $::openstack_site_override ? {
@@ -313,6 +317,7 @@
 $novaconfig = $role::nova::config::novaconfig
 
 include role::nova::common
+include role::nova::wikiupdates
 
 if ($::realm == production) {
 $site_address = $::site ? {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bcdb15da1a0ecb30d9350d2e9b8616556576f54
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] Restore the more button to the watchlist - change (mediawiki...MobileFrontend)

2014-10-28 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Restore the more button to the watchlist
..

Restore the more button to the watchlist

Bug: 71961
Change-Id: I4fd83e9cbad2326f9b6d47567638d35c75ecebb8
---
M includes/specials/SpecialMobileEditWatchlist.php
1 file changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/06/169606/1

diff --git a/includes/specials/SpecialMobileEditWatchlist.php 
b/includes/specials/SpecialMobileEditWatchlist.php
index 4b5c93d..4b41464 100644
--- a/includes/specials/SpecialMobileEditWatchlist.php
+++ b/includes/specials/SpecialMobileEditWatchlist.php
@@ -4,6 +4,15 @@
  */
 
 class SpecialMobileEditWatchlist extends SpecialEditWatchlist {
+   /**
+* Construct function
+*/
+   public function __construct() {
+   $req = $this->getRequest();
+   $this->offset = $req->getVal( 'offset', 0 );
+   parent::__construct( 'EditWatchlist' );
+   }
+
protected function outputSubtitle() {
$user = $this->getUser();
$this->getOutput()->addHtml( 
SpecialMobileWatchlist::getWatchlistHeader( $user ) );
@@ -75,6 +84,9 @@
foreach ( $watchlist as $ns => $pages ) {
if ( $ns === NS_MAIN ) {
$html .= '';
+   $total = count( $pages );
+   $pages = array_slice( $pages, $this->offset, 
SpecialMobileWatchlist::LIMIT );
+
foreach ( array_keys( $pages ) as $dbkey ) {
$title = Title::makeTitleSafe( $ns, 
$dbkey );
$thumb = '';
@@ -91,8 +103,19 @@
$html .= '';
}
}
+   $newOffset = $this->offset + SpecialMobileWatchlist::LIMIT;
+
if ( $total === 0 ) {
$html .= SpecialMobileWatchlist::getEmptyListHtml( 
false, $this->getLanguage() );
+   } else if ( $total  > $newOffset ) {
+   // show button if there are more to show
+   $qs = array( 'offset' => $newOffset );
+   $html .= Html::element( 'a',
+   array(
+   'class' => 'mw-ui-anchor 
mw-ui-progressive more',
+   'href' => SpecialPage::getTitleFor( 
'EditWatchlist' )->getLocalURL( $qs ),
+   ),
+   $this->msg( 'mobile-frontend-watchlist-more' ) 
);
}
$out = $this->getOutput();
$out->addHtml( $html );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fd83e9cbad2326f9b6d47567638d35c75ecebb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] Added custom RuboCop check for Style/DotPosition - change (mediawiki...api)

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

Change subject: Added custom RuboCop check for Style/DotPosition
..


Added custom RuboCop check for Style/DotPosition

Adopting trailing dot position as it's already used within the project.

Bug: 63307
Change-Id: Ib7de913fba73a676f14fc3b0b54a01f5c93e7ecc
---
M .rubocop.yml
M .rubocop_todo.yml
2 files changed, 4 insertions(+), 6 deletions(-)

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



diff --git a/.rubocop.yml b/.rubocop.yml
index cc32da4..7dc14a1 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1 +1,5 @@
 inherit_from: .rubocop_todo.yml
+
+Syle/DotPosition:
+  Enabled: true
+  EnforcedStyle: trailing
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 6e29d00..34dcf06 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -42,12 +42,6 @@
 Style/Documentation:
   Enabled: false
 
-# Offense count: 30
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/DotPosition:
-  Enabled: false
-
 # Offense count: 2
 # Cop supports --auto-correct.
 Style/LeadingCommentSpace:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7de913fba73a676f14fc3b0b54a01f5c93e7ecc
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/ruby/api
Gerrit-Branch: master
Gerrit-Owner: Zfilipin 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Zfilipin 
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 row arguments - change (phabricator...Sprint)

2014-10-28 Thread Christopher Johnson (WMDE) (Code Review)
Christopher Johnson (WMDE) has submitted this change and it was merged.

Change subject: fix row arguments
..


fix row arguments

Change-Id: Ibad189b45c0cd379ea61ae4a78d0c8a094159e37
---
M src/view/BurndownDataView.php
M src/view/SprintReportBurndownView.php
M src/view/SprintReportOpenTasksView.php
3 files changed, 8 insertions(+), 35 deletions(-)

Approvals:
  Christopher Johnson (WMDE): Verified; Looks good to me, approved



diff --git a/src/view/BurndownDataView.php b/src/view/BurndownDataView.php
index ac8817b..d083cf2 100644
--- a/src/view/BurndownDataView.php
+++ b/src/view/BurndownDataView.php
@@ -6,17 +6,6 @@
 
 final class BurndownDataView extends SprintView {
 
-  // Array of BurndownDataDates
-  // There are two special keys, 'before' and 'after'
-  //
-  // Looks like: array(
-  //   'before' => BurndownDataDate
-  //   'Tue Jun 3' => BurndownDataDate
-  //   'Wed Jun 4' => BurndownDataDate
-  //   ...
-  //   'after' => BurndownDataDate
-  // )
-
   private $dates;
   private $data;
// Project associated with this burndown.
@@ -39,7 +28,6 @@
   }
 
   public function render() {
-
 $chart = $this->buildC3Chart();
 $tasks_table = $this->buildTasksTable();
 $burndown_table = $this->buildBurnDownTable();
@@ -48,7 +36,6 @@
   }
 
   private function buildChartDataSet() {
-
 $query = id(new SprintQuery())
  ->setProject($this->project)
  ->setViewer($this->viewer);
@@ -119,7 +106,6 @@
 
   // Now loop through the events and build the data for each day
   private function buildDailyData($events, $start, $end) {
-
 foreach ($events as $event) {
 
   $xaction = $this->xactions[$event['transactionPHID']];
@@ -240,7 +226,6 @@
   }
 
private function changePoints($date, $task_phid, $xaction) {
-
  $this->task_points[$task_phid] = $xaction->getNewValue();
 
  // Only make changes if the task is in the sprint
@@ -296,7 +281,7 @@
*
* @returns PHUIObjectBoxView
*/
-  public function buildBurnDownTable() {
+  private function buildBurnDownTable() {
 $data = array();
 $stats = id(new SprintBuildStats());
 $stats->sumSprintStats($this->dates);
@@ -337,8 +322,7 @@
*
* @returns PHUIObjectBoxView
*/
-  public function buildTasksTable() {
-
+  private function buildTasksTable() {
 $rows = $this->buildTasksTree();
 
 $table = id(new AphrontTableView($rows))
@@ -481,7 +465,7 @@
*
* @returns PHUIObjectBoxView
*/
-  public function buildEventTable() {
+  private function buildEventTable() {
 $query = id(new SprintQuery())
 ->setProject($this->project)
 ->setViewer($this->viewer);
diff --git a/src/view/SprintReportBurndownView.php 
b/src/view/SprintReportBurndownView.php
index 8dc929e..51b3415 100644
--- a/src/view/SprintReportBurndownView.php
+++ b/src/view/SprintReportBurndownView.php
@@ -16,7 +16,6 @@
   }
 
   public function render() {
-
 $filter = $this->BuildFilter();
 $chart = $this->buildBurnDownChart();
 $table = $this->buildStatsTable();
@@ -51,7 +50,6 @@
   }
 
   private function getProjectHandle($phids,$project_phid) {
-
 $query = id(new SprintQuery())
 ->setPHID($project_phid);
 
@@ -91,7 +89,6 @@
  }
 
   private function buildStatsfromEvents ($data) {
-
$stats = array();
$data = $this->addTaskStatustoData ($data);
 
@@ -127,8 +124,7 @@
 return $day_buckets;
   }
 
-  private function buildBucket($epoch, $format)
-  {
+  private function buildBucket($epoch, $format) {
 $bucket = phabricator_format_local_time(
 $epoch,
 $this->user,
@@ -198,7 +194,6 @@
   }
 
   private function renderCaption ($handle) {
-
   $inst = pht(
   'NOTE: This table reflects tasks currently in ' .
   'the project. If a task was opened in the past but added to ' .
@@ -211,8 +206,8 @@
return array ($caption, $header);
   }
 
-  private function formatStatsTableHeaders($week, $month, $period) {
-if ($week) {
+  private function formatStatsTableHeaders($week, $month, $period, 
$rows,$rowc) {
+ if ($week) {
   $rows[] = $this->formatBurnRow(
   pht('Week To Date'),
   $week);
@@ -235,8 +230,8 @@
 $rowc = array_reverse($rowc);
   return array ($rows, $rowc);
   }
-  private function buildStatsTable() {
 
+  private function buildStatsTable() {
 $handle = null;
 $project_phid = $this->request->getStr('project');
 
@@ -252,7 +247,7 @@
 
 list ($rows,$rowc, $week, $month, $period) = $this->formatBucketRows 
($stats, $day_buckets);
 list ($rows, $rowc) = $this->formatStatsTableHeaders($week, $month, 
$period, $rows,$rowc);
-
+
 $table = $this->StatsTableView($rows, $rowc);
 
   if ($handle) {
diff --git a/src/view/SprintReportOpenTasksView.php 
b/src/view/SprintReportOpenTasksView.php
index c2e0342..e7dfe31 100644
--- a/src/view/SprintReportOpenTasksView.php
+++ b/src/view/SprintReportOpenTasksView.php
@@ -3

  1   2   3   4   5   >