[MediaWiki-commits] [Gerrit] Drop NFS support - change (mediawiki/vagrant)

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

Change subject: Drop NFS support
..


Drop NFS support

I found Vagrant's integration with NFS to be unreliable. Deciding whether or
not to use it at run-time will entail supporting two rather divergent setups,
each of which is likely to exhibit its own set of problems. Reliability and
portability trumps performance, so I'm switching to exclusively using
VirtualBox Shared Folders by default. It's still possible to make a simple edit
to the Vagrantfile to get NFS, but I won't support it.

Change-Id: I31a24d94f6f207010901831e0fa6547b3a6f5d46
---
M Vagrantfile
1 file changed, 2 insertions(+), 9 deletions(-)

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



diff --git a/Vagrantfile b/Vagrantfile
index 403bbfd..9230093 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -1,11 +1,6 @@
 # -*- mode: ruby -*-
 # vi: set ft=ruby :
 
-# Check if the host environment supports NFS.
-def host_supports_nfs?
-system( '( nfsstat || nfsiostat ) /dev/null' ) and not $?.exitstatus
-end
-
 Vagrant.configure('2') do |config|
 
 config.vm.hostname = 'mediawiki-vagrant'
@@ -26,15 +21,13 @@
 config.vm.synced_folder '.', '/vagrant',
 owner: 'vagrant',
 group: 'www-data',
-extra: 'dmode=770,fmode=770',
-nfs: host_supports_nfs?
+extra: 'dmode=770,fmode=770'
 
 config.vm.synced_folder 'mediawiki', '/var/www/w',
 owner: 'vagrant',
 group: 'www-data',
 extra: 'dmode=770,fmode=770',
-create: true,
-nfs: host_supports_nfs?
+create: true
 
 config.vm.provider :virtualbox do |vb|
 # See http://www.virtualbox.org/manual/ch08.html for additional 
options.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I31a24d94f6f207010901831e0fa6547b3a6f5d46
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: 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] Refactored use of $wgMemc in JobQueueDB to use a field. - change (mediawiki/core)

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

Change subject: Refactored use of $wgMemc in JobQueueDB to use a field.
..


Refactored use of $wgMemc in JobQueueDB to use a field.

* Also made sure it avoids SqlBagOStuff for sanity.

Change-Id: If39784567392a8a2c8a0787447267d73a0aeb0f2
---
M includes/job/JobQueueDB.php
1 file changed, 27 insertions(+), 35 deletions(-)

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



diff --git a/includes/job/JobQueueDB.php b/includes/job/JobQueueDB.php
index 4b22e94..379f010 100644
--- a/includes/job/JobQueueDB.php
+++ b/includes/job/JobQueueDB.php
@@ -34,6 +34,9 @@
const MAX_JOB_RANDOM = 2147483647; // integer; 2^31 - 1, used for 
job_random
const MAX_OFFSET = 255; // integer; maximum number of rows to skip
 
+   /** @var BagOStuff */
+   protected $cache;
+
protected $cluster = false; // string; name of an external DB cluster
 
/**
@@ -45,8 +48,13 @@
 * @param $params array
 */
protected function __construct( array $params ) {
+   global $wgMemc;
+
parent::__construct( $params );
+
$this-cluster = isset( $params['cluster'] ) ? 
$params['cluster'] : false;
+   // Make sure that we don't use the SQL cache, which would be 
harmful
+   $this-cache = ( $wgMemc instanceof SqlBagOStuff ) ? new 
EmptyBagOStuff() : $wgMemc;
}
 
protected function supportedOrders() {
@@ -62,11 +70,9 @@
 * @return bool
 */
protected function doIsEmpty() {
-   global $wgMemc;
-
$key = $this-getCacheKey( 'empty' );
 
-   $isEmpty = $wgMemc-get( $key );
+   $isEmpty = $this-cache-get( $key );
if ( $isEmpty === 'true' ) {
return true;
} elseif ( $isEmpty === 'false' ) {
@@ -77,7 +83,7 @@
$found = $dbr-selectField( // unclaimed job
'job', '1', array( 'job_cmd' = $this-type, 
'job_token' = '' ), __METHOD__
);
-   $wgMemc-add( $key, $found ? 'false' : 'true', 
self::CACHE_TTL_LONG );
+   $this-cache-add( $key, $found ? 'false' : 'true', 
self::CACHE_TTL_LONG );
 
return !$found;
}
@@ -87,11 +93,9 @@
 * @return integer
 */
protected function doGetSize() {
-   global $wgMemc;
-
$key = $this-getCacheKey( 'size' );
 
-   $size = $wgMemc-get( $key );
+   $size = $this-cache-get( $key );
if ( is_int( $size ) ) {
return $size;
}
@@ -101,7 +105,7 @@
array( 'job_cmd' = $this-type, 'job_token' = '' ),
__METHOD__
);
-   $wgMemc-set( $key, $size, self::CACHE_TTL_SHORT );
+   $this-cache-set( $key, $size, self::CACHE_TTL_SHORT );
 
return $size;
}
@@ -111,15 +115,13 @@
 * @return integer
 */
protected function doGetAcquiredCount() {
-   global $wgMemc;
-
if ( $this-claimTTL = 0 ) {
return 0; // no acknowledgements
}
 
$key = $this-getCacheKey( 'acquiredcount' );
 
-   $count = $wgMemc-get( $key );
+   $count = $this-cache-get( $key );
if ( is_int( $count ) ) {
return $count;
}
@@ -129,7 +131,7 @@
array( 'job_cmd' = $this-type, job_token != 
{$dbr-addQuotes( '' )} ),
__METHOD__
);
-   $wgMemc-set( $key, $count, self::CACHE_TTL_SHORT );
+   $this-cache-set( $key, $count, self::CACHE_TTL_SHORT );
 
return $count;
}
@@ -159,12 +161,11 @@
 
$key = $this-getCacheKey( 'empty' );
$atomic = ( $flags  self::QoS_Atomic );
+   $cache = $this-cache;
 
$dbw-onTransactionIdle(
-   function() use ( $dbw, $rowSet, $rowList, 
$atomic, $key, $scope
+   function() use ( $dbw, $cache, $rowSet, 
$rowList, $atomic, $key, $scope
) {
-   global $wgMemc;
-
if ( $atomic ) {
$dbw-begin( __METHOD__ ); // wrap all 
the job additions in one transaction
}
@@ -203,7 +204,7 @@
$dbw-commit( __METHOD__ );
}
 
-   $wgMemc-set( $key, 'false', 
JobQueueDB::CACHE_TTL_LONG );
+   $cache-set( $key, 'false', 

[MediaWiki-commits] [Gerrit] (Bug 46570) - [TUX] Editor width is very limited in page vie... - change (mediawiki...Translate)

2013-03-28 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: (Bug 46570) - [TUX] Editor width is very limited in page view 
mode
..

(Bug 46570) - [TUX] Editor width is very limited in page view mode

Change-Id: I9a2729ba4d338ab4d2f5d16555d56181bfbeb3ac
---
M resources/css/ext.translate.pagemode.css
M resources/css/ext.translate.proofread.css
M resources/js/ext.translate.editor.js
M resources/js/ext.translate.messagetable.js
M resources/js/ext.translate.pagemode.js
M resources/js/ext.translate.proofread.js
6 files changed, 83 insertions(+), 58 deletions(-)


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

diff --git a/resources/css/ext.translate.pagemode.css 
b/resources/css/ext.translate.pagemode.css
index 8d72124..4d8aa06 100644
--- a/resources/css/ext.translate.pagemode.css
+++ b/resources/css/ext.translate.pagemode.css
@@ -1,28 +1,35 @@
 .ext-translate-container .tux-messagelist .tux-message-pagemode {
height: auto;
min-height: 50px;
-   padding: 40px 0;
margin: 0 auto;
+   vertical-align: middle;
+   background: #FF;
+}
+
+.ext-translate-container .tux-messagelist .tux-message-pagemode 
.tux-message-item-compact {
+   padding: 40px 0;
+   line-height: 50px;
+   overflow: hidden;
+   margin-right: auto;
+   margin-left: auto;
vertical-align: middle;
border-bottom: 1px solid #f0f0f0;
border-left: 1px solid #DD;
border-right: 1px solid #DD;
-   max-width: 900px;
background: #FF;
+   max-width: 900px;
 }
 
-.ext-translate-container .tux-messagelist .tux-message-pagemode:hover {
+.ext-translate-container .tux-messagelist .tux-message-pagemode 
.tux-message-item-compact:hover {
background: #FCFCFC;
 }
 
 .ext-translate-container .tux-messagelist .tux-message-pagemode:first-child {
-   margin-top: 10px;
padding-top: 60px;
border-top: 1px solid #DD;
 }
 
 .ext-translate-container .tux-messagelist .tux-message-pagemode:last-child {
-   margin-bottom: 10px;
padding-bottom: 60px;
border-bottom: 1px solid #DD;
 }
diff --git a/resources/css/ext.translate.proofread.css 
b/resources/css/ext.translate.proofread.css
index 0a4f253..e1ad24f 100644
--- a/resources/css/ext.translate.proofread.css
+++ b/resources/css/ext.translate.proofread.css
@@ -1,16 +1,26 @@
 .ext-translate-container .tux-messagelist .tux-message-proofread {
height: auto;
min-height: 50px;
-   padding: 40px 0;
margin: 0 auto;
+   vertical-align: middle;
+   background: #FF;
+}
+
+.ext-translate-container .tux-messagelist .tux-message-proofread 
.tux-message-item-compact {
+   padding: 40px 0;
+   line-height: 50px;
+   overflow: hidden;
+   margin-right: auto;
+   margin-left: auto;
vertical-align: middle;
border-bottom: 1px solid #f0f0f0;
border-left: 1px solid #DD;
border-right: 1px solid #DD;
-   max-width: 900px;
background: #FF;
+   max-width: 900px;
 }
 
+
 .ext-translate-container .tux-messagelist .tux-message-proofread:hover {
background: #FCFCFC;
 }
diff --git a/resources/js/ext.translate.editor.js 
b/resources/js/ext.translate.editor.js
index e3797b5..41cb21d 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -6,7 +6,7 @@
this.$editor = null;
this.options = options;
this.message = this.options.message;
-   this.$messageItem = this.$editTrigger.find( '.tux-message-item' 
);
+   this.$messageItem = this.$editTrigger.find( '.message' );
this.shown = false;
this.dirty = false;
this.saving = false;
diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index b99457f..145c649 100644
--- a/resources/js/ext.translate.messagetable.js
+++ b/resources/js/ext.translate.messagetable.js
@@ -192,7 +192,7 @@
.data( 'message', message );
 
$message = $( 'div' )
-   .addClass( 'row tux-message-item ' + status )
+   .addClass( 'row message tux-message-item ' + 
status )
.append(
$( 'div' )
.addClass( 'eight columns 
tux-list-message' )
diff --git a/resources/js/ext.translate.pagemode.js 
b/resources/js/ext.translate.pagemode.js
index 3af106e..316768b 100644
--- a/resources/js/ext.translate.pagemode.js
+++ b/resources/js/ext.translate.pagemode.js
@@ -45,24 +45,28 @@
 
this.$message.append(
$( 'div' )
-  

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

2013-03-28 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: [ZeroRatedMobileAccess] Add new optional key
..

[ZeroRatedMobileAccess] Add new optional key

Change-Id: I7f2b5eca6942e1a6985663ca0a1893490dd7337c
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/69/56369/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 1b0bfa6..885d443 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1706,4 +1706,4 @@
 optional = zero-rated-mobile-access-banner-carrier-name-orange-botswana, 
zero-rated-mobile-access-banner-carrier-name-hello-cambodia
 optional = zero-rated-mobile-access-banner-carrier-name-celcom-malaysia, 
zero-rated-mobile-access-banner-carrier-name-xl-axiata
 optional = zero-rated-mobile-access-banner-carrier-name-vimpelcom-beeline, 
zero-rated-mobile-access-banner-carrier-name-orange-meditel-morocco
-optional = 
zero-rated-mobile-access-banner-carrier-name-orange-central-african-republic
+optional = 
zero-rated-mobile-access-banner-carrier-name-orange-central-african-republic, 
zero-rated-mobile-access-banner-carrier-name-vimpelcom-mobilink-pakistan

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

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

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


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

2013-03-28 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [ZeroRatedMobileAccess] Add new optional key
..


[ZeroRatedMobileAccess] Add new optional key

Change-Id: I7f2b5eca6942e1a6985663ca0a1893490dd7337c
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 1b0bfa6..885d443 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1706,4 +1706,4 @@
 optional = zero-rated-mobile-access-banner-carrier-name-orange-botswana, 
zero-rated-mobile-access-banner-carrier-name-hello-cambodia
 optional = zero-rated-mobile-access-banner-carrier-name-celcom-malaysia, 
zero-rated-mobile-access-banner-carrier-name-xl-axiata
 optional = zero-rated-mobile-access-banner-carrier-name-vimpelcom-beeline, 
zero-rated-mobile-access-banner-carrier-name-orange-meditel-morocco
-optional = 
zero-rated-mobile-access-banner-carrier-name-orange-central-african-republic
+optional = 
zero-rated-mobile-access-banner-carrier-name-orange-central-african-republic, 
zero-rated-mobile-access-banner-carrier-name-vimpelcom-mobilink-pakistan

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f2b5eca6942e1a6985663ca0a1893490dd7337c
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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] Use get_class( $this ) instead of __CLASS__ in RedirectSpeci... - change (mediawiki/core)

2013-03-28 Thread IAlex (Code Review)
IAlex has uploaded a new change for review.

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


Change subject: Use get_class( $this ) instead of __CLASS__ in 
RedirectSpecialPage::execute()
..

Use get_class( $this ) instead of __CLASS__ in RedirectSpecialPage::execute()

So that it returns the subclass name and not always RedirectSpecialPage.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/56370/1

diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php
index 38b7d3e..46d4304 100644
--- a/includes/SpecialPage.php
+++ b/includes/SpecialPage.php
@@ -1100,7 +1100,7 @@
$this-getOutput()-redirect( $url );
return $redirect;
} else {
-   $class = __CLASS__;
+   $class = get_class( $this );
throw new MWException( RedirectSpecialPage $class 
doesn't redirect! );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibee18bc75e423e8874f9254da7cec59839ba15af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch

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


[MediaWiki-commits] [Gerrit] Check protection status of titles in details step. - change (mediawiki...UploadWizard)

2013-03-28 Thread Nischayn22 (Code Review)
Nischayn22 has uploaded a new change for review.

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


Change subject: Check protection status of titles in details step.
..

Check protection status of titles in details step.

Improved version of https://gerrit.wikimedia.org/r/23007 Thanks to DJ for
that patch.

Note: This is still not verified, I have to find a way to protect certain
titles to test this yet.

Bug 37107

Change-Id: Ic951851ddb46b5a80af0ef4ce248a3fdb46ea1b4
---
M resources/mw.DestinationChecker.js
M resources/mw.UploadWizardDetails.js
2 files changed, 20 insertions(+), 5 deletions(-)


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

diff --git a/resources/mw.DestinationChecker.js 
b/resources/mw.DestinationChecker.js
index 38a43ba..5880cdf 100644
--- a/resources/mw.DestinationChecker.js
+++ b/resources/mw.DestinationChecker.js
@@ -208,7 +208,8 @@
// XXX do not use iiurlwidth as it will create a thumbnail
var params = {
'titles': title,
-   'prop':  'imageinfo',
+   'prop':  'info|imageinfo',
+   'inprop': 'protection',
'iiprop': 'url|mime|size',
'iiurlwidth': 150
};
@@ -236,9 +237,20 @@
// If file found on another repository, such as when 
the wiki is using InstantCommons: page with a key of -1, plus imageinfo
// If file found on this repository: page with some 
positive numeric key
if ( data.query.pages[-1]  
!data.query.pages[-1].imageinfo ) {
-   // No conflict found on any repository this 
wiki uses
-   result = { isUnique: true };
-
+   if ( data.query.pages[-1].protection ) {
+   var protection = 
data.query.pages[-1].protection;
+   $.each( protection, function( 
i, val ) {
+   if ( !$.inArray( 
val.level, mw.config.get( 'wgUserGroups' ) ) ) {
+   result = {
+   
isUnique: true,
+   
isProtected: true
+   };
+   }
+   } );
+   } else {
+   // No conflict found on any repository 
this wiki uses
+   result = { isUnique: true };
+   }
} else {
 
for ( var page_id in data.query.pages ) {
diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index 65956f4..d7771fd 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -733,7 +733,7 @@
var _this = this;
var $errorEl = _this.$form.find( 'label[for=' + _this.titleId + 
'].errorTitleUnique' );
 
-   if ( result.unique.isUnique  result.blacklist.notBlacklisted 
) {
+   if ( result.unique.isUnique  result.blacklist.notBlacklisted 
 !result.unique.isProtected ) {
$j( _this.titleInput ).data( 'valid', true );
$errorEl.hide().empty();
_this.ignoreWarningsInput = undefined;
@@ -762,6 +762,9 @@
}
 
$errorEl.html( errHtml ).show();
+   } else if ( result.unique.isProtected ) {
+   errHtml = mw.msg( 'mwe-upwiz-error-title-protected' );
+   $errorEl.html( errHtml );
} else {
errHtml = gM( 'mwe-upwiz-blacklisted', titleString );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic951851ddb46b5a80af0ef4ce248a3fdb46ea1b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 nischay...@gmail.com

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


[MediaWiki-commits] [Gerrit] Prevent PHP notice by adding isset() check - change (mediawiki/core)

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

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


Change subject: Prevent PHP notice by adding isset() check
..

Prevent PHP notice by adding isset() check

Bug: 46627
Change-Id: Ida87efc622e9e90b835473f069559817565eafc1
---
M includes/WebRequest.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/56372/1

diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 30a51b0..739340c 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -654,10 +654,12 @@
if( $hash !== false ) {
$base = substr( $base, 0, $hash );
}
+
if( $base[0] == '/' ) {
-   if( $base[1] == '/' ) { /* More than one slash will 
look like it is protocol relative */
+   if( isset( $base[1] )  $base[1] == '/' ) { /* More 
than one slash will look like it is protocol relative */
return preg_replace( '!//*!', '/', $base );
}
+
return $base;
} else {
// We may get paths with a host prepended; strip it.

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

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

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


[MediaWiki-commits] [Gerrit] API: Set uselang as allowed param in ApiMain and document it - change (mediawiki/core)

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

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


Change subject: API: Set uselang as allowed param in ApiMain and document it
..

API: Set uselang as allowed param in ApiMain and document it

The uselang parameter is handled low level in RequestContext. But the
api will report a Unrecognized parameter warning, which is wrong,
because some api modules has effects on uselang.

Removed the safeguard in apiparse and apiwatch, because uselang
parameter and the context param is always the same.

Change-Id: Ieef40bc64b90d7793102ee48f36b00cd3d4a86fb
---
M includes/api/ApiMain.php
M includes/api/ApiParse.php
M includes/api/ApiWatch.php
3 files changed, 2 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/56373/1

diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index a6813e3..a14f334 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -1022,6 +1022,7 @@
'requestid' = null,
'servedby'  = false,
'origin' = null,
+   'uselang' = null, # handled and validated low level in 
RequestContext
);
}
 
@@ -1052,6 +1053,7 @@
'If this parameter does not match the Origin: 
header, a 403 response will be returned.',
'If this parameter matches the Origin: header 
and the origin is whitelisted, an Access-Control-Allow-Origin header will be 
set.',
),
+   'uselang' = 'User language to use, when parsing html 
or messages for result',
);
}
 
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 09b7a88..0579900 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -68,13 +68,6 @@
// TODO: Does this still need $wgTitle?
global $wgParser, $wgTitle;
 
-   // Currently unnecessary, code to act as a safeguard against 
any change in current behavior of uselang
-   $oldLang = null;
-   if ( isset( $params['uselang'] )  $params['uselang'] != 
$this-getContext()-getLanguage()-getCode() ) {
-   $oldLang = $this-getContext()-getLanguage(); // 
Backup language
-   $this-getContext()-setLanguage( Language::factory( 
$params['uselang'] ) );
-   }
-
$redirValues = null;
 
// Return result
@@ -339,10 +332,6 @@
);
$this-setIndexedTagNames( $result_array, $result_mapping );
$result-addValue( null, $this-getModuleName(), $result_array 
);
-
-   if ( !is_null( $oldLang ) ) {
-   $this-getContext()-setLanguage( $oldLang ); // Reset 
language to $oldLang
-   }
}
 
/**
@@ -575,7 +564,6 @@
),
'pst' = false,
'onlypst' = false,
-   'uselang' = null,
'section' = null,
'disablepp' = false,
'generatexml' = false,
@@ -626,7 +614,6 @@
'Do a pre-save transform (PST) on the input, 
but don\'t parse it',
'Returns the same wikitext, after a PST has 
been applied. Ignored if page, pageid or oldid is used'
),
-   'uselang' = 'Which language to parse the request in',
'section' = 'Only retrieve the content of this section 
number',
'disablepp' = 'Disable the PP Report from the parser 
output',
'generatexml' = 'Generate XML parse tree (requires 
prop=wikitext)',
diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php
index 3e51299..0e82711 100644
--- a/includes/api/ApiWatch.php
+++ b/includes/api/ApiWatch.php
@@ -46,14 +46,6 @@
 
$res = array( 'title' = $title-getPrefixedText() );
 
-   // Currently unnecessary, code to act as a safeguard against 
any change in current behavior of uselang
-   // Copy from ApiParse
-   $oldLang = null;
-   if ( isset( $params['uselang'] )  $params['uselang'] != 
$this-getContext()-getLanguage()-getCode() ) {
-   $oldLang = $this-getContext()-getLanguage(); // 
Backup language
-   $this-getContext()-setLanguage( Language::factory( 
$params['uselang'] ) );
-   }
-
if ( $params['unwatch'] ) {
$res['unwatched'] = '';
$res['message'] = $this-msg( 'removedwatchtext', 
$title-getPrefixedText() )-title( $title )-parseAsBlock();
@@ -62,10 +54,6 @@
$res['watched'] 

[MediaWiki-commits] [Gerrit] Indentation fix - Minor - change (mediawiki...Translate)

2013-03-28 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: Indentation fix - Minor
..

Indentation fix - Minor

Change-Id: I6c1d42e44d30ba44c1ba4c9cb939cc5db464b7f5
---
M resources/js/ext.translate.editor.js
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/resources/js/ext.translate.editor.js 
b/resources/js/ext.translate.editor.js
index e3797b5..3837b0a 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -120,10 +120,10 @@
 
translateEditor.saving = true;
 
-   // beforeSave callback
-   if ( translateEditor.options.beforeSave ) {
-   translateEditor.options.beforeSave( 
translation );
-   }
+   // beforeSave callback
+   if ( translateEditor.options.beforeSave ) {
+   translateEditor.options.beforeSave( translation 
);
+   }
 
// For responsiveness and efficiency,
// immediately move to the next message.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c1d42e44d30ba44c1ba4c9cb939cc5db464b7f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Indentation fix - Minor - change (mediawiki...Translate)

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

Change subject: Indentation fix - Minor
..


Indentation fix - Minor

Change-Id: I6c1d42e44d30ba44c1ba4c9cb939cc5db464b7f5
---
M resources/js/ext.translate.editor.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/resources/js/ext.translate.editor.js 
b/resources/js/ext.translate.editor.js
index e3797b5..3837b0a 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -120,10 +120,10 @@
 
translateEditor.saving = true;
 
-   // beforeSave callback
-   if ( translateEditor.options.beforeSave ) {
-   translateEditor.options.beforeSave( 
translation );
-   }
+   // beforeSave callback
+   if ( translateEditor.options.beforeSave ) {
+   translateEditor.options.beforeSave( translation 
);
+   }
 
// For responsiveness and efficiency,
// immediately move to the next message.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c1d42e44d30ba44c1ba4c9cb939cc5db464b7f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Move isWelcomeCreation to GettingStarted. - change (mediawiki...E3Experiments)

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

Change subject: Move isWelcomeCreation to GettingStarted.
..


Move isWelcomeCreation to GettingStarted.

Change-Id: I30e1a3aab1186a84ddabd2893d82668d60ceb374
---
M E3Experiments.hooks.php
M E3Experiments.php
2 files changed, 0 insertions(+), 30 deletions(-)

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



diff --git a/E3Experiments.hooks.php b/E3Experiments.hooks.php
index cb5a67c..f5b18bf 100644
--- a/E3Experiments.hooks.php
+++ b/E3Experiments.hooks.php
@@ -7,24 +7,6 @@
  */
 
 class E3ExperimentsHooks {
-
-   public static $isWelcomeCreation = false;
-
-   /**
-* MakeGlobalVariablesScript hook.
-* Add config vars to mw.config.
-*
-* @param $vars array
-* @param $out OutputPage output page
-* @return bool
-*/
-   public static function onMakeGlobalVariablesScript( $vars, $out ) {
-   if ( self::$isWelcomeCreation ) {
-   $vars[ 'wgIsWelcomeCreation' ] = true;
-   }
-   return true;
-   }
-
/**
 * ResourceLoaderGetConfigVars hook
 * Sends down static config vars to JavaScript
@@ -50,16 +32,6 @@
public static function onUserCreateForm( $template ) {
global $wgOut;
$wgOut-addModules( 'ext.E3Experiments.acux' );
-   return true;
-   }
-
-   /*
-* BeforeWelcomeCreation hook
-* Its JS is only applicable to this one page, hence it's a
-* separate module.
-*/
-   public static function onBeforeWelcomeCreation( $welcomeCreationMsg, 
$injected_html ) {
-   self::$isWelcomeCreation = true;
return true;
}
 }
diff --git a/E3Experiments.php b/E3Experiments.php
index 1d47451..36c31f1 100644
--- a/E3Experiments.php
+++ b/E3Experiments.php
@@ -64,8 +64,6 @@
 );
 
 // Register hooks
-$wgHooks[ 'BeforeWelcomeCreation' ][] = 
'E3ExperimentsHooks::onBeforeWelcomeCreation';
-$wgHooks[ 'MakeGlobalVariablesScript' ][] = 
'E3ExperimentsHooks::onMakeGlobalVariablesScript';
 $wgHooks[ 'ResourceLoaderGetConfigVars' ][] = 
'E3ExperimentsHooks::onResourceLoaderGetConfigVars';
 $wgHooks[ 'UserCreateForm' ][] = 'E3ExperimentsHooks::onUserCreateForm';
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30e1a3aab1186a84ddabd2893d82668d60ceb374
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/E3Experiments
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
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] Move isWelcomeCreation from E3Experiments. - change (mediawiki...GettingStarted)

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

Change subject: Move isWelcomeCreation from E3Experiments.
..


Move isWelcomeCreation from E3Experiments.

Change-Id: Ib65409801f9c5c9cd9e92de5e2a146b0fe34f6d8
---
M GettingStarted.hooks.php
M GettingStarted.php
2 files changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/GettingStarted.hooks.php b/GettingStarted.hooks.php
index 433c5ea..68feb3c 100644
--- a/GettingStarted.hooks.php
+++ b/GettingStarted.hooks.php
@@ -7,6 +7,23 @@
  */
 
 class GettingStartedHooks {
+   public static $isWelcomeCreation = false;
+
+   /**
+* MakeGlobalVariablesScript hook.
+* Add config vars to mw.config.
+*
+* @param $vars array
+* @param $out OutputPage output page
+* @return bool
+*/
+   public static function onMakeGlobalVariablesScript( $vars, $out ) {
+   if ( self::$isWelcomeCreation ) {
+   $vars[ 'wgIsWelcomeCreation' ] = true;
+   }
+   return true;
+   }
+
/**
 * Adds the openTask module to the page
 *
@@ -66,6 +83,8 @@
public static function onBeforeWelcomeCreation( $welcomeCreationMsg, 
$injectHtml ) {
global $wgOut, $wgUser;
 
+   self::$isWelcomeCreation = true;
+
// Do nothing on mobile.
if ( class_exists( 'MobileContext' ) ) {
if ( 
MobileContext::singleton()-shouldDisplayMobileView() ) {
diff --git a/GettingStarted.php b/GettingStarted.php
index 2b073dc..21194a9 100644
--- a/GettingStarted.php
+++ b/GettingStarted.php
@@ -152,3 +152,4 @@
 $wgHooks[ 'CategoryAfterPageRemoved' ][] = 
'RedisCategorySync::onCategoryAfterPageRemoved';
 $wgHooks[ 'LinksUpdateComplete' ][] = 
'RedisCategorySync::onLinksUpdateComplete';
 $wgHooks[ 'ListDefinedTags' ][] = 'GettingStartedHooks::onListDefinedTags';
+$wgHooks[ 'MakeGlobalVariablesScript' ][] = 
'GettingStartedHooks::onMakeGlobalVariablesScript';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib65409801f9c5c9cd9e92de5e2a146b0fe34f6d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Swalling swall...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Move getIcon method to TranslateUtils - change (mediawiki...Translate)

2013-03-28 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: Move getIcon method to TranslateUtils
..

Move getIcon method to TranslateUtils

It need to be reused in multiple places now

Change-Id: I24fb73e31ab9433bb6046014e5e6937910a8f8e4
---
M TranslateUtils.php
M api/ApiQueryMessageGroups.php
2 files changed, 33 insertions(+), 30 deletions(-)


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

diff --git a/TranslateUtils.php b/TranslateUtils.php
index f655dc3..edef392 100644
--- a/TranslateUtils.php
+++ b/TranslateUtils.php
@@ -393,4 +393,36 @@
static $i = 0;
return \x7fUNIQ . dechex( mt_rand( 0, 0x7fff ) ) . 
dechex( mt_rand( 0, 0x7fff ) ) . '-' . $i++;
}
+
+   /**
+* For the give message group get the icons in vector and raster formats
+* @return array
+*/
+   public static function getIcon( MessageGroup $g, $size ) {
+   global $wgServer;
+   $icon = $g-getIcon();
+   if ( substr( $icon, 0, 7 ) !== 'wiki://' ) {
+   return null;
+   }
+
+   $formats = array();
+
+   $filename = substr( $icon, 7 );
+   $file = wfFindFile( $filename );
+   if ( !$file ) {
+   return null;
+   }
+
+   if ( $file-isVectorized() ) {
+   $formats['vector'] = $file-getUrl();
+   }
+
+   $formats['raster'] = $wgServer . $file-createThumb( $size, 
$size );
+
+   foreach ( $formats as $key = $url ) {
+   $url = wfExpandUrl( $url, PROTO_RELATIVE );
+   }
+
+   return $formats;
+   }
 }
diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php
index a2c5532..bfc99eb 100644
--- a/api/ApiQueryMessageGroups.php
+++ b/api/ApiQueryMessageGroups.php
@@ -129,7 +129,7 @@
}
 
if ( isset( $props['icon'] ) ) {
-   $formats = $this-getIcon( $g, $params['iconsize'] );
+   $formats = TranslateUtils::getIcon( $g, 
$params['iconsize'] );
if ( $formats ) {
$a['icon'] = $formats;
}
@@ -172,35 +172,6 @@
}
 
return $a;
-   }
-
-   protected function getIcon( MessageGroup $g, $size ) {
-   global $wgServer;
-   $icon = $g-getIcon();
-   if ( substr( $icon, 0, 7 ) !== 'wiki://' ) {
-   return null;
-   }
-
-   $formats = array();
-
-   $filename = substr( $icon, 7 );
-   $file = wfFindFile( $filename );
-   if ( !$file ) {
-   $this-setWarning( Unknown file $icon );
-   return null;
-   }
-
-   if ( $file-isVectorized() ) {
-   $formats['vector'] = $file-getUrl();
-   }
-
-   $formats['raster'] = $wgServer . $file-createThumb( $size, 
$size );
-
-   foreach ( $formats as $key = $url ) {
-   $url = wfExpandUrl( $url, PROTO_RELATIVE );
-   }
-
-   return $formats;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24fb73e31ab9433bb6046014e5e6937910a8f8e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Use getIcon utility method from Translate - change (translatewiki)

2013-03-28 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: Use getIcon utility method from Translate
..

Use getIcon utility method from Translate

Change-Id: I7182b9ca3bc138f99e3e7f23779210825e6a4f0d
Depends: I24fb73e31ab9433bb6046014e5e6937910a8f8e4
---
M MainPage/ProjectHandler.php
M MainPage/specials/SpecialTwnMainPage.php
2 files changed, 1 insertion(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/76/56376/1

diff --git a/MainPage/ProjectHandler.php b/MainPage/ProjectHandler.php
index b5c3163..413f71d 100644
--- a/MainPage/ProjectHandler.php
+++ b/MainPage/ProjectHandler.php
@@ -55,33 +55,4 @@
} );
}
 
