[MediaWiki-commits] [Gerrit] mw.ViewPageTarget.init: Move edit section to top init. - change (mediawiki...VisualEditor)

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

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


Change subject: mw.ViewPageTarget.init: Move edit section to top init.
..

mw.ViewPageTarget.init: Move edit section to top init.

Since we're now only loading the light weight init on page load,
the section editing wasn't just deferred to after page load (like
it was before), but wasn't happening at all until you clicked
Edit (at which point the library loads). It only worked when
going back to View after Edit.

Contrary to tab layout, edit section handling needs to behe
accessible both in the top init and in the main target class
because we need to run it both at run time and after the user
has saved a page when we show them the updated page without
refresh. This is why we need to transfer the method at run time
and give the main class access to it as well.
Can't wait for bug 50707 to get rid of this mess...

Bug: 50731
Change-Id: Iab9c81222df7f1084179c3643d158374a89ca14b
---
M VisualEditor.php
M modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.css
A modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
5 files changed, 182 insertions(+), 170 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index 3348972..f107715 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -153,22 +153,23 @@
),
),
'ext.visualEditor.viewPageTarget.init' = 
$wgVisualEditorResourceTemplate + array(
-   'scripts' = array(
-   've-mw/init/targets/ve.init.mw.ViewPageTarget.init.js',
-   ),
+   'scripts' = 
've-mw/init/targets/ve.init.mw.ViewPageTarget.init.js',
+   'styles' = 
've-mw/init/styles/ve.init.mw.ViewPageTarget.init.css',
'dependencies' = array(
'jquery.client',
'mediawiki.Uri',
'mediawiki.util',
),
'messages' = array(
-   'accesskey-ca-ve-edit',
'accesskey-ca-editsource',
+   'accesskey-ca-ve-edit',
+   'pipe-separator',
'tooltip-ca-createsource',
'tooltip-ca-editsource',
'tooltip-ca-ve-edit',
'visualeditor-ca-createsource',
'visualeditor-ca-editsource',
+   'visualeditor-ca-editsource-section',
'visualeditor-ca-ve-create',
'visualeditor-ca-ve-edit',
),
@@ -218,8 +219,6 @@
'editing',
 
// Messages needed by VE in init phase only (rest go 
below)
-   'pipe-separator',
-   'visualeditor-ca-editsource-section',
'visualeditor-loadwarning',
'visualeditor-loadwarning-token',
'visualeditor-notification-created',
diff --git a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.css 
b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.css
index afa3baf..4b67376 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.css
@@ -322,45 +322,6 @@
outline: none;
 }
 
-/* Section edit links */
-
-.mw-editsection {
-   white-space: nowrap;
-   padding-right: 0.25em;
-   /* bidi isolation: */
-   unicode-bidi: -moz-isolate;
-   unicode-bidi: -webkit-isolate;
-   unicode-bidi: isolate;
-}
-
-.mw-editsection-divider {
-   color: #ccc;
-}
-
-.mw-editsection-bracket {
-   -webkit-transition: color 100ms ease-out, margin 100ms ease-out;
-   -moz-transition: color 100ms ease-out, margin 100ms ease-out;
-   -ms-transition: color 100ms ease-out, margin 100ms ease-out;
-   -o-transition: color 100ms ease-out, margin 100ms ease-out;
-   transition: color 100ms ease-out, margin 100ms ease-out;
-}
-
-/* @noflip */
-.mw-content-ltr .mw-editsection-expanded .mw-editsection-bracket:first-of-type,
-.mw-content-rtl .mw-editsection-expanded 
.mw-editsection-bracket:not(:first-of-type) {
-   margin-left: -0.25em;
-   margin-right: 0.25em;
-   color: #ccc;
-}
-
-/* @noflip */
-.mw-content-rtl .mw-editsection-expanded .mw-editsection-bracket:first-of-type,
-.mw-content-ltr .mw-editsection-expanded 
.mw-editsection-bracket:not(:first-of-type) {
-   margin-right: -0.25em;
-   margin-left: 0.25em;
-   color: #ccc;
-}
-
 /* Images */
 
 .ve-init-mw-viewPageTarget-loading,
diff --git a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.init.css 

[MediaWiki-commits] [Gerrit] mw.ViewPageTarget.init: Add missing accesskey-ca-editsource... - change (mediawiki...VisualEditor)

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

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


Change subject: mw.ViewPageTarget.init: Add missing accesskey-ca-editsource 
message
..

mw.ViewPageTarget.init: Add missing accesskey-ca-editsource message

Added the wrong one, message accesskey-ca-ve-editsource
doesn't even exist. It worked locally but that was probably
a lucky race condition or cache.

Follows-up 10fd1a3, b21fe5f.

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


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

diff --git a/VisualEditor.php b/VisualEditor.php
index cfa257b..3348972 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -163,7 +163,7 @@
),
'messages' = array(
'accesskey-ca-ve-edit',
-   'accesskey-ca-ve-editsource',
+   'accesskey-ca-editsource',
'tooltip-ca-createsource',
'tooltip-ca-editsource',
'tooltip-ca-ve-edit',

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

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

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


[MediaWiki-commits] [Gerrit] Remove dependency on deployment scripts from translationnoti... - change (operations/puppet)

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

Change subject: Remove dependency on deployment scripts from 
translationnotifications
..


Remove dependency on deployment scripts from translationnotifications

misc::maintenance::translationnotifications is declared for two hosts, terbium
and hume. On hume it is set with 'enabled = false' with the helpful comment
that it had been moved to terbium. It should have only been set to false once
(for clean up) and then removed from hume's manifest. I removed it, along with
other long-disabled jobs.

terbium already includes misc::deployment::vars by way of
misc::deployment::scap_scripts, so it's a question of which declaration to
remove. Keeping it via the translationnotifications task would make other cron
jobs dependent on the scap scripts to break if the translationnotification cron
job were ever to be disabled. It makes more sense to declare the dependency at
the outermost level.

Change-Id: I805167af2e7bc8334fe818cac4378ffedacf1330
---
M manifests/misc/maintenance.pp
M manifests/site.pp
2 files changed, 0 insertions(+), 13 deletions(-)

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 833ba16..6c1508f 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -101,8 +101,6 @@
 }
 
 class misc::maintenance::translationnotifications( $enabled = false ) {
-   require misc::deployment::scripts
-
# Should there be crontab entry for each wiki,
# or just one which runs the scripts which iterates over
# selected set of wikis?
diff --git a/manifests/site.pp b/manifests/site.pp
index 3cbdf86..ee08e30 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1175,17 +1175,6 @@
nrpe
 
 
-   # Moved to terbium
-   class { misc::maintenance::foundationwiki: enabled = false }
-   class { misc::maintenance::pagetriage: enabled = false }
-   class { misc::maintenance::translationnotifications: enabled = false }
-   class { misc::maintenance::wikidata: enabled = false }
-   class { misc::maintenance::echo_mail_batch: enabled = false }
-   class { misc::maintenance::parsercachepurging: enabled = false }
-   class { misc::maintenance::cleanup_upload_stash: enabled = false }
-   class { misc::maintenance::tor_exit_node: enabled = false }
-   class { misc::maintenance::aft5: enabled = false }
-
# These cron jobs were left behind for some reason:
 
# foreachwikiindblist broken

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I805167af2e7bc8334fe818cac4378ffedacf1330
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh o...@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] changed the remote ext path to Annotator instead of prototyp... - change (mediawiki...Annotator)

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

Change subject: changed the remote ext path to Annotator instead of prototyping 
inline comments
..


changed the remote ext path to Annotator instead of prototyping inline comments

Change-Id: I2f8c7fea03d451d0a974e86f420e1c71e15ebd5d
---
M Annotator.php
M README.md
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/Annotator.php b/Annotator.php
index 750f94d..b8fcce4 100755
--- a/Annotator.php
+++ b/Annotator.php
@@ -9,7 +9,7 @@
 //Resource Modules
 $wgAnnotatorResourcePaths = array(
'localBasePath' = __DIR__ . '/modules',
-   'remoteExtPath' = Prototyping-inline-comments/modules,
+   'remoteExtPath' = Annotator/modules,
 );
 $wgResourceModules['ext.annotator'] = array(
'scripts' = array(
diff --git a/README.md b/README.md
index 1879f97..414f366 100644
--- a/README.md
+++ b/README.md
@@ -6,5 +6,5 @@
 
 Installation
 ===
-Install it by adding 
require_once($IP/extensions/Prototyping-inline-comments/Annotator.php); to 
your Localsettings.php
+Install it by adding require_once($IP/extensions/Annotator/Annotator.php); 
to your Localsettings.php
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f8c7fea03d451d0a974e86f420e1c71e15ebd5d
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Annotator
Gerrit-Branch: master
Gerrit-Owner: Rjain richa.jain1...@gmail.com
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: Rjain richa.jain1...@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] Added the api endpoint and called the store plugin. - change (mediawiki...Annotator)

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

Change subject: Added the api endpoint and called the store plugin.
..


Added the api endpoint and called the store plugin.

Change-Id: I86a87e4fdfe027767f938dc2751e1f2d82b063f4
---
M modules/Annotator.js
1 file changed, 15 insertions(+), 3 deletions(-)

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



diff --git a/modules/Annotator.js b/modules/Annotator.js
index d1382f0..613b58a 100644
--- a/modules/Annotator.js
+++ b/modules/Annotator.js
@@ -3,7 +3,19 @@
 */
 ( function ( mw, $ ) {
   $( function( $ ) {
-   $('#mw-content-text').annotator();
+//get the endpoint of the api
+this.apiUrl = mw.util.wikiScript('api');
+//Call the annotations
+var annotations = $('#mw-content-text').annotator();
+//Add the store plugin and modify the urls according to mediawiki api
+annotations.annotator('addPlugin', 'Store', {
+  prefix: this.apiUrl,
+  urls: {
+create: '',
+update: '',
+read: '',
+destroy: '',
+  }
+});
   } )
-}( mediaWiki, jQuery ) );
-
+}( mediaWiki, jQuery ) );
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I86a87e4fdfe027767f938dc2751e1f2d82b063f4
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/Annotator
Gerrit-Branch: master
Gerrit-Owner: Rjain richa.jain1...@gmail.com
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] mw.ViewPageTarget: Only pass oldid if we have to and clear/u... - change (mediawiki...VisualEditor)

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

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


Change subject: mw.ViewPageTarget: Only pass oldid if we have to and 
clear/update it on save
..

mw.ViewPageTarget: Only pass oldid if we have to and clear/update it on save

