[MediaWiki-commits] [Gerrit] This patch fixed Bug 47399 - say you have successfully chan... - change (mediawiki/core)

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

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


Change subject: This patch fixed Bug 47399 - say you have successfully changed 
your password.
..

This patch fixed Bug 47399 - say you have successfully changed your password.

Change-Id: I255c53d82cf0a58ee9ff1c0c939854e7392872e5
---
M includes/specials/SpecialChangePassword.php
1 file changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/61748/1

diff --git a/includes/specials/SpecialChangePassword.php 
b/includes/specials/SpecialChangePassword.php
index b53a46a..3e364f0 100644
--- a/includes/specials/SpecialChangePassword.php
+++ b/includes/specials/SpecialChangePassword.php
@@ -78,7 +78,7 @@
$this-attemptReset( $this-mNewpass, 
$this-mRetype );
 
if ( $user-isLoggedIn() ) {
-   $this-doReturnTo();
+   $this-showReturnForm();
} else {
LoginForm::setLoginToken();
$token = LoginForm::getLoginToken();
@@ -104,6 +104,7 @@
 
function doReturnTo() {
$request = $this-getRequest();
+   $request-setVal( 'returnto', 'Special:Preferences' );
$titleObj = Title::newFromText( $request-getVal( 'returnto' ) 
);
if ( !$titleObj instanceof Title ) {
$titleObj = Title::newMainPage();
@@ -119,6 +120,29 @@
$this-getOutput()-addHTML( Xml::element( 'p', array( 'class' 
= 'error' ), $msg ) );
}
 
+   function showReturnForm() {
+   
+   
+   $this-getOutput()-addHTML(
+   Xml::fieldset( $this-msg( 
'passwordresetcomplete_header' )-text() ) .
+   Xml::openElement( 'form',
+   array(
+   'method' = 'post',
+   'action' = 
$this-getTitle()-getLocalURL(),
+   'id' = 
'mw-resetpasscomplete-form' ) ) . \n .
+   Xml::openElement( 'table', array( 'id' = 
'mw-passresetcomplete-table' ) ) . \n .
+   tr\n .
+   td/td\n .
+   'td class=mw-input' .
+   Xml::submitButton( $this-msg( 
'passwordreset-submit-return' )-text(), array( 'name' = 'wpCancel' ) ) .
+   /td\n .
+   /tr\n .
+   Xml::closeElement( 'table' ) .
+   Xml::closeElement( 'form' ) .
+   Xml::closeElement( 'fieldset' ) . \n
+   );
+   }
+
function showForm() {
global $wgCookieExpiration;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I255c53d82cf0a58ee9ff1c0c939854e7392872e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jiabao jiabao.f...@gmail.com

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


[MediaWiki-commits] [Gerrit] Quickfix for the keyboard icon position in RTL languages - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Quickfix for the keyboard icon position in RTL languages
..

Quickfix for the keyboard icon position in RTL languages

This is a rather quick fix for the problem described in the bug
attached. The keyboard icon appeared on the right side even in RTL
languages which blocked the beginning of the typed words.

Bug: 45585
Change-Id: If3ee213daae8cd8e5cefb6daecd19eb3a6da76c9
---
M lib/jquery.ime/jquery.ime.js
1 file changed, 13 insertions(+), 3 deletions(-)


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

diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index 4323068..33404d0 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -684,6 +684,10 @@
top = position.top + this.$element.outerHeight();
left = position.left + this.$element.outerWidth()
- this.$imeSetting.outerWidth();
+   // RTL element position fix:
+   if ( $( 'html' ).attr( 'dir' ) == 'rtl' || 
this.$element.attr( 'dir' ) == 'rtl' ) {
+   left = position.left;
+   }
room = $( window ).height() - top;
 
if ( room  this.$imeSetting.outerHeight() ) {
@@ -709,9 +713,15 @@
} );
 
if ( parseInt( this.$menu.css( 'min-width' ) )  left ) 
{
-   this.$menu
-   .css( { left: position.left } )
-   .addClass( 'right' );
+   // RTL element position fix
+   if ( $( 'html' ).attr( 'dir' ) == 'rtl' || 
this.$element.attr( 'dir' ) == 'rtl' ) {
+   this.$menu
+   .css( { left: 0 } )
+   } else {
+   this.$menu
+   .css( { left: position.left } )
+   .addClass( 'right' );
+   }
}
},
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3ee213daae8cd8e5cefb6daecd19eb3a6da76c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
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] SMW\HooksTests add unit test - change (mediawiki...SemanticMediaWiki)

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

Change subject: SMW\HooksTests add unit test
..


SMW\HooksTests add unit test

+ Add testOnArticlePurge()
+ Add some @codeCoverageIgnoreEnd where tests deemed unnecessary

Change-Id: Ie7db33c976d0c189f698d8302bdb2c1f65a3d9b0
---
M SemanticMediaWiki.hooks.php
M tests/phpunit/includes/HooksTest.php
2 files changed, 130 insertions(+), 15 deletions(-)

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



diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php
index d65fdb4..14ad262 100644
--- a/SemanticMediaWiki.hooks.php
+++ b/SemanticMediaWiki.hooks.php
@@ -24,9 +24,11 @@
 * @return boolean
 */
public static function onSchemaUpdate( DatabaseUpdater $updater = null 
) {
+   // @codeCoverageIgnoreStart
$updater-addExtensionUpdate( array( 'SMWStore::setupStore' ) );
 
return true;
+   // @codeCoverageIgnoreEnd
}
 
/**
@@ -37,8 +39,11 @@
 * @return boolean
 */
public static function onPageSchemasRegistration() {
+   // @codeCoverageIgnoreStart
$GLOBALS['wgPageSchemasHandlerClasses'][] = 'SMWPageSchemas';
+
return true;
+   // @codeCoverageIgnoreEnd
}
 
/**
@@ -51,6 +56,7 @@
 * @return boolean
 */
public static function addToAdminLinks( ALTree $admin_links_tree ) {
+   // @codeCoverageIgnoreStart
$data_structure_section = new ALSection( wfMessage( 
'smw_adminlinks_datastructure' )-text() );
 
$smw_row = new ALRow( 'smw' );
@@ -89,6 +95,7 @@
$browse_search_section-addRow( $smw_row );
 
return true;
+   // @codeCoverageIgnoreEnd
}
 
 
@@ -132,6 +139,7 @@
$parser-setFunctionHook( 'set', array( 
'SMW\SetParserFunction', 'render' ) );
$parser-setFunctionHook( 'set_recurring_event', array( 
'SMW\RecurringEventsParserFunction', 'render' ) );
$parser-setFunctionHook( 'declare', array( 
'SMW\DeclareParserFunction', 'render' ), SFH_OBJECT_ARGS );
+
return true;
}
 
@@ -145,8 +153,10 @@
 * @return boolean
 */
public static function addSemanticExtensionType( array 
$aExtensionTypes ) {
+   // @codeCoverageIgnoreStart
$aExtensionTypes = array_merge( array( 'semantic' = wfMessage( 
'version-semantic' )-text() ), $aExtensionTypes );
return true;
+   // @codeCoverageIgnoreEnd
}
 
/**
@@ -159,12 +169,14 @@
 * @return boolean
 */
public static function onParserTestTables( array $tables ) {
+   // @codeCoverageIgnoreStart
$tables = array_merge(
$tables,
smwfGetStore()-getParserTestTables()
);
 
return true;
+   // @codeCoverageIgnoreEnd
}
 
/**
@@ -180,7 +192,7 @@
 * @return boolean
 */
public static function showBrowseLink( $skintemplate ) {
-
+   // @codeCoverageIgnoreStart
if ( $skintemplate-data['isarticle'] ) {
$browselink = SMWInfolink::newBrowsingLink( wfMessage( 
'smw_browselink' )-text(),

$skintemplate-data['titleprefixeddbkey'], false );
@@ -188,6 +200,7 @@
}
 
return true;
+   // @codeCoverageIgnoreEnd
}
 
/**
@@ -202,7 +215,7 @@
 * @return boolean
 */
public static function onSkinTemplateNavigation( SkinTemplate 
$skinTemplate, array $links ) {
-
+   // @codeCoverageIgnoreStart
if ( $skinTemplate-getUser()-isAllowed( 'purge' ) ) {
$links['actions']['purge'] = array(
'class' = false,
@@ -212,6 +225,7 @@
}
 
return true;
+   // @codeCoverageIgnoreEnd
}
 
/**
@@ -506,6 +520,7 @@
public static function onLinksUpdateConstructed( $linksUpdate ) {
$parserData = new SMW\ParserData( $linksUpdate-getTitle(), 
$linksUpdate-getParserOutput() );
$parserData-updateStore();
+
return true;
}
 
@@ -529,6 +544,7 @@
 */
public static function onArticleDelete( $wikiPage, $user, $reason, 
$error ) {
smwfGetStore()-deleteSubject( $wikiPage-getTitle() );
+
return true;
}
 
@@ -579,8 +595,8 @@
'smw:autorefresh:' . $newTitle-getPrefixedDBkey(),
$GLOBALS['smwgAutoRefreshOnPageMove']
);
-

[MediaWiki-commits] [Gerrit] Update the reminder text - change (mediawiki...Translate)

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

Change subject: Update the reminder text
..


Update the reminder text

Change-Id: I1b677a7a9044f722eee1ec2a2e4c2c8d6774b05c
---
M TranslateSandbox.i18n.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/TranslateSandbox.i18n.php b/TranslateSandbox.i18n.php
index b76defa..8c9d719 100644
--- a/TranslateSandbox.i18n.php
+++ b/TranslateSandbox.i18n.php
@@ -19,10 +19,11 @@
'tsb-reminder-title-generic' = 'Complete your introduction to become a 
verified translator',
'tsb-reminder-content-generic' = 'Hi $1,
 
-You recently signed up to {{SITENAME}}. You are only few steps away from 
unlocking
-free translation and extra translation helpers.
+Thanks for registering with {{SITENAME}}. If you complete your test
+translations, the administrators can soon grant you full translation
+access.
 
