[MediaWiki-commits] [Gerrit] Deferred user_touched update via onTransactionIdle. - change (mediawiki/core)

2013-04-02 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged.

Change subject: Deferred user_touched update via onTransactionIdle.
..


Deferred user_touched update via onTransactionIdle.

* This should reduce deadlocks and lock wait timeouts.

Change-Id: I7d028f9efbe6b2f73240aa653eb9775020f33e8c
---
M includes/User.php
1 file changed, 17 insertions(+), 16 deletions(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved



diff --git a/includes/User.php b/includes/User.php
index dc68502..9427a9e 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -1969,28 +1969,29 @@
 * for reload on the next hit.
 */
public function invalidateCache() {
-   if( wfReadOnly() ) {
+   if ( wfReadOnly() ) {
return;
}
$this-load();
-   if( $this-mId ) {
+   if ( $this-mId ) {
$this-mTouched = self::newTouchedTimestamp();
 
$dbw = wfGetDB( DB_MASTER );
-
-   // Prevent contention slams by checking user_touched 
first
-   $now = $dbw-timestamp( $this-mTouched );
-   $needsPurge = $dbw-selectField( 'user', '1',
-   array( 'user_id' = $this-mId, 'user_touched  
' . $dbw-addQuotes( $now ) )
-   );
-   if ( $needsPurge ) {
-   $dbw-update( 'user',
-   array( 'user_touched' = $now ),
-   array( 'user_id' = $this-mId, 
'user_touched  ' . $dbw-addQuotes( $now ) ),
-   __METHOD__
-   );
-   }
-
+   $userid = $this-mId;
+   $touched = $this-mTouched;
+   $dbw-onTransactionIdle( function() use ( $dbw, 
$userid, $touched ) {
+   // Prevent contention slams by checking 
user_touched first
+   $encTouched = $dbw-addQuotes( $dbw-timestamp( 
$touched ) );
+   $needsPurge = $dbw-selectField( 'user', '1',
+   array( 'user_id' = $userid, 
'user_touched  ' . $encTouched ) );
+   if ( $needsPurge ) {
+   $dbw-update( 'user',
+   array( 'user_touched' = 
$dbw-timestamp( $touched ) ),
+   array( 'user_id' = $userid, 
'user_touched  ' . $encTouched ),
+   __METHOD__
+   );
+   }
+   } );
$this-clearSharedCache();
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d028f9efbe6b2f73240aa653eb9775020f33e8c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Tim Starling tstarl...@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] Fixes for page and proofread layout - change (mediawiki...Translate)

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

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


Change subject: Fixes for page and proofread layout
..

Fixes for page and proofread layout

Top and bottom of the page lack the border line which makes the
layout look broken. This was broken in previous refactorings that
affected the structure of HTML. This patchset provides CSS fixes
to adjust that.

Change-Id: I674eb3faf042e68174418965e957a38611b76ed2
---
M resources/css/ext.translate.pagemode.css
M resources/css/ext.translate.proofread.css
2 files changed, 9 insertions(+), 8 deletions(-)


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

diff --git a/resources/css/ext.translate.pagemode.css 
b/resources/css/ext.translate.pagemode.css
index 4d8aa06..34df2b8 100644
--- a/resources/css/ext.translate.pagemode.css
+++ b/resources/css/ext.translate.pagemode.css
@@ -3,7 +3,7 @@
min-height: 50px;
margin: 0 auto;
vertical-align: middle;
-   background: #FF;
+   background: #F8F8F8;
 }
 
 .ext-translate-container .tux-messagelist .tux-message-pagemode 
.tux-message-item-compact {
@@ -24,12 +24,14 @@
background: #FCFCFC;
 }
 
-.ext-translate-container .tux-messagelist .tux-message-pagemode:first-child {
+.ext-translate-container .tux-messagelist .tux-message-pagemode:first-child 
.tux-message-item-compact {
+   margin-top: 10px;
padding-top: 60px;
border-top: 1px solid #DD;
 }
 
-.ext-translate-container .tux-messagelist .tux-message-pagemode:last-child {
+.ext-translate-container .tux-messagelist .tux-message-pagemode:last-child 
.tux-message-item-compact {
+   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 e1ad24f..908b94a 100644
--- a/resources/css/ext.translate.proofread.css
+++ b/resources/css/ext.translate.proofread.css
@@ -3,7 +3,7 @@
min-height: 50px;
margin: 0 auto;
vertical-align: middle;
-   background: #FF;
+   background: #F8F8F8;
 }
 
 .ext-translate-container .tux-messagelist .tux-message-proofread 
.tux-message-item-compact {
@@ -20,18 +20,17 @@
max-width: 900px;
 }
 
-
-.ext-translate-container .tux-messagelist .tux-message-proofread:hover {
+.ext-translate-container .tux-messagelist .tux-message-proofread 
.tux-message-item-compact:hover {
background: #FCFCFC;
 }
 
-.ext-translate-container .tux-messagelist .tux-message-proofread:first-child {
+.ext-translate-container .tux-messagelist .tux-message-proofread:first-child 
.tux-message-item-compact {
margin-top: 10px;
padding-top: 60px;
border-top: 1px solid #DD;
 }
 
-.ext-translate-container .tux-messagelist .tux-message-proofread:last-child {
+.ext-translate-container .tux-messagelist .tux-message-proofread:last-child 
.tux-message-item-compact {
margin-bottom: 10px;
padding-bottom: 60px;
border-bottom: 1px solid #DD;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I674eb3faf042e68174418965e957a38611b76ed2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove removed message keys from maintenance files - change (mediawiki/core)

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

Change subject: Remove removed message keys from maintenance files
..


Remove removed message keys from maintenance files

Follow-up to change-Id Ia6d73c2deb9428d214b7d69b29235094de75c52e

Change-Id: I17a9960265fa44c45468ec5cdc5b5839dce475cc
---
M maintenance/language/messageTypes.inc
M maintenance/language/messages.inc
2 files changed, 0 insertions(+), 30 deletions(-)

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



diff --git a/maintenance/language/messageTypes.inc 
b/maintenance/language/messageTypes.inc
index 5eb8c5c..f5bcb5d 100644
--- a/maintenance/language/messageTypes.inc
+++ b/maintenance/language/messageTypes.inc
@@ -296,23 +296,13 @@
'resetpass_text',
'image_sample',
'media_sample',
-   'skinname-standard',
-   'skinname-nostalgia',
'skinname-cologneblue',
'skinname-monobook',
-   'skinname-myskin',
-   'skinname-chick',
-   'skinname-simple',
'skinname-modern',
'skinname-vector',
'common.css',
-   'standard.css',
-   'nostalgia.css',
'cologneblue.css',
'monobook.css',
-   'myskin.css',
-   'chick.css',
-   'simple.css',
'modern.css',
'vector.css',
'print.css',
@@ -323,13 +313,8 @@
'group-sysop.css',
'group-bureaucrat.css',
'common.js',
-   'standard.js',
-   'nostalgia.js',
'cologneblue.js',
'monobook.js',
-   'myskin.js',
-   'chick.js',
-   'simple.js',
'modern.js',
'vector.js',
'group-autoconfirmed.js',
diff --git a/maintenance/language/messages.inc 
b/maintenance/language/messages.inc
index 6d6e95c..9c883bf 100644
--- a/maintenance/language/messages.inc
+++ b/maintenance/language/messages.inc
@@ -2625,13 +2625,8 @@
),
'stylesheets' = array(
'common.css',
-   'standard.css',
-   'nostalgia.css',
'cologneblue.css',
'monobook.css',
-   'myskin.css',
-   'chick.css',
-   'simple.css',
'modern.css',
'vector.css',
'print.css',
@@ -2644,13 +2639,8 @@
),
'scripts' = array(
'common.js',
-   'standard.js',
-   'nostalgia.js',
'cologneblue.js',
'monobook.js',
-   'myskin.js',
-   'chick.js',
-   'simple.js',
'modern.js',
'vector.js',
'group-autoconfirmed.js',
@@ -2732,13 +2722,8 @@
'pageinfo-category-files'
),
'skin' = array(
-   'skinname-standard',
-   'skinname-nostalgia',
'skinname-cologneblue',
'skinname-monobook',
-   'skinname-myskin',
-   'skinname-chick',
-   'skinname-simple',
'skinname-modern',
'skinname-vector',
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17a9960265fa44c45468ec5cdc5b5839dce475cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
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] Fix failing tests - change (mediawiki...MobileFrontend)

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

Change subject: Fix failing tests
..


Fix failing tests

Change-Id: I58baf0e4c61796b53bd847cf4a223989e0e3ab8b
---
M tests/MobileContextTest.php
M tests/modules/MFResourceLoaderModuleTest.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/tests/MobileContextTest.php b/tests/MobileContextTest.php
index 34c8bd1..56df914 100644
--- a/tests/MobileContextTest.php
+++ b/tests/MobileContextTest.php
@@ -240,7 +240,7 @@
 
public function getXDeviceInVaryModeProvider() {
return array(
-   array( 'webkit', 'no', 'capable' ),
+   array( 'webkit', 'no', 'webkit' ),
array( 'capable', 'no', 'capable' ),
array( 'wap', 'yes', 'wap' ),
);
diff --git a/tests/modules/MFResourceLoaderModuleTest.php 
b/tests/modules/MFResourceLoaderModuleTest.php
index 8aff7d2..c63e3c4 100644
--- a/tests/modules/MFResourceLoaderModuleTest.php
+++ b/tests/modules/MFResourceLoaderModuleTest.php
@@ -96,8 +96,8 @@
),
array(
$module,
-   'mw.mobileFrontend.template.add(template, 
hello\n);' . \n .
-   'mw.mobileFrontend.template.add(template2, 
goodbye\n);' . \n
+   
'mw.mobileFrontend.template.add(template,hello\n);' . 
+   
'mw.mobileFrontend.template.add(template2,goodbye\n);'
)
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58baf0e4c61796b53bd847cf4a223989e0e3ab8b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: awjrichards aricha...@wikimedia.org
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add full stops to error messages - change (mediawiki...RT)

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

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


Change subject: Add full stops to error messages
..

Add full stops to error messages

Change-Id: I453b82dd6b375c88d68a7b582adb8a3c2cd3489c
---
M RT.i18n.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/RT.i18n.php b/RT.i18n.php
index 5c7cc68..30aa44f 100644
--- a/RT.i18n.php
+++ b/RT.i18n.php
@@ -19,8 +19,8 @@
  */
 $messages['en'] = array(
'rt-desc' = 'Fancy interface to RT (Request Tracker)',
-   'rt-inactive' = 'The RT extension is not active',
-   'rt-badquery' = 'The RT extension encountered an error when 
talking to the RT database',
+   'rt-inactive' = 'The RT extension is not active.',
+   'rt-badquery' = 'The RT extension encountered an error when 
talking to the RT database.',
'rt-badlimit' = Invalid LIMIT (l) arg: must be a number.
 You tried: '''\$1''',
'rt-badorderby'   = Invalid ORDER BY (ob) arg: must be a standard 
field (see documentation).
@@ -33,7 +33,7 @@
 You tried: '''\$1''',
'rt-badowner' = Invalid owner (o) arg: must be a valid username.
 You tried: '''\$1''',
-   'rt-nomatches'= 'No matching RT tickets were found',
+   'rt-nomatches'= 'No matching RT tickets were found.',
 );
 
 /** Message documentation (Message documentation)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I453b82dd6b375c88d68a7b582adb8a3c2cd3489c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RT
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add full stops to error messages - change (mediawiki...RT)

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

Change subject: Add full stops to error messages
..


Add full stops to error messages

Change-Id: I453b82dd6b375c88d68a7b582adb8a3c2cd3489c
---
M RT.i18n.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/RT.i18n.php b/RT.i18n.php
index 5c7cc68..30aa44f 100644
--- a/RT.i18n.php
+++ b/RT.i18n.php
@@ -19,8 +19,8 @@
  */
 $messages['en'] = array(
'rt-desc' = 'Fancy interface to RT (Request Tracker)',
-   'rt-inactive' = 'The RT extension is not active',
-   'rt-badquery' = 'The RT extension encountered an error when 
talking to the RT database',
+   'rt-inactive' = 'The RT extension is not active.',
+   'rt-badquery' = 'The RT extension encountered an error when 
talking to the RT database.',
'rt-badlimit' = Invalid LIMIT (l) arg: must be a number.
 You tried: '''\$1''',
'rt-badorderby'   = Invalid ORDER BY (ob) arg: must be a standard 
field (see documentation).
@@ -33,7 +33,7 @@
 You tried: '''\$1''',
'rt-badowner' = Invalid owner (o) arg: must be a valid username.
 You tried: '''\$1''',
-   'rt-nomatches'= 'No matching RT tickets were found',
+   'rt-nomatches'= 'No matching RT tickets were found.',
 );
 
 /** Message documentation (Message documentation)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I453b82dd6b375c88d68a7b582adb8a3c2cd3489c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RT
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add comments for grep - change (mediawiki...CommunityVoice)

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

Change subject: Add comments for grep
..


Add comments for grep

* communityvoice-ratings-error-missing-argument is undefined
* communityvoice-ratings-error-no-* are unused

Change-Id: Ib1471b2d28ae39ce010a7d33e200795450d09c09
---
M Modules/Ratings.php
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/Modules/Ratings.php b/Modules/Ratings.php
index e604e9a..478bcb4 100644
--- a/Modules/Ratings.php
+++ b/Modules/Ratings.php
@@ -163,6 +163,10 @@
$args[$argument] = htmlspecialchars( 
$args[$argument] );
} else {
$error = true;
+   // Give grep a chance to find the usages:
+   // 
communityvoice-ratings-error-missing-argument (undefined)
+   // TODO: The following messages are defined but 
unused here:
+   // communityvoice-ratings-error-no-category, 
communityvoice-ratings-error-no-title
$errors[] = CommunityVoice::getMessage(
'ratings', 'error-missing-argument', 
$argument
);
@@ -188,6 +192,7 @@
'cv_ratings_scale_' . $args['category'] . '_' . 
$args['title']
);
// Gets stats message
+   // Give grep a chance to find the usages: 
communityvoice-ratings-scale-stats
$stats = CommunityVoice::getMessageParse(
'ratings',
'scale-stats',
@@ -237,6 +242,10 @@
'stats' 
= $stats,

'status' = array(

'ready' = '#160;',
+   
// Give grep a chance to find the usages:
+   
// community-voice-ratings-scale-status-sending,
+   
// community-voice-ratings-scale-status-error,
+   
// community-voice-ratings-scale-status-thanks

'sending' = CommunityVoice::getMessage(

'ratings', 'scale-status-sending'

),
@@ -360,6 +369,7 @@
// Builds result
$result = array(
'rating' = $rating,
+   // Give grep a chance to find the usages: 
communityvoice-ratings-scale-stats
'stats' = CommunityVoice::getMessage(
'ratings',
'scale-stats',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1471b2d28ae39ce010a7d33e200795450d09c09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CommunityVoice
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Trevor Parscal tpars...@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] Improve messages - change (mediawiki...RevisionCommentSupplement)

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

Change subject: Improve messages
..


Improve messages

* users who have permission to (action)
* Preview of the reason/supplementary comment
* This page lists...
* Sort by:

See also:
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Revcs-edit-preview-reason/en_(2)

Change-Id: Ia8b37fe00d1ac0bb2ce1f5077f17aea4935ba0a4
---
M RevisionCommentSupplement.i18n.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/RevisionCommentSupplement.i18n.php 
b/RevisionCommentSupplement.i18n.php
index b720820..39362c5 100644
--- a/RevisionCommentSupplement.i18n.php
+++ b/RevisionCommentSupplement.i18n.php
@@ -39,12 +39,12 @@
'revcs-delete-legend' = 'Delete the supplementary comment',
'revcs-delete-submit' = 'Delete the supplementary comment',
'revcs-delete-success' = 'Succeed in deleting the supplementary 
comment.',
-   'revcs-edit-desc' = 'You can set supplementary comments, and users 
have {{int:action-supplementcomment-restricted}} (supplementcomment-restricted) 
right can modify supplementary comments.',
+   'revcs-edit-desc' = 'You can set supplementary comments, and users who 
have permission to {{int:action-supplementcomment-restricted}} 
(supplementcomment-restricted) can modify supplementary comments.',
'revcs-edit-heading' = 'Edit supplementary comments',
'revcs-edit-legend' = 'Edit supplementary comments',
'revcs-edit-preview' = 'Show preview',
-   'revcs-edit-preview-reason' = 'Reason preview: $1',
-   'revcs-edit-preview-supplement' = 'Supplementary comment preview: $1',
+   'revcs-edit-preview-reason' = 'Preview of the reason: $1',
+   'revcs-edit-preview-supplement' = 'Preview of the supplementary 
comment: $1',
'revcs-edit-reason' = 'Reason:',
'revcs-edit-revision-id' = 'Revision ID:',
'revcs-edit-save' = 'Save the supplementary comment',
@@ -80,7 +80,7 @@
'revcs-history-legend' = 'History of supplementary comment',
'revcs-history-rcsh-id' = 'History ID',
'revcs-history-rcsh-reason' = 'Reason',
-   'revcs-list-desc' = 'This lists current supplementary comments.',
+   'revcs-list-desc' = 'This page lists current supplementary comments.',
'revcs-list-descending' = 'list in descending order',
'revcs-list-extended-comparison' = 'Operation of comparison:',
'revcs-list-extended-comparison-and-over' = 'Properties are the 
standard and over',
@@ -105,7 +105,7 @@
'revcs-list-rcs-timestamp' = 'Edited date and time',
'revcs-list-rcs-user-text' = 'User',
'revcs-list-reset' = 'Reset',
-   'revcs-list-sort' = 'Sort:',
+   'revcs-list-sort' = 'Sort by:',
'revcs-list-submit' = 'Show',
'revcs-log-hidehistory-reason-hidden' = 'reason hidden',
'revcs-log-hidehistory-reason-unhidden' = 'reason unhidden',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8b37fe00d1ac0bb2ce1f5077f17aea4935ba0a4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/RevisionCommentSupplement
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Burthsceh burths...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Replace coll-add_this_page by coll-add_page_tooltip - change (mediawiki...Collection)

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

Change subject: Replace coll-add_this_page by coll-add_page_tooltip
..


Replace coll-add_this_page by coll-add_page_tooltip

The message coll-add_this_page is for a link text.
The tooltip for the link is coll-add_page_tooltip.

Change-Id: I9c7188be7f9b94ddf1e43f33001eb459665d4280
---
M Collection.templates.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/Collection.templates.php b/Collection.templates.php
index d3a8dd8..46984c1 100644
--- a/Collection.templates.php
+++ b/Collection.templates.php
@@ -475,7 +475,7 @@
$url = $title-getLocalUrl();
$out .= 'li style=margin-bottom: 10px; padding: 4px 4px; 
background-color: #ff; font-size: 1.4em; font-weight: bold;';
$out .= 'noscriptinput type=checkbox value=' . 
htmlspecialchars( $artName ) . ' name=articleList[] //noscript';
-   $out .= 'a onclick=' . htmlspecialchars( 
'collectionSuggestCall(AddArticle, ' . Xml::encodeJsVar( array( $artName ) ) 
. '); return false;' ) . ' href=' . htmlspecialchars( 
SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' = 'suggest', 'add' = 
$artName ) ) ) . ' title=' . wfMessage( 'coll-add_this_page' )-escaped() . 
'img src=' . htmlspecialchars( $mediapath . 'silk-add.png' ) . ' 
width=16 height=16 alt=/a ';
+   $out .= 'a onclick=' . htmlspecialchars( 
'collectionSuggestCall(AddArticle, ' . Xml::encodeJsVar( array( $artName ) ) 
. '); return false;' ) . ' href=' . htmlspecialchars( 
SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' = 'suggest', 'add' = 
$artName ) ) ) . ' title=' . wfMessage( 'coll-add_page_tooltip' )-escaped() 
. 'img src=' . htmlspecialchars( $mediapath . 'silk-add.png' ) . ' 
width=16 height=16 alt=/a ';
$out .= 'a onclick=' . htmlspecialchars( 
'collectionSuggestCall(BanArticle, ' . Xml::encodeJsVar( array( $artName ) ) 
. '); return false;' ) . ' href=' . htmlspecialchars( 
SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' = 'suggest', 'ban' = 
$artName ) ) ) . ' title=' . wfMessage( 'coll-suggest_ban_tooltip' 
)-escaped() . 'img src=' . htmlspecialchars( $mediapath . 
'silk-cancel.png' ) . ' width=16 height=16 alt=/a ';
$out .= 'a href=' . htmlspecialchars( $url ) . ' title=' . 
htmlspecialchars( $artName ) . '' . htmlspecialchars( $artName ) . '/a';
$out .= '/li';
@@ -486,7 +486,7 @@
$url = str_replace(  , _, $url );
$out .= 'li style=padding-left: 4px;';
$out .= 'noscriptinput type=checkbox value=' . 
htmlspecialchars( $artName ) . ' name=articleList[] //noscript';
-   $out .= 'a onclick=' . htmlspecialchars( 
'collectionSuggestCall(AddArticle, ' . Xml::encodeJsVar( array( $artName ) ) 
. '); return false;' ) . ' href=' . htmlspecialchars( 
SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' = 'suggest', 'add' = 
$artName ) ) ) . ' title=' . wfMessage( 'coll-add_this_page' )-escaped() . 
'img src=' . htmlspecialchars( $mediapath . 'silk-add.png' ) . ' 
width=16 height=16 alt=/a ';
+   $out .= 'a onclick=' . htmlspecialchars( 
'collectionSuggestCall(AddArticle, ' . Xml::encodeJsVar( array( $artName ) ) 
. '); return false;' ) . ' href=' . htmlspecialchars( 
SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' = 'suggest', 'add' = 
$artName ) ) ) . ' title=' . wfMessage( 'coll-add_page_tooltip' )-escaped() 
. 'img src=' . htmlspecialchars( $mediapath . 'silk-add.png' ) . ' 
width=16 height=16 alt=/a ';
$out .= 'a href=' . htmlspecialchars( $url ) . ' 
title=' . htmlspecialchars( $artName ) . '' . htmlspecialchars( $artName ) . 
'/a';
$out .= '/li';
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c7188be7f9b94ddf1e43f33001eb459665d4280
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] When user modifies a translation, it should no longer be pro... - change (mediawiki...Translate)

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

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


Change subject: When user modifies a translation, it should no longer be 
proofreadable
..

When user modifies a translation, it should no longer be proofreadable

Change-Id: Ice85a400663554e65755ff5eebc5f143923891bd
Fixes: The person icon signing this is your own translation does not appear.
Bug: 46687
Followup: I9218ee8a7dd308babe2f6a78eee1c4846c130367
---
M resources/css/ext.translate.proofread.css
M resources/js/ext.translate.proofread.js
2 files changed, 19 insertions(+), 13 deletions(-)


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

diff --git a/resources/css/ext.translate.proofread.css 
b/resources/css/ext.translate.proofread.css
index e1ad24f..91a1d60 100644
--- a/resources/css/ext.translate.proofread.css
+++ b/resources/css/ext.translate.proofread.css
@@ -161,7 +161,7 @@
color: #77;
display: inline-block;
font-size: 13px;
-   padding-top: 35px;
+   padding-top: 10px;
padding-right: 2px;
 }
 
diff --git a/resources/js/ext.translate.proofread.js 
b/resources/js/ext.translate.proofread.js
index 3f39366..222bfa3 100644
--- a/resources/js/ext.translate.proofread.js
+++ b/resources/js/ext.translate.proofread.js
@@ -135,9 +135,7 @@
proofread.$message.find( 
'.tux-proofread-translation' )
.text( translation );
proofread.message.translation = 
translation;
-   proofread.$message.addClass( 
'own-translation' );
-   // Own translations cannot be reviewed, 
so hide the review button
-   proofread.disableProofread();
+   proofread.markSelfTranslation();
}
} );
 
@@ -207,12 +205,6 @@
$( 'div' )
.addClass( 
'tux-proofread-action-block one column' )
.append(
-   
translatedBySelf ?
-   $( 
'div' )
-   
.addClass( 'translated-by-self' )
-   
.attr( 'title', mw.msg( 'tux-proofread-translated-by-self' ) )
-   
.tipsy( { gravity: 'e' } ):
-   $( [] ),

$proofreadAction,

otherReviewers.length ?
$( 
'div' )
@@ -227,9 +219,7 @@
.addClass( this.message.properties.status );
 
if ( translatedBySelf ) {
-   this.$message.addClass( 'own-translation' );
-   // Own translations cannot be reviewed, so 
disable proofread
-   this.disableProofread();
+   this.markSelfTranslation();
}
 
/* Here we need to check that there are reviewers in 
the first place
@@ -245,6 +235,22 @@
},
 
/**
+* Mark the message self translated.
+*/
+   markSelfTranslation: function () {
+   // Own translations cannot be reviewed, so disable 
proofread
+   this.disableProofread();
+   if ( !this.$message.hasClass( 'own-translation' ) ) {
+   this.$message.addClass( 'own-translation' )
+   .find( '.tux-proofread-action-block' )
+   .append( $( 'div' )
+   .addClass( 'translated-by-self' 
)
+   .attr( 'title', mw.msg( 
'tux-proofread-translated-by-self' ) )
+   .tipsy( { gravity: 'e' } )
+   );
+   }
+   },
+   /**
 * Mark this message as proofread.
 */
proofread: function () {

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

Gerrit-MessageType: 

[MediaWiki-commits] [Gerrit] Bug 45622 - Allow invoking of SkinAfterBottomScripts - change (mediawiki...MobileFrontend)

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

Change subject: Bug 45622 - Allow invoking of SkinAfterBottomScripts
..


Bug 45622 - Allow invoking of SkinAfterBottomScripts

This subtle change does exactly the same as before put also applies
the SkinAfterBottomScripts hook allowing extensions like Google Analytics
to be registered

Bug 45622

Change-Id: I29184aa66fa6ecb527aa384b670f193e54a63f81
---
M includes/skins/SkinMobile.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 9a0c6d1..22b84c3 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -269,7 +269,7 @@
$bottomScripts = '';
}
 
-   $bottomScripts .= $out-getBottomScripts();
+   $bottomScripts .= $this-bottomScripts();
} else {
$bottomScripts = '';
}

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

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

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


[MediaWiki-commits] [Gerrit] API param validation: Set strict mode for in_array - change (mediawiki/core)

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

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


Change subject: API param validation: Set strict mode for in_array
..

API param validation: Set strict mode for in_array

The in_array gives true when the allowed values contains a 0 as value,
for example by namespaces,

action=querylist=allpagesapnamespace=test|tset

was not rejected

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/57038/1

diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 741e908..84a6ed9 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -1081,7 +1081,7 @@
 
if ( !$allowMultiple  count( $valuesList ) != 1 ) {
// Bug 33482 - Allow entries with | in them for 
non-multiple values
-   if ( in_array( $value, $allowedValues ) ) {
+   if ( in_array( $value, $allowedValues, true ) ) {
return $value;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9220a955ffaf2bcb0d1d5b27c948af2f85714110
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de

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


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

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

Change subject: Preparing March 2013 release
..


Preparing March 2013 release

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

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



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: merged
Gerrit-Change-Id: Icf8f0bb1653b1567cfa521a8dbffeca63fe6a64b
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: 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] API: Add more generic possible errors - change (mediawiki/core)

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

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


Change subject: API: Add more generic possible errors
..

API: Add more generic possible errors

Added the possible errors for baduser, badtimestamp and badupload

Moved the error messages into the messageMap to avoid a copy of the
message text

Change-Id: I07b105ff4c97dd590d943d633f6ab4e861375723
---
M includes/api/ApiBase.php
1 file changed, 24 insertions(+), 17 deletions(-)


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

diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 741e908..90365e9 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -934,12 +934,7 @@
// accidentally uploaded as a field fails 
spectacularly)
$value = 
$this-getMain()-getRequest()-unsetVal( $encParamName );
if ( $value !== null ) {
-   $this-dieUsage(
-   File upload param 
$encParamName is not a file upload;  .
-   be sure to use 
multipart/form-data for your POST and include  .
-   a filename in the 
Content-Disposition header.,
-   badupload_{$encParamName}
-   );
+   $this-dieUsageMsg( array( 'badupload', 
$encParamName ) );
}
}
} else {
@@ -1157,7 +1152,7 @@
function validateTimestamp( $value, $encParamName ) {
$unixTimestamp = wfTimestamp( TS_UNIX, $value );
if ( $unixTimestamp === false ) {
-   $this-dieUsage( Invalid value '$value' for timestamp 
parameter $encParamName, badtimestamp_{$encParamName} );
+   $this-dieUsageMsg( array( 'badtimestamp', 
$encParamName, $value ) );
}
return wfTimestamp( TS_MW, $unixTimestamp );
}
@@ -1171,7 +1166,7 @@
private function validateUser( $value, $encParamName ) {
$title = Title::makeTitleSafe( NS_USER, $value );
if ( $title === null ) {
-   $this-dieUsage( Invalid value '$value' for user 
parameter $encParamName, baduser_{$encParamName} );
+   $this-dieUsageMsg( array( 'baduser', $encParamName, 
$value ) );
}
return $title-getText();
}
@@ -1300,6 +1295,10 @@
'writedisabled' = array( 'code' = 'noapiwrite', 'info' = 
Editing of this wiki through the API is disabled. Make sure the 
\$wgEnableWriteAPI=true; statement is included in the wiki's LocalSettings.php 
file ),
'writerequired' = array( 'code' = 'writeapidenied', 'info' = 
You're not allowed to edit this wiki through the API ),
'missingparam' = array( 'code' = 'no$1', 'info' = The \$1 
parameter must be set ),
+   'badcontinue' = array( 'code' = 'badcontinue', 'info' = 
'Invalid continue param. You should pass the original value returned by the 
previous query' ),
+   'badtimestamp' = array( 'code' = 'badtimestamp_$1', 'info' = 
'Invalid value \'$2\' for timestamp parameter $1' ),
+   'baduser' = array( 'code' = 'baduser_$1', 'info' = 'Invalid 
value \'$2\' for user parameter $1' ),
+   'badupload' = array( 'code' = 'badupload_$1', 'info' = 'File 
upload param $1 is not a file upload; be sure to use multipart/form-data for 
your POST and include a filename in the Content-Disposition header.' ),
'invalidtitle' = array( 'code' = 'invalidtitle', 'info' = 
Bad title \\$1\ ),
'nosuchpageid' = array( 'code' = 'nosuchpageid', 'info' = 
There is no page with ID \$1 ),
'nosuchrevid' = array( 'code' = 'nosuchrevid', 'info' = 
There is no revision with ID \$1 ),
@@ -1425,15 +1424,13 @@
}
 
/**
-* Die with the $prefix.'badcontinue' error. This call is common enough 
to make it into the base method.
+* Die with the 'badcontinue' error. This call is common enough to make 
it into the base method.
 * @param $condition boolean will only die if this value is true
 * @since 1.21
 */
protected function dieContinueUsageIf( $condition ) {
if ( $condition ) {
-   $this-dieUsage(
-   'Invalid continue param. You should pass the 
original value returned by the previous query',
-   'badcontinue' );
+   $this-dieUsageMsg( array( 'badcontinue' ) );
}
}
 
@@ -1571,13 +1568,23 @@
   

[MediaWiki-commits] [Gerrit] Update documentation for TranslateUtils::getIcon - change (mediawiki...Translate)

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

Change subject: Update documentation for TranslateUtils::getIcon
..


Update documentation for TranslateUtils::getIcon

Also readd the warning removed in Change-Id:
I24fb73e31ab9433bb6046014e5e6937910a8f8e4 with an updated
description.

Change-Id: I654ba943be0effd3d0568e1eca5d3355f6ae
---
M TranslateUtils.php
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/TranslateUtils.php b/TranslateUtils.php
index edef392..ace3a8a 100644
--- a/TranslateUtils.php
+++ b/TranslateUtils.php
@@ -395,8 +395,11 @@
}
 
/**
-* For the give message group get the icons in vector and raster formats
-* @return array
+* Get URLs for icons if available.
+* @param MessageGroup $g
+* @param int $size Length of the edge of a bounding box to fit the 
icon.
+* @return null|array
+* @since 2013-04-01
 */
public static function getIcon( MessageGroup $g, $size ) {
global $wgServer;
@@ -410,6 +413,7 @@
$filename = substr( $icon, 7 );
$file = wfFindFile( $filename );
if ( !$file ) {
+   wfWarn( Unknown message group icon file $icon );
return null;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I654ba943be0effd3d0568e1eca5d3355f6ae
Gerrit-PatchSet: 4
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: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] only filter out files not directory - change (mediawiki...TimedMediaHandler)

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

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


Change subject: only filter out files not directory
..

only filter out files not directory

filterThumbnailPurgeList gets directory as first entry in list of files.
only filter the list of files and ignore directory.

Change-Id: I36a4c65c3508f36ff1079d2fc8b1059eff33e809
---
M TimedMediaHandler_body.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/40/57040/1

diff --git a/TimedMediaHandler_body.php b/TimedMediaHandler_body.php
index e3d94bb..0bcb3d0 100644
--- a/TimedMediaHandler_body.php
+++ b/TimedMediaHandler_body.php
@@ -398,7 +398,8 @@
$transcodeSet = array_merge($wgEnabledTranscodeSet, 
$wgEnabledAudioTranscodeSet);
 
//dont remove derivatives on normal purge
-   foreach($files as $key = $file) {
+   foreach(array_slice($files, 1) as $key = $file) {
+   wfDebug(check $key - $file\n);
foreach( $transcodeSet as $transcodeKey ) {
if ( preg_match('/' . preg_quote($transcodeKey) 
. '$/', $file) ) {
unset($files[$key]);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36a4c65c3508f36ff1079d2fc8b1059eff33e809
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: J jger...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fixes for page and proofread layout - change (mediawiki...Translate)

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

Change subject: Fixes for page and proofread layout
..


Fixes for page and proofread layout

Top and bottom of the page lack the border line which makes the
layout look broken. This was broken in previous refactorings that
affected the structure of HTML. This patchset provides CSS fixes
to adjust that.

Change-Id: I674eb3faf042e68174418965e957a38611b76ed2
---
M resources/css/ext.translate.pagemode.css
M resources/css/ext.translate.proofread.css
2 files changed, 9 insertions(+), 8 deletions(-)

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



diff --git a/resources/css/ext.translate.pagemode.css 
b/resources/css/ext.translate.pagemode.css
index 4d8aa06..34df2b8 100644
--- a/resources/css/ext.translate.pagemode.css
+++ b/resources/css/ext.translate.pagemode.css
@@ -3,7 +3,7 @@
min-height: 50px;
margin: 0 auto;
vertical-align: middle;
-   background: #FF;
+   background: #F8F8F8;
 }
 
 .ext-translate-container .tux-messagelist .tux-message-pagemode 
.tux-message-item-compact {
@@ -24,12 +24,14 @@
background: #FCFCFC;
 }
 
-.ext-translate-container .tux-messagelist .tux-message-pagemode:first-child {
+.ext-translate-container .tux-messagelist .tux-message-pagemode:first-child 
.tux-message-item-compact {
+   margin-top: 10px;
padding-top: 60px;
border-top: 1px solid #DD;
 }
 
-.ext-translate-container .tux-messagelist .tux-message-pagemode:last-child {
+.ext-translate-container .tux-messagelist .tux-message-pagemode:last-child 
.tux-message-item-compact {
+   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 e1ad24f..908b94a 100644
--- a/resources/css/ext.translate.proofread.css
+++ b/resources/css/ext.translate.proofread.css
@@ -3,7 +3,7 @@
min-height: 50px;
margin: 0 auto;
vertical-align: middle;
-   background: #FF;
+   background: #F8F8F8;
 }
 
 .ext-translate-container .tux-messagelist .tux-message-proofread 
.tux-message-item-compact {
@@ -20,18 +20,17 @@
max-width: 900px;
 }
 
-
-.ext-translate-container .tux-messagelist .tux-message-proofread:hover {
+.ext-translate-container .tux-messagelist .tux-message-proofread 
.tux-message-item-compact:hover {
background: #FCFCFC;
 }
 
-.ext-translate-container .tux-messagelist .tux-message-proofread:first-child {
+.ext-translate-container .tux-messagelist .tux-message-proofread:first-child 
.tux-message-item-compact {
margin-top: 10px;
padding-top: 60px;
border-top: 1px solid #DD;
 }
 
-.ext-translate-container .tux-messagelist .tux-message-proofread:last-child {
+.ext-translate-container .tux-messagelist .tux-message-proofread:last-child 
.tux-message-item-compact {
margin-bottom: 10px;
padding-bottom: 60px;
border-bottom: 1px solid #DD;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I674eb3faf042e68174418965e957a38611b76ed2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Allow depth in category pages and javascript disabling - change (mediawiki...CategoryTree)

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

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


Change subject: Allow depth in category pages and javascript disabling
..

Allow depth in category pages and javascript disabling

See https://bugzilla.wikimedia.org/show_bug.cgi?id=46775#c0 for a full 
rationale for this change. Basically it allows the depth option to be used for 
Category Pages, which makes the extension useful without javascript for some 
usecases.

Change-Id: I65bebc388b65d2300a1fe63054619fbc1b2abd5c
---
M CategoryPageSubclass.php
M CategoryTree.php
M CategoryTreeFunctions.php
3 files changed, 10 insertions(+), 3 deletions(-)


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

diff --git a/CategoryPageSubclass.php b/CategoryPageSubclass.php
index bb374f0..b87d2bb 100644
--- a/CategoryPageSubclass.php
+++ b/CategoryPageSubclass.php
@@ -47,7 +47,7 @@
 
$tree = $this-getCategoryTree();
 
-   $this-children[] = $tree-renderNodeInfo( $title, $cat );
+   $this-children[] = $tree-renderNodeInfo( $title, $cat, 
$tree-getOption( 'depth' ) );
 
$this-children_start_char[] = $this-getSubcategorySortChar( 
$title, $sortkey );
}
diff --git a/CategoryTree.php b/CategoryTree.php
index 5d0bbdf..1f3b7cc 100644
--- a/CategoryTree.php
+++ b/CategoryTree.php
@@ -49,6 +49,8 @@
  * $wgCategoryTreeDefaultOptions - default options for the categorytree tag.
  * $wgCategoryTreeCategoryPageOptions - options to apply on category pages.
  * $wgCategoryTreeSpecialPageOptions - options to apply on 
Special:CategoryTree.
+ * $wgCategoryTreeDisableScript - disable all javascript in this extension. 
Use this in
+ *combination with a 1 $depth value for 
static category trees.
  */
 
 $wgCategoryTreeMaxChildren = 200;
@@ -65,6 +67,7 @@
 $wgCategoryTreeSidebarRoot = null;
 $wgCategoryTreeHijackPageCategories = false; # EXPERIMENTAL! NOT YET FOR 
PRODUCTION USE! Main problem is general HTML/CSS layout cruftiness.
 $wgCategoryTreeUseCategoryTable = true;
+$wgCategoryTreeDisableScript = false;
 
 $wgCategoryTreeOmitNamespace = CT_HIDEPREFIX_CATEGORIES;
 $wgCategoryTreeDefaultMode = CT_MODE_CATEGORIES;
@@ -73,6 +76,7 @@
 $wgCategoryTreeDefaultOptions['hideprefix'] = null; # will be set to 
$wgCategoryTreeDefaultMode in efCategoryTree(); compatibility quirk
 $wgCategoryTreeDefaultOptions['showcount'] = false;
 $wgCategoryTreeDefaultOptions['namespaces'] = false; # false means no filter
+$wgCategoryTreeDefaultOptions['depth'] = 1;
 
 $wgCategoryTreeCategoryPageMode = CT_MODE_CATEGORIES;
 $wgCategoryTreeCategoryPageOptions = array(); # Options to be used for 
category pages
@@ -177,7 +181,7 @@
global $wgCategoryTreeSidebarRoot, $wgCategoryTreeForceHeaders, 
$wgCategoryTreeHijackPageCategories;
 
# Abort if AJAX is not enabled
-   if ( !$wgUseAjax ) {
+   if ( !$wgUseAjax  !$wgCategoryTreeDisableScript ) {
wfDebug( 'efCategoryTree: $wgUseAjax is not enabled, aborting 
extension setup.' );
return;
}
diff --git a/CategoryTreeFunctions.php b/CategoryTreeFunctions.php
index f26c91a..7aa98f7 100644
--- a/CategoryTreeFunctions.php
+++ b/CategoryTreeFunctions.php
@@ -233,9 +233,12 @@
 * @param OutputPage $outputPage
 */
static function setHeaders( $outputPage ) {
+   global $wgCategoryTreeDisableScript;
# Add the modules
$outputPage-addModuleStyles( 'ext.categoryTree.css' );
-   $outputPage-addModules( 'ext.categoryTree' );
+   if( !$wgCategoryTreeDisableScript ) {
+   $outputPage-addModules( 'ext.categoryTree' );
+   }
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65bebc388b65d2300a1fe63054619fbc1b2abd5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CategoryTree
Gerrit-Branch: master
Gerrit-Owner: Njw nick.wh...@durham.ac.uk

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


[MediaWiki-commits] [Gerrit] You have unsaved changes warning broken - change (mediawiki...Translate)

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

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


Change subject: You have unsaved changes warning broken
..

You have unsaved changes warning broken

Handle three more cases:
1. Change language through ULS.
2. Change group through group selector.
3. Change the filters

Bug: 46237
Change-Id: I846b6163156196086cd43b7015a0e82af82e0697
Followup: I958d9ca420100b0bedd919955283149d1bd3c23e
---
M resources/js/ext.translate.base.js
M resources/js/ext.translate.special.translate.js
2 files changed, 28 insertions(+), 6 deletions(-)


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

diff --git a/resources/js/ext.translate.base.js 
b/resources/js/ext.translate.base.js
index 64d7a9e..76a6a47 100644
--- a/resources/js/ext.translate.base.js
+++ b/resources/js/ext.translate.base.js
@@ -105,6 +105,14 @@
regions: ['SP'],
autonym: mw.msg( 
'translate-documentation-language' )
} );
+   },
+
+   isDirty: function () {
+   return  $( '.mw-ajax-dialog:visible' ).length // For 
old Translate
+   // For new Translate, something being typed in 
the current editor.
+   || mw.translate.dirty
+   // For new translate, previous editors has some 
unsaved edits
+   || $( '.tux-status-unsaved' ).length;
}
} );
 
@@ -119,18 +127,14 @@
 
function pageShowHandler() {
$( window ).on( 'beforeunload.translate', function () {
-   if ( $( '.mw-ajax-dialog:visible' ).length // For old 
Translate
-   // For new Translate, something being typed in 
the current editor.
-   || mw.translate.dirty
-   // For new translate, previous editors has some 
unsaved edits
-   || $( '.tux-status-unsaved' ).length
-   ) {
+   if ( mw.translate.isDirty() ) {
// Return our message
return mw.msg( 
'translate-js-support-unsaved-warning' );
}
} );
}
 
+
$( document ).ready( function () {
translateOnBeforeUnloadRegister();
} );
diff --git a/resources/js/ext.translate.special.translate.js 
b/resources/js/ext.translate.special.translate.js
index 19add80..47ab587 100644
--- a/resources/js/ext.translate.special.translate.js
+++ b/resources/js/ext.translate.special.translate.js
@@ -62,6 +62,10 @@
api = new mw.Api(),
$description = $( '.tux-editor-header 
.description' );
 
+   if ( !checkDirty() ) {
+   return;
+   }
+
changes = {
group: group.id
};
@@ -88,6 +92,10 @@
language: language
};
 
+   if ( !checkDirty() ) {
+   return;
+   }
+
$( '.ext-translate-language-selector  .uls' ).text( 
$.uls.data.getAutonym( language ) );
$( '.tux-messagelist' ).data( 'targetlangcode', 
language );
 
@@ -99,6 +107,10 @@
 
changeFilter: function ( filter ) {
var realFilters, uri;
+
+   if ( !checkDirty() ) {
+   return;
+   }
 
realFilters = [ '!ignored' ];
uri = new mw.Uri( window.location.href );
@@ -133,6 +145,12 @@
}
} );
 
+   function checkDirty() {
+   if ( mw.translate.isDirty() ) {
+   return window.confirm( mw.msg( 
'translate-js-support-unsaved-warning' ) );
+   }
+   return true;
+   }
// Returns an array of jQuery objects of rows of translated
// and proofread messages in the TUX editors.
// Used several times.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I846b6163156196086cd43b7015a0e82af82e0697
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] Monobook's CSS shouldn't change ULS language name case - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Monobook's CSS shouldn't change ULS language name case
..

Monobook's CSS shouldn't change ULS language name case

Bug: 46725
Change-Id: I85e29515280ea2af6262c20937a0d9bd960244b3
---
M resources/css/ext.uls.css
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/resources/css/ext.uls.css b/resources/css/ext.uls.css
index bb37507..6b83aa7 100644
--- a/resources/css/ext.uls.css
+++ b/resources/css/ext.uls.css
@@ -1,5 +1,6 @@
 li#pt-uls a.uls-trigger {
padding-left: 30px;
+   text-transform: none;
 }
 
 /* Opera for some inexplicable reason confuses right and left padding with */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85e29515280ea2af6262c20937a0d9bd960244b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
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] Correct icon file name - change (translatewiki)

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

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


Change subject: Correct icon file name
..

Correct icon file name

Change-Id: I7594c6eee09ce892ddf101aaec0b38a9a4a09e8d
---
M groups/Wikimedia/WikimediaMobile-android.yaml
M groups/Wikimedia/WikimediaMobile-ios.yaml
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/45/57045/1

diff --git a/groups/Wikimedia/WikimediaMobile-android.yaml 
b/groups/Wikimedia/WikimediaMobile-android.yaml
index 73d6e72..1a2f6aa 100644
--- a/groups/Wikimedia/WikimediaMobile-android.yaml
+++ b/groups/Wikimedia/WikimediaMobile-android.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 description: {{int:translate-group-desc-wikimedia-mobile-commons}}
-icon: wiki://File:Commons-icon.svg
+icon: wiki://Commons-icon.svg
 namespace: NS_WIKIMEDIA
 class: FileBasedMessageGroup
 
diff --git a/groups/Wikimedia/WikimediaMobile-ios.yaml 
b/groups/Wikimedia/WikimediaMobile-ios.yaml
index d24210b..f88979d 100644
--- a/groups/Wikimedia/WikimediaMobile-ios.yaml
+++ b/groups/Wikimedia/WikimediaMobile-ios.yaml
@@ -1,7 +1,7 @@
 ---
 BASIC:
   description: {{int:translate-group-desc-wikimedia-mobile-commons}}
-  icon: wiki://File:Commons-icon.svg
+  icon: wiki://Commons-icon.svg
   namespace: NS_WIKIMEDIA
   id: out-wikimedia-mobile-commons-ios
   label: Commons iOS Mobile

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7594c6eee09ce892ddf101aaec0b38a9a4a09e8d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
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] Correct icon file name - change (translatewiki)

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

Change subject: Correct icon file name
..


Correct icon file name

Change-Id: I7594c6eee09ce892ddf101aaec0b38a9a4a09e8d
---
M groups/Wikimedia/WikimediaMobile-android.yaml
M groups/Wikimedia/WikimediaMobile-ios.yaml
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/groups/Wikimedia/WikimediaMobile-android.yaml 
b/groups/Wikimedia/WikimediaMobile-android.yaml
index 73d6e72..1a2f6aa 100644
--- a/groups/Wikimedia/WikimediaMobile-android.yaml
+++ b/groups/Wikimedia/WikimediaMobile-android.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 description: {{int:translate-group-desc-wikimedia-mobile-commons}}
-icon: wiki://File:Commons-icon.svg
+icon: wiki://Commons-icon.svg
 namespace: NS_WIKIMEDIA
 class: FileBasedMessageGroup
 
diff --git a/groups/Wikimedia/WikimediaMobile-ios.yaml 
b/groups/Wikimedia/WikimediaMobile-ios.yaml
index d24210b..f88979d 100644
--- a/groups/Wikimedia/WikimediaMobile-ios.yaml
+++ b/groups/Wikimedia/WikimediaMobile-ios.yaml
@@ -1,7 +1,7 @@
 ---
 BASIC:
   description: {{int:translate-group-desc-wikimedia-mobile-commons}}
-  icon: wiki://File:Commons-icon.svg
+  icon: wiki://Commons-icon.svg
   namespace: NS_WIKIMEDIA
   id: out-wikimedia-mobile-commons-ios
   label: Commons iOS Mobile

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7594c6eee09ce892ddf101aaec0b38a9a4a09e8d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 46784) Changed en message to match the qqq description - change (mediawiki...Wikibase)

2013-04-02 Thread Code Review
Michał Łazowik has uploaded a new change for review.

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


Change subject: (bug 46784) Changed en message to match the qqq description
..

(bug 46784) Changed en message to match the qqq description

Change-Id: I00aad8f6ef8ca72bbdab88e48b8561add881fcff
---
M client/WikibaseClient.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/client/WikibaseClient.i18n.php b/client/WikibaseClient.i18n.php
index a71cbd1..43f9338 100644
--- a/client/WikibaseClient.i18n.php
+++ b/client/WikibaseClient.i18n.php
@@ -63,7 +63,7 @@
'wikibase-unconnectedpages-submit' = 'Go',
'wikibase-unconnectedpages-invalid-language' = '$1 is not a valid 
language code.',
'wikibase-unconnectedpages-page-warning' = 'The page title could not 
be used for the query and is ignored.',
-   'wikibase-unconnectedpages-iwdata-label' = 'Only pages with 
interlanguagelinks',
+   'wikibase-unconnectedpages-iwdata-label' = 'Only pages without 
interlanguagelinks',
'wikibase-unconnectedpages-format-row' = '($1 interlanguagelinks on 
the page)',
 );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00aad8f6ef8ca72bbdab88e48b8561add881fcff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Michał Łazowik mlazo...@gmail.com

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


[MediaWiki-commits] [Gerrit] API: Add new type 'language' - change (mediawiki/core)

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

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


Change subject: API: Add new type 'language'
..

API: Add new type 'language'

Working the same way than 'namespace' by override the type to a array of
the valid values and use the existing validation code.

Using the new type in some modules

Change-Id: I03008949d964dc7a122e2fce2deae19c997887d0
---
M includes/api/ApiBase.php
M includes/api/ApiCreateAccount.php
M includes/api/ApiParse.php
M includes/api/ApiQueryAllMessages.php
M includes/api/ApiQuerySiteinfo.php
M includes/api/ApiWatch.php
6 files changed, 31 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/57047/1

diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 741e908..39b7e6f 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -444,6 +444,13 @@
100, 
$descWordwrap );

$hintPipeSeparated = false;
break;
+   case 'language':
+   $langCodes = 
array_keys( Language::fetchLanguageNames( null, 'all' ) );
+   sort( 
$langCodes );
+   $desc .= 
$paramPrefix . $prompt;
+   $desc .= 
wordwrap( implode( ', ', $langCodes ),
+   100, 
$descWordwrap );
+   break;
case 'limit':
$desc .= 
$paramPrefix . No more than {$paramSettings[self :: PARAM_MAX]};
if ( isset( 
$paramSettings[self::PARAM_MAX2] ) ) {
@@ -945,8 +952,15 @@
} else {
$value = $this-getMain()-getVal( $encParamName, 
$default );
 
-   if ( isset( $value )  $type == 'namespace' ) {
-   $type = MWNamespace::getValidNamespaces();
+   if ( isset( $value ) ) {
+   switch( $type ) {
+   case 'namespace':
+   $type = 
MWNamespace::getValidNamespaces();
+   break;
+   case 'language':
+   $type = 
Language::fetchLanguageNames( null, 'all' );
+   break;
+   }
}
}
 
diff --git a/includes/api/ApiCreateAccount.php 
b/includes/api/ApiCreateAccount.php
index a521346..a3c8d90 100644
--- a/includes/api/ApiCreateAccount.php
+++ b/includes/api/ApiCreateAccount.php
@@ -194,7 +194,9 @@
ApiBase::PARAM_DFLT = false
),
'reason' = null,
-   'language' = null
+   'language' = array(
+   ApiBase::PARAM_TYPE = 'language',
+   ),
);
}
 
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 09b7a88..306cab6 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -575,7 +575,9 @@
),
'pst' = false,
'onlypst' = false,
-   'uselang' = null,
+   'uselang' = array(
+   ApiBase::PARAM_TYPE = 'language',
+   ),
'section' = null,
'disablepp' = false,
'generatexml' = false,
diff --git a/includes/api/ApiQueryAllMessages.php 
b/includes/api/ApiQueryAllMessages.php
index c9811b0..5978106 100644
--- a/includes/api/ApiQueryAllMessages.php
+++ b/includes/api/ApiQueryAllMessages.php
@@ -40,8 +40,6 @@
 
if ( is_null( $params['lang'] ) ) {
$langObj = $this-getLanguage();
-   } elseif ( !Language::isValidCode( $params['lang'] ) ) {
-   $this-dieUsage( 'Invalid language code for parameter 
lang', 'invalidlang' );
} else {
$langObj = Language::factory( $params['lang'] );
}
@@ -228,7 +226,9 @@
'unmodified'
)
   

[MediaWiki-commits] [Gerrit] Changed null parser to be useful. - change (mediawiki...DataValues)

2013-04-02 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

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


Change subject: Changed null parser to be useful.
..

Changed null parser to be useful.

Null parser will no longer wrap everything in an UnknownValue instance. If a 
DataValue instance is
given already, the same instance will be returned. If null is given, null will 
be returned.
Also extended related tests.

Change-Id: I6dfbf530c9779d3a820d6e0f7b96ef61c9cf7e4f
---
M ValueParsers/resources/ValueParser.js
M ValueParsers/resources/parsers/NullParser.js
M ValueParsers/tests/qunit/ValueParser.tests.js
M ValueParsers/tests/qunit/parsers/NullParser.tests.js
4 files changed, 19 insertions(+), 11 deletions(-)


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

diff --git a/ValueParsers/resources/ValueParser.js 
b/ValueParsers/resources/ValueParser.js
index b2f76bd..f9355e4 100644
--- a/ValueParsers/resources/ValueParser.js
+++ b/ValueParsers/resources/ValueParser.js
@@ -45,7 +45,7 @@
 * @param {*} rawValue
 *
 * @return $.Promise In the resolved callbacks the first 
parameter will be the parsed
-* DataValue object.
+* DataValue object or null for an empty value.
 */
parse: vp.util.abstractMember
 
diff --git a/ValueParsers/resources/parsers/NullParser.js 
b/ValueParsers/resources/parsers/NullParser.js
index 88a53af..0f8dab8 100644
--- a/ValueParsers/resources/parsers/NullParser.js
+++ b/ValueParsers/resources/parsers/NullParser.js
@@ -6,14 +6,16 @@
  *
  * @author Jeroen De Dauw  jeroended...@gmail.com 
  */
-( function( mw, vp, dv, $, undefined ) {
+( function( mw, vp, dv, $ ) {
'use strict';
 
var PARENT = vp.ValueParser,
constructor = function() {};
 
/**
-* Constructor for null parsers.
+* Constructor for null parsers. Null parser will take any value for 
parsing and return a
+* UnknownValue data value except if null got passed in or a DataValue 
got passed in. In those
+* cases the value given to the parser process will be the parse result.
 *
 * @constructor
 * @extends vp.ValueParser
@@ -31,11 +33,14 @@
 * @return $.Promise
 */
parse: function( rawValue ) {
-   var deferred = $.Deferred();
+   var deferred = $.Deferred(),
+   value = rawValue;
 
-   deferred.resolve( new dv.UnknownValue( rawValue ) );
+   if( value !== null  !( value instanceof dv.DataValue 
) ) {
+   value = new dv.UnknownValue( value );
+   }
 
-   return deferred.promise();
+   return deferred.resolve( value ).promise();
}
 
} );
diff --git a/ValueParsers/tests/qunit/ValueParser.tests.js 
b/ValueParsers/tests/qunit/ValueParser.tests.js
index 74ada28..265bd2d 100644
--- a/ValueParsers/tests/qunit/ValueParser.tests.js
+++ b/ValueParsers/tests/qunit/ValueParser.tests.js
@@ -119,13 +119,13 @@
assert.ok( true, 'parsing 
succeeded' );
 
assert.ok(
-   dataValue instanceof 
dv.DataValue,
-   'result ' + 
inputDetailMsg + 'is instanceof DataValue'
+   dataValue === null || ( 
dataValue instanceof dv.DataValue ),
+   'result ' + 
inputDetailMsg + 'is instanceof DataValue or null'
);
 
if( expected !== undefined ) {
assert.ok(
-   
dataValue.equals( expected ),
+   dataValue === 
expected || dataValue.equals( expected ),
'result ' + 
inputDetailMsg + 'is equal to the expected DataValue'
);
}
diff --git a/ValueParsers/tests/qunit/parsers/NullParser.tests.js 
b/ValueParsers/tests/qunit/parsers/NullParser.tests.js
index 1ef09a5..4648713 100644
--- a/ValueParsers/tests/qunit/parsers/NullParser.tests.js
+++ b/ValueParsers/tests/qunit/parsers/NullParser.tests.js
@@ -6,7 +6,7 @@
  * @licence GNU GPL v2+
  * @author Jeroen De Dauw  jeroended...@gmail.com 
  */
-( function( vp, dv, $, QUnit, undefined ) {
+( function( vp, dv, $, 

[MediaWiki-commits] [Gerrit] (bug 45002) Created new extension folder for ValueView ext... - change (mediawiki...DataValues)

2013-04-02 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

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


Change subject: (bug 45002) Created new extension folder for ValueView 
extension.
..

(bug 45002) Created new extension folder for ValueView extension.

In the following commits, the DataType's jQuery.valueview will be refactored 
into this extension.

Change-Id: I09698f72b2530db447ca75e733c3b821e1e4c736
---
M DataValues.php
A ValueView/COPYING
A ValueView/INSTALL
A ValueView/README
A ValueView/RELEASE-NOTES
A ValueView/ValueView.i18n.php
A ValueView/ValueView.mw.php
A ValueView/ValueView.php
A ValueView/ValueView.resources.php
9 files changed, 595 insertions(+), 0 deletions(-)


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

diff --git a/DataValues.php b/DataValues.php
index 61a1ecf..a478dcd 100644
--- a/DataValues.php
+++ b/DataValues.php
@@ -26,6 +26,7 @@
'ValueValidators',
'ValueFormatters',
'DataTypes',
+   'ValueView'
);
 
foreach ( $components as $component ) {
diff --git a/ValueView/COPYING b/ValueView/COPYING
new file mode 100644
index 000..ebba08a
--- /dev/null
+++ b/ValueView/COPYING
@@ -0,0 +1,347 @@
+The license text below  applies to all files within this distribution, 
other
+than those that are in a directory which contains files named LICENSE or
+COPYING, or a subdirectory thereof. For those files, the license text 
contained in
+said file overrides any license information contained in directories of 
smaller depth.
+Alternative licenses are typically used for software that is provided by 
external
+parties, and merely packaged with this software for convenience.
+
+
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder 

[MediaWiki-commits] [Gerrit] (bug 45002) additional experts for jQuery.valueview - change (mediawiki...DataValues)

2013-04-02 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

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


Change subject: (bug 45002) additional experts for jQuery.valueview
..

(bug 45002) additional experts for jQuery.valueview

* Introduction of a BifidExpert which is an abstract valueview expert 
definition which requires
  two other expert constructors in an implementation. The bifid expert will 
choose one of the two
  other experts depending on the valueview's current mode. This allows greater 
flexibility when
  defining new experts and allows for sharing code more efficiently.
* SuggestedStringValue expert which is basically a StringValue expert plus 
suggester jQuery
  widget on top. Also see the TODOs in the documentation.
* Introduces a StaticDom expert which can be used together with the 
BifidExpert.
* Reintroduction of special handling for string data values that should match 
the CommonsMedia
  data type definition. This is done with a CommonsMediaType expert. This 
expert is combining the
  three experts described above.
* Added the commons media support to MediaWiki's default expert factory.

Change-Id: I09cd9f42ca1a22f11ff102a18e56321b451eed34
---
M ValueView/ValueView.resources.mw.php
M ValueView/ValueView.resources.php
A ValueView/resources/jquery.valueview/valueview.BifidExpert.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.CommonsMediaType.js
A ValueView/resources/jquery.valueview/valueview.experts/experts.StaticDom.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.SuggestedStringValue.js
M ValueView/resources/mw.ext.valueView.js
7 files changed, 424 insertions(+), 0 deletions(-)


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

diff --git a/ValueView/ValueView.resources.mw.php 
b/ValueView/ValueView.resources.mw.php
index 55227f3..8af3193 100644
--- a/ValueView/ValueView.resources.mw.php
+++ b/ValueView/ValueView.resources.mw.php
@@ -49,6 +49,7 @@
'dependencies' = array(
'jquery.valueview',
'jquery.valueview.experts.stringvalue',
+   'jquery.valueview.experts.commonsmediatype'
),
),
 
diff --git a/ValueView/ValueView.resources.php 
b/ValueView/ValueView.resources.php
index 9964c8c..f8c6032 100644
--- a/ValueView/ValueView.resources.php
+++ b/ValueView/ValueView.resources.php
@@ -143,6 +143,19 @@
'jquery.inputAutoExpand',
),
),
+
+   'jquery.valueview.experts.commonsmediatype' = $moduleTemplate 
+ array(
+   'scripts' = array(
+   'jquery.valueview/valueview.BifidExpert.js', // 
todo: define separate modules
+   
'jquery.valueview/valueview.experts/experts.StaticDom.js',
+   
'jquery.valueview/valueview.experts/experts.SuggestedStringValue.js',
+   
'jquery.valueview/valueview.experts/experts.CommonsMediaType.js',
+   ),
+   'dependencies' = array(
+   'jquery.valueview.experts.stringvalue',
+   'jquery.ui.suggester',
+   ),
+   ),
);
 
 } );
diff --git a/ValueView/resources/jquery.valueview/valueview.BifidExpert.js 
b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
new file mode 100644
index 000..04c0007
--- /dev/null
+++ b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
@@ -0,0 +1,167 @@
+/**
+ * @file
+ * @ingroup ValueView
+ * @licence GNU GPL v2+
+ * @author Daniel Werner  daniel.wer...@wikimedia.de 
+ */
+( function( dv, vp, $, vv ) {
+   'use strict';
+
+   var PARENT = vv.Expert;
+
+   /**
+* Abstract definition of a Valueview expert whose responsibilities are 
shared by two valueview
+* experts; one taking over during edit mode, one being responsible 
while in static mode.
+*
+* @since 0.1
+*
+* @abstract
+* @constructor
+* @extends jQuery.valueview.Expert
+*/
+   vv.BifidExpert = dv.util.inherit( PARENT, {
+   /**
+* Constructor for the valueview expert responsible during 
static mode.
+* @type Function
+*/
+   _staticExpert: null,
+
+   /**
+* Options map, the constructor of _staticExpert will be 
initialized with.
+*/
+   _staticExpertOptions: null,
+
+   /**
+* Constructor for the valueview expert responsible during edit 
mode.
+* @type Function
+*/
+   _editableExpert: null,
+
+   /**
+

[MediaWiki-commits] [Gerrit] renamed $wgOpenIDClientOnly; moved most important parameters... - change (mediawiki...OpenID)

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

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


Change subject: renamed $wgOpenIDClientOnly; moved most important parameters to 
top of OpenID.php
..

renamed $wgOpenIDClientOnly; moved most important parameters to top of 
OpenID.php

version 3.12 20130402

renamed $wgOpenIDClientOnly to $wgOpenIDClientAndAlsoProvider and
changed the logic accordingly

moved most important parameters to top of OpenID.php

Change-Id: If6e00410ff09d9e35a36bf1416731033bef12f5a
---
M CHANGES
M OpenID.hooks.php
M OpenID.php
M SpecialOpenIDDashboard.body.php
M SpecialOpenIDIdentifier.body.php
M SpecialOpenIDServer.body.php
M SpecialOpenIDXRDS.body.php
7 files changed, 45 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenID 
refs/changes/44/57044/7

diff --git a/CHANGES b/CHANGES
index c12bd87..497e475 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
 CHANGES
 ===
 
+3.12  20130402  breaking change renamed $wgOpenIDClientOnly to 
$wgOpenIDClientAndAlsoProvider
+and inverting its logic accordingly
 3.11  20130401  code cosmetics
 3.10  20130318  renamed $wgOpenIDOnly to $wgOpenIDLoginOnly
 3.09  20130318  hotfix typo $wgOpenIDOnlyClient vs. $wgOpenIDClientOnly
diff --git a/OpenID.hooks.php b/OpenID.hooks.php
index 43bf548..aafa5be 100644
--- a/OpenID.hooks.php
+++ b/OpenID.hooks.php
@@ -18,7 +18,7 @@
 
 class OpenIDHooks {
public static function onSpecialPage_initList( $list ) {
-   global $wgOpenIDLoginOnly, $wgOpenIDClientOnly, 
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
+   global $wgOpenIDLoginOnly, $wgOpenIDClientAndAlsoProvider, 
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
 
$wgOpenIDSmallLogoUrl = self::getOpenIDSmallLogoUrl();
 
@@ -33,7 +33,7 @@
# Special pages are added at global scope;
# remove server-related ones if client-only flag is set
$addList = array( 'Login', 'Convert', 'Dashboard', 'Identifier' 
);
-   if ( !$wgOpenIDClientOnly ) {
+   if ( $wgOpenIDClientAndAlsoProvider ) {
$addList[] = 'Server';
$addList[] = 'XRDS';
}
@@ -263,9 +263,9 @@
 */
public static function onGetPreferences( $user, $preferences ) {
global $wgOpenIDShowUrlOnUserPage, $wgHiddenPrefs,
-   $wgAuth, $wgUser, $wgLang, $wgOpenIDClientOnly;
+   $wgAuth, $wgUser, $wgLang, 
$wgOpenIDClientAndAlsoProvider;
 
-   if ( !$wgOpenIDClientOnly ) {
+   if ( $wgOpenIDClientAndAlsoProvider ) {
 
switch ( $wgOpenIDShowUrlOnUserPage ) {
 
@@ -337,7 +337,7 @@
'type' = 'hidden',
);
 
-   if ( !$wgOpenIDClientOnly ) {
+   if ( $wgOpenIDClientAndAlsoProvider ) {
 
$preferences['openid-your-openid'] =
array(
diff --git a/OpenID.php b/OpenID.php
index 875b428..8487f75 100644
--- a/OpenID.php
+++ b/OpenID.php
@@ -29,7 +29,7 @@
exit( 1 );
 }
 
-define( 'MEDIAWIKI_OPENID_VERSION', '3.11 20130401' );
+define( 'MEDIAWIKI_OPENID_VERSION', '3.12 20130402' );
 
 $path = dirname( __FILE__ );
 set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR . 
get_include_path() );
@@ -37,8 +37,31 @@
 # CONFIGURATION VARIABLES
 
 /**
- * Whether to hide the Login with OpenID link link; set to true if you 
already
- * have this link in your skin.
+ * Only allow login with OpenID.
+ * Default: true
+ */
+$wgOpenIDLoginOnly = true;
+
+/**
+ * If true, user accounts on this wiki can be used as OpenIDs on other
+ * sites. This is called OpenID Provider (or OpenID Server) mode.
+ *
+ * @deprecated $wgOpenIDClientOnly since E:OpenID v3.12. Use 
$wgOpenIDClientAndAlsoProvider with inverted logic instead
+ */
+$wgOpenIDClientAndAlsoProvider = true;
+
+/**
+ * If true, users can use their OpenID identity provided by this site A
+ * as OpenID for logins to other sites B
+ * even when users logged in on site A with OpenID.
+ *
+ * Some users might want to do that for vanity purposes or whatever.
+ */
+$wgOpenIDAllowServingOpenIDUserAccounts = true;
+
+/**
+ * Whether to hide the Login with OpenID link link:
+ * set to true if you already have this link in your skin.
  */
 $wgOpenIDHideOpenIDLoginLink = false;
 
@@ -49,8 +72,8 @@
 $wgOpenIDSmallLogoUrl = false;
 
 /**
- * Whether to show the OpenID identity URL on a user's home page. Possible
- * values are 'always', 'never' (default), or 'user'.
+ * Whether to show the OpenID identity URL on a user's home page.
+ * Possible values are 'always', 'never' (default), or 'user'.
  * 'user' lets the user decide in their preferences.
  */
 $wgOpenIDShowUrlOnUserPage = 'user';
@@ -188,38 +211,12

[MediaWiki-commits] [Gerrit] renamed $wgOpenIDClientOnly; moved most important parameters... - change (mediawiki...OpenID)

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

Change subject: renamed $wgOpenIDClientOnly; moved most important parameters to 
top of OpenID.php
..


renamed $wgOpenIDClientOnly; moved most important parameters to top of 
OpenID.php

version 3.12 20130402

renamed $wgOpenIDClientOnly to $wgOpenIDClientAndAlsoProvider and
changed the logic accordingly

moved most important parameters to top of OpenID.php

Change-Id: If6e00410ff09d9e35a36bf1416731033bef12f5a
---
M CHANGES
M OpenID.hooks.php
M OpenID.php
M SpecialOpenIDDashboard.body.php
M SpecialOpenIDIdentifier.body.php
M SpecialOpenIDServer.body.php
M SpecialOpenIDXRDS.body.php
7 files changed, 45 insertions(+), 46 deletions(-)

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



diff --git a/CHANGES b/CHANGES
index c12bd87..497e475 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
 CHANGES
 ===
 
+3.12  20130402  breaking change renamed $wgOpenIDClientOnly to 
$wgOpenIDClientAndAlsoProvider
+and inverting its logic accordingly
 3.11  20130401  code cosmetics
 3.10  20130318  renamed $wgOpenIDOnly to $wgOpenIDLoginOnly
 3.09  20130318  hotfix typo $wgOpenIDOnlyClient vs. $wgOpenIDClientOnly
diff --git a/OpenID.hooks.php b/OpenID.hooks.php
index 43bf548..aafa5be 100644
--- a/OpenID.hooks.php
+++ b/OpenID.hooks.php
@@ -18,7 +18,7 @@
 
 class OpenIDHooks {
public static function onSpecialPage_initList( $list ) {
-   global $wgOpenIDLoginOnly, $wgOpenIDClientOnly, 
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
+   global $wgOpenIDLoginOnly, $wgOpenIDClientAndAlsoProvider, 
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
 
$wgOpenIDSmallLogoUrl = self::getOpenIDSmallLogoUrl();
 
@@ -33,7 +33,7 @@
# Special pages are added at global scope;
# remove server-related ones if client-only flag is set
$addList = array( 'Login', 'Convert', 'Dashboard', 'Identifier' 
);
-   if ( !$wgOpenIDClientOnly ) {
+   if ( $wgOpenIDClientAndAlsoProvider ) {
$addList[] = 'Server';
$addList[] = 'XRDS';
}
@@ -263,9 +263,9 @@
 */
public static function onGetPreferences( $user, $preferences ) {
global $wgOpenIDShowUrlOnUserPage, $wgHiddenPrefs,
-   $wgAuth, $wgUser, $wgLang, $wgOpenIDClientOnly;
+   $wgAuth, $wgUser, $wgLang, 
$wgOpenIDClientAndAlsoProvider;
 
-   if ( !$wgOpenIDClientOnly ) {
+   if ( $wgOpenIDClientAndAlsoProvider ) {
 
switch ( $wgOpenIDShowUrlOnUserPage ) {
 
@@ -337,7 +337,7 @@
'type' = 'hidden',
);
 
-   if ( !$wgOpenIDClientOnly ) {
+   if ( $wgOpenIDClientAndAlsoProvider ) {
 
$preferences['openid-your-openid'] =
array(
diff --git a/OpenID.php b/OpenID.php
index 875b428..8487f75 100644
--- a/OpenID.php
+++ b/OpenID.php
@@ -29,7 +29,7 @@
exit( 1 );
 }
 
-define( 'MEDIAWIKI_OPENID_VERSION', '3.11 20130401' );
+define( 'MEDIAWIKI_OPENID_VERSION', '3.12 20130402' );
 
 $path = dirname( __FILE__ );
 set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR . 
get_include_path() );
@@ -37,8 +37,31 @@
 # CONFIGURATION VARIABLES
 
 /**
- * Whether to hide the Login with OpenID link link; set to true if you 
already
- * have this link in your skin.
+ * Only allow login with OpenID.
+ * Default: true
+ */
+$wgOpenIDLoginOnly = true;
+
+/**
+ * If true, user accounts on this wiki can be used as OpenIDs on other
+ * sites. This is called OpenID Provider (or OpenID Server) mode.
+ *
+ * @deprecated $wgOpenIDClientOnly since E:OpenID v3.12. Use 
$wgOpenIDClientAndAlsoProvider with inverted logic instead
+ */
+$wgOpenIDClientAndAlsoProvider = true;
+
+/**
+ * If true, users can use their OpenID identity provided by this site A
+ * as OpenID for logins to other sites B
+ * even when users logged in on site A with OpenID.
+ *
+ * Some users might want to do that for vanity purposes or whatever.
+ */
+$wgOpenIDAllowServingOpenIDUserAccounts = true;
+
+/**
+ * Whether to hide the Login with OpenID link link:
+ * set to true if you already have this link in your skin.
  */
 $wgOpenIDHideOpenIDLoginLink = false;
 
@@ -49,8 +72,8 @@
 $wgOpenIDSmallLogoUrl = false;
 
 /**
- * Whether to show the OpenID identity URL on a user's home page. Possible
- * values are 'always', 'never' (default), or 'user'.
+ * Whether to show the OpenID identity URL on a user's home page.
+ * Possible values are 'always', 'never' (default), or 'user'.
  * 'user' lets the user decide in their preferences.
  */
 $wgOpenIDShowUrlOnUserPage = 'user';
@@ -188,38 +211,12 @@
  */
 $wgOpenIDCookieExpiration = 365 * 24 * 60 * 60

[MediaWiki-commits] [Gerrit] (bug 45002) Using the new ValueView extension in Wikibase ... - change (mediawiki...Wikibase)

2013-04-02 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

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


Change subject: (bug 45002) Using the new ValueView extension in Wikibase now.
..

(bug 45002) Using the new ValueView extension in Wikibase now.

Some values might not yet be editable (depending on which change-set of 
ValueView is checked out)
but this change-set will make Wikibase compatible to the new jQuery.valueview.

Change-Id: I0dc23d3dd30ad7a17dfa8177626323ce9c5e6ad6
---
M lib/RELEASE-NOTES
M lib/WikibaseLib.php
M lib/resources/Resources.php
M 
lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
M lib/resources/wikibase.css
M repo/Wikibase.i18n.php
6 files changed, 13 insertions(+), 41 deletions(-)


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

diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES
index 80d6592..1b688e1 100644
--- a/lib/RELEASE-NOTES
+++ b/lib/RELEASE-NOTES
@@ -24,6 +24,7 @@
 ; Requirements
 
 * If experimental features are enabled, then this will depends on Ask 
extension now. See Extension page on mediawiki.org: 
https://www.mediawiki.org/wiki/Extension:Ask
+* Requires ValueView extension now which can be found in the DataValues 
GIT repo.
 
 
 === Version 0.3 ===
diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index a2f522c..5237e2c 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -62,6 +62,7 @@
'DataValues_VERSION' = 'DataValues',
'ValueParsers_VERSION' = 'ValueParsers',
'DataTypes_VERSION' = 'DataTypes',
+   'ValueView_VERSION' = 'ValueView',
 );
 
 foreach ( $dependencies as $constant = $name ) {
diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 49ed5f1..d49df6a 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -522,8 +522,7 @@
'jquery.nativeEventHandler',
'jquery.wikibase.entityselector',
'wikibase.datamodel',
-   'dataTypes.jquery.valueview.views',
-   'wikibase.jquery.valueview.views',
+   'mw.ext.valueView',
'wikibase.store', // required for getting 
datatype from entityselector selected property
'mediawiki.legacy.shared',
'jquery.ui.TemplatedWidget'
@@ -532,8 +531,6 @@
'wikibase-snakview-property-input-placeholder',
'wikibase-snakview-unsupportedsnaktype',
'wikibase-snakview-choosesnaktype',
-   
'wikibase-snakview-variation-unsupporteddatatype',
-   
'wikibase-snakview-variation-unsupporteddatavalue',

'wikibase-snakview-variation-datavaluetypemismatch',

'wikibase-snakview-variation-datavaluetypemismatch-details',

'wikibase-snakview-variation-nonewvaluefordeletedproperty',
@@ -643,7 +640,7 @@
'jquery.valueview.views/views.css',
),
'dependencies' = array(
-   'dataTypes.jquery.valueview',
+   'jquery.valueview',
'wikibase.parsers',
'jquery.eachchange',
'wikibase.utilities',
diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
 
b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
index 4028231..ab4271f 100644
--- 
a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
+++ 
b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
@@ -137,9 +137,9 @@
// can't check whether current 
valueview is most suitable for empty value if no
// indication for what kind of value 
(specified by the data type) is available
 ( dataType || newValue !== null )
-this._valueView.isMostSuitableFor( 
dataType || newValue )
) {
// display current Snak's data value in 
existing valueview:
+   this._valueView.option( 'on', dataType 
);
this._valueView.value( newValue );
} else {
// remove old view, create a new one or 
display message if unsupported data type
@@ -206,37 +206,13 @@
  

[MediaWiki-commits] [Gerrit] (bug 45002) made EntityId data values work with the new jQue... - change (mediawiki...Wikibase)

2013-04-02 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

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


Change subject: (bug 45002) made EntityId data values work with the new 
jQuery.valueview.
..

(bug 45002) made EntityId data values work with the new jQuery.valueview.

IMPORTANT DEPENDENCY: ValueView extension's 
I09cd9f42ca1a22f11ff102a18e56321b451eed34

There is one bigger todo left, which would be to make get/setRawValue of the 
EntityIdInput
expert more consistent; both should take and give the same kind of values.
This will be done in a follow-up though, the situation has not really become 
worse since
before this change-set.

Change-Id: Ic619890cc997e81a2c1f7839c8eb0d4cdffcf556
---
M lib/resources/Resources.php
A 
lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js
A 
lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdValue.js
A lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.js
D lib/resources/jquery.valueview.views/views.css
D lib/resources/jquery.valueview.views/wikibaseItem.js
6 files changed, 255 insertions(+), 187 deletions(-)


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

diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index d49df6a..54e851b 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -523,6 +523,7 @@
'jquery.wikibase.entityselector',
'wikibase.datamodel',
'mw.ext.valueView',
+   'jquery.valueview.experts.wikibase',
'wikibase.store', // required for getting 
datatype from entityselector selected property
'mediawiki.legacy.shared',
'jquery.ui.TemplatedWidget'
@@ -632,12 +633,11 @@
),
 
// jQuery.valueview views for Wikibase specific 
DataValues/DataTypes
-   'wikibase.jquery.valueview.views' = $moduleTemplate + array(
+   'jquery.valueview.experts.wikibase' = $moduleTemplate + array(
'scripts' = array(
-   'jquery.valueview.views/wikibaseItem.js',
-   ),
-   'styles' = array(
-   'jquery.valueview.views/views.css',
+   
'jquery.valueview.experts.wikibase/experts.wikibase.js',
+   
'jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js',
+   
'jquery.valueview.experts.wikibase/experts.wikibase.EntityIdValue.js',
),
'dependencies' = array(
'jquery.valueview',
diff --git 
a/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js
 
b/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js
new file mode 100644
index 000..fd5aa46
--- /dev/null
+++ 
b/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js
@@ -0,0 +1,146 @@
+/**
+ * @file
+ * @ingroup WikibaseLib
+ * @licence GNU GPL v2+
+ * @author Daniel Werner  daniel.wer...@wikimedia.de 
+ */
+( function( mw, wb, dv, vp, $, vv ) {
+   'use strict';
+
+   // temporarily define a hard coded prefix map until we get this from 
the server
+   var WB_ENTITIES_PREFIXMAP = {
+   'q': 'item',
+   'p': 'property'
+   };
+
+   var PARENT = vv.experts.StringValue;
+
+   /**
+* Valueview expert for wikibase.EntityId. This is a simple expert, 
only handling the input,
+* based on the StringValue input but with the 
jQuery.wikibase.entityselector for convenience.
+*
+* @since 0.4
+*
+* @constructor
+* @extends jQuery.valueview.experts.StringValue
+*/
+   vv.experts.wikibase.EntityIdInput = vv.expert( 'wikibaseentityidinput', 
PARENT, {
+   /**
+* @see Query.valueview.experts.StringValue._init
+*/
+   _init: function() {
+   PARENT.prototype._init.call( this );
+
+   var notifier = this._viewNotifier,
+   $input = this.$input;
+
+   $input
+   .entityselector( {
+   url: mw.util.wikiScript( 'api' ),
+   selectOnAutocomplete: true
+   } )
+   .eachchange( function( event, oldValue ) {
+   $( this ).data( 'entityselector' 
).repositionMenu();
+   } )
+   .on( 'entityselectorselect', function( e, ui ) {
+   var itemData 

[MediaWiki-commits] [Gerrit] Updated Ruby gems - change (mediawiki...MobileFrontend)

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

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


Change subject: Updated Ruby gems
..

Updated Ruby gems

Change-Id: If1b9067fee3ddec243fca32fe86a7a64c47c5ddc
---
M tests/acceptance/Gemfile.lock
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/tests/acceptance/Gemfile.lock b/tests/acceptance/Gemfile.lock
index 56c5aa8..3bf60c3 100644
--- a/tests/acceptance/Gemfile.lock
+++ b/tests/acceptance/Gemfile.lock
@@ -4,7 +4,7 @@
 builder (3.2.0)
 childprocess (0.3.9)
   ffi (~ 1.0, = 1.0.11)
-chunky_png (1.2.7)
+chunky_png (1.2.8)
 cucumber (1.2.3)
   builder (= 2.1.2)
   diff-lcs (= 1.1.3)
@@ -13,7 +13,7 @@
 data_magic (0.14)
   faker (= 1.1.2)
   yml_reader (= 0.2)
-diff-lcs (1.2.1)
+diff-lcs (1.2.2)
 faker (1.1.2)
   i18n (~ 0.5)
 ffi (1.6.0)
@@ -23,13 +23,13 @@
 json (1.7.7)
 multi_json (1.7.2)
 net-http-persistent (2.8)
-page-object (0.8.6.1)
+page-object (0.8.7)
   page_navigation (= 0.7)
   selenium-webdriver (= 2.31.0)
   watir-webdriver (= 0.6.2)
 page_navigation (0.7)
   data_magic (= 0.14)
-parallel (0.6.3)
+parallel (0.6.4)
 parallel_tests (0.10.4)
   parallel
 rake (10.0.4)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1b9067fee3ddec243fca32fe86a7a64c47c5ddc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] Add QueryData test - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: Add QueryData test
..

Add QueryData test

No idea why QueryData test went missing

Change-Id: Icc30036aec87c383077f846f4eb9ff408a9ce493
---
M SemanticMediaWiki.hooks.php
A tests/phpunit/includes/query/QueryDataTest.php
2 files changed, 218 insertions(+), 0 deletions(-)


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

diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php
index bf8bd30..fbb265a 100644
--- a/SemanticMediaWiki.hooks.php
+++ b/SemanticMediaWiki.hooks.php
@@ -294,6 +294,7 @@
'parserhooks/InfoParserFunction',
 
'query/QueryProcessor',
+   'query/QueryData',
 
'printers/ResultPrinters',
 
diff --git a/tests/phpunit/includes/query/QueryDataTest.php 
b/tests/phpunit/includes/query/QueryDataTest.php
new file mode 100644
index 000..191ddf9
--- /dev/null
+++ b/tests/phpunit/includes/query/QueryDataTest.php
@@ -0,0 +1,217 @@
+?php
+
+namespace SMW\Test;
+
+use SMW\QueryProcessor;
+use SMW\QueryData;
+
+use SMWDIProperty;
+use SMWDIBlob;
+use SMWDINumber;
+use SMWDataItem;
+use SMWDataValueFactory;
+use Title;
+
+
+/**
+ * Tests for the SMW\QueryData class
+ *
+ * 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
+ * @since 1.9
+ *
+ * @ingroup SMW
+ * @ingroup Test
+ *
+ * @group SMW
+ * @group SMWExtension
+ *
+ * @licence GNU GPL v2+
+ * @author mwjames
+ */
+class QueryDataTest extends \MediaWikiTestCase {
+
+   /**
+* DataProvider
+*
+* @return array
+*/
+   public function getDataProvider() {
+   return array(
+
+   // {{#ask: [[Modification date::+]]
+   // |?Modification date
+   // |format=list
+   // }}
+   array(
+   'Foo',
+   array(
+   '',
+   '[[Modification date::+]]',
+   '?Modification date',
+   'format=list'
+   ),
+   array(
+   'result' = false,
+   'queryCount' = 4,
+   'queryKey' = array( '_ASKST', 
'_ASKSI', '_ASKDE', '_ASKFO' ),
+   'queryValue' = array( 'list', 1, 1, 
'[[Modification date::+]]' )
+   )
+   ),
+
+   // {{#ask: [[Modification date::+]][[Category:Foo]]
+   // |?Modification date
+   // |?Has title
+   // |format=list
+   // }}
+   array(
+   'Foo',
+   array(
+   '',
+   '[[Modification 
date::+]][[Category:Foo]]',
+   '?Modification date',
+   '?Has title',
+   'format=list'
+   ),
+   array(
+   'result' = false,
+   'queryCount' = 4,
+   'queryKey' = array( '_ASKST', 
'_ASKSI', '_ASKDE', '_ASKFO' ),
+   'queryValue' = array( 'list', 2, 1, 
'[[Modification date::+]] [[Category:Foo]]' )
+   )
+   ),
+
+   // Unknown format, default table
+
+   // {{#ask: [[Modification date::+]][[Category:Foo]]
+   // |?Modification date
+   // |?Has title
+   // |format=bar
+   // }}
+   array(
+  

[MediaWiki-commits] [Gerrit] Updated Ruby gems - change (qa/browsertests)

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

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


Change subject: Updated Ruby gems
..

Updated Ruby gems

Change-Id: If7bfc514b22f92293e3b9e427f2ac85f6dcceeb4
---
M Gemfile.lock
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/56/57056/1

diff --git a/Gemfile.lock b/Gemfile.lock
index 34e9b4a..51a15ca 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -4,7 +4,7 @@
 builder (3.2.0)
 childprocess (0.3.9)
   ffi (~ 1.0, = 1.0.11)
-chunky_png (1.2.7)
+chunky_png (1.2.8)
 cucumber (1.2.3)
   builder (= 2.1.2)
   diff-lcs (= 1.1.3)
@@ -13,7 +13,7 @@
 data_magic (0.14)
   faker (= 1.1.2)
   yml_reader (= 0.2)
-diff-lcs (1.2.1)
+diff-lcs (1.2.2)
 faker (1.1.2)
   i18n (~ 0.5)
 ffi (1.6.0)
@@ -26,13 +26,13 @@
 json (1.7.7)
 multi_json (1.7.2)
 net-http-persistent (2.8)
-page-object (0.8.6.1)
+page-object (0.8.7)
   page_navigation (= 0.7)
   selenium-webdriver (= 2.31.0)
   watir-webdriver (= 0.6.2)
 page_navigation (0.7)
   data_magic (= 0.14)
-parallel (0.6.3)
+parallel (0.6.4)
 parallel_tests (0.10.4)
   parallel
 rake (10.0.4)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7bfc514b22f92293e3b9e427f2ac85f6dcceeb4
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] chg $wgOpenIDClientAndAlsoProvider to $wgOpenIDConsumerAndAl... - change (mediawiki...OpenID)

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

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


Change subject: chg $wgOpenIDClientAndAlsoProvider to 
$wgOpenIDConsumerAndAlsoProvider
..

chg $wgOpenIDClientAndAlsoProvider to $wgOpenIDConsumerAndAlsoProvider

Change-Id: Iaa835b463ecf50f8f3bedf778a6a3c18f5c7f5e5
---
M CHANGES
M OpenID.hooks.php
M OpenID.php
M SpecialOpenIDDashboard.body.php
M SpecialOpenIDIdentifier.body.php
M SpecialOpenIDServer.body.php
M SpecialOpenIDXRDS.body.php
7 files changed, 18 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenID 
refs/changes/57/57057/1

diff --git a/CHANGES b/CHANGES
index 497e475..42b933b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,7 @@
 CHANGES
 ===
 
-3.12  20130402  breaking change renamed $wgOpenIDClientOnly to 
$wgOpenIDClientAndAlsoProvider
+3.12  20130402  breaking change renamed $wgOpenIDClientOnly to 
$wgOpenIDConsumerAndAlsoProvider
 and inverting its logic accordingly
 3.11  20130401  code cosmetics
 3.10  20130318  renamed $wgOpenIDOnly to $wgOpenIDLoginOnly
diff --git a/OpenID.hooks.php b/OpenID.hooks.php
index aafa5be..1bc9610 100644
--- a/OpenID.hooks.php
+++ b/OpenID.hooks.php
@@ -18,7 +18,7 @@
 
 class OpenIDHooks {
public static function onSpecialPage_initList( $list ) {
-   global $wgOpenIDLoginOnly, $wgOpenIDClientAndAlsoProvider, 
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
+   global $wgOpenIDLoginOnly, $wgOpenIDConsumerAndAlsoProvider, 
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
 
$wgOpenIDSmallLogoUrl = self::getOpenIDSmallLogoUrl();
 
@@ -33,7 +33,7 @@
# Special pages are added at global scope;
# remove server-related ones if client-only flag is set
$addList = array( 'Login', 'Convert', 'Dashboard', 'Identifier' 
);
-   if ( $wgOpenIDClientAndAlsoProvider ) {
+   if ( $wgOpenIDConsumerAndAlsoProvider ) {
$addList[] = 'Server';
$addList[] = 'XRDS';
}
@@ -263,9 +263,9 @@
 */
public static function onGetPreferences( $user, $preferences ) {
global $wgOpenIDShowUrlOnUserPage, $wgHiddenPrefs,
-   $wgAuth, $wgUser, $wgLang, 
$wgOpenIDClientAndAlsoProvider;
+   $wgAuth, $wgUser, $wgLang, 
$wgOpenIDConsumerAndAlsoProvider;
 
-   if ( $wgOpenIDClientAndAlsoProvider ) {
+   if ( $wgOpenIDConsumerAndAlsoProvider ) {
 
switch ( $wgOpenIDShowUrlOnUserPage ) {
 
@@ -337,7 +337,7 @@
'type' = 'hidden',
);
 
-   if ( $wgOpenIDClientAndAlsoProvider ) {
+   if ( $wgOpenIDConsumerAndAlsoProvider ) {
 
$preferences['openid-your-openid'] =
array(
diff --git a/OpenID.php b/OpenID.php
index 8487f75..38db058 100644
--- a/OpenID.php
+++ b/OpenID.php
@@ -46,9 +46,9 @@
  * If true, user accounts on this wiki can be used as OpenIDs on other
  * sites. This is called OpenID Provider (or OpenID Server) mode.
  *
- * @deprecated $wgOpenIDClientOnly since E:OpenID v3.12. Use 
$wgOpenIDClientAndAlsoProvider with inverted logic instead
+ * @deprecated $wgOpenIDClientOnly since E:OpenID v3.12. Use 
$wgOpenIDConsumerAndAlsoProvider with inverted logic instead
  */
-$wgOpenIDClientAndAlsoProvider = true;
+$wgOpenIDConsumerAndAlsoProvider = true;
 
 /**
  * If true, users can use their OpenID identity provided by this site A
diff --git a/SpecialOpenIDDashboard.body.php b/SpecialOpenIDDashboard.body.php
index 23239ed..4fcb7fd 100644
--- a/SpecialOpenIDDashboard.body.php
+++ b/SpecialOpenIDDashboard.body.php
@@ -68,7 +68,7 @@
global $wgOpenIDProposeUsernameFromSREG;
global $wgOpenIDAllowAutomaticUsername;
global $wgOpenIDLoginOnly;
-   global $wgOpenIDClientAndAlsoProvider;
+   global $wgOpenIDConsumerAndAlsoProvider;
global $wgOpenIDAllowServingOpenIDUserAccounts;
global $wgOpenIDShowProviderIcons;
 
@@ -94,7 +94,7 @@
$out  = $this-show( 'OpenID ' . wfMessage( 
'version-software-version' )-text(), MEDIAWIKI_OPENID_VERSION );
$out .= $this-show( 'MediaWiki ' . wfMessage( 
'version-software-version' )-text(), SpecialVersion::getVersion() );
$out .= $this-show( '$wgOpenIDLoginOnly', $wgOpenIDLoginOnly );
-   $out .= $this-show( '$wgOpenIDClientAndAlsoProvider', 
$wgOpenIDClientAndProviderMode );
+   $out .= $this-show( '$wgOpenIDConsumerAndAlsoProvider', 
$wgOpenIDClientAndProviderMode );
$out .= $this-show( '$wgOpenIDAllowServingOpenIDUserAccounts', 
$wgOpenIDAllowServingOpenIDUserAccounts );
$out

[MediaWiki-commits] [Gerrit] chg $wgOpenIDClientAndAlsoProvider to $wgOpenIDConsumerAndAl... - change (mediawiki...OpenID)

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

Change subject: chg $wgOpenIDClientAndAlsoProvider to 
$wgOpenIDConsumerAndAlsoProvider
..


chg $wgOpenIDClientAndAlsoProvider to $wgOpenIDConsumerAndAlsoProvider

Change-Id: Iaa835b463ecf50f8f3bedf778a6a3c18f5c7f5e5
---
M CHANGES
M OpenID.hooks.php
M OpenID.php
M SpecialOpenIDDashboard.body.php
M SpecialOpenIDIdentifier.body.php
M SpecialOpenIDServer.body.php
M SpecialOpenIDXRDS.body.php
7 files changed, 18 insertions(+), 18 deletions(-)

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



diff --git a/CHANGES b/CHANGES
index 497e475..42b933b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,7 @@
 CHANGES
 ===
 
-3.12  20130402  breaking change renamed $wgOpenIDClientOnly to 
$wgOpenIDClientAndAlsoProvider
+3.12  20130402  breaking change renamed $wgOpenIDClientOnly to 
$wgOpenIDConsumerAndAlsoProvider
 and inverting its logic accordingly
 3.11  20130401  code cosmetics
 3.10  20130318  renamed $wgOpenIDOnly to $wgOpenIDLoginOnly
diff --git a/OpenID.hooks.php b/OpenID.hooks.php
index aafa5be..1bc9610 100644
--- a/OpenID.hooks.php
+++ b/OpenID.hooks.php
@@ -18,7 +18,7 @@
 
 class OpenIDHooks {
public static function onSpecialPage_initList( $list ) {
-   global $wgOpenIDLoginOnly, $wgOpenIDClientAndAlsoProvider, 
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
+   global $wgOpenIDLoginOnly, $wgOpenIDConsumerAndAlsoProvider, 
$wgSpecialPageGroups, $wgOpenIDSmallLogoUrl;
 
$wgOpenIDSmallLogoUrl = self::getOpenIDSmallLogoUrl();
 
@@ -33,7 +33,7 @@
# Special pages are added at global scope;
# remove server-related ones if client-only flag is set
$addList = array( 'Login', 'Convert', 'Dashboard', 'Identifier' 
);
-   if ( $wgOpenIDClientAndAlsoProvider ) {
+   if ( $wgOpenIDConsumerAndAlsoProvider ) {
$addList[] = 'Server';
$addList[] = 'XRDS';
}
@@ -263,9 +263,9 @@
 */
public static function onGetPreferences( $user, $preferences ) {
global $wgOpenIDShowUrlOnUserPage, $wgHiddenPrefs,
-   $wgAuth, $wgUser, $wgLang, 
$wgOpenIDClientAndAlsoProvider;
+   $wgAuth, $wgUser, $wgLang, 
$wgOpenIDConsumerAndAlsoProvider;
 
-   if ( $wgOpenIDClientAndAlsoProvider ) {
+   if ( $wgOpenIDConsumerAndAlsoProvider ) {
 
switch ( $wgOpenIDShowUrlOnUserPage ) {
 
@@ -337,7 +337,7 @@
'type' = 'hidden',
);
 
-   if ( $wgOpenIDClientAndAlsoProvider ) {
+   if ( $wgOpenIDConsumerAndAlsoProvider ) {
 
$preferences['openid-your-openid'] =
array(
diff --git a/OpenID.php b/OpenID.php
index 8487f75..38db058 100644
--- a/OpenID.php
+++ b/OpenID.php
@@ -46,9 +46,9 @@
  * If true, user accounts on this wiki can be used as OpenIDs on other
  * sites. This is called OpenID Provider (or OpenID Server) mode.
  *
- * @deprecated $wgOpenIDClientOnly since E:OpenID v3.12. Use 
$wgOpenIDClientAndAlsoProvider with inverted logic instead
+ * @deprecated $wgOpenIDClientOnly since E:OpenID v3.12. Use 
$wgOpenIDConsumerAndAlsoProvider with inverted logic instead
  */
-$wgOpenIDClientAndAlsoProvider = true;
+$wgOpenIDConsumerAndAlsoProvider = true;
 
 /**
  * If true, users can use their OpenID identity provided by this site A
diff --git a/SpecialOpenIDDashboard.body.php b/SpecialOpenIDDashboard.body.php
index 23239ed..4fcb7fd 100644
--- a/SpecialOpenIDDashboard.body.php
+++ b/SpecialOpenIDDashboard.body.php
@@ -68,7 +68,7 @@
global $wgOpenIDProposeUsernameFromSREG;
global $wgOpenIDAllowAutomaticUsername;
global $wgOpenIDLoginOnly;
-   global $wgOpenIDClientAndAlsoProvider;
+   global $wgOpenIDConsumerAndAlsoProvider;
global $wgOpenIDAllowServingOpenIDUserAccounts;
global $wgOpenIDShowProviderIcons;
 
@@ -94,7 +94,7 @@
$out  = $this-show( 'OpenID ' . wfMessage( 
'version-software-version' )-text(), MEDIAWIKI_OPENID_VERSION );
$out .= $this-show( 'MediaWiki ' . wfMessage( 
'version-software-version' )-text(), SpecialVersion::getVersion() );
$out .= $this-show( '$wgOpenIDLoginOnly', $wgOpenIDLoginOnly );
-   $out .= $this-show( '$wgOpenIDClientAndAlsoProvider', 
$wgOpenIDClientAndProviderMode );
+   $out .= $this-show( '$wgOpenIDConsumerAndAlsoProvider', 
$wgOpenIDClientAndProviderMode );
$out .= $this-show( '$wgOpenIDAllowServingOpenIDUserAccounts', 
$wgOpenIDAllowServingOpenIDUserAccounts );
$out .= $this-show( '$wgOpenIDTrustEmailAddress

[MediaWiki-commits] [Gerrit] Add QueryData test - change (mediawiki...SemanticMediaWiki)

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

Change subject: Add QueryData test
..


Add QueryData test

No idea why QueryData test went missing

Change-Id: Icc30036aec87c383077f846f4eb9ff408a9ce493
---
M SemanticMediaWiki.hooks.php
A tests/phpunit/includes/query/QueryDataTest.php
2 files changed, 218 insertions(+), 0 deletions(-)

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



diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php
index bf8bd30..fbb265a 100644
--- a/SemanticMediaWiki.hooks.php
+++ b/SemanticMediaWiki.hooks.php
@@ -294,6 +294,7 @@
'parserhooks/InfoParserFunction',
 
'query/QueryProcessor',
+   'query/QueryData',
 
'printers/ResultPrinters',
 
diff --git a/tests/phpunit/includes/query/QueryDataTest.php 
b/tests/phpunit/includes/query/QueryDataTest.php
new file mode 100644
index 000..191ddf9
--- /dev/null
+++ b/tests/phpunit/includes/query/QueryDataTest.php
@@ -0,0 +1,217 @@
+?php
+
+namespace SMW\Test;
+
+use SMW\QueryProcessor;
+use SMW\QueryData;
+
+use SMWDIProperty;
+use SMWDIBlob;
+use SMWDINumber;
+use SMWDataItem;
+use SMWDataValueFactory;
+use Title;
+
+
+/**
+ * Tests for the SMW\QueryData class
+ *
+ * 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
+ * @since 1.9
+ *
+ * @ingroup SMW
+ * @ingroup Test
+ *
+ * @group SMW
+ * @group SMWExtension
+ *
+ * @licence GNU GPL v2+
+ * @author mwjames
+ */
+class QueryDataTest extends \MediaWikiTestCase {
+
+   /**
+* DataProvider
+*
+* @return array
+*/
+   public function getDataProvider() {
+   return array(
+
+   // {{#ask: [[Modification date::+]]
+   // |?Modification date
+   // |format=list
+   // }}
+   array(
+   'Foo',
+   array(
+   '',
+   '[[Modification date::+]]',
+   '?Modification date',
+   'format=list'
+   ),
+   array(
+   'result' = false,
+   'queryCount' = 4,
+   'queryKey' = array( '_ASKST', 
'_ASKSI', '_ASKDE', '_ASKFO' ),
+   'queryValue' = array( 'list', 1, 1, 
'[[Modification date::+]]' )
+   )
+   ),
+
+   // {{#ask: [[Modification date::+]][[Category:Foo]]
+   // |?Modification date
+   // |?Has title
+   // |format=list
+   // }}
+   array(
+   'Foo',
+   array(
+   '',
+   '[[Modification 
date::+]][[Category:Foo]]',
+   '?Modification date',
+   '?Has title',
+   'format=list'
+   ),
+   array(
+   'result' = false,
+   'queryCount' = 4,
+   'queryKey' = array( '_ASKST', 
'_ASKSI', '_ASKDE', '_ASKFO' ),
+   'queryValue' = array( 'list', 2, 1, 
'[[Modification date::+]] [[Category:Foo]]' )
+   )
+   ),
+
+   // Unknown format, default table
+
+   // {{#ask: [[Modification date::+]][[Category:Foo]]
+   // |?Modification date
+   // |?Has title
+   // |format=bar
+   // }}
+   array(
+   'Foo',
+   

[MediaWiki-commits] [Gerrit] Add non-breaking space between language and icon - change (mediawiki...Translate)

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

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


Change subject: Add non-breaking space between language and icon
..

Add non-breaking space between language and icon

Bug: 46738
Change-Id: Ia3156cf699f7f6fad8268eb1eb03a415554c6ef4
---
M tag/PageTranslationHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index 9ee67d0..46801ca 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -290,7 +290,7 @@
$name = Linker::link( $specialTranslateTitle, 
$name, $attribs, $params );
}
 
-   $languages[] = $name $percentImage;
+   $languages[] = $name#160;$percentImage;
}
 
// dirmark (rlm/lrm) is added, because languages with RTL names 
can

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3156cf699f7f6fad8268eb1eb03a415554c6ef4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
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] Update PHPDoc - change (mediawiki...Translate)

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

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


Change subject: Update PHPDoc
..

Update PHPDoc

Change-Id: I89407c090d60e929d58e32acd764b062269018f4
---
M specials/SpecialMagic.php
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/specials/SpecialMagic.php b/specials/SpecialMagic.php
index 6380096..7cc82a2 100644
--- a/specials/SpecialMagic.php
+++ b/specials/SpecialMagic.php
@@ -16,7 +16,6 @@
  * @ingroup SpecialPage TranslateSpecialPage
  */
 class SpecialMagic extends SpecialPage {
-
const MODULE_MAGIC = 'words';
const MODULE_SPECIAL = 'special';
const MODULE_NAMESPACE = 'namespace';
@@ -84,8 +83,8 @@
/**
 * Helper function get module selector.
 *
-* @param $selectedId \string Which value should be selected by default
-* @return \string HTML5-compatible select-element.
+* @param string $selectedId Which value should be selected by default
+* @return string HTML5-compatible select-element.
 */
protected function moduleSelector( $selectedId ) {
// Give grep a chance to find the usages:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89407c090d60e929d58e32acd764b062269018f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
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] New hook EnterMobileMode - change (mediawiki...MobileFrontend)

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

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


Change subject: New hook EnterMobileMode
..

New hook EnterMobileMode

Informs other extensions that we're going to have a mobile page view

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


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

diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index b5e3425..66f1e0e 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -226,6 +226,9 @@
return $this-mobileView;
}
$this-mobileView = $this-shouldDisplayMobileViewInternal();
+   if ( $this-mobileView ) {
+   wfRunHooks( 'EnterMobileMode', array( $this ) );
+   }
return $this-mobileView;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40734cfec8b7c955efe2e63586546f0784086f5c
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


[MediaWiki-commits] [Gerrit] Unified default lang redirect from m. zero. Adding three c... - change (operations/puppet)

2013-04-02 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Unified default lang redirect from m.  zero. Adding three 
carriers for testing, too.
..


Unified default lang redirect from m.  zero. Adding three carriers for 
testing, too.

* Default language for the carrier is now set in one location
* XL Indonesia is changed to id default language
* Old code did NOT redirect unknown carrier zero.wiki to en.zero.wiki. Now 
redirecting.
* Refactored to support default relative redirect path for direct zero. and m. 
access from partners.
* All partner direct access to zero. and m. going to default (language options 
selection page).
* Adding three additional carriers for testing.

Change-Id: Ifda2dcabaa08f5df7b22b3b1d726f21882bbca36
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 81 insertions(+), 46 deletions(-)

Approvals:
  Mark Bergsma: Looks good to me, approved
  Asher: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 04b0795..47916b4 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -313,6 +313,27 @@
89.188.224.136/29;
 }
 
+acl carrier_vimpelcom_mobilink_pakistan {
+   119.160.125.0/27;
+   119.160.126.97/28;
+   119.160.126.129/25;
+}
+
+acl carrier_orange_meditel_morocco {
+   41.92.0.0/18;
+   41.92.64.0/19;
+   41.214.192.0/18;
+   197.153.0.0/16;
+   197.247.0.0/16;
+}
+
+acl carrier_central_african_republic {
+   41.223.184.1/32;
+   41.223.184.2/31;
+   41.223.184.148/30;
+   41.223.184.152/30;
+}
+
 # for test.* routing, FIXME
 backend test_wikipedia {
.host = srv193.pmtpa.wmnet;
@@ -335,11 +356,23 @@
set req.http.X-Subdomain = M;
}
 
+   // go to english by default
+   set req.http.X-DfltLang = en;
+   set req.http.X-DfltPage = /wiki/Special:ZeroRatedMobileAccess;
+
/* Please keep this list alphabetized by the ACL variable */
if (client.ip ~ carrier_celcom_malaysia) {
if (req.http.X-Subdomain == ZERO) {
set req.http.X-Carrier = Celcom Malaysia;
set req.http.X-CS = 502-13;
+   }
+   } else if (client.ip ~ carrier_central_african_republic) {
+   set req.http.X-DfltLang = fr;
+   if (req.http.X-Subdomain == M) {
+   if (req.http.host ~ 
(^(fr|ar|sg|en|es|zh|ar|ha|ln|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) {
+   set req.http.X-Carrier = Orange Central 
African Republic;
+   set req.http.X-CS = 623-01;
+   }
}
} else if (client.ip ~ carrier_dialog_sri_lanka) {
if (req.http.X-Subdomain == ZERO) {
@@ -354,11 +387,13 @@
}
}
} else if (client.ip ~ carrier_dtac) {
+   set req.http.X-DfltLang = th;
if (req.http.X-Subdomain == ZERO) {
set req.http.X-Carrier = DTAC;
set req.http.X-CS = 520-18;
}
} else if (client.ip ~ carrier_grameenphone_bangladesh) {
+   set req.http.X-DfltLang = bn;
if (req.http.X-Subdomain == ZERO) {
if (req.http.host ~ 
(^(bn)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org) {
set req.http.X-Carrier = Grameenphone 
Bangladesh;
@@ -376,6 +411,7 @@
set req.http.X-CS = 652-02;
}
} else if (client.ip ~ carrier_orange_cameroon) {
+   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
if (req.http.host ~ 
(^(fr|en|es|de|zh|ar|ha|ln|yo|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) {
set req.http.X-Carrier = Orange Cameroon;
@@ -383,11 +419,13 @@
}
}
} else if (client.ip ~ carrier_orange_congo) {
+   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
set req.http.X-Carrier = Orange Congo;
set req.http.X-CS = 630-86;
}
} else if (client.ip ~ carrier_orange_ivory_coast) {
+   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
set req.http.X-Carrier = Orange Ivory Coast;
set req.http.X-CS = 612-03;
@@ -397,12 +435,22 @@
set req.http.X-Carrier = Orange Kenya;
set req.http.X-CS = 639-07;
}
+   } else if (client.ip ~ carrier_orange_meditel_morocco) {
+   set req.http.X-DfltLang =  fr;
+  

[MediaWiki-commits] [Gerrit] Revert Unified default lang redirect from m. zero. Adding... - change (operations/puppet)

2013-04-02 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Revert Unified default lang redirect from m.  zero. Adding 
three carriers for testing, too.
..


Revert Unified default lang redirect from m.  zero. Adding three carriers for 
testing, too.

VCL syntax error

This reverts commit 873b49eb17fceca21c418517c2f03bb02585f1c5

Change-Id: I750750a52cfe48a1916d1a2b997b85876cae3ddd
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 46 insertions(+), 81 deletions(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 47916b4..04b0795 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -313,27 +313,6 @@
89.188.224.136/29;
 }
 
-acl carrier_vimpelcom_mobilink_pakistan {
-   119.160.125.0/27;
-   119.160.126.97/28;
-   119.160.126.129/25;
-}
-
-acl carrier_orange_meditel_morocco {
-   41.92.0.0/18;
-   41.92.64.0/19;
-   41.214.192.0/18;
-   197.153.0.0/16;
-   197.247.0.0/16;
-}
-
-acl carrier_central_african_republic {
-   41.223.184.1/32;
-   41.223.184.2/31;
-   41.223.184.148/30;
-   41.223.184.152/30;
-}
-
 # for test.* routing, FIXME
 backend test_wikipedia {
.host = srv193.pmtpa.wmnet;
@@ -356,23 +335,11 @@
set req.http.X-Subdomain = M;
}
 
-   // go to english by default
-   set req.http.X-DfltLang = en;
-   set req.http.X-DfltPage = /wiki/Special:ZeroRatedMobileAccess;
-
/* Please keep this list alphabetized by the ACL variable */
if (client.ip ~ carrier_celcom_malaysia) {
if (req.http.X-Subdomain == ZERO) {
set req.http.X-Carrier = Celcom Malaysia;
set req.http.X-CS = 502-13;
-   }
-   } else if (client.ip ~ carrier_central_african_republic) {
-   set req.http.X-DfltLang = fr;
-   if (req.http.X-Subdomain == M) {
-   if (req.http.host ~ 
(^(fr|ar|sg|en|es|zh|ar|ha|ln|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) {
-   set req.http.X-Carrier = Orange Central 
African Republic;
-   set req.http.X-CS = 623-01;
-   }
}
} else if (client.ip ~ carrier_dialog_sri_lanka) {
if (req.http.X-Subdomain == ZERO) {
@@ -387,13 +354,11 @@
}
}
} else if (client.ip ~ carrier_dtac) {
-   set req.http.X-DfltLang = th;
if (req.http.X-Subdomain == ZERO) {
set req.http.X-Carrier = DTAC;
set req.http.X-CS = 520-18;
}
} else if (client.ip ~ carrier_grameenphone_bangladesh) {
-   set req.http.X-DfltLang = bn;
if (req.http.X-Subdomain == ZERO) {
if (req.http.host ~ 
(^(bn)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org) {
set req.http.X-Carrier = Grameenphone 
Bangladesh;
@@ -411,7 +376,6 @@
set req.http.X-CS = 652-02;
}
} else if (client.ip ~ carrier_orange_cameroon) {
-   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
if (req.http.host ~ 
(^(fr|en|es|de|zh|ar|ha|ln|yo|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) {
set req.http.X-Carrier = Orange Cameroon;
@@ -419,13 +383,11 @@
}
}
} else if (client.ip ~ carrier_orange_congo) {
-   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
set req.http.X-Carrier = Orange Congo;
set req.http.X-CS = 630-86;
}
} else if (client.ip ~ carrier_orange_ivory_coast) {
-   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
set req.http.X-Carrier = Orange Ivory Coast;
set req.http.X-CS = 612-03;
@@ -435,22 +397,12 @@
set req.http.X-Carrier = Orange Kenya;
set req.http.X-CS = 639-07;
}
-   } else if (client.ip ~ carrier_orange_meditel_morocco) {
-   set req.http.X-DfltLang =  fr;
-   if (req.http.X-Subdomain == M) {
-   if (req.http.host ~ 
(^(fr|ar|en|es|de|it|nl|pt|ru|zh)\.m|^m)\.([a-zA-Z0-9-]+)\.org) {
-   set req.http.X-Carrier = Orange Meditel 
Morocco;
-   set req.http.X-CS = 604-00;
-   }
-   }
} else if (client.ip ~ carrier_orange_niger) {
-   set 

[MediaWiki-commits] [Gerrit] Do not normalise magic words - change (mediawiki...Translate)

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

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


Change subject: Do not normalise magic words
..

Do not normalise magic words

This is a bit unfortunate, because of existing legacy. I'd rather leave
the current behavior in place, but it increases chances of unintended
breakage.

Bug: 46614
Bug: 46613
Change-Id: I8f1442e1f44f6f617f33dcb7b029596744a5644d
---
M ffs/MediaWikiComplexMessages.php
1 file changed, 14 insertions(+), 3 deletions(-)


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

diff --git a/ffs/MediaWikiComplexMessages.php b/ffs/MediaWikiComplexMessages.php
index 718fd02..8a4afde 100644
--- a/ffs/MediaWikiComplexMessages.php
+++ b/ffs/MediaWikiComplexMessages.php
@@ -14,7 +14,6 @@
  * @todo Needs documentation.
  */
 abstract class ComplexMessages {
-
const LANG_MASTER = 0;
const LANG_CHAIN = 1;
const LANG_CURRENT = 2;
@@ -343,15 +342,27 @@
return $this-databaseMsg . '/' . $this-language;
}
 
+   /**
+* @param WebRequest $request
+* @return string
+*/
function formatForSave( $request ) {
$text = '';
+
+   // Do not replace spaces by underscores for magic words. See 
bug 46613
+   $replaceSpace = $request-getVal( 'module') !== 'magic';
+
foreach ( array_keys( $this-data ) as $group ) {
foreach ( $this-getIterator( $group ) as $key ) {
$data = $request-getText( 
$this-getKeyForEdit( $key ) );
// Make a nice array out of the submit with 
trimmed values.
$data = array_map( 'trim', explode( ',', $data 
) );
-   // Normalise: Replace spaces with underscores.
-   $data = str_replace( ' ', '_', $data );
+
+   if( $replaceSpace ) {
+   // Normalise: Replace spaces with 
underscores.
+   $data = str_replace( ' ', '_', $data );
+   }
+
// Create final format.
$data = implode( ', ', $data );
if ( $data !== '' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f1442e1f44f6f617f33dcb7b029596744a5644d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
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] Unified default lang redirect from m. zero. Adding three c... - change (operations/puppet)

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

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


Change subject: Unified default lang redirect from m.  zero. Adding three 
carriers for testing, too.
..

Unified default lang redirect from m.  zero. Adding three carriers for 
testing, too.

This is a compile fix for Change-Id: Ifda2dcabaa08f5df7b22b3b1d726f21882bbca36

* Default language for the carrier is now set in one location
* XL Indonesia is changed to id default language
* Old code did NOT redirect unknown carrier zero.wiki to en.zero.wiki. Now 
redirecting.
* Refactored to support default relative redirect path for direct zero. and m. 
access from partners.
* All partner direct access to zero. and m. going to default (language options 
selection page).
* Adding three additional carriers for testing.

Change-Id: I8fb36d26d437ad21f240820d8a949543fc6577e6
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 81 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/57063/1

diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index a4e1bdc..228662d 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -313,6 +313,27 @@
89.188.224.136/29;
 }
 
+acl carrier_vimpelcom_mobilink_pakistan {
+   119.160.125.0/27;
+   119.160.126.97/28;
+   119.160.126.129/25;
+}
+
+acl carrier_orange_meditel_morocco {
+   41.92.0.0/18;
+   41.92.64.0/19;
+   41.214.192.0/18;
+   197.153.0.0/16;
+   197.247.0.0/16;
+}
+
+acl carrier_central_african_republic {
+   41.223.184.1/32;
+   41.223.184.2/31;
+   41.223.184.148/30;
+   41.223.184.152/30;
+}
+
 # for test.* routing, FIXME
 backend test_wikipedia {
.host = srv193.pmtpa.wmnet;
@@ -335,11 +356,23 @@
set req.http.X-Subdomain = M;
}
 
+   // go to english by default
+   set req.http.X-DfltLang = en;
+   set req.http.X-DfltPage = /wiki/Special:ZeroRatedMobileAccess;
+
/* Please keep this list alphabetized by the ACL variable */
if (client.ip ~ carrier_celcom_malaysia) {
if (req.http.X-Subdomain == ZERO) {
set req.http.X-Carrier = Celcom Malaysia;
set req.http.X-CS = 502-13;
+   }
+   } else if (client.ip ~ carrier_central_african_republic) {
+   set req.http.X-DfltLang = fr;
+   if (req.http.X-Subdomain == M) {
+   if (req.http.host ~ 
(^(fr|ar|sg|en|es|zh|ar|ha|ln|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) {
+   set req.http.X-Carrier = Orange Central 
African Republic;
+   set req.http.X-CS = 623-01;
+   }
}
} else if (client.ip ~ carrier_dialog_sri_lanka) {
if (req.http.X-Subdomain == ZERO) {
@@ -354,11 +387,13 @@
}
}
} else if (client.ip ~ carrier_dtac) {
+   set req.http.X-DfltLang = th;
if (req.http.X-Subdomain == ZERO) {
set req.http.X-Carrier = DTAC;
set req.http.X-CS = 520-18;
}
} else if (client.ip ~ carrier_grameenphone_bangladesh) {
+   set req.http.X-DfltLang = bn;
if (req.http.X-Subdomain == ZERO) {
if (req.http.host ~ 
(^(bn)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org) {
set req.http.X-Carrier = Grameenphone 
Bangladesh;
@@ -376,6 +411,7 @@
set req.http.X-CS = 652-02;
}
} else if (client.ip ~ carrier_orange_cameroon) {
+   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
if (req.http.host ~ 
(^(fr|en|es|de|zh|ar|ha|ln|yo|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) {
set req.http.X-Carrier = Orange Cameroon;
@@ -383,11 +419,13 @@
}
}
} else if (client.ip ~ carrier_orange_congo) {
+   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
set req.http.X-Carrier = Orange Congo;
set req.http.X-CS = 630-86;
}
} else if (client.ip ~ carrier_orange_ivory_coast) {
+   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
set req.http.X-Carrier = Orange Ivory Coast;
set req.http.X-CS = 612-03;
@@ -397,12 +435,22 @@
set req.http.X-Carrier = Orange Kenya;
set req.http.X-CS = 639-07;
}
+   } else if (client.ip ~ 

[MediaWiki-commits] [Gerrit] (Bug 46783) Serialization of 'Closure' is not allowed transl... - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: (Bug 46783) Serialization of 'Closure' is not allowed 
translatewiki.net
..

(Bug 46783) Serialization of 'Closure' is not allowed translatewiki.net

I tried to replicate the error but no matter what I had no luck in rasing
the exception. I suspect that $this-queryProcessor-getParameters()
contained an Has improper value for Coordinates object which causes
serialize( $params ) to fail. Since other #ask queries/query
data objects are working as suppose to be and unit test
won't cover this exception, I decided to add the new methods setQueryId()
which does not rely on the return queryProcessor-getParameters() and
rather uses the rawParameters (only contains string values).

Change-Id: Ie63509eca2cc1a5def940dd85f27ebd540f34fd3
---
M includes/parserhooks/AskParserFunction.php
M includes/query/QueryData.php
M tests/phpunit/includes/query/QueryDataTest.php
3 files changed, 58 insertions(+), 9 deletions(-)


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

diff --git a/includes/parserhooks/AskParserFunction.php 
b/includes/parserhooks/AskParserFunction.php
index fee66da..d1e830f 100644
--- a/includes/parserhooks/AskParserFunction.php
+++ b/includes/parserhooks/AskParserFunction.php
@@ -103,6 +103,7 @@
$this-queryProcessor-map( $rawParams );
 
// Add query data from the query
+   $this-queryData-setQueryId( $rawParams );
$this-queryData-add(
$this-queryProcessor-getQuery(),
$this-queryProcessor-getParameters()
diff --git a/includes/query/QueryData.php b/includes/query/QueryData.php
index ef1107d..7350069 100644
--- a/includes/query/QueryData.php
+++ b/includes/query/QueryData.php
@@ -7,6 +7,7 @@
 use SMWDIBlob;
 use SMWQuery;
 use Title;
+use MWException;
 
 /**
  * Handles query meta data collected in #ask / #show
@@ -50,6 +51,11 @@
protected $subobject;
 
/**
+* Represents queryId
+*/
+   protected $queryId = null;
+
+   /**
 * Constructor
 *
 * @since 1.9
@@ -69,6 +75,24 @@
 */
public function getErrors() {
return $this-subobject-getErrors();
+   }
+
+   /**
+* Set QueryId
+*
+* Creates an unique id ( e.g. _QUERYbda2acc317b66b564e39f45e3a18fff3)
+* which normally is based on parameters used in a #ask/#set query
+*
+* @since 1.9
+*
+* @param array $qualifiers
+*/
+   public function setQueryId( array $qualifiers ) {
+   $this-queryId = str_replace(
+   '_',
+   '_QUERY',
+   $this-subobject-getAnonymousIdentifier( implode( '|', 
$qualifiers ) )
+   );
}
 
/**
@@ -101,10 +125,12 @@
 * @return array
 */
public function add( SMWQuery $query, array $params ) {
+   if ( $this-queryId === null ) {
+   throw new MWException( '_QUERY Id is not set' );
+   }
 
// Prepare subobject semantic container
-   $Id = $this-subobject-getAnonymousIdentifier( serialize( 
$params ) );
-   $this-subobject-setSemanticData( str_replace( '_', '_QUERY', 
$Id ) );
+   $this-subobject-setSemanticData( $this-queryId );
 
$description = $query-getDescription();
 
diff --git a/tests/phpunit/includes/query/QueryDataTest.php 
b/tests/phpunit/includes/query/QueryDataTest.php
index 191ddf9..b002a45 100644
--- a/tests/phpunit/includes/query/QueryDataTest.php
+++ b/tests/phpunit/includes/query/QueryDataTest.php
@@ -12,7 +12,6 @@
 use SMWDataValueFactory;
 use Title;
 
-
 /**
  * Tests for the SMW\QueryData class
  *
@@ -66,7 +65,6 @@
'format=list'
),
array(
-   'result' = false,
'queryCount' = 4,
'queryKey' = array( '_ASKST', 
'_ASKSI', '_ASKDE', '_ASKFO' ),
'queryValue' = array( 'list', 1, 1, 
'[[Modification date::+]]' )
@@ -88,7 +86,6 @@
'format=list'
),
array(
-   'result' = false,
'queryCount' = 4,
'queryKey' = array( '_ASKST', 
'_ASKSI', '_ASKDE', '_ASKFO' ),
'queryValue' = array( 'list', 2, 1, 
'[[Modification date::+]] [[Category:Foo]]' )
@@ -112,7 +109,6 @@
  

[MediaWiki-commits] [Gerrit] Updated FSF address - change (mediawiki...SyntaxHighlight_GeSHi)

2013-04-02 Thread Johannes Weberhofer (Code Review)
Johannes Weberhofer has uploaded a new change for review.

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


Change subject: Updated FSF address
..

Updated FSF address

Change-Id: Iec15e77769e6339f3878f6ee18cf30919846dde1
---
M geshi/contrib/cssgen2.php
M geshi/docs/COPYING
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SyntaxHighlight_GeSHi 
refs/changes/65/57065/1

diff --git a/geshi/contrib/cssgen2.php b/geshi/contrib/cssgen2.php
index cc3c39c..9471153 100644
--- a/geshi/contrib/cssgen2.php
+++ b/geshi/contrib/cssgen2.php
@@ -17,8 +17,8 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with GeSHi; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with GeSHi; if not, write to the Free Software Foundation, 51
+ *  Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  *
  * @packagegeshi
  * @subpackage contrib
diff --git a/geshi/docs/COPYING b/geshi/docs/COPYING
index 5b6e7c6..d21a0bf 100644
--- a/geshi/docs/COPYING
+++ b/geshi/docs/COPYING
@@ -1,8 +1,8 @@
GNU GENERAL PUBLIC LICENSE
   Version 2, June 1991
 
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Copyright (C) 1989, 1991  Free Software Foundation, 
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec15e77769e6339f3878f6ee18cf30919846dde1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi
Gerrit-Branch: master
Gerrit-Owner: Johannes Weberhofer jweberho...@weberhofer.at

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


[MediaWiki-commits] [Gerrit] Do search on pressing enter key - change (translatewiki)

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

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


Change subject: Do search on pressing enter key
..

Do search on pressing enter key

Change-Id: I3101738d0800d77caf6b8253361117af0b550a4a
---
M MainPage/resources/js/ext.translate.mainpage.js
1 file changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/66/57066/1

diff --git a/MainPage/resources/js/ext.translate.mainpage.js 
b/MainPage/resources/js/ext.translate.mainpage.js
index d71466c..a7f08a5 100644
--- a/MainPage/resources/js/ext.translate.mainpage.js
+++ b/MainPage/resources/js/ext.translate.mainpage.js
@@ -1,10 +1,16 @@
 ( function ( $, mw ) {
'use strict';
 
+   function search () {
+   window.location.href = new mw.Uri( mw.util.wikiGetlink( 
'Special:SearchTranslations' ) )
+   .extend( { query: $( 'input.searchbox' ).val() } );
+   }
$( document ).ready( function () {
-   $( '.twn-mainpage-search button' ).on( 'click', function () {
-   window.location.href = new mw.Uri( mw.util.wikiGetlink( 
'Special:SearchTranslations' ) )
-   .extend( { query: $( 'input.searchbox' ).val() 
} );
+   $( '.twn-mainpage-search button' ).on( 'click', search );
+   $( '.twn-mainpage-search input' ).on( 'keyup', function( e ) {
+   if ( e.which === 13 ) { // Enter key
+   search();
+   }
} );
} );
 }( jQuery, mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3101738d0800d77caf6b8253361117af0b550a4a
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] Unified default lang redirect from m. zero. Adding three c... - change (operations/puppet)

2013-04-02 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Unified default lang redirect from m.  zero. Adding three 
carriers for testing, too.
..


Unified default lang redirect from m.  zero. Adding three carriers for 
testing, too.

This is a compile fix for Change-Id: Ifda2dcabaa08f5df7b22b3b1d726f21882bbca36

* Default language for the carrier is now set in one location
* XL Indonesia is changed to id default language
* Old code did NOT redirect unknown carrier zero.wiki to en.zero.wiki. Now 
redirecting.
* Refactored to support default relative redirect path for direct zero. and m. 
access from partners.
* All partner direct access to zero. and m. going to default (language options 
selection page).
* Adding three additional carriers for testing.

Change-Id: I8fb36d26d437ad21f240820d8a949543fc6577e6
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 81 insertions(+), 46 deletions(-)

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



diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index a4e1bdc..228662d 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -313,6 +313,27 @@
89.188.224.136/29;
 }
 
+acl carrier_vimpelcom_mobilink_pakistan {
+   119.160.125.0/27;
+   119.160.126.97/28;
+   119.160.126.129/25;
+}
+
+acl carrier_orange_meditel_morocco {
+   41.92.0.0/18;
+   41.92.64.0/19;
+   41.214.192.0/18;
+   197.153.0.0/16;
+   197.247.0.0/16;
+}
+
+acl carrier_central_african_republic {
+   41.223.184.1/32;
+   41.223.184.2/31;
+   41.223.184.148/30;
+   41.223.184.152/30;
+}
+
 # for test.* routing, FIXME
 backend test_wikipedia {
.host = srv193.pmtpa.wmnet;
@@ -335,11 +356,23 @@
set req.http.X-Subdomain = M;
}
 
+   // go to english by default
+   set req.http.X-DfltLang = en;
+   set req.http.X-DfltPage = /wiki/Special:ZeroRatedMobileAccess;
+
/* Please keep this list alphabetized by the ACL variable */
if (client.ip ~ carrier_celcom_malaysia) {
if (req.http.X-Subdomain == ZERO) {
set req.http.X-Carrier = Celcom Malaysia;
set req.http.X-CS = 502-13;
+   }
+   } else if (client.ip ~ carrier_central_african_republic) {
+   set req.http.X-DfltLang = fr;
+   if (req.http.X-Subdomain == M) {
+   if (req.http.host ~ 
(^(fr|ar|sg|en|es|zh|ar|ha|ln|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) {
+   set req.http.X-Carrier = Orange Central 
African Republic;
+   set req.http.X-CS = 623-01;
+   }
}
} else if (client.ip ~ carrier_dialog_sri_lanka) {
if (req.http.X-Subdomain == ZERO) {
@@ -354,11 +387,13 @@
}
}
} else if (client.ip ~ carrier_dtac) {
+   set req.http.X-DfltLang = th;
if (req.http.X-Subdomain == ZERO) {
set req.http.X-Carrier = DTAC;
set req.http.X-CS = 520-18;
}
} else if (client.ip ~ carrier_grameenphone_bangladesh) {
+   set req.http.X-DfltLang = bn;
if (req.http.X-Subdomain == ZERO) {
if (req.http.host ~ 
(^(bn)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org) {
set req.http.X-Carrier = Grameenphone 
Bangladesh;
@@ -376,6 +411,7 @@
set req.http.X-CS = 652-02;
}
} else if (client.ip ~ carrier_orange_cameroon) {
+   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
if (req.http.host ~ 
(^(fr|en|es|de|zh|ar|ha|ln|yo|eo)\.m|^m)\.([a-zA-Z0-9-]+)\.org) {
set req.http.X-Carrier = Orange Cameroon;
@@ -383,11 +419,13 @@
}
}
} else if (client.ip ~ carrier_orange_congo) {
+   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
set req.http.X-Carrier = Orange Congo;
set req.http.X-CS = 630-86;
}
} else if (client.ip ~ carrier_orange_ivory_coast) {
+   set req.http.X-DfltLang = fr;
if (req.http.X-Subdomain == M) {
set req.http.X-Carrier = Orange Ivory Coast;
set req.http.X-CS = 612-03;
@@ -397,12 +435,22 @@
set req.http.X-Carrier = Orange Kenya;
set req.http.X-CS = 639-07;
}
+   } else if (client.ip ~ carrier_orange_meditel_morocco) {
+   set 

[MediaWiki-commits] [Gerrit] (bug 46787) API: Fix rccontinue handling - change (mediawiki/core)

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

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


Change subject: (bug 46787) API: Fix rccontinue handling
..

(bug 46787) API: Fix rccontinue handling

There are several bugs in Icc43b62f:
* When handing the continuation, the code checks for dir=descending when
  the actual value is dir=older.
* When the above is fixed, the continuation code assumes ORDER BY
  rc_timestamp DESC, rc_id ASC, which would filesort.
* rc_id is not added to the ORDER BY clause anyway.

Bug: 46787
Change-Id: Ia6ebd4ea0458b8013d4ecb71954dcfbdacff2c00
---
M includes/api/ApiQueryRecentChanges.php
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/57067/1

diff --git a/includes/api/ApiQueryRecentChanges.php 
b/includes/api/ApiQueryRecentChanges.php
index 72e80b8..83bad3f 100644
--- a/includes/api/ApiQueryRecentChanges.php
+++ b/includes/api/ApiQueryRecentChanges.php
@@ -159,15 +159,20 @@
 
$timestamp = $this-getDB()-addQuotes( wfTimestamp( 
TS_MW, $cont[0] ) );
$id = intval( $cont[1] );
-   $op = $params['dir'] == 'descending' ? '' : '';
+   $op = $params['dir'] == 'older' ? '' : '';
 
$this-addWhere(
rc_timestamp $op $timestamp OR  .
(rc_timestamp = $timestamp AND  .
-   rc_id = $id)
+   rc_id $op= $id)
);
}
 
+   $order = $params['dir'] == 'older' ? 'DESC' : 'ASC';
+   $this-addOption( 'ORDER BY', array(
+   rc_timestamp $order,
+   rc_id $order,
+   ) );
 
$this-addWhereFld( 'rc_namespace', $params['namespace'] );
$this-addWhereFld( 'rc_deleted', 0 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6ebd4ea0458b8013d4ecb71954dcfbdacff2c00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Fixes to Special:PagesWithProp - change (mediawiki/core)

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

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


Change subject: Fixes to Special:PagesWithProp
..

Fixes to Special:PagesWithProp

- Remove unneeded call to HTMLForm::setAction()
- Call HTMLForm::setWrapperLegendMsg() instead of HTMLForm::setWrapperLegend()
- Use Html::element() instead of Xml::span()

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/57068/1

diff --git a/includes/specials/SpecialPagesWithProp.php 
b/includes/specials/SpecialPagesWithProp.php
index dc6464a..2f49803 100644
--- a/includes/specials/SpecialPagesWithProp.php
+++ b/includes/specials/SpecialPagesWithProp.php
@@ -70,9 +70,8 @@
),
), $this-getContext() );
$form-setMethod( 'get' );
-   $form-setAction( $this-getTitle()-getFullURL() );
$form-setSubmitCallback( array( $this, 'onSubmit' ) );
-   $form-setWrapperLegend( $this-msg( 'pageswithprop-legend' ) );
+   $form-setWrapperLegendMsg( 'pageswithprop-legend' );
$form-addHeaderText( $this-msg( 'pageswithprop-text' 
)-parseAsBlock() );
$form-setSubmitTextMsg( 'pageswithprop-submit' );
 
@@ -125,7 +124,7 @@
$ret = Linker::link( $title, null, array(), array(), array( 
'known' ) );
if ( $result-pp_value !== '' ) {
$value = $this-msg( 'parentheses' )
-   -rawParams( Xml::span( $result-pp_value, 
'prop-value' ) )
+   -rawParams( Html::element( 'span', array( 
'class' = 'prop-value' ), $result-pp_value ) )
-escaped();
$ret .=  $value;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4bc90c223a89bd31ce2d93a959e9bdf4b546e6dd
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] Update/fix PHPDoc - change (mediawiki/core)

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

Change subject: Update/fix PHPDoc
..


Update/fix PHPDoc

Also initilise two possibly undefined veriables ($cl/$dl) and
add a type hint.

Change-Id: I24d4f13fa03caf7861646837f185df4f1e077c6e
---
M includes/specials/SpecialRecentchanges.php
1 file changed, 36 insertions(+), 32 deletions(-)

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



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 008678f..d9145b8 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -66,7 +66,7 @@
/**
 * Create a FormOptions object with options as specified by the user
 *
-* @param $parameters array
+* @param array $parameters
 *
 * @return FormOptions
 */
@@ -91,7 +91,7 @@
/**
 * Get custom show/hide filters
 *
-* @return Array Map of filter URL param names to properties 
(msg/default)
+* @return array Map of filter URL param names to properties 
(msg/default)
 */
protected function getCustomFilters() {
if ( $this-customFilters === null ) {
@@ -132,7 +132,7 @@
/**
 * Main execution point
 *
-* @param $subpage String
+* @param string $subpage
 */
public function execute( $subpage ) {
$this-rcSubpage = $subpage;
@@ -172,6 +172,7 @@
}
if( $feedFormat ) {
list( $changesFeed, $formatter ) = 
$this-getFeedObject( $feedFormat );
+   /** @var ChangesFeed $changesFeed */
$changesFeed-execute( $formatter, $rows, $lastmod, 
$opts );
} else {
$this-webOutput( $rows, $opts );
@@ -183,7 +184,8 @@
/**
 * Return an array with a ChangesFeed object and ChannelFeed object
 *
-* @return Array
+* @param string $feedFormat Feed's format (either 'rss' or 'atom')
+* @return array
 */
public function getFeedObject( $feedFormat ) {
$changesFeed = new ChangesFeed( $feedFormat, 'rcfeed' );
@@ -199,8 +201,8 @@
 * Process $par and put options found if $opts
 * Mainly used when including the page
 *
-* @param $par String
-* @param $opts FormOptions
+* @param string $par
+* @param FormOptions $opts
 */
public function parseParameters( $par, FormOptions $opts ) {
$bits = preg_split( '/\s*,\s*/', trim( $par ) );
@@ -252,8 +254,8 @@
 * Don't use this if we are using the patrol feature, patrol changes 
don't
 * update the timestamp
 *
-* @param $feedFormat String
-* @return String or false
+* @param string $feedFormat
+* @return string|bool
 */
public function checkLastModified( $feedFormat ) {
$dbr = wfGetDB( DB_SLAVE );
@@ -270,7 +272,7 @@
/**
 * Return an array of conditions depending of options set in $opts
 *
-* @param $opts FormOptions
+* @param FormOptions $opts
 * @return array
 */
public function buildMainQueryConds( FormOptions $opts ) {
@@ -362,9 +364,9 @@
/**
 * Process the query
 *
-* @param $conds Array
-* @param $opts FormOptions
-* @return bool|ResultWrapper result or false (for Recentchangeslinked 
only)
+* @param array $conds
+* @param FormOptions $opts
+* @return bool|ResultWrapper Result or false (for Recentchangeslinked 
only)
 */
public function doMainQuery( $conds, $opts ) {
$tables = array( 'recentchanges' );
@@ -468,8 +470,8 @@
/**
 * Send output to the OutputPage object, only called if not used feeds
 *
-* @param array $rows of database rows
-* @param $opts FormOptions
+* @param array $rows Database rows
+* @param FormOptions $opts
 */
public function webOutput( $rows, $opts ) {
global $wgRCShowWatchingUsers, $wgShowUpdatedMarker, 
$wgAllowCategorizedRecentChanges;
@@ -567,8 +569,8 @@
/**
 * Return the text to be displayed above the changes
 *
-* @param $opts FormOptions
-* @return String: XHTML
+* @param FormOptions $opts
+* @return string XHTML
 */
public function doHeader( $opts ) {
global $wgScript;
@@ -629,8 +631,8 @@
/**
 * Get options to be displayed in a form
 *
-* @param $opts FormOptions
-* @return Array
+* @param FormOptions $opts
+* @return array
 */
function 

[MediaWiki-commits] [Gerrit] upload varnish: switch everything to Swift - change (operations/puppet)

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

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


Change subject: upload varnish: switch everything to Swift
..

upload varnish: switch everything to Swift

Squids now pass everything to Swift, so remove this extra hop for
non-matching Swift URLs and divert everything from Varnishes to Swift.

Change-Id: Id5535bcae04e6f8c54c21bc46531aae9c2cf5e08
---
M manifests/role/cache.pp
M templates/varnish/upload-backend.inc.vcl.erb
2 files changed, 1 insertion(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/57069/1

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index ee5482f..1e73ceb 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -386,8 +386,7 @@
image_scalers = 
$lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary],
},
eqiad = {
-   backend = 
$lvs::configuration::lvs_service_ips[$::realm]['upload']['pmtpa']['uploadsvc'],
-   swift = 
$lvs::configuration::lvs_service_ips[$::realm]['swift']['pmtpa'],
+   backend = 
$lvs::configuration::lvs_service_ips[$::realm]['swift']['pmtpa'],
image_scalers = 
$lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary],
},
esams = {
diff --git a/templates/varnish/upload-backend.inc.vcl.erb 
b/templates/varnish/upload-backend.inc.vcl.erb
index 570d15c..ca725d7 100644
--- a/templates/varnish/upload-backend.inc.vcl.erb
+++ b/templates/varnish/upload-backend.inc.vcl.erb
@@ -175,22 +175,6 @@
 }
 
 sub vcl_miss {
-% if vcl_config.fetch(cluster_tier, 1) == 1 -%
-   # Send originals to the Swift cluster
-   if ( req.url ~ 
^/(wikibooks|wikinews|wikiquote|wikiversity|wikimedia|wikipedia|wikisource|wiktionary|wikivoyage)/[^/]+/(archive/)?[0-9a-f]/[0-9a-f][0-9a-f]/
 ) {
-   set req.backend = swift;
-   # Send thumbnails to the Swift cluster
-   } elsif (req.url ~ ^/+[^/]+/[^/]+/(transcoded|thumb|temp)/) {
-   set req.backend = swift;
-   # math to swift
-   } elsif (req.url ~ ^/(math|score)/) {
-   set req.backend = swift;
-   # timeline to swift
-   } elsif (req.url ~ 
^/(wikibooks|wikinews|wikiquote|wikiversity|wikimedia|wikipedia|wikisource|wiktionary|wikivoyage)/[^/]+/timeline/)
 {
-   set req.backend = swift;
-   }
-% end -%
-
/* Convert range requests into pass when over a certain threshold */
if (req.http.Range
 (std.integer(regsub(req.http.Range, ^bytes=([0-9]*)-, 
\1), 0)  33554432

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5535bcae04e6f8c54c21bc46531aae9c2cf5e08
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Consistency tweaks in preparation for adding extension to Tr... - change (mediawiki...Foxway)

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

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


Change subject: Consistency tweaks in preparation for adding extension to 
Translatewiki.net
..

Consistency tweaks in preparation for adding extension to Translatewiki.net

Change-Id: I8644fc52b0cb89098eecaa51d8d683c90c0866f3
---
M Foxway.i18n.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Foxway 
refs/changes/70/57070/1

diff --git a/Foxway.i18n.php b/Foxway.i18n.php
index 12f9a18..01eb257 100644
--- a/Foxway.i18n.php
+++ b/Foxway.i18n.php
@@ -13,15 +13,15 @@
  * @author pastakhov
  */
 $messages['en'] = array(
-   'foxway-desc' = 'Allows to store an object-oriented data and 
implements its own runtime for php code on wikipage',
-   'foxway-php-syntax-error-unexpected' = 'PHP Parse error: syntax error, 
unexpected $1 in Command line code on line $2'
+   'foxway-desc' = 'Allows to store an object-oriented data and 
implements its own runtime for PHP code on pages',
+   'foxway-php-syntax-error-unexpected' = 'PHP parse error: syntax error, 
unexpected $1 in command line code on line $2'
 );
 
 /** Message documentation (Message documentation)
  * @author pastakhov
  */
 $messages['qqq'] = array(
-   'foxway-desc' = 
'{{desc|name=Foxway|url=http://www.mediawiki.org/wiki/Extension:Foxway}}',
+   'foxway-desc' = 
'{{desc|name=Foxway|url=https://www.mediawiki.org/wiki/Extension:Foxway}}',
'foxway-php-syntax-error-unexpected' = 'Error message, parameters:
 * $1 - token or user-specified string a quoted
 * $2 - the line number where the error occurred',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8644fc52b0cb89098eecaa51d8d683c90c0866f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Foxway
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] upload varnish: switch everything to Swift - change (operations/puppet)

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

Change subject: upload varnish: switch everything to Swift
..


upload varnish: switch everything to Swift

Squids now pass everything to Swift, so remove this extra hop for
non-matching Swift URLs and divert everything from Varnishes to Swift.

Change-Id: Id5535bcae04e6f8c54c21bc46531aae9c2cf5e08
---
M manifests/role/cache.pp
M templates/varnish/upload-backend.inc.vcl.erb
2 files changed, 1 insertion(+), 18 deletions(-)

Approvals:
  Mark Bergsma: Looks good to me, but someone else must approve
  Faidon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index ee5482f..1e73ceb 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -386,8 +386,7 @@
image_scalers = 
$lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary],
},
eqiad = {
-   backend = 
$lvs::configuration::lvs_service_ips[$::realm]['upload']['pmtpa']['uploadsvc'],
-   swift = 
$lvs::configuration::lvs_service_ips[$::realm]['swift']['pmtpa'],
+   backend = 
$lvs::configuration::lvs_service_ips[$::realm]['swift']['pmtpa'],
image_scalers = 
$lvs::configuration::lvs_service_ips[$::realm]['rendering'][$::mw_primary],
},
esams = {
diff --git a/templates/varnish/upload-backend.inc.vcl.erb 
b/templates/varnish/upload-backend.inc.vcl.erb
index 570d15c..ca725d7 100644
--- a/templates/varnish/upload-backend.inc.vcl.erb
+++ b/templates/varnish/upload-backend.inc.vcl.erb
@@ -175,22 +175,6 @@
 }
 
 sub vcl_miss {
-% if vcl_config.fetch(cluster_tier, 1) == 1 -%
-   # Send originals to the Swift cluster
-   if ( req.url ~ 
^/(wikibooks|wikinews|wikiquote|wikiversity|wikimedia|wikipedia|wikisource|wiktionary|wikivoyage)/[^/]+/(archive/)?[0-9a-f]/[0-9a-f][0-9a-f]/
 ) {
-   set req.backend = swift;
-   # Send thumbnails to the Swift cluster
-   } elsif (req.url ~ ^/+[^/]+/[^/]+/(transcoded|thumb|temp)/) {
-   set req.backend = swift;
-   # math to swift
-   } elsif (req.url ~ ^/(math|score)/) {
-   set req.backend = swift;
-   # timeline to swift
-   } elsif (req.url ~ 
^/(wikibooks|wikinews|wikiquote|wikiversity|wikimedia|wikipedia|wikisource|wiktionary|wikivoyage)/[^/]+/timeline/)
 {
-   set req.backend = swift;
-   }
-% end -%
-
/* Convert range requests into pass when over a certain threshold */
if (req.http.Range
 (std.integer(regsub(req.http.Range, ^bytes=([0-9]*)-, 
\1), 0)  33554432

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5535bcae04e6f8c54c21bc46531aae9c2cf5e08
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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-04-02 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

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(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index be22625..483765d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1196,6 +1196,17 @@
$wgSiteNotice = [//en.wikipedia.org/ See current Wikipedia];
}
$wgDefaultUserOptions['highlightbroken'] = 0;
+} else {
+   $wgHooks['BeforePageDisplay'][] = function( $out, $skin ) use ( 
$wgDBname ) {
+   $badSkinName = $skin-getSkinName();
+   if ( in_array( $badSkinName, array( 'chick', 'simple', 
'myskin', 'nostalgia', 'standard' ) ) ) {
+   $metaPage = $wgDBname == 'metawiki' ? 'Turning off 
outdated skins' : 'meta:Turning off outdated skins';
+   $removeDate = $out-getLang()-date( '2013-04-15 
00:00:00' );
+   $out-prependHTML( 'span class=warning' . 
$out-msg( 'wikimedia-oldskin-removal',
+   $out-msg( skinname-$badSkinName )-text(), 
$removeDate, $metaPage )-parse() . '/span' );
+   }
+   return true;
+   };
 }
 
 $wgUseHashTable = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8a9632133737612f5de2af74bc7b04592ff33ce
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: OliverKeyes oke...@wikimedia.org
Gerrit-Reviewer: PleaseStand pleasest...@live.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 44228) Explicit undefined check in EditableValue - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44228) Explicit undefined check in EditableValue
..

(bug 44228) Explicit undefined check in EditableValue

Using jQuery's $.inArray to check for undefined does not work in IE8.

Change-Id: I3ecab59732391e5b2b88964937085a7bee082f4f
---
M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js 
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
index 13b5483..67c21e1 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
@@ -67,7 +67,7 @@
// Overwritten constructor:
function( subject, options, interfaces, toolbar ) {
// allow toolbar not to be set, even though it is still 
required inside in many places
-   if( $.inArray( undefined, [ subject, interfaces ] ) === -1 ) {
+   if( subject !== undefined  interfaces !== undefined ) {
this.init( subject, options, interfaces, toolbar );
}
}, {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ecab59732391e5b2b88964937085a7bee082f4f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] (bug 44228) Template engine: Overriding plain() method - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44228) Template engine: Overriding plain() method
..

(bug 44228) Template engine: Overriding plain() method

Overriding the messaging system's plain() method in the template engine's 
Template prototype
assuring IE8 compatibility.

Change-Id: Ia063623abc1068f20bd6e59c8b7396b1f4b9e63c
---
M lib/resources/templates.js
1 file changed, 11 insertions(+), 2 deletions(-)


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

diff --git a/lib/resources/templates.js b/lib/resources/templates.js
index 129c440..5aeb295 100644
--- a/lib/resources/templates.js
+++ b/lib/resources/templates.js
@@ -30,6 +30,17 @@
);
 
/**
+* Returns the parsed plain template. (Overridden due to IE8 returning 
objects instead of
+* strings from mw.Message's native plain() method.)
+* @see mw.Message.plain
+*
+* @return {string}
+*/
+   mw.Template.prototype.plain = function() {
+   return this.parser();
+   };
+
+   /**
 * @see mw.Message.parser
 *
 * @return {String}
@@ -183,12 +194,10 @@
// jQuery parse the template will convert the tag names 
to upper case, just convert the
// whole string to lower case.
string = filteredString.toLowerCase();
-
return string;
}
strippedTemplate = strip( template.plain() );
strippedParsedTemplate = strip( parsedTemplate );
-
// nodes or text got lost while being parsed which indicates 
that the generated HTML would
// be invalid
if ( strippedTemplate !== strippedParsedTemplate ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia063623abc1068f20bd6e59c8b7396b1f4b9e63c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] (bug 44228) Checking if instanceof is supported correctly - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44228) Checking if instanceof is supported correctly
..

(bug 44228) Checking if instanceof is supported correctly

Checking instanceof in IE8 will fail after having performed a deep extend on an 
object
containing a constructor with a custom prototype.

Change-Id: I0dfb0fb5b35ba8faf2b0ae1be2ba0dacc9946edc
---
M lib/resources/Resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
A lib/resources/wikibase.support.js
3 files changed, 39 insertions(+), 1 deletion(-)


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

diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 49ed5f1..7ad25c8 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -41,6 +41,7 @@
'scripts' = array(
'wikibase.js',
'wikibase.Site.js',
+   'wikibase.support.js',
'wikibase.RevisionStore.js'
),
'dependencies' = array(
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js
index 22c0305..c7dc5c2 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js
@@ -80,7 +80,10 @@
this._lia = this.options.listItemAdapter; // create short-cut 
for this
 
if( typeof this._lia !== 'object'
-   || !( this._lia instanceof 
$.wikibase.listview.ListItemAdapter )
+   || wb.support.constructorDeepExtend
+!( this._lia instanceof 
$.wikibase.listview.ListItemAdapter )
+   // Just a simple check when the browser is not able to 
check for the instance:
+   || !wb.support.constructorDeepExtend  
!this._lia.liInstance
) {
throw new Error( Option 'listItemAdapter' has to be an 
instance of $.wikibase. +
listview.ListItemAdapter );
diff --git a/lib/resources/wikibase.support.js 
b/lib/resources/wikibase.support.js
new file mode 100644
index 000..1bf14fd
--- /dev/null
+++ b/lib/resources/wikibase.support.js
@@ -0,0 +1,34 @@
+/**
+ * Browser feature detection routines.
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ */
+( function( mw, wb, $ ) {
+   'use strict';
+
+   /**
+* Returns an object holding information about whether certain features 
are supported in the
+* user's browser.
+*/
+   wb.support = ( function() {
+   var support = {};
+
+   // Checking instanceof in IE8 will fail after having performed 
a deep extend on an object
+   // containing a constructor with a custom prototype.
+   support.constructorDeepExtend = true;
+   var test = function() { this.foo = ''; };
+   test.prototype = { bar: '' };
+
+   var derivate = new test(),
+   extended = $.extend( true, {}, { member: derivate } );
+
+   support.constructorDeepExtend = ( extended.member instanceof 
test );
+
+   return support;
+   } )();
+
+} )( mediaWiki, wikibase, jQuery );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0dfb0fb5b35ba8faf2b0ae1be2ba0dacc9946edc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] [it planet] fix doppiequadre per Elitre - change (operations/puppet)

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

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


Change subject: [it planet] fix doppiequadre per Elitre
..

[it planet] fix doppiequadre per Elitre

https://meta.wikimedia.org/wiki/?diff=5335684oldid=5333798

fu Ie323328bf2ea5ca23f3

Change-Id: Icbc4d905ff9888db414cf9505cbd6a2c26c410a4
---
M templates/planet/it_config.erb
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/74/57074/1

diff --git a/templates/planet/it_config.erb b/templates/planet/it_config.erb
index 8dfddaf..9badd01 100644
--- a/templates/planet/it_config.erb
+++ b/templates/planet/it_config.erb
@@ -28,10 +28,8 @@
 [http://appuntisui.polsini.net/?feed=rss2cat=11]
 name=appunti sui pølsini
 
-#[http://doppiequadre.splinder.com/tag/wikilife]
-#removed - is actually a 1x1 GIF image - 23AUG2012 - DZ
-#[http://syndication.splinder.com/doppiequadre/rss2.xml]
-#name=[[doppiequadre]]
+[http://doppiequadre.wordpress.com/category/wikilife/feed/atom/]
+name=[[doppiequadre]]
 
 #[http://drachinobello.wordpress.com/category/wikimedia/]
 [http://drachinobello.wordpress.com/category/wikimedia/feed/atom/]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbc4d905ff9888db414cf9505cbd6a2c26c410a4
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] Consistency tweaks in preparation for adding extension to Tr... - change (mediawiki...Foxway)

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

Change subject: Consistency tweaks in preparation for adding extension to 
Translatewiki.net
..


Consistency tweaks in preparation for adding extension to Translatewiki.net

Change-Id: I8644fc52b0cb89098eecaa51d8d683c90c0866f3
---
M Foxway.i18n.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/Foxway.i18n.php b/Foxway.i18n.php
index 12f9a18..01eb257 100644
--- a/Foxway.i18n.php
+++ b/Foxway.i18n.php
@@ -13,15 +13,15 @@
  * @author pastakhov
  */
 $messages['en'] = array(
-   'foxway-desc' = 'Allows to store an object-oriented data and 
implements its own runtime for php code on wikipage',
-   'foxway-php-syntax-error-unexpected' = 'PHP Parse error: syntax error, 
unexpected $1 in Command line code on line $2'
+   'foxway-desc' = 'Allows to store an object-oriented data and 
implements its own runtime for PHP code on pages',
+   'foxway-php-syntax-error-unexpected' = 'PHP parse error: syntax error, 
unexpected $1 in command line code on line $2'
 );
 
 /** Message documentation (Message documentation)
  * @author pastakhov
  */
 $messages['qqq'] = array(
-   'foxway-desc' = 
'{{desc|name=Foxway|url=http://www.mediawiki.org/wiki/Extension:Foxway}}',
+   'foxway-desc' = 
'{{desc|name=Foxway|url=https://www.mediawiki.org/wiki/Extension:Foxway}}',
'foxway-php-syntax-error-unexpected' = 'Error message, parameters:
 * $1 - token or user-specified string a quoted
 * $2 - the line number where the error occurred',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8644fc52b0cb89098eecaa51d8d683c90c0866f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Foxway
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Pastakhov pastak...@yandex.ru
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add HTML label tag for usability - change (mediawiki...DataTransfer)

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

Change subject: Add HTML label tag for usability
..


Add HTML label tag for usability

Change-Id: I6ad9a9bb0cf6220c002ba6eb4ed74b3d30cd27db
---
M specials/DT_ViewXML.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Siebrand: Looks good to me, but someone else must approve
  Yaron Koren: Verified; Looks good to me, approved



diff --git a/specials/DT_ViewXML.php b/specials/DT_ViewXML.php
index d6617d3..83c5a3f 100644
--- a/specials/DT_ViewXML.php
+++ b/specials/DT_ViewXML.php
@@ -508,7 +508,7 @@
$text .= Html::input( namespaces[$nsCode], 
null, 'checkbox' );
$text .= ' ' . str_replace( '_', ' ', $nsName ) 
. br /\n;
}
-   $text .= br /pinput type=\checkbox\ 
name=\simplified_format\ /  . wfMessage( 'dt_viewxml_simplifiedformat' 
)-text() . /p\n;
+   $text .= br /plabelinput type=\checkbox\ 
name=\simplified_format\ /  . wfMessage( 'dt_viewxml_simplifiedformat' 
)-text() . /label/p\n;
$text .= input type=\submit\ value=\ . wfMessage( 
'viewxml' )-text() . \\n;
$text .= /form\n;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ad9a9bb0cf6220c002ba6eb4ed74b3d30cd27db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataTransfer
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Yaron Koren yaro...@gmail.com

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


[MediaWiki-commits] [Gerrit] Missing message for wbsetreference - change (mediawiki...Wikibase)

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

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


Change subject: Missing message for wbsetreference
..

Missing message for wbsetreference

Bug: 46790
Change-Id: I4a4aa7a8962072e355f5c8473123f698417858a0
---
M repo/Wikibase.i18n.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 8e12552..176 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -272,6 +272,7 @@
'wikibase-item-summary-wbeditentity-create' = 'Created a new item',
'wikibase-item-summary-wbeditentity-update' = 'Updated an item',
'wikibase-item-summary-wbeditentity-override' = 'Overrode an item',
+   'wikibase-item-summary-wbsetreference' = 'Set a reference',
'wikibase-item-summary-wbsetlabel-set' = 'Changed [$2] label',
'wikibase-item-summary-wbsetlabel-remove' = 'Removed [$2] label',
'wikibase-item-summary-wbsetdescription-set' = 'Changed [$2] 
description',
@@ -865,6 +866,7 @@
'wikibase-item-summary-wbeditentity-create' = '{{wikibase summary 
messages|item|Automatic edit summary generated when creating a new item.}}',
'wikibase-item-summary-wbeditentity-update' = '{{wikibase summary 
messages|item|Automatic edit summary generated when updating an existing 
item.}}',
'wikibase-item-summary-wbeditentity-override' = '{{wikibase summary 
messages|item|Automatic edit summary generated when overriding an existing 
item.}}',
+   'wikibase-item-summary-wbsetreference' = '{{wikibase summary 
messages|item|Automatic edit summary generated when creating a reference or 
setting the value of an existing one.}}',
'wikibase-item-summary-wbsetlabel-set' = {{wikibase summary 
messages|label|Automatic edit summary generated when editing an item label, 
which appears in the ''h1'' heading at top of the item-page. Example of a full 
edit summary is \Updated [en] label:  Egypt\.}},
'wikibase-item-summary-wbsetlabel-remove' = '{{wikibase summary 
messages|label|Automatic edit summary generated when removing an item label. 
Example edit summary is Removed [en] label.}}',
'wikibase-item-summary-wbsetdescription-set' = '{{wikibase summary 
messages|description|Automatic edit summary when creating or editing an item 
description. Example edit summary is Updated [en] description:  a country in 
Africa.}}',

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

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

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


[MediaWiki-commits] [Gerrit] Implement next/prevBreakOffset and basic whitespace skipping. - change (mediawiki...VisualEditor)

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

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


Change subject: Implement next/prevBreakOffset and basic whitespace skipping.
..

Implement next/prevBreakOffset and basic whitespace skipping.

This provides the functionality for keyboard word skipping
(i.e. pressting ctrl/alt + arrow).

Bug: 46794
Change-Id: Ib0861fa075df805410717a148b8a6e166d947849
---
M modules/unicodejs/unicodejs.wordbreak.js
M modules/unicodejs/unicodejs.wordbreak.test.js
M modules/ve/dm/lineardata/ve.dm.ElementLinearData.js
3 files changed, 101 insertions(+), 28 deletions(-)


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

diff --git a/modules/unicodejs/unicodejs.wordbreak.js 
b/modules/unicodejs/unicodejs.wordbreak.js
index 6c1b79f..e161704 100644
--- a/modules/unicodejs/unicodejs.wordbreak.js
+++ b/modules/unicodejs/unicodejs.wordbreak.js
@@ -32,15 +32,50 @@
return null;
}
 
+   /**
+* Find the next word break offset.
+* @param {unicodeJS.TextString} string TextString
+* @param {number} pos Character position
+* @param {boolean} [ignoreWhitespace=false] When set, ignores a break 
if the left character is whitespace
+* @returns {number} Returns the next offset which is word break
+*/
+   wordbreak.nextBreakOffset = function( string, pos, ignoreWhitespace ) {
+   var i = pos;
+   // Search ahead for the next break point
+   while ( string.read( ++i ) !== null ) {
+   // Check left character for whitespace if required
+   // TODO: Match more whitepsace characters
+   if ( ignoreWhitespace  string.read( i - 1 ) === ' ' ) 
{
+   continue;
+   }
+   if ( unicodeJS.wordbreak.isBreak( string, i ) ) {
+   break;
+   }
+   }
+   return i;
+   };
 
/**
-* Evaluates if the specified position within some text is a word 
boundary.
-* @param {string} text Text
+* Find the previous word break offset.
+* @param {unicodeJS.TextString} string TextString
 * @param {number} pos Character position
-* @returns {boolean} Is the position a word boundary
+* @param {boolean} [ignoreWhitespace=false] When set, ignores a break 
if the right character is whitespace
+* @returns {number} Returns the previous offset which is word break
 */
-   wordbreak.isBreakInText = function ( text, pos ) {
-   return unicodeJS.wordbreak.isBreakInTextString( new 
unicodeJS.TextString( text ), pos );
+   wordbreak.prevBreakOffset = function( string, pos, ignoreWhitespace ) {
+   var i = pos;
+   // Search backwards for the previous break point
+   while ( string.read( --i ) !== null ) {
+   // Check right character for whitespace if required
+   // TODO: Match more whitepsace characters
+   if ( ignoreWhitespace  string.read( i - 1 ) !== null 
 string.read( i ) === ' ' ) {
+   continue;
+   }
+   if ( unicodeJS.wordbreak.isBreak( string, i ) ) {
+   break;
+   }
+   }
+   return i;
};
 
/**
@@ -49,7 +84,7 @@
 * @param {number} pos Character position
 * @returns {boolean} Is the position a word boundary
 */
-   wordbreak.isBreakInTextString = function ( string, pos ) {
+   wordbreak.isBreak = function ( string, pos ) {
// Break at the start and end of text.
// WB1: sot ÷
// WB2: ÷ eot
diff --git a/modules/unicodejs/unicodejs.wordbreak.test.js 
b/modules/unicodejs/unicodejs.wordbreak.test.js
index 505fa43..9a88952 100644
--- a/modules/unicodejs/unicodejs.wordbreak.test.js
+++ b/modules/unicodejs/unicodejs.wordbreak.test.js
@@ -7,7 +7,7 @@
 
 QUnit.module( 'unicodeJS.wordbreak' );
 
-QUnit.test( 'isBreakInText', function ( assert ) {
+QUnit.test( 'isBreak', function ( assert ) {
var i, result, context,
text =
/*jshint quotmark:double */
@@ -24,6 +24,7 @@
// 50 - 60
 c\u0300\u0327,
/*jshint quotmark:single */
+   textString = new unicodeJS.TextString( text ),
breaks = [
0, 1, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 19,
@@ -43,9 +44,59 @@
text.substring( i, Math.min ( i + 4, text.length ) )
;
assert.equal(
-   

[MediaWiki-commits] [Gerrit] [it planet] fix doppiequadre per Elitre - change (operations/puppet)

2013-04-02 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: [it planet] fix doppiequadre per Elitre
..


[it planet] fix doppiequadre per Elitre

https://meta.wikimedia.org/wiki/?diff=5335684oldid=5333798

fu Ie323328bf2ea5ca23f3

Change-Id: Icbc4d905ff9888db414cf9505cbd6a2c26c410a4
---
M templates/planet/it_config.erb
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Andrew Bogott: Checked; Looks good to me, approved
  Nemo bis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/templates/planet/it_config.erb b/templates/planet/it_config.erb
index 8dfddaf..9badd01 100644
--- a/templates/planet/it_config.erb
+++ b/templates/planet/it_config.erb
@@ -28,10 +28,8 @@
 [http://appuntisui.polsini.net/?feed=rss2cat=11]
 name=appunti sui pølsini
 
-#[http://doppiequadre.splinder.com/tag/wikilife]
-#removed - is actually a 1x1 GIF image - 23AUG2012 - DZ
-#[http://syndication.splinder.com/doppiequadre/rss2.xml]
-#name=[[doppiequadre]]
+[http://doppiequadre.wordpress.com/category/wikilife/feed/atom/]
+name=[[doppiequadre]]
 
 #[http://drachinobello.wordpress.com/category/wikimedia/]
 [http://drachinobello.wordpress.com/category/wikimedia/feed/atom/]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbc4d905ff9888db414cf9505cbd6a2c26c410a4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jeremyb jer...@tuxmachine.com
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Jalexander jalexan...@wikimedia.org
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] WTS: More robust handling of zero-child case in serializeChi... - change (mediawiki...Parsoid)

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

Change subject: WTS: More robust handling of zero-child case in 
serializeChildren
..


WTS: More robust handling of zero-child case in serializeChildren

* If a node has a no children, pass the node itself as the
  lastSourceSep node into chunk callbacks.

* This patch also makes WTS more robust and doesn't rely on
  the DOM pass stripping out auto-inserted empty nodes in snippets
  like:
---
{|
|-
{{echo|trtdfoo/td/tr}}
|}
---

* Fixes regression on this snippet (with leading whitespace) from
  en:4WD.
---
 {|
 |
 | a
 |}
---

* Also fixes RT errors for this snippet from:
  en:I Know why the Caged Bird Sings
---
blockquotea
pb/blockquote
---

* This fixes semantic errors on both enwp pages above.

* No change in parser tests (TODO: add more tests).

Change-Id: I01788e7ad96c8ac6b3a20434f77d3dd5ccb94d20
---
M js/lib/mediawiki.DOMPostProcessor.js
M js/lib/mediawiki.WikitextSerializer.js
2 files changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/js/lib/mediawiki.DOMPostProcessor.js 
b/js/lib/mediawiki.DOMPostProcessor.js
index 995c558..1f2a9e7 100644
--- a/js/lib/mediawiki.DOMPostProcessor.js
+++ b/js/lib/mediawiki.DOMPostProcessor.js
@@ -1601,7 +1601,7 @@
deleteNode(c);
}
} else if (dp.autoInsertedStart  
dp.autoInsertedEnd  c.childNodes.length === 0) {
-   // DEle
+   // Delete any node that was inserted as 
a fixup node but has no content
deleteNode(c);
} else {
findDeletedStartTagsAndMore(c);
diff --git a/js/lib/mediawiki.WikitextSerializer.js 
b/js/lib/mediawiki.WikitextSerializer.js
index 6edf96e..19a46df 100644
--- a/js/lib/mediawiki.WikitextSerializer.js
+++ b/js/lib/mediawiki.WikitextSerializer.js
@@ -402,7 +402,11 @@
 
// Force out accumulated separator
if (oldSep === this.sep) {
-   chunkCB('', children.last());
+   if (children.length === 0) {
+   chunkCB('', node);
+   } else {
+   chunkCB('', children.last());
+   }
}
 
this.chunkCB = oldCB;

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

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

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


[MediaWiki-commits] [Gerrit] SMW 1.9 compatibility - change (mediawiki...SemanticInternalObjects)

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

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


Change subject: SMW 1.9 compatibility
..

SMW 1.9 compatibility

#set_internal_recurring_event and #set_recurring_event are now
interchangeable

Difference between #set_internal and #subobject are
* #list vs +sep=
* auto in-page reference (which would be rather easy to implement because
'SMW\RecurringEventsParserFunction' already does it )

SIO has no unit tests, so I used the following for verfication:

{{#set_internal:Some hunger
|property1=value1
|property2=value2
}}

{{#set_internal:Part of recipe
|Has quantity=1
|Has unit=cup
|Has ingredient=flour
}}

{{#set_internal:Is president of
|Has name=Ulysses S. Grant
|Has vice president#list=Schuyler Colfax, Henry Wilson
}}

{{#ask:[[Part of recipe::+]][[Has ingredient::flour]][[Has unit::cup]][[Has 
quantity::.5]]
|mainlabel=-
|? Part of recipe
|? Has quantity
}}

{{#set_internal_recurring_event:Is instance of
|property=Has sio date
|start=January 4, 2010
|end=June 8, 2011
|unit=week
|period=1
}}

{{#ask:[[Has sio date::February 1, 2010]][[Has sio date::February 7, 2010]]
|mainlabel=-
|?Is instance of
|?Has sio date
}}

Change-Id: I8923ca50fbb0dd3515801aaf38052624f45cb3b8
---
M SIO_SubobjectAlias.php
1 file changed, 34 insertions(+), 26 deletions(-)


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

diff --git a/SIO_SubobjectAlias.php b/SIO_SubobjectAlias.php
index 0b749b0..bd50b25 100644
--- a/SIO_SubobjectAlias.php
+++ b/SIO_SubobjectAlias.php
@@ -54,15 +54,14 @@
$subobjectArgs[] = $origArgs[$i];
}
}
-   if ( class_exists( 'SMW\SubobjectHandler' ) ) {
-   // SMW 1.9+
-   call_user_func_array( array( 'SMW\SubobjectHandler', 
'render' ), $subobjectArgs );
-   } elseif ( class_exists( 'SMW\SubobjectParser' ) ) {
-   // SMW 1.9
-   call_user_func_array( array( 'SMW\SubobjectParser', 
'render' ), $subobjectArgs );
-   } elseif ( class_exists( 'SMW\Subobject' ) ) {
-   // SMW 1.9
-   call_user_func_array( array( 'SMW\Subobject', 'render' 
), $subobjectArgs );
+
+   // Use SMW\SubobjectParserFunction class
+   if ( class_exists( 'SMW\SubobjectParserFunction' ) ) {
+   $instance = new SMW\SubobjectParserFunction(
+   new SMW\ParserData( $parser-getTitle(), 
$parser-getOutput() ),
+   new SMW\Subobject( $parser-getTitle() )
+   );
+   return $instance-parse( new 
SMW\ParserParameterFormatter( $subobjectArgs ) );
} else {
// SMW 1.8
call_user_func_array( array( 'SMWSubobject', 'render' 
), $subobjectArgs );
@@ -83,24 +82,33 @@
// First param should be a standalone property name.
$objToPagePropName = array_shift( $params );
 
-   $results = SMWSetRecurringEvent::getDatesForRecurringEvent( 
$params );
-   if ( $results == null ) {
-   return null;
-   }
-
-   list( $property, $all_date_strings, $unused_params ) = $results;
-
-   // Mimic a call to #subobject for each date.
-   foreach ( $all_date_strings as $date_string ) {
-   $first_params = array(
-   $parser,
-   '',
-   $objToPagePropName . '=' . 
$parser-getTitle()-getText(),
-   $property=$date_string
+   // Use RecurringEventsParserFunction class
+   if ( class_exists( 'SMW\RecurringEventsParserFunction' ) ) {
+   $instance = new SMW\RecurringEventsParserFunction(
+   new SMW\ParserData( $parser-getTitle(), 
$parser-getOutput() ),
+   new SMW\Subobject( $parser-getTitle() )
);
-   
-   $cur_params = array_merge( $first_params, 
$unused_params );
-   call_user_func_array( array( 'SMWSubobject', 'render' 
), $cur_params );
+   return $instance-parse( new 
SMW\ParserParameterFormatter( $params ) );
+   } else {
+   $results = 
SMWSetRecurringEvent::getDatesForRecurringEvent( $params );
+   if ( $results == null ) {
+   return null;
+   }
+
+   list( $property, $all_date_strings, $unused_params ) = 
$results;
+
+   // Mimic a call to #subobject for each date.
+   

[MediaWiki-commits] [Gerrit] Script tag for LinearData test not renamed after file move. - change (mediawiki...VisualEditor)

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

Change subject: Script tag for LinearData test not renamed after file move.
..


Script tag for LinearData test not renamed after file move.

Change-Id: I89f7c2afd815f3050a2d837de67189cd628c03c6
---
M modules/ve/test/index.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve/test/index.php b/modules/ve/test/index.php
index 1d941b9..9d35824 100644
--- a/modules/ve/test/index.php
+++ b/modules/ve/test/index.php
@@ -232,13 +232,13 @@
script src=dm/ve.dm.Document.test.js/script
script src=dm/ve.dm.DocumentSynchronizer.test.js/script
script src=dm/ve.dm.IndexValueStore.test.js/script
+   script src=dm/ve.dm.LinearData.test.js/script
script src=dm/ve.dm.Transaction.test.js/script
script src=dm/ve.dm.TransactionProcessor.test.js/script
script src=dm/ve.dm.Surface.test.js/script
script src=dm/ve.dm.SurfaceFragment.test.js/script
script src=dm/ve.dm.ModelRegistry.test.js/script
script src=dm/ve.dm.MetaList.test.js/script
-   script src=dm/lineardata/ve.dm.LinearData.test.js/script
script 
src=dm/lineardata/ve.dm.ElementLinearData.test.js/script
script 
src=dm/lineardata/ve.dm.MetaLinearData.test.js/script
script src=ce/ve.ce.test.js/script

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89f7c2afd815f3050a2d837de67189cd628c03c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Trevor Parscal tpars...@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 a mobile log group - change (operations/mediawiki-config)

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

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


Change subject: Add a mobile log group
..

Add a mobile log group

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ce8ea93..dd67af8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4221,6 +4221,7 @@
'ts_badpass' = udp://$wmfUdp2logDest/ts_badpass,
'EventLogging'  = udp://$wmfUdp2logDest/eventlogging,
'torblock'  = udp://$wmfUdp2logDest/torblock,
+   'mobile'  = udp://$wmfUdp2logDest/mobile,
),
 
'+private' = array(

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

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

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


[MediaWiki-commits] [Gerrit] Abstracting out udp2log monitoring into its own define - change (operations/puppet)

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

Change subject: Abstracting out udp2log monitoring into its own define
..


Abstracting out udp2log monitoring into its own define

Configuring monitoring for analytics udp2log instances

Change-Id: I0d6c49b8acafd0fcdc3e0a379bdb2f6b0129c4bc
---
M manifests/misc/analytics.pp
M manifests/misc/icinga.pp
M manifests/misc/udp2log.pp
M manifests/site.pp
D templates/icinga/analytics.cfg.erb
5 files changed, 69 insertions(+), 62 deletions(-)

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



diff --git a/manifests/misc/analytics.pp b/manifests/misc/analytics.pp
index 9b66a11..baaf8a8 100644
--- a/manifests/misc/analytics.pp
+++ b/manifests/misc/analytics.pp
@@ -23,4 +23,4 @@
minute  = 15,
require = File[$tmp_dir],
}
-}
\ No newline at end of file
+}
diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 8239661..9bd63f8 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -164,13 +164,10 @@
   mode   = '0644';
 
 # TEMP: analytics eqiad cluster manual entries.
-# These will be removed from this manually managed file
-# once analytics puppetization goes to production.
+# This has been removed since analytics cluster
+# udp2log instances are now puppetized.
 '/etc/icinga/analytics.cfg':
-  content = template('icinga/analytics.cfg.erb'),
-  owner   = 'root',
-  group   = 'root',
-  mode= '0644';
+  ensure  = 'absent';
 
 '/etc/icinga/checkcommands.cfg':
   content = template('icinga/checkcommands.cfg.erb'),
diff --git a/manifests/misc/udp2log.pp b/manifests/misc/udp2log.pp
index 8b46c65..7f297f0 100644
--- a/manifests/misc/udp2log.pp
+++ b/manifests/misc/udp2log.pp
@@ -169,7 +169,37 @@
require   = [Package[udplog], File[/etc/udp2log/${name}], 
File[/etc/init.d/udp2log-${name}]],
}
 
+   # include monitoring for this udp2log instance.
+   misc::udp2log::instance::monitoring { $name:
+   log_directory   = $log_directory,
+   ensure  = $ensure,
+   packet_loss_log = $packet_loss_log,
+   monitor_packet_loss = $monitor_packet_loss,
+   monitor_processes   = $monitor_processes,
+   monitor_log_age = $monitor_log_age,
+   require = Service[udp2log-${name}],
+   }
+}
 
+
+# == Define misc::udp2log::instance::monitoring
+# Monitoring configs for a udp2log instance.
+# This is abstracted out of the udp2log::instance
+# define so it is possible to monitor non-puppetized
+# udp2log instances.
+#
+# == Parameters:
+# See documentation for misc::udp2log::instance. 
+#
+define misc::udp2log::instance::monitoring(
+   $log_directory   = /var/log/udp2log,
+   $ensure  = running,
+   $packet_loss_log = undef,
+   $monitor_packet_loss = true,
+   $monitor_processes   = true,
+   $monitor_log_age = true,
+) {
+   require misc::udp2log::monitoring
 
# Monitoring configs.
# There are 3 ways udp2log instances are currently defined:
@@ -186,13 +216,10 @@
description   = udp2log log age for ${name},
nrpe_command  = 
/usr/lib/nagios/plugins/check_udp2log_log_age ${name},
contact_group = admins,analytics,
-   require   = Class[misc::udp2log::monitoring],
ensure= present;
}
}
# TODO else ensure absent, can't do this right now due to missing 
dependencies
-
-
 
# Monitor that each filter process defined in 
# /etc/udp2log/$name is running
@@ -202,14 +229,10 @@
nrpe_command  = 
/usr/lib/nagios/plugins/check_udp2log_procs ${name},
contact_group = admins,analytics,
retries   = 10,
-   require   = Class[misc::udp2log::monitoring],
ensure= present;
}
}
# TODO else ensure absent, can't do this right now due to missing 
dependencies
-
-
-
 
# Monitor packet loss using the $packet_loss_log.
# This requires that filters.$name.erb has a
@@ -237,7 +260,6 @@
command = /usr/sbin/ganglia-logtailer --classname 
PacketLossLogtailer --log_file ${packet_loss_log_file} --mode cron,
user= 'root',
minute  = '*/5',
-   require = Class[misc::udp2log::monitoring],
ensure  = $ensure_monitor_packet_loss,
}
 
@@ -254,7 +276,6 @@
normal_check_interval = 2,
retry_check_interval  = 2,
retries   = 4,

[MediaWiki-commits] [Gerrit] One more serializer test; Changed two parsoid-specific tests - change (mediawiki/core)

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

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


Change subject: One more serializer test; Changed two parsoid-specific tests
..

One more serializer test; Changed two parsoid-specific tests

* Updated html output of two parsoid-centric tests to reflect
  changes in parsoid output.
* Added one more test for the serializer.

Change-Id: Id72fc5de5a09490028b64a522db3461970008960
---
M tests/parser/parserTests.txt
1 file changed, 20 insertions(+), 2 deletions(-)


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

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 0165cb2..18c4b70 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -3530,7 +3530,6 @@
 table
 tbody
 tr
-td/td
 tdfoo/td/tr/tbody/table
 !! end
 
@@ -14305,6 +14304,25 @@
 !!end
 
 !!test
+Indented table with an empty td
+!!input
+ {|
+ |-
+ |
+ |foo
+ |}
+!!result
+table
+
+tr
+td
+/td
+tdfoo
+/td/tr/table
+
+!!end
+
+!!test
 Empty TR followed by a template-generated TR
 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
 !!options
@@ -14318,7 +14336,7 @@
 table
 tbody
 tr
-td/td/tr
+/tr
 tr
 tdfoo/td/tr/tbody/table
 !!end

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

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

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


[MediaWiki-commits] [Gerrit] Removing inherit on analytics1003-1006 - change (operations/puppet)

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

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


Change subject: Removing inherit on analytics1003-1006
..

Removing inherit on analytics1003-1006

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


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 4e1caa4..cd8f2d3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -139,7 +139,7 @@
 }
 
 # analytics1003 - analytics1006 are udp2log instances.
-node /analytics100[3456].eqiad.wmnet/ inherits analytics_basenode {
+node /analytics100[3456].eqiad.wmnet/ {
# ganglia aggregator for the Analytics cluster.
$ganglia_aggregator = true
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib781d50f0dab52e0d3cd68f0c5c1d4c146e2d6cc
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 inherit on analytics1003-1006 - change (operations/puppet)

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

Change subject: Removing inherit on analytics1003-1006
..


Removing inherit on analytics1003-1006

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

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 4e1caa4..cd8f2d3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -139,7 +139,7 @@
 }
 
 # analytics1003 - analytics1006 are udp2log instances.
-node /analytics100[3456].eqiad.wmnet/ inherits analytics_basenode {
+node /analytics100[3456].eqiad.wmnet/ {
# ganglia aggregator for the Analytics cluster.
$ganglia_aggregator = true
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib781d50f0dab52e0d3cd68f0c5c1d4c146e2d6cc
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] Only analytics1003 and 1011 are ganglia aggregators - change (operations/puppet)

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

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


Change subject: Only analytics1003 and 1011 are ganglia aggregators
..

Only analytics1003 and 1011 are ganglia aggregators

Change-Id: Iccf16a819727a100df6cd5823089cfc803426017
---
M manifests/site.pp
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/57081/1

diff --git a/manifests/site.pp b/manifests/site.pp
index cd8f2d3..9d12575 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -141,7 +141,9 @@
 # analytics1003 - analytics1006 are udp2log instances.
 node /analytics100[3456].eqiad.wmnet/ {
# ganglia aggregator for the Analytics cluster.
-   $ganglia_aggregator = true
+   if ($hostname == analytics1003) {
+   $ganglia_aggregator = true
+   }
 
# monitor the (currently unpuppetized)
# udp2log instances.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccf16a819727a100df6cd5823089cfc803426017
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] Only analytics1003 and 1011 are ganglia aggregators - change (operations/puppet)

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

Change subject: Only analytics1003 and 1011 are ganglia aggregators
..


Only analytics1003 and 1011 are ganglia aggregators

Change-Id: Iccf16a819727a100df6cd5823089cfc803426017
---
M manifests/site.pp
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index cd8f2d3..9d12575 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -141,7 +141,9 @@
 # analytics1003 - analytics1006 are udp2log instances.
 node /analytics100[3456].eqiad.wmnet/ {
# ganglia aggregator for the Analytics cluster.
-   $ganglia_aggregator = true
+   if ($hostname == analytics1003) {
+   $ganglia_aggregator = true
+   }
 
# monitor the (currently unpuppetized)
# udp2log instances.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iccf16a819727a100df6cd5823089cfc803426017
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] Add service group support in-instance with nslcd - change (operations/puppet)

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

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


Change subject: Add service group support in-instance with nslcd
..

Add service group support in-instance with nslcd

This adds support for searching the per-peoject LDAP OUs
for service users and groups.

Change-Id: I4829c2584682bb068aa17c606fae093849a02a42
---
M templates/ldap/nslcd.conf.erb
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/templates/ldap/nslcd.conf.erb b/templates/ldap/nslcd.conf.erb
index e5537cb..c8e41ac 100644
--- a/templates/ldap/nslcd.conf.erb
+++ b/templates/ldap/nslcd.conf.erb
@@ -11,10 +11,17 @@
 
 # The search base that will be used for all queries.
 base %= ldapconfig[basedn] %
+
 base passwd %= ldapconfig[users_rdn] %,%= ldapconfig[basedn] %
 base shadow %= ldapconfig[users_rdn] %,%= ldapconfig[basedn] %
 base group %= ldapconfig[groups_rdn] %,%= ldapconfig[basedn] %
 
+% if has_variable?(instanceproject) then %
+base passwd %= ldapconfig[users_rdn] %,cn=%= instanceproject 
%,ou=projects,%= ldapconfig[basedn] %
+base shadow %= ldapconfig[users_rdn] %,cn=%= instanceproject 
%,ou=projects,%= ldapconfig[basedn] %
+base group %= ldapconfig[groups_rdn] %,cn=%= instanceproject 
%,ou=projects,%= ldapconfig[basedn] %
+% end %
+
 # The DN to bind with for normal lookups.
 binddn cn=proxyagent,ou=profile,%= ldapconfig[basedn] %
 bindpw %= ldapconfig[proxypass] %

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4829c2584682bb068aa17c606fae093849a02a42
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren m...@uberbox.org

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


[MediaWiki-commits] [Gerrit] Need role::analytics on analytics1003-1006 - change (operations/puppet)

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

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


Change subject: Need role::analytics on analytics1003-1006
..

Need role::analytics on analytics1003-1006

Change-Id: I570dbfeecb90d8ff74fcdb0cfb45858042dddb79
---
M manifests/site.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/83/57083/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 11b5740..bc362d7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -140,6 +140,8 @@
 
 # analytics1003 - analytics1006 are udp2log instances.
 node /analytics100[3456].eqiad.wmnet/ {
+   include role::analytics
+   
# ganglia aggregator for the Analytics cluster.
if ($hostname == analytics1003) {
$ganglia_aggregator = true

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I570dbfeecb90d8ff74fcdb0cfb45858042dddb79
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] Need role::analytics on analytics1003-1006 - change (operations/puppet)

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

Change subject: Need role::analytics on analytics1003-1006
..


Need role::analytics on analytics1003-1006

Change-Id: I570dbfeecb90d8ff74fcdb0cfb45858042dddb79
---
M manifests/site.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 11b5740..bc362d7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -140,6 +140,8 @@
 
 # analytics1003 - analytics1006 are udp2log instances.
 node /analytics100[3456].eqiad.wmnet/ {
+   include role::analytics
+   
# ganglia aggregator for the Analytics cluster.
if ($hostname == analytics1003) {
$ganglia_aggregator = true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I570dbfeecb90d8ff74fcdb0cfb45858042dddb79
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] Addind db1001 back into production - change (operations/mediawiki-config)

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

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


Change subject: Addind db1001 back into production
..

Addind db1001 back into production

Change-Id: I57f9d17320a2bc054803bf06752f43292051af65
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index adb4ef8..5884ea0 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -81,7 +81,7 @@
 'sectionLoads' = array(
's1' = array(
'db1017'= 0, # 1.4TB
-   #'db1001'= 400, # 1.4TB sas
+   'db1001'= 400, # 1.4TB sas
'db1042'= 400, # 1.4TB sas
'db1043'= 50, # 1.4TB sas, special contrib, watchlist, etc 
64GB
'db1049'= 50, # 2.8TB sas 64GB future watchlist

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57f9d17320a2bc054803bf06752f43292051af65
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Adding db1001 back into production removing db1028 from prod... - change (operations/mediawiki-config)

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

Change subject: Adding db1001 back into production removing db1028 from 
production for h/w fix
..


Adding db1001 back into production removing db1028 from production for h/w fix

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index adb4ef8..9d2d8f8 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -81,7 +81,7 @@
 'sectionLoads' = array(
's1' = array(
'db1017'= 0, # 1.4TB
-   #'db1001'= 400, # 1.4TB sas
+   'db1001'= 100, # 1.4TB sas
'db1042'= 400, # 1.4TB sas
'db1043'= 50, # 1.4TB sas, special contrib, watchlist, etc 
64GB
'db1049'= 50, # 2.8TB sas 64GB future watchlist
@@ -124,7 +124,7 @@
'db1041' = 0,
'db1007' = 100, # snapshot
'db1024' = 400,
-   'db1028' = 400,
+   #'db1028' = 400,
),
 ),
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57f9d17320a2bc054803bf06752f43292051af65
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org
Gerrit-Reviewer: Cmjohnson cmjohn...@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] Sometimes order makes a difference with $ganglia_aggregator. - change (operations/puppet)

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

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


Change subject: Sometimes order makes a difference with $ganglia_aggregator.
..

Sometimes order makes a difference with $ganglia_aggregator.

Change-Id: Ib85340a4cff58c8f75257048293aaddee76ba5f7
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/57085/1

diff --git a/manifests/site.pp b/manifests/site.pp
index bc362d7..fd4fecd 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -140,13 +140,13 @@
 
 # analytics1003 - analytics1006 are udp2log instances.
 node /analytics100[3456].eqiad.wmnet/ {
-   include role::analytics
-   
# ganglia aggregator for the Analytics cluster.
if ($hostname == analytics1003) {
$ganglia_aggregator = true
}
 
+   include role::analytics
+
# monitor the (currently unpuppetized)
# udp2log instances.
misc::udp2log::instance::monitoring { 'webrequest':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib85340a4cff58c8f75257048293aaddee76ba5f7
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] Sometimes order makes a difference with $ganglia_aggregator. - change (operations/puppet)

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

Change subject: Sometimes order makes a difference with $ganglia_aggregator.
..


Sometimes order makes a difference with $ganglia_aggregator.

Change-Id: Ib85340a4cff58c8f75257048293aaddee76ba5f7
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index bc362d7..fd4fecd 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -140,13 +140,13 @@
 
 # analytics1003 - analytics1006 are udp2log instances.
 node /analytics100[3456].eqiad.wmnet/ {
-   include role::analytics
-   
# ganglia aggregator for the Analytics cluster.
if ($hostname == analytics1003) {
$ganglia_aggregator = true
}
 
+   include role::analytics
+
# monitor the (currently unpuppetized)
# udp2log instances.
misc::udp2log::instance::monitoring { 'webrequest':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib85340a4cff58c8f75257048293aaddee76ba5f7
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] WIP: Selser rework for the DOM-based serializer - change (mediawiki...Parsoid)

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

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


Change subject: WIP: Selser rework for the DOM-based serializer
..

WIP: Selser rework for the DOM-based serializer

Change-Id: I62d722d59c7a6f47499b571b5ac67cd1f935d3dc
---
M js/lib/mediawiki.SelectiveSerializer.js
M js/lib/mediawiki.WikitextSerializer.js
2 files changed, 48 insertions(+), 76 deletions(-)


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

diff --git a/js/lib/mediawiki.SelectiveSerializer.js 
b/js/lib/mediawiki.SelectiveSerializer.js
index 5e7826d..a52231a 100644
--- a/js/lib/mediawiki.SelectiveSerializer.js
+++ b/js/lib/mediawiki.SelectiveSerializer.js
@@ -112,7 +112,7 @@
 
isModified =
// Comment this out to ignore the VE's change 
markers!
-   DU.isModificationChangeMarker(dvec) ||
+   //DU.isModificationChangeMarker(dvec) ||
 
// Marked as modified by our diff algo
(DU.hasCurrentDiffMark(node, this.env) 
@@ -406,7 +406,7 @@
};
 
SelectiveSerializer.prototype.debug = function ( ) {
-   this.debug_pp.apply(this, [SS:, ' 
'].concat([].slice.apply(arguments)));
+   console.error.apply(console, [SS:, ' 
'].concat([].slice.apply(arguments)));
};
} else {
SelectiveSerializer.prototype.debug_pp = function ( ) {};
@@ -441,9 +441,14 @@
  * Selser uses WTS output in these cases:
  *
  * - separator: if adjacent node or parent is marked as modified
+ * - pass flag from wts
  * - regular src: if node (or parent) is marked as modified
+ * - flag
  * - regular src: if node (or parent) is marked for serialization, but is not
  *   actually modified (needed if dsr is not available)
+ * - handled implicitly
+ *
+ * Otherwise, we pick up the original source from data-parsoid-serialize.
  *
  * TODO: Replace these callbacks with a single, simple chunkCB that gets an
  * 'unmodified', 'separator', 'modified' flag from the WTS.
@@ -458,75 +463,34 @@
  * @param {string} res The Wikitext result of serialization.
  * @param {string/Object/null} dpsSource A JSON object representing the 
data-parsoid-serialize attribute of the node we're serializing.
  */
-SSP.handleSerializedResult = function( res, dpsSource ) {
+SSP.handleSerializedResult = function( res, dps, node ) {
 
-   this.debug( dps:, dpsSource || 'null', , res);
+   this.debug( dps:, dps || 'null', , JSON.stringify(res));
 
-   if( dpsSource === undefined ) {
-   console.trace();
-   }
-
-   if ( dpsSource === null ) {
-   // unmodified, just discard
-   if ( ! res.match(/^\s*$/) ) {
-   this.lastSeparator = '';
-   this.lastType = 'unmodified';
-   }
-   } else if (dpsSource === 'separator') {
-   if ( this.lastType === 'modified' ) {
-   // push separator
-   this.lastSeparator = '';
-   this.wtChunks.push(res);
-   } else {
-   // collect separator(s)
-   this.lastSeparator = (this.lastSeparator || '') + res;
-   }
-   //this.lastType = 'separator';
-   } else {
+   if (dps) {
// Possibly modified element source
-
-   // TODO: push unmodified source up to separator from
-   // data-parsoid-serialize dsr data
-   var dps = {};
-   if (dpsSource instanceof Object) {
-   dps = dpsSource;
-   } else {
-   try {
-   // Try to decode data-parsoid-serialize
-   dps = JSON.parse(dpsSource);
-   } catch (e) {
-   console.error('Error decoding dps ' + 
dpsSource);
-   console.trace();
-   }
-   }
-
-
// Insert unmodified source from a srcRange in any case
if (dps.srcRange) {
-   if ( this.rangeStart === dps.srcRange[0] ) {
-   // but ignore repeated callbacks with the same 
srcRange
-   } else {
+   if (!dps.modified  res  res.match(/^\s+$/)) {
+   // separator
+   this.wtChunks.push(res);
+   }
+   // ignore repeated callbacks with the same srcRange
+   if ( this.rangeStart !== dps.srcRange[0] ) {
this.rangeStart = 

[MediaWiki-commits] [Gerrit] Batch all StatCounter stats into one datagram in flush(). - change (mediawiki/core)

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

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


Change subject: Batch all StatCounter stats into one datagram in flush().
..

Batch all StatCounter stats into one datagram in flush().

Change-Id: I50a2cd24764e0a284c4a1138f8424ebf3990792e
---
M includes/StatCounter.php
1 file changed, 46 insertions(+), 61 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/87/57087/1

diff --git a/includes/StatCounter.php b/includes/StatCounter.php
index ca32793..a2a9f9e 100644
--- a/includes/StatCounter.php
+++ b/includes/StatCounter.php
@@ -40,6 +40,9 @@
 
protected function __construct() {}
 
+   /**
+* @return StatCounter
+*/
public static function singleton() {
static $instance = null;
if ( !$instance ) {
@@ -56,13 +59,10 @@
 * @return void
 */
public function incr( $key, $count = 1 ) {
+   $this-deltas[$key] = isset( $this-deltas[$key] ) ? 
$this-deltas[$key] : 0;
+   $this-deltas[$key] += $count;
if ( PHP_SAPI === 'cli' ) {
-   $this-sendDelta( $key, $count );
-   } else {
-   if ( !isset( $this-deltas[$key] ) ) {
-   $this-deltas[$key] = 0;
-   }
-   $this-deltas[$key] += $count;
+   $this-flush();
}
}
 
@@ -72,66 +72,51 @@
 * @return void
 */
public function flush() {
+   global $wgStatsMethod, $wgMemc;
+   global $wgUDPProfilerHost, $wgUDPProfilerPort, 
$wgAggregateStatsID;
+
try {
-   foreach ( $this-deltas as $key = $count ) {
-   $this-sendDelta( $key, $count );
+   if ( $wgStatsMethod === 'udp' ) {
+   $id = strlen( $wgAggregateStatsID ) ? 
$wgAggregateStatsID : wfWikiID();
+
+   $statlines = '';
+   foreach ( $this-deltas as $key = $count ) {
+   if ( $count != 0 ) {
+   $statlines .= stats/{$id} - 
{$count} 1 1 1 1 {$key}\n;
+   }
+   }
+
+   if ( $statlines != '' ) {
+   static $socket = null;
+   if ( !$socket ) {
+   $socket = socket_create( 
AF_INET, SOCK_DGRAM, SOL_UDP );
+   $statlines = stats/{$id} - 1 1 
1 1 1 -total\n{$statlines};
+   }
+   wfSuppressWarnings();
+   socket_sendto(
+   $socket,
+   $statlines,
+   strlen( $statlines ),
+   0,
+   $wgUDPProfilerHost,
+   $wgUDPProfilerPort
+   );
+   wfRestoreWarnings();
+   }
+   } elseif ( $wgStatsMethod === 'cache' ) {
+   foreach ( $this-deltas as $key = $count ) {
+   if ( $count != 0 ) {
+   $ckey = wfMemcKey( 'stats', 
$key );
+   if ( $wgMemc-incr( $ckey, 
$count ) === null ) {
+   $wgMemc-add( $ckey, 
$count );
+   }
+   }
+   }
}
} catch ( MWException $e ) {
trigger_error( Caught exception: {$e-getMessage()});
}
+
$this-deltas = array();
-   }
-
-   /**
-* @param string $key
-* @param string $count
-* @return void
-*/
-   protected function sendDelta( $key, $count ) {
-   global $wgStatsMethod;
-
-   $count = intval( $count );
-   if ( $count == 0 ) {
-   return;
-   }
-
-   if ( $wgStatsMethod == 'udp' ) {
-   global $wgUDPProfilerHost, $wgUDPProfilerPort, 
$wgAggregateStatsID;
-   static $socket;
-
-   $id = $wgAggregateStatsID !== false ? 
$wgAggregateStatsID : wfWikiID();
-
-   if 

[MediaWiki-commits] [Gerrit] move fundraising banner log collection pipeline from locke t... - change (operations/puppet)

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

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


Change subject: move fundraising banner log collection pipeline from locke to 
gadolinium
..

move fundraising banner log collection pipeline from locke to gadolinium

Change-Id: I4e46baef795d5900c4566a31937d699697d9862b
---
M files/misc/scripts/rotate_fundraising_logs
M manifests/misc/fundraising.pp
M manifests/site.pp
3 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/57088/1

diff --git a/files/misc/scripts/rotate_fundraising_logs 
b/files/misc/scripts/rotate_fundraising_logs
index fc7cf2f..cf93984 100755
--- a/files/misc/scripts/rotate_fundraising_logs
+++ b/files/misc/scripts/rotate_fundraising_logs
@@ -10,13 +10,13 @@
 use Sys::Syslog;
 
 my $ident = ($0 =~ /([^\/]+)$/) ? $1 : $0; # syslog identity
-my $udp2log_dir = '/a/squid/fundraising/logs'; # local dir where udp2log 
collects logs
+my $udp2log_dir = '/a/log/fundraising/logs';   # local dir where udp2log 
collects logs
 my $archive_dir = $udp2log_dir/fr_archive;   # netapp where logs are 
archived long term
 my $buffer_dir  = $udp2log_dir/buffer;   # local buffer dir
 my $buffer_days = 3;   # days 
to retain buffered logs
 
 # list of log files (sans extension) to rotate
-my @logs_to_process = qw(bannerImpressions-sampled100.tab landingpages.tab);
+my @logs_to_process = qw(bannerImpressions-sampled100.tsv landingpages.tsv);
 
 # keep the buffer_dir collated by year
 my $year = `/bin/date +%Y`;
diff --git a/manifests/misc/fundraising.pp b/manifests/misc/fundraising.pp
index 3b3aa69..b74fe61 100644
--- a/manifests/misc/fundraising.pp
+++ b/manifests/misc/fundraising.pp
@@ -465,6 +465,7 @@
ensure = present;
}
 
-   class { nfs::netapp::fr_archive: mountpoint = 
/a/squid/fundraising/logs/fr_archive }
+   #class { nfs::netapp::fr_archive: mountpoint = 
/a/squid/fundraising/logs/fr_archive }
+   class { nfs::netapp::fr_archive: mountpoint = 
/a/log/fundraising/logs/fr_archive }
 
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index fd4fecd..e218411 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -855,9 +855,8 @@
# Set up the gadolinium udp2log webrequest instance.
include role::logging::udp2log::gadolinium
 
-   ## NOTE:  This is still on locke.
# fundraising banner log pipeline
-   # include misc::fundraising::udp2log_rotation
+   include misc::fundraising::udp2log_rotation
 }
 
 node gallium.wikimedia.org {
@@ -931,8 +930,8 @@
# TODO: Move log_directory to /var/log/udp2log
misc::udp2log::instance { locke: log_directory = /a/squid }
 
-   # fundraising banner log pipeline
-   include misc::fundraising::udp2log_rotation
+   # fundraising banner log pipeline (moved to gadolinium)
+   #include misc::fundraising::udp2log_rotation
 
# Set up an rsync daemon module for udp2log logrotated
# archives.  This allows stat1 to copy logs from the

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e46baef795d5900c4566a31937d699697d9862b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] move fundraising banner log collection pipeline from locke t... - change (operations/puppet)

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

Change subject: move fundraising banner log collection pipeline from locke to 
gadolinium
..


move fundraising banner log collection pipeline from locke to gadolinium

Change-Id: I4e46baef795d5900c4566a31937d699697d9862b
---
M files/misc/scripts/rotate_fundraising_logs
M manifests/misc/fundraising.pp
M manifests/site.pp
3 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/files/misc/scripts/rotate_fundraising_logs 
b/files/misc/scripts/rotate_fundraising_logs
index fc7cf2f..cf93984 100755
--- a/files/misc/scripts/rotate_fundraising_logs
+++ b/files/misc/scripts/rotate_fundraising_logs
@@ -10,13 +10,13 @@
 use Sys::Syslog;
 
 my $ident = ($0 =~ /([^\/]+)$/) ? $1 : $0; # syslog identity
-my $udp2log_dir = '/a/squid/fundraising/logs'; # local dir where udp2log 
collects logs
+my $udp2log_dir = '/a/log/fundraising/logs';   # local dir where udp2log 
collects logs
 my $archive_dir = $udp2log_dir/fr_archive;   # netapp where logs are 
archived long term
 my $buffer_dir  = $udp2log_dir/buffer;   # local buffer dir
 my $buffer_days = 3;   # days 
to retain buffered logs
 
 # list of log files (sans extension) to rotate
-my @logs_to_process = qw(bannerImpressions-sampled100.tab landingpages.tab);
+my @logs_to_process = qw(bannerImpressions-sampled100.tsv landingpages.tsv);
 
 # keep the buffer_dir collated by year
 my $year = `/bin/date +%Y`;
diff --git a/manifests/misc/fundraising.pp b/manifests/misc/fundraising.pp
index 3b3aa69..b74fe61 100644
--- a/manifests/misc/fundraising.pp
+++ b/manifests/misc/fundraising.pp
@@ -465,6 +465,7 @@
ensure = present;
}
 
-   class { nfs::netapp::fr_archive: mountpoint = 
/a/squid/fundraising/logs/fr_archive }
+   #class { nfs::netapp::fr_archive: mountpoint = 
/a/squid/fundraising/logs/fr_archive }
+   class { nfs::netapp::fr_archive: mountpoint = 
/a/log/fundraising/logs/fr_archive }
 
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index fd4fecd..e218411 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -855,9 +855,8 @@
# Set up the gadolinium udp2log webrequest instance.
include role::logging::udp2log::gadolinium
 
-   ## NOTE:  This is still on locke.
# fundraising banner log pipeline
-   # include misc::fundraising::udp2log_rotation
+   include misc::fundraising::udp2log_rotation
 }
 
 node gallium.wikimedia.org {
@@ -931,8 +930,8 @@
# TODO: Move log_directory to /var/log/udp2log
misc::udp2log::instance { locke: log_directory = /a/squid }
 
-   # fundraising banner log pipeline
-   include misc::fundraising::udp2log_rotation
+   # fundraising banner log pipeline (moved to gadolinium)
+   #include misc::fundraising::udp2log_rotation
 
# Set up an rsync daemon module for udp2log logrotated
# archives.  This allows stat1 to copy logs from the

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e46baef795d5900c4566a31937d699697d9862b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: Jgreen jgr...@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] Use user case for global group names, fix logging - change (mediawiki...CentralAuth)

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

Change subject: Use user case for global group names, fix logging
..


Use user case for global group names, fix logging

To get proper log entries I had to add an own log action
handler for global group renames and change the target
of the log entries.

Note: This breakes b/c with older log entries, but
this shouldn't be to much of an issue as this feature
is rather new.

Bug: 46631
Bug: 27551
Change-Id: I0003998612469b62583ab53c0917ad8116465a29
---
M CentralAuth.php
M specials/SpecialGlobalGroupPermissions.php
M specials/SpecialGlobalUsers.php
3 files changed, 41 insertions(+), 7 deletions(-)

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



diff --git a/CentralAuth.php b/CentralAuth.php
index 4dd9669..bfd06d9 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -271,7 +271,7 @@
 $wgLogActions['gblrights/groupperms']  = 
'centralauth-rightslog-entry-groupperms';
 $wgLogActions['gblrights/groupprms2']  = 
'centralauth-rightslog-entry-groupperms2';
 $wgLogActions['gblrights/groupprms3']  = 
'centralauth-rightslog-entry-groupperms3';
-$wgLogActions['gblrights/grouprename'] = 
'centralauth-rightslog-entry-grouprename';
+$wgLogActionsHandlers['gblrights/grouprename'] = 'efHandleGrouprenameLogEntry';
 
 foreach ( array( 'newset', 'setrename', 'setnewtype', 'setchange', 'deleteset' 
) as $type ) {
$wgLogActionsHandlers[gblrights/{$type}] = 'efHandleWikiSetLogEntry';
@@ -341,7 +341,7 @@
  * @param $type
  * @param $action
  * @param $title
- * @param $skin Skin
+ * @param $skin Skin|null If null, we want to use the wiki content language, 
since that will go to the IRC feed.
  * @param $params
  * @param $filterWikilinks bool
  * @return String
@@ -382,3 +382,33 @@
return $msg-inContentLanguage()-text();
}
 }
+
+/**
+ * Format global group rename log entries
+ *
+ * @param $type
+ * @param $action
+ * @param $title
+ * @param $skin Skin|null If null, we want to use the wiki content language, 
since that will go to the IRC feed.
+ * @param $params
+ * @param $filterWikilinks bool
+ *
+ * @return String
+ */
+function efHandleGrouprenameLogEntry( $type, $action, $title, $skin, $params, 
$filterWikilinks = false ) {
+   // $params[0] is the new one, $params[1] the old one
+   if ( $skin ) {
+   $params[0] = Linker::link( Title::newFromText( $params[0] ), 
htmlspecialchars( $params[0] ) );
+   $params[1] = Linker::link( Title::newFromText( $params[1] ), 
htmlspecialchars( $params[1] ) );
+   } else {
+   $params[0] = htmlspecialchars( $params[0] );
+   $params[1] = htmlspecialchars( $params[1] );
+   }
+
+   $msg = wfMessage( 'centralauth-rightslog-entry-grouprename' 
)-rawParams( $params[0], $params[1] );
+   if ( $skin ) {
+   return $msg-text();
+   } else {
+   return $msg-inContentLanguage()-text();
+   }
+}
diff --git a/specials/SpecialGlobalGroupPermissions.php 
b/specials/SpecialGlobalGroupPermissions.php
index da74e84..d5fb516 100644
--- a/specials/SpecialGlobalGroupPermissions.php
+++ b/specials/SpecialGlobalGroupPermissions.php
@@ -279,7 +279,7 @@
$this-getOutput()-addWikiMsg( 
'centralauth-editgroup-invalid-name' );
return;
}
-   $group = $group-getPrefixedDBkey();
+   $group = $group-getUserCaseDBKey();
 
// (Potentially) New name of the group
$newname = $this-getRequest()-getVal( 'wpGlobalGroupName', 
$group );
@@ -289,7 +289,7 @@
$this-getOutput()-addWikiMsg( 
'centralauth-editgroup-invalid-name' );
return;
}
-   $newname = $newname-getPrefixedDBkey();
+   $newname = $newname-getUserCaseDBKey();
 
if ( $group != $newname ) {
 
@@ -441,9 +441,13 @@
 
$log-addEntry(
'grouprename',
-   SpecialPage::getTitleFor( 'GlobalGroupPermissions', 
$newName ),
+   // This has to point to 'Special:GlobalUsers so that 
self::showLogFragment can find it
+   SpecialPage::getTitleFor( 'GlobalUsers', $newName ),
$reason,
-   array( $oldName )
+   array(
+   SpecialPage::getTitleFor( 
'GlobalGroupPermissions', $newName ),
+   SpecialPage::getTitleFor( 
'GlobalGroupPermissions', $oldName )
+   )
);
}
 
diff --git a/specials/SpecialGlobalUsers.php b/specials/SpecialGlobalUsers.php
index 4e56632..638ffed 100644
--- a/specials/SpecialGlobalUsers.php
+++ b/specials/SpecialGlobalUsers.php
@@ -22,7 +22,7 @@
if ( $rqGroup ) {
  

[MediaWiki-commits] [Gerrit] Use embed the correct way, fix Nokia N95s - change (mediawiki...MobileFrontend)

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

Change subject: Use embed the correct way, fix Nokia N95s
..


Use embed the correct way, fix Nokia N95s

This is producing invalid css which is breaking the mobile
experience for a variety of older phones who cannot handle css parse
errors.

Change-Id: Ie0dadd0773ea1c585083de6eeff04d009442a176
---
M less/common/mainmenu.less
M less/common/mf-navigation.less
M stylesheets/common/mf-navigation.css
M stylesheets/common/ui.css
4 files changed, 25 insertions(+), 16 deletions(-)

Approvals:
  Brion VIBBER: Checked; Looks good to me, but someone else must approve
  awjrichards: Verified; Looks good to me, approved



diff --git a/less/common/mainmenu.less b/less/common/mainmenu.less
index 3b7a918..9442810 100644
--- a/less/common/mainmenu.less
+++ b/less/common/mainmenu.less
@@ -51,31 +51,31 @@
}
 
.icon-home a {
-   background-image: /* @embed */url(images/menu/home.png);
+   /* @embed */background-image: url(images/menu/home.png);
}
 
.icon-random a {
-   background-image: /* @embed 
*/url(images/menu/random.png);
+   /* @embed */background-image: 
url(images/menu/random.png);
}
 
.icon-watchlist a {
-   background-image: /* @embed 
*/url(images/menu/watchlist.png);
+   /* @embed */background-image: 
url(images/menu/watchlist.png);
}
 
.icon-uploads a {
-   background-image: /* @embed 
*/url(images/menu/uploads.png);
+   /* @embed */background-image: 
url(images/menu/uploads.png);
}
 
.icon-nearby a {
-   background-image: /* @embed 
*/url(images/menu/nearby.png);
+   /* @embed */background-image: 
url(images/menu/nearby.png);
}
 
.icon-settings a {
-   background-image: /* @embed 
*/url(images/menu/settings.png);
+   /* @embed */background-image: 
url(images/menu/settings.png);
}
 
.icon-loginout a {
-   background-image: /* @embed 
*/url(images/menu/loginout.png);
+   /* @embed */background-image: 
url(images/menu/loginout.png);
}
}
 }
diff --git a/less/common/mf-navigation.less b/less/common/mf-navigation.less
index e234766..f326ab5 100644
--- a/less/common/mf-navigation.less
+++ b/less/common/mf-navigation.less
@@ -16,7 +16,8 @@
 
 .client-js {
#mw-mf-main-menu-button {
-   background-image: /* @embed */ url(images/menu/main.png);
+   /* @embed */background-image: url(images/menu/main.png);
+
}
 }
 
diff --git a/stylesheets/common/mf-navigation.css 
b/stylesheets/common/mf-navigation.css
index d2f52b0..3fbbb26 100644
--- a/stylesheets/common/mf-navigation.css
+++ b/stylesheets/common/mf-navigation.css
@@ -2,7 +2,8 @@
   right: 0;
 }
 .client-js #mw-mf-main-menu-button {
-  background-image: /* @embed */ url(images/menu/main.png);
+  /* @embed */
+  background-image: url(images/menu/main.png);
 }
 #mw-mf-viewport {
   width: 100%;
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index af23f98..cc2c5fc 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -174,25 +174,32 @@
   text-decoration: none;
 }
 #mw-mf-menu-main li.icon-home a {
-  background-image: /* @embed */ url(images/menu/home.png);
+  /* @embed */
+  background-image: url(images/menu/home.png);
 }
 #mw-mf-menu-main li.icon-random a {
-  background-image: /* @embed */ url(images/menu/random.png);
+  /* @embed */
+  background-image: url(images/menu/random.png);
 }
 #mw-mf-menu-main li.icon-watchlist a {
-  background-image: /* @embed */ url(images/menu/watchlist.png);
+  /* @embed */
+  background-image: url(images/menu/watchlist.png);
 }
 #mw-mf-menu-main li.icon-uploads a {
-  background-image: /* @embed */ url(images/menu/uploads.png);
+  /* @embed */
+  background-image: url(images/menu/uploads.png);
 }
 #mw-mf-menu-main li.icon-nearby a {
-  background-image: /* @embed */ url(images/menu/nearby.png);
+  /* @embed */
+  background-image: url(images/menu/nearby.png);
 }
 #mw-mf-menu-main li.icon-settings a {
-  background-image: /* @embed */ url(images/menu/settings.png);
+  /* @embed */
+  background-image: url(images/menu/settings.png);
 }
 #mw-mf-menu-main li.icon-loginout a {
-  background-image: /* @embed */ url(images/menu/loginout.png);
+  /* @embed */
+  background-image: url(images/menu/loginout.png);
 }
 @media all and (min-width: 700px) {
   .navigationEnabled .alpha #mw-mf-page-left,

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


[MediaWiki-commits] [Gerrit] fundraising banner rotation tweaks - change (operations/puppet)

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

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


Change subject: fundraising banner rotation tweaks
..

fundraising banner rotation tweaks

Change-Id: If058e3c36677172386baa7d82531006cdf5f48a6
---
M manifests/misc/fundraising.pp
1 file changed, 15 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/89/57089/1

diff --git a/manifests/misc/fundraising.pp b/manifests/misc/fundraising.pp
index b74fe61..80dfd92 100644
--- a/manifests/misc/fundraising.pp
+++ b/manifests/misc/fundraising.pp
@@ -445,25 +445,29 @@
 
 class misc::fundraising::udp2log_rotation {
 
-   include accounts::file_mover
+   #include accounts::file_mover
 
-   sudo_user { file_mover: privileges = ['ALL = NOPASSWD: 
/usr/bin/killall -HUP udp2log'] }
+   sudo_user { udp2log: privileges = ['ALL = NOPASSWD: /usr/bin/killall 
-HUP udp2log'] }
 
file {
'/usr/local/bin/rotate_fundraising_logs':
-   owner = file_mover,
-   group = file_mover,
+   owner = udp2log,
+   group = udp2log,
mode = 0554,
source = 
'puppet:///files/misc/scripts/rotate_fundraising_logs';
+   '/a/log/fundraising/logs/':
+   owner = udp2log,
+   group = udp2log,
+   mode = 0750;
}
 
-   cron {
-   'rotate_fundraising_logs':
-   user = file_mover,
-   minute = '*/15',
-   command = '/usr/local/bin/rotate_fundraising_logs',
-   ensure = present;
-   }
+   #cron {
+   #   'rotate_fundraising_logs':
+   #   user = udp2log,
+   #   minute = '*/15',
+   #   command = '/usr/local/bin/rotate_fundraising_logs',
+   #   ensure = present;
+   #}
 
#class { nfs::netapp::fr_archive: mountpoint = 
/a/squid/fundraising/logs/fr_archive }
class { nfs::netapp::fr_archive: mountpoint = 
/a/log/fundraising/logs/fr_archive }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If058e3c36677172386baa7d82531006cdf5f48a6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] fundraising banner rotation tweaks - change (operations/puppet)

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

Change subject: fundraising banner rotation tweaks
..


fundraising banner rotation tweaks

Change-Id: If058e3c36677172386baa7d82531006cdf5f48a6
---
M manifests/misc/fundraising.pp
1 file changed, 15 insertions(+), 11 deletions(-)

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



diff --git a/manifests/misc/fundraising.pp b/manifests/misc/fundraising.pp
index b74fe61..80dfd92 100644
--- a/manifests/misc/fundraising.pp
+++ b/manifests/misc/fundraising.pp
@@ -445,25 +445,29 @@
 
 class misc::fundraising::udp2log_rotation {
 
-   include accounts::file_mover
+   #include accounts::file_mover
 
-   sudo_user { file_mover: privileges = ['ALL = NOPASSWD: 
/usr/bin/killall -HUP udp2log'] }
+   sudo_user { udp2log: privileges = ['ALL = NOPASSWD: /usr/bin/killall 
-HUP udp2log'] }
 
file {
'/usr/local/bin/rotate_fundraising_logs':
-   owner = file_mover,
-   group = file_mover,
+   owner = udp2log,
+   group = udp2log,
mode = 0554,
source = 
'puppet:///files/misc/scripts/rotate_fundraising_logs';
+   '/a/log/fundraising/logs/':
+   owner = udp2log,
+   group = udp2log,
+   mode = 0750;
}
 
-   cron {
-   'rotate_fundraising_logs':
-   user = file_mover,
-   minute = '*/15',
-   command = '/usr/local/bin/rotate_fundraising_logs',
-   ensure = present;
-   }
+   #cron {
+   #   'rotate_fundraising_logs':
+   #   user = udp2log,
+   #   minute = '*/15',
+   #   command = '/usr/local/bin/rotate_fundraising_logs',
+   #   ensure = present;
+   #}
 
#class { nfs::netapp::fr_archive: mountpoint = 
/a/squid/fundraising/logs/fr_archive }
class { nfs::netapp::fr_archive: mountpoint = 
/a/log/fundraising/logs/fr_archive }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If058e3c36677172386baa7d82531006cdf5f48a6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: Jgreen jgr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] WIP: Rewriting the CN UI - change (mediawiki...CentralNotice)

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

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


Change subject: WIP: Rewriting the CN UI
..

WIP: Rewriting the CN UI

Change-Id: I02b1f7f5f5dff7e95528b7c55105f7447227b329
---
M CentralNotice.i18n.php
M CentralNotice.php
M includes/Banner.php
A includes/CN_BannerPager.php
A modules/ext.centralNotice.adminUi.bannerManager/bannermanager.css
A modules/ext.centralNotice.adminUi.bannerManager/bannermanager.js
R modules/ext.centralNotice.adminUi/centralnotice.css
R modules/ext.centralNotice.adminUi/centralnotice.js
R modules/ext.centralNotice.adminUi/down-arrow-ltr.png
R modules/ext.centralNotice.adminUi/down-arrow-rtl.png
R modules/ext.centralNotice.adminUi/up-arrow-ltr.png
R modules/ext.centralNotice.adminUi/up-arrow-rtl.png
M special/SpecialBannerAllocation.php
M special/SpecialCentralNotice.php
A special/SpecialCentralNoticeBanners.php
M special/SpecialCentralNoticeLogs.php
M special/SpecialNoticeTemplate.php
17 files changed, 797 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/90/57090/1

diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php
index 783c042..3ea5138 100644
--- a/CentralNotice.i18n.php
+++ b/CentralNotice.i18n.php
@@ -37,6 +37,8 @@
'centralnotice-manage-templates' = 'Manage banners',
'centralnotice-add' = 'Add',
'centralnotice-add-notice' = 'Add a campaign',
+   'centralnotice-add-notice-button' = 'Create',
+   'centralnotice-add-notice-cancel-button' = 'Cancel',
'centralnotice-edit-notice' = 'Edit campaign',
'centralnotice-add-template' = 'Add a banner',
'centralnotice-show-notices' = 'Show campaigns',
@@ -176,7 +178,7 @@
'centralnotice-apply-filters' = 'Apply filters',
'centralnotice-clear-filters' = 'Clear filters',
'centralnotice-banner-messages' = 'Banner messages',
-   'centralnotice-filter-template-prompt' = 'Banner name contains:',
+   'centralnotice-filter-template-prompt' = 'Filter banners (e.g. Jimmy 
2008)',
'centralnotice-filter-template-submit' = 'Apply filter',
'centralnotice-filter-template-banner' = 'Filter banners',
'centralnotice-priority-low' = 'low',
@@ -197,6 +199,8 @@
'centralnotice-bucket-letter' = 'Bucket $1',
'centralnotice-devicetype-desktop' = 'Desktop Computer',
'centralnotice-all' = 'All',
+   'centralnotice-generic-error' = 'You do not have the correct 
permissions to perform the requested action or the action itself was invalid.',
+   'centralnotice-banner-name-error' = 'Invalid banner name provided. 
Valid names contain only alpha-numeric and underscore characters.'
'centralnotice-all-except' = 'All except $1',
'centralnotice-excluding-list' = '$1 (excluding $2)',
'centralnotice-user-role' = 'User role',
diff --git a/CentralNotice.php b/CentralNotice.php
index 460551a..d6e5584 100644
--- a/CentralNotice.php
+++ b/CentralNotice.php
@@ -56,21 +56,35 @@
'scripts'   = 'jquery.ui.multiselect/ui.multiselect.js',
'styles'= 'jquery.ui.multiselect/ui.multiselect.css',
 );
-$wgResourceModules[ 'ext.centralNotice.interface' ] = array(
+$wgResourceModules[ 'ext.centralNotice.adminUi' ] = array(
'localBasePath' = $dir . '/modules',
'remoteExtPath' = 'CentralNotice/modules',
'dependencies' = array(
'jquery.ui.datepicker',
'jquery.ui.multiselect'
),
-   'scripts'   = 'ext.centralNotice.interface/centralnotice.js',
-   'styles'= 'ext.centralNotice.interface/centralnotice.css',
+   'scripts'   = 'ext.centralNotice.adminUi/centralnotice.js',
+   'styles'= 'ext.centralNotice.adminUi/centralnotice.css',
'messages'  = array(
'centralnotice-documentwrite-error',
'centralnotice-close-title',
'centralnotice-select-all',
'centralnotice-remove-all',
'centralnotice-items-selected'
+   )
+);
+$wgResourceModules[ 'ext.centralNotice.adminUi.bannerManager' ] = array(
+   'localBasePath' = $dir . '/modules',
+   'remoteExtPath' = 'CentralNotice/modules',
+   'dependencies' = array(
+   'ext.centralNotice.adminUi',
+   'jquery.ui.dialog'
+   ),
+   'scripts'   = 
'ext.centralNotice.adminUi.bannerManager/bannermanager.js',
+   'styles'= 
'ext.centralNotice.adminUi.bannerManager/bannermanager.css',
+   'messages'  = array(
+   'centralnotice-add-notice-button',
+   'centralnotice-add-notice-cancel-button'
)
 );
 $wgResourceModules[ 'ext.centralNotice.bannerStats' ] = array(
@@ -299,6 +313,8 @@
$wgAutoloadClasses[ 'SpecialGlobalAllocation' ] = $specialDir . 
'SpecialGlobalAllocation.php';

[MediaWiki-commits] [Gerrit] [Foxway] Register extension - change (translatewiki)

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

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


Change subject: [Foxway] Register extension
..

[Foxway] Register extension

Change-Id: Ia096e78fd28e29ffa3c8fd22d40342e829f35d68
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/91/57091/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 459f0fc..2306c33 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -541,6 +541,8 @@
 
 Formel Applet
 
+Foxway
+
 Fundraiser Landing Page
 # Alias file not added for translation. This special page is not visible for 
the user/reader. Raymond 2011-10-24
 ignored = fundraiserlandingpage-wmch-landing-page, 
fundraiserlandingpage-wmde-landing-page

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia096e78fd28e29ffa3c8fd22d40342e829f35d68
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] [Foxway] Register extension - change (translatewiki)

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

Change subject: [Foxway] Register extension
..


[Foxway] Register extension

Change-Id: Ia096e78fd28e29ffa3c8fd22d40342e829f35d68
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 459f0fc..2306c33 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -541,6 +541,8 @@
 
 Formel Applet
 
+Foxway
+
 Fundraiser Landing Page
 # Alias file not added for translation. This special page is not visible for 
the user/reader. Raymond 2011-10-24
 ignored = fundraiserlandingpage-wmch-landing-page, 
fundraiserlandingpage-wmde-landing-page

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia096e78fd28e29ffa3c8fd22d40342e829f35d68
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] API param validation: Set strict mode for in_array - change (mediawiki/core)

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

Change subject: API param validation: Set strict mode for in_array
..


API param validation: Set strict mode for in_array

The in_array gives true when the allowed values contains a 0 as value,
for example by namespaces,

action=querylist=allpagesapnamespace=test|tset

was not rejected

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

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



diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 741e908..84a6ed9 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -1081,7 +1081,7 @@
 
if ( !$allowMultiple  count( $valuesList ) != 1 ) {
// Bug 33482 - Allow entries with | in them for 
non-multiple values
-   if ( in_array( $value, $allowedValues ) ) {
+   if ( in_array( $value, $allowedValues, true ) ) {
return $value;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9220a955ffaf2bcb0d1d5b27c948af2f85714110
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Yurik yu...@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] QUnit: Ensure test modules are top loading. - change (mediawiki/core)

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

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


Change subject: QUnit: Ensure test modules are top loading.
..

QUnit: Ensure test modules are top loading.

Jenkins tests for extensions where exiting with a false positive.
They were marked success but in fact were wrong because
it only ran the core tests, the extensions' test suite was
loaded after QUnit already stopped listening.

Change-Id: I164d60e06118b64a1c6a17665a0fb1faeff744e5
---
M includes/resourceloader/ResourceLoader.php
M tests/qunit/QUnitTestResources.php
2 files changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 62c0822..589a354 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -287,6 +287,10 @@
// Add the testrunner (which configures QUnit) to the 
dependencies.
// Since it must be ready before any of the test suites are 
executed.
foreach( $testModules['qunit'] as $moduleName = $moduleProps ) 
{
+   // Make sure all test modules are top-loading so that 
when QUnit starts
+   // on document-ready, it will run once and finish. If 
some tests arrive
+   // later (possibly after QUnit has already finished) 
they will be ignored.
+   $testModules['qunit'][$moduleName]['position'] = 'top';
$testModules['qunit'][$moduleName]['dependencies'][] = 
'mediawiki.tests.qunit.testrunner';
}
 
diff --git a/tests/qunit/QUnitTestResources.php 
b/tests/qunit/QUnitTestResources.php
index 01072d8..36fdbcc 100644
--- a/tests/qunit/QUnitTestResources.php
+++ b/tests/qunit/QUnitTestResources.php
@@ -61,6 +61,5 @@
'mediawiki.language',
'mediawiki.cldr',
),
-   'position' = 'top',
)
 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I164d60e06118b64a1c6a17665a0fb1faeff744e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] (bug 46787) API: Fix rccontinue handling - change (mediawiki/core)

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

Change subject: (bug 46787) API: Fix rccontinue handling
..


(bug 46787) API: Fix rccontinue handling

There are several bugs in Icc43b62f:
* When handing the continuation, the code checks for dir=descending when
  the actual value is dir=older.
* When the above is fixed, the continuation code assumes ORDER BY
  rc_timestamp DESC, rc_id ASC, which would filesort.
* rc_id is not added to the ORDER BY clause anyway.

Bug: 46787
Change-Id: Ia6ebd4ea0458b8013d4ecb71954dcfbdacff2c00
---
M includes/api/ApiQueryRecentChanges.php
1 file changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/includes/api/ApiQueryRecentChanges.php 
b/includes/api/ApiQueryRecentChanges.php
index 72e80b8..8aceab2 100644
--- a/includes/api/ApiQueryRecentChanges.php
+++ b/includes/api/ApiQueryRecentChanges.php
@@ -159,15 +159,20 @@
 
$timestamp = $this-getDB()-addQuotes( wfTimestamp( 
TS_MW, $cont[0] ) );
$id = intval( $cont[1] );
-   $op = $params['dir'] == 'descending' ? '' : '';
+   $op = $params['dir'] === 'older' ? '' : '';
 
$this-addWhere(
rc_timestamp $op $timestamp OR  .
(rc_timestamp = $timestamp AND  .
-   rc_id = $id)
+   rc_id $op= $id)
);
}
 
+   $order = $params['dir'] === 'older' ? 'DESC' : 'ASC';
+   $this-addOption( 'ORDER BY', array(
+   rc_timestamp $order,
+   rc_id $order,
+   ) );
 
$this-addWhereFld( 'rc_namespace', $params['namespace'] );
$this-addWhereFld( 'rc_deleted', 0 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6ebd4ea0458b8013d4ecb71954dcfbdacff2c00
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Greg Grossmeier g...@wikimedia.org
Gerrit-Reviewer: MarkAHershberger mhershber...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Yurik yu...@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] QA Design Tweaks to copyright dialog - change (mediawiki...MobileFrontend)

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

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


Change subject: QA Design Tweaks to copyright dialog
..

QA Design Tweaks to copyright dialog

change button to blue
allow buttons with class .confirm to close overlay
fix margins on list in copyright dialog

Change-Id: Ic1397b6e893eab54a23f43f644559d198e5e6cb5
---
M javascripts/common/mf-navigation.js
M less/common/mf-navigation.less
M stylesheets/common/mf-navigation.css
M templates/overlays/photoCopyrightDialog.html
4 files changed, 16 insertions(+), 5 deletions(-)


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

diff --git a/javascripts/common/mf-navigation.js 
b/javascripts/common/mf-navigation.js
index 6a0efdb..1daff43 100644
--- a/javascripts/common/mf-navigation.js
+++ b/javascripts/common/mf-navigation.js
@@ -71,7 +71,7 @@
var self = this;
this.parent = options.parent;
this.isOpened = false;
-   this.$( '.cancel' ).click( function( ev ) {
+   this.$( '.cancel,.confirm' ).click( function( ev ) {
ev.preventDefault();
self.hide();
} );
diff --git a/less/common/mf-navigation.less b/less/common/mf-navigation.less
index 5e5d4d9..504bb76 100644
--- a/less/common/mf-navigation.less
+++ b/less/common/mf-navigation.less
@@ -104,6 +104,7 @@
.content {
margin-top: @headingMarginTop;
 
+   .confirm,
.cancel {
display: block;
margin: auto;
@@ -204,8 +205,13 @@
list-style: none;
 
.informative {
-   list-style: inside square;
-   margin-bottom: 8px;
+   margin-left: 16px;
+   list-style: outside square;
+   margin-bottom: 16px;
+
+   li {
+   margin-bottom: 8px;
+   }
}
 }
 
diff --git a/stylesheets/common/mf-navigation.css 
b/stylesheets/common/mf-navigation.css
index 0010751..3ce7068 100644
--- a/stylesheets/common/mf-navigation.css
+++ b/stylesheets/common/mf-navigation.css
@@ -97,6 +97,7 @@
 .mw-mf-overlay .content {
   margin-top: 14pt;
 }
+.mw-mf-overlay .content .confirm,
 .mw-mf-overlay .content .cancel {
   display: block;
   margin: auto;
@@ -176,7 +177,11 @@
   list-style: none;
 }
 .overlay ul.informative {
-  list-style: inside square;
+  margin-left: 16px;
+  list-style: outside square;
+  margin-bottom: 16px;
+}
+.overlay ul.informative li {
   margin-bottom: 8px;
 }
 a.escapeOverlay,
diff --git a/templates/overlays/photoCopyrightDialog.html 
b/templates/overlays/photoCopyrightDialog.html
index e1f5e4b..b67b942 100644
--- a/templates/overlays/photoCopyrightDialog.html
+++ b/templates/overlays/photoCopyrightDialog.html
@@ -9,5 +9,5 @@
li{{text}}/li
{{/bulletPoints}}
/ul
-   button class=cancel{{closeText}}/button
+   button class=confirm{{closeText}}/button
 /div

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

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

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


[MediaWiki-commits] [Gerrit] Add a user preference to enable collaboration by default - change (mediawiki...EtherEditor)

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

Change subject: Add a user preference to enable collaboration by default
..


Add a user preference to enable collaboration by default

Useful for people who know they'll be collaborating often.

Change-Id: I3acf9bc043958527461810972b318278eb9cb6c0
Bug: 39389
---
M EtherEditor.i18n.php
M EtherEditor.php
M EtherEditorHooks.php
M modules/ext.etherEditor.js
4 files changed, 24 insertions(+), 6 deletions(-)

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



diff --git a/EtherEditor.i18n.php b/EtherEditor.i18n.php
index 5d4f691..8063d28 100644
--- a/EtherEditor.i18n.php
+++ b/EtherEditor.i18n.php
@@ -36,6 +36,7 @@
'ethereditor-switch-to-session' = 'Switch to this session',
'ethereditor-recover-session' = 'Recover this session',
'ethereditor-leave' = ' Collaboration mode is disabled',
+   'ethereditor-preference-button' = 'Enable EtherEditor by default',
 );
 
 /** Message documentation (Message documentation)
diff --git a/EtherEditor.php b/EtherEditor.php
index 2d1e8f5..faa8ab3 100644
--- a/EtherEditor.php
+++ b/EtherEditor.php
@@ -43,6 +43,7 @@
 
 $wgSpecialPages['EtherEditor'] = 'SpecialEtherEditor';
 $wgSpecialPageGroups['EtherEditor'] = 'pagetools';
+$wgHooks['GetPreferences'][] = 'EtherEditorHooks::getUserPreference';
 
 $wgHooks['UnitTestsList'][] = 'EtherEditorHooks::registerUnitTests';
 
diff --git a/EtherEditorHooks.php b/EtherEditorHooks.php
index 6239eab..60a9720 100644
--- a/EtherEditorHooks.php
+++ b/EtherEditorHooks.php
@@ -79,6 +79,21 @@
}
 
/**
+   * Hook: GetUserPreferences
+   * @param User $user
+   * @param array $preferences
+   * @return bool
+   */
+   public static function getUserPreference( $user, $preferences ) {
+   $preferences['enableether'] = array(
+   'type' = 'toggle',
+   'label-message' = 'ethereditor-preference-button',
+   'section' = 'editing/advancedediting',
+   );
+   return true;
+   }
+
+   /**
 * EditPage::showEditForm:initial hook
 *
 * Adds the modules to the edit form
diff --git a/modules/ext.etherEditor.js b/modules/ext.etherEditor.js
index bbd8545..22eca60 100644
--- a/modules/ext.etherEditor.js
+++ b/modules/ext.etherEditor.js
@@ -75,7 +75,7 @@
return false; // there was an error, clearly, so let's 
quit
}
_this.initializeControls( function () {
-   if ( _this.uri.query.collaborate ) {
+   if ( _this.uri.query.collaborate || 
mw.user.options.get( 'enableether' ) ) {
if ( _this.uri.query.padId ) {
var thepad = false;
for ( var px in _this.pads ) {
@@ -504,7 +504,7 @@
 
for ( var i = 2; i  6; i++ ) {
var $headings = $( 'a[rel=heading-' + i + ']' );
-   $headings.click( ( 
+   $headings.click( (
function( thisi ) {
return function () {
_this.sendMessage( { 
heading: thisi } );
@@ -550,15 +550,15 @@
/**
* Display message that you leave collaborative editor
*/
-   var $collabLabel1 = $( 'span 
class=leave-msg/span' );
-   $collabLabel1.text( mw.msg( 'ethereditor-leave' ) );
+   var $collabLabel = $( 'span class=leave-msg/span' 
);
+   $collabLabel.text( mw.msg( 'ethereditor-leave' ) );
$turnOnCollab.click( function () {
var $this = $( this );
if ( $this.is( ':checked' ) ) {
-   $collabLabel1.detach();
+   $collabLabel.detach();
_this.enableEther();
} else {
-   _this.$ctrls.before($collabLabel1);
+   _this.$ctrls.before($collabLabel);
_this.disableEther();
}
} );
@@ -577,6 +577,7 @@
_this.$pctrls.attr( 'id', 'ethereditor-pad-ctrls' );
_this.$ctrls.append( _this.$pctrls );
 
+
var eventHandle = function () {
this.selectionStart = 0;
this.selectionEnd = $( this 

[MediaWiki-commits] [Gerrit] i18n: Reword bullet point 3 - change (mediawiki...MobileFrontend)

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

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


Change subject: i18n: Reword bullet point 3
..

i18n: Reword bullet point 3

Remove repetition of word 'free'

Change-Id: I7e5ecb80114b094e0981de399d0a1dc65b337f89
---
M MobileFrontend.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index c408c35..35364dc 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -237,7 +237,7 @@
'mobile-frontend-photo-ownership-confirm' = 'Got it!',
'mobile-frontend-photo-ownership-bullet-one' = 'We can only accept 
photos that you took yourself. Please do not upload images you found somewhere 
else on the Internet.',
'mobile-frontend-photo-ownership-bullet-two' = 'Copyrighted and 
inappropriate images will be removed.',
-   'mobile-frontend-photo-ownership-bullet-three' = 'Your uploads are 
released under a free license and can be reused by anyone for free.',
+   'mobile-frontend-photo-ownership-bullet-three' = 'Your uploads are 
released under a license that allows anyone to reuse them for free.',
'mobile-frontend-image-uploading-wait' = 'Uploading image, please 
wait.',
'mobile-frontend-image-uploading-long' = 'Image still uploading! 
Thanks for your patience.',
'mobile-frontend-image-uploading-cancel' = 'a href=#Cancel/a if 
this is taking too long.',

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

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

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


[MediaWiki-commits] [Gerrit] fix fundraising log rotation path - change (operations/puppet)

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

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


Change subject: fix fundraising log rotation path
..

fix fundraising log rotation path

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/57096/1

diff --git a/manifests/misc/fundraising.pp b/manifests/misc/fundraising.pp
index 80dfd92..128e471 100644
--- a/manifests/misc/fundraising.pp
+++ b/manifests/misc/fundraising.pp
@@ -455,7 +455,7 @@
group = udp2log,
mode = 0554,
source = 
'puppet:///files/misc/scripts/rotate_fundraising_logs';
-   '/a/log/fundraising/logs/':
+   '/a/log/fundraising/logs/buffer':
owner = udp2log,
group = udp2log,
mode = 0750;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd39869352ea450bfc04eb7dde2b49eab39fd20a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] fix fundraising log rotation path - change (operations/puppet)

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

Change subject: fix fundraising log rotation path
..


fix fundraising log rotation path

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

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



diff --git a/manifests/misc/fundraising.pp b/manifests/misc/fundraising.pp
index 80dfd92..128e471 100644
--- a/manifests/misc/fundraising.pp
+++ b/manifests/misc/fundraising.pp
@@ -455,7 +455,7 @@
group = udp2log,
mode = 0554,
source = 
'puppet:///files/misc/scripts/rotate_fundraising_logs';
-   '/a/log/fundraising/logs/':
+   '/a/log/fundraising/logs/buffer':
owner = udp2log,
group = udp2log,
mode = 0750;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd39869352ea450bfc04eb7dde2b49eab39fd20a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: Jgreen jgr...@wikimedia.org

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


  1   2   3   >