-   // @todo FIXME: This is duplicate code Translate - 
ApiQueryMessageGroup. We can avoid
-   // duplication if we make getIcon of that API public static.
-   public static function getIcon( MessageGroup $g, $size ) {
-   global $wgServer;
-   $icon = $g-getIcon();
-   if ( substr( $icon, 0, 7 ) !== 'wiki://' ) {
-   return null;
-   }
-
-   $formats = array();
-
-   $filename = substr( $icon, 7 );
-   $file = wfFindFile( $filename );
-   if ( !$file ) {
-   return '';
-   }
-
-   if ( $file-isVectorized() ) {
-   $formats['vector'] = $file-getUrl();
-   }
-
-   $formats['raster'] = $wgServer . $file-createThumb( $size, 
$size );
-
-   foreach ( $formats as $key = $url ) {
-   $url = wfExpandUrl( $url, PROTO_RELATIVE );
-   }
-
-   return $formats;
-   }
 }
diff --git a/MainPage/specials/SpecialTwnMainPage.php 
b/MainPage/specials/SpecialTwnMainPage.php
index 7074a8b..e6c3be3 100644
--- a/MainPage/specials/SpecialTwnMainPage.php
+++ b/MainPage/specials/SpecialTwnMainPage.php
@@ -98,7 +98,7 @@
ProjectHandler::sortByPriority( $projects, 
$this-getLanguage()-getCode() );
 
