[MediaWiki-commits] [Gerrit] Use echowikis.dblist for the Echo cron job - change (operations/puppet)

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

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


Change subject: Use echowikis.dblist for the Echo cron job
..

Use echowikis.dblist for the Echo cron job

Change-Id: Ife258de8e6b98838d40ee648b87c3a034af738dc
---
M manifests/misc/maintenance.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 266ab41..712dba3 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -157,7 +157,7 @@
 class misc::maintenance::echo_mail_batch( $enabled = inline_template(%= 
$::site == $::primary_site  %) ) {
cron {
echo_mail_batch:
-   command = /usr/local/bin/mwscript 
extensions/Echo/processEchoEmailBatch.php testwiki,
+   command = /usr/local/bin/foreachwikiindblist 
/usr/local/apache/common/echowikis.dblist 
extensions/Echo/processEchoEmailBatch.php,
user = apache,
minute = 0,
hour = 0,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife258de8e6b98838d40ee648b87c3a034af738dc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Catrope roan.katt...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix linkItem widget for articles with an item - change (mediawiki...Wikibase)

2013-04-22 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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


Change subject: Fix linkItem widget for articles with an item
..

Fix linkItem widget for articles with an item

Change-Id: I766ec9eb5c82dd570fbd88626c5201b5fb88390c
---
M client/resources/wikibase.client.linkitem.init.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/client/resources/wikibase.client.linkitem.init.js 
b/client/resources/wikibase.client.linkitem.init.js
index 093918e..5fd3470 100644
--- a/client/resources/wikibase.client.linkitem.init.js
+++ b/client/resources/wikibase.client.linkitem.init.js
@@ -35,7 +35,7 @@
 * Displays the link which opens the dialog (using 
jquery.wikibase.linkitem)
 */
$( document ).ready( function() {
-   $( '#wbc-linkToItem' )
+   $( '.wbc-editpage' ).eq(0)
.empty()
.append(
$( 'a' )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I766ec9eb5c82dd570fbd88626c5201b5fb88390c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de

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


[MediaWiki-commits] [Gerrit] Updates to migrateAccount. - change (mediawiki...CentralAuth)

2013-04-22 Thread Pgehres (Code Review)
Pgehres has uploaded a new change for review.

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


Change subject: Updates to migrateAccount.
..

Updates to migrateAccount.

Adding the ability to attach matching local accounts to a global account,
the abilty to merge a number of local accounts if the email addresses
match and are confirmed, and also some preparation for the next steps.

Change-Id: I71ee8b635051b8c7a7176bbba1b5a30d27ffea98
---
M maintenance/migrateAccount.php
1 file changed, 71 insertions(+), 33 deletions(-)


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

diff --git a/maintenance/migrateAccount.php b/maintenance/migrateAccount.php
index 5041e97..aea2001 100644
--- a/maintenance/migrateAccount.php
+++ b/maintenance/migrateAccount.php
@@ -26,6 +26,7 @@
$this-addOption( 'userlist', 'List of usernames to migrate', 
false, true );
$this-addOption( 'username', 'The user name to migrate', 
false, true, 'u' );
$this-addOption( 'safe', 'Only migrates accounts with one 
instance of the username across all wikis', false, false );
+   $this-addOption( 'attachmissing', 'Attach matching local 
accounts to global account', false, false );
}
 
public function execute() {
@@ -73,46 +74,83 @@
$this-total++;
$this-output( CentralAuth account migration for:  . 
$username . \n);
 
-   $globalusers = $this-dbBackground-select(
-   'globaluser',
-   array( 'gu_name' ),
-   array( 'gu_name' = $username ),
-   __METHOD__
-   );
+   $central = new CentralAuthUser( $username );
 
-   if ( $globalusers-numRows()  0 ) {
-   $this-output( ERROR: A global account already exists 
for: $username\n );
-   return false;
-   }
-
-   $localusers = $this-dbBackground-select(
-   'localnames',
-   array( 'ln_name', 'ln_wiki' ),
-   array( 'ln_name' = $username ),
-   __METHOD__
-   );
-
-   if ( $localusers-numRows() == 0 ) {
-   $this-output( ERROR: No local accounts found for: 
$username\n );
-   return false;
-   }
-
-   if ( $this-safe ) {
-   if ( $localusers-numRows() !== 1 ) {
-   $this-output( ERROR: More than 1 local user 
account found for username: $username\n );
-   foreach( $localusers as $row ) {
-   $this-output( \t . $row-ln_name . 
@ . $row-ln_wiki . \n );
+   /**
+* Migration with an existing global account
+*/
+   if ( $central-exists() ) {
+   if (
+   $this-getOption( 'attachmissing', false )
+!is_null( 
$central-getEmailAuthenticationTimestamp() )
+   ){
+   $unattached = $central-queryUnattached();
+   foreach ( $unattached as $wiki = $local ) {
+   if (
+   $central-getEmail() == 
$local['email']
+!is_null( 
$local['emailAuthenticated'] )
+   ){
+   $this-output( ATTACHING: 
$username@$wiki\n );
+   $central-attach( $wiki, 'mail' 
);
+   $this-migrated++;
+   }
}
+   return true;
+   } else {
+   $this-output( ERROR: A global account already 
exists for: $username\n );
return false;
}
}
+   /**
+* Migration without an existing global account
+*/
+   else {
+   $unattached = $central-queryUnattached();
 
-   $central = new CentralAuthUser( $username );
-   if ( $central-storeAndMigrate() ) {
-   $this-migrated++;
-   return true;
+   if ( count( $unattached ) == 0 ) {
+   $this-output( ERROR: No local accounts found 
for: $username\n );
+   return false;
+   }
+
+   if ( $this-safe ) {
+   if ( count( $unattached ) !== 1 ) {
+   

[MediaWiki-commits] [Gerrit] move a civi class into wmf_civicrm - change (wikimedia...crm)

2013-04-22 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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


Change subject: move a civi class into wmf_civicrm
..

move a civi class into wmf_civicrm

Change-Id: Id1496b5fde439005aff254f25b417040fd9050ac
---
M sites/all/modules/thank_you/thank_you.info
R sites/all/modules/wmf_common/wmf_civicrm/civicrm_api_check.inc
M sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
M sites/all/modules/wmf_common/wmf_common.module
4 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/06/60306/1

diff --git a/sites/all/modules/thank_you/thank_you.info 
b/sites/all/modules/thank_you/thank_you.info
index f34bc79..f58a44a 100644
--- a/sites/all/modules/thank_you/thank_you.info
+++ b/sites/all/modules/thank_you/thank_you.info
@@ -2,5 +2,6 @@
 description = Automatically emails thank you notes to contributors.
 core = 7.x
 dependencies[] = wmf_common
+dependencies[] = wmf_civicrm
 package = Wikimedia
 configure = admin/config/thank_you
diff --git a/sites/all/modules/wmf_common/civicrm_api_check.php 
b/sites/all/modules/wmf_common/wmf_civicrm/civicrm_api_check.inc
similarity index 100%
rename from sites/all/modules/wmf_common/civicrm_api_check.php
rename to sites/all/modules/wmf_common/wmf_civicrm/civicrm_api_check.inc
old mode 100755
new mode 100644
diff --git a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
index a967853..6264268 100644
--- a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
@@ -3,6 +3,7 @@
 require_once 'db_switcher.inc';
 require_once 'recurring.inc';
 require_once 'tracking.inc';
+require_once 'civicrm_api_check.inc';
 
 /**
  * return a map of option value (id) = option name
diff --git a/sites/all/modules/wmf_common/wmf_common.module 
b/sites/all/modules/wmf_common/wmf_common.module
index dca9588..395c786 100644
--- a/sites/all/modules/wmf_common/wmf_common.module
+++ b/sites/all/modules/wmf_common/wmf_common.module
@@ -1,6 +1,5 @@
 ?php
 
-require_once 'civicrm_api_check.php';
 require_once 'errors.inc';
 require_once 'failmail.php';
 require_once 'queue.php';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1496b5fde439005aff254f25b417040fd9050ac
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Adamw awi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Be more consistent with errors in TemplateRequest. - change (mediawiki...Parsoid)

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

Change subject: Be more consistent with errors in TemplateRequest.
..


Be more consistent with errors in TemplateRequest.

If the 'error' parameter for the callback is non-null, ensure that the
src parameter is null.

Change-Id: I5b9105ebbf77d6a2030e955e9df46e33f6571814
---
M js/lib/mediawiki.ApiRequest.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/js/lib/mediawiki.ApiRequest.js b/js/lib/mediawiki.ApiRequest.js
index f156db6..c507db9 100644
--- a/js/lib/mediawiki.ApiRequest.js
+++ b/js/lib/mediawiki.ApiRequest.js
@@ -219,7 +219,7 @@
var metadata = { title: self.title };
 
if ( error ) {
-   this._processListeners( error, '' );
+   this._processListeners( error, null );
return;
}
 
@@ -241,7 +241,7 @@
self.title +
' can be found at a different location: 
'
+ location );
-   this._processListeners( err, '' );
+   this._processListeners( err, null );
return;
}
console.log( data );
@@ -298,7 +298,7 @@
// (both original title as well as possible redirected title)
this.env.pageCache[this.queueKey] = this.env.pageCache[this.title] = 
src;
 
-   this._processListeners( error, metadata );
+   this._processListeners( error, error ? null : metadata );
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b9105ebbf77d6a2030e955e9df46e33f6571814
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott wikime...@cscott.net
Gerrit-Reviewer: Cscott wikime...@cscott.net
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] deduplicate transcode jobs - change (mediawiki...TimedMediaHandler)

2013-04-22 Thread Aaron Schulz (Code Review)
Aaron Schulz has submitted this change and it was merged.

Change subject: deduplicate transcode jobs
..


deduplicate transcode jobs

deduplicate transcode jobs on title/key and
add maintenance script to resubmit
unprocessed transcode jobs

Change-Id: Ibb4f7fff37cefaa784a9d5577fa31db034363d81
---
M WebVideoTranscode/WebVideoTranscode.php
M WebVideoTranscode/WebVideoTranscodeJob.php
A maintenance/resetTranscodes.php
3 files changed, 42 insertions(+), 8 deletions(-)

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



diff --git a/WebVideoTranscode/WebVideoTranscode.php 
b/WebVideoTranscode/WebVideoTranscode.php
index 26ae494..472601c 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -614,14 +614,6 @@
// Remove the db entries
$dbw-delete( 'transcode', $deleteWhere, __METHOD__ );
 
-   // also remove assoicated jobs ( will be re-added on page view, 
or reset job request )
-   $deleteJobsWhere = array(
-   'job_cmd' = 'webVideoTranscode',
-   'job_title' = $file-getTitle()-getDBkey()
-   );
-   // Remove jobs db entries
-   $dbw-delete( 'job', $deleteJobsWhere, __METHOD__ );
-
// Purge the cache for pages that include this video:
self::invalidatePagesWithFile( $file-getTitle() );
 
diff --git a/WebVideoTranscode/WebVideoTranscodeJob.php 
b/WebVideoTranscode/WebVideoTranscodeJob.php
index bc35747..d7c7773 100644
--- a/WebVideoTranscode/WebVideoTranscodeJob.php
+++ b/WebVideoTranscode/WebVideoTranscodeJob.php
@@ -27,6 +27,7 @@
 
public function __construct( $title, $params, $id = 0 ) {
parent::__construct( 'webVideoTranscode', $title, $params, $id 
);
+   $this-removeDuplicates = true;
}
 
/**
diff --git a/maintenance/resetTranscodes.php b/maintenance/resetTranscodes.php
new file mode 100644
index 000..ca3493e
--- /dev/null
+++ b/maintenance/resetTranscodes.php
@@ -0,0 +1,41 @@
+?php
+/**
+ * reset stalled transcodes
+ *
+ */
+$IP = getenv( 'MW_INSTALL_PATH' );
+if ( $IP === false ) {
+   $IP = dirname( __FILE__ ) . '/../../..';
+}
+require_once( $IP/maintenance/Maintenance.php );
+
+class ResetTranscodes extends Maintenance {
+
+   public function __construct() {
+   parent::__construct();
+   $this-mDescription = Reset stalled transcodes, that are no 
longer in the job queue.;
+   }
+   public function execute() {
+   global $wgEnabledTranscodeSet;
+   $where = array(
+   transcode_time_startwork = NULL,
+   transcode_time_error = NULL
+   );
+   $dbr = wfGetDB( DB_SLAVE );
+   $res = $dbr-select( 'transcode', '*', $where, __METHOD__ );
+   foreach ( $res as $row ) {
+   $title = Title::newFromText( 
$row-transcode_image_name, NS_FILE );
+   // re-insert WebVideoTranscodeJob,
+   // will only be added if not in queue
+   // due to deduplication
+   $job = new WebVideoTranscodeJob( $title, array(
+   'transcodeMode' = 'derivative',
+   'transcodeKey' = $row-transcode_key,
+   ) );
+   $job-insert();
+   }
+   }
+}
+
+$maintClass = 'ResetTranscodes'; // Tells it to run the class
+require_once( RUN_MAINTENANCE_IF_MAIN );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb4f7fff37cefaa784a9d5577fa31db034363d81
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: J jger...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Avoid use of __METHOD__ in closure. - change (mediawiki/core)

2013-04-22 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Avoid use of __METHOD__ in closure.
..

Avoid use of __METHOD__ in closure.

Change-Id: Ib25063f41cc25647003442cbd5851c3b777b2a7a
---
M includes/User.php
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/includes/User.php b/includes/User.php
index e911cb0..cb5ad7a 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -1974,7 +1974,8 @@
$dbw = wfGetDB( DB_MASTER );
$userid = $this-mId;
$touched = $this-mTouched;
-   $dbw-onTransactionIdle( function() use ( $dbw, 
$userid, $touched ) {
+   $method = __METHOD__;
+   $dbw-onTransactionIdle( function() use ( $dbw, 
$userid, $touched, $method ) {
// Prevent contention slams by checking 
user_touched first
$encTouched = $dbw-addQuotes( $dbw-timestamp( 
$touched ) );
$needsPurge = $dbw-selectField( 'user', '1',
@@ -1983,7 +1984,7 @@
$dbw-update( 'user',
array( 'user_touched' = 
$dbw-timestamp( $touched ) ),
array( 'user_id' = $userid, 
'user_touched  ' . $encTouched ),
-   __METHOD__
+   $method
);
}
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib25063f41cc25647003442cbd5851c3b777b2a7a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] test: abstract parser test result - change (mediawiki/core)

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

Change subject: test: abstract parser test result
..


test: abstract parser test result

This patch introduce the new ParserTestResult class which is meant to
represent the result of a parser test.  I have refactored some methods
to take advantage of this new class.

It just hold the test description and the actual/expected parser output.
A short isSuccess() method is provided for convenience, we can later
improve the class to carry more methods.

Change-Id: Ifb86e09451875dc119633b52d3f7e4f47c67cc60
---
M tests/TestsAutoLoader.php
A tests/parser/ParserTestResult.php
M tests/parser/parserTest.inc
3 files changed, 67 insertions(+), 16 deletions(-)

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



diff --git a/tests/TestsAutoLoader.php b/tests/TestsAutoLoader.php
index 264ba69..363d0a2 100644
--- a/tests/TestsAutoLoader.php
+++ b/tests/TestsAutoLoader.php
@@ -30,6 +30,7 @@
'DbTestPreviewer' = $testDir/testHelpers.inc,
'DbTestRecorder' = $testDir/testHelpers.inc,
'DelayedParserTest' = $testDir/testHelpers.inc,
+   'ParserTestResult' = $testDir/parser/ParserTestResult.php,
'TestFileIterator' = $testDir/testHelpers.inc,
'TestRecorder' = $testDir/testHelpers.inc,
 
diff --git a/tests/parser/ParserTestResult.php 
b/tests/parser/ParserTestResult.php
new file mode 100644
index 000..e846da5
--- /dev/null
+++ b/tests/parser/ParserTestResult.php
@@ -0,0 +1,42 @@
+?php
+/**
+ * @copyright Copyright © 2013, Antoine Musso
+ * @copyright Copyright © 2013, Wikimedia Foundation Inc.
+ * @license GNU GPL v2
+ *
+ * @file
+ */
+
+/**
+ * Represent the result of a parser test.
+ *
+ * @since 1.22
+ */
+class ParserTestResult {
+   /**
+* Description of the parser test.
+*
+* This is usually the text used to describe a parser test in the .txt
+* files.  It is initialized on a construction and you most probably
+* never want to change it.
+*/
+   public $description;
+   /** Text that was expected */
+   public $expected;
+   /** Actual text rendered */
+   public $actual;
+
+   /**
+* @param $description string A short text describing the parser test
+*usually the text in the parser test .txt file.  The 
description
+*is later available using the property $description.
+*/
+   public function __construct( $description ) {
+   $this-description = $description;
+   }
+
+   /** Whether the test passed */
+   public function isSuccess() {
+   return ($this-expected === $this-actual);
+   }
+}
diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index ce621f4..526a6d6 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -518,18 +518,23 @@
}
 
$this-teardownGlobals();
-   return $this-showTestResult( $desc, $result, $out );
+
+   $testResult = new ParserTestResult( $desc );
+   $testResult-expected = $result;
+   $testResult-actual = $out;
+
+   return $this-showTestResult( $testResult );
}
 
/**
-*
+* Refactored in 1.22 to use ParserTestResult
 */
-   function showTestResult( $desc, $result, $out ) {
-   if ( $result === $out ) {
-   $this-showSuccess( $desc );
+   function showTestResult( ParserTestResult $testResult ) {
+   if ( $testResult-isSuccess() ) {
+   $this-showSuccess( $testResult );
return true;
} else {
-   $this-showFailure( $desc, $result, $out );
+   $this-showFailure( $testResult );
return false;
}
}
@@ -1070,10 +1075,12 @@
/**
 * Print a happy success message.
 *
-* @param $desc String: the test name
+* Refactored in 1.22 to use ParserTestResult
+*
+* @param $testResult ParserTestResult
 * @return Boolean
 */
-   protected function showSuccess( $desc ) {
+   protected function showSuccess( ParserTestResult $testResult ) {
if ( $this-showProgress ) {
print $this-term-color( '1;32' ) . 'PASSED' . 
$this-term-reset() . \n;
}
@@ -1085,28 +1092,29 @@
 * Print a failure message and provide some explanatory output
 * about what went wrong if so configured.
 *
-* @param $desc String: the test name
-* @param $result String: expected HTML output
-* @param $html String: actual HTML output
+* Refactored in 1.22 to use ParserTestResult
+*
+* @param $testResult ParserTestResult
 * 

[MediaWiki-commits] [Gerrit] Suppress jshint warnings on fakequery.js. - change (mediawiki...Parsoid)

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

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


Change subject: Suppress jshint warnings on fakequery.js.
..

Suppress jshint warnings on fakequery.js.

Change-Id: Ia04ebcb545f64c5c95ecea8c65a71a07a933e502
---
M .jshintrc
M js/lib/fakejquery.js
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/.jshintrc b/.jshintrc
index 9e6e612..92bf409 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -22,9 +22,7 @@
smarttabs: true,
multistr: true,
 
-   browser: true,
node: true,
-   jquery: true,
 
nomen: false
//onevar: true
diff --git a/js/lib/fakejquery.js b/js/lib/fakejquery.js
index dd8bde5..cf352bb 100644
--- a/js/lib/fakejquery.js
+++ b/js/lib/fakejquery.js
@@ -1,6 +1,8 @@
 use strict;
+/* jshint eqnull:true, eqeqeq:false, asi:true, curly:false */
 /* minimalist jquery which just defines the tiny bits parsoid uses */
-/* based on zepto.js */
+/* based on zepto.js, which explains why the code conventions don't
+ * match the rest of parsoid. */
   var $ = module.exports = {};
 
   var class2type = {};
@@ -18,7 +20,7 @@
   function isDocument(obj)   { return obj != null  obj.nodeType == 
obj.DOCUMENT_NODE }
   function isObject(obj) { return type(obj) == object }
   function isPlainObject(obj) {
-return isObject(obj)  !isWindow(obj)  obj.__proto__ == Object.prototype
+return isObject(obj)  !isWindow(obj)  Object.getPrototypeOf(obj) == 
Object.prototype
   }
   function isArray(value) { return value instanceof Array }
   function likeArray(obj) { return typeof obj.length == 'number' }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia04ebcb545f64c5c95ecea8c65a71a07a933e502
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott wikime...@cscott.net

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


[MediaWiki-commits] [Gerrit] Factor the pre newline hack out of the converter into ve.p... - change (mediawiki...VisualEditor)

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

Change subject: Factor the pre newline hack out of the converter into 
ve.properInnerHTML()
..


Factor the pre newline hack out of the converter into ve.properInnerHTML()

Also add detection for whether the browser is actually broken (most are,
but some, like Opera, aren't), treat textarea and listing in addition
to pre, and fix a bug where the function would crash if the pre was
empty (because .firstChild was undefined/null).

Change-Id: I541b57e9fd5c9c42d19d0a59f6e29fb43d35c9b6
---
M modules/ve/dm/ve.dm.Converter.js
M modules/ve/init/mw/ve.init.mw.Target.js
M modules/ve/test/dm/ve.dm.example.js
M modules/ve/ve.js
4 files changed, 48 insertions(+), 25 deletions(-)

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



diff --git a/modules/ve/dm/ve.dm.Converter.js b/modules/ve/dm/ve.dm.Converter.js
index 66191be..93ab24a 100644
--- a/modules/ve/dm/ve.dm.Converter.js
+++ b/modules/ve/dm/ve.dm.Converter.js
@@ -1145,22 +1145,6 @@
}
delete container.lastOuterPost;
}
-
-   // Workaround for bug 42469: if a pre starts with a newline, that 
means .innerHTML will
-   // screw up and stringify it with one fewer newline. Work around this 
by adding a newline.
-   // If we don't see a leading newline, we still don't know if the 
original HTML was
-   // preFoo/pre or pre\nFoo/pre , but that's a syntactic 
difference, not a semantic
-   // one, and handling that is Parsoid's job.
-   $( container ).find( 'pre' ).each( function() {
-   var matches;
-   if ( this.firstChild.nodeType === Node.TEXT_NODE ) {
-   matches = this.firstChild.data.match( /^(\r\n|\r|\n)/ );
-   if ( matches  matches[1] ) {
-   // Prepend a newline exactly like the one we saw
-   this.firstChild.insertData( 0, matches[1] );
-   }
-   }
-   } );
 };
 
 /* Initialization */
diff --git a/modules/ve/init/mw/ve.init.mw.Target.js 
b/modules/ve/init/mw/ve.init.mw.Target.js
index 30fd921..a51582f 100644
--- a/modules/ve/init/mw/ve.init.mw.Target.js
+++ b/modules/ve/init/mw/ve.init.mw.Target.js
@@ -437,7 +437,7 @@
'oldid': this.oldid,
'basetimestamp': this.baseTimeStamp,
'starttimestamp': this.startTimeStamp,
-   'html': doc.body.innerHTML, // TODO make this send the 
whole document in the future
+   'html': ve.properInnerHTML( doc.body ), // TODO make 
this send the whole document in the future
'token': this.editToken,
'summary': options.summary,
'minor': Number( options.minor ),
@@ -468,7 +468,7 @@
'paction': 'diff',
'page': this.pageName,
'oldid': this.oldid,
-   'html': doc.body.innerHTML, // TODO make this send the 
whole document in the future
+   'html': ve.properInnerHTML( doc.body ), // TODO make 
this send the whole document in the future
// TODO: API required editToken, though not relevant 
for diff
'token': this.editToken
},
@@ -556,7 +556,7 @@
'data': {
'action': 'visualeditor',
'paction': 'serialize',
-   'html': doc.body.innerHTML, // TODO make this send the 
whole document in the future
+   'html': ve.properInnerHTML( doc.body ), // TODO make 
this send the whole document in the future
'page': this.pageName,
'oldid': this.oldid,
'token': this.editToken,
@@ -598,7 +598,7 @@
ve.createDocumentFromHTML( 'body' + 
this.originalHtml  + '/body' )
),
'editedData': editedData,
-   'editedHtml': ve.dm.converter.getDomFromData( store, 
editedData ).body.innerHTML,
+   'editedHtml': ve.properInnerHTML( 
ve.dm.converter.getDomFromData( store, editedData ).body ),
'wiki': mw.config.get( 'wgDBname' )
};
$.post(
diff --git a/modules/ve/test/dm/ve.dm.example.js 
b/modules/ve/test/dm/ve.dm.example.js
index 21d4343..e0ac641 100644
--- a/modules/ve/test/dm/ve.dm.example.js
+++ b/modules/ve/test/dm/ve.dm.example.js
@@ -1645,11 +1645,7 @@
'\n',
'\n',
{ 'type': '/preformatted' }
-   ],
-   // pre newline hack
-   // TODO we should test this using a better, more 
.innerHTML-based mechanism for
- 

[MediaWiki-commits] [Gerrit] (bug 47268) lang:parseFormattedNumber should return a number... - change (mediawiki...Scribunto)

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

Change subject: (bug 47268) lang:parseFormattedNumber should return a number, 
not a string
..


(bug 47268) lang:parseFormattedNumber should return a number, not a string

The documentation, and the expectation of users, is that
lang:parseFormattedNumber() should actually return a number, not a
string.

Bug: 47268
Change-Id: Ieabddd0d9192f1fd8ef7e890d5d6268be9636f38
---
M engines/LuaCommon/lualib/mw.language.lua
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/engines/LuaCommon/lualib/mw.language.lua 
b/engines/LuaCommon/lualib/mw.language.lua
index 69a6cf7..cc19db9 100644
--- a/engines/LuaCommon/lualib/mw.language.lua
+++ b/engines/LuaCommon/lualib/mw.language.lua
@@ -68,7 +68,6 @@
caseFold = 1,
formatNum = 1,
formatDate = 1,
-   parseFormattedNumber = 1,
formatDuration = 1,
getDurationIntervals = 1,
convertPlural = 2,
@@ -96,6 +95,15 @@
return rtl
end
 
+   -- Fix semantics
+   function lang:parseFormattedNumber( ... )
+   checkSelf( self, 'parseFormattedNumber' )
+   if select( '#', ... )  1 then
+   error( too few arguments to 
mw.language:parseFormattedNumber, 2 )
+   end
+   return tonumber( php.parseFormattedNumber( self.code, ... ) )
+   end
+
-- Alias
lang.plural = lang.convertPlural
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieabddd0d9192f1fd8ef7e890d5d6268be9636f38
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Avoid use of __METHOD__ in closure. - change (mediawiki/core)

2013-04-22 Thread Aaron Schulz (Code Review)
Aaron Schulz has submitted this change and it was merged.

Change subject: Avoid use of __METHOD__ in closure.
..


Avoid use of __METHOD__ in closure.

Change-Id: Ib25063f41cc25647003442cbd5851c3b777b2a7a
---
M includes/User.php
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/includes/User.php b/includes/User.php
index e911cb0..cb5ad7a 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -1974,7 +1974,8 @@
$dbw = wfGetDB( DB_MASTER );
$userid = $this-mId;
$touched = $this-mTouched;
-   $dbw-onTransactionIdle( function() use ( $dbw, 
$userid, $touched ) {
+   $method = __METHOD__;
+   $dbw-onTransactionIdle( function() use ( $dbw, 
$userid, $touched, $method ) {
// Prevent contention slams by checking 
user_touched first
$encTouched = $dbw-addQuotes( $dbw-timestamp( 
$touched ) );
$needsPurge = $dbw-selectField( 'user', '1',
@@ -1983,7 +1984,7 @@
$dbw-update( 'user',
array( 'user_touched' = 
$dbw-timestamp( $touched ) ),
array( 'user_id' = $userid, 
'user_touched  ' . $encTouched ),
-   __METHOD__
+   $method
);
}
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib25063f41cc25647003442cbd5851c3b777b2a7a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Enable Extension:Score everywhere - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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


Change subject: Enable Extension:Score everywhere
..

Enable Extension:Score everywhere

Bug: 33193
Change-Id: I750caf1fe9f0ae2d428f70f11e46fdc4292fd409
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index da5452f..815450d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1061,8 +1061,7 @@
 ),
 
 'wmgUseScore' = array(
-   'default' = false,
-   'test2wiki' = true,
+   'default' = true,
 ),
 
 'wmgScoreFileBackend' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I750caf1fe9f0ae2d428f70f11e46fdc4292fd409
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] enwiki to 1.22wmf2 - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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


Change subject: enwiki to 1.22wmf2
..

enwiki to 1.22wmf2

Change-Id: Ie4a86deea3ab7ba66bf7b45fa312ac0eabeb2c83
---
M wikiversions.dat
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wikiversions.dat b/wikiversions.dat
index 81f171b..fc7a1be 100644
--- a/wikiversions.dat
+++ b/wikiversions.dat
@@ -193,7 +193,7 @@
 emlwiki php-1.22wmf1 *
 enwikibooks php-1.22wmf2 *
 enwikinews php-1.22wmf2 *
-enwiki php-1.22wmf1 *
+enwiki php-1.22wmf2 *
 enwikiquote php-1.22wmf2 *
 enwikisource php-1.22wmf2 *
 enwikiversity php-1.22wmf2 *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4a86deea3ab7ba66bf7b45fa312ac0eabeb2c83
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] enwiki to 1.22wmf2 - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: enwiki to 1.22wmf2
..


enwiki to 1.22wmf2

Change-Id: Ie4a86deea3ab7ba66bf7b45fa312ac0eabeb2c83
---
M wikiversions.dat
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wikiversions.dat b/wikiversions.dat
index 81f171b..fc7a1be 100644
--- a/wikiversions.dat
+++ b/wikiversions.dat
@@ -193,7 +193,7 @@
 emlwiki php-1.22wmf1 *
 enwikibooks php-1.22wmf2 *
 enwikinews php-1.22wmf2 *
-enwiki php-1.22wmf1 *
+enwiki php-1.22wmf2 *
 enwikiquote php-1.22wmf2 *
 enwikisource php-1.22wmf2 *
 enwikiversity php-1.22wmf2 *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4a86deea3ab7ba66bf7b45fa312ac0eabeb2c83
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Refactor MWTimestamp::getHumanTimestamp and add hook. - change (mediawiki/core)

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

Change subject: Refactor MWTimestamp::getHumanTimestamp and add hook.
..


Refactor MWTimestamp::getHumanTimestamp and add hook.

Changed logic in MWTimestamp::getHumanTimestamp so that
all the message and formatting was offloaded into the
Language class, keeping only actual timestamp logic in
the MWTimestamp class.

Also added a hook so extensions can override the
human timestamp format.

Change-Id: Ie667088010e24eb6cb569f9e8e8e2553005223eb
---
M docs/hooks.txt
M includes/Timestamp.php
M languages/Language.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messages.inc
M tests/phpunit/includes/TimestampTest.php
7 files changed, 377 insertions(+), 58 deletions(-)

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



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 2cde591..2d64bce 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1138,6 +1138,15 @@
 $url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getFullURL()
 
+'GetHumanTimestamp': Pre-emptively override the human-readable timestamp 
generated
+by MWTimestamp::getHumanTimestamp(). Return false in this hook to use the 
custom
+output.
+$output: string for the output timestamp
+$timestamp: MWTimestamp object of the current (user-adjusted) timestamp
+$relativeTo: MWTimestamp object of the relative (user-adjusted) timestamp
+$user: User whose preferences are being used to make timestamp
+$lang: Language that will be used to render the timestamp
+
 'GetInternalURL': Modify fully-qualified URLs used for squid cache purging.
 $title: Title object of page
 $url: string value as output (out parameter, can modify)
diff --git a/includes/Timestamp.php b/includes/Timestamp.php
index caf78b0..ba9b7b2 100644
--- a/includes/Timestamp.php
+++ b/includes/Timestamp.php
@@ -45,26 +45,10 @@
);
 
/**
-* Different units for human readable timestamps.
-* @see MWTimestamp::getHumanTimestamp
+* The actual timestamp being wrapped (DateTime object).
+* @var DateTime
 */
-   private static $units = array(
-   milliseconds = 1,
-   seconds = 1000, // 1000 milliseconds per second
-   minutes = 60, // 60 seconds per minute
-   hours = 60, // 60 minutes per hour
-   days = 24, // 24 hours per day
-   months = 30, // approximately 30 days per month
-   years = 12, // 12 months per year
-   );
-
-   /**
-* The actual timestamp being wrapped. Either a DateTime
-* object or a string with a Unix timestamp depending on
-* PHP.
-* @var string|DateTime
-*/
-   private $timestamp;
+   public $timestamp;
 
/**
 * Make a new timestamp and set it to the specified time,
@@ -168,16 +152,7 @@
throw new TimestampException( __METHOD__ . ' : Illegal 
timestamp output type.' );
}
 
-   if ( is_object( $this-timestamp  ) ) {
-   // DateTime object was used, call DateTime::format.
-   $output = $this-timestamp-format( 
self::$formats[$style] );
-   } elseif ( TS_UNIX == $style ) {
-   // Unix timestamp was used and is wanted, just return 
it.
-   $output = $this-timestamp;
-   } else {
-   // Unix timestamp was used, use gmdate().
-   $output = gmdate( self::$formats[$style], 
$this-timestamp );
-   }
+   $output = $this-timestamp-format( self::$formats[$style] );
 
if ( ( $style == TS_RFC2822 ) || ( $style == TS_POSTGRES ) ) {
$output .= ' GMT';
@@ -194,31 +169,105 @@
 * largest possible unit is used.
 *
 * @since 1.20
+* @since 1.22 Uses Language::getHumanTimestamp to produce the timestamp
 *
-* @return Message Formatted timestamp
+* @param MWTimestamp|null $relativeTo The base timestamp to compare to 
(defaults to now)
+* @param User|null $user User the timestamp is being generated for (or 
null to use main context's user)
+* @param Language|null $lang Language to use to make the human 
timestamp (or null to use main context's language)
+* @return string Formatted timestamp
 */
-   public function getHumanTimestamp() {
-   $then = $this-getTimestamp( TS_UNIX );
-   $now = time();
-   $timeago = ($now - $then) * 1000;
-   $message = false;
+   public function getHumanTimestamp( MWTimestamp $relativeTo = null, User 
$user = null, Language $lang = null ) {
+   if ( $relativeTo === null ) {
+   $relativeTo = new self();
+ 

[MediaWiki-commits] [Gerrit] Enable Extension:Score everywhere - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: Enable Extension:Score everywhere
..


Enable Extension:Score everywhere

Bug: 33193
Change-Id: I750caf1fe9f0ae2d428f70f11e46fdc4292fd409
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index da5452f..815450d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1061,8 +1061,7 @@
 ),
 
 'wmgUseScore' = array(
-   'default' = false,
-   'test2wiki' = true,
+   'default' = true,
 ),
 
 'wmgScoreFileBackend' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I750caf1fe9f0ae2d428f70f11e46fdc4292fd409
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add --color=auto option, and make it the default. - change (mediawiki...Parsoid)

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

Change subject: Add --color=auto option, and make it the default.
..


Add --color=auto option, and make it the default.

Like git, --color=auto turns on color output if the output device is a TTY,
and disables it otherwise.  You can still force color output with
--color or --no-color (or --color=false).  Use '--color' in runtests.sh
to make current (eccentric) behavior.

Change-Id: I1b2638b1f8973a4f8d92f5e1dca91a9ce8220c46
---
M js/lib/mediawiki.Util.js
M js/lib/mediawiki.tokenizer.peg.js
M js/tests/dumpGrepper.js
M js/tests/parserTests.js
M js/tests/roundtrip-test.js
M js/tests/runtests.sh
6 files changed, 44 insertions(+), 36 deletions(-)

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



diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index 9e8e1a5..7b67257 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -66,6 +66,25 @@
/**
 * @method
 *
+* Set the color flags, based on an options object.
+*
+* @param {Options} options The options object to use for setting
+*the mode of the 'color' package.
+*/
+   setColorFlags: function(options) {
+   var colors = require('colors');
+   if( options.color === 'auto' ) {
+   if (!process.stdout.isTTY) {
+   colors.mode = 'none';
+   }
+   } else if( !Util.booleanOption( options.color ) ) {
+   colors.mode = 'none';
+   }
+   },
+
+   /**
+* @method
+*
 * Update only those properties that are undefined or null
 * $.extend updates properties that are falsy (which means false gets 
updated as well)
 *
@@ -1254,12 +1273,12 @@
if ( change.added ) {
diffs++;
return change.value.split( '\n' ).map( function 
( line ) {
-   return line.green;
+   return line.green + '';//add '' to 
workaround color bug
} ).join( '\n' );
} else if ( change.removed ) {
diffs++;
return change.value.split( '\n' ).map( function 
( line ) {
-   return line.red;
+   return line.red + '';//add '' to 
workaround color bug
} ).join( '\n' );
} else {
return change.value;
diff --git a/js/lib/mediawiki.tokenizer.peg.js 
b/js/lib/mediawiki.tokenizer.peg.js
index d9b22a7..7d2ceec 100644
--- a/js/lib/mediawiki.tokenizer.peg.js
+++ b/js/lib/mediawiki.tokenizer.peg.js
@@ -13,7 +13,6 @@
LRU = require(lru-cache),
fs = require('fs'),
events = require('events'),
-   //colors = require('colors'),
Util = require('./mediawiki.Util.js').Util,
defines = require('./mediawiki.parser.defines.js');
 
diff --git a/js/tests/dumpGrepper.js b/js/tests/dumpGrepper.js
index f1c3de3..e66fc71 100755
--- a/js/tests/dumpGrepper.js
+++ b/js/tests/dumpGrepper.js
@@ -6,7 +6,6 @@
 var dumpReader = require('./dumpReader.js'),
events = require('events'),
optimist = require('optimist'),
-   colors = require('colors'),
Util = require( '../lib/mediawiki.Util.js' ).Util;
 
 function DumpGrepper ( regexp ) {
@@ -40,9 +39,9 @@
'default': false
},
'color': {
-   description: 'Highlight matched substring using color. 
Use --no-color to disable.',
+   description: 'Highlight matched substring using color. 
Use --no-color to disable.  Default is auto.',
'boolean': true,
-   'default': true
+   'default': 'auto'
}
} ).argv;
 
@@ -50,6 +49,7 @@
optimist.showHelp();
process.exit( 0 );
}
+   Util.setColorFlags( argv );
 
var flags = 'g';
if( Util.booleanOption( argv.i ) ) {
@@ -76,17 +76,10 @@
console.log( '== Match: [[' + revision.page.title + ']] 
==' );
var m = matches[i];
//console.warn( JSON.stringify( m.index, null, 2 ) );
-   if ( argv.color ) {
-   console.log(
+   console.log(
revision.text.substr( m.index - 40, 40 
) +
m[0].green +
revision.text.substr( m.index + 
m[0].length, 40 ) );
-

[MediaWiki-commits] [Gerrit] (bug 40759) Let Proofread Page setup namespaces for fi.wikis... - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 40759) Let Proofread Page setup namespaces for 
fi.wikisource
..


(bug 40759) Let Proofread Page setup namespaces for fi.wikisource

The ids used will be 250 (page) and 252 (index)

Depends on I332b0a60cab5f392e04f9d37b670bb5803050832 which is merged. That
needs to be backported and deployed to 1.21wmf9 before this can ber merged
and deployed, or this needs to wait until 1.21wmf10 is deployed on
fiwikisource.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 815450d..ba296d6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5205,12 +5205,6 @@
106 = 'فهرست', // Index
107 = 'گفتگوی_فهرست', // Index talk
),
-   'fiwikisource' = array(
-   104 = 'Sivu',  // Bug 40759 (page)
-   105 = 'Keskustelu_sivusta',// Bug 40759
-   106 = 'Hakemisto', // Bug 40759 (index)
-   107 = 'Keskustelu_hakemistosta',   // Bug 40759
-   ),
'frwikisource' = array(
100 = 'Transwiki',
101 = 'Discussion_Transwiki',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I072481d57cb23adb607351486003643b84a8e485
Gerrit-PatchSet: 8
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Tpt thoma...@hotmail.fr
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Tpt thoma...@hotmail.fr
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 44164) Add 'Portal' and 'Author' namespaces to iswikiso... - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 44164) Add 'Portal' and 'Author' namespaces to iswikisource
..


(bug 44164) Add 'Portal' and 'Author' namespaces to iswikisource

This commit adds two new namespaces to the Icelandic Wikisource:
* 'Gátt' and 'Gáttarspjall' as 100 and 101, with English aliases
'Portal' and 'Portal_talk', respectively;
* 'Höfundur' and 'Höfundarspjall' as 102 and 103, with English
aliases 'Author' and 'Author_talk';
* Both namespaces are set to be searched by default per request.

Bug: 44164
Change-Id: I594dd822034ea80c5a177384deefc9bc59d000bd
---
M wmf-config/InitialiseSettings.php
1 file changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ba296d6..a0313ff 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -2710,6 +2710,12 @@
'+incubatorwiki' = array(
'I' = NS_PROJECT,
),
+   '+iswikisource' = array(
+   'Portal' = 100, // Bug 44164
+   'Portal_talk' = 101, // Bug 44164
+   'Author' = 102, // Bug 44164
+   'Author_talk' = 103, // Bug 44164
+   ),
'+iswiktionary' = array(
'Wiktionary' = NS_PROJECT,
'Wikiorðabókspjall' = 5, // changed 
http://bugzilla.wikimedia.org/show_bug.cgi?id=7754
@@ -5275,6 +5281,12 @@
106 = 'Portal',
107 = 'Pembicaraan_Portal',
),
+   'iswikisource' = array(
+   100 = 'Gátt', // Bug 44164
+   101 = 'Gáttarspjall', // Bug 44164
+   102 = 'Höfundur', // Bug 44164
+   103 = 'Höfundarspjall', // Bug 44164
+   ),
'itwikisource' = array(
102 = 'Autore',
103 = 'Discussioni_autore',
@@ -6438,6 +6450,7 @@
'+hywikisource' = array( 100 = 1, 106 = 1 ),
'+idwikibooks' = array( 100 = 1, 102 = 1 ),
'+idwikisource' = array( 100 = 1, 102 = 1 ),
+   '+iswikisource' = array( 100 = 1, 102 = 1 ), // Bug 44164
'+itwikisource' = array( 102 = 1, 110 = 1 ),
'+itwikivoyage' = array( 100 = 1, 104 = 1, 106 = 1 ),
'+kowikisource' = array( 100 = 1 ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I594dd822034ea80c5a177384deefc9bc59d000bd
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] pngcrush everything - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: pngcrush everything
..


pngcrush everything

Change-Id: I5f1520977cf29cd00847a7e4a73da67fc21d860a
---
M docroot/bits/DolphinBrowser/image/button-dark-back.png
M docroot/bits/DolphinBrowser/image/button-light-close.png
M docroot/bits/DolphinBrowser/image/button-light-wiki.png
M docroot/bits/DolphinBrowser/image/icon.png
M docroot/bits/DolphinBrowser/image/ios/toolbar-back.png
M docroot/bits/DolphinBrowser/image/ios/toolbar-forward.png
M docroot/bits/DolphinBrowser/image/ios/toolbar-language.png
M docroot/bits/DolphinBrowser/image/ios/toolbar-nearby.png
M docroot/bits/DolphinBrowser/image/ios/toolbar-output.png
M docroot/bits/DolphinBrowser/image/ios/toolbar-settings.png
M docroot/bits/DolphinBrowser/image/ios/toolbar-sources.png
M docroot/bits/DolphinBrowser/image/logo.png
M docroot/bits/DolphinBrowser/image/select.png
M docroot/bits/DolphinBrowser/image/splash.png
M docroot/bits/DolphinBrowser/image/spr.png
M docroot/bits/DolphinBrowser/image/wmf.png
M docroot/bits/DolphinBrowser/img/hdpi/optionAddBookmark.png
M docroot/bits/DolphinBrowser/img/hdpi/optionBack.png
M docroot/bits/DolphinBrowser/img/hdpi/optionForward.png
M docroot/bits/DolphinBrowser/img/hdpi/optionLanguage.png
M docroot/bits/DolphinBrowser/img/hdpi/optionNearMe.png
M docroot/bits/DolphinBrowser/img/hdpi/optionReadLater.png
M docroot/bits/DolphinBrowser/img/hdpi/optionSettings.png
M docroot/bits/DolphinBrowser/img/hdpi/optionSharePage.png
M docroot/bits/DolphinBrowser/img/hdpi/optionViewHistory.png
M docroot/bits/DolphinBrowser/img/ldpi/optionAddBookmark.png
M docroot/bits/DolphinBrowser/img/ldpi/optionBack.png
M docroot/bits/DolphinBrowser/img/ldpi/optionForward.png
M docroot/bits/DolphinBrowser/img/ldpi/optionLanguage.png
M docroot/bits/DolphinBrowser/img/ldpi/optionNearMe.png
M docroot/bits/DolphinBrowser/img/ldpi/optionReadLater.png
M docroot/bits/DolphinBrowser/img/ldpi/optionSettings.png
M docroot/bits/DolphinBrowser/img/ldpi/optionSharePage.png
M docroot/bits/DolphinBrowser/img/ldpi/optionViewHistory.png
M docroot/bits/DolphinBrowser/img/mdpi/optionAddBookmark.png
M docroot/bits/DolphinBrowser/img/mdpi/optionBack.png
M docroot/bits/DolphinBrowser/img/mdpi/optionForward.png
M docroot/bits/DolphinBrowser/img/mdpi/optionLanguage.png
M docroot/bits/DolphinBrowser/img/mdpi/optionNearMe.png
M docroot/bits/DolphinBrowser/img/mdpi/optionReadLater.png
M docroot/bits/DolphinBrowser/img/mdpi/optionSettings.png
M docroot/bits/DolphinBrowser/img/mdpi/optionSharePage.png
M docroot/bits/DolphinBrowser/img/mdpi/optionViewHistory.png
M docroot/bits/DolphinBrowser/img/orig/optionAddBookmark.png
M docroot/bits/DolphinBrowser/img/orig/optionBack.png
M docroot/bits/DolphinBrowser/img/orig/optionForward.png
M docroot/bits/DolphinBrowser/img/orig/optionLanguage.png
M docroot/bits/DolphinBrowser/img/orig/optionNearMe.png
M docroot/bits/DolphinBrowser/img/orig/optionReadLater.png
M docroot/bits/DolphinBrowser/img/orig/optionSettings.png
M docroot/bits/DolphinBrowser/img/orig/optionViewHistory.png
M docroot/bits/DolphinBrowser/img/xhdpi/optionAddBookmark.png
M docroot/bits/DolphinBrowser/img/xhdpi/optionBack.png
M docroot/bits/DolphinBrowser/img/xhdpi/optionForward.png
M docroot/bits/DolphinBrowser/img/xhdpi/optionLanguage.png
M docroot/bits/DolphinBrowser/img/xhdpi/optionNearMe.png
M docroot/bits/DolphinBrowser/img/xhdpi/optionReadLater.png
M docroot/bits/DolphinBrowser/img/xhdpi/optionSettings.png
M docroot/bits/DolphinBrowser/img/xhdpi/optionSharePage.png
M docroot/bits/DolphinBrowser/img/xhdpi/optionViewHistory.png
M docroot/default/wmf_logo_with_text.png
M docroot/labs/images/wiki-beta-en.png
M docroot/noc/conf/images/document.png
M docroot/noc/conf/images/network_local.png
M docroot/noc/conf/images/source_php.png
M docroot/noc/conf/images/txt.png
M images/sul/commons.png
M images/sul/foundation.png
M images/sul/meta.png
M images/sul/wikidata.png
M images/sul/wikinews.png
M images/sul/wikipedia.png
M images/sul/wikivoyage.png
M images/sul/wiktionary.png
74 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/docroot/bits/DolphinBrowser/image/button-dark-back.png 
b/docroot/bits/DolphinBrowser/image/button-dark-back.png
index de5e9f0..8712ed5 100644
--- a/docroot/bits/DolphinBrowser/image/button-dark-back.png
+++ b/docroot/bits/DolphinBrowser/image/button-dark-back.png
Binary files differ
diff --git a/docroot/bits/DolphinBrowser/image/button-light-close.png 
b/docroot/bits/DolphinBrowser/image/button-light-close.png
index 38e60f6..1acb67c 100644
--- a/docroot/bits/DolphinBrowser/image/button-light-close.png
+++ b/docroot/bits/DolphinBrowser/image/button-light-close.png
Binary files differ
diff --git a/docroot/bits/DolphinBrowser/image/button-light-wiki.png 
b/docroot/bits/DolphinBrowser/image/button-light-wiki.png
index d397af2..295b442 100644
--- 

[MediaWiki-commits] [Gerrit] (bug 47325) Rights configuration on es.wikivoyage - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 47325) Rights configuration on es.wikivoyage
..


(bug 47325) Rights configuration on es.wikivoyage

This commit does three things:
* (1) It adds the 'autopatrol' right to the 'rollbacker' and
'patroller' user groups per community request;
* (2) It adds the possibility to add and remove users from the
'confirmed' group for bureaucrats per request;
* (3) It cleans some comments to make the text a bit more
readable (my own inspiration :).

Bug: 47325
Change-Id: I23b32e909019805d830b43922c14ba42ec9c2b69
---
M wmf-config/InitialiseSettings.php
1 file changed, 18 insertions(+), 11 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a0313ff..a4ae9b0 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -6910,14 +6910,19 @@
'flood' = array( 'bot' = true ),
),
'eswikivoyage' = array(
-   'rollbacker' = array( 'rollback' = true ),
-   'patroller' = array( 'patrol' = true ),
-   ), // bug 44285
-   // http://bugzilla.wikimedia.org/show_bug.cgi?id=7152
+   'rollbacker' = array( 
+   'rollback' = true, // Bug 44285
+   'autopatrol' = true, // Bug 47325
+   ),
+   'patroller' = array( 
+   'patrol' = true, // Bug 44285
+   'autopatrol' = true, // Bug 47325
+   ),
+   ),
'eswiktionary' = array(
-   'user' = array( 'upload' = false ),
-   'autoconfirmed' = array( 'upload' = false ),
-   'sysop' = array( 'upload' = true ),
+   'user' = array( 'upload' = false ), // Bug 7152
+   'autoconfirmed' = array( 'upload' = false ), // Bug 7152
+   'sysop' = array( 'upload' = true ), // Bug 7152
'patroller' = array( 'patrol' = true ),
'rollbacker' = array( 'rollback' = true ),
'autopatrolled' = array( 'autopatrol' = true ),
@@ -7743,8 +7748,9 @@
'bureaucrat' = array( 'editprotected', 'flood', ),
),
'+eswikivoyage' = array(
-   'sysop' = array( 'rollbacker', 'patroller', ),
-   ), // bug 44285
+   'bureaucrat' = array( 'confirmed', ), // Bug 47325
+   'sysop' = array( 'rollbacker', 'patroller', ), // Bug 44285
+   ),
'+eswiktionary' = array(
'bureaucrat' = array( 'autopatrolled', 'patroller', 
'rollbacker' ),
),
@@ -8152,8 +8158,9 @@
'bureaucrat' = array( 'editprotected', 'flood', ),
),
'+eswikivoyage' = array(
-   'sysop' = array( 'rollbacker', 'patroller', ),
-   ), // bug 44285
+   'bureaucrat' = array( 'confirmed', ), // Bug 47325
+   'sysop' = array( 'rollbacker', 'patroller', ), // Bug 44285
+   ),
'+eswiktionary' = array(
'bureaucrat' = array( 'autopatrolled', 'patroller', 
'rollbacker' ),
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23b32e909019805d830b43922c14ba42ec9c2b69
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Dereckson dereck...@espace-win.org
Gerrit-Reviewer: MZMcBride w...@mzmcbride.com
Gerrit-Reviewer: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 47337) Flagged Revisions configuration for ru.wikipedia - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 47337) Flagged Revisions configuration for ru.wikipedia
..


(bug 47337) Flagged Revisions configuration for ru.wikipedia

* New protected namespace: 828 (Module:)

Change-Id: Ibc716035125c0b391f647178fb766106c5fff216
---
M wmf-config/flaggedrevs.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/flaggedrevs.php b/wmf-config/flaggedrevs.php
index e8cdd44..f96720a 100644
--- a/wmf-config/flaggedrevs.php
+++ b/wmf-config/flaggedrevs.php
@@ -501,8 +501,8 @@
 
 elseif ( $wgDBname == 'ruwiki' ) {
 
-   // Bug 37675
-   $wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE, 
NS_CATEGORY, 100 );
+   // Bugs 37675, 47337
+   $wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE, 
NS_CATEGORY, 100, 828 );
 
$wgFlaggedRevTags['accuracy']['levels'] = 3; // Is this needed?
$wgFlaggedRevsOverride = false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc716035125c0b391f647178fb766106c5fff216
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson dereck...@espace-win.org
Gerrit-Reviewer: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 46944) Allow users to save books to userspace on enwiki... - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 46944) Allow users to save books to userspace on 
enwikipedia
..


(bug 46944) Allow users to save books to userspace on enwikipedia

Doing just that.
Bug: 46944

Change-Id: If7f374fd6bcc656563dcf63baf43a77be9dede6d
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a4ae9b0..d8b0e04 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -6835,7 +6835,10 @@
),
'enwiki' = array(
'*' = array( 'createpage' = false ),
-   'user' = array( 'move' = false ), // autoconfirmed only
+   'user' = array( 
+   'move' = false, // autoconfirmed only
+   'collectionsaveasuserpage' = true, // Bug 46944
+   ),
'autoconfirmed' = array( 'patrol' = true ), // 
http://bugzilla.wikimedia.org/show_bug.cgi?id=12007
'founder' = array( 'userrights' = true ),
'rollbacker' = array( 'rollback' = true ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7f374fd6bcc656563dcf63baf43a77be9dede6d
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Dereckson dereck...@espace-win.org
Gerrit-Reviewer: MZMcBride w...@mzmcbride.com
Gerrit-Reviewer: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 46431) Update Apple touch icon for en.wiktionary. - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 46431) Update Apple touch icon for en.wiktionary.
..


(bug 46431) Update Apple touch icon for en.wiktionary.

Changing the current Apple touch icon[1] into a new one[2]
per community request. I'm changing it only for en.wiktionary,
since the logos vary between the projects, and the current one
is set as default for all *.wiktionary.org projects.

Apple documentation at http://tiny.cc/frmpvw allows using
absolute URLs, not necessarily from within the domain itself,
so I'm doing just that (it's what we use for en.wikinews
already anyway).

There is also no need to have different sizes of the logo, as
iOS rescales it automatically; 144 x 144 is the suggested
size for Retina display.

== References ==
* (1) [[:commons:File:Wiktionary-iphone logo.png]];
* (2) [[:commons:File:Wiktionary-icon.png]];

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d8b0e04..8e9c60b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9502,6 +9502,7 @@
 
'testwiki' = 
'//upload.wikimedia.org/wikipedia/test/apple-touch-icon.png',
'enwikinews' = 
'//upload.wikimedia.org/wikipedia/commons/4/43/Apple-touch-icon.png',
+   'enwiktionary' = 
'//upload.wikimedia.org/wikipedia/commons/e/e7/Wiktionary-icon.png', // Bug 
46431
'mediawikiwiki' = '//www.mediawiki.org/Apple-touch-icon.png',
'usabilitywiki' = 
'//usability.wikimedia.org/UsabilityWiki-AppleTouch-Icon.png',
'wikimania2005wiki' = '//$lang.$site.org/apple-touch-icon.png',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48c1774cb2bf3fa10b05b700a7ec3b50587de73a
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 44899) Namespace setup for Korean Wikiversity - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 44899) Namespace setup for Korean Wikiversity
..


(bug 44899) Namespace setup for Korean Wikiversity

This commit does three things:
* (1) It changes the default display for the NS_PROJECT_TALK namespace
into its Korean version (NS_PROJECT being defined by $wgMetaNamespace);
* (2) It adds a new alias for the NS_PROJECT_TALK namespace (with the
NS_PROJECT alias being set by default);
* (3) It adds new 102 and 103 namespaces in Korean, though without any
English aliases.

As far as I see, there are around 50 main namespace pages that begin
with the name of the new namespace ('위키배움터'), so I'll request the
namespaceDupes.php script to be run (since it's too much pages to be
moved manually).

Bug: 44899
Change-Id: Id9d9e73c6af0663175997e4b7e56fec248d70ec9
---
M wmf-config/InitialiseSettings.php
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8e9c60b..6afa7fc 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1916,7 +1916,8 @@
'kowikiquote'   = '위키인용집',
'kowikisource'  = '위키문헌',
'kowiktionary'  = '위키낱말사전',
-   'krcwiki'   = 'Википедия',
+   'kowikiversity' = '위키배움터', // Bug 44899
+   'krcwiki'   = 'Википедия',
'kuwiki'= 'Wîkîpediya',
'kuwiktionary'  = 'Wîkîferheng',
'kvwiki'= 'Википедия',
@@ -2818,6 +2819,9 @@
'글쓴이토론' = 101,
'Author' = 100,
'Author_talk' = 101,
+   ),
+   '+kowikiversity' = array(
+   'Wikiversity토론' = NS_PROJECT_TALK, // Bug 44899
),
'+kowiktionary' = array(
'Wikisaurus' = 110,
@@ -6046,6 +6050,11 @@
110 = 'Transwiki',
111 = 'Transwiki‐ノート',
),
+   'kowikiversity' = array(
+   NS_PROJECT_TALK = '위키배움터토론', // Bug 44899
+   102 = '포털', // Bug 44899
+   103 = '포털토론', // Bug 44899
+   ),
// @} end of wikiversity
 
// Wikivoyage @{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9d9e73c6af0663175997e4b7e56fec248d70ec9
Gerrit-PatchSet: 6
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 46846) Localise project namespaces for dv.wiktionary - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 46846) Localise project namespaces for dv.wiktionary
..


(bug 46846) Localise project namespaces for dv.wiktionary

This commits does three things:
* (1) It changes $wgMetaNamespace for dvwiktionary from the
default 'Wiktionary' into a localised Maldivian version;
* (2) It changes NS_PROJECT_TALK from the default
'Wiktionary_talk' into a localised Maldivian version;
* (3) It adds 'Wiktionary_talk' as an alias for the said
namespace for backwards compatibility.

Bug: 46846
Change-Id: I74a9a264052e742f2ca60d96d5022d69dec7d0e7
---
M wmf-config/InitialiseSettings.php
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6afa7fc..94d04a2 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1792,6 +1792,7 @@
'dkwikimedia'   = 'Wikimedia',
'donatewiki'= 'Donate',
'dsbwiki'   = 'Wikipedija',
+   'dvwiktionary'  = 'ވިކިރަދީފު', // Bug 46846
'elwiki'= 'Βικιπαίδεια',
'elwikibooks'   = 'Βικιβιβλία',
'elwikinews'= 'Βικινέα',
@@ -2481,6 +2482,9 @@
'+dvwiki' = array(
'Portal' = 100,
'Portal_talk' = 101,
+   ),
+   '+dvwiktionary' = array(
+   'Wiktionary_talk' = NS_PROJECT_TALK, // Bug 46846
),
'+elwikisource' = array(
'Page' = 100,
@@ -5475,6 +5479,9 @@
106 = 'Reim', // Bug 43830
107 = 'Reim_Diskussion',
),
+   'dvwiktionary' = array(
+   NS_PROJECT_TALK = 'ވިކިރަދީފު ޚިޔާ', // Bug 46846
+   ),
'elwiktionary' = array(
100 = 'Παράρτημα',
101 = 'Συζήτηση_παραρτήματος',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I74a9a264052e742f2ca60d96d5022d69dec7d0e7
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 45638) Remove patrol from autopatrolled on itwikivoyage - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 45638) Remove patrol from autopatrolled on itwikivoyage
..


(bug 45638) Remove patrol from autopatrolled on itwikivoyage

This commit removes the 'patrol' right from the 'autopatrolled'
user group on it.wikivoyage per community request in bug 47451.
Apparently there's been some sort of misunderstanding previously.

Bug: 45638
Change-Id: I82226e9cf5e2eb0ad4533377982097d1cfbd6dd0
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 94d04a2..1c5a20a 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7103,7 +7103,6 @@
),
'itwikivoyage' = array(
'autopatrolled' = array(
-   'patrol' = true, // Bug 45638
'autopatrol' = true, // Bug 43327
'upload' = false // Bug 43524
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82226e9cf5e2eb0ad4533377982097d1cfbd6dd0
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 46534) Add namespace aliases for uz.wikipedia - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 46534) Add namespace aliases for uz.wikipedia
..


(bug 46534) Add namespace aliases for uz.wikipedia

Adding VP and VM as aliases to, respectively, NS_PROJECT
and NS_PROJECT_TALK per community request.

Bug: 46534
Change-Id: I955de99c6abb01208ff3c451f80ed481acddca61
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1c5a20a..42ce6e9 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3296,6 +3296,10 @@
'Portal' = 100, // Bug 19569
'Portal_talk' = 101, // Bug 19569
),
+   '+uzwiki' = array(
+   'VP' = NS_PROJECT, // Bug 46534
+   'VM' = NS_PROJECT_TALK, // Bug 46534
+   ),
'+vecwikisource' = array(
'Author' = 100,
'Author_talk' = 101,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I955de99c6abb01208ff3c451f80ed481acddca61
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: MZMcBride w...@mzmcbride.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Peachey88 p858sn...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 44308) Add new namespaces and aliases on zhwikibooks - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 44308) Add new namespaces and aliases on zhwikibooks
..


(bug 44308) Add new namespaces and aliases on zhwikibooks

This commit does three things:
* (1) It adds 'CAT' as an alias for NS_CATEGORY;
* (2) It adds 'Wikijunior' and 'Subject' namespaces with their
respective talk namespaces as 110 and 112;
* (3) It adds three different aliases (in traditional Chinese,
simplified Chinese and two-letter abbreviations) for each new
namespace.

Note: there are currently around 190 pages in the main namespace
that start with 'Wikijunior:', so we'll need to run the
NamespaceDupes.php script to fix them after merging this patch.

Bug: 44308
Change-Id: I01cfd92d434f5134c6864a0e89802863f031eefb
---
M wmf-config/InitialiseSettings.php
1 file changed, 13 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 42ce6e9..cf29eed 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3387,6 +3387,13 @@
'维基教科书' = NS_PROJECT,
'維基教科書' = NS_PROJECT,
'WB' = NS_PROJECT,
+   'CAT' = NS_CATEGORY, // Bug 44308
+   '維基兒童' = 110, // Bug 44308
+   '维基儿童' = 110, // Bug 44308
+   'WJ' = 110, // Bug 44308, Wikijunior
+   '書架' = 112, // Bug 44308
+   '书架' = 112, // Bug 44308
+   'SB' = 112, // Bug 44308, Subject
),
'+zhwikisource' = array(
'作者' = 102, // Author
@@ -5820,10 +5827,13 @@
106 = 'Nấu_ăn', // Cookbook
107 = 'Thảo_luận_Nấu_ăn', // Cookbook talk
),
-   # Bug 40474
'zhwikibooks' = array(
-   100 = 'Transwiki',
-   101 = 'Transwiki_talk',
+   100 = 'Transwiki', // Bug 40474
+   101 = 'Transwiki_talk', // Bug 40474
+   110 = 'Wikijunior', // Bug 44308
+   111 = 'Wikijunior_talk', // Bug 44308
+   112 = 'Subject', // Bug 44308
+   113 = 'Subject_talk', // Bug 44308
),
// @} end of wikibooks
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01cfd92d434f5134c6864a0e89802863f031eefb
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Dereckson dereck...@espace-win.org
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Create a role for Solr in Labs - change (operations/puppet)

2013-04-22 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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


Change subject: Create a role for Solr in Labs
..

Create a role for Solr in Labs

Change-Id: Ibbfed04ff81f2fd3bbdf2de0461e0e19db9b84b8
---
M manifests/role/solr.pp
1 file changed, 7 insertions(+), 2 deletions(-)


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

diff --git a/manifests/role/solr.pp b/manifests/role/solr.pp
index 07b5f1f..ad458d4 100644
--- a/manifests/role/solr.pp
+++ b/manifests/role/solr.pp
@@ -33,14 +33,19 @@
}
 }
 
-class role::solr::geodata {
+class role::solr::geodata($replication_master = 'solr1001.eqiad.wmnet') {
system_role { solr-geodata: description = Solr server for GeoData }
 
include standard
 
class { role::solr:
schema = puppet:///modules/solr/schema-geodata.xml,
-   replication_master = 'solr1001.eqiad.wmnet',
+   replication_master = $replication_master,
}
 }
 
+class role::solr::geodata::labs {
+   class { role::solr::geodata:
+   replication_master = undef,
+   }
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibbfed04ff81f2fd3bbdf2de0461e0e19db9b84b8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove $wgMemCachedInstanceSize - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: Remove $wgMemCachedInstanceSize
..


Remove $wgMemCachedInstanceSize

Non existent global

Change-Id: Ia7eb7ad9595de53e551a7b58c5cc6e433d851c80
---
M wmf-config/mc-eqiad.php
M wmf-config/mc-labs.php
M wmf-config/mc-pmtpa.php
3 files changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/mc-eqiad.php b/wmf-config/mc-eqiad.php
index 65d95b8..b9b13bf 100644
--- a/wmf-config/mc-eqiad.php
+++ b/wmf-config/mc-eqiad.php
@@ -4,7 +4,6 @@
 
 $wgMemCachedPersistent = false;
 $wgMemCachedTimeout = 25; # default is 10
-$wgMemCachedInstanceSize = 2000;
 
 # Newer mc* servers (only use the pecl client with these).
 # This does not use the slot system like the old setup, but
diff --git a/wmf-config/mc-labs.php b/wmf-config/mc-labs.php
index 34116a2..bab2693 100644
--- a/wmf-config/mc-labs.php
+++ b/wmf-config/mc-labs.php
@@ -18,8 +18,6 @@
 $wgMemCachedTimeout = 50; # micro seconds
 $wgSessionsInMemcached = true;
 
-$wgMemCachedInstanceSize = 2000;
-
 $wgMemCachedServers = array(
0 = '10.4.0.166:11211',  # apache32
1 = '10.4.0.187:11211',  # apache33
diff --git a/wmf-config/mc-pmtpa.php b/wmf-config/mc-pmtpa.php
index 2e8c596..26118ef 100644
--- a/wmf-config/mc-pmtpa.php
+++ b/wmf-config/mc-pmtpa.php
@@ -4,7 +4,6 @@
 
 $wgMemCachedPersistent = false;
 $wgMemCachedTimeout = 25; # default is 10
-$wgMemCachedInstanceSize = 2000;
 
 # Newer mc* servers (only use the pecl client with these).
 # This does not use the slot system like the old setup, but

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7eb7ad9595de53e551a7b58c5cc6e433d851c80
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] mediawiki.util: Fix roundtripping of tooltip in portlet links - change (mediawiki/core)

2013-04-22 Thread Trevor Parscal (Code Review)
Trevor Parscal has submitted this change and it was merged.

Change subject: mediawiki.util: Fix roundtripping of tooltip in portlet links
..


mediawiki.util: Fix roundtripping of tooltip in portlet links

In 558985f72a ctrl-option- for Chrome on Mac was added, but it
didn't add option- to the regex. Since then the tooltip in
Chrome on Mac (and later when we started referring to option
instead of alt on all Mac browsers) was never detected by this
regex, sometimes resulting in double tooltips (when adding) or
outdated tooltips (when updating).

Now we always look for an accesskey hint in the tooltip and
strip it it's there.

Also fixed a bug where an undefined error can occur if accesskey
is given but tooltip not (the method unconditinally appended
text to the tooltip varible which might be undefined causing
a tooltip like undefined[a]).

Change-Id: I0bde1a228983c58b20cad0c09a8e5efe8225ea23
---
M RELEASE-NOTES-1.22
M resources/mediawiki/mediawiki.util.js
M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
3 files changed, 74 insertions(+), 18 deletions(-)

Approvals:
  Trevor Parscal: Verified; Looks good to me, approved



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index cf31e51..d3ea77e 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -35,6 +35,10 @@
   Pager-related WebRequest parameters by default, as this is overwhelmingly
   likely to be what was intended by users of the method. If any caller wishes
   to use these parameters, the new param 'useRequestParams' may be set to true.
+* mw.util.addPortletLink: Tooltip is no longer required to be plain (without
+  an accesskey in it already). As such it now rountrips. Creating a link with a
+  message as tooltip, grabbing the title attribute and using it to create
+  another portlet will work as expected.
 
 === Bug fixes in 1.22 ===
 * Disable Special:PasswordReset when $wgEnableEmail. Previously one could still
@@ -48,6 +52,8 @@
 * (bug 47218) Special:BlockList now handles correctly user names with spaces
   when passed as subpage.
 * Pager's properly validate which fields are allowed to be sorted on.
+* mw.util.tooltipAccessKeyRegexp: The regex now matches option- as well.
+  Support for Mac option was added in 1.16, but the regex was never updated.
 
 === API changes in 1.22 ===
 * (bug 46626) xmldoublequote parameter was removed. Because of a bug, the
@@ -85,6 +91,8 @@
 * Calling Linker methods using a skin will now output deprecation warnings.
 * (bug 46680) Return to links are no longer tagged with rel=next.
 * The Special:ActiveUsers special page was removed.
+* BREAKING CHANGE: mw.util.tooltipAccessKeyRegexp: The match group for the
+  accesskey character is now $6 instead of $5.
 
 == Compatibility ==
 
diff --git a/resources/mediawiki/mediawiki.util.js 
b/resources/mediawiki/mediawiki.util.js
index 1bd7430..60ef758 100644
--- a/resources/mediawiki/mediawiki.util.js
+++ b/resources/mediawiki/mediawiki.util.js
@@ -279,8 +279,17 @@
/**
 * @property {RegExp}
 * Regex to match accesskey tooltips.
+*
+* Should match:
+*
+* - ctrl-option-
+* - alt-shift-
+* - ctrl-alt-
+* - ctrl-
+*
+* The accesskey is matched in group $6.
 */
-   tooltipAccessKeyRegexp: 
/\[(ctrl-)?(alt-)?(shift-)?(esc-)?(.)\]$/,
+   tooltipAccessKeyRegexp: 
/\[(ctrl-)?(option-)?(alt-)?(shift-)?(esc-)?(.)\]$/,
 
/**
 * Add the appropriate prefix to the accesskey shown in the 
tooltip.
@@ -301,9 +310,9 @@
}
 
$nodes.attr( 'title', function ( i, val ) {
-   if ( val  util.tooltipAccessKeyRegexp.exec( 
val ) ) {
+   if ( val  util.tooltipAccessKeyRegexp.test( 
val ) ) {
return val.replace( 
util.tooltipAccessKeyRegexp,
-   '[' + 
util.tooltipAccessKeyPrefix + '$5]' );
+   '[' + 
util.tooltipAccessKeyPrefix + '$6]' );
}
return val;
} );
@@ -406,19 +415,27 @@
if ( id ) {
$item.attr( 'id', id );
}
+
+   if ( tooltip ) {
+   // Trim any existing accesskey hint and the 
trailing space
+   tooltip = $.trim( tooltip.replace( 
util.tooltipAccessKeyRegexp, '' ) );
+   if ( accesskey ) {
+   tooltip += ' [' + accesskey + ']';
+   }
+   $link.attr( 

[MediaWiki-commits] [Gerrit] Fix linkItem widget for articles with an item - change (mediawiki...Wikibase)

2013-04-22 Thread Aude (Code Review)
Aude has submitted this change and it was merged.

Change subject: Fix linkItem widget for articles with an item
..


Fix linkItem widget for articles with an item

Change-Id: I766ec9eb5c82dd570fbd88626c5201b5fb88390c
---
M client/resources/wikibase.client.linkitem.init.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/client/resources/wikibase.client.linkitem.init.js 
b/client/resources/wikibase.client.linkitem.init.js
index 093918e..5fd3470 100644
--- a/client/resources/wikibase.client.linkitem.init.js
+++ b/client/resources/wikibase.client.linkitem.init.js
@@ -35,7 +35,7 @@
 * Displays the link which opens the dialog (using 
jquery.wikibase.linkitem)
 */
$( document ).ready( function() {
-   $( '#wbc-linkToItem' )
+   $( '.wbc-editpage' ).eq(0)
.empty()
.append(
$( 'a' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I766ec9eb5c82dd570fbd88626c5201b5fb88390c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix linkItem widget for articles with an item - change (mediawiki...Wikibase)

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

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


Change subject: Fix linkItem widget for articles with an item
..

Fix linkItem widget for articles with an item

Change-Id: I766ec9eb5c82dd570fbd88626c5201b5fb88390c
---
M client/resources/wikibase.client.linkitem.init.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/client/resources/wikibase.client.linkitem.init.js 
b/client/resources/wikibase.client.linkitem.init.js
index 093918e..5fd3470 100644
--- a/client/resources/wikibase.client.linkitem.init.js
+++ b/client/resources/wikibase.client.linkitem.init.js
@@ -35,7 +35,7 @@
 * Displays the link which opens the dialog (using 
jquery.wikibase.linkitem)
 */
$( document ).ready( function() {
-   $( '#wbc-linkToItem' )
+   $( '.wbc-editpage' ).eq(0)
.empty()
.append(
$( 'a' )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I766ec9eb5c82dd570fbd88626c5201b5fb88390c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.22-wmf2
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de

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


[MediaWiki-commits] [Gerrit] Fix linkItem widget for articles with an item - change (mediawiki...Wikibase)

2013-04-22 Thread Hoo man (Code Review)
Hoo man has submitted this change and it was merged.

Change subject: Fix linkItem widget for articles with an item
..


Fix linkItem widget for articles with an item

Change-Id: I766ec9eb5c82dd570fbd88626c5201b5fb88390c
---
M client/resources/wikibase.client.linkitem.init.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/client/resources/wikibase.client.linkitem.init.js 
b/client/resources/wikibase.client.linkitem.init.js
index 093918e..5fd3470 100644
--- a/client/resources/wikibase.client.linkitem.init.js
+++ b/client/resources/wikibase.client.linkitem.init.js
@@ -35,7 +35,7 @@
 * Displays the link which opens the dialog (using 
jquery.wikibase.linkitem)
 */
$( document ).ready( function() {
-   $( '#wbc-linkToItem' )
+   $( '.wbc-editpage' ).eq(0)
.empty()
.append(
$( 'a' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I766ec9eb5c82dd570fbd88626c5201b5fb88390c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.22-wmf2
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Create a role for Solr in Labs - change (operations/puppet)

2013-04-22 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Create a role for Solr in Labs
..


Create a role for Solr in Labs

Change-Id: Ibbfed04ff81f2fd3bbdf2de0461e0e19db9b84b8
---
M manifests/role/solr.pp
1 file changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/solr.pp b/manifests/role/solr.pp
index 07b5f1f..ac7bcda 100644
--- a/manifests/role/solr.pp
+++ b/manifests/role/solr.pp
@@ -33,14 +33,19 @@
}
 }
 
-class role::solr::geodata {
+class role::solr::geodata($replication_master = 'solr1001.eqiad.wmnet') {
system_role { solr-geodata: description = Solr server for GeoData }
 
include standard
 
class { role::solr:
schema = puppet:///modules/solr/schema-geodata.xml,
-   replication_master = 'solr1001.eqiad.wmnet',
+   replication_master = $replication_master,
}
 }
 
+class role::solr::geodata::labs {
+   class { role::solr::geodata:
+   replication_master = undef,
+   }
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbfed04ff81f2fd3bbdf2de0461e0e19db9b84b8
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Update Wikibase with patch for link item widget - change (mediawiki/core)

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

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


Change subject: Update Wikibase with patch for link item widget
..

Update Wikibase with patch for link item widget

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/60314/1

diff --git a/extensions/Wikibase b/extensions/Wikibase
index a307482..5da3d28 16
--- a/extensions/Wikibase
+++ b/extensions/Wikibase
-Subproject commit a3074825877fa6bdd07f71f2a1eef098df0017cd
+Subproject commit 5da3d28a79bdc9657710efddfc5bc371d06ff441

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82f20ad287c62b3a03be89632303fce3da0c0e9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf2
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] TemplateDataBlob: Fix getHtml exception - change (mediawiki...TemplateData)

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

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


Change subject: TemplateDataBlob: Fix getHtml exception
..

TemplateDataBlob: Fix getHtml exception

getHtml failed with a PHP exception in Html.php regarding
converting stdClass to string.

Change-Id: I9b703d496684a9d389ec6112895a3d21a0c763b3
---
M TemplateDataBlob.php
1 file changed, 6 insertions(+), 3 deletions(-)


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

diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index c30d353..25a0b6d 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -12,6 +12,7 @@
  * @class
  */
 class TemplateDataBlob {
+
/**
 * @var stdClass
 */
@@ -176,10 +177,12 @@
}
 
public function getHtml( IContextSource $context ) {
+   global $wgContLang;
+   $langCode = $wgContLang-getCode();
$data = $this-data;
$html =
Html::openElement( 'div', array( 'class' = 
'mw-templatedata-doc-wrap' ) )
-   . Html::element( 'p', array( 'class' = 
'mw-templatedata-doc-desc' ), $data-description )
+   . Html::element( 'p', array( 'class' = 
'mw-templatedata-doc-desc' ), $data-description-$langCode )
. 'table class=wikitable sortable 
mw-templatedata-doc-params'
. Html::element( 'caption', array(), $context-msg( 
'templatedata-doc-params' ) )
. 'theadtr'
@@ -198,9 +201,9 @@
// Description
. Html::rawElement( 'td', array(
'class' = array(
-   'mw-templatedata-doc-param-empty' = 
$paramObj-description === ''  $paramObj-deprecated === false
+   'mw-templatedata-doc-param-empty' = 
!isset( $paramObj-description-$langCode )  $paramObj-deprecated === false
)
-   ), $paramObj-description !== '' ? 
$paramObj-description : 'no description' )
+   ), isset( $paramObj-description-$langCode ) ? 
$paramObj-description-$langCode : 'no description' )
// Default
. Html::element( 'td', array(
'class' = array(

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

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

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


[MediaWiki-commits] [Gerrit] TemplateDataBlob: Implement cache versioning - change (mediawiki...TemplateData)

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

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


Change subject: TemplateDataBlob: Implement cache versioning
..

TemplateDataBlob: Implement cache versioning

I ran into countless random exceptoins and errors locally due to
cache I build up over time that was no longer valid. Though in
approved commits in the repository there is only 1 version as of
now, I'm sure we will make changes in the future that require a
cache invalidation since getHtml needs to be able to make
assumptions about what properties exist.

Change-Id: I5f61d6030578a711909435c8b996373e9aaa5178
---
M TemplateData.hooks.php
M TemplateDataBlob.php
M api/ApiTemplateData.php
3 files changed, 21 insertions(+), 4 deletions(-)


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

diff --git a/TemplateData.hooks.php b/TemplateData.hooks.php
index d830948..b69a6f9 100644
--- a/TemplateData.hooks.php
+++ b/TemplateData.hooks.php
@@ -86,7 +86,10 @@
return 'div class=error' . $status-getHtml() . 
'/div';
}
 
-   $parser-getOutput()-setProperty( 'templatedata', 
$ti-getJSON() );
+   $parser-getOutput()-setProperty( 'templatedata', serialize( 
array(
+   'version' = TemplateDataBlob::CACHE_VERSION,
+   'json' = $ti-getJSON(),
+   ) ) );
 
$parser-getOutput()-addModules( 'ext.templateData' );
 
diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index 25a0b6d..565f711 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -16,6 +16,11 @@
/**
 * @var stdClass
 */
+   const CACHE_VERSION = 3;
+
+   /**
+* @var stdClass
+*/
private $data;
 
/**
diff --git a/api/ApiTemplateData.php b/api/ApiTemplateData.php
index 808d1ed..0f05e35 100644
--- a/api/ApiTemplateData.php
+++ b/api/ApiTemplateData.php
@@ -79,11 +79,20 @@
$resp = array();
 
foreach ( $res as $row ) {
-   $rawData = $row-pp_value;
+   $rawValue = $row-pp_value;
+   $value = unserialize( $rawValue );
+   if ( !$value ) {
+   $this-dieUsage( 'Page #' . intval( 
$row-pp_page ) . ' templatedata could not be unserialized', 
'templatedata-corrupt' );
+   }
+   $version = $value['version'];
+   if ( $version !== TemplateDataBlob::CACHE_VERSION ) {
+   // FIXME: Schedule purge? Regenerate on-demand?
+   continue;
+   }
+   $rawData = $value['json'];
$data = json_decode( $rawData );
-
if ( !$data ) {
-   $this-dieUsage( 'Corrupt data found in 
templatedata storage for page #' . intval( $row-pp_page ), 
'templatedata-corrupt' );
+   $this-dieUsage( 'Page #' . intval( 
$row-pp_page ) . ' templatedata contains invalid JSON as data', 
'templatedata-corrupt' );
}
$resp[$row-pp_page] = array(
'title' = strval( $titles[$row-pp_page] ),

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

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

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


[MediaWiki-commits] [Gerrit] Strip (N comments) lines from IRC output - change (operations/puppet)

2013-04-22 Thread Demon (Code Review)
Demon has uploaded a new change for review.

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


Change subject: Strip (N comments) lines from IRC output
..

Strip (N comments) lines from IRC output

We want the cover message, not metadata

Change-Id: Ia40a64f05e12336ae2525ec0b7521ec095b42782
---
M files/gerrit/hooks/comment-added
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/files/gerrit/hooks/comment-added b/files/gerrit/hooks/comment-added
index 57b9eed..fbc9cab 100755
--- a/files/gerrit/hooks/comment-added
+++ b/files/gerrit/hooks/comment-added
@@ -20,7 +20,8 @@
 (options, args) = self.parser.parse_args()
 if options.draft == true:
 return  # Don't report drafts to IRC!
-comment = re.sub(r^\s*Patch Set \d+:.*$, '', options.comment, 
flags=re.MULTILINE).strip().splitlines()
+comment = re.sub(r^\s*Patch Set \d+:.*$, '', options.comment, 
flags=re.MULTILINE)
+comment = re.sub(r^\s*\(\d+ comments\).*$, '', comment, 
flags=re.MULTILINE).strip().splitlines()
 if comment:
 comment = comment[0]
 if len(comment)  103:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia40a64f05e12336ae2525ec0b7521ec095b42782
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Demon ch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Improve use of index for fetching most recent feedback activ... - change (mediawiki...ArticleFeedbackv5)

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

Change subject: Improve use of index for fetching most recent feedback activity 
from logging table
..


Improve use of index for fetching most recent feedback activity from logging 
table

Previous code (on current enwiki.logging)
+--+-+-+--+---+---+-+---+-+--+
| id   | select_type | table   | type | possible_keys | key   | key_len | 
ref   | rows| Extra|
+--+-+-+--+---+---+-+---+-+--+
|1 | SIMPLE  | logging | ref  | page_time | page_time | 4   | 
const | 1330612 | Using where; Using temporary; Using filesort |
+--+-+-+--+---+---+-+---+-+--+

This patch (on current enwiki.logging)
+--+-+-+---+---+---+-+--+--+-+
| id   | select_type | table   | type  | possible_keys | key   | key_len | 
ref  | rows | Extra 
  |
+--+-+-+---+---+---+-+--+--+-+
|1 | SIMPLE  | logging | range | page_time | page_time | 261 | 
NULL |   76 | Using index condition; Using where; Using temporary; Using 
filesort |
+--+-+-+---+---+---+-+--+--+-+

Change-Id: Ib6755276a561a30bee1feadd9df5a8442b1ef6e8
---
M ArticleFeedbackv5.activity.php
1 file changed, 18 insertions(+), 9 deletions(-)

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



diff --git a/ArticleFeedbackv5.activity.php b/ArticleFeedbackv5.activity.php
index d872dc3..39cc937 100644
--- a/ArticleFeedbackv5.activity.php
+++ b/ArticleFeedbackv5.activity.php
@@ -380,6 +380,7 @@
 
$activity = array();
$where = array();
+   $titles = array();
 
// build where-clause for all feedback entries
foreach ( $entries as $entry ) {
@@ -418,6 +419,7 @@
$actions = self::buildWhereActions( array(), 
$actions );
if ( $actions ) {
$title = self::buildWhereFeedback( 
$feedback );
+   $titles[] = $title;
$where[] = 'log_title = 
'.$dbr-addQuotes( $title ).' AND '.$actions;
}
}
@@ -425,8 +427,23 @@
 
// if there are entries not found in cache, fetch them from DB
if ( $where ) {
+   $options = array();
+
+   // specific conditions to find the exact action we're 
looking for, per page
$where = array( '('.implode( ') OR (', $where ).')' );
+   $options['GROUP BY'] = array( 'log_namespace', 
'log_title' );
+
+   /*
+* Even though log_title is already in the above 
where-conditions (to find
+* specific actions per title), we'll add these again 
to target index
+* page_time (on _namespace, _title, _timestamp). This 
will result in very
+* few remaining columns (all logging data for maximum
+* ArticleFeedbackv5Model::LIST_LIMIT pages), which can 
then easily be
+* scanned using WHERE.
+*/
$where['log_namespace'] = NS_SPECIAL;
+   $where['log_title'] = $titles;
+   $options['USE INDEX'] = 'page_time';
 
/*
 * The goal is to fetch only the last (editor) action 
for every feedback
@@ -439,15 +456,7 @@
array( 'last_id' = 'MAX(log_id)' ),
$where,
__METHOD__,
-   array(
-   'GROUP BY' = array( 'log_namespace', 
'log_title' ),
-   // Force the page_time index (on 
_namespace, _title, _timestamp)
-   // We don't expect many if any rows for 
Special:ArticleFeedbackv5/foo that
-   // don't match 
log_type='articlefeedbackv5' , so 

[MediaWiki-commits] [Gerrit] StatCounter doc tweaks. - change (mediawiki/core)

2013-04-22 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: StatCounter doc tweaks.
..

StatCounter doc tweaks.

Change-Id: I8882e142170841c70cb620e1ea0246facc30f046
---
M includes/StatCounter.php
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/includes/StatCounter.php b/includes/StatCounter.php
index 23a4e2b..374d5ca 100644
--- a/includes/StatCounter.php
+++ b/includes/StatCounter.php
@@ -26,6 +26,7 @@
  *
  * @file
  * @ingroup StatCounter
+ * @author Aaron Schulz
  */
 
 /**
@@ -85,6 +86,10 @@
$this-deltas = array();
}
 
+   /**
+* @param array $deltas
+* @return void
+*/
protected function sendDeltasUDP( array $deltas ) {
global $wgUDPProfilerHost, $wgUDPProfilerPort, 
$wgAggregateStatsID;
 
@@ -128,6 +133,10 @@
}
}
 
+   /**
+* @param array $deltas
+* @return void
+*/
protected function sendDeltasMemc( array $deltas ) {
global $wgMemc;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8882e142170841c70cb620e1ea0246facc30f046
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] db55 and db73 = mariadb - change (operations/puppet)

2013-04-22 Thread Pyoungmeister (Code Review)
Pyoungmeister has uploaded a new change for review.

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


Change subject: db55 and db73 = mariadb
..

db55 and db73 = mariadb

Change-Id: I793f71b03cb7f1e43ec322afa1c625fd1d35d525
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 1923afb..c40d09e 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -452,7 +452,7 @@
if $hostname == db35 {
class { role::coredb::s5 : mariadb = true }
} elsif $hostname =~ /^db(55|73)/{
-   class { role::coredb::s5 : innodb_file_per_table = true }
+   class { role::coredb::s5 : mariadb = true, 
innodb_file_per_table = true }
} else {
include role::coredb::s5
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I793f71b03cb7f1e43ec322afa1c625fd1d35d525
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Pyoungmeister p...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix ve.ui.get$$'s handling of jQuery selection - change (mediawiki...VisualEditor)

2013-04-22 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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


Change subject: Fix ve.ui.get$$'s handling of jQuery selection
..

Fix ve.ui.get$$'s handling of jQuery selection

Turns out, the context property of a jQuery selection isn't always there.

For example:

$( 'body' ).context === document
$( 'div' ).context === undefined

Even if you later attach that div, so long as you have the old selection 
around, the cached `context` property won't magically be updated. This makes 
sense (although it's poorly documented in the jQuery API) but causes issues for 
us, and pretty much makes the context property useless.

Instead, we can just use the standard `ownerDocument` property, available on 
all DOM elements.

This change also add support for passing in a DOM element directly, in addition 
to the existing support of passing jQuery or Document objects in.

Change-Id: Ib8a31b74f2a4f455b1318be9f5c7805a2a193c79
---
M modules/ve/ui/ve.ui.js
1 file changed, 18 insertions(+), 6 deletions(-)


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

diff --git a/modules/ve/ui/ve.ui.js b/modules/ve/ui/ve.ui.js
index 9ee6bde..d204ba3 100644
--- a/modules/ve/ui/ve.ui.js
+++ b/modules/ve/ui/ve.ui.js
@@ -18,17 +18,29 @@
 /**
  * Gets a jQuery function within a specific document.
  *
- * @param {jQuery|HTMLDocument} context Context to bind the function to
+ * @param {jQuery|HTMLElement|HTMLDocument} context Context to bind the 
function to
  * @param {ve.ui.Frame} [frame] Frame of the document context
  * @returns {Function} Bound jQuery function
  */
 ve.ui.get$$ = function ( context, frame ) {
-   function $$( selector ) {
-   return $( selector, context instanceof jQuery ? context.context 
: context );
+   function wrapper( selector ) {
+   return $( selector, wrapper.context );
}
-   $$.context = context;
+   if ( context instanceof jQuery ) {
+   // jQuery - selections created offscreen won't have a 
context, so .context isn't reliable
+   wrapper.context = context[0].ownerDocument;
+   } else if ( context.ownerDocument ) {
+   // HTMLElement
+   wrapper.context = context.ownerDocument;
+   } else {
+   // HTMLDocument
+   wrapper.context = context;
+   }
+   if ( !wrapper.context ) {
+   throw new Error( 'Invalid context' );
+   }
if ( frame ) {
-   $$.frame = frame;
+   wrapper.frame = frame;
}
-   return $$;
+   return wrapper;
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8a31b74f2a4f455b1318be9f5c7805a2a193c79
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add menu icon - change (mediawiki...VisualEditor)

2013-04-22 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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


Change subject: Add menu icon
..

Add menu icon

Also fix reference icon class name

Change-Id: I3ace9644c74687047995f8c896d4133bbb59ede2
---
M modules/ve/ui/styles/images/icons.ai
A modules/ve/ui/styles/images/icons/menu.png
A modules/ve/ui/styles/images/icons/menu.svg
M modules/ve/ui/styles/ve.ui.Icons-raster.css
M modules/ve/ui/styles/ve.ui.Icons-vector.css
5 files changed, 1,805 insertions(+), 1,013 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ace9644c74687047995f8c896d4133bbb59ede2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Different way of suppressing jshint warnings for constructor... - change (mediawiki...Parsoid)

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

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


Change subject: Different way of suppressing jshint warnings for constructors 
passed as args.
..

Different way of suppressing jshint warnings for constructors passed as args.

Change-Id: I4505938ac5f16f20291b8759350266f462450ee1
---
M js/lib/ext.core.TemplateHandler.js
1 file changed, 2 insertions(+), 4 deletions(-)


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

diff --git a/js/lib/ext.core.TemplateHandler.js 
b/js/lib/ext.core.TemplateHandler.js
index 197cc68..c48bec0 100644
--- a/js/lib/ext.core.TemplateHandler.js
+++ b/js/lib/ext.core.TemplateHandler.js
@@ -614,7 +614,7 @@
 /**
  * Fetch the preprocessed wikitext for a template-like construct
  */
-TemplateHandler.prototype.fetchExpandedTpl = function ( title, text, 
processor, parentCB, cb ) {
+TemplateHandler.prototype.fetchExpandedTpl = function ( title, text, 
Processor, parentCB, cb ) {
var env = this.manager.env;
if ( text in env.pageCache ) {
// XXX: store type too (and cache tokens/x-mediawiki)
@@ -631,9 +631,7 @@
//env.dp( 'requestQueue: ', env.requestQueue );
if ( env.requestQueue[text] === undefined ) {
env.tp( 'Note: Starting new request for ' + text );
-   // fool JSHint to see a capital-case constructor
-   var JSHintFoolingProcessor = processor;
-   env.requestQueue[text] = new JSHintFoolingProcessor( 
env, title, text );
+   env.requestQueue[text] = new Processor( env, title, 
text );
}
// append request, process in document order
env.requestQueue[text].listeners( 'src' ).push( cb );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4505938ac5f16f20291b8759350266f462450ee1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott wikime...@cscott.net

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


[MediaWiki-commits] [Gerrit] Fix a bunch of jshint warnings. - change (mediawiki...Parsoid)

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

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


Change subject: Fix a bunch of jshint warnings.
..

Fix a bunch of jshint warnings.

Most of these warnings are globals defined in mediawiki.parser.defines.js,
which we turn into proper local variables.  But there are a grab page of
other use-before-def, missing semicolon, bad line break, and other minor
warnings.

(No tricky stuff attempted in this patch, this should be safe obvious
fixes only.)

Change-Id: I8810da3a5ec287d7ae9078463ba01472a87a492e
---
M js/lib/ext.Cite.js
M js/lib/ext.core.AttributeExpander.js
M js/lib/ext.core.BehaviorSwitchHandler.js
M js/lib/ext.core.ExtensionHandler.js
M js/lib/ext.core.LinkHandler.js
M js/lib/ext.core.ListHandler.js
M js/lib/ext.core.NoIncludeOnly.js
M js/lib/ext.core.ParagraphWrapper.js
M js/lib/ext.core.ParserFunctions.js
M js/lib/ext.core.PreHandler.js
M js/lib/ext.core.QuoteTransformer.js
M js/lib/ext.core.Sanitizer.js
M js/lib/ext.core.TokenStreamPatcher.js
M js/lib/ext.util.TokenCollector.js
M js/lib/mediawiki.ApiRequest.js
M js/lib/mediawiki.DOMPostProcessor.js
M js/lib/mediawiki.DOMUtils.js
M js/lib/mediawiki.HTML5TreeBuilder.node.js
M js/lib/mediawiki.TokenTransformManager.js
M js/lib/mediawiki.Util.js
M js/lib/mediawiki.WikitextSerializer.js
M js/lib/mediawiki.parser.environment.js
22 files changed, 190 insertions(+), 67 deletions(-)


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

diff --git a/js/lib/ext.Cite.js b/js/lib/ext.Cite.js
index 795b5cb..b49b088 100644
--- a/js/lib/ext.Cite.js
+++ b/js/lib/ext.Cite.js
@@ -5,7 +5,13 @@
 use strict;
 
 var Util = require( './mediawiki.Util.js' ).Util,
+   defines = require('./mediawiki.parser.defines.js'),
$ = require( './fakejquery' );
+// define some constructor shortcuts
+varKV = defines.KV,
+   TagTk = defines.TagTk,
+   SelfclosingTagTk = defines.SelfclosingTagTk,
+   EndTagTk = defines.EndTagTk;
 
 /**
  * Helper class used both by ref and references implementations
@@ -57,7 +63,7 @@
li, a;
 
// Generate the li
-   li = ownerDoc.createElement('li'),
+   li = ownerDoc.createElement('li');
li.setAttribute('li', ref.target);
 
// Set ref content first, so the HTML gets parsed
@@ -154,20 +160,6 @@
pipeline.process(content);
}
 }
-
-/**
- * Native Parsoid implementation of the Cite extension
- * that ties together ref and references
- */
-function Cite() {
-   this.ref = new Ref(this);
-   this.references = new References(this);
-}
-
-Cite.prototype.resetState = function() {
-   this.ref.reset();
-   this.references.reset();
-};
 
 /**
  * Simple token transform version of the Ref extension tag
@@ -404,6 +396,20 @@
}
 };
 
+/**
+ * Native Parsoid implementation of the Cite extension
+ * that ties together ref and references
+ */
+var Cite = function() {
+   this.ref = new Ref(this);
+   this.references = new References(this);
+};
+
+Cite.prototype.resetState = function() {
+   this.ref.reset();
+   this.references.reset();
+};
+
 if (typeof module === object) {
module.exports.Cite = Cite;
 }
diff --git a/js/lib/ext.core.AttributeExpander.js 
b/js/lib/ext.core.AttributeExpander.js
index a34e295..15ade81 100644
--- a/js/lib/ext.core.AttributeExpander.js
+++ b/js/lib/ext.core.AttributeExpander.js
@@ -8,9 +8,14 @@
qs = require('querystring'),
Util = require('./mediawiki.Util.js').Util,
ParserFunctions = 
require('./ext.core.ParserFunctions.js').ParserFunctions,
-   AttributeTransformManager = 
require('./mediawiki.TokenTransformManager.js')
-   
.AttributeTransformManager,
+   AttributeTransformManager = 
require('./mediawiki.TokenTransformManager.js').
+   AttributeTransformManager,
defines = require('./mediawiki.parser.defines.js');
+// define some constructor shortcuts
+var KV = defines.KV,
+TagTk = defines.TagTk,
+SelfclosingTagTk = defines.SelfclosingTagTk,
+EndTagTk = defines.EndTagTk;
 
 /* --
  * This helper method does two different things:
diff --git a/js/lib/ext.core.BehaviorSwitchHandler.js 
b/js/lib/ext.core.BehaviorSwitchHandler.js
index 5d51998..9567656 100644
--- a/js/lib/ext.core.BehaviorSwitchHandler.js
+++ b/js/lib/ext.core.BehaviorSwitchHandler.js
@@ -1,6 +1,12 @@
 use strict;
 
-var Util = require('./mediawiki.Util.js').Util;
+var Util = require('./mediawiki.Util.js').Util,
+defines = require('./mediawiki.parser.defines.js');
+// define some constructor shortcuts
+var KV = defines.KV,
+TagTk = defines.TagTk,
+SelfclosingTagTk = defines.SelfclosingTagTk,
+EndTagTk = defines.EndTagTk;
 
 function BehaviorSwitchHandler( manager, 

[MediaWiki-commits] [Gerrit] db55 and db73 = mariadb - change (operations/puppet)

2013-04-22 Thread Pyoungmeister (Code Review)
Pyoungmeister has submitted this change and it was merged.

Change subject: db55 and db73 = mariadb
..


db55 and db73 = mariadb

Change-Id: I793f71b03cb7f1e43ec322afa1c625fd1d35d525
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 1923afb..c40d09e 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -452,7 +452,7 @@
if $hostname == db35 {
class { role::coredb::s5 : mariadb = true }
} elsif $hostname =~ /^db(55|73)/{
-   class { role::coredb::s5 : innodb_file_per_table = true }
+   class { role::coredb::s5 : mariadb = true, 
innodb_file_per_table = true }
} else {
include role::coredb::s5
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I793f71b03cb7f1e43ec322afa1c625fd1d35d525
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Pyoungmeister p...@wikimedia.org
Gerrit-Reviewer: Pyoungmeister p...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] ensure /var/lib/wikibugs dir exists (home dir for user) - change (operations/puppet)

2013-04-22 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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


Change subject: ensure /var/lib/wikibugs dir exists (home dir for user)
..

ensure /var/lib/wikibugs dir exists (home dir for user)

Change-Id: Ia23806e77f4cdbf12ed41c4d9f29449094a8817c
---
M manifests/misc/wikibugs.pp
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/60324/1

diff --git a/manifests/misc/wikibugs.pp b/manifests/misc/wikibugs.pp
index 30f3e4c..48c1c8c 100644
--- a/manifests/misc/wikibugs.pp
+++ b/manifests/misc/wikibugs.pp
@@ -35,6 +35,11 @@
systemuser { wikibugs: name = 'wikibugs' }
 
file {
+   /var/lib/wikibugs:
+   ensure = directory,
+   owner  = wikibugs,
+   group = wikidev,
+   mode  = 0755;
/var/lib/wikibugs/log:
ensure = directory,
owner  = wikibugs,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia23806e77f4cdbf12ed41c4d9f29449094a8817c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 46712) Set a different favicon for iswiktionary - change (operations/mediawiki-config)

2013-04-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 46712) Set a different favicon for iswiktionary
..


(bug 46712) Set a different favicon for iswiktionary

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cf29eed..8921270 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9394,8 +9394,9 @@
'wiktionary'= 
'//bits.wikimedia.org/favicon/piece.ico',
 
# Wiktionaries
-   'enwiktionary'  = 
'//bits.wikimedia.org/favicon/wiktionary/en.ico', // Bug 44843
'cswiktionary'  = 
'//bits.wikimedia.org/favicon/wiktionary/en.ico', // Bug 45113
+   'enwiktionary'  = 
'//bits.wikimedia.org/favicon/wiktionary/en.ico', // Bug 44843
+   'iswiktionary'  = 
'//bits.wikimedia.org/favicon/wiktionary/en.ico', // Bug 46712
'siwiktionary'  = 
'//bits.wikimedia.org/favicon/wiktionary/si.ico', // Bug 38036
 
# Other wikis

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8245a2155cba97cd8f486ca673322fc73c7f875a
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: MZMcBride w...@mzmcbride.com
Gerrit-Reviewer: Odder tom...@twkozlowski.net
Gerrit-Reviewer: Platonides platoni...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Enable GeoData in Labs - change (operations/mediawiki-config)

2013-04-22 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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


Change subject: Enable GeoData in Labs
..

Enable GeoData in Labs

Change-Id: Id65b4b082bc678c29da1419fad21e1c066d741f0
---
M wmf-config/CommonSettings-labs.php
M wmf-config/InitialiseSettings-labs.php
2 files changed, 29 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index d06ac30..da70101 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -47,6 +47,29 @@
 // So that people can easily test the captchas without making accounts -- 
Platonides
 $wgGroupPermissions['autoconfirmed']['skipcaptcha'] = false;
 
+if ( $wmgEnableGeoData ) {
+   require_once( $IP/extensions/GeoData/GeoData.php );
+   $wgGeoDataBackend = 'solr';
+   $wgGeoDataSolrMaster = 'deployment-solr.pmtpa.wmflabs';
+   $wgGeoDataSolrHosts = array(
+   'deployment-solr.pmtpa.wmflabs' = 100,
+   );
+
+   # Data collection mode
+   if ( !$wmgEnableGeoSearch ) {
+   $wgAPIGeneratorModules['geosearch'] = 'ApiQueryDisabled';
+   $wgAPIListModules['geosearch'] = 'ApiQueryDisabled';
+   }
+
+   # These modules have been intentionally disabled for the first phase of 
deployment
+   if ( $wgDBname !== 'testwiki' ) {
+   unset( $wgAPIListModules['geopages'] );
+   unset( $wgAPIListModules['geopagesincategory'] );
+   }
+   $wgMaxCoordinatesPerPage = 2000;
+}
+
+
 
 # temporary extensions
 # 
diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index d741b89..952f807 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -231,6 +231,12 @@
'-wmgUseWikibaseClient' = array(
'default' = false,
),
+
+   'wmgEnableGeoData' = array(
+   'default' = false,
+   'wiki' = true,
+   'wikivoyage' = true,
+   ),
 );
 
 } # wmflLabsSettings()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id65b4b082bc678c29da1419fad21e1c066d741f0
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Bumped RING_SIZE to use 28 bits to improve weight accuracy a... - change (mediawiki/core)

2013-04-22 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Bumped RING_SIZE to use 28 bits to improve weight accuracy a 
bit.
..

Bumped RING_SIZE to use 28 bits to improve weight accuracy a bit.

Change-Id: I4dbecd292fd404e43ed296dd37892db113fa1026
---
M includes/HashRing.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/60326/1

diff --git a/includes/HashRing.php b/includes/HashRing.php
index 10a3c9c..227a287 100644
--- a/includes/HashRing.php
+++ b/includes/HashRing.php
@@ -30,7 +30,7 @@
/** @var Array (location = (start, end)) */
protected $ring = array();
 
-   const RING_SIZE = 16777216; // 2^24
+   const RING_SIZE = 268435456; // 2^28
 
/**
 * @param array $map (location = weight)
@@ -86,7 +86,7 @@
public function getLocations( $item, $limit ) {
$locations = array();
$primaryLocation = null;
-   $spot = hexdec( substr( sha1( $item ), 0, 6 ) ); // first 24 
bits
+   $spot = hexdec( substr( sha1( $item ), 0, 7 ) ); // first 28 
bits
foreach ( $this-ring as $location = $range ) {
if ( count( $locations ) = $limit ) {
break;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dbecd292fd404e43ed296dd37892db113fa1026
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Bumped RING_SIZE to use 28 bits to improve weight accuracy a... - change (mediawiki/core)

2013-04-22 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Bumped RING_SIZE to use 28 bits to improve weight accuracy a 
bit.
..


Bumped RING_SIZE to use 28 bits to improve weight accuracy a bit.

Change-Id: I4dbecd292fd404e43ed296dd37892db113fa1026
---
M includes/HashRing.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/includes/HashRing.php b/includes/HashRing.php
index 10a3c9c..227a287 100644
--- a/includes/HashRing.php
+++ b/includes/HashRing.php
@@ -30,7 +30,7 @@
/** @var Array (location = (start, end)) */
protected $ring = array();
 
-   const RING_SIZE = 16777216; // 2^24
+   const RING_SIZE = 268435456; // 2^28
 
/**
 * @param array $map (location = weight)
@@ -86,7 +86,7 @@
public function getLocations( $item, $limit ) {
$locations = array();
$primaryLocation = null;
-   $spot = hexdec( substr( sha1( $item ), 0, 6 ) ); // first 24 
bits
+   $spot = hexdec( substr( sha1( $item ), 0, 7 ) ); // first 28 
bits
foreach ( $this-ring as $location = $range ) {
if ( count( $locations ) = $limit ) {
break;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dbecd292fd404e43ed296dd37892db113fa1026
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Move SiteMatrix special page to its own file - change (mediawiki...SiteMatrix)

2013-04-22 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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


Change subject: Move SiteMatrix special page to its own file
..

Move SiteMatrix special page to its own file

Change-Id: Ic1e275fec7ba0667a4d51459c871eb8ee13d0f62
---
M SiteMatrix.php
M SiteMatrix_body.php
A SpecialSiteMatrix.php
3 files changed, 146 insertions(+), 146 deletions(-)


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

diff --git a/SiteMatrix.php b/SiteMatrix.php
index 98a2f56..aa0d29e 100644
--- a/SiteMatrix.php
+++ b/SiteMatrix.php
@@ -72,8 +72,9 @@
 $wgExtensionMessagesFiles['SiteMatrixAlias'] = $dir . 'SiteMatrix.alias.php';
 
 $wgAutoloadClasses['SiteMatrix'] = $dir . 'SiteMatrix_body.php';
-$wgAutoloadClasses['SiteMatrixPage'] = $dir . 'SiteMatrix_body.php';
-$wgSpecialPages['SiteMatrix'] = 'SiteMatrixPage';
+
+$wgAutoloadClasses['SpecialSiteMatrix'] = $dir . 'SpecialSiteMatrix.php';
+$wgSpecialPages['SiteMatrix'] = 'SpecialSiteMatrix';
 $wgSpecialPageGroups['SiteMatrix'] = 'wiki';
 
 $wgAutoloadClasses['ApiQuerySiteMatrix'] = $dir . 'SiteMatrixApi.php';
diff --git a/SiteMatrix_body.php b/SiteMatrix_body.php
index 10c576f..e794812 100644
--- a/SiteMatrix_body.php
+++ b/SiteMatrix_body.php
@@ -5,9 +5,6 @@
exit( 1 );
 }
 
-global $IP;
-require_once( $IP . '/languages/Names.php' );
-
 class SiteMatrix {
protected $langlist, $sites, $names, $hosts;
 
@@ -347,146 +344,5 @@
}
 
return true;
-   }
-}
-
-class SiteMatrixPage extends SpecialPage {
-
-   function __construct() {
-   parent::__construct( 'SiteMatrix' );
-   }
-
-   /**
-* @return array
-*/
-   public static function getLocalLanguageNames() {
-   if ( class_exists( 'LanguageNames' ) ) {
-   global $wgLang;
-   return LanguageNames::getNames( $wgLang-getCode() );
-   }
-   return array();
-   }
-
-   function execute( $par ) {
-   $langNames = Language::fetchLanguageNames();
-
-   $this-setHeaders();
-   $this-outputHeader();
-
-   $matrix = new SiteMatrix();
-
-   $localLanguageNames = self::getLocalLanguageNames();
-
-   # Construct the HTML
-
-   # Header row
-   $s = Xml::openElement( 'table', array( 'class' = 'wikitable', 
'id' = 'mw-sitematrix-table' ) ) .
-   tr .
-   Xml::element( 'th',
-   array( 'rowspan' = 2 ),
-   $this-msg( 'sitematrix-language' )-text() ) .
-   Xml::element( 'th',
-   array( 'colspan' = count( $matrix-getSites() 
) ),
-   $this-msg( 'sitematrix-project' )-text() ) .
-   /tr
-   tr;
-   foreach ( $matrix-getNames() as $id = $name ) {
-   $url = $matrix-getSiteUrl( $id );
-   $s .= Xml::tags( 'th', null, a 
href=\{$url}\{$name}/a );
-   }
-   $s .= /tr\n;
-
-   # Bulk of table
-   foreach ( $matrix-getLangList() as $lang ) {
-   $anchor = strtolower( 'a id=' . htmlspecialchars( 
$lang ) . ' name=' . htmlspecialchars( $lang ) . '/a' );
-   $s .= 'tr';
-   $attribs = array();
-   if ( isset( $localLanguageNames[$lang] ) ) {
-   $attribs['title'] = $localLanguageNames[$lang];
-   }
-
-   $langDisplay = ( isset( $langNames[$lang] ) ? 
Html::rawElement( 'span', array( 'lang' = htmlspecialchars( $lang ) ), 
$langNames[$lang] ) : '' );
-   if ( isset( $localLanguageNames[$lang] )  strlen( 
$localLanguageNames[$lang] )  $langDisplay != $localLanguageNames[$lang] ) {
-   $langDisplay .= $this-msg( 'word-separator' 
)-text() .
-$this-msg( 'parentheses', 
$localLanguageNames[$lang] )-text();
-   }
-   $s .= 'td' . $anchor . Html::rawElement( 'strong', 
$attribs, $langDisplay ) . '/td';
-
-   foreach ( $matrix-getNames() as $site = $name ) {
-   $url = $matrix-getUrl( $lang, $site );
-   if ( $matrix-exist( $lang, $site ) ) {
-   # Wiki exists
-   $closed = $matrix-isClosed( $lang, 
$site );
-   $s .= td . ( $closed ? del : '' 
) . a href=\{$url}\{$lang}/a . ( $closed ? /del : '' ) . '/td';
-   } else {
-   # 

[MediaWiki-commits] [Gerrit] ensure /var/lib/wikibugs dir exists (home dir for user) - change (operations/puppet)

2013-04-22 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: ensure /var/lib/wikibugs dir exists (home dir for user)
..


ensure /var/lib/wikibugs dir exists (home dir for user)

PS2: fix quoting (quote resource titles and file modes,
 single quotes if no variables, double quotes if vars)
Change-Id: Ia23806e77f4cdbf12ed41c4d9f29449094a8817c
---
M manifests/misc/wikibugs.pp
1 file changed, 15 insertions(+), 10 deletions(-)

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



diff --git a/manifests/misc/wikibugs.pp b/manifests/misc/wikibugs.pp
index 30f3e4c..9741379 100644
--- a/manifests/misc/wikibugs.pp
+++ b/manifests/misc/wikibugs.pp
@@ -21,31 +21,36 @@
# default one. Values are hardcoded in the Wikibugs perl script
$ircecho_logbase = '/var/lib/wikibugs/logs'
$ircecho_logs = {
-   ${ircecho_logbase}/wikimedia-labs.log   = 
#wikimedia-labs,
-   ${ircecho_logbase}/wikimedia-mobile.log = 
#wikimedia-mobile,
-   ${ircecho_logbase}/wikimedia-dev.log= 
#wikimedia-dev,
+   ${ircecho_logbase}/wikimedia-labs.log   = 
'#wikimedia-labs',
+   ${ircecho_logbase}/wikimedia-mobile.log = 
'#wikimedia-mobile',
+   ${ircecho_logbase}/wikimedia-dev.log= 
'#wikimedia-dev',
}
 
-   $ircecho_nick = wikibugs
+   $ircecho_nick = 'wikibugs'
$ircecho_server = 'chat.freenode.net'
 
include misc::ircecho
include misc::irc::wikibugs::packages
 
-   systemuser { wikibugs: name = 'wikibugs' }
+   systemuser { 'wikibugs': name = 'wikibugs' }
 
file {
-   /var/lib/wikibugs/log:
+   '/var/lib/wikibugs':
ensure = directory,
owner  = wikibugs,
group = wikidev,
-   mode  = 0775,
+   mode  = '0755';
+   '/var/lib/wikibugs/log':
+   ensure = directory,
+   owner  = wikibugs,
+   group = wikidev,
+   mode  = '0775',
require = User['wikibugs'];
}
 
-   git::clone { wikibugs :
-   directory = /var/lib/wikibugs/bin,
-   origin = 
https://gerrit.wikimedia.org/r/p/wikimedia/bugzilla/wikibugs.git;,
+   git::clone { 'wikibugs' :
+   directory = '/var/lib/wikibugs/bin',
+   origin = 
'https://gerrit.wikimedia.org/r/p/wikimedia/bugzilla/wikibugs.git',
owner = wikibugs,
group = wikidev,
require = User['wikibugs'];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia23806e77f4cdbf12ed41c4d9f29449094a8817c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Blacklist alias languages on Special:SiteMatrix - change (mediawiki...SiteMatrix)

2013-04-22 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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


Change subject: Blacklist alias languages on Special:SiteMatrix
..

Blacklist alias languages on Special:SiteMatrix

Bug: 27194
Change-Id: I57d4a6d794cbb1cc746a08d3a4289431c768b5a1
---
M SiteMatrix_body.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/SiteMatrix_body.php b/SiteMatrix_body.php
index 10c576f..fbb93d7 100644
--- a/SiteMatrix_body.php
+++ b/SiteMatrix_body.php
@@ -398,6 +398,9 @@
 
# Bulk of table
foreach ( $matrix-getLangList() as $lang ) {
+   if ( in_array( $lang, array( 'cz', 'dk', 'epo', 'jp', 
'minnan', 'nan', 'nb', 'zh-cfr' ) ) ) {
+   continue;
+   }
$anchor = strtolower( 'a id=' . htmlspecialchars( 
$lang ) . ' name=' . htmlspecialchars( $lang ) . '/a' );
$s .= 'tr';
$attribs = array();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57d4a6d794cbb1cc746a08d3a4289431c768b5a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SiteMatrix
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Added unit tests for getRelativeOffset method - change (mediawiki...VisualEditor)

2013-04-22 Thread Inez (Code Review)
Inez has uploaded a new change for review.

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


Change subject: Added unit tests for getRelativeOffset method
..

Added unit tests for getRelativeOffset method

Change-Id: I45538f3e698229c003097c84edceac7ae4e4eb05
---
M modules/ve/test/ce/ve.ce.Document.test.js
1 file changed, 65 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve/test/ce/ve.ce.Document.test.js 
b/modules/ve/test/ce/ve.ce.Document.test.js
index d29e0ad..1e13621 100644
--- a/modules/ve/test/ce/ve.ce.Document.test.js
+++ b/modules/ve/test/ce/ve.ce.Document.test.js
@@ -17,3 +17,68 @@
assert.equalNodeSelection( cases[i].actual, cases[i].expected, 
cases[i].msg );
}
 } );
+
+QUnit.test( 'getRelativeOffset', function ( assert ) {
+   var documentModel = ve.dm.example.createExampleDocument( 'alienData' ),
+   documentView = new ve.ce.Document( documentModel ),
+   tests = [
+   {
+   direction: 1,
+   unit: 'character',
+   cases: [
+   { input: 0, output: 3 },
+   { input: 3, output: 4 },
+   { input: 4, output: 6 },
+   { input: 6, output: 7 },
+   { input: 7, output: 10 }
+   ]
+   },
+   {
+   direction: 1,
+   unit: 'word',
+   cases: [
+   { input: 0, output: 3 },
+   { input: 3, output: 4 },
+   { input: 4, output: 6 },
+   { input: 6, output: 7 },
+   { input: 7, output: 10 }
+   ]
+   },
+   {
+   direction: -1,
+   unit: 'character',
+   cases: [
+   { input: 10, output: 7 },
+   { input: 7, output: 6 },
+   { input: 6, output: 4 },
+   { input: 4, output: 3 },
+   { input: 3, output: 0 }
+   ]
+   },
+   {
+   direction: -1,
+   unit: 'word',
+   cases: [
+   { input: 10, output: 7 },
+   { input: 7, output: 6 },
+   { input: 6, output: 4 },
+   { input: 4, output: 3 },
+   { input: 3, output: 0 }
+   ]
+   }
+   ], i, j, expectCount = 0;
+   for ( i = 0; i  tests.length; i++ ) {
+   for ( j = 0; j  tests[i].cases.length; j++ ) {
+   assert.equal(
+   documentView.getRelativeOffset(
+   tests[i].cases[j].input,
+   tests[i].direction,
+   tests[i].unit
+   ),
+   tests[i].cases[j].output
+   );
+   }
+   expectCount += tests[i].cases.length;
+   }
+   expect( expectCount );
+} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45538f3e698229c003097c84edceac7ae4e4eb05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Inez i...@wikia-inc.com

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


[MediaWiki-commits] [Gerrit] Update entities version dependency, conditionally use workar... - change (mediawiki...Parsoid)

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

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


Change subject: Update entities version dependency, conditionally use 
workaround.
..

Update entities version dependency, conditionally use workaround.

Once everyone is using the new entities version, we'll punt the
workaround entirely.

Change-Id: I84a485296973c7e69084554564ac47ae0ebc9447
---
M js/lib/mediawiki.Util.js
M js/package.json
2 files changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/31/60331/1

diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index 7b67257..8ce50da 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -14,11 +14,13 @@
 
 /** WORKAROUND HACK to entities package, using domino. */
 // see https://github.com/fb55/node-entities/issues/8
-entities.decodeHTML5 = function(data) {
-   return data.replace(/(#\d+|#[xX][0-9a-fA-F]+|[A-Za-z]+);/g, 
function(e) {
-   return domino.createDocument('x'+e).body.textContent.substr(1);
-   });
-};
+if ( /^0.2.[01]$/.test( require( 'entities/package.json' ).version ) ) {
+   entities.decodeHTML5 = function(data) {
+   return data.replace(/(#\d+|#[xX][0-9a-fA-F]+|[A-Za-z]+);/g, 
function(e) {
+   return 
domino.createDocument('x'+e).body.textContent.substr(1);
+   });
+   };
+}
 
 /**
  * @class
diff --git a/js/package.json b/js/package.json
index d0eb36a..1973f37 100644
--- a/js/package.json
+++ b/js/package.json
@@ -4,7 +4,7 @@
version: 0.0.1,
dependencies: {
alea: ~0.0.9,
-   entities: ~0.2.1,
+   entities: ~0.2.2,
events: 0.x.x,
request: 2.x.x,
querystring: 0.x.x,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84a485296973c7e69084554564ac47ae0ebc9447
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott wikime...@cscott.net

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


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

2013-04-22 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Update README
..

Update README

Re-write the documentation, on the off-chance that this module proves useful to
people outside the WMF.

Change-Id: I9b3297f540154b1d08f1d4be3324a4a08bb84c25
---
D modules/ipython/README
A modules/ipython/README.mkd
2 files changed, 56 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/32/60332/1

diff --git a/modules/ipython/README b/modules/ipython/README
deleted file mode 100644
index 5a02dc7..000
--- a/modules/ipython/README
+++ /dev/null
@@ -1,34 +0,0 @@
-== Puppet module for IPython
-
-=== What is it?
-
-This folder contains a Puppet module for configuring an integrated, web-based
-numeric computation environment (like Mathematica), based on PyLab and IPython
-Notebook.
-
-See RDoc in manifests/init.pp for a listing of various configuration options
-and their default values.
-
-
-=== Usage
-
-To use the default options, you can simply add this to your manifest:
-
-   class { 'ipython::notebook': }
-
-
-=== Limitations
-
- * Ubuntu-specific, as it depends on Upstart.
-
-
-=== Links
-
- * http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html
- * http://www.scipy.org/PyLab
-
-
-=== Copyright
-
-  Copyright (C) 2013 by Ori Livneh o...@wikimedia.org
-  Licensed under the GNU Public License, version 2 or later.
diff --git a/modules/ipython/README.mkd b/modules/ipython/README.mkd
new file mode 100644
index 000..7c1cbf6
--- /dev/null
+++ b/modules/ipython/README.mkd
@@ -0,0 +1,56 @@
+Puppet module for IPython
+=
+
+What is it?
+---
+
+This folder contains a Puppet module for [IPython][1], a platform for
+interactive computing using Python. The module is especially suited for
+configuring [IPython Notebook][2], an integrated, web-based numeric
+computation environment (like Mathematica), with rich support for
+mathematical expressions, inline plots and other rich media.
+
+
+Usage
+-
+
+The typical use-case for this module is the configuration of an IPython
+Notebook server. To provision this setup, simply include the class
+'ipython::notebook'. By default, it will set up an IPython Notebook
+web server, running under a dedicated 'ipython' user account.
+
+Example:
+
+   class { 'ipython::notebook':
+   port = 80,
+   }
+
+For a full listing of module parameters, see the comment blocks at the
+top of each file in the 'manifests' subdirectory.
+
+
+Limitations
+---
+
+ * This module targets Ubuntu and has not been tested against other
+   platforms. It depends on Upstart and on packages in Ubuntu's
+   'universe' component.
+ * Support for configuring [IPython for parallel computing][3] is
+   currently rudimentary, but additional work on this front is
+   forthcoming.
+   
+
+License
+---
+
+  Copyright (C) 2013 by Ori Livneh o...@wikimedia.org
+  
+  Licensed under the GNU Public License, version 2 or later.
+
+
+
+ [1]: http://ipython.org/
+ 
+ [2]: http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html
+ 
+ [3]: http://ipython.org/ipython-doc/dev/parallel/

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b3297f540154b1d08f1d4be3324a4a08bb84c25
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Provide 'certfile' and 'password' parameters - change (operations/puppet)

2013-04-22 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Provide 'certfile' and 'password' parameters
..

Provide 'certfile' and 'password' parameters

IPython's auth and SSL features are a bit dinky, so we decided to keep the
service private rather than rely on the robustness of these features. I'd like
this module to be useful to third parties, though, so I added class parameters
for these configuration options. I'm sure they have their use-cases -- just not
for us.

I also added an explicit check for $::operatingsystem which fails if it's not
Ubuntu. I'd like to add support for additional platforms in the future, but
in the meantime it's better to clearly communicate this limitation.

Change-Id: Idd4f5c6f6ac6c286d7fd661908748cd4c8d3f759
---
M modules/ipython/manifests/init.pp
M modules/ipython/manifests/notebook.pp
M modules/ipython/templates/ipython_notebook_config.py.erb
3 files changed, 23 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/60333/1

diff --git a/modules/ipython/manifests/init.pp 
b/modules/ipython/manifests/init.pp
index b5d24ba..1dbbb3b 100644
--- a/modules/ipython/manifests/init.pp
+++ b/modules/ipython/manifests/init.pp
@@ -37,6 +37,10 @@
$group  = 'ipython'
 ) {
 
+   if $::operatingsystem != Ubuntu {
+   fail(Module $module_name is not supported on 
$::operatingsystem)
+   }
+
package { 'ipython':
ensure = latest,
}
diff --git a/modules/ipython/manifests/notebook.pp 
b/modules/ipython/manifests/notebook.pp
index 85206c4..70f82cd 100644
--- a/modules/ipython/manifests/notebook.pp
+++ b/modules/ipython/manifests/notebook.pp
@@ -37,6 +37,15 @@
 # [*port*]
 #   The port the Notebook server will listen on (default: ).
 #
+# [*certfile*]
+#   Fully qualified path to your SSL certificate's .pem file. If
+#   unspecified, the server will not be configured for SSL.
+#
+# [*password*]
+#   If specified, the web interface will require users to authenticate
+#   using this shared secret key. By default, the server does not
+#   attempt to authenticate users.
+#
 # [*exec_files*]
 #   Array of fully qualified paths to Python files to execute at start of
 #   Notebook session (default: none).
@@ -50,6 +59,8 @@
$notebookdir  = ${ipython::ipythondir}/notebooks,
$port = ,
$ip   = '*',
+   $certfile = undef,
+   $password = undef,
$exec_files   = []
 ) inherits ipython {
 
@@ -94,6 +105,6 @@
require   = [
Package['ipython-notebook'],
File['/etc/init/ipython-notebook.conf'],
-   ]
+   ],
}
 }
diff --git a/modules/ipython/templates/ipython_notebook_config.py.erb 
b/modules/ipython/templates/ipython_notebook_config.py.erb
index da81fd6..107bfc4 100644
--- a/modules/ipython/templates/ipython_notebook_config.py.erb
+++ b/modules/ipython/templates/ipython_notebook_config.py.erb
@@ -7,6 +7,13 @@
 c.NotebookApp.open_browser = False
 c.NotebookApp.ip = '%= @ip %'
 c.NotebookApp.port = %= @port %
+% if @certfile -%
+c.NotebookApp.certfile = u'%= @certfile %'
+% end -%
+% if @password -%
+c.NotebookApp.password = u'sha1:%= scope.function_sha1([password]) %'
+% end -%
+
 c.NotebookManager.notebook_dir = '%= @notebookdir %'
 
 c.InteractiveShellApp.exec_files = [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd4f5c6f6ac6c286d7fd661908748cd4c8d3f759
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] MWTemplateNode should serialise original HTML if unchanged - change (mediawiki...VisualEditor)

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

Change subject: MWTemplateNode should serialise original HTML if unchanged
..


MWTemplateNode should serialise original HTML if unchanged

To help the selective serialiser we can return the original
HTML for generated content if it is unmodified.

As the output of toDomElements now depends on changes
to the dataElement we now have a 'modify' function in
the some test cases.

We also now have 'storeItems' to assert that the index-value
store is correctly populated and for loading values back
into the store for toDomElements tests.

Also make 'mw' an attribute and remove 'about' property.

Bug: 47394
Change-Id: I2bbb5d2d6a90c4eb87fa129671112c92a9b931e7
---
M modules/ve/dm/nodes/ve.dm.MWTemplateNode.js
M modules/ve/dm/ve.dm.Converter.js
M modules/ve/test/dm/ve.dm.Converter.test.js
M modules/ve/test/dm/ve.dm.example.js
4 files changed, 169 insertions(+), 67 deletions(-)

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



diff --git a/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js 
b/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js
index 0da0b13..823ebdd 100644
--- a/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js
+++ b/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js
@@ -35,34 +35,45 @@
 ve.dm.MWTemplateNode.static.getHashObject = function ( dataElement ) {
return {
type: dataElement.type,
-   mw: dataElement.mw
+   mw: dataElement.attributes.mw
};
 };
 
 ve.dm.MWTemplateNode.static.toDataElement = function ( domElements, converter 
) {
var dataElement,
-   about = domElements[0].getAttribute( 'about' ),
mw = JSON.parse( domElements[0].getAttribute( 'data-mw' ) ),
isInline = this.isHybridInline( domElements, converter ),
type = isInline ? 'MWtemplateInline' : 'MWtemplateBlock';
 
dataElement = {
'type': type,
-   'mw': mw,
-   'about': about
+   'attributes': {
+   'mw': mw,
+   'mwOriginal': ve.copyObject( mw )
+   }
};
this.storeHtml( dataElement, domElements, converter.getStore() );
return dataElement;
 };
 
-ve.dm.MWTemplateNode.static.toDomElements = function ( dataElement, doc ) {
-   var span = doc.createElement( 'span' );
-   // All we need to send back to Parsoid is the original template marker,
-   // with a reconstructed data-mw property.
-   span.setAttribute( 'about', dataElement.about );
-   span.setAttribute( 'typeof', 'mw:Object/Template' );
-   span.setAttribute( 'data-mw', JSON.stringify( dataElement.mw ) );
-   return [ span ];
+ve.dm.MWTemplateNode.static.toDomElements = function ( dataElement, doc, 
converter ) {
+   var wrapper, span, index, html;
+   if ( ve.compareObjects( dataElement.attributes.mw, 
dataElement.attributes.mwOriginal ) ) {
+   // If the template is unchanged just send back the original 
html so selser can skip over it
+   index = converter.getStore().indexOfHash( ve.getHash( 
this.getHashObject( dataElement ) ) );
+   html = converter.getStore().value( index );
+   wrapper = doc.createElement( 'div' );
+   $( wrapper ).html( html );
+   // Convert wrapper.children to an array
+   return Array.prototype.slice.call( wrapper.childNodes, 0 );
+   } else {
+   span = doc.createElement( 'span' );
+   // All we need to send back to Parsoid is the original template 
marker,
+   // with a reconstructed data-mw property.
+   span.setAttribute( 'typeof', 'mw:Object/Template' );
+   span.setAttribute( 'data-mw', JSON.stringify( 
dataElement.attributes.mw ) );
+   return [ span ];
+   }
 };
 
 /* Concrete subclasses */
diff --git a/modules/ve/dm/ve.dm.Converter.js b/modules/ve/dm/ve.dm.Converter.js
index 66191be..e5e1701 100644
--- a/modules/ve/dm/ve.dm.Converter.js
+++ b/modules/ve/dm/ve.dm.Converter.js
@@ -770,26 +770,27 @@
  */
 ve.dm.Converter.prototype.getDomFromData = function ( store, data ) {
var doc = ve.createDocumentFromHTML( '' );
-   this.getDomSubtreeFromData( store, data, doc.body );
+   this.store = store;
+   this.getDomSubtreeFromData( data, doc.body );
+   this.store = null;
return doc;
 };
 
 /**
  * Convert linear model data to an HTML DOM subtree and add it to a container 
element.
  *
- * @param {ve.dm.IndexValueStore} store Index-value store
  * @param {Array} data Linear model data
  * @param {HTMLElement} container DOM element to add the generated elements 
to. Should be empty.
  * @throws Unbalanced data: looking for closing /type
  */
-ve.dm.Converter.prototype.getDomSubtreeFromData = function ( store, data, 
container ) {

[MediaWiki-commits] [Gerrit] Stop dropping properties in copyObject/copyArray - change (mediawiki...VisualEditor)

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

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


Change subject: Stop dropping properties in copyObject/copyArray
..

Stop dropping properties in copyObject/copyArray

Previously, if we didn't know about a property type we would just drop it.
This led to various fixes to add support for booleans, nulls, etc. We're
now having problems again, this time with functions not being copied.

So instead of only copying types we know how to copy, deep clone the ones
we know how to and shallow copy the ones we don't know about. This seems
like a saner approach to me. Besides, it doesn't seem like cloning a
function is even possible in JS.

Change-Id: Idd1546ce3a43087a8b96a37101431e466e02f04f
---
M modules/ve/ve.js
1 file changed, 6 insertions(+), 8 deletions(-)


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

diff --git a/modules/ve/ve.js b/modules/ve/ve.js
index 720e224..005da32 100644
--- a/modules/ve/ve.js
+++ b/modules/ve/ve.js
@@ -479,15 +479,14 @@
for ( i = 0; i  source.length; i++ ) {
sourceValue = source[i];
sourceType = typeof sourceValue;
-   if ( sourceType === 'string' || sourceType === 'number' 
|| sourceType === 'boolean' ||
-   sourceType === 'undefined' || 
sourceValue === null ) {
-   destination.push( sourceValue );
-   } else if ( ve.isPlainObject( sourceValue ) ) {
+   if ( ve.isPlainObject( sourceValue ) ) {
destination.push( ve.copyObject( sourceValue ) 
);
} else if ( ve.isArray( sourceValue ) ) {
destination.push( ve.copyArray( sourceValue ) );
} else if ( sourceValue  typeof sourceValue.clone === 
'function' ) {
destination.push( sourceValue.clone() );
+   } else {
+   destination.push( sourceValue );
}
}
return destination;
@@ -509,15 +508,14 @@
for ( key in source ) {
sourceValue = source[key];
sourceType = typeof sourceValue;
-   if ( sourceType === 'string' || sourceType === 'number' 
|| sourceType === 'boolean' ||
-   sourceType === 'undefined' || 
sourceValue === null ) {
-   destination[key] = sourceValue;
-   } else if ( ve.isPlainObject( sourceValue ) ) {
+   if ( ve.isPlainObject( sourceValue ) ) {
destination[key] = ve.copyObject( sourceValue );
} else if ( ve.isArray( sourceValue ) ) {
destination[key] = ve.copyArray( sourceValue );
} else if ( sourceValue  typeof sourceValue.clone === 
'function' ) {
destination[key] = sourceValue.clone();
+   } else {
+   destination[key] = sourceValue;
}
}
return destination;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd1546ce3a43087a8b96a37101431e466e02f04f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope roan.katt...@gmail.com

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


[MediaWiki-commits] [Gerrit] wikibugs - also need /var/lib/wikibugs/bin summarize needed ... - change (operations/puppet)

2013-04-22 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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


Change subject: wikibugs - also need /var/lib/wikibugs/bin summarize needed 
directories, set File defaults, retab 2-space softtabs, align arrows to make 
puppet-lint like it more
..

wikibugs - also need /var/lib/wikibugs/bin
summarize needed directories, set File defaults,
retab 2-space softtabs, align arrows to make puppet-lint like
it more

Change-Id: I72956a74ab0c965297fc6801e88df3348122a7ab
---
M manifests/misc/wikibugs.pp
1 file changed, 48 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/60336/1

diff --git a/manifests/misc/wikibugs.pp b/manifests/misc/wikibugs.pp
index 9741379..2440f8f 100644
--- a/manifests/misc/wikibugs.pp
+++ b/manifests/misc/wikibugs.pp
@@ -8,13 +8,14 @@
 
 # Package dependencies for the wikibugs script
 class misc::irc::wikibugs::packages {
-   package { 'libemail-mime-perl':
-   ensure = present;
-   }
+  package { 'libemail-mime-perl':
+ensure = present;
+  }
 }
 
 class misc::irc::wikibugs {
 
+ HEAD
# We are an IRC bot!
 
# Some Bugzilla product have been blessed with their own log files out 
of the
@@ -55,4 +56,48 @@
group = wikidev,
require = User['wikibugs'];
}
+===
+  # We are an IRC bot!
+
+  # Some Bugzilla product have been blessed with their own log files out of the
+  # default one. Values are hardcoded in the Wikibugs perl script
+  $ircecho_logbase = '/var/lib/wikibugs/logs'
+  $ircecho_logs = {
+${ircecho_logbase}/wikimedia-labs.log   = '#wikimedia-labs',
+${ircecho_logbase}/wikimedia-mobile.log = '#wikimedia-mobile',
+${ircecho_logbase}/wikimedia-dev.log= '#wikimedia-dev',
+  }
+
+  $ircecho_nick = 'wikibugs'
+  $ircecho_server = 'chat.freenode.net'
+
+  include misc::ircecho
+  include misc::irc::wikibugs::packages
+
+  systemuser { 'wikibugs': name = 'wikibugs' }
+
+  File {
+owner   = wikibugs,
+group   = wikidev,
+mode= '0755',
+require = User['wikibugs'];
+  }
+
+  file {
+'/var/lib/wikibugs':
+  ensure = directory;
+'/var/lib/wikibugs/bin':
+  ensure = directory;
+'/var/lib/wikibugs/log':
+  ensure = directory;
+  }
+
+  git::clone { 'wikibugs' :
+directory = '/var/lib/wikibugs/bin',
+origin= 
'https://gerrit.wikimedia.org/r/p/wikimedia/bugzilla/wikibugs.git',
+owner = wikibugs,
+group = wikidev,
+require   = User['wikibugs'];
+  }
+ f6b58a4... wikibugs: also need /var/lib/wikibugs/bin dir, summarize 
needed dirs,
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72956a74ab0c965297fc6801e88df3348122a7ab
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] AnnotationSet optimisations. - change (mediawiki...VisualEditor)

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

Change subject: AnnotationSet optimisations.
..


AnnotationSet optimisations.

addSet:
* Instead of indexing items in the store, just union the indexStore arrays

removeSet/removeNotInSet:
* difference or intersect the indexStore arrays

filter:
* push indices into the result set instead of values

simpleArrayUnion/Intersect/Difference have been created as utilities
in ve. They are prefixed 'simple' because they use object keys to
do fast in-array comparisons. This means they are limited to string
values or values which will compare as strings (e.g. numbers).

Change-Id: I079cbdfece4f6d80ec0afd61959913f13217fcb3
---
M modules/ve/dm/ve.dm.AnnotationSet.js
M modules/ve/test/dm/ve.dm.AnnotationSet.test.js
M modules/ve/ve.js
3 files changed, 92 insertions(+), 18 deletions(-)

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



diff --git a/modules/ve/dm/ve.dm.AnnotationSet.js 
b/modules/ve/dm/ve.dm.AnnotationSet.js
index c6176e8..1d0b5e7 100644
--- a/modules/ve/dm/ve.dm.AnnotationSet.js
+++ b/modules/ve/dm/ve.dm.AnnotationSet.js
@@ -185,7 +185,7 @@
  * @returns {ve.dm.AnnotationSet} New set containing only the matching values
  */
 ve.dm.AnnotationSet.prototype.filter = function ( callback, returnBool ) {
-   var i, length, result, value;
+   var i, length, result, storeIndex, value;
 
if ( !returnBool ) {
result = this.clone();
@@ -195,12 +195,13 @@
result.removeAll();
}
for ( i = 0, length = this.getLength(); i  length; i++ ) {
-   value = this.getStore().value( this.getIndex( i ) );
+   storeIndex = this.getIndex( i );
+   value = this.getStore().value( storeIndex );
if ( callback( value ) ) {
if ( returnBool ) {
return true;
} else {
-   result.push( value );
+   result.storeIndexes.push( storeIndex );
}
}
}
@@ -261,10 +262,7 @@
  * @param {ve.dm.AnnotationSet} set Set to add to the set
  */
 ve.dm.AnnotationSet.prototype.addSet = function ( set ) {
-   var i;
-   for ( i = 0; i  set.getLength(); i++ ) {
-   this.push( set.get( i ) );
-   }
+   this.storeIndexes = ve.simpleArrayUnion( this.getIndexes(), 
set.getIndexes() );
 };
 
 /**
@@ -332,10 +330,7 @@
  * @param {ve.dm.AnnotationSet} set Set to remove from the set
  */
 ve.dm.AnnotationSet.prototype.removeSet = function ( set ) {
-   var i;
-   for ( i = 0; i  set.getLength(); i++ ) {
-   this.remove( set.get( i ) );
-   }
+   this.storeIndexes = ve.simpleArrayDifference( this.getIndexes(), 
set.getIndexes() );
 };
 
 /**
@@ -345,12 +340,7 @@
  * @param {ve.dm.AnnotationSet} set Set to intersect with the set
  */
 ve.dm.AnnotationSet.prototype.removeNotInSet = function ( set ) {
-   var i;
-   for ( i = this.getLength() - 1; i = 0; i-- ) {
-   if ( !set.contains( this.get( i ) ) ) {
-   this.removeAt( i );
-   }
-   }
+   this.storeIndexes = ve.simpleArrayIntersection( this.getIndexes(), 
set.getIndexes() );
 };
 
 /**
diff --git a/modules/ve/test/dm/ve.dm.AnnotationSet.test.js 
b/modules/ve/test/dm/ve.dm.AnnotationSet.test.js
index 65d08e9..06096a1 100644
--- a/modules/ve/test/dm/ve.dm.AnnotationSet.test.js
+++ b/modules/ve/test/dm/ve.dm.AnnotationSet.test.js
@@ -9,7 +9,7 @@
 
 /* Tests */
 
-QUnit.test( 'Basic usage', 27, function ( assert ) {
+QUnit.test( 'Basic usage', 28, function ( assert ) {
var annotationSet3,
store = new ve.dm.IndexValueStore(),
bold = new ve.dm.TextStyleBoldAnnotation(),
@@ -30,6 +30,10 @@
assert.equal( annotationSet.containsAllOf( annotationSet ), true, 
'containsAllOf self is true' );
assert.equal( annotationSet.indexOf( italic ), 1, 'indexOf italic is 1' 
);
assert.equal( annotationSet.indexOf( underline ), -1, 'indexOf 
underline is -1' );
+   assert.deepEqual(
+   annotationSet.filter( function ( annotation ) { return 
annotation.name === 'textStyle/bold'; } ).get(),
+   [ bold ], 'filter for name=textStyle/bold returns just bold 
annotation'
+   );
assert.equal( annotationSet.hasAnnotationWithName( 'textStyle/bold' ), 
true, 'hasAnnotationWithName textStyle/bold is true' );
assert.equal( annotationSet.hasAnnotationWithName( 
'textStyle/underline' ), false, 'hasAnnotationWithName underline is false' );
 
diff --git a/modules/ve/ve.js b/modules/ve/ve.js
index 720e224..18220ce 100644
--- a/modules/ve/ve.js
+++ b/modules/ve/ve.js
@@ -268,6 +268,86 @@
};
 
/**
+* Compute the union (duplicate-free merge) of a set of arrays.
+*

[MediaWiki-commits] [Gerrit] $wgGeoDataUpdatesViaJob is not going to be reenabled - change (operations/mediawiki-config)

2013-04-22 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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


Change subject: $wgGeoDataUpdatesViaJob is not going to be reenabled
..

$wgGeoDataUpdatesViaJob is not going to be reenabled

Change-Id: I01a4ab6a2301061e78e6b35623ff10bcd740562f
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 44393fb..bb01f41 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2488,7 +2488,6 @@
$wgAPIGeneratorModules['geosearch'] = 'ApiQueryDisabled';
$wgAPIListModules['geosearch'] = 'ApiQueryDisabled';
}
-   $wgGeoDataUpdatesViaJob = $wmgGeoDataUpdatesViaJob;
 
# These modules have been intentionally disabled for the first phase of 
deployment
if ( $wgDBname !== 'testwiki' ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cf29eed..5d27666 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11941,9 +11941,6 @@
 'wmgEnableGeoSearch' = array(
'default' = true,
 ),
-'wmgGeoDataUpdatesViaJob' = array(
-   'default' = false,
-),
 
 'wmgUseEcho' = array(
'default' = false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01a4ab6a2301061e78e6b35623ff10bcd740562f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] (Bug 47482) Update redis in bulk onTransactionIdle - change (mediawiki...GettingStarted)

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

Change subject: (Bug 47482) Update redis in bulk onTransactionIdle
..


(Bug 47482) Update redis in bulk onTransactionIdle

Change I00107ffc9 in mediawiki/core makes WikiPage::updateCategoryCounts defer
work to a callback function which executes at the end of the current
transaction, if one is open. This means that LinksUpdateComplete is no longer
guaranteed to run after CategoryAfterPageAdded / CategoryAfterPageRemoved.
Consequently we can no longer rely on it for batch-processing all pending
updates.

This change uses a different mechanism to defer batch processing of redis
updates to a Database-onTransactionIdle callback.

Change-Id: Ib073661c267cbabbe2ab2245224afd12b8784fca
---
M GettingStarted.php
M RedisCategorySync.php
2 files changed, 37 insertions(+), 23 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, but someone else must approve
  Mattflaschen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/GettingStarted.php b/GettingStarted.php
index d8a5308..45f9bf1 100644
--- a/GettingStarted.php
+++ b/GettingStarted.php
@@ -164,7 +164,6 @@
 $wgHooks[ 'RecentChange_save' ][] = 'GettingStartedHooks::onRecentChange_save';
 $wgHooks[ 'CategoryAfterPageAdded' ][] = 
'RedisCategorySync::onCategoryAfterPageAdded';
 $wgHooks[ 'CategoryAfterPageRemoved' ][] = 
'RedisCategorySync::onCategoryAfterPageRemoved';
-$wgHooks[ 'LinksUpdateComplete' ][] = 
'RedisCategorySync::onLinksUpdateComplete';
 $wgHooks[ 'ListDefinedTags' ][] = 'GettingStartedHooks::onListDefinedTags';
 $wgHooks[ 'MakeGlobalVariablesScript' ][] = 
'GettingStartedHooks::onMakeGlobalVariablesScript';
 $wgHooks[ 'BeforeCreateEchoEvent' ][] = 
'GettingStartedHooks::onBeforeCreateEchoEvent';
diff --git a/RedisCategorySync.php b/RedisCategorySync.php
index 18e2bc2..041a84f 100644
--- a/RedisCategorySync.php
+++ b/RedisCategorySync.php
@@ -22,6 +22,10 @@
/** @var array: arrays of [Category, WikiPage] removals to process. **/
public static $removals = array();
 
+   /** @var bool: whether or not an update callback has been registered. 
**/
+   public static $callbackSet = false;
+
+
/**
 * Acquire a Redis connection.
 * @return Redis|bool Redis client or false.
@@ -87,6 +91,7 @@
public static function onCategoryAfterPageAdded( Category $category, 
WikiPage $page ) {
if ( self::isUpdateRelevant( $category, $page ) ) {
self::$additions[] = array( $category, $page );
+   self::setCallback();
}
return true;
}
@@ -98,39 +103,49 @@
public static function onCategoryAfterPageRemoved( Category $category, 
WikiPage $page ) {
if ( self::isUpdateRelevant( $category, $page ) ) {
self::$removals[] = array( $category, $page );
+   self::setCallback();
}
return true;
}
 
/**
-* @param LinksUpdate $linksUpdate
+* Register a callback function that will perform all redis updates once
+* the current transaction completes.
+* @return bool True if callback was set, false if it was set already.
 */
-   public static function onLinksUpdateComplete( $linksUpdate ) {
-   if ( !count( self::$additions )  !count( self::$removals ) ) {
-   return true;
+   public static function setCallback() {
+   if ( self::$callbackSet ) {
+   return false;
}
+   self::$callbackSet = true;
 
-   $conn = self::getClient();
-   if ( !$conn ) {
-   wfDebugLog( 'GettingStarted', Unable to acquire redis 
connection.\n );
-   return true;
-   }
+   $dbw = wfGetDB( DB_MASTER );
+   $dbw-onTransactionIdle( function () {
+   // Any category updates that happen after this will 
require an
+   // additional run of the callback.
+   RedisCategorySync::$callbackSet = false;
 
-   try {
-   $redis = $conn-multi( Redis::PIPELINE );
-   foreach( self::$additions as $addition ) {
-   list( $category, $page ) = $addition;
-   $redis-sAdd( self::makeCategoryKey( $category 
), $page-getId() );
+   $conn = RedisCategorySync::getClient();
+   if ( !$conn ) {
+   wfDebugLog( 'GettingStarted', Unable to 
acquire redis connection.\n );
+   return;
}
-   foreach( self::$removals as $removal ) {
-   list( $category, $page ) = $removal;
-  

[MediaWiki-commits] [Gerrit] wikibugs - also need /var/lib/wikibugs/bin summarize needed ... - change (operations/puppet)

2013-04-22 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: wikibugs - also need /var/lib/wikibugs/bin summarize needed 
directories, set File defaults, retab 2-space softtabs, align arrows to make 
puppet-lint like it more
..


wikibugs - also need /var/lib/wikibugs/bin
summarize needed directories, set File defaults,
retab 2-space softtabs, align arrows to make puppet-lint like
it more

write dependencies as arrow syntax vs. requires

Change-Id: I72956a74ab0c965297fc6801e88df3348122a7ab
---
M manifests/misc/wikibugs.pp
1 file changed, 41 insertions(+), 37 deletions(-)

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



diff --git a/manifests/misc/wikibugs.pp b/manifests/misc/wikibugs.pp
index 9741379..6780c8b 100644
--- a/manifests/misc/wikibugs.pp
+++ b/manifests/misc/wikibugs.pp
@@ -8,51 +8,55 @@
 
 # Package dependencies for the wikibugs script
 class misc::irc::wikibugs::packages {
-   package { 'libemail-mime-perl':
-   ensure = present;
-   }
+  package { 'libemail-mime-perl':
+ensure = present;
+  }
 }
 
 class misc::irc::wikibugs {
 
-   # We are an IRC bot!
+  # We are an IRC bot!
 
-   # Some Bugzilla product have been blessed with their own log files out 
of the
-   # default one. Values are hardcoded in the Wikibugs perl script
-   $ircecho_logbase = '/var/lib/wikibugs/logs'
-   $ircecho_logs = {
-   ${ircecho_logbase}/wikimedia-labs.log   = 
'#wikimedia-labs',
-   ${ircecho_logbase}/wikimedia-mobile.log = 
'#wikimedia-mobile',
-   ${ircecho_logbase}/wikimedia-dev.log= 
'#wikimedia-dev',
-   }
+  # Some Bugzilla product have been blessed with their own log files out of the
+  # default one. Values are hardcoded in the Wikibugs perl script
+  $ircecho_logbase = '/var/lib/wikibugs/logs'
+  $ircecho_logs = {
+${ircecho_logbase}/wikimedia-labs.log   = '#wikimedia-labs',
+${ircecho_logbase}/wikimedia-mobile.log = '#wikimedia-mobile',
+${ircecho_logbase}/wikimedia-dev.log= '#wikimedia-dev',
+  }
 
-   $ircecho_nick = 'wikibugs'
-   $ircecho_server = 'chat.freenode.net'
+  $ircecho_nick = 'wikibugs'
+  $ircecho_server = 'chat.freenode.net'
 
-   include misc::ircecho
-   include misc::irc::wikibugs::packages
+  include misc::ircecho
+  include misc::irc::wikibugs::packages
 
-   systemuser { 'wikibugs': name = 'wikibugs' }
+  systemuser { 'wikibugs': name = 'wikibugs' }
 
-   file {
-   '/var/lib/wikibugs':
-   ensure = directory,
-   owner  = wikibugs,
-   group = wikidev,
-   mode  = '0755';
-   '/var/lib/wikibugs/log':
-   ensure = directory,
-   owner  = wikibugs,
-   group = wikidev,
-   mode  = '0775',
-   require = User['wikibugs'];
-   }
+  File {
+owner   = 'wikibugs',
+group   = 'wikidev',
+mode= '0755',
+  }
 
-   git::clone { 'wikibugs' :
-   directory = '/var/lib/wikibugs/bin',
-   origin = 
'https://gerrit.wikimedia.org/r/p/wikimedia/bugzilla/wikibugs.git',
-   owner = wikibugs,
-   group = wikidev,
-   require = User['wikibugs'];
-   }
+  file {
+'/var/lib/wikibugs':
+  ensure = directory;
+'/var/lib/wikibugs/bin':
+  ensure = directory;
+'/var/lib/wikibugs/log':
+  ensure = directory;
+  }
+
+  User['wikibugs'] - File['/var/lib/wikibugs'] -
+  File['/var/lib/wikibugs/bin'] - File['/var/lib/wikibugs/log']
+
+  git::clone { 'wikibugs' :
+directory = '/var/lib/wikibugs/bin',
+origin= 
'https://gerrit.wikimedia.org/r/p/wikimedia/bugzilla/wikibugs.git',
+owner = wikibugs,
+group = wikidev,
+require   = User['wikibugs'];
+  }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72956a74ab0c965297fc6801e88df3348122a7ab
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add high-res version of wikidata favicon - change (operations/mediawiki-config)

2013-04-22 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

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


Change subject: Add high-res version of wikidata favicon
..

Add high-res version of wikidata favicon

Change-Id: Id412d21bffc271acf33a57f6337dc257c7f88157
---
M docroot/bits/favicon/wikidata.ico
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/docroot/bits/favicon/wikidata.ico 
b/docroot/bits/favicon/wikidata.ico
index 554f588..938063e 100644
--- a/docroot/bits/favicon/wikidata.ico
+++ b/docroot/bits/favicon/wikidata.ico
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id412d21bffc271acf33a57f6337dc257c7f88157
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Isarra zhoris...@gmail.com

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


[MediaWiki-commits] [Gerrit] Replace weird usage of explode - change (mediawiki/core)

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

Change subject: Replace weird usage of explode
..


Replace weird usage of explode

Change-Id: Ic4021be695c9ed15dea0da0e94967a0d7d441670
---
M includes/ChangesList.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/includes/ChangesList.php b/includes/ChangesList.php
index 3170a7d..b589057 100644
--- a/includes/ChangesList.php
+++ b/includes/ChangesList.php
@@ -121,8 +121,10 @@
 */
private function preCacheMessages() {
if ( !isset( $this-message ) ) {
-   foreach ( explode( ' ', 'cur diff hist last blocklink 
history ' .
-   'semicolon-separator pipe-separator' ) as $msg ) {
+   foreach ( array(
+   'cur', 'diff', 'hist', 'last', 'blocklink', 
'history',
+   'semicolon-separator', 'pipe-separator' ) as 
$msg
+   ) {
$this-message[$msg] = $this-msg( $msg 
)-escaped();
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4021be695c9ed15dea0da0e94967a0d7d441670
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Removes Special:MobileFeedback and associated conf - change (mediawiki...MobileFrontend)

2013-04-22 Thread awjrichards (Code Review)
awjrichards has uploaded a new change for review.

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


Change subject: Removes Special:MobileFeedback and associated conf
..

Removes Special:MobileFeedback and associated conf

Change-Id: I68485a0b70028d322b92b25864465346f9cdc5c7
---
M MobileFrontend.php
D includes/specials/SpecialMobileFeedback.php
2 files changed, 0 insertions(+), 493 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index aeaaada..2271887 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -56,7 +56,6 @@
 
'SpecialUploads' = 'specials/SpecialUploads',
'SpecialMobileDiff' = 'specials/SpecialMobileDiff',
-   'SpecialMobileFeedback' = 'specials/SpecialMobileFeedback',
'SpecialMobileOptions' = 'specials/SpecialMobileOptions',
'SpecialMobileMenu' = 'specials/SpecialMobileMenu',
'SpecialMobileWatchlist' = 'specials/SpecialMobileWatchlist',
@@ -109,7 +108,6 @@
 
 $wgSpecialPages['Uploads'] = 'SpecialUploads';
 $wgSpecialPages['MobileDiff'] = 'SpecialMobileDiff';
-$wgSpecialPages['MobileFeedback'] = 'SpecialMobileFeedback';
 $wgSpecialPages['MobileOptions'] = 'SpecialMobileOptions';
 $wgSpecialPages['MobileMenu'] = 'SpecialMobileMenu';
 
@@ -761,55 +759,9 @@
 $wgMobileFrontendFormatCookieExpiry = null;
 
 /**
- * When set to true, the feedback form will post to a remote wiki, which
- * must also be configured.
- * @param bool
- */
-$wgMFRemotePostFeedback = false;
-$wgMFRemotePostFeedbackUrl = null;
-$wgMFRemotePostFeedbackUsername = null;
-$wgMFRemotePostFeedbackPassword = null;
-$wgMFRemotePostFeedbackArticle = null;
-
-/**
- * Configure the href links for the various links that appear on the
- * MobileFrontend feedback form.
- *
- * These can be any value that you can use as an href value in a href=,
- * eg GeneralFeedback, http://mysite.com/wiki/GeneralFeedback;,
- *   mailto:some...@example.com;
- *
- * Leaving a value empty will default to a value of '#'
- *
- * Alternatively, you can invoke the 'MobileFrontendOverrideFeedbackLinks' hook
- * rather than just set this var in your LocalSettings. This is really useful
- * if you have more complicated/variable needs for setting up this 
configuration
- * var that you might not want running on every single page load.
- */
-$wgMFFeedbackLinks = array(
-   'General' = '', // General feedback
-   'ArticlePersonal' = '', // Regarding me, a person, or a company I work 
for
-   'ArticleFactual' = '', // Regarding a factual error
-   'ArticleOther' = '', // Regarding another problem
-);
-
-/**
  * @var ExtMobileFrontend $wgExtMobileFrontend
  */
 $wgExtMobileFrontend = null;
-
-/**
- * A fallback URL for a 'contact us' page if one cannot be dynamically
- * determined for the project (using wfMessage( 'contact-us' )). This is only
- * used in non-beta mode.
- */
-$wgMFFeedbackFallbackURL = '#';
-
-/**
- * Whether or not to display sections other than 'Technical feedback' on 
feedback page
- * @param bool
- */
-$wgMFDisplayNonTechnicalFeedback = false;
 
 /**
  * Make the classes, tags and ids stripped from page content configurable.
diff --git a/includes/specials/SpecialMobileFeedback.php 
b/includes/specials/SpecialMobileFeedback.php
deleted file mode 100644
index 151e610..000
--- a/includes/specials/SpecialMobileFeedback.php
+++ /dev/null
@@ -1,445 +0,0 @@
-?php
-
-class SpecialMobileFeedback extends UnlistedSpecialMobilePage {
-   public function __construct() {
-   parent::__construct( 'MobileFeedback' );
-   }
-
-   public function execute( $par = '' ) {
-   $this-setHeaders();
-   $this-getOutput()-setPageTitle( $this-msg( 
'mobile-frontend-leave-feedback-special-title' )-text() );
-   $this-getOutput()-addHtml( Html::openElement( 'div', array( 
'class' = 'content' ) ) );
-   $context = MobileContext::singleton();
-   $context-setForceMobileView( true );
-   $context-setContentTransformations( false );
-
-   if ( $par == 'thanks' ) {
-   $this-showThanks();
-   } elseif ( $par == 'error' ) {
-   $this-showError();
-   } else {
-   $this-renderFeedbackHtml();
-   }
-   }
-
-   protected function renderFeedbackHtml() {
-   global $wgMFFeedbackLinks, $wgMFDisplayNonTechnicalFeedback;
-   /** Section header text **/
-   $technicalProblemSectionHeader = $this-msg( 
'mobile-frontend-leave-feedback-technical-problem-section-header' )-escaped();
-
-   wfRunHooks( 'MobileFrontendOverrideFeedbackLinks', array(
-   $this-getRequest()-getText( 'feedbacksource', '' ),
-   $this-getRequest()-getText( 'returnto', '' ),

[MediaWiki-commits] [Gerrit] ThankYou Date is Optional - change (wikimedia...crm)

2013-04-22 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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


Change subject: ThankYou Date is Optional
..

ThankYou Date is Optional

If thankyou_date is already set in a contribution ThankYou_send will not
send an email. In some cases we do not want to send an email, e.g. we got
a check; so we have to set this to something. This allows both cases.

Change-Id: I5158f4e5421b1119ceaa4f8a2198da11ef1ea7b4
---
M .gitignore
M sites/all/modules/offline2civicrm/offline2civicrm.install
2 files changed, 38 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/40/60340/1

diff --git a/.gitignore b/.gitignore
index f1bc2fb..4302da2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 sites/default/civicrm.settings.php
 sites/default/settings.php
 sites/default/files
+.idea
diff --git a/sites/all/modules/offline2civicrm/offline2civicrm.install 
b/sites/all/modules/offline2civicrm/offline2civicrm.install
index 0b78c5e..99b814e 100644
--- a/sites/all/modules/offline2civicrm/offline2civicrm.install
+++ b/sites/all/modules/offline2civicrm/offline2civicrm.install
@@ -14,15 +14,47 @@
 function offline2civicrm_update_7000() {
 $api = wmf_civicrm_bootstrap_civi();
 
-$success = $api-CustomGroup-get(array(
+/* === Create the Gift Information group if it doesn't exist === */
+$api-CustomGroup-get(array(
 'name' = 'Gift_Information',
 ));
-$values = $api-values();
-$custom_group = array_pop($values);
-if (!$success || !$custom_group-id) {
-throw new Exception(Missing custom group 'Gift Information',  . 
$api-errorMsg());
+$result = $api-values();
+if (empty($result)) {
+$success = $api-CustomGroup-create(array(
+'extends' = 'Contribution',
+'name' = 'Gift_Information',
+'title' = ts('Gift Information'),
+'is_active' = 1,
+'is_view' = 1,
+));
+if (!$success) {
+throw new Exception(Could not create Gift Information group:  . 
$api-errorMsg());
+}
+$values = $api-values();
+$custom_group = array_pop($values);
+} else {
+   // If the thing already exists, just go ahead and get it for 
the field creation below
+$success = $api-CustomGroup-get(array(
+'name' = 'Gift_Information',
+));
+$values = $api-values();
+$custom_group = array_pop($values);
+if (!$success || !$custom_group-id) {
+throw new Exception(Missing custom group 'Gift Information',  . 
$api-errorMsg());
+}
 }
 
+/* === Create all the custom fields === */
+/* --- Check Number --- */
+$api-CustomField-get(array(
+'custom_group_id' = $custom_group-id,
+'name' = 'import_batch_number',
+));
+
+/* --- Batch Number --- */
+$api-CustomField-get( 
+
+
 $success = $api-CustomField-create(array(
 'custom_group_id' = $custom_group-id,
 'name' = 'import_batch_number',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5158f4e5421b1119ceaa4f8a2198da11ef1ea7b4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] wikibugs - no don't define /var/lib/wikibugs/bin, git::clone... - change (operations/puppet)

2013-04-22 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: wikibugs - no don't define /var/lib/wikibugs/bin, git::clone 
doesn't like it if that already exists
..


wikibugs - no don't define /var/lib/wikibugs/bin, git::clone doesn't
like it if that already exists

Change-Id: I052a6dd6029362dca302e80b299b9350bd498661
---
M manifests/misc/wikibugs.pp
1 file changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/manifests/misc/wikibugs.pp b/manifests/misc/wikibugs.pp
index 6780c8b..2799ddb 100644
--- a/manifests/misc/wikibugs.pp
+++ b/manifests/misc/wikibugs.pp
@@ -43,14 +43,11 @@
   file {
 '/var/lib/wikibugs':
   ensure = directory;
-'/var/lib/wikibugs/bin':
-  ensure = directory;
 '/var/lib/wikibugs/log':
   ensure = directory;
   }
 
-  User['wikibugs'] - File['/var/lib/wikibugs'] -
-  File['/var/lib/wikibugs/bin'] - File['/var/lib/wikibugs/log']
+  User['wikibugs'] - File['/var/lib/wikibugs'] - 
File['/var/lib/wikibugs/log']
 
   git::clone { 'wikibugs' :
 directory = '/var/lib/wikibugs/bin',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I052a6dd6029362dca302e80b299b9350bd498661
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] db65 and db72 - mariadb - change (operations/puppet)

2013-04-22 Thread Pyoungmeister (Code Review)
Pyoungmeister has uploaded a new change for review.

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


Change subject: db65 and db72 - mariadb
..

db65 and db72 - mariadb

Change-Id: I3addacc5f7bafe6d0bc48a3cd47d73ef689f7955
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/60342/1

diff --git a/manifests/site.pp b/manifests/site.pp
index cf2a848..a4fc3a6 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -438,7 +438,7 @@
if $hostname == db51 {
class { role::coredb::s4 : mariadb = true }
} elsif $hostname =~ /^db(65|72)/ {
-   class { role::coredb::s4 : innodb_file_per_table = true }
+   class { role::coredb::s4 : mariadb = true, 
innodb_file_per_table = true }
} else {
include role::coredb::s4
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3addacc5f7bafe6d0bc48a3cd47d73ef689f7955
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Pyoungmeister p...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] db65 and db72 - mariadb - change (operations/puppet)

2013-04-22 Thread Pyoungmeister (Code Review)
Pyoungmeister has submitted this change and it was merged.

Change subject: db65 and db72 - mariadb
..


db65 and db72 - mariadb

Change-Id: I3addacc5f7bafe6d0bc48a3cd47d73ef689f7955
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index cf2a848..a4fc3a6 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -438,7 +438,7 @@
if $hostname == db51 {
class { role::coredb::s4 : mariadb = true }
} elsif $hostname =~ /^db(65|72)/ {
-   class { role::coredb::s4 : innodb_file_per_table = true }
+   class { role::coredb::s4 : mariadb = true, 
innodb_file_per_table = true }
} else {
include role::coredb::s4
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3addacc5f7bafe6d0bc48a3cd47d73ef689f7955
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Pyoungmeister p...@wikimedia.org
Gerrit-Reviewer: Pyoungmeister p...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Check that parserTests.txt is in sync with upstream copy. - change (mediawiki...Parsoid)

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

Change subject: Check that parserTests.txt is in sync with upstream copy.
..


Check that parserTests.txt is in sync with upstream copy.

Warn (but don't update) when running parserTests.js, because we might
have a good reason for using an unsynchronized copy --- for example, we
might be testing an unmerged patch, or working on a branch.

npm test will always update parserTests.txt and then run the tests.

Change-Id: Iaeb674bb3459658e11727130d1046041ae5d078d
---
M js/tests/fetch-parserTests.txt.js
M js/tests/parserTests.js
2 files changed, 54 insertions(+), 7 deletions(-)

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



diff --git a/js/tests/fetch-parserTests.txt.js 
b/js/tests/fetch-parserTests.txt.js
index 2ff1f7f..8e98c72 100644
--- a/js/tests/fetch-parserTests.txt.js
+++ b/js/tests/fetch-parserTests.txt.js
@@ -1,7 +1,20 @@
+/**
+ * Fetch new parserTests.txt from upstream mediawiki/core.
+ */
+
+// UPDATE THESE when upstream mediawiki/core includes new parsoid-relevant 
tests
+// This ensures that our whitelist is in sync.
+// You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
+var expectedSHA1 = f1af8c010dd69906e27036d787fbdc36f1067c55;
+// git log --pretty=oneline -1 tests/parser/parserTests.txt
+var latestCommit = df27065fd7278c8c0519e1d400b21e88f383daf3;
+
 var fs = require('fs'),
path = require('path'),
-   exists = fs.exists || path.exists,
-   https = require('https');
+   https = require('https'),
+   crypto = require('crypto');
+
+var existsSync = fs.existsSync || path.existsSync; // node 0.6 compat
 
 var url = {
host: 'gerrit.wikimedia.org',
@@ -9,7 +22,17 @@
 };
 var target_name = __dirname+/parserTests.txt;
 
-var fetch = function(url, target_name) {
+var computeSHA1 = function(target_name) {
+   var contents = fs.readFileSync(target_name);
+   return crypto.createHash('sha1').update(contents).digest('hex').
+   toLowerCase();
+};
+
+var fetch = function(url, target_name, gitCommit) {
+   console.log('Fetching parserTests.txt from mediawiki/core');
+   if (gitCommit) {
+   url.path = url.path.replace(/;hb=[^;]+;/, ';hb='+gitCommit+';');
+   }
https.get(url, function(result) {
var out = fs.createWriteStream(target_name);
result.on('data', function(data) {
@@ -18,6 +41,10 @@
result.on('end', function() {
if (out) {
out.end();
+   if (expectedSHA1 !== computeSHA1(target_name)) {
+   console.warn('Parsoid expected 
sha1sum', expectedSHA1,
+'but got', 
computeSHA1(target_name));
+   }
}
});
}).on('error', function(err) {
@@ -25,8 +52,23 @@
});
 };
 
-exists(target_name, function(exists) {
-   if (!exists) {
-   fetch(url, target_name);
+var checkAndUpdate = function() {
+   if (existsSync(target_name) 
+   expectedSHA1 === computeSHA1(target_name)) {
+   return; // a-ok!
}
-});
+   fetch(url, target_name, latestCommit);
+};
+
+if (typeof module === 'object'  require.main !== module) {
+   module.exports = {
+   checkAndUpdate: checkAndUpdate,
+   expectedSHA1: expectedSHA1,
+   computeSHA1: function() {
+   return existsSync(target_name) ? 
computeSHA1(target_name) :
+   file not present;
+   }
+   };
+} else {
+   checkAndUpdate();
+}
diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index b75fac2..b893689 100755
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -292,6 +292,11 @@
  * @returns {Object}
  */
 ParserTests.prototype.getTests = function ( argv ) {
+   // double check that test file is up-to-date with upstream
+   var fetcher = require(__dirname+/fetch-parserTests.txt.js);
+   if (fetcher.expectedSHA1 !== fetcher.computeSHA1()) {
+   console.warn(WARNING: parserTests.txt not up-to-date with 
upstream.);
+   }
 
// Startup by loading .txt test file
var testFile;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaeb674bb3459658e11727130d1046041ae5d078d
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott wikime...@cscott.net
Gerrit-Reviewer: Cscott wikime...@cscott.net
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot


[MediaWiki-commits] [Gerrit] Add --force option to fetch-parserTests.txt.js to update fil... - change (mediawiki...Parsoid)

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

Change subject: Add --force option to fetch-parserTests.txt.js to update file 
and hashes.
..


Add --force option to fetch-parserTests.txt.js to update file and hashes.

Change-Id: If4362711e4d17e9dad8b3fbc7ac3b17966fa5aa0
---
M js/tests/fetch-parserTests.txt.js
M js/tests/parserTests.js
2 files changed, 83 insertions(+), 17 deletions(-)

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



diff --git a/js/tests/fetch-parserTests.txt.js 
b/js/tests/fetch-parserTests.txt.js
old mode 100644
new mode 100755
index 8e98c72..251e42b
--- a/js/tests/fetch-parserTests.txt.js
+++ b/js/tests/fetch-parserTests.txt.js
@@ -1,9 +1,14 @@
+#!/usr/bin/env node
 /**
  * Fetch new parserTests.txt from upstream mediawiki/core.
  */
 
 // UPDATE THESE when upstream mediawiki/core includes new parsoid-relevant 
tests
 // This ensures that our whitelist is in sync.
+//
+// == Use ./fetch-parserTests.txt.js --force to download latest parserTests
+// and update these hashes automatically.
+//
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
 var expectedSHA1 = f1af8c010dd69906e27036d787fbdc36f1067c55;
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
@@ -14,24 +19,33 @@
https = require('https'),
crypto = require('crypto');
 
-var existsSync = fs.existsSync || path.existsSync; // node 0.6 compat
-
-var url = {
+var downloadUrl = {
host: 'gerrit.wikimedia.org',
path: 
'/r/gitweb?p=mediawiki/core.git;a=blob_plain;hb=HEAD;f=tests/parser/parserTests.txt'
+};
+var historyUrl = {
+   host: downloadUrl.host,
+   path: 
'/r/gitweb?p=mediawiki/core.git;a=history;hb=HEAD;f=tests/parser/parserTests.txt'
 };
 var target_name = __dirname+/parserTests.txt;
 
 var computeSHA1 = function(target_name) {
+   var existsSync = fs.existsSync || path.existsSync; // node 0.6 compat
+   if (!existsSync(target_name)) {
+   return file not present;
+   }
var contents = fs.readFileSync(target_name);
return crypto.createHash('sha1').update(contents).digest('hex').
toLowerCase();
 };
 
-var fetch = function(url, target_name, gitCommit) {
+var fetch = function(url, target_name, gitCommit, cb) {
console.log('Fetching parserTests.txt from mediawiki/core');
if (gitCommit) {
-   url.path = url.path.replace(/;hb=[^;]+;/, ';hb='+gitCommit+';');
+   url = {
+   host: url.host,
+   path: url.path.replace(/;hb=[^;]+;/, 
';hb='+gitCommit+';')
+   };
}
https.get(url, function(result) {
var out = fs.createWriteStream(target_name);
@@ -41,7 +55,9 @@
result.on('end', function() {
if (out) {
out.end();
-   if (expectedSHA1 !== computeSHA1(target_name)) {
+   if (cb) {
+   return cb();
+   } else if (expectedSHA1 !== 
computeSHA1(target_name)) {
console.warn('Parsoid expected 
sha1sum', expectedSHA1,
 'but got', 
computeSHA1(target_name));
}
@@ -52,23 +68,73 @@
});
 };
 
+var isUpToDate = function() {
+   return (expectedSHA1 === computeSHA1(target_name));
+};
+
 var checkAndUpdate = function() {
-   if (existsSync(target_name) 
-   expectedSHA1 === computeSHA1(target_name)) {
-   return; // a-ok!
+   if (!isUpToDate()) {
+   fetch(downloadUrl, target_name, latestCommit);
}
-   fetch(url, target_name, latestCommit);
+};
+
+var forceUpdate = function() {
+   console.log('Fetching parserTests.txt history from mediawiki/core');
+   var findMostRecentCommit, downloadCommit, updateHashes;
+
+   // fetch the history page
+   https.get(historyUrl, function(result) {
+   var html = '';
+   result.setEncoding('utf8');
+   result.on('data', function(data) { html += data; });
+   result.on('end', function() {
+   findMostRecentCommit(html);
+   });
+   }).on('error', function(err) {
+   console.error(err);
+   });
+
+   // now look for the most recent commit
+   findMostRecentCommit = function(html) {
+   // remove everything before table class=history
+   html = html.replace(/^[^]*table\s[^]*class=history[^]*/, 
'');
+   // now find the first link to this file with a specific hash
+   var m = 
/[?;]a=blob;f=tests\/parser\/parserTests.txt;hb=([0-9a-f]+)/.
+   exec(html);
+   var gitCommit = 

[MediaWiki-commits] [Gerrit] Add simple script to dump Redis database for debugging. - change (mediawiki...GettingStarted)

2013-04-22 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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


Change subject: Add simple script to dump Redis database for debugging.
..

Add simple script to dump Redis database for debugging.

Change-Id: Ie6dd37c563f23ed66d8dcb4928af332f141d98bd
---
A maintenance/dump_redis.php
1 file changed, 39 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/43/60343/1

diff --git a/maintenance/dump_redis.php b/maintenance/dump_redis.php
new file mode 100755
index 000..eb8bf9f
--- /dev/null
+++ b/maintenance/dump_redis.php
@@ -0,0 +1,39 @@
+?php
+
+/**
+ * Dumps Redis information for GettingStarted.
+ * Intended primarily for debugging in test environments.
+ *
+ * It may result in a large amount of information in production.
+ *
+ * @author Ori Livneh o...@wikimedia.org
+ * @author Matthew Flaschen mflasc...@wikimedia.org
+ */
+
+$IP = getenv( 'MW_INSTALL_PATH' );
+if( $IP === false ) {
+   $IP = __DIR__ . '/../../..';
+}
+
+require_once $IP/maintenance/Maintenance.php;
+
+class DumpRedis extends Maintenance {
+   public function execute() {
+   require_once __DIR__ . '/../GettingStarted.php';
+
+   $client = RedisCategorySync::getClient();
+   $keys = $client-keys( 'RedisCategorySync*' );
+   foreach ( $keys as $key ) {
+   $this-output( $key\n );
+   $this-output( 
===\n );
+   $members = $client-sMembers( $key );
+   foreach ( $members as $ind = $el ) {
+   $this-output( $ind) \$el\\n );
+   }
+   $this-output( \n );
+   }
+   }
+}
+
+$maintClass = 'DumpRedis';
+require_once( RUN_MAINTENANCE_IF_MAIN );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6dd37c563f23ed66d8dcb4928af332f141d98bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Display unexpected pass/fail; exit with status 0 iff all res... - change (mediawiki...Parsoid)

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

Change subject: Display unexpected pass/fail; exit with status 0 iff all 
results are expected.
..


Display unexpected pass/fail; exit with status 0 iff all results are expected.

Change-Id: I03dc8abee5abe9fe2d5846546513e89b20c552d8
---
M js/tests/parserTests.js
1 file changed, 47 insertions(+), 22 deletions(-)

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



diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index de7725d..4d2b381 100755
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -110,8 +110,11 @@
// Test statistics
this.stats = {};
this.stats.passedTests = 0;
-   this.stats.passedTestsManual = 0;
-   this.stats.failOutputTests = 0;
+   this.stats.passedTestsWhitelisted = 0;
+   this.stats.passedTestsUnexpected = 0;
+   this.stats.failedTests = 0;
+   this.stats.failedTestsUnexpected = 0;
+
var newModes = {};
 
for ( i = 0; i  modes.length; i++ ) {
@@ -899,8 +902,8 @@
  */
 ParserTests.prototype.printFailure = function ( title, comments, iopts, 
options,
actual, expected, expectFail, failure_only, mode, error, item ) 
{
-   this.stats.failOutputTests++;
-   this.stats.modes[mode].failOutputTests++;
+   this.stats.failedTests++;
+   this.stats.modes[mode].failedTests++;
this.stats.modes[mode].failList.push(title);
 
var extTitle = ( title + ( mode ? ( ' (' + mode + ')' ) : '' ) ).
@@ -911,6 +914,9 @@
console.log( 'EXPECTED FAIL'.red + ': ' + 
extTitle.yellow );
}
return;
+   } else {
+   this.stats.failedTestsUnexpected++;
+   this.stats.modes[mode].failedTestsUnexpected++;
}
 
if ( !failure_only ) {
@@ -963,8 +969,8 @@
 ParserTests.prototype.printSuccess = function ( title, options, mode, 
expectSuccess, isWhitelist, item ) {
var quiet = booleanOption( options.quiet );
if ( isWhitelist ) {
-   this.stats.passedTestsManual++;
-   this.stats.modes[mode].passedTestsManual++;
+   this.stats.passedTestsWhitelisted++;
+   this.stats.modes[mode].passedTestsWhitelisted++;
} else {
this.stats.passedTests++;
this.stats.modes[mode].passedTests++;
@@ -973,6 +979,8 @@
replace('\n', ' ');
 
if( booleanOption( options.blacklist )  !expectSuccess ) {
+   this.stats.passedTestsUnexpected++;
+   this.stats.modes[mode].passedTestsUnexpected++;
console.log( 'UNEXPECTED PASS'.green.inverse +
 (isWhitelist ? ' (whitelist)' : '') +
 ':' + extTitle.yellow);
@@ -1167,13 +1175,13 @@
 
 /**
  * @param {Object} stats
- * @param {number} stats.failOutputTests Number of failed tests due to 
differences in output
+ * @param {number} stats.failedTests Number of failed tests due to differences 
in output
  * @param {number} stats.passedTests Number of tests passed without any 
special consideration
- * @param {number} stats.passedTestsManual Number of tests passed by 
whitelisting
- * @param {Object} stats.modes All of the stats (failOutputTests, passedTests, 
and passedTestsManual) per-mode.
+ * @param {number} stats.passedTestsWhitelisted Number of tests passed by 
whitelisting
+ * @param {Object} stats.modes All of the stats (failedTests, passedTests, and 
passedTestsWhitelisted) per-mode.
  */
 ParserTests.prototype.reportSummary = function ( stats ) {
-   var curStr, thisMode, i, failTotalTests = stats.failOutputTests;
+   var curStr, thisMode, i, failTotalTests = stats.failedTests;
 
console.log( 
==);
console.log( SUMMARY: );
@@ -1182,27 +1190,39 @@
for ( i = 0; i  modes.length; i++ ) {
curStr = modes[i] + ': ';
thisMode = stats.modes[modes[i]];
-   if ( thisMode.passedTests + thisMode.passedTestsManual 
+ thisMode.failOutputTests  0 ) {
-   curStr += colorizeCount( thisMode.passedTests, 
'green' ) + ' passed / ';
-   curStr += colorizeCount( 
thisMode.passedTestsManual, 'yellow' ) + ' whitelisted / ';
-   curStr += colorizeCount( 
thisMode.failOutputTests, 'red' ) + ' failed';
+   if ( thisMode.passedTests + 
thisMode.passedTestsWhitelisted + thisMode.failedTests  0 ) {
+   curStr += colorizeCount( thisMode.passedTests + 
stats.passedTestsWhitelisted, 'green' ) + ' passed (';
+   curStr += colorizeCount( 
stats.passedTestsUnexpected, 'red' ) + ' unexpected, ';
+ 

[MediaWiki-commits] [Gerrit] moving mysql query digest collection (for ishmael) from db9 ... - change (operations/puppet)

2013-04-22 Thread Asher (Code Review)
Asher has uploaded a new change for review.

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


Change subject: moving mysql query digest collection (for ishmael) from db9 to 
db1001
..

moving mysql query digest collection (for ishmael) from db9 to db1001

Change-Id: I477426dfec7e308b958574a4491d462e5a437c04
---
M modules/coredb_mysql/manifests/slow_digest.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/60345/1

diff --git a/modules/coredb_mysql/manifests/slow_digest.pp 
b/modules/coredb_mysql/manifests/slow_digest.pp
index b6820f7..2b3c894 100644
--- a/modules/coredb_mysql/manifests/slow_digest.pp
+++ b/modules/coredb_mysql/manifests/slow_digest.pp
@@ -2,7 +2,7 @@
 class coredb_mysql::slow_digest {
include passwords::mysql::querydigest
$mysql_user = ops
-   $digest_host = db9.pmtpa.wmnet
+   $digest_host = db1001.eqiad.wmnet
$digest_db = query_digests
 
file {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I477426dfec7e308b958574a4491d462e5a437c04
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Asher afeld...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] moving mysql query digest collection (for ishmael) from db9 ... - change (operations/puppet)

2013-04-22 Thread Asher (Code Review)
Asher has submitted this change and it was merged.

Change subject: moving mysql query digest collection (for ishmael) from db9 to 
db1001
..


moving mysql query digest collection (for ishmael) from db9 to db1001

Change-Id: I477426dfec7e308b958574a4491d462e5a437c04
---
M modules/coredb_mysql/manifests/slow_digest.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/coredb_mysql/manifests/slow_digest.pp 
b/modules/coredb_mysql/manifests/slow_digest.pp
index b6820f7..2b3c894 100644
--- a/modules/coredb_mysql/manifests/slow_digest.pp
+++ b/modules/coredb_mysql/manifests/slow_digest.pp
@@ -2,7 +2,7 @@
 class coredb_mysql::slow_digest {
include passwords::mysql::querydigest
$mysql_user = ops
-   $digest_host = db9.pmtpa.wmnet
+   $digest_host = db1001.eqiad.wmnet
$digest_db = query_digests
 
file {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I477426dfec7e308b958574a4491d462e5a437c04
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Asher afeld...@wikimedia.org
Gerrit-Reviewer: Asher afeld...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Call error on unknown dependencies in mw.loader.using() - change (mediawiki/core)

2013-04-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Call error on unknown dependencies in mw.loader.using()
..

Call error on unknown dependencies in mw.loader.using()

Previously using would throw an error on unknown (not registered)
dependencies which doesn't seem correct as there is an error callback.

Bug: 47296
Change-Id: Ic2f81b725acac2086178e33033f10c4c80ae1573
---
M resources/mediawiki/mediawiki.js
M tests/qunit/suites/resources/mediawiki/mediawiki.test.js
2 files changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/46/60346/1

diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js
index 6c7e697..3e23a3d 100644
--- a/resources/mediawiki/mediawiki.js
+++ b/resources/mediawiki/mediawiki.js
@@ -1436,7 +1436,15 @@
dependencies = [ dependencies ];
}
// Resolve entire dependency map
-   dependencies = resolve( dependencies );
+   try {
+   dependencies = resolve( 
dependencies );
+   } catch ( e ) {
+   // Execute error immediately on 
unknown or circular dependencies
+   if ( $.isFunction( error ) ) {
+   error( e, dependencies 
);
+   }
+   return;
+   }
if ( allReady( dependencies ) ) {
// Run ready immediately
if ( $.isFunction( ready ) ) {
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
index e338675..cc453a8 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
@@ -678,6 +678,22 @@
);
} );
 
+   QUnit.test( 'mw.loader unknown dependency', 1, function ( assert ) {
+   mw.loader.using(
+   'test.module10',
+   function () {
+   assert.ok( false, 'Success fired despite 
unknown dependency' );
+   },
+   function ( e, dependencies ) {
+   assert.deepEqual(
+   dependencies,
+   ['test.module10'],
+   'Error callback called with the module 
as a dependency'
+   );
+   }
+   );
+   } );
+
QUnit.asyncTest( 'mw.loader dependency handling', 5, function ( assert 
) {
mw.loader.addSource(
'testloader',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2f81b725acac2086178e33033f10c4c80ae1573
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] db44 - mariadb - change (operations/puppet)

2013-04-22 Thread Pyoungmeister (Code Review)
Pyoungmeister has uploaded a new change for review.

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


Change subject: db44 - mariadb
..

db44 - mariadb

Change-Id: If8bfa4d78749e28ec4ac03ee98e46df1737f4a2c
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/60347/1

diff --git a/manifests/site.pp b/manifests/site.pp
index a4fc3a6..956e6b9 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -445,7 +445,7 @@
 }
 
 node /^db(44|45|55|73)\.pmtpa\.wmnet/ {
-   if $hostname == db35 {
+   if $hostname == db44 {
class { role::coredb::s5 : mariadb = true }
} elsif $hostname =~ /^db(55|73)/{
class { role::coredb::s5 : mariadb = true, 
innodb_file_per_table = true }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8bfa4d78749e28ec4ac03ee98e46df1737f4a2c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Pyoungmeister p...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't enable E_STRICT by default. - change (wikimedia...drupal)

2013-04-22 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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


Change subject: Don't enable E_STRICT by default.
..

Don't enable E_STRICT by default.

Even without displaying the errors, this is really expensive, and not necessary
on production.  You can still display E_STRICT if it is set in your php.ini.

Change-Id: I020ed72784b3f2916faed594b6bb4604906a0094
---
M includes/bootstrap.inc
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/drupal 
refs/changes/48/60348/1

diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 728e4ec..b83fe60 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -665,7 +665,7 @@
   $_GET['q'] = request_path();
 
   // Enforce E_ALL, but allow users to set levels not part of E_ALL.
-  error_reporting(E_ALL | error_reporting());
+  error_reporting((E_ALL  ~E_STRICT) | error_reporting());
 
   // Override PHP settings required for Drupal to work properly.
   // sites/default/default.settings.php contains more runtime settings.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I020ed72784b3f2916faed594b6bb4604906a0094
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/drupal
Gerrit-Branch: master
Gerrit-Owner: Adamw awi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't enable E_STRICT by default. - change (wikimedia...drupal)

2013-04-22 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Don't enable E_STRICT by default.
..


Don't enable E_STRICT by default.

Even without displaying the errors, this is really expensive, and not necessary
on production.  You can still display E_STRICT if it is set in your php.ini.

Change-Id: I020ed72784b3f2916faed594b6bb4604906a0094
---
M includes/bootstrap.inc
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 728e4ec..b83fe60 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -665,7 +665,7 @@
   $_GET['q'] = request_path();
 
   // Enforce E_ALL, but allow users to set levels not part of E_ALL.
-  error_reporting(E_ALL | error_reporting());
+  error_reporting((E_ALL  ~E_STRICT) | error_reporting());
 
   // Override PHP settings required for Drupal to work properly.
   // sites/default/default.settings.php contains more runtime settings.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I020ed72784b3f2916faed594b6bb4604906a0094
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/drupal
Gerrit-Branch: master
Gerrit-Owner: Adamw awi...@wikimedia.org
Gerrit-Reviewer: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Suppress jshint warnings on fakequery.js. - change (mediawiki...Parsoid)

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

Change subject: Suppress jshint warnings on fakequery.js.
..


Suppress jshint warnings on fakequery.js.

Change-Id: Ia04ebcb545f64c5c95ecea8c65a71a07a933e502
---
M .jshintrc
M js/lib/fakejquery.js
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/.jshintrc b/.jshintrc
index 9e6e612..92bf409 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -22,9 +22,7 @@
smarttabs: true,
multistr: true,
 
-   browser: true,
node: true,
-   jquery: true,
 
nomen: false
//onevar: true
diff --git a/js/lib/fakejquery.js b/js/lib/fakejquery.js
index dd8bde5..cf352bb 100644
--- a/js/lib/fakejquery.js
+++ b/js/lib/fakejquery.js
@@ -1,6 +1,8 @@
 use strict;
+/* jshint eqnull:true, eqeqeq:false, asi:true, curly:false */
 /* minimalist jquery which just defines the tiny bits parsoid uses */
-/* based on zepto.js */
+/* based on zepto.js, which explains why the code conventions don't
+ * match the rest of parsoid. */
   var $ = module.exports = {};
 
   var class2type = {};
@@ -18,7 +20,7 @@
   function isDocument(obj)   { return obj != null  obj.nodeType == 
obj.DOCUMENT_NODE }
   function isObject(obj) { return type(obj) == object }
   function isPlainObject(obj) {
-return isObject(obj)  !isWindow(obj)  obj.__proto__ == Object.prototype
+return isObject(obj)  !isWindow(obj)  Object.getPrototypeOf(obj) == 
Object.prototype
   }
   function isArray(value) { return value instanceof Array }
   function likeArray(obj) { return typeof obj.length == 'number' }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia04ebcb545f64c5c95ecea8c65a71a07a933e502
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott wikime...@cscott.net
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] fixme - change (mediawiki/core)

2013-04-22 Thread EBernhardson (WMF) (Code Review)
EBernhardson (WMF) has uploaded a new change for review.

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


Change subject: fixme
..

fixme

Change-Id: I0fbc1b6351484dccc0c34655b8e283ef1635b0b5
---
M README
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/60349/1

diff --git a/README b/README
index c9ce5db..e4c5dfe 100644
--- a/README
+++ b/README
@@ -120,3 +120,5 @@
 
 There is also a development and support channel #mediawiki on irc.freenode.net,
 and an unoffical support forum at www.mwusers.com.
+
+hihi

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fbc1b6351484dccc0c34655b8e283ef1635b0b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson (WMF) ebernhard...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use addCaptchaAPI to supply info to signup form - change (mediawiki...ConfirmEdit)

2013-04-22 Thread Spage (Code Review)
Spage has uploaded a new change for review.

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


Change subject: Use addCaptchaAPI to supply info to signup form
..

Use addCaptchaAPI to supply info to signup form

In injectUserCreate(), in 1.22wmf3 and above, instead of adding HTML to
the form template's header, call addCaptchaAPI() to add captcha keys to
the template.

The Create account form has to be updated to know how to create HTML
from the captcha info. Do NOT merge this change without coordination
with mediawiki core.

Also change a comment.

Bug: 467590
Change-Id: I16e63b086ee1aaa7fc205732a531a73e55a44a91
---
M Captcha.php
1 file changed, 25 insertions(+), 9 deletions(-)


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

diff --git a/Captcha.php b/Captcha.php
index 2d6afbf..487f6a8 100644
--- a/Captcha.php
+++ b/Captcha.php
@@ -98,23 +98,38 @@
}
 
/**
-* Inject whazawhoo
-* @fixme if multiple thingies insert a header, could break
+* Inject into Create account form.
 * @param QuickTemplate $template
 * @return bool true to keep running callbacks
 */
function injectUserCreate( $template ) {
-   global $wgCaptchaTriggers, $wgOut, $wgUser;
+   global $wgCaptchaTriggers, $wgOut, $wgUser, $wgVersion;
if ( $wgCaptchaTriggers['createaccount'] ) {
if ( $wgUser-isAllowed( 'skipcaptcha' ) ) {
wfDebug( ConfirmEdit: user group allows 
skipping captcha on account creation\n );
return true;
}
-   $template-set( 'header',
-   div class='captcha' .
-   $wgOut-parse( $this-getMessage( 
'createaccount' ) ) .
-   $this-getForm() .
-   /div\n );
+   if ( version_compare( $wgVersion, '1.22wmf3', '' ) ) {
+   // Old way: put HTML in template 'header' field.
+   // If multiple hooks put stuff in header, this 
breaks.
+   $template-set( 'header',
+   div class='captcha' .
+   $wgOut-parse( $this-getMessage( 
'createaccount' ) ) .
+   $this-getForm() .
+   /div\n );
+   } else {
+   // New way: addCaptchaAPI adds captcha array 
with subkeys; put
+   // this in template, and calling form decides 
how to render.
+   $resultArr = array();
+   $this-addCaptchaAPI( $resultArr );
+   $template-set( 'captcha', 
$resultArr['captcha'] );
+   if ( !isset( $resultArr['captcha'] ) || count( 
$resultArr )  1 ) {
+   var_dump( $resultArr );
+   wfDebug( 'ConfirmEdit: addCaptchaAPI 
set unexpected keys in (' .
+   implode( array_keys( $resultArr 
), '-' )
+   . )\n );
+   }
+   }
}
return true;
}
@@ -533,7 +548,8 @@
 
$this-trigger = post-badlogin login ' . 
$u-getName() . ';
if ( !$this-passCaptcha() ) {
-   // Emulate a bad-password return to confuse the 
shit out of attackers
+   // Emulate a bad-password return to confuse the 
shit out of
+   // attackers (but see bug 12206).
$retval = LoginForm::WRONG_PASS;
return false;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16e63b086ee1aaa7fc205732a531a73e55a44a91
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Spage sp...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make Echo daily cron run against the wikis defined in echowi... - change (operations/puppet)

2013-04-22 Thread Pyoungmeister (Code Review)
Pyoungmeister has submitted this change and it was merged.

Change subject: Make Echo daily cron run against the wikis defined in 
echowikis.dblist
..


Make Echo daily cron run against the wikis defined in echowikis.dblist

Change-Id: If5307f571a84089a2a24a5e08e7e936165b02205
---
M manifests/misc/maintenance.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 266ab41..8dca508 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -157,7 +157,7 @@
 class misc::maintenance::echo_mail_batch( $enabled = inline_template(%= 
$::site == $::primary_site  %) ) {
cron {
echo_mail_batch:
-   command = /usr/local/bin/mwscript 
extensions/Echo/processEchoEmailBatch.php testwiki,
+   command = /usr/local/bin/foreachwikiindblist 
/home/wikipedia/common/echowikis.dblist 
extensions/Echo/processEchoEmailBatch.php,
user = apache,
minute = 0,
hour = 0,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5307f571a84089a2a24a5e08e7e936165b02205
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Bsitu bs...@wikimedia.org
Gerrit-Reviewer: Bsitu bs...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Lwelling lwell...@wikimedia.org
Gerrit-Reviewer: Pyoungmeister p...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] deprecate Advanced Search contacts and contributions view - change (wikimedia...crm)

2013-04-22 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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


Change subject: deprecate Advanced Search contacts and contributions view
..

deprecate Advanced Search contacts and contributions view

Nobody uses it, and it was an overpriced cheap hack to begin with.

Change-Id: I9ce48f5bde233720dc9fa16d91f35a7d6f016ee6
---
D 
sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php
M sites/all/modules/wmf_reports/wmf_reports.module
2 files changed, 0 insertions(+), 319 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/51/60351/1

diff --git 
a/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php
 
b/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php
deleted file mode 100644
index 6f98ea8..000
--- 
a/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php
+++ /dev/null
@@ -1,306 +0,0 @@
-?php
-
-class CRM_Contact_Form_ContactAndContributionsSelector extends 
CRM_Contribute_Selector_Search
-{
-static $contact_properties = array(
-'contact_id',
-'contact_type',
-'sort_name',
-'do_not_email',
-'do_not_phone',
-'do_not_mail',
-'do_not_sms',
-'do_not_trade',
-'is_opt_out',
-);
-static $location_properties = array(
-'address_name',
-'street_address',
-'supplemental_address_1',
-'supplemental_address_2',
-'city',
-'state_province_id',
-'country_id',
-'postal_code',
-'postal_code_suffix',
-'geo_code_1',
-'geo_code_2',
-'is_primary',
-'is_billing',
-
-'phone',
-'phone_ext',
-);
-static $contribution_properties = array(
-'contribution_id',
-'amount_level',
-'total_amount',
-'contribution_type',
-'contribution_source',
-'receive_date',
-'thankyou_date',
-'contribution_status_id',
-'contribution_status',
-'cancel_date',
-'product_name',
-'is_test',
-'contribution_recur_id',
-'membership_id',
-'currency',
-'contribution_campaign_id',
-'note',
-);
-static $all_location_types;
-
-function __construct($queryParams,
- $action = CRM_Core_Action::NONE,
- $contributionClause = null,
- $single = false,
- $limit = null,
- $context = 'search',
- $compContext = null ) 
-{
-// submitted form values
-$this-_queryParams = $queryParams;
-
-$this-_limit   = $limit;
-$this-_context = $context;
-$this-_compContext = $compContext;
-
-$this-_contributionClause = $contributionClause;
-
-// type of selector
-$this-_action = $action;
-
-$returnProperties = CRM_Contribute_BAO_Query::defaultReturnProperties(
-CRM_Contact_BAO_Query::MODE_CONTRIBUTE,
-false
-);
-self::$all_location_types = CRM_Core_PseudoConstant::locationType();
-foreach (self::$all_location_types as $location_type)
-{
-foreach (self::$location_properties as $property)
-{
-$returnProperties['location'][$location_type][$property] = 1;
-}
-}
-$returnProperties = array_merge_recursive(
-$returnProperties,
-self::$contribution_properties,
-self::$contact_properties
-);
-$this-_query = new CRM_Contact_BAO_Query(
-$this-_queryParams,
-$returnProperties,
-null, //array('notes' = 1),
-false,
-false,
-CRM_Contact_BAO_Query::MODE_CONTRIBUTE
-);
-$this-_query-_distinctComponentClause =  civicrm_contribution.id;
-$this-_query-_groupByComponentClause  =  GROUP BY 
civicrm_contribution.id ;
-}
-
-function getRows($action, $offset, $rowCount, $sort, $output = null) {
-$result = $this-_query-searchQuery( $offset, $rowCount, $sort,
-  false, false, 
-  false, false, 
-  false, 
-  $this-_contributionClause );
-// process the result of the query
-$rows = array( );
-
-//CRM-4418 check for view/edit/delete
-$permissions = array( CRM_Core_Permission::VIEW );
-if ( CRM_Core_Permission::check( 'edit contributions' ) ) {
-$permissions[] = CRM_Core_Permission::EDIT;
-}
-if ( CRM_Core_Permission::check( 'delete in CiviContribute' ) ) {
-

[MediaWiki-commits] [Gerrit] deprecate Advanced Search contacts and contributions view - change (wikimedia...crm)

2013-04-22 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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


Change subject: deprecate Advanced Search contacts and contributions view
..

deprecate Advanced Search contacts and contributions view

Nobody uses it, and it was an overpriced cheap hack to begin with.

Change-Id: Ia502e06ad45bf8303d0fd65293d78ffd6b848199
---
D 
sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php
M sites/all/modules/wmf_reports/wmf_reports.module
2 files changed, 0 insertions(+), 319 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/52/60352/1

diff --git 
a/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php
 
b/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php
deleted file mode 100644
index 6f98ea8..000
--- 
a/sites/all/modules/wmf_reports/CRM/Contact/Form/ContactAndContributionsSelector.php
+++ /dev/null
@@ -1,306 +0,0 @@
-?php
-
-class CRM_Contact_Form_ContactAndContributionsSelector extends 
CRM_Contribute_Selector_Search
-{
-static $contact_properties = array(
-'contact_id',
-'contact_type',
-'sort_name',
-'do_not_email',
-'do_not_phone',
-'do_not_mail',
-'do_not_sms',
-'do_not_trade',
-'is_opt_out',
-);
-static $location_properties = array(
-'address_name',
-'street_address',
-'supplemental_address_1',
-'supplemental_address_2',
-'city',
-'state_province_id',
-'country_id',
-'postal_code',
-'postal_code_suffix',
-'geo_code_1',
-'geo_code_2',
-'is_primary',
-'is_billing',
-
-'phone',
-'phone_ext',
-);
-static $contribution_properties = array(
-'contribution_id',
-'amount_level',
-'total_amount',
-'contribution_type',
-'contribution_source',
-'receive_date',
-'thankyou_date',
-'contribution_status_id',
-'contribution_status',
-'cancel_date',
-'product_name',
-'is_test',
-'contribution_recur_id',
-'membership_id',
-'currency',
-'contribution_campaign_id',
-'note',
-);
-static $all_location_types;
-
-function __construct($queryParams,
- $action = CRM_Core_Action::NONE,
- $contributionClause = null,
- $single = false,
- $limit = null,
- $context = 'search',
- $compContext = null ) 
-{
-// submitted form values
-$this-_queryParams = $queryParams;
-
-$this-_limit   = $limit;
-$this-_context = $context;
-$this-_compContext = $compContext;
-
-$this-_contributionClause = $contributionClause;
-
-// type of selector
-$this-_action = $action;
-
-$returnProperties = CRM_Contribute_BAO_Query::defaultReturnProperties(
-CRM_Contact_BAO_Query::MODE_CONTRIBUTE,
-false
-);
-self::$all_location_types = CRM_Core_PseudoConstant::locationType();
-foreach (self::$all_location_types as $location_type)
-{
-foreach (self::$location_properties as $property)
-{
-$returnProperties['location'][$location_type][$property] = 1;
-}
-}
-$returnProperties = array_merge_recursive(
-$returnProperties,
-self::$contribution_properties,
-self::$contact_properties
-);
-$this-_query = new CRM_Contact_BAO_Query(
-$this-_queryParams,
-$returnProperties,
-null, //array('notes' = 1),
-false,
-false,
-CRM_Contact_BAO_Query::MODE_CONTRIBUTE
-);
-$this-_query-_distinctComponentClause =  civicrm_contribution.id;
-$this-_query-_groupByComponentClause  =  GROUP BY 
civicrm_contribution.id ;
-}
-
-function getRows($action, $offset, $rowCount, $sort, $output = null) {
-$result = $this-_query-searchQuery( $offset, $rowCount, $sort,
-  false, false, 
-  false, false, 
-  false, 
-  $this-_contributionClause );
-// process the result of the query
-$rows = array( );
-
-//CRM-4418 check for view/edit/delete
-$permissions = array( CRM_Core_Permission::VIEW );
-if ( CRM_Core_Permission::check( 'edit contributions' ) ) {
-$permissions[] = CRM_Core_Permission::EDIT;
-}
-if ( CRM_Core_Permission::check( 'delete in CiviContribute' ) ) {
-

[MediaWiki-commits] [Gerrit] Update entities version dependency, conditionally use workar... - change (mediawiki...Parsoid)

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

Change subject: Update entities version dependency, conditionally use 
workaround.
..


Update entities version dependency, conditionally use workaround.

Once everyone is using the new entities version, we'll punt the
workaround entirely.

Change-Id: I84a485296973c7e69084554564ac47ae0ebc9447
---
M js/lib/mediawiki.Util.js
M js/package.json
2 files changed, 8 insertions(+), 6 deletions(-)

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



diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index 7b67257..8ce50da 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -14,11 +14,13 @@
 
 /** WORKAROUND HACK to entities package, using domino. */
 // see https://github.com/fb55/node-entities/issues/8
-entities.decodeHTML5 = function(data) {
-   return data.replace(/(#\d+|#[xX][0-9a-fA-F]+|[A-Za-z]+);/g, 
function(e) {
-   return domino.createDocument('x'+e).body.textContent.substr(1);
-   });
-};
+if ( /^0.2.[01]$/.test( require( 'entities/package.json' ).version ) ) {
+   entities.decodeHTML5 = function(data) {
+   return data.replace(/(#\d+|#[xX][0-9a-fA-F]+|[A-Za-z]+);/g, 
function(e) {
+   return 
domino.createDocument('x'+e).body.textContent.substr(1);
+   });
+   };
+}
 
 /**
  * @class
diff --git a/js/package.json b/js/package.json
index d0eb36a..1973f37 100644
--- a/js/package.json
+++ b/js/package.json
@@ -4,7 +4,7 @@
version: 0.0.1,
dependencies: {
alea: ~0.0.9,
-   entities: ~0.2.1,
+   entities: ~0.2.2,
events: 0.x.x,
request: 2.x.x,
querystring: 0.x.x,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I84a485296973c7e69084554564ac47ae0ebc9447
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott wikime...@cscott.net
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] ThankYou Date is Optional - change (wikimedia...crm)

2013-04-22 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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


Change subject: ThankYou Date is Optional
..

ThankYou Date is Optional

If thankyou_date is already set in a contribution ThankYou_send will not
send an email. In some cases we do not want to send an email, e.g. we got
a check; so we have to set this to something. This allows both cases.

Change-Id: Ie21bd84b1373836277046d8b6e2cdd74cad5125a
---
M .gitignore
M sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/54/60354/1

diff --git a/.gitignore b/.gitignore
index f1bc2fb..4302da2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 sites/default/civicrm.settings.php
 sites/default/settings.php
 sites/default/files
+.idea
diff --git a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
index 6264268..b853b81 100644
--- a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
@@ -275,12 +275,16 @@
 'contribution_recur_id' = $recur_id,
 'check_number' = $msg['check_number'],
 'letter_code' = $msg['letter_code'],
-'thankyou_date' = date( 'Y-m-d H:i:s', $msg['thankyou_date'] ),
 
 // API required fields
 'version' = '3'
 );
 
+// Add the thank you date when it exists and is not null (e.g.: we're 
importing from a check)
+if ( array_key_exists( 'thankyou_date', $msg )  $msg[ 'thankyou_date' ] 
) {
+$contribution[ 'thankyou_date' ] = date( 'Y-m-d H:i:s', 
$msg['thankyou_date'] );
+}
+
 watchdog( 'wmf_civicrm', 'Contribution array for 
civicrm_contribution_add(): ' . print_r($contribution, TRUE), NULL, 
WATCHDOG_DEBUG);
 
 $contribution_result = civicrm_api( Contribution, Create, 
$contribution );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie21bd84b1373836277046d8b6e2cdd74cad5125a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] wikibugs - fix log file path - quick fix - change (operations/puppet)

2013-04-22 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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


Change subject: wikibugs - fix log file path - quick fix
..

wikibugs - fix log file path - quick fix

Change-Id: I5466ec63ce49fd02af7b80ddc2053134474016d8
---
M manifests/misc/wikibugs.pp
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/60356/1

diff --git a/manifests/misc/wikibugs.pp b/manifests/misc/wikibugs.pp
index 2799ddb..c86b436 100644
--- a/manifests/misc/wikibugs.pp
+++ b/manifests/misc/wikibugs.pp
@@ -19,11 +19,11 @@
 
   # Some Bugzilla product have been blessed with their own log files out of the
   # default one. Values are hardcoded in the Wikibugs perl script
-  $ircecho_logbase = '/var/lib/wikibugs/logs'
+  $ircecho_logbase = '/var/wikibugs'
   $ircecho_logs = {
-${ircecho_logbase}/wikimedia-labs.log   = '#wikimedia-labs',
-${ircecho_logbase}/wikimedia-mobile.log = '#wikimedia-mobile',
-${ircecho_logbase}/wikimedia-dev.log= '#wikimedia-dev',
+${ircecho_logbase}/wikibugs.log = '#wikimedia-labs',
+${ircecho_logbase}/wikimedia-mobile.log = '#wikimedia-mobile',
+${ircecho_logbase}/wikibugs.log = '#wikimedia-dev',
   }
 
   $ircecho_nick = 'wikibugs'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5466ec63ce49fd02af7b80ddc2053134474016d8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] wikibugs - fix log file path - quick fix - change (operations/puppet)

2013-04-22 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: wikibugs - fix log file path - quick fix
..


wikibugs - fix log file path - quick fix

Change-Id: I5466ec63ce49fd02af7b80ddc2053134474016d8
---
M manifests/misc/wikibugs.pp
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/manifests/misc/wikibugs.pp b/manifests/misc/wikibugs.pp
index 2799ddb..c86b436 100644
--- a/manifests/misc/wikibugs.pp
+++ b/manifests/misc/wikibugs.pp
@@ -19,11 +19,11 @@
 
   # Some Bugzilla product have been blessed with their own log files out of the
   # default one. Values are hardcoded in the Wikibugs perl script
-  $ircecho_logbase = '/var/lib/wikibugs/logs'
+  $ircecho_logbase = '/var/wikibugs'
   $ircecho_logs = {
-${ircecho_logbase}/wikimedia-labs.log   = '#wikimedia-labs',
-${ircecho_logbase}/wikimedia-mobile.log = '#wikimedia-mobile',
-${ircecho_logbase}/wikimedia-dev.log= '#wikimedia-dev',
+${ircecho_logbase}/wikibugs.log = '#wikimedia-labs',
+${ircecho_logbase}/wikimedia-mobile.log = '#wikimedia-mobile',
+${ircecho_logbase}/wikibugs.log = '#wikimedia-dev',
   }
 
   $ircecho_nick = 'wikibugs'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5466ec63ce49fd02af7b80ddc2053134474016d8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] ThankYou Date is Optional - change (wikimedia...crm)

2013-04-22 Thread Adamw (Code Review)
Adamw has submitted this change and it was merged.

Change subject: ThankYou Date is Optional
..


ThankYou Date is Optional

If thankyou_date is already set in a contribution ThankYou_send will not
send an email. In some cases we do not want to send an email, e.g. we got
a check; so we have to set this to something. This allows both cases.

Change-Id: Ie21bd84b1373836277046d8b6e2cdd74cad5125a
---
M .gitignore
M sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/.gitignore b/.gitignore
index f1bc2fb..4302da2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 sites/default/civicrm.settings.php
 sites/default/settings.php
 sites/default/files
+.idea
diff --git a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
index 6264268..b853b81 100644
--- a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
@@ -275,12 +275,16 @@
 'contribution_recur_id' = $recur_id,
 'check_number' = $msg['check_number'],
 'letter_code' = $msg['letter_code'],
-'thankyou_date' = date( 'Y-m-d H:i:s', $msg['thankyou_date'] ),
 
 // API required fields
 'version' = '3'
 );
 
+// Add the thank you date when it exists and is not null (e.g.: we're 
importing from a check)
+if ( array_key_exists( 'thankyou_date', $msg )  $msg[ 'thankyou_date' ] 
) {
+$contribution[ 'thankyou_date' ] = date( 'Y-m-d H:i:s', 
$msg['thankyou_date'] );
+}
+
 watchdog( 'wmf_civicrm', 'Contribution array for 
civicrm_contribution_add(): ' . print_r($contribution, TRUE), NULL, 
WATCHDOG_DEBUG);
 
 $contribution_result = civicrm_api( Contribution, Create, 
$contribution );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie21bd84b1373836277046d8b6e2cdd74cad5125a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org
Gerrit-Reviewer: Adamw awi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Exterminate global usage in defines - change (mediawiki...Parsoid)

2013-04-22 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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


Change subject: Exterminate global usage in defines
..

Exterminate global usage in defines

We used to define a few constructors and some state on the global object to
make it available to the PEG tokenizer. We have since found a way to pass the
state into the PEG tokenizer, but a few constructors were still added to the
global object in the defines module. The predecessor patch
I8810da3a5ec287d7ae9078463ba01472a87a492e adds explicit local definitions in
most remaining places. This patch finally does the same for the tokenizer and
removes the global definitions altogether.

Currently parserTests fail on node 0.6.x due to a recursive dependency which
is being investigated in I8810da3a5ec287d7ae9078463ba01472a87a492e.

Change-Id: If0ada2ea04b680b90caeb4fa76c46ca272e78d43
---
M js/lib/mediawiki.parser.defines.js
M js/lib/pegTokenizer.pegjs.txt
2 files changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/57/60357/1

diff --git a/js/lib/mediawiki.parser.defines.js 
b/js/lib/mediawiki.parser.defines.js
index a674d5f..188caf7 100644
--- a/js/lib/mediawiki.parser.defines.js
+++ b/js/lib/mediawiki.parser.defines.js
@@ -955,15 +955,4 @@
Params: Params,
ParserValue: ParserValue
};
-   // TODO: don't use globals!
-   global.TagTk = TagTk;
-   global.InternalTk = InternalTk;
-   global.EndTagTk = EndTagTk;
-   global.SelfclosingTagTk = SelfclosingTagTk;
-   global.NlTk = NlTk;
-   global.CommentTk = CommentTk;
-   global.EOFTk = EOFTk;
-   global.KV = KV;
-   global.Params = Params;
-   global.ParserValue = ParserValue;
 }
diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt
index d5c7c27..6455e88 100644
--- a/js/lib/pegTokenizer.pegjs.txt
+++ b/js/lib/pegTokenizer.pegjs.txt
@@ -35,6 +35,17 @@
 
 var Util = require('./mediawiki.Util.js').Util;
 
+// import defines and define some constructor shortcuts
+   var defines = require('./mediawiki.parser.defines.js'),
+KV = defines.KV,
+TagTk = defines.TagTk,
+SelfclosingTagTk = defines.SelfclosingTagTk,
+EndTagTk = defines.EndTagTk,
+NlTk = defines.NlTk,
+CommentTk = defines.CommentTk,
+EOFTk = defines.EOFTk;
+
+
 var flattenIfArray = function(e) {
 function internal_flatten(e, res) {
 // Don't bother flattening if we dont have an array

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0ada2ea04b680b90caeb4fa76c46ca272e78d43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Move SiteMatrix special page to its own file - change (mediawiki...SiteMatrix)

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

Change subject: Move SiteMatrix special page to its own file
..


Move SiteMatrix special page to its own file

Change-Id: Ic1e275fec7ba0667a4d51459c871eb8ee13d0f62
---
M SiteMatrix.php
M SiteMatrixApi.php
M SiteMatrix_body.php
A SpecialSiteMatrix.php
4 files changed, 147 insertions(+), 147 deletions(-)

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



diff --git a/SiteMatrix.php b/SiteMatrix.php
index 98a2f56..aa0d29e 100644
--- a/SiteMatrix.php
+++ b/SiteMatrix.php
@@ -72,8 +72,9 @@
 $wgExtensionMessagesFiles['SiteMatrixAlias'] = $dir . 'SiteMatrix.alias.php';
 
 $wgAutoloadClasses['SiteMatrix'] = $dir . 'SiteMatrix_body.php';
-$wgAutoloadClasses['SiteMatrixPage'] = $dir . 'SiteMatrix_body.php';
-$wgSpecialPages['SiteMatrix'] = 'SiteMatrixPage';
+
+$wgAutoloadClasses['SpecialSiteMatrix'] = $dir . 'SpecialSiteMatrix.php';
+$wgSpecialPages['SiteMatrix'] = 'SpecialSiteMatrix';
 $wgSpecialPageGroups['SiteMatrix'] = 'wiki';
 
 $wgAutoloadClasses['ApiQuerySiteMatrix'] = $dir . 'SiteMatrixApi.php';
diff --git a/SiteMatrixApi.php b/SiteMatrixApi.php
index 8fd80ae..5856c3b 100644
--- a/SiteMatrixApi.php
+++ b/SiteMatrixApi.php
@@ -24,7 +24,7 @@
'count' = $matrix-getCount(),
);
 
-   $localLanguageNames = SiteMatrixPage::getLocalLanguageNames();
+   $localLanguageNames = 
SpecialSiteMatrix::getLocalLanguageNames();
 
$params = $this-extractRequestParams();
$type = array_flip( $params['type'] );
diff --git a/SiteMatrix_body.php b/SiteMatrix_body.php
index 10c576f..e794812 100644
--- a/SiteMatrix_body.php
+++ b/SiteMatrix_body.php
@@ -5,9 +5,6 @@
exit( 1 );
 }
 
-global $IP;
-require_once( $IP . '/languages/Names.php' );
-
 class SiteMatrix {
protected $langlist, $sites, $names, $hosts;
 
@@ -347,146 +344,5 @@
}
 
return true;
-   }
-}
-
-class SiteMatrixPage extends SpecialPage {
-
-   function __construct() {
-   parent::__construct( 'SiteMatrix' );
-   }
-
-   /**
-* @return array
-*/
-   public static function getLocalLanguageNames() {
-   if ( class_exists( 'LanguageNames' ) ) {
-   global $wgLang;
-   return LanguageNames::getNames( $wgLang-getCode() );
-   }
-   return array();
-   }
-
-   function execute( $par ) {
-   $langNames = Language::fetchLanguageNames();
-
-   $this-setHeaders();
-   $this-outputHeader();
-
-   $matrix = new SiteMatrix();
-
-   $localLanguageNames = self::getLocalLanguageNames();
-
-   # Construct the HTML
-
-   # Header row
-   $s = Xml::openElement( 'table', array( 'class' = 'wikitable', 
'id' = 'mw-sitematrix-table' ) ) .
-   tr .
-   Xml::element( 'th',
-   array( 'rowspan' = 2 ),
-   $this-msg( 'sitematrix-language' )-text() ) .
-   Xml::element( 'th',
-   array( 'colspan' = count( $matrix-getSites() 
) ),
-   $this-msg( 'sitematrix-project' )-text() ) .
-   /tr
-   tr;
-   foreach ( $matrix-getNames() as $id = $name ) {
-   $url = $matrix-getSiteUrl( $id );
-   $s .= Xml::tags( 'th', null, a 
href=\{$url}\{$name}/a );
-   }
-   $s .= /tr\n;
-
-   # Bulk of table
-   foreach ( $matrix-getLangList() as $lang ) {
-   $anchor = strtolower( 'a id=' . htmlspecialchars( 
$lang ) . ' name=' . htmlspecialchars( $lang ) . '/a' );
-   $s .= 'tr';
-   $attribs = array();
-   if ( isset( $localLanguageNames[$lang] ) ) {
-   $attribs['title'] = $localLanguageNames[$lang];
-   }
-
-   $langDisplay = ( isset( $langNames[$lang] ) ? 
Html::rawElement( 'span', array( 'lang' = htmlspecialchars( $lang ) ), 
$langNames[$lang] ) : '' );
-   if ( isset( $localLanguageNames[$lang] )  strlen( 
$localLanguageNames[$lang] )  $langDisplay != $localLanguageNames[$lang] ) {
-   $langDisplay .= $this-msg( 'word-separator' 
)-text() .
-$this-msg( 'parentheses', 
$localLanguageNames[$lang] )-text();
-   }
-   $s .= 'td' . $anchor . Html::rawElement( 'strong', 
$attribs, $langDisplay ) . '/td';
-
-   foreach ( $matrix-getNames() as $site = $name ) {
-   $url = 

[MediaWiki-commits] [Gerrit] Fix cron for Echo notification email digests/summaries - change (operations/puppet)

2013-04-22 Thread Lwelling (Code Review)
Lwelling has uploaded a new change for review.

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


Change subject: Fix cron for Echo notification email digests/summaries
..

Fix cron for Echo notification email digests/summaries

Via Roan, terbium doesn't have /home. You need to use /usr/local/apache/common/ 
instead.

Change-Id: I36d9c7fdc1afa771bf15d6ce80a80457bf4634bd
---
M manifests/misc/maintenance.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/60358/1

diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 8dca508..712dba3 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -157,7 +157,7 @@
 class misc::maintenance::echo_mail_batch( $enabled = inline_template(%= 
$::site == $::primary_site  %) ) {
cron {
echo_mail_batch:
-   command = /usr/local/bin/foreachwikiindblist 
/home/wikipedia/common/echowikis.dblist 
extensions/Echo/processEchoEmailBatch.php,
+   command = /usr/local/bin/foreachwikiindblist 
/usr/local/apache/common/echowikis.dblist 
extensions/Echo/processEchoEmailBatch.php,
user = apache,
minute = 0,
hour = 0,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36d9c7fdc1afa771bf15d6ce80a80457bf4634bd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lwelling lwell...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix cron for Echo notification email digests/summaries - change (operations/puppet)

2013-04-22 Thread Pyoungmeister (Code Review)
Pyoungmeister has submitted this change and it was merged.

Change subject: Fix cron for Echo notification email digests/summaries
..


Fix cron for Echo notification email digests/summaries

Via Roan, terbium doesn't have /home. You need to use /usr/local/apache/common/ 
instead.

Change-Id: I36d9c7fdc1afa771bf15d6ce80a80457bf4634bd
---
M manifests/misc/maintenance.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 8dca508..712dba3 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -157,7 +157,7 @@
 class misc::maintenance::echo_mail_batch( $enabled = inline_template(%= 
$::site == $::primary_site  %) ) {
cron {
echo_mail_batch:
-   command = /usr/local/bin/foreachwikiindblist 
/home/wikipedia/common/echowikis.dblist 
extensions/Echo/processEchoEmailBatch.php,
+   command = /usr/local/bin/foreachwikiindblist 
/usr/local/apache/common/echowikis.dblist 
extensions/Echo/processEchoEmailBatch.php,
user = apache,
minute = 0,
hour = 0,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36d9c7fdc1afa771bf15d6ce80a80457bf4634bd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lwelling lwell...@wikimedia.org
Gerrit-Reviewer: Pyoungmeister p...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


<    1   2   3   >