-Please log in to $2 and make some more translations.',
+Please come to $2 and make some more translations.',
 );
 
 /** Message documentation (Message documentation)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b677a7a9044f722eee1ec2a2e4c2c8d6774b05c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Pginer pgi...@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] Apache: listen on both 80 8080. - change (mediawiki/vagrant)

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

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


Change subject: Apache: listen on both 80  8080.
..

Apache: listen on both 80  8080.

Having the server listen on port 80 is nice because it allows the user to omit
the port when (for example) cURLing a URL from the guest. But serving on port
8080 means there is a canonical way of addressing resources that is consistent
on both guest and host.

Change-Id: I6adfbb97fe6e322cbae25ae4936e5018b25fb22c
---
A puppet/modules/apache/files/ports.conf
M puppet/modules/apache/manifests/init.pp
M puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
3 files changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/52/61752/1

diff --git a/puppet/modules/apache/files/ports.conf 
b/puppet/modules/apache/files/ports.conf
new file mode 100644
index 000..c179423
--- /dev/null
+++ b/puppet/modules/apache/files/ports.conf
@@ -0,0 +1,4 @@
+# This file is managed by Puppet.
+
+Listen 80
+Listen 8080
diff --git a/puppet/modules/apache/manifests/init.pp 
b/puppet/modules/apache/manifests/init.pp
index 10b78cd..2de4362 100644
--- a/puppet/modules/apache/manifests/init.pp
+++ b/puppet/modules/apache/manifests/init.pp
@@ -3,8 +3,13 @@
ensure  = present,
}
 
+   file { '/etc/apache2/ports.conf':
+   source  = 'puppet:///modules/apache/ports.conf',
+   require = Package['apache2'],
+   notify  = Service['apache2'],
+   }
+
file { '/etc/apache2/conf.d/disable-sendfile':
-   ensure  = file,
source  = 'puppet:///modules/apache/disable-sendfile',
require = Package['apache2'],
notify  = Service['apache2'],
diff --git a/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb 
b/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
index 251b83a..c6c78bc 100644
--- a/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
+++ b/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
@@ -1,4 +1,5 @@
 # vim: filetype=apache sts=4 sw=4 autoindent
+
 VirtualHost *
 ServerName vagrant
 ServerAdmin http://www.mediawiki.org/wiki/Vagrant

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6adfbb97fe6e322cbae25ae4936e5018b25fb22c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Apache: listen on both 80 8080. - change (mediawiki/vagrant)

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

Change subject: Apache: listen on both 80  8080.
..


Apache: listen on both 80  8080.

Having the server listen on port 80 is nice because it allows the user to omit
the port when (for example) cURLing a URL from the guest. But serving on port
8080 means there is a canonical way of addressing resources that is consistent
on both guest and host.

Change-Id: I6adfbb97fe6e322cbae25ae4936e5018b25fb22c
---
A puppet/modules/apache/files/ports.conf
M puppet/modules/apache/manifests/init.pp
M puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
3 files changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/puppet/modules/apache/files/ports.conf 
b/puppet/modules/apache/files/ports.conf
new file mode 100644
index 000..c179423
--- /dev/null
+++ b/puppet/modules/apache/files/ports.conf
@@ -0,0 +1,4 @@
+# This file is managed by Puppet.
+
+Listen 80
+Listen 8080
diff --git a/puppet/modules/apache/manifests/init.pp 
b/puppet/modules/apache/manifests/init.pp
index 10b78cd..2de4362 100644
--- a/puppet/modules/apache/manifests/init.pp
+++ b/puppet/modules/apache/manifests/init.pp
@@ -3,8 +3,13 @@
ensure  = present,
}
 
+   file { '/etc/apache2/ports.conf':
+   source  = 'puppet:///modules/apache/ports.conf',
+   require = Package['apache2'],
+   notify  = Service['apache2'],
+   }
+
file { '/etc/apache2/conf.d/disable-sendfile':
-   ensure  = file,
source  = 'puppet:///modules/apache/disable-sendfile',
require = Package['apache2'],
notify  = Service['apache2'],
diff --git a/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb 
b/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
index 251b83a..c6c78bc 100644
--- a/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
+++ b/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
@@ -1,4 +1,5 @@
 # vim: filetype=apache sts=4 sw=4 autoindent
+
 VirtualHost *
 ServerName vagrant
 ServerAdmin http://www.mediawiki.org/wiki/Vagrant

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6adfbb97fe6e322cbae25ae4936e5018b25fb22c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add icon for FUEL - change (translatewiki)

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

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


Change subject: Add icon for FUEL
..

Add icon for FUEL

Change-Id: I33e0ef703e8bdf3d817a44391848dce76e609141
---
M groups/FUEL/FUEL.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/53/61753/1

diff --git a/groups/FUEL/FUEL.yaml b/groups/FUEL/FUEL.yaml
index 6c96212..93c7e6e 100644
--- a/groups/FUEL/FUEL.yaml
+++ b/groups/FUEL/FUEL.yaml
@@ -1,6 +1,7 @@
 TEMPLATE:
   BASIC:
 description: {{int:translate-group-desc-fuel}}
+icon: wiki://Fuel-final-logo.png
 namespace: NS_FUEL
 class: FileBasedMessageGroup
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33e0ef703e8bdf3d817a44391848dce76e609141
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add icon for FUEL - change (translatewiki)

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

Change subject: Add icon for FUEL
..


Add icon for FUEL

Change-Id: I33e0ef703e8bdf3d817a44391848dce76e609141
---
M groups/FUEL/FUEL.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/groups/FUEL/FUEL.yaml b/groups/FUEL/FUEL.yaml
index 6c96212..93c7e6e 100644
--- a/groups/FUEL/FUEL.yaml
+++ b/groups/FUEL/FUEL.yaml
@@ -1,6 +1,7 @@
 TEMPLATE:
   BASIC:
 description: {{int:translate-group-desc-fuel}}
+icon: wiki://Fuel-final-logo.png
 namespace: NS_FUEL
 class: FileBasedMessageGroup
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33e0ef703e8bdf3d817a44391848dce76e609141
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add logo for jQuery.ULS and update label - change (translatewiki)

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

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


Change subject: Add logo for jQuery.ULS and update label
..

Add logo for jQuery.ULS and update label

Change-Id: I5a5bebab9fce6026be2ca7e6ad7fb3fb48ad02ab
---
M groups/Wikimedia/jquery.uls.yaml
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/54/61754/1

diff --git a/groups/Wikimedia/jquery.uls.yaml b/groups/Wikimedia/jquery.uls.yaml
index 215f9c9..9eb3ba9 100644
--- a/groups/Wikimedia/jquery.uls.yaml
+++ b/groups/Wikimedia/jquery.uls.yaml
@@ -3,7 +3,8 @@
   description: Translations of Universal Language Selector library
   namespace: NS_WIKIMEDIA
   id: out-jquery-uls
-  label: jquery.uls
+  label: jQuery.ULS
+  icon: wiki://JQuery-logo-square.svg
   class: FileBasedMessageGroup
 
 MANGLER:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a5bebab9fce6026be2ca7e6ad7fb3fb48ad02ab
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add logo for jQuery.ULS and update label - change (translatewiki)

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

Change subject: Add logo for jQuery.ULS and update label
..


Add logo for jQuery.ULS and update label

Change-Id: I5a5bebab9fce6026be2ca7e6ad7fb3fb48ad02ab
---
M groups/Wikimedia/jquery.uls.yaml
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/groups/Wikimedia/jquery.uls.yaml b/groups/Wikimedia/jquery.uls.yaml
index 215f9c9..9eb3ba9 100644
--- a/groups/Wikimedia/jquery.uls.yaml
+++ b/groups/Wikimedia/jquery.uls.yaml
@@ -3,7 +3,8 @@
   description: Translations of Universal Language Selector library
   namespace: NS_WIKIMEDIA
   id: out-jquery-uls
-  label: jquery.uls
+  label: jQuery.ULS
+  icon: wiki://JQuery-logo-square.svg
   class: FileBasedMessageGroup
 
 MANGLER:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a5bebab9fce6026be2ca7e6ad7fb3fb48ad02ab
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add logos for Wikimedia mobile apps - change (translatewiki)

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

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


Change subject: Add logos for Wikimedia mobile apps
..

Add logos for Wikimedia mobile apps

Change-Id: I3d671feb5d9f9d7d56ff47afb6b97ababc9aaf27
---
M groups/Wikimedia/WikimediaMobile.yaml
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/55/61755/1

diff --git a/groups/Wikimedia/WikimediaMobile.yaml 
b/groups/Wikimedia/WikimediaMobile.yaml
index 83cd19c..81d9ef5 100644
--- a/groups/Wikimedia/WikimediaMobile.yaml
+++ b/groups/Wikimedia/WikimediaMobile.yaml
@@ -1,6 +1,7 @@
 TEMPLATE:
   BASIC:
 description: {{int:translate-group-desc-wikimedia-mobile}}
+icon: wiki://Wikimedia-logo.svg
 namespace: NS_WIKIMEDIA
 class: FileBasedMessageGroup
 
@@ -77,6 +78,7 @@
 BASIC:
   id: out-wikimedia-mobile-wikisource
   label: Wikisource Mobile
+  icon: wiki://Wikisource-logo.svg
   description: {{int:translate-group-desc-wikimedia-mobile-wikisource}}
 
 MANGLER:
@@ -97,6 +99,7 @@
 BASIC:
   id: out-wikimedia-mobile-wiktionary
   label: Wiktionary Mobile
+  icon: wiki://Wiktionary-logo.svg
   description: {{int:translate-group-desc-wikimedia-mobile-wiktionary}}
 
 MANGLER:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d671feb5d9f9d7d56ff47afb6b97ababc9aaf27
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add logos for Wikimedia mobile apps - change (translatewiki)

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

Change subject: Add logos for Wikimedia mobile apps
..


Add logos for Wikimedia mobile apps

Change-Id: I3d671feb5d9f9d7d56ff47afb6b97ababc9aaf27
---
M groups/Wikimedia/WikimediaMobile.yaml
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/groups/Wikimedia/WikimediaMobile.yaml 
b/groups/Wikimedia/WikimediaMobile.yaml
index 83cd19c..81d9ef5 100644
--- a/groups/Wikimedia/WikimediaMobile.yaml
+++ b/groups/Wikimedia/WikimediaMobile.yaml
@@ -1,6 +1,7 @@
 TEMPLATE:
   BASIC:
 description: {{int:translate-group-desc-wikimedia-mobile}}
+icon: wiki://Wikimedia-logo.svg
 namespace: NS_WIKIMEDIA
 class: FileBasedMessageGroup
 
@@ -77,6 +78,7 @@
 BASIC:
   id: out-wikimedia-mobile-wikisource
   label: Wikisource Mobile
+  icon: wiki://Wikisource-logo.svg
   description: {{int:translate-group-desc-wikimedia-mobile-wikisource}}
 
 MANGLER:
@@ -97,6 +99,7 @@
 BASIC:
   id: out-wikimedia-mobile-wiktionary
   label: Wiktionary Mobile
+  icon: wiki://Wiktionary-logo.svg
   description: {{int:translate-group-desc-wikimedia-mobile-wiktionary}}
 
 MANGLER:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d671feb5d9f9d7d56ff47afb6b97ababc9aaf27
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Nicified smwgQEnabled handling in ask/show - change (mediawiki...SemanticMediaWiki)

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

Change subject: Nicified smwgQEnabled handling in ask/show
..


Nicified smwgQEnabled handling in ask/show

+ Use disabled() instead of transferring information into the method
+ Use useShowMode() to invoke show status instead of using a method parameter

Change-Id: Icbe78e5675056a5e86e627ba41878f008c6a024a
---
M includes/parserhooks/AskParserFunction.php
M includes/parserhooks/ShowParserFunction.php
M tests/phpunit/SemanticMediaWikiTestCase.php
M tests/phpunit/includes/parserhooks/AskParserFunctionTest.php
M tests/phpunit/includes/parserhooks/ShowParserFunctionTest.php
5 files changed, 185 insertions(+), 74 deletions(-)

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



diff --git a/includes/parserhooks/AskParserFunction.php 
b/includes/parserhooks/AskParserFunction.php
index c22a056..519dc99 100644
--- a/includes/parserhooks/AskParserFunction.php
+++ b/includes/parserhooks/AskParserFunction.php
@@ -6,7 +6,7 @@
 use SMWQueryProcessor;
 
 /**
- * {{#ask}} parser function
+ * Class that provides the {{#ask}} parser function
  *
  * 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
@@ -29,7 +29,7 @@
  *
  * @file
  * @ingroup SMW
- * @ingroup ParserHooks
+ * @ingroup ParserFunction
  *
  * @author Markus Krötzsch
  * @author Jeroen De Dauw
@@ -37,26 +37,32 @@
  */
 
 /**
- * Class that provides the {{#ask}} parser hook function
+ * Class that provides the {{#ask}} parser function
  *
  * @ingroup SMW
- * @ingroup ParserHooks
+ * @ingroup ParserFunction
  */
 class AskParserFunction {
 
/**
-* Represents IParserData
+* Represents IParserData object
+* @var QueryData
 */
protected $parserData;
 
/**
-* Represents QueryData
+* Represents QueryData object
+* @var IParserData
 */
protected $queryData;
 
/**
-* Constructor
-*
+* SMWQueryProcessor showMode indicator
+* @var boolean
+*/
+   protected $showMode = false;
+
+   /**
 * @since 1.9
 *
 * @param IParserData $parserData
@@ -71,12 +77,12 @@
 * After some discussion IQueryProcessor/QueryProcessor is not being
 * used in 1.9 and instead rely on SMWQueryProcessor
 */
-   private function initQueryProcessor( array $rawParams, $showMode = 
false ) {
+   private function initQueryProcessor( array $rawParams ) {
list( $this-query, $this-params ) = 
SMWQueryProcessor::getQueryAndParamsFromFunctionParams(
$rawParams,
SMW_OUTPUT_WIKI,
SMWQueryProcessor::INLINE_QUERY,
-   $showMode
+   $this-showMode
);
 
$this-result = SMWQueryProcessor::getResultFromQuery(
@@ -88,34 +94,60 @@
}
 
/**
-* Parse parameters and return results to the ParserOutput object
+* Returns a message about inline queries being disabled
+*
+* @see $smwgQEnabled
+*
+* FIXME Replace with IMessageFormatter - ErrorMessageFormatter class
+*
+* @since 1.9
+*
+* @return string
+*/
+   protected function disabled() {
+   return smwfEncodeMessages( array( wfMessage( 'smw_iq_disabled' 
)-inContentLanguage()-text() ) );
+   }
+
+   /**
+* Enable showMode (normally only invoked by {{#show}})
+*
+* @since 1.9
+*
+* @return AskParserFunction
+*/
+   public function useShowMode() {
+   $this-showMode = true;
+   return $this;
+   }
+
+   /**
+* Parse parameters, return results from the query printer and update 
the
+* ParserOutput with meta data from the query
+*
+* FIXME $rawParams use IParameterFormatter - QueryParameterFormatter 
class
 *
 * @since 1.9
 *
 * @param array $params
-* @param boolean $enabled
 *
 * @return string|null
 */
-   public function parse( array $rawParams, $enabled = true, $showMode = 
false ) {
+   public function parse( array $rawParams ) {
global $smwgIQRunningNumber;
-
-   // FIXME $rawParams will be of IParameterFormatter - 
QueryParameterFormatter class
-
-   if ( !$enabled ) {
-   // FIXME Replace with IMessageFormatter - 
ErrorMessageFormatter class
-   return smwfEncodeMessages( array( wfMessage( 
'smw_iq_disabled' )-inContentLanguage()-text() ) );
-   }
 
// Counter for what? Where and for what is it used?
$smwgIQRunningNumber++;
 
   

[MediaWiki-commits] [Gerrit] problems with git permissions - change (mediawiki...MathSearch)

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

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


Change subject: problems with git permissions
..

problems with git permissions

Change-Id: I77dfc5c4badce6bf5d775dcf33a51c76356f96a1
---
M MathSearch.php
A SpecialMathIndex.php
D test
D test2
4 files changed, 43 insertions(+), 0 deletions(-)


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

diff --git a/MathSearch.php b/MathSearch.php
index d23134f..8343b9f 100644
--- a/MathSearch.php
+++ b/MathSearch.php
@@ -37,6 +37,7 @@
 $wgAutoloadClasses['XQueryGenerator'] = $dir . 'XQueryGenerator.php';
 $wgAutoloadClasses['GetEquationsByQuery'] = $dir . 'GetEquationsByQuery.php';
 $wgAutoloadClasses['SpecialMathDebug'] = $dir . 'SpecialMathDebug.php';
+$wgAutoloadClasses['SpecialMathIndex'] = $dir . 'SpecialMathIndex.php';
 
 
 $wgExtensionMessagesFiles['MathSearch'] = $dir . 'MathSearch.i18n.php'; 
@@ -47,11 +48,13 @@
 $wgSpecialPageGroups['GetEquationsByQuery'] = 'mathsearch';
 $wgSpecialPageGroups['XQueryGenerator'] = 'mathsearch';
 $wgSpecialPageGroups['MathDebug'] = 'mathsearch';
+$wgSpecialPageGroups['MathIndex'] = 'mathsearch';
 $wgSpecialPages['MathSearch'] = 'SpecialMathSearch';
 $wgSpecialPages['FormulaInfo'] = 'FormulaInfo';
 $wgSpecialPages['XQueryGenerator'] = 'XQueryGenerator'; //Temporary test page
 $wgSpecialPages['GetEquationsByQuery'] = 'GetEquationsByQuery';
 $wgSpecialPages['MathDebug'] = 'SpecialMathDebug';
+$wgSpecialPages['MathIndex'] = 'SpecialMathIndex';
 
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'MathSearchHooks::onLoadExtensionSchemaUpdates';
 $wgHooks['MathFormulaRendered'][] = 'MathSearchHooks::onMathFormulaRendered';
\ No newline at end of file
diff --git a/SpecialMathIndex.php b/SpecialMathIndex.php
new file mode 100644
index 000..bada1ab
--- /dev/null
+++ b/SpecialMathIndex.php
@@ -0,0 +1,40 @@
+?php
+class SpecialMathIndex extends SpecialPage {
+
+
+   function __construct() {
+   parent::__construct( 'MathIndex', 'edit', true );
+   }
+   /**
+* Sets headers - this should be called from the execute() method of 
all derived classes!
+*/
+   function setHeaders() {
+   $out = $this-getOutput();
+   $out-setArticleRelated( false );
+   $out-setRobotPolicy( noindex,nofollow );
+   $out-setPageTitle( $this-getDescription() );
+   }
+   function execute( $par ) {
+   global $wgDebugMath;
+   $output = $this-getOutput();
+   $this-setHeaders();
+   if ( $wgDebugMath ) {
+   if (  !$this-userCanExecute( $this-getUser() )  ) {
+   $this-displayRestrictionError();
+   return;
+   } else {
+   $this-testIndex();
+   }
+   } else {
+   $output-addWikiText( '\'\'\'This page is avaliblible 
in math debug mode only.\'\'\'' . \n\n .
+   'Enable the math debug mode by setting code 
$wgDebugMath = true/code .' );
+   }
+   }
+   function testIndex() {
+   $out = $this-getOutput();
+// $out-addWikiText($text)
+   }
+   
+
+
+}
\ No newline at end of file
diff --git a/test b/test
deleted file mode 100644
index e69de29..000
--- a/test
+++ /dev/null
diff --git a/test2 b/test2
deleted file mode 100644
index e69de29..000
--- a/test2
+++ /dev/null

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77dfc5c4badce6bf5d775dcf33a51c76356f96a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] problems with git permissions - change (mediawiki...MathSearch)

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

Change subject: problems with git permissions
..


problems with git permissions

Change-Id: I77dfc5c4badce6bf5d775dcf33a51c76356f96a1
---
M MathSearch.php
A SpecialMathIndex.php
D test
D test2
4 files changed, 43 insertions(+), 0 deletions(-)

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



diff --git a/MathSearch.php b/MathSearch.php
index d23134f..8343b9f 100644
--- a/MathSearch.php
+++ b/MathSearch.php
@@ -37,6 +37,7 @@
 $wgAutoloadClasses['XQueryGenerator'] = $dir . 'XQueryGenerator.php';
 $wgAutoloadClasses['GetEquationsByQuery'] = $dir . 'GetEquationsByQuery.php';
 $wgAutoloadClasses['SpecialMathDebug'] = $dir . 'SpecialMathDebug.php';
+$wgAutoloadClasses['SpecialMathIndex'] = $dir . 'SpecialMathIndex.php';
 
 
 $wgExtensionMessagesFiles['MathSearch'] = $dir . 'MathSearch.i18n.php'; 
@@ -47,11 +48,13 @@
 $wgSpecialPageGroups['GetEquationsByQuery'] = 'mathsearch';
 $wgSpecialPageGroups['XQueryGenerator'] = 'mathsearch';
 $wgSpecialPageGroups['MathDebug'] = 'mathsearch';
+$wgSpecialPageGroups['MathIndex'] = 'mathsearch';
 $wgSpecialPages['MathSearch'] = 'SpecialMathSearch';
 $wgSpecialPages['FormulaInfo'] = 'FormulaInfo';
 $wgSpecialPages['XQueryGenerator'] = 'XQueryGenerator'; //Temporary test page
 $wgSpecialPages['GetEquationsByQuery'] = 'GetEquationsByQuery';
 $wgSpecialPages['MathDebug'] = 'SpecialMathDebug';
+$wgSpecialPages['MathIndex'] = 'SpecialMathIndex';
 
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'MathSearchHooks::onLoadExtensionSchemaUpdates';
 $wgHooks['MathFormulaRendered'][] = 'MathSearchHooks::onMathFormulaRendered';
\ No newline at end of file
diff --git a/SpecialMathIndex.php b/SpecialMathIndex.php
new file mode 100644
index 000..bada1ab
--- /dev/null
+++ b/SpecialMathIndex.php
@@ -0,0 +1,40 @@
+?php
+class SpecialMathIndex extends SpecialPage {
+
+
+   function __construct() {
+   parent::__construct( 'MathIndex', 'edit', true );
+   }
+   /**
+* Sets headers - this should be called from the execute() method of 
all derived classes!
+*/
+   function setHeaders() {
+   $out = $this-getOutput();
+   $out-setArticleRelated( false );
+   $out-setRobotPolicy( noindex,nofollow );
+   $out-setPageTitle( $this-getDescription() );
+   }
+   function execute( $par ) {
+   global $wgDebugMath;
+   $output = $this-getOutput();
+   $this-setHeaders();
+   if ( $wgDebugMath ) {
+   if (  !$this-userCanExecute( $this-getUser() )  ) {
+   $this-displayRestrictionError();
+   return;
+   } else {
+   $this-testIndex();
+   }
+   } else {
+   $output-addWikiText( '\'\'\'This page is avaliblible 
in math debug mode only.\'\'\'' . \n\n .
+   'Enable the math debug mode by setting code 
$wgDebugMath = true/code .' );
+   }
+   }
+   function testIndex() {
+   $out = $this-getOutput();
+// $out-addWikiText($text)
+   }
+   
+
+
+}
\ No newline at end of file
diff --git a/test b/test
deleted file mode 100644
index e69de29..000
--- a/test
+++ /dev/null
diff --git a/test2 b/test2
deleted file mode 100644
index e69de29..000
--- a/test2
+++ /dev/null

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I77dfc5c4badce6bf5d775dcf33a51c76356f96a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] Added the .DS_Store files to .gitignore - change (mediawiki...Vector)

2013-05-01 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has uploaded a new change for review.

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


Change subject: Added the .DS_Store files to .gitignore
..

Added the .DS_Store files to .gitignore

Change-Id: Ia236e15364590f672df8b754ce1a358d1af73cee
---
M .gitignore
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index 98b092a..a8d301e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
 *~
 *.kate-swp
 .*.swp
+.DS_Store
+modules/.DS_Store

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia236e15364590f672df8b754ce1a358d1af73cee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Vector
Gerrit-Branch: master
Gerrit-Owner: Luis Felipe Schenone scheno...@gmail.com

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


[MediaWiki-commits] [Gerrit] More docs clean-up - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: More docs clean-up
..

More docs clean-up

Change-Id: I6797c8fbe553649b718c2bda91ca9e28e7fdcdfc
---
M includes/parserhooks/AskParserFunction.php
M includes/parserhooks/ConceptParserFunction.php
M includes/parserhooks/DeclareParserFunction.php
M includes/parserhooks/DocumentationParserFunction.php
M includes/parserhooks/InfoParserFunction.php
M includes/parserhooks/RecurringEventsParserFunction.php
M includes/parserhooks/SetParserFunction.php
M includes/parserhooks/ShowParserFunction.php
M includes/parserhooks/SubobjectParserFunction.php
M tests/phpunit/includes/parserhooks/ConceptParserFunctionTest.php
M tests/phpunit/includes/parserhooks/DeclareParserFunctionTest.php
M tests/phpunit/includes/parserhooks/DocumentationParserFunctionTest.php
M tests/phpunit/includes/parserhooks/InfoParserFunctionTest.php
M tests/phpunit/includes/parserhooks/RecurringEventsParserFunctionTest.php
M tests/phpunit/includes/parserhooks/SetParserFunctionTest.php
M tests/phpunit/includes/parserhooks/SubobjectParserFunctionTest.php
16 files changed, 164 insertions(+), 84 deletions(-)


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

diff --git a/includes/parserhooks/AskParserFunction.php 
b/includes/parserhooks/AskParserFunction.php
index 519dc99..346edcb 100644
--- a/includes/parserhooks/AskParserFunction.php
+++ b/includes/parserhooks/AskParserFunction.php
@@ -31,6 +31,7 @@
  * @ingroup SMW
  * @ingroup ParserFunction
  *
+ * @licence GNU GPL v2+
  * @author Markus Krötzsch
  * @author Jeroen De Dauw
  * @author mwjames
diff --git a/includes/parserhooks/ConceptParserFunction.php 
b/includes/parserhooks/ConceptParserFunction.php
index 765fa2d..4f822c6 100644
--- a/includes/parserhooks/ConceptParserFunction.php
+++ b/includes/parserhooks/ConceptParserFunction.php
@@ -11,7 +11,7 @@
 use SMWQueryProcessor;
 
 /**
- * {{#concept}} parser function
+ * Class that provides the {{#concept}} parser function
  *
  * 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
@@ -32,29 +32,29 @@
  *
  * @file
  * @ingroup SMW
- * @ingroup ParserHooks
+ * @ingroup ParserFunction
  *
+ * @licence GNU GPL v2+
  * @author Markus Krötzsch
  * @author Jeroen De Dauw
  * @author mwjames
  */
 
 /**
- * Class that provides the {{#concept}} parser hook function
+ * Class that provides the {{#concept}} parser function
  *
  * @ingroup SMW
- * @ingroup ParserHooks
+ * @ingroup ParserFunction
  */
 class ConceptParserFunction {
 
/**
-* Represents IParserData
+* Represents IParserData object
+* @var IParserData
 */
protected $parserData;
 
/**
-* Constructor
-*
 * @since 1.9
 *
 * @param IParserData $parserData
@@ -67,6 +67,8 @@
 * Returns RDF link
 *
 * @since 1.9
+*
+* @param Title $title
 *
 * @return string
 */
@@ -81,6 +83,10 @@
 * Returns a concept information box as html
 *
 * @since 1.9
+*
+* @param Title $title
+* @param $queryString
+* @param $documentation
 *
 * @return string
 */
@@ -117,7 +123,8 @@
}
 
/**
-* Parse parameters and return results to the ParserOutput object
+* Parse parameters, return concept information box and update the
+* ParserOutput with the concept object
 *
 * @since 1.9
 *
@@ -137,13 +144,15 @@
return smwfEncodeMessages( array( wfMessage( 
'smw_multiple_concepts' )-inContentLanguage()-text() ) );
}
 
-   // Extinct parser object from parameters array
-   array_shift( $rawParams );
+   // Remove parser object from parameters array
+   if( isset( $rawParams[0] )  $rawParams[0] instanceof Parser ) 
{
+   array_shift( $rawParams );
+   }
 
-   // Use first parameter as concept (query) string.
+   // Use first parameter as concept (query) string
$conceptQuery = array_shift( $rawParams );
 
-   // second parameter, if any, might be a description
+   // Use second parameter, if any as a description
$conceptDocu = array_shift( $rawParams );
 
// Query processor
@@ -163,7 +172,7 @@
)
);
 
-   // Store query data to the ParserOutput
+   // Handling errors from the query
$this-parserData-addError( $this-query-getErrors() );
 
// Update ParserOutput
@@ -173,7 +182,7 @@
}
 
/**
-* Method for 

[MediaWiki-commits] [Gerrit] new readme file - change (mediawiki...MathSearch)

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

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


Change subject: new readme file
..

new readme file

Change-Id: Iba8a7299197b2b258850a7de21ebab75e6fe0230
---
A README
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/README b/README
new file mode 100644
index 000..7005d47
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+The documentation is coming soon.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba8a7299197b2b258850a7de21ebab75e6fe0230
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] More docs clean-up - change (mediawiki...SemanticMediaWiki)

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

Change subject: More docs clean-up
..


More docs clean-up

Change-Id: I6797c8fbe553649b718c2bda91ca9e28e7fdcdfc
---
M includes/parserhooks/AskParserFunction.php
M includes/parserhooks/ConceptParserFunction.php
M includes/parserhooks/DeclareParserFunction.php
M includes/parserhooks/DocumentationParserFunction.php
M includes/parserhooks/InfoParserFunction.php
M includes/parserhooks/RecurringEventsParserFunction.php
M includes/parserhooks/SetParserFunction.php
M includes/parserhooks/ShowParserFunction.php
M includes/parserhooks/SubobjectParserFunction.php
M tests/phpunit/includes/parserhooks/ConceptParserFunctionTest.php
M tests/phpunit/includes/parserhooks/DeclareParserFunctionTest.php
M tests/phpunit/includes/parserhooks/DocumentationParserFunctionTest.php
M tests/phpunit/includes/parserhooks/InfoParserFunctionTest.php
M tests/phpunit/includes/parserhooks/RecurringEventsParserFunctionTest.php
M tests/phpunit/includes/parserhooks/SetParserFunctionTest.php
M tests/phpunit/includes/parserhooks/SubobjectParserFunctionTest.php
16 files changed, 164 insertions(+), 84 deletions(-)

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



diff --git a/includes/parserhooks/AskParserFunction.php 
b/includes/parserhooks/AskParserFunction.php
index 519dc99..346edcb 100644
--- a/includes/parserhooks/AskParserFunction.php
+++ b/includes/parserhooks/AskParserFunction.php
@@ -31,6 +31,7 @@
  * @ingroup SMW
  * @ingroup ParserFunction
  *
+ * @licence GNU GPL v2+
  * @author Markus Krötzsch
  * @author Jeroen De Dauw
  * @author mwjames
diff --git a/includes/parserhooks/ConceptParserFunction.php 
b/includes/parserhooks/ConceptParserFunction.php
index 765fa2d..4f822c6 100644
--- a/includes/parserhooks/ConceptParserFunction.php
+++ b/includes/parserhooks/ConceptParserFunction.php
@@ -11,7 +11,7 @@
 use SMWQueryProcessor;
 
 /**
- * {{#concept}} parser function
+ * Class that provides the {{#concept}} parser function
  *
  * 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
@@ -32,29 +32,29 @@
  *
  * @file
  * @ingroup SMW
- * @ingroup ParserHooks
+ * @ingroup ParserFunction
  *
+ * @licence GNU GPL v2+
  * @author Markus Krötzsch
  * @author Jeroen De Dauw
  * @author mwjames
  */
 
 /**
- * Class that provides the {{#concept}} parser hook function
+ * Class that provides the {{#concept}} parser function
  *
  * @ingroup SMW
- * @ingroup ParserHooks
+ * @ingroup ParserFunction
  */
 class ConceptParserFunction {
 
/**
-* Represents IParserData
+* Represents IParserData object
+* @var IParserData
 */
protected $parserData;
 
/**
-* Constructor
-*
 * @since 1.9
 *
 * @param IParserData $parserData
@@ -67,6 +67,8 @@
 * Returns RDF link
 *
 * @since 1.9
+*
+* @param Title $title
 *
 * @return string
 */
@@ -81,6 +83,10 @@
 * Returns a concept information box as html
 *
 * @since 1.9
+*
+* @param Title $title
+* @param $queryString
+* @param $documentation
 *
 * @return string
 */
@@ -117,7 +123,8 @@
}
 
/**
-* Parse parameters and return results to the ParserOutput object
+* Parse parameters, return concept information box and update the
+* ParserOutput with the concept object
 *
 * @since 1.9
 *
@@ -137,13 +144,15 @@
return smwfEncodeMessages( array( wfMessage( 
'smw_multiple_concepts' )-inContentLanguage()-text() ) );
}
 
-   // Extinct parser object from parameters array
-   array_shift( $rawParams );
+   // Remove parser object from parameters array
+   if( isset( $rawParams[0] )  $rawParams[0] instanceof Parser ) 
{
+   array_shift( $rawParams );
+   }
 
-   // Use first parameter as concept (query) string.
+   // Use first parameter as concept (query) string
$conceptQuery = array_shift( $rawParams );
 
-   // second parameter, if any, might be a description
+   // Use second parameter, if any as a description
$conceptDocu = array_shift( $rawParams );
 
// Query processor
@@ -163,7 +172,7 @@
)
);
 
-   // Store query data to the ParserOutput
+   // Handling errors from the query
$this-parserData-addError( $this-query-getErrors() );
 
// Update ParserOutput
@@ -173,7 +182,7 @@
}
 
/**
-* Method for handling the ask parser function
+* 

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

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

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


Change subject: Update ParserFunctions to master
..

Update ParserFunctions to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/61760/1

diff --git a/extensions/ParserFunctions b/extensions/ParserFunctions
index 2c9aaf6..e68dd57 16
--- a/extensions/ParserFunctions
+++ b/extensions/ParserFunctions
-Subproject commit 2c9aaf66aabc00530f6fedafd944a8c065ef3f57
+Subproject commit e68dd5725338225382ad5ec1068f26fc11db30be

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I185cf938ede040d4db499dadff1ea4e5289cac03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf2
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 ParserFunctions to master - change (mediawiki/core)

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

Change subject: Update ParserFunctions to master
..


Update ParserFunctions to master

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

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



diff --git a/extensions/ParserFunctions b/extensions/ParserFunctions
index 2c9aaf6..e68dd57 16
--- a/extensions/ParserFunctions
+++ b/extensions/ParserFunctions
-Subproject commit 2c9aaf66aabc00530f6fedafd944a8c065ef3f57
+Subproject commit e68dd5725338225382ad5ec1068f26fc11db30be

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I185cf938ede040d4db499dadff1ea4e5289cac03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf2
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] Change Add description to Add documentation - change (mediawiki...Translate)

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

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


Change subject: Change Add description to Add documentation
..

Change Add description to Add documentation

The former confused some users and made them add something resembling an
edit summary. Was reported by Nemo in
https://translatewiki.net/wiki/Thread:Translation_UX_feedback/%22Add_description%22_confuses_users

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


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

diff --git a/Translate.i18n.php b/Translate.i18n.php
index b2d0f2b..3291f70 100644
--- a/Translate.i18n.php
+++ b/Translate.i18n.php
@@ -460,7 +460,7 @@
'tux-editor-confirm-button-label' = 'Confirm translation',
'tux-editor-shortcut-info' = 'Press $1 to save or $2 to skip to 
next message',
'tux-editor-edit-desc' = 'Edit description',
-   'tux-editor-add-desc' = 'Add description',
+   'tux-editor-add-desc' = 'Add documentation',
'tux-editor-suggestions-title' = 'Suggestions',
'tux-editor-in-other-languages' = 'In other languages',
'tux-editor-need-more-help' = 'Need more help?',

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

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

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


[MediaWiki-commits] [Gerrit] Import classes rather then using FQNs - change (mediawiki...Wikibase)

2013-05-01 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Import classes rather then using FQNs
..


Import classes rather then using FQNs

Change-Id: I342835230f89e05c912c1146bb9db55969c4d75d
---
M DataModel/tests/phpunit/Entity/EntityTest.php
1 file changed, 49 insertions(+), 37 deletions(-)

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



diff --git a/DataModel/tests/phpunit/Entity/EntityTest.php 
b/DataModel/tests/phpunit/Entity/EntityTest.php
index fd40f0e..b0277da 100644
--- a/DataModel/tests/phpunit/Entity/EntityTest.php
+++ b/DataModel/tests/phpunit/Entity/EntityTest.php
@@ -2,9 +2,21 @@
 
 namespace Wikibase\Test;
 
+use DataValues\StringValue;
+use Diff\Diff;
+use Diff\DiffOpAdd;
+use Diff\DiffOpChange;
+use Diff\DiffOpRemove;
+use Wikibase\Claim;
 use Wikibase\Entity;
 use Wikibase\EntityDiff;
 use Wikibase\EntityId;
+use Wikibase\Item;
+use Wikibase\Lib\ClaimGuidGenerator;
+use Wikibase\ObjectComparer;
+use Wikibase\PropertyNoValueSnak;
+use Wikibase\PropertySomeValueSnak;
+use Wikibase\PropertyValueSnak;
 
 /**
  * Tests for the Wikibase\Entity deriving classes.
@@ -442,7 +454,7 @@
/**
 * @dataProvider instanceProvider
 *
-* @param \Wikibase\Entity $entity
+* @param Entity $entity
 */
public function testStub( Entity $entity ) {
$copy = $entity-copy();
@@ -454,7 +466,7 @@
/**
 * @dataProvider instanceProvider
 *
-* @param \Wikibase\Entity $entity
+* @param Entity $entity
 */
public function testCopy( Entity $entity ) {
$copy = $entity-copy();
@@ -472,7 +484,7 @@
/**
 * @dataProvider instanceProvider
 *
-* @param \Wikibase\Entity $entity
+* @param Entity $entity
 */
public function testSerialize( Entity $entity ) {
$string = serialize( $entity );
@@ -563,9 +575,9 @@
 
if ( $expectedId === null ) {
$thisData = $instance-toArray();
-   $thatData = \Wikibase\Item::newEmpty()-toArray();
+   $thatData = Item::newEmpty()-toArray();
 
-   $comparer = new \Wikibase\ObjectComparer();
+   $comparer = new ObjectComparer();
$equals = $comparer-dataEquals( $thisData, $thatData, 
array( 'entity' ) );
 
$this-assertTrue( $equals );
@@ -599,7 +611,7 @@
$entity-setId( new EntityId( $entity-getType(), 50 ) 
);
}
 
-   $snak = new \Wikibase\PropertyNoValueSnak( 42 );
+   $snak = new PropertyNoValueSnak( 42 );
$claim = $entity-newClaim( $snak );
 
$this-assertInstanceOf( '\Wikibase\Claim', $claim );
@@ -610,24 +622,24 @@
 
$this-assertInternalType( 'string', $guid );
 
-   $prefixedEntityId = \Wikibase\Entity::getIdFromClaimGuid( $guid 
);
+   $prefixedEntityId = Entity::getIdFromClaimGuid( $guid );
 
$this-assertEquals( $entity-getPrefixedId(), 
$prefixedEntityId );
}
 
public function testNewClaimMore() {
-   $snak = new \Wikibase\PropertyNoValueSnak( 42 );
-   $item = \Wikibase\Item::newEmpty();
+   $snak = new PropertyNoValueSnak( 42 );
+   $item = Item::newEmpty();
 
-   $mockId = new EntityId( \Wikibase\Item::ENTITY_TYPE, 9001 );
-   $generator = new \Wikibase\Lib\ClaimGuidGenerator( $mockId );
+   $mockId = new EntityId( Item::ENTITY_TYPE, 9001 );
+   $generator = new ClaimGuidGenerator( $mockId );
 
$claim = $item-newClaim( $snak, $generator );
$guid = $claim-getGuid();
 
$this-assertInternalType( 'string', $guid );
 
-   $prefixedEntityId = \Wikibase\Entity::getIdFromClaimGuid( $guid 
);
+   $prefixedEntityId = Entity::getIdFromClaimGuid( $guid );
 
$this-assertEquals( $mockId-getPrefixedId(), 
$prefixedEntityId );
}
@@ -653,21 +665,21 @@
 
$entity1-setDescription( 'en', 'onoez' );
 
-   $expected = new \Wikibase\EntityDiff( array(
-   'aliases' = new \Diff\Diff( array(
-   'en' = new \Diff\Diff( array(
-   new \Diff\DiffOpAdd( 'foo' ),
-   new \Diff\DiffOpAdd( 'bar' ),
+   $expected = new EntityDiff( array(
+   'aliases' = new Diff( array(
+   'en' = new Diff( array(
+   new DiffOpAdd( 'foo' ),
+   new DiffOpAdd( 'bar' ),
), 

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

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

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


Change subject: Update php symlink to 1.22wmf2
..

Update php symlink to 1.22wmf2

Change-Id: Ic926a32c05991c02b264a15e4b43a9902a85e684
---
M php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/php b/php
index 716645c..150b5e6 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.22wmf1
\ No newline at end of file
+php-1.22wmf2
\ No newline at end of file

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

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

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


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

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

Change subject: Update php symlink to 1.22wmf2
..


Update php symlink to 1.22wmf2

Change-Id: Ic926a32c05991c02b264a15e4b43a9902a85e684
---
M php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/php b/php
index 716645c..150b5e6 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.22wmf1
\ No newline at end of file
+php-1.22wmf2
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] Fix DispatchStatsTest and EntityChangeTest - change (mediawiki...Wikibase)

2013-05-01 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Fix DispatchStatsTest and EntityChangeTest
..


Fix DispatchStatsTest and EntityChangeTest

* renamed misnamed test class
* replaced truncate with delete for SQLite compatibility
* use generic Site objects
* provide defaults for change_id and user_id

Change-Id: Icae47e5e29217a647b2e0ed513542996b82d40c6
---
M lib/includes/ChangesTable.php
M lib/tests/phpunit/changes/TestChanges.php
M repo/Wikibase.hooks.php
M repo/tests/phpunit/includes/store/sql/DispatchStatsTest.php
4 files changed, 56 insertions(+), 31 deletions(-)

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



diff --git a/lib/includes/ChangesTable.php b/lib/includes/ChangesTable.php
index 2184ebb..4b3b2cd 100644
--- a/lib/includes/ChangesTable.php
+++ b/lib/includes/ChangesTable.php
@@ -128,23 +128,33 @@
}
 
/**
-* @see ORMTable::getWriteValues()
+* @see   ORMTable::getWriteValues()
 *
 * @since 0.4
 *
-* @param \IORMRow $row
+* @param ChangeRow $row
 *
 * @return array
 */
protected function getWriteValues( \IORMRow $row ) {
+   assert( $row instanceof ChangeRow );
+
$values = parent::getWriteValues( $row );
 
-   if ( $row instanceof ChangeRow ) {
-   $infoField = $this-getPrefixedField( 'info' );
+   $infoField = $this-getPrefixedField( 'info' );
+   $revisionIdField = $this-getPrefixedField( 'revision_id' );
+   $userIdField = $this-getPrefixedField( 'user_id' );
 
-   if ( isset( $values[$infoField] ) ) {
-   $values[$infoField] = $row-serializeInfo( 
$values[$infoField] );
-   }
+   if ( isset( $values[$infoField] ) ) {
+   $values[$infoField] = $row-serializeInfo( 
$values[$infoField] );
+   }
+
+   if ( !isset( $values[$revisionIdField] ) ) {
+   $values[$revisionIdField] = 0;
+   }
+
+   if ( !isset( $values[$userIdField] ) ) {
+   $values[$userIdField] = 0;
}
 
return $values;
diff --git a/lib/tests/phpunit/changes/TestChanges.php 
b/lib/tests/phpunit/changes/TestChanges.php
index 6d791fc..a559af7 100644
--- a/lib/tests/phpunit/changes/TestChanges.php
+++ b/lib/tests/phpunit/changes/TestChanges.php
@@ -6,6 +6,7 @@
 use \Wikibase\EntityChange;
 use \Wikibase\DiffChange;
 use \Wikibase\EntityId;
+use Wikibase\SiteLink;
 
 /**
  * Test change data for ChangeRowTest
@@ -41,23 +42,27 @@
  */
 final class TestChanges {
 
+   protected static function getSite( $globalId ) {
+   $site = new \MediaWikiSite();
+   $site-setGlobalId( $globalId );
+
+   return $site;
+   }
+
+   protected static function makeSiteLink( $siteId, $page ) {
+   $site = self::getSite( $siteId );
+   return new SiteLink( $site, $page );
+   }
+
protected static function getItem() {
$item = Item::newEmpty();
$item-setLabel( 'en', 'Venezuela' );
$item-setDescription( 'en', 'a country' );
$item-addAliases( 'en', array( 'Bolivarian Republic of 
Venezuela' ) );
 
-   $site = new \Site();
-   $site-setGlobalId( 'enwiki' );
-   $item-addSiteLink( new \Wikibase\SiteLink( $site, 'Venezuela' 
)  );
-
-   $site = new \Site();
-   $site-setGlobalId( 'jawiki' );
-   $item-addSiteLink( new \Wikibase\SiteLink( $site, 'ベネズエラ' )  );
-
-   $site = new \Site();
-   $site-setGlobalId( 'cawiki' );
-   $item-addSiteLink( new \Wikibase\SiteLink( $site, 'Veneçuela' 
)  );
+   $item-addSiteLink( self::makeSiteLink( 'enwiki', 'Venezuela' ) 
 );
+   $item-addSiteLink( self::makeSiteLink( 'jawiki', 'ベネズエラ' )  );
+   $item-addSiteLink( self::makeSiteLink( 'cawiki', 'Veneçuela' ) 
 );
 
return $item;
}
@@ -90,31 +95,31 @@
// -
$old = Item::newEmpty();
$old-setId( new \Wikibase\EntityId( Item::ENTITY_TYPE, 
100 ) );
+
+   /* @var Item $new */
$new = $old-copy();
 
$changes['item-creation'] = 
EntityChange::newFromUpdate( EntityChange::ADD, null, $new );
$changes['item-deletion'] = 
EntityChange::newFromUpdate( EntityChange::REMOVE, $old, null );
 
// -
-   $dewiki = \Sites::singleton()-getSite( 'dewiki' );
-   $link = new \Wikibase\SiteLink( $dewiki, 

[MediaWiki-commits] [Gerrit] Adding Wikivoyage to the list. - change (mediawiki...WikimediaMaintenance)

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

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


Change subject: Adding Wikivoyage to the list.
..

Adding Wikivoyage to the list.

This is a minor change, but a great way to advertise the fact that
Wikivoyage is available for new languages to be tested in. Placed
below Wikiversity as in order of launch date.

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/63/61763/1

diff --git a/addWiki.php b/addWiki.php
index 7bbcdba..56768aa 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -219,7 +219,8 @@
 [//www.wikinews.org Wikinews] |
 [//www.wikiquote.org Wikiquote] |
 [//www.wikisource.org Wikisource] |
-[//www.wikiversity.org Wikiversity]
+[//www.wikiversity.org Wikiversity] |
+[//www.wikivoyage.org Wikivoyage]
 /span
 
 See Wikimedia's [[m:|Meta-Wiki]] for the coordination of these projects.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cf32bd2bf66ebcd22f0e5c7d7930d2fa5a7a317
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Hydriz ad...@alphacorp.tk

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


[MediaWiki-commits] [Gerrit] Adding Wikivoyage to the list. - change (mediawiki...WikimediaMaintenance)

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

Change subject: Adding Wikivoyage to the list.
..


Adding Wikivoyage to the list.

This is a minor change, but a great way to advertise the fact that
Wikivoyage is available for new languages to be tested in. Placed
below Wikiversity as in order of launch date.

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

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



diff --git a/addWiki.php b/addWiki.php
index 7bbcdba..56768aa 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -219,7 +219,8 @@
 [//www.wikinews.org Wikinews] |
 [//www.wikiquote.org Wikiquote] |
 [//www.wikisource.org Wikisource] |
-[//www.wikiversity.org Wikiversity]
+[//www.wikiversity.org Wikiversity] |
+[//www.wikivoyage.org Wikivoyage]
 /span
 
 See Wikimedia's [[m:|Meta-Wiki]] for the coordination of these projects.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cf32bd2bf66ebcd22f0e5c7d7930d2fa5a7a317
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Hydriz ad...@alphacorp.tk
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


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

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

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


Change subject: [DismissableSiteNotice] Add new optional message key
..

[DismissableSiteNotice] Add new optional message key

https://gerrit.wikimedia.org/r/#/c/56780/7/DismissableSiteNotice.i18n.php,unified

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/64/61764/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 4c69395..2c226b5 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -364,6 +364,7 @@
 Dismissable SiteNotice
 descmsg = sitenotice-desc
 ignored = sitenotice_id
+optional = sitenotice_close-brackets
 
 Donation Interface - Adyen Gateway
 id = ext-di-adyen

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iced28ef484de5aacaebc6e08bf387370ff7519a0
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] [DismissableSiteNotice] Add new optional message key - change (translatewiki)

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

Change subject: [DismissableSiteNotice] Add new optional message key
..


[DismissableSiteNotice] Add new optional message key

https://gerrit.wikimedia.org/r/#/c/56780/7/DismissableSiteNotice.i18n.php,unified

Change-Id: Iced28ef484de5aacaebc6e08bf387370ff7519a0
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 1 insertion(+), 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 4c69395..2c226b5 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -364,6 +364,7 @@
 Dismissable SiteNotice
 descmsg = sitenotice-desc
 ignored = sitenotice_id
+optional = sitenotice_close-brackets
 
 Donation Interface - Adyen Gateway
 id = ext-di-adyen

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iced28ef484de5aacaebc6e08bf387370ff7519a0
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] Add a comment explaining why SQL's count is not used - change (mediawiki...MobileFrontend)

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

Change subject: Add a comment explaining why SQL's count is not used
..


Add a comment explaining why SQL's count is not used

Change-Id: I672cc659d51c4b2eb702ebdc4d0836d90e1ab000
---
M includes/specials/SpecialUploads.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/specials/SpecialUploads.php 
b/includes/specials/SpecialUploads.php
index ba61317..bf57064 100644
--- a/includes/specials/SpecialUploads.php
+++ b/includes/specials/SpecialUploads.php
@@ -73,6 +73,7 @@
 
$limit = $this-getUploadCountThreshold() + 1;
$dbr-ignoreErrors( true );
+   // not using SQL's count(*) because it's more expensive with 
big number of rows
$res = $dbr-select(
'image',
'img_size',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I672cc659d51c4b2eb702ebdc4d0836d90e1ab000
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@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] script to shovel in pages-logging xml file into logging table - change (operations/dumps)

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

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


Change subject: script to shovel in pages-logging xml file into logging table
..

script to shovel in pages-logging xml file into logging table

this script is for testing purposes only (populating the logging table
from a pages-logging xml file in order to test xml dumps); it also
populates the user table with mostly crap data except for the user
name and id as retrieved from the pages-logging xml file.

Change-Id: Ibe5ab1d8044a2faa60b1f1097dab1c40a553ebe3
---
A xmlfileutils/scripts/pageslogging2sql.py
1 file changed, 441 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/65/61765/1

diff --git a/xmlfileutils/scripts/pageslogging2sql.py 
b/xmlfileutils/scripts/pageslogging2sql.py
new file mode 100644
index 000..d43be39
--- /dev/null
+++ b/xmlfileutils/scripts/pageslogging2sql.py
@@ -0,0 +1,441 @@
+# -*- coding: utf-8 -*-
+import os, re, sys, getopt, urllib, gzip, bz2, subprocess, json, time, select, 
shutil, string
+from wikifile import File
+
+class WikiContentErr(Exception):
+pass
+
+class NsDict(object):
+
+def __init__(self, langCode, project, verbose = False):
+Constructor. Arguments:
+langCode   -- language code of project, like en el etc.
+project-- type of project, like wiktionary, wikipedia, etc.
+verbose--  display progress messages
+self.langCode = langCode
+self.project = project
+self.verbose = verbose
+
+def getNsDict(self):
+Retrieve namespace informtion for a wiki via the MediaWiki api
+and store in in dict form.
+On error raises an exception.
+
+# 
http://en.wikipedia.org/w/api.php?action=querymeta=siteinfosiprop=namespacesformat=json
 
+apiUrl = http://; + self.langCode + . + self.project + . + 
org/w/api.php + ?action=querymeta=siteinfosiprop=namespacesformat=json
+nsDict = {}
+ufd = urllib.urlopen(apiUrl)
+if str(ufd.getcode()).startswith(2):
+output = ufd.read()
+ufd.close()
+siteInfo = json.loads(output)
+if 'query' not in siteInfo or 'namespaces' not in 
siteInfo['query']:
+raise WikiContentErr(Error trying to get namespace 
information from api\n)
+for k in siteInfo['query']['namespaces'].keys():
+if '*' in siteInfo['query']['namespaces'][k]:
+nsDict[k] = 
siteInfo['query']['namespaces'][k]['*'].encode('utf8')
+else:
+raise WikiContentErr(Error trying to get parse namespace 
information\n)
+return nsDict
+else:
+code = ufd.getcode()
+ufd.close()
+raise WikiContentErr(Error trying to retrieve namespace info: 
%s\n % code);
+
+return nsDict
+
+class TitlesDict(object):
+def __init__(self, nsDictByString):
+Constructor. Arguments:
+nsDictByString  -- hash of nstitle = nsnum
+self.nsDictByString = nsDictByString
+
+def getTitlesDict(self,sqlFile):
+Arguments:
+sqlFile -- file containing pageid whitespace nsnum whitespace 
pagetitle where the title
+   is expected to be sql escaped and can be enclosed 
with single quotes
+fd = File.openInput(sqlFile)
+t = {}
+for line in fd:
+(pageid, ns, title) = line.split(' ',3)
+ns = int(ns)
+if title in t:
+t[title][ns] = pageid
+else:
+t[title] = { ns: pageid }
+return t
+
+class LoggingXml(object):
+def __init__(self, nsDictByString, titlesDict, xmlFile, outputFile, 
userOutFile):
+Constructor. Arguments:
+nsDictByString  -- hash of nstitle = nsnum
+titlesDict  -- hash of pagetitle = [ pageid, nsnum ]
+xmlFile -- path to filename with logging.xml
+logOutFile  -- path to logging output filename
+
+self.nsDictByString = nsDictByString
+self.titlesDict = titlesDict
+self.xmlFile = xmlFile
+self.logOutFile = logOutFile
+self.userOutFile = userOutFile
+
+self.logitemPattern = ^\s*logitem\s*\n$
+self.compiledLogitemPattern = re.compile(self.logitemPattern)
+self.idPattern = ^\s*id(?Pi.+)/id\s*\n$
+self.compiledIdPattern = re.compile(self.idPattern)
+self.timestampPattern = ^\s*timestamp(?Pt.+)/timestamp\s*\n$
+self.compiledTimestampPattern = re.compile(self.timestampPattern)
+self.contributorPattern = ^\s*contributor\n$
+self.compiledContributorPattern = re.compile(self.contributorPattern)
+self.usernamePattern = ^\s*username(?Pu.+)/username\s*\n$
+self.compiledUsernamePattern = re.compile(self.usernamePattern)
+

[MediaWiki-commits] [Gerrit] script to shovel in pages-logging xml file into logging table - change (operations/dumps)

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

Change subject: script to shovel in pages-logging xml file into logging table
..


script to shovel in pages-logging xml file into logging table

this script is for testing purposes only (populating the logging table
from a pages-logging xml file in order to test xml dumps); it also
populates the user table with mostly crap data except for the user
name and id as retrieved from the pages-logging xml file.

Change-Id: Ibe5ab1d8044a2faa60b1f1097dab1c40a553ebe3
---
A xmlfileutils/scripts/pageslogging2sql.py
1 file changed, 441 insertions(+), 0 deletions(-)

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



diff --git a/xmlfileutils/scripts/pageslogging2sql.py 
b/xmlfileutils/scripts/pageslogging2sql.py
new file mode 100644
index 000..d43be39
--- /dev/null
+++ b/xmlfileutils/scripts/pageslogging2sql.py
@@ -0,0 +1,441 @@
+# -*- coding: utf-8 -*-
+import os, re, sys, getopt, urllib, gzip, bz2, subprocess, json, time, select, 
shutil, string
+from wikifile import File
+
+class WikiContentErr(Exception):
+pass
+
+class NsDict(object):
+
+def __init__(self, langCode, project, verbose = False):
+Constructor. Arguments:
+langCode   -- language code of project, like en el etc.
+project-- type of project, like wiktionary, wikipedia, etc.
+verbose--  display progress messages
+self.langCode = langCode
+self.project = project
+self.verbose = verbose
+
+def getNsDict(self):
+Retrieve namespace informtion for a wiki via the MediaWiki api
+and store in in dict form.
+On error raises an exception.
+
+# 
http://en.wikipedia.org/w/api.php?action=querymeta=siteinfosiprop=namespacesformat=json
 
+apiUrl = http://; + self.langCode + . + self.project + . + 
org/w/api.php + ?action=querymeta=siteinfosiprop=namespacesformat=json
+nsDict = {}
+ufd = urllib.urlopen(apiUrl)
+if str(ufd.getcode()).startswith(2):
+output = ufd.read()
+ufd.close()
+siteInfo = json.loads(output)
+if 'query' not in siteInfo or 'namespaces' not in 
siteInfo['query']:
+raise WikiContentErr(Error trying to get namespace 
information from api\n)
+for k in siteInfo['query']['namespaces'].keys():
+if '*' in siteInfo['query']['namespaces'][k]:
+nsDict[k] = 
siteInfo['query']['namespaces'][k]['*'].encode('utf8')
+else:
+raise WikiContentErr(Error trying to get parse namespace 
information\n)
+return nsDict
+else:
+code = ufd.getcode()
+ufd.close()
+raise WikiContentErr(Error trying to retrieve namespace info: 
%s\n % code);
+
+return nsDict
+
+class TitlesDict(object):
+def __init__(self, nsDictByString):
+Constructor. Arguments:
+nsDictByString  -- hash of nstitle = nsnum
+self.nsDictByString = nsDictByString
+
+def getTitlesDict(self,sqlFile):
+Arguments:
+sqlFile -- file containing pageid whitespace nsnum whitespace 
pagetitle where the title
+   is expected to be sql escaped and can be enclosed 
with single quotes
+fd = File.openInput(sqlFile)
+t = {}
+for line in fd:
+(pageid, ns, title) = line.split(' ',3)
+ns = int(ns)
+if title in t:
+t[title][ns] = pageid
+else:
+t[title] = { ns: pageid }
+return t
+
+class LoggingXml(object):
+def __init__(self, nsDictByString, titlesDict, xmlFile, outputFile, 
userOutFile):
+Constructor. Arguments:
+nsDictByString  -- hash of nstitle = nsnum
+titlesDict  -- hash of pagetitle = [ pageid, nsnum ]
+xmlFile -- path to filename with logging.xml
+logOutFile  -- path to logging output filename
+
+self.nsDictByString = nsDictByString
+self.titlesDict = titlesDict
+self.xmlFile = xmlFile
+self.logOutFile = logOutFile
+self.userOutFile = userOutFile
+
+self.logitemPattern = ^\s*logitem\s*\n$
+self.compiledLogitemPattern = re.compile(self.logitemPattern)
+self.idPattern = ^\s*id(?Pi.+)/id\s*\n$
+self.compiledIdPattern = re.compile(self.idPattern)
+self.timestampPattern = ^\s*timestamp(?Pt.+)/timestamp\s*\n$
+self.compiledTimestampPattern = re.compile(self.timestampPattern)
+self.contributorPattern = ^\s*contributor\n$
+self.compiledContributorPattern = re.compile(self.contributorPattern)
+self.usernamePattern = ^\s*username(?Pu.+)/username\s*\n$
+self.compiledUsernamePattern = re.compile(self.usernamePattern)
+self.endContributorPattern = ^\s*/contributor\n$

[MediaWiki-commits] [Gerrit] Shorten extension description and remove punctuation - change (mediawiki...AccountAudit)

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

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


Change subject: Shorten extension description and remove punctuation
..

Shorten extension description and remove punctuation

Change-Id: Iec075cfa17888e72e9977c55fd21441eb7699fa8
---
M AccountAudit.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AccountAudit 
refs/changes/66/61766/1

diff --git a/AccountAudit.i18n.php b/AccountAudit.i18n.php
index c2b93b9..5f44df5 100644
--- a/AccountAudit.i18n.php
+++ b/AccountAudit.i18n.php
@@ -3,7 +3,7 @@
 $messages = array();
 
 $messages['en'] = array(
-   'accountaudit-desc' = 'This extension is used to audit active/inactive 
user accounts.',
+   'accountaudit-desc' = 'Audits active/inactive user accounts',
 );
 
 /** Message documentation (Message documentation)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec075cfa17888e72e9977c55fd21441eb7699fa8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AccountAudit
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] Change description to documentation - change (mediawiki...Translate)

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

Change subject: Change description to documentation
..


Change description to documentation

The former confused some users and made them add something resembling an
edit summary. Was reported by Nemo in
https://translatewiki.net/wiki/Thread:Translation_UX_feedback/%22Add_description%22_confuses_users

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

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



diff --git a/Translate.i18n.php b/Translate.i18n.php
index b2d0f2b..78b2d53 100644
--- a/Translate.i18n.php
+++ b/Translate.i18n.php
@@ -459,8 +459,8 @@
'tux-editor-cancel-button-label' = 'Cancel',
'tux-editor-confirm-button-label' = 'Confirm translation',
'tux-editor-shortcut-info' = 'Press $1 to save or $2 to skip to 
next message',
-   'tux-editor-edit-desc' = 'Edit description',
-   'tux-editor-add-desc' = 'Add description',
+   'tux-editor-edit-desc' = 'Edit documentation',
+   'tux-editor-add-desc' = 'Add documentation',
'tux-editor-suggestions-title' = 'Suggestions',
'tux-editor-in-other-languages' = 'In other languages',
'tux-editor-need-more-help' = 'Need more help?',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I27d319741d5336adfc5366f2e1fdee4fef4754c6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] debian packaging for php utfnormal extension - change (operations...utfnormal)

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

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


Change subject: debian packaging for php utfnormal extension
..

debian packaging for php utfnormal extension

this is just the debian directory. source upstream link (it's our code):
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki%2Fextensions%2Fnormal.git;a=summary

Change-Id: Iebd5edf287f777302f59c251ba471691f3388de2
---
A debian/README.Debian
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/dirs
A debian/docs
A debian/install
A debian/patches/inifile.patch
A debian/patches/install.patch
A debian/patches/series
A debian/rules
A debian/source/format
A debian/utfnormal.ini
14 files changed, 129 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/utfnormal 
refs/changes/68/61768/1

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 000..8e5782a
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,19 @@
+utfnormal for Debian
+-
+
+This extension has been repackaged for precise and uses the quilt format;
+the debian directory and build instructions in the Makefile that used to
+be a part of this extension are obsolote and have been removed.  If you
+are reading this file, you will have a local copy of the debian package
+or have retrieved the debian files from
+
+https://gerrit.wikimedia.org/r/gitweb?p=operations/debs/utfnormal.git;a=summary
+
+where they are now maintained.
+
+If you need to get the upstream source tarball separately from this package,
+click on the appropriate tag here:
+https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/normal.git;a=summary
+and then select the 'snapshot' option to get your tarball.
+
+ -- Ariel T. Glenn ar...@wikimedia.org  Thu, 29 Nov 2012 13:49:56 +0200
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..1a7a0f1
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,21 @@
+utfnormal (0.0.2-0~wmf1+precise) precise-wikimedia; urgency=low
+
+  * Build for precise
+  * Change package name
+  * Clean up version numbering
+  * Fix up cflags
+
+ -- Ariel T. Glenn ar...@wikimedia.org  Thu, 29 Nov 2012 13:49:56 +0200
+
+utfnormal (0.0.1-0~wmf1+lucid) lucid-wikimedia; urgency=low
+
+  * Switch deb build format to quilt
+
+ -- Ariel T. Glenn ar...@wikimedia.org  Wed, 08 Jun 2011 11:14:38 +0300
+
+utfnormal (0.0.1-0~wmf1) unstable; urgency=low
+
+  * Initial release
+
+ -- brion br...@pobox.com  Sat, 30 Dec 2006 01:07:45 +
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..3e78c5d
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,15 @@
+Source: utfnormal
+Section: web
+Priority: extra
+Maintainer: Ariel T. Glenn ar...@wikimedia.org
+Build-Depends: debhelper (= 8.0.0), libicu-dev, php5-cli, php5-dev, swig, g++
+Standards-Version: 3.9.2
+Vcs-Git: git://gerrit.wikimedia.org/r/p/mediawiki/extensions/normal.git
+Vcs-Browser: 
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/normal.git;a=summary
+Homepage: http://www.mediawiki.org/wiki/MediaWiki
+
+Package: utfnormal
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, php5-cli, php5-common, libicu42
+Description:  PHP extension to use ICU library to do stuff
+ PHP extension to use ICU library for UTF-8 normalization.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..ee5b125
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,29 @@
+Format: http://dep.debian.net/deps/dep5
+Name: utfnormal
+Upstream-Name: utfnormal
+Maintainer: Brion Vibber br...@pobox.com
+Source: 
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/normal.git;a=summary
+
+Copyright: 2004-2012 Brion Vibber br...@pobox.com
+License: GPL-2+
+
+Files: debian/*
+Copyright: 2006-2012 Brion Vibber br...@pobox.com, Ariel T. Glenn 
ar...@wikimedia.org
+License: GPL-2+
+
+License: GPL-2+
+ This package 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 package 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, see http://www.gnu.org/licenses/
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in /usr/share/common-licenses/GPL-2.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 000..8ca3a0f
--- 

[MediaWiki-commits] [Gerrit] SMW\Subobject clean-up constructor, eliminate ContextSource ... - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: SMW\Subobject clean-up constructor, eliminate ContextSource 
dependency
..

SMW\Subobject clean-up constructor, eliminate ContextSource dependency

+ Remove ContextSource as it is not needed anymore
+ Clean-up constructor
+ Add $smwgAutoSubobjectToSubjectReference
+ Use dependency injection rather than doing value
factoring within the class itself

Change-Id: Id2c79202bd2b5bdd74b064c82fdf7e8dbaabb964
---
M SemanticMediaWiki.settings.php
M includes/Settings.php
M includes/Subobject.php
M includes/parserhooks/RecurringEventsParserFunction.php
M includes/parserhooks/SubobjectParserFunction.php
M tests/phpunit/includes/SubobjectTest.php
M tests/phpunit/includes/parserhooks/RecurringEventsParserFunctionTest.php
M tests/phpunit/includes/parserhooks/SubobjectParserFunctionTest.php
8 files changed, 300 insertions(+), 130 deletions(-)


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

diff --git a/SemanticMediaWiki.settings.php b/SemanticMediaWiki.settings.php
index 36fc19c..c42b6ee 100644
--- a/SemanticMediaWiki.settings.php
+++ b/SemanticMediaWiki.settings.php
@@ -557,3 +557,17 @@
 ##
 $smwgAutoRefreshOnPageMove = true;
 ##
+#
+###
+# Enables to automatically assign a reference subject to the subobject where
+# the declarative (first) argument (if available) being used as reference
+# property, pointing from the subobject, to the subject(page). If the setting
+# is enabled all first named identifier are being used as user defined property
+# and an internal Id is assigned in replacement of the named identifier.
+#
+# default = false (to accommodate the existing behaviour)
+#
+# @since 1.9
+##
+$smwgAutoSubobjectToSubjectReference = true;
+##
\ No newline at end of file
diff --git a/includes/Settings.php b/includes/Settings.php
index c000102..1bb2ce4 100644
--- a/includes/Settings.php
+++ b/includes/Settings.php
@@ -150,6 +150,7 @@
'smwgNamespace' = $GLOBALS['smwgNamespace'],
'smwgMasterStore' = $GLOBALS['smwgMasterStore'],
'smwgIQRunningNumber' = 
$GLOBALS['smwgIQRunningNumber'],
+   'smwgAutoSubobjectToSubjectReference' = 
$GLOBALS['smwgAutoSubobjectToSubjectReference']
);
 
return self::newFromArray( $settings );
diff --git a/includes/Subobject.php b/includes/Subobject.php
index 8d8e655..2698de6 100644
--- a/includes/Subobject.php
+++ b/includes/Subobject.php
@@ -3,8 +3,13 @@
 namespace SMW;
 
 use Title;
-use MWException, ContextSource, IContextSource, RequestContext;
-use SMWPropertyValue, SMWDataValueFactory, SMWDIProperty, SMWDIWikiPage, 
SMWContainerSemanticData, SMWDIContainer;
+use MWException;
+
+use SMWDIWikiPage;
+use SMWContainerSemanticData;
+use SMWDIContainer;
+use SMWDataValue;
+use SMWDIProperty;
 
 /**
  * Class to interact with a 'subobject'
@@ -36,7 +41,7 @@
  * Class to interact with a 'subobject'
  * @ingroup SMW
  */
-class Subobject extends ContextSource {
+class Subobject {
 
/**
 * @var Title
@@ -46,7 +51,7 @@
/**
 * @var string
 */
-protected $subobjectName;
+protected $identifier;
 
/**
 * @var SMWContainerSemanticData
@@ -54,46 +59,53 @@
 protected $semanticData;
 
/**
-* @var string[]
+* @var array()
 */
protected $errors = array();
 
/**
-* Constructor
-*
 * @since 1.9
 *
-* @param Title $subject
-* @param string|null $subobjectName
-* @param \IContextSource|null $context
-*
+* @param Title $title
 */
-   public function __construct( Title $title, $subobjectName = null, 
IContextSource $context = null ) {
-   if ( !$context ) {
-   $context = RequestContext::getMain();
-   }
-   $this-setContext( $context );
+   public function __construct( Title $title ) {
$this-title = $title;
-   $this-setSemanticData( $subobjectName );
}
 
/**
-* Returns the subobject name
+* A factory method that's create a subobject instance from an 
identifier
+*
+* @since 1.9
+*
+* @param Title $title
+* @param string|false $identifier
+*
+* @return Subobject
+*/
+   public static function newFromId( Title $title, $identifier = false ) {
+   $instance = new self( $title );
+   $instance-setSemanticData( $identifier );
+   return $instance;
+   }
+
+   /**
+* Returns the subobject Id
 *
 * @since 1.9
 *
 * @return string
 */
-   public function getName() {
-  

[MediaWiki-commits] [Gerrit] rebuildLocalisationCache: Implement --lang option - change (mediawiki/core)

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

Change subject: rebuildLocalisationCache: Implement --lang option
..


rebuildLocalisationCache: Implement --lang option

It would rebuild all language caches by default.
We were lacking an option to rebuild only one language, for example when
it get corrupted or the cache file for a language got removed.

The new --lang accepts a list of comma separated langs to rebuild the
cache for.  Example usage:

 php rebuildLocalisationCache.php --lang en,fr,de

Nonexistent languages are simply ignored. The script dies if it ends up
with no languages to rebuild.

Change-Id: I4c5e69abb76ffd8b88b595e3687edab3bb267ccc
---
M RELEASE-NOTES-1.22
M maintenance/rebuildLocalisationCache.php
2 files changed, 17 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index aad11a0..eea9756 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -56,6 +56,8 @@
   language links associated with a page before display.
 * Chosen (http://harvesthq.github.io/chosen/) was added as module 
'jquery.chosen'
 * HTMLForm will turn multiselect checkboxes into a Chosen interface when 
setting cssclass 'mw-chosen'
+* rebuildLocalisationCache learned --lang option. Let you rebuild l10n caches
+  of the specified languages instead of all of them.
 
 === Bug fixes in 1.22 ===
 * Disable Special:PasswordReset when $wgEnableEmail. Previously one could still
diff --git a/maintenance/rebuildLocalisationCache.php 
b/maintenance/rebuildLocalisationCache.php
index db77564..81e8904 100644
--- a/maintenance/rebuildLocalisationCache.php
+++ b/maintenance/rebuildLocalisationCache.php
@@ -44,6 +44,8 @@
$this-addOption( 'threads', 'Fork more than one thread', 
false, true );
$this-addOption( 'outdir', 'Override the output directory 
(normally $wgCacheDirectory)',
false, true );
+   $this-addOption( 'lang', 'Only rebuild these languages, comma 
separated.',
+   false, true );
}
 
public function memoryLimit() {
@@ -90,7 +92,19 @@
}
$lc = new LocalisationCache_BulkLoad( $conf );
 
-   $codes = array_keys( Language::fetchLanguageNames( null, 
'mwfile' ) );
+   $allCodes = array_keys( Language::fetchLanguageNames( null, 
'mwfile' ) );
+   if( $this-hasOption( 'lang' ) ) {
+   # Validate requested languages
+   $codes = array_intersect( $allCodes,
+   explode( ',', $this-getOption( 'lang' ) ) );
+   # Bailed out if nothing is left
+   if( count( $codes ) == 0 ) {
+   $this-error( 'None of the languages specified 
exists.', 1 );
+   }
+   } else {
+   # By default get all languages
+   $codes = $allCodes;
+   }
sort( $codes );
 
// Initialise and split into chunks

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c5e69abb76ffd8b88b595e3687edab3bb267ccc
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add a MediaWiki preference for enabling ULS IME - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Add a MediaWiki preference for enabling ULS IME
..

Add a MediaWiki preference for enabling ULS IME

Bug: 47240
Change-Id: I957d9f409b0c29f956bcf8a49187cdf27c4f42f8
---
M UniversalLanguageSelector.hooks.php
M UniversalLanguageSelector.i18n.php
M resources/js/ext.uls.preferences.js
3 files changed, 52 insertions(+), 6 deletions(-)


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

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 1aa0adc..3bd31be 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -295,10 +295,21 @@
}
 
public static function onGetPreferences( $user, $preferences ) {
+   // The detailed preferences for different layouts.
+   // Saved as JSON and modifiable through the ULS screens.
$preferences['uls-preferences'] = array(
'type' = 'api',
);
 
+   // A checkbox in the general MediaWiki preferences screen
+   // to enable or disable IME in ULS
+   $preferences['uls-ime-enable'] = array(
+   'type' = 'toggle',
+   'label-message' = 'uls-ime-enable-preferences-label',
+   'section' = 'editing/advancedediting', // under 
'Advanced options' section of 'Editing' tab
+   'default' = $user-getOption( 'uls-ime-enable' )
+   );
+
return true;
}
 
diff --git a/UniversalLanguageSelector.i18n.php 
b/UniversalLanguageSelector.i18n.php
index 811a1ab..2149e1e 100644
--- a/UniversalLanguageSelector.i18n.php
+++ b/UniversalLanguageSelector.i18n.php
@@ -27,6 +27,8 @@
 $messages['en'] = array(
'UniversalLanguageSelector' = 'Universal Language Selector',
'uls-desc' = 'Gives the user several ways to select a language and to 
adjust language settings',
+
+   'uls-ime-enable-preferences-label' = 'Enable input method tools in the 
Universal Language Selector',
 );
 
 /** Message documentation (Message documentation)
@@ -35,6 +37,8 @@
 $messages['qqq'] = array(
'UniversalLanguageSelector' = 'Extension name',
'uls-desc' = 'Extension description',
+   'uls-ime-enable-preferences-label' = 'A label for a user preference.',
+
'uls-select-content-language' = 'Main heading in the language selector 
popup.
 {{Identical|Select language}}',
 );
diff --git a/resources/js/ext.uls.preferences.js 
b/resources/js/ext.uls.preferences.js
index 3340438..252647d 100644
--- a/resources/js/ext.uls.preferences.js
+++ b/resources/js/ext.uls.preferences.js
@@ -104,6 +104,7 @@
 
ULSPreferences = function () {
this.preferenceName = 'uls-preferences';
+   this.imeEnablePreferenceName = 'uls-ime-enable',
this.username = mw.user.getName();
this.isAnon = mw.user.isAnon();
this.preferences = null;
@@ -115,12 +116,19 @@
 * Initialize
 */
init: function () {
+   var options;
+
if ( this.isAnon ) {
this.preferences = $.jStorage.get( 
this.preferenceName );
} else {
-   var options = mw.user.options.get( 
this.preferenceName );
+   options = mw.user.options.get( 
this.preferenceName );
this.preferences = $.parseJSON( options );
+
+   if ( mw.user.options.get( 'uls-ime-enable' ) 
!== '1' ) {
+   this.preferences.ime.enable = false;
+   }
}
+
this.preferences = this.preferences || {};
},
 
@@ -151,22 +159,45 @@
save: function ( callback ) {
var ulsPreferences = this;
 
+
callback = callback || $.noop;
if ( this.isAnon ) {
// Anonymous user. Save preferences in local 
storage
$.jStorage.set( this.preferenceName, 
this.preferences );
callback.call( this, true );
} else {
+   var successFunction, failFunction;
+
+   successFunction = function () {
+   callback.call( this, true );
+   };
+   failFunction = function () {
+   callback.call( this, false );
+   };
+
  

[MediaWiki-commits] [Gerrit] Adding bidi-isolation to reference numbers - change (mediawiki...Cite)

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

Change subject: Adding bidi-isolation to reference numbers
..


Adding bidi-isolation to reference numbers

This is a quick-fix to support proper rendering of sup[1]/sup elements
when the sentence contains a right-to-left word.
Amended: Changed from working through jQuery 'wrap' to CSS unicode-bidi.
Amended: Dos2Unix conversion to get rid of pesky hidden characters, also
corrected all of Amire80's comments.
Bug: 36032

Change-Id: If85efe5ff1e0a3c57ee2523656702db89df07145
---
M Cite.php
A modules/ext.rtlcite/ext.rtlcite.css
2 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/Cite.php b/Cite.php
index e4d7e92..b547b5b 100644
--- a/Cite.php
+++ b/Cite.php
@@ -85,6 +85,12 @@
'position' = 'bottom',
 );
 
+/* Add RTL fix for the cite sup elements */
+$wgResourceModules['ext.rtlcite'] = $citeResourceTemplate + array(
+   'styles' = 'ext.rtlcite/ext.rtlcite.css',
+   'position' = 'bottom',
+);
+
 /**
  * @param $out OutputPage
  * @param $sk Skin
@@ -97,6 +103,8 @@
$out-addModules( 'ext.cite' );
}
 
+   /* RTL support quick-fix module */
+   $out-addModules( 'ext.rtlcite' );
return true;
 }
 
diff --git a/modules/ext.rtlcite/ext.rtlcite.css 
b/modules/ext.rtlcite/ext.rtlcite.css
new file mode 100644
index 000..9b88d53
--- /dev/null
+++ b/modules/ext.rtlcite/ext.rtlcite.css
@@ -0,0 +1,6 @@
+/* Isolation to fix references in case of RTL words at the end of a reference 
*/
+sup.reference {
+   unicode-bidi: -moz-isolate;
+   unicode-bidi: -webkit-isolate;
+   unicode-bidi: isolate;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If85efe5ff1e0a3c57ee2523656702db89df07145
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo mor...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Kghbln mediaw...@kghoffmeyer.de
Gerrit-Reviewer: Platonides platoni...@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] debian packaging for php utfnormal extension - change (operations...utfnormal)

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

Change subject: debian packaging for php utfnormal extension
..


debian packaging for php utfnormal extension

this is just the debian directory. source upstream link (it's our code):
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki%2Fextensions%2Fnormal.git;a=summary

Change-Id: Iebd5edf287f777302f59c251ba471691f3388de2
---
A debian/README.Debian
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/dirs
A debian/docs
A debian/install
A debian/patches/inifile.patch
A debian/patches/install.patch
A debian/patches/series
A debian/rules
A debian/source/format
A debian/utfnormal.ini
14 files changed, 129 insertions(+), 0 deletions(-)

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



diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 000..8e5782a
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,19 @@
+utfnormal for Debian
+-
+
+This extension has been repackaged for precise and uses the quilt format;
+the debian directory and build instructions in the Makefile that used to
+be a part of this extension are obsolote and have been removed.  If you
+are reading this file, you will have a local copy of the debian package
+or have retrieved the debian files from
+
+https://gerrit.wikimedia.org/r/gitweb?p=operations/debs/utfnormal.git;a=summary
+
+where they are now maintained.
+
+If you need to get the upstream source tarball separately from this package,
+click on the appropriate tag here:
+https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/normal.git;a=summary
+and then select the 'snapshot' option to get your tarball.
+
+ -- Ariel T. Glenn ar...@wikimedia.org  Thu, 29 Nov 2012 13:49:56 +0200
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..1a7a0f1
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,21 @@
+utfnormal (0.0.2-0~wmf1+precise) precise-wikimedia; urgency=low
+
+  * Build for precise
+  * Change package name
+  * Clean up version numbering
+  * Fix up cflags
+
+ -- Ariel T. Glenn ar...@wikimedia.org  Thu, 29 Nov 2012 13:49:56 +0200
+
+utfnormal (0.0.1-0~wmf1+lucid) lucid-wikimedia; urgency=low
+
+  * Switch deb build format to quilt
+
+ -- Ariel T. Glenn ar...@wikimedia.org  Wed, 08 Jun 2011 11:14:38 +0300
+
+utfnormal (0.0.1-0~wmf1) unstable; urgency=low
+
+  * Initial release
+
+ -- brion br...@pobox.com  Sat, 30 Dec 2006 01:07:45 +
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..3e78c5d
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,15 @@
+Source: utfnormal
+Section: web
+Priority: extra
+Maintainer: Ariel T. Glenn ar...@wikimedia.org
+Build-Depends: debhelper (= 8.0.0), libicu-dev, php5-cli, php5-dev, swig, g++
+Standards-Version: 3.9.2
+Vcs-Git: git://gerrit.wikimedia.org/r/p/mediawiki/extensions/normal.git
+Vcs-Browser: 
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/normal.git;a=summary
+Homepage: http://www.mediawiki.org/wiki/MediaWiki
+
+Package: utfnormal
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, php5-cli, php5-common, libicu42
+Description:  PHP extension to use ICU library to do stuff
+ PHP extension to use ICU library for UTF-8 normalization.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..ee5b125
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,29 @@
+Format: http://dep.debian.net/deps/dep5
+Name: utfnormal
+Upstream-Name: utfnormal
+Maintainer: Brion Vibber br...@pobox.com
+Source: 
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/normal.git;a=summary
+
+Copyright: 2004-2012 Brion Vibber br...@pobox.com
+License: GPL-2+
+
+Files: debian/*
+Copyright: 2006-2012 Brion Vibber br...@pobox.com, Ariel T. Glenn 
ar...@wikimedia.org
+License: GPL-2+
+
+License: GPL-2+
+ This package 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 package 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, see http://www.gnu.org/licenses/
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in /usr/share/common-licenses/GPL-2.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 000..8ca3a0f
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1 @@
+etc/php5/conf.d
diff 

[MediaWiki-commits] [Gerrit] Fixed newFromPage() to work again for both page names and Ti... - change (mediawiki...AdminLinks)

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

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


Change subject: Fixed newFromPage() to work again for both page names and Title 
objects
..

Fixed newFromPage() to work again for both page names and Title objects

Change-Id: Ibd0798f8f91ccf07d62376927481d0f8cbf917ca
---
M AdminLinks_body.php
1 file changed, 7 insertions(+), 5 deletions(-)


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

diff --git a/AdminLinks_body.php b/AdminLinks_body.php
index dfa976f..f24c9df 100644
--- a/AdminLinks_body.php
+++ b/AdminLinks_body.php
@@ -254,13 +254,15 @@
var $text;
var $label;
 
-   static function newFromPage( $page_name, $desc = null, $query = array() 
) {
+   static function newFromPage( $page_name_or_title, $desc = null, $query 
= array() ) {
$item = new ALItem();
$item-label = $desc;
-   if ( count( $query ) ) {
-   $item-text = Linker::linkKnown( $page_name, $desc, 
array(), $query );
-   } else
-   $item-text = [[$page_name|$desc]];
+   if ( $page_name_or_title instanceof Title ) {
+   $title = $page_name_or_title;
+   } else {
+   $title = Title::newFromText( $page_name_or_title );
+   }
+   $item-text = Linker::linkKnown( $title, $desc, array(), $query 
);
return $item;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] new readme file - change (mediawiki...MathSearch)

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

Change subject: new readme file
..


new readme file

Change-Id: Iba8a7299197b2b258850a7de21ebab75e6fe0230
---
A README
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/README b/README
new file mode 100644
index 000..7005d47
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+The documentation is coming soon.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba8a7299197b2b258850a7de21ebab75e6fe0230
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] add .gitignore, .gitreview files - change (operations...utfnormal)

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

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


Change subject: add .gitignore, .gitreview files
..

add .gitignore, .gitreview files

Change-Id: Ie7077b7fd8d2b7abd1bc175cab96cc437509311b
---
A .gitignore
A .gitreview
2 files changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/utfnormal 
refs/changes/72/61772/1

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..6a8b679
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+# Repository management
+.svn
+
+# Editors
+*~
+
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..3217c6b
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=operations/debs/utfnormal.git
+defaultbranch=master

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7077b7fd8d2b7abd1bc175cab96cc437509311b
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/utfnormal
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fixed newFromPage() to work again for both page names and Ti... - change (mediawiki...AdminLinks)

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

Change subject: Fixed newFromPage() to work again for both page names and Title 
objects
..


Fixed newFromPage() to work again for both page names and Title objects

Change-Id: Ibd0798f8f91ccf07d62376927481d0f8cbf917ca
---
M AdminLinks_body.php
1 file changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/AdminLinks_body.php b/AdminLinks_body.php
index dfa976f..f24c9df 100644
--- a/AdminLinks_body.php
+++ b/AdminLinks_body.php
@@ -254,13 +254,15 @@
var $text;
var $label;
 
-   static function newFromPage( $page_name, $desc = null, $query = array() 
) {
+   static function newFromPage( $page_name_or_title, $desc = null, $query 
= array() ) {
$item = new ALItem();
$item-label = $desc;
-   if ( count( $query ) ) {
-   $item-text = Linker::linkKnown( $page_name, $desc, 
array(), $query );
-   } else
-   $item-text = [[$page_name|$desc]];
+   if ( $page_name_or_title instanceof Title ) {
+   $title = $page_name_or_title;
+   } else {
+   $title = Title::newFromText( $page_name_or_title );
+   }
+   $item-text = Linker::linkKnown( $title, $desc, array(), $query 
);
return $item;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] add .gitignore, .gitreview files - change (operations...utfnormal)

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

Change subject: add .gitignore, .gitreview files
..


add .gitignore, .gitreview files

Change-Id: Ie7077b7fd8d2b7abd1bc175cab96cc437509311b
---
A .gitignore
A .gitreview
2 files changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..6a8b679
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+# Repository management
+.svn
+
+# Editors
+*~
+
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..3217c6b
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=operations/debs/utfnormal.git
+defaultbranch=master

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7077b7fd8d2b7abd1bc175cab96cc437509311b
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/utfnormal
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add cachedpage.sh, apply fix for bad deployment - change (mediawiki...MobileFrontend)

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

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


Change subject: Add cachedpage.sh, apply fix for bad deployment
..

Add cachedpage.sh, apply fix for bad deployment

Running:
./scripts/cachedpage.sh 5413e645da2067687627b9a9c6a1aee914328a63
Produces cached.html and cached_special.html

Loading them without this commit shows breakage in the header as
shown in http://imgur.com/vY20Xqf

Applying this fix, fixes the cached versions of the page. Added FIXME
with suggested removal time (assuming deployment next Tuesday)

Change-Id: Ifb84b8cd2b46f9e92053de12c6ee4749c9814be2
---
M less/common/ui.less
A scripts/cachedpage.sh
M stylesheets/common/ui.css
3 files changed, 37 insertions(+), 0 deletions(-)


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

diff --git a/less/common/ui.less b/less/common/ui.less
index 1f66788..a64020d 100644
--- a/less/common/ui.less
+++ b/less/common/ui.less
@@ -8,6 +8,7 @@
height: @headerHeight;
 }
 
+#mw-mf-header, // FIXME: remove 11th May 2013
 .header {
z-index: 2;
color: black;
diff --git a/scripts/cachedpage.sh b/scripts/cachedpage.sh
new file mode 100755
index 000..e00e9d7
--- /dev/null
+++ b/scripts/cachedpage.sh
@@ -0,0 +1,33 @@
+#usage ./scripts/cachedpage.sh 1bd5bc53ebb04fff7f508712a29fdf1f1d7fe14f
+#must be run an a branch with no stashed changes
+# Update the index
+if [ git diff --exit-code ] # check for unstaged changes
+then #stash them so they are not lost
+   stashed_changes=1
+   git stash
+fi
+
+cur_branch=`git rev-parse --abbrev-ref HEAD` #get the current branch name
+if [ $cur_branch == 'HEAD' ]
+then #we should ensure we don't lose this
+   cur_branch=tmp_`date +%Y%m%d%H%M%S`
+   git branch -D tmp_$cur_branch #delete the temporary branch if it 
already exists
+   git checkout -b tmp_$cur_branch #checkout the current HEAD as this new 
branch 
+fi
+
+git checkout $1 #go to commit caller requested
+
+#Generate the 'cached' pages
+wget $MEDIAWIKI_URL/index.php/Main_Page -O cached.html
+wget $MEDIAWIKI_URL/index.php/Special:MobileOptions -O cached_special.html
+
+#Return to previous branch
+git checkout $cur_branch
+open $MEDIAWIKI_URL/extensions/MobileFrontend/cached.html
+open $MEDIAWIKI_URL/extensions/MobileFrontend/cached_special.html
+
+if [ stashed_changes == 1 ]
+then
+   unset cur_branch
+   git stash pop
+fi
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 668a9f3..b7cc0c2 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -223,6 +223,7 @@
 #mw-mf-sq {
   height: 46px;
 }
+#mw-mf-header,
 .header {
   z-index: 2;
   color: black;
@@ -241,7 +242,9 @@
   position: relative;
   padding: 0 40px 0 40px;
 }
+#mw-mf-header h1,
 .header h1,
+#mw-mf-header h2,
 .header h2 {
   font-size: 1.6em;
   color: #00;

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

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

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


[MediaWiki-commits] [Gerrit] (Bug 47927) $concept-getCacheStatus() - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: (Bug 47927) $concept-getCacheStatus()
..

(Bug 47927) $concept-getCacheStatus()

Instead of === 'full' do !== 'full'

Change-Id: I5a431e6cfa8d476ed0aab1550899473c5e51044a
---
M maintenance/SMW_conceptCache.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/maintenance/SMW_conceptCache.php b/maintenance/SMW_conceptCache.php
index 75e8f50..26240cd 100644
--- a/maintenance/SMW_conceptCache.php
+++ b/maintenance/SMW_conceptCache.php
@@ -147,7 +147,7 @@
 
if ( $concept === null ) {
$skip = 'page not cachable (no concept description, maybe a 
redirect)';
-   } elseif ( ( $select_update )  ( $concept-getCacheStatus() === 
'full' ) ) {
+   } elseif ( ( $select_update )  ( $concept-getCacheStatus() !== 
'full' ) ) {
$skip = 'page not cached yet';
} elseif ( ( $select_old )  ( $concept-getCacheStatus() === 'full' ) 
 ( $concept-getCacheDate()  ( strtotime( 'now' ) - $select_old * 60 ) ) ) {
$skip = 'cache is not old yet';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a431e6cfa8d476ed0aab1550899473c5e51044a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames jamesin.hongkon...@gmail.com

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


[MediaWiki-commits] [Gerrit] (Bug 47927) $concept-getCacheStatus() - change (mediawiki...SemanticMediaWiki)

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

Change subject: (Bug 47927) $concept-getCacheStatus()
..


(Bug 47927) $concept-getCacheStatus()

Instead of === 'full' do !== 'full'

Change-Id: I5a431e6cfa8d476ed0aab1550899473c5e51044a
---
M maintenance/SMW_conceptCache.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/maintenance/SMW_conceptCache.php b/maintenance/SMW_conceptCache.php
index 75e8f50..26240cd 100644
--- a/maintenance/SMW_conceptCache.php
+++ b/maintenance/SMW_conceptCache.php
@@ -147,7 +147,7 @@
 
if ( $concept === null ) {
$skip = 'page not cachable (no concept description, maybe a 
redirect)';
-   } elseif ( ( $select_update )  ( $concept-getCacheStatus() === 
'full' ) ) {
+   } elseif ( ( $select_update )  ( $concept-getCacheStatus() !== 
'full' ) ) {
$skip = 'page not cached yet';
} elseif ( ( $select_old )  ( $concept-getCacheStatus() === 'full' ) 
 ( $concept-getCacheDate()  ( strtotime( 'now' ) - $select_old * 60 ) ) ) {
$skip = 'cache is not old yet';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a431e6cfa8d476ed0aab1550899473c5e51044a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames jamesin.hongkon...@gmail.com
Gerrit-Reviewer: Mwjames jamesin.hongkon...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 47418) Babel configuration for th.wikipedia - change (operations/mediawiki-config)

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

Change subject: (bug 47418) Babel configuration for th.wikipedia
..


(bug 47418) Babel configuration for th.wikipedia

* Main category: User lang
* By levels categories: User lang-[0-5],N

Change-Id: I921d0c9d1ed7b29b683ccf77b6c7236d72897b94
Bug: 47418
---
M wmf-config/InitialiseSettings.php
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a9b85ec..cd32676 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11606,6 +11606,15 @@
'5' = false,
'N' = 'Wiktionary:Användare %code%-N',
),
+   'thwiki' = array( // Bug 47418
+   '0' = 'User %code%-0',
+   '1' = 'User %code%-1',
+   '2' = 'User %code%-2',
+   '3' = 'User %code%-3',
+   '4' = 'User %code%-4',
+   '5' = 'User %code%-5',
+   'N' = 'User %code%-N',
+   ),
'tlwiki' = array(
'0' = false,
'1' = 'User %code%-1',
@@ -11751,6 +11760,7 @@
'specieswiki' = 'User %code%',
'svwiki' = 'Användare %code%',
'svwiktionary' = 'Wiktionary:Användare %code%', // Bug 42288
+   'thwiki' = 'User %code%', // Bug 47418
'tlwiki' = 'User %code%',
'ukwiki' = 'User %code%',
'wikidatawiki' = 'User %code%',

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

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

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


[MediaWiki-commits] [Gerrit] $wgNamespaceRobotPolicies for dewiki: Add 101 and 829 - change (operations/mediawiki-config)

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

Change subject: $wgNamespaceRobotPolicies for dewiki: Add 101 and 829
..


$wgNamespaceRobotPolicies for dewiki: Add 101 and 829

dewiki has all talk pages with noindex,follow as default,
but the new 829 (module talk) is missing now and
the older 101 (portal talk) was missing.

See
https://de.wikipedia.org/wiki/Wikipedia:Meinungsbilder/Nichtindexierung_von_Diskussionsseiten_durch_Suchmaschinen

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cd32676..46b1807 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8910,6 +8910,8 @@
NS_TEMPLATE_TALK = 'noindex,follow',
NS_HELP_TALK = 'noindex,follow',
NS_CATEGORY_TALK = 'noindex,follow',
+   101 = 'noindex,follow', // portal talk
+   829 = 'noindex,follow', // module talk
),
'dawiki' = array(
NS_USER = 'noindex,follow',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibacd05773c6c94f4003ad31685bf2ec021dcd693
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 45979) Set $wgCategoryCollation to 'uca-vi' on all Viet... - change (operations/mediawiki-config)

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

Change subject: (bug 45979) Set $wgCategoryCollation to 'uca-vi' on all 
Vietnamese-language wikis
..


(bug 45979) Set $wgCategoryCollation to 'uca-vi' on all Vietnamese-language 
wikis

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 46b1807..f03ea2d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10470,6 +10470,11 @@
'ukwikisource' = 'uca-uk', // bug 45776
'ukwikivoyage' = 'uca-uk', // bug 46417
'ukwiktionary' = 'uca-uk', // bug 45776
+   'viwiki' = 'uca-vi', // bug 45979
+   'viwikibooks' = 'uca-vi', // bug 45979
+   'viwikiquote' = 'uca-vi', // bug 45979
+   'viwikisource' = 'uca-vi', // bug 45979
+   'viwiktionary' = 'uca-vi', // bug 45979
 ),
 
 'wmgVectorSectionEditLinks' = array(

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

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

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


[MediaWiki-commits] [Gerrit] Bug 31876: Add an html validation test to Makefile - change (mediawiki...MobileFrontend)

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

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


Change subject: Bug 31876: Add an html validation test to Makefile
..

Bug 31876: Add an html validation test to Makefile

This shows we have 3 errors in main namespace and 2 in special
namespace. Both appear to be core issues which would be great to fix.

Bug: 31876

Change-Id: I1414e2fbc71b090e07d4a1073ee3b6f3159f3759
---
M .gitignore
M Makefile
A scripts/w3c-validate.sh
3 files changed, 22 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index a564408..fca4c38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,5 @@
 .idea/
 node_modules/
 .lessignore
+tmp/
+
diff --git a/Makefile b/Makefile
index 156ead4..e9c50ef 100644
--- a/Makefile
+++ b/Makefile
@@ -26,3 +26,6 @@
ln -sf ${PWD}/scripts/pre-commit .git/hooks/pre-commit
ln -sf ${PWD}/scripts/pre-rebase .git/hooks/pre-rebase
ln -sf ${PWD}/scripts/post-rewrite .git/hooks/post-rewrite
+
+validatehtml: # user must create W3CValidationTest wiki page with text 'Hello 
world' for this to work
+   @scripts/w3c-validate.sh
diff --git a/scripts/w3c-validate.sh b/scripts/w3c-validate.sh
new file mode 100755
index 000..df19702
--- /dev/null
+++ b/scripts/w3c-validate.sh
@@ -0,0 +1,17 @@
+wget $MEDIAWIKI_URL/index.php/W3CValidationTest?useformat=mobile -O 
tmp/sample.html
+wget $MEDIAWIKI_URL/index.php/Special:MobileOptions?useformat=mobile -O 
tmp/special_sample.html
+curl -sSF 'uploaded_file=@tmp/sample.html;type=text/html' -F output=json 
http://validator.w3.org/check  tmp/validate_page.json
+curl -sSF 'uploaded_file=@tmp/special_sample.html;type=text/html' -F 
output=json http://validator.w3.org/check  tmp/validate_special_page.json
+
+#check the validation results of a page in the main namespace
+if grep -q 'type: error' tmp/validate_page.json
+then
+   num=`grep -c 'type: error' tmp/validate_page.json`
+   echo $num validation errors found in main namespace page [see 
tmp/validate_page.json]
+fi
+#check the validation results of a page in the special namespace
+if grep -q 'type: error' tmp/validate_special_page.json
+then
+   num=`grep -c 'type: error' tmp/validate_special_page.json`
+   echo $num validation errors found in special page html markup [see 
tmp/validate_special_page.json]
+fi

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

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

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


[MediaWiki-commits] [Gerrit] Get rid of state.activeTemplateId from the serializer. - change (mediawiki...Parsoid)

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

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


Change subject: Get rid of state.activeTemplateId from the serializer.
..

Get rid of state.activeTemplateId from the serializer.

* Skip over encapsulated content whenever they are encountered
  since original/edited tranclusion/extension source is emitted
  directly on hitting the first node.

* This cleans up the WTS code some more.

* No change in parser tests (as it should be).

Change-Id: Idadac148438b70019b8c9a9f345f5e1aa3c75083
---
M js/lib/mediawiki.WikitextSerializer.js
1 file changed, 31 insertions(+), 37 deletions(-)


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

diff --git a/js/lib/mediawiki.WikitextSerializer.js 
b/js/lib/mediawiki.WikitextSerializer.js
index 8ff92bf..3876863 100644
--- a/js/lib/mediawiki.WikitextSerializer.js
+++ b/js/lib/mediawiki.WikitextSerializer.js
@@ -2113,6 +2113,20 @@
return buf.join('');
 };
 
+WSP.skipOverEncapsulatedContent = function(node) {
+   var about = node.getAttribute('about');
+   if (!about) {
+   return node;
+   }
+
+   node = node.nextSibling;
+   while (node  DU.isElt(node)  about === node.getAttribute('about')) {
+   node = node.nextSibling;
+   }
+
+   return node;
+}
+
 /**
  * Get a DOM-based handler for an element node
  */
@@ -2130,26 +2144,6 @@
handler,
nodeTypeOf = node.getAttribute( 'typeof' ) || '';
 
-// if (state.activeTemplateId) {
-// if(node.getAttribute('about') === state.activeTemplateId) {
-// // Skip template content
-// return function(){};
-// } else {
-// state.activeTemplateId = null;
-// }
-// } else {
-// if (nodeTypeOf  nodeTypeOf.match(/\bmw:Object(\/[^\s]+|\b)/)) 
{
-// state.activeTemplateId = node.getAttribute('about' || 
null);
-//
-//
-
-   // XXX: Handle siblings directly in a template content handler returning
-   // the next node?
-   if (state.activeTemplateId  node.getAttribute('about') === 
state.activeTemplateId) {
-   // Ignore subsequent template content
-   return {handle: function() {}};
-   }
-
// XXX: Convert into separate handlers?
if ( dp.src !== undefined ) {
//console.log(node.parentNode.outerHTML);
@@ -2157,8 +2151,6 @@
// Source-based template/extension round-tripping for 
now
return {
handle: function () {
-   state.activeTemplateId = 
node.getAttribute('about') || null;
-
// In RT-testing mode, there will not 
be any edits to tpls.
// So, use original source to eliminate 
spurious diffs showing
// up in RT testing results.
@@ -2175,6 +2167,7 @@
}
}
self.emitWikitext(src, state, cb, node);
+   return 
self.skipOverEncapsulatedContent(node);
},
sepnls: {
// XXX: This is questionable, as the 
template can expand
@@ -2853,7 +2846,7 @@
  */
 WSP._serializeNode = function( node, state, cb) {
cb = cb || state.chunkCB;
-   var prev, next;
+   var prev, next, nextNode;
 
// serialize this node
switch( node.nodeType ) {
@@ -2889,12 +2882,10 @@
var handled = false,
about = node.getAttribute('about') || null;
 
-   // We have 2 global checks here for selser-mode
-   // 1. WTS is not in a subtree with a modification flag 
that applies to every
-   //node of a subtree (rather than an indication that 
some node in the
-   //subtree is modified).
-   // 2. WTS not processing template content that has 
already been emitted.
-   if (state.selserMode  !state.inModifiedContent  
(!about || about !== state.activeTemplateId)) {
+   // WTS should not be in a subtree with a modification 
flag that applies
+   // to every node of a subtree (rather than an 
indication that some node
+   // in the subtree is modified).
+   if (state.selserMode  !state.inModifiedContent) {
// To serialize from source, we need 2 things 
of the node:
// -- it should not have a diff 

[MediaWiki-commits] [Gerrit] Update parserTests.txt to include combined link prefix/link ... - change (mediawiki...Parsoid)

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

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


Change subject: Update parserTests.txt to include combined link prefix/link 
trail tests.
..

Update parserTests.txt to include combined link prefix/link trail tests.

The new test was added in https://gerrit.wikimedia.org/r/61617
and we fixed the exposed bugs in https://gerrit.wikimedia.org/r/61691

The new test fails html2html and html2wt, like all the link tests do.
(The HTML in the parserTests is missing the rel=mw:WikiLink on the
a tag which WikitextSerializer expects.)

Change-Id: I6332e5bcb29cde13437e1cdddb06b23e87c745da
---
M js/tests/fetch-parserTests.txt.js
M js/tests/parserTests-blacklist.js
2 files changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/js/tests/fetch-parserTests.txt.js 
b/js/tests/fetch-parserTests.txt.js
index da617dd..348a019 100755
--- a/js/tests/fetch-parserTests.txt.js
+++ b/js/tests/fetch-parserTests.txt.js
@@ -10,9 +10,9 @@
 // and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = 1d55be6db97e021e776547f162374089f8e8d04b;
+var expectedSHA1 = 4d62310d8a2c86af58e8a3d637056bf074092ab5;
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = 7833589c5d576648b4db78bc69963bf8d516242d;
+var latestCommit = bfe2ee4bc237fbe2105f66094ad8ef231dd36b82;
 
 var fs = require('fs'),
path = require('path'),
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index bed5b83..222ac5a 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -711,7 +711,8 @@
 add(html2html, Internal link with en linktrail: no apostrophes (bug 
27473));
 add(html2html, Internal link with ca linktrail with apostrophes (bug 
27473));
 add(html2html, Internal link with kaa linktrail with apostrophes (bug 
27473));
-add(html2html, Internal link with is linkprefix);
+add(html2html, Internal link with is link prefix);
+add(html2html, Internal link with is link trail and link prefix);
 add(html2html, Parsoid-centric test: Whitespace in ext- and wiki-links 
should be preserved);
 add(html2html, Inline interwiki link);
 add(html2html, Inline interwiki link with empty title (bug 2372));
@@ -1297,7 +1298,8 @@
 add(html2wt, Internal link with en linktrail: no apostrophes (bug 27473));
 add(html2wt, Internal link with ca linktrail with apostrophes (bug 27473));
 add(html2wt, Internal link with kaa linktrail with apostrophes (bug 
27473));
-add(html2wt, Internal link with is linkprefix);
+add(html2wt, Internal link with is link prefix);
+add(html2wt, Internal link with is link trail and link prefix);
 add(html2wt, Parsoid-centric test: Whitespace in ext- and wiki-links should 
be preserved);
 add(html2wt, Inline interwiki link);
 add(html2wt, Inline interwiki link with empty title (bug 2372));

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

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

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


[MediaWiki-commits] [Gerrit] have rest of eqiad snapshot hosts use standard snap partitio... - change (operations/puppet)

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

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


Change subject: have rest of eqiad snapshot hosts use standard snap partition 
recipe
..

have rest of eqiad snapshot hosts use standard snap partition recipe

Change-Id: I22de779c5bc0dac801c302ebbfcdacddba32e625
---
M files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/61778/1

diff --git a/files/autoinstall/netboot.cfg b/files/autoinstall/netboot.cfg
index d6dfae0..2cabd85 100755
--- a/files/autoinstall/netboot.cfg
+++ b/files/autoinstall/netboot.cfg
@@ -60,7 +60,7 @@
rdb[1-4]|rdb100[1-4]) echo partman/mw.cfg ;; \
searchidx*) echo partman/searchidx.cfg ;; \
search[0-9]*) echo partman/search.cfg ;; \
-   snapshot[1-4]|snapshot1002) echo partman/snapshot.cfg ;; \
+   snapshot[1-4]|snapshot100[1-4]) echo partman/snapshot.cfg ;; \

copper|emery|neon|harmon|ssl[1-3]0[0-9][0-9]|ssl[0-9]|zirconium) echo 
partman/raid1-lvm.cfg ;; \
solr[1-3]|solr100[1-3]) echo partman/lvm.cfg ;; \
virt[5-9]|virt1[0-1]) echo partman/virt-raid10-cisco.cfg ;; \

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22de779c5bc0dac801c302ebbfcdacddba32e625
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update parserTests.txt to include combined link prefix/link ... - change (mediawiki...Parsoid)

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

Change subject: Update parserTests.txt to include combined link prefix/link 
trail tests.
..


Update parserTests.txt to include combined link prefix/link trail tests.

The new test was added in https://gerrit.wikimedia.org/r/61617
and we fixed the exposed bugs in https://gerrit.wikimedia.org/r/61691

The new test fails html2html and html2wt, like all the link tests do.
(The HTML in the parserTests is missing the rel=mw:WikiLink on the
a tag which WikitextSerializer expects.)

Change-Id: I6332e5bcb29cde13437e1cdddb06b23e87c745da
---
M js/tests/fetch-parserTests.txt.js
M js/tests/parserTests-blacklist.js
2 files changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/js/tests/fetch-parserTests.txt.js 
b/js/tests/fetch-parserTests.txt.js
index da617dd..348a019 100755
--- a/js/tests/fetch-parserTests.txt.js
+++ b/js/tests/fetch-parserTests.txt.js
@@ -10,9 +10,9 @@
 // and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = 1d55be6db97e021e776547f162374089f8e8d04b;
+var expectedSHA1 = 4d62310d8a2c86af58e8a3d637056bf074092ab5;
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = 7833589c5d576648b4db78bc69963bf8d516242d;
+var latestCommit = bfe2ee4bc237fbe2105f66094ad8ef231dd36b82;
 
 var fs = require('fs'),
path = require('path'),
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index bed5b83..222ac5a 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -711,7 +711,8 @@
 add(html2html, Internal link with en linktrail: no apostrophes (bug 
27473));
 add(html2html, Internal link with ca linktrail with apostrophes (bug 
27473));
 add(html2html, Internal link with kaa linktrail with apostrophes (bug 
27473));
-add(html2html, Internal link with is linkprefix);
+add(html2html, Internal link with is link prefix);
+add(html2html, Internal link with is link trail and link prefix);
 add(html2html, Parsoid-centric test: Whitespace in ext- and wiki-links 
should be preserved);
 add(html2html, Inline interwiki link);
 add(html2html, Inline interwiki link with empty title (bug 2372));
@@ -1297,7 +1298,8 @@
 add(html2wt, Internal link with en linktrail: no apostrophes (bug 27473));
 add(html2wt, Internal link with ca linktrail with apostrophes (bug 27473));
 add(html2wt, Internal link with kaa linktrail with apostrophes (bug 
27473));
-add(html2wt, Internal link with is linkprefix);
+add(html2wt, Internal link with is link prefix);
+add(html2wt, Internal link with is link trail and link prefix);
 add(html2wt, Parsoid-centric test: Whitespace in ext- and wiki-links should 
be preserved);
 add(html2wt, Inline interwiki link);
 add(html2wt, Inline interwiki link with empty title (bug 2372));

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

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

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


[MediaWiki-commits] [Gerrit] have rest of eqiad snapshot hosts use standard snap partitio... - change (operations/puppet)

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

Change subject: have rest of eqiad snapshot hosts use standard snap partition 
recipe
..


have rest of eqiad snapshot hosts use standard snap partition recipe

Change-Id: I22de779c5bc0dac801c302ebbfcdacddba32e625
---
M files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/files/autoinstall/netboot.cfg b/files/autoinstall/netboot.cfg
index d6dfae0..2cabd85 100755
--- a/files/autoinstall/netboot.cfg
+++ b/files/autoinstall/netboot.cfg
@@ -60,7 +60,7 @@
rdb[1-4]|rdb100[1-4]) echo partman/mw.cfg ;; \
searchidx*) echo partman/searchidx.cfg ;; \
search[0-9]*) echo partman/search.cfg ;; \
-   snapshot[1-4]|snapshot1002) echo partman/snapshot.cfg ;; \
+   snapshot[1-4]|snapshot100[1-4]) echo partman/snapshot.cfg ;; \

copper|emery|neon|harmon|ssl[1-3]0[0-9][0-9]|ssl[0-9]|zirconium) echo 
partman/raid1-lvm.cfg ;; \
solr[1-3]|solr100[1-3]) echo partman/lvm.cfg ;; \
virt[5-9]|virt1[0-1]) echo partman/virt-raid10-cisco.cfg ;; \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I22de779c5bc0dac801c302ebbfcdacddba32e625
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] i18n/cs: Adding Wikivoyage and Wikidata. - change (mediawiki...WikimediaMessages)

2013-05-01 Thread Danny B. (Code Review)
Danny B. has uploaded a new change for review.

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


Change subject: i18n/cs: Adding Wikivoyage and Wikidata.
..

i18n/cs: Adding Wikivoyage and Wikidata.

Change-Id: Iae535e847440333fcb7fe774fde3795df2201004
---
M WikimediaGrammarForms.php
1 file changed, 30 insertions(+), 0 deletions(-)


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

diff --git a/WikimediaGrammarForms.php b/WikimediaGrammarForms.php
index 5219345..74ce6f4 100644
--- a/WikimediaGrammarForms.php
+++ b/WikimediaGrammarForms.php
@@ -143,18 +143,22 @@
'Wikisource'  = 'Wikizdroje',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzita',
+   'Wikivoyage'  = 'Wikicesty',
'Wiktionary'  = 'Wikislovník',
),
'2sg' = array(
'uživatel'= 'uživatele',
'Wikibooks'   = 'Wikiknih',
+   'Wikidata'= 'Wikidat',
'Wikinews'= 'Wikizpráv',
'Wikipedia'   = 'Wikipedie',
'Wikiquote'   = 'Wikicitátů',
'Wikisource'  = 'Wikizdrojů',
'Wikispecies' = 'Wikidruhů',
'Wikiversity' = 'Wikiverzity',
+   'Wikivoyage'  = 'Wikicest',
'Wiktionary'  = 'Wikislovníku',
+   'Wikicesty'   = 'Wikicest',
'Wikicitáty'  = 'Wikicitátů',
'Wikidruhy'   = 'Wikidruhů',
'Wikiknihy'   = 'Wikiknih',
@@ -166,13 +170,16 @@
'3sg' = array(
'uživatel'= 'uživateli',
'Wikibooks'   = 'Wikiknihám',
+   'Wikidata'= 'Wikidatům',
'Wikinews'= 'Wikizprávám',
'Wikipedia'   = 'Wikipedii',
'Wikiquote'   = 'Wikicitátům',
'Wikisource'  = 'Wikizdrojům',
'Wikispecies' = 'Wikidruhům',
'Wikiversity' = 'Wikiverzitě',
+   'Wikivoyage'  = 'Wikicestám',
'Wiktionary'  = 'Wikislovníku',
+   'Wikicesty'   = 'Wikicestám',
'Wikicitáty'  = 'Wikicitátům',
'Wikidruhy'   = 'Wikidruhům',
'Wikiknihy'   = 'Wikiknihám',
@@ -191,6 +198,7 @@
'Wikisource'  = 'Wikizdroje',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzitu',
+   'Wikivoyage'  = 'Wikicesty',
'Wiktionary'  = 'Wikislovník',
'Wikipedie'   = 'Wikipedii',
'Wikiverzita' = 'Wikiverzitu',
@@ -204,6 +212,7 @@
'Wikisource'  = 'Wikizdroje',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzito',
+   'Wikivoyage'  = 'Wikicesty',
'Wiktionary'  = 'Wikislovníku',
'Wikislovník' = 'Wikislovníku',
'Wikiverzita' = 'Wikiverzito',
@@ -211,13 +220,16 @@
'6sg' = array(
'uživatel'= 'uživateli',
'Wikibooks'   = 'Wikiknihách',
+   'Wikidata'= 'Wikidatech',
'Wikinews'= 'Wikizprávách',
'Wikipedia'   = 'Wikipedii',
'Wikiquote'   = 'Wikicitátech',
'Wikisource'  = 'Wikizdrojích',
'Wikispecies' = 'Wikidruzích',
'Wikiversity' = 'Wikiverzitě',
+   'Wikivoyage'  = 'Wikicestách',
'Wiktionary'  = 'Wikislovníku',
+   'Wikicesty'   = 'Wikicestách',
'Wikicitáty'  = 'Wikicitátech',
'Wikidruhy'   = 'Wikidruzích',
'Wikiknihy'   = 'Wikiknihách',
@@ -230,13 +242,16 @@
'7sg' = array(
'uživatel'= 'uživatelem',
'Wikibooks'   = 'Wikiknihami',
+   'Wikidata'= 'Wikidaty',
'Wikinews'= 'Wikizprávami',
'Wikipedia'   = 'Wikipedií',
'Wikiquote'   = 'Wikicitáty',
'Wikisource'  = 'Wikizdroji',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzitou',
+   'Wikivoyage'  = 'Wikicestami',
'Wiktionary'  = 'Wikislovníkem',
+   'Wikicesty'   = 'Wikicestami',
'Wikiknihy'   = 'Wikiknihami',
'Wikipedie'   = 'Wikipedií',
'Wikislovník' = 'Wikislovníkem',
@@ -253,6 +268,7 @@
'Wikisource'  = 'Wikizdroje',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzity',
+   'Wikivoyage'  = 'Wikicesty',
'Wiktionary'  = 'Wikislovníky',
'Wikislovník' = 'Wikislovníky',
'Wikiverzita' = 'Wikiverzity',
@@ -260,13 +276,16 @@
'2pl' = array(
'uživatel'= 'uživatelů',

[MediaWiki-commits] [Gerrit] i18n/cs: Adding Wikivoyage and Wikidata. - change (mediawiki...WikimediaMessages)

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

Change subject: i18n/cs: Adding Wikivoyage and Wikidata.
..


i18n/cs: Adding Wikivoyage and Wikidata.

Change-Id: Iae535e847440333fcb7fe774fde3795df2201004
---
M WikimediaGrammarForms.php
1 file changed, 30 insertions(+), 0 deletions(-)

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



diff --git a/WikimediaGrammarForms.php b/WikimediaGrammarForms.php
index 5219345..74ce6f4 100644
--- a/WikimediaGrammarForms.php
+++ b/WikimediaGrammarForms.php
@@ -143,18 +143,22 @@
'Wikisource'  = 'Wikizdroje',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzita',
+   'Wikivoyage'  = 'Wikicesty',
'Wiktionary'  = 'Wikislovník',
),
'2sg' = array(
'uživatel'= 'uživatele',
'Wikibooks'   = 'Wikiknih',
+   'Wikidata'= 'Wikidat',
'Wikinews'= 'Wikizpráv',
'Wikipedia'   = 'Wikipedie',
'Wikiquote'   = 'Wikicitátů',
'Wikisource'  = 'Wikizdrojů',
'Wikispecies' = 'Wikidruhů',
'Wikiversity' = 'Wikiverzity',
+   'Wikivoyage'  = 'Wikicest',
'Wiktionary'  = 'Wikislovníku',
+   'Wikicesty'   = 'Wikicest',
'Wikicitáty'  = 'Wikicitátů',
'Wikidruhy'   = 'Wikidruhů',
'Wikiknihy'   = 'Wikiknih',
@@ -166,13 +170,16 @@
'3sg' = array(
'uživatel'= 'uživateli',
'Wikibooks'   = 'Wikiknihám',
+   'Wikidata'= 'Wikidatům',
'Wikinews'= 'Wikizprávám',
'Wikipedia'   = 'Wikipedii',
'Wikiquote'   = 'Wikicitátům',
'Wikisource'  = 'Wikizdrojům',
'Wikispecies' = 'Wikidruhům',
'Wikiversity' = 'Wikiverzitě',
+   'Wikivoyage'  = 'Wikicestám',
'Wiktionary'  = 'Wikislovníku',
+   'Wikicesty'   = 'Wikicestám',
'Wikicitáty'  = 'Wikicitátům',
'Wikidruhy'   = 'Wikidruhům',
'Wikiknihy'   = 'Wikiknihám',
@@ -191,6 +198,7 @@
'Wikisource'  = 'Wikizdroje',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzitu',
+   'Wikivoyage'  = 'Wikicesty',
'Wiktionary'  = 'Wikislovník',
'Wikipedie'   = 'Wikipedii',
'Wikiverzita' = 'Wikiverzitu',
@@ -204,6 +212,7 @@
'Wikisource'  = 'Wikizdroje',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzito',
+   'Wikivoyage'  = 'Wikicesty',
'Wiktionary'  = 'Wikislovníku',
'Wikislovník' = 'Wikislovníku',
'Wikiverzita' = 'Wikiverzito',
@@ -211,13 +220,16 @@
'6sg' = array(
'uživatel'= 'uživateli',
'Wikibooks'   = 'Wikiknihách',
+   'Wikidata'= 'Wikidatech',
'Wikinews'= 'Wikizprávách',
'Wikipedia'   = 'Wikipedii',
'Wikiquote'   = 'Wikicitátech',
'Wikisource'  = 'Wikizdrojích',
'Wikispecies' = 'Wikidruzích',
'Wikiversity' = 'Wikiverzitě',
+   'Wikivoyage'  = 'Wikicestách',
'Wiktionary'  = 'Wikislovníku',
+   'Wikicesty'   = 'Wikicestách',
'Wikicitáty'  = 'Wikicitátech',
'Wikidruhy'   = 'Wikidruzích',
'Wikiknihy'   = 'Wikiknihách',
@@ -230,13 +242,16 @@
'7sg' = array(
'uživatel'= 'uživatelem',
'Wikibooks'   = 'Wikiknihami',
+   'Wikidata'= 'Wikidaty',
'Wikinews'= 'Wikizprávami',
'Wikipedia'   = 'Wikipedií',
'Wikiquote'   = 'Wikicitáty',
'Wikisource'  = 'Wikizdroji',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzitou',
+   'Wikivoyage'  = 'Wikicestami',
'Wiktionary'  = 'Wikislovníkem',
+   'Wikicesty'   = 'Wikicestami',
'Wikiknihy'   = 'Wikiknihami',
'Wikipedie'   = 'Wikipedií',
'Wikislovník' = 'Wikislovníkem',
@@ -253,6 +268,7 @@
'Wikisource'  = 'Wikizdroje',
'Wikispecies' = 'Wikidruhy',
'Wikiversity' = 'Wikiverzity',
+   'Wikivoyage'  = 'Wikicesty',
'Wiktionary'  = 'Wikislovníky',
'Wikislovník' = 'Wikislovníky',
'Wikiverzita' = 'Wikiverzity',
@@ -260,13 +276,16 @@
'2pl' = array(
'uživatel'= 'uživatelů',
'Wikibooks'   = 'Wikiknih',
+   'Wikidata'= 

[MediaWiki-commits] [Gerrit] Let more attribs through in parsoid-only tests - change (mediawiki...Parsoid)

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

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


Change subject: Let more attribs through in parsoid-only tests
..

Let more attribs through in parsoid-only tests

We need e.g. property and class so we can make sure the new image tests
actually test what we need 'em to.

Change-Id: Idc0de45d43fdecfd37c730baee10c8ee086e6fd6
Co-authored-by: C. Scott Ananian csc...@cscott.net
Co-authored-by: Mark Holmquist mtrac...@member.fsf.org
---
M js/lib/mediawiki.Util.js
M js/tests/parserTests.js
2 files changed, 59 insertions(+), 40 deletions(-)


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

diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index 82ab83b..fa365fb 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -989,18 +989,21 @@
 
// and eat all remaining newlines
.replace(/[\r\n]/g, '');
-},
+};
 
 /**
  * @method normalizeOut
  *
  * Specialized normalization of the wiki parser output, mostly to ignore a few
- * known-ok differences.
+ * known-ok differences.  If parsoidOnly is true-ish, then we allow more
+ * markup through (like property and typeof attributes), for better
+ * checking of parsoid-only test cases.
  *
  * @param {string} out
+ * @param {bool} parsoidOnly
  * @returns {string}
  */
-normalizeOut = function ( out ) {
+var normalizeOut = function ( out, parsoidOnly ) {
// TODO: Do not strip newlines in pre and nowiki blocks!
// NOTE that we use a slightly restricted regexp for attribute
//  which works for the output of DOM serialization.  For example,
@@ -1012,23 +1015,29 @@
throw new Error(normalizeOut input is not in standard 
serialized form);
}
out = normalizeNewlines( out );
-   return out
-   .replace(/span 
typeof=mw:(?:(?:Placeholder|Nowiki|Object\/Template|Entity))(?: 
[^\0-\cZ\s\\'\/=]+(?:=[^]*)?)*((?:[^]+|(?!\/span).)*)\/span/g, '$1')
-   // Ignore these attributes for now
-   .replace(/ 
(data-mw|data-parsoid|typeof|resource|rel|prefix|about|rev|datatype|inlist|property|vocab|content|title|class)=[^]*/g,
 '')
+   if ( !parsoidOnly ) {
+   // remove span typeof=/span
+   out = out.
+   replace(/span 
typeof=mw:(?:(?:Placeholder|Nowiki|Object\/Template|Entity))(?: 
[^\0-\cZ\s\\'\/=]+(?:=[^]*)?)*((?:[^]+|(?!\/span).)*)\/span/g, '$1');
+   // ignore troublesome attributes
+   out = out.replace(/ 
(data-mw|data-parsoid|typeof|resource|rel|prefix|about|rev|datatype|inlist|property|vocab|content|title|class)=[^\]*/g,
 '');
+   } else {
+   out = out.replace(/ 
(data-mw|data-parsoid|prefix|about|rev|datatype|inlist|vocab|content)=[^\]*/g,
 '');
+   }
+   return out.
// replace mwt ids
-   .replace(/ id=mwt\d+/, '')
+   replace(/ id=mwt\d+/, '').
//.replace(/!--.*?--\n?/gm, '')
-   .replace(/\/?(?:meta|link)(?: 
[^\0-\cZ\s'\/=]+(?:=[^]*)?)*\/?/g, '')
-   .replace(/span[^]+about=[^]*[^]*/g, '')
-   .replace(/span\/span/g, '')
-   .replace(/(href=)(?:\.?\.\/)+/g, '$1')
+   replace(/\/?(?:meta|link)(?: 
[^\0-\cZ\s'\/=]+(?:=[^]*)?)*\/?/g, '').
+   replace(/span[^]+about=[^]*[^]*/g, '').
+   replace(/span\/span/g, '').
+   replace(/(href=)(?:\.?\.\/)+/g, '$1').
// replace unnecessary URL escaping
-   .replace(/ href=[^]*/g, decodeURIComponent)
+   replace(/ href=[^]*/g, decodeURIComponent).
// strip thumbnail size prefixes
-   
.replace(/(src=[^]*?)\/thumb(\/[0-9a-f]\/[0-9a-f]{2}\/[^\/]+)\/[0-9]+px-[^\/]+(?=)/g,
 '$1$2')
-   .replace(/((table|tbody|tr|th|td|\/th|\/td)[^]*)\s+/g, 
'$1');
-},
+   
replace(/(src=[^]*?)\/thumb(\/[0-9a-f]\/[0-9a-f]{2}\/[^\/]+)\/[0-9]+px-[^\/]+(?=)/g,
 '$1$2').
+   replace(/((table|tbody|tr|th|td|\/th|\/td)[^]*)\s+/g, '$1');
+};
 
 /**
  * @method normalizeHTML
@@ -1037,44 +1046,52 @@
  * re-serializing it to HTML. Ideally, the parser would normalize inter-tag
  * whitespace for us. For now, we fake that by simply stripping all newlines.
  *
- * @param source {string}
+ * If parsoidOnly is true-ish, then we allow more markup through to allow
+ * more accurate parsoid-only tests.
+ *
+ * @param {string} source
+ * @param {bool} parsoidOnly
  * @return {string}
  */
-normalizeHTML = function ( source ) {
+var normalizeHTML = function ( source, parsoidOnly ) {
// TODO: Do not strip newlines in pre and nowiki blocks!
source = normalizeNewlines( source );
try {
var doc = this.parseHTML( source );
-   return doc.body
-

[MediaWiki-commits] [Gerrit] user_metrics module changes: - change (mediawiki/vagrant)

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

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


Change subject: user_metrics module changes:
..

user_metrics module changes:

- Fixing git clone
- creating admin account
- seeding MediaWiki db with data good for user_metrics testing.

Change-Id: Iab806d80c2570adaf22cbfbb64c112c11e817c82
---
M puppet/manifests/site.pp
M puppet/modules/user_metrics/manifests/init.pp
2 files changed, 26 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/81/61781/1

diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp
index ef67080..9caacd8 100644
--- a/puppet/manifests/site.pp
+++ b/puppet/manifests/site.pp
@@ -34,3 +34,4 @@
 class { 'git': }
 class { 'memcached': }
 class { 'mediawiki': }
+class { 'user_metrics': }
\ No newline at end of file
diff --git a/puppet/modules/user_metrics/manifests/init.pp 
b/puppet/modules/user_metrics/manifests/init.pp
index 7df8a2d..6c0b811 100644
--- a/puppet/modules/user_metrics/manifests/init.pp
+++ b/puppet/modules/user_metrics/manifests/init.pp
@@ -41,24 +41,42 @@
ensure = 'installed',
}
 
-   git::clone { 'analytics/E3Analysis':
+   git::clone { 'analytics/user-metrics':
directory = $user_metrics_path,
require   = [Package['python-flask']],
}
 
# create the user_metrics cohorts database
exec { 'user_metrics_mysql_create_database':
-   command = /usr/bin/mysql -pvagrant -e \CREATE DATABASE 
${user_metrics_db_name};\ /usr/bin/mysql -pvagrant ${user_metrics_db_name}  
${user_metrics_path}/scripts/user_metrics.sql;,
-   unless  = /usr/bin/mysql -pvagrant -e 'SHOW DATABASES' | 
/bin/grep -q ${user_metrics_db_name},
-   user= 'root',
+   command   = /usr/bin/mysql -pvagrant -e \CREATE DATABASE 
${user_metrics_db_name};\  /usr/bin/mysql -pvagrant ${user_metrics_db_name} 
 ${user_metrics_path}/scripts/user_metrics.sql;,
+   unless= /usr/bin/mysql -pvagrant -e 'SHOW DATABASES' | 
/bin/grep -q ${user_metrics_db_name},
+   user  = 'root',
logoutput = true,
-   require = [Git::Clone['analytics/E3Analysis'], 
Service['mysql']]
+   require   = [Git::Clone['analytics/user-metrics'], 
Service['mysql']]
}
 
# Need settings.py to configure metrics-api python application
file { ${user_metrics_path}/user_metrics/config/settings.py:
content = template('user_metrics/settings.py.erb'),
-   require = Git::Clone['analytics/E3Analysis'],
+   require = Git::Clone['analytics/user-metrics'],
+   }
+
+   # create default admin account
+   exec { 'user_metrics_create_admin_account':
+   command = /usr/bin/python 
${user_metrics_path}/scripts/create_account.py,
+   # Yes, this script loads via relative paths.  Sigh...
+   cwd = ${user_metrics_path}/scripts,
+   unless  = '/usr/bin/mysql -pvagrant user_metrics -e select 
\'exists\' from api_user where user_name = \'admin\' | /bin/grep -q exists',
+   require = [Exec['user_metrics_mysql_create_database'], 
File[${user_metrics_path}/user_metrics/config/settings.py]],
+   }
+
+   # Seed the MediaWiki wiki database with data good for testing 
user_metrics API.
+   exec { 'user_metrics_mysql_seed_mediawiki_database':
+   command   = /usr/bin/mysql -f -pvagrant wiki  
${user_metrics_path}/scripts/seed.sql;,
+   unless= '/usr/bin/mysql -pvagrant wiki -e SELECT 
\'exists\' FROM page WHERE page_title = \'Hydriz\' | /bin/grep -q exists',
+   user  = 'root',
+   logoutput = true,
+   require   = [Git::Clone['analytics/user-metrics'], 
Service['mysql']]
}
 
include apache
@@ -70,6 +88,6 @@
 
apache::site { $site_name:
content = template(user_metrics/virtual_host.erb),
-   require =  [Git::Clone['analytics/E3Analysis'], 
Apache::Mod['wsgi'], Apache::Mod['alias']],
+   require =  [Git::Clone['analytics/user-metrics'], 
Apache::Mod['wsgi'], Apache::Mod['alias']],
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab806d80c2570adaf22cbfbb64c112c11e817c82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
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] Fix content format for ScribuntoContentHander - change (mediawiki...Scribunto)

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

Change subject: Fix content format for ScribuntoContentHander
..


Fix content format for ScribuntoContentHander

We had intended to use the constant CONTENT_FORMAT_TEXT, but
accidentally used that as a string instead.

Change-Id: I93a2c02d48d3fd7b73530562165d817965e272d1
---
M common/ScribuntoContentHandler.php
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/common/ScribuntoContentHandler.php 
b/common/ScribuntoContentHandler.php
index ba1e17b..14b7935 100644
--- a/common/ScribuntoContentHandler.php
+++ b/common/ScribuntoContentHandler.php
@@ -11,10 +11,18 @@
 
 class ScribuntoContentHandler extends TextContentHandler {
 
-   public function __construct( $modelId = 'Scribunto', $formats = array( 
'CONTENT_FORMAT_TEXT' ) ) {
+   public function __construct( $modelId = 'Scribunto', $formats = array( 
CONTENT_FORMAT_TEXT ) ) {
parent::__construct( $modelId, $formats );
}
 
+   public function isSupportedFormat( $format ) {
+   // An error in an earlier version of Scribunto means we might 
see this.
+   if ( $format === 'CONTENT_FORMAT_TEXT' ) {
+   $format = CONTENT_FORMAT_TEXT;
+   }
+   return parent::isSupportedFormat( $format );
+   }
+
/**
 * Unserializes a ScribuntoContent object.
 *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I93a2c02d48d3fd7b73530562165d817965e272d1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] General code cleanup - change (operations...lucene-search-2)

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

Change subject: General code cleanup
..


General code cleanup

- Fix a NPE
- Remove some unused methods
- Remove some unused variables
- Slap some @SupressWarnings on junk in lucene-2.1 that use raw types
- Fix up some dead code paths

Change-Id: I41b4b6f2ff2cc006a230702d6e5ec59b0a583967
---
M src/org/apache/lucene/search/CustomBoostQuery.java
M src/org/apache/lucene/search/PositionalMultiQuery.java
M src/org/apache/lucene/search/PositionalScorer.java
M src/org/apache/lucene/search/RelevanceQuery.java
M src/org/wikimedia/lsearch/analyzers/FastWikiTokenizerEngine.java
M src/org/wikimedia/lsearch/analyzers/WikiQueryParser.java
M src/org/wikimedia/lsearch/frontend/SearchDaemon.java
M src/org/wikimedia/lsearch/index/WikiIndexModifier.java
M src/org/wikimedia/lsearch/interoperability/RMIMessengerClient.java
M src/org/wikimedia/lsearch/prefix/PrefixIndexBuilder.java
M src/org/wikimedia/lsearch/ranks/LinksBuilder.java
M src/org/wikimedia/lsearch/search/MatchAllTitlesQuery.java
M src/org/wikimedia/lsearch/search/RankField.java
M src/org/wikimedia/lsearch/search/SearcherCache.java
M src/org/wikimedia/lsearch/spell/SuggestBuilder.java
M src/org/wikimedia/lsearch/spell/api/SpellCheckIndexer.java
M src/org/wikimedia/lsearch/util/CharacterEntityReference.java
M src/org/wikimedia/lsearch/util/QueryStringMap.java
18 files changed, 18 insertions(+), 84 deletions(-)

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



diff --git a/src/org/apache/lucene/search/CustomBoostQuery.java 
b/src/org/apache/lucene/search/CustomBoostQuery.java
index b6ef6f7..08e63dc 100644
--- a/src/org/apache/lucene/search/CustomBoostQuery.java
+++ b/src/org/apache/lucene/search/CustomBoostQuery.java
@@ -88,6 +88,7 @@
   }
 
   /*(non-Javadoc) @see 
org.apache.lucene.search.Query#extractTerms(java.util.Set) */
+  @SuppressWarnings(rawtypes)
   public void extractTerms(Set terms) {
 subQuery.extractTerms(terms);
 if (boostQuery!=null) {
diff --git a/src/org/apache/lucene/search/PositionalMultiQuery.java 
b/src/org/apache/lucene/search/PositionalMultiQuery.java
index 01b563d..65ad280 100644
--- a/src/org/apache/lucene/search/PositionalMultiQuery.java
+++ b/src/org/apache/lucene/search/PositionalMultiQuery.java
@@ -60,6 +60,7 @@
this.similarity = getSimilarity(searcher);
this.idf = 0;
  // compute idf - take average when multiple terms
+ @SuppressWarnings(rawtypes)
  Iterator i = termArrays.iterator();
  int count = 0;
  while (i.hasNext()) {
diff --git a/src/org/apache/lucene/search/PositionalScorer.java 
b/src/org/apache/lucene/search/PositionalScorer.java
index 5bfe110..db99fbf 100644
--- a/src/org/apache/lucene/search/PositionalScorer.java
+++ b/src/org/apache/lucene/search/PositionalScorer.java
@@ -162,13 +162,15 @@
tfExplanation.setDescription(tf(freq= + freq + ));
 
// add extra info about every term in the sum
-   if(DEBUG  explanations != null  explanations.get(doc) != 
null){
-   Explanation eFreq = new Explanation();
-   eFreq.setValue(freq);
-   eFreq.setDescription(sum of:);

-   for(Explanation e : explanations.get(doc))
-   eFreq.addDetail(e);
-   tfExplanation.addDetail(eFreq);
+   if(DEBUG) {
+   if(explanations != null  explanations.get(doc) != 
null){
+   Explanation eFreq = new Explanation();
+   eFreq.setValue(freq);
+   eFreq.setDescription(sum of:);
+   for(Explanation e : explanations.get(doc))
+   eFreq.addDetail(e);
+   tfExplanation.addDetail(eFreq);
+   }
}
 
return tfExplanation;
diff --git a/src/org/apache/lucene/search/RelevanceQuery.java 
b/src/org/apache/lucene/search/RelevanceQuery.java
index a3c0aa1..21c2e41 100644
--- a/src/org/apache/lucene/search/RelevanceQuery.java
+++ b/src/org/apache/lucene/search/RelevanceQuery.java
@@ -52,6 +52,7 @@
}
 
/*(non-Javadoc) @see 
org.apache.lucene.search.Query#extractTerms(java.util.Set) */
+   @SuppressWarnings(rawtypes)
public void extractTerms(Set terms) {
main.extractTerms(terms);
for(Query r : relevance)
diff --git a/src/org/wikimedia/lsearch/analyzers/FastWikiTokenizerEngine.java 
b/src/org/wikimedia/lsearch/analyzers/FastWikiTokenizerEngine.java
index d9d9289..95fe4f2 100644
--- a/src/org/wikimedia/lsearch/analyzers/FastWikiTokenizerEngine.java
+++ 

[MediaWiki-commits] [Gerrit] (bug 47933) Rename Module talk namespace for Japanese Wikipedia - change (operations/mediawiki-config)

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

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


Change subject: (bug 47933) Rename Module talk namespace for Japanese Wikipedia
..

(bug 47933) Rename Module talk namespace for Japanese Wikipedia

Rename Module talk namespace 'モジュール‐ノート'.
Add 'モジュール・トーク' to aliase of Module talk namespace.

Bug: 47933
Change-Id: I80d59e6068656cc80eb2d48a155e10346d77bc6c
---
M wmf-config/InitialiseSettings.php
1 file changed, 17 insertions(+), 15 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f03ea2d..fb2c065 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -2764,13 +2764,14 @@
'ヘルプ・トーク' = NS_HELP_TALK,
'カテゴリ' = NS_CATEGORY,
'カテゴリ・トーク' = NS_CATEGORY_TALK,
-   ポータル‐ノート = 101,
+   'ポータル‐ノート' = 101,
'Portal‐ノート' = 101,
'Portal・トーク' = 101,
-   'プロジェクト・トーク' = 103,
+   'プロジェクト・トーク' = 103,
+   'モジュール・トーク' = 829, // Bug 47933
),
'+jawikinews' = array(
-   ポータル‐ノート = 101,
+   'ポータル‐ノート' = 101,
),
'+jawikiversity' = array(
 'Wikiversity_talk' = NS_PROJECT_TALK,
@@ -4745,23 +4746,24 @@
101 = 'Discussioni_portale',
102 = 'Progetto',
103 = 'Discussioni_progetto',
-   ),
+   ),
'jawiki' = array(
-   NS_TALK = ノート,
-   NS_USER_TALK = 利用者‐会話,
-   NS_PROJECT_TALK = Wikipedia‐ノート,
-   NS_FILE_TALK = ファイル‐ノート,
-   NS_MEDIAWIKI_TALK = MediaWiki‐ノート,
-   NS_TEMPLATE = Template,
-   NS_TEMPLATE_TALK = Template‐ノート,
-   NS_HELP = Help,
-   NS_HELP_TALK = Help‐ノート,
-   NS_CATEGORY = Category,
-   NS_CATEGORY_TALK = Category‐ノート,
+   NS_TALK = 'ノート',
+   NS_USER_TALK = '利用者‐会話',
+   NS_PROJECT_TALK = 'Wikipedia‐ノート',
+   NS_FILE_TALK = 'ファイル‐ノート',
+   NS_MEDIAWIKI_TALK = 'MediaWiki‐ノート',
+   NS_TEMPLATE = 'Template',
+   NS_TEMPLATE_TALK = 'Template‐ノート',
+   NS_HELP = 'Help',
+   NS_HELP_TALK = 'Help‐ノート',
+   NS_CATEGORY = 'Category',
+   NS_CATEGORY_TALK = 'Category‐ノート',
100 = 'Portal',
101 = 'Portal‐ノート',
102 = 'プロジェクト',
103 = 'プロジェクト‐ノート',
+   829 = 'モジュール‐ノート', // Bug 47933
),
'jawiktionary' = array(
100 = '付録', // Appendix

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80d59e6068656cc80eb2d48a155e10346d77bc6c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Burthsceh burths...@gmail.com

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


[MediaWiki-commits] [Gerrit] Search for projects using ldap_list, part two. - change (mediawiki...OpenStackManager)

2013-05-01 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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


Change subject: Search for projects using ldap_list, part two.
..

Search for projects using ldap_list, part two.

This is a continuation of change Ida578039f7395f88c2339d209bb14aa235696987
... Last time I fixed this for the 'can see all projects' code path but not
for the more commonly used normal user path.

For bug 47101.

Change-Id: I778fb78c1d877db1e3279aeadaaf2edde96ce32c
---
M nova/OpenStackNovaUser.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager 
refs/changes/83/61783/1

diff --git a/nova/OpenStackNovaUser.php b/nova/OpenStackNovaUser.php
index deda742..15776d4 100644
--- a/nova/OpenStackNovaUser.php
+++ b/nova/OpenStackNovaUser.php
@@ -159,7 +159,7 @@
# roles do not
$projects = array();
$filter = ((objectclass=groupofnames)(member=$this-userDN));
-   $result = LdapAuthenticationPlugin::ldap_search( 
$wgAuth-ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, $filter );
+   $result = LdapAuthenticationPlugin::ldap_list( 
$wgAuth-ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, $filter );
if ( $result ) {
$entries = LdapAuthenticationPlugin::ldap_get_entries( 
$wgAuth-ldapconn, $result );
if ( $entries ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I778fb78c1d877db1e3279aeadaaf2edde96ce32c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Search for projects using ldap_list, part two. - change (mediawiki...OpenStackManager)

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

Change subject: Search for projects using ldap_list, part two.
..


Search for projects using ldap_list, part two.

This is a continuation of change Ida578039f7395f88c2339d209bb14aa235696987
... Last time I fixed this for the 'can see all projects' code path but not
for the more commonly used normal user path.

For bug 47101.

Change-Id: I778fb78c1d877db1e3279aeadaaf2edde96ce32c
---
M nova/OpenStackNovaUser.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/nova/OpenStackNovaUser.php b/nova/OpenStackNovaUser.php
index deda742..15776d4 100644
--- a/nova/OpenStackNovaUser.php
+++ b/nova/OpenStackNovaUser.php
@@ -159,7 +159,7 @@
# roles do not
$projects = array();
$filter = ((objectclass=groupofnames)(member=$this-userDN));
-   $result = LdapAuthenticationPlugin::ldap_search( 
$wgAuth-ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, $filter );
+   $result = LdapAuthenticationPlugin::ldap_list( 
$wgAuth-ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, $filter );
if ( $result ) {
$entries = LdapAuthenticationPlugin::ldap_get_entries( 
$wgAuth-ldapconn, $result );
if ( $entries ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I778fb78c1d877db1e3279aeadaaf2edde96ce32c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott abog...@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] Added titles= parameter for Special:ViewXML, in the manner... - change (mediawiki...DataTransfer)

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

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


Change subject: Added titles= parameter for Special:ViewXML, in the manner of 
the MW API
..

Added titles= parameter for Special:ViewXML, in the manner of the MW API

Change-Id: Ifa04765f91000bfa1874ab12b2858a8c81527375
---
M specials/DT_ViewXML.php
1 file changed, 16 insertions(+), 1 deletion(-)


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

diff --git a/specials/DT_ViewXML.php b/specials/DT_ViewXML.php
index bbf1593..e2e2474 100644
--- a/specials/DT_ViewXML.php
+++ b/specials/DT_ViewXML.php
@@ -268,7 +268,8 @@
$form_submitted = false;
$cats = $wgRequest-getArray( 'categories' );
$nses = $wgRequest-getArray( 'namespaces' );
-   if ( count( $cats )  0 || count( $nses )  0 ) {
+   $requestedTitles = $wgRequest-getVal( 'titles' );
+   if ( count( $cats )  0 || count( $nses )  0 || 
$requestedTitles != null ) {
$form_submitted = true;
}
 
@@ -323,6 +324,20 @@
$text .= /$namespace_str\n;
}
}
+
+   // The user can specify a set of page names to view
+   // the XML of, using a titles= parameter, separated
+   // by |, in the manner of the MediaWiki API.
+   // Hm... perhaps all of Special:ViewXML should just
+   // be replaced by an API action?
+   if ( $requestedTitles ) {
+   $pageNames = explode( '|', $requestedTitles );
+   foreach ( $pageNames as $pageName ) {
+   $title = Title::newFromText( $pageName 
);
+   $text .= self::getXMLForPage( $title, 
$simplified_format, $groupings );
+   }
+   }
+
$text .= /$pages_str;
print $text;
} else {

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

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

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


[MediaWiki-commits] [Gerrit] user_metrics module changes: - change (mediawiki/vagrant)

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

Change subject: user_metrics module changes:
..


user_metrics module changes:

- Fixing git clone
- creating admin account
- seeding MediaWiki db with data good for user_metrics testing.

Change-Id: Iab806d80c2570adaf22cbfbb64c112c11e817c82
---
M puppet/modules/user_metrics/manifests/init.pp
1 file changed, 25 insertions(+), 7 deletions(-)

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



diff --git a/puppet/modules/user_metrics/manifests/init.pp 
b/puppet/modules/user_metrics/manifests/init.pp
index 7df8a2d..6c0b811 100644
--- a/puppet/modules/user_metrics/manifests/init.pp
+++ b/puppet/modules/user_metrics/manifests/init.pp
@@ -41,24 +41,42 @@
ensure = 'installed',
}
 
-   git::clone { 'analytics/E3Analysis':
+   git::clone { 'analytics/user-metrics':
directory = $user_metrics_path,
require   = [Package['python-flask']],
}
 
# create the user_metrics cohorts database
exec { 'user_metrics_mysql_create_database':
-   command = /usr/bin/mysql -pvagrant -e \CREATE DATABASE 
${user_metrics_db_name};\ /usr/bin/mysql -pvagrant ${user_metrics_db_name}  
${user_metrics_path}/scripts/user_metrics.sql;,
-   unless  = /usr/bin/mysql -pvagrant -e 'SHOW DATABASES' | 
/bin/grep -q ${user_metrics_db_name},
-   user= 'root',
+   command   = /usr/bin/mysql -pvagrant -e \CREATE DATABASE 
${user_metrics_db_name};\  /usr/bin/mysql -pvagrant ${user_metrics_db_name} 
 ${user_metrics_path}/scripts/user_metrics.sql;,
+   unless= /usr/bin/mysql -pvagrant -e 'SHOW DATABASES' | 
/bin/grep -q ${user_metrics_db_name},
+   user  = 'root',
logoutput = true,
-   require = [Git::Clone['analytics/E3Analysis'], 
Service['mysql']]
+   require   = [Git::Clone['analytics/user-metrics'], 
Service['mysql']]
}
 
# Need settings.py to configure metrics-api python application
file { ${user_metrics_path}/user_metrics/config/settings.py:
content = template('user_metrics/settings.py.erb'),
-   require = Git::Clone['analytics/E3Analysis'],
+   require = Git::Clone['analytics/user-metrics'],
+   }
+
+   # create default admin account
+   exec { 'user_metrics_create_admin_account':
+   command = /usr/bin/python 
${user_metrics_path}/scripts/create_account.py,
+   # Yes, this script loads via relative paths.  Sigh...
+   cwd = ${user_metrics_path}/scripts,
+   unless  = '/usr/bin/mysql -pvagrant user_metrics -e select 
\'exists\' from api_user where user_name = \'admin\' | /bin/grep -q exists',
+   require = [Exec['user_metrics_mysql_create_database'], 
File[${user_metrics_path}/user_metrics/config/settings.py]],
+   }
+
+   # Seed the MediaWiki wiki database with data good for testing 
user_metrics API.
+   exec { 'user_metrics_mysql_seed_mediawiki_database':
+   command   = /usr/bin/mysql -f -pvagrant wiki  
${user_metrics_path}/scripts/seed.sql;,
+   unless= '/usr/bin/mysql -pvagrant wiki -e SELECT 
\'exists\' FROM page WHERE page_title = \'Hydriz\' | /bin/grep -q exists',
+   user  = 'root',
+   logoutput = true,
+   require   = [Git::Clone['analytics/user-metrics'], 
Service['mysql']]
}
 
include apache
@@ -70,6 +88,6 @@
 
apache::site { $site_name:
content = template(user_metrics/virtual_host.erb),
-   require =  [Git::Clone['analytics/E3Analysis'], 
Apache::Mod['wsgi'], Apache::Mod['alias']],
+   require =  [Git::Clone['analytics/user-metrics'], 
Apache::Mod['wsgi'], Apache::Mod['alias']],
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab806d80c2570adaf22cbfbb64c112c11e817c82
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix encoding to UTF-8 - change (mediawiki...MathSearch)

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

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


Change subject: Fix encoding to UTF-8
..

Fix encoding to UTF-8

While I am at it:
* Kill trailing space
* Fix formatting
* Add some comments to show that these are special pages and therefore do not 
need a prefix

Change-Id: I184e4e71d5c2f8307440dc994981dd241db87782
---
M MathSearch.i18n.php
M MathSearch.php
2 files changed, 12 insertions(+), 12 deletions(-)


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

diff --git a/MathSearch.i18n.php b/MathSearch.i18n.php
index c5f0a32..1f29713 100644
--- a/MathSearch.i18n.php
+++ b/MathSearch.i18n.php
@@ -11,13 +11,13 @@
  * @author Moritz Schubotz
  */
 $messages['en'] = array(
-'mathsearch' = 'Math search', 
-   'formulainfo' = 'Formula info', 
-'specialpages-group-mathsearch' = 'Math search',
-'mathsearch-desc' = 'Integrates the 
[http://search.mathweb.org/about.html MathWeb Search] engine',
-   'getequationsbyquery'='Get equations by query',
-   'xquerygenerator'='X-query generator',
-   'mathdebug'='Test Renderer',
+   'mathsearch' = 'Math search', // Special page
+   'formulainfo' = 'Formula info', // Special page
+   'specialpages-group-mathsearch' = 'Math search',
+   'mathsearch-desc' = 'Integrates the 
[http://search.mathweb.org/about.html MathWeb Search] engine',
+   'getequationsbyquery' = 'Get equations by query', // Special page
+   'xquerygenerator' = 'X-query generator', // Special page
+   'mathdebug' = 'Test Renderer', // Special page
 );
 
 /** Message documentation (Message documentation)
diff --git a/MathSearch.php b/MathSearch.php
index 8343b9f..196b040 100644
--- a/MathSearch.php
+++ b/MathSearch.php
@@ -7,7 +7,7 @@
  * @version 0.1
  * @author Moritz Schubotz
  * @author Brion Vibber
- * @copyright � 2002-2012 various MediaWiki contributors
+ * @copyright © 2002-2012 various MediaWiki contributors
  * @license GPLv2 license; info in main package.
  * @link http://www.mediawiki.org/wiki/Extension:MathSearch Documentation
  */
@@ -31,8 +31,8 @@
 $dir = dirname( __FILE__ ) . '/';
 
 $wgAutoloadClasses['MathSearchHooks'] = $dir . 'MathSearch.hooks.php';
-$wgAutoloadClasses['SpecialMathSearch'] = $dir . 'SpecialMathSearch.php'; 
-$wgAutoloadClasses['FormulaInfo'] = $dir . 'FormulaInfo.php'; 
+$wgAutoloadClasses['SpecialMathSearch'] = $dir . 'SpecialMathSearch.php';
+$wgAutoloadClasses['FormulaInfo'] = $dir . 'FormulaInfo.php';
 $wgAutoloadClasses['MathObject'] = $dir . 'MathObject.php';
 $wgAutoloadClasses['XQueryGenerator'] = $dir . 'XQueryGenerator.php';
 $wgAutoloadClasses['GetEquationsByQuery'] = $dir . 'GetEquationsByQuery.php';
@@ -40,8 +40,8 @@
 $wgAutoloadClasses['SpecialMathIndex'] = $dir . 'SpecialMathIndex.php';
 
 
-$wgExtensionMessagesFiles['MathSearch'] = $dir . 'MathSearch.i18n.php'; 
-$wgExtensionMessagesFiles['MathSearchAlias'] = $dir . 'MathSearch.alias.php'; 
+$wgExtensionMessagesFiles['MathSearch'] = $dir . 'MathSearch.i18n.php';
+$wgExtensionMessagesFiles['MathSearchAlias'] = $dir . 'MathSearch.alias.php';
 
 $wgSpecialPageGroups['MathSearch'] = 'mathsearch';
 $wgSpecialPageGroups['FormulaInfo'] = 'mathsearch';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I184e4e71d5c2f8307440dc994981dd241db87782
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
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] Added titles= parameter for Special:ViewXML, in the manner... - change (mediawiki...DataTransfer)

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

Change subject: Added titles= parameter for Special:ViewXML, in the manner of 
the MW API
..


Added titles= parameter for Special:ViewXML, in the manner of the MW API

Change-Id: Ifa04765f91000bfa1874ab12b2858a8c81527375
---
M specials/DT_ViewXML.php
1 file changed, 16 insertions(+), 1 deletion(-)

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



diff --git a/specials/DT_ViewXML.php b/specials/DT_ViewXML.php
index bbf1593..e2e2474 100644
--- a/specials/DT_ViewXML.php
+++ b/specials/DT_ViewXML.php
@@ -268,7 +268,8 @@
$form_submitted = false;
$cats = $wgRequest-getArray( 'categories' );
$nses = $wgRequest-getArray( 'namespaces' );
-   if ( count( $cats )  0 || count( $nses )  0 ) {
+   $requestedTitles = $wgRequest-getVal( 'titles' );
+   if ( count( $cats )  0 || count( $nses )  0 || 
$requestedTitles != null ) {
$form_submitted = true;
}
 
@@ -323,6 +324,20 @@
$text .= /$namespace_str\n;
}
}
+
+   // The user can specify a set of page names to view
+   // the XML of, using a titles= parameter, separated
+   // by |, in the manner of the MediaWiki API.
+   // Hm... perhaps all of Special:ViewXML should just
+   // be replaced by an API action?
+   if ( $requestedTitles ) {
+   $pageNames = explode( '|', $requestedTitles );
+   foreach ( $pageNames as $pageName ) {
+   $title = Title::newFromText( $pageName 
);
+   $text .= self::getXMLForPage( $title, 
$simplified_format, $groupings );
+   }
+   }
+
$text .= /$pages_str;
print $text;
} else {

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

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

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


[MediaWiki-commits] [Gerrit] New version: 0.1.8 - change (mediawiki...AdminLinks)

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

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


Change subject: New version: 0.1.8
..

New version: 0.1.8

Change-Id: I5082ad5a9366159704eb5041506159a4ed90bc9e
---
M AdminLinks.php
M README
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/AdminLinks.php b/AdminLinks.php
index 34714ba..0123443 100644
--- a/AdminLinks.php
+++ b/AdminLinks.php
@@ -11,7 +11,7 @@
 $wgExtensionCredits['specialpage'][] = array(
'path' = __FILE__,
'name' = 'Admin Links',
-   'version' = '0.1.7',
+   'version' = '0.1.8',
'author' = 'Yaron Koren',
'url' = 'https://www.mediawiki.org/wiki/Extension:Admin_Links',
'descriptionmsg' = 'adminlinks-desc',
diff --git a/README b/README
index 819c5ec..b34d478 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 Admin Links extension
 
-Version 0.1.7
+Version 0.1.8
 Yaron Koren
 
 This is free software licensed under the GNU General Public License. Please
@@ -25,8 +25,8 @@
 
 == Requirements ==
 
-This version of the Admin Links extension requires MediaWiki 1.18 or higher and
-php 5.3.0 or later.
+This version of the Admin Links extension requires MediaWiki 1.18 or higher
+and PHP 5.3.0 or later.
 
 == Installation ==
 

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

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

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


[MediaWiki-commits] [Gerrit] Lint mediawiki_singlenode module - change (operations/puppet)

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

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


Change subject: Lint mediawiki_singlenode module
..

Lint mediawiki_singlenode module

I'd like to migrate some patches from MediaWiki-Vagrant to this module. But
first -- code style!

- Single quotes unless interpolating variable.
- 'ensure' should be the first parameter, if present, per Puppet style guide.
- When resources are specified as dependencies, every word needs to be
  capitalized ('Git::Clone').
- I assumed 'hostname' and 'labs_mediawiki_hostname' are defined in top scope
  and thus specified them as '$::hostname' and '$::labs_mediawiki_hostname'.
- Other misc. things suggested by puppet-lint and the puppet style guide.

I haven't tested this, sorry.

Change-Id: Ib39a9b5a39ea443cba15f472694fca99d01a12b9
---
M modules/mediawiki_singlenode/manifests/init.pp
M modules/mediawiki_singlenode/manifests/mw-extension.pp
2 files changed, 89 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/61787/1

diff --git a/modules/mediawiki_singlenode/manifests/init.pp 
b/modules/mediawiki_singlenode/manifests/init.pp
index 96e38e9..8cba858 100644
--- a/modules/mediawiki_singlenode/manifests/init.pp
+++ b/modules/mediawiki_singlenode/manifests/init.pp
@@ -1,4 +1,4 @@
-# A one-step class for setting up a single-node MediaWiki install,
+#  A one-step class for setting up a single-node MediaWiki install,
 #  running from a Git tree.
 #
 #  Roles can insert additional lines into LocalSettings.php via the
@@ -11,130 +11,134 @@
 #  served by creating an additional template and including that via 
$role_requires.
 #
 #  Memcached memory usage defaults to 128 megs but can be changed via 
$memcached_size.
-class mediawiki_singlenode( $ensure = 'present',
- $database_name = testwiki,
- $wiki_name = testwiki,
- $role_requires = [],
- $install_path = /srv/mediawiki,
- $role_config_lines = [],
- $memcached_size = 128) {
-require role::labs-mysql-server,
-   webserver::php5-mysql,
-   webserver::php5
+class mediawiki_singlenode(
+   $ensure= 'present',
+   $database_name = 'testwiki',
+   $wiki_name = 'testwiki',
+   $role_requires = [],
+   $install_path  = '/srv/mediawiki',
+   $role_config_lines = [],
+   $memcached_size= 128
+) {
+   require role::labs-mysql-server
+   require webserver::php5-mysql
+   require webserver::php5
 
-   package { [ imagemagick, php-apc,  ] :
-   ensure = latest
+   package { [ 'imagemagick', 'php-apc' ] :
+   ensure = latest,
}
 
-   class { memcached:
-   memcached_ip = 127.0.0.1,
-   memcached_size = $memcached_size }
+   class { 'memcached':
+   memcached_ip   = '127.0.0.1',
+   memcached_size = $memcached_size,
+   }
 
-   git::clone { mediawiki:
+   git::clone { 'mediawiki':
+   ensure= $ensure,
directory = $install_path,
-   branch = master,
-   timeout = 1800,
-   ensure = $ensure,
-   origin = https://gerrit.wikimedia.org/r/p/mediawiki/core.git;;
+   branch= 'master',
+   timeout   = 1800,
+   origin= 
'https://gerrit.wikimedia.org/r/p/mediawiki/core.git',
}
 
-# get the extensions
-   mw-extension { [ Nuke, SpamBlacklist, ConfirmEdit ]:
-   require = Git::Clone[mediawiki],
-   ensure = $ensure,
-   install_path = $install_path;
+   mw-extension { [ 'Nuke', 'SpamBlacklist', 'ConfirmEdit' ]:
+   ensure   = $ensure,
+   install_path = $install_path,
}
 
-   file {
-   /etc/apache2/sites-available/wiki:
-   mode = 644,
-   owner = root,
-   group = root,
-   content = 
template('mediawiki_singlenode/simplewiki.wmflabs.org'),
-   ensure = present;
+   file { '/etc/apache2/sites-available/wiki':
+   ensure  = present,
+   owner   = root,
+   group   = root,
+   mode= '0644',
+   content = 
template('mediawiki_singlenode/simplewiki.wmflabs.org'),
}
 
-   file { /var/www/srv:
-   ensure = 'directory';
+   file { '/var/www/srv':
+   ensure = directory,
}
 
file { /var/www/${install_path}:
-   require = [File['/var/www/srv'], git::clone['mediawiki']],
-   ensure = 'link',
-   target = $install_path;
+   ensure  = 

[MediaWiki-commits] [Gerrit] Allow any project member to create a service group. - change (mediawiki...OpenStackManager)

2013-05-01 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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


Change subject: Allow any project member to create a service group.
..

Allow any project member to create a service group.

Change-Id: I0eca5485f42d3357de66b4802b4931f1fe66684e
---
M special/SpecialNovaProject.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/special/SpecialNovaProject.php b/special/SpecialNovaProject.php
index 16ae11a..d85f5b0 100644
--- a/special/SpecialNovaProject.php
+++ b/special/SpecialNovaProject.php
@@ -144,8 +144,8 @@
$this-getOutput()-setPagetitle( $this-msg( 
'openstackmanager-addservicegroup' ) );
 
$project = $this-getRequest()-getText( 'projectname' );
-   if ( ! $this-userLDAP-inRole( 'projectadmin', $project ) ) {
-   $this-notInRole( 'projectadmin' );
+   if ( !$this-userCanExecute( $this-getUser() )  
!$this-userLDAP-inProject( $projectname ) ) {
+   $this-notInProject();
return false;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0eca5485f42d3357de66b4802b4931f1fe66684e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] New version: 0.1.8 - change (mediawiki...AdminLinks)

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

Change subject: New version: 0.1.8
..


New version: 0.1.8

Change-Id: I5082ad5a9366159704eb5041506159a4ed90bc9e
---
M AdminLinks.php
M README
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/AdminLinks.php b/AdminLinks.php
index 34714ba..0123443 100644
--- a/AdminLinks.php
+++ b/AdminLinks.php
@@ -11,7 +11,7 @@
 $wgExtensionCredits['specialpage'][] = array(
'path' = __FILE__,
'name' = 'Admin Links',
-   'version' = '0.1.7',
+   'version' = '0.1.8',
'author' = 'Yaron Koren',
'url' = 'https://www.mediawiki.org/wiki/Extension:Admin_Links',
'descriptionmsg' = 'adminlinks-desc',
diff --git a/README b/README
index 819c5ec..b34d478 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 Admin Links extension
 
-Version 0.1.7
+Version 0.1.8
 Yaron Koren
 
 This is free software licensed under the GNU General Public License. Please
@@ -25,8 +25,8 @@
 
 == Requirements ==
 
-This version of the Admin Links extension requires MediaWiki 1.18 or higher and
-php 5.3.0 or later.
+This version of the Admin Links extension requires MediaWiki 1.18 or higher
+and PHP 5.3.0 or later.
 
 == Installation ==
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5082ad5a9366159704eb5041506159a4ed90bc9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AdminLinks
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren yaro...@gmail.com
Gerrit-Reviewer: Yaron Koren yaro...@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] Allow any project member to create a service group. - change (mediawiki...OpenStackManager)

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

Change subject: Allow any project member to create a service group.
..


Allow any project member to create a service group.

Change-Id: I0eca5485f42d3357de66b4802b4931f1fe66684e
---
M special/SpecialNovaProject.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/special/SpecialNovaProject.php b/special/SpecialNovaProject.php
index 16ae11a..d85f5b0 100644
--- a/special/SpecialNovaProject.php
+++ b/special/SpecialNovaProject.php
@@ -144,8 +144,8 @@
$this-getOutput()-setPagetitle( $this-msg( 
'openstackmanager-addservicegroup' ) );
 
$project = $this-getRequest()-getText( 'projectname' );
-   if ( ! $this-userLDAP-inRole( 'projectadmin', $project ) ) {
-   $this-notInRole( 'projectadmin' );
+   if ( !$this-userCanExecute( $this-getUser() )  
!$this-userLDAP-inProject( $projectname ) ) {
+   $this-notInProject();
return false;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0eca5485f42d3357de66b4802b4931f1fe66684e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott abog...@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] cswiktionary: Set display title restriction - change (operations/mediawiki-config)

2013-05-01 Thread Danny B. (Code Review)
Danny B. has uploaded a new change for review.

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


Change subject: cswiktionary: Set display title restriction
..

cswiktionary: Set display title restriction

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f03ea2d..97dfe58 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9080,6 +9080,7 @@
'bnwikibooks' = false,
'bdwikimedia' = false,
'bpywiki' = false,
+   'cswiktionary' = false,
'enwikibooks' = false,
'rmwiki' = false,
'wikimania' = false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ff8568bd9670a261dae085807747f249941000a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Danny B. dann...@email.cz

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


[MediaWiki-commits] [Gerrit] Declare mediawiki.api as dependency for ext.openstack module - change (mediawiki...OpenStackManager)

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

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


Change subject: Declare mediawiki.api as dependency for ext.openstack module
..

Declare mediawiki.api as dependency for ext.openstack module

Fixes a TypeError in production.

Change-Id: If5763da02ff52b41b927af88a2e46ee28df89a7e
---
M OpenStackManager.php
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/OpenStackManager.php b/OpenStackManager.php
index 7554fef..a4c668b 100644
--- a/OpenStackManager.php
+++ b/OpenStackManager.php
@@ -212,7 +212,10 @@
 
 $wgResourceModules['ext.openstack'] = array(
'styles' = 'ext.openstack.css',
-   'dependencies' = array( 'jquery.spinner' ),
+   'dependencies' = array(
+   'jquery.spinner',
+   'mediawiki.api',
+   ),
'messages' = array( 'openstackmanager-rebootinstancefailed', 
'openstackmanager-rebootedinstance' ),
'scripts' = array(
'ext.openstack.Instance.js',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5763da02ff52b41b927af88a2e46ee28df89a7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Making sure IP users get orange bar notificaitons - change (mediawiki...Echo)

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

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


Change subject: Making sure IP users get orange bar notificaitons
..

Making sure IP users get orange bar notificaitons

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


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

diff --git a/Hooks.php b/Hooks.php
index 5646e75..33a3f02 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -665,7 +665,8 @@
global $wgEchoNotifications;
// If the user has the notifications flyout turned on and is 
receiving
// notifications for talk page messages, disable the 
orange-bar-style notice.
-   if ( $recipient-getOption( 'echo-notify-show-link' )
+   if ( $recipient-isLoggedIn()
+$recipient-getOption( 'echo-notify-show-link' )
 isset( $wgEchoNotifications['edit-user-talk'] )
) {
// hide orange bar

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

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

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


[MediaWiki-commits] [Gerrit] Declare mediawiki.api as dependency for ext.openstack module - change (mediawiki...OpenStackManager)

2013-05-01 Thread Ryan Lane (Code Review)
Ryan Lane has submitted this change and it was merged.

Change subject: Declare mediawiki.api as dependency for ext.openstack module
..


Declare mediawiki.api as dependency for ext.openstack module

Fixes a TypeError in production.

Change-Id: If5763da02ff52b41b927af88a2e46ee28df89a7e
---
M OpenStackManager.php
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Ryan Lane: Verified; Looks good to me, approved



diff --git a/OpenStackManager.php b/OpenStackManager.php
index 7554fef..a4c668b 100644
--- a/OpenStackManager.php
+++ b/OpenStackManager.php
@@ -212,7 +212,10 @@
 
 $wgResourceModules['ext.openstack'] = array(
'styles' = 'ext.openstack.css',
-   'dependencies' = array( 'jquery.spinner' ),
+   'dependencies' = array(
+   'jquery.spinner',
+   'mediawiki.api',
+   ),
'messages' = array( 'openstackmanager-rebootinstancefailed', 
'openstackmanager-rebootedinstance' ),
'scripts' = array(
'ext.openstack.Instance.js',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5763da02ff52b41b927af88a2e46ee28df89a7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Test scenarios for the buttons in the editing area of Transl... - change (qa/browsertests)

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

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


Change subject: Test scenarios for the buttons in the editing area of Translate 
UX
..

Test scenarios for the buttons in the editing area of Translate UX

New set of test scenarios for some of the buttons present around the edit area 
which are visible to the users when they use the TUX editor to translate 
messages.

Change-Id: I5c4c5a30d7076851640fad16b659a746b925219b
---
A features/translate_edit_inputbox_buttons.feature
1 file changed, 53 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/92/61792/1

diff --git a/features/translate_edit_inputbox_buttons.feature 
b/features/translate_edit_inputbox_buttons.feature
new file mode 100644
index 000..d047631
--- /dev/null
+++ b/features/translate_edit_inputbox_buttons.feature
@@ -0,0 +1,53 @@
+Feature: Translate editor input area buttons
+
+  Background:
+   Given that I am logged in
+ And within the Translate Editor in List View
+
+  Scenario: Edit area will be opened
+   When I click on the ‘Edit’ link at the end of the row
+   Then the Editing area will be opened
+
+  Scenario: Button to copy source text will be displayed
+   When I click on the ‘Edit’ link at the end of the row to open the editing 
area
+   Then the ‘Paste source text’ button will be displayed at the bottom
+
+  Scenario: Button to copy source text will be activated
+   When I click on the ‘Edit’ link at the end of the row to open the editing 
area
+   Then the displayed ‘Paste source text’ button is in the active state
+
+  Scenario: Source text will be copied
+   When I open the editing area
+ And click on the ‘Paste Source Text’ link
+   Then the source message text will be copied into the edit input box
+ And replace any existing text
+
+  Scenario: Editing area of the next message should be opened on save
+   When I open the editing area
+ And type text in the input area
+ And click on the ‘Save Translation’ button
+   Then the editing area of the next message should be opened
+
+  Scenario: Button to save translation should be activated after typing
+   When I open the editing area
+ And click inside the editor
+ And write a character of text
+   Then the ‘Save translation’ button should be activated
+
+  Scenario: Button to save translation should be activated after copying source
+   When I open the editing area
+ And click on the ‘Paste Source Text’ link
+ And copy the source message into the edit input box
+   Then the ‘Save translation’ button should be activated
+
+  Scenario: Button to skip to the next message should be activated
+   When I click on the ‘Edit’ link at the end of the row to open the editing 
area
+   Then the ‘Skip to next’ button should be activated
+
+ Scenario: Arrow button to expand the editing area should be displayed
+   When I click on the ‘Edit’ link at the end of the row to open the editing 
area
+   Then a small arrow button pointing towards the right side of the screen 
should be displayed
+
+ Scenario: Editing area should be expanded
+   When I click on the small arrow button pointing towards the right side of 
the screen
+   Then the editing area should expand in width

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c4c5a30d7076851640fad16b659a746b925219b
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Arrbee run...@gmail.com

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


[MediaWiki-commits] [Gerrit] Making sure IP users get orange bar notificaitons - change (mediawiki...Echo)

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

Change subject: Making sure IP users get orange bar notificaitons
..


Making sure IP users get orange bar notificaitons

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

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



diff --git a/Hooks.php b/Hooks.php
index 5646e75..33a3f02 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -665,7 +665,8 @@
global $wgEchoNotifications;
// If the user has the notifications flyout turned on and is 
receiving
// notifications for talk page messages, disable the 
orange-bar-style notice.
-   if ( $recipient-getOption( 'echo-notify-show-link' )
+   if ( $recipient-isLoggedIn()
+$recipient-getOption( 'echo-notify-show-link' )
 isset( $wgEchoNotifications['edit-user-talk'] )
) {
// hide orange bar

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec38c8458fad43997239ef8aea87b1166a481bb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@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] latest release is wm10 not wm8 in our apt repo - change (operations/puppet)

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

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


Change subject: latest release is wm10 not wm8 in our apt repo
..

latest release is wm10 not wm8 in our apt repo

Change-Id: I9b85637b5d625c6d96cdad883e13fcc252ae430c
---
M manifests/role/cache.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/61793/1

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index c80b6b9..4c6b3ee 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -552,7 +552,7 @@
 
include lvs::configuration, role::cache::configuration
 
-   class { varnish::packages: version = 3.0.3plus~rc1-wm8 }
+   class { varnish::packages: version = 3.0.3plus~rc1-wm10 }
 
class { lvs::realserver: realserver_ips = 
$lvs::configuration::lvs_service_ips[$::realm]['bits'][$::site] }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b85637b5d625c6d96cdad883e13fcc252ae430c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr lc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] latest release is wm10 not wm8 in our apt repo - change (operations/puppet)

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

Change subject: latest release is wm10 not wm8 in our apt repo
..


latest release is wm10 not wm8 in our apt repo

Change-Id: I9b85637b5d625c6d96cdad883e13fcc252ae430c
---
M manifests/role/cache.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index c80b6b9..4c6b3ee 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -552,7 +552,7 @@
 
include lvs::configuration, role::cache::configuration
 
-   class { varnish::packages: version = 3.0.3plus~rc1-wm8 }
+   class { varnish::packages: version = 3.0.3plus~rc1-wm10 }
 
class { lvs::realserver: realserver_ips = 
$lvs::configuration::lvs_service_ips[$::realm]['bits'][$::site] }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b85637b5d625c6d96cdad883e13fcc252ae430c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr lc...@wikimedia.org
Gerrit-Reviewer: Lcarr lc...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


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

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

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


Change subject: Update Echo to master
..

Update Echo to master

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


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

diff --git a/extensions/Echo b/extensions/Echo
index 8250b8e..ae4d295 16
--- a/extensions/Echo
+++ b/extensions/Echo
-Subproject commit 8250b8ef61317a8235d886f46c4c7f1a9e37a2c8
+Subproject commit ae4d295dc8c152777575c36225387fb92d2afc64

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e271a7ec14eec849c6d1b465d42ee049e2ce4f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf2
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] Don't add 'suppress' to $wgLogTypes - change (mediawiki...ArticleFeedbackv5)

2013-05-01 Thread Petr Onderka (Code Review)
Petr Onderka has uploaded a new change for review.

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


Change subject: Don't add 'suppress' to $wgLogTypes
..

Don't add 'suppress' to $wgLogTypes

The value 'suppress' is already contained in $wgLogtyoes by default,
so this extension shouldn't add it there too.

Bug: 47944
Change-Id: I850f0f179b2b681ed50655b5b1b545fb311ee25e
---
M ArticleFeedbackv5.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/ArticleFeedbackv5.php b/ArticleFeedbackv5.php
index 79a8737..1729bc6 100644
--- a/ArticleFeedbackv5.php
+++ b/ArticleFeedbackv5.php
@@ -455,7 +455,6 @@
 
 // Logging
 $wgLogTypes[] = 'articlefeedbackv5';
-$wgLogTypes[] = 'suppress';
 
 // register log handler for feedback submission
 $wgLogActionsHandlers['articlefeedbackv5/create'] = 
'ArticleFeedbackv5LogFormatter';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I850f0f179b2b681ed50655b5b1b545fb311ee25e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: Petr Onderka gsv...@gmail.com

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


[MediaWiki-commits] [Gerrit] Lint mediawiki_singlenode module - change (operations/puppet)

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

Change subject: Lint mediawiki_singlenode module
..


Lint mediawiki_singlenode module

I'd like to migrate some patches from MediaWiki-Vagrant to this module. But
first -- code style!

- Single quotes unless interpolating variable.
- 'ensure' should be the first parameter, if present, per Puppet style guide.
- When resources are specified as dependencies, every word needs to be
  capitalized ('Git::Clone').
- I assumed 'hostname' and 'labs_mediawiki_hostname' are defined in top scope
  and thus specified them as '$::hostname' and '$::labs_mediawiki_hostname'.
- Other misc. things suggested by puppet-lint and the puppet style guide.

I haven't tested this, sorry.

Change-Id: Ib39a9b5a39ea443cba15f472694fca99d01a12b9
---
M modules/mediawiki_singlenode/manifests/init.pp
M modules/mediawiki_singlenode/manifests/mw-extension.pp
2 files changed, 89 insertions(+), 85 deletions(-)

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



diff --git a/modules/mediawiki_singlenode/manifests/init.pp 
b/modules/mediawiki_singlenode/manifests/init.pp
index 96e38e9..8cba858 100644
--- a/modules/mediawiki_singlenode/manifests/init.pp
+++ b/modules/mediawiki_singlenode/manifests/init.pp
@@ -1,4 +1,4 @@
-# A one-step class for setting up a single-node MediaWiki install,
+#  A one-step class for setting up a single-node MediaWiki install,
 #  running from a Git tree.
 #
 #  Roles can insert additional lines into LocalSettings.php via the
@@ -11,130 +11,134 @@
 #  served by creating an additional template and including that via 
$role_requires.
 #
 #  Memcached memory usage defaults to 128 megs but can be changed via 
$memcached_size.
-class mediawiki_singlenode( $ensure = 'present',
- $database_name = testwiki,
- $wiki_name = testwiki,
- $role_requires = [],
- $install_path = /srv/mediawiki,
- $role_config_lines = [],
- $memcached_size = 128) {
-require role::labs-mysql-server,
-   webserver::php5-mysql,
-   webserver::php5
+class mediawiki_singlenode(
+   $ensure= 'present',
+   $database_name = 'testwiki',
+   $wiki_name = 'testwiki',
+   $role_requires = [],
+   $install_path  = '/srv/mediawiki',
+   $role_config_lines = [],
+   $memcached_size= 128
+) {
+   require role::labs-mysql-server
+   require webserver::php5-mysql
+   require webserver::php5
 
-   package { [ imagemagick, php-apc,  ] :
-   ensure = latest
+   package { [ 'imagemagick', 'php-apc' ] :
+   ensure = latest,
}
 
-   class { memcached:
-   memcached_ip = 127.0.0.1,
-   memcached_size = $memcached_size }
+   class { 'memcached':
+   memcached_ip   = '127.0.0.1',
+   memcached_size = $memcached_size,
+   }
 
-   git::clone { mediawiki:
+   git::clone { 'mediawiki':
+   ensure= $ensure,
directory = $install_path,
-   branch = master,
-   timeout = 1800,
-   ensure = $ensure,
-   origin = https://gerrit.wikimedia.org/r/p/mediawiki/core.git;;
+   branch= 'master',
+   timeout   = 1800,
+   origin= 
'https://gerrit.wikimedia.org/r/p/mediawiki/core.git',
}
 
-# get the extensions
-   mw-extension { [ Nuke, SpamBlacklist, ConfirmEdit ]:
-   require = Git::Clone[mediawiki],
-   ensure = $ensure,
-   install_path = $install_path;
+   mw-extension { [ 'Nuke', 'SpamBlacklist', 'ConfirmEdit' ]:
+   ensure   = $ensure,
+   install_path = $install_path,
}
 
-   file {
-   /etc/apache2/sites-available/wiki:
-   mode = 644,
-   owner = root,
-   group = root,
-   content = 
template('mediawiki_singlenode/simplewiki.wmflabs.org'),
-   ensure = present;
+   file { '/etc/apache2/sites-available/wiki':
+   ensure  = present,
+   owner   = root,
+   group   = root,
+   mode= '0644',
+   content = 
template('mediawiki_singlenode/simplewiki.wmflabs.org'),
}
 
-   file { /var/www/srv:
-   ensure = 'directory';
+   file { '/var/www/srv':
+   ensure = directory,
}
 
file { /var/www/${install_path}:
-   require = [File['/var/www/srv'], git::clone['mediawiki']],
-   ensure = 'link',
-   target = $install_path;
+   ensure  = link,
+   

[MediaWiki-commits] [Gerrit] Add README and update dependencies - change (operations/puppet)

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

Change subject: Add README and update dependencies
..


Add README and update dependencies

* Mention 'netaddr' dependency in files/tcpircbot.py's docblock.
* Add README

Change-Id: I9189665af05ddcd05c3baf917351d6802b82b397
---
A modules/tcpircbot/README
M modules/tcpircbot/files/tcpircbot.py
2 files changed, 40 insertions(+), 2 deletions(-)

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



diff --git a/modules/tcpircbot/README b/modules/tcpircbot/README
new file mode 100644
index 000..dacb567
--- /dev/null
+++ b/modules/tcpircbot/README
@@ -0,0 +1,30 @@
+tcpircbot
+-
+
+This Puppet module configures a Python script that runs as an Upstart service
+and forwards messages from a TCP socket to an IRC channel. It thus functions as
+a relay for intranet hosts that need to emit IRC notifications.
+
+By default, it will connect to Freenode using SSL and listen for incoming
+connections on port 9200. If the configuration specifies a CIDR range, only
+clients within that range are allowed to connect. The default behavior is to
+allow clients from private and loopback IPs only.
+
+The defaults are sane and fit the most common use-case. There are three values
+which you must specify: a nickname for your bot, a nickserv password for that
+nickname, and a channel name. The nickname can be specified as the resource
+name. A typical configuration looks like this:
+
+   node mynode {
+   include tcpircbot
+
+   tcpircbot::instance { 'announcebot':
+   channel  = '#wikimedia-operations',
+   password = $passwords::irc::announcebot,
+   }
+   }
+
+Additional configuration options are documented in manifests/init.pp and
+manifests/instance.pp.
+
+To troubleshoot, check /var/log/upstart/tcpircbot-*.log.
diff --git a/modules/tcpircbot/files/tcpircbot.py 
b/modules/tcpircbot/files/tcpircbot.py
index 68129f7..b66c722 100755
--- a/modules/tcpircbot/files/tcpircbot.py
+++ b/modules/tcpircbot/files/tcpircbot.py
@@ -22,8 +22,16 @@
   }
   }
 
-Requires irclib =0.4.8 http://bitbucket.org/jaraco/irc
-Available in Ubuntu as 'python-irclib'
+Requirements:
+ * irclib =0.4.8
+   http://bitbucket.org/jaraco/irc
+   Ubuntu package: 'python-irclib'
+ * netaddr =0.7.5
+   https://pypi.python.org/pypi/netaddr
+   Ubuntu package: 'python-netaddr'
+
+The Puppet module bundled with this script will manage these
+dependencies for you.
 
 
 import sys

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9189665af05ddcd05c3baf917351d6802b82b397
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Lcarr lc...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] WIP - Quickly enable/disable AFTv5 - change (mediawiki...ArticleFeedbackv5)

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

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


Change subject: WIP - Quickly enable/disable AFTv5
..

WIP - Quickly enable/disable AFTv5

@todo:
* Enable/disable ajax links in toolbox, on article page
* Make Special page message pretty

Change-Id: I7029a628ba724ba53f3aaebbf98e3d652c823464
---
M ArticleFeedbackv5.hooks.php
M ArticleFeedbackv5.i18n.php
M ArticleFeedbackv5.php
M SpecialArticleFeedbackv5.php
A api/ApiSetStatusArticleFeedbackv5.php
M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.utils.js
7 files changed, 311 insertions(+), 11 deletions(-)


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

diff --git a/ArticleFeedbackv5.hooks.php b/ArticleFeedbackv5.hooks.php
index 9f2d623..d2ec8a1 100644
--- a/ArticleFeedbackv5.hooks.php
+++ b/ArticleFeedbackv5.hooks.php
@@ -751,7 +751,7 @@
$requestPermission = $wgRequest-getVal( 
'articlefeedbackv5-protection-level' );
$requestExpiry = $wgRequest-getText( 
'articlefeedbackv5-protection-expiration' );
$requestExpirySelection = $wgRequest-getVal( 
'articlefeedbackv5-protection-expiration-selection' );
-
+/*
// fetch permissions set to edit page ans make sure that AFT 
permissions are no tighter than these
$editPermission = $article-getTitle()-getRestrictions( 'edit' 
);
if ( !$editPermission ) {
@@ -762,7 +762,7 @@
$errorMsg .= wfMessage( 
'articlefeedbackv5-protection-level-error' )-escaped();
return false;
}
-
+*/
if ( $requestExpirySelection == 'existing' ) {
$expirationTime = 
ArticleFeedbackv5Permissions::getRestriction( $article-getId() )-pr_expiry;
} else {
diff --git a/ArticleFeedbackv5.i18n.php b/ArticleFeedbackv5.i18n.php
index e63e822..be7df70 100644
--- a/ArticleFeedbackv5.i18n.php
+++ b/ArticleFeedbackv5.i18n.php
@@ -70,6 +70,14 @@
'articlefeedbackv5-protection-permission-member' = 'Enable for 
logged-in users only',
'articlefeedbackv5-protection-permission-editor' = 'Enable for 
autoconfirmed users only',
'articlefeedbackv5-protection-permission-administrator' = 'Enable for 
administrators only',
+   'articlefeedbackv5-disabled' = Feedback has been disabled,
+   'articlefeedbackv5-disabled-admin-admin' = Feedback has been disabled 
for readers and editors. They can't post new feedback on this page.,
+   'articlefeedbackv5-disabled-admin-editor' = Feedback has been 
disabled for readers. They can't post new feedback on this page.,
+   'articlefeedbackv5-disabled-editor-admin' = Feedback has been 
disabled by an administrator. Readers can't post new feedback on this page.,
+   'articlefeedbackv5-disabled-editor-editor' = Feedback has been 
disabled. Readers can't post new feedback on this page.,
+   'articlefeedbackv5-disabled-reader' = Feedback has been disabled. 
Readers can't post new feedback on this page.,
+   'articlefeedbackv5-disabled-admin-button-text' = 'Change protection',
+   'articlefeedbackv5-disabled-editor-button-text' = 'Enable feedback',
 
/* My Contributions */
'articlefeedbackv5-contribs-entry' = '$1 . . $2 . . [[$3|Feedback: 
$4]] $5 $6 $7',
@@ -266,6 +274,8 @@
'articlefeedbackv5-abuse-saved' = 'Flagged as abuse',
'articlefeedbackv5-abuse-saved-tooltip' = 'Remove the flag you set',
'articlefeedbackv5-error-loading-feedback' = 'Error loading feedback',
+   'articlefeedbackv5-invalid-page-id' = 'Invalid page ID',
+   'articlefeedbackv5-insufficient-permissions' = 'Insufficient 
permission level',
'articlefeedbackv5-invalid-feedback-id' = 'Invalid feedback ID',
'articlefeedbackv5-invalid-log-id' = 'Invalid log ID',
'articlefeedbackv5-invalid-log-update' = 'Log entry could not be 
updated',
@@ -799,6 +809,14 @@
'articlefeedbackv5-protection-permission-member' = 'Dropdown menu 
option to enable AFT for registered users only',
'articlefeedbackv5-protection-permission-editor' = 'Dropdown menu 
option to enable AFT for editors only',
'articlefeedbackv5-protection-permission-administrator' = 'Dropdown 
menu option to enable AFT for administrators only',
+   'articlefeedbackv5-disabled' = 'Title for the message that article 
feedback has been disabled for this page',
+   'articlefeedbackv5-disabled-admin-admin' = 'Message, to an admin, that 
has disabled feedback for this page for both editors and readers',
+   'articlefeedbackv5-disabled-admin-editor' = 'Message, to an admin, 
that has disabled feedback for this page for readers',
+   'articlefeedbackv5-disabled-editor-admin' = Message, to an editor, 

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

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

Change subject: Update Echo to master
..


Update Echo to master

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

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



diff --git a/extensions/Echo b/extensions/Echo
index 8250b8e..ae4d295 16
--- a/extensions/Echo
+++ b/extensions/Echo
-Subproject commit 8250b8ef61317a8235d886f46c4c7f1a9e37a2c8
+Subproject commit ae4d295dc8c152777575c36225387fb92d2afc64

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e271a7ec14eec849c6d1b465d42ee049e2ce4f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf2
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@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] $wgLogTypes contains suppress twice on enwiki - change (mediawiki...ArticleFeedbackv5)

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

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


Change subject: $wgLogTypes contains suppress twice on enwiki
..

$wgLogTypes contains suppress twice on enwiki

Bug: 47944
Change-Id: I956b69762ad5888f26fb3202d372f34cdb7ed7ef
---
M ArticleFeedbackv5.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/ArticleFeedbackv5.php b/ArticleFeedbackv5.php
index 79a8737..1729bc6 100644
--- a/ArticleFeedbackv5.php
+++ b/ArticleFeedbackv5.php
@@ -455,7 +455,6 @@
 
 // Logging
 $wgLogTypes[] = 'articlefeedbackv5';
-$wgLogTypes[] = 'suppress';
 
 // register log handler for feedback submission
 $wgLogActionsHandlers['articlefeedbackv5/create'] = 
'ArticleFeedbackv5LogFormatter';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I956b69762ad5888f26fb3202d372f34cdb7ed7ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
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] WIP redirects (bug 45808). - change (mediawiki...Parsoid)

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

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


Change subject: WIP redirects (bug 45808).
..

WIP redirects (bug 45808).

Change-Id: I1bd36f32a5e46b90261895e5499a0308875e5e05
---
M js/lib/mediawiki.WikiConfig.js
M js/lib/pegTokenizer.pegjs.txt
2 files changed, 66 insertions(+), 3 deletions(-)


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

diff --git a/js/lib/mediawiki.WikiConfig.js b/js/lib/mediawiki.WikiConfig.js
index b0fdba8..65dd518 100644
--- a/js/lib/mediawiki.WikiConfig.js
+++ b/js/lib/mediawiki.WikiConfig.js
@@ -6,6 +6,12 @@
Util = require( './mediawiki.Util.js' ).Util,
request = require( 'request' );
 
+// escape 'special' characters in a regexp, returning a regexp which matches
+// the string exactly
+var re_escape = function(s) {
+   return s.replace(/[\^\\$*+?.()|{}\[\]]/g, '\\$');
+};
+
 /**
  * @class
  *
@@ -105,6 +111,11 @@
conf.magicWords[alias] = mw.name;
conf.mwAliases[mw.name].push( alias );
}
+   conf.mwRegexps[mw.name] =
+   new RegExp( '^(' +
+   
conf.mwAliases[mw.name].map(re_escape).join('|') +
+   ')$',
+   mw['case-sensitive'] === '' ? 
'' : 'i' );
}
 
if ( mws.length  0 ) {
@@ -274,6 +285,11 @@
mwAliases: null,
 
/**
+* @property {Object/null} mwRegexp RegExp matching aliases, indexed by 
canonical magic word name.
+*/
+   mwRegexps: null,
+
+   /**
 * @property {Object/null} specialPages Special page names on this 
wiki, indexed by aliases.
 */
specialPages: null,
@@ -318,6 +334,7 @@
this.namespaceIds = {};
this.magicWords = {};
this.mwAliases = {};
+   this.mwRegexps = {};
this.specialPages = {};
this.extensionTags = {};
this.interpolatedList = [];
@@ -336,8 +353,21 @@
 * @param {string} alias
 * @returns {string}
 */
-   getMagicWord: function ( alias ) {
+   getMagicWordIdFromAlias: function ( alias ) {
return this.magicWords[alias] || null;
+   },
+
+   /**
+* @method
+*
+* Get a regexp matching a localized magic word, given its id.
+*
+* @param {string} id
+* @return {RegExp}
+*/
+   getMagicWordMatcher: function ( id ) {
+   // if 'id' is not found, return a regexp which will never match.
+   return this.mwRegexps[id] || /[]/;
},
 
/**
@@ -369,7 +399,7 @@
if ( alias === null ) {
return null;
}
-   canonical = this.getMagicWord( alias );
+   canonical = this.getMagicWordIdFromAlias( alias 
);
if ( canonical !== null ) {
return { k: canonical, v: value, a: 
alias };
}
diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt
index d6f8ddc..475b932 100644
--- a/js/lib/pegTokenizer.pegjs.txt
+++ b/js/lib/pegTokenizer.pegjs.txt
@@ -315,6 +315,11 @@
 // cache the input length
 var inputLength = input.length;
 
+// pseudo-production that matches at start of input
+var isSOF = function (pos) {
+return pos === 0;
+};
+
 // pseudo-production that matches at end of input
 var isEOF = function (pos) {
 return pos === inputLength;
@@ -451,6 +456,25 @@
   }
 
 /*
+ * Redirects can only occur as the first thing in a document.  See
+ * WikitextContent::getRedirectTarget()
+ * The matcher uses a regexp with \s, which is the php_space production.
+ */
+redirect
+  = sof redirect_word php_space* ( : php_space* )? wl:wikilink {
+// XXX do something here
+return null;
+}
+
+/* The 'redirect' magic word.
+ * The leading whitespace allowed is due to the PHP trim() function.
+ */
+redirect_word = [ \t\n\r\0\x0b]* rw:(php_nonspace+)  {
+rw = rw.join('');
+return pegArgs.env.conf.wiki.getMagicWordMatcher( 'redirect' ).test( rw );
+}
+
+/*
  * This production exists to support tokenizing the document in chunks.
  * It stops tokenization after each block and yields to the node.js
  * event-loop to schedule other pending event handlers.
@@ -538,7 +562,8 @@
  * The actual contents of each block.
  */
 block
-  = block_lines
+  = redirect // has to be first; otherwise gets parsed as a ol
+/ block_lines
 /  '' r:( pre // tag variant can start anywhere
 / comment eolf
 / nowiki
@@ -2169,6 +2194,12 

[MediaWiki-commits] [Gerrit] Don't ignore data-parsoid in DOMDiff - change (mediawiki...Parsoid)

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

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


Change subject: Don't ignore data-parsoid in DOMDiff
..

Don't ignore data-parsoid in DOMDiff

* In VE, sometimes wrappers get moved around without their content
  which can cause p-wrapper of deleted content to be used on
  identical undeleted content.  Since the identical undeleted content
  is marked as unchanged, selser tries to emit use dsr from its wrapper
  to emit original src, but the wrapper is not the right one and leads
  selser to emit more/less text depending on how VE manipulated the
  wrappers.

  Discovered via: /mnt/bugs/2013-05-01T09:43:14.960Z-Reverse_innovation

* Unrelated fixes: Updated debugging output in DOMDiff.

* Tested via:

node parse --html2wt --selser --domdiff domdiff.diff.html --oldtextfile wt  
editedHtml

   which emitted duplicate text before this patch and emits correct
   text after this patch.

* parserTests results:
  - Inexplicably, this patch causes selser to reuse more original
source fragments on parserTests.

  -  Leads to one selser test passing (which passes in wt2wt mode),
 and 3 selser tests failing (all of which fail in wt2wt mode as well).

  -  Updated blacklist.

Change-Id: I7283f649e7f32828238c1d865b83e73f1a468079
---
M js/lib/mediawiki.DOMDiff.js
M js/tests/parserTests-blacklist.js
2 files changed, 14 insertions(+), 7 deletions(-)


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

diff --git a/js/lib/mediawiki.DOMDiff.js b/js/lib/mediawiki.DOMDiff.js
index 9945454..9212b8c 100644
--- a/js/lib/mediawiki.DOMDiff.js
+++ b/js/lib/mediawiki.DOMDiff.js
@@ -46,7 +46,11 @@
// subtree actually changes.  So, ignoring this attribute in effect,
// ignores the parser tests change.
'data-parsoid-changed': 1,
-   'data-parsoid': 1,
+   // SSS: Don't ignore data-parsoid because in VE, sometimes wrappers get
+   // moved around without their content which occasionally leads to 
incorrect
+   // DSR being used by selser.  Hard to describe a reduced test case here.
+   // Discovered via: /mnt/bugs/2013-05-01T09:43:14.960Z-Reverse_innovation
+   // 'data-parsoid': 1,
'data-parsoid-diff': 1,
'about': 1
 };
@@ -151,10 +155,11 @@
 DDP.doDOMDiff = function ( baseParentNode, newParentNode ) {
var dd = this;
 
-   function debugOut(nodeA, nodeB) {
+   function debugOut(nodeA, nodeB, laPrefix) {
+   laPrefix = laPrefix || ;
if (dd.debugging) {
-   dd.debug(-- A:  + (DU.isElt(nodeA) ? nodeA.outerHTML 
: JSON.stringify(nodeA.nodeValue)));
-   dd.debug(-- B:  + (DU.isElt(nodeB) ? nodeB.outerHTML 
: JSON.stringify(nodeB.nodeValue)));
+   dd.debug(-- A + laPrefix + : + (DU.isElt(nodeA) ? 
nodeA.outerHTML : JSON.stringify(nodeA.nodeValue)));
+   dd.debug(-- B + laPrefix + : + (DU.isElt(nodeB) ? 
nodeB.outerHTML : JSON.stringify(nodeB.nodeValue)));
}
}
 
@@ -181,7 +186,7 @@
this.debug(--lookahead in new dom--);
lookaheadNode = newNode.nextSibling;
while (lookaheadNode) {
-   debugOut(baseNode, lookaheadNode);
+   debugOut(baseNode, lookaheadNode, 
new);
if (DU.isContentNode(lookaheadNode) 
this.treeEquals(baseNode, 
lookaheadNode, true))
{
@@ -205,7 +210,7 @@
this.debug(--lookahead in old dom--);
lookaheadNode = baseNode.nextSibling;
while (lookaheadNode) {
-   debugOut(lookaheadNode, newNode);
+   debugOut(lookaheadNode, newNode, old);
if (DU.isContentNode(lookaheadNode) 
this.treeEquals(lookaheadNode, 
newNode, true))
{
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index 222ac5a..3e1ab47 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -1955,7 +1955,6 @@
 
 
 // Blacklist for selser
-add(selser, Italics and bold [[3,4,3,[0,[0);
 add(selser, Italics and bold: 2-quote opening sequence: (2,3) [2]);
 add(selser, Italics and bold: 2-quote opening sequence: (2,3) [[[0]]]);
 add(selser, Italics and bold: 2-quote opening sequence: (2,3) [4]);
@@ -2090,6 +2089,7 @@
 add(selser, nowiki inside pre (bug 13238) [4,0,[0,2,0]]);
 add(selser, nowiki inside pre (bug 13238) [1,0,[0,0]]);
 add(selser, nowiki 

[MediaWiki-commits] [Gerrit] SECURITY: Check SVG xml encoding against whitelist - change (mediawiki/core)

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

Change subject: SECURITY: Check SVG xml encoding against whitelist
..


SECURITY: Check SVG xml encoding against whitelist

Some browsers will interpret obscure xml encodings as UTF-8, while
PHP/expat will interpret the given encoding in the xml declaration.


bug: 47304
Change-Id: I3b311a7078d977ae89c51e95e625d79fba183cfc
---
M includes/upload/UploadBase.php
1 file changed, 67 insertions(+), 0 deletions(-)

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



diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index d40b53d..3a5733c 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -46,6 +46,8 @@
protected $mBlackListedExtensions;
protected $mJavaDetected;
 
+   protected static $safeXmlEncodings = array( 'UTF-8', 'ISO-8859-1', 
'ISO-8859-2', 'UTF-16', 'UTF-32' );
+
const SUCCESS = 0;
const OK = 0;
const EMPTY_FILE = 3;
@@ -966,6 +968,15 @@
return true;
}
 
+   // Some browsers will interpret obscure xml encodings as UTF-8, 
while
+   // PHP/expat will interpret the given encoding in the xml 
declaration (bug 47304)
+   if ( $extension == 'svg' || strpos( $mime, 'image/svg' ) === 0 
) {
+   if ( self::checkXMLEncodingMissmatch( $file ) ) {
+   wfProfileOut( __METHOD__ );
+   return true;
+   }
+   }
+
/**
 * Internet Explorer for Windows performs some really stupid 
file type
 * autodetection which can cause it to interpret valid image 
files as HTML
@@ -1037,6 +1048,62 @@
return false;
}
 
+
+   /**
+* Check a whitelist of xml encodings that are known not to be 
interpreted differently
+* by the server's xml parser (expat) and some common browsers.
+*
+* @param string $file pathname to the temporary upload file
+* @return Boolean: true if the file contains an encoding that could be 
misinterpreted
+*/
+   public static function checkXMLEncodingMissmatch( $file ) {
+   global $wgSVGMetadataCutoff;
+   $contents = file_get_contents( $file, false, null, -1, 
$wgSVGMetadataCutoff );
+   $encodingRegex = '!encoding[ \t\n\r]*=[ 
\t\n\r]*[\'](.*?)[\']!si';
+
+   if ( preg_match( !\?xml\b(.*?)\?!si, $contents, $matches ) 
) {
+   if ( preg_match( $encodingRegex, $matches[1], $encMatch 
)
+!in_array( strtoupper( $encMatch[1] ), 
self::$safeXmlEncodings )
+   ) {
+   wfDebug( __METHOD__ . : Found unsafe XML 
encoding '{$encMatch[1]}'\n );
+   return true;
+   }
+   } elseif ( preg_match( !\?xml\b!si, $contents ) ) {
+   // Start of XML declaration without an end in the first 
$wgSVGMetadataCutoff
+   // bytes. There shouldn't be a legitimate reason for 
this to happen.
+   wfDebug( __METHOD__ . : Unmatched XML declaration 
start\n );
+   return true;
+   } elseif ( substr( $contents, 0, 4) == \x4C\x6F\xA7\x94 ) {
+   // EBCDIC encoded XML
+   wfDebug( __METHOD__ . : EBCDIC Encoded XML\n );
+   return true;
+   }
+
+   // It's possible the file is encoded with multi-byte encoding, 
so re-encode attempt to
+   // detect the encoding in case is specifies an encoding not 
whitelisted in self::$safeXmlEncodings
+   $attemptEncodings = array( 'UTF-16', 'UTF-16BE', 'UTF-32', 
'UTF-32BE' );
+   foreach ( $attemptEncodings as $encoding ) {
+   wfSuppressWarnings();
+   $str = iconv( $encoding, 'UTF-8', $contents );
+   wfRestoreWarnings();
+   if ( $str != ''  preg_match( !\?xml\b(.*?)\?!si, 
$str, $matches ) ) {
+   if ( preg_match( $encodingRegex, $matches[1], 
$encMatch )
+!in_array( strtoupper( $encMatch[1] 
), self::$safeXmlEncodings )
+   ) {
+   wfDebug( __METHOD__ . : Found unsafe 
XML encoding '{$encMatch[1]}'\n );
+   return true;
+   }
+   } elseif ( $str != ''  preg_match( !\?xml\b!si, 
$str ) ) {
+   // Start of XML declaration without an end in 
the first $wgSVGMetadataCutoff
+   // bytes. There shouldn't be a 

[MediaWiki-commits] [Gerrit] Adding aa_method field to track login method. - change (mediawiki...AccountAudit)

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

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


Change subject: Adding aa_method field to track login method.
..

Adding aa_method field to track login method.

Change-Id: I823c873da8670ee158eee0b00759e2df8d5ef5b2
---
M AccountAudit.body.php
M AccountAudit.hooks.php
M accountaudit.sql
3 files changed, 26 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AccountAudit 
refs/changes/01/61801/1

diff --git a/AccountAudit.body.php b/AccountAudit.body.php
index 4fe05b6..b15c1db 100644
--- a/AccountAudit.body.php
+++ b/AccountAudit.body.php
@@ -2,6 +2,9 @@
 
 class AccountAudit {
 
+   const ACCESS_METHOD_DEFAULT = 0;
+   const ACCESS_METHOD_MOBILE = 1;
+
/**
 * Updates the aa_lastlogin value for the specified user
 *
@@ -19,12 +22,18 @@
$db = wfGetDB( DB_MASTER );
$method = __METHOD__;
 
-   $db-onTransactionIdle( function() use ( $user, $now, $db, 
$method ) {
+   $requestMethod = self::ACCESS_METHOD_DEFAULT;
+   if ( MobileContext::singleton()-shouldDisplayMobileView() ) {
+   $requestMethod = self::ACCESS_METHOD_MOBILE;
+   }
+
+   $db-onTransactionIdle( function() use ( $user, $requestMethod, 
$now, $db, $method ) {
if ( $db-getType() === 'mysql' ) { // MySQL-specific 
implementation
$db-query(
INSERT INTO  . $db-tableName( 
'accountaudit_login' ) .
-   ( aa_user, aa_lastlogin ) 
VALUES ( .
+   ( aa_user, aa_method, 
aa_lastlogin ) VALUES ( .
$db-addQuotes( $user-getId() 
) . ,  .
+   $db-addQuotes( $requestMethod 
) . ,  .
$db-addQuotes( $db-timestamp( 
$now ) ) .
) ON DUPLICATE KEY UPDATE 
aa_lastlogin =  .
$db-addQuotes( $db-timestamp( 
$now ) ),
@@ -34,13 +43,17 @@
$db-update(
'accountaudit_login',
array( 'aa_lastlogin' = 
$db-timestamp( $now ) ),
-   array( 'aa_user' = $user-getId() ),
+   array( 'aa_user' = $user-getId(), 
'aa_method' = $requestMethod ),
$method
);
-   if ( $db-affectedRows() == 0 ) { // no row 
existed for that user
+   if ( $db-affectedRows() == 0 ) { // no row 
existed for that user, method
$db-insert(
'accountaudit_login',
-   array( 'aa_user' = 
$user-getId(), 'aa_lastlogin' =  $db-timestamp( $now ) ),
+   array(
+'aa_user' = 
$user-getId(),
+'aa_method' = 
$requestMethod,
+'aa_lastlogin' =  
$db-timestamp( $now )
+   ),
$method,
array( 'IGNORE', )
);
diff --git a/AccountAudit.hooks.php b/AccountAudit.hooks.php
index 8867a60..a625e9c 100644
--- a/AccountAudit.hooks.php
+++ b/AccountAudit.hooks.php
@@ -31,8 +31,9 @@
 * @return bool
 */
static function loadExtensionSchemaUpdates( DatabaseUpdater $updater ) {
-   $updater-addExtensionTable( 'accountaudit_login',
-   __DIR__ . '/accountaudit.sql', true );
+   $updater-addExtensionTable( 'accountaudit_login', __DIR__ . 
'/accountaudit.sql' );
+   $updater-addExtensionField( 'accountaudit_login', 'aa_method',
+   __DIR__ . '/patches/add_method.sql' );
return true;
}
 }
\ No newline at end of file
diff --git a/accountaudit.sql b/accountaudit.sql
index f228ffc..f36c1de 100644
--- a/accountaudit.sql
+++ b/accountaudit.sql
@@ -4,10 +4,13 @@
 --
 CREATE TABLE /*$wgDBprefix*/accountaudit_login (
   -- Key to user_id
-  aa_user int unsigned NOT NULL PRIMARY KEY,
+  aa_user int unsigned NOT NULL,
+  aa_method tinyint unsigned NOT NULL DEFAULT 0,
 
   -- This is a timestamp which is updated when a user logs in
   aa_lastlogin varbinary(14) default null
 ) /*$wgDBTableOptions*/;
 
-CREATE INDEX 

[MediaWiki-commits] [Gerrit] Add hook AbortChangePassword to Special:ChangePassword - change (mediawiki/core)

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

Change subject: Add hook AbortChangePassword to Special:ChangePassword
..


Add hook AbortChangePassword to Special:ChangePassword

Adds a consistent method for authentication extensions to block
password changing operations.

Bug: 46590
Change-Id: I3469e90a958c4fb0f24cafd67de5590d3cc2f075
---
M docs/hooks.txt
M includes/specials/SpecialChangePassword.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
4 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 2a9be04..8fb94a4 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -268,6 +268,12 @@
 $user: the User object about to be created (read-only, incomplete)
 $msg: out parameter: HTML to display on abort
 
+'AbortChangePassword': Return false to cancel password change.
+$user: the User object to which the password change is occuring
+$this-mOldpass: the old password provided by the user
+$newpass: the new password provided by the user
+$abortMsg: the message identifier for abort reason
+
 'ActionBeforeFormDisplay': before executing the HTMLForm object
 $name: name of the action
 $form: HTMLForm object
diff --git a/includes/specials/SpecialChangePassword.php 
b/includes/specials/SpecialChangePassword.php
index 41b3b25..ba728ac 100644
--- a/includes/specials/SpecialChangePassword.php
+++ b/includes/specials/SpecialChangePassword.php
@@ -221,6 +221,12 @@
throw new PasswordError( $this-msg( 'login-throttled' 
)-text() );
}
 
+   $abortMsg = 'resetpass-abort-generic';
+   if ( !wfRunHooks( 'AbortChangePassword', array( $user, 
$this-mOldpass, $newpass, $abortMsg ) ) ) {
+   wfRunHooks( 'PrefsPasswordAudit', array( $user, 
$newpass, 'abortreset' ) );
+   throw new PasswordError( $this-msg( $abortMsg 
)-text() );
+   }
+
if( !$user-checkTemporaryPassword($this-mOldpass)  
!$user-checkPassword($this-mOldpass) ) {
wfRunHooks( 'PrefsPasswordAudit', array( $user, 
$newpass, 'wrongpassword' ) );
throw new PasswordError( $this-msg( 
'resetpass-wrong-oldpass' )-text() );
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index e38be30..3a71ce6 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -1202,6 +1202,7 @@
 'oldpassword'   = 'Old password:',
 'newpassword'   = 'New password:',
 'retypenew' = 'Retype new password:',
+'resetpass-abort-generic'   = 'Password change has been aborted by an 
extension.',
 'resetpass_submit'  = 'Set password and log in',
 'resetpass_success' = 'Your password has been changed successfully!
 Now logging you in...',
diff --git a/languages/messages/MessagesQqq.php 
b/languages/messages/MessagesQqq.php
index f094138..87c10cb 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -1199,6 +1199,7 @@
 'oldpassword' = Used on the 'User profile' tab of 'my preferences'. This is 
the text next to an entry box for the old password in the 'change password' 
section.,
 'newpassword' = '{{Identical|New password}}',
 'retypenew' = Appears on the 'User profile' tab of the 'Preferences' special 
page in the 'Change password' section. It appears next to the text box for 
entering the new password a second time.,
+'resetpass-abort-generic' = 'Generic error message shown on 
[[Special:ChangePassword]] when an extension aborts a password change from a 
hook.',
 'resetpass_submit' = 'Submit button on [[Special:ChangePassword]]',
 'resetpass_success' = 'Used in [[Special:ChangePassword]].',
 'resetpass_forbidden' = Used as error message in changing password. Maybe 
the external auth plugin won't allow local password changes.,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3469e90a958c4fb0f24cafd67de5590d3cc2f075
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_20
Gerrit-Owner: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Updated release notes and version number - change (mediawiki/core)

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

Change subject: Updated release notes and version number
..


Updated release notes and version number

Change-Id: I8003f2a8a9d71eccf403d9d162ce9f3e583f0a46
---
M RELEASE-NOTES-1.20
M includes/DefaultSettings.php
2 files changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20
index 4842f3a..80b200d 100644
--- a/RELEASE-NOTES-1.20
+++ b/RELEASE-NOTES-1.20
@@ -5,11 +5,17 @@
 
 == MediaWiki 1.20.5 ==
 
-This is not a release yet!
+This is a security and maintenance release of the MediaWiki 1.20 branch.
 
-=== Changes since 1.20.5 ===
+=== Changes since 1.20.4 ===
+* (bug 46590) Add hook AbortChangePassword to Special:ChangePassword
+* (bug 47304) SECURITY: Check SVG xml encoding against whitelist
+* Localisation updates from http://translatewiki.net.
+* mwdocgen.php: Implement --version option.
+* Remove svnstat stuff used in Doxygen generation
 * (bug 43594) Correctly supress warnings that were missed after the upstream
   PHP change to E_STRICT being included in E_ALL.
+* jshint: Allow global mw to be set in mediawiki.js
 
 == MediaWiki 1.20.4 ==
 
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index ed566b3..6abc2b1 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -59,7 +59,7 @@
 $wgConf = new SiteConfiguration;
 
 /** MediaWiki version number */
-$wgVersion = '1.20.4';
+$wgVersion = '1.20.5';
 
 /** Name of the site. It must be changed in LocalSettings.php */
 $wgSitename = 'MediaWiki';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8003f2a8a9d71eccf403d9d162ce9f3e583f0a46
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_20
Gerrit-Owner: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: CSteipp cste...@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] Changing git url for user_metrics site on stat1001 - change (operations/puppet)

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

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


Change subject: Changing git url for user_metrics site on stat1001
..

Changing git url for user_metrics site on stat1001

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


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

diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index accf95b..5d39a2d 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -382,7 +382,7 @@
# clone the E3 Analysis repository
git::clone { E3Analysis:
directory = $e3_analysis_path,
-   origin= 
https://gerrit.wikimedia.org/r/p/analytics/E3Analysis.git;,
+   origin= 
https://gerrit.wikimedia.org/r/p/analytics/user-metrics.git;,
owner = $metrics_user,
require   = [Package[python-flask], File[$e3_home], 
Class[misc::statistics::user], Class[misc::statistics::packages::python]],
ensure= latest,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1348f72bf03e9f586f1551bbb25e6b25b9229260
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] Changing git url for user_metrics site on stat1001 - change (operations/puppet)

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

Change subject: Changing git url for user_metrics site on stat1001
..


Changing git url for user_metrics site on stat1001

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

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



diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index accf95b..5d39a2d 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -382,7 +382,7 @@
# clone the E3 Analysis repository
git::clone { E3Analysis:
directory = $e3_analysis_path,
-   origin= 
https://gerrit.wikimedia.org/r/p/analytics/E3Analysis.git;,
+   origin= 
https://gerrit.wikimedia.org/r/p/analytics/user-metrics.git;,
owner = $metrics_user,
require   = [Package[python-flask], File[$e3_home], 
Class[misc::statistics::user], Class[misc::statistics::packages::python]],
ensure= latest,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1348f72bf03e9f586f1551bbb25e6b25b9229260
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] Update Echo to master - change (mediawiki/core)

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

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


Change subject: Update Echo to master
..

Update Echo to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/61803/1

diff --git a/extensions/Echo b/extensions/Echo
index 03382b6..ae4d295 16
--- a/extensions/Echo
+++ b/extensions/Echo
-Subproject commit 03382b6b184ed2b56c884ec60ddf932b1b3117c5
+Subproject commit ae4d295dc8c152777575c36225387fb92d2afc64

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie57a0233ea099d2d8a94f36b2a5d529978d23bae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf3
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   >