Bug: 50441
Change-Id: I221e5038f95eadf6d87013e80f12394f0376a293
---
M ApiVisualEditor.php
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
M modules/ve-mw/init/ve.init.mw.Target.js
3 files changed, 49 insertions(+), 22 deletions(-)


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

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 183a120..e512fbb 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -9,6 +9,7 @@
  */
 
 class ApiVisualEditor extends ApiBase {
+
protected function getHTML( $title, $parserParams ) {
global $wgVisualEditorParsoidURL, $wgVisualEditorParsoidPrefix,
$wgVisualEditorParsoidTimeout;
@@ -16,15 +17,22 @@
$restoring = false;
 
if ( $title-exists() ) {
-   if ( $parserParams['oldid'] === 0 ) {
-   $parserParams['oldid'] = ''; // Parsoid wants 
empty string rather than zero
+   $revision = null;
+   if ( !isset( $parserParams['oldid'] ) || 
$parserParams['oldid'] === 0 ) {
+   // Parsoid wants empty string rather than zero
+   $parserParams['oldid'] = '';
+   } else {
+   $revision = Revision::newFromId( 
$parserParams['oldid'] );
+   if ( $revision === null ) {
+   return false;
+   }
}
-   $revision = Revision::newFromId( $parserParams['oldid'] 
);
+
$latestRevision = Revision::newFromTitle( $title );
-   if ( $revision === null || $latestRevision === null ) {
+   if ( $latestRevision === null ) {
return false;
}
-   $restoring = !$revision-isCurrent();
+   $restoring = $revision  !$revision-isCurrent();
 
# Disable cache busting as the Parsoid extension keeps 
templates
# up to date.
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 7548800..d1458e3 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -69,7 +69,7 @@
this.scrollTop = null;
this.currentUri = currentUri;
this.messages = {};
-   this.restoring = this.oldid !== mw.config.get( 'wgCurRevisionId' );
+   this.restoring = !!this.oldid;
this.section = currentUri.query.vesection || null;
this.namespaceName = mw.config.get( 'wgCanonicalNamespace' );
this.viewUri = new mw.Uri( mw.util.wikiGetlink( this.pageName ) );
@@ -397,9 +397,15 @@
watchChecked ? 'unwatch': 'watch'
);
}
+
+   // If we were explicitly editing an older version, make sure we 
don't edit the same
+   // version again now that we've saved
+   this.oldid = null;
+
if ( newid !== undefined ) {
-   this.oldid = newid;
+   this.revid = newid;
}
+
this.hideSaveDialog();
this.resetSaveDialog();
this.replacePageContent( html );
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 958c28a..252373b 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -16,16 +16,20 @@
  * @constructor
  * @param {jQuery} $container Conainter to render target into
  * @param {string} pageName Name of target page
- * @param {number} [revision] Revision ID
+ * @param {number} [revisionId] If the editor should activate for a specific 
version of the page,
+ *  set the revision id here. Otherwise editor will load whatever the latest 
version is (which by
+ *  design may not be the same version the user is viewing – page could be 
cached or edited while
+ *  reading).
  */
-ve.init.mw.Target = function VeInitMwTarget( $container, pageName, revision ) {
+ve.init.mw.Target = function VeInitMwTarget( $container, pageName, revisionId 
) {
// Parent constructor
ve.init.Target.call( this, $container );
 
// Properties
this.pageName = pageName;
this.pageExists = mw.config.get( 'wgArticleId', 0 ) !== 0;
-   

[MediaWiki-commits] [Gerrit] [CloseWikis] [InlineCategorizer] Re-register extensions afte... - change (translatewiki)

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

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


Change subject: [CloseWikis] [InlineCategorizer] Re-register extensions after 
merging from SVN
..

[CloseWikis] [InlineCategorizer] Re-register extensions after merging from SVN

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/71/72071/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index ba30d55..e66f99a 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -182,6 +182,10 @@
 
 Client Side
 
+Close Wikis
+aliasfile = CloseWikis/CloseWikis.alias.php
+ignored = closewikis-closed
+
 Code Editor
 
 Code Review
@@ -666,6 +670,8 @@
 descmsg = imagemap_desc
 optional = imagemap_desc_types
 
+Inline Categorizer
+
 # Inline Editor: Disabled per 
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/82789#c14456
 
 Input Box

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfbcbadb16f59e4c879e44f918be374792b7c5ce
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] [CloseWikis] [InlineCategorizer] Re-register extensions afte... - change (translatewiki)

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

Change subject: [CloseWikis] [InlineCategorizer] Re-register extensions after 
merging from SVN
..


[CloseWikis] [InlineCategorizer] Re-register extensions after merging from SVN

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

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



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index ba30d55..e66f99a 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -182,6 +182,10 @@
 
 Client Side
 
+Close Wikis
+aliasfile = CloseWikis/CloseWikis.alias.php
+ignored = closewikis-closed
+
 Code Editor
 
 Code Review
@@ -666,6 +670,8 @@
 descmsg = imagemap_desc
 optional = imagemap_desc_types
 
+Inline Categorizer
+
 # Inline Editor: Disabled per 
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/82789#c14456
 
 Input Box

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

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

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


[MediaWiki-commits] [Gerrit] Update VE to master for labs - change (mediawiki/extensions)

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

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


Change subject: Update VE to master for labs
..

Update VE to master for labs

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


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

diff --git a/VisualEditor b/VisualEditor
index 817d24d..330c392 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 817d24dd50cb5aa7031aa5c5793a2cd70228e2fc
+Subproject commit 330c39215c9e8122d85a5cf1d5069ed795acb986

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

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

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


[MediaWiki-commits] [Gerrit] Update VE to master for labs - change (mediawiki/extensions)

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

Change subject: Update VE to master for labs
..


Update VE to master for labs

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

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



diff --git a/VisualEditor b/VisualEditor
index 817d24d..330c392 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 817d24dd50cb5aa7031aa5c5793a2cd70228e2fc
+Subproject commit 330c39215c9e8122d85a5cf1d5069ed795acb986

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

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

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


[MediaWiki-commits] [Gerrit] Refactoring, compiler is used instead of the interpreter (ve... - change (mediawiki...Foxway)

2013-07-05 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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


Change subject: Refactoring, compiler is used instead of the interpreter 
(version 0.6.0)
..

Refactoring, compiler is used instead of the interpreter (version 0.6.0)

Change-Id: Ia8b2150cd328a546e3ccb663d5b48a245dafe132
---
M Foxway.php
A includes/Compiler.php
M includes/Runtime.php
M tests/phpunit/includes/InterpreterTest.php
A tests/phpunit/includes/RuntimeTest.php
5 files changed, 240 insertions(+), 2 deletions(-)


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

diff --git a/Foxway.php b/Foxway.php
index efcdc10..8efca14 100644
--- a/Foxway.php
+++ b/Foxway.php
@@ -15,7 +15,7 @@
die( 'This file is an extension to MediaWiki and thus not a valid entry 
point.' );
 }
 
-define( 'Foxway_VERSION' , '0.5.2' );
+define( 'Foxway_VERSION' , '0.6.0' );
 
 // Register this extension on Special:Version
 $wgExtensionCredits['parserhook'][] = array(
@@ -66,6 +66,7 @@
 $wgAutoloadClasses['Foxway\\Debug']= $dir . 
'/includes/Debug.php';
 $wgAutoloadClasses['Foxway\\ErrorMessage'] = $dir . 
'/includes/ErrorMessage.php';
 $wgAutoloadClasses['Foxway\\Interpreter']  = $dir . 
'/includes/Interpreter.php';
+$wgAutoloadClasses['Foxway\\Compiler'] = $dir . 
'/includes/Compiler.php';
 $wgAutoloadClasses['Foxway\\RArray']   = $dir . 
'/includes/RArray.php';
 $wgAutoloadClasses['Foxway\\ROutput']  = $dir . 
'/includes/ROutput.php';
 $wgAutoloadClasses['Foxway\\RValue']   = $dir . 
'/includes/RValue.php';
diff --git a/includes/Compiler.php b/includes/Compiler.php
new file mode 100644
index 000..7a75ef0
--- /dev/null
+++ b/includes/Compiler.php
@@ -0,0 +1,123 @@
+?php
+namespace Foxway;
+
+define( 'FOXWAY_STACK_RESULT', 0 );
+define( 'FOXWAY_STACK_COMMAND', 1 );
+define( 'FOXWAY_STACK_PARAM1', 2 );
+
+//define( '', )
+
+/**
+ * Compiler class of Foxway extension.
+ * This class converts a php code as data for the class Runtime
+ *
+ * @file Compiler.php
+ * @ingroup Foxway
+ * @author Pavel Astakhov pastak...@yandex.ru
+ * @licence GNU General Public Licence 2.0 or later
+ */
+class Compiler {
+   public static function compile($source, $is_debug=false) {
+   $tokens = self::getTokens($source);
+   $return = array();
+   $stack = array();
+   $futureStack = array(FOXWAY_STACK_RESULT = null);
+   
+   $countTokens = count($tokens);
+   for( $index = 0; $index  $countTokens; $index++ ){
+   $token = $tokens[$index];
+   if ( is_string($token) ) {
+   $id = $token;
+   } else {
+   list($id, $text, $tokenLine) = $token;
+   }
+   
+   switch ($id) {
+   case T_ECHO: // echo
+   $res = self::compileExpression($tokens, 
$countTokens, $index);
+   //var_dump($res);
+   $return += $res;
+   $return[] = array( FOXWAY_STACK_COMMAND 
= $id, FOXWAY_STACK_PARAM1 = $return[count($return)-1][FOXWAY_STACK_RESULT] 
);
+   break;
+   }
+   }
+   //var_dump($return);
+   return $return;
+   }
+
+   private static function compileExpression($tokens, $countTokens, 
$index) {
+   $defStak = array();
+   $stack = array();
+   $futureStack = array(FOXWAY_STACK_RESULT=null);
+
+   for( $index++; $index  $countTokens; $index++ ){
+   $token = $tokens[$index];
+   if ( is_string($token) ) {
+   $id = $token;
+   } else {
+   list($id, $text, $tokenLine) = $token;
+   }
+
+   switch ($id) {
+   case T_WHITESPACE:
+   break;
+   case T_CONSTANT_ENCAPSED_STRING:
+   $futureStack[FOXWAY_STACK_COMMAND] = 
T_CONST; // Copy param to result
+   if( substr($text, 0, 1) == '\'' ) {
+   
$futureStack[FOXWAY_STACK_PARAM1] = self::process_slashes_apostrophe( 
substr($text, 1, -1) );
+   }else{
+   
$futureStack[FOXWAY_STACK_PARAM1] = self::process_slashes( substr($text, 1, -1) 
);
+   }
+   

[MediaWiki-commits] [Gerrit] Cog size adjustments - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Cog size adjustments
..

Cog size adjustments

Bug: 50742
SVG and PNG versions have been modified to be of the same dimensions.
The sprite now is a 14x14px cog with an additional
 transparent pixel above and below. resulting in two 14x16px areas.
The added margin solves the problem of image being cropped when zooming.

Change-Id: Iab4f578bdb1ea55c51eb528527fc38ce44c7be69
---
M resources/css/ext.uls.css
M resources/images/cog-sprite.png
M resources/images/cog-sprite.svg
3 files changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/resources/css/ext.uls.css b/resources/css/ext.uls.css
index ad73afc..04e205e 100644
--- a/resources/css/ext.uls.css
+++ b/resources/css/ext.uls.css
@@ -13,8 +13,7 @@
background-image: -webkit-linear-gradient(transparent, transparent), 
url('../images/cog-sprite.svg');
background-image: -moz-linear-gradient(transparent, transparent), 
url('../images/cog-sprite.svg');
background-image: linear-gradient(transparent, transparent), 
url('../images/cog-sprite.svg');
-   background-size: 14px auto;
-   height: 14px;
+   height: 16px;
width: 14px;
float: right;
cursor: pointer;
@@ -26,7 +25,7 @@
 }
 
 #p-lang .uls-settings-trigger:hover {
-   background-position: right -18px;
+   background-position: right -16px;
 }
 
 /* Opera for some inexplicable reason confuses right and left padding with */
diff --git a/resources/images/cog-sprite.png b/resources/images/cog-sprite.png
index 04c7aa2..7dd54f6 100644
--- a/resources/images/cog-sprite.png
+++ b/resources/images/cog-sprite.png
Binary files differ
diff --git a/resources/images/cog-sprite.svg b/resources/images/cog-sprite.svg
index 75cd2a2..dacda0e 100644
--- a/resources/images/cog-sprite.svg
+++ b/resources/images/cog-sprite.svg
@@ -19,11 +19,11 @@
id=defs6 /
 
 path
-   d=m 6.032,18 c -0.231,0 -0.418,0.187 -0.418,0.418 v 1.064 c -0.541,0.134 
-1.062,0.35 -1.551,0.645 l -0.75,-0.75 c -0.164,-0.164 -0.429,-0.164 -0.593,0 l 
-1.36,1.36 c -0.164,0.164 -0.164,0.429 0,0.593 l 0.75,0.75 C 1.818,22.568 
1.615,23.095 1.483,23.631 H 0.418 C 0.187,23.631 0,23.818 0,24.05 v 1.918 c 
0,0.231 0.187,0.419 0.418,0.419 h 1.046 c 0.134,0.541 0.351,1.061 0.645,1.551 l 
-0.75,0.75 c -0.164,0.164 -0.164,0.429 0,0.593 l 1.36,1.36 c 0.164,0.164 
0.429,0.164 0.593,0 l 0.75,-0.75 c 0.491,0.297 1.01,0.493 1.551,0.627 v 1.064 C 
5.614,31.813 5.801,32 6.032,32 H 7.95 c 0.231,0 0.419,-0.187 0.419,-0.418 V 
30.518 C 8.911,30.385 9.43,30.185 9.92,29.891 l 0.75,0.75 c 0.164,0.164 
0.429,0.164 0.593,0 l 1.36,-1.36 c 0.164,-0.164 0.164,-0.429 0,-0.593 l 
-0.75,-0.75 c 0.295,-0.488 0.51,-1.014 0.645,-1.551 h 1.064 C 13.813,26.387 
14,26.199 14,25.968 V 24.05 c 0,-0.231 -0.187,-0.419 -0.418,-0.419 H 12.518 C 
12.385,23.094 12.164,22.567 11.873,22.08 l 0.75,-0.75 c 0.164,-0.164 
0.164,-0.429 0,-0.593 l -1.36,-1.36 c -0.164,-0.164 -0.429,-0.164 -0.593,0 l 
-0.75,0.75 C 9.43,19.833 8.908,19.615 8.369,19.482 V 18.418 C 8.369,18.187 
8.182,18 7.95,18 H 6.032 z m 0.889,4.358 c 0.678,-0.018 1.37,0.212 1.901,0.715 
1.062,1.007 1.111,2.687 0.104,3.749 -1.005,1.059 -2.686,1.105 -3.749,0.104 
-1.062,-1.007 -1.112,-2.687 -0.105,-3.749 0.505,-0.531 1.172,-0.8 1.849,-0.819 
z
+   d=m 6.032,17 c -0.231,0 -0.418,0.187 -0.418,0.418 v 1.064 c -0.541,0.134 
-1.062,0.35 -1.551,0.645 l -0.75,-0.75 c -0.164,-0.164 -0.429,-0.164 -0.593,0 l 
-1.36,1.36 c -0.164,0.164 -0.164,0.429 0,0.593 l 0.75,0.75 C 1.818,21.568 
1.615,22.095 1.483,22.631 H 0.418 C 0.187,22.631 0,22.818 0,23.05 v 1.918 c 
0,0.231 0.187,0.419 0.418,0.419 h 1.046 c 0.134,0.541 0.351,1.061 0.645,1.551 l 
-0.75,0.75 c -0.164,0.164 -0.164,0.429 0,0.593 l 1.36,1.36 c 0.164,0.164 
0.429,0.164 0.593,0 l 0.75,-0.75 c 0.491,0.297 1.01,0.493 1.551,0.627 v 1.064 C 
5.614,30.813 5.801,31 6.032,31 H 7.95 c 0.231,0 0.419,-0.187 0.419,-0.418 V 
29.518 C 8.911,29.385 9.43,29.185 9.92,28.891 l 0.75,0.75 c 0.164,0.164 
0.429,0.164 0.593,0 l 1.36,-1.36 c 0.164,-0.164 0.164,-0.429 0,-0.593 l 
-0.75,-0.75 c 0.295,-0.488 0.51,-1.014 0.645,-1.551 h 1.064 C 13.813,25.387 
14,25.199 14,24.968 V 23.05 c 0,-0.231 -0.187,-0.419 -0.418,-0.419 H 12.518 C 
12.385,22.094 12.164,21.567 11.873,21.08 l 0.75,-0.75 c 0.164,-0.164 
0.164,-0.429 0,-0.593 l -1.36,-1.36 c -0.164,-0.164 -0.429,-0.164 -0.593,0 l 
-0.75,0.75 C 9.43,18.833 8.908,18.615 8.369,18.482 V 17.418 C 8.369,17.187 
8.182,17 7.95,17 H 6.032 z m 0.889,4.358 c 0.678,-0.018 1.37,0.212 1.901,0.715 
1.062,1.007 1.111,2.687 0.104,3.749 -1.005,1.059 -2.686,1.105 -3.749,0.104 
-1.062,-1.007 -1.112,-2.687 -0.105,-3.749 0.505,-0.531 1.172,-0.8 1.849,-0.819 
z
id=rect3381-0
style=fill:#55 /
 path
-   d=M 6.032,0 C 5.801,0 5.614,0.187 

[MediaWiki-commits] [Gerrit] Optimise png images with optipng - change (mediawiki...VisualEditor)

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

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


Change subject: Optimise png images with optipng
..

Optimise png images with optipng

Change-Id: Id014ad0a0aa99c9440360e32d2e10bc99fa64738
---
M modules/ve-mw/ui/styles/images/icons/language.png
M modules/ve-mw/ui/styles/images/icons/parameter-set.png
M modules/ve-mw/ui/styles/images/icons/parameter.png
M modules/ve-mw/ui/styles/images/icons/source.png
M modules/ve/test/example.png
M modules/ve/ui/styles/images/icons/accept.png
M modules/ve/ui/styles/images/icons/alert.png
M modules/ve/ui/styles/images/icons/arched-arrow-ltr.png
M modules/ve/ui/styles/images/icons/arched-arrow-rtl.png
M modules/ve/ui/styles/images/icons/bold-b.png
M modules/ve/ui/styles/images/icons/bold-f.png
M modules/ve/ui/styles/images/icons/bullet-list-rtl.png
M modules/ve/ui/styles/images/icons/clear.png
M modules/ve/ui/styles/images/icons/close.png
M modules/ve/ui/styles/images/icons/collapse.png
M modules/ve/ui/styles/images/icons/comment.png
M modules/ve/ui/styles/images/icons/expand.png
M modules/ve/ui/styles/images/icons/help.png
M modules/ve/ui/styles/images/icons/history.png
M modules/ve/ui/styles/images/icons/italic-k.png
M modules/ve/ui/styles/images/icons/layout-ltr.png
M modules/ve/ui/styles/images/icons/layout-rtl.png
M modules/ve/ui/styles/images/icons/link.png
M modules/ve/ui/styles/images/icons/menu.png
M modules/ve/ui/styles/images/icons/move-ltr.png
M modules/ve/ui/styles/images/icons/move-rtl.png
M modules/ve/ui/styles/images/icons/number-list-ltr.png
M modules/ve/ui/styles/images/icons/number-list-rtl.png
M modules/ve/ui/styles/images/icons/outdent-list-ltr.png
M modules/ve/ui/styles/images/icons/outdent-list-rtl.png
M modules/ve/ui/styles/images/icons/picture.png
M modules/ve/ui/styles/images/icons/search.png
M modules/ve/ui/styles/images/icons/settings.png
M modules/ve/ui/styles/images/icons/strikethrough-s.png
M modules/ve/ui/styles/images/icons/subscript.png
M modules/ve/ui/styles/images/icons/tag.png
M modules/ve/ui/styles/images/icons/underline-u.png
M modules/ve/ui/styles/images/icons/window.png
M modules/ve/ui/styles/images/textures/transparency.png
M modules/ve/ui/styles/images/toolbar-shadow.png
40 files changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/ui/styles/images/icons/language.png 
b/modules/ve-mw/ui/styles/images/icons/language.png
index e1ed8ab..1e4d204 100644
--- a/modules/ve-mw/ui/styles/images/icons/language.png
+++ b/modules/ve-mw/ui/styles/images/icons/language.png
Binary files differ
diff --git a/modules/ve-mw/ui/styles/images/icons/parameter-set.png 
b/modules/ve-mw/ui/styles/images/icons/parameter-set.png
index c2554e5..bfccaf4 100644
--- a/modules/ve-mw/ui/styles/images/icons/parameter-set.png
+++ b/modules/ve-mw/ui/styles/images/icons/parameter-set.png
Binary files differ
diff --git a/modules/ve-mw/ui/styles/images/icons/parameter.png 
b/modules/ve-mw/ui/styles/images/icons/parameter.png
index 013876b..62bda36 100644
--- a/modules/ve-mw/ui/styles/images/icons/parameter.png
+++ b/modules/ve-mw/ui/styles/images/icons/parameter.png
Binary files differ
diff --git a/modules/ve-mw/ui/styles/images/icons/source.png 
b/modules/ve-mw/ui/styles/images/icons/source.png
index e336790..e868c48 100644
--- a/modules/ve-mw/ui/styles/images/icons/source.png
+++ b/modules/ve-mw/ui/styles/images/icons/source.png
Binary files differ
diff --git a/modules/ve/test/example.png b/modules/ve/test/example.png
index b2de448..c2da5b8 100644
--- a/modules/ve/test/example.png
+++ b/modules/ve/test/example.png
Binary files differ
diff --git a/modules/ve/ui/styles/images/icons/accept.png 
b/modules/ve/ui/styles/images/icons/accept.png
index bd8dc20..1075110 100644
--- a/modules/ve/ui/styles/images/icons/accept.png
+++ b/modules/ve/ui/styles/images/icons/accept.png
Binary files differ
diff --git a/modules/ve/ui/styles/images/icons/alert.png 
b/modules/ve/ui/styles/images/icons/alert.png
index dd367a6..992ea2a 100644
--- a/modules/ve/ui/styles/images/icons/alert.png
+++ b/modules/ve/ui/styles/images/icons/alert.png
Binary files differ
diff --git a/modules/ve/ui/styles/images/icons/arched-arrow-ltr.png 
b/modules/ve/ui/styles/images/icons/arched-arrow-ltr.png
index cc4ca65..5db1c4d 100644
--- a/modules/ve/ui/styles/images/icons/arched-arrow-ltr.png
+++ b/modules/ve/ui/styles/images/icons/arched-arrow-ltr.png
Binary files differ
diff --git a/modules/ve/ui/styles/images/icons/arched-arrow-rtl.png 
b/modules/ve/ui/styles/images/icons/arched-arrow-rtl.png
index 9c8a542..7931971 100644
--- a/modules/ve/ui/styles/images/icons/arched-arrow-rtl.png
+++ b/modules/ve/ui/styles/images/icons/arched-arrow-rtl.png
Binary files differ
diff --git a/modules/ve/ui/styles/images/icons/bold-b.png 
b/modules/ve/ui/styles/images/icons/bold-b.png
index 

[MediaWiki-commits] [Gerrit] Moved embed statement where it does something - change (mediawiki...VisualEditor)

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

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


Change subject: Moved embed statement where it does something
..

Moved embed statement where it does something

Followup to Ibdc2410cc

Change-Id: I5e665f5d720366650c362ed603693a223c96ee77
---
M modules/ve/ui/styles/ve.ui.Toolbar.css
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve/ui/styles/ve.ui.Toolbar.css 
b/modules/ve/ui/styles/ve.ui.Toolbar.css
index cbf7f71..b8100e0 100644
--- a/modules/ve/ui/styles/ve.ui.Toolbar.css
+++ b/modules/ve/ui/styles/ve.ui.Toolbar.css
@@ -16,8 +16,8 @@
 .ve-ui-toolbar-bar {
border-bottom: solid 1px #ccc;
position: relative;
-   /* @embed */
background-color: white;
+   /* @embed */
background-image: url(images/fade-up.png);
background-position: left bottom;
background-repeat: repeat-x;

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

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

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


[MediaWiki-commits] [Gerrit] Make anything with class 'uls-settings-trigger' work like UL... - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Make anything with class 'uls-settings-trigger' work like ULS 
trigger
..

Make anything with class 'uls-settings-trigger' work like ULS trigger

Usecase:

Reading problems? click [here]. That [here] can be a ULS trigger to open
language settings.

Change-Id: I1561f8b782037bfdb418f33097fc8b4c519ef393
---
M resources/js/ext.uls.interface.js
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/resources/js/ext.uls.interface.js 
b/resources/js/ext.uls.interface.js
index 4d69347..6e41511 100644
--- a/resources/js/ext.uls.interface.js
+++ b/resources/js/ext.uls.interface.js
@@ -242,7 +242,7 @@
.attr( 'title', $.i18n( 
'ext-uls-language-settings-title' ) );
// Append ULS cog to languages section. But make sure 
it is visible.
$pLang.show().prepend( $ulsSettingsTrigger );
-
+   $ulsSettingsTrigger = $( '.uls-settings-trigger' );
// Remove the dummy link that was added to make sure 
that the section appears
$pLang.find( '.uls-p-lang-dummy' ).remove();
 
@@ -286,8 +286,8 @@
var topRowHeight, caretHeight, 
caretWidth,
$caretBefore = $( 'span' 
).addClass( 'caret-before' ),
$caretAfter = $( 'span' 
).addClass( 'caret-after' ),
-   ulsTriggerWidth = 
$ulsSettingsTrigger.width(),
-   ulsTriggerOffset = 
$ulsSettingsTrigger.offset();
+   ulsTriggerWidth = 
this.$element.width(),
+   ulsTriggerOffset = 
this.$element.offset();
 
this.$window.addClass( 'callout' );
this.$window.prepend( $caretBefore, 
$caretAfter );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1561f8b782037bfdb418f33097fc8b4c519ef393
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] Merge results in CompositeValidator - change (mediawiki...Wikibase)

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

Change subject: Merge results in CompositeValidator
..


Merge results in CompositeValidator

If CompositeValidator isn't set to failFast model, it now
accumulates the errors from sub-validators.

IMPORTANT: needs Ie40b0bb5ffb in DataValues

Change-Id: Ic2ef5cfbba603c63f7ba1b1ab20ce0366aaabe5f
---
M lib/includes/Validators/CompositeValidator.php
M lib/tests/phpunit/Validators/CompositeValidatorTest.php
2 files changed, 20 insertions(+), 18 deletions(-)

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



diff --git a/lib/includes/Validators/CompositeValidator.php 
b/lib/includes/Validators/CompositeValidator.php
index 3b5d536..19d08a4 100644
--- a/lib/includes/Validators/CompositeValidator.php
+++ b/lib/includes/Validators/CompositeValidator.php
@@ -82,14 +82,12 @@
foreach ( $this-validators as $validator ) {
$subResult = $validator-validate( $value );
 
-   //XXX: Some validators should be fatal and cause us to 
abort the loop.
-   // Others shouldn't.
-
if ( !$subResult-isValid() ) {
-   //TODO: Don't bail out immediately if 
$this-failFast == false.
-   // Accumulate errors from all validators.
-   // We need Result::merge() for this.
-   return $subResult;
+   if ( $this-failFast ) {
+   return $subResult;
+   } else {
+   $result = Result::merge( $result, 
$subResult );
+   }
}
}
 
diff --git a/lib/tests/phpunit/Validators/CompositeValidatorTest.php 
b/lib/tests/phpunit/Validators/CompositeValidatorTest.php
index aa2644f..6224938 100644
--- a/lib/tests/phpunit/Validators/CompositeValidatorTest.php
+++ b/lib/tests/phpunit/Validators/CompositeValidatorTest.php
@@ -37,6 +37,7 @@
 
 use DataValues\StringValue;
 use Wikibase\Validators\CompositeValidator;
+use Wikibase\Validators\RegexValidator;
 use Wikibase\Validators\StringLengthValidator;
 use Wikibase\Validators\TypeValidator;
 use Wikibase\Validators\ValidatorErrorLocalizer;
@@ -52,31 +53,34 @@
$validators = array(
new TypeValidator( 'string' ),
new StringLengthValidator( 1, 10 ),
+   new RegexValidator( '/xxx/', true ),
);
 
return array(
-   array( array(), true, 'foo', true, no validators ),
-   array( $validators, true, 'foo', true, pass 
validation ),
-   array( $validators, true, new StringValue( foo ), 
false, fail first validation ),
-   array( $validators, true, '', false, fail second 
validation ),
+   array( array(), true, 'foo', 0, no validators ),
+   array( $validators, true, 'foo', 0, pass validation ),
+   array( $validators, true, new StringValue( foo ), 1, 
fail first validation ),
+   array( $validators, true, '', 1, fail second 
validation ),
+   array( $validators, false, str_repeat( 'x', 20 ), 2, 
fail second and third validation ),
+   array( $validators, false, str_repeat( 'x', 5 ), 1, 
fail third validation ),
);
}
 
/**
 * @dataProvider provideValidate()
 */
-   public function testValidate( $validators, $failFast, $value, 
$expected, $message ) {
+   public function testValidate( $validators, $failFast, $value, 
$expectedErrorCount, $message ) {
$validator = new CompositeValidator( $validators, $failFast );
$result = $validator-validate( $value );
+   $errors = $result-getErrors();
 
-   $this-assertEquals( $expected, $result-isValid(), $message );
+   $this-assertEquals( $expectedErrorCount === 0, 
$result-isValid(), $message );
+   $this-assertCount( $expectedErrorCount, $errors, $message );
 
-   if ( !$expected ) {
-   $errors = $result-getErrors();
-   $this-assertCount( 1, $errors, $message );
+   $localizer = new ValidatorErrorLocalizer( );
 
-   $localizer = new ValidatorErrorLocalizer( );
-   $msg = $localizer-getErrorMessage( $errors[0] );
+   foreach ( $errors as $error ) {
+   $msg = $localizer-getErrorMessage( $error );
$this-assertTrue( $msg-exists(), $msg );
}
}

-- 
To view, visit https://gerrit.wikimedia.org/r/69845
To 

[MediaWiki-commits] [Gerrit] Factor string normalization functions out of Utils. - change (mediawiki...Wikibase)

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

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


Change subject: Factor string normalization functions out of Utils.
..

Factor string normalization functions out of Utils.

This introduces a StringNormalizer service and replaces
any use of the static normalization functions in Utils.

Change-Id: Ieeba2470dccf797b37243355ddcb2ccf5e5b18c0
---
M client/includes/WikibaseClient.php
M lib/WikibaseLib.classes.php
A lib/includes/StringNormalizer.php
M lib/includes/Term.php
M lib/includes/Utils.php
M lib/includes/specials/SpecialWikibasePage.php
A lib/tests/phpunit/StringNormalizerTest.php
M lib/tests/phpunit/UtilsTest.php
M repo/includes/Summary.php
M repo/includes/WikibaseRepo.php
M repo/includes/api/EditEntity.php
M repo/includes/api/GetEntities.php
M repo/includes/api/ModifyEntity.php
M repo/includes/api/SetAliases.php
M repo/includes/api/SetDescription.php
M repo/includes/api/SetLabel.php
M repo/includes/api/SetSiteLink.php
M repo/includes/specials/SpecialItemByTitle.php
M repo/includes/specials/SpecialNewEntity.php
19 files changed, 321 insertions(+), 131 deletions(-)


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

diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index a7767a2..f6a8434 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -19,6 +19,7 @@
 use Wikibase\RepoLinker;
 use Wikibase\Settings;
 use Wikibase\SettingsArray;
+use Wikibase\StringNormalizer;
 use Wikibase\Test\MockRepository;
 
 /**
@@ -68,6 +69,11 @@
protected $isInTestMode;
 
private $storeInstances = array();
+
+   /**
+* @var StringNormalizer
+*/
+   private $stringNormalizer;
 
/**
 * @since 0.4
@@ -191,6 +197,19 @@
/**
 * @since 0.4
 *
+* @return StringNormalizer
+*/
+   public function getStringNormalizer() {
+   if ( $this-stringNormalizer === null ) {
+   $this-stringNormalizer = new StringNormalizer();
+   }
+
+   return $this-stringNormalizer;
+   }
+
+   /**
+* @since 0.4
+*
 * @return RepoLinker
 */
public function newRepoLinker() {
diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php
index b5f2b4f..e2b3122 100644
--- a/lib/WikibaseLib.classes.php
+++ b/lib/WikibaseLib.classes.php
@@ -63,6 +63,7 @@
'Wikibase\Term' = 'includes/Term.php',
'Wikibase\Lib\TermsToClaimsTranslator' = 
'includes/TermsToClaimsTranslator.php',
'Wikibase\Lib\TypedValueFormatter' = 
'includes/TypedValueFormatter.php',
+   'Wikibase\StringNormalizer' = 'includes/StringNormalizer.php',
'Wikibase\Utils' = 'includes/Utils.php',
'Wikibase\WikibaseDiffOpFactory' = 
'includes/WikibaseDiffOpFactory.php',
'Wikibase\Lib\WikibaseDataTypeBuilders' = 
'includes/WikibaseDataTypeBuilders.php',
diff --git a/lib/includes/StringNormalizer.php 
b/lib/includes/StringNormalizer.php
new file mode 100644
index 000..269d7ea
--- /dev/null
+++ b/lib/includes/StringNormalizer.php
@@ -0,0 +1,82 @@
+?php
+ /**
+ *
+ * Copyright © 03.07.13 by the authors listed below.
+ *
+ * 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
+ *
+ * @license GPL 2+
+ * @file
+ *
+ * @author Daniel Kinzler
+ * @author John Erling Blad  jeb...@gmail.com 
+ */
+
+
+namespace Wikibase;
+
+
+use UtfNormal;
+
+/**
+ * StringNormalizer provides several methods for normalizing strings.
+ *
+ * @since 0.4
+ *
+ * @package Wikibase
+ */
+class StringNormalizer {
+
+
+   /**
+* Trim initial and trailing whitespace and control chars, and 
optionally compress internal ones.
+*
+* @param string $inputString The actual string to process.
+*
+* @return string where whitespace possibly are removed.
+*/
+   public function trimWhitespace( $inputString ) {
+   // \p{Z} - whitespace
+   // \p{Cc} - control chars
+   $trimmed = preg_replace( 

[MediaWiki-commits] [Gerrit] Move search key generation to TermSqlIndex. - change (mediawiki...Wikibase)

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

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


Change subject: Move search key generation to TermSqlIndex.
..

Move search key generation to TermSqlIndex.

Search key generation is specific to the storage/search engine.
The code was misplaced in the Term class, which required awkward
hacks to get access to the required helper classes / servces.

Change-Id: I8fd9eba0999b1bfcb69dba0bd84723e491f1e012
---
M lib/includes/Term.php
M lib/includes/store/sql/TermSqlIndex.php
M lib/tests/phpunit/TermTest.php
M repo/includes/store/sql/SqlStore.php
M repo/includes/store/sql/TermSearchKeyBuilder.php
M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php
6 files changed, 135 insertions(+), 135 deletions(-)


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

diff --git a/lib/includes/Term.php b/lib/includes/Term.php
index 603cf47..dc6c17a 100644
--- a/lib/includes/Term.php
+++ b/lib/includes/Term.php
@@ -210,76 +210,6 @@
}
 
/**
-* @since 0.2
-*
-* @return string|null
-*/
-   public function getNormalizedText() {
-   $text = $this-getText();
-   $lang = $this-getLanguage();
-   return $text === null? null : self::normalizeText( $text, $lang 
);
-   }
-
-   /**
-* @since 0.2
-*
-* @param string $text
-* @param string $lang language code of the text's language, may be used
-*for specialized normalization.
-*
-* @return string
-*
-* @todo: Move this to TermSqlIndex
-*/
-   public static function normalizeText( $text, $lang = 'en' ) {
-   if ( $text === '' ) {
-   return '';
-   }
-
-   //FIXME: move normalizeText to TermSqlIndex to avoid this mess!
-   if ( class_exists( 'Wikibase\Repo\WikibaseRepo' ) ) {
-   $normalizer = 
WikibaseRepo::getDefaultInstance()-getStringNormalizer();
-   } elseif ( class_exists( 'Wikibase\Client\WikibaseClient' ) ) {
-   $normalizer = 
WikibaseClient::getDefaultInstance()-getStringNormalizer();
-   } else {
-   throw new \RuntimeException( Found nither WikibaseRepo 
not WikibaseClient );
-   }
-
-   // composed normal form
-   $nfcText = $normalizer-cleanupToNFC( $text );
-
-   if ( !is_string( $nfcText ) || $nfcText === '' ) {
-   wfWarn( Unicode normalization failed for `$text` );
-   }
-
-   // \p{Z} - whitespace
-   // \p{C} - control chars
-   // WARNING: *any* invalid UTF8 sequence causes preg_replace to 
return an empty string.
-   $strippedText = $nfcText;
-   $strippedText = preg_replace( '/[\p{Cc}\p{Cf}\p{Cn}\p{Cs}]+/u', 
' ', $strippedText );
-   $strippedText = preg_replace( '/^[\p{Z}]+|[\p{Z}]+$/u', '', 
$strippedText );
-
-   if ( $strippedText === '' ) {
-   // NOTE: This happens when there is only whitespace in 
the string.
-   //   However, preg_replace will also return an 
empty string if it
-   //   encounters any invalid utf-8 sequence.
-   return '';
-   }
-
-   //TODO: Use Language::lc to convert to lower case.
-   //  But that requires us to load ALL the language objects,
-   //  which loads ALL the messages, which makes us run out
-   //  of RAM (see bug 41103).
-   $normalized = mb_strtolower( $strippedText, 'UTF-8' );
-
-   if ( !is_string( $normalized ) || $normalized === '' ) {
-   wfWarn( mb_strtolower normalization failed for 
`$strippedText` );
-   }
-
-   return $normalized;
-   }
-
-   /**
 * Returns true if this Term object is equals to $that. This Term 
object is considered
 * equal to $that if $that is also an instance of Term, and 
$that-fields contains the
 * same values for the same fields as $this-fields.
diff --git a/lib/includes/store/sql/TermSqlIndex.php 
b/lib/includes/store/sql/TermSqlIndex.php
index 783d022..f9c10d8 100644
--- a/lib/includes/store/sql/TermSqlIndex.php
+++ b/lib/includes/store/sql/TermSqlIndex.php
@@ -41,6 +41,11 @@
protected $tableName;
 
/**
+* @var StringNormalizer
+*/
+   protected $stringNormalizer;
+
+   /**
 * Maps table fields to TermIndex interface field names.
 *
 * @since 0.2
@@ -58,14 +63,15 @@
/**
 * Constructor.
 *
-* @since 0.1
+* @since0.4
 *
-* @param string $tableName
-  

[MediaWiki-commits] [Gerrit] Make button text black for non-Vector buttons: - change (mediawiki/core)

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

Change subject: Make button text black for non-Vector buttons:
..


Make button text black for non-Vector buttons:

Also, don't do field styles for buttons since you'll generally want 
mw-ui-button style instead.

Change-Id: I0bd69950cd07925268933c495c4e0fe0f07eef57
---
M resources/mediawiki.ui/mediawiki.ui.default.css
M resources/mediawiki.ui/mediawiki.ui.vector.css
M resources/mediawiki.ui/sourcefiles/scss/components/default/_forms.scss
M resources/mediawiki.ui/sourcefiles/scss/mixins/_effects.scss
4 files changed, 12 insertions(+), 10 deletions(-)

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



diff --git a/resources/mediawiki.ui/mediawiki.ui.default.css 
b/resources/mediawiki.ui/mediawiki.ui.default.css
index 0f8d420..96c4eec 100644
--- a/resources/mediawiki.ui/mediawiki.ui.default.css
+++ b/resources/mediawiki.ui/mediawiki.ui.default.css
@@ -46,7 +46,7 @@
   background-image: -moz-linear-gradient(top, #dcdcdc, #c9c9c9);
   background-image: -o-linear-gradient(top, #dcdcdc, #c9c9c9);
   background-image: linear-gradient(top, #dcdcdc, #c9c9c9);
-  color: #4a4a4a;
+  color: black;
   text-shadow: 0 1px 1px rgba(201, 201, 201, 0.3);
   border: 1px solid #c4c4c4;
   -webkit-border-radius: 3px;
@@ -157,8 +157,8 @@
   margin: 0;
   width: 100%;
 }
-/* line 34, sourcefiles/scss/components/default/_forms.scss */
-.mw-ui-vform  div input {
+/* line 36, sourcefiles/scss/components/default/_forms.scss */
+.mw-ui-vform  div 
input:not([type=button]):not([type=submit]):not([type=file]) {
   outline: 0;
   border-style: solid;
   border-width: 1px;
@@ -167,7 +167,7 @@
   padding: 0.35em 0 0.35em 0.5em;
 }
 /* line 12, sourcefiles/scss/mixins/_forms.scss */
-.mw-ui-vform  div input:focus {
+.mw-ui-vform  div 
input:not([type=button]):not([type=submit]):not([type=file]):focus {
   box-shadow: #4091ed 0px 0px 5px;
   border-color: #4091ed;
 }
diff --git a/resources/mediawiki.ui/mediawiki.ui.vector.css 
b/resources/mediawiki.ui/mediawiki.ui.vector.css
index 9826526..a556c79 100644
--- a/resources/mediawiki.ui/mediawiki.ui.vector.css
+++ b/resources/mediawiki.ui/mediawiki.ui.vector.css
@@ -45,7 +45,7 @@
   background-image: -moz-linear-gradient(top, #dcdcdc, #c9c9c9);
   background-image: -o-linear-gradient(top, #dcdcdc, #c9c9c9);
   background-image: linear-gradient(top, #dcdcdc, #c9c9c9);
-  color: #4a4a4a;
+  color: black;
   text-shadow: 0 1px 1px rgba(201, 201, 201, 0.3);
   border: 1px solid #c4c4c4;
   -webkit-border-radius: 3px;
@@ -286,8 +286,8 @@
   margin: 0;
   width: 100%;
 }
-/* line 34, sourcefiles/scss/components/default/_forms.scss */
-.mw-ui-vform  div input {
+/* line 36, sourcefiles/scss/components/default/_forms.scss */
+.mw-ui-vform  div 
input:not([type=button]):not([type=submit]):not([type=file]) {
   outline: 0;
   border-style: solid;
   border-width: 1px;
@@ -296,7 +296,7 @@
   padding: 0.35em 0 0.35em 0.5em;
 }
 /* line 12, sourcefiles/scss/mixins/_forms.scss */
-.mw-ui-vform  div input:focus {
+.mw-ui-vform  div 
input:not([type=button]):not([type=submit]):not([type=file]):focus {
   box-shadow: #4091ed 0px 0px 5px;
   border-color: #4091ed;
 }
diff --git 
a/resources/mediawiki.ui/sourcefiles/scss/components/default/_forms.scss 
b/resources/mediawiki.ui/sourcefiles/scss/components/default/_forms.scss
index 8bbe3c2..dfcd36f 100644
--- a/resources/mediawiki.ui/sourcefiles/scss/components/default/_forms.scss
+++ b/resources/mediawiki.ui/sourcefiles/scss/components/default/_forms.scss
@@ -31,7 +31,9 @@
 width: 100%;
 }
 
-input {
+// We exclude these because they'll generally use mw-ui-button.
+// Otherwise, we'll unintentionally override that.
+input:not([type=button]):not([type=submit]):not([type=file]), {
 @include agora-field-styling; // mixins/_forms.scss
 }
 
diff --git a/resources/mediawiki.ui/sourcefiles/scss/mixins/_effects.scss 
b/resources/mediawiki.ui/sourcefiles/scss/mixins/_effects.scss
index 03fae1b..2efff82 100644
--- a/resources/mediawiki.ui/sourcefiles/scss/mixins/_effects.scss
+++ b/resources/mediawiki.ui/sourcefiles/scss/mixins/_effects.scss
@@ -25,7 +25,7 @@
@include vertical-gradient(lighten($baseColor, 7.5%), $baseColor);
 
@if $baseColor == $agoraGray {
-   color: darken($baseColor, 50%);
+   color: black;
@include text-shadow(0 1px 1px rgba($baseColor, 0.3));
} @else {
color: white;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bd69950cd07925268933c495c4e0fe0f07eef57
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Isarra zhoris...@gmail.com
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] Separate out UnicodeJS tests properly - change (mediawiki...VisualEditor)

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

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


Change subject: Separate out UnicodeJS tests properly
..

Separate out UnicodeJS tests properly

Also fix some comment  whitespace inconsistencies.

Change-Id: I71717643678445590820e174e6ed2e5ac58103c2
---
M modules/unicodejs/index.php
A modules/unicodejs/test/unicodejs.graphemebreak.test.js
A modules/unicodejs/test/unicodejs.test.js
A modules/unicodejs/test/unicodejs.wordbreak.test.js
M modules/unicodejs/unicodejs.graphemebreak.js
M modules/unicodejs/unicodejs.wordbreak.js
D modules/unicodejs/unicodejs.wordbreak.test.js
7 files changed, 284 insertions(+), 266 deletions(-)


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

diff --git a/modules/unicodejs/index.php b/modules/unicodejs/index.php
index 121764e..b6d3fd9 100644
--- a/modules/unicodejs/index.php
+++ b/modules/unicodejs/index.php
@@ -26,7 +26,9 @@
script src=unicodejs.wordbreakproperties.js/script
script src=unicodejs.wordbreak.js/script
 
-   script src=unicodejs.wordbreak.test.js/script
+   script src=test/unicodejs.test.js/script
+   script src=test/unicodejs.graphemebreak.test.js/script
+   script src=test/unicodejs.wordbreak.test.js/script
/head
body
div id=qunit/div
diff --git a/modules/unicodejs/test/unicodejs.graphemebreak.test.js 
b/modules/unicodejs/test/unicodejs.graphemebreak.test.js
new file mode 100644
index 000..f4cb50c
--- /dev/null
+++ b/modules/unicodejs/test/unicodejs.graphemebreak.test.js
@@ -0,0 +1,34 @@
+/*!
+ * UnicodeJS Grapheme Break module tests
+ *
+ * @copyright 2013 UnicodeJS team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+QUnit.module( 'unicodeJS.graphemebreak' );
+
+QUnit.test( 'splitClusters', 1, function ( assert ) {
+   var expected = [
+   'a',
+   ' ',
+   ' ',
+   'b',
+   'カ',
+   'タ',
+   'カ',
+   'ナ',
+   'c\u0300\u0327', // c with two combining chars
+   '\ud800\udf08', // U+10308 OLD ITALIC LETTER THE
+   '\ud800\udf08\u0302', // U+10308 + combining circumflex
+   '\r\n',
+   '\n',
+   '\u1104\u1173', // jamo L+V
+   '\u1105\u1161\u11a8', // jamo L+V+T
+   '\ud83c\udded\ud83c\uddf0' // 2*regional indicator characters
+   ];
+   assert.deepEqual(
+   unicodeJS.graphemebreak.splitClusters( expected.join( '' ) ),
+   expected,
+   'Split clusters'
+   );
+});
diff --git a/modules/unicodejs/test/unicodejs.test.js 
b/modules/unicodejs/test/unicodejs.test.js
new file mode 100644
index 000..f315185
--- /dev/null
+++ b/modules/unicodejs/test/unicodejs.test.js
@@ -0,0 +1,128 @@
+/*!
+ * UnicodeJS Base module tests
+ *
+ * @copyright 2013 UnicodeJS team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+QUnit.module( 'unicodeJS' );
+
+QUnit.test( 'charRangeArrayRegexp', function ( assert ) {
+   var i, test, doTestFunc, equalityTests, throwTests;
+
+   equalityTests = [
+   [[0x0040], '\\u0040', 'single BMP character'],
+   [[0x], '\\u', 'highest BMP character'],
+   [
+   [0x005F, [0x203F, 0x2040], 0x2054, [0xFE33, 0xFE34],
+   [0xFE4D, 0xFE4F], 0xFF3F],
+   
'[\\u005f\\u203f-\\u2040\\u2054\\ufe33-\\ufe34\\ufe4d-\\ufe4f\\uff3f]',
+   'multiple BMP ranges (= ExtendNumLet from wordbreak 
rules)'
+   ],
+   [[0xD7FF], '\\ud7ff', 'just below surrogate range'],
+   [[0xE000], '\\ue000', 'just above surrogate range'],
+   [[0x1], '\\ud800\\udc00', 'lowest non-BMP character'],
+   [[0x10001], '\\ud800\\udc01', 'second-lowest non-BMP 
character'],
+   [[0x103FF], '\\ud800\\udfff', 'highest character with D800 
leading surrogate'],
+   [[0x10400], '\\ud801\\udc00', 'lowest character with D801 
leading surrogate'],
+   [
+   [[0xFF00, 0x]],
+   '[\\uff00-\\u]',
+   'single range at top of BMP'
+   ],
+   [
+   [[0xFF00, 0x1]],
+   '[\\uff00-\\u]|\\ud800\\udc00',
+   'single range spanning BMP and non-BMP'
+   ],
+   [
+   [0x, 0x1, 0x10002],
+   '\\u|\\ud800\\udc00|\\ud800\\udc02', // TODO: could 
compact
+   'single characters, both BMP and non-BMP'
+   ],
+   [
+ 

[MediaWiki-commits] [Gerrit] switch to correct mailTo address for crash reports - change (apps...commons)

2013-07-05 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: switch to correct mailTo address for crash reports
..


switch to correct mailTo address for crash reports

The crash reports were pointed at mobile-feedbac...@wikimedia.org,
which does not exist. Change to the correct address,
mobile-feedbac...@lists.wikimedia.org

Change-Id: Ibfe09713c81ce4310e0c63cbc47afdf878e70113
---
M commons/src/main/java/org/wikimedia/commons/CommonsApplication.java
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git 
a/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java 
b/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java
index 3ed2ce6..40b3203 100644
--- a/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java
+++ b/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java
@@ -35,7 +35,7 @@
 
 // TODO: Use ProGuard to rip out reporting when publishing
 @ReportsCrashes(formKey = ,
-mailTo = mobile-feedbac...@wikimedia.org,
+mailTo = mobile-feedbac...@lists.wikimedia.org,
 mode = ReportingInteractionMode.DIALOG,
 resDialogText = R.string.crash_dialog_text,
 resDialogTitle = R.string.crash_dialog_title,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfe09713c81ce4310e0c63cbc47afdf878e70113
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/commons
Gerrit-Branch: master
Gerrit-Owner: Ragesoss rages...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Changing 'cb' to 'callback'. - change (mediawiki...UploadWizard)

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

Change subject: Changing 'cb' to 'callback'.
..


Changing 'cb' to 'callback'.

We use 'cb' for 'checkbox' within the same file. This is why using
short variable names is a bad idea. Keep them explicit and
unambiguous. Of course it's entirely possible that I created these
variables three years ago, but I've since learned the error of my
ways!

Change-Id: I639fcc94d7f83529e41c43a73446451979d140b6
---
M resources/mw.UploadWizardDetails.js
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index 537e70e..05fb84d 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -659,7 +659,7 @@
// do callback if we are ready to go.
// side effect: add error text to the page for fields in an incorrect 
state.
// we must call EVERY valid() function due to side effects; do not 
short-circuit.
-   valid: function(cb) {
+   valid: function( callback ) {
var _this = this;
// at least one description -- never mind, we are disallowing 
removal of first description
// all the descriptions -- check min  max length
@@ -670,7 +670,7 @@
// make sure title is valid
var titleInputValid = $j( _this.titleInput ).data( 'valid' );
if ( titleInputValid === undefined ) {
-   setTimeout( function () { _this.valid(cb); }, 200 );
+   setTimeout( function () { _this.valid( callback ); }, 
200 );
return;
}
 
@@ -681,7 +681,7 @@
var formValid = _this.$form.valid();
 
if ( titleInputValid  deedValid  formValid ) {
-   cb();
+   callback();
}
},
 
@@ -691,10 +691,10 @@
 * 1) Empty category
 * 2) TODO
 */
-   necessaryFilled: function( cb ) {
+   necessaryFilled: function( callback ) {
// check for empty category input
if ( this.div.find( '.categoryInput' ).val() !== '' || 
this.div.find( '.cat-list' ).find( 'li' ).length  0 ) {
-   cb();
+   callback();
}
},
 
@@ -1168,7 +1168,7 @@
 * Convert entire details for this file into wikiText, which will then 
be posted to the file
 * @return wikitext representing all details
 */
-   getWikiText: function(cb) {
+   getWikiText: function( callback ) {
var _this = this;
 
// if invalid, should produce side effects in the form
@@ -1268,7 +1268,7 @@
wikiText = TextCleaner.sanitizeWikiText( 
wikiText, true );
}
 
-   cb(wikiText);
+   callback(wikiText);
});
},
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I639fcc94d7f83529e41c43a73446451979d140b6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: Nischayn22 nischay...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@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] parsoid-server-sanity-check tied to hasSlaveScripts - change (integration/jenkins-job-builder-config)

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

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


Change subject: parsoid-server-sanity-check tied to hasSlaveScripts
..

parsoid-server-sanity-check tied to hasSlaveScripts

Even if parsoid-server-sanity-check job is commented out, I would like
to make sure it will run on slaves if it is ever restored.

Change-Id: I1515e80b61f7649b2f1e6ef06b4ba7268dc12eae
---
M parsoid.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/parsoid.yaml b/parsoid.yaml
index b6db72b..19dad0f 100644
--- a/parsoid.yaml
+++ b/parsoid.yaml
@@ -100,6 +100,7 @@
 
 #- job-template:
 #name: parsoid-server-sanity-check
+#node: hasSlaveScripts
 #defaults:
 #use-zuul
 #triggers:

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

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

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


[MediaWiki-commits] [Gerrit] parsoid-server-sanity-check tied to hasSlaveScripts - change (integration/jenkins-job-builder-config)

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

Change subject: parsoid-server-sanity-check tied to hasSlaveScripts
..


parsoid-server-sanity-check tied to hasSlaveScripts

Even if parsoid-server-sanity-check job is commented out, I would like
to make sure it will run on slaves if it is ever restored.

Change-Id: I1515e80b61f7649b2f1e6ef06b4ba7268dc12eae
---
M parsoid.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/parsoid.yaml b/parsoid.yaml
index b6db72b..19dad0f 100644
--- a/parsoid.yaml
+++ b/parsoid.yaml
@@ -100,6 +100,7 @@
 
 #- job-template:
 #name: parsoid-server-sanity-check
+#node: hasSlaveScripts
 #defaults:
 #use-zuul
 #triggers:

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

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

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


[MediaWiki-commits] [Gerrit] remove gate-silent pipeline - change (integration/zuul-config)

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

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


Change subject: remove gate-silent pipeline
..

remove gate-silent pipeline

Was used to test out some Wikibase jobs.  It is no more in use nowadays.

Change-Id: I2bad1129d662065f5d24ccb8880255c71309398c
---
M layout.yaml
1 file changed, 1 insertion(+), 12 deletions(-)


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

diff --git a/layout.yaml b/layout.yaml
index 50ab167..9d63f75 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -142,18 +142,7 @@
   verified: -1
   code-review: 0
 
-  # Pipelines that only get run when someone trusted has reviewed the code
-  # (cr +2). Should be used to run tests and will report verified +2/-2.
-  #
-  # Silent gate (does not report anything back to Gerrit):
-  - name: gate-silent
-manager: IndependentPipelineManager
-trigger:
-  - event: comment-added
-approval:
-  - code-review: 2
-
-  # Actual gate (report/vote in Gerrit)
+  # gate reports/votes in Gerrit
   #
   # WARNING: Also update the gate-and-submit pipeline when changing this one.
   #

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

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

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


[MediaWiki-commits] [Gerrit] Cog size adjustments - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Cog size adjustments
..


Cog size adjustments

SVG and PNG versions have been modified to be of the same dimensions.
The sprite now is a 14x14px cog with an additional transparent pixel
above and below. resulting in two 14x16px areas. The added margin solves
the problem of image being cropped when zooming.

Bug: 50742
Change-Id: Iab4f578bdb1ea55c51eb528527fc38ce44c7be69
---
M resources/css/ext.uls.css
M resources/images/cog-sprite.png
M resources/images/cog-sprite.svg
3 files changed, 5 insertions(+), 6 deletions(-)

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



diff --git a/resources/css/ext.uls.css b/resources/css/ext.uls.css
index ad73afc..069b35c 100644
--- a/resources/css/ext.uls.css
+++ b/resources/css/ext.uls.css
@@ -13,8 +13,7 @@
background-image: -webkit-linear-gradient(transparent, transparent), 
url('../images/cog-sprite.svg');
background-image: -moz-linear-gradient(transparent, transparent), 
url('../images/cog-sprite.svg');
background-image: linear-gradient(transparent, transparent), 
url('../images/cog-sprite.svg');
-   background-size: 14px auto;
-   height: 14px;
+   height: 16px;
width: 14px;
float: right;
cursor: pointer;
@@ -22,11 +21,11 @@
 
 .skin-vector #p-lang .uls-settings-trigger {
/* Put it in the middle of the first row of the section title */
-   margin-top: 4px;
+   margin-top: 3px;
 }
 
 #p-lang .uls-settings-trigger:hover {
-   background-position: right -18px;
+   background-position: right -16px;
 }
 
 /* Opera for some inexplicable reason confuses right and left padding with */
diff --git a/resources/images/cog-sprite.png b/resources/images/cog-sprite.png
index 04c7aa2..7dd54f6 100644
--- a/resources/images/cog-sprite.png
+++ b/resources/images/cog-sprite.png
Binary files differ
diff --git a/resources/images/cog-sprite.svg b/resources/images/cog-sprite.svg
index 75cd2a2..dacda0e 100644
--- a/resources/images/cog-sprite.svg
+++ b/resources/images/cog-sprite.svg
@@ -19,11 +19,11 @@
id=defs6 /
 
 path
-   d=m 6.032,18 c -0.231,0 -0.418,0.187 -0.418,0.418 v 1.064 c -0.541,0.134 
-1.062,0.35 -1.551,0.645 l -0.75,-0.75 c -0.164,-0.164 -0.429,-0.164 -0.593,0 l 
-1.36,1.36 c -0.164,0.164 -0.164,0.429 0,0.593 l 0.75,0.75 C 1.818,22.568 
1.615,23.095 1.483,23.631 H 0.418 C 0.187,23.631 0,23.818 0,24.05 v 1.918 c 
0,0.231 0.187,0.419 0.418,0.419 h 1.046 c 0.134,0.541 0.351,1.061 0.645,1.551 l 
-0.75,0.75 c -0.164,0.164 -0.164,0.429 0,0.593 l 1.36,1.36 c 0.164,0.164 
0.429,0.164 0.593,0 l 0.75,-0.75 c 0.491,0.297 1.01,0.493 1.551,0.627 v 1.064 C 
5.614,31.813 5.801,32 6.032,32 H 7.95 c 0.231,0 0.419,-0.187 0.419,-0.418 V 
30.518 C 8.911,30.385 9.43,30.185 9.92,29.891 l 0.75,0.75 c 0.164,0.164 
0.429,0.164 0.593,0 l 1.36,-1.36 c 0.164,-0.164 0.164,-0.429 0,-0.593 l 
-0.75,-0.75 c 0.295,-0.488 0.51,-1.014 0.645,-1.551 h 1.064 C 13.813,26.387 
14,26.199 14,25.968 V 24.05 c 0,-0.231 -0.187,-0.419 -0.418,-0.419 H 12.518 C 
12.385,23.094 12.164,22.567 11.873,22.08 l 0.75,-0.75 c 0.164,-0.164 
0.164,-0.429 0,-0.593 l -1.36,-1.36 c -0.164,-0.164 -0.429,-0.164 -0.593,0 l 
-0.75,0.75 C 9.43,19.833 8.908,19.615 8.369,19.482 V 18.418 C 8.369,18.187 
8.182,18 7.95,18 H 6.032 z m 0.889,4.358 c 0.678,-0.018 1.37,0.212 1.901,0.715 
1.062,1.007 1.111,2.687 0.104,3.749 -1.005,1.059 -2.686,1.105 -3.749,0.104 
-1.062,-1.007 -1.112,-2.687 -0.105,-3.749 0.505,-0.531 1.172,-0.8 1.849,-0.819 
z
+   d=m 6.032,17 c -0.231,0 -0.418,0.187 -0.418,0.418 v 1.064 c -0.541,0.134 
-1.062,0.35 -1.551,0.645 l -0.75,-0.75 c -0.164,-0.164 -0.429,-0.164 -0.593,0 l 
-1.36,1.36 c -0.164,0.164 -0.164,0.429 0,0.593 l 0.75,0.75 C 1.818,21.568 
1.615,22.095 1.483,22.631 H 0.418 C 0.187,22.631 0,22.818 0,23.05 v 1.918 c 
0,0.231 0.187,0.419 0.418,0.419 h 1.046 c 0.134,0.541 0.351,1.061 0.645,1.551 l 
-0.75,0.75 c -0.164,0.164 -0.164,0.429 0,0.593 l 1.36,1.36 c 0.164,0.164 
0.429,0.164 0.593,0 l 0.75,-0.75 c 0.491,0.297 1.01,0.493 1.551,0.627 v 1.064 C 
5.614,30.813 5.801,31 6.032,31 H 7.95 c 0.231,0 0.419,-0.187 0.419,-0.418 V 
29.518 C 8.911,29.385 9.43,29.185 9.92,28.891 l 0.75,0.75 c 0.164,0.164 
0.429,0.164 0.593,0 l 1.36,-1.36 c 0.164,-0.164 0.164,-0.429 0,-0.593 l 
-0.75,-0.75 c 0.295,-0.488 0.51,-1.014 0.645,-1.551 h 1.064 C 13.813,25.387 
14,25.199 14,24.968 V 23.05 c 0,-0.231 -0.187,-0.419 -0.418,-0.419 H 12.518 C 
12.385,22.094 12.164,21.567 11.873,21.08 l 0.75,-0.75 c 0.164,-0.164 
0.164,-0.429 0,-0.593 l -1.36,-1.36 c -0.164,-0.164 -0.429,-0.164 -0.593,0 l 
-0.75,0.75 C 9.43,18.833 8.908,18.615 8.369,18.482 V 17.418 C 8.369,17.187 
8.182,17 7.95,17 H 6.032 z m 0.889,4.358 c 0.678,-0.018 1.37,0.212 1.901,0.715 
1.062,1.007 1.111,2.687 0.104,3.749 -1.005,1.059 -2.686,1.105 -3.749,0.104 
-1.062,-1.007 -1.112,-2.687 -0.105,-3.749 0.505,-0.531 1.172,-0.8 

[MediaWiki-commits] [Gerrit] tie qunit jobs to slaves - change (integration/jenkins-job-builder-config)

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

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


Change subject: tie qunit jobs to slaves
..

tie qunit jobs to slaves

That needs a bunch of permission changes on the server. Will update
puppet.

bug: 50231
Change-Id: Idd173362d8e955736682be8e31c9288d9532c50c
---
M mediawiki-extensions.yaml
M mediawiki.yaml
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 147f8b6..453bc4e 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -42,7 +42,7 @@
 
 - job-template:
 name: '{name}-{ext-name}-qunit'
-node: master  # FIXME move to slave 'gallium'
+node: hasSlaveScripts
 defaults: use-zuul-for-mw-ext
 triggers:
  - zuul
diff --git a/mediawiki.yaml b/mediawiki.yaml
index c0a5c4b..2f8b101 100644
--- a/mediawiki.yaml
+++ b/mediawiki.yaml
@@ -42,7 +42,7 @@
 # Generic job to run QUnit
 - job-template:
 name: '{name}-qunit'
-node: master  # FIXME move to slave 'gallium'
+node: hasSlaveScripts
 defaults: use-zuul
 scm:
  - git-mwcore-nosubmodules

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

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

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


[MediaWiki-commits] [Gerrit] disable last set of charts + minor tweaks in revert reporting - change (analytics/wikistats)

2013-07-05 Thread Erik Zachte (Code Review)
Erik Zachte has uploaded a new change for review.

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


Change subject: disable last set of charts + minor tweaks in revert reporting
..

disable last set of charts + minor tweaks in revert reporting

Change-Id: I327c7e40809ec2bbb3ada92750288196443eacae
---
M dumps/perl/WikiReports.pl
M dumps/perl/WikiReportsOutputEditHistory.pm
M dumps/perl/WikiReportsProcessReverts.pm
M dumps/perl/WikiReportsScriptsR.pm
4 files changed, 36 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats 
refs/changes/85/72085/1

diff --git a/dumps/perl/WikiReports.pl b/dumps/perl/WikiReports.pl
index c879dda..26cc588 100644
--- a/dumps/perl/WikiReports.pl
+++ b/dumps/perl/WikiReports.pl
@@ -272,8 +272,6 @@
  ReadEditHistory ;
  ReadRevertHistoryGenerateReports ;
  GenerateEditHistoryReports ; # wait till R runs on stat1
-# print TEST !!! end\n ; # qqq
-# exit ;   # qqq
   }
 
   if (($language eq en)  (! $mode_wm))
diff --git a/dumps/perl/WikiReportsOutputEditHistory.pm 
b/dumps/perl/WikiReportsOutputEditHistory.pm
index dd9f0a2..aecc509 100644
--- a/dumps/perl/WikiReportsOutputEditHistory.pm
+++ b/dumps/perl/WikiReportsOutputEditHistory.pm
@@ -110,7 +110,7 @@
 #WriteEditsPerUserType ('fy') ;
 #GeneratePlotEdits ('fy');
 #GeneratePlotReverts   ('fy') ;
-#GeneratePlotAnons ('fy') ;
+#GeneratePlotAnons ('fy') ; # disabled
 #GenerateEditHistoryReport ($plots_all, 4, 'Table') ;
 #return ;
 #  }
@@ -126,7 +126,7 @@
 WriteEditsPerUserType ($lang) ;
 GeneratePlotEdits ($lang) ;
 GeneratePlotReverts   ($lang) ;
-GeneratePlotAnons ($lang) ;
+  # GeneratePlotAnons ($lang) ; # disabled, R code needs debugging, and 
there is plenty to take in from other charts
 
 $plots_all ++ ;
 $plot_size = -s $path_out_plots\/PlotEdits . uc($lang) . .png ;
@@ -575,8 +575,6 @@
 
   my $file_script_R = $path_in . R-PlotScriptEdits.R-in ;
   GeneratePlotCallR ($out_script_plot, $file_script_R) ;
-
-exit ; # qqq
 }
 
 sub GeneratePlotReverts
@@ -683,7 +681,7 @@
   $out_script_plot =~ s/LANGUAGE/$out_language_name/g ;
 
   $reverts_ylim = ceil ($reverts_perc_max/5) * 5 ;
-  $out_script_plot =~ s/YLIM/c(0,$reverts_ylim)/g ;
+  $out_script_plot =~ s/YLIM_MAX/c(0,$reverts_ylim)/g ;
 
   my $file_script_R = $path_in . R-PlotScriptReverts.R-in ;
   GeneratePlotCallR ($out_script_plot, $file_script_R) ;
@@ -691,6 +689,8 @@
 
 sub GeneratePlotAnons
 {
+  return ; # skip for now, charts difficult to read, and R code needs debugging
+
   my $lang = shift ;
 
   return if $lang =~ /^zzz?$/ ;
@@ -786,7 +786,7 @@
 
   $out_script_plot =~ s/LANGUAGE/$out_language_name/g ;
 
-  $out_script_plot =~ s/YLIM/c(0,$reverts_ylim)/g ;
+  $out_script_plot =~ s/YLIM_MAX/c(0,$reverts_ylim)/g ;
 
   my $file_script_R = $path_in . R-PlotScriptAnons.R-in ;
   GeneratePlotCallR ($out_script_plot, $file_script_R) ;
@@ -850,16 +850,18 @@
 $month2 = $months {$month} ;
 my ($mm,$dd,$yy) = split ('\/', $month2) ;
 my  $mm = sprintf (%04d%02d,$yy,$mm) ;
+
+# needed to get equal number of rows in decomposed R object (which always 
starts with value for January)
 if ($months++ == 0)
 {
   if ($mm  2)
   {
-print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, 1, 31, $yy) 
. ,0,0,0,0\n ;
-print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, $mm-1, 28, $yy) 
. ,0,0,0,0\n ;
+print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, 1, 31, $yy) 
. ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n ;
+print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, $mm-1, 28, $yy) 
. ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n ;
   }
   elsif ($mm == 2)
   {
-print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, 1, 31, $yy) 
. ,0,0,0,0\n ;
+print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, 1, 31, $yy) 
. ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n ;
   }
 }
 
diff --git a/dumps/perl/WikiReportsProcessReverts.pm 
b/dumps/perl/WikiReportsProcessReverts.pm
index e5d6f06..5c4d113 100644
--- a/dumps/perl/WikiReportsProcessReverts.pm
+++ b/dumps/perl/WikiReportsProcessReverts.pm
@@ -26,8 +26,8 @@
   foreach $wp (@languages)
   {
 # next if $wp ne en ;
-next if $wp ne fy ; # qqq
-  LogT (\nReadRevertHistoryGenerateReports $wp\n\n) ;
+  
+LogT (\nReadRevertHistoryGenerateReports $wp\n\n) ;
 
 undef %reverts_per_article ;
 undef %reverts_in_non_article_namespaces ;
@@ -236,7 +236,6 @@
 {
   my $wp = shift ;
   Log (ProcessRevertsStats $wp\n) ;
-return if $wp ne 'fy' ; # qqq
 
   undef @top_reverting_users ;
   undef @top_reverted_users ;
@@ -353,7 +352,7 @@
 {
   my $wp = shift ;
   LogT (WriteReportReverts $wp\n) ;
-return if $wp ne 'fy' ; # qqq
+
   ReadFileCsv ($file_csv_namespaces) ;
   foreach $line (@csv)
   {
@@ -382,7 +381,9 @@
 
   

[MediaWiki-commits] [Gerrit] Possible license issue with Utkal font - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Possible license issue with Utkal font
..


Possible license issue with Utkal font

* Font license is unclear, but 'strings utkal.ttf' gives enough
  information about license which is GPL.

Bug: 50650
Change-Id: I57dde88749858fd4e5d44007a83ab627feecbdcb
---
M data/fontrepo/fonts/utkal/font.ini
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/data/fontrepo/fonts/utkal/font.ini 
b/data/fontrepo/fonts/utkal/font.ini
index 3b4f1fa..e4e1dd7 100644
--- a/data/fontrepo/fonts/utkal/font.ini
+++ b/data/fontrepo/fonts/utkal/font.ini
@@ -2,5 +2,5 @@
 languages=or
 version=0.13
 license=GPL
-#licensefile=
-url=http://www.exnet.btinternet.co.uk
+licensefile=gpl-2.0.txt
+url=http://oriya.sarovar.org/user_download.html

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57dde88749858fd4e5d44007a83ab627feecbdcb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Alolita alolita.sha...@gmail.com
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] contint: migrate qunit jobs to Jenkins slaves - change (operations/puppet)

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

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


Change subject: contint: migrate qunit jobs to Jenkins slaves
..

contint: migrate qunit jobs to Jenkins slaves

The qunit scripts will run as user jenkins-slave when tied to the
Jenkins Slaves. That needs us to tweak permissions of
/srv/localhost/qunit.

bug: 50231
Change-Id: I906908535b13b9cebe3efc11f26915cf17a3b8e9
---
M modules/contint/manifests/website.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/72086/1

diff --git a/modules/contint/manifests/website.pp 
b/modules/contint/manifests/website.pp
index 8c830fa..634783a 100644
--- a/modules/contint/manifests/website.pp
+++ b/modules/contint/manifests/website.pp
@@ -81,8 +81,8 @@
   file { '/srv/localhost/qunit':
 ensure = directory,
 mode   = '0775',
-owner  = 'jenkins',
-group  = 'jenkins',
+owner  = 'jenkins-slave',
+group  = 'jenkins-slave',
   }
 
   # Apache configuration for a virtual host on localhost

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I906908535b13b9cebe3efc11f26915cf17a3b8e9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] disable last set of charts + minor tweaks in revert reporting - change (analytics/wikistats)

2013-07-05 Thread Erik Zachte (Code Review)
Erik Zachte has submitted this change and it was merged.

Change subject: disable last set of charts + minor tweaks in revert reporting
..


disable last set of charts + minor tweaks in revert reporting

Change-Id: I327c7e40809ec2bbb3ada92750288196443eacae
---
M dumps/perl/WikiReports.pl
M dumps/perl/WikiReportsOutputEditHistory.pm
M dumps/perl/WikiReportsProcessReverts.pm
M dumps/perl/WikiReportsScriptsR.pm
4 files changed, 36 insertions(+), 23 deletions(-)

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



diff --git a/dumps/perl/WikiReports.pl b/dumps/perl/WikiReports.pl
index c879dda..26cc588 100644
--- a/dumps/perl/WikiReports.pl
+++ b/dumps/perl/WikiReports.pl
@@ -272,8 +272,6 @@
  ReadEditHistory ;
  ReadRevertHistoryGenerateReports ;
  GenerateEditHistoryReports ; # wait till R runs on stat1
-# print TEST !!! end\n ; # qqq
-# exit ;   # qqq
   }
 
   if (($language eq en)  (! $mode_wm))
diff --git a/dumps/perl/WikiReportsOutputEditHistory.pm 
b/dumps/perl/WikiReportsOutputEditHistory.pm
index dd9f0a2..aecc509 100644
--- a/dumps/perl/WikiReportsOutputEditHistory.pm
+++ b/dumps/perl/WikiReportsOutputEditHistory.pm
@@ -110,7 +110,7 @@
 #WriteEditsPerUserType ('fy') ;
 #GeneratePlotEdits ('fy');
 #GeneratePlotReverts   ('fy') ;
-#GeneratePlotAnons ('fy') ;
+#GeneratePlotAnons ('fy') ; # disabled
 #GenerateEditHistoryReport ($plots_all, 4, 'Table') ;
 #return ;
 #  }
@@ -126,7 +126,7 @@
 WriteEditsPerUserType ($lang) ;
 GeneratePlotEdits ($lang) ;
 GeneratePlotReverts   ($lang) ;
-GeneratePlotAnons ($lang) ;
+  # GeneratePlotAnons ($lang) ; # disabled, R code needs debugging, and 
there is plenty to take in from other charts
 
 $plots_all ++ ;
 $plot_size = -s $path_out_plots\/PlotEdits . uc($lang) . .png ;
@@ -575,8 +575,6 @@
 
   my $file_script_R = $path_in . R-PlotScriptEdits.R-in ;
   GeneratePlotCallR ($out_script_plot, $file_script_R) ;
-
-exit ; # qqq
 }
 
 sub GeneratePlotReverts
@@ -683,7 +681,7 @@
   $out_script_plot =~ s/LANGUAGE/$out_language_name/g ;
 
   $reverts_ylim = ceil ($reverts_perc_max/5) * 5 ;
-  $out_script_plot =~ s/YLIM/c(0,$reverts_ylim)/g ;
+  $out_script_plot =~ s/YLIM_MAX/c(0,$reverts_ylim)/g ;
 
   my $file_script_R = $path_in . R-PlotScriptReverts.R-in ;
   GeneratePlotCallR ($out_script_plot, $file_script_R) ;
@@ -691,6 +689,8 @@
 
 sub GeneratePlotAnons
 {
+  return ; # skip for now, charts difficult to read, and R code needs debugging
+
   my $lang = shift ;
 
   return if $lang =~ /^zzz?$/ ;
@@ -786,7 +786,7 @@
 
   $out_script_plot =~ s/LANGUAGE/$out_language_name/g ;
 
-  $out_script_plot =~ s/YLIM/c(0,$reverts_ylim)/g ;
+  $out_script_plot =~ s/YLIM_MAX/c(0,$reverts_ylim)/g ;
 
   my $file_script_R = $path_in . R-PlotScriptAnons.R-in ;
   GeneratePlotCallR ($out_script_plot, $file_script_R) ;
@@ -850,16 +850,18 @@
 $month2 = $months {$month} ;
 my ($mm,$dd,$yy) = split ('\/', $month2) ;
 my  $mm = sprintf (%04d%02d,$yy,$mm) ;
+
+# needed to get equal number of rows in decomposed R object (which always 
starts with value for January)
 if ($months++ == 0)
 {
   if ($mm  2)
   {
-print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, 1, 31, $yy) 
. ,0,0,0,0\n ;
-print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, $mm-1, 28, $yy) 
. ,0,0,0,0\n ;
+print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, 1, 31, $yy) 
. ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n ;
+print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, $mm-1, 28, $yy) 
. ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n ;
   }
   elsif ($mm == 2)
   {
-print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, 1, 31, $yy) 
. ,0,0,0,0\n ;
+print EDITS_OUT $lang, . sprintf (%02d/%02d/%04d, 1, 31, $yy) 
. ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n ;
   }
 }
 
diff --git a/dumps/perl/WikiReportsProcessReverts.pm 
b/dumps/perl/WikiReportsProcessReverts.pm
index e5d6f06..5c4d113 100644
--- a/dumps/perl/WikiReportsProcessReverts.pm
+++ b/dumps/perl/WikiReportsProcessReverts.pm
@@ -26,8 +26,8 @@
   foreach $wp (@languages)
   {
 # next if $wp ne en ;
-next if $wp ne fy ; # qqq
-  LogT (\nReadRevertHistoryGenerateReports $wp\n\n) ;
+  
+LogT (\nReadRevertHistoryGenerateReports $wp\n\n) ;
 
 undef %reverts_per_article ;
 undef %reverts_in_non_article_namespaces ;
@@ -236,7 +236,6 @@
 {
   my $wp = shift ;
   Log (ProcessRevertsStats $wp\n) ;
-return if $wp ne 'fy' ; # qqq
 
   undef @top_reverting_users ;
   undef @top_reverted_users ;
@@ -353,7 +352,7 @@
 {
   my $wp = shift ;
   LogT (WriteReportReverts $wp\n) ;
-return if $wp ne 'fy' ; # qqq
+
   ReadFileCsv ($file_csv_namespaces) ;
   foreach $line (@csv)
   {
@@ -382,7 +381,9 @@
 
   my $out_html_title = 

[MediaWiki-commits] [Gerrit] Iranian Sans is missing source in font.ini - change (mediawiki...UniversalLanguageSelector)

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

Change subject:  Iranian Sans is missing source in font.ini
..


Iranian Sans is missing source in font.ini

 Until we've official page for font available, keeping Fedora page is
 better. It also says that official site will be available soon based
 upon Google Groups discussion about font license.

 Bug: 50648

Change-Id: Iae9be3788d6d05c86c66984faa8057d147b0561b
---
M data/fontrepo/fonts/IranianSans/font.ini
R data/fontrepo/licenses/IranianSans.txt
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/data/fontrepo/fonts/IranianSans/font.ini 
b/data/fontrepo/fonts/IranianSans/font.ini
index c829c1b..5fa4149 100644
--- a/data/fontrepo/fonts/IranianSans/font.ini
+++ b/data/fontrepo/fonts/IranianSans/font.ini
@@ -3,4 +3,4 @@
 version=1.0
 license=IranianSans
 licensefile=IranianSans.txt
-#url=http://fedoraproject.org/wiki/Iranian_fonts
+url=http://fedoraproject.org/wiki/Iranian_fonts
diff --git a/data/fontrepo/licenses/IranianSants.txt 
b/data/fontrepo/licenses/IranianSans.txt
similarity index 100%
rename from data/fontrepo/licenses/IranianSants.txt
rename to data/fontrepo/licenses/IranianSans.txt

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae9be3788d6d05c86c66984faa8057d147b0561b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Alolita alolita.sha...@gmail.com
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] Add php modules installed via user request (from SAL) - change (operations/puppet)

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

Change subject: Add php modules installed via user request (from SAL)
..


Add php modules installed via user request (from SAL)

Change-Id: Id5b753c7fd7d01e7038310c031dd87fe4ca72ebe
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index b28b225..e58021e 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -113,6 +113,8 @@
   # PHP libraries
   'php5-cli',
   'php5-curl',
+  'php5-gd',
+  'php5-mcrypt',
   'php5-mysql',
   'php5-redis',
   'php5-xsl',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5b753c7fd7d01e7038310c031dd87fe4ca72ebe
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Allow relative inclusions in Main namespace. - change (mediawiki/core)

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

Change subject: Allow relative inclusions in Main namespace.
..


Allow relative inclusions in Main namespace.

In previous versions of MediaWiki, relative inclusions ({{../name}})
were not handled properly in the Main namespace - it tried to include
Template:Parent/name instead of just Parent/name article. In other
namespaces they worked, though (all in case of enabled subpages). The
patch fixes this inconsistence and allows to use relative inclusions
in Main.

Change-Id: Ie04f23c180e501631c629a39b997796a1725fb67
---
M includes/parser/Parser.php
M tests/parser/parserTests.txt
2 files changed, 42 insertions(+), 2 deletions(-)

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



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 28cde7f..c2eeb0a 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3296,8 +3296,9 @@
$ns = NS_TEMPLATE;
# Split the title into page and subpage
$subpage = '';
-   $part1 = $this-maybeDoSubpageLink( $part1, $subpage );
-   if ( $subpage !== '' ) {
+   $relative = $this-maybeDoSubpageLink( $part1, $subpage 
);
+   if ( $part1 !== $relative ) {
+   $part1 = $relative;
$ns = $this-mTitle-getNamespace();
}
$title = Title::newFromText( $part1, $ns );
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index d0f41e5..09e1c7c 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -12065,6 +12065,45 @@
 /p
 !! end
 
+!! article
+Subpage test/L1/L2/L3Sibling
+!! text
+Sibling article
+!! endarticle
+
+!! test
+Transclusion of a sibling page (one level up)
+!! options
+subpage title=[[Subpage test/L1/L2/L3]]
+!! input
+{{../L3Sibling}}
+!! result
+pSibling article
+/p
+!! end
+
+!! test
+Transclusion of a child page
+!! options
+subpage title=[[Subpage test/L1/L2]]
+!! input
+{{/L3Sibling}}
+!! result
+pSibling article
+/p
+!! end
+
+!! test
+Non-transclusion because of too many up levels
+!! options
+subpage title=[[Subpage test/L1/L2/L3]]
+!! input
+{{../../../../More than parent}}
+!! result
+p{{../../../../More than parent}}
+/p
+!! end
+
 !! test
 Definition list code coverage
 !! input

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie04f23c180e501631c629a39b997796a1725fb67
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Matmarex matma@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] contint: file perms for qunit jobs - change (operations/puppet)

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

Change subject: contint: file perms for qunit jobs
..


contint: file perms for qunit jobs

The qunit scripts will run as user jenkins-slave when tied to the
Jenkins Slaves. That needs us to tweak permissions of
/srv/localhost/qunit.

bug: 50231
Change-Id: I906908535b13b9cebe3efc11f26915cf17a3b8e9
---
M modules/contint/manifests/website.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/contint/manifests/website.pp 
b/modules/contint/manifests/website.pp
index 8c830fa..634783a 100644
--- a/modules/contint/manifests/website.pp
+++ b/modules/contint/manifests/website.pp
@@ -81,8 +81,8 @@
   file { '/srv/localhost/qunit':
 ensure = directory,
 mode   = '0775',
-owner  = 'jenkins',
-group  = 'jenkins',
+owner  = 'jenkins-slave',
+group  = 'jenkins-slave',
   }
 
   # Apache configuration for a virtual host on localhost

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I906908535b13b9cebe3efc11f26915cf17a3b8e9
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Allow disabling of IME by a jQuery selector - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Allow disabling of IME by a jQuery selector
..


Allow disabling of IME by a jQuery selector

Add the variable $wgULSNoImeSelectors to allow custom
disabling of IME in specific elements.

Add captcha input field id to the exclusion list.

Bug: 41675
Change-Id: Ib03a20c50a4f473e6a58638b85da16659268eb09
---
M UniversalLanguageSelector.hooks.php
M UniversalLanguageSelector.php
M resources/js/ext.uls.ime.js
3 files changed, 16 insertions(+), 2 deletions(-)

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



diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index e253a02..0450ca1 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -245,7 +245,7 @@
 */
public static function addConfig( $vars ) {
global $wgULSGeoService, $wgULSIMEEnabled, $wgULSPosition,
-   $wgULSAnonCanChangeLanguage, $wgULSEventLogging;
+   $wgULSAnonCanChangeLanguage, $wgULSEventLogging, 
$wgULSNoImeSelectors;
 
// Place constant stuff here (not depending on request context)
if ( is_string( $wgULSGeoService ) ) {
@@ -255,6 +255,7 @@
$vars['wgULSPosition'] = $wgULSPosition;
$vars['wgULSAnonCanChangeLanguage'] = 
$wgULSAnonCanChangeLanguage;
$vars['wgULSEventLogging'] = $wgULSEventLogging;
+   $vars['wgULSNoImeSelectors'] = $wgULSNoImeSelectors;
 
return true;
}
diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php
index f261cc7..24b758b 100644
--- a/UniversalLanguageSelector.php
+++ b/UniversalLanguageSelector.php
@@ -123,6 +123,13 @@
  */
 $wgULSEventLogging = false;
 
+/**
+ * Array of jQuery selectors of elements on which IME must not be enabled.
+ *
+ * @since 2013.07
+ */
+$wgULSNoImeSelectors = array( '#wpCaptchaWord' );
+
 $dir = __DIR__;
 
 // Internationalization
diff --git a/resources/js/ext.uls.ime.js b/resources/js/ext.uls.ime.js
index 1d26010..be03c26 100644
--- a/resources/js/ext.uls.ime.js
+++ b/resources/js/ext.uls.ime.js
@@ -160,7 +160,7 @@
mw.ime.setup = function () {
 
$( 'body' ).on( 'focus.ime', inputSelector, function () {
-   var imeselector, $input;
+   var imeselector, $input, noImeSelector;
 
// It's possible to disable IME through the settings
// panels before it was initialized, so we need to check
@@ -170,6 +170,12 @@
}
 
$input = $( this );
+   noImeSelector = mw.config.get( 'wgULSNoImeSelectors' 
).join( ', ' );
+
+   if ( noImeSelector.length  $input.is( noImeSelector ) 
) {
+   $input.addClass( 'noime' );
+   }
+
$input.ime( {
languages: mw.ime.getIMELanguageList(),
languageSelector: function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib03a20c50a4f473e6a58638b85da16659268eb09
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
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: jenkins-bot

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


[MediaWiki-commits] [Gerrit] tie qunit jobs to slaves - change (integration/jenkins-job-builder-config)

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

Change subject: tie qunit jobs to slaves
..


tie qunit jobs to slaves

That needs a bunch of permission changes on the server. Will update
puppet. Jobs updated:

mediawiki-core-qunit
mwext-EventLogging-qunit
mwext-GuidedTour-qunit
mwext-MobileFrontend-qunit
mwext-VisualEditor-qunit

bug: 50231
Change-Id: Idd173362d8e955736682be8e31c9288d9532c50c
---
M mediawiki-extensions.yaml
M mediawiki.yaml
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 147f8b6..453bc4e 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -42,7 +42,7 @@
 
 - job-template:
 name: '{name}-{ext-name}-qunit'
-node: master  # FIXME move to slave 'gallium'
+node: hasSlaveScripts
 defaults: use-zuul-for-mw-ext
 triggers:
  - zuul
diff --git a/mediawiki.yaml b/mediawiki.yaml
index c0a5c4b..2f8b101 100644
--- a/mediawiki.yaml
+++ b/mediawiki.yaml
@@ -42,7 +42,7 @@
 # Generic job to run QUnit
 - job-template:
 name: '{name}-qunit'
-node: master  # FIXME move to slave 'gallium'
+node: hasSlaveScripts
 defaults: use-zuul
 scm:
  - git-mwcore-nosubmodules

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd173362d8e955736682be8e31c9288d9532c50c
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Apply webfonts to the IME selector too - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Apply webfonts to the IME selector too
..

Apply webfonts to the IME selector too

It get added to DOM after DOM is ready, and does not inherit styles
(by design)

Change-Id: I45a982b5c1c2a39718f38e77a33b79f89e460474
---
M resources/js/ext.uls.ime.js
M resources/js/ext.uls.webfonts.js
2 files changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/resources/js/ext.uls.ime.js b/resources/js/ext.uls.ime.js
index d3da527..11d2530 100644
--- a/resources/js/ext.uls.ime.js
+++ b/resources/js/ext.uls.ime.js
@@ -148,6 +148,8 @@
e.stopPropagation();
} );
 
+   // apply fonts to this
+   imeselector.$menu.webfonts();
return $( 'div' )
.addClass( 'uls-ime-menu-settings-item' )
.append( $disableInputToolsLink, $moreSettingsLink );
diff --git a/resources/js/ext.uls.webfonts.js b/resources/js/ext.uls.webfonts.js
index 804f0fa..0c524a7 100644
--- a/resources/js/ext.uls.webfonts.js
+++ b/resources/js/ext.uls.webfonts.js
@@ -52,7 +52,7 @@
 
mw.webfonts.setup = function () {
// Initialize webfonts
-   $( 'body' ).webfonts( {
+   $.fn.webfonts.defaults = $.extend( $.fn.webfonts.defaults, {
fontSelector: function ( repository, language ) {
var font;
 
@@ -78,6 +78,7 @@
return $.fn.webfonts.defaults.exclude;
}() )
} );
+   $( 'body' ).webfonts();
};
 
$( document ).ready( function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45a982b5c1c2a39718f38e77a33b79f89e460474
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] Fix the capitalization - change (mediawiki...EducationProgram)

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

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


Change subject: Fix the capitalization
..

Fix the capitalization

For consistency

Change-Id: I965cc283412277784f1b717c2636d580e375475f
---
M EducationProgram.i18n.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/EducationProgram.i18n.php b/EducationProgram.i18n.php
index 17720df..609e095 100644
--- a/EducationProgram.i18n.php
+++ b/EducationProgram.i18n.php
@@ -172,19 +172,19 @@
 
// Groups
'group-epcoordinator' = 'Course coordinators',
-   'group-epcoordinator-member' = '{{GENDER:$1|Course coordinator}}',
+   'group-epcoordinator-member' = '{{GENDER:$1|course coordinator}}',
'grouppage-epcoordinator' = '{{ns:project}}:Course_coordinators',
 
'group-eponline' = 'Course online volunteers',
-   'group-eponline-member' = '{{GENDER:$1|Course online volunteer}}',
+   'group-eponline-member' = '{{GENDER:$1|course online volunteer}}',
'grouppage-eponline' = '{{ns:project}}:Course_online_volunteers',
 
'group-epcampus' = 'Course campus volunteers',
-   'group-epcampus-member' = '{{GENDER:$1|Course campus volunteer}}',
+   'group-epcampus-member' = '{{GENDER:$1|course campus volunteer}}',
'grouppage-epcampus' = '{{ns:project}}:Course_campus_volunteers',
 
'group-epinstructor' = 'Course instructor',
-   'group-epinstructor-member' = '{{GENDER:$1|Course instructor}}',
+   'group-epinstructor-member' = '{{GENDER:$1|course instructor}}',
'grouppage-epinstructor' = '{{ns:project}}:Course_instructors',
 
// Special pages

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I965cc283412277784f1b717c2636d580e375475f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
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] GeoCoordinateParser: Improved direction detection - change (mediawiki...DataValues)

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

Change subject: GeoCoordinateParser: Improved direction detection
..


GeoCoordinateParser: Improved direction detection

Direction may be specified either at the end or the beginning of a coordinate 
segment.

Change-Id: Iebbb52ac0d52a537af1524ce1d7107a6de01848c
---
M ValueParsers/includes/parsers/DdCoordinateParser.php
M ValueParsers/includes/parsers/DmCoordinateParser.php
M ValueParsers/includes/parsers/DmsCoordinateParser.php
M ValueParsers/includes/parsers/FloatCoordinateParser.php
M ValueParsers/tests/phpunit/parsers/DdCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/DmCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/DmsCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/FloatCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/GeoCoordinateParserTest.php
9 files changed, 230 insertions(+), 80 deletions(-)

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



diff --git a/ValueParsers/includes/parsers/DdCoordinateParser.php 
b/ValueParsers/includes/parsers/DdCoordinateParser.php
index c9c1445..bcf6b94 100644
--- a/ValueParsers/includes/parsers/DdCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DdCoordinateParser.php
@@ -139,24 +139,34 @@
 * @return string
 */
protected function resolveDirection( $coordinate ) {
-   // Get the last char, which could be a direction indicator
-   $lastChar = strtoupper( substr( $coordinate, -1 ) );
-
$n = $this-getOption( self::OPT_NORTH_SYMBOL );
$e = $this-getOption( self::OPT_EAST_SYMBOL );
$s = $this-getOption( self::OPT_SOUTH_SYMBOL );
$w = $this-getOption( self::OPT_WEST_SYMBOL );
 
-   // If there is a direction indicator, remove it, and prepend a 
minus sign for south and west directions.
-   // If there is no direction indicator, the coordinate is 
already non-directional and no work is required.
-   if ( in_array( $lastChar, array( $n, $e, $s, $w ) ) ) {
-   $coordinate = substr( $coordinate, 0, -1 );
+   // If there is a direction indicator, remove it, and prepend a 
minus sign for south and west
+   // directions. If there is no direction indicator, the 
coordinate is already non-directional
+   // and no work is required.
+   foreach( array( $n, $e, $s, $w ) as $direction ) {
+   // The coordinate segment may either start or end with 
a direction symbol.
+   preg_match(
+   '/^(' . $direction . '|)([^' . $direction . 
']+)(' . $direction . '|)$/i',
+   $coordinate,
+   $matches
+   );
 
-   if ( in_array( $lastChar, array( $s, $w ) ) ) {
-   $coordinate = '-' . $coordinate;
+   if( $matches[1] === $direction || $matches[3] === 
$direction ) {
+   $coordinate = $matches[2];
+
+   if ( in_array( $direction, array( $s, $w ) ) ) {
+   $coordinate = '-' . $coordinate;
+   }
+
+   return $coordinate;
}
}
 
+   // Coordinate segment does not include a direction symbol.
return $coordinate;
}
 
@@ -253,19 +263,39 @@
// Separator not present within the string, trying to 
figure out the segments by
// splitting after the first direction character or 
degree symbol:
$delimiters = array(
-   $this-getOption( self::OPT_NORTH_SYMBOL ),
-   $this-getOption( self::OPT_SOUTH_SYMBOL ),
'°'
);
+
+   $ns = array(
+   $this-getOption( self::OPT_NORTH_SYMBOL ),
+   $this-getOption( self::OPT_SOUTH_SYMBOL )
+   );
+
+   $ew = array(
+   $this-getOption( self::OPT_EAST_SYMBOL ),
+   $this-getOption( self::OPT_WEST_SYMBOL )
+   );
+
+   foreach( $ns as $delimiter ) {
+   if( mb_strpos( $normalizedCoordinateString, 
$delimiter ) === 0 ) {
+   // String starts with north or west 
symbol: Separation needs to be done
+   // before the east or west symbol.
+   $delimiters = array_merge( $ew, 
$delimiters );
+ 

[MediaWiki-commits] [Gerrit] (bug 50798) Allow dynamic site link group section headings i... - change (mediawiki...Wikibase)

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

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


Change subject: (bug 50798) Allow dynamic site link group section headings in 
item view
..

(bug 50798) Allow dynamic site link group section headings in item view

Change-Id: Ibd63ad8b5f1d90628151412deacfe89e7dc94822
---
M lib/resources/templates.php
M repo/includes/ItemView.php
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
4 files changed, 16 insertions(+), 4 deletions(-)


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

diff --git a/lib/resources/templates.php b/lib/resources/templates.php
index 70a6ad8..3924e65 100644
--- a/lib/resources/templates.php
+++ b/lib/resources/templates.php
@@ -46,6 +46,11 @@
 h2 class=wb-section-heading dir=auto id=$2$1/h2
 HTML;
 
+   $templates['wb-section-sitelink-heading'] =
+HTML
+h2 class=wb-section-heading $3 dir=auto id=$2$1/h2
+HTML;
+
$templates['wb-claimlist'] =
 HTML
 div class=wb-claimlist
diff --git a/repo/includes/ItemView.php b/repo/includes/ItemView.php
index 5429f14..48b4d74 100644
--- a/repo/includes/ItemView.php
+++ b/repo/includes/ItemView.php
@@ -90,9 +90,10 @@
$html = $thead = $tbody = $tfoot = '';
 
$html .= wfTemplate(
-   'wb-section-heading',
+   'wb-section-sitelink-heading',
wfMessage( 'wikibase-sitelinks-' . $group )-parse(), 
// heading
-   htmlspecialchars( 'sitelinks-' . $group, ENT_QUOTES ) 
// ID
+   htmlspecialchars( 'sitelinks-' . $group, ENT_QUOTES ), 
// ID
+   'wb-sitelink-heading'
// TODO: support entity-id as prefix for element IDs.
);
 
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index b3daed2..37623ba 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -53,7 +53,6 @@
'wikibase.serialization.fetchedcontent'
),
'messages' = array(
-   'wikibase-sitelinks-wikipedia',
'wikibase-statements',
'wikibase-copyrighttooltip-acknowledge',
'wikibase-anonymouseditwarning',
diff --git a/repo/resources/wikibase.ui.entityViewInit.js 
b/repo/resources/wikibase.ui.entityViewInit.js
index 8228eea..7c9f54a 100644
--- a/repo/resources/wikibase.ui.entityViewInit.js
+++ b/repo/resources/wikibase.ui.entityViewInit.js
@@ -107,6 +107,13 @@
new wb.ui.AliasesEditTool( this );
} );
 
+   // store site link section heading text for js entity 
view
+   var siteLinkHeadings = [];
+
+   $( '.wb-sitelink-heading' ).each( function( i ) {
+   siteLinkHeadings[$( this ).attr( 'id' )] = $( 
this ).text();
+   });
+
$( '.wb-section-heading' ).remove();
 
// BUILD CLAIMS VIEW:
@@ -133,7 +140,7 @@
$( this ).before(
mw.template(
'wb-section-heading',
-   mw.msg( 'wikibase-sitelinks-' + 
group ),
+   siteLinkHeadings['sitelinks-' + 
group],
'sitelinks'
).append( $sitesCounterContainer )
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd63ad8b5f1d90628151412deacfe89e7dc94822
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Improve disable_functions handling in LuaStandalone - change (mediawiki...Scribunto)

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

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


Change subject: Improve disable_functions handling in LuaStandalone
..

Improve disable_functions handling in LuaStandalone

If the user is on a webhost that has proc_open listed in PHP's
disable_functions directive, we should give a better error message.
Until we no longer support PHP below 5.4, we should do the same for
safe_mode. And since we're doing that, we may as well report any other
warnings if proc_open fails, too.

In addition, this cleans up error handling in
Scribunto_LuaEngine::load() so it doesn't pretend the interpreter is
loaded if getInterpreter() throws an exception. Otherwise other code
winds up with PHP fatal errors trying to access a null value.

Bug: 50706
Change-Id: I2887b722e089fd7a526aa7dcab9c80deb343d8ac
---
M Scribunto.i18n.php
M engines/LuaCommon/LuaCommon.php
M engines/LuaStandalone/LuaStandaloneEngine.php
3 files changed, 56 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/89/72089/1

diff --git a/Scribunto.i18n.php b/Scribunto.i18n.php
index 3735b71..91eeb68 100644
--- a/Scribunto.i18n.php
+++ b/Scribunto.i18n.php
@@ -55,6 +55,9 @@
'scribunto-lua-noreturn' = 'Script error: The module did not return a 
value. It is supposed to return an export table.',
'scribunto-lua-notarrayreturn' = 'Script error: The module returned 
something other than a table. It is supposed to return an export table.',
'scribunto-luastandalone-proc-error' = 'Lua error: Cannot create 
process.',
+   'scribunto-luastandalone-proc-error-msg' = 'Lua error: Cannot create 
process: $2',
+   'scribunto-luastandalone-proc-error-proc-open' = 'Lua error: Cannot 
create process: proc_open is not available. Check PHP\'s disable_functions 
configuration directive.',
+   'scribunto-luastandalone-proc-error-safe-mode' = 'Lua error: Cannot 
create process. Note that PHP\'s deprecated safe_mode configuration directive 
is enabled.',
'scribunto-luastandalone-decode-error' = 'Lua error: Internal error: 
Unable to decode message.',
'scribunto-luastandalone-write-error' = 'Lua error: Internal error: 
Error writing to pipe.',
'scribunto-luastandalone-read-error' = 'Lua error: Internal error: 
Error reading from pipe.',
@@ -129,6 +132,11 @@
'scribunto-lua-noreturn' = 'Error message.',
'scribunto-lua-notarrayreturn' = 'Error message.',
'scribunto-luastandalone-proc-error' = 'Exception message.',
+   'scribunto-luastandalone-proc-error-msg' = 'Exception message. 
Parameters:
+* $1 - (Unused)
+* $2 - Warning/error text from PHP',
+   'scribunto-luastandalone-proc-error-proc-open' = 'Exception message 
displayed when PHP\'s proc_open function is not available, which is needed by 
the LuaStandalone engine.',
+   'scribunto-luastandalone-proc-error-safe-mode' = 'Exception message 
displayed when PHP\'s safe_mode configuration directive is enabled.',
'scribunto-luastandalone-decode-error' = 'Exception message.',
'scribunto-luastandalone-write-error' = 'Exception message.',
'scribunto-luastandalone-read-error' = 'Exception message.',
diff --git a/engines/LuaCommon/LuaCommon.php b/engines/LuaCommon/LuaCommon.php
index bd2bd6b..ab893ec 100644
--- a/engines/LuaCommon/LuaCommon.php
+++ b/engines/LuaCommon/LuaCommon.php
@@ -67,32 +67,38 @@
}
$this-loaded = true;
 
-   $this-interpreter = $this-newInterpreter();
+   try {
+   $this-interpreter = $this-newInterpreter();
 
-   $funcs = array(
-   'loadPackage',
-   'frameExists',
-   'newChildFrame',
-   'getExpandedArgument',
-   'getAllExpandedArguments',
-   'expandTemplate',
-   'callParserFunction',
-   'preprocess',
-   'incrementExpensiveFunctionCount',
-   );
+   $funcs = array(
+   'loadPackage',
+   'frameExists',
+   'newChildFrame',
+   'getExpandedArgument',
+   'getAllExpandedArguments',
+   'expandTemplate',
+   'callParserFunction',
+   'preprocess',
+   'incrementExpensiveFunctionCount',
+   );
 
-   $lib = array();
-   foreach ( $funcs as $name ) {
-   $lib[$name] = array( $this, $name );
-   }
+   $lib = array();
+   foreach ( $funcs as $name ) {
+

[MediaWiki-commits] [Gerrit] Updating jmxtrans module for Nik's recent slope + units gang... - change (operations/puppet)

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

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


Change subject: Updating jmxtrans module for Nik's recent slope + units ganglia 
support
..

Updating jmxtrans module for Nik's recent slope + units ganglia support

Change-Id: Ibf15f460b5390bab16ee6980badc919092b6bcc2
---
M modules/jmxtrans
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/91/72091/1

diff --git a/modules/jmxtrans b/modules/jmxtrans
index ab92ae3..d77fa4c 16
--- a/modules/jmxtrans
+++ b/modules/jmxtrans
-Subproject commit ab92ae345349749fa4ba9f0ab93d03326a43efdf
+Subproject commit d77fa4c8d2dedf1f3e0f8a8ce36b033e60ae1dc8

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf15f460b5390bab16ee6980badc919092b6bcc2
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] Slick support for ganglia slope and units. - change (operations...jmxtrans)

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

Change subject: Slick support for ganglia slope and units.
..


Slick support for ganglia slope and units.

Change-Id: I72c37cbdce61689cfdbe7895c00cb50f6ce62b0e
---
M manifests/init.pp
M manifests/metrics.pp
M templates/jmxtrans.json.erb
3 files changed, 90 insertions(+), 91 deletions(-)

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



diff --git a/manifests/init.pp b/manifests/init.pp
index b2a3bb2..9576bd4 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -13,4 +13,3 @@
 require = Package['jmxtrans'],
 }
 }
-
diff --git a/manifests/metrics.pp b/manifests/metrics.pp
index 52fc7a2..2e16660 100644
--- a/manifests/metrics.pp
+++ b/manifests/metrics.pp
@@ -1,34 +1,55 @@
 # == Define jmxtrans::metrics
 #
-# Writes a jmxtrans JSON file in
-# /var/lib/jmxtrans/$title.json.
-# Each file in this directory should correspond to a single
-# JMX instance and specify the object and metric names to query
-# the JMX instance for.
+# Writes the config file causing this machine to monitor a set of metrics on a
+# host.  That file is named /etc/jmxtrans/$title.json.
+#
+# Suggestion: use these as external resources to force one or more jmxtrans
+# installs to monitor this machine.  See jmxtrans::metrics::jvm for an exmple.
 #
 # == Parameters
 # $jmx  - host:port of JMX to query (required)
-# $queries  - array of hashes of the form [ { obj = JMX object 
name, attr = [ array, of, JMX, metric, names ] }, ... ]
+# $objects  - array of hashes of the form:
+#   [
+#   {
+#   name= JMX object name,
+#   resultAlias = pretty alias for JMX name,
+#   attrs   = {
+#   attribute name = {
+#   units = unit name,
+#   slope = slope type
+#   }
+#   }
+#   }
+#   ]
+# --resultAlias is optional
+# --units is only required for ganglia
+# ---Displayed with the graph to give context.  Nothing is worse than looking 
at
+# ---a graph and not knowing if something is in seconds, milliseconds, or
+# ---microseconds.
+# --slope is only required for ganglia and is 'both', 'positive', or 'negative'
+# ---See 
http://codeblog.majakorpi.net/post/16281432462/ganglia-xml-slope-attribute
+# ---for more information including the rrd-beginners link if the concept sitll
+# ---isn't clear.
+# --Yes, the hash after attribute name could be empty.
+# --No, we don't support replacing it with an array of names.
 # $jmx_alias- Server alias name.  Optional.
 # $jmx_username - JMX username (if there is one)  Optional.
 # $jmx_password - JMX password (if there is one)  Optional.
 # $ganglia  - host:port of Ganglia gmond.  Optional.
 # $ganglia_group_name   - Ganglia metrics group.  Optional.
-# $ganglia_settings - A hash of any extra ganglia output writer settings.
-# See: 
https://github.com/jmxtrans/jmxtrans/wiki/GangliaWriter.
 # $graphite - host:port of Graphite server  Optional.
 # $graphite_root_prefix - rootPrefix for Graphite.  Optional.
-# $outfile  - local file path in which to save metric query 
results.  Optional.
+# $outfile  - local file path in which to save metric query 
results.
+#   Optional.
 #
 define jmxtrans::metrics(
 $jmx,
-$queries,
+$objects,
 $jmx_alias= undef,
 $jmx_username = undef,
 $jmx_password = undef,
 $ganglia  = undef,
 $ganglia_group_name   = undef,
-$ganglia_settings = undef,
 $graphite = undef,
 $graphite_root_prefix = undef,
 $outfile  = undef
@@ -36,9 +57,9 @@
 {
 include jmxtrans
 
-file { /var/lib/jmxtrans/${title}.json:
+file { /etc/jmxtrans/${title}.json:
 content = template('jmxtrans/jmxtrans.json.erb'),
 notify  = Service['jmxtrans'],
 require = Package['jmxtrans'],
 }
-}
\ No newline at end of file
+}
diff --git a/templates/jmxtrans.json.erb b/templates/jmxtrans.json.erb
index 2123905..48399b6 100644
--- a/templates/jmxtrans.json.erb
+++ b/templates/jmxtrans.json.erb
@@ -1,87 +1,66 @@
-%
+% (jmx_host, jmx_port) = jmx.split(':') -%
 
-(jmx_host, jmx_port) = jmx.split(':')
-
-# Build output writer json strings
-# from the outfile, ganglia, and/or
-# graphite variables.
-
-output_writers = []
-
-if @outfile
-  output_writers.push({
-\@class\ : \com.googlecode.jmxtrans.model.output.KeyOutWriter\,
-\settings\ : {
-  \outputFile\ : \#{outfile}\
-}
-  })
-end
-
-if @ganglia
-  (ganglia_host, ganglia_port) = ganglia.split(':') if @ganglia
-
-  ganglia_output_writer = {
-\@class\ : \com.googlecode.jmxtrans.model.output.GangliaWriter\,
-\settings\  : {
-  \host\  

[MediaWiki-commits] [Gerrit] Add wikidata/wikivoyage LVS service IPs - change (operations/puppet)

2013-07-05 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Add wikidata/wikivoyage LVS service IPs
..

Add wikidata/wikivoyage LVS service IPs

Change-Id: I84240305e09ee0234e6ecfc83fbddbfb8aaa2d7e
---
M manifests/role/protoproxy.pp
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/72092/1

diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index e5ef103..6152c7e 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -64,7 +64,7 @@
 realserver_ips = $::site ? {
 'pmtpa' = [ '208.80.152.200', '208.80.152.201', 
'208.80.152.202', '208.80.152.203', '208.80.152.204', '208.80.152.205', 
'208.80.152.206', '208.80.152.207', '208.80.152.208', '208.80.152.209', 
'208.80.152.210', '208.80.152.211', '208.80.152.3', '208.80.152.118', 
'208.80.152.218', '208.80.152.219', '2620:0:860:ed1a::', '2620:0:860:ed1a::1', 
'2620:0:860:ed1a::2', '2620:0:860:ed1a::3', '2620:0:860:ed1a::4', 
'2620:0:860:ed1a::5', '2620:0:860:ed1a::6', '2620:0:860:ed1a::7', 
'2620:0:860:ed1a::8', '2620:0:860:ed1a::9', '2620:0:860:ed1a::a', 
'2620:0:860:ed1a::b', '2620:0:860:ed1a::c', '2620:0:860:ed1a::12', 
'2620:0:860:ed1a::13' ],
 'eqiad' = [ '208.80.154.224', '208.80.154.225', 
'208.80.154.226', '208.80.154.227', '208.80.154.228', '208.80.154.229', 
'208.80.154.230', '208.80.154.231', '208.80.154.232', '208.80.154.233', 
'208.80.154.234', '208.80.154.235', '208.80.154.236', '208.80.154.242', 
'208.80.154.243', '2620:0:861:ed1a::', '2620:0:861:ed1a::1', 
'2620:0:861:ed1a::2', '2620:0:861:ed1a::3', '2620:0:861:ed1a::4', 
'2620:0:861:ed1a::5', '2620:0:861:ed1a::6', '2620:0:861:ed1a::7', 
'2620:0:861:ed1a::8', '2620:0:861:ed1a::9', '2620:0:861:ed1a::a', 
'2620:0:861:ed1a::b', '2620:0:861:ed1a::c', '2620:0:861:ed1a::12', 
'2620:0:861:ed1a::13' ],
-'esams' = [ '91.198.174.224', '91.198.174.225', 
'91.198.174.233', '91.198.174.234', '91.198.174.226', '91.198.174.227', 
'91.198.174.228', '91.198.174.229', '91.198.174.230', '91.198.174.231', 
'91.198.174.232', '91.198.174.235', '91.198.174.236', '2620:0:862:ed1a::', 
'2620:0:862:ed1a::1', '2620:0:862:ed1a::2', '2620:0:862:ed1a::3', 
'2620:0:862:ed1a::4', '2620:0:862:ed1a::5', '2620:0:862:ed1a::6', 
'2620:0:862:ed1a::7', '2620:0:862:ed1a::8', '2620:0:862:ed1a::9', 
'2620:0:862:ed1a::a', '2620:0:862:ed1a::b', '2620:0:862:ed1a::c' ],
+'esams' = [ '91.198.174.224', '91.198.174.225', 
'91.198.174.233', '91.198.174.234', '91.198.174.226', '91.198.174.227', 
'91.198.174.228', '91.198.174.229', '91.198.174.230', '91.198.174.231', 
'91.198.174.232', '91.198.174.235', '91.198.174.236', '91.198.174.237', 
'91.198.174.238', '2620:0:862:ed1a::', '2620:0:862:ed1a::1', 
'2620:0:862:ed1a::2', '2620:0:862:ed1a::3', '2620:0:862:ed1a::4', 
'2620:0:862:ed1a::5', '2620:0:862:ed1a::6', '2620:0:862:ed1a::7', 
'2620:0:862:ed1a::8', '2620:0:862:ed1a::9', '2620:0:862:ed1a::a', 
'2620:0:862:ed1a::b', '2620:0:862:ed1a::c', '2620:0:862:ed1a::12', 
'2620:0:862:ed1a::13' ],
 }
 }
 
@@ -297,14 +297,14 @@
 proxy_addresses = {
 'pmtpa' = [ '208.80.152.218', '[2620:0:860:ed1a::12]' ],
 'eqiad' = [ '208.80.154.242', '[2620:0:861:ed1a::12]' ],
-# 'esams' = [ '127.0.0.1' ],
+'esams' = [ '91.198.174.237', '[2620:0:862:ed1a::12]' ],
 },
 proxy_server_name = '*.wikidata.org',
 proxy_server_cert_name = 'unified.wikimedia.org',
 proxy_backend = {
 'pmtpa' = { 'primary' = '10.2.1.25' },
 'eqiad' = { 'primary' = '10.2.2.25' },
-# 'esams' = { 'primary' = '10.2.3.25' },
+'esams' = { 'primary' = '10.2.3.25' },
 },
 ipv6_enabled = true,
 enabled = true,
@@ -316,14 +316,14 @@
 proxy_addresses = {
 'pmtpa' = [ '208.80.152.219', '[2620:0:860:ed1a::13]' ],
 'eqiad' = [ '208.80.154.243', '[2620:0:861:ed1a::13]' ],
-# 'esams' = [ '127.0.0.1' ],
+'esams' = [ '91.198.174.238', '[2620:0:862:ed1a::13]' ],
 },
 proxy_server_name = '*.wikivoyage.org',
 proxy_server_cert_name = 'unified.wikimedia.org',
 proxy_backend = {
 'pmtpa' = { 'primary' = '10.2.1.25' },
 'eqiad' = { 'primary' = '10.2.2.25' },
-# 'esams' = { 'primary' = '10.2.3.25' },
+'esams' = { 'primary' = '10.2.3.25' },
 },
 

[MediaWiki-commits] [Gerrit] Add wikidata/wikivoyage LVS service IPs - change (operations/puppet)

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

Change subject: Add wikidata/wikivoyage LVS service IPs
..


Add wikidata/wikivoyage LVS service IPs

Change-Id: I84240305e09ee0234e6ecfc83fbddbfb8aaa2d7e
---
M manifests/role/protoproxy.pp
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index e5ef103..6152c7e 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -64,7 +64,7 @@
 realserver_ips = $::site ? {
 'pmtpa' = [ '208.80.152.200', '208.80.152.201', 
'208.80.152.202', '208.80.152.203', '208.80.152.204', '208.80.152.205', 
'208.80.152.206', '208.80.152.207', '208.80.152.208', '208.80.152.209', 
'208.80.152.210', '208.80.152.211', '208.80.152.3', '208.80.152.118', 
'208.80.152.218', '208.80.152.219', '2620:0:860:ed1a::', '2620:0:860:ed1a::1', 
'2620:0:860:ed1a::2', '2620:0:860:ed1a::3', '2620:0:860:ed1a::4', 
'2620:0:860:ed1a::5', '2620:0:860:ed1a::6', '2620:0:860:ed1a::7', 
'2620:0:860:ed1a::8', '2620:0:860:ed1a::9', '2620:0:860:ed1a::a', 
'2620:0:860:ed1a::b', '2620:0:860:ed1a::c', '2620:0:860:ed1a::12', 
'2620:0:860:ed1a::13' ],
 'eqiad' = [ '208.80.154.224', '208.80.154.225', 
'208.80.154.226', '208.80.154.227', '208.80.154.228', '208.80.154.229', 
'208.80.154.230', '208.80.154.231', '208.80.154.232', '208.80.154.233', 
'208.80.154.234', '208.80.154.235', '208.80.154.236', '208.80.154.242', 
'208.80.154.243', '2620:0:861:ed1a::', '2620:0:861:ed1a::1', 
'2620:0:861:ed1a::2', '2620:0:861:ed1a::3', '2620:0:861:ed1a::4', 
'2620:0:861:ed1a::5', '2620:0:861:ed1a::6', '2620:0:861:ed1a::7', 
'2620:0:861:ed1a::8', '2620:0:861:ed1a::9', '2620:0:861:ed1a::a', 
'2620:0:861:ed1a::b', '2620:0:861:ed1a::c', '2620:0:861:ed1a::12', 
'2620:0:861:ed1a::13' ],
-'esams' = [ '91.198.174.224', '91.198.174.225', 
'91.198.174.233', '91.198.174.234', '91.198.174.226', '91.198.174.227', 
'91.198.174.228', '91.198.174.229', '91.198.174.230', '91.198.174.231', 
'91.198.174.232', '91.198.174.235', '91.198.174.236', '2620:0:862:ed1a::', 
'2620:0:862:ed1a::1', '2620:0:862:ed1a::2', '2620:0:862:ed1a::3', 
'2620:0:862:ed1a::4', '2620:0:862:ed1a::5', '2620:0:862:ed1a::6', 
'2620:0:862:ed1a::7', '2620:0:862:ed1a::8', '2620:0:862:ed1a::9', 
'2620:0:862:ed1a::a', '2620:0:862:ed1a::b', '2620:0:862:ed1a::c' ],
+'esams' = [ '91.198.174.224', '91.198.174.225', 
'91.198.174.233', '91.198.174.234', '91.198.174.226', '91.198.174.227', 
'91.198.174.228', '91.198.174.229', '91.198.174.230', '91.198.174.231', 
'91.198.174.232', '91.198.174.235', '91.198.174.236', '91.198.174.237', 
'91.198.174.238', '2620:0:862:ed1a::', '2620:0:862:ed1a::1', 
'2620:0:862:ed1a::2', '2620:0:862:ed1a::3', '2620:0:862:ed1a::4', 
'2620:0:862:ed1a::5', '2620:0:862:ed1a::6', '2620:0:862:ed1a::7', 
'2620:0:862:ed1a::8', '2620:0:862:ed1a::9', '2620:0:862:ed1a::a', 
'2620:0:862:ed1a::b', '2620:0:862:ed1a::c', '2620:0:862:ed1a::12', 
'2620:0:862:ed1a::13' ],
 }
 }
 
@@ -297,14 +297,14 @@
 proxy_addresses = {
 'pmtpa' = [ '208.80.152.218', '[2620:0:860:ed1a::12]' ],
 'eqiad' = [ '208.80.154.242', '[2620:0:861:ed1a::12]' ],
-# 'esams' = [ '127.0.0.1' ],
+'esams' = [ '91.198.174.237', '[2620:0:862:ed1a::12]' ],
 },
 proxy_server_name = '*.wikidata.org',
 proxy_server_cert_name = 'unified.wikimedia.org',
 proxy_backend = {
 'pmtpa' = { 'primary' = '10.2.1.25' },
 'eqiad' = { 'primary' = '10.2.2.25' },
-# 'esams' = { 'primary' = '10.2.3.25' },
+'esams' = { 'primary' = '10.2.3.25' },
 },
 ipv6_enabled = true,
 enabled = true,
@@ -316,14 +316,14 @@
 proxy_addresses = {
 'pmtpa' = [ '208.80.152.219', '[2620:0:860:ed1a::13]' ],
 'eqiad' = [ '208.80.154.243', '[2620:0:861:ed1a::13]' ],
-# 'esams' = [ '127.0.0.1' ],
+'esams' = [ '91.198.174.238', '[2620:0:862:ed1a::13]' ],
 },
 proxy_server_name = '*.wikivoyage.org',
 proxy_server_cert_name = 'unified.wikimedia.org',
 proxy_backend = {
 'pmtpa' = { 'primary' = '10.2.1.25' },
 'eqiad' = { 'primary' = '10.2.2.25' },
-# 'esams' = { 'primary' = '10.2.3.25' },
+'esams' = { 'primary' = '10.2.3.25' },
 },
 ipv6_enabled = true,

[MediaWiki-commits] [Gerrit] Update jquery.ime from upstream - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Update jquery.ime from upstream
..

Update jquery.ime from upstream

Bug: 50790
Change-Id: I3755581136cca9958e31b20694c4285c14646c38
---
M lib/jquery.ime/jquery.ime.js
1 file changed, 26 insertions(+), 4 deletions(-)


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

diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index f050bdf..802191b 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -1,4 +1,4 @@
-/*! jquery.ime - v0.1.0+20130626
+/*! jquery.ime - v0.1.0+20130705
 * https://github.com/wikimedia/jquery.ime
 * Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
 ( function ( $ ) {
@@ -668,6 +668,7 @@
keydown: function ( e ) {
var ime = $( e.target ).data( 'ime' ),
firstInputmethod,
+   previousInputMethods,
languageCode;
 
this.focus(); // shows the trigger in case it is hidden
@@ -683,9 +684,15 @@
this.selectLanguage( 
languageCode );
if ( !ime.isActive()  
$.ime.languages[languageCode] ) {
// Even after pressing 
toggle shortcut again, it is still disabled
-   // Provide the default 
input method in this case.
-   firstInputmethod = 
$.ime.languages[languageCode].inputmethods[0];
-   this.selectIM( 
firstInputmethod );
+   // Check if there is a 
previously used input method.
+   previousInputMethods = 
$.ime.preferences.getPreviousInputMethods();
+   if ( 
previousInputMethods[0] ) {
+   this.selectIM( 
previousInputMethods[0] );
+   } else {
+   // Provide the 
default input method in this case.
+   
firstInputmethod = $.ime.languages[languageCode].inputmethods[0];
+   this.selectIM( 
firstInputmethod );
+   }
}
}
}
@@ -1091,6 +1098,7 @@
isDirty: false,
language : null,
previousLanguages: [], // array of previous languages
+   previousInputMethods: [], // array of previous 
inputmethods
imes: {
'en': 'system'
}
@@ -,6 +1119,7 @@
// Add to the previous languages, but avoid duplicates.
if ( $.inArray( language, 
this.registry.previousLanguages ) === -1 ) {
this.registry.previousLanguages.push( language 
);
+   this.registry.previousLanguages = 
this.registry.previousLanguages.slice( 0, 5 );
}
},
 
@@ -1126,6 +1135,10 @@
return this.registry.previousLanguages;
},
 
+   getPreviousInputMethods: function () {
+   return this.registry.previousInputMethods;
+   },
+
// Set the given IM as the last used for the language
setIM: function ( inputMethod ) {
if ( !this.registry.imes ) {
@@ -1139,6 +1152,15 @@
 
this.registry.imes[this.getLanguage()] = inputMethod;
this.registry.isDirty = true;
+   if ( !this.registry.previousInputMethods ) {
+   this.registry.previousInputMethods = [];
+   }
+
+   // Add to the previous languages, but avoid duplicates.
+   if ( $.inArray( inputMethod, 
this.registry.previousInputMethods ) === -1 ) {
+   this.registry.previousInputMethods.push( 
inputMethod );
+   this.registry.previousInputMethods = 
this.registry.previousInputMethods.slice( 0, 5 );
+   }
},
 
// Return the last used or the default IM

[MediaWiki-commits] [Gerrit] Enable protoproxies for wikidata/wikivoyage in esams - change (operations/puppet)

2013-07-05 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Enable protoproxies for wikidata/wikivoyage in esams
..

Enable protoproxies for wikidata/wikivoyage in esams

Change-Id: I1db5e34f6970b5313dbb7b344aea21425200da5f
---
M manifests/role/protoproxy.pp
1 file changed, 28 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/72094/1

diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index 6152c7e..6b702fe 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -292,42 +292,38 @@
 enabled = true,
 }
 # wikidata.org
-if $::site != 'esams' {
-protoproxy{ 'wikidata':
-proxy_addresses = {
-'pmtpa' = [ '208.80.152.218', '[2620:0:860:ed1a::12]' ],
-'eqiad' = [ '208.80.154.242', '[2620:0:861:ed1a::12]' ],
-'esams' = [ '91.198.174.237', '[2620:0:862:ed1a::12]' ],
+protoproxy{ 'wikidata':
+proxy_addresses = {
+'pmtpa' = [ '208.80.152.218', '[2620:0:860:ed1a::12]' ],
+'eqiad' = [ '208.80.154.242', '[2620:0:861:ed1a::12]' ],
+'esams' = [ '91.198.174.237', '[2620:0:862:ed1a::12]' ],
+},
+proxy_server_name = '*.wikidata.org',
+proxy_server_cert_name = 'unified.wikimedia.org',
+proxy_backend = {
+'pmtpa' = { 'primary' = '10.2.1.25' },
+'eqiad' = { 'primary' = '10.2.2.25' },
+'esams' = { 'primary' = '10.2.3.25' },
 },
-proxy_server_name = '*.wikidata.org',
-proxy_server_cert_name = 'unified.wikimedia.org',
-proxy_backend = {
-'pmtpa' = { 'primary' = '10.2.1.25' },
-'eqiad' = { 'primary' = '10.2.2.25' },
-'esams' = { 'primary' = '10.2.3.25' },
-},
-ipv6_enabled = true,
-enabled = true,
-}
+ipv6_enabled = true,
+enabled = true,
 }
 # wikivoyage.org
-if $::site != 'esams' {
-protoproxy{ 'wikivoyage':
-proxy_addresses = {
-'pmtpa' = [ '208.80.152.219', '[2620:0:860:ed1a::13]' ],
-'eqiad' = [ '208.80.154.243', '[2620:0:861:ed1a::13]' ],
-'esams' = [ '91.198.174.238', '[2620:0:862:ed1a::13]' ],
+protoproxy{ 'wikivoyage':
+proxy_addresses = {
+'pmtpa' = [ '208.80.152.219', '[2620:0:860:ed1a::13]' ],
+'eqiad' = [ '208.80.154.243', '[2620:0:861:ed1a::13]' ],
+'esams' = [ '91.198.174.238', '[2620:0:862:ed1a::13]' ],
+},
+proxy_server_name = '*.wikivoyage.org',
+proxy_server_cert_name = 'unified.wikimedia.org',
+proxy_backend = {
+'pmtpa' = { 'primary' = '10.2.1.25' },
+'eqiad' = { 'primary' = '10.2.2.25' },
+'esams' = { 'primary' = '10.2.3.25' },
 },
-proxy_server_name = '*.wikivoyage.org',
-proxy_server_cert_name = 'unified.wikimedia.org',
-proxy_backend = {
-'pmtpa' = { 'primary' = '10.2.1.25' },
-'eqiad' = { 'primary' = '10.2.2.25' },
-'esams' = { 'primary' = '10.2.3.25' },
-},
-ipv6_enabled = true,
-enabled = true,
-}
+ipv6_enabled = true,
+enabled = true,
 }
 # Misc services
 protoproxy{ 'videos':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1db5e34f6970b5313dbb7b344aea21425200da5f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Create redirects to titles correctly in WikitextContentHandler - change (mediawiki/core)

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

Change subject: Create redirects to titles correctly in WikitextContentHandler
..


Create redirects to titles correctly in WikitextContentHandler

Bug: 50450
Bug: 50451
Change-Id: I6781420f01d8c90d47f4b9f3ad099cadf0f8ced5
---
M includes/content/WikitextContentHandler.php
M tests/phpunit/includes/content/WikitextContentHandlerTest.php
2 files changed, 42 insertions(+), 1 deletion(-)

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



diff --git a/includes/content/WikitextContentHandler.php 
b/includes/content/WikitextContentHandler.php
index e1dcc66..8be85bc 100644
--- a/includes/content/WikitextContentHandler.php
+++ b/includes/content/WikitextContentHandler.php
@@ -59,8 +59,19 @@
 * @return Content
 */
public function makeRedirectContent( Title $destination ) {
+   $optionalColon = '';
+
+   if ( $destination-getNamespace() == NS_CATEGORY ) {
+   $optionalColon = ':';
+   } else {
+   $iw = $destination-getInterwiki();
+   if ( $iw  Language::fetchLanguageName( $iw, null, 
'mw' ) ) {
+   $optionalColon = ':';
+   }
+   }
+
$mwRedir = MagicWord::get( 'redirect' );
-   $redirectText = $mwRedir-getSynonym( 0 ) . ' [[' . 
$destination-getPrefixedText() . ']]';
+   $redirectText = $mwRedir-getSynonym( 0 ) . ' [[' . 
$optionalColon . $destination-getFullText() . ']]';
 
return new WikitextContent( $redirectText );
}
diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php 
b/tests/phpunit/includes/content/WikitextContentHandlerTest.php
index 45d8140..d213251 100644
--- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php
+++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php
@@ -61,6 +61,36 @@
}
 
/**
+* @dataProvider provideMakeRedirectContent
+* @param Title|string $title Title object or string for 
Title::newFromText()
+* @param string $expected Serialized form of the content object built
+*/
+   public function testMakeRedirectContent( $title, $expected ) {
+   global $wgContLang;
+   $wgContLang-resetNamespaces();
+
+   if ( is_string( $title ) ) {
+   $title = Title::newFromText( $title );
+   }
+   $content = $this-handler-makeRedirectContent( $title );
+   $this-assertEquals( $expected, $content-serialize() );
+   }
+
+   public static function provideMakeRedirectContent() {
+   return array(
+   array( 'Hello', '#REDIRECT [[Hello]]' ),
+   array( 'Template:Hello', '#REDIRECT [[Template:Hello]]' 
),
+   array( 'Hello#section', '#REDIRECT [[Hello#section]]' ),
+   array( 'user:john_doe#section', '#REDIRECT [[User:John 
doe#section]]' ),
+   array( 'MEDIAWIKI:FOOBAR', '#REDIRECT 
[[MediaWiki:FOOBAR]]' ),
+   array( 'Category:Foo', '#REDIRECT [[:Category:Foo]]' ),
+   array( Title::makeTitle( NS_MAIN, 'en:Foo' ), 
'#REDIRECT [[en:Foo]]' ),
+   array( Title::makeTitle( NS_MAIN, 'Foo', '', 'en' ), 
'#REDIRECT [[:en:Foo]]' ),
+   array( Title::makeTitle( NS_MAIN, 'Bar', 'fragment', 
'google' ), '#REDIRECT [[google:Bar#fragment]]' ),
+   );
+   }
+
+   /**
 * @dataProvider dataIsSupportedFormat
 */
public function testIsSupportedFormat( $format, $supported ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6781420f01d8c90d47f4b9f3ad099cadf0f8ced5
Gerrit-PatchSet: 12
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Liangent liang...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de
Gerrit-Reviewer: Liangent liang...@gmail.com
Gerrit-Reviewer: Matmarex matma@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Enable protoproxies for wikidata/wikivoyage in esams - change (operations/puppet)

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

Change subject: Enable protoproxies for wikidata/wikivoyage in esams
..


Enable protoproxies for wikidata/wikivoyage in esams

Change-Id: I1db5e34f6970b5313dbb7b344aea21425200da5f
---
M manifests/role/protoproxy.pp
1 file changed, 28 insertions(+), 32 deletions(-)

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



diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index 6152c7e..6b702fe 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -292,42 +292,38 @@
 enabled = true,
 }
 # wikidata.org
-if $::site != 'esams' {
-protoproxy{ 'wikidata':
-proxy_addresses = {
-'pmtpa' = [ '208.80.152.218', '[2620:0:860:ed1a::12]' ],
-'eqiad' = [ '208.80.154.242', '[2620:0:861:ed1a::12]' ],
-'esams' = [ '91.198.174.237', '[2620:0:862:ed1a::12]' ],
+protoproxy{ 'wikidata':
+proxy_addresses = {
+'pmtpa' = [ '208.80.152.218', '[2620:0:860:ed1a::12]' ],
+'eqiad' = [ '208.80.154.242', '[2620:0:861:ed1a::12]' ],
+'esams' = [ '91.198.174.237', '[2620:0:862:ed1a::12]' ],
+},
+proxy_server_name = '*.wikidata.org',
+proxy_server_cert_name = 'unified.wikimedia.org',
+proxy_backend = {
+'pmtpa' = { 'primary' = '10.2.1.25' },
+'eqiad' = { 'primary' = '10.2.2.25' },
+'esams' = { 'primary' = '10.2.3.25' },
 },
-proxy_server_name = '*.wikidata.org',
-proxy_server_cert_name = 'unified.wikimedia.org',
-proxy_backend = {
-'pmtpa' = { 'primary' = '10.2.1.25' },
-'eqiad' = { 'primary' = '10.2.2.25' },
-'esams' = { 'primary' = '10.2.3.25' },
-},
-ipv6_enabled = true,
-enabled = true,
-}
+ipv6_enabled = true,
+enabled = true,
 }
 # wikivoyage.org
-if $::site != 'esams' {
-protoproxy{ 'wikivoyage':
-proxy_addresses = {
-'pmtpa' = [ '208.80.152.219', '[2620:0:860:ed1a::13]' ],
-'eqiad' = [ '208.80.154.243', '[2620:0:861:ed1a::13]' ],
-'esams' = [ '91.198.174.238', '[2620:0:862:ed1a::13]' ],
+protoproxy{ 'wikivoyage':
+proxy_addresses = {
+'pmtpa' = [ '208.80.152.219', '[2620:0:860:ed1a::13]' ],
+'eqiad' = [ '208.80.154.243', '[2620:0:861:ed1a::13]' ],
+'esams' = [ '91.198.174.238', '[2620:0:862:ed1a::13]' ],
+},
+proxy_server_name = '*.wikivoyage.org',
+proxy_server_cert_name = 'unified.wikimedia.org',
+proxy_backend = {
+'pmtpa' = { 'primary' = '10.2.1.25' },
+'eqiad' = { 'primary' = '10.2.2.25' },
+'esams' = { 'primary' = '10.2.3.25' },
 },
-proxy_server_name = '*.wikivoyage.org',
-proxy_server_cert_name = 'unified.wikimedia.org',
-proxy_backend = {
-'pmtpa' = { 'primary' = '10.2.1.25' },
-'eqiad' = { 'primary' = '10.2.2.25' },
-'esams' = { 'primary' = '10.2.3.25' },
-},
-ipv6_enabled = true,
-enabled = true,
-}
+ipv6_enabled = true,
+enabled = true,
 }
 # Misc services
 protoproxy{ 'videos':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1db5e34f6970b5313dbb7b344aea21425200da5f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@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] Add Wikivoyage site link group message for Wikidata - change (mediawiki...WikimediaMessages)

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

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


Change subject: Add Wikivoyage site link group message for Wikidata
..

Add Wikivoyage site link group message for Wikidata

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


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

diff --git a/WikimediaMessages.i18n.php b/WikimediaMessages.i18n.php
index 4968c76..56a3be6 100644
--- a/WikimediaMessages.i18n.php
+++ b/WikimediaMessages.i18n.php
@@ -230,6 +230,9 @@
'wikimedia-copyrightwarning' = 'By clicking the {{int:savearticle}} 
button, you agree to the [//wikimediafoundation.org/wiki/Terms_of_Use Terms of 
Use], and you irrevocably agree to release your contribution under the 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License
 CC-BY-SA 3.0 License] and the 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL].
 You agree that a hyperlink or URL is sufficient attribution under the Creative 
Commons license.',
 
+   # Wikidata-specific messages
+   'wikibase-sitelinks-wikivoyage' = 'Wikivoyage pages linked to this 
item',
+
# Custom message for enwiki to stop from deleting the mainpage
'cant-delete-main-page' = 'You cannot delete or move the main page.',
 
@@ -477,6 +480,9 @@
'wikimedia-copyrightwarning' = 'Warning: the correct default licenses 
links are to the creativecommons.org 
([http://creativecommons.org/licenses/by-sa/3.0/] or e.g. 
[https://creativecommons.org/licenses/by-sa/3.0/deed.fr]) and fsf.org 
([http://www.gnu.org/copyleft/fdl.html]) pages, which should be used in the 
translations to languages other than English. Customisation may be possible on 
local wikis upon community consensus.
 
 {{Identical/Wikimedia-licensing}}',
+
+   'wikibase-sitelinks-wikivoyage' = 'Section heading on Wikidata item 
page for Wikivoyage site links',
+
'wikimedia-translationnotifications-signup-legal' = 'Legal text about 
the notifications sent to translators.',
'upload-more-photos-of-this-monument' = 'This message is addded by the 
WLM app linking to the upload wizard with the parameters set for a new upload 
of the same monument.',
'extdist-branch-master' = 'Message used for an extensions git master 
version; the latest development version',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2effc20e826dfb2c5f420aa9b0f78bcd4f0be867
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Reenabling kafka too many produce requests icinga check. - change (operations/puppet)

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

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


Change subject: Reenabling kafka too many produce requests icinga check.
..

Reenabling kafka too many produce requests icinga check.

Change-Id: I5a0db0ab6eac217a761958b57790715a247001c8
---
M manifests/misc/analytics.pp
M templates/icinga/checkcommands.cfg.erb
2 files changed, 19 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/72096/1

diff --git a/manifests/misc/analytics.pp b/manifests/misc/analytics.pp
index cf598fa..46fc0c0 100644
--- a/manifests/misc/analytics.pp
+++ b/manifests/misc/analytics.pp
@@ -30,9 +30,18 @@
# Set up icinga monitoring of Kafka broker server produce requests per 
second.
# If this drops too low, trigger an alert
# for this udp2log instance.
-   monitor_service { kakfa-broker-ProduceRequestsPerSecond:
-   description   = 
kafka_network_SocketServerStats.ProduceRequestsPerSecond,
-   check_command = 
check_kafka_broker_produce_requests!2!1,
+   monitor_service { kakfa-broker-ProduceRequestsPerSecond_min:
+   description   = 
kafka_network_SocketServerStats.ProduceRequestsPerSecond_min,
+   check_command = 
check_kafka_broker_produce_requests_min!5!1,
+   contact_group = analytics,
+   }
+
+   # Set up icinga monitoring of Kafka broker server produce requests per 
second.
+   # If this drops too low, trigger an alert
+   # for this udp2log instance.
+   monitor_service { kakfa-broker-ProduceRequestsPerSecond_max:
+   description   = 
kafka_network_SocketServerStats.ProduceRequestsPerSecond_max,
+   check_command = 
check_kafka_broker_produce_requests_max!15!20,
contact_group = analytics,
}
 }
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index b156f7e..c569665 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -617,9 +617,15 @@
 # Analytics Kraken checks
 # Check that Kafka Brokers are getting ProduceRequests.
 define command{
-   command_namecheck_kafka_broker_produce_requests
+   command_namecheck_kafka_broker_produce_requests_min
command_line$USER1$/check_ganglios_generic_value -H $HOSTADDRESS$ 
-m kafka_network_SocketServerStats.ProduceRequestsPerSecond -w $ARG1$ -c $ARG2$ 
-o lt
 }
+# Check that Kafka Brokers are not getting too many ProduceRequests.
+define command{
+   command_namecheck_kafka_broker_produce_requests_max
+   command_line$USER1$/check_ganglios_generic_value -H $HOSTADDRESS$ 
-m kafka_network_SocketServerStats.ProduceRequestsPerSecond -w $ARG1$ -c $ARG2$ 
-o gt
+}
+
 
 # Alerts for data loss in Kraken HDFS.
 define command{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a0db0ab6eac217a761958b57790715a247001c8
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] Reenabling kafka too many produce requests icinga check. - change (operations/puppet)

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

Change subject: Reenabling kafka too many produce requests icinga check.
..


Reenabling kafka too many produce requests icinga check.

Change-Id: I5a0db0ab6eac217a761958b57790715a247001c8
---
M manifests/misc/analytics.pp
M templates/icinga/checkcommands.cfg.erb
2 files changed, 19 insertions(+), 4 deletions(-)

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



diff --git a/manifests/misc/analytics.pp b/manifests/misc/analytics.pp
index cf598fa..46fc0c0 100644
--- a/manifests/misc/analytics.pp
+++ b/manifests/misc/analytics.pp
@@ -30,9 +30,18 @@
# Set up icinga monitoring of Kafka broker server produce requests per 
second.
# If this drops too low, trigger an alert
# for this udp2log instance.
-   monitor_service { kakfa-broker-ProduceRequestsPerSecond:
-   description   = 
kafka_network_SocketServerStats.ProduceRequestsPerSecond,
-   check_command = 
check_kafka_broker_produce_requests!2!1,
+   monitor_service { kakfa-broker-ProduceRequestsPerSecond_min:
+   description   = 
kafka_network_SocketServerStats.ProduceRequestsPerSecond_min,
+   check_command = 
check_kafka_broker_produce_requests_min!5!1,
+   contact_group = analytics,
+   }
+
+   # Set up icinga monitoring of Kafka broker server produce requests per 
second.
+   # If this drops too low, trigger an alert
+   # for this udp2log instance.
+   monitor_service { kakfa-broker-ProduceRequestsPerSecond_max:
+   description   = 
kafka_network_SocketServerStats.ProduceRequestsPerSecond_max,
+   check_command = 
check_kafka_broker_produce_requests_max!15!20,
contact_group = analytics,
}
 }
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index b156f7e..c569665 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -617,9 +617,15 @@
 # Analytics Kraken checks
 # Check that Kafka Brokers are getting ProduceRequests.
 define command{
-   command_namecheck_kafka_broker_produce_requests
+   command_namecheck_kafka_broker_produce_requests_min
command_line$USER1$/check_ganglios_generic_value -H $HOSTADDRESS$ 
-m kafka_network_SocketServerStats.ProduceRequestsPerSecond -w $ARG1$ -c $ARG2$ 
-o lt
 }
+# Check that Kafka Brokers are not getting too many ProduceRequests.
+define command{
+   command_namecheck_kafka_broker_produce_requests_max
+   command_line$USER1$/check_ganglios_generic_value -H $HOSTADDRESS$ 
-m kafka_network_SocketServerStats.ProduceRequestsPerSecond -w $ARG1$ -c $ARG2$ 
-o gt
+}
+
 
 # Alerts for data loss in Kraken HDFS.
 define command{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a0db0ab6eac217a761958b57790715a247001c8
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 metrics that can be applied to most JVMs. - change (operations...jmxtrans)

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

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


Change subject: Add metrics that can be applied to most JVMs.
..

Add metrics that can be applied to most JVMs.

A few of the sections won't apply to all JVMs but jmxtrans
will see that there is nothing there for it and continue
without complaint.

Change-Id: I68f92933557ee4c8bd5c7478d70f8820b4aa26f5
---
A manifests/metrics/jvm.pp
1 file changed, 75 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/jmxtrans 
refs/changes/97/72097/1

diff --git a/manifests/metrics/jvm.pp b/manifests/metrics/jvm.pp
new file mode 100644
index 000..fe935d5
--- /dev/null
+++ b/manifests/metrics/jvm.pp
@@ -0,0 +1,75 @@
+# == Define jmxtrans::metrics::jvm
+#
+# Sets up this JVM to be monitored by a jmxtrans node.
+# Note that at present this only really does the right thing with CMS and
+# Parallel GC.
+#
+# == Parameters
+# $title  - host:port of JMX to query (required)
+define jmxtrans::metrics::jvm() {
+@@jmxtrans::metrics { ${title}-jvm-metrics:
+jmx= $title,
+ganglia_group_name = 'jvm memory',
+objects= [
+{
+'name'= 'java.lang:type=Memory',
+'resultAlias' = 'Memory',
+'attrs'   = {
+'HeapMemoryUsage'= {'units' = 'bytes', 'slope' = 
'both'},
+'NonHeapMemoryUsage' = {'units' = 'bytes', 'slope' = 
'both'},
+}
+},
+# Parallel GC
+{
+'name'= 'java.lang:name=PS 
Scavenge,type=GarbageCollector',
+'resultAlias' = 'Incremental GC',
+'attrs'   = {
+'CollectionCount' = {'units' = 'GCs', 'slope' = 'both'},
+'CollectionTime'  = {'units' = 'milliseconds', 'slope' 
= 'positive'},
+}
+},
+{
+'name'= 'java.lang:name=PS 
MarkSweep,type=GarbageCollector',
+'resultAlias' = 'Full GC',
+'attrs'   = {
+'CollectionCount' = {'units' = 'GCs', 'slope' = 'both'},
+'CollectionTime'  = {'units' = 'milliseconds', 'slope' 
= 'positive'},
+}
+},
+# CMS GC
+{
+'name'= 'java.lang:name=ParNew,type=GarbageCollector',
+'resultAlias' = 'Incremental GC',
+'attrs'   = {
+'CollectionCount' = {'units' = 'GCs', 'slope' = 'both'},
+'CollectionTime'  = {'units' = 'milliseconds', 'slope' 
= 'positive'},
+}
+},
+{
+'name'= 
'java.lang:name=ConcurrentMarkSweep,type=GarbageCollector',
+'resultAlias' = 'Full GC',
+'attrs'   = {
+'CollectionCount' = {'units' = 'GCs', 'slope' = 'both'},
+'CollectionTime'  = {'units' = 'milliseconds', 'slope' 
= 'positive'},
+}
+},
+# These only show up for Java 7
+{
+'name'= 'java.nio:name=mapped,type=BufferPool',
+'resultAlias' = 'Mapped Buffer Pool',
+'attrs'   = {
+'MemoryUsed' = {'units' = 'bytes', 'slope' = 'both'},
+'Count'  = {'units' = 'buffers', 'slope' = 'both'},
+}
+},
+{
+'name'= 'java.nio:name=direct,type=BufferPool',
+'resultAlias' = 'Direct Buffer Pool',
+'attrs'   = {
+'MemoryUsed' = {'units' = 'bytes', 'slope' = 'both'},
+'Count'  = {'units' = 'buffers', 'slope' = 'both'},
+}
+}
+]
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68f92933557ee4c8bd5c7478d70f8820b4aa26f5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/jmxtrans
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] added csrf back into Metric forms - change (analytics/wikimetrics)

2013-07-05 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review.

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


Change subject: added csrf back into Metric forms
..

added csrf back into Metric forms

Change-Id: I25deb7f64a538e205c49bf0d058b3d6cc729cef9
---
M wikimetrics/metrics/metric.py
M wikimetrics/metrics/namespace_edits.py
M wikimetrics/templates/form_for_metrics.html
M wikimetrics/templates/layout.html
4 files changed, 23 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/98/72098/1

diff --git a/wikimetrics/metrics/metric.py b/wikimetrics/metrics/metric.py
index 573f225..ebf5cb9 100644
--- a/wikimetrics/metrics/metric.py
+++ b/wikimetrics/metrics/metric.py
@@ -1,4 +1,5 @@
-from wtforms import Form
+from wtforms.ext.csrf.session import SessionSecureForm
+from wikimetrics.configurables import app
 import logging
 logger = logging.getLogger(__name__)
 
@@ -7,8 +8,7 @@
 ]
 
 
-# TODO: implement csrf request token since we're no longer using wtf.Form
-class Metric(Form):
+class Metric(SessionSecureForm):
 
 This class is the parent of all Metric implementations.
 Child implementations should be callable and should take in users
@@ -38,15 +38,17 @@
 
 return {user: None for user in user_ids}
 
-#def __init__(self, *args, **kwargs):
-#
-#This __init__ handles the problem with calling Form.__init__()
-#outside of a flask request context.
-#
-#try:
-#Form.__init__(self, *args, **kwargs)
-#except(RuntimeError):
-#logger.debug(
-#'initializing Metric outside Flask context,'
-#'most likely in testing or interactive mode'
-#)
+def __init__(self, *args, **kwargs):
+
+Initialize the things required by SessionSecureForm to do its job
+This __init__ handles the problem with calling 
SessionSecureForm.__init__()
+outside of a flask request context.
+
+self.SECRET_KEY = 'not really secret, this will only happen in a 
testing context'
+csrf_context = {}
+
+if app:
+# TODO: need to set csrf_context to something? (the flask session 
maybe?)
+self.SECRET_KEY = app.config['SECRET_KEY']
+
+SessionSecureForm.__init__(self, csrf_context=csrf_context, *args, 
**kwargs)
diff --git a/wikimetrics/metrics/namespace_edits.py 
b/wikimetrics/metrics/namespace_edits.py
index d427f96..dfb5604 100644
--- a/wikimetrics/metrics/namespace_edits.py
+++ b/wikimetrics/metrics/namespace_edits.py
@@ -13,7 +13,6 @@
 class CommaSeparatedIntegerListField(Field):
 
 
-print 'parsing CommaSeparatedIntegerListField.__iter__()'
 def __iter__(self):
 return iter(self.data)
 
diff --git a/wikimetrics/templates/form_for_metrics.html 
b/wikimetrics/templates/form_for_metrics.html
index 377e397..45523be 100644
--- a/wikimetrics/templates/form_for_metrics.html
+++ b/wikimetrics/templates/form_for_metrics.html
@@ -1,6 +1,7 @@
 form class=form-horizontal metric-configuration method=POST 
action={{action}} data-bind=submit: $root.saveMetricConfiguration
 {# TODO: flask-wtf does nice things, bring this back: form.hidden_tag() #}
-{% for f in form if f.label.text != 'Csrf Token' %}
+{% for f in form %}
+{% if f.name != 'csrf_token' %}
 div class=control-group
 {{ f.label(class=control-label) }}
 div class=controls
@@ -18,6 +19,9 @@
 {% endif %}
 /div
 /div
+{% else %}
+{{ f }}
+{% endif %}
 {% endfor %}
 div class=form-actions
 input class=btn btn-primary type=submit value=Save 
Configuration/
diff --git a/wikimetrics/templates/layout.html 
b/wikimetrics/templates/layout.html
index 6a1af7e..50eb443 100644
--- a/wikimetrics/templates/layout.html
+++ b/wikimetrics/templates/layout.html
@@ -2,6 +2,7 @@
 html lang=en
 head
 titleWiki Metrics/title
+!-- TODO: set long expire header for favicon in Apache --
 link rel=shortcut icon href={{ url_for('static', filename='favicon.ico') 
}}
 
 link rel=stylesheet type=text/css href={{ url_for('static', 
filename='css/bootstrap.css') }}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25deb7f64a538e205c49bf0d058b3d6cc729cef9
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric dandree...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] added csrf back into Metric forms - change (analytics/wikimetrics)

2013-07-05 Thread Milimetric (Code Review)
Milimetric has submitted this change and it was merged.

Change subject: added csrf back into Metric forms
..


added csrf back into Metric forms

Change-Id: I25deb7f64a538e205c49bf0d058b3d6cc729cef9
---
M wikimetrics/metrics/metric.py
M wikimetrics/metrics/namespace_edits.py
M wikimetrics/templates/form_for_metrics.html
M wikimetrics/templates/layout.html
4 files changed, 23 insertions(+), 17 deletions(-)

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



diff --git a/wikimetrics/metrics/metric.py b/wikimetrics/metrics/metric.py
index 573f225..ebf5cb9 100644
--- a/wikimetrics/metrics/metric.py
+++ b/wikimetrics/metrics/metric.py
@@ -1,4 +1,5 @@
-from wtforms import Form
+from wtforms.ext.csrf.session import SessionSecureForm
+from wikimetrics.configurables import app
 import logging
 logger = logging.getLogger(__name__)
 
@@ -7,8 +8,7 @@
 ]
 
 
-# TODO: implement csrf request token since we're no longer using wtf.Form
-class Metric(Form):
+class Metric(SessionSecureForm):
 
 This class is the parent of all Metric implementations.
 Child implementations should be callable and should take in users
@@ -38,15 +38,17 @@
 
 return {user: None for user in user_ids}
 
-#def __init__(self, *args, **kwargs):
-#
-#This __init__ handles the problem with calling Form.__init__()
-#outside of a flask request context.
-#
-#try:
-#Form.__init__(self, *args, **kwargs)
-#except(RuntimeError):
-#logger.debug(
-#'initializing Metric outside Flask context,'
-#'most likely in testing or interactive mode'
-#)
+def __init__(self, *args, **kwargs):
+
+Initialize the things required by SessionSecureForm to do its job
+This __init__ handles the problem with calling 
SessionSecureForm.__init__()
+outside of a flask request context.
+
+self.SECRET_KEY = 'not really secret, this will only happen in a 
testing context'
+csrf_context = {}
+
+if app:
+# TODO: need to set csrf_context to something? (the flask session 
maybe?)
+self.SECRET_KEY = app.config['SECRET_KEY']
+
+SessionSecureForm.__init__(self, csrf_context=csrf_context, *args, 
**kwargs)
diff --git a/wikimetrics/metrics/namespace_edits.py 
b/wikimetrics/metrics/namespace_edits.py
index d427f96..dfb5604 100644
--- a/wikimetrics/metrics/namespace_edits.py
+++ b/wikimetrics/metrics/namespace_edits.py
@@ -13,7 +13,6 @@
 class CommaSeparatedIntegerListField(Field):
 
 
-print 'parsing CommaSeparatedIntegerListField.__iter__()'
 def __iter__(self):
 return iter(self.data)
 
diff --git a/wikimetrics/templates/form_for_metrics.html 
b/wikimetrics/templates/form_for_metrics.html
index 377e397..45523be 100644
--- a/wikimetrics/templates/form_for_metrics.html
+++ b/wikimetrics/templates/form_for_metrics.html
@@ -1,6 +1,7 @@
 form class=form-horizontal metric-configuration method=POST 
action={{action}} data-bind=submit: $root.saveMetricConfiguration
 {# TODO: flask-wtf does nice things, bring this back: form.hidden_tag() #}
-{% for f in form if f.label.text != 'Csrf Token' %}
+{% for f in form %}
+{% if f.name != 'csrf_token' %}
 div class=control-group
 {{ f.label(class=control-label) }}
 div class=controls
@@ -18,6 +19,9 @@
 {% endif %}
 /div
 /div
+{% else %}
+{{ f }}
+{% endif %}
 {% endfor %}
 div class=form-actions
 input class=btn btn-primary type=submit value=Save 
Configuration/
diff --git a/wikimetrics/templates/layout.html 
b/wikimetrics/templates/layout.html
index 6a1af7e..50eb443 100644
--- a/wikimetrics/templates/layout.html
+++ b/wikimetrics/templates/layout.html
@@ -2,6 +2,7 @@
 html lang=en
 head
 titleWiki Metrics/title
+!-- TODO: set long expire header for favicon in Apache --
 link rel=shortcut icon href={{ url_for('static', filename='favicon.ico') 
}}
 
 link rel=stylesheet type=text/css href={{ url_for('static', 
filename='css/bootstrap.css') }}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25deb7f64a538e205c49bf0d058b3d6cc729cef9
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric dandree...@wikimedia.org
Gerrit-Reviewer: Milimetric dandree...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add secondary (fallback) IPs for wikidata/wikivoyage - change (operations/puppet)

2013-07-05 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Add secondary (fallback) IPs for wikidata/wikivoyage
..

Add secondary (fallback) IPs for wikidata/wikivoyage

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/72099/1

diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index 6b702fe..f416502 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -303,7 +303,7 @@
 proxy_backend = {
 'pmtpa' = { 'primary' = '10.2.1.25' },
 'eqiad' = { 'primary' = '10.2.2.25' },
-'esams' = { 'primary' = '10.2.3.25' },
+'esams' = { 'primary' = '10.2.3.25', 'secondary' = 
'208.80.154.242' },
 },
 ipv6_enabled = true,
 enabled = true,
@@ -320,7 +320,7 @@
 proxy_backend = {
 'pmtpa' = { 'primary' = '10.2.1.25' },
 'eqiad' = { 'primary' = '10.2.2.25' },
-'esams' = { 'primary' = '10.2.3.25' },
+'esams' = { 'primary' = '10.2.3.25', 'secondary' = 
'208.80.154.243' },
 },
 ipv6_enabled = true,
 enabled = true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I751d9f5ba895653af97b7347cd15c634bcf63a02
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add secondary (fallback) IPs for wikidata/wikivoyage - change (operations/puppet)

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

Change subject: Add secondary (fallback) IPs for wikidata/wikivoyage
..


Add secondary (fallback) IPs for wikidata/wikivoyage

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

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



diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp
index 6b702fe..f416502 100644
--- a/manifests/role/protoproxy.pp
+++ b/manifests/role/protoproxy.pp
@@ -303,7 +303,7 @@
 proxy_backend = {
 'pmtpa' = { 'primary' = '10.2.1.25' },
 'eqiad' = { 'primary' = '10.2.2.25' },
-'esams' = { 'primary' = '10.2.3.25' },
+'esams' = { 'primary' = '10.2.3.25', 'secondary' = 
'208.80.154.242' },
 },
 ipv6_enabled = true,
 enabled = true,
@@ -320,7 +320,7 @@
 proxy_backend = {
 'pmtpa' = { 'primary' = '10.2.1.25' },
 'eqiad' = { 'primary' = '10.2.2.25' },
-'esams' = { 'primary' = '10.2.3.25' },
+'esams' = { 'primary' = '10.2.3.25', 'secondary' = 
'208.80.154.243' },
 },
 ipv6_enabled = true,
 enabled = true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I751d9f5ba895653af97b7347cd15c634bcf63a02
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@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] Turn off VE tests for IEs 9 - change (qa/browsertests)

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

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


Change subject: Turn off VE tests for IEs  9
..

Turn off VE tests for IEs  9

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


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/00/72100/1

diff --git a/features/visual_editor_references.feature 
b/features/visual_editor_references.feature
index a78c39d..22ae006 100644
--- a/features/visual_editor_references.feature
+++ b/features/visual_editor_references.feature
@@ -1,4 +1,4 @@
-@test2.wikipedia.org @login
+i@ie6-bug  @ie7-bug  @ie8-bug @test2.wikipedia.org @login
 Feature: VisualEditor References
 
   Background:

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

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

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


[MediaWiki-commits] [Gerrit] Turn off VE tests for IEs 9 - change (qa/browsertests)

2013-07-05 Thread Zfilipin (Code Review)
Zfilipin has submitted this change and it was merged.

Change subject: Turn off VE tests for IEs  9
..


Turn off VE tests for IEs  9

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

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



diff --git a/features/visual_editor_references.feature 
b/features/visual_editor_references.feature
index a78c39d..18dce56 100644
--- a/features/visual_editor_references.feature
+++ b/features/visual_editor_references.feature
@@ -1,4 +1,4 @@
-@test2.wikipedia.org @login
+@ie6-bug  @ie7-bug  @ie8-bug @test2.wikipedia.org @login
 Feature: VisualEditor References
 
   Background:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7dd5ac9f87211991203cf0bc908820407d2a0b6f
Gerrit-PatchSet: 2
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 49742) Rebuild script for property info table. - change (mediawiki...Wikibase)

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

Change subject: (bug 49742) Rebuild script for property info table.
..


(bug 49742) Rebuild script for property info table.

Change-Id: I131537e34bee71397918956e2e6652b9de739d75
---
M repo/Wikibase.classes.php
A repo/includes/store/sql/PropertyInfoTableBuilder.php
A repo/maintenance/rebuildPropertyInfo.php
A repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php
4 files changed, 546 insertions(+), 0 deletions(-)

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



diff --git a/repo/Wikibase.classes.php b/repo/Wikibase.classes.php
index 63f62e1..9a3706c 100644
--- a/repo/Wikibase.classes.php
+++ b/repo/Wikibase.classes.php
@@ -143,6 +143,7 @@
'Wikibase\EntityPerPageTable' = 
'includes/store/sql/EntityPerPageTable.php',
'Wikibase\DispatchStats' = 
'includes/store/sql/DispatchStats.php',
'Wikibase\TermSearchKeyBuilder' = 
'includes/store/sql/TermSearchKeyBuilder.php',
+   'Wikibase\PropertyInfoTableBuilder' = 
'includes/store/sql/PropertyInfoTableBuilder.php',
 
// includes/updates
'Wikibase\EntityDeletionUpdate' = 
'includes/updates/EntityDeletionUpdate.php',
@@ -158,6 +159,7 @@
// maintenance
'Wikibase\RebuildTermsSearchKey' = 
'maintenance/rebuildTermsSearchKey.php',
'Wikibase\RebuildEntityPerPage' = 
'maintenance/rebuildEntityPerPage.php',
+   'Wikibase\RebuildPropertyInfo' = 
'maintenance/rebuildPropertyInfo.php',
 
// tests
'Wikibase\Test\TestItemContents' = 
'tests/phpunit/TestItemContents.php',
diff --git a/repo/includes/store/sql/PropertyInfoTableBuilder.php 
b/repo/includes/store/sql/PropertyInfoTableBuilder.php
new file mode 100644
index 000..0bd53ac
--- /dev/null
+++ b/repo/includes/store/sql/PropertyInfoTableBuilder.php
@@ -0,0 +1,286 @@
+?php
+
+namespace Wikibase;
+use DatabaseBase;
+use MessageReporter;
+
+/**
+ * Utility class for rebuilding the wb_property_info table.
+ *
+ * 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
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseRepo
+ *
+ * @licence GNU GPL v2+
+ * @author Daniel Kinzler
+ */
+class PropertyInfoTableBuilder {
+
+   /**
+* @since 0.4
+*
+* @var PropertyInfoTable $table
+*/
+   protected $table;
+
+   /**
+* @var EntityLookup
+*/
+   protected $entityLookup;
+
+   /**
+* @since 0.4
+*
+* @var MessageReporter $reporter
+*/
+   protected $reporter;
+
+   /**
+* Whether all entries should be updated, or only missing entries
+*
+* @var bool
+*/
+   protected $all = false;
+
+   /**
+* Starting point
+*
+* @var int
+*/
+   protected $fromId = 1;
+
+   /**
+* The batch size, giving the number of rows to be updated in each 
database transaction.
+*
+* @var int
+*/
+   protected $batchSize = 100;
+
+   /**
+* Constructor.
+*
+* @since 0.4
+*
+* @param PropertyInfoTable $table
+*/
+   public function __construct( PropertyInfoTable $table, EntityLookup 
$entityLookup ) {
+   $this-table = $table;
+   $this-entityLookup = $entityLookup;
+   }
+
+   /**
+* @return boolean
+*/
+   public function getRebuildAll() {
+   return $this-all;
+   }
+
+   /**
+* @return int
+*/
+   public function getBatchSize() {
+   return $this-batchSize;
+   }
+
+   /**
+* @return boolean
+*/
+   public function getFromId() {
+   return $this-fromId;
+   }
+
+   /**
+* @param boolean $all
+*/
+   public function setRebuildAll( $all ) {
+   $this-all = $all;
+   }
+
+   /**
+* @param int $batchSize
+*/
+   public function setBatchSize( $batchSize ) {
+   $this-batchSize = $batchSize;
+   }
+
+   /**
+* 

[MediaWiki-commits] [Gerrit] Tool Labs: Skeleton puppet class for UWSGI tyrant - change (operations/puppet)

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

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


Change subject: Tool Labs: Skeleton puppet class for UWSGI tyrant
..

Tool Labs: Skeleton puppet class for UWSGI tyrant

Change-Id: I768e83ec15e21feb95d37259676c5144e565e152
---
A modules/toollabs/manifests/tyrant.pp
1 file changed, 16 insertions(+), 0 deletions(-)


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

diff --git a/modules/toollabs/manifests/tyrant.pp 
b/modules/toollabs/manifests/tyrant.pp
new file mode 100644
index 000..4de2073
--- /dev/null
+++ b/modules/toollabs/manifests/tyrant.pp
@@ -0,0 +1,16 @@
+# Class: toollabs::tyrant
+#
+# This role sets up a node as an UWSGI tyrant
+#
+# Parameters:
+#
+# Actions:
+#
+# Requires:
+#
+# Sample Usage:
+#
+class toollabs::redis inherits toollabs {
+include toollabs::infrastructure
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I768e83ec15e21feb95d37259676c5144e565e152
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Tool Labs: Skeleton puppet class for UWSGI tyrant - change (operations/puppet)

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

Change subject: Tool Labs: Skeleton puppet class for UWSGI tyrant
..


Tool Labs: Skeleton puppet class for UWSGI tyrant

Change-Id: I768e83ec15e21feb95d37259676c5144e565e152
---
A modules/toollabs/manifests/tyrant.pp
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/modules/toollabs/manifests/tyrant.pp 
b/modules/toollabs/manifests/tyrant.pp
new file mode 100644
index 000..4de2073
--- /dev/null
+++ b/modules/toollabs/manifests/tyrant.pp
@@ -0,0 +1,16 @@
+# Class: toollabs::tyrant
+#
+# This role sets up a node as an UWSGI tyrant
+#
+# Parameters:
+#
+# Actions:
+#
+# Requires:
+#
+# Sample Usage:
+#
+class toollabs::redis inherits toollabs {
+include toollabs::infrastructure
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I768e83ec15e21feb95d37259676c5144e565e152
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Tool Labs: Add the tyrant class, properly - change (operations/puppet)

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

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


Change subject: Tool Labs: Add the tyrant class, properly
..

Tool Labs: Add the tyrant class, properly

Change-Id: I237c60d2934354bbbdb1241a810bd5c06ab5b48c
---
M modules/toollabs/manifests/tyrant.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/02/72102/1

diff --git a/modules/toollabs/manifests/tyrant.pp 
b/modules/toollabs/manifests/tyrant.pp
index 4de2073..1fa77b1 100644
--- a/modules/toollabs/manifests/tyrant.pp
+++ b/modules/toollabs/manifests/tyrant.pp
@@ -10,7 +10,7 @@
 #
 # Sample Usage:
 #
-class toollabs::redis inherits toollabs {
+class toollabs::tyrant inherits toollabs {
 include toollabs::infrastructure
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I237c60d2934354bbbdb1241a810bd5c06ab5b48c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] beta: adapt role::cache::varnish::upload - change (operations/puppet)

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

Change subject: beta: adapt role::cache::varnish::upload
..


beta: adapt role::cache::varnish::upload

* pass the top and upload domains down to varnish VCL via the
  cluster_options.
* points swift backend to the upload instance created by Ariel

Change-Id: I2b4231281bd224b4892c8767f98f772666397668
---
M manifests/lvs.pp
M manifests/role/cache.pp
M templates/varnish/upload-backend.inc.vcl.erb
M templates/varnish/upload-frontend.inc.vcl.erb
4 files changed, 27 insertions(+), 5 deletions(-)

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



diff --git a/manifests/lvs.pp b/manifests/lvs.pp
index a609cff..607afff 100644
--- a/manifests/lvs.pp
+++ b/manifests/lvs.pp
@@ -417,7 +417,9 @@
'search_pool5' = {},
'search_poolbeta' = {},
'search_prefix' = {},
-   'swift' = {},
+   'swift' = {
+   'pmtpa' = '10.4.1.103',  # 
deployment-upload.pmtpa.wmflabs
+   },
'payments' = {},
'upload' = {
'pmtpa' = {
diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 1905d0d..f029bd4 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -667,6 +667,21 @@
 
class { varnish::htcppurger: varnish_instances = [ 
127.0.0.1:80, 127.0.0.1:3128 ] }
 
+   case $::realm {
+   'production': {
+   $cluster_options = {
+   'upload_domain' = 
'upload.wikimedia.org',
+   'top_domain'= 'org',
+   }
+   }
+   'labs': {
+   $cluster_options = {
+   'upload_domain' = 
'upload.beta.wmflabs.org',
+   'top_domain'= 'beta.wmflabs.org',
+   }
+   }
+   }
+
varnish::instance { upload-backend:
name = ,
vcl = upload-backend,
@@ -676,7 +691,10 @@
'esams' = [prefer_ipv6=on, 
default_ttl=86400],
default = [],
},
-   storage = -s 
main1=persistent,/srv/sda3/varnish.main1,${storage_size_main}G -s 
main2=persistent,/srv/sdb3/varnish.main2,${storage_size_main}G -s 
bigobj1=file,/srv/sda3/varnish.bigobj1,${storage_size_bigobj}G -s 
bigobj2=file,/srv/sdb3/varnish.bigobj2,${storage_size_bigobj}G,
+   storage = $::realm ? {
+   production = -s 
main1=persistent,/srv/sda3/varnish.main1,${storage_size_main}G -s 
main2=persistent,/srv/sdb3/varnish.main2,${storage_size_main}G -s 
bigobj1=file,/srv/sda3/varnish.bigobj1,${storage_size_bigobj}G -s 
bigobj2=file,/srv/sdb3/varnish.bigobj2,${storage_size_bigobj}G,
+   labs = -s 
main1=persistent,/srv/vdb/varnish.main1,${storage_size_main}G -s 
main2=persistent,/srv/vdb/varnish.main2,${storage_size_main}G -s 
bigobj1=file,/srv/vdb/varnish.bigobj1,${storage_size_bigobj}G -s 
bigobj2=file,/srv/vdb/varnish.bigobj2,${storage_size_bigobj}G
+   },
directors = $varnish_be_directors[$cluster_tier],
director_type = $cluster_tier ? {
1 = 'random',
@@ -707,6 +725,7 @@
'max_connections' = 1000,
'weight' = $backend_weight,
}],
+   cluster_options = $cluster_options,
wikimedia_networks = $wikimedia_networks,
xff_sources = $network::constants::all_networks
}
@@ -736,6 +755,7 @@
'probe' = varnish,
'weight' = $backend_weight,
}],
+   cluster_options = $cluster_options,
xff_sources = $network::constants::all_networks,
}
 
diff --git a/templates/varnish/upload-backend.inc.vcl.erb 
b/templates/varnish/upload-backend.inc.vcl.erb
index bfca3b6..3613f02 100644
--- a/templates/varnish/upload-backend.inc.vcl.erb
+++ b/templates/varnish/upload-backend.inc.vcl.erb
@@ -64,7 +64,7 @@
else {
if (req.backend == rendering  req.url ~ 
^/[^-/]+/[^/]+/thumb/(.+)$) {
set bereq.url = regsub(req.url, 
^/[^-/]+/[^/]+/thumb/(.+)$, /w/thumb_handler.php/\1);
-   set bereq.http.host = regsub(req.url, 

[MediaWiki-commits] [Gerrit] opening - change (apps...translate)

2013-07-05 Thread Orsagi (Code Review)
Orsagi has uploaded a new change for review.

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


Change subject: opening
..

opening

Change-Id: If095a76cbf4be98a40e19006d8671202d72f7134
---
A readme.txt
A settings.gradle
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/translate 
refs/changes/03/72103/1

diff --git a/readme.txt b/readme.txt
new file mode 100644
index 000..baad862
--- /dev/null
+++ b/readme.txt
@@ -0,0 +1 @@
+documentation for translatewiki.net app
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 000..9f883cb
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':doc'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If095a76cbf4be98a40e19006d8671202d72f7134
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/translate
Gerrit-Branch: master
Gerrit-Owner: Orsagi ors...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add missing i18n message for user notificaitons tooltip - change (mediawiki...MobileFrontend)

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

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


Change subject: Add missing i18n message for user notificaitons tooltip
..

Add missing i18n message for user notificaitons tooltip

Bug: 50703
Change-Id: I71e45bd02a1052d36a186ce4bc31343c7dd24173
---
M MobileFrontend.i18n.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index e984d7d..cf8c21d 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -122,6 +122,7 @@
'mobile-frontend-page-saving' = 'Saving $1',
 
'mobile-frontend-user-cta' = 'Please login or sign up to see your 
notifications.',
+   'mobile-frontend-user-button-tooltip' = 'Show my notifications',
 
// nearby overlay
'mobile-frontend-nearby-to-page' = 'The following pages are related to 
$1 by their geographical location',
@@ -509,6 +510,7 @@
'mobile-frontend-page-saving' = 'Text shown whilst an article is being 
saved.
 {{Identical|Saving}}',
'mobile-frontend-user-cta' = 'Appears when you click user icon when 
not logged in. First link is to login form, 2nd to sign up form. Links are 
created in JavaScript.',
+   'mobile-frontend-user-button-tooltip' = 'Title tooltip for the user 
notifications button',
'mobile-frontend-nearby-to-page' = 'Header that describes that the 
pages are related as they have locations near the location of the current 
article',
'mobile-frontend-nearby-title' = 'Title of Special:Nearby.
 {{Identical|Nearby}}',

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

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

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


[MediaWiki-commits] [Gerrit] opening - change (apps...translate)

2013-07-05 Thread Orsagi (Code Review)
Orsagi has submitted this change and it was merged.

Change subject: opening
..


opening

Change-Id: If095a76cbf4be98a40e19006d8671202d72f7134
---
A readme.txt
A settings.gradle
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/readme.txt b/readme.txt
new file mode 100644
index 000..baad862
--- /dev/null
+++ b/readme.txt
@@ -0,0 +1 @@
+documentation for translatewiki.net app
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 000..9f883cb
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':doc'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If095a76cbf4be98a40e19006d8671202d72f7134
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/translate
Gerrit-Branch: master
Gerrit-Owner: Orsagi ors...@gmail.com
Gerrit-Reviewer: Orsagi ors...@gmail.com

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


[MediaWiki-commits] [Gerrit] Tool Labs: Add the tyrant class, properly - change (operations/puppet)

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

Change subject: Tool Labs: Add the tyrant class, properly
..


Tool Labs: Add the tyrant class, properly

Change-Id: I237c60d2934354bbbdb1241a810bd5c06ab5b48c
---
M modules/toollabs/manifests/tyrant.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/toollabs/manifests/tyrant.pp 
b/modules/toollabs/manifests/tyrant.pp
index 4de2073..1fa77b1 100644
--- a/modules/toollabs/manifests/tyrant.pp
+++ b/modules/toollabs/manifests/tyrant.pp
@@ -10,7 +10,7 @@
 #
 # Sample Usage:
 #
-class toollabs::redis inherits toollabs {
+class toollabs::tyrant inherits toollabs {
 include toollabs::infrastructure
 
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I237c60d2934354bbbdb1241a810bd5c06ab5b48c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Tool Labs: Tyrant role, and minimal class config - change (operations/puppet)

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

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


Change subject: Tool Labs: Tyrant role, and minimal class config
..

Tool Labs: Tyrant role, and minimal class config

Change-Id: I06de0a637a55bafff3047d084b4378051318969d
---
M manifests/role/labs.pp
M modules/toollabs/manifests/tyrant.pp
2 files changed, 23 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/72105/1

diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 0d6cf65..97adefd 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -66,5 +66,12 @@
 class { 'toollabs::redis': }
   }
 
+  class tyrant inherits role::labs::tools::config {
+system_role { role::labs::tools::tyrant: description = Tool Labs UWSGI 
emperor }
+class { 'toollabs::tyrant':
+  gridmaster = $grid_master,
+}
+  }
+
 } # class role::labs::tools
 
diff --git a/modules/toollabs/manifests/tyrant.pp 
b/modules/toollabs/manifests/tyrant.pp
index 1fa77b1..f4be395 100644
--- a/modules/toollabs/manifests/tyrant.pp
+++ b/modules/toollabs/manifests/tyrant.pp
@@ -10,7 +10,21 @@
 #
 # Sample Usage:
 #
-class toollabs::tyrant inherits toollabs {
-include toollabs::infrastructure
+class toollabs::tyrant($gridmaster) inherits toollabs {
+include toollabs::infrastructure,
+toollabs::exec_environ
+class { 'gridengine::submit_host':
+gridmaster = $gridmaster,
+}
+
+  file { $store/submithost-$fqdn:
+ensure = file,
+owner = 'root',
+group = 'root',
+mode = '0444',
+require = File[$store],
+content = $ipaddress\n,
+  }
 
 }
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06de0a637a55bafff3047d084b4378051318969d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Tool Labs: Tyrant role, and minimal class config - change (operations/puppet)

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

Change subject: Tool Labs: Tyrant role, and minimal class config
..


Tool Labs: Tyrant role, and minimal class config

Change-Id: I06de0a637a55bafff3047d084b4378051318969d
---
M manifests/role/labs.pp
M modules/toollabs/manifests/tyrant.pp
2 files changed, 23 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 0d6cf65..97adefd 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -66,5 +66,12 @@
 class { 'toollabs::redis': }
   }
 
+  class tyrant inherits role::labs::tools::config {
+system_role { role::labs::tools::tyrant: description = Tool Labs UWSGI 
emperor }
+class { 'toollabs::tyrant':
+  gridmaster = $grid_master,
+}
+  }
+
 } # class role::labs::tools
 
diff --git a/modules/toollabs/manifests/tyrant.pp 
b/modules/toollabs/manifests/tyrant.pp
index 1fa77b1..f4be395 100644
--- a/modules/toollabs/manifests/tyrant.pp
+++ b/modules/toollabs/manifests/tyrant.pp
@@ -10,7 +10,21 @@
 #
 # Sample Usage:
 #
-class toollabs::tyrant inherits toollabs {
-include toollabs::infrastructure
+class toollabs::tyrant($gridmaster) inherits toollabs {
+include toollabs::infrastructure,
+toollabs::exec_environ
+class { 'gridengine::submit_host':
+gridmaster = $gridmaster,
+}
+
+  file { $store/submithost-$fqdn:
+ensure = file,
+owner = 'root',
+group = 'root',
+mode = '0444',
+require = File[$store],
+content = $ipaddress\n,
+  }
 
 }
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06de0a637a55bafff3047d084b4378051318969d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Improve class LanguageFallbackChain and its factory - change (mediawiki...Wikibase)

2013-07-05 Thread Denny Vrandecic (Code Review)
Denny Vrandecic has submitted this change and it was merged.

Change subject: Improve class LanguageFallbackChain and its factory
..


Improve class LanguageFallbackChain and its factory

Change-Id: I55516170998e983ef7bc0b7c99cf63d31098d46c
---
M lib/includes/LanguageFallbackChain.php
M lib/includes/LanguageFallbackChainFactory.php
M lib/tests/phpunit/LanguageFallbackChainFactoryTest.php
3 files changed, 157 insertions(+), 24 deletions(-)

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



diff --git a/lib/includes/LanguageFallbackChain.php 
b/lib/includes/LanguageFallbackChain.php
index e9e78e5..ee91987 100644
--- a/lib/includes/LanguageFallbackChain.php
+++ b/lib/includes/LanguageFallbackChain.php
@@ -66,13 +66,14 @@
public function extractPreferredValue( $data ) {
 
foreach ( $this-chain as $languageWithConversion ) {
-   if ( isset( 
$data[$languageWithConversion-getFetchLanguage()-getCode()] ) ) {
+   $fetchCode = 
$languageWithConversion-getFetchLanguage()-getCode();
+   $languageCode = 
$languageWithConversion-getLanguage()-getCode();
+
+   if ( isset( $data[$fetchCode] ) ) {
return array(
-   'value' = 
$languageWithConversion-translate(
-   
$data[$languageWithConversion-getFetchLanguage()-getCode()]
-   ),
-   'language' = 
$languageWithConversion-getLanguage()-getCode(),
-   'source' = 
$languageWithConversion-getFetchLanguage()-getCode(),
+   'value' = 
$languageWithConversion-translate( $data[$fetchCode] ),
+   'language' = $languageCode,
+   'source' = $fetchCode,
);
}
}
diff --git a/lib/includes/LanguageFallbackChainFactory.php 
b/lib/includes/LanguageFallbackChainFactory.php
index e5ede9d..5bcfda1 100644
--- a/lib/includes/LanguageFallbackChainFactory.php
+++ b/lib/includes/LanguageFallbackChainFactory.php
@@ -84,14 +84,17 @@
}
 
/**
-* Build fallback chain for a given language.
+* Build fallback chain array for a given language.
 *
 * @param Language $language
 * @param $mode bitfield of self::FALLBACK_*
 * @param LanguageFallbackChain[] $chain for recursive calls
 * @param array $fetched for recursive calls
+*
+* @return LanguageWithConversion[]
 */
-   private function buildFromLanguage( Language $language, $mode, $chain 
= array(), $fetched = array() ) {
+   public function buildFromLanguage( Language $language, $mode, $chain = 
array(), $fetched = array() ) {
+   wfProfileIn( __METHOD__ );
 
if ( $mode  self::FALLBACK_SELF ) {
if ( !isset( $fetched[$language-getCode()] ) ) {
@@ -140,6 +143,7 @@
}
}
 
+   wfProfileOut( __METHOD__ );
return $chain;
}
 
@@ -152,15 +156,20 @@
 */
public function newFromContext( IContextSource $context ) {
global $wgBabelCategoryNames;
+   wfProfileIn( __METHOD__ );
 
$user = $context-getUser();
 
if ( !class_exists( 'Babel' ) || $user-isAnon() ) {
-   return $this-newFromLanguage( $context-getLanguage(), 
self::FALLBACK_ALL );
+   $cached =  $this-newFromLanguage( 
$context-getLanguage(), self::FALLBACK_ALL );
+   wfProfileOut( __METHOD__ );
+   return $cached;
}
 
if ( isset( 
$this-userLanguageCache[$user-getName()][$context-getLanguage()-getCode()] 
) ) {
-   return 
$this-userLanguageCache[$user-getName()][$context-getLanguage()-getCode()];
+   $cached = 
$this-userLanguageCache[$user-getName()][$context-getLanguage()-getCode()];
+   wfProfileOut( __METHOD__ );
+   return $cached;
}
 
$babel = array();
@@ -187,15 +196,19 @@
 

$this-userLanguageCache[$user-getName()][$context-getLanguage()-getCode()] 
= $languageFallbackChain;
 
+   wfProfileOut( __METHOD__ );
return $languageFallbackChain;
}
 
/**
-* Build fallback chain for a given babel array.
+* Build fallback chain array for a given babel array.
 *
 * @param array $babel
+*
+* @return LanguageWithConversion[]
 */
-   private function buildFromBabel( array $babel ) 

[MediaWiki-commits] [Gerrit] Use temp folder to manage temporary test images - change (qa/browsertests)

2013-07-05 Thread Zfilipin (Code Review)
Zfilipin has submitted this change and it was merged.

Change subject: Use temp folder to manage temporary test images
..


Use temp folder to manage temporary test images

Bug: 50384
Change-Id: I48c4b0e45436f7d7d3167d2d903ec612d74074df
---
M features/step_definitions/upload_wizard_steps.rb
1 file changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/features/step_definitions/upload_wizard_steps.rb 
b/features/step_definitions/upload_wizard_steps.rb
index b0f25b7..3ba9462 100644
--- a/features/step_definitions/upload_wizard_steps.rb
+++ b/features/step_definitions/upload_wizard_steps.rb
@@ -37,16 +37,19 @@
   on(ReleaseRightsPage).thumbnail_element.should be_visible
 end
 When(/^upload file (.+)$/) do |file_name|
+  require 'tempfile'
+  path = #{Dir.tmpdir}/#{file_name}
+
   require 'chunky_png'
-  ChunkyPNG::Image.new(Random.new.rand(255), Random.new.rand(255), 
Random.new.rand(255)).save file_name
-  path = Dir.pwd + '/' + file_name
+  ChunkyPNG::Image.new(Random.new.rand(255), Random.new.rand(255), 
Random.new.rand(255)).save path
+
   if @browser.driver.browser == :chrome
 @browser.execute_script 
'document.getElementsByName(file)[0].removeAttribute(class);'
 @browser.execute_script 
'document.getElementsByName(file)[0].removeAttribute(style);'
   end
+
   on(UploadPage).select_file = path
 end
-
 Then(/^(.+) checkbox should be there$/) do |_|
   on(LearnPage).skip_element.should exist
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48c4b0e45436f7d7d3167d2d903ec612d74074df
Gerrit-PatchSet: 5
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Rachel99 rachelq...@gmail.com
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Change client defaults if repo is on same wiki. - change (mediawiki...Wikibase)

2013-07-05 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Change client defaults if repo is on same wiki.
..


Change client defaults if repo is on same wiki.

If the client extension is active on the repo,
some client settings need to match the local
wiki's setup.

Change-Id: Id77d4e5a13682ccf00276de33dcb6a1982897703
---
M client/WikibaseClient.hooks.php
M client/WikibaseClient.php
M client/config/WikibaseClient.default.php
M client/config/WikibaseClient.example.php
A client/tests/phpunit/ClientHooksTest.php
M lib/includes/Settings.php
M repo/Wikibase.php
7 files changed, 226 insertions(+), 6 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index c999dda..1e0577f 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -165,6 +165,47 @@
}
 
/**
+* @since 0.4
+*
+* @param SettingsArray $settings
+* @param array $wg global settings (wgXXX).
+* @param bool  $repoIsLocal whether this wiki is also our repo.
+*/
+   public static function applyMagicDefaultSettings( SettingsArray 
$settings, array $wg, $repoIsLocal ) {
+   // to the actual values for the local wiki.
+   if ( $repoIsLocal ) {
+   if ( $settings-getSetting( 'repoUrl' ) === null ) {
+   $settings-setSetting( 'repoUrl', 
$wg['wgServer'] );
+   }
+
+   if ( $settings-getSetting( 'repoArticlePath' ) === 
null ) {
+   $settings-setSetting( 'repoArticlePath', 
$wg['wgArticlePath'] );
+   }
+
+   if ( $settings-getSetting( 'repoScriptPath' ) === null 
) {
+   $settings-setSetting( 'repoScriptPath', 
$wg['wgScriptPath'] );
+   }
+   }
+
+   if ( $settings-getSetting( 'siteGlobalID' ) === null ) {
+   $settings-setSetting( 'siteGlobalID', $wg['wgDBName'] 
);
+   }
+   }
+
+   /**
+* @since 0.4
+*
+* @return bool
+*/
+   public static function onSetupAfterCache() {
+   $settings = Settings::singleton();
+
+   self::applyMagicDefaultSettings( $settings, $GLOBALS, defined( 
'WB_VERSION' ) );
+
+   return true;
+   }
+
+   /**
 * Hook for injecting a message on [[Special:MovePage]]
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/SpecialMovepageAfterMove
 *
diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index a178cb1..4607e37 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -147,6 +147,7 @@
// extension hooks
$wgHooks['WikibaseDeleteData'][]= 
'\Wikibase\ClientHooks::onWikibaseDeleteData';
$wgHooks['WikibaseRebuildData'][]   = 
'\Wikibase\ClientHooks::onWikibaseRebuildData';
+   $wgHooks['SetupAfterCache'][]   = 
'\Wikibase\ClientHooks::onSetupAfterCache';
 
// api modules
$wgAPIMetaModules['wikibase'] = 'Wikibase\ApiClientInfo';
diff --git a/client/config/WikibaseClient.default.php 
b/client/config/WikibaseClient.default.php
index f0b167f..31ab62c 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -31,7 +31,7 @@
 
 
 return call_user_func( function() {
-   global $wgScriptPath, $wgArticlePath, $wgLanguageCode, $wgDBname;
+   global $wgLanguageCode, $wgDBname;
 
$defaults = array(
'namespaces' = array(), // by default, include all namespaces; 
deprecated as of 0.4
@@ -183,5 +183,16 @@
),
);
 
+   // Repository is active on the local wiki, change defaults accordingly
+   if ( defined( 'WB_VERSION' ) ) {
+   $defaults['repoUrl'] = null; // initialized later
+   $defaults['repoArticlePath'] = null; // initialized later
+   $defaults['repoScriptPath'] = null; // initialized later
+
+   // use the local database for direct repo access
+   $defaults['repoDatabase'] = false;
+   $defaults['changesDatabase'] = false;
+   }
+
return $defaults;
 } );
diff --git a/client/config/WikibaseClient.example.php 
b/client/config/WikibaseClient.example.php
index 9654b3a..30e9e82 100644
--- a/client/config/WikibaseClient.example.php
+++ b/client/config/WikibaseClient.example.php
@@ -34,6 +34,12 @@
die( 'Not an entry point.' );
 }
 
+// NOTE: If this wiki also runs the Wikibase repo extension,
+//   stop and just use the defaults for settings.
+if ( defined( 'WB_VERSION' ) 

[MediaWiki-commits] [Gerrit] Remove hacks from jenkins entry point. - change (mediawiki...Wikibase)

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

Change subject: Remove hacks from jenkins entry point.
..


Remove hacks from jenkins entry point.

Wikibase.php now activates both the client and the repo extension.
This allows all tests to be run in a single pass.

Change-Id: I8fc331f91af096e98790ebd5d8e7a0fabb60cd85
---
M Wikibase.php
M client/config/WikibaseClient.example.php
2 files changed, 83 insertions(+), 96 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Wikibase.php b/Wikibase.php
index 67f4610..99feeb7 100644
--- a/Wikibase.php
+++ b/Wikibase.php
@@ -14,59 +14,42 @@
  *
  * @licence GNU GPL v2+
  * @author Jeroen De Dauw  jeroended...@gmail.com 
+ * @author Daniel Kinzler
  */
-define( 'WB_EXPERIMENTAL_FEATURES', true );
 
-require_once __DIR__ . '/lib/WikibaseLib.php';
+//TODO: Use a different file for jenkins, use this for a standard repo+client 
setup.
 
-// Temporary hack that populates the sites table since there are some tests 
that require this to have happened
-require_once __DIR__ . '/lib/maintenance/populateSitesTable.php';
-$wgExtensionFunctions[] = function() {
-   $evilStuff = new PopulateSitesTable();
-   $evilStuff-execute();
-};
-
-function remove_directory( $dirPath ) {
-   foreach(new RecursiveIteratorIterator(new 
RecursiveDirectoryIterator($dirPath, FilesystemIterator::SKIP_DOTS), 
RecursiveIteratorIterator::CHILD_FIRST) as $path) {
-   $path-isFile() ? unlink($path-getPathname()) : 
rmdir($path-getPathname());
-   }
-}
-
-# Let JenkinsAdapt our test suite when run under Jenkins
 $jenkins_job_name = getenv( 'JOB_NAME' );
-if( PHP_SAPI === 'cli'  $jenkins_job_name !== false ) {
 
-   switch( $jenkins_job_name) {
-   case 'mwext-Wikibase-client-tests':
-// // Exclude non loaded production code
-// remove_directory( __DIR__ . '/repo' );
-//
-// // This test is failing for unknown reason
-// unlink( __DIR__ . 
'/client/tests/phpunit/includes/CachedEntityTest.php' );
-//
-// require_once __DIR__ . '/client/WikibaseClient.php';
-// require_once __DIR__ . '/client/ExampleSettings.php';
-//
-// $wgWBSettings['repoDatabase'] = $wgDBname . '-' . 
$wgDBprefix;
-// $wgWBSettings['changesDatabase'] = $wgDBname . '-' . 
$wgDBprefix;
-//
-// $wgLBFactoryConf['sectionsByDB'] = array(
-// $wgDBname = 'DEFAULT',
-// 'repowiki' = $wgDBname . '-' . $wgDBprefix,
-// );
-// break;
-   case 'mwext-Wikibase-repo-tests':
-   // Exclude non loaded production code
-   remove_directory( __DIR__ . '/client' );
-
-   require_once __DIR__ . '/repo/Wikibase.php';
-   require_once __DIR__ . '/repo/ExampleSettings.php';
-   break;
-   default:
-   require_once __DIR__ . '/client/WikibaseClient.php';
-   require_once __DIR__ . '/repo/Wikibase.php';
-   require_once __DIR__ . '/repo/ExampleSettings.php';
-   }
+if( PHP_SAPI !== 'cli' || $jenkins_job_name === false ) {
+   die( This entry point is for use by the Jenkins testing framework 
only.\n
+   . Use repo/Wikibase.php resp. client/WikibaseClient.php 
instead.\n );
 }
+
+if ( !defined( 'WB_EXPERIMENTAL_FEATURES' ) ) {
+   define( 'WB_EXPERIMENTAL_FEATURES', true );
+}
+
+switch( $jenkins_job_name) {
+   case 'mwext-Wikibase-client-tests':
+   require_once __DIR__ . '/client/WikibaseClient.php';
+   require_once __DIR__ . '/client/ExampleSettings.php';
+   break;
+
+   case 'mwext-Wikibase-repo-tests':
+   require_once __DIR__ . '/repo/Wikibase.php';
+   require_once __DIR__ . '/repo/ExampleSettings.php';
+   break;
+
+   default:
+   require_once __DIR__ . '/repo/Wikibase.php';
+   require_once __DIR__ . '/client/WikibaseClient.php';
+
+   require_once __DIR__ . '/repo/ExampleSettings.php';
+   require_once __DIR__ . '/client/ExampleSettings.php';
+}
+
 // Avoid polluting the global namespace
-unset( $jenkins_job_name, $cmd );
+unset( $jenkins_job_name );
+
+
diff --git a/client/config/WikibaseClient.example.php 
b/client/config/WikibaseClient.example.php
index 30e9e82..9f07499 100644
--- a/client/config/WikibaseClient.example.php
+++ b/client/config/WikibaseClient.example.php
@@ -71,57 +71,61 @@
 $wgWBClientSettings['injectRecentChanges'] = true;
 $wgWBClientSettings['showExternalRecentChanges'] = true;
 
-$wgLBFactoryConf = array(
-   // In order to seamlessly access a remote wiki, 

[MediaWiki-commits] [Gerrit] changed colors for root prompt, red on production, green on ... - change (operations/puppet)

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

Change subject: changed colors for root prompt, red on production, green on beta
..


changed colors for root prompt, red on production, green on beta

Change-Id: Id18fa71317f4570b7544526cc77ecba179494c2b
---
A modules/toollabs/files/rootrc
M modules/toollabs/manifests/init.pp
2 files changed, 111 insertions(+), 0 deletions(-)

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



diff --git a/modules/toollabs/files/rootrc b/modules/toollabs/files/rootrc
new file mode 100644
index 000..5d06132
--- /dev/null
+++ b/modules/toollabs/files/rootrc
@@ -0,0 +1,103 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
+# If not running interactively, don't do anything
+[ -z $PS1 ]  return
+
+# don't put duplicate lines in the history. See bash(1) for more options
+# ... or force ignoredups and ignorespace
+HISTCONTROL=ignoredups:ignorespace
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=1000
+HISTFILESIZE=2000
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# make less more friendly for non-text input files, see lesspipe(1)
+[ -x /usr/bin/lesspipe ]  eval $(SHELL=/bin/sh lesspipe)
+
+# set variable identifying the chroot you work in (used in the prompt below)
+if [ -z $debian_chroot ]  [ -r /etc/debian_chroot ]; then
+debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# set a fancy prompt (non-color, unless we know we want color)
+case $TERM in
+xterm-color) color_prompt=yes;;
+esac
+
+# uncomment for a colored prompt, if the terminal has the capability; turned
+# off by default to not distract the user: the focus in a terminal window
+# should be on the output of commands, not on the prompt
+force_color_prompt=yes
+
+if [ -n $force_color_prompt ]; then
+if [ -x /usr/bin/tput ]  tput setaf 1 /dev/null; then
+   # We have color support; assume it's compliant with Ecma-48
+   # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
+   # a case would tend to support setf rather than setaf.)
+   color_prompt=yes
+else
+   color_prompt=
+fi
+fi
+
+if [ $color_prompt = yes ]; then
+if [ $INSTANCEPROJECT = tools ];then
+
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
 '
+else
+
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
 '
+fi
+else
+PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
+fi
+unset color_prompt force_color_prompt
+
+# If this is an xterm set the title to user@host:dir
+case $TERM in
+xterm*|rxvt*)
+PS1=\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1
+;;
+*)
+;;
+esac
+
+# enable color support of ls and also add handy aliases
+if [ -x /usr/bin/dircolors ]; then
+test -r ~/.dircolors  eval $(dircolors -b ~/.dircolors) || eval 
$(dircolors -b)
+alias ls='ls --color=auto'
+#alias dir='dir --color=auto'
+#alias vdir='vdir --color=auto'
+
+alias grep='grep --color=auto'
+alias fgrep='fgrep --color=auto'
+alias egrep='egrep --color=auto'
+fi
+
+# some more ls aliases
+alias ll='ls -alF'
+alias la='ls -A'
+alias l='ls -CF'
+
+# Alias definitions.
+# You may want to put all your additions into a separate file like
+# ~/.bash_aliases, instead of adding them here directly.
+# See /usr/share/doc/bash-doc/examples in the bash-doc package.
+
+if [ -f ~/.bash_aliases ]; then
+. ~/.bash_aliases
+fi
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+#if [ -f /etc/bash_completion ]  ! shopt -oq posix; then
+#. /etc/bash_completion
+#fi
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 1f7e89d..841d5dc 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -74,6 +74,14 @@
 group = root,
   }
 
+  file { /root/.bashrc:
+ensure = file,
+source = puppet:///modules/toollabs/rootrc,
+mode = 0750,
+owner = root,
+group = root,
+  }
+
 
   # Tool Labs is enduser-facing, so we want to control the motd
   # properly (most things make no sense for community users: they

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id18fa71317f4570b7544526cc77ecba179494c2b
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Petrb benap...@gmail.com
Gerrit-Reviewer: coren 

[MediaWiki-commits] [Gerrit] Fix lib UpdateRepoOnMoveJobTest to run on clients - change (mediawiki...Wikibase)

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

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


Change subject: Fix lib UpdateRepoOnMoveJobTest to run on clients
..

Fix lib UpdateRepoOnMoveJobTest to run on clients

Change-Id: Ic52d5bfc13ee25aeb64b4845ddb856e438bc0564
---
M lib/tests/phpunit/UpdateRepoOnMoveJobTest.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/lib/tests/phpunit/UpdateRepoOnMoveJobTest.php 
b/lib/tests/phpunit/UpdateRepoOnMoveJobTest.php
index 352a742..e818a16 100644
--- a/lib/tests/phpunit/UpdateRepoOnMoveJobTest.php
+++ b/lib/tests/phpunit/UpdateRepoOnMoveJobTest.php
@@ -82,6 +82,9 @@
 * @group WikibaseRepoTest
 */
public function testGetSummary() {
+   if ( !defined( 'WB_VERSION' ) ) {
+   $this-markTestSkipped( 'Wikibase\Summary is only 
available on repo' );
+   }
$moveData = $this-getSampleData();
$job = $this-getNewFromMove( $moveData );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic52d5bfc13ee25aeb64b4845ddb856e438bc0564
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] Blacklist Firefox 11 and 12 - change (mediawiki...VisualEditor)

2013-07-05 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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


Change subject: Blacklist Firefox 11 and 12
..

Blacklist Firefox 11 and 12

Bug: 50780
Change-Id: I6461f066443223dfd5f6d73aeea0c87cbbdb81d0
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
index 72512df..0be5260 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
@@ -85,8 +85,8 @@
'msie': [['=', 10]],
// Android 2.x and below support CE but don't trigger 
keyboard input
'android': [['', 3]],
-   // Bug 50534 - apparently Firefox is broken in versions 
10 and below
-   'firefox': [['=', 10]],
+   // Bug 50780 - apparently Firefox is broken in versions 
12 and below
+   'firefox': [['=', 12]],
// Blacklist all versions:
'opera': null,
'blackberry': null

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6461f066443223dfd5f6d73aeea0c87cbbdb81d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] [WIP] Blacklist Amazon Silk - change (mediawiki...VisualEditor)

2013-07-05 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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


Change subject: [WIP] Blacklist Amazon Silk
..

[WIP] Blacklist Amazon Silk

Currently just a pair of failing tests based on some of the UA strings in
https://developer.amazon.com/sdk/fire/specifications.html#UserAgentStrings

Bug: 50777
Change-Id: I8830d56b9460a72d9a9880fb7120f338dd0f598c
---
M modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
1 file changed, 10 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js 
b/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
index 45378f0..5ed524f 100644
--- a/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
+++ b/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
@@ -120,6 +120,16 @@
'msg': 'BlackBerry',
'userAgent': 'Mozilla/5.0 (BlackBerry; U; 
BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 
Mobile Safari/534.11+',
'matches': [ 'blacklist' ]
+   },
+   {
+   'msg': 'Amazon Silk desktop',
+   'userAgent': 'Mozilla/5.0 (Macintosh; U; Intel 
Mac OS X 10_6_3; en-us; Silk/1.0.13.81_10003810) AppleWebKit/533.16 (KHTML, 
like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true',
+   'matches': [ 'blacklist' ]
+   },
+   {
+   'msg': 'Amazon Silk mobile',
+   'userAgent': 'Mozilla/5.0 (Linux; U; Android 
4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) 
Silk/2.1 Mobile Safari/535.19 Silk-Accelerated=true',
+   'matches': [ 'blacklist' ]
}
];
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8830d56b9460a72d9a9880fb7120f338dd0f598c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] added .gitreview file - change (apps...translate)

2013-07-05 Thread Orsagi (Code Review)
Orsagi has uploaded a new change for review.

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


Change subject: added .gitreview file
..

added .gitreview file

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


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/translate 
refs/changes/09/72109/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..43ca502
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=apps/android/translate.git
+defaultbranch=master
+defaultrebase=0
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I058eb0b0cb7b79ae1b308364b3645def64b2d398
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/translate
Gerrit-Branch: master
Gerrit-Owner: Orsagi ors...@gmail.com

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


[MediaWiki-commits] [Gerrit] added .gitreview file - change (apps...translate)

2013-07-05 Thread Orsagi (Code Review)
Orsagi has submitted this change and it was merged.

Change subject: added .gitreview file
..


added .gitreview file

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

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



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..43ca502
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=apps/android/translate.git
+defaultbranch=master
+defaultrebase=0
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I058eb0b0cb7b79ae1b308364b3645def64b2d398
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/translate
Gerrit-Branch: master
Gerrit-Owner: Orsagi ors...@gmail.com
Gerrit-Reviewer: Orsagi ors...@gmail.com

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


[MediaWiki-commits] [Gerrit] Installing perl packages for wikistats dependencies - change (operations/puppet)

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

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


Change subject: Installing perl packages for wikistats dependencies
..

Installing perl packages for wikistats dependencies

Change-Id: Ica5c336af3826bf4c8322e5ce66f69a54e73cb0b
---
M manifests/misc/statistics.pp
M manifests/role/statistics.pp
2 files changed, 27 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/72110/1

diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 02f7528..a88652b 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -82,13 +82,36 @@
 
 
 class misc::statistics::packages {
-   package { ['mc', 'zip', 'p7zip', 'p7zip-full', 'subversion', 
'mercurial', 'tofrodos', 'git-review']:
+package { [
+'mc',
+'zip',
+'p7zip',
+'p7zip-full',
+'subversion',
+'mercurial',
+'tofrodos',
+'git-review',
+]:
ensure = latest;
}
+   
+   
 
include misc::statistics::packages::python
 }
 
+# packages needed for wikistats (stats.wikimedia.org generation code)
+class misc::statistics::packages::wikistats {
+package { [
+'libjson-xs-perl',
+'libtemplate-perl',
+'libnet-patricia-perl',
+'libregexp-assemble-perl',
+]:
+ensure = 'installed',
+}
+}
+
 # Packages needed for various python stuffs
 # on statistics servers.
 class misc::statistics::packages::python {
diff --git a/manifests/role/statistics.pp b/manifests/role/statistics.pp
index d11e542..7c79ebb 100644
--- a/manifests/role/statistics.pp
+++ b/manifests/role/statistics.pp
@@ -25,7 +25,9 @@
# generate gerrit stats from stat1.
misc::statistics::gerrit_stats,
# rsync logs from logging hosts over to stat1
-   misc::statistics::rsync::jobs
+   misc::statistics::rsync::jobs,
+# packages needed for wikistats stats generation
+   misc::statistics::packages::wikistats
 }
 
 class role::statistics::www inherits role::statistics {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica5c336af3826bf4c8322e5ce66f69a54e73cb0b
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] Installing perl packages for wikistats dependencies - change (operations/puppet)

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

Change subject: Installing perl packages for wikistats dependencies
..


Installing perl packages for wikistats dependencies

Change-Id: Ica5c336af3826bf4c8322e5ce66f69a54e73cb0b
---
M manifests/misc/statistics.pp
M manifests/role/statistics.pp
2 files changed, 25 insertions(+), 2 deletions(-)

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



diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 02f7528..68bc50b 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -82,13 +82,34 @@
 
 
 class misc::statistics::packages {
-   package { ['mc', 'zip', 'p7zip', 'p7zip-full', 'subversion', 
'mercurial', 'tofrodos', 'git-review']:
+   package { [
+   'mc',
+   'zip',
+   'p7zip',
+   'p7zip-full',
+   'subversion',
+   'mercurial',
+   'tofrodos',
+   'git-review',
+   ]:
ensure = latest;
}
 
include misc::statistics::packages::python
 }
 
+# packages needed for wikistats (stats.wikimedia.org generation code)
+class misc::statistics::packages::wikistats {
+   package { [
+   'libjson-xs-perl',
+   'libtemplate-perl',
+   'libnet-patricia-perl',
+   'libregexp-assemble-perl',
+   ]:
+   ensure = 'installed',
+   }
+}
+
 # Packages needed for various python stuffs
 # on statistics servers.
 class misc::statistics::packages::python {
diff --git a/manifests/role/statistics.pp b/manifests/role/statistics.pp
index d11e542..7c79ebb 100644
--- a/manifests/role/statistics.pp
+++ b/manifests/role/statistics.pp
@@ -25,7 +25,9 @@
# generate gerrit stats from stat1.
misc::statistics::gerrit_stats,
# rsync logs from logging hosts over to stat1
-   misc::statistics::rsync::jobs
+   misc::statistics::rsync::jobs,
+# packages needed for wikistats stats generation
+   misc::statistics::packages::wikistats
 }
 
 class role::statistics::www inherits role::statistics {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica5c336af3826bf4c8322e5ce66f69a54e73cb0b
Gerrit-PatchSet: 2
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] Fixed return type of getContentNamespaces() - change (mediawiki/core)

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

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


Change subject: Fixed return type of getContentNamespaces()
..

Fixed return type of getContentNamespaces()

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/72111/1

diff --git a/includes/Namespace.php b/includes/Namespace.php
index 8001b41..5c8e63b 100644
--- a/includes/Namespace.php
+++ b/includes/Namespace.php
@@ -334,7 +334,7 @@
public static function getContentNamespaces() {
global $wgContentNamespaces;
if ( !is_array( $wgContentNamespaces ) || $wgContentNamespaces 
=== array() ) {
-   return NS_MAIN;
+   return array( NS_MAIN );
} elseif ( !in_array( NS_MAIN, $wgContentNamespaces ) ) {
// always force NS_MAIN to be part of array (to match 
the algorithm used by isContent)
return array_merge( array( NS_MAIN ), 
$wgContentNamespaces );

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

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

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


[MediaWiki-commits] [Gerrit] Add missing i18n message for user notificaitons tooltip - change (mediawiki...MobileFrontend)

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

Change subject: Add missing i18n message for user notificaitons tooltip
..


Add missing i18n message for user notificaitons tooltip

Bug: 50703
Change-Id: I71e45bd02a1052d36a186ce4bc31343c7dd24173
---
M MobileFrontend.i18n.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index e984d7d..cf8c21d 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -122,6 +122,7 @@
'mobile-frontend-page-saving' = 'Saving $1',
 
'mobile-frontend-user-cta' = 'Please login or sign up to see your 
notifications.',
+   'mobile-frontend-user-button-tooltip' = 'Show my notifications',
 
// nearby overlay
'mobile-frontend-nearby-to-page' = 'The following pages are related to 
$1 by their geographical location',
@@ -509,6 +510,7 @@
'mobile-frontend-page-saving' = 'Text shown whilst an article is being 
saved.
 {{Identical|Saving}}',
'mobile-frontend-user-cta' = 'Appears when you click user icon when 
not logged in. First link is to login form, 2nd to sign up form. Links are 
created in JavaScript.',
+   'mobile-frontend-user-button-tooltip' = 'Title tooltip for the user 
notifications button',
'mobile-frontend-nearby-to-page' = 'Header that describes that the 
pages are related as they have locations near the location of the current 
article',
'mobile-frontend-nearby-title' = 'Title of Special:Nearby.
 {{Identical|Nearby}}',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I71e45bd02a1052d36a186ce4bc31343c7dd24173
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@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] Fixing double escaping of searchbox placeholders. - change (mediawiki...MobileFrontend)

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

Change subject: Fixing double escaping of searchbox placeholders.
..


Fixing double escaping of searchbox placeholders.

Bug: 50618
Change-Id: I3ca7496ad9613817f22c6b609d8773a5575c0d98
---
M includes/skins/SkinMinerva.php
M includes/skins/SkinMobile.php
M includes/skins/SkinMobileAlpha.php
M includes/skins/SkinMobileBeta.php
4 files changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 9403b7d..d6a4e49 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -53,7 +53,9 @@
'id' = 'searchInput',
'class' = 'search',
'autocomplete' = 'off',
-   'placeholder' =  wfMessage( 
'mobile-frontend-placeholder' )-escaped(),
+   // The placeholder gets fed to HTML::element later 
which escapes all
+   // attribute values, so no need to escape the string 
here.
+   'placeholder' =  wfMessage( 
'mobile-frontend-placeholder' )-text(),
);
$tpl-set( 'searchBox', $searchBox );
 
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 77ae426..98c5adb 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -92,7 +92,7 @@
}
 
protected function getSearchPlaceHolderText() {
-   return wfMessage( 'mobile-frontend-placeholder' )-escaped();
+   return wfMessage( 'mobile-frontend-placeholder' )-text();
}
 
public function prepareData( BaseTemplate $tpl ) {
diff --git a/includes/skins/SkinMobileAlpha.php 
b/includes/skins/SkinMobileAlpha.php
index 7d05308..d51fde9 100644
--- a/includes/skins/SkinMobileAlpha.php
+++ b/includes/skins/SkinMobileAlpha.php
@@ -5,7 +5,7 @@
protected $mode = 'alpha';
 
protected function getSearchPlaceHolderText() {
-   return wfMessage( 'mobile-frontend-placeholder-alpha' 
)-escaped();
+   return wfMessage( 'mobile-frontend-placeholder-alpha' )-text();
}
 
public function getDefaultModules() {
diff --git a/includes/skins/SkinMobileBeta.php 
b/includes/skins/SkinMobileBeta.php
index 64d9a1b..754abed 100644
--- a/includes/skins/SkinMobileBeta.php
+++ b/includes/skins/SkinMobileBeta.php
@@ -5,7 +5,7 @@
protected $mode = 'beta';
 
protected function getSearchPlaceHolderText() {
-   return wfMessage( 'mobile-frontend-placeholder-beta' 
)-escaped();
+   return wfMessage( 'mobile-frontend-placeholder-beta' )-text();
}
 
public function initPage( OutputPage $out ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ca7496ad9613817f22c6b609d8773a5575c0d98
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@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] WIP: (Bug 50771) Add space after bullets for new lists - change (mediawiki...Parsoid)

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

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


Change subject: WIP: (Bug 50771) Add space after bullets for new lists
..

WIP: (Bug 50771) Add space after bullets for new lists

* For prettier wikitext output, this patch adds space after bullets
  for newer lists (only if necessary).

* Added new html2wt test.

* For now, blacklisted lot of failing lists tests in html2wt and
  html2html mode because of the extra space (and where all php html
  looks like new html to parsoid during serialization).  Better to
  fix our html test output normalization to be smarter about when
  to fail html2html tests.

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


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

diff --git a/js/lib/mediawiki.WikitextSerializer.js 
b/js/lib/mediawiki.WikitextSerializer.js
index a8278d1..94a9d46 100644
--- a/js/lib/mediawiki.WikitextSerializer.js
+++ b/js/lib/mediawiki.WikitextSerializer.js
@@ -1833,6 +1833,16 @@
dd: ':'
}, res = '';
 
+   // For new elements, for prettier wikitext serialization,
+   // emit a space after the last bullet (if required)
+   var space = '';
+   if (DU.isNewElt(node)) {
+   var fc = node.firstChild;
+   if (fc  (!DU.isText(fc) || !fc.nodeValue.match(/^\s/))) {
+   space = ' ';
+   }
+   }
+
while (node) {
var nodeName = node.nodeName.toLowerCase(),
dp = node.data.parsoid;
@@ -1846,7 +1856,7 @@
node = node.parentNode;
}
 
-   return res;
+   return res + space;
 };
 
 
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index ae1f621..7dd8dbb 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -704,6 +704,7 @@
 add(html2html, Italics and bold: other quote tests: (3,2,3,2));
 add(html2html, Italics and bold: other quote tests: (3,2,3,3) (parsoid));
 add(html2html, Italicized possessive);
+add(html2html, nowiki 3);
 add(html2html, Preformatted text);
 add(html2html, pre with attributes (bug 3202));
 add(html2html, pre with width attribute (bug 3202));
@@ -716,12 +717,30 @@
 add(html2html, 5. White-space in indent-pre\nNOTE: the white-space char on 
2nd line is significant);
 add(html2html, HTML-pre: 1. embedded newlines);
 add(html2html, HTML-pre: 3: other wikitext);
+add(html2html, Definition list with no space);
+add(html2html, Definition list with bracketed URL link);
 add(html2html, Definition list with wikilink containing colon);
 add(html2html, Definition lists: colon in HTML attribute);
 add(html2html, Definition lists: self-closed tag);
+add(html2html, Bug 11748: Literal closing tags);
+add(html2html, Nested definition lists using html syntax);
+add(html2html, Definition Lists: No nesting: Multiple dd's);
+add(html2html, Definition Lists: Indentation: Regular);
+add(html2html, Definition Lists: Indentation: Missing 1st level);
+add(html2html, Definition Lists: Indentation: Multi-level indent);
+add(html2html, Definition Lists: Hacky use to indent tables);
+add(html2html, Table / list interaction: indented table with lists in table 
contents);
+add(html2html, Table / list interaction: lists nested in tables nested in 
indented lists);
 add(html2html, Definition Lists: Nesting: Multi-level (Parsoid only));
 add(html2html, Definition Lists: Nesting: Test 2 (Parsoid only));
 add(html2html, Definition Lists: Nesting: Test 3 (Parsoid only));
+add(html2html, Definition Lists: Nesting: Test 4);
+add(html2html, Definition Lists: Mixed Lists: Test 4);
+add(html2html, Definition Lists: Mixed Lists: Test 5);
+add(html2html, Definition Lists: Mixed Lists: Test 6);
+add(html2html, Definition Lists: Mixed Lists: Test 9);
+add(html2html, Definition Lists: Mixed Lists: Test 10);
+add(html2html, Definition Lists: Mixed Lists: Test 11 (parsoid));
 add(html2html, External image);
 add(html2html, External image from https);
 add(html2html, External links: Clickable images);
@@ -739,6 +758,7 @@
 add(html2html, Brackets in urls);
 add(html2html, IPv6 urls (bug 21261));
 add(html2html, Unclosed and unmatched quotes (parsoid));
+add(html2html, Accept \||\ in indented table headings);
 add(html2html, Table security: embedded pipes 
(http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html));
 add(html2html, Indented table markup mixed with indented pre content 
(proposed in bug 6200));
 add(html2html, Plain link, capitalized);
@@ -792,10 +812,22 @@
 add(html2html, Failing to transform badly formed HTML into correct XHTML);
 add(html2html, Handling html with a br self-closing tag);
 

[MediaWiki-commits] [Gerrit] Performance optimizations for ve.ce.ProtectedNode - change (mediawiki...VisualEditor)

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

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


Change subject: Performance optimizations for ve.ce.ProtectedNode
..

Performance optimizations for ve.ce.ProtectedNode

* shields are create in mouseenter handler instead of setup handler
* phantoms are created based on the shields collection instead of another one 
call to jQuery.find

Change-Id: I4f0803eadac9914053cb880c4198906f4a05769d
---
M modules/ve/ce/ve.ce.ProtectedNode.js
1 file changed, 34 insertions(+), 21 deletions(-)


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

diff --git a/modules/ve/ce/ve.ce.ProtectedNode.js 
b/modules/ve/ce/ve.ce.ProtectedNode.js
index 329b5bf..a8bc4ca 100644
--- a/modules/ve/ce/ve.ce.ProtectedNode.js
+++ b/modules/ve/ce/ve.ce.ProtectedNode.js
@@ -18,6 +18,7 @@
this.$phantoms = $( [] );
this.$shields = $( [] );
this.isSetup = false;
+   this.areShieldsSetup = false;
 
// Events
this.connect( this, {
@@ -65,10 +66,6 @@
  * @method
  */
 ve.ce.ProtectedNode.prototype.onProtectedSetup = function () {
-   var $shield,
-   node = this,
-   $shieldTemplate = this.constructor.static.$shieldTemplate;
-
// Exit if already setup or not unattached
if ( this.isSetup || !this.root ) {
return;
@@ -80,21 +77,6 @@
.connect( this, { 'change': 'onSurfaceModelChange' } );
this.getRoot().getSurface().getSurface()
.connect( this, { 'toolbarPosition': 'positionPhantoms' } );
-
-   // Shields
-   this.$.add( this.$.find( '*' ) ).each( function () {
-   var $this = $( this );
-   if ( this.nodeType === Node.ELEMENT_NODE ) {
-   if (
-   ( $this.css( 'float' ) === 'none' || $this.css( 
'float' ) === '' ) 
-   !$this.hasClass( 've-ce-protectedNode' )
-   ) {
-   return;
-   }
-   $shield = $shieldTemplate.clone().appendTo( $this );
-   node.$shields = node.$shields.add( $shield );
-   }
-   } );
 
this.isSetup = true;
 };
@@ -155,6 +137,9 @@
  * @method
  */
 ve.ce.ProtectedNode.prototype.onProtectedMouseEnter = function () {
+   if ( !this.areShieldsSetup ) {
+   this.setupShields();
+   }
if ( !this.root.getSurface().dragging ) {
this.createPhantoms();
}
@@ -200,6 +185,34 @@
 };
 
 /**
+ * Setup shields
+ *
+ * @method
+ */
+ve.ce.ProtectedNode.prototype.setupShields = function () {
+   var $shield,
+   node = this,
+   $shieldTemplate = this.constructor.static.$shieldTemplate;
+
+   // Shields
+   this.$.add( this.$.find( '*' ) ).each( function () {
+   var $this = $( this );
+   if ( this.nodeType === Node.ELEMENT_NODE ) {
+   if (
+   ( $this.css( 'float' ) === 'none' || $this.css( 
'float' ) === '' ) 
+   !$this.hasClass( 've-ce-protectedNode' )
+   ) {
+   return;
+   }
+   $shield = $shieldTemplate.clone().appendTo( $this );
+   node.$shields = node.$shields.add( $shield );
+   }
+   } );
+
+   this.areShieldsSetup = true;
+};
+
+/**
  * Creates phantoms
  *
  * @method
@@ -208,7 +221,7 @@
var $phantomTemplate = this.constructor.static.$phantomTemplate,
surface = this.root.getSurface();
 
-   this.$.find( '.ve-ce-protectedNode-shield' ).each(
+   this.$shields.each(
ve.bind( function () {
this.$phantoms = this.$phantoms.add(
$phantomTemplate.clone().on( 'mousedown', 
ve.bind( this.onPhantomMouseDown, this ) )
@@ -230,7 +243,7 @@
  * @method
  */
 ve.ce.ProtectedNode.prototype.positionPhantoms = function () {
-   this.$.find( '.ve-ce-protectedNode-shield' ).each(
+   this.$shields.each(
ve.bind( function ( i, element ) {
var $shield = $( element ),
offset = ve.Element.getRelativePosition(

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

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

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


[MediaWiki-commits] [Gerrit] Allow handler specific parameters in gallery (page number, ... - change (mediawiki/core)

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

Change subject: Allow handler specific parameters in gallery (page number, 
etc)
..


Allow handler specific parameters in gallery (page number, etc)

For multipage media, people really want to be able to specify
if the image gallery should display page 1 or page 10. This
also allows other handler specific parameters like thumbtime
for videos, lossy for tiff files, etc.

Note, this only allows the handler specific options
(typically things that would change an image). Other options in
the thumb syntax like class, border, upright, left, etc are
still not supported (and mostly probably should not be)

Bug: 8480

Change-Id: Ib831d89ed8676deb2f44238ff9a23ce58ad4d2df
---
M RELEASE-NOTES-1.22
M includes/ImageGallery.php
M includes/parser/Parser.php
3 files changed, 100 insertions(+), 32 deletions(-)

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



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 45a6f01..24081db 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -137,6 +137,7 @@
   also granting the ability to protect and unprotect.
 * (bug 48256) Make brackets in section edit links accessible to CSS.
   They are now wrapped in span class=mw-editsection-bracket /.
+* (bug 8480) Allow handler specific parameters in galleries (like page number)
 
 === Bug fixes in 1.22 ===
 * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one
diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php
index 5b45404..b4ef904 100644
--- a/includes/ImageGallery.php
+++ b/includes/ImageGallery.php
@@ -160,13 +160,14 @@
 * @param $html  String: Additional HTML text to be shown. The name and 
size of the image are always shown.
 * @param $alt   String: Alt text for the image
 * @param $link  String: Override image link (optional)
+* @param $handlerOpts Array: Array of options for image handler (aka 
page number)
 */
-   function add( $title, $html = '', $alt = '', $link = '' ) {
+   function add( $title, $html = '', $alt = '', $link = '', $handlerOpts = 
array() ) {
if ( $title instanceof File ) {
// Old calling convention
$title = $title-getTitle();
}
-   $this-mImages[] = array( $title, $html, $alt, $link );
+   $this-mImages[] = array( $title, $html, $alt, $link, 
$handlerOpts );
wfDebug( 'ImageGallery::add ' . $title-getText() . \n );
}
 
@@ -176,13 +177,15 @@
 * @param $title Title object of the image that is added to the gallery
 * @param $html  String: Additional HTML text to be shown. The name and 
size of the image are always shown.
 * @param $alt   String: Alt text for the image
+* @param $link  String: Override image link (optional)
+* @param $handlerOpts Array: Array of options for image handler (aka 
page number)
 */
-   function insert( $title, $html = '', $alt = '' ) {
+   function insert( $title, $html = '', $alt = '', $link = '', 
$handlerOpts = array() ) {
if ( $title instanceof File ) {
// Old calling convention
$title = $title-getTitle();
}
-   array_unshift( $this-mImages, array( $title, $html, $alt ) );
+   array_unshift( $this-mImages, array( $title, $html, $alt, 
$link, $handlerOpts ) );
}
 
/**
@@ -264,6 +267,8 @@
$text = $pair[1]; # text means caption here
$alt = $pair[2];
$link = $pair[3];
+   // $pair[4] is per image handler options
+   $transformOptions = $params + $pair[4];
 
$descQuery = false;
if ( $nt-getNamespace() == NS_FILE ) {
@@ -301,7 +306,7 @@
array( 'known', 'noclasses' )
) .
'/div';
-   } elseif ( !( $thumb = $img-transform( $params ) ) ) {
+   } elseif ( !( $thumb = $img-transform( 
$transformOptions ) ) ) {
# Error generating thumbnail.
$thumbhtml = \n\t\t\t . 'div style=height: 
' . ( self::THUMB_PADDING + $this-mHeights ) . 'px;'
. htmlspecialchars( 
$img-getLastError() ) . '/div';
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index c2eeb0a..e1a3271 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3776,13 +3776,8 @@
 * @return Array ( File or false, Title of file )
 */
function fetchFileAndTitle( $title, $options = array() ) {
-   if ( 

[MediaWiki-commits] [Gerrit] including misc::statistics::wikistats in role::statistics::p... - change (operations/puppet)

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

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


Change subject: including misc::statistics::wikistats in 
role::statistics::private.
..

including misc::statistics::wikistats in role::statistics::private.

Change-Id: I0c0057e829c35fe4d13c09808f9bad6c3495a44c
---
M manifests/misc/statistics.pp
M manifests/role/statistics.pp
2 files changed, 22 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/72114/1

diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 68bc50b..e3f8b8f 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -98,17 +98,6 @@
include misc::statistics::packages::python
 }
 
-# packages needed for wikistats (stats.wikimedia.org generation code)
-class misc::statistics::packages::wikistats {
-   package { [
-   'libjson-xs-perl',
-   'libtemplate-perl',
-   'libnet-patricia-perl',
-   'libregexp-assemble-perl',
-   ]:
-   ensure = 'installed',
-   }
-}
 
 # Packages needed for various python stuffs
 # on statistics servers.
@@ -146,6 +135,7 @@
}
 }
 
+
 # clones mediawiki core at /a/mediawiki/core
 # and ensures that it is at the latest revision.
 # RT 2162
@@ -163,6 +153,22 @@
}
 }
 
+# wikistats configuration for generating
+# stat.wikimedia.org data.
+#
+# TODO: puppetize clone of wikistats?
+class misc::statistics::wikistats {
+   # Perl packages needed for wikistats
+   package { [
+   'libjson-xs-perl',
+   'libtemplate-perl',
+   'libnet-patricia-perl',
+   'libregexp-assemble-perl',
+   ]:
+   ensure = 'installed',
+   }
+}
+
 # RT-2163
 class misc::statistics::plotting {
 
diff --git a/manifests/role/statistics.pp b/manifests/role/statistics.pp
index 7c79ebb..f4e70b3 100644
--- a/manifests/role/statistics.pp
+++ b/manifests/role/statistics.pp
@@ -25,9 +25,7 @@
# generate gerrit stats from stat1.
misc::statistics::gerrit_stats,
# rsync logs from logging hosts over to stat1
-   misc::statistics::rsync::jobs,
-# packages needed for wikistats stats generation
-   misc::statistics::packages::wikistats
+   misc::statistics::rsync::jobs
 }
 
 class role::statistics::www inherits role::statistics {
@@ -58,5 +56,8 @@
generic::pythonpip,
misc::udp2log::udp_filter,
# rsync logs from logging hosts
-   misc::statistics::rsync::jobs
+   misc::statistics::rsync::jobs,
+   # wikistats code is run here to
+   # generate stats.wikimedia.org data
+   misc::statistics::wikistats
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c0057e829c35fe4d13c09808f9bad6c3495a44c
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] including misc::statistics::wikistats in role::statistics::p... - change (operations/puppet)

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

Change subject: including misc::statistics::wikistats in 
role::statistics::private.
..


including misc::statistics::wikistats in role::statistics::private.

Change-Id: I0c0057e829c35fe4d13c09808f9bad6c3495a44c
---
M manifests/misc/statistics.pp
M manifests/role/statistics.pp
2 files changed, 22 insertions(+), 15 deletions(-)

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



diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 68bc50b..e3f8b8f 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -98,17 +98,6 @@
include misc::statistics::packages::python
 }
 
-# packages needed for wikistats (stats.wikimedia.org generation code)
-class misc::statistics::packages::wikistats {
-   package { [
-   'libjson-xs-perl',
-   'libtemplate-perl',
-   'libnet-patricia-perl',
-   'libregexp-assemble-perl',
-   ]:
-   ensure = 'installed',
-   }
-}
 
 # Packages needed for various python stuffs
 # on statistics servers.
@@ -146,6 +135,7 @@
}
 }
 
+
 # clones mediawiki core at /a/mediawiki/core
 # and ensures that it is at the latest revision.
 # RT 2162
@@ -163,6 +153,22 @@
}
 }
 
+# wikistats configuration for generating
+# stat.wikimedia.org data.
+#
+# TODO: puppetize clone of wikistats?
+class misc::statistics::wikistats {
+   # Perl packages needed for wikistats
+   package { [
+   'libjson-xs-perl',
+   'libtemplate-perl',
+   'libnet-patricia-perl',
+   'libregexp-assemble-perl',
+   ]:
+   ensure = 'installed',
+   }
+}
+
 # RT-2163
 class misc::statistics::plotting {
 
diff --git a/manifests/role/statistics.pp b/manifests/role/statistics.pp
index 7c79ebb..f4e70b3 100644
--- a/manifests/role/statistics.pp
+++ b/manifests/role/statistics.pp
@@ -25,9 +25,7 @@
# generate gerrit stats from stat1.
misc::statistics::gerrit_stats,
# rsync logs from logging hosts over to stat1
-   misc::statistics::rsync::jobs,
-# packages needed for wikistats stats generation
-   misc::statistics::packages::wikistats
+   misc::statistics::rsync::jobs
 }
 
 class role::statistics::www inherits role::statistics {
@@ -58,5 +56,8 @@
generic::pythonpip,
misc::udp2log::udp_filter,
# rsync logs from logging hosts
-   misc::statistics::rsync::jobs
+   misc::statistics::rsync::jobs,
+   # wikistats code is run here to
+   # generate stats.wikimedia.org data
+   misc::statistics::wikistats
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c0057e829c35fe4d13c09808f9bad6c3495a44c
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] Page settings fix-fix - change (mediawiki...VisualEditor)

2013-07-05 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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


Change subject: Page settings fix-fix
..

Page settings fix-fix

This re-fixes the fix to the frame fix. fix fix.
Two things changed: Background position flipped to the right properly
(was somewhat off before) and text-alignment flipped as well.

Bug: 49613
Change-Id: I0aa317ef674537d20d7ed64e74eaa3cfe8030c8c
---
M modules/ve-mw/ui/styles/ve.ui.MWDialog.css
M modules/ve/ui/styles/ve.ui.Widget.css
2 files changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve-mw/ui/styles/ve.ui.MWDialog.css 
b/modules/ve-mw/ui/styles/ve.ui.MWDialog.css
index 9190ca9..7493160 100644
--- a/modules/ve-mw/ui/styles/ve.ui.MWDialog.css
+++ b/modules/ve-mw/ui/styles/ve.ui.MWDialog.css
@@ -75,6 +75,11 @@
text-align: left;
 }
 
+/*@noflip*/
+.ve-rtl fieldset .ve-ui-mwMetaDialog-languages-table th {
+   text-align: right;
+}
+
 .ve-ui-mwMetaDialog-languages-table th,
 .ve-ui-mwMetaDialog-languages-table td {
padding: 0.75em 1em;
diff --git a/modules/ve/ui/styles/ve.ui.Widget.css 
b/modules/ve/ui/styles/ve.ui.Widget.css
index 7b84d79..96a9849 100644
--- a/modules/ve/ui/styles/ve.ui.Widget.css
+++ b/modules/ve/ui/styles/ve.ui.Widget.css
@@ -199,8 +199,7 @@
 /* @noflip */
 .ve-rtl ul li.ve-ui-outlineItemWidget {
padding: 1.25em 3.5em 1.25em 3.5em;
-   background-position: 1em right center;
-   margin-right: 1.25em;
+   background-position: right 1em center;
 }
 
 .ve-ui-outlineItemWidget-level-1 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0aa317ef674537d20d7ed64e74eaa3cfe8030c8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo mor...@gmail.com

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


[MediaWiki-commits] [Gerrit] Added prototype PHP client - change (mediawiki...WikidataEntitySuggester)

2013-07-05 Thread Nilesh (Code Review)
Nilesh has uploaded a new change for review.

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


Change subject: Added prototype PHP client
..

Added prototype PHP client

Change-Id: Iefd1996468a684be57aabde18faffa114b08f9df
---
A php-client/README.md
A php-client/composer.json
A php-client/src/WesPHPClient/EntitySuggesterService.php
A php-client/src/WesPHPClient/MyrrixClient.php
A php-client/src/WesPHPClient/service.json
A php-client/wesTest.php
6 files changed, 474 insertions(+), 0 deletions(-)


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

diff --git a/php-client/README.md b/php-client/README.md
new file mode 100644
index 000..f3b0a2b
--- /dev/null
+++ b/php-client/README.md
@@ -0,0 +1,79 @@
+# Wikidata Entity Suggester PHP Client
+
+This is the PHP client for the [Wikidata Entity 
Suggester](https://github.com/nilesh-c/wikidata-entity-suggester). It uses the 
Entity Suggester's REST API to push data and get suggestions.
+
+## Installation via Composer
+
+The best way to use the library is via [Composer](http://getcomposer.org/).
+
+After you install composer, run in console:
+
+```
+cd your/working/directory
+composer require guzzle/guzzle
+composer require wes-php-client/wes-php-client
+```
+
+Type 'dev-master' for both, when prompted for the version.
+
+OR
+
+You can manually add the library to your dependencies in the composer.json 
file:
+
+```
+{
+require: {
+wes-php-client/wes-php-client: dev-master
+}
+}
+```
+
+and install your dependencies:
+
+```
+composer install
+```
+
+## Usage
+
+``` php
+// Always include this file to use the client
+require_once(vendor/autoload.php);
+
+// Instanciate the Myrrix/Entity Suggester service
+$wes = new EntitySuggesterService('localhost', 8080);
+
+// Push the data in the file /path/data.csv into the Entity Suggester.
+// Please check [this 
page](https://github.com/nilesh-c/wikidata-entity-suggester/wiki/CSV-file-explanation)
 for info on how the data should be structured in the CSV file.
+$wes-ingestFile(/path/data.csv);
+
+// Refresh the index (add newly added data into the model)
+$wes-refresh();
+
+// Get value recommendations for a new item
+$recommendation = $myrrix-getRecommendation(array(
+1074167410,
+106,
+107215627,
+156
+), value); // returns an 
array of property-value pairs and strengths (example: 
[[1074167410,0.53],[373Huntsville  Alabama,0.499]])
+
+// Get property recommendations for a new item
+$recommendation = $myrrix-getRecommendation(array(
+1074167410,
+106,
+107215627,
+156
+), property); // returns an 
array of properties and strengths (example: [[25,0.53],[156,0.499]])
+
+// Specify the number of recommendations (optional)
+$recommendation = $myrrix-getRecommendation(array(
+1074167410,
+106,
+107215627,
+156
+), property, 20); // returns 
an array of 20 properties with strengths (example: [[25,0.53],[156,0.499]])
+
+```
+
+See [wesTest.php](wesTest.php) for a crude example/demo. It is temporarily 
deployed [here](http://173.0.50.123/wesTest.php).
diff --git a/php-client/composer.json b/php-client/composer.json
new file mode 100644
index 000..606cad1
--- /dev/null
+++ b/php-client/composer.json
@@ -0,0 +1,23 @@
+{
+name: wes-php-client/wes-php-client,
+description: PHP Client for Wikidata Entity Suggester,
+type: library,
+keywords: [wikidata, entity-suggester, myrrix, recommendation],
+homepage: https://github.com/nilesh-c/wes-php-client;,
+license: MIT,
+stability: dev,
+minimum-stability: dev,
+autoload: {
+psr-0: { WesPHPClient: src/ }
+},
+require: {
+guzzle/guzzle: dev-master
+},
+authors: [
+{
+name: Nilesh Chakraborty,
+email: nil...@nileshc.com,
+homepage: http://nileshc.com;
+}
+]
+}
diff --git a/php-client/src/WesPHPClient/EntitySuggesterService.php 
b/php-client/src/WesPHPClient/EntitySuggesterService.php
new file mode 100644
index 000..c098237
--- /dev/null
+++ b/php-client/src/WesPHPClient/EntitySuggesterService.php
@@ -0,0 +1,120 @@
+?php
+
+namespace 

[MediaWiki-commits] [Gerrit] Consistency update in group name - change (mediawiki...Comments)

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

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


Change subject: Consistency update in group name
..

Consistency update in group name

Spotted by Shirayuki at
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Group-commentadmin/en

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


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

diff --git a/Comments.i18n.php b/Comments.i18n.php
index 6b61f4a..24828d9 100644
--- a/Comments.i18n.php
+++ b/Comments.i18n.php
@@ -60,9 +60,9 @@
'comments-time-seconds' = '{{PLURAL:$1|one second|$1 seconds}}',
'log-show-hide-comments' = '$1 comment log', // For Special:Log
// For Special:ListUsers - new commentadmin group
-   'group-commentadmin' = 'Comment Administrators',
+   'group-commentadmin' = 'Comment administrators',
'group-commentadmin-member' = '{{GENDER:$1|comment administrator}}',
-   'grouppage-commentadmin' = '{{ns:project}}:Comment Administrators',
+   'grouppage-commentadmin' = '{{ns:project}}:Comment administrators',
// For Special:ListGroupRights
'right-comment' = 'Submit comments',
'right-commentadmin' = 'Administrate user-submitted comments',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I21974d93d8cdf9e15180359490e6a686743428f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
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] Page settings fix-fix - change (mediawiki...VisualEditor)

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

Change subject: Page settings fix-fix
..


Page settings fix-fix

This re-fixes the fix to the frame fix. fix fix.
Two things changed: Background position flipped to the right properly
(was somewhat off before) and text-alignment flipped as well.

Bug: 49613
Change-Id: I0aa317ef674537d20d7ed64e74eaa3cfe8030c8c
---
M modules/ve-mw/ui/styles/ve.ui.MWDialog.css
M modules/ve/ui/styles/ve.ui.Widget.css
2 files changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve-mw/ui/styles/ve.ui.MWDialog.css 
b/modules/ve-mw/ui/styles/ve.ui.MWDialog.css
index 9190ca9..7493160 100644
--- a/modules/ve-mw/ui/styles/ve.ui.MWDialog.css
+++ b/modules/ve-mw/ui/styles/ve.ui.MWDialog.css
@@ -75,6 +75,11 @@
text-align: left;
 }
 
+/*@noflip*/
+.ve-rtl fieldset .ve-ui-mwMetaDialog-languages-table th {
+   text-align: right;
+}
+
 .ve-ui-mwMetaDialog-languages-table th,
 .ve-ui-mwMetaDialog-languages-table td {
padding: 0.75em 1em;
diff --git a/modules/ve/ui/styles/ve.ui.Widget.css 
b/modules/ve/ui/styles/ve.ui.Widget.css
index 7b84d79..96a9849 100644
--- a/modules/ve/ui/styles/ve.ui.Widget.css
+++ b/modules/ve/ui/styles/ve.ui.Widget.css
@@ -199,8 +199,7 @@
 /* @noflip */
 .ve-rtl ul li.ve-ui-outlineItemWidget {
padding: 1.25em 3.5em 1.25em 3.5em;
-   background-position: 1em right center;
-   margin-right: 1.25em;
+   background-position: right 1em center;
 }
 
 .ve-ui-outlineItemWidget-level-1 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0aa317ef674537d20d7ed64e74eaa3cfe8030c8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo mor...@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@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] Blacklist Firefox 11 and 12 - change (mediawiki...VisualEditor)

2013-07-05 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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


Change subject: Blacklist Firefox 11 and 12
..

Blacklist Firefox 11 and 12

Bug: 50780
Change-Id: I38b1e3bbc7153c0fa14fc8a3d7dc10f221f3ea23
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
M modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
3 files changed, 14 insertions(+), 4 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
index 72512df..0be5260 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
@@ -85,8 +85,8 @@
'msie': [['=', 10]],
// Android 2.x and below support CE but don't trigger 
keyboard input
'android': [['', 3]],
-   // Bug 50534 - apparently Firefox is broken in versions 
10 and below
-   'firefox': [['=', 10]],
+   // Bug 50780 - apparently Firefox is broken in versions 
12 and below
+   'firefox': [['=', 12]],
// Blacklist all versions:
'opera': null,
'blackberry': null
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 7548800..b28560e 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -157,7 +157,7 @@
// The value is either null (match all versions) or a list of tuples
// containing an inequality (,,=,=) and a version number
'whitelist': {
-   'firefox': [['=', 11]],
+   'firefox': [['=', 13]],
'iceweasel': [['=', 10]],
'safari': [['=', 5]],
'chrome': [['=', 19]]
diff --git a/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js 
b/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
index 45378f0..d58772d 100644
--- a/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
+++ b/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
@@ -43,7 +43,17 @@
},
{
'msg': 'Firefox 11',
-   'userAgent': 'Mozilla/5.0 (X11; U; Linux i686; 
en-US; rv:1.9.1.16) Gecko/20120421 Gecko Firefox/11.0',
+   'userAgent': 'Mozilla/5.0 (Windows NT 6.1; 
U;WOW64; de;rv:11.0) Gecko Firefox/11.0',
+   'matches': [ 'blacklist' ]
+   },
+   {
+   'msg': 'Firefox 12',
+   'userAgent': 'Mozilla/5.0 (compatible; Windows; 
U; Windows NT 6.2; WOW64; en-US; rv:12.0) Gecko/20120403211507 Firefox/12.0',
+   'matches': [ 'blacklist' ]
+   },
+   {
+   'msg': 'Firefox 13',
+   'userAgent': 'Mozilla/5.0 (X11; Ubuntu; Linux 
x86_64; rv:13.0) Gecko/20100101 Firefox/13.0',
'matches': [ 'whitelist' ]
},
{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I38b1e3bbc7153c0fa14fc8a3d7dc10f221f3ea23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Blacklist Firefox 11 and 12 - change (mediawiki...VisualEditor)

2013-07-05 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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


Change subject: Blacklist Firefox 11 and 12
..

Blacklist Firefox 11 and 12

Bug: 50780
Change-Id: Ifbd94730cae1b6c523f1cc93c25cb14075e01607
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
M modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
3 files changed, 14 insertions(+), 4 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
index 72512df..0be5260 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
@@ -85,8 +85,8 @@
'msie': [['=', 10]],
// Android 2.x and below support CE but don't trigger 
keyboard input
'android': [['', 3]],
-   // Bug 50534 - apparently Firefox is broken in versions 
10 and below
-   'firefox': [['=', 10]],
+   // Bug 50780 - apparently Firefox is broken in versions 
12 and below
+   'firefox': [['=', 12]],
// Blacklist all versions:
'opera': null,
'blackberry': null
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 7548800..b28560e 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -157,7 +157,7 @@
// The value is either null (match all versions) or a list of tuples
// containing an inequality (,,=,=) and a version number
'whitelist': {
-   'firefox': [['=', 11]],
+   'firefox': [['=', 13]],
'iceweasel': [['=', 10]],
'safari': [['=', 5]],
'chrome': [['=', 19]]
diff --git a/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js 
b/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
index 45378f0..d58772d 100644
--- a/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
+++ b/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
@@ -43,7 +43,17 @@
},
{
'msg': 'Firefox 11',
-   'userAgent': 'Mozilla/5.0 (X11; U; Linux i686; 
en-US; rv:1.9.1.16) Gecko/20120421 Gecko Firefox/11.0',
+   'userAgent': 'Mozilla/5.0 (Windows NT 6.1; 
U;WOW64; de;rv:11.0) Gecko Firefox/11.0',
+   'matches': [ 'blacklist' ]
+   },
+   {
+   'msg': 'Firefox 12',
+   'userAgent': 'Mozilla/5.0 (compatible; Windows; 
U; Windows NT 6.2; WOW64; en-US; rv:12.0) Gecko/20120403211507 Firefox/12.0',
+   'matches': [ 'blacklist' ]
+   },
+   {
+   'msg': 'Firefox 13',
+   'userAgent': 'Mozilla/5.0 (X11; Ubuntu; Linux 
x86_64; rv:13.0) Gecko/20100101 Firefox/13.0',
'matches': [ 'whitelist' ]
},
{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbd94730cae1b6c523f1cc93c25cb14075e01607
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Blacklist Firefox 11 and 12 Bug: 50780 - change (mediawiki...VisualEditor)

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

Change subject: Blacklist Firefox 11 and 12 Bug: 50780
..


Blacklist Firefox 11 and 12
Bug: 50780

Change-Id: I6461f066443223dfd5f6d73aeea0c87cbbdb81d0
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
M modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
3 files changed, 14 insertions(+), 4 deletions(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
index 72512df..0be5260 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
@@ -85,8 +85,8 @@
'msie': [['=', 10]],
// Android 2.x and below support CE but don't trigger 
keyboard input
'android': [['', 3]],
-   // Bug 50534 - apparently Firefox is broken in versions 
10 and below
-   'firefox': [['=', 10]],
+   // Bug 50780 - apparently Firefox is broken in versions 
12 and below
+   'firefox': [['=', 12]],
// Blacklist all versions:
'opera': null,
'blackberry': null
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 7548800..b28560e 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -157,7 +157,7 @@
// The value is either null (match all versions) or a list of tuples
// containing an inequality (,,=,=) and a version number
'whitelist': {
-   'firefox': [['=', 11]],
+   'firefox': [['=', 13]],
'iceweasel': [['=', 10]],
'safari': [['=', 5]],
'chrome': [['=', 19]]
diff --git a/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js 
b/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
index 45378f0..d58772d 100644
--- a/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
+++ b/modules/ve-mw/test/init/targets/ve.init.mw.ViewPageTarget.test.js
@@ -43,7 +43,17 @@
},
{
'msg': 'Firefox 11',
-   'userAgent': 'Mozilla/5.0 (X11; U; Linux i686; 
en-US; rv:1.9.1.16) Gecko/20120421 Gecko Firefox/11.0',
+   'userAgent': 'Mozilla/5.0 (Windows NT 6.1; 
U;WOW64; de;rv:11.0) Gecko Firefox/11.0',
+   'matches': [ 'blacklist' ]
+   },
+   {
+   'msg': 'Firefox 12',
+   'userAgent': 'Mozilla/5.0 (compatible; Windows; 
U; Windows NT 6.2; WOW64; en-US; rv:12.0) Gecko/20120403211507 Firefox/12.0',
+   'matches': [ 'blacklist' ]
+   },
+   {
+   'msg': 'Firefox 13',
+   'userAgent': 'Mozilla/5.0 (X11; Ubuntu; Linux 
x86_64; rv:13.0) Gecko/20100101 Firefox/13.0',
'matches': [ 'whitelist' ]
},
{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6461f066443223dfd5f6d73aeea0c87cbbdb81d0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@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] mw.ViewPageTarget.init: Add missing accesskey-ca-editsource... - change (mediawiki...VisualEditor)

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

Change subject: mw.ViewPageTarget.init: Add missing accesskey-ca-editsource 
message
..


mw.ViewPageTarget.init: Add missing accesskey-ca-editsource message

Added the wrong one, message accesskey-ca-ve-editsource
doesn't even exist. It worked locally but that was probably
a lucky race condition or cache.

Follows-up 10fd1a3, b21fe5f.

Bug: 50725
Change-Id: Ie87f8c6861dfe010c038ddb103aa5ea56cd57d24
---
M VisualEditor.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/VisualEditor.php b/VisualEditor.php
index cfa257b..3348972 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -163,7 +163,7 @@
),
'messages' = array(
'accesskey-ca-ve-edit',
-   'accesskey-ca-ve-editsource',
+   'accesskey-ca-editsource',
'tooltip-ca-createsource',
'tooltip-ca-editsource',
'tooltip-ca-ve-edit',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie87f8c6861dfe010c038ddb103aa5ea56cd57d24
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Jforrester jforres...@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] Adding the page ID to the debugging output - change (mediawiki...MobileFrontend)

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

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


Change subject: Adding the page ID to the debugging output
..

Adding the page ID to the debugging output

Bug: 46581
Change-Id: Ifab643922937dfe2f6882ed91c95f022ff000f55
---
M includes/api/ApiQueryExtracts.php
1 file changed, 13 insertions(+), 6 deletions(-)


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

diff --git a/includes/api/ApiQueryExtracts.php 
b/includes/api/ApiQueryExtracts.php
index da5f711..6c575f9 100644
--- a/includes/api/ApiQueryExtracts.php
+++ b/includes/api/ApiQueryExtracts.php
@@ -45,7 +45,7 @@
break;
}
$text = $this-getExtract( $t );
-   $text = $this-truncate( $text );
+   $text = $this-truncate( $text, $id );
if ( $this-params['plaintext'] ) {
$text = $this-doSections( $text );
}
@@ -204,11 +204,17 @@
return trim( $text );
}
 
