[MediaWiki-commits] [Gerrit] Specify version for git-review package resource - change (mediawiki/vagrant)

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

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


Change subject: Specify version for git-review package resource
..

Specify version for git-review package resource

ensure = latest doesn't work well with the pip provider. legoktm was getting
the following output:

  /Stage[main]/Git/Package[git-review]: Could not evaluate: Could not get
  latest version: Wrong size. Was 0, should be unknown

This tracks my experience with the pip provider in the past. The fix is the
same as the fix for phpsh: hard-code a specific version number. Blech.

Change-Id: Ia9bce22ae5cf460a5f4984164d7e029cc9b52cdd
---
M puppet/modules/git/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/12/104712/1

diff --git a/puppet/modules/git/manifests/init.pp 
b/puppet/modules/git/manifests/init.pp
index 7ffbfe7..854845a 100644
--- a/puppet/modules/git/manifests/init.pp
+++ b/puppet/modules/git/manifests/init.pp
@@ -27,7 +27,7 @@
 }
 
 package { 'git-review':
-ensure   = latest,
+ensure   = '1.23',
 provider = pip,
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9bce22ae5cf460a5f4984164d7e029cc9b52cdd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
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] Specify version for git-review package resource - change (mediawiki/vagrant)

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

Change subject: Specify version for git-review package resource
..


Specify version for git-review package resource

ensure = latest doesn't work well with the pip provider. legoktm was getting
the following output:

  /Stage[main]/Git/Package[git-review]: Could not evaluate: Could not get
  latest version: Wrong size. Was 0, should be unknown

This tracks my experience with the pip provider in the past. The fix is the
same as the fix for phpsh: hard-code a specific version number. Blech.

Change-Id: Ia9bce22ae5cf460a5f4984164d7e029cc9b52cdd
---
M puppet/modules/git/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/puppet/modules/git/manifests/init.pp 
b/puppet/modules/git/manifests/init.pp
index 7ffbfe7..854845a 100644
--- a/puppet/modules/git/manifests/init.pp
+++ b/puppet/modules/git/manifests/init.pp
@@ -27,7 +27,7 @@
 }
 
 package { 'git-review':
-ensure   = latest,
+ensure   = '1.23',
 provider = pip,
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia9bce22ae5cf460a5f4984164d7e029cc9b52cdd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove version check for mysql 4.1 from Maintenance scripts - change (mediawiki/core)

2013-12-31 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review.

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


Change subject: Remove version check for mysql 4.1 from Maintenance scripts
..

Remove version check for mysql 4.1 from Maintenance scripts

Removed version check for mysql from initEditCount.php and
storage/fixBug20757.php. Mediawiki needs MYSQL Ver 5.0.2 or
later, so the check is unnecessary.

Bug: 59126
Change-Id: I29e2ca8764fad8bf4d15bba307e80f3aacea1db7
---
M maintenance/initEditCount.php
M maintenance/storage/fixBug20757.php
2 files changed, 3 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/104713/1

diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php
index 4b04683..7c6e7d4 100644
--- a/maintenance/initEditCount.php
+++ b/maintenance/initEditCount.php
@@ -47,7 +47,7 @@
 
// Autodetect mode...
$backgroundMode = wfGetLB()-getServerCount()  1 ||
-   ( $dbw instanceof DatabaseMysql  version_compare( 
$dbver, '4.1' )  0 );
+   ( $dbw instanceof DatabaseMysql );
 
if ( $this-hasOption( 'background' ) ) {
$backgroundMode = true;
diff --git a/maintenance/storage/fixBug20757.php 
b/maintenance/storage/fixBug20757.php
index e832b4e..dfb964a 100644
--- a/maintenance/storage/fixBug20757.php
+++ b/maintenance/storage/fixBug20757.php
@@ -57,15 +57,10 @@
 
$totalRevs = $dbr-selectField( 'text', 'MAX(old_id)', false, 
__METHOD__ );
 
-   if ( $dbr-getType() == 'mysql'
-version_compare( $dbr-getServerVersion(), '4.1.0', 
'=' )
-   ) {
+   if ( $dbr-getType() == 'mysql' ) {
// In MySQL 4.1+, the binary field old_text has a 
non-working LOWER() function
$lowerLeft = 'LOWER(CONVERT(LEFT(old_text,22) USING 
latin1))';
-   } else {
-   // No CONVERT() in MySQL 4.0
-   $lowerLeft = 'LOWER(LEFT(old_text,22))';
-   }
+   } 
 
while ( true ) {
print ID: $startId / $totalRevs\r;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29e2ca8764fad8bf4d15bba307e80f3aacea1db7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas 01tonytho...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update version date. - change (mediawiki...UniversalLanguageSelector)

2013-12-31 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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


Change subject: Update version date.
..

Update version date.

Change-Id: I9d189c8e0b37fee21230ea94ca3f9443e4d6958f
---
M UniversalLanguageSelector.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php
index 6fd2640..84584c9 100644
--- a/UniversalLanguageSelector.php
+++ b/UniversalLanguageSelector.php
@@ -25,7 +25,7 @@
 /**
  * Version number used in extension credits and in other placed where needed.
  */
-define( 'ULS_VERSION', '2013-11-27' );
+define( 'ULS_VERSION', '2013-12-31' );
 
 $wgExtensionCredits['other'][] = array(
'path' = __FILE__,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d189c8e0b37fee21230ea94ca3f9443e4d6958f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update version date. - change (mediawiki...Translate)

2013-12-31 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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


Change subject: Update version date.
..

Update version date.

Change-Id: I0e3ab748f06e8782bec5d81807cd841a06e78451
---
M Translate.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/Translate.php b/Translate.php
index b29688c..b54ccb2 100644
--- a/Translate.php
+++ b/Translate.php
@@ -17,7 +17,7 @@
 /**
  * Version number used in extension credits and in other places where needed.
  */
-define( 'TRANSLATE_VERSION', '2013-12-23' );
+define( 'TRANSLATE_VERSION', '2013-12-31' );
 
 /**
  * Extension credits properties.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e3ab748f06e8782bec5d81807cd841a06e78451
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update version date. - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Update version date.
..


Update version date.

Change-Id: I9d189c8e0b37fee21230ea94ca3f9443e4d6958f
---
M UniversalLanguageSelector.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php
index 6fd2640..84584c9 100644
--- a/UniversalLanguageSelector.php
+++ b/UniversalLanguageSelector.php
@@ -25,7 +25,7 @@
 /**
  * Version number used in extension credits and in other placed where needed.
  */
-define( 'ULS_VERSION', '2013-11-27' );
+define( 'ULS_VERSION', '2013-12-31' );
 
 $wgExtensionCredits['other'][] = array(
'path' = __FILE__,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d189c8e0b37fee21230ea94ca3f9443e4d6958f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Siebrand siebr...@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 version date. - change (mediawiki...Translate)

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

Change subject: Update version date.
..


Update version date.

Change-Id: I0e3ab748f06e8782bec5d81807cd841a06e78451
---
M Translate.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Translate.php b/Translate.php
index b29688c..b54ccb2 100644
--- a/Translate.php
+++ b/Translate.php
@@ -17,7 +17,7 @@
 /**
  * Version number used in extension credits and in other places where needed.
  */
-define( 'TRANSLATE_VERSION', '2013-12-23' );
+define( 'TRANSLATE_VERSION', '2013-12-31' );
 
 /**
  * Extension credits properties.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e3ab748f06e8782bec5d81807cd841a06e78451
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Siebrand siebr...@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] i18n: consistency tweaks - change (mediawiki...GWToolset)

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

Change subject: i18n: consistency tweaks
..


i18n: consistency tweaks

* capitalize GWToolset
* remove commas from gwtoolset-required-group

Spotted by Siebrand
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Action-gwtoolset/en
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Gwtoolset-required-group/en

Change-Id: Ia350d781e23eb04e08b7f9ee58302ddae46b471a
---
M GWToolset.i18n.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php
index 7ce9051..cef683d 100644
--- a/GWToolset.i18n.php
+++ b/GWToolset.i18n.php
@@ -25,7 +25,7 @@
 * permission labels
 */
'right-gwtoolset' = 'Use GWToolset',
-   'action-gwtoolset' = 'use gwtoolset',
+   'action-gwtoolset' = 'use GWToolset',
'group-gwtoolset' = 'GWToolset users',
'group-gwtoolset-member' = '{{GENDER:$1|GWToolset user}}',
'grouppage-gwtoolset' = '{{ns:project}}:GWToolset users',
@@ -271,7 +271,7 @@
'gwtoolset-mediawiki-version-invalid' = 'This extension requires 
MediaWiki version $1br /This MediaWiki version is $2.',
'gwtoolset-permission-not-given' = 'Make sure that you are logged in 
or contact an administrator in order to be granted permission to view this page 
($1).',
'gwtoolset-user-blocked' = 'Your user account is currently blocked. 
Please contact an administrator in order to correct the blocking issue.',
-   'gwtoolset-required-group' = 'You are not a member of the, $1, group.',
+   'gwtoolset-required-group' = 'You are not a member of the $1 group.',
'gwtoolset-verify-api-enabled' = 'The $1 extension requires that the 
wiki API is enabled.
 
 Please make sure code$wgEnableAPI/code is set to codetrue/code in the 
codeDefaultSettings.php/code file or is overridden to codetrue/code in 
the codeLocalSettings.php/code file.',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia350d781e23eb04e08b7f9ee58302ddae46b471a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@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] wfRunHooks() return value no longer implies whether variable... - change (mediawiki/core)

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

Change subject: wfRunHooks() return value no longer implies whether variable 
value was found
..


wfRunHooks() return value no longer implies whether variable value was found

Bug: 12837
Change-Id: I459923deee4fa294f78f277620f229fc2a84d266
---
M includes/parser/Parser.php
1 file changed, 2 insertions(+), 5 deletions(-)

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



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 9be75ae..31638ce 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3034,11 +3034,8 @@
return $wgLanguageCode;
default:
$ret = null;
-   if ( wfRunHooks( 
'ParserGetVariableValueSwitch', array( $this, $this-mVarCache, $index, 
$ret, $frame ) ) ) {
-   return $ret;
-   } else {
-   return null;
-   }
+   wfRunHooks( 'ParserGetVariableValueSwitch', 
array( $this, $this-mVarCache, $index, $ret, $frame ) );
+   return $ret;
}
 
if ( $index ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I459923deee4fa294f78f277620f229fc2a84d266
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Vishnunk90 mails2vi...@gmail.com
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Daniel Werner daniel.a.r.wer...@gmail.com
Gerrit-Reviewer: MarkAHershberger mhershber...@wikimedia.org
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Sumanah suma...@wikimedia.org
Gerrit-Reviewer: Vishnunk90 mails2vi...@gmail.com
Gerrit-Reviewer: au audr...@audreyt.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove trailing commas - change (mediawiki...CodeEditor)

2013-12-31 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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


Change subject: Remove trailing commas
..

Remove trailing commas

Also submitted upstream as:
https://github.com/ajaxorg/ace/pull/1742

Change-Id: Ia71b4e35a7168ea4c437ae728de71e5b0fe03bbe
---
M modules/ace/ext-settings_menu.js
M modules/ace/ext-themelist.js
M modules/ace/mode-sjs.js
3 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/modules/ace/ext-settings_menu.js b/modules/ace/ext-settings_menu.js
index 2da280c..1983df3 100644
--- a/modules/ace/ext-settings_menu.js
+++ b/modules/ace/ext-settings_menu.js
@@ -469,7 +469,7 @@
 [Tomorrow Night Bright,tomorrow_night_bright   ,  dark],
 [Tomorrow Night 80s   ,tomorrow_night_eighties ,  dark],
 [Twilight ,twilight,  dark],
-[Vibrant Ink  ,vibrant_ink ,  dark],
+[Vibrant Ink  ,vibrant_ink ,  dark]
 ]
 
 
@@ -628,4 +628,4 @@
 editor.blur();
 };
 
-});
\ No newline at end of file
+});
diff --git a/modules/ace/ext-themelist.js b/modules/ace/ext-themelist.js
index bcddd47..29c591d 100644
--- a/modules/ace/ext-themelist.js
+++ b/modules/ace/ext-themelist.js
@@ -65,7 +65,7 @@
 [Tomorrow Night Bright,tomorrow_night_bright   ,  dark],
 [Tomorrow Night 80s   ,tomorrow_night_eighties ,  dark],
 [Twilight ,twilight,  dark],
-[Vibrant Ink  ,vibrant_ink ,  dark],
+[Vibrant Ink  ,vibrant_ink ,  dark]
 ]
 
 
diff --git a/modules/ace/mode-sjs.js b/modules/ace/mode-sjs.js
index aa36930..85ee809 100644
--- a/modules/ace/mode-sjs.js
+++ b/modules/ace/mode-sjs.js
@@ -1118,7 +1118,7 @@
 token: paren.lparen,
 regex: '{',
 next: string_interp