foreach ( $projects as $group ) {
-   $urls = ProjectHandler::getIcon( $group, 100 );
+   $urls = TranslateUtils::getIcon( $group, 100 );
if ( isset( $urls['vector'] ) ) {
$url = $urls['vector'];
} elseif ( isset( $urls['raster'] ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7182b9ca3bc138f99e3e7f23779210825e6a4f0d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Algorithm for prioritizing projects - change (translatewiki)

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

Change subject: Algorithm for prioritizing projects
..


Algorithm for prioritizing projects

While displaying in main page we display
active projects first

Change-Id: I480cf26c76c61dc5ab426352db774bfd213f62c1
---
M MainPage/ProjectHandler.php
M MainPage/specials/SpecialTwnMainPage.php
2 files changed, 31 insertions(+), 0 deletions(-)

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



diff --git a/MainPage/ProjectHandler.php b/MainPage/ProjectHandler.php
index 5969596..b5c3163 100644
--- a/MainPage/ProjectHandler.php
+++ b/MainPage/ProjectHandler.php
@@ -26,6 +26,35 @@
return $projects;
}
 
+   /**
+* Sort the projects by to be determined algorithm. Like most sorting
+* functions in PHP this modifies passed list in place.
+* @param MessageGroup[] $groups
+* @param string $language Language code.
+*/
+   public static function sortByPriority( $groups, $language ) {
+   foreach ( $groups as $index = $g ) {
+   $supported = $g-getTranslatableLanguages();
+   if ( is_array( $supported )  !isset( 
$supported[$language] ) ) {
+   unset( $groups[$index] );
+   }
+   }
+
+   usort( $groups, function ( $a, $b ) use ( $language ) {
+   $aStats = MessageGroupStats::forItem( $a-getId(), 
$language );
+   $bStats = MessageGroupStats::forItem( $b-getId(), 
$language );
+
+   $aVal = $aStats[MessageGroupStats::PROOFREAD];
+   $bVal = $aStats[MessageGroupStats::PROOFREAD];
+
+   if ( $aVal === $bVal ) {
+   return 0;
+   } else {
+   return ($aVal  $bVal) ? -1 : 1;
+   }
+   } );
+   }
+
// @todo FIXME: This is duplicate code Translate - 
ApiQueryMessageGroup. We can avoid
// duplication if we make getIcon of that API public static.
public static function getIcon( MessageGroup $g, $size ) {
diff --git a/MainPage/specials/SpecialTwnMainPage.php 
b/MainPage/specials/SpecialTwnMainPage.php
index 34c8873..7074a8b 100644
--- a/MainPage/specials/SpecialTwnMainPage.php
+++ b/MainPage/specials/SpecialTwnMainPage.php
@@ -95,6 +95,8 @@
$out .= Html::openElement( 'div', array( 'class' = 'row 
twn-mainpage-project-tiles' ) );
 
$projects = ProjectHandler::getProjects();
+   ProjectHandler::sortByPriority( $projects, 
$this-getLanguage()-getCode() );
+
foreach ( $projects as $group ) {
$urls = ProjectHandler::getIcon( $group, 100 );
if ( isset( $urls['vector'] ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I480cf26c76c61dc5ab426352db774bfd213f62c1
Gerrit-PatchSet: 3
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@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] (bug 46624) Avoid fatal when undoing deleted rev. - change (mediawiki...Wikibase)

2013-03-28 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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


Change subject: (bug 46624) Avoid fatal when undoing deleted rev.
..

(bug 46624) Avoid fatal when undoing deleted rev.

An undo action that involved a revision that was delted, oversighted or 
otherwise
missing content triggered a fatal error. Added a check and nice error message.-

Change-Id: I37e82b999d7eea7cf3761960a3d3df467582a596
---
M repo/Wikibase.i18n.php
M repo/includes/actions/EditEntityAction.php
2 files changed, 17 insertions(+), 0 deletions(-)


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

diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 6a87374..8cb5d12 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -56,6 +56,7 @@
'wikibase-undo-samerev' = 'Cannot undo, same revision given for undo 
base and undo target.',
'wikibase-undo-badpage' = 'Bad revision: Revision $2 does not belong 
to [[$1]].',
'wikibase-undo-firstrev' = Cannot undo the page's creation,
+   'wikibase-undo-nocontent' = Cannot load content of revision $2 of 
page $1,
'wikibase-propertyedittool-full' = 'List of values is complete.',
'wikibase-ui-pendingquantitycounter-nonpending' = '$2 $1',
'wikibase-ui-pendingquantitycounter-pending' = '$2$3 $1',
@@ -493,6 +494,10 @@
 * $1 is the title of the page;
 * $2 is the revision id number.',
'wikibase-undo-firstrev' = Message shown when the user attempts to 
undo the very first revision of a page, that is, the page's creation.,
+   'wikibase-undo-nocontent' = Message shown when the content of one of 
the revisions needed for undo could not be loaded.
+This may happen if there is an error ion the storage backend, or if the 
respective revision has been hidden (oversighted) or deleted.
+* $1 is the title of the page;
+* $2 is the revision id number.,
'wikibase-propertyedittool-full' = 'A list of elements the user is 
assumed to enter is now complete.',
'wikibase-ui-pendingquantitycounter-nonpending' = Message for a 
generic counter which will display a quantity and of what nature that quantity 
is. Parameters:
 * $1 is the label of the counter's subject. E.g. 'sources' in an item's 
statement's references counter displayed in the heading above the references.
diff --git a/repo/includes/actions/EditEntityAction.php 
b/repo/includes/actions/EditEntityAction.php
index e822e93..0af55f6 100644
--- a/repo/includes/actions/EditEntityAction.php
+++ b/repo/includes/actions/EditEntityAction.php
@@ -130,6 +130,18 @@
return Status::newFatal( 'wikibase-undo-badpage', 
$this-getTitle(), $olderRevision-getId() );
}
 
+   if ( $olderRevision-getContent() === null ) {
+   return Status::newFatal( 'wikibase-undo-nocontent', 
$this-getTitle(), $olderRevision-getId() );
+   }
+
+   if ( $newerRevision-getContent() === null ) {
+   return Status::newFatal( 'wikibase-undo-nocontent', 
$this-getTitle(), $newerRevision-getId() );
+   }
+
+   if ( $latestRevision-getContent() === null ) {
+   return Status::newFatal( 'wikibase-undo-nocontent', 
$this-getTitle(), $latestRevision-getId() );
+   }
+
return Status::newGood( array(
$olderRevision, $newerRevision, $latestRevision,
) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37e82b999d7eea7cf3761960a3d3df467582a596
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] (bug 39075) Refactor the message formulation - change (mediawiki...TranslationNotifications)

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

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


Change subject: (bug 39075) Refactor the message formulation
..

(bug 39075) Refactor the message formulation

Put the message formulation in a separate function
to make previewing easier.

Change-Id: I99b54e6b032bb6ffb88a77f3d0eda648b587467c
---
M SpecialNotifyTranslators.php
M TranslationNotifications.i18n.php
2 files changed, 45 insertions(+), 29 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TranslationNotifications 
refs/changes/78/56378/1

diff --git a/SpecialNotifyTranslators.php b/SpecialNotifyTranslators.php
index 0056a09..67f698a 100644
--- a/SpecialNotifyTranslators.php
+++ b/SpecialNotifyTranslators.php
@@ -156,9 +156,7 @@
}
 
/**
-* Callback for the submit button.
-*
-* @todo Document
+* Callback for the send button.
 */
public function submitNotifyTranslatorsForm( $formData, $form ) {
$this-translatablePageTitle = Title::newFromID( 
$formData['TranslatablePage'] );
@@ -517,21 +515,25 @@
}
 
/**
-* Leave a message on the user's talk page.
+* Formulate the text to add to the user page.
 * @param User $user To whom the message to be sent
 * @param string[] $languagesToNotify A list of languages that are 
notified. Empty for all languages.
 * @param string $destination Whether to send it to a talk page on this 
wiki ('talkpageHere', default)
 *   or another one ('talkpageInOtherWiki').
-* @return boolean True if it was successful
+* @return string
 */
-   public function leaveUserMessage(
+   protected function userTalkPageText(
User $user,
$languagesToNotify = array(),
-   $destination = 'talkpageHere' )
-   {
+   $destination = 'talkpageHere'
+   ) {
$relevantLanguages = $this-getRelevantLanguages( $user, 
$languagesToNotify );
-   $userFirstLanguageCode = $this-getUserFirstLanguage( $user );
-   $userFirstLanguage = Language::factory( $userFirstLanguageCode 
);
+   $userFirstLanguage = Language::factory( 
$this-getUserFirstLanguage( $user ) );
+   $titleForMessage = $this-translatablePageTitle;
+   global $wgLocalInterwiki;
+   if ( $destination === 'talkpageInOtherWiki'  
$wgLocalInterwiki !== false ) {
+   $titleForMessage = 
:$wgLocalInterwiki:$titleForMessage|$titleForMessage;
+   }
 
// Assume that the message is in the content language
// of the originating wiki.
@@ -547,12 +549,7 @@
$this-notificationText
);
 
-   global $wgLocalInterwiki;
-   $titleForMessage = $this-translatablePageTitle;
-   if ( $destination === 'talkpageInOtherWiki'  
$wgLocalInterwiki !== false ) {
-   $titleForMessage = 
:$wgLocalInterwiki:$titleForMessage|$titleForMessage;
-   }
-   $text = $this-msg(
+   return $this-msg(
'translationnotifications-talkpage-body',
$user-getName(),
$this-getUserName( $user ),
@@ -568,13 +565,30 @@
// Bidi-isolation of site name from date
. $userFirstLanguage-getDirMarkEntity()
. ', ~'; // Date and time
+   }
+
+   /**
+* Leave a message on the user's talk page.
+* @param User $user To whom the message to be sent
+* @param string[] $languagesToNotify A list of languages that are 
notified. Empty for all languages.
+* @param string $destination Whether to send it to a talk page on this 
wiki ('talkpageHere', default)
+*   or another one ('talkpageInOtherWiki').
+* @return boolean True if it was successful
+*/
+   public function leaveUserMessage(
+   User $user,
+   $languagesToNotify = array(),
+   $destination = 'talkpageHere' )
+   {
+   $userFirstLanguageCode = $this-getUserFirstLanguage( $user );
+   $userFirstLanguage = Language::factory( $userFirstLanguageCode 
);
 
$editSummary = $this-msg(
'translationnotifications-edit-summary',
$this-translatablePageTitle
)-inLanguage( $userFirstLanguage )-text();
$params = array(
-   'text' = $text,
+   'text' = $this-userTalkPageText( $user, 
$languagesToNotify, $destination ),
'editSummary' = $editSummary,
'editor' = $this-getUser()-getId(),
  

[MediaWiki-commits] [Gerrit] Translate to master - change (mediawiki/core)

2013-03-28 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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


Change subject: Translate to master
..

Translate to master

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


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

diff --git a/extensions/Translate b/extensions/Translate
index 7c530a8..c1ca585 16
--- a/extensions/Translate
+++ b/extensions/Translate
-Subproject commit 7c530a872515f00395d0385f1854776f62370310
+Subproject commit c1ca58561d1bb7fae08fa28388f42c2c439b266c

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc8d66a3631de45f1f62e5be95af981507db9fef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf12
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Translate to master - change (mediawiki/core)

2013-03-28 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged.

Change subject: Translate to master
..


Translate to master

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

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



diff --git a/extensions/Translate b/extensions/Translate
index 7c530a8..c1ca585 16
--- a/extensions/Translate
+++ b/extensions/Translate
-Subproject commit 7c530a872515f00395d0385f1854776f62370310
+Subproject commit c1ca58561d1bb7fae08fa28388f42c2c439b266c

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc8d66a3631de45f1f62e5be95af981507db9fef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf12
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix case of some Title methods (final round) - change (mediawiki/core)

2013-03-28 Thread IAlex (Code Review)
IAlex has uploaded a new change for review.

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


Change subject: Fix case of some Title methods (final round)
..

Fix case of some Title methods (final round)

Change-Id: I41afed9c1d19aaca62685a51f881cf04a10998d8
---
M includes/EditPage.php
M includes/actions/InfoAction.php
M includes/actions/RawAction.php
M includes/parser/Parser.php
4 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/56381/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index bbe7d79..f88dc90 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -100,7 +100,7 @@
 
/**
 * Status: user tried to create this page, but is not allowed to do that
-* ( Title-usercan('create') == false )
+* ( Title-userCan('create') == false )
 */
const AS_NO_CREATE_PERMISSION = 223;
 
diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php
index 1e312d7..ac9107f 100644
--- a/includes/actions/InfoAction.php
+++ b/includes/actions/InfoAction.php
@@ -229,7 +229,7 @@
}
 
// Default sort key
-   $sortKey = $title-getCategorySortKey();
+   $sortKey = $title-getCategorySortkey();
if ( !empty( $pageProperties['defaultsort'] ) ) {
$sortKey = $pageProperties['defaultsort'];
}
diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php
index d1d457c..f8209e6 100644
--- a/includes/actions/RawAction.php
+++ b/includes/actions/RawAction.php
@@ -195,7 +195,7 @@
case 'next':
# output next revision, or nothing if there 
isn't one
if( $oldid ) {
-   $oldid = 
$this-getTitle()-getNextRevisionId( $oldid );
+   $oldid = 
$this-getTitle()-getNextRevisionID( $oldid );
}
$oldid = $oldid ? $oldid : -1;
break;
@@ -205,7 +205,7 @@
# get the current revision so we can 
get the penultimate one
$oldid = $this-page-getLatest();
}
-   $prev = 
$this-getTitle()-getPreviousRevisionId( $oldid );
+   $prev = 
$this-getTitle()-getPreviousRevisionID( $oldid );
$oldid = $prev ? $prev : -1;
break;
case 'cur':
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 9176f6a..5b14ad2 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2770,7 +2770,7 @@
$value = wfEscapeWikiText( 
$subjPage-getPrefixedURL() );
break;
case 'pageid': // requested in bug 23427
-   $pageid = $this-getTitle()-getArticleId();
+   $pageid = $this-getTitle()-getArticleID();
if( $pageid == 0 ) {
# 0 means the page doesn't exist in the 
database,
# which means the user is previewing a 
new page.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41afed9c1d19aaca62685a51f881cf04a10998d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch

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


[MediaWiki-commits] [Gerrit] package-builder learned 'cowbuilder' - change (operations/puppet)

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

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


Change subject: package-builder learned 'cowbuilder'
..

package-builder learned 'cowbuilder'

cowbuilder is a wrapper for pbuilder which save us the need to
uncompress a base image.  That makes build a bit faster.

I thought about copy pasting the existing pbuilder class, but since both
commands are very similar, I have made the class more generic and
renamed it to 'builder'. Simply pass the 'type' you want and you should
be fine.

Change-Id: Ie0c9e0109b7752ec6059d67675fd1dd56c124bd3
---
M manifests/misc/package-builder.pp
1 file changed, 29 insertions(+), 9 deletions(-)


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

diff --git a/manifests/misc/package-builder.pp 
b/manifests/misc/package-builder.pp
index 823e549..2f9a51b 100644
--- a/manifests/misc/package-builder.pp
+++ b/manifests/misc/package-builder.pp
@@ -33,12 +33,28 @@
}
}
 
-   class pbuilder($dists=[hardy, lucid, precise], 
$defaultdist=lucid) {
+   class builder($type='pbuilder', $dists=[hardy, lucid, precise], 
$defaultdist=lucid) {
+   case $type {
+   cowbuilder: {
+   $base_option = '--basepath'
+   $build_cmd   = 'cowbuilder'
+   $file_ext= 'cow'
+   $packages= [ 'cowbuilder' ]
+   }
+   pbuilder: {
+   $base_option = '--basetgz'
+   $build_cmd   = 'cowbuilder'
+   $file_ext= 'tgz'
+   $packages= [ 'pbuilder' ]
+   }
+   default: { fail('Only builder types supported are 
pbuilder and cowbuilder') }
+   }
+
class packages {
-   package { pbuilder: ensure = latest }
+   package { $packages: ensure = latest }
}

-   define image{
+   define image {
require packages
 
$pbuilder_root = /var/cache/pbuilder
@@ -46,9 +62,9 @@
$othermirror = --othermirror 'deb 
http://apt.wikimedia.org/wikimedia ${title}-wikimedia main universe' 
--othermirror 'deb-src http://apt.wikimedia.org/wikimedia ${title}-wikimedia 
main universe'
$components = --components 'main universe'
 
-   exec { pbuilder --create --distribution ${title}:
-   command = pbuilder --create --distribution 
${title} --basetgz ${pbuilder_root}/${title}.tgz ${components} ${othermirror},
-   creates = ${pbuilder_root}/${title}.tgz,
+   exec { $build_cmd --create --distribution ${title}:
+   command = $build_cmd --create --distribution 
${title} ${base_option} ${pbuilder_root}/${title}.${file_ext} ${components} 
${othermirror},
+   creates = 
${pbuilder_root}/${title}.${file_ext},
path = /bin:/sbin:/usr/bin:/usr/sbin,
timeout = 600
}
@@ -56,11 +72,15 @@
 
image { $dists: }
 
-   file { /var/cache/pbuilder/base.tgz:
+   file { /var/cache/pbuilder/base.${file_ext}:
require = Image[$defaultdist],
-   ensure = /var/cache/pbuilder/${defaultdist}.tgz
+   ensure = 
/var/cache/pbuilder/${defaultdist}.${file_ext}
}
}
 
-   include packages, defaults, pbuilder
+   include packages, defaults
+
+   class { 'builder': type = 'cowbuilder' }
+   class { 'builder': type = 'pbuilder' }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0c9e0109b7752ec6059d67675fd1dd56c124bd3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] Normalize line endings - change (translatewiki)

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

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


Change subject: Normalize line endings
..

Normalize line endings

Change-Id: If29c536a26181aacc7c957a7f7112593fc574121
---
M melange/BundleCreater.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/83/56383/1

diff --git a/melange/BundleCreater.php b/melange/BundleCreater.php
index 7297ec9..c3183ee 100644
--- a/melange/BundleCreater.php
+++ b/melange/BundleCreater.php
@@ -202,7 +202,11 @@
exec( git rm .gitreview --quiet --ignore-unmatch );
 
$notefile = $this-dir . /notes/$version-$ext;
-   $contents = file_get_contents( $notefile );
+
+   // Sometimes these files pass through other editors,
+   // which save them with wrong file endings.
+   // Convert all endings to \n.
+   $contents = str_replace( array( \r\n, \r, \n ), 
\n, file_get_contents( $notefile ) );
preg_match( '/^#---$(.*)^#---$/msU', $contents, 
$matches );
$notes = trim( $matches[1] );
$notes = == $ext $version ==\nReleased at 
$date.\n\n$notes\n;

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

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

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


[MediaWiki-commits] [Gerrit] Use PHPDoc notation for @todo - change (mediawiki...Translate)

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

Change subject: Use PHPDoc notation for @todo
..


Use PHPDoc notation for @todo

Change-Id: I9c68098101a1d4d33f1ac9cf6f720e17b3419e92
---
M api/ApiQueryMessageGroups.php
M ffs/AndroidXmlFFS.php
M ffs/MediaWikiExtensions.php
M messagegroups/WorkflowStatesMessageGroup.php
M specials/SpecialManageGroups.php
M specials/SpecialSupportedLanguages.php
M tag/PageTranslationHooks.php
M translationaids/GettextDocumentationAid.php
M ttmserver/RemoteTTMServer.php
9 files changed, 8 insertions(+), 9 deletions(-)

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



diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php
index a2c5532..a69d58c 100644
--- a/api/ApiQueryMessageGroups.php
+++ b/api/ApiQueryMessageGroups.php
@@ -69,7 +69,7 @@
 
$result-setIndexedTagName( $a, 'group' );
 
-   // TODO: Add a continue?
+   // @todo Add a continue?
$fit = $result-addValue( array( 'query', 
$this-getModuleName() ), null, $a );
if ( !$fit ) {
$this-setWarning( 'Could not fit all groups in 
the resultset.' );
diff --git a/ffs/AndroidXmlFFS.php b/ffs/AndroidXmlFFS.php
index 15fac78..a3f2570 100644
--- a/ffs/AndroidXmlFFS.php
+++ b/ffs/AndroidXmlFFS.php
@@ -31,7 +31,7 @@
}
 
return array(
-   'AUTHORS' = array(), // TODO
+   'AUTHORS' = array(), // @todo
'MESSAGES' = $mangler-mangle( $messages ),
);
}
diff --git a/ffs/MediaWikiExtensions.php b/ffs/MediaWikiExtensions.php
index e356457..571b974 100644
--- a/ffs/MediaWikiExtensions.php
+++ b/ffs/MediaWikiExtensions.php
@@ -108,7 +108,7 @@
$target = str_replace( '%GROUPROOT%/', '', 
$conf['FILES']['sourcePattern'] );
$conf['FILES']['targetPattern'] = $target;
 
-   // @TODO: find a better way
+   // @todo Find a better way
if ( isset( $info['aliasfile'] ) ) {
$conf['FILES']['aliasFile'] = $info['aliasfile'];
}
diff --git a/messagegroups/WorkflowStatesMessageGroup.php 
b/messagegroups/WorkflowStatesMessageGroup.php
index 5534d71..a420e6d 100644
--- a/messagegroups/WorkflowStatesMessageGroup.php
+++ b/messagegroups/WorkflowStatesMessageGroup.php
@@ -49,7 +49,7 @@
$defs = TranslateUtils::getContents( array_keys( $keys ), 
$this-getNamespace() );
foreach ( $keys as $key = $state ) {
if ( !isset( $defs[$key] ) ) {
-   // TODO: use jobqueue
+   // @todo Use jobqueue
$title = Title::makeTitleSafe( 
$this-getNamespace(), $key );
$page = new WikiPage( $title );
$page-doEdit(
diff --git a/specials/SpecialManageGroups.php b/specials/SpecialManageGroups.php
index aff2709..923339b 100644
--- a/specials/SpecialManageGroups.php
+++ b/specials/SpecialManageGroups.php
@@ -41,7 +41,7 @@
 
$changefile = TranslateUtils::cacheFile( self::CHANGEFILE );
if ( !file_exists( $changefile ) ) {
-   // TODO: Tell them when changes was last checked/process
+   // @todo Tell them when changes was last checked/process
// or how to initiate recheck.
$out-addWikiMsg( 'translate-smg-nochanges' );
return;
diff --git a/specials/SpecialSupportedLanguages.php 
b/specials/SpecialSupportedLanguages.php
index 27aaaed..b83fb0f 100644
--- a/specials/SpecialSupportedLanguages.php
+++ b/specials/SpecialSupportedLanguages.php
@@ -54,7 +54,6 @@
$this-outputHeader();
$dbr = wfGetDB( DB_SLAVE );
if ( $dbr-getType() === 'sqlite' ) {
-   // @TODO
$out-addWikiText( 'div class=errorboxSQLite is not 
supported./div' );
return;
}
diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index 9fbf597..9ee67d0 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -546,7 +546,7 @@
$languages = TranslateMetadata::get( $groupId, 'prioritylangs' 
);
$filter = array_flip( explode( ',', $languages ) );
if ( !isset( $filter[$handle-getCode()] ) ) {
-   // TODO: default reason if none provided
+   // @todo Default reason if none provided
$reason = TranslateMetadata::get( $groupId, 
'priorityreason' );
$result = array( 'tpt-translation-restricted', $reason 
);
   

[MediaWiki-commits] [Gerrit] Fix case of some Title methods (final round) - change (mediawiki/core)

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

Change subject: Fix case of some Title methods (final round)
..


Fix case of some Title methods (final round)

Change-Id: I41afed9c1d19aaca62685a51f881cf04a10998d8
---
M includes/EditPage.php
M includes/actions/InfoAction.php
M includes/actions/RawAction.php
M includes/parser/Parser.php
4 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index bbe7d79..f88dc90 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -100,7 +100,7 @@
 
/**
 * Status: user tried to create this page, but is not allowed to do that
-* ( Title-usercan('create') == false )
+* ( Title-userCan('create') == false )
 */
const AS_NO_CREATE_PERMISSION = 223;
 
diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php
index 1e312d7..ac9107f 100644
--- a/includes/actions/InfoAction.php
+++ b/includes/actions/InfoAction.php
@@ -229,7 +229,7 @@
}
 
// Default sort key
-   $sortKey = $title-getCategorySortKey();
+   $sortKey = $title-getCategorySortkey();
if ( !empty( $pageProperties['defaultsort'] ) ) {
$sortKey = $pageProperties['defaultsort'];
}
diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php
index d1d457c..f8209e6 100644
--- a/includes/actions/RawAction.php
+++ b/includes/actions/RawAction.php
@@ -195,7 +195,7 @@
case 'next':
# output next revision, or nothing if there 
isn't one
if( $oldid ) {
-   $oldid = 
$this-getTitle()-getNextRevisionId( $oldid );
+   $oldid = 
$this-getTitle()-getNextRevisionID( $oldid );
}
$oldid = $oldid ? $oldid : -1;
break;
@@ -205,7 +205,7 @@
# get the current revision so we can 
get the penultimate one
$oldid = $this-page-getLatest();
}
-   $prev = 
$this-getTitle()-getPreviousRevisionId( $oldid );
+   $prev = 
$this-getTitle()-getPreviousRevisionID( $oldid );
$oldid = $prev ? $prev : -1;
break;
case 'cur':
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 9176f6a..5b14ad2 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2770,7 +2770,7 @@
$value = wfEscapeWikiText( 
$subjPage-getPrefixedURL() );
break;
case 'pageid': // requested in bug 23427
-   $pageid = $this-getTitle()-getArticleId();
+   $pageid = $this-getTitle()-getArticleID();
if( $pageid == 0 ) {
# 0 means the page doesn't exist in the 
database,
# which means the user is previewing a 
new page.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41afed9c1d19aaca62685a51f881cf04a10998d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.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] Make ChangeRow work with new ORMTable. - change (mediawiki...Wikibase)

2013-03-28 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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


Change subject: Make ChangeRow work with new ORMTable.
..

Make ChangeRow work with new ORMTable.

This is in preparation for core change I86368821.

Change-Id: I98a67ae7e5473528399954d2750ba82539826e9d
---
M lib/includes/ChangesTable.php
M lib/includes/changes/ChangeRow.php
M lib/includes/changes/DiffChange.php
M lib/includes/changes/EntityChange.php
4 files changed, 32 insertions(+), 5 deletions(-)


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

diff --git a/lib/includes/ChangesTable.php b/lib/includes/ChangesTable.php
index 8c8aa58..54291cb 100644
--- a/lib/includes/ChangesTable.php
+++ b/lib/includes/ChangesTable.php
@@ -127,4 +127,26 @@
return new $class( $this, $data, $loadDefaults );
}
 
+   /**
+* @see ORMTable::getWriteValues()
+*
+* @since 0.4
+*
+* @param \IORMRow $row
+*
+* @return array
+*/
+   protected function getWriteValues( \IORMRow $row ) {
+   $values = parent::getWriteValues( $row );
+
+   if ( $row instanceof ChangeRow ) {
+   $infoField = $this-getPrefixedField( 'info' );
+
+   if ( isset( $values[$infoField] ) ) {
+   $values[$infoField] = $row-serializeInfo( 
$values[$infoField] );
+   }
+   }
+
+   return $values;
+   }
 }
diff --git a/lib/includes/changes/ChangeRow.php 
b/lib/includes/changes/ChangeRow.php
index 3c243ef..58c05b2 100644
--- a/lib/includes/changes/ChangeRow.php
+++ b/lib/includes/changes/ChangeRow.php
@@ -166,6 +166,9 @@
/**
 * @see ORMRow::getWriteValues()
 *
+* @todo: remove this once core no longer uses ORMRow::getWriteValues().
+*Use ChangesTable::getWriteValues() instead.
+*
 * @since 0.4
 *
 * @return array
@@ -190,9 +193,10 @@
 *
 * @param array $info
 *
+* @throws \MWException
 * @return string
 */
-   protected function serializeInfo( array $info ) {
+   public function serializeInfo( array $info ) {
if ( Settings::get( changesAsJson ) === true ) {
// Make sure we never serialize objects.
// This is a lot of overhead, so we only do it during 
testing.
@@ -227,7 +231,7 @@
 *
 * @return array the info array
 */
-   protected function unserializeInfo( $str ) {
+   public function unserializeInfo( $str ) {
if ( $str[0] === '{' ) { // json
$info = json_decode( $str, true );
} else {
diff --git a/lib/includes/changes/DiffChange.php 
b/lib/includes/changes/DiffChange.php
index c59266c..3a6d46f 100644
--- a/lib/includes/changes/DiffChange.php
+++ b/lib/includes/changes/DiffChange.php
@@ -121,7 +121,7 @@
 * @param array $info
 * @return string
 */
-   protected function serializeInfo( array $info ) {
+   public function serializeInfo( array $info ) {
if ( isset( $info['diff'] )  $info['diff'] instanceof 
\Diff\DiffOp ) {
if ( Settings::get( changesAsJson ) === true  ) {
/* @var \Diff\DiffOp $op */
@@ -142,7 +142,7 @@
 * @param string $str
 * @return array the info array
 */
-   protected function unserializeInfo( $str ) {
+   public function unserializeInfo( $str ) {
static $factory = null;
 
if ( $factory == null ) {
diff --git a/lib/includes/changes/EntityChange.php 
b/lib/includes/changes/EntityChange.php
index 8059173..c12acc9 100644
--- a/lib/includes/changes/EntityChange.php
+++ b/lib/includes/changes/EntityChange.php
@@ -405,6 +405,7 @@
 
return $data;
}
+
/**
 * @see ChangeRow::serializeInfo()
 *
@@ -414,7 +415,7 @@
 * @param array $info
 * @return string
 */
-   protected function serializeInfo( array $info ) {
+   public function serializeInfo( array $info ) {
if ( isset( $info['entity'] ) ) {
// never serialize full entity data in a change, it's 
huge.
unset( $info['entity'] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98a67ae7e5473528399954d2750ba82539826e9d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Add $wgTranslateUseTux - change (mediawiki...Translate)

2013-03-28 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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


Change subject: Add $wgTranslateUseTux
..

Add $wgTranslateUseTux

With this enabling TUX can be done by just flipping a variable.

Change-Id: I3ca54b36d1089668ab94781edcfbb2687e8c0f4e
---
M Translate.php
M specials/SpecialTranslate.php
2 files changed, 11 insertions(+), 2 deletions(-)


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

diff --git a/Translate.php b/Translate.php
index 6a08405..91f51b5 100644
--- a/Translate.php
+++ b/Translate.php
@@ -572,6 +572,13 @@
  */
 $wgTranslateTestTTMServer = null;
 
+/**
+ * Whether to use the TUX interface by default. tux=1 and tux=0 in the url can
+ * be used to switch between old and new. This variable will be removed after
+ * transition time.
+ */
+$wgTranslateUseTux = false;
+
 # /source
 
 /** @cond cli_support */
diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index 6d59143..5275bcd 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -891,14 +891,16 @@
}
 
public static function isBeta( WebRequest $request ) {
+   global $wgTranslateUseTux;
+
$tux = $request-getVal( 'tux', null );
 
if ( $tux === null ) {
-   $tux = $request-getCookie( 'tux', null, false );
+   $tux = $request-getCookie( 'tux', null, 
$wgTranslateUseTux );
} elseif ( $tux ) {
$request-response()-setCookie( 'tux', 1 );
} else {
-   $request-response()-setCookie( 'tux', '', 1 );
+   $request-response()-setCookie( 'tux', 0 );
}
 
return $tux;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ca54b36d1089668ab94781edcfbb2687e8c0f4e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Flip $wgTranslateUseTux to true by defauly - change (mediawiki...Translate)

2013-03-28 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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


Change subject: Flip $wgTranslateUseTux to true by defauly
..

Flip $wgTranslateUseTux to true by defauly

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


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

diff --git a/Translate.php b/Translate.php
index 91f51b5..c4924fc 100644
--- a/Translate.php
+++ b/Translate.php
@@ -577,7 +577,7 @@
  * be used to switch between old and new. This variable will be removed after
  * transition time.
  */
-$wgTranslateUseTux = false;
+$wgTranslateUseTux = true;
 
 # /source
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33ee4353b36663a70146671e4f0ae2519708e34a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Use get_class( $this ) instead of __CLASS__ in RedirectSpeci... - change (mediawiki/core)

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

Change subject: Use get_class( $this ) instead of __CLASS__ in 
RedirectSpecialPage::execute()
..


Use get_class( $this ) instead of __CLASS__ in RedirectSpecialPage::execute()

So that it returns the subclass name and not always RedirectSpecialPage.

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

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



diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php
index 38b7d3e..46d4304 100644
--- a/includes/SpecialPage.php
+++ b/includes/SpecialPage.php
@@ -1100,7 +1100,7 @@
$this-getOutput()-redirect( $url );
return $redirect;
} else {
-   $class = __CLASS__;
+   $class = get_class( $this );
throw new MWException( RedirectSpecialPage $class 
doesn't redirect! );
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibee18bc75e423e8874f9254da7cec59839ba15af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
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] Prevent PHP notice by adding isset() check - change (mediawiki/core)

2013-03-28 Thread MarkAHershberger (Code Review)
MarkAHershberger has submitted this change and it was merged.

Change subject: Prevent PHP notice by adding isset() check
..


Prevent PHP notice by adding isset() check

Issue was caused by change
I34c3fc9d8f9467e83cd201cb099c2d26f3a39b36

Bug: 46627
Change-Id: Ida87efc622e9e90b835473f069559817565eafc1
---
M includes/WebRequest.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  MarkAHershberger: Looks good to me, approved



diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 30a51b0..739340c 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -654,10 +654,12 @@
if( $hash !== false ) {
$base = substr( $base, 0, $hash );
}
+
if( $base[0] == '/' ) {
-   if( $base[1] == '/' ) { /* More than one slash will 
look like it is protocol relative */
+   if( isset( $base[1] )  $base[1] == '/' ) { /* More 
than one slash will look like it is protocol relative */
return preg_replace( '!//*!', '/', $base );
}
+
return $base;
} else {
// We may get paths with a host prepended; strip it.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida87efc622e9e90b835473f069559817565eafc1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: MarkAHershberger mhershber...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add $wgTranslateUseTux - change (mediawiki...Translate)

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

Change subject: Add $wgTranslateUseTux
..


Add $wgTranslateUseTux

With this enabling TUX can be done by just flipping a variable.

Change-Id: I3ca54b36d1089668ab94781edcfbb2687e8c0f4e
---
M Translate.php
M specials/SpecialTranslate.php
2 files changed, 11 insertions(+), 2 deletions(-)

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



diff --git a/Translate.php b/Translate.php
index 6a08405..91f51b5 100644
--- a/Translate.php
+++ b/Translate.php
@@ -572,6 +572,13 @@
  */
 $wgTranslateTestTTMServer = null;
 
+/**
+ * Whether to use the TUX interface by default. tux=1 and tux=0 in the url can
+ * be used to switch between old and new. This variable will be removed after
+ * transition time.
+ */
+$wgTranslateUseTux = false;
+
 # /source
 
 /** @cond cli_support */
diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index 6d59143..5275bcd 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -891,14 +891,16 @@
}
 
public static function isBeta( WebRequest $request ) {
+   global $wgTranslateUseTux;
+
$tux = $request-getVal( 'tux', null );
 
if ( $tux === null ) {
-   $tux = $request-getCookie( 'tux', null, false );
+   $tux = $request-getCookie( 'tux', null, 
$wgTranslateUseTux );
} elseif ( $tux ) {
$request-response()-setCookie( 'tux', 1 );
} else {
-   $request-response()-setCookie( 'tux', '', 1 );
+   $request-response()-setCookie( 'tux', 0 );
}
 
return $tux;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ca54b36d1089668ab94781edcfbb2687e8c0f4e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Flip $wgTranslateUseTux to true by default - change (mediawiki...Translate)

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

Change subject: Flip $wgTranslateUseTux to true by default
..


Flip $wgTranslateUseTux to true by default

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

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



diff --git a/Translate.php b/Translate.php
index 91f51b5..c4924fc 100644
--- a/Translate.php
+++ b/Translate.php
@@ -577,7 +577,7 @@
  * be used to switch between old and new. This variable will be removed after
  * transition time.
  */
-$wgTranslateUseTux = false;
+$wgTranslateUseTux = true;
 
 # /source
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33ee4353b36663a70146671e4f0ae2519708e34a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
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 cache issues - change (mediawiki...ArticleFeedbackv5)

2013-03-28 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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


Change subject: Fix cache issues
..

Fix cache issues

* Purge caches after adding a log note (otherwise this change was not being 
picked up)
* Re-cache right away to avoid another user reads ( caches) data from a lagged 
db slave
* Fix incorrect memc keys in purge script

Change-Id: I3d7a308dab24f5fc364ed2eb371efc3651c8e356
---
M ArticleFeedbackv5.activity.php
M api/ApiAddFlagNoteArticleFeedbackv5.php
M api/ApiFlagFeedbackArticleFeedbackv5.php
M maintenance/purgeCache.php
M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
5 files changed, 91 insertions(+), 31 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 
refs/changes/87/56387/1

diff --git a/ArticleFeedbackv5.activity.php b/ArticleFeedbackv5.activity.php
index 7102aa4..1292839 100644
--- a/ArticleFeedbackv5.activity.php
+++ b/ArticleFeedbackv5.activity.php
@@ -181,6 +181,25 @@
if ( $logId !== null ) {
// update log count in cache
static::incrementActivityCount( $itemId, $type );
+
+   $feedback = ArticleFeedbackv5Model::get( $itemId, 
$pageId );
+   if ( $feedback ) {
+   global $wgMemc;
+
+   /*
+* While we're at it, since activity has 
occurred, the editor activity
+* data in cache may be out of date.
+*/
+   $key = wfMemcKey( get_called_class(), 
'getLastEditorActivity', $feedback-aft_id );
+   $wgMemc-delete( $key );
+
+   /*
+* Re-cache the editor activity right away. 
Otherwise, it could happen that
+* another user is reading the editor activity 
from a lagged slave  that
+* data gets cached.
+*/
+   $feedback-getLastEditorActivity();
+   }
}
 
return $logId;
@@ -323,11 +342,6 @@
if ( $count !== false ) {
$wgMemc-set( $key, $count + 1, 60 * 60 * 24 * 7 );
}
-
-   // while we're at it, since activity has occured, the editor 
activity
-   // data in cache may be out of date
-   $key = wfMemcKey( get_called_class(), 'getLastEditorActivity', 
$feedbackId );
-   $wgMemc-delete( $key );
}
 
/**
diff --git a/api/ApiAddFlagNoteArticleFeedbackv5.php 
b/api/ApiAddFlagNoteArticleFeedbackv5.php
index d1f6ab6..d149656 100644
--- a/api/ApiAddFlagNoteArticleFeedbackv5.php
+++ b/api/ApiAddFlagNoteArticleFeedbackv5.php
@@ -37,6 +37,8 @@
$logId  = $params['logid'];
$action = $params['flagtype'];
$notes  = $params['note'];
+   $feedbackId = $params['feedbackid'];
+   $pageId = $params['pageid'];
 
// update log entry in database
$dbw = ArticleFeedbackv5Utils::getDB( DB_MASTER );
@@ -52,10 +54,36 @@
'log_user' = $wgUser-getId(),
)
);
+
+   /**
+* ManualLogEntry will have written to database. To 
make sure that subsequent
+* reads are up-to-date, I'll set a flag to know that 
we've written data, so
+* DB_MASTER will be queried.
+*/
+   ArticleFeedbackv5Utils::$written = true;
}
 
if ( $affected  0 ) {
$results['result'] = 'Success';
+
+   $feedback = ArticleFeedbackv5Model::get( $feedbackId, 
$pageId );
+   if ( $feedback ) {
+   global $wgMemc;
+
+   /*
+* While we're at it, since activity has 
occurred, the editor activity
+* data in cache may be out of date.
+*/
+   $key = wfMemcKey( 'ArticleFeedbackv5Activity', 
'getLastEditorActivity', $feedback-aft_id );
+   $wgMemc-delete( $key );
+
+   /*
+* Re-cache the editor activity right away. 
Otherwise, it could happen that
+* another user is reading the editor activity 
from a lagged slave  that
+* data gets 

[MediaWiki-commits] [Gerrit] Normalize line endings - change (translatewiki)

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

Change subject: Normalize line endings
..


Normalize line endings

Change-Id: If29c536a26181aacc7c957a7f7112593fc574121
---
M melange/BundleCreater.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/melange/BundleCreater.php b/melange/BundleCreater.php
index 7297ec9..dc75039 100644
--- a/melange/BundleCreater.php
+++ b/melange/BundleCreater.php
@@ -202,7 +202,11 @@
exec( git rm .gitreview --quiet --ignore-unmatch );
 
$notefile = $this-dir . /notes/$version-$ext;
-   $contents = file_get_contents( $notefile );
+
+   // Sometimes these files pass through other editors,
+   // which save them with wrong file endings.
+   // Convert all endings to \n.
+   $contents = str_replace( array( \r\n, \r ), \n, 
file_get_contents( $notefile ) );
preg_match( '/^#---$(.*)^#---$/msU', $contents, 
$matches );
$notes = trim( $matches[1] );
$notes = == $ext $version ==\nReleased at 
$date.\n\n$notes\n;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If29c536a26181aacc7c957a7f7112593fc574121
Gerrit-PatchSet: 2
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Display user_name when user_real_name is empty - change (mediawiki...WhoIsWatching)

2013-03-28 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

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


Change subject: Display user_name when user_real_name is empty
..

Display user_name when user_real_name is empty

Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
---
M WhoIsWatching_body.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WhoIsWatching 
refs/changes/88/56388/1

diff --git a/WhoIsWatching_body.php b/WhoIsWatching_body.php
index 53a0b31..f5c99de 100644
--- a/WhoIsWatching_body.php
+++ b/WhoIsWatching_body.php
@@ -78,11 +78,11 @@
$u = User::newFromName( $row-user_name );
if ( !array_key_exists( $u-getID(), 
$watchingusers ) 
$u-isAllowed( 'read' )  
$u-getEmail() ) {
-   $users[strtolower( $u-getRealName() )] 
= $u-getID();
+   $users[ $u-getID() ] = 
$u-getRealName() ? $u-getRealName() : $u-getName();
}
}
-   ksort( $users );
-   foreach ( $users as $name = $id ) {
+   asort( $users );
+   foreach ( $users as $id = $name ) {
$wgOut-addHTML( option 
value=\.$id.\.$name./option );
}
$wgOut-addHTML( '/select/tdtd' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Display user_name when user_real_name is empty - change (mediawiki...WhoIsWatching)

2013-03-28 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Display user_name when user_real_name is empty
..


Display user_name when user_real_name is empty

Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
---
M WhoIsWatching_body.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/WhoIsWatching_body.php b/WhoIsWatching_body.php
index 53a0b31..f5c99de 100644
--- a/WhoIsWatching_body.php
+++ b/WhoIsWatching_body.php
@@ -78,11 +78,11 @@
$u = User::newFromName( $row-user_name );
if ( !array_key_exists( $u-getID(), 
$watchingusers ) 
$u-isAllowed( 'read' )  
$u-getEmail() ) {
-   $users[strtolower( $u-getRealName() )] 
= $u-getID();
+   $users[ $u-getID() ] = 
$u-getRealName() ? $u-getRealName() : $u-getName();
}
}
-   ksort( $users );
-   foreach ( $users as $name = $id ) {
+   asort( $users );
+   foreach ( $users as $id = $name ) {
$wgOut-addHTML( option 
value=\.$id.\.$name./option );
}
$wgOut-addHTML( '/select/tdtd' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Preparing March 2012 release - change (translatewiki)

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

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


Change subject: Preparing March 2012 release
..

Preparing March 2012 release

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/89/56389/1

diff --git a/melange/config.ini b/melange/config.ini
index f4aa65b..6f25219 100644
--- a/melange/config.ini
+++ b/melange/config.ini
@@ -1,9 +1,9 @@
 [common]
-mediawikirepo=ssh://nikerab...@gerrit.wikimedia.org:29418/mediawiki/core.git
-extensionrepo=ssh://nikerab...@gerrit.wikimedia.org:29418/mediawiki/extensions/
+mediawikirepo=ssh://amir...@gerrit.wikimedia.org:29418/mediawiki/core.git
+extensionrepo=ssh://amir...@gerrit.wikimedia.org:29418/mediawiki/extensions/
 branches=origin/master origin/REL1_20 origin/REL1_19
-releasever=2013.02
-releasever-prev=2013.01
+releasever=2013.03
+releasever-prev=2013.02
 bundlename=MediaWiki language extension bundle
 downloadurl=https://translatewiki.net/mleb
 hasher=sha256sum
@@ -19,7 +19,7 @@
 CleanChanges=origin/master
 LocalisationUpdate=origin/master
 Translate=origin/master
-UniversalLanguageSelector=2012.12
+UniversalLanguageSelector=origin/master
 
 [install]
 dbname=melange

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

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

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


[MediaWiki-commits] [Gerrit] Reduced indentation levels, broke long lines - change (mediawiki/core)

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

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


Change subject: Reduced indentation levels, broke long lines
..

Reduced indentation levels, broke long lines

Also removed some unneeded else blocks to ensure more consistent return values.

Change-Id: Icf1d6fecfbd512fadad61442c968f0ef1ba30a88
---
M includes/specials/SpecialContributions.php
1 file changed, 207 insertions(+), 137 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/56390/1

diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index 75983e8..a7d9fe6 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -28,7 +28,6 @@
  */
 
 class SpecialContributions extends SpecialPage {
-
protected $opts;
 
public function __construct() {
@@ -89,11 +88,17 @@
if ( $this-opts['contribs'] != 'newbie' ) {
$target = $nt-getText();
$out-addSubtitle( $this-contributionsSub( $userObj ) 
);
-   $out-setHTMLTitle( $this-msg( 'pagetitle', 
$this-msg( 'contributions-title', $target )-plain() ) );
+   $out-setHTMLTitle( $this-msg(
+   'pagetitle',
+   $this-msg( 'contributions-title', $target 
)-plain()
+   ) );
$this-getSkin()-setRelevantUser( $userObj );
} else {
$out-addSubtitle( $this-msg( 
'sp-contributions-newbies-sub' ) );
-   $out-setHTMLTitle( $this-msg( 'pagetitle', 
$this-msg( 'sp-contributions-newbies-title' )-plain() ) );
+   $out-setHTMLTitle( $this-msg(
+   'pagetitle',
+   $this-msg( 'sp-contributions-newbies-title' 
)-plain()
+   ) );
}
 
if ( ( $ns = $request-getVal( 'namespace', null ) ) !== null 
 $ns !== '' ) {
@@ -103,10 +108,8 @@
}
 
$this-opts['associated'] = $request-getBool( 'associated' );
-
-   $this-opts['nsInvert'] = (bool) $request-getVal( 'nsInvert' );
-
-   $this-opts['tagfilter'] = (string) $request-getVal( 
'tagfilter' );
+   $this-opts['nsInvert'] = (bool)$request-getVal( 'nsInvert' );
+   $this-opts['tagfilter'] = (string)$request-getVal( 
'tagfilter' );
 
// Allows reverts to have the bot flag in recent changes. It is 
just here to
// be passed in the form at the top of the page
@@ -162,7 +165,6 @@
$this-addFeedLinks( array( 'action' = 'feedcontributions', 
'user' = $target ) );
 
if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( 
$id ) ) ) {
-
$out-addHTML( $this-getForm() );
 
$pager = new ContribsPager( $this-getContext(), array(
@@ -176,18 +178,20 @@
'nsInvert' = $this-opts['nsInvert'],
'associated' = $this-opts['associated'],
) );
+
if ( !$pager-getNumRows() ) {
$out-addWikiMsg( 'nocontribs', $target );
} else {
# Show a message about slave lag, if applicable
$lag = wfGetLB()-safeGetLag( 
$pager-getDatabase() );
-   if ( $lag  0 )
+   if ( $lag  0 ) {
$out-showLagWarning( $lag );
+   }
 
$out-addHTML(
'p' . $pager-getNavigationBar() . 
'/p' .
-   $pager-getBody() .
-   'p' . $pager-getNavigationBar() . 
'/p'
+   $pager-getBody() .
+   'p' . 
$pager-getNavigationBar() . '/p'
);
}
$out-preventClickjacking( 
$pager-getPreventClickjacking() );
@@ -195,16 +199,16 @@
# Show the appropriate footer message - WHOIS tools, 
etc.
if ( $this-opts['contribs'] == 'newbie' ) {
$message = 'sp-contributions-footer-newbies';
-   } elseif( IP::isIPAddress( $target ) ) {
+   } elseif ( IP::isIPAddress( $target ) ) {
$message = 'sp-contributions-footer-anon';
-   } elseif( $userObj-isAnon() ) {
+   } elseif ( $userObj-isAnon() ) {
  

[MediaWiki-commits] [Gerrit] Reduced indentation levels, broke long lines. - change (mediawiki/core)

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

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


Change subject: Reduced indentation levels, broke long lines.
..

Reduced indentation levels, broke long lines.

Reversed login a two cases to get there.

Also updated PHPDoc, removed an unneeded comment and removed superfluous
newlines.

Change-Id: Ica5f7d24171e2eaeccc0743f8800e18cf2de8006
---
M includes/specials/SpecialConfirmemail.php
1 file changed, 45 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/91/56391/1

diff --git a/includes/specials/SpecialConfirmemail.php 
b/includes/specials/SpecialConfirmemail.php
index 0c98d37..3287c63 100644
--- a/includes/specials/SpecialConfirmemail.php
+++ b/includes/specials/SpecialConfirmemail.php
@@ -30,10 +30,6 @@
  * @author Rob Church robc...@gmail.com
  */
 class EmailConfirmation extends UnlistedSpecialPage {
-
-   /**
-* Constructor
-*/
public function __construct() {
parent::__construct( 'Confirmemail' );
}
@@ -41,16 +37,16 @@
/**
 * Main execution point
 *
-* @param $code Confirmation code passed to the page
+* @param null|string $code Confirmation code passed to the page
 */
function execute( $code ) {
$this-setHeaders();
 
$this-checkReadOnly();
 
-   if( $code === null || $code === '' ) {
-   if( $this-getUser()-isLoggedIn() ) {
-   if( Sanitizer::validateEmail( 
$this-getUser()-getEmail() ) ) {
+   if ( $code === null || $code === '' ) {
+   if ( $this-getUser()-isLoggedIn() ) {
+   if ( Sanitizer::validateEmail( 
$this-getUser()-getEmail() ) ) {
$this-showRequestForm();
} else {
$this-getOutput()-addWikiMsg( 
'confirmemail_noemail' );
@@ -62,7 +58,9 @@
array(),
array( 'returnto' = 
$this-getTitle()-getPrefixedText() )
);
-   $this-getOutput()-addHTML( $this-msg( 
'confirmemail_needlogin' )-rawParams( $llink )-parse() );
+   $this-getOutput()-addHTML(
+   $this-msg( 'confirmemail_needlogin' 
)-rawParams( $llink )-parse()
+   );
}
} else {
$this-attemptConfirm( $code );
@@ -75,7 +73,10 @@
function showRequestForm() {
$user = $this-getUser();
$out = $this-getOutput();
-   if( $this-getRequest()-wasPosted()  $user-matchEditToken( 
$this-getRequest()-getText( 'token' ) ) ) {
+
+   if ( $this-getRequest()-wasPosted() 
+   $user-matchEditToken( $this-getRequest()-getText( 
'token' ) )
+   ) {
$status = $user-sendConfirmationMail();
if ( $status-isGood() ) {
$out-addWikiMsg( 'confirmemail_sent' );
@@ -83,7 +84,7 @@
$out-addWikiText( $status-getWikiText( 
'confirmemail_sendfailed' ) );
}
} else {
-   if( $user-isEmailConfirmed() ) {
+   if ( $user-isEmailConfirmed() ) {
// date and time are separate parameters to 
facilitate localisation.
// $time is kept for backward compat reasons.
// 'emailauthenticated' is also used in 
SpecialPreferences.php
@@ -94,11 +95,19 @@
$t = $lang-userTime( $emailAuthenticated, 
$user );
$out-addWikiMsg( 'emailauthenticated', $time, 
$d, $t );
}
-   if( $user-isEmailConfirmationPending() ) {
-   $out-wrapWikiMsg( div class=\error 
mw-confirmemail-pending\\n$1\n/div, 'confirmemail_pending' );
+
+   if ( $user-isEmailConfirmationPending() ) {
+   $out-wrapWikiMsg(
+   div class=\error 
mw-confirmemail-pending\\n$1\n/div,
+   'confirmemail_pending'
+   );
}
+
$out-addWikiMsg( 'confirmemail_text' );
-   $form = Xml::openElement( 'form', array( 'method' = 
'post', 'action' = $this-getTitle()-getLocalURL() ) );
+   $form = Xml::openElement(
+   'form',
+   array( 'method' = 

[MediaWiki-commits] [Gerrit] Reduced indentation levels, broke long lines. - change (mediawiki/core)

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

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


Change subject: Reduced indentation levels, broke long lines.
..

Reduced indentation levels, broke long lines.

Also updated formatting, added docs for class variable $mNavigationBar, added
an i18n FIXME and removed an unneeded else block.

Change-Id: Ic9a5f9f34199d89474cefbac763488cac1265094
---
M includes/specials/SpecialDeletedContributions.php
1 file changed, 87 insertions(+), 58 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/56392/1

diff --git a/includes/specials/SpecialDeletedContributions.php 
b/includes/specials/SpecialDeletedContributions.php
index e374979..89f6002 100644
--- a/includes/specials/SpecialDeletedContributions.php
+++ b/includes/specials/SpecialDeletedContributions.php
@@ -30,10 +30,15 @@
var $messages, $target;
var $namespace = '', $mDb;
 
+   /**
+* @var string Navigation bar with paging links.
+*/
+   protected $mNavigationBar;
+
function __construct( IContextSource $context, $target, $namespace = 
false ) {
parent::__construct( $context );
$msgs = array( 'deletionlog', 'undeleteviewlink', 'diff' );
-   foreach( $msgs as $msg ) {
+   foreach ( $msgs as $msg ) {
$this-messages[$msg] = $this-msg( $msg )-escaped();
}
$this-target = $target;
@@ -52,17 +57,17 @@
$conds = array_merge( $userCond, $this-getNamespaceCond() );
$user = $this-getUser();
// Paranoia: avoid brute force searches (bug 17792)
-   if( !$user-isAllowed( 'deletedhistory' ) ) {
+   if ( !$user-isAllowed( 'deletedhistory' ) ) {
$conds[] = $this-mDb-bitAnd( 'ar_deleted', 
Revision::DELETED_USER ) . ' = 0';
-   } elseif( !$user-isAllowed( 'suppressrevision' ) ) {
+   } elseif ( !$user-isAllowed( 'suppressrevision' ) ) {
$conds[] = $this-mDb-bitAnd( 'ar_deleted', 
Revision::SUPPRESSED_USER ) .
' != ' . Revision::SUPPRESSED_USER;
}
return array(
'tables' = array( 'archive' ),
'fields' = array(
-   'ar_rev_id', 'ar_namespace', 'ar_title', 
'ar_timestamp', 'ar_comment', 'ar_minor_edit',
-   'ar_user', 'ar_user_text', 'ar_deleted'
+   'ar_rev_id', 'ar_namespace', 'ar_title', 
'ar_timestamp', 'ar_comment',
+   'ar_minor_edit', 'ar_user', 'ar_user_text', 
'ar_deleted'
),
'conds' = $conds,
'options' = array( 'USE INDEX' = $index )
@@ -107,8 +112,12 @@
$lang = $this-getLanguage();
$limits = $lang-pipeList( $limitLinks );
 
-   $this-mNavigationBar = ( . $lang-pipeList( array( 
$pagingLinks['first'], $pagingLinks['last'] ) ) . )  .
-   $this-msg( 'viewprevnext' )-rawParams( 
$pagingLinks['prev'], $pagingLinks['next'], $limits )-escaped();
+   // @todo i18n FIXME: Hard coded parentheses.
+   $this-mNavigationBar = ( .
+   $lang-pipeList( array( $pagingLinks['first'], 
$pagingLinks['last'] ) ) .
+   )  .
+   $this-msg( 'viewprevnext' )
+   -rawParams( $pagingLinks['prev'], 
$pagingLinks['next'], $limits )-escaped();
return $this-mNavigationBar;
}
 
@@ -138,15 +147,15 @@
$page = Title::makeTitle( $row-ar_namespace, $row-ar_title );
 
$rev = new Revision( array(
-   'title'  = $page,
-   'id' = $row-ar_rev_id,
-   'comment'= $row-ar_comment,
-   'user'   = $row-ar_user,
-   'user_text'  = $row-ar_user_text,
-   'timestamp'  = $row-ar_timestamp,
-   'minor_edit' = $row-ar_minor_edit,
-   'deleted'= $row-ar_deleted,
-   ) );
+   'title' = $page,
+   'id' = $row-ar_rev_id,
+   'comment' = $row-ar_comment,
+   'user' = $row-ar_user,
+   'user_text' = $row-ar_user_text,
+   'timestamp' = $row-ar_timestamp,
+   'minor_edit' = $row-ar_minor_edit,
+   'deleted' = $row-ar_deleted,
+   ) );
 
$undelete = SpecialPage::getTitleFor( 'Undelete' );
 
@@ -168,7 +177,7 @@
 

[MediaWiki-commits] [Gerrit] Support Lua/Scribunto framework in SMW - change (mediawiki...SemanticMediaWiki)

2013-03-28 Thread Mwjames (Code Review)
Mwjames has uploaded a new change for review.

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


Change subject: Support Lua/Scribunto framework in SMW
..

Support Lua/Scribunto framework in SMW

No idea about Lua but I used the Wikibase/Lua as reference framework
to get a general SMW/Lua/Scribunto interface working [1]

## Library
smw.property.lua is supported by SMW\Lua\PropertyLibrary which inlcudes
getPropertyType()

[1] http://www.semantic-mediawiki.org/wiki/Help:Writing_Lua_modules

Change-Id: I8cd37150c5eaeaddbd6cf5495a0b5eecd52a279f
---
M SemanticMediaWiki.hooks.php
M includes/Setup.php
A includes/lua/PropertyLibrary.php
A includes/lua/smw.property.lua
4 files changed, 140 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki 
refs/changes/93/56393/1

diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php
index 1a6315a..3a2c1c2 100644
--- a/SemanticMediaWiki.hooks.php
+++ b/SemanticMediaWiki.hooks.php
@@ -418,4 +418,19 @@
 
return true;
}
+
+   /**
+* External library for Scribunto
+*
+* @since 1.9
+*
+* @param $engine
+* @param array $extraLibraries
+* @return bool
+*/
+   public static function onScribuntoExternalLibraries ( $engine, array 
$extraLibraries ) {
+   $extraLibraries['smw.property'] = 'SMW\Lua\PropertyLibrary';
+   return true;
+   }
+
 }
diff --git a/includes/Setup.php b/includes/Setup.php
index 9d600f4..19ef141 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -85,6 +85,9 @@
$wgHooks['SkinGetPoweredBy'][] = 'SMWHooks::addPoweredBySMW';
 
$wgHooks['ExtensionTypes'][] = 'SMWHooks::addSemanticExtensionType';
+
+   // Scribunto support
+   $wgHooks['ScribuntoExternalLibraries'][] = 
'SMWHooks::onScribuntoExternalLibraries';
 }
 
 /**
@@ -111,6 +114,10 @@
$wgAutoloadClasses['SMWSemanticData']   = $incDir . 
'SMW_SemanticData.php';
$wgAutoloadClasses['SMWPageLister'] = $incDir . 
'SMW_PageLister.php';
 
+   // Lua support
+   $luaDir = $smwgIP . 'includes/lua/';
+   $wgAutoloadClasses['SMW\Lua\PropertyLibrary']   = $luaDir . 
'PropertyLibrary.php';
+
// Article pages
$apDir = $smwgIP . 'includes/articlepages/';
$wgAutoloadClasses['SMWOrderedListPage']= $apDir . 
'SMW_OrderedListPage.php';
diff --git a/includes/lua/PropertyLibrary.php b/includes/lua/PropertyLibrary.php
new file mode 100644
index 000..26bd69c
--- /dev/null
+++ b/includes/lua/PropertyLibrary.php
@@ -0,0 +1,77 @@
+?php
+
+namespace SMW\Lua;
+
+/**
+ * Registers methods that can be accessed through the Scribunto extension
+ *
+ * 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
+ *
+ * @since 1.9
+ *
+ * @file
+ * @ingroup SMW
+ *
+ * @author mwjames
+ */
+
+/**
+ * Registers property methods that can be accessed through the Scribunto 
extension
+ * @ingroup SMW
+ */
+class PropertyLibrary extends \Scribunto_LuaLibraryBase {
+
+   /**
+* Register smw.library.lua
+*
+* @since 1.9
+*/
+   public function register() {
+   global $smwgIP;
+   $lib = array(
+   'getPropertyType' = array( $this, 'getPropertyType' ),
+   );
+
+// $this-getEngine()-registerInterface( dirname( __FILE__ ) . 
'/' . 'smw.property.lua', $lib, array() );
+   $this-getEngine()-registerInterface( 'smw.property.lua', 
$lib, array() );
+   }
+
+   /**
+* Returns property type
+*
+* @since 1.9
+*
+* @param string $propertyName
+*
+* @return array
+*/
+   public function getPropertyType( $propertyName = null ) {
+   $this-checkType( 'getPropertyType', 1, $propertyName, 'string' 
);
+   $propertyName = trim( $propertyName );
+
+   if ( $propertyName === null ) {
+   return array( null );
+   }
+
+   $property = \SMWDIProperty::newFromUserLabel( $propertyName );
+
+   if ( $property === null ) {
+   return array( null );
+   

[MediaWiki-commits] [Gerrit] Adding puppet Limn module. - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Adding puppet Limn module.
..


Adding puppet Limn module.

Change-Id: Idb71d214135faac6d3c381aef8fcb2536f54644e
---
A modules/limn/README.md
A modules/limn/manifests/init.pp
A modules/limn/manifests/instance.pp
A modules/limn/manifests/instance/proxy.pp
A modules/limn/templates/init-limn.conf.erb
A modules/limn/templates/vhost-limn-proxy.conf.erb
6 files changed, 307 insertions(+), 0 deletions(-)

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



diff --git a/modules/limn/README.md b/modules/limn/README.md
new file mode 100644
index 000..c2b5477
--- /dev/null
+++ b/modules/limn/README.md
@@ -0,0 +1,53 @@
+[Limn][https://github.com/wikimedia/limn] puppet module.
+
+# Usage
+
+```puppet
+
+# Spawn up a limn instance called 'my-instance'.
+# Data files are expected to be at
+# /var/lib/limn/my-instance/data.
+limn::instance { my-instance: }
+
+```
+
+The above will start a Limn instance listening on port 8081, with an
+apache VirtualHost reverse proxying to it on port 80.  If the defaults
+for the VirtualHost don't work for you, you can set proxy = false
+on the instance and set it up yourself or using the limn::instance::proxy
+define.
+
+Note that the limn class by default does not attempt to install a limn
+package.  There is not currently a supported limn .deb package, so we
+recommend cloning the [limn repository][https://github.com/wikimedia/limn]
+directly into /usr/local/share/limn (or elsewhere if you set base_directory to 
something non default on limn::instance).  Or deploy limn to wherever you
+see fit.
+
+## Example:
+
+```bash
+# Install Limn at /usr/local/share/limn
+sudo git clone https://github.com/wikimedia/limn.git /usr/local/share/limn
+```
+
+```puppet
+
+class role::analytics::reportcard {
+  # spawn up a limn instance called 'reportcard'
+  # using the defaults.
+  limn::instance { 'reportcard': }
+
+  # We want an Apache VirtualHost to proxy
+  # 'reportcard.wmflabs.org' to the reportcard
+  # limn instance.
+  limn::instance::proxy { 'reportcard':
+server_name = 'reportcard.wmflabs.org',
+require = Limn::Instance['reportcard'],
+  }
+}
+```
+
+# Requirements
+* puppet-labs' apache puppet module.
+
+
diff --git a/modules/limn/manifests/init.pp b/modules/limn/manifests/init.pp
new file mode 100644
index 000..84d1b14
--- /dev/null
+++ b/modules/limn/manifests/init.pp
@@ -0,0 +1,65 @@
+# == Class limn
+# Installs limn.
+# To spawn up a limn server instance, use the limn::instance define.
+#
+# NOTE: This does not install limn.  You must do that youself.
+# When you use limn::instance, set $base_directory to the location
+# in which you installed limn.
+#
+# == Parameters
+# $var_directory  - Default path to Limn var directory.  This will also be 
limn user's home directory.  Default: /var/lib/limn
+# $log_directory  - Default path to Limn server logs.  Default: /var/log/limn
+# $user   - Limn user.  Default: limn
+# $group  - Limn group.  Default: limn
+#
+class limn(
+  $var_directory  = '/var/lib/limn',
+  $log_directory  = '/var/log/limn',
+  $install= false)
+{
+  $user  = 'limn'
+  $group = 'limn'
+
+  # Make sure nodejs is installed.
+  if (!defined(Package['nodejs'])) {
+package { 'nodejs':
+  ensure = installed,
+}
+  }
+
+  group { $group:
+ensure = present,
+system = true,
+  }
+
+  user { $user:
+ensure = present,
+gid= $group,
+home   = $var_directory,
+managehome = false,
+system = true,
+require= Group[$group],
+  }
+
+  # Default limn containing data directory.
+  # Instances default to storing data in
+  # $var_directory/$name
+  file { $var_directory:
+ensure  = 'directory',
+owner   = $user,
+group   = $group,
+mode= '0755',
+require = [User[$user], Group[$group]],
+  }
+
+  # Default limn log directory.
+  # Instances will log to
+  # $log_directory/limn-$name.log
+  file { $log_directory:
+ensure  = 'directory',
+owner   = $user,
+group   = $group,
+mode= '0755',
+require = [User[$user], Group[$group]],
+  }
+}
\ No newline at end of file
diff --git a/modules/limn/manifests/instance.pp 
b/modules/limn/manifests/instance.pp
new file mode 100644
index 000..5d0128d
--- /dev/null
+++ b/modules/limn/manifests/instance.pp
@@ -0,0 +1,97 @@
+# == Define limn::instance
+# Starts up a Limn Server instance.
+#
+# == Parameters:
+# $port   - Listen port for Limn instance.  Default: 8081
+# $environment- Node environment.  Default: production
+# $base_directory - Limn install base directory.  Default: 
/usr/local/share/limn
+# $var_directory  - Limn instance var directory.  Limn datafiles live here.  
Default: /var/lib/limn/$name
+# $log_file   - Limn instance log file.  Default: 
/var/log/limn/limn-$name.log
+# $ensure - 

[MediaWiki-commits] [Gerrit] Remove completely unused $wgRedirectScript - change (mediawiki/core)

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

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


Change subject: Remove completely unused $wgRedirectScript
..

Remove completely unused $wgRedirectScript

Nothing links to this anymore from any skin. Leave the redirect.php
in place, since somebody's probably still linking to it.

Change-Id: Ia624d65fbb1c787293054e12162b1444ab7c1edc
---
M RELEASE-NOTES-1.21
M includes/DefaultSettings.php
M includes/Setup.php
3 files changed, 1 insertion(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/94/56394/1

diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index ebedaf5..2327453 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -18,6 +18,7 @@
 * $wgBug34832TransitionalRollback has been removed.
 * (bug 29472) $wgUseDynamicDates has been removed and its functionality
   disabled.
+* $wgRedirectScript was removed. It was unused.
 
 === New features in 1.21 ===
 * (bug 38110) Schema changes (adding or dropping tables, indices and
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 26fe197..46d1a73 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -172,14 +172,6 @@
 $wgScript = false;
 
 /**
- * The URL path to redirect.php. This is a script that is used by the Nostalgia
- * skin.
- *
- * Defaults to {$wgScriptPath}/redirect{$wgScriptExtension}.
- */
-$wgRedirectScript = false;
-
-/**
  * The URL path to load.php.
  *
  * Defaults to {$wgScriptPath}/load{$wgScriptExtension}.
diff --git a/includes/Setup.php b/includes/Setup.php
index a602b79..08ab143 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -45,7 +45,6 @@
 
 // Set various default paths sensibly...
 if ( $wgScript === false ) $wgScript = $wgScriptPath/index$wgScriptExtension;
-if ( $wgRedirectScript === false ) $wgRedirectScript = 
$wgScriptPath/redirect$wgScriptExtension;
 if ( $wgLoadScript === false ) $wgLoadScript = 
$wgScriptPath/load$wgScriptExtension;
 
 if ( $wgArticlePath === false ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia624d65fbb1c787293054e12162b1444ab7c1edc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fixing README and comments - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Fixing README and comments
..


Fixing README and comments

Change-Id: Ib0e33a50b9acc0f3cf0bd971200ed8ae903a9339
---
M modules/limn/README.md
M modules/limn/manifests/init.pp
2 files changed, 5 insertions(+), 11 deletions(-)

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



diff --git a/modules/limn/README.md b/modules/limn/README.md
index c2b5477..6abbbcb 100644
--- a/modules/limn/README.md
+++ b/modules/limn/README.md
@@ -11,18 +11,15 @@
 
 ```
 
-The above will start a Limn instance listening on port 8081, with an
-apache VirtualHost reverse proxying to it on port 80.  If the defaults
-for the VirtualHost don't work for you, you can set proxy = false
-on the instance and set it up yourself or using the limn::instance::proxy
-define.
-
 Note that the limn class by default does not attempt to install a limn
 package.  There is not currently a supported limn .deb package, so we
 recommend cloning the [limn repository][https://github.com/wikimedia/limn]
 directly into /usr/local/share/limn (or elsewhere if you set base_directory to 
something non default on limn::instance).  Or deploy limn to wherever you
 see fit.
 
+
+```limn::instance::proxy``` sets up an Apache VirtualHost reverse proxying on 
port 80. 
+
 ## Example:
 
 ```bash
diff --git a/modules/limn/manifests/init.pp b/modules/limn/manifests/init.pp
index 84d1b14..61d01d9 100644
--- a/modules/limn/manifests/init.pp
+++ b/modules/limn/manifests/init.pp
@@ -1,5 +1,5 @@
 # == Class limn
-# Installs limn.
+# Sets up limn.
 # To spawn up a limn server instance, use the limn::instance define.
 #
 # NOTE: This does not install limn.  You must do that youself.
@@ -9,13 +9,10 @@
 # == Parameters
 # $var_directory  - Default path to Limn var directory.  This will also be 
limn user's home directory.  Default: /var/lib/limn
 # $log_directory  - Default path to Limn server logs.  Default: /var/log/limn
-# $user   - Limn user.  Default: limn
-# $group  - Limn group.  Default: limn
 #
 class limn(
   $var_directory  = '/var/lib/limn',
-  $log_directory  = '/var/log/limn',
-  $install= false)
+  $log_directory  = '/var/log/limn')
 {
   $user  = 'limn'
   $group = 'limn'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0e33a50b9acc0f3cf0bd971200ed8ae903a9339
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Moving Nostalgia skin from core for nostalgia.wikipedia.org - change (mediawiki...Nostalgia)

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

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


Change subject: Moving Nostalgia skin from core for nostalgia.wikipedia.org
..

Moving Nostalgia skin from core for nostalgia.wikipedia.org

Change-Id: Icf9fcf9c783e7a5c57958dd4b984594ee99c6021
---
A .gitreview
A Nostalgia.i18n.php
A Nostalgia.php
A Nostalgia_body.php
A SkinLegacy.php
A screen.css
6 files changed, 1,141 insertions(+), 0 deletions(-)


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

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..4982236
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=mediawiki/extensions/Nostalgia.git
+defaultbranch=master
+defaultrebase=0
diff --git a/Nostalgia.i18n.php b/Nostalgia.i18n.php
new file mode 100644
index 000..a136da0
--- /dev/null
+++ b/Nostalgia.i18n.php
@@ -0,0 +1,26 @@
+?php
+
+/**
+ * Messages for Nostalgia skin
+ */
+$messages = array();
+
+/**
+ * English
+ */
+$messages['en'] = array(
+   'nostalgia-desc' = 'A skin to show how Wikipedia looked in 2001',
+   'skinname-nostalgia' = 'Nostalgia', # only translate this message to 
other languages if you have to change it
+   'nostalgia.css'  = '/* CSS placed here will affect users of the 
Nostalgia skin */', # only translate this message to other languages if you 
have to change it
+   'nostalgia.js'   = '/* Any JavaScript here will be loaded for 
users using the Nostalgia skin */', # only translate this message to other 
languages if you have to change it
+);
+
+/**
+ * qqq
+ */
+$messages['qqq'] = array(
+   'nostalgia-desc' = '{{desc}}',
+   'skinname-desc'  = 'Name of Nostalgia skin',
+   'nostalgia.css'  = 'CSS file for the nostalgia skin',
+   'nostalgia.js'   = 'JS file for the nostalgia skin',
+);
diff --git a/Nostalgia.php b/Nostalgia.php
new file mode 100644
index 000..56c1b50
--- /dev/null
+++ b/Nostalgia.php
@@ -0,0 +1,24 @@
+?php
+
+/**
+ * Extension to provide the ancient nostalgia skin, plus SkinLegacy support
+ */
+$wgExtensionCredits['other'][] = array(
+   'path'   = __FILE__,
+   'name'   = 'Nostalgia',
+   'descriptionmsg' = 'nostalgia-desc',
+   'url'= 
'https://www.mediawiki.org/wiki/Extension:Nostalgia',
+);
+
+// Include stuff!
+$d = __DIR__ . '/';
+$wgAutoloadClasses['LegacyTemplate'] = $d/SkinLegacy.php;
+$wgAutoloadClasses['SkinLegacy'] = $d/SkinLegacy.php;
+$wgAutoloadClasses['SkinNostalgia'] = $d/Nostalgia_body.php;
+$wgExtensionMessagesFiles['Nostalgia'] = $d/Nostalgia.i18n.php;
+$wgValidSkinNames['nostalgia'] = 'Nostalgia';
+$wgResourceModules['ext.nostalgia'] = array(
+   'styles' = 'screen.css',
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = 'Nostalgia',
+);
diff --git a/Nostalgia_body.php b/Nostalgia_body.php
new file mode 100644
index 000..6c5a381
--- /dev/null
+++ b/Nostalgia_body.php
@@ -0,0 +1,147 @@
+?php
+/**
+ * Nostalgia: A skin which looks like Wikipedia did in its first year (2001).
+ *
+ * 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 Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) ) {
+   die( -1 );
+}
+
+/**
+ * @todo document
+ * @ingroup Skins
+ */
+class SkinNostalgia extends SkinLegacy {
+   var $skinname = 'nostalgia', $stylename = 'nostalgia',
+   $template = 'NostalgiaTemplate';
+
+   /**
+* @param $out OutputPage
+*/
+   function setupSkinUserCss( OutputPage $out ) {
+   parent::setupSkinUserCss( $out );
+   $out-addModuleStyles( 'ext.nostalgia' );
+   }
+
+}
+
+class NostalgiaTemplate extends LegacyTemplate {
+
+   /**
+* @return string
+*/
+   function doBeforeContent() {
+   $s = \ndiv id='content'\ndiv id='top'\n;
+   $s .= 'div id=logo' . $this-getSkin()-logoText( 'right' ) 
. '/div';
+
+   $s .= $this-pageTitle();
+   $s .= $this-pageSubtitle() . \n;
+
+   $s .= 'div id=topbar';
+   $s .= $this-topLinks() . \nbr /;
+
+   $notice = 

[MediaWiki-commits] [Gerrit] Added css class for hidden logs. - change (mediawiki...AbuseFilter)

2013-03-28 Thread Nischayn22 (Code Review)
Nischayn22 has uploaded a new change for review.

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


Change subject: Added css class for hidden logs.
..

Added css class for hidden logs.

Bug 28247

Change-Id: Icd58fce8f11308ba44abd403c150ebf27a25e0ca
---
M special/SpecialAbuseLog.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/97/56397/1

diff --git a/special/SpecialAbuseLog.php b/special/SpecialAbuseLog.php
index 38a0f15..defcc52 100644
--- a/special/SpecialAbuseLog.php
+++ b/special/SpecialAbuseLog.php
@@ -547,6 +547,7 @@
if ( self::isHidden( $row ) === true ) {
$description .= ' '.
$this-msg( 'abusefilter-log-hidden' )-parse();
+   $description = 'div class=afl-hidden' . 
$description . '/div';
} elseif ( self::isHidden($row) === 'implicit' ) {
$description .= ' '.
$this-msg( 'abusefilter-log-hidden-implicit' 
)-parse();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd58fce8f11308ba44abd403c150ebf27a25e0ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 nischay...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add temporary message for users using ancient skins - change (mediawiki...WikimediaMessages)

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

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


Change subject: Add temporary message for users using ancient skins
..

Add temporary message for users using ancient skins

Change-Id: I5c0621bcca31587f68c601c96c0f37d7d6639c62
---
M WikimediaTemporaryMessages.i18n.php
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/WikimediaTemporaryMessages.i18n.php 
b/WikimediaTemporaryMessages.i18n.php
index d3e32b9..c61f858 100644
--- a/WikimediaTemporaryMessages.i18n.php
+++ b/WikimediaTemporaryMessages.i18n.php
@@ -10,6 +10,8 @@
 $messages = array();
 
 $messages['en'] = array(
+   'wikimedia-oldskin-removal' = 'You are using the $1 skin, which is 
planned to be removed on $2.
+[[$3|More information]].',
'wikimediamessages-desc' = 'Wikimedia specific temporary messages',
 );
 
@@ -17,6 +19,10 @@
  * @author Shirayuki
  */
 $messages['qqq'] = array(
+   'wikimedia-oldskin-removal' = Message shown in early 2013 to users 
who are using old skins
+$1 is the current user's skin
+$2 is the date for removal
+$3 is an interwiki link to a page for more information,
'wikimediamessages-desc' = '{{desc|name=Wikimedia Temporary 
Messages}}',
 );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c0621bcca31587f68c601c96c0f37d7d6639c62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Adding Nostalgia to make-wmf-branch - change (mediawiki...release)

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

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


Change subject: Adding Nostalgia to make-wmf-branch
..

Adding Nostalgia to make-wmf-branch

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


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

diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf
index 4c80866..86e0b73 100644
--- a/make-wmf-branch/default.conf
+++ b/make-wmf-branch/default.conf
@@ -85,6 +85,7 @@
'Narayam',
'NavigationTiming',
'NewUserMessage',
+   'Nostalgia',
'Nuke',
'OAI',
'OATHAuth',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c56dbacd8628026ee1bbe2d526b9a44453f872e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 45776) Set $wgCategoryCollation to 'uca-uk' on all Ukra... - change (operations/mediawiki-config)

2013-03-28 Thread Matmarex (Code Review)
Matmarex has uploaded a new change for review.

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


Change subject: (bug 45776) Set $wgCategoryCollation to 'uca-uk' on all 
Ukrainian-language wikis
..

(bug 45776) Set $wgCategoryCollation to 'uca-uk' on all Ukrainian-language wikis

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 68143e2..1bfca54 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10374,16 +10374,22 @@
'be_x_oldwiki' = 'uca-be-tarask', // bug 46005
'bewiki' = 'uca-be', // bug 46004
'bewikisource' = 'uca-be', // bug 46004
-   'iswiktionary' = 'identity', // bug 30722
'huwiki' = 'uca-hu', // bug 45596
+   'iswiktionary' = 'identity', // bug 30722
'plwiki' = 'uca-pl', // bug 42413
'plwikivoyage' = 'uca-pl', // bug 45968
'plwiktionary' = 'uca-default', // bug 46081
'ptwiki' = 'uca-pt', // bug 45911
'ptwikibooks' = 'uca-pt', // bug 45911
'svwiki' = 'uca-sv', // bug 45446
+   'uawikimedia' = 'uca-uk', // bug 45776
'ukwiki' = 'uca-uk', // bug 45444
-   'ukwikivoyage' = 'uca-uk',
+   'ukwikibooks' = 'uca-uk', // bug 45776
+   'ukwikinews' = 'uca-uk', // bug 45776
+   'ukwikiquote' = 'uca-uk', // bug 45776
+   'ukwikisource' = 'uca-uk', // bug 45776
+   'ukwikivoyage' = 'uca-uk', // bug 46417
+   'ukwiktionary' = 'uca-uk', // bug 45776
 ),
 
 'wmgVectorSectionEditLinks' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I939e02be71ef8ebf6ba77751da6847d6d8a200df
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Matmarex matma@gmail.com

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


[MediaWiki-commits] [Gerrit] Fixing some more comments - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Fixing some more comments
..

Fixing some more comments

Change-Id: I383e084d27ed18d09c50a85042ba913cc3148900
---
M modules/limn/manifests/instance.pp
M modules/limn/manifests/instance/proxy.pp
2 files changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/56401/1

diff --git a/modules/limn/manifests/instance.pp 
b/modules/limn/manifests/instance.pp
index 5d0128d..f7fc2c5 100644
--- a/modules/limn/manifests/instance.pp
+++ b/modules/limn/manifests/instance.pp
@@ -15,7 +15,6 @@
   $base_directory = '/usr/local/share/limn',
   $var_directory  = /var/lib/limn/${name},
   $log_file   = /var/log/limn/limn-${name}.log,
-  $proxy  = true,
   $ensure = 'present')
 {
   require limn
diff --git a/modules/limn/manifests/instance/proxy.pp 
b/modules/limn/manifests/instance/proxy.pp
index d144575..6216904 100644
--- a/modules/limn/manifests/instance/proxy.pp
+++ b/modules/limn/manifests/instance/proxy.pp
@@ -7,7 +7,7 @@
 # $port   - Apache port to Listen on.  Default: 80.
 # $limn_host  - Hostname or IP of Limn instnace.  Default: 127.0.0.1
 # $limn_port  - Port of Limn instance. Default: 8081
-# $document_root  - Path to Apache document root.   This should be the 
limn::instance $var_directory.  Default: /usr/local/limn/var.
+# $document_root  - Path to Apache document root.   This should be the 
limn::instance $var_directory.  Default: /usr/local/share/limn/var.
 # $server_name- Named VirtualHost.Default: $name.$domain
 # $server_aliases - Server name aliases.  Default: none.
 #

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

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

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


[MediaWiki-commits] [Gerrit] Fixing some more comments - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Fixing some more comments
..


Fixing some more comments

Change-Id: I383e084d27ed18d09c50a85042ba913cc3148900
---
M modules/limn/manifests/instance.pp
M modules/limn/manifests/instance/proxy.pp
2 files changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/modules/limn/manifests/instance.pp 
b/modules/limn/manifests/instance.pp
index 5d0128d..f7fc2c5 100644
--- a/modules/limn/manifests/instance.pp
+++ b/modules/limn/manifests/instance.pp
@@ -15,7 +15,6 @@
   $base_directory = '/usr/local/share/limn',
   $var_directory  = /var/lib/limn/${name},
   $log_file   = /var/log/limn/limn-${name}.log,
-  $proxy  = true,
   $ensure = 'present')
 {
   require limn
diff --git a/modules/limn/manifests/instance/proxy.pp 
b/modules/limn/manifests/instance/proxy.pp
index d144575..6216904 100644
--- a/modules/limn/manifests/instance/proxy.pp
+++ b/modules/limn/manifests/instance/proxy.pp
@@ -7,7 +7,7 @@
 # $port   - Apache port to Listen on.  Default: 80.
 # $limn_host  - Hostname or IP of Limn instnace.  Default: 127.0.0.1
 # $limn_port  - Port of Limn instance. Default: 8081
-# $document_root  - Path to Apache document root.   This should be the 
limn::instance $var_directory.  Default: /usr/local/limn/var.
+# $document_root  - Path to Apache document root.   This should be the 
limn::instance $var_directory.  Default: /usr/local/share/limn/var.
 # $server_name- Named VirtualHost.Default: $name.$domain
 # $server_aliases - Server name aliases.  Default: none.
 #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I383e084d27ed18d09c50a85042ba913cc3148900
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Switch nostalgiawiki to use Nostalgia from extension - change (operations/mediawiki-config)

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

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


Change subject: Switch nostalgiawiki to use Nostalgia from extension
..

Switch nostalgiawiki to use Nostalgia from extension

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index a12b934..ca27bb3 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1194,6 +1194,9 @@
$wgSiteNotice = [//en.wikipedia.org/ See current Wikipedia];
}
$wgDefaultUserOptions['highlightbroken'] = 0;
+
+   // Nostalgia skin
+   include( $IP/extensions/Nostalgia/Nostalgia.php );
 }
 
 $wgUseHashTable = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33089a420b39bf6386c3ee6e8dec98838a50658f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Adding misc/limn.pp to manage setup of WMF hosted limn sites... - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Adding misc/limn.pp to manage setup of WMF hosted limn sites. 
Installing reportcard.wikimedia.org on stat1001.
..

Adding misc/limn.pp to manage setup of WMF hosted limn sites.
Installing reportcard.wikimedia.org on stat1001.

Change-Id: Ia51f2a5028076a06cbf7f91b889b9139c994c72b
---
A manifests/misc/limn.pp
M manifests/misc/statistics.pp
M manifests/role/statistics.pp
3 files changed, 53 insertions(+), 0 deletions(-)


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

diff --git a/manifests/misc/limn.pp b/manifests/misc/limn.pp
new file mode 100644
index 000..71c50e8
--- /dev/null
+++ b/manifests/misc/limn.pp
@@ -0,0 +1,44 @@
+# == Define misc::limn::instance
+# Sets up a limn instance as well as a
+# limn instance proxy.  This define
+# uses $::realm to infer an appropriate
+# default $server_name and $server_aliases.
+#
+# == Parameters:
+# $port- limn port
+# $server_name - ServerName for limn instance proxy. Default it to 
infer from $name and $::realm.
+# $server_aliases  - ServerAliases for limn instance proxy.  Default is to 
infer from $name and $::realm.
+#
+# == Example
+# misc::limn::instance { 'reportcard': }
+#
+define misc::limn::instance($port = 8081, $server_name = undef, 
$server_aliases = undef) {
+  limn::instance { $name:
+port = $port,
+  }
+
+  $default_server_name = $::realm ? {
+'production' = ${name}.wikimedia.org,
+'labs'   = ${name}.wmflabs.org,
+  }
+
+  $default_server_aliases = $::realm ? {
+'production' = '',
+'labs'   = ${name}.instance-proxy.wmflabs.org
+  }
+
+  $servername = $server_name ? {
+undef   = $default_server_name,
+default = $server_name,
+  }
+  $serveraliases = $server_aliases ? {
+undef   = $default_server_aliases,
+default = $server_aliases,
+  }
+
+  limn::instance::proxy { $name:
+limn_port  = $port,
+server_name= $servername,
+server_aliases = $serveraliases,
+  }
+}
diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 942c122..e9a1542 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -137,6 +137,13 @@
}
 }
 
+
+# reportcard.wikimedia.org
+class misc::statistics::sites::reportcard {
+  misc::limn::instance { 'reportcard': }
+}
+
+
 # stats.wikimedia.org
 class misc::statistics::sites::stats {
$site_name = stats.wikimedia.org
diff --git a/manifests/role/statistics.pp b/manifests/role/statistics.pp
index 5c96d3b..c8de2c5 100644
--- a/manifests/role/statistics.pp
+++ b/manifests/role/statistics.pp
@@ -42,6 +42,8 @@
misc::statistics::sites::community_analytics,
# metrics.wikimedia.org
misc::statistics::sites::metrics
+   # reportcard.wikimedia.org
+   misc::statistics::sites::reportcard
 }
 
 class role::statistics::eventlogging inherits role::statistics {

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

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

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


[MediaWiki-commits] [Gerrit] Fixed a small bug: the preferences argument to the getPrefer... - change (mediawiki...BreadCrumbs)

2013-03-28 Thread AABoyles (Code Review)
AABoyles has uploaded a new change for review.

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


Change subject: Fixed a small bug: the preferences argument to the 
getPreferences hook function required an ampersand.
..

Fixed a small bug: the preferences argument to the getPreferences hook function 
required an ampersand.

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


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

diff --git a/BreadCrumbsFunctions.php b/BreadCrumbsFunctions.php
index cbf0980..8aefdcf 100644
--- a/BreadCrumbsFunctions.php
+++ b/BreadCrumbsFunctions.php
@@ -104,7 +104,7 @@
return true;
 }
 
-function fnBreadCrumbsAddPreferences( $user, $defaultPreferences ) {
+function fnBreadCrumbsAddPreferences( $user, $defaultPreferences ) {
global $wgBreadCrumbsAllowUPOs;
 
if ( $wgBreadCrumbsAllowUPOs ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I509d20d6874fad61129b9c5a60c543cb4797110b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BreadCrumbs
Gerrit-Branch: master
Gerrit-Owner: AABoyles aaboy...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix failing move page test - change (qa/browsertests)

2013-03-28 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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


Change subject: Fix failing move page test
..

Fix failing move page test

Make the page name random for every scenario. All scenarios used to
share the same random page name.

Change-Id: If8c4ce239e8f48254392227fc490111522d2dab4
---
M features/support/env.rb
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/05/56405/1

diff --git a/features/support/env.rb b/features/support/env.rb
index 150d05e..9dc84e4 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -85,15 +85,13 @@
   saucelabs_key = secret['saucelabs_key']
 end
 
-does_not_exist_page_name = Random.new.rand
-
 Before('@login') do
   puts secret.yml file at /private/wmf/ or config/ is required for tests 
tagged @login if secret_yml_location == nil
 end
 
 Before do |scenario|
   @config = config
-  @does_not_exist_page_name = does_not_exist_page_name
+  @does_not_exist_page_name = Random.new.rand
   @mediawiki_username = mediawiki_username
   @mediawiki_password = mediawiki_password
   @browser = browser(environment, test_name(scenario), saucelabs_username, 
saucelabs_key)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8c4ce239e8f48254392227fc490111522d2dab4
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Revert changes in fallback behavior - change (mediawiki/core)

2013-03-28 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Revert changes in fallback behavior
..


Revert changes in fallback behavior

This patch set reverts the following:
* Iaaf6ccebd8c40c9602748c58c3a5c73c29e7aa4d
* Ib607a446d3499a3c042dce408db5cbaf12fa9e3d
* Ic59fd20856eb0489d70f3469a56ebce0efb3db13 (partially)

Bug 46579 comment 17 describes a desired solution. In
If88923119179924a5ec091394ccab000ade16b3e we are working on a fix, but it is
taking longer than we anticipated. There was a deployment window planned
about now, but we didn't make it. It makes sense to revert for now, and commit
a proper solution somewhere next week.

Bug: 46579
Bug: 1495
Change-Id: Iac7ac4357dd80e8cdb238a6a207393f0712b3fe5
---
M includes/cache/MessageCache.php
M languages/Language.php
D tests/phpunit/includes/cache/MessageCacheTest.php
3 files changed, 34 insertions(+), 216 deletions(-)

Approvals:
  Mormegil: Looks good to me, but someone else must approve
  Mwalker: Looks good to me, approved



diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 7425978..746cb0a 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -586,32 +586,27 @@
}
 
/**
-* Get a message from either the content language or the user language. 
The fallback
-* language order is the users language fallback union the content 
language fallback.
-* This list is then applied to find keys in the following order
-* 1) MediaWiki:$key/$langcode (for every language except the content 
language where
-*we look at MediaWiki:$key)
-* 2) Built-in messages via the l10n cache which is also in fallback 
order
+* Get a message from either the content language or the user language.
 *
-* @param string $key the message cache key
-* @param $useDB Boolean: If true will look for the message in the DB, 
false only
-*get the message from the DB, false to use only the compiled 
l10n cache.
-* @param bool|string|object $langcode Code of the language to get the 
message for.
-*- If string and a valid code, will create a standard language 
object
-*- If string but not a valid code, will create a basic 
language object
-*- If boolean and false, create object from the current users 
language
-*- If boolean and true, create object from the wikis content 
language
-*- If language object, use it as given
+* @param $key String: the message cache key
+* @param $useDB Boolean: get the message from the DB, false to use only
+*   the localisation
+* @param bool|string $langcode Code of the language to get the message 
for, if
+*  it is a valid code create a language for that 
language,
+*  if it is a string but not a valid code then make a 
basic
+*  language object, if it is a false boolean then use 
the
+*  current users language (as a fallback for the old
+*  parameter functionality), or if it is a true boolean
+*  then use the wikis content language (also as a
+*  fallback).
 * @param $isFullKey Boolean: specifies whether $key is a two part key
 *   msg/lang.
 *
 * @throws MWException
-* @return string|bool False if the message doesn't exist, otherwise 
the message
+* @return string|bool
 */
function get( $key, $useDB = true, $langcode = true, $isFullKey = false 
) {
global $wgLanguageCode, $wgContLang;
-
-   wfProfileIn( __METHOD__ );
 
if ( is_int( $key ) ) {
// Non-string key given exception sometimes happens 
for numerical strings that become ints somewhere on their way here
@@ -619,37 +614,22 @@
}
 
if ( !is_string( $key ) ) {
-   wfProfileOut( __METHOD__ );
throw new MWException( 'Non-string key given' );
}
 
if ( strval( $key ) === '' ) {
# Shortcut: the empty key is always missing
-   wfProfileOut( __METHOD__ );
return false;
}
 
-
-   # Obtain the initial language object
-   if ( $isFullKey ) {
-   $keyParts = explode( '/', $key );
-   if ( count( $keyParts )  2 ) {
-   throw new MWException( Message key '$key' does 
not appear to be a full key. );
-   }
-
-   $langcode = array_pop( $keyParts );
-   $key = implode( '/', $keyParts );
- 

[MediaWiki-commits] [Gerrit] Start outputting deprecation warnings when legacy linker met... - change (mediawiki/core)

2013-03-28 Thread Daniel Friesen (Code Review)
Daniel Friesen has uploaded a new change for review.

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


Change subject: Start outputting deprecation warnings when legacy linker 
methods are called on skins.
..

Start outputting deprecation warnings when legacy linker methods are called on 
skins.

Change-Id: I97b046739428176540ddd80e72a80d5feefe3fc9
---
M RELEASE-NOTES-1.21
M includes/Skin.php
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/06/56406/1

diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index efa534a..ecb37d5 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -350,6 +350,7 @@
function, which is now deprecated).
 * BREAKING CHANGE: The Services_JSON class has been removed; if necessary,
   be sure to upgrade affected extensions at the same time (e.g. Collection).
+* Calling Linker methods using a skin will now output deprecation warnings.
 
 == Compatibility ==
 
diff --git a/includes/Skin.php b/includes/Skin.php
index e5aedd9..a4cb9f4 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -1559,6 +1559,7 @@
function __call( $fname, $args ) {
$realFunction = array( 'Linker', $fname );
if ( is_callable( $realFunction ) ) {
+   wfDeprecated( get_class( $this ) . '::' . $fname, 
'1.21' );
return call_user_func_array( $realFunction, $args );
} else {
$className = get_class( $this );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97b046739428176540ddd80e72a80d5feefe3fc9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Friesen dan...@nadir-seen-fire.com

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


[MediaWiki-commits] [Gerrit] WIP operations-debs-python-voluptuous-debbuild WIP - change (integration/jenkins-job-builder-config)

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

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


Change subject: WIP operations-debs-python-voluptuous-debbuild WIP
..

WIP operations-debs-python-voluptuous-debbuild WIP

Experimental job to build a debian package.  Require cowbuilder on
gallium which we do not have yet :(

Change-Id: I256276640fb0c4d90204fb6fc1dce9cfe4480612
---
M operations-debs.yaml
1 file changed, 17 insertions(+), 3 deletions(-)


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

diff --git a/operations-debs.yaml b/operations-debs.yaml
index dbf80cb..d9ceeb0 100644
--- a/operations-debs.yaml
+++ b/operations-debs.yaml
@@ -13,15 +13,29 @@
 - job-template:
 name: '{name}-debbuild'
 defaults: use-zuul
+triggers:
+ - zuul
 
 scm:
  - git-deb-package:
 gerrit-name: '{gerrit-name}'
 
 builders:
- - shell: 'cd packaging  uscan --verbose --rename 
--download-current-version'
- - shell: 'cd packaging  dpkg-buildpackage -rfakeroot -us -uc'
- - shell: 'lintian --info *.deb'
+# - shell: 'cd packaging  uscan --verbose --rename 
--download-current-version'
+# - shell: 'cd packaging  dpkg-buildpackage -rfakeroot -us -uc'
+# - shell: 'lintian --info *.deb'
+ - shell: |
+mkdir -p tarballs
+cd packaging
+uscan \
+--verbose \
+--rename \
+--download-current-version \
+--destdir ../tarballs \
+--check-dirname-regex packaging
+git buildpackage --git-ignore-branch --git-pbuilder
+# SEE http://www.eyrie.org/~eagle/software/scripts/git-pbuilder.html
+# Need to use cowbuilder
 
 - job-template:
 name: '{name}-antbuild'

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

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

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


[MediaWiki-commits] [Gerrit] Start outputting deprecation warnings when legacy linker met... - change (mediawiki/core)

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

Change subject: Start outputting deprecation warnings when legacy linker 
methods are called on skins.
..


Start outputting deprecation warnings when legacy linker methods are called on 
skins.

Change-Id: I97b046739428176540ddd80e72a80d5feefe3fc9
---
M RELEASE-NOTES-1.21
M includes/Skin.php
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index efa534a..ecb37d5 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -350,6 +350,7 @@
function, which is now deprecated).
 * BREAKING CHANGE: The Services_JSON class has been removed; if necessary,
   be sure to upgrade affected extensions at the same time (e.g. Collection).
+* Calling Linker methods using a skin will now output deprecation warnings.
 
 == Compatibility ==
 
diff --git a/includes/Skin.php b/includes/Skin.php
index e5aedd9..a4cb9f4 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -1559,6 +1559,7 @@
function __call( $fname, $args ) {
$realFunction = array( 'Linker', $fname );
if ( is_callable( $realFunction ) ) {
+   wfDeprecated( get_class( $this ) . '::' . $fname, 
'1.21' );
return call_user_func_array( $realFunction, $args );
} else {
$className = get_class( $this );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97b046739428176540ddd80e72a80d5feefe3fc9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Show notice to users who are using legacy skins - change (operations/mediawiki-config)

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

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


Change subject: Show notice to users who are using legacy skins
..

Show notice to users who are using legacy skins

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index ca27bb3..1c943a9 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1197,7 +1197,17 @@
 
// Nostalgia skin
include( $IP/extensions/Nostalgia/Nostalgia.php );
-}
+} else {
+   $wgHooks['BeforePageDisplay'][] = function( $out, $skin ) {
+   $badSkinName = $skin-getSkinName();
+   if ( in_array( $badSkinName, array( 'chick', 'simple', 
'myskin', 'nostalgia', 'standard' ) ) ) {
+   $metaPage = 'meta:Turning off outdated skins';
+   $removeDate = $out-getLang()-formatDate( '1358208000' 
/* 2013-04-15 */ );
+   $out-prependHTML( 'h1' . wfMsgHtml( 
'wikimedia-oldskin-removal', $badSkinName, $removeDate, $metaPage ) . '/h1' );
+   }
+   return true;
+   };
+ }
 
 $wgUseHashTable = true;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8a9632133737612f5de2af74bc7b04592ff33ce
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Making agent param logic consistant - change (mediawiki...Echo)

2013-03-28 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review.

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


Change subject: Making agent param logic consistant
..

Making agent param logic consistant

It doesn't make sense to create 2 tokens for the i18n message in one
case and only 1 token in another case. The current i18n messages are
designed to handle only 1 token for agent (for both grammar and display).

Change-Id: I7ab6b5a7b6731e60d0ea6e9e590c15039fdc4459
---
M formatters/BasicFormatter.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/09/56409/1

diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php
index 25de60b..7b7fb86 100644
--- a/formatters/BasicFormatter.php
+++ b/formatters/BasicFormatter.php
@@ -327,9 +327,8 @@
 */
protected function processParam( $event, $param, $message, $user ) {
if ( $param === 'agent' ) {
-   // Actually converts to two parameters for gender 
support
if ( !$event-getAgent() ) {
-   $message-params( '', wfMessage( 
'echo-no-agent' )-text() );
+   $message-params( wfMessage( 'echo-no-agent' 
)-text() );
} else {
$agent = $event-getAgent();
$message-params( $agent-getName() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ab6b5a7b6731e60d0ea6e9e590c15039fdc4459
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove auto-open of meta dialog - change (mediawiki...VisualEditor)

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

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


Change subject: Remove auto-open of meta dialog
..

Remove auto-open of meta dialog

This was accidentally introduced in I7ff5f5f095460fd4f6cf841f4182bfb92bf034da

Change-Id: I9266346ff43897e3e7789fd8224628422bc903c6
---
M demos/ve/index.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/demos/ve/index.php b/demos/ve/index.php
index f3852f3..290b9a3 100644
--- a/demos/ve/index.php
+++ b/demos/ve/index.php
@@ -264,7 +264,7 @@
ve.createDocumentFromHTML( ?php echo 
json_encode( $html ) ? )
);
$( '.ve-ce-documentNode' ).focus();
-   ve.instances[0].dialogs.open( 'meta' );
+   //ve.instances[0].dialogs.open( 'meta' );
} );
/script
 

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

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

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


[MediaWiki-commits] [Gerrit] Adding misc/limn.pp to manage setup of WMF hosted limn sites... - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Adding misc/limn.pp to manage setup of WMF hosted limn sites. 
Installing reportcard.wikimedia.org on stat1001.
..


Adding misc/limn.pp to manage setup of WMF hosted limn sites.
Installing reportcard.wikimedia.org on stat1001.

Change-Id: Ia51f2a5028076a06cbf7f91b889b9139c994c72b
---
A manifests/misc/limn.pp
M manifests/misc/statistics.pp
M manifests/role/statistics.pp
3 files changed, 59 insertions(+), 1 deletion(-)

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



diff --git a/manifests/misc/limn.pp b/manifests/misc/limn.pp
new file mode 100644
index 000..7f15772
--- /dev/null
+++ b/manifests/misc/limn.pp
@@ -0,0 +1,49 @@
+# == Define misc::limn::instance
+# Sets up a limn instance as well as a
+# limn instance proxy.  This define
+# uses $::realm to infer an appropriate
+# default $server_name and $server_aliases.
+#
+# == Parameters:
+# $port- limn port
+# $server_name - ServerName for limn instance proxy. Default it to 
infer from $name and $::realm.
+# $server_aliases  - ServerAliases for limn instance proxy.  Default is to 
infer from $name and $::realm.
+#
+# == Example
+# misc::limn::instance { 'reportcard': }
+#
+define misc::limn::instance($port = 8081, $server_name = undef, 
$server_aliases = undef) {
+  ::limn::instance { $name:
+port = $port,
+  }
+
+  # If $server_name was not specified,
+  # Pick $name.wikimedia.org for production,
+  # $name.wmflabs.org for labs,
+  # and just $name for anything else.
+  $servername = $server_name ? {
+undef   = $::realm ? {
+  'production' = ${name}.wikimedia.org,
+  'labs'   = ${name}.wmflabs.org,
+  default  = $name,
+},
+default = $server_name,
+  }
+
+  # If $server_aliases was not specified,
+  # Pick ${name}.instance-proxy.wmflabs.org for labs,
+  # and none for anything else.
+  $serveraliases = $server_aliases ? {
+undef   = $::realm ? {
+  'labs'   = ${name}.instance-proxy.wmflabs.org,
+  default  = '',
+},
+default = $server_aliases,
+  }
+
+  limn::instance::proxy { $name:
+limn_port  = $port,
+server_name= $servername,
+server_aliases = $serveraliases,
+  }
+}
diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 942c122..e9a1542 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -137,6 +137,13 @@
}
 }
 
+
+# reportcard.wikimedia.org
+class misc::statistics::sites::reportcard {
+  misc::limn::instance { 'reportcard': }
+}
+
+
 # stats.wikimedia.org
 class misc::statistics::sites::stats {
$site_name = stats.wikimedia.org
diff --git a/manifests/role/statistics.pp b/manifests/role/statistics.pp
index 5c96d3b..c85fd33 100644
--- a/manifests/role/statistics.pp
+++ b/manifests/role/statistics.pp
@@ -41,7 +41,9 @@
# community-analytics.wikimedia.org
misc::statistics::sites::community_analytics,
# metrics.wikimedia.org
-   misc::statistics::sites::metrics
+   misc::statistics::sites::metrics,
+   # reportcard.wikimedia.org
+   misc::statistics::sites::reportcard
 }
 
 class role::statistics::eventlogging inherits role::statistics {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia51f2a5028076a06cbf7f91b889b9139c994c72b
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Bug 41519: Only request token when clicking the star - change (mediawiki...MobileFrontend)

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

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


Change subject: Bug 41519: Only request token when clicking the star
..

Bug 41519: Only request token when clicking the star

Currently we are making unnecessary token requests. This changes things
so we only make one when the user hits the star.

Document functions in process

Bug 41519

Change-Id: I9512c26a3f7ae020bf604a7b94283821a08606a3
---
M javascripts/modules/mf-watchstar.js
1 file changed, 37 insertions(+), 19 deletions(-)


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

diff --git a/javascripts/modules/mf-watchstar.js 
b/javascripts/modules/mf-watchstar.js
index 8c97cf5..68142c5 100644
--- a/javascripts/modules/mf-watchstar.js
+++ b/javascripts/modules/mf-watchstar.js
@@ -1,11 +1,18 @@
 (function( M, $ ) {
 
 var api = M.require( 'api' ), w = ( function() {
-   var lastToken, nav = M.require( 'navigation' ), popup = M.require( 
'notifications' ),
+   var nav = M.require( 'navigation' ), popup = M.require( 'notifications' 
),
drawer = new nav.CtaDrawer( { content: mw.msg( 
'mobile-frontend-watchlist-cta' ) } );
 
// FIXME: this should live in a separate module and make use of 
MobileFrontend events
-   function logWatchEvent( eventType ) {
+   /**
+* Checks whether a list of article titles are being watched by the 
current user
+* Checks a local cache before making a query to server
+*
+* @param {Integer} eventType: 0=watched article, 1=stopped watching 
article, 2=clicked star as anonymous user
+* @param {String} token: Token returned from getToken, optional when 
eventType is 2
+*/
+   function logWatchEvent( eventType, token ) {
var types = [ 'watchlist', 'unwatchlist', 'anonCTA' ],
data = {
// FIXME: this gives wrong results when page 
loaded dynamically
@@ -13,7 +20,7 @@
anon: mw.config.get( 'wgUserName' ) === null,
action: types[ eventType ],
isStable: mw.config.get( 'wgMFMode' ),
-   token: lastToken || '+\\', // +\\ for anon
+   token: eventType === 2 ? '+\\' : token, // +\\ 
for anon
username: mw.config.get( 'wgUserName' ) || ''
};
 
@@ -52,6 +59,13 @@
return $( 'a class=watch-this-article' ).appendTo( 
container )[ 0 ];
}
 
+   /**
+* Creates a watchlist button
+*
+* @param {jQuery} container: Element in which to create a watch star
+* @param {String} title: The title to be watched
+* @param {Boolean} isWatchedArticle: Whether the article is currently 
watched by the user or not
+*/
function createWatchListButton( container, title, isWatchedArticle ) {
var prevent,
watchBtn = createButton( container );
@@ -65,12 +79,12 @@
$( watchBtn ).removeClass( 'disabled loading' );
}
 
-   function success( data ) {
+   function success( data, token ) {
if ( data.watch.hasOwnProperty( 'watched' ) ) {
-   logWatchEvent( 0 );
+   logWatchEvent( 0, token );
$( watchBtn ).addClass( 'watched' );
} else {
-   logWatchEvent( 1 );
+   logWatchEvent( 1, token );
$( watchBtn ).removeClass( 'watched' );
}
enable();
@@ -78,7 +92,10 @@
 
function toggleWatchStatus( unwatch ) {
api.getToken( 'watch' ).done( function( token ) {
-   toggleWatch( title, token, unwatch, success, 
enable );
+   toggleWatch( title, token, unwatch,
+   function( data ) {
+   success( data, token );
+   }, enable );
} );
}
 
@@ -140,14 +157,19 @@
}
}
 
+   /**
+* Creates a watch star OR a drawer to encourage user to register / 
login
+*
+* @param {jQuery} container: A jQuery container to create a watch list 
button
+* @param {String} title: The name of the article to watch
+*/
function initWatchListIcon( container, title ) {
 
-   api.getToken( 'watch' ).done( function( token ) {
-   lastToken = token;
+   if ( M.isLoggedIn() ) {
  

[MediaWiki-commits] [Gerrit] A bunch of Echo style tweaks per Vibha - change (mediawiki...Echo)

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

Change subject: A bunch of Echo style tweaks per Vibha
..


A bunch of Echo style tweaks per Vibha

Change-Id: I1317b1dd670c8f7a33b62bb7d86a6d25d841c6a1
---
M Echo.i18n.php
M formatters/NotificationFormatter.php
M modules/base/ext.echo.base.css
M modules/base/ext.echo.base.js
M modules/icons/icons.css
M modules/overlay/ext.echo.overlay.css
M modules/special/ext.echo.special.css
7 files changed, 20 insertions(+), 35 deletions(-)

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



diff --git a/Echo.i18n.php b/Echo.i18n.php
index 243f19f..e61e643 100644
--- a/Echo.i18n.php
+++ b/Echo.i18n.php
@@ -51,12 +51,13 @@
// Special:Notifications
'notifications' = 'Notifications',
'tooltip-pt-notifications' = 'Your notifications',
-   'echo-specialpage' = 'My notifications',
+   'echo-specialpage' = 'Notifications',
'echo-anon' = 'To receive notifications, 
[[Special:Userlogin/signup|create an account]] or [[Special:UserLogin|log 
in]].',
'echo-none' = 'You have no notifications.',
'echo-more-info' = 'More info',
 
// Notification
+   'echo-quotation-marks' = '$1',
'notification-edit-talk-page2' = '[[User:$1|$1]] {{GENDER:$1|posted}} 
on your [[User talk:$2|talk page]].',
'notification-edit-talk-page-flyout2' = '$1 {{GENDER:$1|posted}} on 
your [[User talk:$2|talk page]].',
'notification-article-linked2' = '$3 {{PLURAL:$4|was|were}} 
{{GENDER:$1|linked}} by [[User:$1|$1]] from this page: [[$2]]',
@@ -143,8 +144,8 @@
'echo-link-new' = '$1 new {{PLURAL:$1|notification|notifications}}',
'echo-link' = 'Notifications',
'echo-overlay-link' = 'All notifications',
-   'echo-overlay-title' = 'My notifications',
-   'echo-overlay-title-overflow' = 'My notifications (showing $1 of $2 
unread)',
+   'echo-overlay-title' = 'Notifications',
+   'echo-overlay-title-overflow' = 'Notifications (showing $1 of $2 
unread)',
 
// Special page
'echo-date-today' = 'Today',
@@ -274,6 +275,7 @@
'echo-anon' = 'Error message shown to users who try to visit 
Special:Notifications as an anon.',
'echo-none' = 'Message shown to users who have no notifications. Also 
shown in the overlay.',
'echo-more-info' = 'This is used for the title (mouseover text) of an 
icon that links to a page with more information about the Echo extension.',
+   'echo-quotation-marks' = 'Puts the edit summary in quotation marks. 
Only translate if different than English.',
'notification-edit-talk-page2' = Format for displaying notifications 
of a user talk page being edited
 * $1 is the username of the person who edited, plain text. Can be used for 
GENDER.
 * $2 is the current user's name, used in the link to their talk page.
diff --git a/formatters/NotificationFormatter.php 
b/formatters/NotificationFormatter.php
index 02fd81b..eb2b06f 100644
--- a/formatters/NotificationFormatter.php
+++ b/formatters/NotificationFormatter.php
@@ -156,6 +156,7 @@
$summary = $matches[1] . span 
class='autocomment' . $section . /span . $matches[3];
}
}
+   $summary = wfMessage( 'echo-quotation-marks', 
$summary )-inContentLanguage()-plain();
$summary = Xml::tags( 'span', array( 'class' = 
'comment' ), $summary );
$summary = Xml::tags( 'div', array( 'class' = 
'mw-echo-summary' ), $summary );
}
diff --git a/modules/base/ext.echo.base.css b/modules/base/ext.echo.base.css
index 01bb7b3..e34f3ce 100644
--- a/modules/base/ext.echo.base.css
+++ b/modules/base/ext.echo.base.css
@@ -1,6 +1,6 @@
 .mw-echo-title {
font-size: 13px;
-   line-height: 16px;
+   line-height: 14px;
font-weight: normal;
 }
 .mw-echo-content {
@@ -9,11 +9,10 @@
overflow: hidden;
 }
 .mw-echo-payload {
-   margin-top: 0.5em;
+   margin-top: 0.3em;
 }
 .mw-echo-timestamp {
-   color: #A5A5A5;
-   margin-top: 0.1em;
+   color: #6D6D6D;
font-size: 9px;
 }
 .mw-echo-notifications {
@@ -31,6 +30,9 @@
/* Force container to expand to height of floated contents */
overflow: hidden;
zoom: 1;
+}
+.mw-echo-notification.mw-echo-unread {
+   color: #252525;
 }
 .mw-echo-close-box {
position: absolute;
@@ -63,3 +65,9 @@
margin-left: 1em;
cursor: pointer;
 }
+.mw-echo-notification span.comment {
+   font-style: normal;
+}
+.mw-echo-notification span.autocomment {
+   color: inherit;
+}
diff --git a/modules/base/ext.echo.base.js b/modules/base/ext.echo.base.js
index 21d83be..8f82d06 100644
--- a/modules/base/ext.echo.base.js
+++ 

[MediaWiki-commits] [Gerrit] (bug 44228) dataValues.util: Not using $.extend to set const... - change (mediawiki...DataValues)

2013-03-28 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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


Change subject: (bug 44228) dataValues.util: Not using $.extend to set 
constructor
..

(bug 44228) dataValues.util: Not using $.extend to set constructor

Setting the constructor in the inherit utility has to be done explicitly in 
order to be
compatibly with IE8.

Change-Id: Id3d931c5349c33d9df39920f24c40645c0b90710
---
M DataValues/resources/dataValues.util.js
1 file changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/DataValues/resources/dataValues.util.js 
b/DataValues/resources/dataValues.util.js
index 10fabe7..b8d0ca5 100644
--- a/DataValues/resources/dataValues.util.js
+++ b/DataValues/resources/dataValues.util.js
@@ -66,9 +66,13 @@
 
NewConstructor.prototype = $.extend(
new NewPrototype(),
-   members,
-   { constructor: NewConstructor } // make sure 
constructor property is set properly
+   members
);
+
+   // Make sure constructor property is set properly. The 
constructor has to be assigned
+   // explicitly since doing it along the $.extend() above will be 
ignored in IE8.
+   NewConstructor.prototype.constructor = NewConstructor;
+
return NewConstructor;
};
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3d931c5349c33d9df39920f24c40645c0b90710
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] fix gerrit header logo link - change (operations/puppet)

2013-03-28 Thread Jeremyb (Code Review)
Jeremyb has uploaded a new change for review.

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


Change subject: fix gerrit header logo link
..

fix gerrit header logo link

already works for gerrit itself (mostly?) but for gitweb this just links back
to the same page you're already on

discovered during CR @ https://review.openstack.org/25632

Change-Id: I1af80f5a3082c16b1710c56d74fb74c917581a37
---
M files/gerrit/skin/GerritSiteHeader.html
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/56413/1

diff --git a/files/gerrit/skin/GerritSiteHeader.html 
b/files/gerrit/skin/GerritSiteHeader.html
index 795c9b7..d9054ae 100644
--- a/files/gerrit/skin/GerritSiteHeader.html
+++ b/files/gerrit/skin/GerritSiteHeader.html
@@ -1,3 +1,3 @@
-a href=h1 class=wm-gerrit-heading
+a href=/r/h1 class=wm-gerrit-heading
Wikimedia Code Review
 /h1/a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1af80f5a3082c16b1710c56d74fb74c917581a37
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jeremyb jer...@tuxmachine.com

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


[MediaWiki-commits] [Gerrit] Renamed JobQueue::QoS_Atomic to JobQueue::QOS_ATOMIC per con... - change (mediawiki/core)

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

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


Change subject: Renamed JobQueue::QoS_Atomic to JobQueue::QOS_ATOMIC per 
convention.
..

Renamed JobQueue::QoS_Atomic to JobQueue::QOS_ATOMIC per convention.

Change-Id: I45e633ff40a805df9dfeda88ac738cfe6ac04739
---
M includes/job/JobQueue.php
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/includes/job/JobQueue.php b/includes/job/JobQueue.php
index 9c152cd..09ca67c 100644
--- a/includes/job/JobQueue.php
+++ b/includes/job/JobQueue.php
@@ -36,7 +36,8 @@
protected $maxTries; // integer; maximum number of times to try a job
protected $checkDelay; // boolean; allow delayed jobs
 
-   const QoS_Atomic = 1; // integer; all-or-nothing job insertions
+   const QOS_ATOMIC = 1; // integer; all-or-nothing job insertions
+   const QoS_Atomic = 1; // integer; all-or-nothing job insertions (b/c)
 
const ROOTJOB_TTL = 2419200; // integer; seconds to remember root jobs 
(28 days)
 
@@ -243,7 +244,7 @@
 * Outside callers should use JobQueueGroup::push() instead of this 
function.
 *
 * @param $jobs Job|Array
-* @param $flags integer Bitfield (supports JobQueue::QoS_Atomic)
+* @param $flags integer Bitfield (supports JobQueue::QOS_ATOMIC)
 * @return bool Returns false on failure
 * @throws MWException
 */
@@ -257,7 +258,7 @@
 * Outside callers should use JobQueueGroup::push() instead of this 
function.
 *
 * @param array $jobs List of Jobs
-* @param $flags integer Bitfield (supports JobQueue::QoS_Atomic)
+* @param $flags integer Bitfield (supports JobQueue::QOS_ATOMIC)
 * @return bool Returns false on failure
 * @throws MWException
 */

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

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

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


[MediaWiki-commits] [Gerrit] Latin - Cyrillic for ukwikivoyage aliases - change (operations/mediawiki-config)

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

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


Change subject: Latin - Cyrillic for ukwikivoyage aliases
..

Latin - Cyrillic for ukwikivoyage aliases

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 68143e2..77ae2a7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3259,8 +3259,8 @@
'+ukwikivoyage' = array(
'Portal' = 100,
'Portal_talk' = 101,
-   'BM' = 4,
-   'K' = 14,
+   'ВМ' = 4,
+   'К' = 14,
'П' = 100,
'Д' =  12,
),

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

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

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


[MediaWiki-commits] [Gerrit] Latin - Cyrillic for ukwikivoyage aliases - change (operations/mediawiki-config)

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

Change subject: Latin - Cyrillic for ukwikivoyage aliases
..


Latin - Cyrillic for ukwikivoyage aliases

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 68143e2..77ae2a7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3259,8 +3259,8 @@
'+ukwikivoyage' = array(
'Portal' = 100,
'Portal_talk' = 101,
-   'BM' = 4,
-   'K' = 14,
+   'ВМ' = 4,
+   'К' = 14,
'П' = 100,
'Д' =  12,
),

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

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

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


[MediaWiki-commits] [Gerrit] Removing logic to install and setup apache from limn::instan... - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Removing logic to install and setup apache from 
limn::instance::proxy. You must do this yourself
..

Removing logic to install and setup apache from limn::instance::proxy.
You must do this yourself

Change-Id: Iabf6ab9d9b15b9ab3e445f8f6719f66d189bf736
---
M modules/limn/manifests/instance/proxy.pp
1 file changed, 7 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/16/56416/1

diff --git a/modules/limn/manifests/instance/proxy.pp 
b/modules/limn/manifests/instance/proxy.pp
index 6216904..700e3ab 100644
--- a/modules/limn/manifests/instance/proxy.pp
+++ b/modules/limn/manifests/instance/proxy.pp
@@ -1,7 +1,10 @@
 # == Define limn::instance::proxy
 # Sets up an apache mod_rewrite proxy for proxying to a Limn instance.
 # Static files in $document_root will be served by apache.
-# This define depends on the apache puppet module.
+#
+# NOTE: You must install apache yourself.
+# A Service and Package named 'apache2' must be defined.
+# You must also make sure mod rewrite is enabled.
 #
 # == Parameters:
 # $port   - Apache port to Listen on.  Default: 80.
@@ -19,22 +22,15 @@
   $server_name = ${name}.${::domain},
   $server_aliases  = '')
 {
-  # need apache and mod_rewrite
-  class { 'apache':
-serveradmin  = $server_admin,
-default_mods = true,
-  }
-  apache::mod { 'rewrite': }
-
   # Configure the Apache Limn instance proxy VirtualHost.
-  $priority  = 10
+  $priority = 10
   file { ${priority}-limn-${name}.conf:
 path= ${apache::params::vdir}/${priority}-limn-${name}.conf,
 content = template('limn/vhost-limn-proxy.conf.erb'),
 owner   = 'root',
 group   = 'root',
 mode= '0444',
-require = [Package['httpd'], Apache::Mod['rewrite']],
-notify  = Service['httpd'],
+require = Package['apache2'],
+notify  = Service['apache2'],
   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Removing logic to install and setup apache from limn::instan... - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Removing logic to install and setup apache from 
limn::instance::proxy. You must do this yourself
..


Removing logic to install and setup apache from limn::instance::proxy.
You must do this yourself

Change-Id: Iabf6ab9d9b15b9ab3e445f8f6719f66d189bf736
---
M modules/limn/manifests/instance/proxy.pp
1 file changed, 7 insertions(+), 11 deletions(-)

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



diff --git a/modules/limn/manifests/instance/proxy.pp 
b/modules/limn/manifests/instance/proxy.pp
index 6216904..700e3ab 100644
--- a/modules/limn/manifests/instance/proxy.pp
+++ b/modules/limn/manifests/instance/proxy.pp
@@ -1,7 +1,10 @@
 # == Define limn::instance::proxy
 # Sets up an apache mod_rewrite proxy for proxying to a Limn instance.
 # Static files in $document_root will be served by apache.
-# This define depends on the apache puppet module.
+#
+# NOTE: You must install apache yourself.
+# A Service and Package named 'apache2' must be defined.
+# You must also make sure mod rewrite is enabled.
 #
 # == Parameters:
 # $port   - Apache port to Listen on.  Default: 80.
@@ -19,22 +22,15 @@
   $server_name = ${name}.${::domain},
   $server_aliases  = '')
 {
-  # need apache and mod_rewrite
-  class { 'apache':
-serveradmin  = $server_admin,
-default_mods = true,
-  }
-  apache::mod { 'rewrite': }
-
   # Configure the Apache Limn instance proxy VirtualHost.
-  $priority  = 10
+  $priority = 10
   file { ${priority}-limn-${name}.conf:
 path= ${apache::params::vdir}/${priority}-limn-${name}.conf,
 content = template('limn/vhost-limn-proxy.conf.erb'),
 owner   = 'root',
 group   = 'root',
 mode= '0444',
-require = [Package['httpd'], Apache::Mod['rewrite']],
-notify  = Service['httpd'],
+require = Package['apache2'],
+notify  = Service['apache2'],
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iabf6ab9d9b15b9ab3e445f8f6719f66d189bf736
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Feature: Page, Scenario: Move existing page - change (qa/browsertests)

2013-03-28 Thread Cmcmahon (Code Review)
Cmcmahon has submitted this change and it was merged.

Change subject: Feature: Page, Scenario: Move existing page
..


Feature: Page, Scenario: Move existing page

Change-Id: Ia61ff81e1102462591c21f51b828bc54a8f847e2
---
M features/page.feature
M features/step_definitions/page_steps.rb
M features/support/env.rb
M features/support/pages/move_page.rb
4 files changed, 57 insertions(+), 11 deletions(-)

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



diff --git a/features/page.feature b/features/page.feature
index 1f79524..d91a63a 100644
--- a/features/page.feature
+++ b/features/page.feature
@@ -31,7 +31,8 @@
   @login
   Scenario: Move existing page dialog
 Given I am logged in
-  And I am on a newly created page with article text
+  And I am starting a page to be moved
+  And I create the page to be moved
 When I click Move
 Then I should be on a page that says Move newly created page
   And I should see a Namespace selectbox
@@ -41,12 +42,14 @@
   And I should see a Watch source page radio button
 
   Scenario: Move existing page
-Given I have clicked Move on the newly created page
-When I type To new page name containing the name of the existing page plus 
text Moved
+Given I am logged in
+And I am starting a page to be moved to a new name
+And I have clicked Move on the newly created page
+When I make a new page name for the moved page
   And I click Move page
 Then I should be on a page that says Move succeeded
-  And I should have a link to the old page title and a link to the new 
page title
   And I should see the text A redirect has been created
+  And I should have a link to the old page title and a link to the new 
page title
 
   Scenario: Moved page checks
 Given I moved a page successfully
diff --git a/features/step_definitions/page_steps.rb 
b/features/step_definitions/page_steps.rb
index ace44fd..8530f47 100644
--- a/features/step_definitions/page_steps.rb
+++ b/features/step_definitions/page_steps.rb
@@ -19,7 +19,7 @@
   on(DoesNotExistPage).create_element.should exist
 end
 Then /^newly created page should open$/ do
-  @browser.url.should match Regexp.escape(@does_not_exist_page_name.to_s)
+  @browser.url.should match Regexp.escape(@does_not_exist_page_name)
 end
 Then /^page text should be there$/ do
   on(ArticlePage).page_text.should == Starting a new page using the URL
@@ -28,7 +28,7 @@
   on(DoesNotExistPage).page_text.should match Regexp.escape(text)
 end
 Then /^page title should be there$/ do
-  on(ArticlePage).title.should match 
Regexp.escape(@does_not_exist_page_name.to_s)
+  on(ArticlePage).title.should match Regexp.escape(@does_not_exist_page_name)
 end
 Then /^text box with page text should be there$/ do
   on(EditPage).article_text_element.should exist
@@ -36,8 +36,12 @@
 Then /^watchlist element should not be there$/ do
   on(ArticlePage).watchlist_element.should_not exist
 end
-Given(/^I am on a newly created page with article text$/) do
-  step 'I am at page that does not exist'
+
+Given /^I am starting a page to be moved$/  do
+  visit(DoesNotExistPage, using_params: {page_name: @does_not_exist_page_name})
+end
+
+Given /^I create the page to be moved$/  do
   step 'I click link Create'
   step 'I enter article text'
   step 'I click Save page button'
@@ -73,3 +77,36 @@
   on(MovePage).watch_source_element.should exist
 end
 
+Given /^I am starting a page to be moved to a new name$/  do
+  visit(DoesNotExistPage, using_params: {page_name: @does_not_exist_page_name})
+end
+
+Given(/^I have clicked Move on the newly created page$/) do
+  step 'I click link Create'
+  step 'I enter article text'
+  step 'I click Save page button'
+  step 'I click Move'
+end
+
+When(/^I make a new page name for the moved page$/) do
+  on(MovePage).new_title=#{@does_not_exist_page_name} Moved
+end
+
+When(/^I click Move page$/) do
+  on(MovePage).move_page
+end
+
+Then(/^I should be on a page that says Move succeeded$/) do
+  @browser.text.should match /Move succeeded/
+end
+
+Then(/^I should have a link to the old page title and a link to the new page 
title$/) do
+  
on(MovePage).old_page_link_element(@does_not_exist_page_name).when_present.should
 exist
+  
on(MovePage).moved_page_link_element(@does_not_exist_page_name).when_present.should
 exist
+end
+
+Then(/^I should see the text A redirect has been created$/) do
+  @browser.text.should match /A redirect has been created/
+end
+
+
diff --git a/features/support/env.rb b/features/support/env.rb
index 150d05e..9384576 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -85,15 +85,13 @@
   saucelabs_key = secret['saucelabs_key']
 end
 
-does_not_exist_page_name = Random.new.rand
-
 Before('@login') do
   puts secret.yml file at /private/wmf/ or config/ is required for tests 
tagged @login if secret_yml_location == nil
 end
 
 Before do |scenario|
   @config = 

[MediaWiki-commits] [Gerrit] (bug 45776) Set $wgCategoryCollation to 'uca-uk' on all Ukra... - change (operations/mediawiki-config)

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

Change subject: (bug 45776) Set $wgCategoryCollation to 'uca-uk' on all 
Ukrainian-language wikis
..


(bug 45776) Set $wgCategoryCollation to 'uca-uk' on all Ukrainian-language wikis

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 77ae2a7..7dceed9 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10374,16 +10374,22 @@
'be_x_oldwiki' = 'uca-be-tarask', // bug 46005
'bewiki' = 'uca-be', // bug 46004
'bewikisource' = 'uca-be', // bug 46004
-   'iswiktionary' = 'identity', // bug 30722
'huwiki' = 'uca-hu', // bug 45596
+   'iswiktionary' = 'identity', // bug 30722
'plwiki' = 'uca-pl', // bug 42413
'plwikivoyage' = 'uca-pl', // bug 45968
'plwiktionary' = 'uca-default', // bug 46081
'ptwiki' = 'uca-pt', // bug 45911
'ptwikibooks' = 'uca-pt', // bug 45911
'svwiki' = 'uca-sv', // bug 45446
+   'uawikimedia' = 'uca-uk', // bug 45776
'ukwiki' = 'uca-uk', // bug 45444
-   'ukwikivoyage' = 'uca-uk',
+   'ukwikibooks' = 'uca-uk', // bug 45776
+   'ukwikinews' = 'uca-uk', // bug 45776
+   'ukwikiquote' = 'uca-uk', // bug 45776
+   'ukwikisource' = 'uca-uk', // bug 45776
+   'ukwikivoyage' = 'uca-uk', // bug 46417
+   'ukwiktionary' = 'uca-uk', // bug 45776
 ),
 
 'wmgVectorSectionEditLinks' = array(

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

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

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


[MediaWiki-commits] [Gerrit] New skin: Clear - change (mediawiki/core)

2013-03-28 Thread Matmarex (Code Review)
Matmarex has uploaded a new change for review.

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


Change subject: New skin: Clear
..

New skin: Clear

* intended as a replacement for legacy skins being removed in Ia6d73c2d
* useful for low-end and mobile devices
* makes new Vector-based skins development easier (no Vector CSS to deal with)

Change-Id: I630784cc44dfa5fed7d828f1aaa747ead6413540
---
M includes/AutoLoader.php
M languages/messages/MessagesEn.php
A skins/Clear.php
3 files changed, 39 insertions(+), 0 deletions(-)


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

diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 4390afe..28ee1f4 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -1086,6 +1086,7 @@
'CologneBlueTemplate' = 'skins/CologneBlue.php',
'ModernTemplate' = 'skins/Modern.php',
'MonoBookTemplate' = 'skins/MonoBook.php',
+   'SkinClear' = 'skins/Clear.php',
'SkinCologneBlue' = 'skins/CologneBlue.php',
'SkinModern' = 'skins/Modern.php',
'SkinMonoBook' = 'skins/MonoBook.php',
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index bd8c9eb..d1147c1 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -3691,6 +3691,7 @@
 
 # Stylesheets
 'common.css'  = '/* CSS placed here will be applied to all skins 
*/', # only translate this message to other languages if you have to change it
+'clear.css'   = '/* CSS placed here will affect users of the 
Clear skin */', # only translate this message to other languages if you have to 
change it
 'cologneblue.css' = '/* CSS placed here will affect users of the 
Cologne Blue skin */', # only translate this message to other languages if you 
have to change it
 'monobook.css'= '/* CSS placed here will affect users of the 
MonoBook skin */', # only translate this message to other languages if you have 
to change it
 'modern.css'  = '/* CSS placed here will affect users of the 
Modern skin */', # only translate this message to other languages if you have 
to change it
@@ -3705,6 +3706,7 @@
 
 # Scripts
 'common.js'  = '/* Any JavaScript here will be loaded for all 
users on every page load. */', # only translate this message to other languages 
if you have to change it
+'clear.js'   = '/* Any JavaScript here will be loaded for users 
using the Clear skin */', # only translate this message to other languages if 
you have to change it
 'cologneblue.js' = '/* Any JavaScript here will be loaded for users 
using the Cologne Blue skin */', # only translate this message to other 
languages if you have to change it
 'monobook.js'= '/* Any JavaScript here will be loaded for users 
using the MonoBook skin */', # only translate this message to other languages 
if you have to change it
 'modern.js'  = '/* Any JavaScript here will be loaded for users 
using the Modern skin */', # only translate this message to other languages if 
you have to change it
@@ -3789,6 +3791,7 @@
 'pageinfo-category-files' = 'Number of files',
 
 # Skin names
+'skinname-clear'   = 'Clear', # only translate this message to other 
languages if you have to change it
 'skinname-cologneblue' = 'Cologne Blue', # only translate this message to 
other languages if you have to change it
 'skinname-monobook'= 'MonoBook', # only translate this message to other 
languages if you have to change it
 'skinname-modern'  = 'Modern', # only translate this message to other 
languages if you have to change it
diff --git a/skins/Clear.php b/skins/Clear.php
new file mode 100644
index 000..449b678
--- /dev/null
+++ b/skins/Clear.php
@@ -0,0 +1,35 @@
+?php
+/**
+ * Clear: Vector without the CSS. The idea is that you customise it
+ * using user or site CSS.
+ *
+ * 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 Skins
+ */
+
+if ( !defined( 'MEDIAWIKI' ) )
+   die( -1 );
+
+/**
+ * Inherit main code from SkinTemplate, set the CSS and template filter.
+ * @ingroup Skins
+ */
+class SkinClear extends 

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

2013-03-28 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: [Echo] Add new optional key
..

[Echo] Add new optional key

https://gerrit.wikimedia.org/r/#/c/56090/1/Echo.i18n.php,unified

Change-Id: I36ee1bc27815db582ffdbee3921e6fe8c62b3deb
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/18/56418/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 885d443..8123843 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -417,7 +417,7 @@
 aliasfile = Echo/Echo.alias.php
 ignored = notification-talkpage-content
 optional = echo-notification-count, echo-date-header
-optional = echo-email-batch-separator, echo-email-batch-bullet
+optional = echo-email-batch-separator, echo-email-batch-bullet, 
echo-quotation-marks
 
 Edit Page Tracking
 

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

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

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


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

2013-03-28 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [Echo] Add new optional key
..


[Echo] Add new optional key

https://gerrit.wikimedia.org/r/#/c/56090/1/Echo.i18n.php,unified

Change-Id: I36ee1bc27815db582ffdbee3921e6fe8c62b3deb
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 885d443..8123843 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -417,7 +417,7 @@
 aliasfile = Echo/Echo.alias.php
 ignored = notification-talkpage-content
 optional = echo-notification-count, echo-date-header
-optional = echo-email-batch-separator, echo-email-batch-bullet
+optional = echo-email-batch-separator, echo-email-batch-bullet, 
echo-quotation-marks
 
 Edit Page Tracking
 

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

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

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


[MediaWiki-commits] [Gerrit] Requiring that limn::instance is set up before limn::instanc... - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Requiring that limn::instance is set up before 
limn::instance::proxy in misc::limn::instance
..

Requiring that limn::instance is set up before limn::instance::proxy in 
misc::limn::instance

Change-Id: Ie85a61242d94c74075964c86db7aa51a66ed2c52
---
M manifests/misc/limn.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/manifests/misc/limn.pp b/manifests/misc/limn.pp
index 7f15772..5337def 100644
--- a/manifests/misc/limn.pp
+++ b/manifests/misc/limn.pp
@@ -45,5 +45,6 @@
 limn_port  = $port,
 server_name= $servername,
 server_aliases = $serveraliases,
+require= ::Limn::Instance[$name],
   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Requiring that limn::instance is set up before limn::instanc... - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Requiring that limn::instance is set up before 
limn::instance::proxy in misc::limn::instance
..


Requiring that limn::instance is set up before limn::instance::proxy in 
misc::limn::instance

Change-Id: Ie85a61242d94c74075964c86db7aa51a66ed2c52
---
M manifests/misc/limn.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/manifests/misc/limn.pp b/manifests/misc/limn.pp
index 7f15772..5337def 100644
--- a/manifests/misc/limn.pp
+++ b/manifests/misc/limn.pp
@@ -45,5 +45,6 @@
 limn_port  = $port,
 server_name= $servername,
 server_aliases = $serveraliases,
+require= ::Limn::Instance[$name],
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie85a61242d94c74075964c86db7aa51a66ed2c52
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 46489) Set wmgBabelCategoryNames for Ukrainian Wikinews - change (operations/mediawiki-config)

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

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


Change subject: (bug 46489) Set wmgBabelCategoryNames for Ukrainian Wikinews
..

(bug 46489) Set wmgBabelCategoryNames for Ukrainian Wikinews

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 68143e2..2fa7c66 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11522,6 +11522,15 @@
'5' = false,
'N' = 'User %code%-N',
),
+   'ukwikinews' = array(
+   '0' = 'User %code%-0',
+   '1' = 'User %code%-1',
+   '2' = 'User %code%-2',
+   '3' = 'User %code%-3',
+   '4' = 'User %code%-4',
+   '5' = 'User %code%-5',
+   'N' = 'User %code%-N',
+   ),
'vowiktionary' = array(
'0' = 'Geban %code%-0',
'1' = 'Geban %code%-1',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8777cd7ccc09581b0d5137e8343184002fb0ddc
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder odder.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fixing path to limn proxy vhost file since I've removed the ... - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Fixing path to limn proxy vhost file since I've removed the 
dependence on the apache module
..

Fixing path to limn proxy vhost file since I've removed the dependence on the 
apache module

Change-Id: I9667bfae365d4809faf2cc78a47eccf8f70a26f7
---
M modules/limn/manifests/instance/proxy.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/56421/1

diff --git a/modules/limn/manifests/instance/proxy.pp 
b/modules/limn/manifests/instance/proxy.pp
index 700e3ab..554b7fb 100644
--- a/modules/limn/manifests/instance/proxy.pp
+++ b/modules/limn/manifests/instance/proxy.pp
@@ -25,7 +25,7 @@
   # Configure the Apache Limn instance proxy VirtualHost.
   $priority = 10
   file { ${priority}-limn-${name}.conf:
-path= ${apache::params::vdir}/${priority}-limn-${name}.conf,
+path= /etc/apache2/sites-enabled/${priority}-limn-${name}.conf,
 content = template('limn/vhost-limn-proxy.conf.erb'),
 owner   = 'root',
 group   = 'root',

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

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

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


[MediaWiki-commits] [Gerrit] Migrate trailing nls across marker meta nodes. - change (mediawiki...Parsoid)

2013-03-28 Thread GWicke (Code Review)
GWicke has submitted this change and it was merged.

Change subject: Migrate trailing nls across marker meta nodes.
..


Migrate trailing nls across marker meta nodes.

* We can migrate trailing newline-containing separators
  across meta tags as long as the metas:
 - are not literal html metas (found in wikitext)
 - are not mw:PageProp metas (found in wikitext)
 - are not mw:Includes/* (cannot cross *include* bdry)
 - are not tpl/ext start/end markers (cannot cross tpl/ext bdry)

* Fixes RTing of this snippet
--
{|
|a
|
|{{Party shading/Federalist}} | a
|}
--

* Eliminates semantics diffs from en:Delaware gubernatorial elections

Change-Id: I4f2424c9b603db9cbe2bba2be60fca97d7e4024f
---
M js/lib/mediawiki.DOMPostProcessor.js
1 file changed, 25 insertions(+), 2 deletions(-)

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



diff --git a/js/lib/mediawiki.DOMPostProcessor.js 
b/js/lib/mediawiki.DOMPostProcessor.js
index a7878f5..16da37c 100644
--- a/js/lib/mediawiki.DOMPostProcessor.js
+++ b/js/lib/mediawiki.DOMPostProcessor.js
@@ -681,8 +681,31 @@
// 2. Process 'elt' itself after -- skip literal-HTML nodes
if (canMigrateNLOutOfNode(elt)) {
var firstEltToMigrate = null,
+   migrationBarrier = null,
partialContent = false,
n = elt.lastChild;
+
+   // We can migrate trailing newline-containing separators
+   // across meta tags as long as the metas:
+   // - are not literal html metas (found in wikitext)
+   // - are not mw:PageProp (cannot cross page-property boundary
+   // - are not mw:Includes/* (cannot cross *include* boundary)
+   // - are not tpl start/end markers (cannot cross tpl boundary)
+   while (n  DU.hasNodeName(n, meta)  
!DU.isLiteralHTMLNode(n)) {
+   var prop = n.getAttribute(property),
+   type = n.getAttribute(typeof);
+
+   if (prop  prop.match(/mw:PageProp/)) {
+   break;
+   }
+
+   if (type  (DU.isTplMetaType(type) || 
type.match(/mw:Includes/))) {
+   break;
+   }
+
+   migrationBarrier = n;
+   n = n.previousSibling;
+   }
 
// Find nodes that need to be migrated out:
// - a sequence of comment and newline nodes that is preceded by
@@ -692,7 +715,7 @@
if (n.nodeType === Node.COMMENT_NODE) {
firstEltToMigrate = n;
} else {
-   if (n.data.match(/^\s+$/)) {
+   if (n.data.match(/^\s*\n\s*$/)) {
firstEltToMigrate = n;
partialContent = false;
} else if (n.data.match(/\n$/)) {
@@ -712,7 +735,7 @@
insertPosition = elt.nextSibling;
 
n = firstEltToMigrate;
-   while (n) {
+   while (n !== migrationBarrier) {
var next = n.nextSibling;
if (partialContent) {
var nls = n.data;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f2424c9b603db9cbe2bba2be60fca97d7e4024f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 46639) Add flood to wgAddGroups for bureaucrats on Meta - change (operations/mediawiki-config)

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

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


Change subject: (bug 46639) Add flood to wgAddGroups for bureaucrats on Meta
..

(bug 46639) Add flood to wgAddGroups for bureaucrats on Meta

Change-Id: Iaad0231e83de293e8d838f270a2045b1af2d4c5c
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7dceed9..26f7e58 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7793,7 +7793,7 @@
'coder' = array( 'coder' ),
),
'+metawiki' = array(
-   'bureaucrat' = array( 'ipblock-exempt', 'centralnoticeadmin' ),
+   'bureaucrat' = array( 'ipblock-exempt', 'centralnoticeadmin', 
'flood' ), // Bug 46639
'checkuser'  = array( 'ipblock-exempt' ),
'sysop'  = array( 'autopatrolled' ),
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaad0231e83de293e8d838f270a2045b1af2d4c5c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder odder.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fixing path to limn proxy vhost file since I've removed the ... - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Fixing path to limn proxy vhost file since I've removed the 
dependence on the apache module
..


Fixing path to limn proxy vhost file since I've removed the dependence on the 
apache module

Change-Id: I9667bfae365d4809faf2cc78a47eccf8f70a26f7
---
M modules/limn/manifests/instance/proxy.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/limn/manifests/instance/proxy.pp 
b/modules/limn/manifests/instance/proxy.pp
index 700e3ab..554b7fb 100644
--- a/modules/limn/manifests/instance/proxy.pp
+++ b/modules/limn/manifests/instance/proxy.pp
@@ -25,7 +25,7 @@
   # Configure the Apache Limn instance proxy VirtualHost.
   $priority = 10
   file { ${priority}-limn-${name}.conf:
-path= ${apache::params::vdir}/${priority}-limn-${name}.conf,
+path= /etc/apache2/sites-enabled/${priority}-limn-${name}.conf,
 content = template('limn/vhost-limn-proxy.conf.erb'),
 owner   = 'root',
 group   = 'root',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9667bfae365d4809faf2cc78a47eccf8f70a26f7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Updated native ref and references tag implementations. - change (mediawiki...Parsoid)

2013-03-28 Thread GWicke (Code Review)
GWicke has submitted this change and it was merged.

Change subject: Updated native ref and references tag implementations.
..


Updated native ref and references tag implementations.

* Updated native implementations of the ref and references
  tag implementations of the cite extension.

* references tag was not being processed properly by Parsoid.
  This led to lost references on the BO page.  This patch fixes
  it which fills out references and more closely matches output
  en:WP.

* Extracted extension content processing code into a helper and
  reused it for both ref and references handler.
  - Leading ws-only lines are unconditionally stripped. Is this
accurate or is this extension-specific?  Given that this code
is right now tied to ref and references tag, this is not
yet a problem, but if made more generic, this issue has to
be addressed.

* PreHandler should not run when processing the refs-tag. Right
  now, this is a hard check in the pre-handler.  Probably worth
  making this more generic by letting every stage in the pipeline
  get a chance at turning themselves on/off based on the extension
  being processed by the pipeline (can use the _applyToStage fn.
  on ParserPipeline). TO BE DONE.

* ref extension needs to be reset after each references tag
  is processed to duplicate behavior of existing cite extension.
  TO BE DONE.

* Updated refs group index to start at 1.

* No change in parser tests. References section output on the
  en:Barack Obama page now more closely matches the refs output
  on enwp.

* In addition to the en:BO page, the following wikitext was used to
  fix bugs and test the implementation.
  CMD: node parse --extensions ref,references  /tmp/test
--
X1ref name=x / X2ref name=x /
references
ref name=xx/ref
/references

Yref name=y{{echo|y}}/ref
Zref name=z /
references
{{echo|ref name=zz/ref}}
/references

Aref name=aa/ref
Bref name=b /
references
{{echo|ref name=bb/ref}}
/references

Cref name=cc/ref
Dref name=d /
references
ref name=d{{echo|d}}/ref
/references
--

Change-Id: I2d243656e9e903d8dadb55ee7c0630824c65cc01
---
M js/lib/ext.Cite.js
M js/lib/ext.core.ExtensionHandler.js
M js/lib/ext.core.PreHandler.js
M js/lib/ext.core.TemplateHandler.js
M js/lib/mediawiki.DOMPostProcessor.js
M js/lib/mediawiki.ParsoidConfig.js
M js/lib/mediawiki.parser.js
7 files changed, 256 insertions(+), 126 deletions(-)

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



diff --git a/js/lib/ext.Cite.js b/js/lib/ext.Cite.js
index 766aa60..795b5cb 100644
--- a/js/lib/ext.Cite.js
+++ b/js/lib/ext.Cite.js
@@ -1,21 +1,28 @@
+/* --
+ * This file implements ref and references extension tag handling
+ * natively in Parsoid.
+ * -- */
 use strict;
 
 var Util = require( './mediawiki.Util.js' ).Util,
$ = require( './fakejquery' );
 
+/**
+ * Helper class used both by ref and references implementations
+ */
 function RefGroup(group) {
this.name = group || '';
this.refs = [];
this.indexByName = {};
 }
 
-RefGroup.prototype.add = function(refName) {
+RefGroup.prototype.add = function(refName, skipLinkback) {
var ref;
if (refName  this.indexByName[refName]) {
ref = this.indexByName[refName];
} else {
var n = this.refs.length,
-   refKey = n + '';
+   refKey = (1+n) + '';
 
if (refName) {
refKey = refName + '-' + refKey;
@@ -24,7 +31,7 @@
ref = {
content: null,
index: n,
-   groupIndex: n, // @fixme
+   groupIndex: (1+n), // FIXME -- this seems to be 
wiki-specific
name: refName,
group: this.name,
key: refKey,
@@ -36,7 +43,11 @@
this.indexByName[refName] = ref;
}
}
-   ref.linkbacks.push('cite_ref-' + ref.key + '-' + ref.linkbacks.length);
+
+   if (!skipLinkback) {
+   ref.linkbacks.push('cite_ref-' + ref.key + '-' + 
ref.linkbacks.length);
+   }
+
return ref;
 };
 
@@ -61,6 +72,7 @@
a.setAttribute('href', '#' + ref.linkbacks[0]);
a.appendChild(arrow);
li.insertBefore(a, contentNode);
+   li.insertBefore(ownerDoc.createTextNode(' '), contentNode);
} else {
li.insertBefore(arrow, contentNode);
$.each(ref.linkbacks, function(i, linkback) {
@@ -86,125 +98,203 @@
return refGroups[group];
 }
 
+// FIXME: Move out to some common helper file?
+// Helper 

[MediaWiki-commits] [Gerrit] Update Echo to master - change (mediawiki/core)

2013-03-28 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review.

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


Change subject: Update Echo to master
..

Update Echo to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/56423/1

diff --git a/extensions/Echo b/extensions/Echo
index 945c1cb..7fcaf9b 16
--- a/extensions/Echo
+++ b/extensions/Echo
-Subproject commit 945c1cb5a5bd66816467dd98af5eeb9c2dbb1fed
+Subproject commit 7fcaf9b57e3665ceaf28dba071c2023d048996e7

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52253ccda771716a7af8d5180d29477d8d408bd5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf12
Gerrit-Owner: Kaldari rkald...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Making sure mod rewrite is installed for stat1001 sites - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Making sure mod rewrite is installed for stat1001 sites
..

Making sure mod rewrite is installed for stat1001 sites

Change-Id: I516c90ef1ff36a48c9172caa109c7594b3fbb2dd
---
M manifests/misc/statistics.pp
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index e9a1542..8994f93 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -135,12 +135,15 @@
mode= 0750,
require = Class[webserver::apache],
}
+   
+   webserver::apache::module { rewrite: require = 
Class[webserver::apache] }
 }
 
 
 # reportcard.wikimedia.org
 class misc::statistics::sites::reportcard {
-  misc::limn::instance { 'reportcard': }
+   require misc::statistics::webserver
+   misc::limn::instance { 'reportcard': }
 }
 
 
@@ -157,7 +160,6 @@
source  = puppet:///private/apache/htpasswd.stats,
}
 
-   webserver::apache::module { rewrite: require = 
Class[webserver::apache] }
webserver::apache::site { $site_name:
require = [Class[webserver::apache], 
Webserver::Apache::Module[rewrite], File[/etc/apache2/htpasswd.stats]],
docroot = $docroot,

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

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

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


[MediaWiki-commits] [Gerrit] Update Echo to master - change (mediawiki/core)

2013-03-28 Thread Kaldari (Code Review)
Kaldari has submitted this change and it was merged.

Change subject: Update Echo to master
..


Update Echo to master

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

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



diff --git a/extensions/Echo b/extensions/Echo
index 945c1cb..7fcaf9b 16
--- a/extensions/Echo
+++ b/extensions/Echo
-Subproject commit 945c1cb5a5bd66816467dd98af5eeb9c2dbb1fed
+Subproject commit 7fcaf9b57e3665ceaf28dba071c2023d048996e7

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52253ccda771716a7af8d5180d29477d8d408bd5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf12
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Making sure mod rewrite is installed for stat1001 sites - change (operations/puppet)

2013-03-28 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Making sure mod rewrite is installed for stat1001 sites
..


Making sure mod rewrite is installed for stat1001 sites

Change-Id: I516c90ef1ff36a48c9172caa109c7594b3fbb2dd
---
M manifests/misc/statistics.pp
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index e9a1542..8994f93 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -135,12 +135,15 @@
mode= 0750,
require = Class[webserver::apache],
}
+   
+   webserver::apache::module { rewrite: require = 
Class[webserver::apache] }
 }
 
 
 # reportcard.wikimedia.org
 class misc::statistics::sites::reportcard {
-  misc::limn::instance { 'reportcard': }
+   require misc::statistics::webserver
+   misc::limn::instance { 'reportcard': }
 }
 
 
@@ -157,7 +160,6 @@
source  = puppet:///private/apache/htpasswd.stats,
}
 
-   webserver::apache::module { rewrite: require = 
Class[webserver::apache] }
webserver::apache::site { $site_name:
require = [Class[webserver::apache], 
Webserver::Apache::Module[rewrite], File[/etc/apache2/htpasswd.stats]],
docroot = $docroot,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I516c90ef1ff36a48c9172caa109c7594b3fbb2dd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 46294) Fix for Windows text-mode file handles - change (mediawiki...Scribunto)

2013-03-28 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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


Change subject: (bug 46294) Fix for Windows text-mode file handles
..

(bug 46294) Fix for Windows text-mode file handles

On Windows for LuaStandalone, the lua executable's standard output is a
text-mode file handle, even if the pipe is opened from PHP with the
binary flag. Which means that when Lua returns a \n, it gets silently
rewritten to \r\n and the unserialization fails.

So, change the protocol for Lua→PHP messages to encode \r and \n (and \
itself, as the escape character) to avoid this issue.

Bug: 46294
Change-Id: I73b5f44e8aa0334f5fd03013dc027d1a57318349
---
M engines/LuaStandalone/LuaStandaloneEngine.php
M engines/LuaStandalone/MWServer.lua
M engines/LuaStandalone/protocol.txt
3 files changed, 23 insertions(+), 4 deletions(-)


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

diff --git a/engines/LuaStandalone/LuaStandaloneEngine.php 
b/engines/LuaStandalone/LuaStandaloneEngine.php
index 08fd2e5..03dbe99 100644
--- a/engines/LuaStandalone/LuaStandaloneEngine.php
+++ b/engines/LuaStandalone/LuaStandaloneEngine.php
@@ -381,6 +381,11 @@
$body .= $buffer;
$lengthRemaining -= strlen( $buffer );
}
+   $body = strtr( $body, array(
+   '\\r' = \r,
+   '\\n' = \n,
+   '' = '\\',
+   ) );
$msg = unserialize( $body );
$this-debug( RX == {$msg['op']} );
return $msg;
diff --git a/engines/LuaStandalone/MWServer.lua 
b/engines/LuaStandalone/MWServer.lua
index 962bd36..adb95a8 100644
--- a/engines/LuaStandalone/MWServer.lua
+++ b/engines/LuaStandalone/MWServer.lua
@@ -382,7 +382,19 @@
return string.format( '%08x%08x', length, check ) .. serialized
 end
 
+-- Faster to create the table once than for each call to MWServer:serialize()
+local serialize_replacements = {
+   ['\r'] = '\\r',
+   ['\n'] = '\\n',
+   ['\\'] = '',
+}
+
 --- Convert a value to a string suitable for passing to PHP's unserialize().
+-- Note that the following replacements must be performed before calling
+-- unserialize:
+--   \\r = \r
+--   \\n = \n
+--    = \\
 --
 -- @param var The value.
 function MWServer:serialize( var )
@@ -459,7 +471,7 @@
end
end
 
-   return recursiveEncode( var, 0 )
+   return recursiveEncode( var, 0 ):gsub( '[\r\n\\]', 
serialize_replacements )
 end
 
 --- Convert a Lua expression string to its corresponding value. 
diff --git a/engines/LuaStandalone/protocol.txt 
b/engines/LuaStandalone/protocol.txt
index 157383d..a4e9915 100644
--- a/engines/LuaStandalone/protocol.txt
+++ b/engines/LuaStandalone/protocol.txt
@@ -8,9 +8,11 @@
 The expression may reference a table in a variable called chunks, which
 contains an array of functions.
 
-Messages passed from Lua to PHP have their body encoded in PHP serialize() 
format. 
-They may include instances of function objects which have an id member for
-passing back to Lua as an index in the chunk table.
+Messages passed from Lua to PHP have their body encoded in PHP serialize()
+format, and then \\, \r, and \n are replaced with , \\r, and
+\\n to avoid issues with text-mode file handles. They may include instances
+of function objects which have an id member for passing back to Lua as an
+index in the chunk table.
 
 The expressions encoded into the message bodies are associative arrays. The 
op
 member of the array gives the operation to be performed by the message.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73b5f44e8aa0334f5fd03013dc027d1a57318349
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add lead photo upload CTA (#343) - change (mediawiki...MobileFrontend)

2013-03-28 Thread Jdlrobson (Code Review)
Jdlrobson has submitted this change and it was merged.

Change subject: Add lead photo upload CTA (#343)
..


Add lead photo upload CTA (#343)

This introduces a small addition to View, the preRender() function which
can be used to manipulate the data which is passed to the template.

Change-Id: I77ea2bc2b610b22e266a090374ea24c6af9e4f2c
---
M MobileFrontend.i18n.php
M MobileFrontend.php
M includes/skins/UserLoginAndCreateTemplate.php
M javascripts/common/mf-navigation.js
M javascripts/common/mf-view.js
M javascripts/modules/mf-photo.js
M javascripts/modules/mf-watchstar.js
M tests/js/test_mf-view.js
8 files changed, 66 insertions(+), 19 deletions(-)

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



diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 9d5847d..6b002ef 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -246,6 +246,8 @@
'mobile-frontend-photo-cancel' = 'Cancel',
'mobile-frontend-photo-upload-user-count' = 
'{{PLURAL:$1|span1/span upload|span$1/span uploads}}',
'mobile-frontend-photo-upload-user-count-over-limit' = '500+ uploads',
+   'mobile-frontend-photo-upload-cta' = 'Please login or sign up to add 
an image.',
+   'mobile-frontend-photo-upload-login' = 'You must be logged in to add 
an image.',
 
// Change tags
'tag-mobile_edit' = 'Mobile edit',
@@ -598,6 +600,8 @@
'mobile-frontend-photo-cancel' = 'Caption for the cancel button on the 
photo upload form.
 {{Identical|Cancel}}',
'mobile-frontend-photo-upload-user-count' = 'Displays the number of 
images the user has uploaded. Parameter is number of images. Wrap the number in 
a span tag to allow the number to be incremented programatically',
+   'mobile-frontend-photo-upload-cta' = 'Appears in a notification when 
user clicks photo upload button (see {{msg-mw|mobile-frontend-photo-upload}}) 
when not logged in.',
+   'mobile-frontend-photo-upload-login' = 'Message for 
[[Special:UserLogin]] when being redirected back to add an image to a page',
'mobile-frontend-photo-upload-user-count-over-limit' = 'Displayed in 
place of mobile-frontend-photo-upload-user-count when user has uploaded more 
than 500 images.',
'tag-mobile_edit' = 'Short change tag name that appears e.g. in 
[[Special:RecentChanges]].
 
diff --git a/MobileFrontend.php b/MobileFrontend.php
index 98014e5..9038eca 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -434,6 +434,7 @@
'mobile-frontend-photo-ownership-bullet-one',
'mobile-frontend-photo-ownership-bullet-two',
'mobile-frontend-photo-ownership-bullet-three',
+   'mobile-frontend-photo-upload-cta',
 
// for mf-search.js
'mobile-frontend-search-help',
diff --git a/includes/skins/UserLoginAndCreateTemplate.php 
b/includes/skins/UserLoginAndCreateTemplate.php
index dc28077..d9883b9 100644
--- a/includes/skins/UserLoginAndCreateTemplate.php
+++ b/includes/skins/UserLoginAndCreateTemplate.php
@@ -82,6 +82,8 @@
$key = 'mobile-frontend-donate-image-login';
} elseif ( strstr( $returntoQuery, 'article_action=watch' ) ) {
$key = 'mobile-frontend-watch-login';
+   } elseif ( strstr( $returntoQuery, 
'article_action=photo-upload' ) ) {
+   $key = 'mobile-frontend-photo-upload-login';
} else {
return '';
}
diff --git a/javascripts/common/mf-navigation.js 
b/javascripts/common/mf-navigation.js
index 943b29b..c7e076c 100644
--- a/javascripts/common/mf-navigation.js
+++ b/javascripts/common/mf-navigation.js
@@ -41,19 +41,20 @@
CtaDrawer = Drawer.extend( {
defaults: {
loginCaption: mw.msg( 
'mobile-frontend-watchlist-cta-button-login' ),
-   loginUrl: M.history.getArticleUrl( 'Special:UserLogin', 
{
-   returnto: mw.config.get( 'wgTitle' ),
-   returntoquery: 'article_action=watch'
-   } ),
signupCaption: mw.msg( 
'mobile-frontend-watchlist-cta-button-signup' ),
-   signupUrl: M.history.getArticleUrl( 
'Special:UserLogin', {
-   returnto: mw.config.get( 'wgTitle' ),
-   returntoquery: 'article_action=watch',
-   type: 'signup'
-   } ),
cancelMessage: mw.msg( 'mobile-frontend-drawer-cancel' )
},
-   template: M.template.get( 'ctaDrawer' )
+   template: M.template.get( 'ctaDrawer' ),
+
+   preRender: function( options ) {
+   var params = {
+   returnto: 

[MediaWiki-commits] [Gerrit] Renamed JobQueue::QoS_Atomic to JobQueue::QOS_ATOMIC per con... - change (mediawiki/core)

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

Change subject: Renamed JobQueue::QoS_Atomic to JobQueue::QOS_ATOMIC per 
convention.
..


Renamed JobQueue::QoS_Atomic to JobQueue::QOS_ATOMIC per convention.

Change-Id: I45e633ff40a805df9dfeda88ac738cfe6ac04739
---
M includes/job/JobQueue.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/includes/job/JobQueue.php b/includes/job/JobQueue.php
index 9c152cd..09ca67c 100644
--- a/includes/job/JobQueue.php
+++ b/includes/job/JobQueue.php
@@ -36,7 +36,8 @@
protected $maxTries; // integer; maximum number of times to try a job
protected $checkDelay; // boolean; allow delayed jobs
 
-   const QoS_Atomic = 1; // integer; all-or-nothing job insertions
+   const QOS_ATOMIC = 1; // integer; all-or-nothing job insertions
+   const QoS_Atomic = 1; // integer; all-or-nothing job insertions (b/c)
 
const ROOTJOB_TTL = 2419200; // integer; seconds to remember root jobs 
(28 days)
 
@@ -243,7 +244,7 @@
 * Outside callers should use JobQueueGroup::push() instead of this 
function.
 *
 * @param $jobs Job|Array
-* @param $flags integer Bitfield (supports JobQueue::QoS_Atomic)
+* @param $flags integer Bitfield (supports JobQueue::QOS_ATOMIC)
 * @return bool Returns false on failure
 * @throws MWException
 */
@@ -257,7 +258,7 @@
 * Outside callers should use JobQueueGroup::push() instead of this 
function.
 *
 * @param array $jobs List of Jobs
-* @param $flags integer Bitfield (supports JobQueue::QoS_Atomic)
+* @param $flags integer Bitfield (supports JobQueue::QOS_ATOMIC)
 * @return bool Returns false on failure
 * @throws MWException
 */

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

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

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


[MediaWiki-commits] [Gerrit] Add support for skin classes that are not prefixed with 'Skin'. - change (mediawiki/core)

2013-03-28 Thread Daniel Friesen (Code Review)
Daniel Friesen has uploaded a new change for review.

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


Change subject: Add support for skin classes that are not prefixed with 'Skin'.
..

Add support for skin classes that are not prefixed with 'Skin'.

Normally the value in $wgValidSkinNames is prefixed with Skin to
determine the class name. This adds support for values in the format
{ClassName} to use arbitrary class names not prefixed by 'Skin'.

Change-Id: Ia2bd302593084e23d55c1719553b6ae84c9f6f36
---
M RELEASE-NOTES-1.21
M includes/Skin.php
A tests/phpunit/includes/SkinTest.php
3 files changed, 116 insertions(+), 3 deletions(-)


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

diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index ecb37d5..114b520 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -125,6 +125,8 @@
   correctly.
 * (bug 45803) Whitespace within == Headline == syntax and within hN headings
   is now non-significant and not preserved in the HTML output.
+* It is now possible to define a $wgValidSkinNames array value in the format
+  {ClassName} to use a class name that is not prefixed automatically with 
'Skin'.
 
 === Bug fixes in 1.21 ===
 * (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
diff --git a/includes/Skin.php b/includes/Skin.php
index a4cb9f4..d58c529 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -37,6 +37,8 @@
protected $mRelevantTitle = null;
protected $mRelevantUser = null;
 
+   const CLASS_RE_PART = 
?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*;
+
/**
 * Fetch the set of available skins.
 * @return array associative array of strings
@@ -160,17 +162,32 @@
 
$skinNames = Skin::getSkinNames();
$skinName = $skinNames[$key];
-   $className = Skin{$skinName};
+   $isPlainSkinName = true;
+
+   if ( preg_match( '/^\{(' . self::CLASS_RE_PART . ')\}$/', 
$skinName, $m ) ) {
+   $className = $m[1];
+   $isPlainSkinName = false;
+   } else {
+   $className = Skin{$skinName};
+   }
+
+   if ( !preg_match( '/^' . self::CLASS_RE_PART . '$/', $className 
) ) {
+   // If we end up with an invalid class name load vector
+   // eg: If we add more syntax in a new version of MW and 
someone loads a new skin in this old version
+   wfDebug( $className ($skinName) is not a valid class 
name for a skin. );
+   $skinName = 'Vector';
+   $className = 'SkinVector';
+   }
 
# Grab the skin class and initialise it.
if ( !MWInit::classExists( $className ) ) {
 
-   if ( !defined( 'MW_COMPILED' ) ) {
+   if ( !defined( 'MW_COMPILED' )  $isPlainSkinName ) {
require_once( 
{$wgStyleDirectory}/{$skinName}.php );
}
 
# Check if we got if not fallback to default skin
-   if ( !MWInit::classExists( $className ) ) {
+   if ( !$isPlainSkinName || !MWInit::classExists( 
$className ) ) {
# DO NOT die if the class isn't found. This 
breaks maintenance
# scripts and can cause a user account to be 
unrecoverable
# except by SQL manipulation if a previously 
valid skin name
diff --git a/tests/phpunit/includes/SkinTest.php 
b/tests/phpunit/includes/SkinTest.php
new file mode 100644
index 000..f535421
--- /dev/null
+++ b/tests/phpunit/includes/SkinTest.php
@@ -0,0 +1,94 @@
+?php
+
+/**
+ * @group Skin
+ */
+class SkinTest extends MediaWikiTestCase {
+
+   protected function setUp() {
+   parent::setUp();
+   self::setMwGlobals( 'wgDefaultSkin', 'vector' );
+   self::setMwGlobals( 'wgValidSkinNames', array(
+   'vector' = 'Vector',
+   'monobook' = 'MonoBook',
+   'curlytest' = '{SkinMonoBook}',
+   ) );
+   }
+
+   /**
+* Test the CLASS_RE the Skin uses to validate class names
+* @dataProvider provideClassNames
+*/
+   public function testClassNameRegexp( $isValid, $className ) {
+   $this-assertEquals( $isValid, preg_match( '/^' . 
Skin::CLASS_RE_PART . '$/', $className ) );
+   }
+
+   /**
+* Provide valid and invalid class names for testClassNameRegexp
+*/
+   public function provideClassNames() {
+   return array(
+   /* (0 = Invalid, 1 = Valid), Class name */
+   array( 1, 'Foo' ),
+  

[MediaWiki-commits] [Gerrit] Docgen: Re-colourise jsduck warnings. - change (mediawiki...VisualEditor)

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

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


Change subject: Docgen: Re-colourise jsduck warnings.
..

Docgen: Re-colourise jsduck warnings.

When jsduck is executed in a subshell (as we do, to catch output)
it disables the color output. It should have a --color flag, but
it doesn't have that, so manually colourise for now.

Change-Id: I1f8da523b6b4fc1fc6965f751395f8af497b13b5
---
M .docs/generate.sh
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/.docs/generate.sh b/.docs/generate.sh
index 668ddcb..820bd28 100755
--- a/.docs/generate.sh
+++ b/.docs/generate.sh
@@ -22,7 +22,9 @@
 rm eg-iframe.html
 cd -  /dev/null
 
-echo -e $warnings
+# Re-colorize
+NORMAL=$(tput sgr0); YELLOW=$(tput setaf 3); MEGANTA=$(tput setaf 5)
+echo $warnings | perl -pe s|^([^ ]+) ([^ ]+) (.*)$|${YELLOW}\1 
${MEGANTA}\2${NORMAL} \3|
 
 # JSDuck doesn't exit with an error code if there are warnings
 # (only when there are fatal errors). We fixed all warnings

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f8da523b6b4fc1fc6965f751395f8af497b13b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle ttij...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] fix gerrit header logo link - change (operations/puppet)

2013-03-28 Thread Lcarr (Code Review)
Lcarr has submitted this change and it was merged.

Change subject: fix gerrit header logo link
..


fix gerrit header logo link

already works for gerrit itself (mostly?) but for gitweb this just links back
to the same page you're already on

discovered during CR @ https://review.openstack.org/25632

Change-Id: I1af80f5a3082c16b1710c56d74fb74c917581a37
---
M files/gerrit/skin/GerritSiteHeader.html
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/files/gerrit/skin/GerritSiteHeader.html 
b/files/gerrit/skin/GerritSiteHeader.html
index 795c9b7..d9054ae 100644
--- a/files/gerrit/skin/GerritSiteHeader.html
+++ b/files/gerrit/skin/GerritSiteHeader.html
@@ -1,3 +1,3 @@
-a href=h1 class=wm-gerrit-heading
+a href=/r/h1 class=wm-gerrit-heading
Wikimedia Code Review
 /h1/a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1af80f5a3082c16b1710c56d74fb74c917581a37
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jeremyb jer...@tuxmachine.com
Gerrit-Reviewer: Lcarr lc...@wikimedia.org
Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 46639) Add flood to wgAddGroups for bureaucrats on Meta - change (operations/mediawiki-config)

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

Change subject: (bug 46639) Add flood to wgAddGroups for bureaucrats on Meta
..


(bug 46639) Add flood to wgAddGroups for bureaucrats on Meta

Change-Id: Iaad0231e83de293e8d838f270a2045b1af2d4c5c
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Thehelpfulone: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7dceed9..26f7e58 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7793,7 +7793,7 @@
'coder' = array( 'coder' ),
),
'+metawiki' = array(
-   'bureaucrat' = array( 'ipblock-exempt', 'centralnoticeadmin' ),
+   'bureaucrat' = array( 'ipblock-exempt', 'centralnoticeadmin', 
'flood' ), // Bug 46639
'checkuser'  = array( 'ipblock-exempt' ),
'sysop'  = array( 'autopatrolled' ),
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaad0231e83de293e8d838f270a2045b1af2d4c5c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder odder.w...@gmail.com
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Thehelpfulone thehelpfulonew...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] - fix issue where export wouldn't work under high load, lead... - change (operations/software)

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

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


Change subject: - fix issue where export wouldn't work under high load, leading 
to graphs flipping between no data and huge spikes when a response was received 
minutes later
..

- fix issue where export wouldn't work under high load, leading to graphs 
flipping between no data and huge spikes when a response was received minutes 
later

Change-Id: I2bc117d5620b9e545a8e5a6cf3b654ee835b75d7
---
M udpprofile/collector.c
1 file changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/28/56428/1

diff --git a/udpprofile/collector.c b/udpprofile/collector.c
index 2154d58..077bcbf 100644
--- a/udpprofile/collector.c
+++ b/udpprofile/collector.c
@@ -4,7 +4,8 @@
  and places them into BerkeleyDB file. \o/
 
  Author: Domas Mituzas ( http://dammit.lt/ )
-
+ Author: Asher Feldman ( afeld...@wikimedia.org )
+ Author: Tim Starling ( tstarl...@wikimedia.org )
  License: public domain (as if there's something to protect ;-)
 
  $Id: collector.c 112227 2012-02-23 19:15:17Z midom $
@@ -38,7 +39,7 @@
ssize_t l;
char buf[2000];
int r;
-
+   int n;
 
/* Socket variables */
int s, exp;
@@ -72,7 +73,7 @@
fds[1].fd = exp, fds[1].events |= POLLIN;
 
db_create(db,NULL,0);
-   db-set_cachesize(db, 0, 256*1024*1024, 0);
+   db-set_cachesize(db, 0, 512*1024*1024, 0);

db-open(db,NULL,stats.db,NULL,DB_BTREE,DB_CREATE|DB_TRUNCATE,0);

signal(SIGHUP,hup);
@@ -84,6 +85,7 @@
}
/* Loop! loop! loop! */
for(;;) {
+   n=0;
r=poll(fds,2,-1);

/* Process incoming UDP queue */
@@ -92,6 +94,10 @@
if (l==EAGAIN)
break;
handleMessage((char *)buf,l);
+   n++;
+   /*  Still handle export connections under high 
load */
+   if (n==5000)
+   break;
}

/* Process incoming TCP queue */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bc117d5620b9e545a8e5a6cf3b654ee835b75d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Asher afeld...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] - fix issue where export wouldn't work under high load, lead... - change (operations/software)

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

Change subject: - fix issue where export wouldn't work under high load, leading 
to graphs flipping between no data and huge spikes when a response was received 
minutes later
..


- fix issue where export wouldn't work under high load, leading to graphs 
flipping between no data and huge spikes when a response was received minutes 
later

Change-Id: I2bc117d5620b9e545a8e5a6cf3b654ee835b75d7
---
M udpprofile/collector.c
1 file changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/udpprofile/collector.c b/udpprofile/collector.c
index 2154d58..077bcbf 100644
--- a/udpprofile/collector.c
+++ b/udpprofile/collector.c
@@ -4,7 +4,8 @@
  and places them into BerkeleyDB file. \o/
 
  Author: Domas Mituzas ( http://dammit.lt/ )
-
+ Author: Asher Feldman ( afeld...@wikimedia.org )
+ Author: Tim Starling ( tstarl...@wikimedia.org )
  License: public domain (as if there's something to protect ;-)
 
  $Id: collector.c 112227 2012-02-23 19:15:17Z midom $
@@ -38,7 +39,7 @@
ssize_t l;
char buf[2000];
int r;
-
+   int n;
 
/* Socket variables */
int s, exp;
@@ -72,7 +73,7 @@
fds[1].fd = exp, fds[1].events |= POLLIN;
 
db_create(db,NULL,0);
-   db-set_cachesize(db, 0, 256*1024*1024, 0);
+   db-set_cachesize(db, 0, 512*1024*1024, 0);

db-open(db,NULL,stats.db,NULL,DB_BTREE,DB_CREATE|DB_TRUNCATE,0);

signal(SIGHUP,hup);
@@ -84,6 +85,7 @@
}
/* Loop! loop! loop! */
for(;;) {
+   n=0;
r=poll(fds,2,-1);

/* Process incoming UDP queue */
@@ -92,6 +94,10 @@
if (l==EAGAIN)
break;
handleMessage((char *)buf,l);
+   n++;
+   /*  Still handle export connections under high 
load */
+   if (n==5000)
+   break;
}

/* Process incoming TCP queue */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bc117d5620b9e545a8e5a6cf3b654ee835b75d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Asher afeld...@wikimedia.org
Gerrit-Reviewer: Asher afeld...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove auto-open of meta dialog - change (mediawiki...VisualEditor)

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

Change subject: Remove auto-open of meta dialog
..


Remove auto-open of meta dialog

This was accidentally introduced in I7ff5f5f095460fd4f6cf841f4182bfb92bf034da

Change-Id: I9266346ff43897e3e7789fd8224628422bc903c6
---
M demos/ve/index.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/demos/ve/index.php b/demos/ve/index.php
index f3852f3..290b9a3 100644
--- a/demos/ve/index.php
+++ b/demos/ve/index.php
@@ -264,7 +264,7 @@
ve.createDocumentFromHTML( ?php echo 
json_encode( $html ) ? )
);
$( '.ve-ce-documentNode' ).focus();
-   ve.instances[0].dialogs.open( 'meta' );
+   //ve.instances[0].dialogs.open( 'meta' );
} );
/script
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9266346ff43897e3e7789fd8224628422bc903c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org
Gerrit-Reviewer: Krinkle ttij...@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] Off with your head iphone2 - change (mediawiki...MobileFrontend)

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

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


Change subject: Off with your head iphone2
..

Off with your head iphone2

You useless piece of junk

Change-Id: Ib1a04ae71dfca869d17494f0cf963c654b4d7a0d
---
M includes/DeviceDetection.php
D stylesheets/devices/iphone2.css
M tests/DeviceDetectionTest.php
3 files changed, 2 insertions(+), 14 deletions(-)


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

diff --git a/includes/DeviceDetection.php b/includes/DeviceDetection.php
index dc708ad..331132b 100644
--- a/includes/DeviceDetection.php
+++ b/includes/DeviceDetection.php
@@ -253,12 +253,6 @@
'supports_jquery' = true,
'disable_zoom' = false,
),
-   'iphone2' = array (
-   'view_format' = 'html',
-   'css_file_name' = '',
-   'supports_jquery' = true,
-   'disable_zoom' = true,
-   ),
'kindle' = array (
'view_format' = 'html',
'css_file_name' = 'kindle',
@@ -407,11 +401,7 @@
} elseif ( preg_match( '/iPad.* Safari/', $userAgent ) ) {
$deviceName = 'iphone';
} elseif ( preg_match( '/iPhone.* Safari/', $userAgent ) ) {
-   if ( strpos( $userAgent, 'iPhone OS 2' ) !== false ) {
-   $deviceName = 'iphone2';
-   } else {
-   $deviceName = 'iphone';
-   }
+   $deviceName = 'iphone';
} elseif ( preg_match( '/iPhone/', $userAgent ) ) {
if ( strpos( $userAgent, 'Opera' ) !== false ) {
$deviceName = 'operamini';
diff --git a/stylesheets/devices/iphone2.css b/stylesheets/devices/iphone2.css
deleted file mode 100644
index 3a2916c..000
--- a/stylesheets/devices/iphone2.css
+++ /dev/null
@@ -1 +0,0 @@
-/* empty until further notice */
diff --git a/tests/DeviceDetectionTest.php b/tests/DeviceDetectionTest.php
index 2b397b5..c95e10c 100644
--- a/tests/DeviceDetectionTest.php
+++ b/tests/DeviceDetectionTest.php
@@ -34,7 +34,7 @@
array( 'ie', 'Mozilla/5.0 (compatible; MSIE 10.0; 
Windows Phone 8.0; Trident/6.0; ARM; Touch; IEMobile/10.0; Manufacturer; 
Device [;Operator])' ),
// Others
array( 'android',   'Mozilla/5.0 (Linux; U; Android 
2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) 
Version/4.0 Mobile Safari/530.17' ),
-   array( 'iphone2',   'Mozilla/5.0 (ipod: U;CPU iPhone OS 
2_2 like Mac OS X: es_es) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.0 
Mobile/3B48b Safari/419.3' ),
+   array( 'iphone','Mozilla/5.0 (ipod: U;CPU iPhone OS 
2_2 like Mac OS X: es_es) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.0 
Mobile/3B48b Safari/419.3' ),
array( 'iphone','Mozilla/5.0 (iPhone; U; CPU like 
Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3B48b 
Safari/419.3' ),
array( 'nokia', 'Mozilla/5.0 (SymbianOS/9.1; U; 
[en]; SymbianOS/91 Series60/3.0) AppleWebKit/413 (KHTML, like Gecko) 
Safari/413' ),
array( 'palm_pre',  'Mozilla/5.0 (webOS/1.0; U; en-US) 
AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0' ),
@@ -87,7 +87,6 @@
return array(
array( 'webkit', '' ),
array( 'android', '' ),
-   array( 'iphone2', '' ),
array( 'palm_pre', '' ),
array( 'html', '' ),
array( 'capable', '' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1a04ae71dfca869d17494f0cf963c654b4d7a0d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


  1   2   3   >