-   private function truncate( $text ) {
+   /**
+* Truncate the given text to a certain number of characters or 
sentences
+* @param string $text The text to truncate
+* @param int $pageId ID of the page (for debugging)
+* @return string
+*/
+   private function truncate( $text, $pageId ) {
if ( $this-params['chars'] ) {
return $this-getFirstChars( $text, 
$this-params['chars'] );
} elseif ( $this-params['sentences'] ) {
-   return $this-getFirstSentences( $text, 
$this-params['sentences'] );
+   return $this-getFirstSentences( $text, 
$this-params['sentences'], $pageId );
}
return $text;
}
@@ -240,9 +246,10 @@
 *
 * @param string $text
 * @param int $requestedSentenceCount
+* @param int $pageId ID of the page (for debugging)
 * @return string
 */
-   private function getFirstSentences( $text, $requestedSentenceCount ) {
+   private function getFirstSentences( $text, $requestedSentenceCount, 
$pageId ) {
wfProfileIn( __METHOD__ );
// Based on code from OpenSearchXml by Brion Vibber
$endchars = array(
@@ -262,7 +269,7 @@
$text = $matches[0];
} else {
if ( $res === false ) {
-   wfDebugLog( 'mobile', Invalid regular 
expression: $regexp );
+   wfDebugLog( 'mobile', Page ID: $pageId; 
Invalid regular expression: $regexp );
}
// Just return the first line
$lines = explode( \n, $text );
@@ -440,4 +447,4 @@
wfProfileOut( __METHOD__ );
return $html;
}
-}
\ No newline at end of file
+}

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

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

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


  1   2   3   >