-}),
+})
 ].concat(embeddableRules);
 this.$rules.bstring_interp_single = [
 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia71b4e35a7168ea4c437ae728de71e5b0fe03bbe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Make SpecialWatchlist extend SpecialRecentChanges (temporarily) - change (mediawiki/core)

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

Change subject: Make SpecialWatchlist extend SpecialRecentChanges (temporarily)
..


Make SpecialWatchlist extend SpecialRecentChanges (temporarily)

Later both will be made to inherit from a base class, but this
makes some things simpler for now.

* `class SpecialWatchlist extends SpecialRecentChanges { … }`
* Fixes to both classes to ensure nothing breaks
* Remove redundant SpecialWatchlist#getGroupName()

No functional changes yet; just the framework change. Refactoring
follows in subsequent commits, with a base class for both of
these being introduced in I5855074deed52fd7492f033c8a8fced8af647602.

Bug: 48641
Change-Id: I394ab71bae876684e8f78236843861c7dd2ae22d
---
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialWatchlist.php
2 files changed, 12 insertions(+), 8 deletions(-)

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



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index f866158..81ef7ed 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -26,7 +26,7 @@
  *
  * @ingroup SpecialPage
  */
-class SpecialRecentChanges extends IncludableSpecialPage {
+class SpecialRecentChanges extends SpecialPage {
var $rcOptions, $rcSubpage;
protected $customFilters;
 
@@ -38,8 +38,12 @@
 */
protected $feedFormat;
 
-   public function __construct( $name = 'Recentchanges' ) {
-   parent::__construct( $name );
+   public function __construct( $name = 'Recentchanges', $restriction = '' 
) {
+   parent::__construct( $name, $restriction );
+   }
+
+   public function isIncludable() {
+   return true;
}
 
/**
diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 4d86744..19d2540 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -20,7 +20,7 @@
  * @file
  * @ingroup SpecialPage Watchlist
  */
-class SpecialWatchlist extends SpecialPage {
+class SpecialWatchlist extends SpecialRecentChanges {
protected $customFilters;
 
/**
@@ -28,6 +28,10 @@
 */
public function __construct( $page = 'Watchlist', $restriction = 
'viewmywatchlist' ) {
parent::__construct( $page, $restriction );
+   }
+
+   public function isIncludable() {
+   return false;
}
 
/**
@@ -501,9 +505,5 @@
$count = $row-count;
 
return floor( $count / 2 );
-   }
-
-   protected function getGroupName() {
-   return 'changes';
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I394ab71bae876684e8f78236843861c7dd2ae22d
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@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 RELEASE-NOTES - change (mediawiki/core)

2013-12-31 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Update RELEASE-NOTES
..

Update RELEASE-NOTES

Follow-up to I02561fb1c1a6. This adds sections for removed classes,
renamed classes, and removed methods. Headers are followed by an empty
line.

Change-Id: Ib8358e8bafead9b18588cf8a8b32b230b3f81599
---
M RELEASE-NOTES-1.23
1 file changed, 60 insertions(+), 49 deletions(-)


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

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index a43ab03..d5eb4a4 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -9,6 +9,7 @@
 production.
 
 === Configuration changes in 1.23 ===
+
 * $wgDebugLogGroups values may be set to an associative array with a
   'destination' key specifying the log destination. The array may also contain
   a 'sample' key with a positive integer value N indicating that the log group
@@ -28,6 +29,7 @@
   should be updated if LBFactory_Simple or LBFactory_Multi is configured.
 
 === New features in 1.23 ===
+
 * ResourceLoader can utilize the Web Storage API to cache modules client-side.
   Compared to the browser cache, caching in Web Storage allows ResourceLoader
   to be more granular about evicting stale modules from the cache while
@@ -61,6 +63,7 @@
   happens.
 
 === Bug fixes in 1.23 ===
+
 * (bug 41759) The updated since last visit markers (on history pages, recent
   changes and watchlist) and the talk page message indicator are now correctly
   updated when the user is viewing old revisions of pages, instead of always
@@ -80,6 +83,7 @@
   to appear blank or with missing text.
 
 === API changes in 1.23 ===
+
 * (bug 54884) action=parseprop=categories now indicates hidden and missing
   categories.
 * action=querymeta=filerepoinfo now returns additional information for each
@@ -99,9 +103,10 @@
 regularly. Below only new and removed languages are listed, as well as
 changes to languages because of Bugzilla reports.
 
-* Support was added for Northern Luri (lrc)
+* Support was added for Northern Luri (lrc).
 
 === Other changes in 1.23 ===
+
 * The rc_type field in the recentchanges table has been superseded by a new
   rc_source field.  The rc_source field is a string representation of the
   change type where rc_type was a numeric constant.  This field is not yet
@@ -114,7 +119,6 @@
 * The global variable $wgArticle has been removed after a lengthy deprecation.
 * The global functions addButton and insertTags (for mw.toolbar.addButton and
   mw.toolbar.insertTags) now emits mw.log.warn when accessed.
-* User::getPageRenderingHash() was deprecated since 1.17 and has been removed.
 * The ExpandTemplates extension has been moved into MediaWiki core.
 * (bug 52812) Removed Disable search suggestions from Preference.
 * (bug 52809) Removed Disable browser page caching from Preference.
@@ -130,53 +134,60 @@
 * A page_links_updated field has been added to the page table.
 * SpecialPage::getTitle has been deprecated in favor of
   SpecialPage::getPageTitle.
-* EditPage::spamPage() was deprecated since 1.17 and has been removed.
-* SpecialRecentChanges::feedSetup() was removed.
-* Removed classes:
-  - TitleDependency
-  - TitleListDependency
-* Renamed classes:
-  - CdbReader_DBA to CdbReaderDBA
-  - CdbReader_PHP to CdbReaderPHP
-  - CdbWriter_DBA to CdbWriterDBA
-  - CdbWriter_PHP to CdbWriterPHP
-  - DiffOp_Add to DiffOpAdd
-  - DiffOp_Change to DiffOpChange
-  - DiffOp_Copy to DiffOpCopy
-  - DiffOp_Delete to DiffOpDelete
-  - HWLDF_WordAccumulator to HWLDFWordAccumulator
-  - LBFactory_Fake to LBFactoryFake
-  - LBFactory_Multi to LBFactoryMulti
-  - LBFactory_Simple to LBFactorySimple
-  - LBFactory_Single to LBFactorySingle
-  - LCStore_Accel to LCStoreAccel
-  - LCStore_CDB to LCStoreCDB
-  - LCStore_DB to LCStoreDB
-  - LCStore_Null to LCStoreNull
-  - LoadBalancer_Single to LoadBalancerSingle
-  - LoadMonitor_MySQL to LoadMonitorMySQL
-  - LoadMonitor_Null to LoadMonitorNull
-  - LocalisationCache_BulkLoad to LocalisationCacheBulkLoad
-  - csvStatsOutput to CsvStatsOutput
-  - extensionLanguages to ExtensionLanguages
-  - languages to Languages
-  - statsOutput to StatsOutput
-  - textStatsOutput to TextStatsOutput
-  - wikiStatsOutput to WikiStatsOutput
-* Removed methods:
-  - Exif::getFormattedData() (deprecated in 1.18)
-  - Exif::makeFormattedData() (deprecated in 1.18)
-  - Linker::makeBrokenLink() (deprecated in 1.16)
-  - Linker::makeBrokenLinkObj() (deprecated in 1.16)
-  - Linker::makeColouredLinkObj() (deprecated in 1.16)
-  - Linker::makeSizeLinkObj() (deprecated in 1.17)
-  - ProfilerSimple::getCpuTime (deprecated in 1.20)
-  - Revision::revText() (deprecated in 1.17)
-  - SkinTemplate::jstext() (deprecated in 1.21)
-  - SpecialRevisionDelete::extractBitField() (deprecated in 1.22)
-  - WikiPage::quickEdit() (deprecated in 1.18)
-  - WikiPage::useParserCache() 

[MediaWiki-commits] [Gerrit] Fix the Autonym tests after the removal of the 'end' class - change (mediawiki...UniversalLanguageSelector)

2013-12-31 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Fix the Autonym tests after the removal of the 'end' class
..

Fix the Autonym tests after the removal of the 'end' class

The end class was removed at
https://github.com/wikimedia/jquery.uls/pull/122

Change-Id: I548df1f14025cac0c4a89401474171d0558ff8b1
---
M tests/browser/features/step_definitions/panel_steps.rb
M tests/browser/features/support/pages/panel_page.rb
2 files changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/tests/browser/features/step_definitions/panel_steps.rb 
b/tests/browser/features/step_definitions/panel_steps.rb
index b34882c..c5835c2 100644
--- a/tests/browser/features/step_definitions/panel_steps.rb
+++ b/tests/browser/features/step_definitions/panel_steps.rb
@@ -73,7 +73,7 @@
 end
 
 Then(/^the language list of ULS should use Autonym font$/) do
-   on(PanelPage).autonym_element.style(font-family).should == 
'Autonym',sans-serif
+   on(PanelPage).uls_language_name_item(en).style(font-family).should 
== 'Autonym',sans-serif
 end
 
 Then(/^I should see (.*) as the selected input language$/) do |language|
diff --git a/tests/browser/features/support/pages/panel_page.rb 
b/tests/browser/features/support/pages/panel_page.rb
index bd0a303..9374845 100644
--- a/tests/browser/features/support/pages/panel_page.rb
+++ b/tests/browser/features/support/pages/panel_page.rb
@@ -17,8 +17,6 @@
div(:panel_side_display, id: display-panel-trigger)
div(:panel_side_input, id: input-panel-trigger)
 
-   ul(:autonym, class: three columns end)
-
span(:panel_button_close, id: languagesettings-close)
button(:panel_button_apply, class: uls-settings-apply)
button(:panel_button_cancel, class: uls-settings-cancel)
@@ -48,6 +46,10 @@
# Is there way to access the html element?
div(:interface, id: footer)
 
+   def uls_language_name_item(language)
+   @browser.element(css: .uls-language-block li[lang=#{language}] 
a)
+   end
+
def content_font
font(#mw-content-text)
end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I548df1f14025cac0c4a89401474171d0558ff8b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Fix the Autonym tests after the removal of the 'end' class - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Fix the Autonym tests after the removal of the 'end' class
..


Fix the Autonym tests after the removal of the 'end' class

The end class was removed at
https://github.com/wikimedia/jquery.uls/pull/122

Change-Id: I548df1f14025cac0c4a89401474171d0558ff8b1
---
M tests/browser/features/step_definitions/panel_steps.rb
M tests/browser/features/support/pages/panel_page.rb
2 files changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/tests/browser/features/step_definitions/panel_steps.rb 
b/tests/browser/features/step_definitions/panel_steps.rb
index b34882c..c5835c2 100644
--- a/tests/browser/features/step_definitions/panel_steps.rb
+++ b/tests/browser/features/step_definitions/panel_steps.rb
@@ -73,7 +73,7 @@
 end
 
 Then(/^the language list of ULS should use Autonym font$/) do
-   on(PanelPage).autonym_element.style(font-family).should == 
'Autonym',sans-serif
+   on(PanelPage).uls_language_name_item(en).style(font-family).should 
== 'Autonym',sans-serif
 end
 
 Then(/^I should see (.*) as the selected input language$/) do |language|
diff --git a/tests/browser/features/support/pages/panel_page.rb 
b/tests/browser/features/support/pages/panel_page.rb
index bd0a303..9374845 100644
--- a/tests/browser/features/support/pages/panel_page.rb
+++ b/tests/browser/features/support/pages/panel_page.rb
@@ -17,8 +17,6 @@
div(:panel_side_display, id: display-panel-trigger)
div(:panel_side_input, id: input-panel-trigger)
 
-   ul(:autonym, class: three columns end)
-
span(:panel_button_close, id: languagesettings-close)
button(:panel_button_apply, class: uls-settings-apply)
button(:panel_button_cancel, class: uls-settings-cancel)
@@ -48,6 +46,10 @@
# Is there way to access the html element?
div(:interface, id: footer)
 
+   def uls_language_name_item(language)
+   @browser.element(css: .uls-language-block li[lang=#{language}] 
a)
+   end
+
def content_font
font(#mw-content-text)
end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I548df1f14025cac0c4a89401474171d0558ff8b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix the Malayalam element selector in the live preview test - change (mediawiki...UniversalLanguageSelector)

2013-12-31 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Fix the Malayalam element selector in the live preview test
..

Fix the Malayalam element selector in the live preview test

Change-Id: Ib552b88a8dca096e4b6c1c948e58b5aece52a483
---
M tests/browser/features/support/pages/random_page.rb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/browser/features/support/pages/random_page.rb 
b/tests/browser/features/support/pages/random_page.rb
index 79f65c9..c1b2770 100644
--- a/tests/browser/features/support/pages/random_page.rb
+++ b/tests/browser/features/support/pages/random_page.rb
@@ -13,7 +13,7 @@
   li(:main_page, id: n-mainpage-description)
   div(:asia, id: AS)
   a(:malayalam) do |page|
-page.asia_element.element.a(title: Malayalam)
+page.asia_element.element.li(title: Malayalam)
   end
   a(:print_export, text: Print/export)
   a(:printable_version, text: Printable version)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib552b88a8dca096e4b6c1c948e58b5aece52a483
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Fix the Malayalam element selector in the live preview test - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Fix the Malayalam element selector in the live preview test
..


Fix the Malayalam element selector in the live preview test

Change-Id: Ib552b88a8dca096e4b6c1c948e58b5aece52a483
---
M tests/browser/features/support/pages/random_page.rb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/browser/features/support/pages/random_page.rb 
b/tests/browser/features/support/pages/random_page.rb
index 79f65c9..c1b2770 100644
--- a/tests/browser/features/support/pages/random_page.rb
+++ b/tests/browser/features/support/pages/random_page.rb
@@ -13,7 +13,7 @@
   li(:main_page, id: n-mainpage-description)
   div(:asia, id: AS)
   a(:malayalam) do |page|
-page.asia_element.element.a(title: Malayalam)
+page.asia_element.element.li(title: Malayalam)
   end
   a(:print_export, text: Print/export)
   a(:printable_version, text: Printable version)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib552b88a8dca096e4b6c1c948e58b5aece52a483
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Zfilipin zfili...@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] ContentModel: Use CM to choose CE language - change (mediawiki...CodeEditor)

2013-12-31 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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


Change subject: ContentModel: Use CM to choose CE language
..

ContentModel: Use CM to choose CE language

Bug: 42593
Change-Id: I894afc3119719bfb3feff2677df12842bdf47ef8
---
M CodeEditor.hooks.php
1 file changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/CodeEditor.hooks.php b/CodeEditor.hooks.php
index 1e0cd30..9fa2e0c 100644
--- a/CodeEditor.hooks.php
+++ b/CodeEditor.hooks.php
@@ -4,7 +4,15 @@
static function getPageLanguage( $title ) {
global $wgCodeEditorEnableCore;
 
-   // Try CSS/JS
+   if ( $wgCodeEditorEnableCore  method_exists( $title, 
getContentModel ) ) {
+   if ( $title-getContentModel() === 
CONTENT_MODEL_JAVASCRIPT ) {
+   return 'javascript';
+   } else if ( $title-getContentModel() === 
CONTENT_MODEL_CSS ) {
+   return 'css';
+   }
+   }
+
+   // This block is deprecated. Remove after 1.23 release
if( $wgCodeEditorEnableCore  ( $title-isCssOrJsPage() || 
$title-isCssJsSubpage() ) ) {
if( preg_match( '/\.js$/', $title-getText() ) )
return 'javascript';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I894afc3119719bfb3feff2677df12842bdf47ef8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.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] Remove extrenious border in CodeEditor - change (mediawiki...CodeEditor)

2013-12-31 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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


Change subject: Remove extrenious border in CodeEditor
..

Remove extrenious border in CodeEditor

Change-Id: Iedfed3e8722cb8440797d692739322d7fdf05b43
---
M modules/jquery.codeEditor.js
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js
index 88025d0..c507e24 100644
--- a/modules/jquery.codeEditor.js
+++ b/modules/jquery.codeEditor.js
@@ -144,7 +144,10 @@
container.width(box.width())
 .height(box.height());
 
-   editdiv.text(box.val()).css( 'position', 'absolute' );
+   editdiv.text(box.val()).css( {
+   position: 'absolute',
+   border: 0
+   });
context.codeEditor = ace.edit(editdiv[0]);
 
// Disable some annoying commands

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedfed3e8722cb8440797d692739322d7fdf05b43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add ParsoidConfig option fetchWT to fetch original wikitext ... - change (mediawiki...parsoid)

2013-12-31 Thread Marcoil (Code Review)
Marcoil has uploaded a new change for review.

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


Change subject: Add ParsoidConfig option fetchWT to fetch original wikitext 
before html2wt
..

Add ParsoidConfig option fetchWT to fetch original wikitext before html2wt

This is to reduce the number of innecessary semantic differences shown
in round-trip testing.

Change-Id: Iba29fbc4ae98ffe4c88e77d11e01176b0fbb0e56
---
M api/ParserService.js
M lib/mediawiki.ParsoidConfig.js
M tests/test.localsettings.js
3 files changed, 48 insertions(+), 21 deletions(-)


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

diff --git a/api/ParserService.js b/api/ParserService.js
index 682de3b..3fe30ff 100644
--- a/api/ParserService.js
+++ b/api/ParserService.js
@@ -596,28 +596,45 @@
var env = res.locals.env;
env.page.id = req.body.oldid || null;
 
-   var doc;
-   try {
-   doc = DU.parseHTML( html.replace( /\r/g, '' ) );
-   } catch ( e ) {
-   console.log( 'There was an error in the HTML5 parser! Sending 
it back to the editor.' );
-   env.errCB( e );
-   return;
-   }
+   var html2wtCb = function () {
+   var doc;
+   try {
+   doc = DU.parseHTML( html.replace( /\r/g, '' ) );
+   } catch ( e ) {
+   console.log( 'There was an error in the HTML5 parser! 
Sending it back to the editor.' );
+   env.errCB( e );
+   return;
+   }
 
-   try {
-   var out = [];
-   new Serializer( { env: env, oldid: env.page.id } ).serializeDOM(
-   doc.body,
-   function ( chunk ) {
-   out.push( chunk );
-   }, function () {
-   res.setHeader( 'Content-Type', 
'text/x-mediawiki; charset=UTF-8' );
-   res.setHeader( 'X-Parsoid-Performance', 
env.getPerformanceHeader() );
-   res.end( out.join( '' ) );
-   } );
-   } catch ( e ) {
-   env.errCB( e );
+   try {
+   var out = [];
+   new Serializer( { env: env, oldid: env.page.id } 
).serializeDOM(
+   doc.body,
+   function ( chunk ) {
+   out.push( chunk );
+   }, function () {
+   res.setHeader( 'Content-Type', 
'text/x-mediawiki; charset=UTF-8' );
+   res.setHeader( 'X-Parsoid-Performance', 
env.getPerformanceHeader() );
+   res.end( out.join( '' ) );
+   } );
+   } catch ( e ) {
+   env.errCB( e );
+   }
+   };
+
+   if ( env.conf.parsoid.fetchWT ) {
+   var target = env.resolveTitle( env.normalizeTitle( 
env.page.name ), '' );
+   var tpr = new TemplateRequest( env, target, env.page.id );
+   tpr.once( 'src', function ( err, src_and_metadata ) {
+   if ( err ) {
+   env.errCB( err );
+   } else {
+   env.setPageSrcInfo( src_and_metadata );
+   html2wtCb();
+   }
+   } );
+   } else {
+   html2wtCb();
}
 }
 
diff --git a/lib/mediawiki.ParsoidConfig.js b/lib/mediawiki.ParsoidConfig.js
index cd89874..80c583e 100644
--- a/lib/mediawiki.ParsoidConfig.js
+++ b/lib/mediawiki.ParsoidConfig.js
@@ -171,6 +171,13 @@
  */
 ParsoidConfig.prototype.storeDataParsoid = false;
 
+/**
+ * @property {boolean} fetchWT
+ * When transforming from html to wt, fetch the original wikitext before.
+ * Intended for use in round-trip testing.
+ */
+ ParsoidConfig.prototype.fetchWT = false;
+
 if (typeof module === object) {
module.exports.ParsoidConfig = ParsoidConfig;
 }
diff --git a/tests/test.localsettings.js b/tests/test.localsettings.js
index 9a1c71f..b5e173a 100644
--- a/tests/test.localsettings.js
+++ b/tests/test.localsettings.js
@@ -21,4 +21,7 @@
 
// Set editMode to false for round-trip testing
parsoidConfig.editMode = false;
+
+   // Fetch the wikitext for a page before doing html2wt
+   parsoidConfig.fetchWT = true;
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba29fbc4ae98ffe4c88e77d11e01176b0fbb0e56
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil marc...@wikimedia.org


[MediaWiki-commits] [Gerrit] Fix the scenario and the step description - change (mediawiki...TwnMainPage)

2013-12-31 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Fix the scenario and the step description
..

Fix the scenario and the step description

Change-Id: I23b3470c66518da03c4cd18f1977b244e3c3c420
---
M tests/browser/features/signup.feature
M tests/browser/features/step_definitions/signup_steps.rb
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/tests/browser/features/signup.feature 
b/tests/browser/features/signup.feature
index 92319ec..ec2ab64 100644
--- a/tests/browser/features/signup.feature
+++ b/tests/browser/features/signup.feature
@@ -12,8 +12,8 @@
   And I press the Create account button
 Then I should be logged in into a new account
 
-  Scenario: Sign up for translator
-When I indicate I am not a developer
+  Scenario: Sign up as a developer
+When I indicate that I am a developer
   And I input a unique username
   And I input a password
   And I input an email address
diff --git a/tests/browser/features/step_definitions/signup_steps.rb 
b/tests/browser/features/step_definitions/signup_steps.rb
index 37ff574..f650a0a 100644
--- a/tests/browser/features/step_definitions/signup_steps.rb
+++ b/tests/browser/features/step_definitions/signup_steps.rb
@@ -23,7 +23,7 @@
on(SignupPage).submit
 end
 
-When(/^I indicate I am not a developer$/) do
+When(/^I indicate that I am a developer$/) do
on(SignupPage).developer_signup_element.click
 end
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23b3470c66518da03c4cd18f1977b244e3c3c420
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwnMainPage
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Increase the log in timeout in the signup test - change (mediawiki...TwnMainPage)

2013-12-31 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Increase the log in timeout in the signup test
..

Increase the log in timeout in the signup test

Change-Id: I17734615b73384756b7f758243cf856268654da3
---
M tests/browser/features/step_definitions/signup_steps.rb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/browser/features/step_definitions/signup_steps.rb 
b/tests/browser/features/step_definitions/signup_steps.rb
index 37ff574..9fedb80 100644
--- a/tests/browser/features/step_definitions/signup_steps.rb
+++ b/tests/browser/features/step_definitions/signup_steps.rb
@@ -32,5 +32,5 @@
 end
 
 Then(/^I should be logged in into a new account$/) do
-   on(MainPage).username_element.when_visible.text.should == Translator 
#{@random_string}
+   on(MainPage).username_element.when_visible(10).text.should == 
Translator #{@random_string}
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17734615b73384756b7f758243cf856268654da3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwnMainPage
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Close wikimania2013 wiki - change (operations/mediawiki-config)

2013-12-31 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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


Change subject: Close wikimania2013 wiki
..

Close wikimania2013 wiki

This patch closes the wikimania2013 wiki; it adds it
to closed.dblist and removes unneccessary code from
groupOverrides.

Goodbye, wikimania2013wiki.

Bug: 59157
Change-Id: Iab3812ac324c82b44c644f1526c4d3b15acf334b
---
M closed.dblist
M wmf-config/InitialiseSettings.php
2 files changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/closed.dblist b/closed.dblist
index e42e30d..c535244 100644
--- a/closed.dblist
+++ b/closed.dblist
@@ -114,6 +114,7 @@
 wikimania2010wiki
 wikimania2011wiki
 wikimania2012wiki
+wikimania2013wiki
 xhwikibooks
 xhwiktionary
 yowikibooks
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a9d3550..faa1c67 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -6459,9 +6459,6 @@
// for show only
),
),
-   'wikimania2013wiki' = array(
-   '*' = array( 'createpage' = false ),
-   ),
'wikimania2014wiki' = array(
'*' = array( 'createpage' = false ),
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab3812ac324c82b44c644f1526c4d3b15acf334b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net

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


[MediaWiki-commits] [Gerrit] No longer load blocks to format - change (mediawiki...Flow)

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

Change subject: No longer load blocks to format
..


No longer load blocks to format

The blocks were being loaded and passed through the formatting
code for 2 values in the messages, the workflow id and the
type to use in query strings.  Both of those values were already
available, so skip creating the blocks.

There was one other use of the block, to get access to storage and
through it the previous revisions content.  This was already a bit
of a hack so just switched it to Container::get( 'storage' ).

Change-Id: Ie7c95ab5a0dbbc6c92822a59b0b480d2ddafabbe
---
M FlowActions.php
M includes/Contributions/Formatter.php
M includes/Formatter.php
M includes/RecentChanges/Formatter.php
M includes/View/History/HistoryRenderer.php
5 files changed, 81 insertions(+), 108 deletions(-)

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



diff --git a/FlowActions.php b/FlowActions.php
index b8d5501..000d19a 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -2,6 +2,7 @@
 
 use Flow\Model\PostRevision;
 use Flow\Model\Header;
+use Flow\Model\UUID;
 use Flow\RevisionActionPermissions;
 use Flow\Log\Logger;
 use Flow\Block\Block;
@@ -38,10 +39,10 @@
'history' = array(
'i18n-message' = 'flow-rev-message-create-header',
'i18n-params' = array(
-   function ( Header $revision, Templating 
$templating, User $user, Block $block ) {
+   function ( Header $revision, Templating 
$templating, User $user, UUID $workflowId, $blockType ) {
return Message::rawParam( 
$templating-getUserLinks( $revision, $user ) );
},
-   function ( Header $revision, Templating 
$templating, User $user, Block $block ) {
+   function ( Header $revision, Templating 
$templating, User $user, UUID $workflowId, $blockType ) {
return $templating-getUserText( 
$revision, $user );
},
),
@@ -59,10 +60,10 @@
'history' = array(
'i18n-message' = 'flow-rev-message-edit-header',
'i18n-params' = array(
-   function ( Header $revision, Templating 
$templating, User $user, Block $block ) {
+   function ( Header $revision, Templating 
$templating, User $user, UUID $workflowId, $blockType ) {
return Message::rawParam( 
$templating-getUserLinks( $revision, $user ) );
},
-   function ( Header $revision, Templating 
$templating, User $user, Block $block ) {
+   function ( Header $revision, Templating 
$templating, User $user, UUID $workflowId, $blockType ) {
return $templating-getUserText( 
$revision, $user );
},
),
@@ -80,24 +81,24 @@
'history' = array(
'i18n-message' = 'flow-rev-message-edit-title',
'i18n-params' = array(
-   function ( PostRevision $revision, Templating 
$templating, User $user, Block $block ) {
+   function ( PostRevision $revision, Templating 
$templating, User $user, UUID $workflowId, $blockType ) {
return Message::rawParam( 
$templating-getUserLinks( $revision, $user ) );
},
-   function ( PostRevision $revision, Templating 
$templating, User $user, Block $block ) {
+   function ( PostRevision $revision, Templating 
$templating, User $user, UUID $workflowId, $blockType ) {
return $templating-getUserText( 
$revision, $user );
},
-   function ( PostRevision $revision, Templating 
$templating, User $user, Block $block ) {
+   function ( PostRevision $revision, Templating 
$templating, User $user, UUID $workflowId, $blockType ) {
return 
$templating-getUrlGenerator()-generateUrl( $revision-getPostId() );
},
-   function ( PostRevision $revision, Templating 
$templating, User $user, Block $block ) {
+   function ( PostRevision $revision, Templating 
$templating, User $user, UUID $workflowId, $blockType ) {
// make sure topic title isn't parsed

[MediaWiki-commits] [Gerrit] Convert UUID length 'magic' numbers to named constants - change (mediawiki...Flow)

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

Change subject: Convert UUID length 'magic' numbers to named constants
..


Convert UUID length 'magic' numbers to named constants

Change-Id: Iece60d9c68bcd411899a1064f2d3f3e310fd3796
---
M includes/Model/UUID.php
1 file changed, 21 insertions(+), 12 deletions(-)

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



diff --git a/includes/Model/UUID.php b/includes/Model/UUID.php
index 4757ee2..1bf8a8e 100644
--- a/includes/Model/UUID.php
+++ b/includes/Model/UUID.php
@@ -12,9 +12,14 @@
protected $hexValue;
protected $timestamp;
 
+   // UUID length in hex
+   const HEX_LEN = 32;
+   // UUID length in binary
+   const BIN_LEN = 16;
+
function __construct( $binaryValue ) {
-   if ( strlen( $binaryValue ) !== 16 ) {
-   throw new InvalidInputException( 'Expected 16 char 
binary string, got: ' . $binaryValue, 'invalid-input' );
+   if ( strlen( $binaryValue ) !== self::BIN_LEN ) {
+   throw new InvalidInputException( 'Expected ' . 
self::BIN_LEN . ' char binary string, got: ' . $binaryValue, 'invalid-input' );
}
$this-binaryValue = $binaryValue;
}
@@ -32,20 +37,21 @@
} elseif ( $input === null ) {
return null;
} elseif ( $input === false ) {
-   $hexValue = str_pad( 
\UIDGenerator::newTimestampedUID128( 16 ), 32, '0', STR_PAD_LEFT );
-   $binaryValue = pack( 'H*', $hexValue );
+   $hexValue = str_pad( 
\UIDGenerator::newTimestampedUID128( 16 ), self::HEX_LEN, '0', STR_PAD_LEFT );
} elseif ( !is_string( $input )  !is_int( $input ) ) {
throw new InvalidInputException( 'Unknown input type to 
UUID class: ' . gettype( $input ), 'invalid-input' );
-   } elseif ( strlen( $input ) == 16 ) {
+   } elseif ( strlen( $input ) == self::BIN_LEN ) {
$binaryValue = $input;
-   } elseif ( strlen( $input ) == 32  preg_match( 
'/^[a-fA-F0-9]+$/', $input ) ) {
+   } elseif ( strlen( $input ) == self::HEX_LEN  preg_match( 
'/^[a-fA-F0-9]+$/', $input ) ) {
$hexValue = $input;
-   $binaryValue = pack( 'H*', $hexValue );
} elseif ( is_numeric( $input ) ) {
-   $hexValue = wfBaseConvert( $input, 10, 16, 32 );
-   $binaryValue = pack( 'H*', $hexValue );
+   $hexValue = wfBaseConvert( $input, 10, 16, 
self::HEX_LEN );
} else {
throw new InvalidInputException( 'Unknown input to UUID 
class', 'invalid-input' );
+   }
+
+   if ( $binaryValue === null  $hexValue !== null ) {
+   $binaryValue = pack( 'H*', $hexValue );
}
 
$uuid = new self( $binaryValue );
@@ -60,7 +66,7 @@
 
public function getHex() {
if ( $this-hexValue === null ) {
-   $this-hexValue = str_pad( bin2hex( $this-binaryValue 
), 32, '0', STR_PAD_LEFT );
+   $this-hexValue = str_pad( bin2hex( $this-binaryValue 
), self::HEX_LEN, '0', STR_PAD_LEFT );
}
return $this-hexValue;
}
@@ -130,9 +136,12 @@
// Easiest way to do this is to take the 46 MSBs of the UNIX 
timestamp * 1000
// and pad the remaining characters with zeroes.
$millitime = wfTimestamp( TS_UNIX, $ts ) * 1000;
+   // base 10 - base 2, taking 46 bits
$timestampBinary = wfBaseConvert( $millitime, 10, 2, 46 );
-   $uuidBase2 = str_pad( $timestampBinary, 16 * 8, '0', 
STR_PAD_RIGHT );
-   $uuidHex = wfBaseConvert( $uuidBase2, 2, 16, 32 );
+   // pad out the 46 bits to binary len with 0's
+   $uuidBase2 = str_pad( $timestampBinary, self::BIN_LEN * 8, '0', 
STR_PAD_RIGHT );
+   // base 2 - base 16
+   $uuidHex = wfBaseConvert( $uuidBase2, 2, 16, self::HEX_LEN );
 
return self::create( $uuidHex );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iece60d9c68bcd411899a1064f2d3f3e310fd3796
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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

[MediaWiki-commits] [Gerrit] Increase the log in timeout in the signup test - change (mediawiki...TwnMainPage)

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

Change subject: Increase the log in timeout in the signup test
..


Increase the log in timeout in the signup test

Change-Id: I17734615b73384756b7f758243cf856268654da3
---
M tests/browser/features/step_definitions/signup_steps.rb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/browser/features/step_definitions/signup_steps.rb 
b/tests/browser/features/step_definitions/signup_steps.rb
index 37ff574..9fedb80 100644
--- a/tests/browser/features/step_definitions/signup_steps.rb
+++ b/tests/browser/features/step_definitions/signup_steps.rb
@@ -32,5 +32,5 @@
 end
 
 Then(/^I should be logged in into a new account$/) do
-   on(MainPage).username_element.when_visible.text.should == Translator 
#{@random_string}
+   on(MainPage).username_element.when_visible(10).text.should == 
Translator #{@random_string}
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17734615b73384756b7f758243cf856268654da3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwnMainPage
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix the scenario and the step description - change (mediawiki...TwnMainPage)

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

Change subject: Fix the scenario and the step description
..


Fix the scenario and the step description

Change-Id: I23b3470c66518da03c4cd18f1977b244e3c3c420
---
M tests/browser/features/signup.feature
M tests/browser/features/step_definitions/signup_steps.rb
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/tests/browser/features/signup.feature 
b/tests/browser/features/signup.feature
index 92319ec..ec2ab64 100644
--- a/tests/browser/features/signup.feature
+++ b/tests/browser/features/signup.feature
@@ -12,8 +12,8 @@
   And I press the Create account button
 Then I should be logged in into a new account
 
-  Scenario: Sign up for translator
-When I indicate I am not a developer
+  Scenario: Sign up as a developer
+When I indicate that I am a developer
   And I input a unique username
   And I input a password
   And I input an email address
diff --git a/tests/browser/features/step_definitions/signup_steps.rb 
b/tests/browser/features/step_definitions/signup_steps.rb
index 37ff574..f650a0a 100644
--- a/tests/browser/features/step_definitions/signup_steps.rb
+++ b/tests/browser/features/step_definitions/signup_steps.rb
@@ -23,7 +23,7 @@
on(SignupPage).submit
 end
 
-When(/^I indicate I am not a developer$/) do
+When(/^I indicate that I am a developer$/) do
on(SignupPage).developer_signup_element.click
 end
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23b3470c66518da03c4cd18f1977b244e3c3c420
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwnMainPage
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove whitespace around content in templates.php - change (mediawiki...Wikibase)

2013-12-31 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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


Change subject: Remove whitespace around content in templates.php
..

Remove whitespace around content in templates.php

Whitespace between td and content and between content and /td is not 
visible, but when you select the content of a table element with a triple click 
and copy the selection to clipboard the whitespace gets converted to a space at 
the beginning and at the end.

Bug: 59144
Change-Id: I376f006b36d71bcb21dcf6c034149bff48b0608e
---
M lib/resources/templates.php
1 file changed, 6 insertions(+), 18 deletions(-)


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

diff --git a/lib/resources/templates.php b/lib/resources/templates.php
index 9b8775f..4fafa8a 100644
--- a/lib/resources/templates.php
+++ b/lib/resources/templates.php
@@ -265,23 +265,13 @@
$templates['wb-term'] =
 HTML
 tr class=wb-terms-label wb-terms-$1 $2
-   td class=wb-terms-language wb-terms-language-$1 rowspan=2
-   a href=$10$3/a !-- language name --
-   /td
-   td class=wb-terms-label wb-terms-label-$1 wb-value wb-value-lang-$1 
$8
-   $4 !-- label --
-   /td
-   td class=wb-editsection
-   $6 !-- label toolbar --
-   /td
+   td class=wb-terms-language wb-terms-language-$1 rowspan=2a 
href=$10$3/a!-- language name --/td
+   td class=wb-terms-label wb-terms-label-$1 wb-value wb-value-lang-$1 
$8$4!-- label --/td
+   td class=wb-editsection$6!-- label toolbar --/td
 /tr
 tr class=wb-terms-description wb-terms-$1 $2
-   td class=wb-terms-description wb-terms-description-$1 wb-value 
wb-value-lang-$1 $9
-   $5 !-- description --
-   /td
-   td class=wb-editsection
-   $7 !-- description toolbar --
-   /td
+   td class=wb-terms-description wb-terms-description-$1 wb-value 
wb-value-lang-$1 $9$5!-- description --/td
+   td class=wb-editsection$7!-- description toolbar --/td
 /tr
 HTML;
 
@@ -329,9 +319,7 @@
 tr class=wb-sitelinks-$8 $2
td class=wb-sitelinks-sitename wb-sitelinks-sitename-$8 lang=$1 
dir=auto$3/td
td class=wb-sitelinks-siteid wb-sitelinks-siteid-$8$4/td
-   td class=wb-sitelinks-link wb-sitelinks-link-$8 lang=$1
-   a href=$5 hreflang=$1 dir=auto$6/a
-   /td
+   td class=wb-sitelinks-link wb-sitelinks-link-$8 lang=$1a 
href=$5 hreflang=$1 dir=auto$6/a/td
$7
 /tr
 HTML;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I376f006b36d71bcb21dcf6c034149bff48b0608e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Special characters are being mis-encoded in links - change (mediawiki...Flow)

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

Change subject: Special characters are being mis-encoded in links
..


Special characters are being mis-encoded in links

Various methods of passing data through the redlinker were
resulting in mis-encodig of values.  This adjusts to extract and
pass through the anchors inner html to Linker::link along with
switching to a different method of telling DomDocument the content
is utf-8.

Bug: 57945
Change-Id: Ia64fe161fb62b85ccbd711bff9638e73cbcfed68
---
M includes/ParsoidUtils.php
M includes/Redlinker.php
M tests/RedlinkerTest.php
3 files changed, 59 insertions(+), 32 deletions(-)

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



diff --git a/includes/ParsoidUtils.php b/includes/ParsoidUtils.php
index 0fbeaec..0f0e0ad 100644
--- a/includes/ParsoidUtils.php
+++ b/includes/ParsoidUtils.php
@@ -206,7 +206,8 @@
 
if ( $errors ) {
throw new WikitextException(
-   implode( \n, array_map( function( $error ) { 
return $error-message; }, $errors ), 'process-wikitext' )
+   implode( \n, array_map( function( $error ) { 
return $error-message; }, $errors ) ),
+   'process-wikitext'
);
}
 
diff --git a/includes/Redlinker.php b/includes/Redlinker.php
index 08d403d..344d671 100644
--- a/includes/Redlinker.php
+++ b/includes/Redlinker.php
@@ -140,29 +140,32 @@
 
/**
 * Collect referenced Title's from html content and add to LinkBatch
-* @param string $content
+*
+* @param string $content html to check for titles
 */
public function collectLinks( $content ) {
+   if ( !$content ) {
+   return;
+   }
/*
 * Workaround because DOMDocument can't guess charset.
 * Content should be utf-8. Alternative workarounds would be 
to
 * provide the charset in $response, as either:
 * * ?xml encoding=utf-8 ?
 * * meta http-equiv=Content-Type content=text/html; 
charset=utf-8
+* * mb_convert_encoding( $content, 'HTML-ENTITIES', 'UTF-8' );
 */
-   $content = mb_convert_encoding( $content, 'HTML-ENTITIES', 
'UTF-8' );
+   $dom = ParsoidUtils::createDOM( '?xml encoding=utf-8 ?' . 
$content );
 
// find links in DOM
-   if ( $content ) {
-   $batch = $this-batch;
-   $callback = function( DOMNode $linkNode, array $parsoid 
) use( $batch ) {
-   $title = Title::newFromText( 
$parsoid['sa']['href'] );
-   if ( $title !== null ) {
-   $batch-addObj( $title );
-   }
-   };
-   self::forEachLink( ParsoidUtils::createDOM( $content ), 
$callback );
-   }
+   $batch = $this-batch;
+   $callback = function( DOMNode $linkNode, array $parsoid ) use( 
$batch ) {
+   $title = Title::newFromText( $parsoid['sa']['href'] );
+   if ( $title !== null ) {
+   $batch-addObj( $title );
+   }
+   };
+   self::forEachLink( $dom, $callback );
}
 
/**
@@ -189,11 +192,10 @@
 * provide the charset in $response, as either:
 * * ?xml encoding=utf-8 ?
 * * meta http-equiv=Content-Type content=text/html; 
charset=utf-8
+* * mb_convert_encoding( $content, 'HTML-ENTITIES', 'UTF-8' );
 */
-   $content = mb_convert_encoding( $content, 'HTML-ENTITIES', 
'UTF-8' );
-
+   $dom = ParsoidUtils::createDOM( '?xml encoding=utf-8?' . 
$content );
$self = $this;
-   $dom = ParsoidUtils::createDOM( $content );
self::forEachLink( $dom, function( DOMNode $linkNode, array 
$parsoid ) use ( $self, $dom ) {
$title = $self-createRelativeTitle( 
$parsoid['sa']['href'] );
// Don't process invalid links
@@ -207,16 +209,17 @@
$attributes[$attribute-name] = 
$attribute-value;
}
// let MW build link HTML based on Parsoid data
-   $html = Linker::link( $title, htmlspecialchars( 
$linkNode-nodeValue ), $attributes );
+   $html = Linker::link( $title, Redlinker::getInnerHtml( 
$linkNode ), $attributes );
// create new DOM from this MW-built link
-   $replacementNode = ParsoidUtils::createDOM( $html 

[MediaWiki-commits] [Gerrit] adding '*.raa.se' to the wgCopyUploadsDomains array. - change (operations/mediawiki-config)

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

Change subject: adding '*.raa.se' to the wgCopyUploadsDomains array.
..


adding '*.raa.se' to the wgCopyUploadsDomains array.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a9d3550..3c16c84 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10305,6 +10305,7 @@
'*.kb.nl',   // for GWToolset, mediafile 
server for the koninklijke bibliotheek, nationale bibliotheek van nederland
'*.lndb.lv', // for GWToolset, mediafile 
server for latvijas nacionālā bibliotēka
'*.memorix.nl',  // for GWToolset, mediafile 
server for the archief eemland
+   '*.raa.se',  // for GWToolset, mediafile 
server for the swedish national heritage board
'*.rbge.org.uk', // for GWToolset, mediafile 
server for the royal botanic garden edinburgh
'*.rijksmuseum.nl',  // for GWToolset, mediafile 
server for the rijksmuseum
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbacba698d979d13b5b0376a7f30c32d0ceb926b
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com
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] ircecho: move to a module - change (operations/puppet)

2013-12-31 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: ircecho: move to a module
..


ircecho: move to a module

Change-Id: I9238a052734abcb3f7e4e8412d6b0b5429ebc2ae
---
D manifests/misc/irc.pp
M manifests/misc/wikibugs.pp
M manifests/openstack.pp
A manifests/role/echoirc.pp
M manifests/site.pp
A modules/ircecho/manifests/init.pp
R modules/ircecho/templates/default.erb
M modules/ldap/manifests/client.pp
8 files changed, 44 insertions(+), 71 deletions(-)

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



diff --git a/manifests/misc/irc.pp b/manifests/misc/irc.pp
deleted file mode 100644
index ccee963..000
--- a/manifests/misc/irc.pp
+++ /dev/null
@@ -1,35 +0,0 @@
-# IRC-related classes
-
-class misc::ircecho {
-
-   # To use this class, you must define some variables; here's an example
-   # (leading hashes on channel names are added for you if missing):
-   #  $ircecho_logs = {
-   #/var/log/nagios/irc.log = 
[wikimedia-operations,#wikimedia-tech],
-   #/var/log/nagios/irc2.log = #irc2,
-   #  }
-   #  $ircecho_nick = nagios-wm
-   #  $ircecho_server = chat.freenode.net
-
-   package { ircecho:
-   ensure = latest;
-   }
-
-   service { ircecho:
-   require = Package[ircecho],
-   ensure = running;
-   }
-
-   file {
-   /etc/default/ircecho:
-   require = Package[ircecho],
-   content = template('ircecho/default.erb'),
-   owner = root,
-   mode = 0755;
-   }
-
-   # bug 26784 - IRC bots process need nagios monitoring
-monitor_service { ircecho: description = ircecho_service_running, 
check_command = nrpe_check_ircecho }
-
-}
-
diff --git a/manifests/misc/wikibugs.pp b/manifests/misc/wikibugs.pp
index 554d890..5a2d8f0 100644
--- a/manifests/misc/wikibugs.pp
+++ b/manifests/misc/wikibugs.pp
@@ -29,7 +29,7 @@
   $ircecho_nick = 'wikibugs'
   $ircecho_server = 'chat.freenode.net'
 
-  include misc::ircecho
+  include role::echoirc
   include misc::irc::wikibugs::packages
 
   generic::systemuser { 'wikibugs': name = 'wikibugs' }
diff --git a/manifests/openstack.pp b/manifests/openstack.pp
index 550a923..307117d 100644
--- a/manifests/openstack.pp
+++ b/manifests/openstack.pp
@@ -195,22 +195,7 @@
$ircecho_nick = labs-storage-wm
$ircecho_server = chat.freenode.net
 
-   package { ircecho:
-   ensure = present;
-   }
-
-   service { ircecho:
-   require = Package[ircecho],
-   ensure = running;
-   }
-
-   file {
-   /etc/default/ircecho:
-   require = Package[ircecho],
-   content = template('ircecho/default.erb'),
-   owner = root,
-   mode = 0755;
-   }
+   include role::echoirc
 
generic::upstart_job{ manage-volumes:
require = Package[glusterfs-server],
diff --git a/manifests/role/echoirc.pp b/manifests/role/echoirc.pp
new file mode 100644
index 000..67dfc1e
--- /dev/null
+++ b/manifests/role/echoirc.pp
@@ -0,0 +1,9 @@
+class role::echoirc {
+include ircecho
+
+system::role { 'ircecho': description = 'ircecho server' }
+
+# bug 26784 - IRC bots process need nagios monitoring
+monitor_service { ircecho: description = ircecho_service_running, 
check_command = nrpe_check_ircecho }
+}
+
diff --git a/manifests/site.pp b/manifests/site.pp
index 45c0510..1b22acd 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1853,7 +1853,7 @@
 include standard,
 icinga::monitor,
 role::ishmael,
-misc::ircecho,
+role::echoirc,
 tcpircbot,
 passwords::logmsgbot
 
diff --git a/modules/ircecho/manifests/init.pp 
b/modules/ircecho/manifests/init.pp
new file mode 100644
index 000..f9464f5
--- /dev/null
+++ b/modules/ircecho/manifests/init.pp
@@ -0,0 +1,31 @@
+# IRC echo class
+
+class ircecho {
+
+# To use this class, you must define some variables; here's an example
+# (leading hashes on channel names are added for you if missing):
+#  $ircecho_logs = {
+#/var/log/nagios/irc.log =
+#[wikimedia-operations,#wikimedia-tech],
+#/var/log/nagios/irc2.log = #irc2,
+#  }
+#  $ircecho_nick = nagios-wm
+#  $ircecho_server = chat.freenode.net
+
+package { 'ircecho':
+ensure = present,
+}
+
+service { 'ircecho':
+require = Package['ircecho'],
+ensure  = running,
+}
+
+file { '/etc/default/ircecho':
+require = Package['ircecho'],
+content = template('ircecho/default.erb'),
+owner   = 'root',
+mode= '0755',
+}
+}
+
diff --git a/templates/ircecho/default.erb 
b/modules/ircecho/templates/default.erb
similarity 

[MediaWiki-commits] [Gerrit] Fix some JSHint issues - change (mediawiki...CodeEditor)

2013-12-31 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Fix some JSHint issues
..

Fix some JSHint issues

Change-Id: I46ae3ce2f39b35af6d75a94b5132eea0e6672064
---
M modules/ext.codeEditor.geshi.js
M modules/jquery.codeEditor.js
2 files changed, 11 insertions(+), 10 deletions(-)


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

diff --git a/modules/ext.codeEditor.geshi.js b/modules/ext.codeEditor.geshi.js
index 34d6bc6..cc8681d 100644
--- a/modules/ext.codeEditor.geshi.js
+++ b/modules/ext.codeEditor.geshi.js
@@ -13,7 +13,7 @@
.attr('href', '#')
.attr('title', 'Edit this code section')
.click(function(event) {
-   openEditor($div)
+   openEditor($div);
event.preventDefault();
});
var $edit = $('span')
@@ -97,7 +97,7 @@
type: 'POST',
success: function(data, 
xhr) {
var $html = 
$(data.parse.text['*']);
-   
$div.replaceWith($html)
+   
$div.replaceWith($html);

setupEditor($html);
 
 
@@ -120,7 +120,7 @@
.append($controls)
.append($container);
$xcontainer.width($main.width())
-  .height($main.height() * 1.1 
+ 64 + 32);
+   .height($main.height() * 1.1 + 64 + 32);
 
$div.css('display', 'none');
$xcontainer.insertAfter($div);
diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js
index 2c320d9..a467833 100644
--- a/modules/jquery.codeEditor.js
+++ b/modules/jquery.codeEditor.js
@@ -66,7 +66,7 @@
 } );
 
 var cookieEnabled = $.cookie('wikiEditor-' + context.instance + 
'-codeEditor-enabled');
-context.codeEditorActive = (cookieEnabled != '0');
+context.codeEditorActive = (cookieEnabled !== '0');
 
 /**
  * Internally used functions
@@ -104,7 +104,7 @@
} else {
context.fn.disableCodeEditor();
}
-   }
+   };
context.api.addToToolbar( context, {
'section': 'main',
'group': 'format',
@@ -132,7 +132,7 @@
'setupCodeEditor': function() {
var box = context.$textarea;
 
-   var lang = mw.config.get(wgCodeEditorCurrentLanguage)
+   var lang = mw.config.get(wgCodeEditorCurrentLanguage);
if (lang) {
// Ace doesn't like replacing a textarea directly.
// We'll stub this out to sit on top of it...
@@ -142,7 +142,7 @@
 
box.css('display', 'none');
container.width(box.width())
-.height(box.height());
+   .height(box.height());
 
editdiv.text(box.val());
context.codeEditor = ace.edit(editdiv[0]);
@@ -283,7 +283,7 @@
} else {
throw new Error('CodeEditor: no 
original function to call for ' + name);
}
-   }
+   };
} else {
base[name] = func;
}
@@ -388,7 +388,7 @@
}
col = offset - pos;
return {row: row, column: col};
-   }
+   };
var start = offsetToPos( options.start ),
end = offsetToPos( options.end );
 
@@ -425,4 +425,5 @@
context.fn.setupCodeEditor();
 }
 
-} } )( jQuery );
+};
+} )( jQuery );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46ae3ce2f39b35af6d75a94b5132eea0e6672064
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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

[MediaWiki-commits] [Gerrit] Update formatting of JavaScript files - change (mediawiki...CodeEditor)

2013-12-31 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Update formatting of JavaScript files
..

Update formatting of JavaScript files

Change-Id: I7a18b7f76f7c0a064645f23974f1fe09dafc4ca2
---
M modules/ext.codeEditor.geshi.js
M modules/ext.codeEditor.js
M modules/jquery.codeEditor.js
3 files changed, 485 insertions(+), 489 deletions(-)


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

diff --git a/modules/ext.codeEditor.geshi.js b/modules/ext.codeEditor.geshi.js
index cc8681d..6a6e6bd 100644
--- a/modules/ext.codeEditor.geshi.js
+++ b/modules/ext.codeEditor.geshi.js
@@ -4,33 +4,33 @@
  * Needs some code de-dup with the full-page JS/CSS page editing.
  */
 
-$(function() {
-   var $sources = $('.mw-geshi');
-   if ($sources.length  0) {
-   var setupEditor = function($div) {
-   var $link = $('a')
-   .text(mediaWiki.msg('editsection'))
-   .attr('href', '#')
-   .attr('title', 'Edit this code section')
-   .click(function(event) {
-   openEditor($div);
+$( function () {
+   var $sources = $( '.mw-geshi' );
+   if ( $sources.length  0 ) {
+   var setupEditor = function ( $div ) {
+   var $link = $( 'a' )
+   .text( mediaWiki.msg( 'editsection' ) )
+   .attr( 'href', '#' )
+   .attr( 'title', 'Edit this code section' )
+   .click( function ( event ) {
+   openEditor( $div );
event.preventDefault();
-   });
-   var $edit = $('span')
-   .addClass('mw-editsection')
-   .append('span 
class=mw-editsection-bracket[/span')
-   .append($link)
-   .append('span 
class=mw-editsection-bracket]/span');
-   $div.prepend($edit);
+   } );
+   var $edit = $( 'span' )
+   .addClass( 'mw-editsection' )
+   .append( 'span 
class=mw-editsection-bracket[/span' )
+   .append( $link )
+   .append( 'span 
class=mw-editsection-bracket]/span' );
+   $div.prepend( $edit );
};
-   var openEditor = function($div) {
-   var $main = $div.find('div'),
+   var openEditor = function ( $div ) {
+   var $main = $div.find( 'div' ),
geshiLang = null,
-   matches = /(?:^| 
)source-([a-z0-9_-]+)/.exec($main.attr('class'));
-   if (matches) {
+   matches = /(?:^| )source-([a-z0-9_-]+)/.exec( 
$main.attr( 'class' ) );
+   if ( matches ) {
geshiLang = matches[1];
}
-   mediaWiki.loader.using('ext.codeEditor.ace.modes', 
function() {
+   mediaWiki.loader.using( 'ext.codeEditor.ace.modes', 
function () {
// @fixme de-duplicate
var map = {
c: 'c_cpp',
@@ -55,95 +55,93 @@
scala: 'scala',
xml: 'xml'
};
-   
 
// Disable some annoying commands
-   var canon = require('pilot/canon');
-   canon.removeCommand('replace');  // 
ctrl+R
-   canon.removeCommand('transposeletters'); // 
ctrl+T
-   canon.removeCommand('gotoline'); // 
ctrl+L
+   var canon = require( 'pilot/canon' );
+   canon.removeCommand( 'replace' );  // 
ctrl+R
+   canon.removeCommand( 'transposeletters' ); // 
ctrl+T
+   canon.removeCommand( 'gotoline' ); // 
ctrl+L
 
-   var $container = $('div')
-   .attr('style', 'top: 32px; left: 0px; 
right: 0px; bottom: 0px; border: 1px solid gray')
-   .text($main.text()); // quick hack :D
+   var $container = $( 'div' )
+   .attr( 

[MediaWiki-commits] [Gerrit] .gitreview file - change (integration/kss)

2013-12-31 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: .gitreview file
..

.gitreview file

Change-Id: I4e02acbf063c820f6459fb925bd0ee01a4ac5bba
---
A .gitreview
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/kss 
refs/changes/30/104730/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..69dbc7c
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=integration/kss.git
+defaultbranch=master

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e02acbf063c820f6459fb925bd0ee01a4ac5bba
Gerrit-PatchSet: 1
Gerrit-Project: integration/kss
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] .gitreview file - change (integration/kss)

2013-12-31 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged.

Change subject: .gitreview file
..


.gitreview file

Change-Id: I4e02acbf063c820f6459fb925bd0ee01a4ac5bba
---
A .gitreview
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..69dbc7c
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=integration/kss.git
+defaultbranch=master

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e02acbf063c820f6459fb925bd0ee01a4ac5bba
Gerrit-PatchSet: 1
Gerrit-Project: integration/kss
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Spage sp...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add integration/kss to deployment repo config - change (operations/puppet)

2013-12-31 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Add integration/kss to deployment repo config
..


Add integration/kss to deployment repo config

Bug: 58620
Change-Id: Ia28a52420e0245f0d63018ce711b3be29097aeb8
---
M manifests/role/deployment.pp
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp
index a395341..6d32a44 100644
--- a/manifests/role/deployment.pp
+++ b/manifests/role/deployment.pp
@@ -11,6 +11,10 @@
 
 class role::deployment::config {
   $repo_config = {
+'integration/kss' = {
+'grain' = 'contint-production-slaves',
+'upstream' = 'https://gerrit.wikimedia.org/r/integration/kss',
+},
 'integration/mediawiki-tools-codesniffer' = {
 'grain' = 'contint-production-slaves',
 'upstream' = 
'https://gerrit.wikimedia.org/r/mediawiki/tools/codesniffer',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia28a52420e0245f0d63018ce711b3be29097aeb8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Spage sp...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Spage sp...@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] Added user_name information for CSV output - change (analytics/wikimetrics)

2013-12-31 Thread Terrrydactyl (Code Review)
Terrrydactyl has uploaded a new change for review.

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


Change subject: Added user_name information for CSV output
..

Added user_name information for CSV output

Changed the CSV output on simple CSV and timeseries CSV to display the
user_name in addition to the user_id.

Created new function get_username_via_id(user_id) to map the user_name from the
id given.

Change-Id: I839eb8cf9dc7f31e84782bd66ad882e96d54b6f7
---
M wikimetrics/controllers/reports.py
1 file changed, 18 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/31/104731/1

diff --git a/wikimetrics/controllers/reports.py 
b/wikimetrics/controllers/reports.py
index eb1751d..f64d904 100644
--- a/wikimetrics/controllers/reports.py
+++ b/wikimetrics/controllers/reports.py
@@ -6,7 +6,7 @@
 from flask.ext.login import current_user
 
 from wikimetrics.configurables import app, db
-from wikimetrics.models import Report, RunReport, PersistentReport
+from wikimetrics.models import Report, RunReport, PersistentReport, WikiUser
 from wikimetrics.metrics import TimeseriesChoices
 from wikimetrics.models.report_nodes import Aggregation
 from wikimetrics.utils import (
@@ -122,6 +122,17 @@
 return json_response(status=celery_task.status)
 
 
+def get_username_via_id(user_id):
+
+Parameters
+user_id : id to match for user_name
+
+db_session = db.get_session()
+ret = db_session.query(WikiUser.mediawiki_userid, 
WikiUser.mediawiki_username).filter(WikiUser.mediawiki_userid.in_([user_id])).all()
+db_session.close()
+return ret[0][1]
+
+
 def get_timeseries_csv(task_result, pj, parameters):
 
 Parameters
@@ -146,9 +157,9 @@
 columns = task_result[Aggregation.STD].values()[0].keys()
 
 # if task_result is not empty find header in first row
-fieldnames = ['user_id', 'submetric'] + sorted(columns)
+fieldnames = ['user_id', 'user_name', 'submetric'] + sorted(columns)
 else:
-fieldnames = ['user_id', 'submetric']
+fieldnames = ['user_id', 'user_name', 'submetric']
 writer = DictWriter(csv_io, fieldnames)
 
 # collect rows to output in CSV
@@ -161,6 +172,7 @@
 for subrow in row.keys():
 task_row = row[subrow].copy()
 task_row['user_id'] = user_id
+task_row['user_name'] = get_username_via_id(user_id)
 task_row['submetric'] = subrow
 task_rows.append(task_row)
 
@@ -230,9 +242,9 @@
 columns = task_result[Aggregation.STD].keys()
 
 # if task_result is not empty find header in first row
-fieldnames = ['user_id'] + columns
+fieldnames = ['user_id', 'user_name'] + columns
 else:
-fieldnames = ['user_id']
+fieldnames = ['user_id', 'user_name']
 writer = DictWriter(csv_io, fieldnames)
 
 # collect rows to output in CSV
@@ -244,6 +256,7 @@
 for user_id, row in task_result[Aggregation.IND][0].iteritems():
 task_row = row.copy()
 task_row['user_id'] = user_id
+task_row['user_name'] = get_username_via_id(user_id)
 task_rows.append(task_row)
 
 # Aggregate Results

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I839eb8cf9dc7f31e84782bd66ad882e96d54b6f7
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Terrrydactyl tcho...@gmail.com

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


[MediaWiki-commits] [Gerrit] Merged with origin. - change (analytics/wikimetrics)

2013-12-31 Thread Terrrydactyl (Code Review)
Terrrydactyl has uploaded a new change for review.

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


Change subject: Merged with origin.
..

Merged with origin.

Change-Id: Ie1a3b31edc6f91fca664c4fecaaed2b4fe4ba575
---
M wikimetrics/controllers/cohorts.py
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/32/104732/1

diff --git a/wikimetrics/controllers/cohorts.py 
b/wikimetrics/controllers/cohorts.py
index 7245fff..4addb40 100644
--- a/wikimetrics/controllers/cohorts.py
+++ b/wikimetrics/controllers/cohorts.py
@@ -169,14 +169,10 @@
 url_for('cohorts_index'),
 vc.cohort_id
 ))
- HEAD   (a57a67 Added user_name information for CSV output)
-
-===
- BRANCH (0f12ab oops that broke it)
 except Exception, e:
 app.logger.exception(str(e))
 flash('Server error while processing your upload', 'error')
-
+
 return render_template(
 'csv_upload.html',
 projects=json.dumps(sorted(db.project_host_map.keys())),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1a3b31edc6f91fca664c4fecaaed2b4fe4ba575
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Terrrydactyl tcho...@gmail.com

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


[MediaWiki-commits] [Gerrit] Migrate ircecho module's nrpe checks to nrpe module - change (operations/puppet)

2013-12-31 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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


Change subject: Migrate ircecho module's nrpe checks to nrpe module
..

Migrate ircecho module's nrpe checks to nrpe module

Use the new nrpe::monitor_service definition to clear up the nrpe
process check. While at it also scope the template variables for
ircecho module's default.erb

Change-Id: I111d2e98571de271ee0a31638602578fc7662073
---
M manifests/role/echoirc.pp
M modules/ircecho/templates/default.erb
M modules/nrpe/templates/nrpe_local.cfg.erb
M templates/icinga/checkcommands.cfg.erb
4 files changed, 8 insertions(+), 11 deletions(-)


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

diff --git a/manifests/role/echoirc.pp b/manifests/role/echoirc.pp
index 67dfc1e..535eb93 100644
--- a/manifests/role/echoirc.pp
+++ b/manifests/role/echoirc.pp
@@ -4,6 +4,9 @@
 system::role { 'ircecho': description = 'ircecho server' }
 
 # bug 26784 - IRC bots process need nagios monitoring
-monitor_service { ircecho: description = ircecho_service_running, 
check_command = nrpe_check_ircecho }
+nrpe::monitor_service { 'ircecho':
+description  = 'ircecho_service_running',
+nrpe_command = '/usr/lib/nagios/plugins/check_procs -w 1:4 -c 1:20 -a 
ircecho',
+}
 }
 
diff --git a/modules/ircecho/templates/default.erb 
b/modules/ircecho/templates/default.erb
index aca00ec..4e933da 100644
--- a/modules/ircecho/templates/default.erb
+++ b/modules/ircecho/templates/default.erb
@@ -49,7 +49,7 @@
 #
 # This is a POSIX shell fragment
 #
-INFILE=%= infile(ircecho_logs) %
-NICK=%= ircecho_nick %
-CHANS=%= chans(ircecho_logs) %
-SERVER=%= ircecho_server %
+INFILE=%= infile(@ircecho_logs) %
+NICK=%= @ircecho_nick %
+CHANS=%= chans(@ircecho_logs) %
+SERVER=%= @ircecho_server %
diff --git a/modules/nrpe/templates/nrpe_local.cfg.erb 
b/modules/nrpe/templates/nrpe_local.cfg.erb
index f56f635..3f54f7d 100644
--- a/modules/nrpe/templates/nrpe_local.cfg.erb
+++ b/modules/nrpe/templates/nrpe_local.cfg.erb
@@ -13,7 +13,6 @@
 command[check_ram]=/usr/lib/nagios/plugins/check_ram.sh 20 5 b
 
 # process checks, we can't make this generic because we don't pass args via 
nrpe (security)
-command[check_ircecho]=/usr/lib/nagios/plugins/check_procs -w 1:4 -c 1:20 -a 
ircecho
 command[check_jenkins]=/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 
--ereg-argument-array '^/usr/bin/java .*-jar /usr/share/jenkins/jenkins.war'
 command[check_zuul]=/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 
--ereg-argument-array '^/usr/bin/python /usr/local/bin/zuul-server'
 command[check_mailman]=/usr/lib/nagios/plugins/check_procs -w 1:25 -c 1:35 -a 
mailman
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index cee7c2e..00a2d57 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -552,11 +552,6 @@
 }
 
 # end percona mysql checks
-define command{
-command_namenrpe_check_ircecho
-command_line$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_ircecho
-}
-
 # dummy check that's useful to check that paging is working
 define command{
 command_namecheck_to_check_nagios_paging

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

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

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


[MediaWiki-commits] [Gerrit] Combine var statements - change (mediawiki...CodeEditor)

2013-12-31 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Combine var statements
..

Combine var statements

Change-Id: If005690ab8ecf21e64399781acbecd1ec3b02172
---
M modules/ext.codeEditor.geshi.js
M modules/jquery.codeEditor.js
2 files changed, 87 insertions(+), 53 deletions(-)


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

diff --git a/modules/ext.codeEditor.geshi.js b/modules/ext.codeEditor.geshi.js
index 6a6e6bd..771f80a 100644
--- a/modules/ext.codeEditor.geshi.js
+++ b/modules/ext.codeEditor.geshi.js
@@ -5,10 +5,15 @@
  */
 
 $( function () {
-   var $sources = $( '.mw-geshi' );
+   var $sources, setupEditor, openEditor;
+
+   $sources = $( '.mw-geshi' );
+
if ( $sources.length  0 ) {
-   var setupEditor = function ( $div ) {
-   var $link = $( 'a' )
+   setupEditor = function ( $div ) {
+   var $link, $edit;
+
+   $link = $( 'a' )
.text( mediaWiki.msg( 'editsection' ) )
.attr( 'href', '#' )
.attr( 'title', 'Edit this code section' )
@@ -16,23 +21,29 @@
openEditor( $div );
event.preventDefault();
} );
-   var $edit = $( 'span' )
+   $edit = $( 'span' )
.addClass( 'mw-editsection' )
.append( 'span 
class=mw-editsection-bracket[/span' )
.append( $link )
.append( 'span 
class=mw-editsection-bracket]/span' );
$div.prepend( $edit );
};
-   var openEditor = function ( $div ) {
-   var $main = $div.find( 'div' ),
-   geshiLang = null,
-   matches = /(?:^| )source-([a-z0-9_-]+)/.exec( 
$main.attr( 'class' ) );
+
+   openEditor = function ( $div ) {
+   var $main, geshiLang, matches, $label, $langDropDown, 
$xcontainer, codeEditor;
+
+   $main = $div.find( 'div' );
+   geshiLang = null;
+   matches = /(?:^| )source-([a-z0-9_-]+)/.exec( 
$main.attr( 'class' ) );
+
if ( matches ) {
geshiLang = matches[1];
}
mediaWiki.loader.using( 'ext.codeEditor.ace.modes', 
function () {
+   var map, canon, $container, $save, $cancel, 
$controls, setLanguage, closeEditor;
+
// @fixme de-duplicate
-   var map = {
+   map = {
c: 'c_cpp',
cpp: 'c_cpp',
clojure: 'clojure',
@@ -57,17 +68,17 @@
};
 
// Disable some annoying commands
-   var canon = require( 'pilot/canon' );
+   canon = require( 'pilot/canon' );
canon.removeCommand( 'replace' );  // 
ctrl+R
canon.removeCommand( 'transposeletters' ); // 
ctrl+T
canon.removeCommand( 'gotoline' ); // 
ctrl+L
 
-   var $container = $( 'div' )
+   $container = $( 'div' )
.attr( 'style', 'top: 32px; left: 0px; 
right: 0px; bottom: 0px; border: 1px solid gray' )
.text( $main.text() ); // quick hack :D
 
-   var $label = $( 'label' ).text( 'Source 
language: ' );
-   var $langDropDown = $( 'select' );
+   $label = $( 'label' ).text( 'Source language: 
' );
+   $langDropDown = $( 'select' );
$.each( map, function ( geshiLang, aceLang ) {
var $opt = $( 'option' )
.text( geshiLang )
@@ -80,12 +91,14 @@
.change( function ( event ) {
setLanguage( $( this ).val() );
} );
-   var $save = $( 'button' )
+   $save = $( 'button' )
.text( mediaWiki.msg( 'savearticle' ) )
   

[MediaWiki-commits] [Gerrit] Migrate ircecho module's nrpe checks to nrpe module - change (operations/puppet)

2013-12-31 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Migrate ircecho module's nrpe checks to nrpe module
..


Migrate ircecho module's nrpe checks to nrpe module

Use the new nrpe::monitor_service definition to clear up the nrpe
process check. While at it also scope the template variables for
ircecho module's default.erb

Change-Id: I111d2e98571de271ee0a31638602578fc7662073
---
M manifests/role/echoirc.pp
M modules/ircecho/templates/default.erb
M modules/nrpe/templates/nrpe_local.cfg.erb
M templates/icinga/checkcommands.cfg.erb
4 files changed, 8 insertions(+), 11 deletions(-)

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



diff --git a/manifests/role/echoirc.pp b/manifests/role/echoirc.pp
index 67dfc1e..535eb93 100644
--- a/manifests/role/echoirc.pp
+++ b/manifests/role/echoirc.pp
@@ -4,6 +4,9 @@
 system::role { 'ircecho': description = 'ircecho server' }
 
 # bug 26784 - IRC bots process need nagios monitoring
-monitor_service { ircecho: description = ircecho_service_running, 
check_command = nrpe_check_ircecho }
+nrpe::monitor_service { 'ircecho':
+description  = 'ircecho_service_running',
+nrpe_command = '/usr/lib/nagios/plugins/check_procs -w 1:4 -c 1:20 -a 
ircecho',
+}
 }
 
diff --git a/modules/ircecho/templates/default.erb 
b/modules/ircecho/templates/default.erb
index aca00ec..4e933da 100644
--- a/modules/ircecho/templates/default.erb
+++ b/modules/ircecho/templates/default.erb
@@ -49,7 +49,7 @@
 #
 # This is a POSIX shell fragment
 #
-INFILE=%= infile(ircecho_logs) %
-NICK=%= ircecho_nick %
-CHANS=%= chans(ircecho_logs) %
-SERVER=%= ircecho_server %
+INFILE=%= infile(@ircecho_logs) %
+NICK=%= @ircecho_nick %
+CHANS=%= chans(@ircecho_logs) %
+SERVER=%= @ircecho_server %
diff --git a/modules/nrpe/templates/nrpe_local.cfg.erb 
b/modules/nrpe/templates/nrpe_local.cfg.erb
index f56f635..3f54f7d 100644
--- a/modules/nrpe/templates/nrpe_local.cfg.erb
+++ b/modules/nrpe/templates/nrpe_local.cfg.erb
@@ -13,7 +13,6 @@
 command[check_ram]=/usr/lib/nagios/plugins/check_ram.sh 20 5 b
 
 # process checks, we can't make this generic because we don't pass args via 
nrpe (security)
-command[check_ircecho]=/usr/lib/nagios/plugins/check_procs -w 1:4 -c 1:20 -a 
ircecho
 command[check_jenkins]=/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 
--ereg-argument-array '^/usr/bin/java .*-jar /usr/share/jenkins/jenkins.war'
 command[check_zuul]=/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 
--ereg-argument-array '^/usr/bin/python /usr/local/bin/zuul-server'
 command[check_mailman]=/usr/lib/nagios/plugins/check_procs -w 1:25 -c 1:35 -a 
mailman
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index cee7c2e..00a2d57 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -552,11 +552,6 @@
 }
 
 # end percona mysql checks
-define command{
-command_namenrpe_check_ircecho
-command_line$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_ircecho
-}
-
 # dummy check that's useful to check that paging is working
 define command{
 command_namecheck_to_check_nagios_paging

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I111d2e98571de271ee0a31638602578fc7662073
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Force all links to open in new tab - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Force all links to open in new tab
..

Force all links to open in new tab

And remove setupTimestampHover(), it was only called in one place, so just
a waste of space.
Also slight efficiency savings by only doing the timestamp stuff on new
messages, not old messages that it has already been done on.

Brickimedia/brickimedia#147

Change-Id: Iee07acb111d62c153c69b875748bab236b106593
---
M MediaWikiChat.js
1 file changed, 11 insertions(+), 13 deletions(-)


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

diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 44d5761..e63ca96 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -299,10 +299,18 @@
});
 
if ( post ) {
-   $( '#mwchat-table' ).append( html );
-   }
+   elem = $( html ).appendTo( $( '#mwchat-table' ) );
 
-   MediaWikiChat.setupTimestampHover();
+   elem.hover( function() {
+   $( this ).find( '.pretty' ).hide();
+   $( this ).find( '.real' ).show();
+   }, function() {
+   $( this ).find( '.real' ).hide();
+   $( this ).find( '.pretty' ).show();
+   });
+
+   elem.find( 'a' ).attr( 'target', '_blank' );
+   }
},
 
addPrivateMessage: function( userId, convwith, message, timestamp ) {
@@ -490,16 +498,6 @@
MediaWikiChat.amI = true;
}
},
-
-   setupTimestampHover: function() {
-   $( '.mwchat-message' ).hover( function() {
-   $( this ).find( '.pretty' ).hide();
-   $( this ).find( '.real' ).show();
-   }, function() {
-   $( this ).find( '.real' ).hide();
-   $( this ).find( '.pretty' ).show();
-   });
-   }
 };
 
 $( document ).ready( function() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee07acb111d62c153c69b875748bab236b106593
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Force all links to open in new tab - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Force all links to open in new tab
..


Force all links to open in new tab

And remove setupTimestampHover(), it was only called in one place, so just
a waste of space.
Also slight efficiency savings by only doing the timestamp stuff on new
messages, not old messages that it has already been done on.

Brickimedia/brickimedia#147

Change-Id: Iee07acb111d62c153c69b875748bab236b106593
---
M MediaWikiChat.js
1 file changed, 11 insertions(+), 13 deletions(-)

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



diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 44d5761..e63ca96 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -299,10 +299,18 @@
});
 
if ( post ) {
-   $( '#mwchat-table' ).append( html );
-   }
+   elem = $( html ).appendTo( $( '#mwchat-table' ) );
 
-   MediaWikiChat.setupTimestampHover();
+   elem.hover( function() {
+   $( this ).find( '.pretty' ).hide();
+   $( this ).find( '.real' ).show();
+   }, function() {
+   $( this ).find( '.real' ).hide();
+   $( this ).find( '.pretty' ).show();
+   });
+
+   elem.find( 'a' ).attr( 'target', '_blank' );
+   }
},
 
addPrivateMessage: function( userId, convwith, message, timestamp ) {
@@ -490,16 +498,6 @@
MediaWikiChat.amI = true;
}
},
-
-   setupTimestampHover: function() {
-   $( '.mwchat-message' ).hover( function() {
-   $( this ).find( '.pretty' ).hide();
-   $( this ).find( '.real' ).show();
-   }, function() {
-   $( this ).find( '.real' ).hide();
-   $( this ).find( '.pretty' ).show();
-   });
-   }
 };
 
 $( document ).ready( function() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee07acb111d62c153c69b875748bab236b106593
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Reduce comment cache time - change (mediawiki...Comments)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Reduce comment cache time
..

Reduce comment cache time

I (we) have found that having a 24 hour cache for NUMBEROFCOMMENTSPAGE can be
too much, as articles are most frequently commented on in the few hours
after their publishing, and so you can end up with very out of date
figures with a 24 hour cache. I've reduced it to 1 hour here, which should
have an almost insignificant effect in performance, while giving much more
up to date stats.

Change-Id: I9e8bfe1fda0f2c5acc5c2a94b5132af598aeb298
---
M NumberOfComments.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/NumberOfComments.php b/NumberOfComments.php
index 8f2a75b..e43f594 100644
--- a/NumberOfComments.php
+++ b/NumberOfComments.php
@@ -123,7 +123,7 @@
} else {
$val = intval( $res );
}
-   $wgMemc-set( $key, $val, 60 * 60 * 24 ); // cache for 
24 hours
+   $wgMemc-set( $key, $val, 60 * 60 ); // cache for an 
hour
}
return $val;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e8bfe1fda0f2c5acc5c2a94b5132af598aeb298
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Fix some JSHint issues - change (mediawiki...CodeEditor)

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

Change subject: Fix some JSHint issues
..


Fix some JSHint issues

Change-Id: I46ae3ce2f39b35af6d75a94b5132eea0e6672064
---
M modules/ext.codeEditor.geshi.js
M modules/jquery.codeEditor.js
2 files changed, 11 insertions(+), 10 deletions(-)

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



diff --git a/modules/ext.codeEditor.geshi.js b/modules/ext.codeEditor.geshi.js
index 34d6bc6..cc8681d 100644
--- a/modules/ext.codeEditor.geshi.js
+++ b/modules/ext.codeEditor.geshi.js
@@ -13,7 +13,7 @@
.attr('href', '#')
.attr('title', 'Edit this code section')
.click(function(event) {
-   openEditor($div)
+   openEditor($div);
event.preventDefault();
});
var $edit = $('span')
@@ -97,7 +97,7 @@
type: 'POST',
success: function(data, 
xhr) {
var $html = 
$(data.parse.text['*']);
-   
$div.replaceWith($html)
+   
$div.replaceWith($html);

setupEditor($html);
 
 
@@ -120,7 +120,7 @@
.append($controls)
.append($container);
$xcontainer.width($main.width())
-  .height($main.height() * 1.1 
+ 64 + 32);
+   .height($main.height() * 1.1 + 64 + 32);
 
$div.css('display', 'none');
$xcontainer.insertAfter($div);
diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js
index 2c320d9..a467833 100644
--- a/modules/jquery.codeEditor.js
+++ b/modules/jquery.codeEditor.js
@@ -66,7 +66,7 @@
 } );
 
 var cookieEnabled = $.cookie('wikiEditor-' + context.instance + 
'-codeEditor-enabled');
-context.codeEditorActive = (cookieEnabled != '0');
+context.codeEditorActive = (cookieEnabled !== '0');
 
 /**
  * Internally used functions
@@ -104,7 +104,7 @@
} else {
context.fn.disableCodeEditor();
}
-   }
+   };
context.api.addToToolbar( context, {
'section': 'main',
'group': 'format',
@@ -132,7 +132,7 @@
'setupCodeEditor': function() {
var box = context.$textarea;
 
-   var lang = mw.config.get(wgCodeEditorCurrentLanguage)
+   var lang = mw.config.get(wgCodeEditorCurrentLanguage);
if (lang) {
// Ace doesn't like replacing a textarea directly.
// We'll stub this out to sit on top of it...
@@ -142,7 +142,7 @@
 
box.css('display', 'none');
container.width(box.width())
-.height(box.height());
+   .height(box.height());
 
editdiv.text(box.val());
context.codeEditor = ace.edit(editdiv[0]);
@@ -283,7 +283,7 @@
} else {
throw new Error('CodeEditor: no 
original function to call for ' + name);
}
-   }
+   };
} else {
base[name] = func;
}
@@ -388,7 +388,7 @@
}
col = offset - pos;
return {row: row, column: col};
-   }
+   };
var start = offsetToPos( options.start ),
end = offsetToPos( options.end );
 
@@ -425,4 +425,5 @@
context.fn.setupCodeEditor();
 }
 
-} } )( jQuery );
+};
+} )( jQuery );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46ae3ce2f39b35af6d75a94b5132eea0e6672064
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Reuse code from MWException - change (mediawiki...Flow)

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

Change subject: Reuse code from MWException
..


Reuse code from MWException

Change-Id: I8b56cbce2c2c41e33f9c7aa571606139829270b0
---
M Flow.php
M Hooks.php
M includes/Exception/ExceptionHandling.php
3 files changed, 69 insertions(+), 63 deletions(-)

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



diff --git a/Flow.php b/Flow.php
index 699af8f..e221bee 100755
--- a/Flow.php
+++ b/Flow.php
@@ -179,7 +179,6 @@
 $wgGroupPermissions['oversight']['flow-suppress'] = true;
 
 // Exception
-$wgAutoloadClasses['Flow\Exception\FlowExceptionHandling'] = $dir . 
'includes/Exception/ExceptionHandling.php';
 $wgAutoloadClasses['Flow\Exception\FlowException'] = $dir . 
'includes/Exception/ExceptionHandling.php';
 $wgAutoloadClasses['Flow\Exception\InvalidInputException'] = $dir . 
'includes/Exception/ExceptionHandling.php';
 $wgAutoloadClasses['Flow\Exception\InvalidActionException'] = $dir . 
'includes/Exception/ExceptionHandling.php';
diff --git a/Hooks.php b/Hooks.php
index 1a8f815..a3816f7 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -145,9 +145,9 @@
}
 
$view-show( $loader, $action );
-   } catch ( Flow\Exception\FlowException $e ) {
-   $handling = new 
Flow\Exception\FlowExceptionHandling( $container['templating'], 
RequestContext::getMain() );
-   $handling-handle( $e );
+   } catch( Flow\Exception\FlowException $e ) {
+   $e-setOutput( $output );
+   throw $e;
}
 
return false;
diff --git a/includes/Exception/ExceptionHandling.php 
b/includes/Exception/ExceptionHandling.php
index 693841b..af9759b 100644
--- a/includes/Exception/ExceptionHandling.php
+++ b/includes/Exception/ExceptionHandling.php
@@ -2,86 +2,55 @@
 
 namespace Flow\Exception;
 
+use MWExceptionHandler;
 use MWException;
-use IcontextSource;
-use Flow\Templating;
-
-/**
- * Handles all kinds of flow exceptions, the purpose is not to show exception 
trace
- * to end users.  It works by grouping flow exceptions into different 
categories,
- * then we can add different handling for the different exception types, we 
also
- * use the error code to present localized error message to users
- */
-class FlowExceptionHandling {
-   /**
-* @var Templating
-*/
-   protected $templating;
-
-   /**
-* @var IContextSource
-*/
-   protected $requestContext;
-
-   /**
-* @param Templating
-* @param IContextSource
-*/
-   public function __construct( Templating $templating, IContextSource 
$requestContext ) {
-   $this-templating = $templating;
-   $this-requestContext = $requestContext;
-   }
-
-   /**
-* @param FlowException
-*/
-   public function handle( FlowException $e ) {
-   // Handle any exception specific error
-   $e-handleError();
-   $this-showError( $e );
-   }
-
-   /**
-* @param FlowException
-*/
-   public function showError( FlowException $e ) {
-   $this-requestContext-getOutput()-addModuleStyles(
-   array( 'mediawiki.ui', 'ext.flow.base' )
-   );
-   $this-requestContext-getOutput()-addHTML(
-   $this-templating-render(
-   'flow:flow-error.html.php',
-   array( 'message' = $e-getErrorMessage() )
-   )
-   );
-   }
-}
+use OutputPage;
 
 /**
  * Flow base exception
  */
 class FlowException extends MWException {
 
+   /**
+* Flow exception error code
+* @var string
+*/
protected $code;
+
+   /**
+* The output object
+* @var OutputPage
+*/
+   protected $output;
 
/**
 * @param string - The message from exception, used for debugging error
 * @param string - The error code used to display error message
 */
public function __construct( $message, $code = 'default' ) {
+   global $wgOut;
parent::__construct( $message );
$this-code = $code;
+   // Set output object to the global $wgOut object by default
+   $this-output = $wgOut;
}
 
/**
-* Get the error message to be displayed in user interface
+* Set the output object
 */
-   public function getErrorMessage() {
+   public function setOutput( OutputPage $output ) {
+   $this-output = $output;
+   }
+
+   /**
+* Get the message key for the localized error message
+*/
+  

[MediaWiki-commits] [Gerrit] config for 2013.12 - change (translatewiki)

2013-12-31 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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


Change subject: config for 2013.12
..

config for 2013.12

ULS is at: 760b0f2 (2013-12-31).
Translate is at: 34eee43 (2013-12-31).

Change-Id: Ic7e584e87cf8219f62bae3cbc773e39e3c537880
---
M melange/config.ini
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/37/104737/1

diff --git a/melange/config.ini b/melange/config.ini
index 14ffa14..9811807 100644
--- a/melange/config.ini
+++ b/melange/config.ini
@@ -2,8 +2,8 @@
 mediawikirepo=ssh://kar...@gerrit.wikimedia.org:29418/mediawiki/core.git
 extensionrepo=ssh://kar...@gerrit.wikimedia.org:29418/mediawiki/extensions/
 branches=origin/master origin/REL1_21 origin/REL1_20
-releasever=2013.11
-releasever-prev=2013.10
+releasever=2013.12
+releasever-prev=2013.11
 bundlename=MediaWiki language extension bundle
 downloadurl=https://translatewiki.net/mleb
 hasher=sha256sum
@@ -18,8 +18,8 @@
 cldr=origin/master
 CleanChanges=origin/master
 LocalisationUpdate=origin/master
-Translate=715c2da
-UniversalLanguageSelector=78152b9
+Translate=760b0f2
+UniversalLanguageSelector=34eee43
 
 [install]
 dbname=melange

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7e584e87cf8219f62bae3cbc773e39e3c537880
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

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


[MediaWiki-commits] [Gerrit] (bug 58140) Multiple moderated topics in a row takes up too ... - change (mediawiki...Flow)

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

Change subject: (bug 58140) Multiple moderated topics in a row takes up too 
much space
..


(bug 58140) Multiple moderated topics in a row takes up too much space

Use collapsed-one-line style for moderated topics

Bug: 58140
Change-Id: I570c47ae5a4b43a9b6292835c0ba783005e29a3e
---
M modules/discussion/styles/collapse.less
A modules/discussion/styles/mixins/collapse.less
M modules/discussion/styles/topic.less
3 files changed, 99 insertions(+), 91 deletions(-)

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



diff --git a/modules/discussion/styles/collapse.less 
b/modules/discussion/styles/collapse.less
index d076b55..3de34fe 100644
--- a/modules/discussion/styles/collapse.less
+++ b/modules/discussion/styles/collapse.less
@@ -1,3 +1,4 @@
+@import 'mixins/collapse.less';
 @import 'mediawiki.mixins.less';
 
 .collapseButtonIcon(@icon-prefix; @dir: '') {
@@ -41,67 +42,13 @@
 }
 
 .flow-container {
-   .flow-topic-posts-meta-minimal {
-   display: none;
-   margin: 0;
+   .flow-collapse-complete;
+
+   .topic-collapsed-full .flow-topic-closed {
+   .flow-collapse-full;
}
 
.topic-collapsed-one-line .flow-topic-closed {
-   .flow-titlebar {
-   height: 30px;
-   }
-   .flow-topic-title {
-   overflow: hidden;
-   white-space: nowrap;
-   padding: 0;
-
-   .flow-realtitle {
-   text-overflow: ellipsis;
-   }
-   }
-
-
-   .flow-topic-posts-meta,
-   .flow-datestamp {
-   display: none;
-   }
-
-   .flow-topic-posts-meta-minimal {
-   display: block;
-
-   // position in upper right hand corner
-   position: absolute;
-   right: 22px;
-   top: 15px;
-
-   font-weight: bold;
-   color: #FFF;
-   background-color: #CCC;
-
-   // title height = 30px; this only 22, so add 4px margin 
bottom  top
-   line-height: 22px;
-   height: 22px;
-   margin: 4px 0;
-   padding: 0 10px;
-
-   // this creates the small bottom-right arrow
-   :after {
-   // :after should have some content in order to 
show up
-   content: '.';
-   text-indent: -px;
-   display: block;
-
-   width: 0;
-   height: 0;
-   border-top: 5px solid transparent;
-   border-left: 5px solid #CCC;
-
-   position: relative;
-   bottom: 5px; // icon height - arrow height
-   // calc's are LESS-escaped below because I want 
CSS to do the
-   // calc, not LESS (which incorrectly returns 
110%)
-   left: calc(~100% + 10px); // icon width + 
icon padding-right
-   }
-   }
+   .flow-collapse-one-line;
}
 }
diff --git a/modules/discussion/styles/mixins/collapse.less 
b/modules/discussion/styles/mixins/collapse.less
new file mode 100644
index 000..1e36eb6
--- /dev/null
+++ b/modules/discussion/styles/mixins/collapse.less
@@ -0,0 +1,80 @@
+// complete view is default
+.flow-collapse-complete {
+   .flow-topic-posts-meta-minimal {
+   display: none;
+   margin: 0;
+   }
+}
+
+// medium-collapsed: children not visible, but full topic details
+.flow-collapse-full {
+   // also hide minimal meta info here
+   .flow-collapse-complete;
+
+   .flow-topic-children-container {
+// display: none; // hiding is done in JS, with slideUp effect
+   }
+}
+
+// max-collapsed: children not visible, condensed title
+.flow-collapse-one-line {
+   .flow-titlebar {
+   height: 30px;
+   }
+   .flow-topic-title {
+   overflow: hidden;
+   white-space: nowrap;
+   padding: 0 !important;
+
+   .flow-realtitle {
+   text-overflow: ellipsis;
+   }
+   }
+
+   .flow-topic-posts-meta,
+   .flow-datestamp {
+   display: none;
+   }
+
+   .flow-topic-posts-meta-minimal {
+   display: block;
+
+   // position in upper right hand corner
+   position: absolute;
+   

[MediaWiki-commits] [Gerrit] config for 2013.12 - change (translatewiki)

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

Change subject: config for 2013.12
..


config for 2013.12

ULS is at: 760b0f2 (2013-12-31).
Translate is at: 34eee43 (2013-12-31).

Change-Id: Ic7e584e87cf8219f62bae3cbc773e39e3c537880
---
M melange/config.ini
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/melange/config.ini b/melange/config.ini
index 14ffa14..9811807 100644
--- a/melange/config.ini
+++ b/melange/config.ini
@@ -2,8 +2,8 @@
 mediawikirepo=ssh://kar...@gerrit.wikimedia.org:29418/mediawiki/core.git
 extensionrepo=ssh://kar...@gerrit.wikimedia.org:29418/mediawiki/extensions/
 branches=origin/master origin/REL1_21 origin/REL1_20
-releasever=2013.11
-releasever-prev=2013.10
+releasever=2013.12
+releasever-prev=2013.11
 bundlename=MediaWiki language extension bundle
 downloadurl=https://translatewiki.net/mleb
 hasher=sha256sum
@@ -18,8 +18,8 @@
 cldr=origin/master
 CleanChanges=origin/master
 LocalisationUpdate=origin/master
-Translate=715c2da
-UniversalLanguageSelector=78152b9
+Translate=760b0f2
+UniversalLanguageSelector=34eee43
 
 [install]
 dbname=melange

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7e584e87cf8219f62bae3cbc773e39e3c537880
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Siebrand siebr...@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 formatting of JavaScript files - change (mediawiki...CodeEditor)

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

Change subject: Update formatting of JavaScript files
..


Update formatting of JavaScript files

Change-Id: I7a18b7f76f7c0a064645f23974f1fe09dafc4ca2
---
M modules/ext.codeEditor.geshi.js
M modules/ext.codeEditor.js
M modules/jquery.codeEditor.js
3 files changed, 485 insertions(+), 489 deletions(-)

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



diff --git a/modules/ext.codeEditor.geshi.js b/modules/ext.codeEditor.geshi.js
index cc8681d..6a6e6bd 100644
--- a/modules/ext.codeEditor.geshi.js
+++ b/modules/ext.codeEditor.geshi.js
@@ -4,33 +4,33 @@
  * Needs some code de-dup with the full-page JS/CSS page editing.
  */
 
-$(function() {
-   var $sources = $('.mw-geshi');
-   if ($sources.length  0) {
-   var setupEditor = function($div) {
-   var $link = $('a')
-   .text(mediaWiki.msg('editsection'))
-   .attr('href', '#')
-   .attr('title', 'Edit this code section')
-   .click(function(event) {
-   openEditor($div);
+$( function () {
+   var $sources = $( '.mw-geshi' );
+   if ( $sources.length  0 ) {
+   var setupEditor = function ( $div ) {
+   var $link = $( 'a' )
+   .text( mediaWiki.msg( 'editsection' ) )
+   .attr( 'href', '#' )
+   .attr( 'title', 'Edit this code section' )
+   .click( function ( event ) {
+   openEditor( $div );
event.preventDefault();
-   });
-   var $edit = $('span')
-   .addClass('mw-editsection')
-   .append('span 
class=mw-editsection-bracket[/span')
-   .append($link)
-   .append('span 
class=mw-editsection-bracket]/span');
-   $div.prepend($edit);
+   } );
+   var $edit = $( 'span' )
+   .addClass( 'mw-editsection' )
+   .append( 'span 
class=mw-editsection-bracket[/span' )
+   .append( $link )
+   .append( 'span 
class=mw-editsection-bracket]/span' );
+   $div.prepend( $edit );
};
-   var openEditor = function($div) {
-   var $main = $div.find('div'),
+   var openEditor = function ( $div ) {
+   var $main = $div.find( 'div' ),
geshiLang = null,
-   matches = /(?:^| 
)source-([a-z0-9_-]+)/.exec($main.attr('class'));
-   if (matches) {
+   matches = /(?:^| )source-([a-z0-9_-]+)/.exec( 
$main.attr( 'class' ) );
+   if ( matches ) {
geshiLang = matches[1];
}
-   mediaWiki.loader.using('ext.codeEditor.ace.modes', 
function() {
+   mediaWiki.loader.using( 'ext.codeEditor.ace.modes', 
function () {
// @fixme de-duplicate
var map = {
c: 'c_cpp',
@@ -55,95 +55,93 @@
scala: 'scala',
xml: 'xml'
};
-   
 
// Disable some annoying commands
-   var canon = require('pilot/canon');
-   canon.removeCommand('replace');  // 
ctrl+R
-   canon.removeCommand('transposeletters'); // 
ctrl+T
-   canon.removeCommand('gotoline'); // 
ctrl+L
+   var canon = require( 'pilot/canon' );
+   canon.removeCommand( 'replace' );  // 
ctrl+R
+   canon.removeCommand( 'transposeletters' ); // 
ctrl+T
+   canon.removeCommand( 'gotoline' ); // 
ctrl+L
 
-   var $container = $('div')
-   .attr('style', 'top: 32px; left: 0px; 
right: 0px; bottom: 0px; border: 1px solid gray')
-   .text($main.text()); // quick hack :D
+   var $container = $( 'div' )
+   .attr( 'style', 'top: 32px; left: 0px; 
right: 0px; bottom: 0px; border: 

[MediaWiki-commits] [Gerrit] Reduce comment cache time - change (mediawiki...Comments)

2013-12-31 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Reduce comment cache time
..


Reduce comment cache time

I (we) have found that having a 24 hour cache for NUMBEROFCOMMENTSPAGE can be
too much, as articles are most frequently commented on in the few hours
after their publishing, and so you can end up with very out of date
figures with a 24 hour cache. I've reduced it to 1 hour here, which should
have an almost insignificant effect in performance, while giving much more
up to date stats.

Change-Id: I9e8bfe1fda0f2c5acc5c2a94b5132af598aeb298
---
M NumberOfComments.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/NumberOfComments.php b/NumberOfComments.php
index 8f2a75b..e43f594 100644
--- a/NumberOfComments.php
+++ b/NumberOfComments.php
@@ -123,7 +123,7 @@
} else {
$val = intval( $res );
}
-   $wgMemc-set( $key, $val, 60 * 60 * 24 ); // cache for 
24 hours
+   $wgMemc-set( $key, $val, 60 * 60 ); // cache for an 
hour
}
return $val;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e8bfe1fda0f2c5acc5c2a94b5132af598aeb298
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] category.py: Replaced catlib except in move bot. - change (pywikibot/core)

2013-12-31 Thread Pyfisch (Code Review)
Pyfisch has uploaded a new change for review.

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


Change subject: category.py: Replaced catlib except in move bot.
..

category.py: Replaced catlib except in move bot.

Removed catlib with other functions.
Used easier syntax without Link class to create
Category objects.

Change-Id: I5360fd4bebeb2d736fb5b86fc6d71a921acbebfb
---
M scripts/category.py
1 file changed, 13 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/38/104738/1

diff --git a/scripts/category.py b/scripts/category.py
index a72d33a..c90c1e7 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -500,7 +500,7 @@
 self.overwrite = overwrite
 self.showImages = showImages
 self.site = pywikibot.getSite()
-self.cat = catlib.Category(pywikibot.Link('Category:' + catTitle))
+self.cat = pywikibot.Category(self.site, catTitle)
 self.list = pywikibot.Page(self.site, listTitle)
 self.subCats = subCats
 self.talkPages = talkPages
@@ -554,7 +554,7 @@
  pagesonly=False):
 self.editSummary = editSummary
 self.site = pywikibot.getSite()
-self.cat = catlib.Category(pywikibot.Link('Category:' + catTitle))
+self.cat = pywikibot.Category(self.site, catTitle) 
 # get edit summary message
 self.useSummaryForDeletion = useSummaryForDeletion
 self.batchMode = batchMode
@@ -574,8 +574,8 @@
 for article in articles:
 if not self.titleRegex or re.search(self.titleRegex,
 article.title()):
-catlib.change_category(article, self.cat, None,
-   comment=self.editSummary,
+article.change_category(self.cat, None,
+comment=self.editSummary,
inPlace=self.inPlace)
 if self.pagesonly:
 return
@@ -587,9 +587,9 @@
  % self.cat.title())
 else:
 for subcategory in subcategories:
-catlib.change_category(subcategory, self.cat, None,
-   comment=self.editSummary,
-   inPlace=self.inPlace)
+subcategory.change_category(self.cat, None,
+comment=self.editSummary,
+inPlace=self.inPlace)
 # Deletes the category page
 if self.cat.exists() and self.cat.isEmptyCategory():
 if self.useSummaryForDeletion and self.editSummary:
@@ -708,8 +708,8 @@
 if current_cat == original_cat:
 pywikibot.output('No changes necessary.')
 else:
-catlib.change_category(article, original_cat, current_cat,
-   comment=self.editSummary)
+article.change_category(original_cat, current_cat,
+comment=self.editSummary)
 flag = True
 elif choice in ['j', 'J']:
 newCatTitle = pywikibot.input(u'Please enter the category the '
@@ -721,8 +721,8 @@
 flag = True
 elif choice in ['r', 'R']:
 # remove the category tag
-catlib.change_category(article, original_cat, None,
-   comment=self.editSummary)
+article.change_category(original_cat, None,
+comment=self.editSummary)
 flag = True
 elif choice == '?':
 contextLength += 500
@@ -755,7 +755,7 @@
 flag = True
 
 def run(self):
-cat = catlib.Category(pywikibot.Link('Category:' + self.catTitle))
+cat = pywikibot.Category(self.site, self.catTitle)
 
 articles = set(cat.articles())
 if len(articles) == 0:
@@ -847,7 +847,7 @@
 * maxDepth - the limit beyond which no subcategories will be listed
 
 
-cat = catlib.Category(pywikibot.Link('Category:' + self.catTitle))
+cat = pywikibot.Category(self.site, catTitle)
 tree = self.treeview(cat)
 if self.filename:
 pywikibot.output(u'Saving results in %s' % self.filename)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5360fd4bebeb2d736fb5b86fc6d71a921acbebfb
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Pyfisch pyfi...@gmail.com

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Changed Page.change_category for category_redirect - change (pywikibot/core)

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

Change subject: Changed Page.change_category for category_redirect
..


Changed Page.change_category for category_redirect

Note #1: Page.change_category now returns True or
False instead of always None.
Note #2: The category_redirect version of
change_category saves the page also if it is
not changed. Since MediaWiki automatically
purges pages this is imho not needed. The
original does not do this.
Note #3: This should fix the bug reported in bug 59119

Change-Id: I0dd0c3758b3c6dfa542ddba44fc6139a9b415d3e
---
M pywikibot/page.py
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index f0150cd..6504d10 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1455,6 +1455,7 @@
 
 @param inPlace: if True, change categories in place rather than
   rearranging them.
+@return: True if page was saved changed, otherwise False.
 
 
 # get list of Category objects the article is in and remove possible
@@ -1472,12 +1473,12 @@
 if not self.canBeEdited():
 pywikibot.output(uCan't edit %s, skipping it...
  % self.title(asLink=True))
-return
+return False
 
 if oldCat not in cats:
 pywikibot.error(u'%s is not in category %s!'
 % (self.title(asLink=True), oldCat.title()))
-return
+return False
 
 if inPlace or self.namespace() == 10:
 oldtext = self.get(get_redirect=True)
@@ -1496,10 +1497,12 @@
 # a ValueError is in the case of interwiki links to self.
 pywikibot.output(u'Skipping %s because of interwiki link to '
  u'self' % self.title())
+return False
 
 if oldtext != newtext:
 try:
 self.put(newtext, comment)
+return True
 except pywikibot.EditConflict:
 pywikibot.output(u'Skipping %s because of edit conflict'
  % self.title())
@@ -1515,6 +1518,7 @@
 except pywikibot.PageNotSaved as error:
 pywikibot.output(u'Saving page %s failed: %s'
  % (self.title(asLink=True), error.message))
+return False
 
 @property
 def categoryinfo(self):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0dd0c3758b3c6dfa542ddba44fc6139a9b415d3e
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Pyfisch pyfi...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Xqt i...@gno.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] beta: gwtoolset filebackend - change (operations/mediawiki-config)

2013-12-31 Thread Dan-nl (Code Review)
Dan-nl has uploaded a new change for review.

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


Change subject: beta: gwtoolset filebackend
..

beta: gwtoolset filebackend

the filebackend reference was accidentally deleted in 
https://gerrit.wikimedia.org/r/#/c/102510.

Change-Id: If770f4897bf44ef2ebdc1c2d93987656896ae2db
---
M wmf-config/CommonSettings-labs.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 08851f2..46d33e9 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -61,6 +61,11 @@
);
 }
 
+// the beta cluster uses a different filebackend than production
+if ( $wmgUseGWToolset ) {
+   $wgGWTFileBackend = 'gwtoolset-backend';
+}
+
 if ( $wmgUseOAuth ) {
$wgMWOAuthCentralWiki = 'labswiki';  # bug 57403
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If770f4897bf44ef2ebdc1c2d93987656896ae2db
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com

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


[MediaWiki-commits] [Gerrit] Add kr.wikimedia DNS entry - change (operations/dns)

2013-12-31 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Add kr.wikimedia DNS entry
..


Add kr.wikimedia DNS entry

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

Approvals:
  Jeremyb: Looks good to me, but someone else must approve
  Alexandros Kosiaris: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 9b3b228..af802e8 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -553,6 +553,7 @@
 incubator  1H  IN CNAMEwikimedia-lb
 internal   1H  IN CNAMEwikimedia-lb
 it 1H  IN CNAMEwikimedia-lb
+kr 1H  IN CNAMEwikimedia-lb
 langcom1H  IN CNAMEwikimedia-lb
 meta   1H  IN CNAMEwikimedia-lb
 www.meta   1H  IN CNAMEwikimedia-lb

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ef05e9ab509ffca50165f368c7e37517d27b7f7
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: John F. Lewis johnflewi...@gmail.com
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Jeremyb jer...@tuxmachine.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Don't run this test until Bug 59135 is sorted - change (qa/browsertests)

2013-12-31 Thread Cmcmahon (Code Review)
Cmcmahon has uploaded a new change for review.

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


Change subject: Don't run this test until Bug 59135 is sorted
..

Don't run this test until Bug 59135 is sorted

Change-Id: Ic31aa232ff513177898e1f255833e9f9533a
---
M features/search.feature
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/40/104740/1

diff --git a/features/search.feature b/features/search.feature
index d1e0a47..8bb638c 100644
--- a/features/search.feature
+++ b/features/search.feature
@@ -9,7 +9,7 @@
 # qa-browsertests top-level directory and at
 # https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
 #
-@en.wikipedia.beta.wmflabs.org @test2.wikipedia.org
+
 Feature: Search
 
   Scenario: Search suggestions

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic31aa232ff513177898e1f255833e9f9533a
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] production: add gwtoolset to extension-list - change (operations/mediawiki-config)

2013-12-31 Thread Dan-nl (Code Review)
Dan-nl has uploaded a new change for review.

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


Change subject: production: add gwtoolset to extension-list
..

production: add gwtoolset to extension-list

when Commons was updated to 1.23wmf8 the extension-list reference for GWToolset
was not moved from extension-list-1.23wmf7 into extension-list

i am guessing that by placing the reference in extension-list it is no longer
needed in either extension-list-labs or extension-list-1.23wmf7, so i have
removed the reference from those two files.

Change-Id: If1376178384bc356f9f0697d098118c42384300b
---
M wmf-config/extension-list
M wmf-config/extension-list-1.23wmf7
M wmf-config/extension-list-labs
3 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/extension-list b/wmf-config/extension-list
index f53dbd7..e1fbf39 100644
--- a/wmf-config/extension-list
+++ b/wmf-config/extension-list
@@ -58,6 +58,7 @@
 $IP/extensions/GlobalUsage/GlobalUsage.php
 $IP/extensions/GoogleNewsSitemap/GoogleNewsSitemap.php
 $IP/extensions/GuidedTour/GuidedTour.php
+$IP/extensions/GWToolset/GWToolset.php
 $IP/extensions/ImageMap/ImageMap.php
 $IP/extensions/InputBox/InputBox.php
 $IP/extensions/Insider/Insider.php
diff --git a/wmf-config/extension-list-1.23wmf7 
b/wmf-config/extension-list-1.23wmf7
index fef7adb..8b13789 100644
--- a/wmf-config/extension-list-1.23wmf7
+++ b/wmf-config/extension-list-1.23wmf7
@@ -1 +1 @@
-$IP/extensions/GWToolset/GWToolset.php
+
diff --git a/wmf-config/extension-list-labs b/wmf-config/extension-list-labs
index fef7adb..8b13789 100644
--- a/wmf-config/extension-list-labs
+++ b/wmf-config/extension-list-labs
@@ -1 +1 @@
-$IP/extensions/GWToolset/GWToolset.php
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1376178384bc356f9f0697d098118c42384300b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com

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


[MediaWiki-commits] [Gerrit] beta: gwtoolset filebackend - change (operations/mediawiki-config)

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

Change subject: beta: gwtoolset filebackend
..


beta: gwtoolset filebackend

the filebackend reference was accidentally deleted in 
https://gerrit.wikimedia.org/r/#/c/102510.

Change-Id: If770f4897bf44ef2ebdc1c2d93987656896ae2db
---
M wmf-config/CommonSettings-labs.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 08851f2..46d33e9 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -61,6 +61,11 @@
);
 }
 
+// the beta cluster uses a different filebackend than production
+if ( $wmgUseGWToolset ) {
+   $wgGWTFileBackend = 'gwtoolset-backend';
+}
+
 if ( $wmgUseOAuth ) {
$wgMWOAuthCentralWiki = 'labswiki';  # bug 57403
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If770f4897bf44ef2ebdc1c2d93987656896ae2db
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com
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] Don't run this test until Bug 59135 is sorted - change (qa/browsertests)

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

Change subject: Don't run this test until Bug 59135 is sorted
..


Don't run this test until Bug 59135 is sorted

Change-Id: Ic31aa232ff513177898e1f255833e9f9533a
---
M features/search.feature
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/features/search.feature b/features/search.feature
index d1e0a47..8bb638c 100644
--- a/features/search.feature
+++ b/features/search.feature
@@ -9,7 +9,7 @@
 # qa-browsertests top-level directory and at
 # https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
 #
-@en.wikipedia.beta.wmflabs.org @test2.wikipedia.org
+
 Feature: Search
 
   Scenario: Search suggestions

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic31aa232ff513177898e1f255833e9f9533a
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Zfilipin zfili...@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] retab certs.pp - change (operations/puppet)

2013-12-31 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: retab certs.pp
..

retab certs.pp

No code change, simply changed spaces to tabs at beginning of lines.

Change-Id: Ifd5c8cb6cfc46826796908bfb9e794a7fe62d06f
---
M manifests/certs.pp
1 file changed, 198 insertions(+), 198 deletions(-)


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

diff --git a/manifests/certs.pp b/manifests/certs.pp
index bfd37d4..6a0f646 100644
--- a/manifests/certs.pp
+++ b/manifests/certs.pp
@@ -1,270 +1,270 @@
 define create_pkcs12( $certname=$name, $cert_alias=, $password=, 
$user=root, $group=ssl-cert, $location=/etc/ssl/private ) {
 
-   include passwords::certs
+include passwords::certs
 
-   if ( $cert_alias ==  ) {
-   $certalias = $certname
-   } else {
-   $certalias = $cert_alias
-   }
+if ( $cert_alias ==  ) {
+$certalias = $certname
+} else {
+$certalias = $cert_alias
+}
 
-   if ( $password ==  ) {
-   $defaultpassword = $passwords::certs::certs_default_pass
-   } else {
-   $defaultpassword = $password
-   }
+if ( $password ==  ) {
+$defaultpassword = $passwords::certs::certs_default_pass
+} else {
+$defaultpassword = $password
+}
 
-   exec {
-   # pkcs12 file, used by things like opendj, nss, and tomcat
-   ${name}_create_pkcs12:
-   creates = ${location}/${certname}.p12,
-   command = /usr/bin/openssl pkcs12 -export -name 
\${certalias}\ -passout pass:${defaultpassword} -in 
/etc/ssl/certs/${certname}.pem -inkey /etc/ssl/private/${certname}.key -out 
${location}/${certname}.p12,
-   onlyif  = /usr/bin/test -s 
/etc/ssl/private/${certname}.key,
-   require = [Package[openssl], 
File[/etc/ssl/private/${certname}.key, /etc/ssl/certs/${certname}.pem]];
-   }
+exec {
+# pkcs12 file, used by things like opendj, nss, and tomcat
+${name}_create_pkcs12:
+creates = ${location}/${certname}.p12,
+command = /usr/bin/openssl pkcs12 -export -name \${certalias}\ 
-passout pass:${defaultpassword} -in /etc/ssl/certs/${certname}.pem -inkey 
/etc/ssl/private/${certname}.key -out ${location}/${certname}.p12,
+onlyif  = /usr/bin/test -s /etc/ssl/private/${certname}.key,
+require = [Package[openssl], 
File[/etc/ssl/private/${certname}.key, /etc/ssl/certs/${certname}.pem]];
+}
 
-   file {
-   # Fix permissions on the p12 file, and make it available as
-   # a puppet resource
-   ${location}/${certname}.p12:
-   mode = 0440,
-   owner = $user,
-   group = $group,
-   require = Exec[${name}_create_pkcs12],
-   ensure = file;
-   }
+file {
+# Fix permissions on the p12 file, and make it available as
+# a puppet resource
+${location}/${certname}.p12:
+mode = 0440,
+owner = $user,
+group = $group,
+require = Exec[${name}_create_pkcs12],
+ensure = file;
+}
 }
 
 define create_chained_cert( $certname=$name, $ca, $user=root, 
$group=ssl-cert, $location=/etc/ssl/certs ) {
-   exec {
-   # chained cert, used when needing to provide an entire 
certificate chain to a client
-   ${name}_create_chained_cert:
-   creates = ${location}/${certname}.chained.pem,
-   command = /bin/cat ${certname}.pem ${ca}  
${location}/${certname}.chained.pem,
-   cwd = /etc/ssl/certs,
-   require = [Package[openssl], 
File[/etc/ssl/certs/${certname}.pem]];
-   }
+exec {
+# chained cert, used when needing to provide an entire certificate 
chain to a client
+${name}_create_chained_cert:
+creates = ${location}/${certname}.chained.pem,
+command = /bin/cat ${certname}.pem ${ca}  
${location}/${certname}.chained.pem,
+cwd = /etc/ssl/certs,
+require = [Package[openssl], 
File[/etc/ssl/certs/${certname}.pem]];
+}
 
-   file {
-   # Fix permissions on the chained file, and make it available as
-   # a puppet resource
-   ${location}/${certname}.chained.pem:
-   mode = 0444,
-   owner = $user,
-   group = $group,
-   require = Exec[${name}_create_chained_cert],
-   ensure = file;
-   }
+file {
+# Fix permissions on the chained file, and make it available as
+# a puppet resource
+${location}/${certname}.chained.pem:
+

[MediaWiki-commits] [Gerrit] certs.pp puppet lint fixes - change (operations/puppet)

2013-12-31 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: certs.pp puppet lint fixes
..

certs.pp puppet lint fixes

* double quoted string containing no variables
* unquoted file mode
* string containing only a variable
* indentation of = is not properly aligned
* Made statements and titles on the same line, reindenting block
* ensure found on line but it's not the first attribute. Thus add to
  remove trailing semicolon and replace them with commas
* exploded some oneline arrays to have each member on each own line,
  also made sure we have trailing commas for such arrays.

Change-Id: I2e1a13dc497a7d52da729fc5f8b90abf12329dbb
---
M manifests/certs.pp
1 file changed, 158 insertions(+), 155 deletions(-)


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

diff --git a/manifests/certs.pp b/manifests/certs.pp
index 6a0f646..5eb25fe 100644
--- a/manifests/certs.pp
+++ b/manifests/certs.pp
@@ -1,188 +1,199 @@
-define create_pkcs12( $certname=$name, $cert_alias=, $password=, 
$user=root, $group=ssl-cert, $location=/etc/ssl/private ) {
+define create_pkcs12( $certname=$name, $cert_alias='', $password='', 
$user='root', $group='ssl-cert', $location='/etc/ssl/private' ) {
 
 include passwords::certs
 
-if ( $cert_alias ==  ) {
+if ( $cert_alias == '' ) {
 $certalias = $certname
 } else {
 $certalias = $cert_alias
 }
 
-if ( $password ==  ) {
+if ( $password == '' ) {
 $defaultpassword = $passwords::certs::certs_default_pass
 } else {
 $defaultpassword = $password
 }
 
-exec {
-# pkcs12 file, used by things like opendj, nss, and tomcat
-${name}_create_pkcs12:
-creates = ${location}/${certname}.p12,
-command = /usr/bin/openssl pkcs12 -export -name \${certalias}\ 
-passout pass:${defaultpassword} -in /etc/ssl/certs/${certname}.pem -inkey 
/etc/ssl/private/${certname}.key -out ${location}/${certname}.p12,
-onlyif  = /usr/bin/test -s /etc/ssl/private/${certname}.key,
-require = [Package[openssl], 
File[/etc/ssl/private/${certname}.key, /etc/ssl/certs/${certname}.pem]];
+# pkcs12 file, used by things like opendj, nss, and tomcat
+exec { ${name}_create_pkcs12:
+creates = ${location}/${certname}.p12,
+command = /usr/bin/openssl pkcs12 -export -name \${certalias}\ 
-passout pass:${defaultpassword} -in /etc/ssl/certs/${certname}.pem -inkey 
/etc/ssl/private/${certname}.key -out ${location}/${certname}.p12,
+onlyif  = /usr/bin/test -s /etc/ssl/private/${certname}.key,
+require = [
+Package['openssl'],
+File[/etc/ssl/private/${certname}.key],
+File[/etc/ssl/certs/${certname}.pem],
+],
 }
 
-file {
-# Fix permissions on the p12 file, and make it available as
-# a puppet resource
-${location}/${certname}.p12:
-mode = 0440,
-owner = $user,
-group = $group,
-require = Exec[${name}_create_pkcs12],
-ensure = file;
+# Fix permissions on the p12 file, and make it available as
+# a puppet resource
+file { ${location}/${certname}.p12:
+ensure  = file,
+mode= '0440',
+owner   = $user,
+group   = $group,
+require = Exec[${name}_create_pkcs12],
 }
 }
 
-define create_chained_cert( $certname=$name, $ca, $user=root, 
$group=ssl-cert, $location=/etc/ssl/certs ) {
-exec {
-# chained cert, used when needing to provide an entire certificate 
chain to a client
-${name}_create_chained_cert:
-creates = ${location}/${certname}.chained.pem,
-command = /bin/cat ${certname}.pem ${ca}  
${location}/${certname}.chained.pem,
-cwd = /etc/ssl/certs,
-require = [Package[openssl], 
File[/etc/ssl/certs/${certname}.pem]];
+define create_chained_cert( $certname=$name, $ca, $user='root', 
$group='ssl-cert', $location='/etc/ssl/certs' ) {
+# chained cert, used when needing to provide an entire certificate chain to
+# a client.
+exec { ${name}_create_chained_cert:
+creates = ${location}/${certname}.chained.pem,
+command = /bin/cat ${certname}.pem ${ca}  
${location}/${certname}.chained.pem,
+cwd = '/etc/ssl/certs',
+require = [
+Package['openssl'],
+File[/etc/ssl/certs/${certname}.pem],
+],
 }
 
-file {
-# Fix permissions on the chained file, and make it available as
-# a puppet resource
-${location}/${certname}.chained.pem:
-mode = 0444,
-owner = $user,
-group = $group,
-require = Exec[${name}_create_chained_cert],
-ensure = file;
+# Fix permissions on the chained file, and make it available as a puppet
+

[MediaWiki-commits] [Gerrit] added $edgSuppressNoLocalVarMsg flag; added MongoDB memcache... - change (mediawiki...ExternalData)

2013-12-31 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: added $edgSuppressNoLocalVarMsg flag; added MongoDB memcached 
support; removed deprecated MongoDB slaveOkay flag; refactored collection 
exists logic; added isset check to suppress PHP Notice in apache error log
..


added $edgSuppressNoLocalVarMsg flag; added MongoDB memcached support; removed 
deprecated MongoDB slaveOkay flag; refactored
collection exists logic; added isset check to suppress PHP Notice in apache 
error log

Change-Id: I14f019c5cec113ba2950d393e50b6df0957435ac
---
M ED_ParserFunctions.php
M ED_Utils.php
2 files changed, 25 insertions(+), 18 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved



diff --git a/ED_ParserFunctions.php b/ED_ParserFunctions.php
index c8e09f8..550cbcc 100644
--- a/ED_ParserFunctions.php
+++ b/ED_ParserFunctions.php
@@ -265,9 +265,9 @@
 * Render the #external_value parser function
 */
static function doExternalValue( $parser, $local_var = '' ) {
-   global $edgValues;
+   global $edgValues, $edgSuppressNoLocalVarMsg;
if ( ! array_key_exists( $local_var, $edgValues ) ) {
-   return Error: no local variable \$local_var\ was 
set.;
+   return $edgSuppressNoLocalVarMsg ? '' : Error: no 
local variable \$local_var\ was set.;
} elseif ( is_array( $edgValues[$local_var] ) ) {
return $edgValues[$local_var][0];
} else {
diff --git a/ED_Utils.php b/ED_Utils.php
index 7fc0944..5cc28ec 100644
--- a/ED_Utils.php
+++ b/ED_Utils.php
@@ -286,6 +286,19 @@
 * MongoDB.
 */
static function getMongoDBData( $db_server, $db_username, $db_password, 
$db_name, $from, $columns, $where, $sqlOptions, $otherParams ) {
+   global $wgMainCacheType, $wgMemc, $edgMemCachedMongoDBSeconds;
+
+// use MEMCACHED if configured to cache mongodb queries
+if ($wgMainCacheType === CACHE_MEMCACHED   
$edgMemCachedMongoDBSeconds  0) {
+   // check if cache entry exists
+   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
+   $values = $wgMemc-get( $mckey );
+
+   if ($values !== false) {
+   return $values;
+   }
+}
+
// MongoDB login is done using a single string.
// When specifying extra connect string options (e.g. 
replicasets,timeout, etc.),
// use $db_server to pass these values
@@ -308,23 +321,13 @@
} catch ( Exception $e ) {
return wfMessage( externaldata-db-could-not-connect 
)-text();
}
-   // If working against a MongoDB replica set, it's OK to go to
-   // secondary/slaves should the primary go down.
-   MongoCursor::$slaveOkay = true;
 
$db = $m-selectDB( $db_name );
 
-   // MongoDB doesn't seem to have a way to check whether either
-   // a database or a collection exists, so instead we'll use
-   // getCollectionNames() to check for both.
-   $collectionNames = $db-getCollectionNames();
-   if ( count( $collectionNames ) == 0 ) {
-   return wfMessage( externaldata-db-could-not-connect 
)-text();
-   }
-
-   if ( !in_array( $from, $collectionNames ) ) {
-   return wfMessage( externaldata-db-unknown-collection 
)-text();
-   }
+   // Check if collection exists
+   if ($db-system-namespaces-findOne(array('name'=$db_name . 
. . $from)) === null){
+return wfMessage( externaldata-db-unknown-collection:)-text() . 
 $db_name . . . $from;
+}
 
$collection = new MongoCollection( $db, $from );
 
@@ -416,7 +419,7 @@
// specified using dots (e.g., a.b.c),
// get the value that way.
$values[$column][] = 
self::getValueFromJSONArray( $doc, $column );
-   } elseif ( is_array( $doc[$column] ) ) {
+   } elseif ( isset( $doc[$column] )  is_array( 
$doc[$column] ) ) {
// If MongoDB returns an array for a 
column,
// but the exact location of the value 
wasn't specified,
// do some extra processing.
@@ -438,11 +441,15 @@
}
} else {
// It's a simple literal.
-   

[MediaWiki-commits] [Gerrit] A few fixes and reverts for the last change - change (mediawiki...ExternalData)

2013-12-31 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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


Change subject: A few fixes and reverts for the last change
..

A few fixes and reverts for the last change

Change-Id: I563037f23b58f898d8c4bbcdd6a26fd713934aa0
---
M ED_ParserFunctions.php
M ED_Utils.php
2 files changed, 15 insertions(+), 15 deletions(-)


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

diff --git a/ED_ParserFunctions.php b/ED_ParserFunctions.php
index 550cbcc..c8e09f8 100644
--- a/ED_ParserFunctions.php
+++ b/ED_ParserFunctions.php
@@ -265,9 +265,9 @@
 * Render the #external_value parser function
 */
static function doExternalValue( $parser, $local_var = '' ) {
-   global $edgValues, $edgSuppressNoLocalVarMsg;
+   global $edgValues;
if ( ! array_key_exists( $local_var, $edgValues ) ) {
-   return $edgSuppressNoLocalVarMsg ? '' : Error: no 
local variable \$local_var\ was set.;
+   return Error: no local variable \$local_var\ was 
set.;
} elseif ( is_array( $edgValues[$local_var] ) ) {
return $edgValues[$local_var][0];
} else {
diff --git a/ED_Utils.php b/ED_Utils.php
index 5cc28ec..5bf569e 100644
--- a/ED_Utils.php
+++ b/ED_Utils.php
@@ -288,16 +288,16 @@
static function getMongoDBData( $db_server, $db_username, $db_password, 
$db_name, $from, $columns, $where, $sqlOptions, $otherParams ) {
global $wgMainCacheType, $wgMemc, $edgMemCachedMongoDBSeconds;
 
-// use MEMCACHED if configured to cache mongodb queries
-if ($wgMainCacheType === CACHE_MEMCACHED   
$edgMemCachedMongoDBSeconds  0) {
-   // check if cache entry exists
-   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
-   $values = $wgMemc-get( $mckey );
+   // Use MEMCACHED if configured to cache mongodb queries.
+   if ($wgMainCacheType === CACHE_MEMCACHED  
$edgMemCachedMongoDBSeconds  0) {
+   // Check if cache entry exists.
+   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
+   $values = $wgMemc-get( $mckey );
 
-   if ($values !== false) {
-   return $values;
-   }
-}
+   if ($values !== false) {
+   return $values;
+   }
+   }
 
// MongoDB login is done using a single string.
// When specifying extra connect string options (e.g. 
replicasets,timeout, etc.),
@@ -325,9 +325,9 @@
$db = $m-selectDB( $db_name );
 
// Check if collection exists
-   if ($db-system-namespaces-findOne(array('name'=$db_name . 
. . $from)) === null){
-return wfMessage( externaldata-db-unknown-collection:)-text() . 
 $db_name . . . $from;
-}
+   if ( $db-system-namespaces-findOne( array( 'name'=$db_name 
. . . $from ) ) === null ){
+   return wfMessage( 
externaldata-db-unknown-collection:)-text() . $db_name . . . $from;
+   }
 
$collection = new MongoCollection( $db, $from );
 
@@ -447,7 +447,7 @@
}
 
if ($wgMainCacheType === CACHE_MEMCACHED  
$edgMemCachedMongoDBSeconds  0 ) {
-   $wgMemc-set( $mckey, $values, 
$edgMemCachedMongoDBSeconds ); 
+   $wgMemc-set( $mckey, $values, 
$edgMemCachedMongoDBSeconds );
}
 
return $values;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I563037f23b58f898d8c4bbcdd6a26fd713934aa0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExternalData
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren yaro...@gmail.com

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


[MediaWiki-commits] [Gerrit] A few fixes and reverts for the last change - change (mediawiki...ExternalData)

2013-12-31 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: A few fixes and reverts for the last change
..


A few fixes and reverts for the last change

Change-Id: I563037f23b58f898d8c4bbcdd6a26fd713934aa0
---
M ED_ParserFunctions.php
M ED_Utils.php
2 files changed, 15 insertions(+), 15 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved



diff --git a/ED_ParserFunctions.php b/ED_ParserFunctions.php
index 550cbcc..c8e09f8 100644
--- a/ED_ParserFunctions.php
+++ b/ED_ParserFunctions.php
@@ -265,9 +265,9 @@
 * Render the #external_value parser function
 */
static function doExternalValue( $parser, $local_var = '' ) {
-   global $edgValues, $edgSuppressNoLocalVarMsg;
+   global $edgValues;
if ( ! array_key_exists( $local_var, $edgValues ) ) {
-   return $edgSuppressNoLocalVarMsg ? '' : Error: no 
local variable \$local_var\ was set.;
+   return Error: no local variable \$local_var\ was 
set.;
} elseif ( is_array( $edgValues[$local_var] ) ) {
return $edgValues[$local_var][0];
} else {
diff --git a/ED_Utils.php b/ED_Utils.php
index 5cc28ec..5bf569e 100644
--- a/ED_Utils.php
+++ b/ED_Utils.php
@@ -288,16 +288,16 @@
static function getMongoDBData( $db_server, $db_username, $db_password, 
$db_name, $from, $columns, $where, $sqlOptions, $otherParams ) {
global $wgMainCacheType, $wgMemc, $edgMemCachedMongoDBSeconds;
 
-// use MEMCACHED if configured to cache mongodb queries
-if ($wgMainCacheType === CACHE_MEMCACHED   
$edgMemCachedMongoDBSeconds  0) {
-   // check if cache entry exists
-   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
-   $values = $wgMemc-get( $mckey );
+   // Use MEMCACHED if configured to cache mongodb queries.
+   if ($wgMainCacheType === CACHE_MEMCACHED  
$edgMemCachedMongoDBSeconds  0) {
+   // Check if cache entry exists.
+   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
+   $values = $wgMemc-get( $mckey );
 
-   if ($values !== false) {
-   return $values;
-   }
-}
+   if ($values !== false) {
+   return $values;
+   }
+   }
 
// MongoDB login is done using a single string.
// When specifying extra connect string options (e.g. 
replicasets,timeout, etc.),
@@ -325,9 +325,9 @@
$db = $m-selectDB( $db_name );
 
// Check if collection exists
-   if ($db-system-namespaces-findOne(array('name'=$db_name . 
. . $from)) === null){
-return wfMessage( externaldata-db-unknown-collection:)-text() . 
 $db_name . . . $from;
-}
+   if ( $db-system-namespaces-findOne( array( 'name'=$db_name 
. . . $from ) ) === null ){
+   return wfMessage( 
externaldata-db-unknown-collection:)-text() . $db_name . . . $from;
+   }
 
$collection = new MongoCollection( $db, $from );
 
@@ -447,7 +447,7 @@
}
 
if ($wgMainCacheType === CACHE_MEMCACHED  
$edgMemCachedMongoDBSeconds  0 ) {
-   $wgMemc-set( $mckey, $values, 
$edgMemCachedMongoDBSeconds ); 
+   $wgMemc-set( $mckey, $values, 
$edgMemCachedMongoDBSeconds );
}
 
return $values;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I563037f23b58f898d8c4bbcdd6a26fd713934aa0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExternalData
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren yaro...@gmail.com
Gerrit-Reviewer: Yaron Koren yaro...@gmail.com

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


[MediaWiki-commits] [Gerrit] Leak less memory in forceSearchIndex.php - change (mediawiki...CirrusSearch)

2013-12-31 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Leak less memory in forceSearchIndex.php
..

Leak less memory in forceSearchIndex.php

On my test wiki with 6461 pages (yeah, not many) this uses ~25% less memory.
I'm sure this isn't all the leaks, but it was a pretty simple one to fix.

Also, fix some missing use statements on maintenance scripts.

Bug:  59164
Change-Id: I1eae0f32dc0e4288818548218facac8a18d60732
---
M includes/ReindexForkController.php
M maintenance/forceSearchIndex.php
M maintenance/updateOneSearchIndexConfig.php
3 files changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/includes/ReindexForkController.php 
b/includes/ReindexForkController.php
index 2279f5b..9f2ecaa 100644
--- a/includes/ReindexForkController.php
+++ b/includes/ReindexForkController.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace CirrusSearch;
+use \ForkController;
 
 /**
  * Extensions to ForeController to prepare Elastica and to tell the child
diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php
index 80332b4..b3de409 100644
--- a/maintenance/forceSearchIndex.php
+++ b/maintenance/forceSearchIndex.php
@@ -1,8 +1,10 @@
 ?php
 
 namespace CirrusSearch;
-use \Maintenance;
 use \CirrusSearch;
+use \JobQueueGroup;
+use \LinkCache;
+use \Maintenance;
 use \WikiPage;
 
 /**
@@ -333,6 +335,8 @@
}
$result[] = $update;
}
+   // Clear the LinkCache to prevent its memory use from growing 
without bounds.
+   LinkCache::singleton()-clear();
wfProfileOut( __METHOD__ . '::decodeResults' );
wfProfileOut( __METHOD__ );
return $result;
diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index 3092360..a94cc35 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace CirrusSearch;
+use Elastica;
 use \Maintenance;
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1eae0f32dc0e4288818548218facac8a18d60732
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix another missing use statement - change (mediawiki...CirrusSearch)

2013-12-31 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Fix another missing use statement
..

Fix another missing use statement

Change-Id: Id88c17efa22bad06b8a8d51ad8f6ce1b21f91081
---
M includes/Updater.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/includes/Updater.php b/includes/Updater.php
index 6f5b350..1e62872 100644
--- a/includes/Updater.php
+++ b/includes/Updater.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace CirrusSearch;
+use \Category;
 use \MWTimestamp;
 use \ParserCache;
 use \SearchUpdate;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id88c17efa22bad06b8a8d51ad8f6ce1b21f91081
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add ParsoidConfig option fetchWT to fetch original wikitext ... - change (mediawiki...parsoid)

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

Change subject: Add ParsoidConfig option fetchWT to fetch original wikitext 
before html2wt
..


Add ParsoidConfig option fetchWT to fetch original wikitext before html2wt

This is to reduce the number of unnecessary semantic differences shown
in round-trip testing.

Change-Id: Iba29fbc4ae98ffe4c88e77d11e01176b0fbb0e56
---
M api/ParserService.js
M lib/mediawiki.ParsoidConfig.js
M tests/test.localsettings.js
3 files changed, 48 insertions(+), 21 deletions(-)

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



diff --git a/api/ParserService.js b/api/ParserService.js
index 682de3b..e6b2826 100644
--- a/api/ParserService.js
+++ b/api/ParserService.js
@@ -596,28 +596,45 @@
var env = res.locals.env;
env.page.id = req.body.oldid || null;
 
-   var doc;
-   try {
-   doc = DU.parseHTML( html.replace( /\r/g, '' ) );
-   } catch ( e ) {
-   console.log( 'There was an error in the HTML5 parser! Sending 
it back to the editor.' );
-   env.errCB( e );
-   return;
-   }
+   var html2wtCb = function () {
+   var doc;
+   try {
+   doc = DU.parseHTML( html.replace( /\r/g, '' ) );
+   } catch ( e ) {
+   console.log( 'There was an error in the HTML5 parser! 
Sending it back to the editor.' );
+   env.errCB( e );
+   return;
+   }
 
-   try {
-   var out = [];
-   new Serializer( { env: env, oldid: env.page.id } ).serializeDOM(
-   doc.body,
-   function ( chunk ) {
-   out.push( chunk );
-   }, function () {
-   res.setHeader( 'Content-Type', 
'text/x-mediawiki; charset=UTF-8' );
-   res.setHeader( 'X-Parsoid-Performance', 
env.getPerformanceHeader() );
-   res.end( out.join( '' ) );
-   } );
-   } catch ( e ) {
-   env.errCB( e );
+   try {
+   var out = [];
+   new Serializer( { env: env, oldid: env.page.id } 
).serializeDOM(
+   doc.body,
+   function ( chunk ) {
+   out.push( chunk );
+   }, function () {
+   res.setHeader( 'Content-Type', 
'text/x-mediawiki; charset=UTF-8' );
+   res.setHeader( 'X-Parsoid-Performance', 
env.getPerformanceHeader() );
+   res.end( out.join( '' ) );
+   } );
+   } catch ( e ) {
+   env.errCB( e );
+   }
+   };
+
+   if ( env.conf.parsoid.fetchWT ) {
+   var target = env.resolveTitle( env.normalizeTitle( 
env.page.name ), '' );
+   var tpr = new TemplateRequest( env, target, env.page.id );
+   tpr.once( 'src', function ( err, src_and_metadata ) {
+   if ( err ) {
+   console.log( 'There was an error fetching the 
original wikitext for', target );
+   } else {
+   env.setPageSrcInfo( src_and_metadata );
+   }
+   html2wtCb();
+   } );
+   } else {
+   html2wtCb();
}
 }
 
diff --git a/lib/mediawiki.ParsoidConfig.js b/lib/mediawiki.ParsoidConfig.js
index cd89874..80c583e 100644
--- a/lib/mediawiki.ParsoidConfig.js
+++ b/lib/mediawiki.ParsoidConfig.js
@@ -171,6 +171,13 @@
  */
 ParsoidConfig.prototype.storeDataParsoid = false;
 
+/**
+ * @property {boolean} fetchWT
+ * When transforming from html to wt, fetch the original wikitext before.
+ * Intended for use in round-trip testing.
+ */
+ ParsoidConfig.prototype.fetchWT = false;
+
 if (typeof module === object) {
module.exports.ParsoidConfig = ParsoidConfig;
 }
diff --git a/tests/test.localsettings.js b/tests/test.localsettings.js
index 9a1c71f..b5e173a 100644
--- a/tests/test.localsettings.js
+++ b/tests/test.localsettings.js
@@ -21,4 +21,7 @@
 
// Set editMode to false for round-trip testing
parsoidConfig.editMode = false;
+
+   // Fetch the wikitext for a page before doing html2wt
+   parsoidConfig.fetchWT = true;
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba29fbc4ae98ffe4c88e77d11e01176b0fbb0e56
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil marc...@wikimedia.org

[MediaWiki-commits] [Gerrit] Add job for labs/toollabs - change (integration/zuul-config)

2013-12-31 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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


Change subject: Add job for labs/toollabs
..

Add job for labs/toollabs

Change-Id: I9da6ea332b0854a5cc0f9c516129d060637dad86
---
M layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/layout.yaml b/layout.yaml
index 2d44461..441fe05 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -820,6 +820,10 @@
   - name: 'python-lint'
 prefix: 'labs-nagios-builder'
 
+  - name: labs/toollabs
+test:
+ - labs-toollabs-debian-glue
+
   - name: labs/tools/grrrit
 check-voter:
  - labs-tools-grrrit-jslint

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9da6ea332b0854a5cc0f9c516129d060637dad86
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

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


[MediaWiki-commits] [Gerrit] Add job for labs/toollabs - change (integration/jenkins-job-builder-config)

2013-12-31 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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


Change subject: Add job for labs/toollabs
..

Add job for labs/toollabs

Change-Id: I784a96b6da6620e39e97831c275781cfb19a892c
---
M labs.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/labs.yaml b/labs.yaml
index 1549fb2..553a00c 100644
--- a/labs.yaml
+++ b/labs.yaml
@@ -11,6 +11,11 @@
  - python-jobs
 
 - project:
+name: 'labs-toollabs'
+jobs:
+ - '{name}-debian-glue'
+
+- project:
 name: 'labs-tools-grrrit'
 jobs:
  - '{name}-jslint'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I784a96b6da6620e39e97831c275781cfb19a892c
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

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


[MediaWiki-commits] [Gerrit] Fix another missing use statement - change (mediawiki...CirrusSearch)

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

Change subject: Fix another missing use statement
..


Fix another missing use statement

Change-Id: Id88c17efa22bad06b8a8d51ad8f6ce1b21f91081
---
M includes/Updater.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/Updater.php b/includes/Updater.php
index 6f5b350..1e62872 100644
--- a/includes/Updater.php
+++ b/includes/Updater.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace CirrusSearch;
+use \Category;
 use \MWTimestamp;
 use \ParserCache;
 use \SearchUpdate;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id88c17efa22bad06b8a8d51ad8f6ce1b21f91081
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad 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] Leak less memory in forceSearchIndex.php - change (mediawiki...CirrusSearch)

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

Change subject: Leak less memory in forceSearchIndex.php
..


Leak less memory in forceSearchIndex.php

On my test wiki with 6461 pages (yeah, not many) this uses ~25% less memory.
I'm sure this isn't all the leaks, but it was a pretty simple one to fix.

Also, fix some missing use statements on maintenance scripts.

Bug:  59164
Change-Id: I1eae0f32dc0e4288818548218facac8a18d60732
---
M includes/ReindexForkController.php
M maintenance/forceSearchIndex.php
M maintenance/updateOneSearchIndexConfig.php
3 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/includes/ReindexForkController.php 
b/includes/ReindexForkController.php
index 2279f5b..9f2ecaa 100644
--- a/includes/ReindexForkController.php
+++ b/includes/ReindexForkController.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace CirrusSearch;
+use \ForkController;
 
 /**
  * Extensions to ForeController to prepare Elastica and to tell the child
diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php
index 80332b4..b3de409 100644
--- a/maintenance/forceSearchIndex.php
+++ b/maintenance/forceSearchIndex.php
@@ -1,8 +1,10 @@
 ?php
 
 namespace CirrusSearch;
-use \Maintenance;
 use \CirrusSearch;
+use \JobQueueGroup;
+use \LinkCache;
+use \Maintenance;
 use \WikiPage;
 
 /**
@@ -333,6 +335,8 @@
}
$result[] = $update;
}
+   // Clear the LinkCache to prevent its memory use from growing 
without bounds.
+   LinkCache::singleton()-clear();
wfProfileOut( __METHOD__ . '::decodeResults' );
wfProfileOut( __METHOD__ );
return $result;
diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index 3092360..a94cc35 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace CirrusSearch;
+use Elastica;
 use \Maintenance;
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1eae0f32dc0e4288818548218facac8a18d60732
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad 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] Prevent preview and editor being shown at the same time - change (mediawiki...MobileFrontend)

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

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


Change subject: Prevent preview and editor being shown at the same time
..

Prevent preview and editor being shown at the same time

Bug: 58945
Change-Id: I7b2510f252c990779205db63b49caaa2cb92be1d
---
M javascripts/modules/editor/EditorApi.js
M javascripts/modules/editor/EditorOverlay.js
M javascripts/modules/editorNew/EditorOverlay.js
M tests/javascripts/modules/editor/test_EditorApi.js
4 files changed, 60 insertions(+), 64 deletions(-)


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

diff --git a/javascripts/modules/editor/EditorApi.js 
b/javascripts/modules/editor/EditorApi.js
index a400626..5a18714 100644
--- a/javascripts/modules/editor/EditorApi.js
+++ b/javascripts/modules/editor/EditorApi.js
@@ -151,6 +151,37 @@
this.getToken().done( saveContent ).fail( $.proxy( 
result, 'reject' ) );
 
return result;
+   },
+
+   getPreview: function( options ) {
+   var result = $.Deferred();
+
+   $.extend( options, {
+   action: 'parse',
+   // Enable section preview mode to avoid errors 
(bug 49218)
+   sectionpreview: true,
+   // needed for pre-save transform to work (bug 
53692)
+   pst: true,
+   // Output mobile HTML (bug 54243)
+   mobileformat: true,
+   title: this.title,
+   prop: 'text'
+   } );
+
+   this.post( options ).done( function( resp ) {
+   if ( resp  resp.parse  resp.parse.text ) {
+   // FIXME: hacky
+   var $tmp = $( 'div' ).html( 
resp.parse.text['*'] );
+   // remove heading from the parsed output
+   $tmp.find( 'h1, h2' ).eq( 0 ).remove();
+
+   result.resolve( $tmp.html() );
+   } else {
+   result.reject();
+   }
+   } ).fail( $.proxy( result, 'reject' ) );
+
+   return result;
}
} );
 
diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index efaf5bf..e4615c6 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -5,7 +5,6 @@
Page = M.require( 'Page' ),
schema = M.require( 'loggingSchemas/mobileWebEditing' ),
popup = M.require( 'toast' ),
-   api = M.require( 'api' ),
inBetaOrAlpha = M.isBetaGroupMember(),
inCampaign = M.query.campaign ? true : false,
inKeepGoingCampaign = M.query.campaign === 'mobile-keepgoing',
@@ -107,18 +106,7 @@
},
 
_showPreview: function() {
-   var self = this, params = {
-   action: 'parse',
-   // Enable section preview mode to avoid errors 
(bug 49218)
-   sectionpreview: true,
-   // needed for pre-save transform to work (bug 
53692)
-   pst: true,
-   // Output mobile HTML (bug 54243)
-   mobileformat: true,
-   title: self.options.title,
-   text: self.$content.val(),
-   prop: 'text'
-   };
+   var self = this, params = { text: this.$content.val() };
 
// log save button click
this.log( 'save' );
@@ -138,34 +126,16 @@
if ( mw.config.get( 'wgIsMainPage' ) ) {
params.mainpage = 1; // Setting it to 0 will 
have the same effect
}
-   api.post( params ).then( function( resp ) {
-   var html;
-   if ( resp  resp.parse  resp.parse.text ) {
-   html = resp.parse.text['*'];
-   return $.Deferred().resolve( html );
-   } else {
-   return $.Deferred().reject();
-   }
-   } ).done( function( parsedText ) {
-   

[MediaWiki-commits] [Gerrit] Try to make sure env and old documents are freed early - change (mediawiki...parsoid)

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

Change subject: Try to make sure env and old documents are freed early
..


Try to make sure env and old documents are freed early

Based on heap dumps and memcheck diffs, I tried to make sure that the
environment and all data it hangs onto (such as page.dom) are freed as early
as possible, even if the HTTP connection is still in a lingering state. Also:

* changed some document callbacks from on('document',..) to .once to break the
  link as early as possible for faster GC

* removed old ci entry points in web service

* removed old caching code in tokenizer

Change-Id: Ic929b054441c786fa4d3fc0f0f9c74e2182471e6
---
M api/ParserService.js
M lib/mediawiki.Util.js
M lib/mediawiki.tokenizer.peg.js
3 files changed, 23 insertions(+), 101 deletions(-)

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



diff --git a/api/ParserService.js b/api/ParserService.js
index e6b2826..2103962 100644
--- a/api/ParserService.js
+++ b/api/ParserService.js
@@ -20,6 +20,7 @@
 // global includes
 var express = require('express'),
domino = require('domino'),
+   // memwatch = require('memwatch'),
jsDiff = require('diff'),
childProc = require('child_process'),
spawn = childProc.spawn,
@@ -594,6 +595,7 @@
 
 function html2wt( req, res, html ) {
var env = res.locals.env;
+   res.locals.env = {};
env.page.id = req.body.oldid || null;
 
var html2wtCb = function () {
@@ -601,8 +603,9 @@
try {
doc = DU.parseHTML( html.replace( /\r/g, '' ) );
} catch ( e ) {
-   console.log( 'There was an error in the HTML5 parser! 
Sending it back to the editor.' );
+   console.log( 'There was an error in the HTML5 parser!' 
);
env.errCB( e );
+   res.end();
return;
}
 
@@ -616,9 +619,11 @@
res.setHeader( 'Content-Type', 
'text/x-mediawiki; charset=UTF-8' );
res.setHeader( 'X-Parsoid-Performance', 
env.getPerformanceHeader() );
res.end( out.join( '' ) );
+   res.locals = {};
} );
} catch ( e ) {
env.errCB( e );
+   res.end();
}
};
 
@@ -640,11 +645,12 @@
 
 function wt2html( req, res, wt ) {
var env = res.locals.env;
+   res.locals.env = {};
var prefix = res.locals.iwp;
var target = env.resolveTitle( env.normalizeTitle( env.page.name ), '' 
);
 
-   // Set the timeout to 900 seconds..
-   req.connection.setTimeout( 900 * 1000 );
+   // Set the timeout to 600 seconds..
+   req.connection.setTimeout( 600 * 1000 );
 
console.log( 'starting parsing of ' + prefix + ':' + target );
 
@@ -666,7 +672,7 @@
}
 
var parser = Util.getParserPipeline( env, 
'text/x-mediawiki/full' );
-   parser.on( 'document', function ( document ) {
+   parser.once( 'document', function ( document ) {
// Don't cache requests when wt is set in case somebody 
uses
// GET for wikitext parsing
res.setHeader( 'Cache-Control', 
'private,no-cache,s-maxage=0' );
@@ -686,6 +692,7 @@
parser.processToplevelDoc( wt );
} catch ( e ) {
env.errCB( e, true );
+   res.end();
return;
}
};
@@ -713,6 +720,7 @@
tmpCb = function ( err, src_and_metadata ) {
if ( err ) {
env.errCB( err, true );
+   res.end();
return;
}
 
@@ -764,45 +772,6 @@
}
 });
 
-
-/**
- * Continuous integration end points
- *
- * No longer used currently, as our testing now happens on the central Jenkins
- * server.
- */
-app.get( /\/_ci\/refs\/changes\/(\d+)\/(\d+)\/(\d+)/, function ( req, res ) {
-   var gerritChange = 'refs/changes/' + req.params[0] + '/' + 
req.params[1] + '/' + req.params[2];
-   var testSh = spawn( './testGerritChange.sh', [ gerritChange ], {
-   cwd: '.'
-   } );
-
-   res.setHeader('Content-Type', 'text/xml; charset=UTF-8');
-
-   testSh.stdout.on( 'data', function ( data ) {
-   res.write( data );
-   } );
-
-   testSh.on( 'exit', function () {
-   res.end( '' );
-   } );
-} );
-
-app.get( /\/_ci\/master/, 

[MediaWiki-commits] [Gerrit] Add Title::hasFragment and use it - change (mediawiki/core)

2013-12-31 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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


Change subject: Add Title::hasFragment and use it
..

Add Title::hasFragment and use it

Makes checks against the fragment easier to read and all the same.
At the moment some using strval, some use type safe comparsion.
The new function used the same check as used in Title.php before.

Change-Id: I27d9c3e40e6de6800f4488de167cf06e83c88ce6
---
M includes/Article.php
M includes/FakeTitle.php
M includes/Linker.php
M includes/Title.php
M includes/api/ApiPageSet.php
M includes/parser/CoreParserFunctions.php
M includes/parser/LinkHolderArray.php
M includes/parser/Parser.php
M includes/specials/SpecialMovepage.php
9 files changed, 23 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/104750/1

diff --git a/includes/Article.php b/includes/Article.php
index c82b39f..d0d9919 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -988,7 +988,7 @@
$outputPage-addSubtitle( wfMessage( 
'redirectedfrom' )-rawParams( $redir ) );
 
// Set the fragment if one was specified in the 
redirect
-   if ( strval( $this-getTitle()-getFragment() ) 
!= '' ) {
+   if ( $this-getTitle()-hasFragment() ) {
$outputPage-addInlineScript( 
Xml::encodeJsCall(
'redirectToFragment', array( 
$this-getTitle()-getFragmentForURL() )
) );
diff --git a/includes/FakeTitle.php b/includes/FakeTitle.php
index efa213f..4aa15bf 100644
--- a/includes/FakeTitle.php
+++ b/includes/FakeTitle.php
@@ -39,6 +39,7 @@
function canTalk() { $this-error(); }
function getInterwiki() { $this-error(); }
function getFragment() { $this-error(); }
+   function hasFragment() { $this-error(); }
function getFragmentForURL() { $this-error(); }
function getDefaultNamespace() { $this-error(); }
function getIndexTitle() { $this-error(); }
diff --git a/includes/Linker.php b/includes/Linker.php
index 27f8ab4..db0063b 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -387,7 +387,7 @@
 
// If the target is just a fragment, with no title, we return 
the fragment
// text.  Otherwise, we return the title text itself.
-   if ( $target-getPrefixedText() === ''  
$target-getFragment() !== '' ) {
+   if ( $target-getPrefixedText() === ''  
$target-hasFragment() ) {
return htmlspecialchars( $target-getFragment() );
}
return htmlspecialchars( $target-getPrefixedText() );
diff --git a/includes/Title.php b/includes/Title.php
index 5ab9e94..62d74d3 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -1201,14 +1201,24 @@
}
 
/**
+* Check if a Title fragment is set
+*
+* @return bool
+* @since 1.23
+*/
+   public function hasFragment() {
+   return $this-mFragment != '';
+   }
+
+   /**
 * Get the fragment in URL form, including the # character if there 
is one
 * @return String Fragment in URL form
 */
public function getFragmentForURL() {
-   if ( $this-mFragment == '' ) {
+   if ( !$this-hasFragment() ) {
return '';
} else {
-   return '#' . Title::escapeFragmentForURL( 
$this-mFragment );
+   return '#' . Title::escapeFragmentForURL( 
$this-getFragment() );
}
}
 
@@ -1291,8 +1301,8 @@
 */
public function getFullText() {
$text = $this-getPrefixedText();
-   if ( $this-mFragment != '' ) {
-   $text .= '#' . $this-mFragment;
+   if ( $this-hasFragment() ) {
+   $text .= '#' . $this-getFragment();
}
return $text;
}
diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index e95e680..a25c445 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -387,7 +387,7 @@
'from' = strval( $titleStrFrom ),
'to' = $titleTo-getPrefixedText(),
);
-   if ( $titleTo-getFragment() !== '' ) {
+   if ( $titleTo-hasFragment() ) {
$r['tofragment'] = $titleTo-getFragment();
}
$values[] = $r;
diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index ca27112..f6bd9d8 100644
--- a/includes/parser/CoreParserFunctions.php

[MediaWiki-commits] [Gerrit] Add variable to disable WAP - change (mediawiki...MobileFrontend)

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

Change subject: Add variable to disable WAP
..


Add variable to disable WAP

Change-Id: I429484b9687ff09ce43eae3d89b6d7c91338ea99
---
M MobileFrontend.php
M includes/MobileFrontend.hooks.php
M includes/formatters/MobileFormatter.php
M includes/skins/SkinMinerva.php
4 files changed, 23 insertions(+), 4 deletions(-)

Approvals:
  Dr0ptp4kt: Looks good to me, but someone else must approve
  Jdlrobson: Looks good to me, approved
  Yurik: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/MobileFrontend.php b/MobileFrontend.php
index 7d9850b..701b21c 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -449,3 +449,16 @@
  * Controls whether API action=mobileview should have every HTML section 
tidied for invalid markup
  */
 $wgMFTidyMobileViewSections = true;
+
+/**
+ * Controls the use of WAP view. Possible values:
+ *   enabled  - WAP is enabled;
+ *   transitional - disabled but output still varied by X-WAP and requests 
with X-WAP: yes have shorter expiry time;
+ *   disabled - WAP is disabled;
+ */
+$wgMFWap = 'enabled';
+
+/**
+ * Maximum HTTP lifetime for page views with $wgMFWap = 'transitional'
+ */
+$wgMFTransitionalWapLifetime = 3 * 86400;
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 9bd19e3..35da4ee 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -41,7 +41,7 @@
 * @return bool
 */
public static function onRequestContextCreateSkin( $context, $skin ) {
-   global $wgMFEnableDesktopResources, $wgMFDefaultSkinClass, 
$wgULSPosition;
+   global $wgMFEnableDesktopResources, $wgMFDefaultSkinClass, 
$wgULSPosition, $wgMFWap;
 
// check whether or not the user has requested to toggle their 
view
$mobileContext = MobileContext::singleton();
@@ -78,7 +78,7 @@
// log whether user is using alpha/beta/stable
$mobileContext-logMobileMode();
 
-   if ( $mobileContext-getContentFormat() == 'WML' ) {
+   if ( $mobileContext-getContentFormat() == 'WML'  $wgMFWap == 
'enabled' ) {
# Grab the skin class and initialise it.
$skin = new SkinMobileWML( $context );
} else {
diff --git a/includes/formatters/MobileFormatter.php 
b/includes/formatters/MobileFormatter.php
index 4bb2304..314d371 100644
--- a/includes/formatters/MobileFormatter.php
+++ b/includes/formatters/MobileFormatter.php
@@ -48,6 +48,8 @@
 * @return MobileFormatter
 */
public static function newFromContext( $context, $html ) {
+   global $wgMFWap;
+
wfProfileIn( __METHOD__ );
 
$title = $context-getTitle();
@@ -56,7 +58,7 @@
$isSpecialPage = $title-isSpecialPage();
 
$html = self::wrapHTML( $html );
-   if ( $context-getContentFormat() === 'WML' ) {
+   if ( $context-getContentFormat() === 'WML'  $wgMFWap === 
'enabled' ) {
$wmlContext = new WmlContext( $context );
$formatter = new MobileFormatterWML( $html, $title, 
$wmlContext );
} else {
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 5e339b0..1c646c5 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -706,13 +706,17 @@
//
 
public function outputMobilePage() {
-   global $wgMFNoindexPages;
+   global $wgMFNoindexPages, $wgMFWap, 
$wgMFTransitionalWapLifetime;
wfProfileIn( __METHOD__ );
$out = $this-getOutput();
$out-setTarget( 'mobile' );
if ( $out  $wgMFNoindexPages ) {
$out-setRobotPolicy( 'noindex,nofollow' );
}
+   # Restrict cache lifetime for potentially WAPy requests during 
the transitional period
+   if ( $wgMFWap == 'transitional'  
$this-getRequest()-getText( 'X-WAP' ) == 'yes' ) {
+   $out-setSquidMaxage( min( $out-mSquidMaxage, 
$wgMFTransitionalWapLifetime ) );
+   }
 
wfRunHooks( 'BeforePageDisplayMobile', array( $out ) );
parent::outputPage();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I429484b9687ff09ce43eae3d89b6d7c91338ea99
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Yurik 

[MediaWiki-commits] [Gerrit] Corrected regex to handle unix domain socket and IPV4 format... - change (mediawiki/core)

2013-12-31 Thread Jqnatividad (Code Review)
Jqnatividad has uploaded a new change for review.

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


Change subject: Corrected regex to handle unix domain socket and IPV4 formats.  
IPV6 is not supported for now.
..

Corrected regex to handle unix domain socket and IPV4 formats.  IPV6 is not 
supported for now.

Change-Id: I92263183ebd21fcb6a13e83b2193d5ddb92659b4
---
M includes/objectcache/MemcachedClient.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/104751/1

diff --git a/includes/objectcache/MemcachedClient.php 
b/includes/objectcache/MemcachedClient.php
index 9c0c638..79c5187 100644
--- a/includes/objectcache/MemcachedClient.php
+++ b/includes/objectcache/MemcachedClient.php
@@ -729,7 +729,7 @@
 * @access  private
 */
function _connect_sock( $sock, $host ) {
-   list( $ip, $port ) = preg_split('/(?!\w):(?=\d)/' , $host );
+   list( $ip, $port ) = preg_split('/:(?=\d)/' , $host );
$sock = false;
$timeout = $this-_connect_timeout;
$errno = $errstr = null;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92263183ebd21fcb6a13e83b2193d5ddb92659b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jqnatividad joel.nativi...@ontodia.com

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


[MediaWiki-commits] [Gerrit] Revert 164a6469b6d95c447869a1a427a66150b76a2c58 - change (mediawiki...ParserFunctions)

2013-12-31 Thread Eranroz (Code Review)
Eranroz has uploaded a new change for review.

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


Change subject: Revert 164a6469b6d95c447869a1a427a66150b76a2c58
..

Revert 164a6469b6d95c447869a1a427a66150b76a2c58

Change-Id: I714b5d192b1e1f77528feb360f520199f010a528
---
M ParserFunctions.i18n.magic.php
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserFunctions 
refs/changes/52/104752/1

diff --git a/ParserFunctions.i18n.magic.php b/ParserFunctions.i18n.magic.php
index f546247..05adca0 100644
--- a/ParserFunctions.i18n.magic.php
+++ b/ParserFunctions.i18n.magic.php
@@ -216,15 +216,15 @@
'expr' = array( 0, 'חשב' ),
'if' = array( 0, 'תנאי' ),
'ifeq' = array( 0, 'שווה' ),
-   'ifexpr' = array( 0, 'חשב_תנאי' ),
-   'iferror' = array( 0, 'תנאי_שגיאה' ),
+   'ifexpr' = array( 0, 'חשב תנאי' ),
+   'iferror' = array( 0, 'תנאי שגיאה' ),
'switch' = array( 0, 'בחר' ),
-   'default' = array( 0, '#ברירת_מחדל' ),
+   'default' = array( 0, '#ברירת מחדל' ),
'ifexist' = array( 0, 'קיים' ),
'time' = array( 0, 'זמן' ),
'timel' = array( 0, 'זמןמ' ),
-   'rel2abs' = array( 0, 'יחסי_למוחלט' ),
-   'titleparts' = array( 0, 'חלק_בכותרת' ),
+   'rel2abs' = array( 0, 'יחסי למוחלט' ),
+   'titleparts' = array( 0, 'חלק בכותרת' ),
'count' = array( 0, 'מספר' ),
 );
 
@@ -642,4 +642,4 @@
'ifeq' = array( 0, '若相等', '如果相等' ),
'default' = array( 0, '#默认' ),
'ifexist' = array( 0, '若有', '如果存在' ),
-);
\ No newline at end of file
+);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I714b5d192b1e1f77528feb360f520199f010a528
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserFunctions
Gerrit-Branch: master
Gerrit-Owner: Eranroz eranro...@gmail.com

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


[MediaWiki-commits] [Gerrit] Change Title::getInterwiki() in conditions to Title::isExter... - change (mediawiki/core)

2013-12-31 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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


Change subject: Change Title::getInterwiki() in conditions to 
Title::isExternal()
..

Change Title::getInterwiki() in conditions to Title::isExternal()

Change-Id: Icce26e6194ae96f262029554e05b49117d5e112e
---
M includes/Export.php
M includes/Import.php
M includes/Linker.php
M includes/PrefixSearch.php
M includes/Title.php
M includes/Wiki.php
M includes/api/ApiQueryBase.php
M includes/job/jobs/DoubleRedirectJob.php
M includes/parser/ParserOutput.php
M includes/specials/SpecialExport.php
M includes/specials/SpecialRecentchangeslinked.php
11 files changed, 16 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/104753/1

diff --git a/includes/Export.php b/includes/Export.php
index b4a507d..639ba28 100644
--- a/includes/Export.php
+++ b/includes/Export.php
@@ -866,7 +866,7 @@
 * @since 1.18
 */
public static function canonicalTitle( Title $title ) {
-   if ( $title-getInterwiki() ) {
+   if ( $title-isExternal() ) {
return $title-getPrefixedText();
}
 
diff --git a/includes/Import.php b/includes/Import.php
index 8b7af02..721b94b 100644
--- a/includes/Import.php
+++ b/includes/Import.php
@@ -1717,7 +1717,7 @@
return Status::newFatal( 'import-noarticle' );
}
$link = Title::newFromText( $interwiki:Special:Export/$page );
-   if ( is_null( $link ) || $link-getInterwiki() == '' ) {
+   if ( is_null( $link ) || !$link-isExternal() ) {
return Status::newFatal( 'importbadinterwiki' );
} else {
$params = array();
diff --git a/includes/Linker.php b/includes/Linker.php
index 27f8ab4..c4e2608 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -1446,7 +1446,7 @@
 
$target = Title::newFromText( $linkTarget );
if ( $target ) {
-   if ( $target-getText() == ''  
$target-getInterwiki() === ''
+   if ( $target-getText() == ''  
!$target-isExternal()
 !self::$commentLocal  
self::$commentContextTitle
) {
$newTarget = clone ( 
self::$commentContextTitle );
diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php
index 3c464c5..780cae5 100644
--- a/includes/PrefixSearch.php
+++ b/includes/PrefixSearch.php
@@ -44,7 +44,7 @@
 
// Find a Title which is not an interwiki and is in NS_MAIN
$title = Title::newFromText( $search );
-   if ( $title  $title-getInterwiki() == '' ) {
+   if ( $title  !$title-isExternal() ) {
$ns = array( $title-getNamespace() );
if ( $ns[0] == NS_MAIN ) {
$ns = $namespaces; // no explicit prefix, use 
default namespaces
@@ -57,7 +57,7 @@
$title = Title::newFromText( $search . 'Dummy' );
if ( $title  $title-getText() == 'Dummy'
 $title-getNamespace() != NS_MAIN
-$title-getInterwiki() == '' ) {
+!$title-isExternal() ) {
return self::searchBackend(
array( $title-getNamespace() ), '', $limit );
}
diff --git a/includes/Title.php b/includes/Title.php
index 5ab9e94..6826910 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -1014,7 +1014,7 @@
 * @return Bool TRUE or FALSE
 */
public function isMovable() {
-   if ( !MWNamespace::isMovable( $this-getNamespace() ) || 
$this-getInterwiki() != '' ) {
+   if ( !MWNamespace::isMovable( $this-getNamespace() ) || 
$this-isExternal() ) {
// Interwiki title or immovable namespace. Hooks don't 
get to override here
return false;
}
@@ -3582,7 +3582,7 @@
if ( !$this-isMovable() ) {
$errors[] = array( 'immobile-source-namespace', 
$this-getNsText() );
}
-   if ( $nt-getInterwiki() != '' ) {
+   if ( $nt-isExternal() ) {
$errors[] = array( 'immobile-target-namespace-iw' );
}
if ( !$nt-isMovable() ) {
diff --git a/includes/Wiki.php b/includes/Wiki.php
index 5ebf5a0..1bb9c40 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -121,7 +121,7 @@
$ret = Title::newMainPage();
}
 
-   if ( $ret === null || ( $ret-getDBkey() == ''  
$ret-getInterwiki() == '' ) ) {
+   if ( $ret === null 

[MediaWiki-commits] [Gerrit] Ensure that EnableMobileModules hook always gets an OutputPage - change (mediawiki...MobileFrontend)

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

Change subject: Ensure that EnableMobileModules hook always gets an OutputPage
..


Ensure that EnableMobileModules hook always gets an OutputPage

Bug: 59143
Change-Id: I0971d3a9d7e22c65327b5dcca4c701b0fd2056b1
---
M includes/skins/SkinMinerva.php
1 file changed, 21 insertions(+), 25 deletions(-)

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



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 1c646c5..cc8264e 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -15,7 +15,7 @@
protected $mode = 'stable';
 
protected function prepareQuickTemplate() {
-   global $wgAppleTouchIcon;
+   global $wgAppleTouchIcon, $wgMFNoindexPages;
wfProfileIn( __METHOD__ );
$out = $this-getOutput();
// add head items
@@ -37,6 +37,9 @@
$out-addHeadItem( 'loadingscript', Html::inlineScript(
document.documentElement.className += ' page-loading';
) );
+   if ( $wgMFNoindexPages ) {
+   $out-setRobotPolicy( 'noindex,nofollow' );
+   }
 
// Generate template after doing the above...
$tpl = parent::prepareQuickTemplate();
@@ -687,15 +690,26 @@
}
 
public function outputPage( OutputPage $out = null ) {
+   global $wgMFWap, $wgMFTransitionalWapLifetime;
+   wfProfileIn( __METHOD__ );
+
+   // This might seem weird but now the meaning of 'mobile' is 
morphing to mean 'minerva skin'
+   // FIXME: Explore disabling this via a user preference and see 
what explodes
+   // Important: This must run before outputPage which generates 
script and style tags
+   // If run later incompatible desktop code will leak into 
Minerva.
+   $out = $this-getOutput();
+   $out-setTarget( 'mobile' );
if ( $this-isMobileMode ) {
+   # Restrict cache lifetime for potentially WAPy requests 
during the transitional period
+   if ( $wgMFWap == 'transitional'  
$this-getRequest()-getText( 'X-WAP' ) == 'yes' ) {
+   $out-setSquidMaxage( min( $out-mSquidMaxage, 
$wgMFTransitionalWapLifetime ) );
+   }
+   // FIXME: Merge these hooks?
wfRunHooks( 'EnableMobileModules', array( $out, 
$this-getMode() ) );
-   $this-outputMobilePage();
-   } else {
-   // This might seem weird but now the meaning of 
'mobile' is morphing to mean 'minerva skin'
-   // FIXME: Explore disabling this via a user preference 
and see what explodes
-   $out = $this-getOutput()-setTarget( 'mobile' );
-   parent::outputPage();
+   wfRunHooks( 'BeforePageDisplayMobile', array( $out ) );
}
+   parent::outputPage( $out );
+   wfProfileOut( __METHOD__ );
}
 
//
@@ -703,24 +717,6 @@
// Mobile specific functions
// FIXME: Try to kill any of the functions that follow
//
-   //
-
-   public function outputMobilePage() {
-   global $wgMFNoindexPages, $wgMFWap, 
$wgMFTransitionalWapLifetime;
-   wfProfileIn( __METHOD__ );
-   $out = $this-getOutput();
-   $out-setTarget( 'mobile' );
-   if ( $out  $wgMFNoindexPages ) {
-   $out-setRobotPolicy( 'noindex,nofollow' );
-   }
-   # Restrict cache lifetime for potentially WAPy requests during 
the transitional period
-   if ( $wgMFWap == 'transitional'  
$this-getRequest()-getText( 'X-WAP' ) == 'yes' ) {
-   $out-setSquidMaxage( min( $out-mSquidMaxage, 
$wgMFTransitionalWapLifetime ) );
-   }
-
-   wfRunHooks( 'BeforePageDisplayMobile', array( $out ) );
-   parent::outputPage();
-   }
 
/**
 * Returns the site name for the footer, either as a text or img tag

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0971d3a9d7e22c65327b5dcca4c701b0fd2056b1
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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

[MediaWiki-commits] [Gerrit] Delete all but the 50 newest messages - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Delete all but the 50 newest messages
..

Delete all but the 50 newest messages

This should have been happening for ages, but it wasn't working, because
(a) a number to big for an int was being converted to an int, and (b),
ORDER BY was incorrectly written as ORDER_BY (underscore)

Change-Id: I1692f54f60d8ba672e2d712116a62242ee3f2516
---
M MediaWikiChatClass.php
1 file changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/MediaWikiChatClass.php b/MediaWikiChatClass.php
index 5bb55c0..4ce1e4f 100644
--- a/MediaWikiChatClass.php
+++ b/MediaWikiChatClass.php
@@ -225,21 +225,20 @@
 */
static function deleteEntryIfNeeded() {
$dbr = wfGetDB( DB_SLAVE );
-   $dbw = wfGetDB( DB_MASTER );
$field = $dbr-selectField(
'chat',
'chat_timestamp',
array(),
__METHOD__,
array(
-   'ORDER_BY' = 'chat_timestamp DESC',
+   'ORDER BY' = 'chat_timestamp DESC',
'OFFSET' = 50,
'LIMIT' = 1
)
);
 
-   if ( is_int( $field ) ) {
-   $field = intval( $field );
+   if ( $field ) {
+   $dbw = wfGetDB( DB_MASTER );
$dbw-delete(
'chat',
array( chat_timestamp  $field ),
@@ -247,4 +246,4 @@
);
}
}
-}
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1692f54f60d8ba672e2d712116a62242ee3f2516
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Delete all but the 50 newest messages - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Delete all but the 50 newest messages
..


Delete all but the 50 newest messages

This should have been happening for ages, but it wasn't working, because
(a) a number to big for an int was being converted to an int, and (b),
ORDER BY was incorrectly written as ORDER_BY (underscore)

Change-Id: I1692f54f60d8ba672e2d712116a62242ee3f2516
---
M MediaWikiChatClass.php
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/MediaWikiChatClass.php b/MediaWikiChatClass.php
index 5bb55c0..4ce1e4f 100644
--- a/MediaWikiChatClass.php
+++ b/MediaWikiChatClass.php
@@ -225,21 +225,20 @@
 */
static function deleteEntryIfNeeded() {
$dbr = wfGetDB( DB_SLAVE );
-   $dbw = wfGetDB( DB_MASTER );
$field = $dbr-selectField(
'chat',
'chat_timestamp',
array(),
__METHOD__,
array(
-   'ORDER_BY' = 'chat_timestamp DESC',
+   'ORDER BY' = 'chat_timestamp DESC',
'OFFSET' = 50,
'LIMIT' = 1
)
);
 
-   if ( is_int( $field ) ) {
-   $field = intval( $field );
+   if ( $field ) {
+   $dbw = wfGetDB( DB_MASTER );
$dbw-delete(
'chat',
array( chat_timestamp  $field ),
@@ -247,4 +246,4 @@
);
}
}
-}
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1692f54f60d8ba672e2d712116a62242ee3f2516
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Allow switching from edit preview to editor - change (mediawiki...MobileFrontend)

2013-12-31 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: Allow switching from edit preview to editor
..

Allow switching from edit preview to editor

Bug: 59166
Change-Id: If6e4da42f74e6e05f426d7c557a9591edced4df8
---
M javascripts/modules/editor/EditorOverlay.js
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index efaf5bf..bf2aebb 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -99,7 +99,10 @@
 
hide: function() {
var confirmMessage = mw.msg( 
'mobile-frontend-editor-cancel-confirm' );
-   if ( !this.api.hasChanged || this.canHide || 
window.confirm( confirmMessage ) ) {
+   if ( this.inPreviewMode ) {
+   this._hidePreview();
+   return false;
+   } else if ( !this.api.hasChanged || this.canHide || 
window.confirm( confirmMessage ) ) {
return this._super();
} else {
return false;
@@ -107,6 +110,7 @@
},
 
_showPreview: function() {
+   this.inPreviewMode = true;
var self = this, params = {
action: 'parse',
// Enable section preview mode to avoid errors 
(bug 49218)
@@ -173,6 +177,7 @@
},
 
_hidePreview: function() {
+   this.inPreviewMode = false;
this.$preview.hide();
this.$content.show();
window.scrollTo( 0, this.scrollTop );

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

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

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


[MediaWiki-commits] [Gerrit] Change id to add mwe-upwiz prefix and match casing style - change (mediawiki...UploadWizard)

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

Change subject: Change id to add mwe-upwiz prefix and match casing style
..


Change id to add mwe-upwiz prefix and match casing style

Change-Id: I98d1a908607a6f7fdfba468cef721b2962901ddb
---
M resources/mw.UploadWizard.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index cf68bb5..f9d6a1a 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -1218,7 +1218,7 @@
return;
}
var thumbWikiText,
-   id = 'thanksDiv' + i,
+   id = 'mwe-upwiz-thanks-div-' + i,
$thanksDiv = $( 'div/div' ).attr( 'id', id 
).addClass( 'mwe-upwiz-thanks ui-helper-clearfix' ),
$thumbnailDiv = $( 'div/div' ).addClass( 
'mwe-upwiz-thumbnail' ),
$thumbnailCaption = $( 'div/div' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98d1a908607a6f7fdfba468cef721b2962901ddb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix some users appearing twice in the user list - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Fix some users appearing twice in the user list
..

Fix some users appearing twice in the user list

It seems this was not updated with the user object change, and I've also
simplyfied the code slightly

Change-Id: Ie5206199c7bac087c1233fb30aa426104a0ec749
---
M MediaWikiChat.js
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index e63ca96..38e4d75 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -366,11 +366,11 @@
 
var add = true;
 
-   $.each( $( '#mwchat-users div' ), ( function( index, item ) {
-   if ( item.id == user.userE ) {
-   add = false;
+   $( '#mwchat-users div' ).each( function( index ) {
+   if ( $( this ).attr( 'data-id' ) == user.id ) {
+   add = false;
+   }
}
-   })
);
 
if ( add ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5206199c7bac087c1233fb30aa426104a0ec749
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Fix some users appearing twice in the user list - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Fix some users appearing twice in the user list
..


Fix some users appearing twice in the user list

It seems this was not updated with the user object change, and I've also
simplyfied the code slightly.
Also, I've bumped the version up (should have been with the sidebar
commit)

Brickimedia/brickimedia#149

Change-Id: Ie5206199c7bac087c1233fb30aa426104a0ec749
---
M MediaWikiChat.js
M MediaWikiChat.php
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index e63ca96..38e4d75 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -366,11 +366,11 @@
 
var add = true;
 
-   $.each( $( '#mwchat-users div' ), ( function( index, item ) {
-   if ( item.id == user.userE ) {
-   add = false;
+   $( '#mwchat-users div' ).each( function( index ) {
+   if ( $( this ).attr( 'data-id' ) == user.id ) {
+   add = false;
+   }
}
-   })
);
 
if ( add ) {
diff --git a/MediaWikiChat.php b/MediaWikiChat.php
index 7caa320..773c8d7 100644
--- a/MediaWikiChat.php
+++ b/MediaWikiChat.php
@@ -17,7 +17,7 @@
 $wgExtensionCredits['specialpage'][] = array(
'path' = __FILE__,
'name' = 'MediaWikiChat',
-   'version' = '2.1',
+   'version' = '2.2',
'author' = 'Adam Carter/UltrasonicNXT',
'url' = 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat',
'descriptionmsg' = 'chat-desc',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5206199c7bac087c1233fb30aa426104a0ec749
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Focus to Flickr URL input field after upload from Flickr i... - change (mediawiki...UploadWizard)

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

Change subject: Focus to Flickr URL input field after upload from Flickr is 
clicked
..


Focus to Flickr URL input field after upload from Flickr is clicked

Change-Id: I68932a4d9202218d9c692b1a436cee5594b776e1
---
M resources/mw.UploadWizard.js
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index a25de16..6eef0eb 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -374,6 +374,8 @@
 
// Set up the submit button
$flickrButton.button( { label: mw.message( 
'mwe-upwiz-add-flickr' ).escaped() } );
+
+   $flickrInput.focus();
},
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68932a4d9202218d9c692b1a436cee5594b776e1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@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] Allow category prefix when entering categories - change (mediawiki...UploadWizard)

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

Change subject: Allow category prefix when entering categories
..


Allow category prefix when entering categories

When users are entering categories, allow either
Foo or Category:Foo (with the prefix text
localized as necessary).

Bug: 56273
Change-Id: Ie5cc9dbcfeae48398ab0fe3c43e2a85f2307e3dc
---
M resources/jquery/jquery.mwCoolCats.js
1 file changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/resources/jquery/jquery.mwCoolCats.js 
b/resources/jquery/jquery.mwCoolCats.js
index 7f6bdb0..d27d7a3 100644
--- a/resources/jquery/jquery.mwCoolCats.js
+++ b/resources/jquery/jquery.mwCoolCats.js
@@ -166,8 +166,16 @@
 */
function _fetchSuggestions() {
var _input = this;
-   // ignore bad characters, they will be stripped out
-   var prefix = _stripText( $( this ).val() );
+
+   // Get the name of the category (no Category:), stripping out
+   // bad characters as necessary.
+   var prefix = _stripText( $( this ).val() ),
+   title = mw.Title.newFromText( prefix, catNsId );
+   if ( title  title.getNamespaceId() === catNsId ) {
+   prefix = title.getMainText();
+   } else {
+   prefix = title.getPrefixedText();
+   }
 
var ok = function( catList ) {
for ( var c in catList ) {
@@ -176,7 +184,7 @@
$( _input ).suggestions( 'suggestions', catList );
};
 
-   $( _input ).data( 'request', 
settings.api.getCategoriesByPrefix( prefix, ok ) );
+   $( _input ).data( 'request', 
settings.api.getCategoriesByPrefix( prefix, ok ) );
}
 
var defaults = {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5cc9dbcfeae48398ab0fe3c43e2a85f2307e3dc
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Theopolisme theopolismew...@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: Qgil q...@wikimedia.org
Gerrit-Reviewer: Theopolisme theopolismew...@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] Revert 164a6469b6d95c447869a1a427a66150b76a2c58 - change (mediawiki...ParserFunctions)

2013-12-31 Thread Chad (Code Review)
Chad has submitted this change and it was merged.

Change subject: Revert 164a6469b6d95c447869a1a427a66150b76a2c58
..


Revert 164a6469b6d95c447869a1a427a66150b76a2c58

Change-Id: I714b5d192b1e1f77528feb360f520199f010a528
---
M ParserFunctions.i18n.magic.php
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/ParserFunctions.i18n.magic.php b/ParserFunctions.i18n.magic.php
index f546247..05adca0 100644
--- a/ParserFunctions.i18n.magic.php
+++ b/ParserFunctions.i18n.magic.php
@@ -216,15 +216,15 @@
'expr' = array( 0, 'חשב' ),
'if' = array( 0, 'תנאי' ),
'ifeq' = array( 0, 'שווה' ),
-   'ifexpr' = array( 0, 'חשב_תנאי' ),
-   'iferror' = array( 0, 'תנאי_שגיאה' ),
+   'ifexpr' = array( 0, 'חשב תנאי' ),
+   'iferror' = array( 0, 'תנאי שגיאה' ),
'switch' = array( 0, 'בחר' ),
-   'default' = array( 0, '#ברירת_מחדל' ),
+   'default' = array( 0, '#ברירת מחדל' ),
'ifexist' = array( 0, 'קיים' ),
'time' = array( 0, 'זמן' ),
'timel' = array( 0, 'זמןמ' ),
-   'rel2abs' = array( 0, 'יחסי_למוחלט' ),
-   'titleparts' = array( 0, 'חלק_בכותרת' ),
+   'rel2abs' = array( 0, 'יחסי למוחלט' ),
+   'titleparts' = array( 0, 'חלק בכותרת' ),
'count' = array( 0, 'מספר' ),
 );
 
@@ -642,4 +642,4 @@
'ifeq' = array( 0, '若相等', '如果相等' ),
'default' = array( 0, '#默认' ),
'ifexist' = array( 0, '若有', '如果存在' ),
-);
\ No newline at end of file
+);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I714b5d192b1e1f77528feb360f520199f010a528
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserFunctions
Gerrit-Branch: master
Gerrit-Owner: Eranroz eranro...@gmail.com
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Combine var statements - change (mediawiki...CodeEditor)

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

Change subject: Combine var statements
..


Combine var statements

Change-Id: If005690ab8ecf21e64399781acbecd1ec3b02172
---
M modules/ext.codeEditor.geshi.js
M modules/jquery.codeEditor.js
2 files changed, 89 insertions(+), 53 deletions(-)

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



diff --git a/modules/ext.codeEditor.geshi.js b/modules/ext.codeEditor.geshi.js
index 6a6e6bd..771f80a 100644
--- a/modules/ext.codeEditor.geshi.js
+++ b/modules/ext.codeEditor.geshi.js
@@ -5,10 +5,15 @@
  */
 
 $( function () {
-   var $sources = $( '.mw-geshi' );
+   var $sources, setupEditor, openEditor;
+
+   $sources = $( '.mw-geshi' );
+
if ( $sources.length  0 ) {
-   var setupEditor = function ( $div ) {
-   var $link = $( 'a' )
+   setupEditor = function ( $div ) {
+   var $link, $edit;
+
+   $link = $( 'a' )
.text( mediaWiki.msg( 'editsection' ) )
.attr( 'href', '#' )
.attr( 'title', 'Edit this code section' )
@@ -16,23 +21,29 @@
openEditor( $div );
event.preventDefault();
} );
-   var $edit = $( 'span' )
+   $edit = $( 'span' )
.addClass( 'mw-editsection' )
.append( 'span 
class=mw-editsection-bracket[/span' )
.append( $link )
.append( 'span 
class=mw-editsection-bracket]/span' );
$div.prepend( $edit );
};
-   var openEditor = function ( $div ) {
-   var $main = $div.find( 'div' ),
-   geshiLang = null,
-   matches = /(?:^| )source-([a-z0-9_-]+)/.exec( 
$main.attr( 'class' ) );
+
+   openEditor = function ( $div ) {
+   var $main, geshiLang, matches, $label, $langDropDown, 
$xcontainer, codeEditor;
+
+   $main = $div.find( 'div' );
+   geshiLang = null;
+   matches = /(?:^| )source-([a-z0-9_-]+)/.exec( 
$main.attr( 'class' ) );
+
if ( matches ) {
geshiLang = matches[1];
}
mediaWiki.loader.using( 'ext.codeEditor.ace.modes', 
function () {
+   var map, canon, $container, $save, $cancel, 
$controls, setLanguage, closeEditor;
+
// @fixme de-duplicate
-   var map = {
+   map = {
c: 'c_cpp',
cpp: 'c_cpp',
clojure: 'clojure',
@@ -57,17 +68,17 @@
};
 
// Disable some annoying commands
-   var canon = require( 'pilot/canon' );
+   canon = require( 'pilot/canon' );
canon.removeCommand( 'replace' );  // 
ctrl+R
canon.removeCommand( 'transposeletters' ); // 
ctrl+T
canon.removeCommand( 'gotoline' ); // 
ctrl+L
 
-   var $container = $( 'div' )
+   $container = $( 'div' )
.attr( 'style', 'top: 32px; left: 0px; 
right: 0px; bottom: 0px; border: 1px solid gray' )
.text( $main.text() ); // quick hack :D
 
-   var $label = $( 'label' ).text( 'Source 
language: ' );
-   var $langDropDown = $( 'select' );
+   $label = $( 'label' ).text( 'Source language: 
' );
+   $langDropDown = $( 'select' );
$.each( map, function ( geshiLang, aceLang ) {
var $opt = $( 'option' )
.text( geshiLang )
@@ -80,12 +91,14 @@
.change( function ( event ) {
setLanguage( $( this ).val() );
} );
-   var $save = $( 'button' )
+   $save = $( 'button' )
.text( mediaWiki.msg( 'savearticle' ) )
.click( function ( event ) {
   

[MediaWiki-commits] [Gerrit] Fix to makeSepIndentPreSafe: always safe when nested in an i... - change (mediawiki...parsoid)

2013-12-31 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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


Change subject: Fix to makeSepIndentPreSafe: always safe when nested in an 
indentPre!
..

Fix to makeSepIndentPreSafe: always safe when nested in an indentPre!

* echo  ''a''\n  ''b'' | node parse --wt2wt was normalizing
  whitespace on the second line because makeSepIndentPreSafe was
  not checking if the separator came from a node that was nested
  inside an indentPre. A simple check for state.inIndentPre fixes
  this issue.

* Added a parser test to capture this which passes wt2wt mode.

* This eliminates dirty diffs seen in RT testing
  Ex: jawiki:ベルマン-フォード法

* Additional change: separator constraints were being destructively
  updated in --trace wts mode. Fixed this to prevent hair-tearing
  during debugging.

Change-Id: I2cc2e79137637df191c2544982cc08b2a0777de4
---
M lib/mediawiki.WikitextSerializer.js
M tests/parserTests.txt
2 files changed, 22 insertions(+), 3 deletions(-)


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

diff --git a/lib/mediawiki.WikitextSerializer.js 
b/lib/mediawiki.WikitextSerializer.js
index d0617c7..186b519 100644
--- a/lib/mediawiki.WikitextSerializer.js
+++ b/lib/mediawiki.WikitextSerializer.js
@@ -3880,7 +3880,7 @@
}
 
if (this.debugging) {
-   var constraints = nlConstraints;
+   var constraints = Util.clone(nlConstraints);
constraints.constraintInfo = undefined;
this.trace('makeSeparator', sep, origSep, minNls, sepNlCount, 
constraints);
}
@@ -4004,8 +4004,9 @@
// We also should test for onSOL state to deal with HTML like
// ul lifoo/li/ul
// and strip the leading space before non-indent-pre-safe tags
-   if (sep.match(/\n+ +(!--(?:[^\-]|-(?!-))*--[^\n]*)?$/g) || (
-   (constraintInfo.onSOL  sep.match(/ 
+(!--(?:[^\-]|-(?!-))*--[^\n]*)?$/g
+   if (!state.inIndentPre 
+   (sep.match(/\n+ +(!--(?:[^\-]|-(?!-))*--[^\n]*)?$/g) || (
+   (constraintInfo.onSOL  sep.match(/ 
+(!--(?:[^\-]|-(?!-))*--[^\n]*)?$/g)
{
// 'sep' is the separator before 'nodeB' and it has leading 
spaces on a newline.
// We have to decide whether that leading space will trigger 
indent-pres in wikitext.
@@ -4085,6 +4086,12 @@
}
}
 
+   if (this.debugging) {
+   var constraints = nlConstraints;
+   constraints.constraintInfo = undefined;
+   this.trace('makePreSafe  ', sep, constraints);
+   }
+
return sep;
 };
 
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 6f2f7de..a6b9e63 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -2284,6 +2284,18 @@
 /pre
 !! end
 
+!! test
+5c. White-space in indent-pre
+!! input
+ ''a''
+  ''b''
+   ''c''
+!! result
+preia/i
+ ib/i
+  ic/i
+/pre
+!! end
 
 !! test
 6. Pre-blocks should extend across lines with leading WS even when there is no 
wrappable content

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cc2e79137637df191c2544982cc08b2a0777de4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Post content with more than 5 lines is showing a scrollbar - change (mediawiki...Flow)

2013-12-31 Thread Bsitu (Code Review)
Bsitu has uploaded a new change for review.

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


Change subject: Post content with more than 5 lines is showing a scrollbar
..

Post content with more than 5 lines is showing a scrollbar

It turns out this is caused by the tipsy link, somehow the icon is
creating an overflow even the height/width are the same as icon
height/width.  Adding overflow: hidden seems to fixe the
problem.  Not sure if this is a good fix but this does address
the issue, :)

Change-Id: Iae275a3d1c18e7b9693811e20cf3e742a48f23be
---
M modules/discussion/styles/modified.less
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/discussion/styles/modified.less 
b/modules/discussion/styles/modified.less
index 1bfc037..454ecb1 100644
--- a/modules/discussion/styles/modified.less
+++ b/modules/discussion/styles/modified.less
@@ -7,6 +7,7 @@
display: inline-block;
text-indent: -px;
vertical-align: middle;
+   overflow: hidden;
 
background-position: center;
background-size: 14px auto;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae275a3d1c18e7b9693811e20cf3e742a48f23be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu bs...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] No-js css tweaks - change (mediawiki...Flow)

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

Change subject: No-js css tweaks
..


No-js css tweaks

* post and topic flyouts start small and transition width on hover
* reposition timestamps slightly to accomidate always visible flyouts
* shrink non-active empty textareas

Bug: 58019
Mingle: 589
Change-Id: Id0c651e2cc20ee2fc7a9adbffabebac270e7666d
---
M Resources.php
M modules/base/styles/actionbox.less
A modules/discussion/styles/nojs.less
3 files changed, 49 insertions(+), 0 deletions(-)

Approvals:
  Matthias Mullie: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Resources.php b/Resources.php
index 79cac71..5fba780 100644
--- a/Resources.php
+++ b/Resources.php
@@ -55,6 +55,7 @@
'discussion/styles/post.less',
'discussion/styles/collapse.less',
'discussion/styles/modified.less',
+   'discussion/styles/nojs.less',
),
'scripts' = array(
'discussion/ui.js',
diff --git a/modules/base/styles/actionbox.less 
b/modules/base/styles/actionbox.less
index 938cdb6..ddb7944 100644
--- a/modules/base/styles/actionbox.less
+++ b/modules/base/styles/actionbox.less
@@ -59,8 +59,24 @@
display: none;
}
 
+   .flow-tipsy {
+   width: 100%;
+   }
+
.flow-tipsy-flyout {
display: block;
+
+   // give the action menu an animated width
+   ul li .mw-ui-button {
+   transition: width 0.1s, text-indent 0.1s, padding-right 
0.1s;
+   }
+
+   // unless when hovered, shorten buttons to only display the icon
+   :not(:hover) ul li .mw-ui-button {
+   width: 0;
+   text-indent: -px;
+   padding-right: 4px;
+   }
}
 }
 
diff --git a/modules/discussion/styles/nojs.less 
b/modules/discussion/styles/nojs.less
new file mode 100644
index 000..94280f7
--- /dev/null
+++ b/modules/discussion/styles/nojs.less
@@ -0,0 +1,32 @@
+.client-nojs .flow-container {
+   // position tipsy window in upper right hand corner
+   .flow-tipsy {
+   position: absolute;
+   top: 0;
+   right: 0;
+   }
+
+   // flyout doesn't need to be pushed down below the icon; there's no JS, 
so
+   // no event handlers when clicking the flyout; so the flyout will 
always be
+   // displayed
+   .flow-tipsy-flyout {
+   position: inherit;
+   top: 0;
+   }
+
+   // shrink textarea's until they are focused
+   .flow-post-container,
+   .flow-new-topic-container {
+   textarea:empty:not(:focus) {
+   height: 34px;
+   }
+   }
+
+   // make room for the always visible flyout
+   .flow-element-container .flow-datestamp {
+   right: 50px;
+   }
+   .flow-post-content {
+   padding-right: 45px;
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0c651e2cc20ee2fc7a9adbffabebac270e7666d
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add Arabic namespace names - change (mediawiki...EducationProgram)

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

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


Change subject: Add Arabic namespace names
..

Add Arabic namespace names

Bug: 57729
Change-Id: I891198aa1b15203a9f52c862b1933dbf534e075c
---
M EducationProgram.i18n.ns.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/EducationProgram.i18n.ns.php b/EducationProgram.i18n.ns.php
index c81ac43..0cfd3a3 100644
--- a/EducationProgram.i18n.ns.php
+++ b/EducationProgram.i18n.ns.php
@@ -23,6 +23,11 @@
EP_NS_TALK = 'Education_Program_talk',
 );
 
+$namespaceNames['ar'] = array(
+   EP_NS  = 'برنامج_التعليم',
+   EP_NS_TALK = 'نقاش_برنامج_التعليم',
+);
+
 $namespaceNames['fa'] = array(
EP_NS  = 'برنامه_آموزشی',
EP_NS_TALK = 'بحث_برنامه_آموزشی',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I891198aa1b15203a9f52c862b1933dbf534e075c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
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] Higher-level move function, to cross filesystems - change (wikimedia...tools)

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

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


Change subject: Higher-level move function, to cross filesystems
..

Higher-level move function, to cross filesystems

Change-Id: I7c6cfef705128a15e6f641b4b39322668756aea8
---
M audit/paypal/parse_nightly
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/60/104760/1

diff --git a/audit/paypal/parse_nightly b/audit/paypal/parse_nightly
index 44240b9..8f0b2c8 100755
--- a/audit/paypal/parse_nightly
+++ b/audit/paypal/parse_nightly
@@ -2,6 +2,7 @@
 
 import os, os.path
 import re
+import shutil
 from process.logging import Logger as log
 from process.globals import load_config
 load_config(paypal-audit)
@@ -41,7 +42,7 @@
 dest_path = os.path.join(config.archive_path, filename)
 
 log.info(Archiving {orig} to {new}.format(orig=path, new=dest_path))
-os.rename(path, dest_path)
+shutil.move(path, dest_path)
 
 if __name__ == '__main__':
 lock.begin()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c6cfef705128a15e6f641b4b39322668756aea8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
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] Remove version check for mysql 4.1 from Maintenance scripts - change (mediawiki/core)

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

Change subject: Remove version check for mysql 4.1 from Maintenance scripts
..


Remove version check for mysql 4.1 from Maintenance scripts

Removed version check for mysql from initEditCount.php and
storage/fixBug20757.php. Mediawiki needs MYSQL Ver 5.0.2 or
later, so the check is unnecessary.
Removed white spaces

Bug: 59126
Change-Id: I29e2ca8764fad8bf4d15bba307e80f3aacea1db7
---
M maintenance/initEditCount.php
M maintenance/storage/fixBug20757.php
2 files changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php
index 4b04683..7c6e7d4 100644
--- a/maintenance/initEditCount.php
+++ b/maintenance/initEditCount.php
@@ -47,7 +47,7 @@
 
// Autodetect mode...
$backgroundMode = wfGetLB()-getServerCount()  1 ||
-   ( $dbw instanceof DatabaseMysql  version_compare( 
$dbver, '4.1' )  0 );
+   ( $dbw instanceof DatabaseMysql );
 
if ( $this-hasOption( 'background' ) ) {
$backgroundMode = true;
diff --git a/maintenance/storage/fixBug20757.php 
b/maintenance/storage/fixBug20757.php
index e832b4e..dd86619 100644
--- a/maintenance/storage/fixBug20757.php
+++ b/maintenance/storage/fixBug20757.php
@@ -57,14 +57,9 @@
 
$totalRevs = $dbr-selectField( 'text', 'MAX(old_id)', false, 
__METHOD__ );
 
-   if ( $dbr-getType() == 'mysql'
-version_compare( $dbr-getServerVersion(), '4.1.0', 
'=' )
-   ) {
+   if ( $dbr-getType() == 'mysql' ) {
// In MySQL 4.1+, the binary field old_text has a 
non-working LOWER() function
$lowerLeft = 'LOWER(CONVERT(LEFT(old_text,22) USING 
latin1))';
-   } else {
-   // No CONVERT() in MySQL 4.0
-   $lowerLeft = 'LOWER(LEFT(old_text,22))';
}
 
while ( true ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29e2ca8764fad8bf4d15bba307e80f3aacea1db7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas 01tonytho...@gmail.com
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@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] Fetch moderation status from last revision - change (mediawiki...Flow)

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

Change subject: Fetch moderation status from last revision
..


Fetch moderation status from last revision

We shouldn't be looking at a certain revision to find if it's suppressed, we
should check the current revision

Bug: 58016
Change-Id: I497900d469acb6984ca250a141a337910b93c650
---
M FlowActions.php
M includes/Block/Header.php
M includes/Block/Topic.php
M includes/Data/ObjectManager.php
4 files changed, 113 insertions(+), 12 deletions(-)

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



diff --git a/FlowActions.php b/FlowActions.php
index b8d5501..423017c 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -470,6 +470,21 @@
'button-method' = 'GET',
),
 
+   'board-history' = array(
+   'performs-writes' = false,
+   'log_type' = false,
+   'permissions' = array(
+   PostRevision::MODERATED_NONE = '',
+   PostRevision::MODERATED_HIDDEN = function( 
PostRevision $post, RevisionActionPermissions $permissions ) {
+   // visible for logged in users (or 
anyone with hide permission)
+   return 
$permissions-getUser()-isLoggedIn() ? '' : 'flow-hide';
+   },
+   PostRevision::MODERATED_DELETED = array( 
'flow-delete', 'flow-suppress' ),
+   PostRevision::MODERATED_SUPPRESSED = 'flow-suppress',
+   ),
+   'button-method' = 'GET',
+   ),
+
'view' = array(
'performs-writes' = false,
'log_type' = false, // don't log views
diff --git a/includes/Block/Header.php b/includes/Block/Header.php
index 4dec609..a272148 100644
--- a/includes/Block/Header.php
+++ b/includes/Block/Header.php
@@ -91,7 +91,7 @@
// if $wgFlowContentFormat is set to 
html the Header::create
// call will convert the wikitext input 
into html via parsoid, and
// parsoid requires the page exist.
-   Container::get( 'occupation_controller' 
)-ensureFlowRevision( new \Article( $title, 0 ) ); 
+   Container::get( 'occupation_controller' 
)-ensureFlowRevision( new \Article( $title, 0 ) );
}
 
$this-header = Header::create( 
$this-workflow, $this-user, $this-submitted['content'], 'create-header' );
@@ -139,10 +139,11 @@
'historyExists' = false,
);
 
-   $historyRecord = $this-loadBoardHistory();
-   if ( $historyRecord ) {
+   $history = $this-filterBoardHistory( 
$this-loadBoardHistory() );
+
+   if ( $history ) {
$tplVars['historyExists'] = true;
-   $tplVars['history'] = new History( 
$historyRecord );
+   $tplVars['history'] = new History( $history );
$tplVars['historyRenderer'] = new 
HistoryRenderer( $templating, $this );
}
 
@@ -160,6 +161,52 @@
}
}
 
+   protected function filterBoardHistory( array $history ) {
+   // get rid of history entries user doesn't have sufficient 
permissions for
+   $query = $needed = array();
+   foreach ( $history as $i = $revision ) {
+   switch( $revision-getRevisionType() ) {
+   case 'header':
+   // headers can't be moderated
+   break;
+   case 'post':
+   // comments should not be in board 
history
+   if ( $revision-isTopicTitle() ) {
+   
$needed[$revision-getPostId()-getHex()] = $i;
+   $query[] = array( 
'tree_rev_descendant_id' = $revision-getPostId() );
+   } else {
+   unset( $history[$i] );
+   }
+   break;
+   }
+   }
+
+   if ( !$needed ) {
+   return $history;
+   }
+
+   // check permissions against most recent revision
+   $found = $this-storage-findMulti(
+   'PostRevision',
+   $query,
+   array( 'sort' = 'rev_id', 'order' = 

[MediaWiki-commits] [Gerrit] Reworded visibility status of Notes section to 'publicly v... - change (mediawiki...AbuseFilter)

2013-12-31 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review.

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


Change subject: Reworded visibility status of Notes section to 'publicly 
viewable'
..

Reworded visibility status of Notes section to 'publicly viewable'

The description says publicly viewable, but the Notes are
 private. If you log out, you can confirm that the notes are
actually public,so the message should be changed.

Bug: 57305
Change-Id: I04301fc9f188862b2a23d6b316d7e5eef111ade0
---
M AbuseFilter.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/AbuseFilter.i18n.php b/AbuseFilter.i18n.php
index 70680dc..2f0d596 100644
--- a/AbuseFilter.i18n.php
+++ b/AbuseFilter.i18n.php
@@ -200,7 +200,7 @@
'abusefilter-edit-global' = 'Global filter',
'abusefilter-edit-rules' = 'Conditions:',
'abusefilter-edit-notes' = Notes:
-:''(private)'',
+:''(publicly viewable)'',
'abusefilter-edit-lastmod' = 'Filter last modified:',
'abusefilter-edit-lastmod-text' = '$1 by $2',
'abusefilter-edit-hitcount' = 'Filter hits:',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04301fc9f188862b2a23d6b316d7e5eef111ade0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas 01tonytho...@gmail.com

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


[MediaWiki-commits] [Gerrit] Made RefreshCdbJsonFiles include newlines in the JSON - change (operations/puppet)

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

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


Change subject: Made RefreshCdbJsonFiles include newlines in the JSON
..

Made RefreshCdbJsonFiles include newlines in the JSON

* This makes the output more readable and is nice if the
  files ever end up in some deployment git repo

Change-Id: I639c506ad58a3cd98eefe286c4237377006e9437
---
M files/scap/refreshCdbJsonFiles
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/104762/1

diff --git a/files/scap/refreshCdbJsonFiles b/files/scap/refreshCdbJsonFiles
index a88217f..9fd4c13 100755
--- a/files/scap/refreshCdbJsonFiles
+++ b/files/scap/refreshCdbJsonFiles
@@ -181,7 +181,7 @@
if ( $first ) {
$first = false;
} else {
-   $data = ',' . $data;
+   $data = ,\n . $data;
}
fwrite( $jsonHandle, $data );
$bytes += strlen( $data );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I639c506ad58a3cd98eefe286c4237377006e9437
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] Add RunningStat class, tests - change (mediawiki/core)

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

Change subject: Add RunningStat class, tests
..


Add RunningStat class, tests

RunningStat computes the central tendency, shape, and extrema of a set of
points online, in constant space. It uses a neat one-pass algorithm for
calculating variance, described here:
  en.wikipedia.org/wiki/Algorithms_for_calculating_variance#On-line_algorithm

This particular implementation adapts a sample C++ implementation by John D.
Cook to PHP. See http://www.johndcook.com/standard_deviation.html and
  http://www.johndcook.com/skewness_kurtosis.html.

RunningStat instances can be combined. The resultant RunningStat has the same
state it would have had if it had been used to accumulate each point. This
property is attractive because it allows separate threads of execution to
process a stream in parallel. More importantly, individual points can be
accumulated in stages, without loss of fidelity, at intermediate points in the
aggregation process. JavaScript profiling samples can be accumulated in the
user's browser and be combined with measurements from other browsers on the
profiling data aggregator. Functions that are called multiple times in the
course of a profiled web request can be accumulated in MediaWiki prior to being
transmitted to the profiling data aggregator.

Usage will be introduced in a dependent commit.

Change-Id: Ifedda276dfe8e0783cb8c4a95626e2aedd4ad368
---
M includes/AutoLoader.php
A includes/profiler/RunningStat.php
A tests/phpunit/includes/RunningStatTest.php
3 files changed, 258 insertions(+), 0 deletions(-)

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



diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index b172f71..1f81249 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -185,6 +185,7 @@
'Revision' = 'includes/Revision.php',
'RevisionList' = 'includes/RevisionList.php',
'RSSFeed' = 'includes/Feed.php',
+   'RunningStat' = 'includes/profiler/RunningStat.php',
'Sanitizer' = 'includes/Sanitizer.php',
'SiteConfiguration' = 'includes/SiteConfiguration.php',
'SiteStats' = 'includes/SiteStats.php',
diff --git a/includes/profiler/RunningStat.php 
b/includes/profiler/RunningStat.php
new file mode 100644
index 000..dda5254
--- /dev/null
+++ b/includes/profiler/RunningStat.php
@@ -0,0 +1,176 @@
+?php
+/**
+ * Compute running mean, variance, and extrema of a stream of numbers.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Profiler
+ */
+
+// Needed due to PHP non-bug https://bugs.php.net/bug.php?id=49828.
+define( 'NEGATIVE_INF', -INF );
+
+/**
+ * Represents a running summary of a stream of numbers.
+ *
+ * RunningStat instances are accumulator-like objects that provide a set of
+ * continuously-updated summary statistics for a stream of numbers, without
+ * requiring that each value be stored. The measures it provides are the
+ * arithmetic mean, variance, standard deviation, and extrema (min and max);
+ * together they describe the central tendency and statistical dispersion of a
+ * set of values.
+ *
+ * One RunningStat instance can be merged into another; the resultant
+ * RunningStat has the state it would have had if it had accumulated each
+ * individual point. This allows data to be summarized in parallel and in
+ * stages without loss of fidelity.
+ *
+ * Based on a C++ implementation by John D. Cook:
+ *  http://www.johndcook.com/standard_deviation.html
+ *  http://www.johndcook.com/skewness_kurtosis.html
+ *
+ * The in-line documentation for this class incorporates content from the
+ * English Wikipedia articles Variance, Algorithms for calculating
+ * variance, and Standard deviation.
+ *
+ * @since 1.23
+ */
+class RunningStat implements Countable {
+
+   /** @var int Number of samples. **/
+   public $n = 0;
+
+   /** @var float The first moment (or mean, or expected value). **/
+   public $m1 = 0.0;
+
+   /** @var float The second central moment (or variance). **/
+   public $m2 = 0.0;
+
+   /** @var float The least value in the the set. **/
+   public $min = INF;
+
+   

[MediaWiki-commits] [Gerrit] Prioritize priority CirrusSearch jobs - change (operations/puppet)

2013-12-31 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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


Change subject: Prioritize priority CirrusSearch jobs
..

Prioritize priority CirrusSearch jobs

Change-Id: If8c330d715bee3c4fd3e5809206e7ea19eff5c09
---
M modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/104763/1

diff --git a/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb 
b/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb
index ed9e9a6..5a72fc5 100755
--- a/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb
+++ b/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb
@@ -210,6 +210,7 @@
hpriotypes=$hpriotypes TranslateRenderJob TranslateMoveJob 
TranslateDeleteJob # translate
hpriotypes=$hpriotypes uploadFromUrl # upload
hpriotypes=$hpriotypes MassMessageJob MassMessageSubmitJob # 
MassMessage
+   hpriotypes=$hpriotypes cirrusSearchLinksUpdatePrioritized # 
CirrusSearch priority jobs
(runJobsLoopService $hpriotypes y %= dprioprocs %) 
 
# Start loops for highly I/O bound jobs that work on special services 
(e.g. not the DBs)

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

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

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


[MediaWiki-commits] [Gerrit] Initial refactoring of WSP image support. - change (mediawiki...parsoid)

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

Change subject: Initial refactoring of WSP image support.
..


Initial refactoring of WSP image support.

We banish the huge wall of var declarations and move the declarations closer
to the uses.  This helps us see the scope of some of the variables and
identify some unused variables.

We also rework the initial identify the DOM structure code to match the
One True Structure of images, and give the four parts better names.
This simplifies some crazy DOM manipulation and confines it to the
start of the function.

This version of the code should be functionally identical to the previous
version (bugs and all) although it should be a little bit more reliable
when picking out figure structure from arbitrary input.

Still left to do: break apart the actual option parsing and make it
clear where we are using data-parsoid as a crutch.

Change-Id: I30184edf9c55cce6b4449a3ac397823be745827e
---
M lib/mediawiki.WikitextSerializer.js
1 file changed, 88 insertions(+), 68 deletions(-)

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



diff --git a/lib/mediawiki.WikitextSerializer.js 
b/lib/mediawiki.WikitextSerializer.js
index 5429216..719089b 100644
--- a/lib/mediawiki.WikitextSerializer.js
+++ b/lib/mediawiki.WikitextSerializer.js
@@ -1468,6 +1468,7 @@
 
case 'caption':
// Assume that the caption is straight text...that may 
not work long-term
+   // XXX FIX ME XXX
if ( capNode ) {
state.inCaption = true;
val = state.serializeChildrenToString( capNode, 
this.wteHandlers.wikilinkHandler, false );
@@ -1583,84 +1584,95 @@
 
 // XXX: This should probably be refactored. -rsmith
 WSP.handleImage = function ( node, state, cb ) {
-   var isDefaultSize, imgnode, linkinfo,
-   ix, curOpt, href, src,
-   width, height, wrapName,
-   filename, path, classes, currentClass, currentOpt,
-   htAttr, wdAttr, wrapdp,
-   options = [],
-   wikitext = '',
-   env = state.env,
-   mwAliases = env.conf.wiki.mwAliases,
-   rel = node.getAttribute( 'rel' ) || node.getAttribute( 'typeof' 
),
-   isFigure = node.tagName.toLowerCase() === 'figure',
-   dp = DU.getDataParsoid( node ),
-   dmw = DU.getDataMw( node ),
-   opts = dp.optList || [],
-   wrapNode = node.firstChild,
-   capNode = node.getElementsByTagName( 'figcaption' )[0];
+   var env = state.env,
+   mwAliases = env.conf.wiki.mwAliases;
 
-   if (null === wrapNode) {
-   console.error( WARNING: In WSP.handleImage, the following node 
has no children: );
-   console.error( node.outerHTML );
-   cb( '', node );
-   return;
+   // All figures have a fixed structure:
+   //
+   // figure or span typeof=mw:Image...
+   //  a or spanimg ...a or span
+   //  figcaption or span/figcaption
+   // /figure or span
+   //
+   // Pull out this fixed structure, being as generous as possible with
+   // possibly-broken HTML.
+   var outerElt = node;
+   var imgElt = node.querySelector('IMG'); // first IMG tag
+   var linkElt = null;
+   // parent of img is probably the linkElt
+   if (imgElt 
+   imgElt.parentElement !== outerElt 
+   /^(A|SPAN)$/.test(imgElt.parentElement.tagName)) {
+   linkElt = imgElt.parentElement;
}
-
-   while ( !DU.isElt(wrapNode) ) {
-   wrapNode = wrapNode.nextSibling;
-   }
-
-   wrapName = wrapNode.tagName.toLowerCase();
-
-   if ( wrapNode.hasAttribute( 'data-parsoid' ) ) {
-   wrapdp = DU.getDataParsoid( node );
-   }
-
-   if ( wrapName === 'a' ) {
-   href = wrapNode.getAttribute( 'href' );
-   }
-
-   imgnode = wrapNode.getElementsByTagName( 'img' )[0];
-
-   if ( imgnode.hasAttribute( 'resource' ) ) {
-   filename = this.serializedAttrVal( imgnode, 'resource' );
-   if ( filename.modified || !filename.value ) {
-   filename = imgnode.getAttribute( 'resource' ).replace( 
/^(\.\.?\/)+/, '' );
-   } else {
-   filename = filename.value;
+   // FIGCAPTION or last child (which is not the linkElt) is the caption.
+   var captionElt = node.querySelector('FIGCAPTION');
+   if (!captionElt) {
+   for (captionElt = node.lastElementChild;
+captionElt;
+captionElt = captionElt.previousElementSibling) {
+   if (captionElt !== linkElt  captionElt !== imgElt 
+ 

  1   2   >