[MediaWiki-commits] [Gerrit] Add 'env' module for managing shell environments - change (mediawiki/vagrant)

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

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


Change subject: Add 'env' module for managing shell environments
..

Add 'env' module for managing shell environments

This change adds a lightweight Puppet module for managing /etc/profile.d shell
environment initialization scripts. The module uses the same pattern as the one
used for managing MediaWiki configuration snippets, which is to recursively
manage a 'puppet-managed' subdirectory of an *.d tree.

Change-Id: Icc4ae6dcfa507327853c0bd4fe6a2e15df7e9a1e
---
M puppet/manifests/roles.pp
M puppet/modules/browsertests/manifests/init.pp
A puppet/modules/env/files/profile.d-empty/README
A puppet/modules/env/files/puppet-managed.sh
A puppet/modules/env/manifests/init.pp
A puppet/modules/env/manifests/profile.pp
A puppet/modules/env/manifests/var.pp
A puppet/modules/env/templates/set-environment-var.sh.erb
M puppet/modules/mediawiki/manifests/init.pp
M puppet/modules/mediawiki/manifests/phpsh.pp
M puppet/modules/misc/manifests/init.pp
M puppet/modules/misc/manifests/virtualbox.pp
12 files changed, 132 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/06/73606/1

diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index 03f7d9d..91d00c8 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -18,6 +18,7 @@
 class { 'apt':
 stage = first,
 }
+class { 'env': }
 class { 'misc': }
 class { 'git': }
 }
diff --git a/puppet/modules/browsertests/manifests/init.pp 
b/puppet/modules/browsertests/manifests/init.pp
index 9732089..deb615c 100644
--- a/puppet/modules/browsertests/manifests/init.pp
+++ b/puppet/modules/browsertests/manifests/init.pp
@@ -44,9 +44,8 @@
 }
 
 # Sets MEDIAWIKI_URL environment variable for all users.
-file { '/etc/profile.d/mediawiki-url.sh':
-content = template('browsertests/mediawiki-url.sh.erb'),
-mode= '0755',
+shell::var { 'MEDIAWIKI_URL':
+value = $mediawiki_url,
 }
 
 # Store the password for the 'Selenium_user' MediaWiki account.
diff --git a/puppet/modules/env/files/profile.d-empty/README 
b/puppet/modules/env/files/profile.d-empty/README
new file mode 100644
index 000..0c003ee
--- /dev/null
+++ b/puppet/modules/env/files/profile.d-empty/README
@@ -0,0 +1 @@
+This directory is managed by Puppet.
diff --git a/puppet/modules/env/files/puppet-managed.sh 
b/puppet/modules/env/files/puppet-managed.sh
new file mode 100644
index 000..31167ec
--- /dev/null
+++ b/puppet/modules/env/files/puppet-managed.sh
@@ -0,0 +1,8 @@
+if [ -d /etc/profile.d/puppet-managed ]; then
+  for i in /etc/profile.d/puppet-managed/*.sh; do
+if [ -r $i ]; then
+  . $i
+fi
+  done
+  unset i
+fi
diff --git a/puppet/modules/env/manifests/init.pp 
b/puppet/modules/env/manifests/init.pp
new file mode 100644
index 000..a939958
--- /dev/null
+++ b/puppet/modules/env/manifests/init.pp
@@ -0,0 +1,27 @@
+# == Class: shell
+#
+# Description
+#
+# === Parameters
+#
+# === Examples
+#
+#  class { 'shell':
+#  }
+#
+class env {
+file { '/etc/profile.d/puppet-managed.sh':
+source = 'puppet:///modules/env/puppet-managed.sh',
+mode   = '0755',
+}
+
+file { '/etc/profile.d/puppet-managed':
+ensure  = directory,
+recurse = true,
+purge   = true,
+force   = true,
+source  = 'puppet:///modules/env/profile.d-empty',
+}
+
+File['/etc/profile.d/puppet-managed'] - Env::Profile | |
+}
diff --git a/puppet/modules/env/manifests/profile.pp 
b/puppet/modules/env/manifests/profile.pp
new file mode 100644
index 000..2259cc1
--- /dev/null
+++ b/puppet/modules/env/manifests/profile.pp
@@ -0,0 +1,46 @@
+# == Define: env::profile
+#
+# This Puppet resource represents an /etc/profile.d shell script. These
+# scripts are typically used to initialize the shell environment.
+#
+# === Parameters
+#
+# [*content*]
+#   The desired content of the script, provided as a string. Either this
+#   or 'source' (but not both) must be defined.
+#
+# [*source*]
+#   URI of Puppet file or path reference to a local file that should be
+#   copied over to create this script. Either this or 'content' must be
+#   defined.
+#
+# [*script*]
+#   A short, descriptive name for the script, used to generate the
+#   filename. Defaults to the resource name.
+#
+# [*ensure*]
+#   If 'present' (the default), Puppet will ensure the script is in
+#   place. If 'absent', Puppet will remove it.
+#
+# === Example
+#
+#  env::profile { 'set python env vars':
+#  source = 'puppet:///modules/python/env-vars.sh',
+#  }
+#
+define env::profile(
+$content = undef,
+$source  = undef,
+$script  = $title,
+$ensure  = present,
+) {
+include env
+
+$script_name = regsubst($script, '\W', '_', 'G')
+file { 

[MediaWiki-commits] [Gerrit] Add 'env' module for managing shell environments - change (mediawiki/vagrant)

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

Change subject: Add 'env' module for managing shell environments
..


Add 'env' module for managing shell environments

This change adds a lightweight Puppet module for managing /etc/profile.d shell
environment initialization scripts. The module uses the same pattern as the one
used for managing MediaWiki configuration snippets, which is to recursively
manage a 'puppet-managed' subdirectory of an *.d tree.

Change-Id: Icc4ae6dcfa507327853c0bd4fe6a2e15df7e9a1e
---
M puppet/manifests/roles.pp
M puppet/modules/browsertests/manifests/init.pp
A puppet/modules/env/files/profile.d-empty/README
A puppet/modules/env/files/puppet-managed.sh
A puppet/modules/env/manifests/init.pp
A puppet/modules/env/manifests/profile.pp
A puppet/modules/env/manifests/var.pp
A puppet/modules/env/templates/set-environment-var.sh.erb
M puppet/modules/mediawiki/manifests/init.pp
M puppet/modules/mediawiki/manifests/phpsh.pp
M puppet/modules/misc/manifests/init.pp
M puppet/modules/misc/manifests/virtualbox.pp
12 files changed, 126 insertions(+), 21 deletions(-)

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



diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index 03f7d9d..91d00c8 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -18,6 +18,7 @@
 class { 'apt':
 stage = first,
 }
+class { 'env': }
 class { 'misc': }
 class { 'git': }
 }
diff --git a/puppet/modules/browsertests/manifests/init.pp 
b/puppet/modules/browsertests/manifests/init.pp
index 9732089..deb615c 100644
--- a/puppet/modules/browsertests/manifests/init.pp
+++ b/puppet/modules/browsertests/manifests/init.pp
@@ -44,9 +44,8 @@
 }
 
 # Sets MEDIAWIKI_URL environment variable for all users.
-file { '/etc/profile.d/mediawiki-url.sh':
-content = template('browsertests/mediawiki-url.sh.erb'),
-mode= '0755',
+shell::var { 'MEDIAWIKI_URL':
+value = $mediawiki_url,
 }
 
 # Store the password for the 'Selenium_user' MediaWiki account.
diff --git a/puppet/modules/env/files/profile.d-empty/README 
b/puppet/modules/env/files/profile.d-empty/README
new file mode 100644
index 000..0c003ee
--- /dev/null
+++ b/puppet/modules/env/files/profile.d-empty/README
@@ -0,0 +1 @@
+This directory is managed by Puppet.
diff --git a/puppet/modules/env/files/puppet-managed.sh 
b/puppet/modules/env/files/puppet-managed.sh
new file mode 100644
index 000..31167ec
--- /dev/null
+++ b/puppet/modules/env/files/puppet-managed.sh
@@ -0,0 +1,8 @@
+if [ -d /etc/profile.d/puppet-managed ]; then
+  for i in /etc/profile.d/puppet-managed/*.sh; do
+if [ -r $i ]; then
+  . $i
+fi
+  done
+  unset i
+fi
diff --git a/puppet/modules/env/manifests/init.pp 
b/puppet/modules/env/manifests/init.pp
new file mode 100644
index 000..f0133bd
--- /dev/null
+++ b/puppet/modules/env/manifests/init.pp
@@ -0,0 +1,21 @@
+# == Class: env
+#
+# This lightweight Puppet module is used to manage the configuration of
+# shell environments.
+#
+class env {
+file { '/etc/profile.d/puppet-managed.sh':
+source = 'puppet:///modules/env/puppet-managed.sh',
+mode   = '0755',
+}
+
+file { '/etc/profile.d/puppet-managed':
+ensure  = directory,
+recurse = true,
+purge   = true,
+force   = true,
+source  = 'puppet:///modules/env/profile.d-empty',
+}
+
+File['/etc/profile.d/puppet-managed'] - Env::Profile | |
+}
diff --git a/puppet/modules/env/manifests/profile.pp 
b/puppet/modules/env/manifests/profile.pp
new file mode 100644
index 000..2259cc1
--- /dev/null
+++ b/puppet/modules/env/manifests/profile.pp
@@ -0,0 +1,46 @@
+# == Define: env::profile
+#
+# This Puppet resource represents an /etc/profile.d shell script. These
+# scripts are typically used to initialize the shell environment.
+#
+# === Parameters
+#
+# [*content*]
+#   The desired content of the script, provided as a string. Either this
+#   or 'source' (but not both) must be defined.
+#
+# [*source*]
+#   URI of Puppet file or path reference to a local file that should be
+#   copied over to create this script. Either this or 'content' must be
+#   defined.
+#
+# [*script*]
+#   A short, descriptive name for the script, used to generate the
+#   filename. Defaults to the resource name.
+#
+# [*ensure*]
+#   If 'present' (the default), Puppet will ensure the script is in
+#   place. If 'absent', Puppet will remove it.
+#
+# === Example
+#
+#  env::profile { 'set python env vars':
+#  source = 'puppet:///modules/python/env-vars.sh',
+#  }
+#
+define env::profile(
+$content = undef,
+$source  = undef,
+$script  = $title,
+$ensure  = present,
+) {
+include env
+
+$script_name = regsubst($script, '\W', '_', 'G')
+file { /etc/profile.d/puppet-managed/${script_name}.sh:
+ensure  = 

[MediaWiki-commits] [Gerrit] (bug 51206) add namespace names in Chechen language - change (mediawiki...Scribunto)

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

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


Change subject: (bug 51206) add namespace names in Chechen language
..

(bug 51206) add namespace names in Chechen language

Bug: 51206
Change-Id: I279325b7cda0f93c2422a9307787cddd4f5763c7
---
M Scribunto.namespaces.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/Scribunto.namespaces.php b/Scribunto.namespaces.php
index 42f2e74..7acac5f 100644
--- a/Scribunto.namespaces.php
+++ b/Scribunto.namespaces.php
@@ -53,6 +53,11 @@
829 = 'Mòdul_Discussió',
 );
 
+$namespaceNames['ce'] = array(
+   828 = 'Модуль',
+   829 = 'Модулин_дийцаре',
+);
+
 $namespaceNames['crh'] = array(
828 = 'Modul',
829 = 'Modul_muzakeresi',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I279325b7cda0f93c2422a9307787cddd4f5763c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: TTO at.li...@live.com.au

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


[MediaWiki-commits] [Gerrit] (bug 51312) add rollbacker group for ckbwiki - change (operations/mediawiki-config)

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

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


Change subject: (bug 51312) add rollbacker group for ckbwiki
..

(bug 51312) add rollbacker group for ckbwiki

Rollbacker able to be added and removed by sysops.
Bug: 51312

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index af4a3ba..ee27a3c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -6701,6 +6701,7 @@
),
'ckbwiki' = array(
'*' = array( 'createpage' = false ),
+   'rollbacker' = array( 'rollback' = true ), // bug 51312
),
'cswiki' = array(
'autoconfirmed' = array( 'upload' = false, ),
@@ -7679,6 +7680,9 @@
'+checkuserwiki' = array(
'bureaucrat' = array( 'accountcreator', 'import', 'transwiki', 
'user', 'autoconfirmed', 'ipblock-exempt', ),
),
+   '+ckbwiki' = array(
+   'sysop' = array( 'rollbacker' ), // bug 51312
+   ),
'+cswiki' = array(
'bureaucrat' = array( 'autopatrolled' ),
),
@@ -8098,6 +8102,9 @@
'+checkuserwiki' = array(
'bureaucrat' = array( 'sysop', 'accountcreator', 'import', 
'transwiki', 'user', 'autoconfirmed', 'ipblock-exempt',  'bureaucrat', ),
),
+   '+ckbwiki' = array(
+   'sysop' = array( 'rollbacker' ), // bug 51312
+   ),
'+commonswiki' = array(
'bureaucrat' = array( 'ipblock-exempt', 'OTRS-member', 
'translationadmin' ), // bug 48620
'checkuser' = array( 'ipblock-exempt' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e591f4f7ae2954109947861c7b7d72292a1ddc7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: TTO at.li...@live.com.au

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


[MediaWiki-commits] [Gerrit] Update for MW 1.21 - change (mediawiki...MassEditRegex)

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

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


Change subject: Update for MW 1.21
..

Update for MW 1.21

Rewrite the MW interface to call functions directly instead of going through
the external API.  Also add an 'edit all' tab to category pages and
Special:WhatLinksHere for quick access.

Change-Id: I2ea197d797253b33809a353fd21a633c0347654b
Signed-off-by: Adam Nielsen malvine...@shikadi.net
---
M MassEditRegex.class.php
M MassEditRegex.php
M README
3 files changed, 278 insertions(+), 215 deletions(-)


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

diff --git a/MassEditRegex.class.php b/MassEditRegex.class.php
index 9712d5e..c00add8 100644
--- a/MassEditRegex.class.php
+++ b/MassEditRegex.class.php
@@ -11,50 +11,53 @@
  * @link http://www.mediawiki.org/wiki/Extension:MassEditRegex Documentation
  *
  * @author Adam Nielsen malvine...@shikadi.net
- * @copyright Copyright © 2009 Adam Nielsen
+ * @copyright Copyright © 2009,2013 Adam Nielsen
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
-// Maximum number of pages/diffs to display when previewing the changes
-define('MER_MAX_PREVIEW_DIFFS', 10);
+/// Maximum number of pages/diffs to display when previewing the changes
+define('MER_MAX_PREVIEW_DIFFS', 20);
 
-// Maximum number of pages to edit *for each name in page list*.  No more than
-// 500 (5000 for bots) is allowed according to MW API docs.
+/// Maximum number of pages to edit.
 define('MER_MAX_EXECUTE_PAGES', 1000);
 
 /** Main class that define a new special page*/
 class MassEditRegex extends SpecialPage {
-   private $aPageList;
-   private $strPageListType;
-   private $iNamespace;
-   private $aMatch;
-   private $aReplace;
-   private $strReplace; // keep to avoid having to re-escape again
-   private $strSummary;
-   private $sk;
+   private $aPageList;   /// Array of string - user-supplied page 
titles
+   private $strPageListType; /// Type of titles (categories, backlinks, 
etc.)
+   private $strMatch;/// Match regex from form
+   private $strReplace;  /// Substitution regex from form
+   private $aMatch;  /// $strMatch exploded into array
+   private $aReplace;/// $strReplace exploded into array
+   private $strSummary;  /// Edit summary
+   private $sk;  /// Skin instance
+   private $diff;/// Access to diff engine
 
function __construct() {
parent::__construct( 'MassEditRegex', 'masseditregex' );
}
 
+   /// Run the regexes.
function execute( $par ) {
-   global $wgUser, $wgRequest, $wgOut;
+   global $wgUser;
+
+   $wgOut = $this-getOutput();
 
$this-setHeaders();
 
-   # Check permissions
+   // Check permissions
if ( !$wgUser-isAllowed( 'masseditregex' ) ) {
$this-displayRestrictionError();
return;
}
 
-   # Show a message if the database is in read-only mode
+   // Show a message if the database is in read-only mode
if ( wfReadOnly() ) {
$wgOut-readOnlyPage();
return;
}
 
-   # If user is blocked, s/he doesn't need to access this page
+   // If user is blocked, s/he doesn't need to access this page
if ( $wgUser-isBlocked() ) {
$wgOut-blockedPage();
return;
@@ -62,16 +65,17 @@
 
$this-outputHeader();
 
+   $wgRequest = $this-getRequest();
$strPageList = $wgRequest-getText( 'wpPageList', 'Sandbox' );
$this-aPageList = explode(\n, trim($strPageList));
$this-strPageListType = $wgRequest-getText( 'wpPageListType', 
'pagenames' );
 
$this-iNamespace = $wgRequest-getInt( 'namespace', NS_MAIN );
 
-   $strMatch = $wgRequest-getText( 'wpMatch', '/hello (.*)\n/' );
-   $this-aMatch = explode(\n, trim($strMatch));
+   $this-strMatch = $wgRequest-getText( 'wpMatch', '/hello 
(.*)\n/' );
+   $this-aMatch = explode(\n, trim($this-strMatch));
 
-   $this-strReplace = $wgRequest-getText( 'wpReplace', 'goodbye 
\1' );
+   $this-strReplace = $wgRequest-getText( 'wpReplace', 'goodbye 
$1' );
$this-aReplace = explode(\n, $this-strReplace);
 
$this-strSummary = $wgRequest-getText( 'wpSummary', '' );
@@ -93,11 +97,7 @@
}
 
if ( $wgRequest-wasPosted() ) {
-   if ($wgRequest-getCheck( 'wpPreview' ) ) {
-   

[MediaWiki-commits] [Gerrit] Move translators credits list to a wiki page - change (mediawiki/core)

2013-07-14 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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


Change subject: Move translators credits list to a wiki page
..

Move translators credits list to a wiki page

* List as per Iedc78728156f04b16109140db485492ba7693f14
  (to be occasionally updated manually on wiki with automatic authors
  lists from the files as exported by the Translate extension)
* Link it from Special:Version
* Make protocol consistent in the different parts of the sentence

Change-Id: I3bb53d4c184173b5362f5036764fb38d8f07d178
---
M CREDITS
M includes/specials/SpecialVersion.php
M languages/messages/MessagesEn.php
3 files changed, 4 insertions(+), 9 deletions(-)


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

diff --git a/CREDITS b/CREDITS
index 417bec3..48e57bf 100644
--- a/CREDITS
+++ b/CREDITS
@@ -235,10 +235,5 @@
 * Zachary Hauri
 
 == Translators ==
-* Anders Wegge Jakobsen
-* Hk kng
-* Hojjat
-* Meno25
-* Rotem Liss
-* Shinjiman
-* [https://translatewiki.net/wiki/Special:ListUsers/translator 
Translatewiki.net Translators]
+
+* [https://translatewiki.net/wiki/Translating:MediaWiki/Credits Translators on 
translatewiki.net and others]
diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index 0ba056a..823eb33 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -113,7 +113,7 @@
global $wgLang;
 
if ( defined( 'MEDIAWIKI_INSTALL' ) ) {
-   $othersLink = 
'[http://www.mediawiki.org/wiki/Special:Version/Credits ' . wfMessage( 
'version-poweredby-others' )-text() . ']';
+   $othersLink = 
'[//www.mediawiki.org/wiki/Special:Version/Credits ' . wfMessage( 
'version-poweredby-others' )-text() . ']';
} else {
$othersLink = '[[Special:Version/Credits|' . wfMessage( 
'version-poweredby-others' )-text() . ']]';
}
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index e3af968..a9b5a44 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -4811,7 +4811,7 @@
 'version-svn-revision'  = '(r$2)', # only translate this 
message to other languages if you have to change it
 'version-license'   = 'License',
 'version-poweredby-credits' = This wiki is powered by 
'''[//www.mediawiki.org/ MediaWiki]''', copyright © 2001-$1 $2.,
-'version-poweredby-others'  = 'others',
+'version-poweredby-others'  = 'others, plus 
[//translatewiki.net/wiki/Translating:MediaWiki/Credits translatewiki.net 
translators]',
 'version-credits-summary'   = 'We would like to recognize the 
following persons for their contribution to [[Special:Version|MediaWiki]].',
 'version-license-info'  = 'MediaWiki 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.
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bb53d4c184173b5362f5036764fb38d8f07d178
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it

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


[MediaWiki-commits] [Gerrit] Update for MW 1.21 - change (mediawiki...MassEditRegex)

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

Change subject: Update for MW 1.21
..


Update for MW 1.21

Rewrite the MW interface to call functions directly instead of going through
the external API.  Also add an 'edit all' tab to category pages and
Special:WhatLinksHere for quick access.

Change-Id: I2ea197d797253b33809a353fd21a633c0347654b
Signed-off-by: Adam Nielsen malvine...@shikadi.net
---
M MassEditRegex.class.php
M MassEditRegex.php
M README
3 files changed, 278 insertions(+), 215 deletions(-)

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



diff --git a/MassEditRegex.class.php b/MassEditRegex.class.php
index 9712d5e..c00add8 100644
--- a/MassEditRegex.class.php
+++ b/MassEditRegex.class.php
@@ -11,50 +11,53 @@
  * @link http://www.mediawiki.org/wiki/Extension:MassEditRegex Documentation
  *
  * @author Adam Nielsen malvine...@shikadi.net
- * @copyright Copyright © 2009 Adam Nielsen
+ * @copyright Copyright © 2009,2013 Adam Nielsen
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
-// Maximum number of pages/diffs to display when previewing the changes
-define('MER_MAX_PREVIEW_DIFFS', 10);
+/// Maximum number of pages/diffs to display when previewing the changes
+define('MER_MAX_PREVIEW_DIFFS', 20);
 
-// Maximum number of pages to edit *for each name in page list*.  No more than
-// 500 (5000 for bots) is allowed according to MW API docs.
+/// Maximum number of pages to edit.
 define('MER_MAX_EXECUTE_PAGES', 1000);
 
 /** Main class that define a new special page*/
 class MassEditRegex extends SpecialPage {
-   private $aPageList;
-   private $strPageListType;
-   private $iNamespace;
-   private $aMatch;
-   private $aReplace;
-   private $strReplace; // keep to avoid having to re-escape again
-   private $strSummary;
-   private $sk;
+   private $aPageList;   /// Array of string - user-supplied page 
titles
+   private $strPageListType; /// Type of titles (categories, backlinks, 
etc.)
+   private $strMatch;/// Match regex from form
+   private $strReplace;  /// Substitution regex from form
+   private $aMatch;  /// $strMatch exploded into array
+   private $aReplace;/// $strReplace exploded into array
+   private $strSummary;  /// Edit summary
+   private $sk;  /// Skin instance
+   private $diff;/// Access to diff engine
 
function __construct() {
parent::__construct( 'MassEditRegex', 'masseditregex' );
}
 
+   /// Run the regexes.
function execute( $par ) {
-   global $wgUser, $wgRequest, $wgOut;
+   global $wgUser;
+
+   $wgOut = $this-getOutput();
 
$this-setHeaders();
 
-   # Check permissions
+   // Check permissions
if ( !$wgUser-isAllowed( 'masseditregex' ) ) {
$this-displayRestrictionError();
return;
}
 
-   # Show a message if the database is in read-only mode
+   // Show a message if the database is in read-only mode
if ( wfReadOnly() ) {
$wgOut-readOnlyPage();
return;
}
 
-   # If user is blocked, s/he doesn't need to access this page
+   // If user is blocked, s/he doesn't need to access this page
if ( $wgUser-isBlocked() ) {
$wgOut-blockedPage();
return;
@@ -62,16 +65,17 @@
 
$this-outputHeader();
 
+   $wgRequest = $this-getRequest();
$strPageList = $wgRequest-getText( 'wpPageList', 'Sandbox' );
$this-aPageList = explode(\n, trim($strPageList));
$this-strPageListType = $wgRequest-getText( 'wpPageListType', 
'pagenames' );
 
$this-iNamespace = $wgRequest-getInt( 'namespace', NS_MAIN );
 
-   $strMatch = $wgRequest-getText( 'wpMatch', '/hello (.*)\n/' );
-   $this-aMatch = explode(\n, trim($strMatch));
+   $this-strMatch = $wgRequest-getText( 'wpMatch', '/hello 
(.*)\n/' );
+   $this-aMatch = explode(\n, trim($this-strMatch));
 
-   $this-strReplace = $wgRequest-getText( 'wpReplace', 'goodbye 
\1' );
+   $this-strReplace = $wgRequest-getText( 'wpReplace', 'goodbye 
$1' );
$this-aReplace = explode(\n, $this-strReplace);
 
$this-strSummary = $wgRequest-getText( 'wpSummary', '' );
@@ -93,11 +97,7 @@
}
 
if ( $wgRequest-wasPosted() ) {
-   if ($wgRequest-getCheck( 'wpPreview' ) ) {
-   $this-showPreview();
-   } elseif ( 

[MediaWiki-commits] [Gerrit] Update CHANGELOG and README - change (mediawiki...Translate)

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

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


Change subject: Update CHANGELOG and README
..

Update CHANGELOG and README

* Tell where to get latest recent changes log
* Very short explanation of what is Translate
* Spelling fix
* Changed require to not use parenthesis as per current standard

Change-Id: I05e8dbee4d012edbe92242189bcc204f97f553d4
---
M CHANGELOG
M README
2 files changed, 10 insertions(+), 2 deletions(-)


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

diff --git a/CHANGELOG b/CHANGELOG
index af412b6..89665fe 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+For newer recent changes, please refer the MediaWiki Language Extension Bundle
+release announcements or the git log.
+ https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle
+
 == Change log ==
 * 2012-11-11
 - Dynamic message groups are now shown in list=messagecollection WebAPI.
diff --git a/README b/README
index 223228d..fecfa69 100644
--- a/README
+++ b/README
@@ -1,15 +1,19 @@
+The Translate extension makes MediaWiki a powerful tool to translate every
+kind of text. It's used especially to translate software user interfaces and
+to manage multilingual wikis in a sensible way.
+
 == Copying ==
 See http://www.gnu.org/licenses/gpl2.html
 
 == Installation ==
 For very very quick start add the following to LocalSettings.php:
 
- require( $IP/extensions/Translate/Translate.php );
+ require $IP/extensions/Translate/Translate.php;
  $wgGroupPermissions['user']['translate'] = true;
  $wgGroupPermissions['user']['translate-messagereview'] = true;
  $wgGroupPermissions['sysop']['pagetranslation'] = true;
 
-More documenation is at
+More documentation is at
  https://www.mediawiki.org/wiki/Help:Extension:Translate/Installation
  https://www.mediawiki.org/wiki/Help:Extension:Translate/Configuration
 

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

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

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


[MediaWiki-commits] [Gerrit] Use new class to detect Cite errors inside templates - change (mediawiki...VisualEditor)

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

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


Change subject: Use new class to detect Cite errors inside templates
..

Use new class to detect Cite errors inside templates

A slight improvement to an ugly. Can't be merged until If4f5360cc1 is merged.

Bug: 50423
Change-Id: I1cd9e2beaa64a84ddc6d690fbc483f16d9350b68
---
M modules/ve-mw/ce/styles/ve.ce.Node.css
1 file changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/modules/ve-mw/ce/styles/ve.ce.Node.css 
b/modules/ve-mw/ce/styles/ve.ce.Node.css
index 2bd261d..a6abb7b 100644
--- a/modules/ve-mw/ce/styles/ve.ce.Node.css
+++ b/modules/ve-mw/ce/styles/ve.ce.Node.css
@@ -12,10 +12,7 @@
 }
 
 /* HACK: Hide Ref errors in templates */
-.ve-ce-mwTransclusionNode strong.error,
-.ve-ce-mwTransclusionNode span.error,
-.ve-ce-mwTransclusionNode p.error,
-.ve-ce-mwTransclusionNode div.error {
+.ve-ce-mwTransclusionNode .mw-ext-cite-error {
display: none;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cd9e2beaa64a84ddc6d690fbc483f16d9350b68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Link, not display, files on [[Special:Notifications]] - change (mediawiki...Thanks)

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

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


Change subject: Link, not display, files on [[Special:Notifications]]
..

Link, not display, files on [[Special:Notifications]]

The message for notification-thanks needs to use the colon trick so
that files and categories are linked rather than displayed.

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


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

diff --git a/Thanks.i18n.php b/Thanks.i18n.php
index b1824e2..9471bca 100644
--- a/Thanks.i18n.php
+++ b/Thanks.i18n.php
@@ -23,7 +23,7 @@
'echo-pref-tooltip-edit-thank' = 'Notify me when someone thanks me for 
an edit I made.',
'echo-category-title-edit-thank' = 'Thanks',
'notification-thanks-diff-link' = 'your edit',
-   'notification-thanks' = '[[User:$1|$1]] {{GENDER:$1|thanked}} you for 
$2 on [[$3]].',
+   'notification-thanks' = '[[User:$1|$1]] {{GENDER:$1|thanked}} you for 
$2 on [[:$3]].',
'notification-thanks-flyout2' = '[[User:$1|$1]] {{GENDER:$1|thanked}} 
you for your edit on $2.',
'notification-thanks-email-subject' = '$1 {{GENDER:$1|thanked}} you 
for your edit on {{SITENAME}}',
'notification-thanks-email-body' = '{{SITENAME}} user $1 
{{GENDER:$1|thanked}} you for your edit on $2.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc160cf9d6eb9050f94d07c15d8e622ffbca56ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove old username - change (mediawiki...LiquidThreads)

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

Change subject: Remove old username
..


Remove old username

My wiki account was renamed and there is no need for duplication.

Change-Id: I0cd3df8bf6b9465117fda69fe68f3891aceea7d1
---
M i18n/Lqt.i18n.php
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/i18n/Lqt.i18n.php b/i18n/Lqt.i18n.php
index 32cfd75..78672da 100644
--- a/i18n/Lqt.i18n.php
+++ b/i18n/Lqt.i18n.php
@@ -5605,7 +5605,7 @@
  * @author Dferg
  * @author Fitoschido
  * @author Gustronico
- * @author Heldergeovane
+ * @author Helder.wiki
  * @author Imre
  * @author Locos epraix
  * @author Manuelt15
@@ -15939,7 +15939,6 @@
  * @author Giro720
  * @author Hamilton Abreu
  * @author Helder.wiki
- * @author Heldergeovane
  * @author Lijealso
  * @author Luckas
  * @author Malafaya
@@ -16211,7 +16210,6 @@
  * @author Eduardo.mps
  * @author Giro720
  * @author Helder.wiki
- * @author Heldergeovane
  * @author Luckas
  * @author Luckas Blade
  * @author MetalBrasil

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cd3df8bf6b9465117fda69fe68f3891aceea7d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Helder.wiki helder.w...@gmail.com
Gerrit-Reviewer: Helder.wiki helder.w...@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] Remove old username - change (mediawiki...WikiEditor)

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

Change subject: Remove old username
..


Remove old username

My current user name is already in the list.

Change-Id: I52811900bf974614511f41c309c8a9e1843a0e45
---
M WikiEditor.i18n.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/WikiEditor.i18n.php b/WikiEditor.i18n.php
index 5e8c1ed..2dabdc4 100644
--- a/WikiEditor.i18n.php
+++ b/WikiEditor.i18n.php
@@ -22637,7 +22637,6 @@
  * @author Giro720
  * @author Hamilton Abreu
  * @author Helder.wiki
- * @author Heldergeovane
  * @author Lijealso
  * @author Luckas
  * @author Luckas Blade

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52811900bf974614511f41c309c8a9e1843a0e45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Helder.wiki helder.w...@gmail.com
Gerrit-Reviewer: Helder.wiki helder.w...@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] Math Node UI (Bug Fix) - change (mediawiki...VisualEditor)

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

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


Change subject: Math Node UI (Bug Fix)
..

Math Node UI (Bug Fix)

Fixed two bugs found after merging:

1. Open the Math node inspector without
editting anything, then click somewhere
else on the page, it will crush.

2. Similarly, open the Math node inspector
without editting anything, then click
the Cancel button to cancel the edit,
it will crush.

Both of them are fixed by this patch.
The issue was with using getFocusedNode()
in the inspector onClose function to save
changes.

Also some minor change according to the
last code review. =D

Change-Id: I6e200f2a228b71dc5af5aa9843c461f43b926f8d
---
M modules/ve-mw/ui/inspectors/ve.ui.MWMathInspector.js
1 file changed, 6 insertions(+), 5 deletions(-)


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

diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWMathInspector.js 
b/modules/ve-mw/ui/inspectors/ve.ui.MWMathInspector.js
index 41fdac8..62397d8 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWMathInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWMathInspector.js
@@ -57,10 +57,12 @@
  */
 ve.ui.MWMathInspector.prototype.onOpen = function () {
 
-   var src = 
this.surface.getView().getFocusedNode().getModel().getAttribute( 'extsrc' );
-
// Parent method
ve.ui.Inspector.prototype.onOpen.call( this );
+
+   this.mathNode = this.surface.getView().getFocusedNode();
+
+   var src = this.mathNode.getModel().getAttribute( 'extsrc' );
 
// Wait for animation to complete
setTimeout( ve.bind( function () {
@@ -80,12 +82,11 @@
ve.ui.Inspector.prototype.onClose.call( this, action );
 
var newsrc = this.input.getValue(),
-   surfaceModel = this.surface.getModel(),
-   mathNode = this.surface.getView().getFocusedNode().getModel();
+   surfaceModel = this.surface.getModel();
 
surfaceModel.change(
ve.dm.Transaction.newFromAttributeChanges(
-   surfaceModel.getDocument(), 
mathNode.getOuterRange().start, { 'extsrc': newsrc }
+   surfaceModel.getDocument(), 
this.mathNode.getOuterRange().start, { 'extsrc': newsrc }
)
);
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e200f2a228b71dc5af5aa9843c461f43b926f8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
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] Don't cache the gadget-defintion in case no gadgets were found - change (mediawiki...Gadgets)

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

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


Change subject: Don't cache the gadget-defintion in case no gadgets were found
..

Don't cache the gadget-defintion in case no gadgets were found

After some investigation I could only find a few unlike
possibilities which eventually could lead to the issues
described in the bug. In the end I decided that it would
be the easiest and probably most robust solution to simply
don't cache in case no gadgets were found, even if the
MediaWiki page exists.
This shouldn't cause any performance issues as we already
don't cache in case no gadgets could be found in all paths
of this function except after trying to parse the gadget
definition.

Bug: 37228
Change-Id: I3092bcb162d032282fbe263c7f14f4d1ce9163ab
---
M Gadgets_body.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/Gadgets_body.php b/Gadgets_body.php
index e787062..c7e23bf 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -614,6 +614,13 @@
}
}
 
+   if ( !count( $gadgets ) ) {
+   // Don't cache in case we couldn't find any gadgets. 
Bug 37228
+   $gadgets = false;
+   wfProfileOut( __METHOD__ );
+   return $gadgets;
+   }
+
// cache for a while. gets purged automatically when 
MediaWiki:Gadgets-definition is edited
$wgMemc-set( $key, $gadgets, 60 * 60 * 24 );
$source = $forceNewText !== null ? 'input text' : 
'MediaWiki:Gadgets-definition';

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

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

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


[MediaWiki-commits] [Gerrit] Don't cache the gadget-defintion in case no gadgets were found - change (mediawiki...Gadgets)

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

Change subject: Don't cache the gadget-defintion in case no gadgets were found
..


Don't cache the gadget-defintion in case no gadgets were found

After some investigation I could only find a few unlike
possibilities which eventually could lead to the issues
described in the bug. In the end I decided that it would
be the easiest and probably most robust solution to simply
don't cache in case no gadgets were found, even if the
MediaWiki page exists.
This shouldn't cause any performance issues as we already
don't cache in case no gadgets could be found in all paths
of this function except after trying to parse the gadget
definition.

Bug: 37228
Change-Id: I3092bcb162d032282fbe263c7f14f4d1ce9163ab
---
M Gadgets_body.php
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/Gadgets_body.php b/Gadgets_body.php
index e787062..c7e23bf 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -614,6 +614,13 @@
}
}
 
+   if ( !count( $gadgets ) ) {
+   // Don't cache in case we couldn't find any gadgets. 
Bug 37228
+   $gadgets = false;
+   wfProfileOut( __METHOD__ );
+   return $gadgets;
+   }
+
// cache for a while. gets purged automatically when 
MediaWiki:Gadgets-definition is edited
$wgMemc-set( $key, $gadgets, 60 * 60 * 24 );
$source = $forceNewText !== null ? 'input text' : 
'MediaWiki:Gadgets-definition';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3092bcb162d032282fbe263c7f14f4d1ce9163ab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: MaxSem maxsem.w...@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] Update Gadgets to master - change (mediawiki/core)

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

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


Change subject: Update Gadgets to master
..

Update Gadgets to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/73619/1

diff --git a/extensions/Gadgets b/extensions/Gadgets
index ba1a586..4f65685 16
--- a/extensions/Gadgets
+++ b/extensions/Gadgets
-Subproject commit ba1a5869c13d0004c8d38d761bdf6dc8d5b268b9
+Subproject commit 4f65685257cc5726b756f9f927e4c8ee55450da7

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

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

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

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


Change subject: Update Gadgets to master
..

Update Gadgets to master

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


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

diff --git a/extensions/Gadgets b/extensions/Gadgets
index ac74e80..4f65685 16
--- a/extensions/Gadgets
+++ b/extensions/Gadgets
-Subproject commit ac74e806be1a20137c09c8ff92ab1f27a138828b
+Subproject commit 4f65685257cc5726b756f9f927e4c8ee55450da7

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

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

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

Change subject: Update Gadgets to master
..


Update Gadgets to master

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

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



diff --git a/extensions/Gadgets b/extensions/Gadgets
index ac74e80..4f65685 16
--- a/extensions/Gadgets
+++ b/extensions/Gadgets
-Subproject commit ac74e806be1a20137c09c8ff92ab1f27a138828b
+Subproject commit 4f65685257cc5726b756f9f927e4c8ee55450da7

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice764530b44707549eed27e094e01a506e232b74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf9
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] Update Gadgets to master - change (mediawiki/core)

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

Change subject: Update Gadgets to master
..


Update Gadgets to master

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

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



diff --git a/extensions/Gadgets b/extensions/Gadgets
index ba1a586..4f65685 16
--- a/extensions/Gadgets
+++ b/extensions/Gadgets
-Subproject commit ba1a5869c13d0004c8d38d761bdf6dc8d5b268b9
+Subproject commit 4f65685257cc5726b756f9f927e4c8ee55450da7

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f1fdc946092cf3646279a580e5b35dcdb73b111
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf10
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] bump cache version - change (mediawiki...Gadgets)

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

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


Change subject: bump cache version
..

bump cache version

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


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

diff --git a/Gadgets_body.php b/Gadgets_body.php
index c7e23bf..d6a9d09 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -248,7 +248,7 @@
/**
 * Increment this when changing class structure
 */
-   const GADGET_CLASS_VERSION = 6;
+   const GADGET_CLASS_VERSION = 7;
 
private $version = self::GADGET_CLASS_VERSION,
$scripts = array(),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I123d0cc2a42429b475e4d286b9728c890301be17
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] [MassEditRegex] Register extensioin after merging from SVN - change (translatewiki)

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

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


Change subject: [MassEditRegex] Register extensioin after merging from SVN
..

[MassEditRegex] Register extensioin after merging from SVN

Add comment for Serialization which is not a real extension

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/21/73621/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 974a5b7..5a67fce 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -792,6 +792,9 @@
 
 Mark As Helpful
 
+Mass Edit Regex
+aliasfile = MassEditRegex/MassEditRegex.alias.php
+
 Math
 
 Math Search
@@ -1301,6 +1304,9 @@
 aliasfile = SemanticWebBrowser/SemanticWebBrowser.alias.php
 optional = swb_browse_more
 
+# Not a real extension
+# Serialization
+
 Shared Css Js
 
 Short Url

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifacd355ab1cee7bba9285a631db14726be0946d8
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] [MassEditRegex] Register extensioin after merging from SVN - change (translatewiki)

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

Change subject: [MassEditRegex] Register extensioin after merging from SVN
..


[MassEditRegex] Register extensioin after merging from SVN

Add comment for Serialization which is not a real extension

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

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



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 974a5b7..5a67fce 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -792,6 +792,9 @@
 
 Mark As Helpful
 
+Mass Edit Regex
+aliasfile = MassEditRegex/MassEditRegex.alias.php
+
 Math
 
 Math Search
@@ -1301,6 +1304,9 @@
 aliasfile = SemanticWebBrowser/SemanticWebBrowser.alias.php
 optional = swb_browse_more
 
+# Not a real extension
+# Serialization
+
 Shared Css Js
 
 Short Url

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifacd355ab1cee7bba9285a631db14726be0946d8
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] Throttle Parsoid template updates - change (operations/mediawiki-config)

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

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


Change subject: Throttle Parsoid template updates
..

Throttle Parsoid template updates

* Reduce the number of titles per job from 50 to 10
* Only process at most 500k titles

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 6584d8d..d1f93d6 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1947,6 +1947,12 @@
$wgParsoidWikiPrefix = $wgDBname;
// Set to something between 0 (process all updates) and 1 (skip all 
updates).
$wgParsoidSkipRatio = 0;
+
+   // Throttle rate of template updates by setting the number of tests per
+   // job to something lowish, and limiting the maximum number of updates 
to
+   // process per template edit
+   $wgParsoidCacheUpdateTitlesPerJob = 10;
+   $wgParsoidMaxBacklinksInvalidate = 50;
 }
 
 if ( $wmgUseTemplateData ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief91b7d88f8627fa966520ba7500246ec3f21329
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Throttle Parsoid template updates - change (operations/mediawiki-config)

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

Change subject: Throttle Parsoid template updates
..


Throttle Parsoid template updates

* Reduce the number of titles per job from 50 to 10
* Only process at most 500k titles

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

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 6584d8d..d1f93d6 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1947,6 +1947,12 @@
$wgParsoidWikiPrefix = $wgDBname;
// Set to something between 0 (process all updates) and 1 (skip all 
updates).
$wgParsoidSkipRatio = 0;
+
+   // Throttle rate of template updates by setting the number of tests per
+   // job to something lowish, and limiting the maximum number of updates 
to
+   // process per template edit
+   $wgParsoidCacheUpdateTitlesPerJob = 10;
+   $wgParsoidMaxBacklinksInvalidate = 50;
 }
 
 if ( $wmgUseTemplateData ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief91b7d88f8627fa966520ba7500246ec3f21329
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add packagist badges to README - change (mediawiki...ParserHooks)

2013-07-14 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Add packagist badges to README
..

Add packagist badges to README

Change-Id: Id2f1f4cf8864a9dad5ec96378e82d78a1529af8d
---
M README.md
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserHooks 
refs/changes/23/73623/1

diff --git a/README.md b/README.md
index 2a00a50..9041241 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,9 @@
-[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-ParserHooks.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-ParserHooks)
 # ParserHooks
 
+[![Latest Stable 
Version](https://poser.pugx.org/mediawiki/parser-hooks/version.png)](https://packagist.org/packages/mediawiki/parser-hooks)
+[![Latest Stable 
Version](https://poser.pugx.org/mediawiki/parser-hooks/d/total.png)](https://packagist.org/packages/mediawiki/parser-hooks)
+[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-ParserHooks.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-ParserHooks)
+
 OOP interface for creating MediaWiki parser hooks in a declarative fashion.
 
 ## Requirements

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2f1f4cf8864a9dad5ec96378e82d78a1529af8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserHooks
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add packagist badges to README - change (mediawiki...Serialization)

2013-07-14 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Add packagist badges to README
..

Add packagist badges to README

Change-Id: I82b7d7151b9841bf573bbd2b4a249f2e67a8
---
M README.md
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/README.md b/README.md
index 551287f..33a4a2b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
-[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Serialization.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Serialization)
-
 # Serialization
 
+[![Latest Stable 
Version](https://poser.pugx.org/serialization/serialization/version.png)](https://packagist.org/packages/serialization/serialization)
+[![Latest Stable 
Version](https://poser.pugx.org/serialization/serialization/d/total.png)](https://packagist.org/packages/serialization/serialization)
+[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Serialization.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Serialization)
+
 Small library defining a Serializer and a Deserializer interface.
 
 Also contains various Exceptions and a few basic (de)serialization utilities.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82b7d7151b9841bf573bbd2b4a249f2e67a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Serialization
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add packagist badges to README - change (mediawiki...Serialization)

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

Change subject: Add packagist badges to README
..


Add packagist badges to README

Change-Id: I82b7d7151b9841bf573bbd2b4a249f2e67a8
---
M README.md
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/README.md b/README.md
index 551287f..33a4a2b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
-[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Serialization.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Serialization)
-
 # Serialization
 
+[![Latest Stable 
Version](https://poser.pugx.org/serialization/serialization/version.png)](https://packagist.org/packages/serialization/serialization)
+[![Latest Stable 
Version](https://poser.pugx.org/serialization/serialization/d/total.png)](https://packagist.org/packages/serialization/serialization)
+[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Serialization.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Serialization)
+
 Small library defining a Serializer and a Deserializer interface.
 
 Also contains various Exceptions and a few basic (de)serialization utilities.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82b7d7151b9841bf573bbd2b4a249f2e67a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Serialization
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Adding some special test functions - change (mediawiki...Math)

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

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


Change subject: Adding some special test functions
..

Adding some special test functions

Change-Id: I40c7d049f2e04d239df73e7bc004fc248e37d7b7
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/26/73626/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40c7d049f2e04d239df73e7bc004fc248e37d7b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: LaTeXML
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] skip tex filter by default - change (mediawiki...Math)

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

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


Change subject: skip tex filter by default
..

skip tex filter by default

Change-Id: Ibf7f76687146f15686eafee3e53a8d83062a3baf
---
M Math.php
M MathLaTeXML.php
M tests/MathLaTeXMLTest.php
3 files changed, 28 insertions(+), 5 deletions(-)


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

diff --git a/Math.php b/Math.php
index f171c3a..4c0348b 100644
--- a/Math.php
+++ b/Math.php
@@ -133,7 +133,7 @@
  * this can be a potential security risk. If set to false only a subset of the 
tex
  * commands is allowed. See the wikipedia page Help:Math for details.
  */
-$wgDisableTexFilter = false;
+$wgDisableTexFilter = true;
 
 // end of config settings.
 
diff --git a/MathLaTeXML.php b/MathLaTeXML.php
index bf43498..8d9f369 100644
--- a/MathLaTeXML.php
+++ b/MathLaTeXML.php
@@ -234,11 +234,11 @@
wfDebugLog( Math, XML validation error:\n  . 
var_export( $XML, true ) . \n );
} else {
$name = $xmlObject-getRootElement();
-   $name = 
str_replace('http://www.w3.org/1998/Math/MathML:', '', $name);
-   if ( in_array($name, $this-getAllowedRootElements()) ) 
{
+   $elementSplit = explode(':',$name);
+   if ( in_array(array_pop($elementSplit), 
$this-getAllowedRootElements()) ) {
$out = true;
} else {
-   wfDebugLog( Math, got wrong root element  . 
$name );
+   wfDebugLog( Math, got wrong root element  . 
$element );
}
}
return $out;
diff --git a/tests/MathLaTeXMLTest.php b/tests/MathLaTeXMLTest.php
index 760e8b5..6cd48d6 100644
--- a/tests/MathLaTeXMLTest.php
+++ b/tests/MathLaTeXMLTest.php
@@ -26,6 +26,28 @@
}
 
/**
+* Test rendering the string '0' see 
+* https://trac.mathweb.org/LaTeXML/ticket/1752
+*/
+   public function testSpecialCase0(){
+   $renderer = MathRenderer::getRenderer( 0, array(), 
MW_MATH_LATEXML );
+   $expected = 'span class=tex dir=ltrmath 
xmlns=http://www.w3.org/1998/Math/MathML; id=p1.1.m1 class=ltx_Math 
alttext=0 xml:id=p1.1.m1.1 display=inline xref=p1.1.m1.1.cmml   
semantics xml:id=p1.1.m1.1a xref=p1.1.m1.1.cmml mn 
xml:id=p1.1.m1.1.1 xref=p1.1.m1.1.1.cmml0/mn annotation-xml 
xml:id=p1.1.m1.1.cmml encoding=MathML-Content xref=p1.1.m1.1   cn 
type=integer xml:id=p1.1.m1.1.1.cmml xref=p1.1.m1.1.10/cn 
/annotation-xml annotation xml:id=p1.1.m1.1b 
encoding=application/x-tex xref=p1.1.m1.1.cmml0/annotation   
/semantics /math/span';
+   $real = $renderer-render();
+   $this-assertEquals( $expected, $real ,'Rendering the String 
0' );
+   }
+
+   /**
+* Test rendering the string '0' see 
+* https://trac.mathweb.org/LaTeXML/ticket/1752
+*/
+   public function testSpecialCaseText(){
+   //$this-markTestSkipped( Bug in LaTeXML);
+   $renderer = MathRenderer::getRenderer( \text{CR}, array(), 
MW_MATH_LATEXML );
+   $expected = 'span class=tex dir=ltr 
id=.09ext.7BCR.7Dmath xmlns=http://www.w3.org/1998/Math/MathML; 
id=p1.1.m1 class=ltx_Math alttext=ext{CR} xml:id=p1.1.m1.1 
display=inline xref=p1.1.m1.1.cmml   semantics xml:id=p1.1.m1.1a 
xref=p1.1.m1.1.cmml mrow xml:id=p1.1.m1.1.6 xref=p1.1.m1.1.6.cmml  
 mi xml:id=p1.1.m1.1.1 xref=p1.1.m1.1.1.cmmle/mi   mo 
xml:id=p1.1.m1.1.6.1 xref=p1.1.m1.1.6.1.cmml⁢/mo   mi 
xml:id=p1.1.m1.1.2 xref=p1.1.m1.1.2.cmmlx/mi   mo 
xml:id=p1.1.m1.1.6.1a xref=p1.1.m1.1.6.1.cmml⁢/mo   mi 
xml:id=p1.1.m1.1.3 xref=p1.1.m1.1.3.cmmlt/mi   mo 
xml:id=p1.1.m1.1.6.1b xref=p1.1.m1.1.6.1.cmml⁢/mo   mi 
xml:id=p1.1.m1.1.4 xref=p1.1.m1.1.4.cmmlC/mi   mo 
xml:id=p1.1.m1.1.6.1c xref=p1.1.m1.1.6.1.cmml⁢/mo   mi 
xml:id=p1.1.m1.1.5 xref=p1.1.m1.1.5.cmmlR/mi /mrow 
annotation-xml xml:id=p1.1.m1.1.cmml encoding=MathML-Content 
xref=p1.1.m1.1   apply xml:id=p1.1.m1.1.6.cmml xref=p1.1.m1.1.6
 times xml:id=p1.1.m1.1.6.1.cmml xref=p1.1.m1.1.6.1/ ci 
xml:id=p1.1.m1.1.1.cmml xref=p1.1.m1.1.1e/ci ci 
xml:id=p1.1.m1.1.2.cmml xref=p1.1.m1.1.2x/ci ci 
xml:id=p1.1.m1.1.3.cmml xref=p1.1.m1.1.3t/ci ci 
xml:id=p1.1.m1.1.4.cmml xref=p1.1.m1.1.4C/ci ci 
xml:id=p1.1.m1.1.5.cmml xref=p1.1.m1.1.5R/ci   /apply 
/annotation-xml annotation xml:id=p1.1.m1.1b 
encoding=application/x-tex xref=p1.1.m1.1.cmmlext{CR}/annotation   
/semantics /math/span';
+   $real = $renderer-render();
+   $this-assertEquals( $expected, $real ,'Rendering the String 
\text{CR}' );
+   }
+  

[MediaWiki-commits] [Gerrit] Update README file - change (mediawiki...Ask)

2013-07-14 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Update README file
..

Update README file

Change-Id: I27bd62424bd017ae3ed30cdcc5896deacc257851
---
M README.md
1 file changed, 42 insertions(+), 6 deletions(-)


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

diff --git a/README.md b/README.md
index 993aea6..d3762cd 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,52 @@
+# Ask
+
+[![Latest Stable 
Version](https://poser.pugx.org/ask/ask/version.png)](https://packagist.org/packages/ask/ask)
+[![Latest Stable 
Version](https://poser.pugx.org/ask/ask/d/total.png)](https://packagist.org/packages/ask/ask)
 [![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Ask.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Ask)
 
-About
-=
-
 Library containing a PHP implementation of the Ask query language
+
+## Requirements
+
+* PHP 5.3 or later
+* [DataValues](https://www.mediawiki.org/wiki/Extension:DataValues) 0.1 or 
later
+* 
[Serialization](https://github.com/wikimedia/mediawiki-extensions-Serialization/blob/master/README.md)
 1.0 or later
+
+## Installation
+
+You can use [Composer](http://getcomposer.org/) to download and install
+this package as well as its dependencies. Alternatively you can simply clone
+the git repository and take care of loading yourself.
+
+### Composer
+
+To add this package as a local, per-project dependency to your project, simply 
add a
+dependency on `ask/ask` to your project's `composer.json` file.
+Here is a minimal example of a `composer.json` file that just defines a 
dependency on
+Ask 1.0:
+
+{
+require: {
+ask/ask: 1.0.*
+}
+}
+
+### Manual
+
+Get the Ask code, either via git, or some other means. Also get all 
dependencies.
+You can find a list of the dependencies in the require section of the 
composer.json file.
+Load all dependencies and the load the Ask library by including its entry 
point:
+Ask.php.
+
+## Usage
 
 The [extension page on 
mediawiki.org](https://www.mediawiki.org/wiki/Extension:Ask)
 contains the documentation and examples for this library.
 
-Links
--
+## Links
 
-* [Canonical git 
repo](https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Ask.git)
 * [Ask on Packagist](https://packagist.org/packages/ask/ask)
+* [Ask on Ohloh](https://www.ohloh.net/p/ask)
+* [Ask on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Ask)
+* [TravisCI build 
status](https://travis-ci.org/wikimedia/mediawiki-extensions-Ask)
 * [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-Ask/blob/master/README.md)
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27bd62424bd017ae3ed30cdcc5896deacc257851
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update README file - change (mediawiki...Ask)

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

Change subject: Update README file
..


Update README file

Change-Id: I27bd62424bd017ae3ed30cdcc5896deacc257851
---
M README.md
1 file changed, 42 insertions(+), 6 deletions(-)

Approvals:
  Jeroen De Dauw: Verified; Looks good to me, approved



diff --git a/README.md b/README.md
index 993aea6..d3762cd 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,52 @@
+# Ask
+
+[![Latest Stable 
Version](https://poser.pugx.org/ask/ask/version.png)](https://packagist.org/packages/ask/ask)
+[![Latest Stable 
Version](https://poser.pugx.org/ask/ask/d/total.png)](https://packagist.org/packages/ask/ask)
 [![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Ask.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Ask)
 
-About
-=
-
 Library containing a PHP implementation of the Ask query language
+
+## Requirements
+
+* PHP 5.3 or later
+* [DataValues](https://www.mediawiki.org/wiki/Extension:DataValues) 0.1 or 
later
+* 
[Serialization](https://github.com/wikimedia/mediawiki-extensions-Serialization/blob/master/README.md)
 1.0 or later
+
+## Installation
+
+You can use [Composer](http://getcomposer.org/) to download and install
+this package as well as its dependencies. Alternatively you can simply clone
+the git repository and take care of loading yourself.
+
+### Composer
+
+To add this package as a local, per-project dependency to your project, simply 
add a
+dependency on `ask/ask` to your project's `composer.json` file.
+Here is a minimal example of a `composer.json` file that just defines a 
dependency on
+Ask 1.0:
+
+{
+require: {
+ask/ask: 1.0.*
+}
+}
+
+### Manual
+
+Get the Ask code, either via git, or some other means. Also get all 
dependencies.
+You can find a list of the dependencies in the require section of the 
composer.json file.
+Load all dependencies and the load the Ask library by including its entry 
point:
+Ask.php.
+
+## Usage
 
 The [extension page on 
mediawiki.org](https://www.mediawiki.org/wiki/Extension:Ask)
 contains the documentation and examples for this library.
 
-Links
--
+## Links
 
-* [Canonical git 
repo](https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Ask.git)
 * [Ask on Packagist](https://packagist.org/packages/ask/ask)
+* [Ask on Ohloh](https://www.ohloh.net/p/ask)
+* [Ask on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Ask)
+* [TravisCI build 
status](https://travis-ci.org/wikimedia/mediawiki-extensions-Ask)
 * [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-Ask/blob/master/README.md)
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I27bd62424bd017ae3ed30cdcc5896deacc257851
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Parse the undelete-search-prefix message - change (mediawiki/core)

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

Change subject: Parse the undelete-search-prefix message
..


Parse the undelete-search-prefix message

Requested on dewiki to use an explaining wikilink there.

Change-Id: Ib36afee75089c04fcd73bcc964f39869c6bb
---
M includes/specials/SpecialUndelete.php
1 file changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/includes/specials/SpecialUndelete.php 
b/includes/specials/SpecialUndelete.php
index caf6a8b..d4aed11 100644
--- a/includes/specials/SpecialUndelete.php
+++ b/includes/specials/SpecialUndelete.php
@@ -792,13 +792,16 @@
Xml::openElement( 'form', array( 'method' = 'get', 
'action' = $wgScript ) ) .
Xml::fieldset( $this-msg( 
'undelete-search-box' )-text() ) .
Html::hidden( 'title', 
$this-getTitle()-getPrefixedDBkey() ) .
-   Xml::inputLabel(
-   $this-msg( 'undelete-search-prefix' 
)-text(),
-   'prefix',
+   Html::rawElement(
+   'label',
+   array( 'for' = 'prefix' ),
+   $this-msg( 'undelete-search-prefix' 
)-parse()
+   ) .
+   Xml::input(
'prefix',
20,
$this-mSearchPrefix,
-   array( 'autofocus' = true )
+   array( 'id' = 'prefix', 'autofocus' = 
true )
) . ' ' .
Xml::submitButton( $this-msg( 
'undelete-search-submit' )-text() ) .
Xml::closeElement( 'fieldset' ) .

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib36afee75089c04fcd73bcc964f39869c6bb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de
Gerrit-Reviewer: Hoo man h...@online.de
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 some special case test functions - change (mediawiki...Math)

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

Change subject: add some special case test functions
..


add some special case test functions

Change-Id: Ibf7f76687146f15686eafee3e53a8d83062a3baf
---
M MathLaTeXML.php
M tests/MathLaTeXMLTest.php
2 files changed, 27 insertions(+), 4 deletions(-)

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



diff --git a/MathLaTeXML.php b/MathLaTeXML.php
index bf43498..8d9f369 100644
--- a/MathLaTeXML.php
+++ b/MathLaTeXML.php
@@ -234,11 +234,11 @@
wfDebugLog( Math, XML validation error:\n  . 
var_export( $XML, true ) . \n );
} else {
$name = $xmlObject-getRootElement();
-   $name = 
str_replace('http://www.w3.org/1998/Math/MathML:', '', $name);
-   if ( in_array($name, $this-getAllowedRootElements()) ) 
{
+   $elementSplit = explode(':',$name);
+   if ( in_array(array_pop($elementSplit), 
$this-getAllowedRootElements()) ) {
$out = true;
} else {
-   wfDebugLog( Math, got wrong root element  . 
$name );
+   wfDebugLog( Math, got wrong root element  . 
$element );
}
}
return $out;
diff --git a/tests/MathLaTeXMLTest.php b/tests/MathLaTeXMLTest.php
index 760e8b5..6cd48d6 100644
--- a/tests/MathLaTeXMLTest.php
+++ b/tests/MathLaTeXMLTest.php
@@ -26,6 +26,28 @@
}
 
/**
+* Test rendering the string '0' see 
+* https://trac.mathweb.org/LaTeXML/ticket/1752
+*/
+   public function testSpecialCase0(){
+   $renderer = MathRenderer::getRenderer( 0, array(), 
MW_MATH_LATEXML );
+   $expected = 'span class=tex dir=ltrmath 
xmlns=http://www.w3.org/1998/Math/MathML; id=p1.1.m1 class=ltx_Math 
alttext=0 xml:id=p1.1.m1.1 display=inline xref=p1.1.m1.1.cmml   
semantics xml:id=p1.1.m1.1a xref=p1.1.m1.1.cmml mn 
xml:id=p1.1.m1.1.1 xref=p1.1.m1.1.1.cmml0/mn annotation-xml 
xml:id=p1.1.m1.1.cmml encoding=MathML-Content xref=p1.1.m1.1   cn 
type=integer xml:id=p1.1.m1.1.1.cmml xref=p1.1.m1.1.10/cn 
/annotation-xml annotation xml:id=p1.1.m1.1b 
encoding=application/x-tex xref=p1.1.m1.1.cmml0/annotation   
/semantics /math/span';
+   $real = $renderer-render();
+   $this-assertEquals( $expected, $real ,'Rendering the String 
0' );
+   }
+
+   /**
+* Test rendering the string '0' see 
+* https://trac.mathweb.org/LaTeXML/ticket/1752
+*/
+   public function testSpecialCaseText(){
+   //$this-markTestSkipped( Bug in LaTeXML);
+   $renderer = MathRenderer::getRenderer( \text{CR}, array(), 
MW_MATH_LATEXML );
+   $expected = 'span class=tex dir=ltr 
id=.09ext.7BCR.7Dmath xmlns=http://www.w3.org/1998/Math/MathML; 
id=p1.1.m1 class=ltx_Math alttext=ext{CR} xml:id=p1.1.m1.1 
display=inline xref=p1.1.m1.1.cmml   semantics xml:id=p1.1.m1.1a 
xref=p1.1.m1.1.cmml mrow xml:id=p1.1.m1.1.6 xref=p1.1.m1.1.6.cmml  
 mi xml:id=p1.1.m1.1.1 xref=p1.1.m1.1.1.cmmle/mi   mo 
xml:id=p1.1.m1.1.6.1 xref=p1.1.m1.1.6.1.cmml⁢/mo   mi 
xml:id=p1.1.m1.1.2 xref=p1.1.m1.1.2.cmmlx/mi   mo 
xml:id=p1.1.m1.1.6.1a xref=p1.1.m1.1.6.1.cmml⁢/mo   mi 
xml:id=p1.1.m1.1.3 xref=p1.1.m1.1.3.cmmlt/mi   mo 
xml:id=p1.1.m1.1.6.1b xref=p1.1.m1.1.6.1.cmml⁢/mo   mi 
xml:id=p1.1.m1.1.4 xref=p1.1.m1.1.4.cmmlC/mi   mo 
xml:id=p1.1.m1.1.6.1c xref=p1.1.m1.1.6.1.cmml⁢/mo   mi 
xml:id=p1.1.m1.1.5 xref=p1.1.m1.1.5.cmmlR/mi /mrow 
annotation-xml xml:id=p1.1.m1.1.cmml encoding=MathML-Content 
xref=p1.1.m1.1   apply xml:id=p1.1.m1.1.6.cmml xref=p1.1.m1.1.6
 times xml:id=p1.1.m1.1.6.1.cmml xref=p1.1.m1.1.6.1/ ci 
xml:id=p1.1.m1.1.1.cmml xref=p1.1.m1.1.1e/ci ci 
xml:id=p1.1.m1.1.2.cmml xref=p1.1.m1.1.2x/ci ci 
xml:id=p1.1.m1.1.3.cmml xref=p1.1.m1.1.3t/ci ci 
xml:id=p1.1.m1.1.4.cmml xref=p1.1.m1.1.4C/ci ci 
xml:id=p1.1.m1.1.5.cmml xref=p1.1.m1.1.5R/ci   /apply 
/annotation-xml annotation xml:id=p1.1.m1.1b 
encoding=application/x-tex xref=p1.1.m1.1.cmmlext{CR}/annotation   
/semantics /math/span';
+   $real = $renderer-render();
+   $this-assertEquals( $expected, $real ,'Rendering the String 
\text{CR}' );
+   }
+   /**
 * Tests behavior of makeRequest() that communicates with the host.
 * Testcase: Invalid request.
 * @covers MathTexvc::makeRequest
@@ -99,7 +121,8 @@
//$final_mml=MathLaTeXML::embedMathML($bad_mml);

//$plain_tex=MathRenderer::renderMath($bad_mml,array(),MW_MATH_SOURCE);
//echo(var_dump(MathLaTeXML::isValidMathML($bad_mml)).\n);
- 

[MediaWiki-commits] [Gerrit] add newline after error message - change (mediawiki...MathSearch)

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

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


Change subject: add newline after error message
..

add newline after error message

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


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

diff --git a/maintenance/ReRenderMath.php b/maintenance/ReRenderMath.php
index 413835e..0d80dd6 100644
--- a/maintenance/ReRenderMath.php
+++ b/maintenance/ReRenderMath.php
@@ -111,7 +111,7 @@
if ( $renderer-getLastError() ) {
echo F:\t\t equation  . ( $anchorID 
-1 ) .
-failed beginning with . 
substr( $formula, 0, 5 )
-   . mathml: . 
$renderer-getMathml();
+   . mathml: . 
$renderer-getMathml() .\n;
}
}
return $matches;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fe70a0760da008c60b28a79b1c80fa4752330f2
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] add newline after error message - change (mediawiki...MathSearch)

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

Change subject: add newline after error message
..


add newline after error message

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

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



diff --git a/maintenance/ReRenderMath.php b/maintenance/ReRenderMath.php
index 413835e..0d80dd6 100644
--- a/maintenance/ReRenderMath.php
+++ b/maintenance/ReRenderMath.php
@@ -111,7 +111,7 @@
if ( $renderer-getLastError() ) {
echo F:\t\t equation  . ( $anchorID 
-1 ) .
-failed beginning with . 
substr( $formula, 0, 5 )
-   . mathml: . 
$renderer-getMathml();
+   . mathml: . 
$renderer-getMathml() .\n;
}
}
return $matches;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9fe70a0760da008c60b28a79b1c80fa4752330f2
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] Update README - change (mediawiki...Diff)

2013-07-14 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Update README
..

Update README

Change-Id: I72e4d8e0cd5e17f4b3e005721408348c596e74b5
---
M README.md
1 file changed, 45 insertions(+), 8 deletions(-)


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

diff --git a/README.md b/README.md
index a80732f..899af75 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,54 @@
+# Diff
+
+[![Latest Stable 
Version](https://poser.pugx.org/diff/diff/version.png)](https://packagist.org/packages/diff/diff)
+[![Latest Stable 
Version](https://poser.pugx.org/diff/diff/d/total.png)](https://packagist.org/packages/diff/diff)
 [![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Diff.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Diff)
 
-About
-=
+Diff is a small PHP library with value objects to represent diffs and service 
objects to do
+various types of operations. These include creating a diff between two data 
structures,
+applying a diff onto a data structure and merging multiple diffs into one.
 
-This is a small diff library for structured data. It can be used as stand 
alone in
-any PHP application or as MediaWiki extension that can then be used by other 
extensions.
+## Requirements
+
+* PHP 5.3 or later
+* [DataValues](https://www.mediawiki.org/wiki/Extension:DataValues) 0.1 or 
later
+* 
[Serialization](https://github.com/wikimedia/mediawiki-extensions-Serialization/blob/master/README.md)
 1.0 or later
+
+## Installation
+
+You can use [Composer](http://getcomposer.org/) to download and install
+this package as well as its dependencies. Alternatively you can simply clone
+the git repository and take care of loading yourself.
+
+### Composer
+
+To add this package as a local, per-project dependency to your project, simply 
add a
+dependency on `diff/diff` to your project's `composer.json` file.
+Here is a minimal example of a `composer.json` file that just defines a 
dependency on
+Diff 1.0:
+
+{
+require: {
+diff/diff: 1.0.*
+}
+}
+
+### Manual
+
+Get the Diff code, either via git, or some other means. Also get all 
dependencies.
+You can find a list of the dependencies in the require section of the 
composer.json file.
+Load all dependencies and the load the Diff library by including its entry 
point:
+Diff.php.
+
+## Usage
 
 The [extension page on 
mediawiki.org](https://www.mediawiki.org/wiki/Extension:Diff)
 contains the documentation and examples for this library.
 
-Links
--
+## Links
 
-* [Canonical git 
repo](https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Diff.git)
 * [Diff on Packagist](https://packagist.org/packages/diff/diff)
-* [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-Diff/blob/master/README.md)
\ No newline at end of file
+* [Diff on Ohloh](https://www.ohloh.net/p/mwdiff)
+* [Diff on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Diff)
+* [TravisCI build 
status](https://travis-ci.org/wikimedia/mediawiki-extensions-Diff)
+* [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-Diff/blob/master/README.md)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72e4d8e0cd5e17f4b3e005721408348c596e74b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update README - change (mediawiki...Diff)

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

Change subject: Update README
..


Update README

Change-Id: I72e4d8e0cd5e17f4b3e005721408348c596e74b5
---
M README.md
1 file changed, 45 insertions(+), 8 deletions(-)

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



diff --git a/README.md b/README.md
index a80732f..899af75 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,54 @@
+# Diff
+
+[![Latest Stable 
Version](https://poser.pugx.org/diff/diff/version.png)](https://packagist.org/packages/diff/diff)
+[![Latest Stable 
Version](https://poser.pugx.org/diff/diff/d/total.png)](https://packagist.org/packages/diff/diff)
 [![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Diff.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Diff)
 
-About
-=
+Diff is a small PHP library with value objects to represent diffs and service 
objects to do
+various types of operations. These include creating a diff between two data 
structures,
+applying a diff onto a data structure and merging multiple diffs into one.
 
-This is a small diff library for structured data. It can be used as stand 
alone in
-any PHP application or as MediaWiki extension that can then be used by other 
extensions.
+## Requirements
+
+* PHP 5.3 or later
+* [DataValues](https://www.mediawiki.org/wiki/Extension:DataValues) 0.1 or 
later
+* 
[Serialization](https://github.com/wikimedia/mediawiki-extensions-Serialization/blob/master/README.md)
 1.0 or later
+
+## Installation
+
+You can use [Composer](http://getcomposer.org/) to download and install
+this package as well as its dependencies. Alternatively you can simply clone
+the git repository and take care of loading yourself.
+
+### Composer
+
+To add this package as a local, per-project dependency to your project, simply 
add a
+dependency on `diff/diff` to your project's `composer.json` file.
+Here is a minimal example of a `composer.json` file that just defines a 
dependency on
+Diff 1.0:
+
+{
+require: {
+diff/diff: 1.0.*
+}
+}
+
+### Manual
+
+Get the Diff code, either via git, or some other means. Also get all 
dependencies.
+You can find a list of the dependencies in the require section of the 
composer.json file.
+Load all dependencies and the load the Diff library by including its entry 
point:
+Diff.php.
+
+## Usage
 
 The [extension page on 
mediawiki.org](https://www.mediawiki.org/wiki/Extension:Diff)
 contains the documentation and examples for this library.
 
-Links
--
+## Links
 
-* [Canonical git 
repo](https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Diff.git)
 * [Diff on Packagist](https://packagist.org/packages/diff/diff)
-* [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-Diff/blob/master/README.md)
\ No newline at end of file
+* [Diff on Ohloh](https://www.ohloh.net/p/mwdiff)
+* [Diff on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Diff)
+* [TravisCI build 
status](https://travis-ci.org/wikimedia/mediawiki-extensions-Diff)
+* [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-Diff/blob/master/README.md)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72e4d8e0cd5e17f4b3e005721408348c596e74b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Update dependencies in readme file - change (mediawiki...Diff)

2013-07-14 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Update dependencies in readme file
..

Update dependencies in readme file

Change-Id: I37b562fbf8da4c2eb0c08055c31f6fbc86e1b603
---
M README.md
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Diff 
refs/changes/30/73630/1

diff --git a/README.md b/README.md
index 899af75..6c65699 100644
--- a/README.md
+++ b/README.md
@@ -11,8 +11,6 @@
 ## Requirements
 
 * PHP 5.3 or later
-* [DataValues](https://www.mediawiki.org/wiki/Extension:DataValues) 0.1 or 
later
-* 
[Serialization](https://github.com/wikimedia/mediawiki-extensions-Serialization/blob/master/README.md)
 1.0 or later
 
 ## Installation
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37b562fbf8da4c2eb0c08055c31f6fbc86e1b603
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update dependencies in readme file - change (mediawiki...Diff)

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

Change subject: Update dependencies in readme file
..


Update dependencies in readme file

Change-Id: I37b562fbf8da4c2eb0c08055c31f6fbc86e1b603
---
M README.md
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/README.md b/README.md
index 899af75..6c65699 100644
--- a/README.md
+++ b/README.md
@@ -11,8 +11,6 @@
 ## Requirements
 
 * PHP 5.3 or later
-* [DataValues](https://www.mediawiki.org/wiki/Extension:DataValues) 0.1 or 
later
-* 
[Serialization](https://github.com/wikimedia/mediawiki-extensions-Serialization/blob/master/README.md)
 1.0 or later
 
 ## Installation
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37b562fbf8da4c2eb0c08055c31f6fbc86e1b603
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Translation update by the SMW community - change (mediawiki...SemanticMediaWiki)

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

Change subject: Translation update by the SMW community
..


Translation update by the SMW community

* Amended and added Portugues I18n according to information provided by user 
Jaideraf

Change-Id: I680dd4f6d6fc3a57b971a4e161cbd59400eb387f
---
M languages/SMW_LanguagePt.php
1 file changed, 46 insertions(+), 34 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved



diff --git a/languages/SMW_LanguagePt.php b/languages/SMW_LanguagePt.php
index 96a75b2..72bff16 100644
--- a/languages/SMW_LanguagePt.php
+++ b/languages/SMW_LanguagePt.php
@@ -16,7 +16,7 @@
 /**
  * Portuguese language labels for important SMW labels (namespaces, 
datatypes,...).
  *
- * @author Semíramis Herszon, Terry A. Hurlbut
+ * @author Semíramis Herszon, Terry A. Hurlbut, Jaideraf
  * @ingroup SMWLanguage
  * @ingroup Language
  */
@@ -24,56 +24,70 @@
 
protected $m_DatatypeLabels = array(
'_wpg' = 'Página', // name of page datatype
-   '_txt' = 'Texto',  // name of the text type (very long strings)
-   '_cod' = 'Código',  // name of the (source) code type //TODO: 
translate
-   '_boo' = 'Variável Booléen',  // name of the boolean type
-   '_num' = 'Número', // name for the datatype of numbers
+   '_txt' = 'Texto',  // name of the text type
+   '_cod' = 'Código',  // name of the (source) code type
+   '_boo' = 'Booleano',  // name of the boolean type
+   '_num' = 'Número',  // name for the datatype of numbers
'_geo' = 'Coordenadas geográficas', // name of the geocoord 
type
'_tem' = 'Temperatura',  // name of the temperature type
'_dat' = 'Data',  // name of the datetime (calendar) type
-   '_ema' = 'Email',  // name of the email type (Portuguese does 
not have another word for this)
-   '_uri' = 'URL',  // name of the URI type
-   '_anu' = 'Anotação-URI',  // name of the annotation URI type 
(OWL annotation property)
-   '_tel' = 'Telephone number',  // name of the telephone (URI) 
type //TODO: translate
-   '_rec' = 'Record', // name of record data type //TODO: 
translate
-   '_qty' = 'Quantity', // name of the number type with units of 
measurement //TODO: translate
+   '_ema' = 'Email',  // name of the email type
+   '_uri' = 'URL',  // name of the URL type
+   '_anu' = 'URI',  // name of the annotation URI type (OWL 
annotation property)
+   '_tel' = 'Número de telefone',  // name of the telephone (URI) 
type
+   '_rec' = 'Registro', // name of record data type
+   '_qty' = 'Quantidade', // name of the number type with units 
of measurement
);
 
protected $m_DatatypeAliases = array(
+   'Entidade'  = '_wpg',
+   'Ponto flutuante'   = '_num',
+   'Inteiro'   = '_num',
+   'Coordenadas'   = '_geo',
+   'E-mail'= '_ema',
+   'Anotação de URI'   = '_uri',
+   'Telefone'  = '_tel',
'URI'   = '_uri',
'Número inteiro'= '_num',
'Folga' = '_num',
+   'Variável Booléen'  = '_boo',
'Enumeração'= '_txt',
'Cadeia'= '_txt',  // old name of the string 
type
);
 
protected $m_SpecialProperties = array(
// always start upper-case
-   '_TYPE' = 'Tem o tipo',
-   '_URI'  = 'URI equivalente',
-   '_SUBP' = 'Sub-propriedade de',
-   '_SUBC' = 'Subcategory of', // TODO: translate
-   '_UNIT' = 'Unidades de amostra',
-   '_IMPO' = 'Importado de',
+   '_TYPE' = 'Possui tipo',
+   '_URI'  = 'URI equivalente ',
+   '_SUBP' = 'Subpropriedade de',
+   '_SUBC' = 'Subcategoria de',
+   '_UNIT' = 'Unidades de exibição',
+   '_IMPO' = 'Importada de',
'_CONV' = 'Corresponde a',
-   '_SERV' = 'Fornece o serviço',
-   '_PVAL' = 'Permite valor',
-   '_MDAT' = 'Modification date',  // TODO: translate
-   '_CDAT' = 'Creation date', // TODO: translate
-   '_NEWP' = 'Is a new page', // TODO: translate
-   '_LEDT' = 'Last editor is', // TODO: translate
-   '_ERRP' = 'Has improper value for', // TODO: translate
-   '_LIST' = 'Has fields', // TODO: translate
-   '_SOBJ' = 'Has subobject', // TODO: translate
-   '_ASK'  = 'Has query', // TODO: translate
-   '_ASKST'= 'Query 

[MediaWiki-commits] [Gerrit] Further decrease titles per job to 6 - change (operations/mediawiki-config)

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

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


Change subject: Further decrease titles per job to 6
..

Further decrease titles per job to 6

The API load still spiked up to 50% in the last hour, so decrease template
update dequeue rate further.

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d1f93d6..067c2ca 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1951,7 +1951,7 @@
// Throttle rate of template updates by setting the number of tests per
// job to something lowish, and limiting the maximum number of updates 
to
// process per template edit
-   $wgParsoidCacheUpdateTitlesPerJob = 10;
+   $wgParsoidCacheUpdateTitlesPerJob = 6;
$wgParsoidMaxBacklinksInvalidate = 50;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60fda4cb3933fe9cef43d80d2a7f5c7c08433eca
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Further decrease titles per job to 6 - change (operations/mediawiki-config)

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

Change subject: Further decrease titles per job to 6
..


Further decrease titles per job to 6

The API load still spiked up to 50% in the last hour, so decrease template
update dequeue rate further.

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

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d1f93d6..067c2ca 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1951,7 +1951,7 @@
// Throttle rate of template updates by setting the number of tests per
// job to something lowish, and limiting the maximum number of updates 
to
// process per template edit
-   $wgParsoidCacheUpdateTitlesPerJob = 10;
+   $wgParsoidCacheUpdateTitlesPerJob = 6;
$wgParsoidMaxBacklinksInvalidate = 50;
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] Update FormulaInfo to the new Math extension - change (mediawiki...MathSearch)

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

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


Change subject: Update FormulaInfo to the new Math extension
..

Update FormulaInfo to the new Math extension

Change-Id: I82b90f381ab640f0ba35a7440710ed9697e06cc6
---
M FormulaInfo.php
1 file changed, 7 insertions(+), 8 deletions(-)


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

diff --git a/FormulaInfo.php b/FormulaInfo.php
index 31bf4b5..510a36d 100644
--- a/FormulaInfo.php
+++ b/FormulaInfo.php
@@ -67,7 +67,7 @@
$wgOut-addWikiText( Occurences on the following pages: );
wfDebugLog( MathSearch, var_export( $mo-getAllOccurences(), 
true ) );
// $wgOut-addWikiText('b:'.var_export($res,true).'/b');
-   $wgOut-addWikiText( 'TeX : code' . $mo-getTex() . '/code' 
);
+   $wgOut-addWikiText( 'TeX (as stored in database): 
syntaxhighlight' . $mo-getTex(). '/syntaxhighlight');
 
$wgOut-addWikiText( 'MathML : ', false );
$wgOut-addHTML( $mo-getMathml() );
@@ -82,17 +82,16 @@
$wgOut-addWikiText( '==MathML==' );
 
$wgOut-addHtml( br / );
-   $wgOut-addHtml( htmlspecialchars( $mo-getMathml() ) );
-   $wgOut-addHtml( br / );
+   $wgOut-addWikiText( 'syntaxhighlight lang=xml'.( 
$mo-getMathml() ).'/syntaxhighlight');
$wgOut-addHtml( br / );
$wgOut-addHtml( br / );
if ( $wgDebugMath ) {
$wgOut-addWikiText( '==LOG and Debug==' );
-   $wgOut-addWikiText( 'Rendered at : code' . 
$mo-getTimestamp()
-   . '/code an idexed at code' . 
$mo-getIndexTimestamp() . '/code' );
-   $wgOut-addWikiText( 'validxml : code' . 
MathLaTeXML::isValidMathML( $mo-getMathml() ) . '/code recheck:', false );
-   $wgOut-addHtml( MathLaTeXML::isValidMathML( $mo-getMathml() ) 
? valid:invalid );
-   $wgOut-addWikiText( 'status : code' . $mo-getStatusCode() . 
'/code' );
+   $wgOut-addWikiText( 'Rendered at : syntaxhighlight' . 
$mo-getTimestamp()
+   . '/syntaxhighlight an idexed at syntaxhighlight' . 
$mo-getIndexTimestamp() . '/syntaxhighlight' );
+   $wgOut-addWikiText( 'validxml : syntaxhighlight' . 
$mo-isValidMathML( $mo-getMathml() ) . '/syntaxhighlight recheck:', false );
+   $wgOut-addHtml( $mo-isValidMathML( $mo-getMathml() ) ? 
valid:invalid );
+   $wgOut-addWikiText( 'status : syntaxhighlight' . 
$mo-getStatusCode() . '/syntaxhighlight' );
$wgOut-addHtml( htmlspecialchars( $mo-getLog() ) );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82b90f381ab640f0ba35a7440710ed9697e06cc6
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] Update depricated function call to new function - change (mediawiki...MathSearch)

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

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


Change subject: Update depricated function call to new function
..

Update depricated function call to new function

Change-Id: I1072fc25465c045ffbf186145a3e9b17ef7dc24c
---
M SpecialMathSearch.php
1 file changed, 6 insertions(+), 3 deletions(-)


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

diff --git a/SpecialMathSearch.php b/SpecialMathSearch.php
index 53d65af..967607b 100644
--- a/SpecialMathSearch.php
+++ b/SpecialMathSearch.php
@@ -24,8 +24,11 @@
function __construct() {
parent::__construct( 'MathSearch' );
}
-
-   function getLucene() {
+   /**
+* 
+* @return \LuceneSearch|boolean
+*/
+   public static function getLucene() {
if ( class_exists( LuceneSearch ) ) {
return new LuceneSearch();
} else {
@@ -195,7 +198,7 @@
$out = '';
// The form header, which links back to this page.
$pageID = Title::makeTitle( NS_SPECIAL, 'MathSearch' );
-   $action = $pageID-escapeLocalURL();
+   $action = $pageID-getLinkURL();
$out .= form method=\get\ action=\$action\\n;
// The search text field.
$pattern = htmlspecialchars( $pattern );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1072fc25465c045ffbf186145a3e9b17ef7dc24c
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] Update FormulaInfo to the new Math extension - change (mediawiki...MathSearch)

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

Change subject: Update FormulaInfo to the new Math extension
..


Update FormulaInfo to the new Math extension

Change-Id: I82b90f381ab640f0ba35a7440710ed9697e06cc6
---
M FormulaInfo.php
1 file changed, 7 insertions(+), 8 deletions(-)

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



diff --git a/FormulaInfo.php b/FormulaInfo.php
index 31bf4b5..510a36d 100644
--- a/FormulaInfo.php
+++ b/FormulaInfo.php
@@ -67,7 +67,7 @@
$wgOut-addWikiText( Occurences on the following pages: );
wfDebugLog( MathSearch, var_export( $mo-getAllOccurences(), 
true ) );
// $wgOut-addWikiText('b:'.var_export($res,true).'/b');
-   $wgOut-addWikiText( 'TeX : code' . $mo-getTex() . '/code' 
);
+   $wgOut-addWikiText( 'TeX (as stored in database): 
syntaxhighlight' . $mo-getTex(). '/syntaxhighlight');
 
$wgOut-addWikiText( 'MathML : ', false );
$wgOut-addHTML( $mo-getMathml() );
@@ -82,17 +82,16 @@
$wgOut-addWikiText( '==MathML==' );
 
$wgOut-addHtml( br / );
-   $wgOut-addHtml( htmlspecialchars( $mo-getMathml() ) );
-   $wgOut-addHtml( br / );
+   $wgOut-addWikiText( 'syntaxhighlight lang=xml'.( 
$mo-getMathml() ).'/syntaxhighlight');
$wgOut-addHtml( br / );
$wgOut-addHtml( br / );
if ( $wgDebugMath ) {
$wgOut-addWikiText( '==LOG and Debug==' );
-   $wgOut-addWikiText( 'Rendered at : code' . 
$mo-getTimestamp()
-   . '/code an idexed at code' . 
$mo-getIndexTimestamp() . '/code' );
-   $wgOut-addWikiText( 'validxml : code' . 
MathLaTeXML::isValidMathML( $mo-getMathml() ) . '/code recheck:', false );
-   $wgOut-addHtml( MathLaTeXML::isValidMathML( $mo-getMathml() ) 
? valid:invalid );
-   $wgOut-addWikiText( 'status : code' . $mo-getStatusCode() . 
'/code' );
+   $wgOut-addWikiText( 'Rendered at : syntaxhighlight' . 
$mo-getTimestamp()
+   . '/syntaxhighlight an idexed at syntaxhighlight' . 
$mo-getIndexTimestamp() . '/syntaxhighlight' );
+   $wgOut-addWikiText( 'validxml : syntaxhighlight' . 
$mo-isValidMathML( $mo-getMathml() ) . '/syntaxhighlight recheck:', false );
+   $wgOut-addHtml( $mo-isValidMathML( $mo-getMathml() ) ? 
valid:invalid );
+   $wgOut-addWikiText( 'status : syntaxhighlight' . 
$mo-getStatusCode() . '/syntaxhighlight' );
$wgOut-addHtml( htmlspecialchars( $mo-getLog() ) );
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82b90f381ab640f0ba35a7440710ed9697e06cc6
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] Change base class of MathObject from MathRenderer to MathLaT... - change (mediawiki...MathSearch)

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

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


Change subject: Change base class of MathObject from MathRenderer to MathLaTeXML
..

Change base class of MathObject from MathRenderer to MathLaTeXML

Change-Id: I6355ab7ffb1875a231b4489f7071568428b1950b
---
M MathObject.php
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/MathObject.php b/MathObject.php
index 2975fcf..eb053c9 100644
--- a/MathObject.php
+++ b/MathObject.php
@@ -1,5 +1,5 @@
 ?php
-class MathObject extends MathRenderer {
+class MathObject extends MathLaTeXML {
protected $anchorID = 0;
protected $pageID = 0;
protected $index_timestamp = null;
@@ -97,8 +97,9 @@
'ORDER BY' = 
'varstat_featurecount' )
);
} catch ( Exception $e ) {
-   return DatabaseProblem;
+   return Databaseproblem;
}
+   var_dump($res);
if ( $res ) {
foreach ( $res as $row ) {
$wgOut-addWikiText( '*' . 
$row-mathobservation_featuretype . ' code' .
@@ -108,7 +109,7 @@
}
 
public function updateObservations( $dbw = null ) {
-   $this-readDatabaseEntry();
+   $this-readFromDatabase();
preg_match_all( #(mi|mo)( ([^].*?))?(.*?)/\\1#u, 
$this-mathml, $rule, PREG_SET_ORDER );
if ( $dbw == null ) {
$dbgiven = false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6355ab7ffb1875a231b4489f7071568428b1950b
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] Update depricated function call to new function - change (mediawiki...MathSearch)

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

Change subject: Update depricated function call to new function
..


Update depricated function call to new function

Change-Id: I1072fc25465c045ffbf186145a3e9b17ef7dc24c
---
M SpecialMathSearch.php
1 file changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/SpecialMathSearch.php b/SpecialMathSearch.php
index 53d65af..967607b 100644
--- a/SpecialMathSearch.php
+++ b/SpecialMathSearch.php
@@ -24,8 +24,11 @@
function __construct() {
parent::__construct( 'MathSearch' );
}
-
-   function getLucene() {
+   /**
+* 
+* @return \LuceneSearch|boolean
+*/
+   public static function getLucene() {
if ( class_exists( LuceneSearch ) ) {
return new LuceneSearch();
} else {
@@ -195,7 +198,7 @@
$out = '';
// The form header, which links back to this page.
$pageID = Title::makeTitle( NS_SPECIAL, 'MathSearch' );
-   $action = $pageID-escapeLocalURL();
+   $action = $pageID-getLinkURL();
$out .= form method=\get\ action=\$action\\n;
// The search text field.
$pattern = htmlspecialchars( $pattern );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1072fc25465c045ffbf186145a3e9b17ef7dc24c
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] Change base class of MathObject from MathRenderer to MathLaT... - change (mediawiki...MathSearch)

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

Change subject: Change base class of MathObject from MathRenderer to MathLaTeXML
..


Change base class of MathObject from MathRenderer to MathLaTeXML

Change-Id: I6355ab7ffb1875a231b4489f7071568428b1950b
---
M MathObject.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/MathObject.php b/MathObject.php
index 2975fcf..eb053c9 100644
--- a/MathObject.php
+++ b/MathObject.php
@@ -1,5 +1,5 @@
 ?php
-class MathObject extends MathRenderer {
+class MathObject extends MathLaTeXML {
protected $anchorID = 0;
protected $pageID = 0;
protected $index_timestamp = null;
@@ -97,8 +97,9 @@
'ORDER BY' = 
'varstat_featurecount' )
);
} catch ( Exception $e ) {
-   return DatabaseProblem;
+   return Databaseproblem;
}
+   var_dump($res);
if ( $res ) {
foreach ( $res as $row ) {
$wgOut-addWikiText( '*' . 
$row-mathobservation_featuretype . ' code' .
@@ -108,7 +109,7 @@
}
 
public function updateObservations( $dbw = null ) {
-   $this-readDatabaseEntry();
+   $this-readFromDatabase();
preg_match_all( #(mi|mo)( ([^].*?))?(.*?)/\\1#u, 
$this-mathml, $rule, PREG_SET_ORDER );
if ( $dbw == null ) {
$dbgiven = false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6355ab7ffb1875a231b4489f7071568428b1950b
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 depends and conflicts parameters - change (mediawiki...TemplateData)

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

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


Change subject: Add depends and conflicts parameters
..

Add depends and conflicts parameters

To solve the situation when templates are more complext, we need to have
a way to signal dependices and conflicts between the parameters.

Bug: 50407
Change-Id: If9fdb32e40b863c51d75805326937f9291d4f029
---
M TemplateData.i18n.php
M TemplateDataBlob.php
M resources/ext.templateData.css
M spec.templatedata.json
M tests/TemplateDataBlobTest.php
5 files changed, 198 insertions(+), 16 deletions(-)


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

diff --git a/TemplateData.i18n.php b/TemplateData.i18n.php
index 2ed46b9..005ef26 100644
--- a/TemplateData.i18n.php
+++ b/TemplateData.i18n.php
@@ -16,6 +16,8 @@
'templatedata-doc-param-type' = 'Type',
'templatedata-doc-param-default' = 'Default',
'templatedata-doc-param-status' = 'Status',
+   'templatedata-doc-param-depends' = 'Depends',
+   'templatedata-doc-param-conflicts' = 'Conflicts',
 
// Error message for edit page
'templatedata-invalid-parse' = 'Syntax error in JSON.',
@@ -23,6 +25,7 @@
'templatedata-invalid-missing' = 'Required property $1 not found.',
'templatedata-invalid-unknown' = 'Unexpected property $1.',
'templatedata-invalid-value' = 'Invalid value for property $1.',
+   'templatedata-invalid-self-reference' = 'Property $1 is 
self-referencing.',
 );
 
 /** Message documentation (Message documentation)
diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index 4a4a53e..fb0c5be 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -61,7 +61,9 @@
'aliases',
'default',
'inherits',
-   'type',
+'type',
+'depends',
+'conflicts',
);
static $types = array(
'unknown',
@@ -229,6 +231,64 @@
} else {
$paramObj-type = 'unknown';
}
+
+// Param.depends
+if ( isset( $paramObj-depends ) ) {
+  if ( !is_array( $paramObj-depends ) ) {
+return Status::newFatal(
+  'templatedata-invalid-type',
+  params.{$paramName}.depends,
+  'array'
+);
+  }
+
+  foreach ( $paramObj-depends as $dep ) {
+if ( !isset( $data-params- { $dep } ) ) {
+  return Status::newFatal(
+'templatedata-invalid-missing',
+params.{$dep}
+  );
+}
+
+if ( $dep == $paramName ) {
+  return Status::newFatal(
+'templatedata-invalid-self-reference',
+params.{$dep}
+  );
+}
+  }
+} else {
+  $paramObj-depends = array();
+}
+
+// Param.conflicts
+if ( isset( $paramObj-conflicts ) ) {
+  if ( !is_array( $paramObj-conflicts ) ) {
+return Status::newFatal(
+  'templatedata-invalid-type',
+  params.{$paramName}.conflicts,
+  'array'
+);
+  }
+
+  foreach ( $paramObj-conflicts as $dep ) {
+if ( !isset( $data-params- { $dep } ) ) {
+  return Status::newFatal(
+'templatedata-invalid-missing',
+params.{$dep}
+  );
+}
+
+if ( $dep == $paramName ) {
+  return Status::newFatal(
+'templatedata-invalid-self-reference',
+params.{$dep}
+  );
+}
+  }
+} else {
+  $paramObj-conflicts = array();
+}
}
 
// Param.inherits
@@ -354,6 +414,8 @@
. Html::element( 'th', array(), $context-msg( 
'templatedata-doc-param-type' ) )
. Html::element( 'th', array(), $context-msg( 
'templatedata-doc-param-default' ) )
. Html::element( 'th', array(), $context-msg( 
'templatedata-doc-param-status' ) )
+   . Html::element( 'th', array(), $context-msg( 
'templatedata-doc-param-depends' ) )
+   . Html::element( 'th', array(), $context-msg( 
'templatedata-doc-param-conflicts' ) )
. '/tr/thead'
. 'tbody';
 
@@ -368,7 +430,7 @@
'class' = 
'mw-templatedata-doc-param-alias'
 

[MediaWiki-commits] [Gerrit] Bugfix in mathpagestat table - change (mediawiki...MathSearch)

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

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


Change subject: Bugfix in mathpagestat table
..

Bugfix in mathpagestat table

Change-Id: I4c12e7eb796dae7db59d3e320839afbec10a8460
---
M MathObject.php
M db/mathpagestat.sql
2 files changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/MathObject.php b/MathObject.php
index eb053c9..21f80b8 100644
--- a/MathObject.php
+++ b/MathObject.php
@@ -99,7 +99,6 @@
} catch ( Exception $e ) {
return Databaseproblem;
}
-   var_dump($res);
if ( $res ) {
foreach ( $res as $row ) {
$wgOut-addWikiText( '*' . 
$row-mathobservation_featuretype . ' code' .
diff --git a/db/mathpagestat.sql b/db/mathpagestat.sql
index c1cfa7f..a4ab835 100644
--- a/db/mathpagestat.sql
+++ b/db/mathpagestat.sql
@@ -3,9 +3,9 @@
 --
 CREATE TABLE /*_*/mathpagestat (
   pagestat_pageid int(10) NOT NULL,
-  pagestat_featurename varchar(10) NOT NULL,
-  pagestat_featuretype varchar(10) NOT NULL,
+  pagestat_featureid int(6) NOT NULL,
   pagestat_featurecount int(11) NOT NULL,
-  PRIMARY KEY (pagestat_pageid,pagestat_featurename,pagestat_featuretype)
+  PRIMARY KEY (pagestat_pageid,pagestat_featureid),
+  KEY `pagestat_pageid` (`pagestat_pageid`)
 ) /*$wgDBTableOptions*/;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c12e7eb796dae7db59d3e320839afbec10a8460
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] Bugfix in mathpagestat table - change (mediawiki...MathSearch)

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

Change subject: Bugfix in mathpagestat table
..


Bugfix in mathpagestat table

Change-Id: I4c12e7eb796dae7db59d3e320839afbec10a8460
---
M MathObject.php
M db/mathpagestat.sql
2 files changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/MathObject.php b/MathObject.php
index eb053c9..21f80b8 100644
--- a/MathObject.php
+++ b/MathObject.php
@@ -99,7 +99,6 @@
} catch ( Exception $e ) {
return Databaseproblem;
}
-   var_dump($res);
if ( $res ) {
foreach ( $res as $row ) {
$wgOut-addWikiText( '*' . 
$row-mathobservation_featuretype . ' code' .
diff --git a/db/mathpagestat.sql b/db/mathpagestat.sql
index c1cfa7f..a4ab835 100644
--- a/db/mathpagestat.sql
+++ b/db/mathpagestat.sql
@@ -3,9 +3,9 @@
 --
 CREATE TABLE /*_*/mathpagestat (
   pagestat_pageid int(10) NOT NULL,
-  pagestat_featurename varchar(10) NOT NULL,
-  pagestat_featuretype varchar(10) NOT NULL,
+  pagestat_featureid int(6) NOT NULL,
   pagestat_featurecount int(11) NOT NULL,
-  PRIMARY KEY (pagestat_pageid,pagestat_featurename,pagestat_featuretype)
+  PRIMARY KEY (pagestat_pageid,pagestat_featureid),
+  KEY `pagestat_pageid` (`pagestat_pageid`)
 ) /*$wgDBTableOptions*/;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c12e7eb796dae7db59d3e320839afbec10a8460
Gerrit-PatchSet: 2
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] Optional for a long list of rivers - change (translatewiki)

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

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


Change subject: Optional for a long list of rivers
..

Optional for a long list of rivers

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/10/73710/1

diff --git a/groups/FreeCol/FreeCol.yaml b/groups/FreeCol/FreeCol.yaml
index 8a00742..8c129da 100644
--- a/groups/FreeCol/FreeCol.yaml
+++ b/groups/FreeCol/FreeCol.yaml
@@ -54,6 +54,7 @@
 - model.nation.*.ship.*
 - model.nation.Portuguese.Europe
 - model.nation.Swedish.Europe
+- model.other.region.river.*
 - model.region.default
 - model.unit.nationUnit
 - model.unit.occupation.active

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f38a9eda5258cad75a88bf26e129d2e8bd82e8d
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] Optional for a long list of rivers - change (translatewiki)

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

Change subject: Optional for a long list of rivers
..


Optional for a long list of rivers

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

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



diff --git a/groups/FreeCol/FreeCol.yaml b/groups/FreeCol/FreeCol.yaml
index 8a00742..8c129da 100644
--- a/groups/FreeCol/FreeCol.yaml
+++ b/groups/FreeCol/FreeCol.yaml
@@ -54,6 +54,7 @@
 - model.nation.*.ship.*
 - model.nation.Portuguese.Europe
 - model.nation.Swedish.Europe
+- model.other.region.river.*
 - model.region.default
 - model.unit.nationUnit
 - model.unit.occupation.active

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f38a9eda5258cad75a88bf26e129d2e8bd82e8d
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] Remove title case - change (mediawiki...OAuth)

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

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


Change subject: Remove title case
..

Remove title case

Change-Id: I820d23425e720dcbe25db6ca4ed61bc5a111f478
---
M frontend/language/MWOAuth.i18n.php
1 file changed, 14 insertions(+), 14 deletions(-)


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

diff --git a/frontend/language/MWOAuth.i18n.php 
b/frontend/language/MWOAuth.i18n.php
index 3992f83..767dc28 100644
--- a/frontend/language/MWOAuth.i18n.php
+++ b/frontend/language/MWOAuth.i18n.php
@@ -180,23 +180,23 @@
 
'mwoauth-form-description' = 'The following application is requesting 
to use MediaWiki on your behalf. The application will be able to perform any 
actions that are allowed with the list if reqested rights below. Only allow 
applications that you trust to use these permissions as you would.',
'mwoauth-form-legal' = '',
-   'mwoauth-form-button-approve' = 'Yes, Allow',
+   'mwoauth-form-button-approve' = 'Yes, allow',
'mwoauth-form-confirmation' = 'Allow this application to act on your 
behalf?',
-   'mwoauth-authorize-form' = 'Application Details:',
-   'mwoauth-authorize-form-user' = 'Application Author: $1',
-   'mwoauth-authorize-form-name' = 'Application Name: $1',
-   'mwoauth-authorize-form-description' = 'Application Description: $1',
-   'mwoauth-authorize-form-version' = 'Application Version: $1',
+   'mwoauth-authorize-form' = 'Application details:',
+   'mwoauth-authorize-form-user' = 'Application author: $1',
+   'mwoauth-authorize-form-name' = 'Application name: $1',
+   'mwoauth-authorize-form-description' = 'Application description: $1',
+   'mwoauth-authorize-form-version' = 'Application version: $1',
'mwoauth-authorize-form-wiki' = 'Wiki: $1',
-   'mwoauth-grants-heading' = 'Requested Permissions: ',
+   'mwoauth-grants-heading' = 'Requested permissions: ',
'mwoauth-grants-nogrants' = 'The application has not requested any 
permissions.',
-   'mwoauth-grants-editpages' = 'Edit Pages',
-   'mwoauth-grants-editmyinterface' = 'Edit Your Interface (Javascript 
and CSS) Pages',
-   'mwoauth-grants-editinterface' = 'Edit MediaWiki\'s Interface 
(Javascript and CSS) Pages',
-   'mwoauth-grants-movepages' = 'Move Pages',
-   'mwoauth-grants-createpages' = 'Create Pages',
-   'mwoauth-grants-deletepages' = 'Delete Pages',
-   'mwoauth-grants-upload' = 'Upload Files',
+   'mwoauth-grants-editpages' = 'Edit pages',
+   'mwoauth-grants-editmyinterface' = 'Edit your interface (Javascript 
and CSS) pages',
+   'mwoauth-grants-editinterface' = 'Edit MediaWiki\'s interface 
(Javascript and CSS) pages',
+   'mwoauth-grants-movepages' = 'Move pages',
+   'mwoauth-grants-createpages' = 'Create pages',
+   'mwoauth-grants-deletepages' = 'Delete pages',
+   'mwoauth-grants-upload' = 'Upload files',
 
'mwoauth-grant-editpage' = 'Edit existing pages',
'mwoauth-grant-createeditmovepage' = 'Create, edit, and move pages',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I820d23425e720dcbe25db6ca4ed61bc5a111f478
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
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 explicit GENDER for log entries - change (mediawiki...OAuth)

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

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


Change subject: Add explicit GENDER for log entries
..

Add explicit GENDER for log entries

Change-Id: I42897ec0ce270715f5bf749728909a600316028e
---
M frontend/language/MWOAuth.i18n.php
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/frontend/language/MWOAuth.i18n.php 
b/frontend/language/MWOAuth.i18n.php
index 767dc28..fc0eb9d 100644
--- a/frontend/language/MWOAuth.i18n.php
+++ b/frontend/language/MWOAuth.i18n.php
@@ -155,12 +155,12 @@
'mwoauthmanagemygrants-success-update' = 'The access token for this 
consumer has been updated.',
'mwoauthmanagemygrants-success-renounce' = 'The access token for this 
consumer has been deleted.',
 
-   'logentry-mwoauthconsumer-propose' = '$1 proposed an OAuth consumer 
(consumer key $4)',
-   'logentry-mwoauthconsumer-update' = '$1 updated an OAuth consumer 
(consumer key $4)',
-   'logentry-mwoauthconsumer-approve' = '$1 approved an OAuth consumer by 
$2 (consumer key $4)',
-   'logentry-mwoauthconsumer-reject' = '$1 rejected an OAuth consumer by 
$2 (consumer key $4)',
-   'logentry-mwoauthconsumer-disable' = '$1 disabled an OAuth consumer by 
$2 (consumer key $4)',
-   'logentry-mwoauthconsumer-reenable' = '$1 re-enabled an OAuth consumer 
by $2 (consumer key $4)',
+   'logentry-mwoauthconsumer-propose' = '$1 {{GENDER:$2|proposed}} an 
OAuth consumer (consumer key $4)',
+   'logentry-mwoauthconsumer-update' = '$1 {{GENDER:$2|updated}} an OAuth 
consumer (consumer key $4)',
+   'logentry-mwoauthconsumer-approve' = '$1 {{GENDER:$2|approved}} an 
OAuth consumer by $2 (consumer key $4)',
+   'logentry-mwoauthconsumer-reject' = '$1 {{GENDER:$2|rejected}} an 
OAuth consumer by $2 (consumer key $4)',
+   'logentry-mwoauthconsumer-disable' = '$1 {{GENDER:$2|disabled}} an 
OAuth consumer by $2 (consumer key $4)',
+   'logentry-mwoauthconsumer-reenable' = '$1 {{GENDER:$2|re-enabled}} an 
OAuth consumer by $2 (consumer key $4)',
 
'mwoauthconsumer-consumer-logpage' = 'OAuth consumer log',
'mwoauthconsumer-consumer-logpagetext' = 'Log of approvals, 
rejections, and disabling of registered OAuth consumers.',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42897ec0ce270715f5bf749728909a600316028e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
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] Run MediaWiki unit tests via 'vagrant run-tests' - change (mediawiki/vagrant)

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

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


Change subject: Run MediaWiki unit tests via 'vagrant run-tests'
..

Run MediaWiki unit tests via 'vagrant run-tests'

This patch uses extends the MediaWiki-Vagrant's Vagrant plug-in to add a
Vagrant subcommand, 'run-tests', that executes PHPUnit tests on a running VM.

With the exception of '-h' / '--help' (which prompt Vagrant to print usage info
and then exit), all other command-line arguments are passed through to phpunit.

Bug: 46676
Change-Id: I7340a306d92ed5f4bb7cfb3c0a0a7b1e7c19fa53
---
A lib/mediawiki-vagrant/commands/run-tests.rb
M lib/mediawiki-vagrant/plugin.rb
A puppet/modules/mediawiki/files/run-mediawiki-tests
M puppet/modules/mediawiki/manifests/init.pp
4 files changed, 28 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/14/73714/1

diff --git a/lib/mediawiki-vagrant/commands/run-tests.rb 
b/lib/mediawiki-vagrant/commands/run-tests.rb
new file mode 100644
index 000..e7b46a4
--- /dev/null
+++ b/lib/mediawiki-vagrant/commands/run-tests.rb
@@ -0,0 +1,12 @@
+class RunTests  Vagrant.plugin(2, :command)
+def execute
+   if ['-h', '--help'].include? @argv.first
+   @env.ui.info Usage: vagrant run-tests [tests] [-h]
+   return 0
+   end
+   opts = { extra_args: @argv.unshift('run-mediawiki-tests') }
+   with_target_vms(nil, :single_target = true) do |vm|
+   vm.action :ssh, ssh_opts: opts
+   end
+end
+end
diff --git a/lib/mediawiki-vagrant/plugin.rb b/lib/mediawiki-vagrant/plugin.rb
index d3737c8..6989a97 100644
--- a/lib/mediawiki-vagrant/plugin.rb
+++ b/lib/mediawiki-vagrant/plugin.rb
@@ -1,8 +1,13 @@
 class MediaWikiVagrant  Vagrant.plugin('2')
-name 'MediaWiki Vagrant'
+name 'MediaWiki-Vagrant'
 
 command 'paste-puppet' do
 require 'mediawiki-vagrant/commands/paste-puppet'
 PastePuppet
 end
+
+command 'run-tests' do
+require 'mediawiki-vagrant/commands/run-tests'
+RunTests
+end
 end
diff --git a/puppet/modules/mediawiki/files/run-mediawiki-tests 
b/puppet/modules/mediawiki/files/run-mediawiki-tests
new file mode 100644
index 000..a246d16
--- /dev/null
+++ b/puppet/modules/mediawiki/files/run-mediawiki-tests
@@ -0,0 +1,4 @@
+#!/bin/bash
+. /etc/profile.d/puppet-managed/set_mw_install_path.sh
+cd $MW_INSTALL_PATH
+php tests/phpunit/phpunit.php --testdox $@
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index b5f1cf2..c1a8be2 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -126,6 +126,12 @@
 require = Exec['mediawiki setup'],
 }
 
+file { '/usr/local/bin/run-mediawiki-tests':
+source  = 'puppet:///modules/mediawiki/run-mediawiki-tests',
+mode= '0755',
+require = Exec['configure phpunit'],
+}
+
 exec { 'update database':
 command = php ${dir}/maintenance/update.php --quick,
 refreshonly = true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7340a306d92ed5f4bb7cfb3c0a0a7b1e7c19fa53
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: 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] Update tags for OAth extension - change (translatewiki)

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

Change subject: Update tags for OAth extension
..


Update tags for OAth extension

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

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



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 5a67fce..bb192a3 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -907,6 +907,7 @@
 file = OAuth/frontend/language/MWOAuth.i18n.php
 aliasfile = OAuth/frontend/language/MWOAuth.alias.php
 descmsg = mwoauth-desc
+ignored = mwoauth-form-legal
 
 Ogg Handler
 magicfile = OggHandler/OggHandler.i18n.magic.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14c22ba247c27a22988658bafd183b6bc1fb8bea
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] Update tags for OAth extension - change (translatewiki)

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

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


Change subject: Update tags for OAth extension
..

Update tags for OAth extension

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/15/73715/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 5a67fce..bb192a3 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -907,6 +907,7 @@
 file = OAuth/frontend/language/MWOAuth.i18n.php
 aliasfile = OAuth/frontend/language/MWOAuth.alias.php
 descmsg = mwoauth-desc
+ignored = mwoauth-form-legal
 
 Ogg Handler
 magicfile = OggHandler/OggHandler.i18n.magic.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14c22ba247c27a22988658bafd183b6bc1fb8bea
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] Run MediaWiki unit tests via 'vagrant run-tests' - change (mediawiki/vagrant)

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

Change subject: Run MediaWiki unit tests via 'vagrant run-tests'
..


Run MediaWiki unit tests via 'vagrant run-tests'

This patch uses extends the MediaWiki-Vagrant's Vagrant plug-in to add a
Vagrant subcommand, 'run-tests', that executes PHPUnit tests on a running VM.

With the exception of '-h' / '--help' (which prompt Vagrant to print usage info
and then exit), all other command-line arguments are passed through to phpunit.

This patch also fixes whitespace in other ruby files.

Bug: 46676
Change-Id: I7340a306d92ed5f4bb7cfb3c0a0a7b1e7c19fa53
---
M lib/mediawiki-vagrant/commands/paste-puppet.rb
A lib/mediawiki-vagrant/commands/run-tests.rb
M lib/mediawiki-vagrant/plugin.rb
A puppet/modules/mediawiki/files/run-mediawiki-tests
M puppet/modules/mediawiki/manifests/init.pp
5 files changed, 49 insertions(+), 22 deletions(-)

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



diff --git a/lib/mediawiki-vagrant/commands/paste-puppet.rb 
b/lib/mediawiki-vagrant/commands/paste-puppet.rb
index 205d0d0..1ddaa78 100644
--- a/lib/mediawiki-vagrant/commands/paste-puppet.rb
+++ b/lib/mediawiki-vagrant/commands/paste-puppet.rb
@@ -2,29 +2,29 @@
 
 class PastePuppet  Vagrant.plugin(2, :command)
 
-   URL = URI('http://dpaste.de/api/')
+URL = URI('http://dpaste.de/api/')
 
-   def latest_logfile
-   Dir[File.join $DIR, '/logs/puppet/*.log'].max_by { |f| 
File.mtime f }
-   end
+def latest_logfile
+Dir[File.join $DIR, '/logs/puppet/*.log'].max_by { |f| File.mtime f }
+end
 
 def execute
-   begin
-   res = Net::HTTP.post_form URL, content: 
File.read(latest_logfile)
-   raise unless res.value.nil? and res.body =~ /^[^]+$/
-   rescue RuntimeError
-   @env.ui.error Unexpected response from #{URL}.
-   1
-   rescue TypeError
-   @env.ui.error 'No Puppet log files found.'
-   1
-   rescue SocketError, Net::HTTPExceptions
-   @env.ui.error Unable to connect to #{URL}.
-   1
-   else
-   @env.ui.success HTTP #{res.code} #{res.msg}
-   @env.ui.info res.body[1...-1]
-   0
-   end
+begin
+res = Net::HTTP.post_form URL, content: File.read(latest_logfile)
+raise unless res.value.nil? and res.body =~ /^[^]+$/
+rescue RuntimeError
+@env.ui.error Unexpected response from #{URL}.
+1
+rescue TypeError
+@env.ui.error 'No Puppet log files found.'
+1
+rescue SocketError, Net::HTTPExceptions
+@env.ui.error Unable to connect to #{URL}.
+1
+else
+@env.ui.success HTTP #{res.code} #{res.msg}
+@env.ui.info res.body[1...-1]
+0
+end
 end
 end
diff --git a/lib/mediawiki-vagrant/commands/run-tests.rb 
b/lib/mediawiki-vagrant/commands/run-tests.rb
new file mode 100644
index 000..79dc78f
--- /dev/null
+++ b/lib/mediawiki-vagrant/commands/run-tests.rb
@@ -0,0 +1,12 @@
+class RunTests  Vagrant.plugin(2, :command)
+def execute
+if ['-h', '--help'].include? @argv.first
+@env.ui.info Usage: vagrant run-tests [tests] [-h]
+return 0
+end
+opts = { extra_args: @argv.unshift('run-mediawiki-tests') }
+with_target_vms(nil, :single_target = true) do |vm|
+vm.action :ssh, ssh_opts: opts
+end
+end
+end
diff --git a/lib/mediawiki-vagrant/plugin.rb b/lib/mediawiki-vagrant/plugin.rb
index d3737c8..6989a97 100644
--- a/lib/mediawiki-vagrant/plugin.rb
+++ b/lib/mediawiki-vagrant/plugin.rb
@@ -1,8 +1,13 @@
 class MediaWikiVagrant  Vagrant.plugin('2')
-name 'MediaWiki Vagrant'
+name 'MediaWiki-Vagrant'
 
 command 'paste-puppet' do
 require 'mediawiki-vagrant/commands/paste-puppet'
 PastePuppet
 end
+
+command 'run-tests' do
+require 'mediawiki-vagrant/commands/run-tests'
+RunTests
+end
 end
diff --git a/puppet/modules/mediawiki/files/run-mediawiki-tests 
b/puppet/modules/mediawiki/files/run-mediawiki-tests
new file mode 100644
index 000..a246d16
--- /dev/null
+++ b/puppet/modules/mediawiki/files/run-mediawiki-tests
@@ -0,0 +1,4 @@
+#!/bin/bash
+. /etc/profile.d/puppet-managed/set_mw_install_path.sh
+cd $MW_INSTALL_PATH
+php tests/phpunit/phpunit.php --testdox $@
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index b5f1cf2..c1a8be2 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -126,6 +126,12 @@
 require = Exec['mediawiki setup'],
 }
 
+ 

[MediaWiki-commits] [Gerrit] (bug 51327) Configure $wgImportSources for tnwiki, xhwiki, z... - change (operations/mediawiki-config)

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

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


Change subject: (bug 51327) Configure $wgImportSources for tnwiki, xhwiki, 
zuwiki
..

(bug 51327) Configure $wgImportSources for tnwiki, xhwiki, zuwiki

Adding enwiki to $wgImportSources for those three wikis per
bug request.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index af4a3ba..cd06ae7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8736,11 +8736,12 @@
'test2wiki' = array( 'en', 'cs' ),
'tetwiki' = array( 'en', 'de', 'pt' ),
'tewikisource' = array( 'w', 'b' ),
+   'tnwiki' = array( 'en' ), // bug 51327
'tpiwiki' = array( 'en', 'simple', 'wikt:en', 'commons' ),
'trwikimedia' = array( 'w', 'meta' ),
'ukwikimedia' = array( 'm' ),
 
-   #  vi languages : bug 7854
+   # vi languages: bug 7854
'vecwiki'  = array( 'it' ),
'vecwiktionary' = array( 'w', 'en', 'fr', 'it' ), // bug 49575
'viwiki'   = array( 'wikt', 'b', 's', 'q' ),
@@ -8755,11 +8756,12 @@
'wikimania2013wiki' = array( 'en', 'meta', 'wm2011', 'wm2012' ),
'wikimania2014wiki' = array( 'en', 'meta', 'wm2011', 'wm2012', 
'wm2013' ),
'wuuwiki' = array( 'en', 'th', 'fr', 'zh', ),
-
+   'xhwiki' = array( 'en' ), // bug 51327
'zhwikiquote' = array( 'w', 'b', 'wikt', 's', 'meta', 'commons' ),
'zhwiktionary' = array( 'w', 'b', 'q', 's', 'meta', 'commons' ),
'zhwikibooks' = array( 'w', 'wikt', 'q', 's', 'meta', 'commons' ),
'zhwikisource' = array( 'w', 'b', 'q', 'wikt', 'meta', 'commons' ),
+   'zuwiki' = array( 'en' ), // bug 51327
 ),
 # @} end of wgImportSources
 

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

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

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


[MediaWiki-commits] [Gerrit] Add namespace names in Chechen language (ce) - change (mediawiki...Scribunto)

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

Change subject: Add namespace names in Chechen language (ce)
..


Add namespace names in Chechen language (ce)

Bug: 51206
Change-Id: I279325b7cda0f93c2422a9307787cddd4f5763c7
---
M Scribunto.namespaces.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/Scribunto.namespaces.php b/Scribunto.namespaces.php
index 42f2e74..7acac5f 100644
--- a/Scribunto.namespaces.php
+++ b/Scribunto.namespaces.php
@@ -53,6 +53,11 @@
829 = 'Mòdul_Discussió',
 );
 
+$namespaceNames['ce'] = array(
+   828 = 'Модуль',
+   829 = 'Модулин_дийцаре',
+);
+
 $namespaceNames['crh'] = array(
828 = 'Modul',
829 = 'Modul_muzakeresi',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I279325b7cda0f93c2422a9307787cddd4f5763c7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: TTO at.li...@live.com.au
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Odder tom...@twkozlowski.net
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] Fix api help url - change (mediawiki...TemplateData)

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

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


Change subject: Fix api help url
..

Fix api help url

Change-Id: I49da3832e4905e659fd3d4f33b5470e48a3ccab6
---
M api/ApiTemplateData.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/api/ApiTemplateData.php b/api/ApiTemplateData.php
index 7538d58..260363a 100644
--- a/api/ApiTemplateData.php
+++ b/api/ApiTemplateData.php
@@ -138,6 +138,6 @@
}
 
public function getHelpUrls() {
-   return 'https://www.mediawiki.org/Extension:TemplateData';
+   return 'https://www.mediawiki.org/wiki/Extension:TemplateData';
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Fix api help url - change (mediawiki...TemplateData)

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

Change subject: Fix api help url
..


Fix api help url

Change-Id: I49da3832e4905e659fd3d4f33b5470e48a3ccab6
---
M api/ApiTemplateData.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/api/ApiTemplateData.php b/api/ApiTemplateData.php
index 7538d58..260363a 100644
--- a/api/ApiTemplateData.php
+++ b/api/ApiTemplateData.php
@@ -138,6 +138,6 @@
}
 
public function getHelpUrls() {
-   return 'https://www.mediawiki.org/Extension:TemplateData';
+   return 'https://www.mediawiki.org/wiki/Extension:TemplateData';
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49da3832e4905e659fd3d4f33b5470e48a3ccab6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Trevor Parscal tpars...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add docs to README file - change (mediawiki...Ask)

2013-07-14 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Add docs to README file
..

Add docs to README file

Change-Id: I7d15da322993e1b579483b9fdb9f9d811adc3783
---
M README.md
1 file changed, 153 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask 
refs/changes/18/73718/1

diff --git a/README.md b/README.md
index d3762cd..58f421f 100644
--- a/README.md
+++ b/README.md
@@ -38,10 +38,161 @@
 Load all dependencies and the load the Ask library by including its entry 
point:
 Ask.php.
 
+## Structure
+
+The Ask library defines the Ask query language. Its important components are:
+
+* Ask\Language - everything part of the ask language itself
+
+* Ask\Language\Description - descriptions (aka concepts)
+* Ask\Language\Option - QueryOptions object and its parts
+* Ask\Language\Selection - selection requests
+* Ask\Language\Query.php - the object defining what a query is
+
+### Description
+
+Each query has a single description which specifies which entities match. This 
is similar to the
+WHERE part of an SQL string. There different types of descriptions are listed 
below. Since several
+types of descriptions can be composed out of one or more sub descriptions, 
tree like structures can
+be created.
+
+* Description - abstract base class
+
+* AnyValue - A description that matches any object
+* Conjunction - Description of a collection of many descriptions, all of 
which must be satisfied (AND)
+* Disjunction - Description of a collection of many descriptions, at least 
one of which must be satisfied (OR)
+* SomeProperty - Description of a set of instances that have an attribute 
with some value that fits another (sub)description
+* ValueDescription - Description of one data value, or of a range of data 
values
+
+All descriptions reside in the Ask\Language\Description namespace.
+
+### Option
+
+The options a query consist out of are defined by the 
codeQueryOptions/code class. This class
+contains limit, offset and sorting options.
+
+Sorting options are defined by the codeSortOptions/code class, which 
contains a list of
+codeSortExpression/code objects.
+
+All options related classes reside in the Ask\Language\Option namespace.
+
+### Selection
+
+Specifying what information a query should select from matching entities is 
done via the selection
+requests in the query object. Selection requests are thus akin to the SELECT 
part of an SQL string.
+They thus have no effect on which entities match the query and are returned. 
All types of selection
+request implement abstract base class SelectionRequest and can be found in the 
Ask\Language\Selection
+namespace.
+
 ## Usage
 
-The [extension page on 
mediawiki.org](https://www.mediawiki.org/wiki/Extension:Ask)
-contains the documentation and examples for this library.
+ A query for the first hunded entities that are compared
+
+```php
+use Ask\Language\Query;
+use Ask\Language\Description\AnyValue;
+use Ask\Language\Option\QueryOptions;
+
+$myAwesomeQuery = new Query(
+new AnyValue(),
+array(),
+new QueryOptions( 100, 0 )
+);
+```
+
+ A query with an offset of 50
+
+```php
+$myAwesomeQuery = new Query(
+new AnyValue(),
+array(),
+new QueryOptions( 100, 50 )
+);
+```
+
+ A query to get the ''cost'' of the first hundered entities that have a 
''cost'' property
+
+This is assuming 'p42' is an identifier for a ''cost'' property.
+
+```php
+$awesomePropertyId = new PropertyValue( 'p42' );
+
+$myAwesomeQuery = new Query(
+new SomeProperty( $awesomePropertyId, new AnyValue() ),
+array(
+new PropertySelection( $awesomePropertyId )
+),
+new QueryOptions( 100, 0 )
+);
+```
+
+ A query to get the first hundred entities that have 9000.1 as value for 
their ''cost'' property.
+
+This is assuming 'p42' is an identifier for a ''cost'' property.
+
+```php
+$awesomePropertyId = new PropertyValue( 'p42' );
+$someCost = new NumericValue( 9000.1 );
+
+$myAwesomeQuery = new Query(
+new SomeProperty( $awesomePropertyId, new ValueDescription( $someCost ) ),
+array(),
+new QueryOptions( 100, 0 )
+);
+```
+
+ A query getting the hundred entities with highest ''cost'', highest 
''cost'' first
+
+This is assuming 'p42' is an identifier for a ''cost'' property.
+
+```php
+$awesomePropertyId = new PropertyValue( 'p42' );
+
+$myAwesomeQuery = new Query(
+new AnyValue(),
+array(),
+new QueryOptions(
+100,
+0,
+new SortOptions( array(
+new PropertyValueSortExpression( $awesomePropertyId, 
SortExpression::DESCENDING )
+) )
+)
+);
+```
+
+ A query to get the hundred first entities that have a ''cost'' either 
equal to 42 or bigger than 9000
+
+This is assuming 'p42' is an identifier for a ''cost'' property.
+
+```php
+$awesomePropertyId = new 

[MediaWiki-commits] [Gerrit] Add docs to README file - change (mediawiki...Ask)

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

Change subject: Add docs to README file
..


Add docs to README file

Change-Id: I7d15da322993e1b579483b9fdb9f9d811adc3783
---
M README.md
1 file changed, 153 insertions(+), 2 deletions(-)

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



diff --git a/README.md b/README.md
index d3762cd..58f421f 100644
--- a/README.md
+++ b/README.md
@@ -38,10 +38,161 @@
 Load all dependencies and the load the Ask library by including its entry 
point:
 Ask.php.
 
+## Structure
+
+The Ask library defines the Ask query language. Its important components are:
+
+* Ask\Language - everything part of the ask language itself
+
+* Ask\Language\Description - descriptions (aka concepts)
+* Ask\Language\Option - QueryOptions object and its parts
+* Ask\Language\Selection - selection requests
+* Ask\Language\Query.php - the object defining what a query is
+
+### Description
+
+Each query has a single description which specifies which entities match. This 
is similar to the
+WHERE part of an SQL string. There different types of descriptions are listed 
below. Since several
+types of descriptions can be composed out of one or more sub descriptions, 
tree like structures can
+be created.
+
+* Description - abstract base class
+
+* AnyValue - A description that matches any object
+* Conjunction - Description of a collection of many descriptions, all of 
which must be satisfied (AND)
+* Disjunction - Description of a collection of many descriptions, at least 
one of which must be satisfied (OR)
+* SomeProperty - Description of a set of instances that have an attribute 
with some value that fits another (sub)description
+* ValueDescription - Description of one data value, or of a range of data 
values
+
+All descriptions reside in the Ask\Language\Description namespace.
+
+### Option
+
+The options a query consist out of are defined by the 
codeQueryOptions/code class. This class
+contains limit, offset and sorting options.
+
+Sorting options are defined by the codeSortOptions/code class, which 
contains a list of
+codeSortExpression/code objects.
+
+All options related classes reside in the Ask\Language\Option namespace.
+
+### Selection
+
+Specifying what information a query should select from matching entities is 
done via the selection
+requests in the query object. Selection requests are thus akin to the SELECT 
part of an SQL string.
+They thus have no effect on which entities match the query and are returned. 
All types of selection
+request implement abstract base class SelectionRequest and can be found in the 
Ask\Language\Selection
+namespace.
+
 ## Usage
 
-The [extension page on 
mediawiki.org](https://www.mediawiki.org/wiki/Extension:Ask)
-contains the documentation and examples for this library.
+ A query for the first hunded entities that are compared
+
+```php
+use Ask\Language\Query;
+use Ask\Language\Description\AnyValue;
+use Ask\Language\Option\QueryOptions;
+
+$myAwesomeQuery = new Query(
+new AnyValue(),
+array(),
+new QueryOptions( 100, 0 )
+);
+```
+
+ A query with an offset of 50
+
+```php
+$myAwesomeQuery = new Query(
+new AnyValue(),
+array(),
+new QueryOptions( 100, 50 )
+);
+```
+
+ A query to get the ''cost'' of the first hundered entities that have a 
''cost'' property
+
+This is assuming 'p42' is an identifier for a ''cost'' property.
+
+```php
+$awesomePropertyId = new PropertyValue( 'p42' );
+
+$myAwesomeQuery = new Query(
+new SomeProperty( $awesomePropertyId, new AnyValue() ),
+array(
+new PropertySelection( $awesomePropertyId )
+),
+new QueryOptions( 100, 0 )
+);
+```
+
+ A query to get the first hundred entities that have 9000.1 as value for 
their ''cost'' property.
+
+This is assuming 'p42' is an identifier for a ''cost'' property.
+
+```php
+$awesomePropertyId = new PropertyValue( 'p42' );
+$someCost = new NumericValue( 9000.1 );
+
+$myAwesomeQuery = new Query(
+new SomeProperty( $awesomePropertyId, new ValueDescription( $someCost ) ),
+array(),
+new QueryOptions( 100, 0 )
+);
+```
+
+ A query getting the hundred entities with highest ''cost'', highest 
''cost'' first
+
+This is assuming 'p42' is an identifier for a ''cost'' property.
+
+```php
+$awesomePropertyId = new PropertyValue( 'p42' );
+
+$myAwesomeQuery = new Query(
+new AnyValue(),
+array(),
+new QueryOptions(
+100,
+0,
+new SortOptions( array(
+new PropertyValueSortExpression( $awesomePropertyId, 
SortExpression::DESCENDING )
+) )
+)
+);
+```
+
+ A query to get the hundred first entities that have a ''cost'' either 
equal to 42 or bigger than 9000
+
+This is assuming 'p42' is an identifier for a ''cost'' property.
+
+```php
+$awesomePropertyId = new PropertyValue( 'p42' );
+$costOf42 = new 

[MediaWiki-commits] [Gerrit] Fix parameters for messages - change (mediawiki...InlineCategorizer)

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

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


Change subject: Fix parameters for messages
..

Fix parameters for messages

Change-Id: If9fe7479e26cd3fba18c87a3851e2b0568975dec
---
M modules/ext.inlineCategorizer.core.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ext.inlineCategorizer.core.js 
b/modules/ext.inlineCategorizer.core.js
index e934dae..8039c9a 100644
--- a/modules/ext.inlineCategorizer.core.js
+++ b/modules/ext.inlineCategorizer.core.js
@@ -621,7 +621,7 @@
 
// Old cat wasn't found, likely to be 
transcluded
if ( !$.isArray( matches ) ) {
-   ajaxcat.showError( mw.msg( 
'inlinecategorizer-edit-category-error' ) );
+   ajaxcat.showError( mw.msg( 
'inlinecategorizer-edit-category-error', oldCatName ) );
return false;
}
 
@@ -795,7 +795,7 @@
newText = newText.replace( categoryRegex, '' );
 
if ( newText === oldText ) {
-   ajaxcat.showError( mw.msg( 
'inlinecategorizer-remove-category-error' ) );
+   ajaxcat.showError( mw.msg( 
'inlinecategorizer-remove-category-error', category ) );
return false;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Reduce Lilypond memory usage - change (mediawiki...Score)

2013-07-14 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review.

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


Change subject: Reduce Lilypond memory usage
..

Reduce Lilypond memory usage

Tweak scheme GC tunable for better memory efficiency.

Change-Id: If81a28e3d488174c16b516bbc81d69a387831866
---
M Score.body.php
1 file changed, 10 insertions(+), 1 deletion(-)


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

diff --git a/Score.body.php b/Score.body.php
index 75b92a6..473db9e 100644
--- a/Score.body.php
+++ b/Score.body.php
@@ -605,12 +605,21 @@
if ( !$rc ) {
throw new ScoreException( wfMessage( 'score-chdirerr', 
$factoryDirectory ) );
}
+
+   // Reduce the GC yield to 25% since testing indicates that this 
will
+   // reduce memory usage by a factor of 3 or so with minimal 
impact on
+   // CPU time. Tested with 
http://www.mutopiaproject.org/cgibin/piece-info.cgi?id=108
+   //
+   // Note that if Lilypond is compiled against Guile 2.0+, this
+   // probably won't do anything.
+   $env = array( 'LILYPOND_GC_YIELD' = '25' );
+
$cmd = wfEscapeShellArg( $wgScoreLilyPond )
. ' ' . wfEscapeShellArg( '-dsafe=#t' )
. ' -dbackend=ps --png --header=texidoc '
. wfEscapeShellArg( $factoryLy )
. ' 21';
-   $output = wfShellExec( $cmd, $rc2 );
+   $output = wfShellExec( $cmd, $rc2, $env );
$rc = chdir( $oldcwd );
if ( !$rc ) {
throw new ScoreException( wfMessage( 'score-chdirerr', 
$oldcwd ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If81a28e3d488174c16b516bbc81d69a387831866
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Score
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] HACK: Don't merge adjacent annotations from Parsoid - change (mediawiki...VisualEditor)

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

Change subject: HACK: Don't merge adjacent annotations from Parsoid
..


HACK: Don't merge adjacent annotations from Parsoid

Adjacent annotations should not be merged if they both
originate from Parsoid. This is a hack because this logic
should be in Parsoid, not VE.

Bug: 49873
Change-Id: If1e23e3039178300d72b1c0c585931417bb603b5
---
M modules/ve-mw/test/dm/ve.dm.mwExample.js
M modules/ve/dm/ve.dm.Annotation.js
M modules/ve/dm/ve.dm.AnnotationSet.js
3 files changed, 117 insertions(+), 6 deletions(-)

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



diff --git a/modules/ve-mw/test/dm/ve.dm.mwExample.js 
b/modules/ve-mw/test/dm/ve.dm.mwExample.js
index d343293..3373912 100644
--- a/modules/ve-mw/test/dm/ve.dm.mwExample.js
+++ b/modules/ve-mw/test/dm/ve.dm.mwExample.js
@@ -535,6 +535,77 @@
 ];
 
 ve.dm.mwExample.domToDataCases = {
+   'adjacent annotations': {
+   'html':
+   'body' +
+   'ba/bb data-parsoid=1b/bbc/bb 
data-parsoid=2d/b ' +
+   'ba/bbb/b ' +
+   'b data-parsoid=3ab/bb 
data-parsoid=4c/b' +
+   '/body',
+   'data': [
+   { 'type': 'paragraph', 'internal': { 'generated': 
'wrapper' } },
+   [ 'a', [ ve.dm.example.bold ] ],
+   [
+   'b',
+   [ {
+   'type': 'textStyle/bold',
+   'htmlAttributes': [ { 'values': {
+   'data-parsoid': '1'
+   } } ]
+   } ]
+   ],
+   [ 'c', [ ve.dm.example.bold ] ],
+   [
+   'd',
+   [ {
+   'type': 'textStyle/bold',
+   'htmlAttributes': [ { 'values': {
+   'data-parsoid': '2'
+   } } ]
+   } ]
+   ],
+   ' ',
+   [ 'a', [ ve.dm.example.bold ] ],
+   [ 'b', [ ve.dm.example.bold ] ],
+   ' ',
+   [
+   'a',
+   [ {
+   'type': 'textStyle/bold',
+   'htmlAttributes': [ { 'values': {
+   'data-parsoid': '3'
+   } } ]
+   } ]
+   ],
+   [
+   'b',
+   [ {
+   'type': 'textStyle/bold',
+   'htmlAttributes': [ { 'values': {
+   'data-parsoid': '3'
+   } } ]
+   } ]
+   ],
+   [
+   'c',
+   [ {
+   'type': 'textStyle/bold',
+   'htmlAttributes': [ { 'values': {
+   'data-parsoid': '4'
+   } } ]
+   } ]
+   ],
+   { 'type': '/paragraph' },
+   { 'type': 'internalList' },
+   { 'type': '/internalList' }
+   ],
+   'normalizedHtml':
+   'body' +
+   'babcd/b ' +
+   'bab/b ' +
+   'b data-parsoid=3ab/bb 
data-parsoid=4c/b' +
+   '/body'
+   },
'mw:Image': {
'html': 'bodyp' + ve.dm.mwExample.MWInlineImageHtml + 
'/p/body',
'data': [
@@ -1433,7 +1504,17 @@
]
},
'attribute preservation does not crash due to text node split': {
-   'html': 'bodyfigure typeof=mw:Image/Thumb 
data-parsoid={}a href=Foo data-parsoid={}img src=Bar width=1 
height=2 resource=FooBar data-parsoid={}/afigcaption 
data-parsoid={} foo a rel=mw:WikiLink href=./Bar 
data-parsoid={}bar/a baz/figcaption/figure/body',
+   'html':
+   'body' +
+   'figure typeof=mw:Image/Thumb 
data-parsoid={}' +
+   'a href=Foo data-parsoid={}' +

[MediaWiki-commits] [Gerrit] mod. response handler to utilize file broker context. - change (analytics/user-metrics)

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

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


Change subject: mod. response handler to utilize file broker context.
..

mod. response handler to utilize file broker context.

Change-Id: Ic2946f7552e8fb74049c5856925230620539
---
M user_metrics/api/engine/response_handler.py
M user_metrics/api/run_handlers.py
2 files changed, 10 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/23/73723/1

diff --git a/user_metrics/api/engine/response_handler.py 
b/user_metrics/api/engine/response_handler.py
index d7a4738..4b9eda5 100644
--- a/user_metrics/api/engine/response_handler.py
+++ b/user_metrics/api/engine/response_handler.py
@@ -8,12 +8,10 @@
 __date__ = 2013-03-14
 __license__ = GPL (version 2 or later)
 
+from user_metrics.api import RESPONSE_BROKER_TARGET, umapi_broker_context
 from user_metrics.config import logging
-from user_metrics.api import REQ_NCB_LOCK
 from user_metrics.api.engine.request_meta import rebuild_unpacked_request
 from user_metrics.api.engine.data import set_data, build_key_signature
-from Queue import Empty
-from flask import escape
 
 # Timeout in seconds to wait for data on the queue.  This should be long
 # enough to ensure that the full response can be received
@@ -24,54 +22,21 @@
 # 
 
 
-def process_responses(response_queue, msg_in):
+def process_response():
  Pulls responses off of the queue. 
 
-log_name = '{0} :: {1}'.format(__name__, process_responses.__name__)
+log_name = '{0} :: {1}'.format(__name__, process_response.__name__)
 logging.debug(log_name  + ' - STARTING...')
 
 while 1:
-stream = ''
 
-# Block on the response queue
-try:
-res = response_queue.get(True)
-request_meta = rebuild_unpacked_request(res)
-except Exception:
-logging.error(log_name + ' - Could not get request meta')
-continue
-
-data = response_queue.get(True)
-while data:
-stream += data
-try:
-data = response_queue.get(True, timeout=1)
-except Empty:
-break
-
-try:
-data = eval(stream)
-except Exception as e:
-
-# Report a fraction of the failed response data directly in the
-# logger
-if len(unicode(stream))  2000:
-excerpt = stream[:1000] + ' ... ' + stream[-1000:]
-else:
-excerpt = stream
-
-logging.error(log_name + ' - Request failed. {0}\n\n' \
- 'data excerpt: {1}'.format(e.message, 
excerpt))
-
-# Format a response that will report on the failed request
-stream = OrderedDict([('status', 'Request failed.'),  \
- ('exception', ' + escape(unicode(e.message)) + '), \
- ('request', ' + escape(unicode(request_meta)) + '),  \
- ('data', ' + escape(unicode(stream)) + ')])
-
+# Read request from the broker target
+res_item = umapi_broker_context.pop(RESPONSE_BROKER_TARGET)
+request_meta = rebuild_unpacked_request(res_item)
 key_sig = build_key_signature(request_meta, hash_result=True)
 
 # Add result to cache once completed
+# TODO - umapi_broker_context.add(target, key_sig, res_item)
 
 logging.debug(log_name + ' - Setting data for {0}'.format(
 str(request_meta)))
diff --git a/user_metrics/api/run_handlers.py b/user_metrics/api/run_handlers.py
index 55d6c97..7beba89 100644
--- a/user_metrics/api/run_handlers.py
+++ b/user_metrics/api/run_handlers.py
@@ -22,23 +22,21 @@
 __license__ = GPL (version 2 or later)
 
 import multiprocessing as mp
-from user_metrics.api.engine.response_handler import process_responses
+from user_metrics.api.engine.response_handler import process_response
 from user_metrics.api.engine.request_manager import job_control
 from user_metrics.utils import terminate_process_with_checks
 from user_metrics.config import logging
 
 job_controller_proc = None
 response_controller_proc = None
-rm_callback_proc = None
 
 
-def setup_controller(msg_queue_in):
+def setup_controller():
 
 Sets up the process that handles API jobs
 
 job_controller_proc = mp.Process(target=job_control)
-response_controller_proc = mp.Process(target=process_responses,
-  args=msg_queue_in)
+response_controller_proc = mp.Process(target=process_response)
 job_controller_proc.start()
 response_controller_proc.start()
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2946f7552e8fb74049c5856925230620539
Gerrit-PatchSet: 1
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] rm. refs to request notification handler from api handlers e... - change (analytics/user-metrics)

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

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


Change subject: rm. refs to request notification handler from api handlers 
entry point.
..

rm. refs to request notification handler from api handlers entry point.

Change-Id: I925fd6bc7ab6ba4806b4493fd5f27232792f96e3
---
M user_metrics/api/__init__.py
M user_metrics/api/run_handlers.py
2 files changed, 3 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/22/73722/1

diff --git a/user_metrics/api/__init__.py b/user_metrics/api/__init__.py
index b31d176..5d41e16 100644
--- a/user_metrics/api/__init__.py
+++ b/user_metrics/api/__init__.py
@@ -17,10 +17,6 @@
 
 query_mod = nested_import(settings.__query_module__)
 
-# Lock for request notification callback operations
-# defined in request_manager.py
-REQ_NCB_LOCK = Lock()
-
 # The url path that precedes an API request
 REQUEST_PATH = 'cohorts/'
 
diff --git a/user_metrics/api/run_handlers.py b/user_metrics/api/run_handlers.py
index 741c220..55d6c97 100644
--- a/user_metrics/api/run_handlers.py
+++ b/user_metrics/api/run_handlers.py
@@ -22,11 +22,8 @@
 __license__ = GPL (version 2 or later)
 
 import multiprocessing as mp
-from user_metrics.api.engine.request_manager import \
-req_notification_queue_out, req_notification_queue_in
 from user_metrics.api.engine.response_handler import process_responses
-from user_metrics.api.engine.request_manager import job_control, \
-requests_notification_callback
+from user_metrics.api.engine.request_manager import job_control
 from user_metrics.utils import terminate_process_with_checks
 from user_metrics.config import logging
 
@@ -35,19 +32,15 @@
 rm_callback_proc = None
 
 
-def setup_controller(msg_queue_in, msg_queue_out):
+def setup_controller(msg_queue_in):
 
 Sets up the process that handles API jobs
 
 job_controller_proc = mp.Process(target=job_control)
 response_controller_proc = mp.Process(target=process_responses,
   args=msg_queue_in)
-rm_callback_proc = mp.Process(target=requests_notification_callback,
-  args=(msg_queue_in,
-msg_queue_out))
 job_controller_proc.start()
 response_controller_proc.start()
-rm_callback_proc.start()
 
 
 def teardown():
@@ -58,12 +51,9 @@
 try:
 terminate_process_with_checks(job_controller_proc)
 terminate_process_with_checks(response_controller_proc)
-terminate_process_with_checks(rm_callback_proc)
-
 except Exception:
 logging.error(__name__ + ' :: Could not shut down callbacks.')
 
 
 if __name__ == '__main__':
-setup_controller(req_notification_queue_in,
-req_notification_queue_out)
+setup_controller()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I925fd6bc7ab6ba4806b4493fd5f27232792f96e3
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] rm. Request notification handler to maintain job queue. - change (analytics/user-metrics)

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

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


Change subject: rm. Request notification handler to maintain job queue.
..

rm. Request notification handler to maintain job queue.

Change-Id: I7b0764d42ad85afaa98533ae0ff71a1c5c9508fe
---
M user_metrics/api/engine/request_manager.py
M user_metrics/api/engine/response_handler.py
2 files changed, 1 insertion(+), 173 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/21/73721/1

diff --git a/user_metrics/api/engine/request_manager.py 
b/user_metrics/api/engine/request_manager.py
index 3a5f814..dd33191 100644
--- a/user_metrics/api/engine/request_manager.py
+++ b/user_metrics/api/engine/request_manager.py
@@ -204,12 +204,6 @@
 .format(rm.cohort_expr, rm.metric))
 wait_queue.append(rm)
 
-# Communicate with request notification callback about new job
-key_sig = build_key_signature(rm, hash_result=True)
-url = get_url_from_keys(build_key_signature(rm), REQUEST_PATH)
-req_cb_add_req(key_sig, url, REQ_NCB_LOCK)
-
-
 logging.debug('{0} - FINISHING.'.format(log_name))
 
 
@@ -476,166 +470,3 @@
 results['data'][m[0]] = m[1:]
 
 return results
-
-
-# REQUEST NOTIFICATIONS
-# #
-
-from collections import OrderedDict
-
-req_notification_queue_in = Queue()
-req_notification_queue_out = Queue()
-
-request_msg_type = namedtuple('RequestMessage', 'type hash url is_alive')
-
-
-def requests_notification_callback(msg_queue_in, msg_queue_out):
-
-Asynchronous callback.  Tracks status of requests and new requests.
-This callback utilizes ``msg_queue_in``  ``msg_queue_out`` to
-manage request status.
-
-log_name = '{0} :: {1}'.format(__name__,
-   requests_notification_callback.__name__)
-logging.debug('{0}  - STARTING...'.format(log_name))
-
-# TODO - potentially extend with an in-memory cache
-job_list = OrderedDict()
-while 1:
-
-try:
-msg = msg_queue_in.get(True)
-except IOError as e:
-logging.error(__name__ + ' :: Could not block '
- 'on in queue: {0}'.format(e.message))
-sleep(1)
-continue
-
-try:
-type = msg[0]
-except (KeyError, ValueError):
-logging.error(log_name + ' - No valid type ' \
- '{0}'.format(str(msg)))
-continue
-
-# Init request
-if type == 0:
-try:
-job_list[msg[1]] = [True, msg[2]]
-logging.debug(log_name + ' - Initialize Request: ' \
- '{0}.'.format(str(msg)))
-except Exception:
-logging.error(log_name + ' - Initialize Request' \
- ' failed: {0}'.format(str(msg)))
-
-# Flag request complete - leave on queue
-elif type == 1:
-try:
-job_list[msg[1]][0] = False
-logging.debug(log_name + ' - Set request finished: ' \
- '{0}.\n'.format(str(msg)))
-except Exception:
-logging.error(log_name + ' - Set request finished failed: ' \
- '{0}\n'.format(str(msg)))
-
-# Is the key in the cache and running?
-elif type == 2:
-try:
-if msg[1] in job_list:
-msg_queue_out.put([job_list[msg[1]][0]], True)
-else:
-msg_queue_out.put([False], True)
-logging.debug(log_name + ' - Get request alive: ' \
- '{0}.'.format(str(msg)))
-except (KeyError, ValueError):
-logging.error(log_name + ' - Get request alive failed: ' \
- '{0}'.format(str(msg)))
-
-# Get keys
-elif type == 3:
-msg_queue_out.put(job_list.keys(), True)
-
-# Get url
-elif type == 4:
-try:
-if msg[1] in job_list:
-msg_queue_out.put([job_list[msg[1]][1]], True)
-else:
-logging.error(log_name + ' - Get URL failed: {0}'.
-format(str(msg)))
-except (KeyError, ValueError):
-logging.error(log_name + ' - Get URL failed: 
{0}'.format(str(msg)))
-else:
-logging.error(log_name + ' - Bad message: {0}'.format(str(msg)))
-
-logging.debug('{0}  - SHUTTING DOWN...'.format(log_name))
-
-
-# Wrapper Methods for working with Request Notifications
-# Use locks to enforce atomicity
-
-BLOCK_TIMEOUT = 1
-
-
-def req_cb_get_url(key, lock):
-lock.acquire()
-

[MediaWiki-commits] [Gerrit] rm. obselete refs. - change (analytics/user-metrics)

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

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


Change subject: rm. obselete refs.
..

rm. obselete refs.

Change-Id: I5b84fad8e0d146fda335e1e3c4285da067e25ca0
---
M user_metrics/api/engine/request_manager.py
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/24/73724/1

diff --git a/user_metrics/api/engine/request_manager.py 
b/user_metrics/api/engine/request_manager.py
index dd33191..f8624ca 100644
--- a/user_metrics/api/engine/request_manager.py
+++ b/user_metrics/api/engine/request_manager.py
@@ -83,10 +83,9 @@
 
 from user_metrics.config import logging, settings
 from user_metrics.api import MetricsAPIError, error_codes, query_mod, \
-REQ_NCB_LOCK, REQUEST_PATH, REQUEST_BROKER_TARGET, umapi_broker_context,\
+REQUEST_BROKER_TARGET, umapi_broker_context,\
 RESPONSE_BROKER_TARGET
-from user_metrics.api.engine.data import get_users, get_url_from_keys, \
-build_key_signature
+from user_metrics.api.engine.data import get_users
 from user_metrics.api.engine.request_meta import rebuild_unpacked_request
 from user_metrics.metrics.users import MediaWikiUser
 from user_metrics.metrics.user_metric import UserMetricError
@@ -95,8 +94,6 @@
 from collections import namedtuple
 from os import getpid
 from sys import getsizeof
-from Queue import Empty
-from time import sleep
 
 
 # API JOB HANDLER

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b84fad8e0d146fda335e1e3c4285da067e25ca0
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] rm. refs to request notification handler from api handlers e... - change (analytics/user-metrics)

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

Change subject: rm. refs to request notification handler from api handlers 
entry point.
..


rm. refs to request notification handler from api handlers entry point.

Change-Id: I925fd6bc7ab6ba4806b4493fd5f27232792f96e3
---
M user_metrics/api/__init__.py
M user_metrics/api/run_handlers.py
2 files changed, 3 insertions(+), 17 deletions(-)

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



diff --git a/user_metrics/api/__init__.py b/user_metrics/api/__init__.py
index b31d176..5d41e16 100644
--- a/user_metrics/api/__init__.py
+++ b/user_metrics/api/__init__.py
@@ -17,10 +17,6 @@
 
 query_mod = nested_import(settings.__query_module__)
 
-# Lock for request notification callback operations
-# defined in request_manager.py
-REQ_NCB_LOCK = Lock()
-
 # The url path that precedes an API request
 REQUEST_PATH = 'cohorts/'
 
diff --git a/user_metrics/api/run_handlers.py b/user_metrics/api/run_handlers.py
index 741c220..55d6c97 100644
--- a/user_metrics/api/run_handlers.py
+++ b/user_metrics/api/run_handlers.py
@@ -22,11 +22,8 @@
 __license__ = GPL (version 2 or later)
 
 import multiprocessing as mp
-from user_metrics.api.engine.request_manager import \
-req_notification_queue_out, req_notification_queue_in
 from user_metrics.api.engine.response_handler import process_responses
-from user_metrics.api.engine.request_manager import job_control, \
-requests_notification_callback
+from user_metrics.api.engine.request_manager import job_control
 from user_metrics.utils import terminate_process_with_checks
 from user_metrics.config import logging
 
@@ -35,19 +32,15 @@
 rm_callback_proc = None
 
 
-def setup_controller(msg_queue_in, msg_queue_out):
+def setup_controller(msg_queue_in):
 
 Sets up the process that handles API jobs
 
 job_controller_proc = mp.Process(target=job_control)
 response_controller_proc = mp.Process(target=process_responses,
   args=msg_queue_in)
-rm_callback_proc = mp.Process(target=requests_notification_callback,
-  args=(msg_queue_in,
-msg_queue_out))
 job_controller_proc.start()
 response_controller_proc.start()
-rm_callback_proc.start()
 
 
 def teardown():
@@ -58,12 +51,9 @@
 try:
 terminate_process_with_checks(job_controller_proc)
 terminate_process_with_checks(response_controller_proc)
-terminate_process_with_checks(rm_callback_proc)
-
 except Exception:
 logging.error(__name__ + ' :: Could not shut down callbacks.')
 
 
 if __name__ == '__main__':
-setup_controller(req_notification_queue_in,
-req_notification_queue_out)
+setup_controller()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I925fd6bc7ab6ba4806b4493fd5f27232792f96e3
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] rm. Request notification handler to maintain job queue. - change (analytics/user-metrics)

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

Change subject: rm. Request notification handler to maintain job queue.
..


rm. Request notification handler to maintain job queue.

Change-Id: I7b0764d42ad85afaa98533ae0ff71a1c5c9508fe
---
M user_metrics/api/engine/request_manager.py
M user_metrics/api/engine/response_handler.py
2 files changed, 1 insertion(+), 173 deletions(-)

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



diff --git a/user_metrics/api/engine/request_manager.py 
b/user_metrics/api/engine/request_manager.py
index 3a5f814..dd33191 100644
--- a/user_metrics/api/engine/request_manager.py
+++ b/user_metrics/api/engine/request_manager.py
@@ -204,12 +204,6 @@
 .format(rm.cohort_expr, rm.metric))
 wait_queue.append(rm)
 
-# Communicate with request notification callback about new job
-key_sig = build_key_signature(rm, hash_result=True)
-url = get_url_from_keys(build_key_signature(rm), REQUEST_PATH)
-req_cb_add_req(key_sig, url, REQ_NCB_LOCK)
-
-
 logging.debug('{0} - FINISHING.'.format(log_name))
 
 
@@ -476,166 +470,3 @@
 results['data'][m[0]] = m[1:]
 
 return results
-
-
-# REQUEST NOTIFICATIONS
-# #
-
-from collections import OrderedDict
-
-req_notification_queue_in = Queue()
-req_notification_queue_out = Queue()
-
-request_msg_type = namedtuple('RequestMessage', 'type hash url is_alive')
-
-
-def requests_notification_callback(msg_queue_in, msg_queue_out):
-
-Asynchronous callback.  Tracks status of requests and new requests.
-This callback utilizes ``msg_queue_in``  ``msg_queue_out`` to
-manage request status.
-
-log_name = '{0} :: {1}'.format(__name__,
-   requests_notification_callback.__name__)
-logging.debug('{0}  - STARTING...'.format(log_name))
-
-# TODO - potentially extend with an in-memory cache
-job_list = OrderedDict()
-while 1:
-
-try:
-msg = msg_queue_in.get(True)
-except IOError as e:
-logging.error(__name__ + ' :: Could not block '
- 'on in queue: {0}'.format(e.message))
-sleep(1)
-continue
-
-try:
-type = msg[0]
-except (KeyError, ValueError):
-logging.error(log_name + ' - No valid type ' \
- '{0}'.format(str(msg)))
-continue
-
-# Init request
-if type == 0:
-try:
-job_list[msg[1]] = [True, msg[2]]
-logging.debug(log_name + ' - Initialize Request: ' \
- '{0}.'.format(str(msg)))
-except Exception:
-logging.error(log_name + ' - Initialize Request' \
- ' failed: {0}'.format(str(msg)))
-
-# Flag request complete - leave on queue
-elif type == 1:
-try:
-job_list[msg[1]][0] = False
-logging.debug(log_name + ' - Set request finished: ' \
- '{0}.\n'.format(str(msg)))
-except Exception:
-logging.error(log_name + ' - Set request finished failed: ' \
- '{0}\n'.format(str(msg)))
-
-# Is the key in the cache and running?
-elif type == 2:
-try:
-if msg[1] in job_list:
-msg_queue_out.put([job_list[msg[1]][0]], True)
-else:
-msg_queue_out.put([False], True)
-logging.debug(log_name + ' - Get request alive: ' \
- '{0}.'.format(str(msg)))
-except (KeyError, ValueError):
-logging.error(log_name + ' - Get request alive failed: ' \
- '{0}'.format(str(msg)))
-
-# Get keys
-elif type == 3:
-msg_queue_out.put(job_list.keys(), True)
-
-# Get url
-elif type == 4:
-try:
-if msg[1] in job_list:
-msg_queue_out.put([job_list[msg[1]][1]], True)
-else:
-logging.error(log_name + ' - Get URL failed: {0}'.
-format(str(msg)))
-except (KeyError, ValueError):
-logging.error(log_name + ' - Get URL failed: 
{0}'.format(str(msg)))
-else:
-logging.error(log_name + ' - Bad message: {0}'.format(str(msg)))
-
-logging.debug('{0}  - SHUTTING DOWN...'.format(log_name))
-
-
-# Wrapper Methods for working with Request Notifications
-# Use locks to enforce atomicity
-
-BLOCK_TIMEOUT = 1
-
-
-def req_cb_get_url(key, lock):
-lock.acquire()
-req_notification_queue_in.put([4, key], block=True)
-try:
-  

[MediaWiki-commits] [Gerrit] rm. obselete refs. - change (analytics/user-metrics)

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

Change subject: rm. obselete refs.
..


rm. obselete refs.

Change-Id: I5b84fad8e0d146fda335e1e3c4285da067e25ca0
---
M user_metrics/api/engine/request_manager.py
1 file changed, 2 insertions(+), 5 deletions(-)

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



diff --git a/user_metrics/api/engine/request_manager.py 
b/user_metrics/api/engine/request_manager.py
index dd33191..f8624ca 100644
--- a/user_metrics/api/engine/request_manager.py
+++ b/user_metrics/api/engine/request_manager.py
@@ -83,10 +83,9 @@
 
 from user_metrics.config import logging, settings
 from user_metrics.api import MetricsAPIError, error_codes, query_mod, \
-REQ_NCB_LOCK, REQUEST_PATH, REQUEST_BROKER_TARGET, umapi_broker_context,\
+REQUEST_BROKER_TARGET, umapi_broker_context,\
 RESPONSE_BROKER_TARGET
-from user_metrics.api.engine.data import get_users, get_url_from_keys, \
-build_key_signature
+from user_metrics.api.engine.data import get_users
 from user_metrics.api.engine.request_meta import rebuild_unpacked_request
 from user_metrics.metrics.users import MediaWikiUser
 from user_metrics.metrics.user_metric import UserMetricError
@@ -95,8 +94,6 @@
 from collections import namedtuple
 from os import getpid
 from sys import getsizeof
-from Queue import Empty
-from time import sleep
 
 
 # API JOB HANDLER

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b84fad8e0d146fda335e1e3c4285da067e25ca0
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] mod. response handler to utilize file broker context. - change (analytics/user-metrics)

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

Change subject: mod. response handler to utilize file broker context.
..


mod. response handler to utilize file broker context.

Change-Id: Ic2946f7552e8fb74049c5856925230620539
---
M user_metrics/api/engine/response_handler.py
M user_metrics/api/run_handlers.py
2 files changed, 10 insertions(+), 47 deletions(-)

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



diff --git a/user_metrics/api/engine/response_handler.py 
b/user_metrics/api/engine/response_handler.py
index d7a4738..4b9eda5 100644
--- a/user_metrics/api/engine/response_handler.py
+++ b/user_metrics/api/engine/response_handler.py
@@ -8,12 +8,10 @@
 __date__ = 2013-03-14
 __license__ = GPL (version 2 or later)
 
+from user_metrics.api import RESPONSE_BROKER_TARGET, umapi_broker_context
 from user_metrics.config import logging
-from user_metrics.api import REQ_NCB_LOCK
 from user_metrics.api.engine.request_meta import rebuild_unpacked_request
 from user_metrics.api.engine.data import set_data, build_key_signature
-from Queue import Empty
-from flask import escape
 
 # Timeout in seconds to wait for data on the queue.  This should be long
 # enough to ensure that the full response can be received
@@ -24,54 +22,21 @@
 # 
 
 
-def process_responses(response_queue, msg_in):
+def process_response():
  Pulls responses off of the queue. 
 
-log_name = '{0} :: {1}'.format(__name__, process_responses.__name__)
+log_name = '{0} :: {1}'.format(__name__, process_response.__name__)
 logging.debug(log_name  + ' - STARTING...')
 
 while 1:
-stream = ''
 
-# Block on the response queue
-try:
-res = response_queue.get(True)
-request_meta = rebuild_unpacked_request(res)
-except Exception:
-logging.error(log_name + ' - Could not get request meta')
-continue
-
-data = response_queue.get(True)
-while data:
-stream += data
-try:
-data = response_queue.get(True, timeout=1)
-except Empty:
-break
-
-try:
-data = eval(stream)
-except Exception as e:
-
-# Report a fraction of the failed response data directly in the
-# logger
-if len(unicode(stream))  2000:
-excerpt = stream[:1000] + ' ... ' + stream[-1000:]
-else:
-excerpt = stream
-
-logging.error(log_name + ' - Request failed. {0}\n\n' \
- 'data excerpt: {1}'.format(e.message, 
excerpt))
-
-# Format a response that will report on the failed request
-stream = OrderedDict([('status', 'Request failed.'),  \
- ('exception', ' + escape(unicode(e.message)) + '), \
- ('request', ' + escape(unicode(request_meta)) + '),  \
- ('data', ' + escape(unicode(stream)) + ')])
-
+# Read request from the broker target
+res_item = umapi_broker_context.pop(RESPONSE_BROKER_TARGET)
+request_meta = rebuild_unpacked_request(res_item)
 key_sig = build_key_signature(request_meta, hash_result=True)
 
 # Add result to cache once completed
+# TODO - umapi_broker_context.add(target, key_sig, res_item)
 
 logging.debug(log_name + ' - Setting data for {0}'.format(
 str(request_meta)))
diff --git a/user_metrics/api/run_handlers.py b/user_metrics/api/run_handlers.py
index 55d6c97..7beba89 100644
--- a/user_metrics/api/run_handlers.py
+++ b/user_metrics/api/run_handlers.py
@@ -22,23 +22,21 @@
 __license__ = GPL (version 2 or later)
 
 import multiprocessing as mp
-from user_metrics.api.engine.response_handler import process_responses
+from user_metrics.api.engine.response_handler import process_response
 from user_metrics.api.engine.request_manager import job_control
 from user_metrics.utils import terminate_process_with_checks
 from user_metrics.config import logging
 
 job_controller_proc = None
 response_controller_proc = None
-rm_callback_proc = None
 
 
-def setup_controller(msg_queue_in):
+def setup_controller():
 
 Sets up the process that handles API jobs
 
 job_controller_proc = mp.Process(target=job_control)
-response_controller_proc = mp.Process(target=process_responses,
-  args=msg_queue_in)
+response_controller_proc = mp.Process(target=process_response)
 job_controller_proc.start()
 response_controller_proc.start()
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2946f7552e8fb74049c5856925230620539
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk 

[MediaWiki-commits] [Gerrit] Warn users when they are typing wikitext - change (mediawiki...VisualEditor)

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

Change subject: Warn users when they are typing wikitext
..


Warn users when they are typing wikitext

Without making the code much more complex (and possibly create
performance issues) the warning will fire on pages which already
contain escaped wikitext (when that text is edited). I think this
should be a small enough minority that it won't be an major annoyance.

Bug: 49820
Change-Id: I0f67ec04b890f4add9247be6126bdc086b6ae72f
---
M VisualEditor.i18n.php
M VisualEditor.php
M VisualEditorMessagesModule.php
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
4 files changed, 42 insertions(+), 1 deletion(-)

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



diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 88cb4f6..644c4af 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -162,6 +162,9 @@
'visualeditor-toolbar-savedialog' = 'Save page',
'visualeditor-usernamespacepagelink' = 'Project:User namespace',
'visualeditor-viewpage-savewarning' = 'Are you sure you want to go 
back to view mode without saving first?',
+   'visualeditor-wikitext-warning' = 'You are using VisualEditor; please 
do not to enter [[{{MediaWiki:Visualeditor-wikitext-warning-link}}|wikitext]] 
as it will not work.',
+   'visualeditor-wikitext-warning-link' = 'Help:Wiki markup',
+   'visualeditor-wikitext-warning-title' = 'Wikitext markup detected',
'visualeditor-window-title' = 'Inspect',
 );
 
@@ -463,6 +466,9 @@
'visualeditor-usernamespacepagelink' = 'Name of a page describing the 
user namespace (NS2) in this project.
 {{doc-important|Do not translate Project; it is automatically converted to 
the wiki\'s project namespace.}}',
'visualeditor-viewpage-savewarning' = 'Text shown when the user tries 
to leave the editor without saving their changes',
+   'visualeditor-wikitext-warning' = 'Contents of notification displayed 
when Wikitext has been detected',
+   'visualeditor-wikitext-warning-link' = 'Link to page describing what 
Wikitext is',
+   'visualeditor-wikitext-warning-title' = 'Title of notification 
displayed when Wikitext has been detected',
'visualeditor-window-title' = 'Title of an unnamed inspector',
 );
 
diff --git a/VisualEditor.php b/VisualEditor.php
index d4011a5..7e74495 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -694,6 +694,7 @@
'visualeditor-toolbar-cancel',
'visualeditor-toolbar-savedialog',
'visualeditor-viewpage-savewarning',
+   'visualeditor-wikitext-warning-title',
'visualeditor-window-title',
 
// Only used if FancyCaptcha is installed and triggered 
on save
diff --git a/VisualEditorMessagesModule.php b/VisualEditorMessagesModule.php
index f7a4743..1f4e80e 100644
--- a/VisualEditorMessagesModule.php
+++ b/VisualEditorMessagesModule.php
@@ -42,10 +42,11 @@
// Messages that just require simple parsing
$msgArgs = array(
'minoredit' = array( 'minoredit' ),
+   'missingsummary' = array( 'missingsummary' ),
'watchthis' = array( 'watchthis' ),
'visualeditor-browserwarning' = array( 
'visualeditor-browserwarning' ),
'visualeditor-report-notice' = array( 
'visualeditor-report-notice' ),
-   'missingsummary' = array( 'missingsummary' ),
+   'visualeditor-wikitext-warning' = array( 
'visualeditor-wikitext-warning' ),
);
 
// Override message value
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index a239f3a..9d7b464 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -711,6 +711,38 @@
 };
 
 /**
+ * Handle changes to the surface model.
+ *
+ * This is used to trigger notifications when the user starts entering wikitext
+ *
+ * @param {ve.dm.Transaction} tx
+ * @param {ve.Range} range
+ */
+ve.init.mw.ViewPageTarget.prototype.onSurfaceModelChange = function ( tx, 
range ) {
+   if ( !range ) {
+   return;
+   }
+   var text, doc = this.surface.getView().getDocument(),
+   node = doc.getNodeFromOffset( range.start );
+   if ( !( node instanceof ve.ce.ContentBranchNode ) ) {
+   return;
+   }
+   text = ve.ce.getDomText( node.$[0] );
+
+   if ( text.match( /\[\[|\{\{|''|nowiki|~~~|^==|^\*|^\#/ ) ) {
+   mw.notify(
+   $.parseHTML( ve.init.platform.getParsedMessage( 
'visualeditor-wikitext-warning' ) ),
+   {
+

[MediaWiki-commits] [Gerrit] Fix i18n typo in abf3671 spotted by PleaseStand - change (mediawiki...VisualEditor)

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

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


Change subject: Fix i18n typo in abf3671 spotted by PleaseStand
..

Fix i18n typo in abf3671 spotted by PleaseStand

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


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

diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 644c4af..e3e14bf 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -162,7 +162,7 @@
'visualeditor-toolbar-savedialog' = 'Save page',
'visualeditor-usernamespacepagelink' = 'Project:User namespace',
'visualeditor-viewpage-savewarning' = 'Are you sure you want to go 
back to view mode without saving first?',
-   'visualeditor-wikitext-warning' = 'You are using VisualEditor; please 
do not to enter [[{{MediaWiki:Visualeditor-wikitext-warning-link}}|wikitext]] 
as it will not work.',
+   'visualeditor-wikitext-warning' = 'You are using VisualEditor; please 
do not enter [[{{MediaWiki:Visualeditor-wikitext-warning-link}}|wikitext]] as 
it will not work.',
'visualeditor-wikitext-warning-link' = 'Help:Wiki markup',
'visualeditor-wikitext-warning-title' = 'Wikitext markup detected',
'visualeditor-window-title' = 'Inspect',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I592f3c4e2d4004d15609897986672f170a52fa5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope roan.katt...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix i18n typo in abf3671 spotted by PleaseStand - change (mediawiki...VisualEditor)

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

Change subject: Fix i18n typo in abf3671 spotted by PleaseStand
..


Fix i18n typo in abf3671 spotted by PleaseStand

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

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



diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 644c4af..e3e14bf 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -162,7 +162,7 @@
'visualeditor-toolbar-savedialog' = 'Save page',
'visualeditor-usernamespacepagelink' = 'Project:User namespace',
'visualeditor-viewpage-savewarning' = 'Are you sure you want to go 
back to view mode without saving first?',
-   'visualeditor-wikitext-warning' = 'You are using VisualEditor; please 
do not to enter [[{{MediaWiki:Visualeditor-wikitext-warning-link}}|wikitext]] 
as it will not work.',
+   'visualeditor-wikitext-warning' = 'You are using VisualEditor; please 
do not enter [[{{MediaWiki:Visualeditor-wikitext-warning-link}}|wikitext]] as 
it will not work.',
'visualeditor-wikitext-warning-link' = 'Help:Wiki markup',
'visualeditor-wikitext-warning-title' = 'Wikitext markup detected',
'visualeditor-window-title' = 'Inspect',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I592f3c4e2d4004d15609897986672f170a52fa5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Jforrester jforres...@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] Give grep a chance to find the usages - change (mediawiki...MassEditRegex)

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

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


Change subject: Give grep a chance to find the usages
..

Give grep a chance to find the usages

Change-Id: I7c37ecb7a77cb4acd12703d616f5de8a49922ca6
---
M MassEditRegex.class.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassEditRegex 
refs/changes/26/73726/1

diff --git a/MassEditRegex.class.php b/MassEditRegex.class.php
index c00add8..5bb56b8 100644
--- a/MassEditRegex.class.php
+++ b/MassEditRegex.class.php
@@ -142,6 +142,9 @@
// on the page.
$wgOut-addHTML(
Xml::openElement('li') .
+   // Give grep a chance to find the usages:
+   // masseditregex-listtype-pagenames, 
masseditregex-listtype-pagename-prefixes,
+   // masseditregex-listtype-categories, 
masseditregex-listtype-backlinks
Xml::radioLabel(
wfMsg( 'masseditregex-listtype-' . 
$strValue ),
'wpPageListType',

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

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

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


[MediaWiki-commits] [Gerrit] add. handle instances for FileBroker where file not exists o... - change (analytics/user-metrics)

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

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


Change subject: add. handle instances for FileBroker where file not exists on 
read.
..

add. handle instances for FileBroker where file not exists on read.

Change-Id: I21870e9aecd59012a44ae647748c01d74efd7034
---
M user_metrics/api/broker.py
1 file changed, 54 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/29/73729/1

diff --git a/user_metrics/api/broker.py b/user_metrics/api/broker.py
index a91a11e..3bce31f 100644
--- a/user_metrics/api/broker.py
+++ b/user_metrics/api/broker.py
@@ -81,13 +81,19 @@
 
 Remove element with the given key
 
-with open(target, 'r') as f:
-lines = f.read().split('\n')
-for idx, line in enumerate(lines):
-item = json.loads(line)
-if item.keys()[0] == key:
-del lines[idx]
-break
+try:
+with open(target, 'r') as f:
+lines = f.read().split('\n')
+for idx, line in enumerate(lines):
+item = json.loads(line)
+if item.keys()[0] == key:
+del lines[idx]
+break
+except IOError:
+lines = []
+with open(target, 'w'):
+pass
+
 with open(target, 'w') as f:
 for line in lines:
 f.write(line)
@@ -96,13 +102,19 @@
 
 Update element with the given key
 
-with open(target, 'r') as f:
-lines = f.read().split('\n')
-for idx, line in enumerate(lines):
-item = json.loads(line)
-if item.keys()[0] == key:
-lines[idx] = json.dumps({key: value}) + '\n'
-break
+try:
+with open(target, 'r') as f:
+lines = f.read().split('\n')
+for idx, line in enumerate(lines):
+item = json.loads(line)
+if item.keys()[0] == key:
+lines[idx] = json.dumps({key: value}) + '\n'
+break
+except IOError:
+lines = []
+with open(target, 'w'):
+pass
+
 with open(target, 'w') as f:
 for line in lines:
 f.write(line)
@@ -111,28 +123,37 @@
 
 Retrieve a value with the given key
 
-with open(target, 'r') as f:
-lines = f.read().split('\n')
-for idx, line in enumerate(lines):
-item = json.loads(line)
-if item.keys()[0] == key:
-return item[key]
-return None
+try:
+with open(target, 'r') as f:
+lines = f.read().split('\n')
+for idx, line in enumerate(lines):
+item = json.loads(line)
+if item.keys()[0] == key:
+return item[key]
+except IOError:
+with open(target, 'w'):
+pass
+
+return None
 
 def pop(self, target):
 
 Pop the top value from the list
 
-with open(target, 'r') as f:
-lines = f.read().split('\n')
-if not len(lines):
-try:
-item = json.loads(lines[0])
-key = item.keys()[0]
-except (KeyError, ValueError):
-logging.error(__name__ + ' :: FileBroker.pop - '
- 'Could not parse key.')
-return None
-self.remove(target, key)
-return item[key]
+try:
+with open(target, 'r') as f:
+lines = f.read().split('\n')
+if not len(lines):
+try:
+item = json.loads(lines[0])
+key = item.keys()[0]
+except (KeyError, ValueError):
+logging.error(__name__ + ' :: FileBroker.pop - '
+ 'Could not parse key.')
+return None
+self.remove(target, key)
+return item[key]
+except IOError:
+with open(target, 'w'):
+pass
 return None

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I21870e9aecd59012a44ae647748c01d74efd7034
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org

___

[MediaWiki-commits] [Gerrit] rm. base class initialization - class is effectively virtual. - change (analytics/user-metrics)

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

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


Change subject: rm. base class initialization - class is effectively virtual.
..

rm. base class initialization - class is effectively virtual.

Change-Id: I63e4248ab00d4544bad40d5f6a2683915e563523
---
M user_metrics/api/broker.py
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/27/73727/1

diff --git a/user_metrics/api/broker.py b/user_metrics/api/broker.py
index a55c39c..a91a11e 100644
--- a/user_metrics/api/broker.py
+++ b/user_metrics/api/broker.py
@@ -20,9 +20,6 @@
 Base class for broker
 
 
-def __init__(self, **kwargs):
-raise NotImplementedError()
-
 def compose(self):
 raise NotImplementedError()
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63e4248ab00d4544bad40d5f6a2683915e563523
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] add. timouts between broker item polls. - change (analytics/user-metrics)

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

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


Change subject: add. timouts between broker item polls.
..

add. timouts between broker item polls.

Change-Id: Ida8f2cdebb18446df14d9589f68a98e3e7f7561f
---
M user_metrics/api/engine/request_manager.py
M user_metrics/api/engine/response_handler.py
2 files changed, 18 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/30/73730/1

diff --git a/user_metrics/api/engine/request_manager.py 
b/user_metrics/api/engine/request_manager.py
index f8624ca..ce8da09 100644
--- a/user_metrics/api/engine/request_manager.py
+++ b/user_metrics/api/engine/request_manager.py
@@ -94,6 +94,7 @@
 from collections import namedtuple
 from os import getpid
 from sys import getsizeof
+import time
 
 
 # API JOB HANDLER
@@ -107,7 +108,7 @@
 MAX_BLOCK_SIZE = 5000
 MAX_CONCURRENT_JOBS = 1
 QUEUE_WAIT = 5
-
+RESQUEST_TIMEOUT = 1.0
 
 # Defines the job item type used to temporarily store job progress
 job_item_type = namedtuple('JobItem', 'id process request queue')
@@ -141,10 +142,15 @@
 
 while 1:
 
+time.sleep(RESQUEST_TIMEOUT)
+
 # Request Queue Processing
 # 
 
+logging.debug(log_name  + ' - POLLING REQUESTS...')
 req_item = umapi_broker_context.pop(REQUEST_BROKER_TARGET)
+if not req_item:
+continue
 
 logging.debug(log_name + ' :: PULLING item from request queue - ' \
  '\n\tCOHORT = {0} - METRIC = {1}'
diff --git a/user_metrics/api/engine/response_handler.py 
b/user_metrics/api/engine/response_handler.py
index 4b9eda5..1afe605 100644
--- a/user_metrics/api/engine/response_handler.py
+++ b/user_metrics/api/engine/response_handler.py
@@ -13,9 +13,11 @@
 from user_metrics.api.engine.request_meta import rebuild_unpacked_request
 from user_metrics.api.engine.data import set_data, build_key_signature
 
+import time
+
 # Timeout in seconds to wait for data on the queue.  This should be long
 # enough to ensure that the full response can be received
-RESPONSE_TIMEOUT = 0.1
+RESPONSE_TIMEOUT = 1.0
 
 
 # API RESPONSE HANDLER
@@ -30,8 +32,14 @@
 
 while 1:
 
+time.sleep(RESPONSE_TIMEOUT)
+
 # Read request from the broker target
+logging.debug(log_name  + ' - POLLING RESPONSES...')
 res_item = umapi_broker_context.pop(RESPONSE_BROKER_TARGET)
+if not res_item:
+continue
+
 request_meta = rebuild_unpacked_request(res_item)
 key_sig = build_key_signature(request_meta, hash_result=True)
 
@@ -42,4 +50,6 @@
 str(request_meta)))
 set_data(stream, request_meta)
 
+
+
 logging.debug(log_name + ' - SHUTTING DOWN...')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida8f2cdebb18446df14d9589f68a98e3e7f7561f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] rm. base class initialization - class is effectively virtual. - change (analytics/user-metrics)

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

Change subject: rm. base class initialization - class is effectively virtual.
..


rm. base class initialization - class is effectively virtual.

Change-Id: I63e4248ab00d4544bad40d5f6a2683915e563523
---
M user_metrics/api/broker.py
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/user_metrics/api/broker.py b/user_metrics/api/broker.py
index a55c39c..a91a11e 100644
--- a/user_metrics/api/broker.py
+++ b/user_metrics/api/broker.py
@@ -20,9 +20,6 @@
 Base class for broker
 
 
-def __init__(self, **kwargs):
-raise NotImplementedError()
-
 def compose(self):
 raise NotImplementedError()
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I63e4248ab00d4544bad40d5f6a2683915e563523
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] add. handle instances for FileBroker where file not exists o... - change (analytics/user-metrics)

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

Change subject: add. handle instances for FileBroker where file not exists on 
read.
..


add. handle instances for FileBroker where file not exists on read.

Change-Id: I21870e9aecd59012a44ae647748c01d74efd7034
---
M user_metrics/api/broker.py
1 file changed, 54 insertions(+), 33 deletions(-)

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



diff --git a/user_metrics/api/broker.py b/user_metrics/api/broker.py
index a91a11e..3bce31f 100644
--- a/user_metrics/api/broker.py
+++ b/user_metrics/api/broker.py
@@ -81,13 +81,19 @@
 
 Remove element with the given key
 
-with open(target, 'r') as f:
-lines = f.read().split('\n')
-for idx, line in enumerate(lines):
-item = json.loads(line)
-if item.keys()[0] == key:
-del lines[idx]
-break
+try:
+with open(target, 'r') as f:
+lines = f.read().split('\n')
+for idx, line in enumerate(lines):
+item = json.loads(line)
+if item.keys()[0] == key:
+del lines[idx]
+break
+except IOError:
+lines = []
+with open(target, 'w'):
+pass
+
 with open(target, 'w') as f:
 for line in lines:
 f.write(line)
@@ -96,13 +102,19 @@
 
 Update element with the given key
 
-with open(target, 'r') as f:
-lines = f.read().split('\n')
-for idx, line in enumerate(lines):
-item = json.loads(line)
-if item.keys()[0] == key:
-lines[idx] = json.dumps({key: value}) + '\n'
-break
+try:
+with open(target, 'r') as f:
+lines = f.read().split('\n')
+for idx, line in enumerate(lines):
+item = json.loads(line)
+if item.keys()[0] == key:
+lines[idx] = json.dumps({key: value}) + '\n'
+break
+except IOError:
+lines = []
+with open(target, 'w'):
+pass
+
 with open(target, 'w') as f:
 for line in lines:
 f.write(line)
@@ -111,28 +123,37 @@
 
 Retrieve a value with the given key
 
-with open(target, 'r') as f:
-lines = f.read().split('\n')
-for idx, line in enumerate(lines):
-item = json.loads(line)
-if item.keys()[0] == key:
-return item[key]
-return None
+try:
+with open(target, 'r') as f:
+lines = f.read().split('\n')
+for idx, line in enumerate(lines):
+item = json.loads(line)
+if item.keys()[0] == key:
+return item[key]
+except IOError:
+with open(target, 'w'):
+pass
+
+return None
 
 def pop(self, target):
 
 Pop the top value from the list
 
-with open(target, 'r') as f:
-lines = f.read().split('\n')
-if not len(lines):
-try:
-item = json.loads(lines[0])
-key = item.keys()[0]
-except (KeyError, ValueError):
-logging.error(__name__ + ' :: FileBroker.pop - '
- 'Could not parse key.')
-return None
-self.remove(target, key)
-return item[key]
+try:
+with open(target, 'r') as f:
+lines = f.read().split('\n')
+if not len(lines):
+try:
+item = json.loads(lines[0])
+key = item.keys()[0]
+except (KeyError, ValueError):
+logging.error(__name__ + ' :: FileBroker.pop - '
+ 'Could not parse key.')
+return None
+self.remove(target, key)
+return item[key]
+except IOError:
+with open(target, 'w'):
+pass
 return None

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I21870e9aecd59012a44ae647748c01d74efd7034
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org

___
MediaWiki-commits mailing 

[MediaWiki-commits] [Gerrit] rm. request notification deps. - change (analytics/user-metrics)

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

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


Change subject: rm. request notification deps.
..

rm. request notification deps.

Change-Id: I2689d38f828028eabc2891e398ac809a8669cad0
---
M user_metrics/api/views.py
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/28/73728/1

diff --git a/user_metrics/api/views.py b/user_metrics/api/views.py
index 05952a3..df6a259 100644
--- a/user_metrics/api/views.py
+++ b/user_metrics/api/views.py
@@ -24,12 +24,10 @@
 from user_metrics.api.engine.data import get_cohort_refresh_datetime, \
 get_data, get_url_from_keys, build_key_signature, read_pickle_data
 from user_metrics.api import MetricsAPIError, error_codes, query_mod, \
-REQ_NCB_LOCK, REQUEST_BROKER_TARGET, umapi_broker_context
+REQUEST_BROKER_TARGET, umapi_broker_context
 from user_metrics.api.engine.request_meta import filter_request_input, \
 format_request_params, RequestMetaFactory, \
 get_metric_names
-from user_metrics.api.engine.request_manager import req_cb_get_cache_keys, \
-req_cb_get_url, req_cb_get_is_running
 from user_metrics.metrics.users import MediaWikiUser
 from user_metrics.api.session import APIUser
 import user_metrics.config.settings as conf
@@ -439,7 +437,8 @@
 key_sig = build_key_signature(rm, hash_result=True)
 
 # Is the request already running?
-is_running = req_cb_get_is_running(key_sig, REQ_NCB_LOCK)
+# TODO check req_target
+is_running = False
 
 # Determine if request is already hashed
 if data and not refresh:
@@ -468,11 +467,13 @@
 p_list.append(Markup('theadtrthis_alive/ththurl'
  '/th/tr/thead\ntbody\n'))
 
-keys = req_cb_get_cache_keys(REQ_NCB_LOCK)
+# Get keys from broker target
+keys = []
 for key in keys:
 # Log the status of the job
-url = req_cb_get_url(key, REQ_NCB_LOCK)
-is_alive = str(req_cb_get_is_running(key, REQ_NCB_LOCK))
+#   TODO this will be part of the broker data
+url = ''
+is_alive = False
 
 p_list.append('trtd')
 response_url = .join(['a href=',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2689d38f828028eabc2891e398ac809a8669cad0
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] rm. request notification deps. - change (analytics/user-metrics)

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

Change subject: rm. request notification deps.
..


rm. request notification deps.

Change-Id: I2689d38f828028eabc2891e398ac809a8669cad0
---
M user_metrics/api/views.py
1 file changed, 8 insertions(+), 7 deletions(-)

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



diff --git a/user_metrics/api/views.py b/user_metrics/api/views.py
index 05952a3..df6a259 100644
--- a/user_metrics/api/views.py
+++ b/user_metrics/api/views.py
@@ -24,12 +24,10 @@
 from user_metrics.api.engine.data import get_cohort_refresh_datetime, \
 get_data, get_url_from_keys, build_key_signature, read_pickle_data
 from user_metrics.api import MetricsAPIError, error_codes, query_mod, \
-REQ_NCB_LOCK, REQUEST_BROKER_TARGET, umapi_broker_context
+REQUEST_BROKER_TARGET, umapi_broker_context
 from user_metrics.api.engine.request_meta import filter_request_input, \
 format_request_params, RequestMetaFactory, \
 get_metric_names
-from user_metrics.api.engine.request_manager import req_cb_get_cache_keys, \
-req_cb_get_url, req_cb_get_is_running
 from user_metrics.metrics.users import MediaWikiUser
 from user_metrics.api.session import APIUser
 import user_metrics.config.settings as conf
@@ -439,7 +437,8 @@
 key_sig = build_key_signature(rm, hash_result=True)
 
 # Is the request already running?
-is_running = req_cb_get_is_running(key_sig, REQ_NCB_LOCK)
+# TODO check req_target
+is_running = False
 
 # Determine if request is already hashed
 if data and not refresh:
@@ -468,11 +467,13 @@
 p_list.append(Markup('theadtrthis_alive/ththurl'
  '/th/tr/thead\ntbody\n'))
 
-keys = req_cb_get_cache_keys(REQ_NCB_LOCK)
+# Get keys from broker target
+keys = []
 for key in keys:
 # Log the status of the job
-url = req_cb_get_url(key, REQ_NCB_LOCK)
-is_alive = str(req_cb_get_is_running(key, REQ_NCB_LOCK))
+#   TODO this will be part of the broker data
+url = ''
+is_alive = False
 
 p_list.append('trtd')
 response_url = .join(['a href=',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2689d38f828028eabc2891e398ac809a8669cad0
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] add. timouts between broker item polls. - change (analytics/user-metrics)

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

Change subject: add. timouts between broker item polls.
..


add. timouts between broker item polls.

Change-Id: Ida8f2cdebb18446df14d9589f68a98e3e7f7561f
---
M user_metrics/api/engine/request_manager.py
M user_metrics/api/engine/response_handler.py
2 files changed, 18 insertions(+), 2 deletions(-)

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



diff --git a/user_metrics/api/engine/request_manager.py 
b/user_metrics/api/engine/request_manager.py
index f8624ca..ce8da09 100644
--- a/user_metrics/api/engine/request_manager.py
+++ b/user_metrics/api/engine/request_manager.py
@@ -94,6 +94,7 @@
 from collections import namedtuple
 from os import getpid
 from sys import getsizeof
+import time
 
 
 # API JOB HANDLER
@@ -107,7 +108,7 @@
 MAX_BLOCK_SIZE = 5000
 MAX_CONCURRENT_JOBS = 1
 QUEUE_WAIT = 5
-
+RESQUEST_TIMEOUT = 1.0
 
 # Defines the job item type used to temporarily store job progress
 job_item_type = namedtuple('JobItem', 'id process request queue')
@@ -141,10 +142,15 @@
 
 while 1:
 
+time.sleep(RESQUEST_TIMEOUT)
+
 # Request Queue Processing
 # 
 
+logging.debug(log_name  + ' - POLLING REQUESTS...')
 req_item = umapi_broker_context.pop(REQUEST_BROKER_TARGET)
+if not req_item:
+continue
 
 logging.debug(log_name + ' :: PULLING item from request queue - ' \
  '\n\tCOHORT = {0} - METRIC = {1}'
diff --git a/user_metrics/api/engine/response_handler.py 
b/user_metrics/api/engine/response_handler.py
index 4b9eda5..1afe605 100644
--- a/user_metrics/api/engine/response_handler.py
+++ b/user_metrics/api/engine/response_handler.py
@@ -13,9 +13,11 @@
 from user_metrics.api.engine.request_meta import rebuild_unpacked_request
 from user_metrics.api.engine.data import set_data, build_key_signature
 
+import time
+
 # Timeout in seconds to wait for data on the queue.  This should be long
 # enough to ensure that the full response can be received
-RESPONSE_TIMEOUT = 0.1
+RESPONSE_TIMEOUT = 1.0
 
 
 # API RESPONSE HANDLER
@@ -30,8 +32,14 @@
 
 while 1:
 
+time.sleep(RESPONSE_TIMEOUT)
+
 # Read request from the broker target
+logging.debug(log_name  + ' - POLLING RESPONSES...')
 res_item = umapi_broker_context.pop(RESPONSE_BROKER_TARGET)
+if not res_item:
+continue
+
 request_meta = rebuild_unpacked_request(res_item)
 key_sig = build_key_signature(request_meta, hash_result=True)
 
@@ -42,4 +50,6 @@
 str(request_meta)))
 set_data(stream, request_meta)
 
+
+
 logging.debug(log_name + ' - SHUTTING DOWN...')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida8f2cdebb18446df14d9589f68a98e3e7f7561f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update UnifrakturMaguntia font to latest version - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Update UnifrakturMaguntia font to latest version
..

Update UnifrakturMaguntia font to latest version

Bug: 49510
Change-Id: I4227d31696a4d956cc5ea2ddf5df36eb0e8fe7d0
---
M data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.eot
M data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.ttf
M data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.woff
M data/fontrepo/fonts/UnifrakturMaguntia/font.ini
M resources/js/ext.uls.webfonts.repository.js
5 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.eot 
b/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.eot
index 1f2f177..a3b795e 100644
--- a/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.eot
+++ b/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.eot
Binary files differ
diff --git a/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.ttf 
b/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.ttf
index 6e84a30..cade6e3 100644
--- a/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.ttf
+++ b/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.ttf
Binary files differ
diff --git a/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.woff 
b/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.woff
index fec87c7..e6070ab 100644
--- a/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.woff
+++ b/data/fontrepo/fonts/UnifrakturMaguntia/UnifrakturMaguntia.woff
Binary files differ
diff --git a/data/fontrepo/fonts/UnifrakturMaguntia/font.ini 
b/data/fontrepo/fonts/UnifrakturMaguntia/font.ini
index 1c599f3..35ffba5 100644
--- a/data/fontrepo/fonts/UnifrakturMaguntia/font.ini
+++ b/data/fontrepo/fonts/UnifrakturMaguntia/font.ini
@@ -1,5 +1,5 @@
 [UnifrakturMaguntia]
-version=2012-02-11
+version=2012-10-19
 license=OFL 1.1
 licensefile=OFL.txt
 url=http://unifraktur.sourceforge.net/maguntia.html
diff --git a/resources/js/ext.uls.webfonts.repository.js 
b/resources/js/ext.uls.webfonts.repository.js
index 751e1f5..7811ce8 100644
--- a/resources/js/ext.uls.webfonts.repository.js
+++ b/resources/js/ext.uls.webfonts.repository.js
@@ -1,5 +1,5 @@
 // Please do not edit. This file is generated from data/fontrepo by 
data/fontrepo/scripts/compile.php
 ( function ( $ ) {
$.webfonts = $.webfonts || {};
-   $.webfonts.repository = 
{base:..\/data\/fontrepo\/fonts\/,languages:{af:[system,OpenDyslexic],ahr:[Lohit
 
Marathi],akk:[Akkadian],am:[AbyssinicaSIL],ar:[Amiri],arb:[Amiri],arc:[Estarngelo
 Edessa,East Syriac Adiabene,SertoUrhoy],as:[system,Lohit 
Assamese],bh:[Lohit Devanagari],bho:[Lohit 
Devanagari],bk:[system,OpenDyslexic],bn:[Siyam Rupali,Lohit 
Bengali],bo:[Jomolhari],bpy:[Siyam Rupali,Lohit 
Bengali],bug:[Saweri],ca:[system,OpenDyslexic],cdo:[CharisSIL],cy:[system,OpenDyslexic],da:[system,OpenDyslexic],de:[system,OpenDyslexic],dv:[FreeFont-Thaana],dz:[Jomolhari],en:[system,OpenDyslexic],es:[system,OpenDyslexic],et:[system,OpenDyslexic],fa:[system,Iranian
 
Sans,Amiri],fi:[system,OpenDyslexic],fo:[system,OpenDyslexic],fr:[system,OpenDyslexic],fy:[system,OpenDyslexic],ga:[system,OpenDyslexic],gd:[system,OpenDyslexic],gl:[system,OpenDyslexic],gom:[Lohit
 Devanagari],gu:[Lohit Gujarati],hbo:[Taamey Frank 
CLM,Alef],he:[system,Alef,Miriam CLM,Taamey Frank 
CLM],hi:[Lohit 
Devanagari],hu:[system,OpenDyslexic],id:[system,OpenDyslexic],is:[system,OpenDyslexic],it:[system,OpenDyslexic],jv:[system,Tuladha
 Jejeg],jv-java:[Tuladha 
Jejeg],km:[KhmerOSbattambang,KhmerOS,KhmerOSbokor,KhmerOSfasthand,KhmerOSfreehand,KhmerOSmuol,KhmerOSmuollight,KhmerOSmuolpali,KhmerOSsiemreap],kn:[Lohit
 Kannada,Gubbi],kok:[Lohit 
Devanagari],lb:[system,OpenDyslexic],li:[system,OpenDyslexic],mai:[Lohit
 
Devanagari],mak:[Saweri],mi:[system,OpenDyslexic],ml:[Meera,AnjaliOldLipi],mr:[Lohit
 
Marathi],ms:[system,OpenDyslexic],my:[TharLon,Myanmar3,Padauk],nan:[Doulos
 SIL,CharisSIL],nb:[system,OpenDyslexic],ne:[Lohit 
Nepali,Madan],nl:[system,OpenDyslexic],oc:[system,OpenDyslexic],or:[Lohit
 Oriya,Utkal],pa:[Lohit 
Punjabi,Saab],pt:[system,OpenDyslexic],sa:[Lohit 
Devanagari],saz:[Pagul],sq:[system,OpenDyslexic],sux:[Akkadian],sv:[system,OpenDyslexic],sw:[system,OpenDyslexic],syc:[Estarngelo
 Edessa,East Syriac Adiabene,SertoUrhoy],ta:[system,Lohit 
Tamil,Lohit Tamil Classical,Thendral,Thenee],tcy:[Lohit 
Kannada,Gubbi],te:[Lohit 
Telugu],ti:[AbyssinicaSIL],tl:[system,OpenDyslexic],tr:[system,OpenDyslexic],wa:[system,OpenDyslexic],yi:[system,Alef]},fonts:{AbyssinicaSIL:{version:1.200,license:OFL
 

[MediaWiki-commits] [Gerrit] (bug 51303) Do not send duplicate thanks notification - change (mediawiki...Thanks)

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

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


Change subject: (bug 51303) Do not send duplicate thanks notification
..

(bug 51303) Do not send duplicate thanks notification

Change-Id: Ie3c31e4ce155541a6aa9b6feae433742be2967e8
---
M ApiThank.php
1 file changed, 42 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Thanks 
refs/changes/32/73732/1

diff --git a/ApiThank.php b/ApiThank.php
index 23f72b7..1576f10 100644
--- a/ApiThank.php
+++ b/ApiThank.php
@@ -29,46 +29,51 @@
if ( !$rev ) {
$this-dieUsage( 'Revision ID is not valid', 
'invalidrevision' );
} else {
-   $title = Title::newFromID( $rev-getPage() );
-   if ( !$title ) {
-   $this-dieUsage( 'Page title could not be 
retrieved', 'notitle' );
-   }
-
-   // Get the user ID of the user who performed the edit
-   $recipient = $rev-getUser();
-
-   if ( !$recipient ) {
-   $this-dieUsage( 'No valid recipient found', 
'invalidrecipient' );
-   } else {
-   // Set the source of the thanks, e.g. 'diff' or 
'history'
-   if ( $params['source'] ) {
-   $source = trim( $params['source'] );
+   // Do not send notification if session data says it 
has already been sent
+   if ( !$agent-getRequest()-getSessionData( 
thanks-thanked-{$rev-getId()} ) ) {
+   $title = Title::newFromID( $rev-getPage() );
+   if ( !$title ) {
+   $this-dieUsage( 'Page title could not 
be retrieved', 'notitle' );
+   }
+   
+   // Get the user ID of the user who performed 
the edit
+   $recipient = $rev-getUser();
+   
+   if ( !$recipient ) {
+   $this-dieUsage( 'No valid recipient 
found', 'invalidrecipient' );
} else {
-   $source = 'undefined';
+   // Set the source of the thanks, e.g. 
'diff' or 'history'
+   if ( $params['source'] ) {
+   $source = trim( 
$params['source'] );
+   } else {
+   $source = 'undefined';
+   }
+   // Create the notification via Echo 
extension
+   EchoEvent::create( array(
+   'type' = 'edit-thank',
+   'title' = $title,
+   'extra' = array(
+   'revid' = 
$rev-getId(),
+   'thanked-user-id' = 
$recipient,
+   'source' = $source,
+   ),
+   'agent' = $agent,
+   ) );
+   // Mark the thank in session to prevent 
duplicates (Bug 46690)
+   $agent-getRequest()-setSessionData( 
thanks-thanked-{$rev-getId()}, true );
+   // Set success message
+   $result['success'] = '1';
+   // Log it if we're supposed to log it
+   if ( $wgThanksLogging ) {
+   $logEntry = new ManualLogEntry( 
'thanks', 'thank' );
+   $logEntry-setPerformer( $agent 
);
+   $target = User::newFromId( 
$recipient )-getUserPage();
+   $logEntry-setTarget( $target );
+   $logid = $logEntry-insert();
+   }
}
-   // Create the notification via Echo extension
-   EchoEvent::create( array(
-   'type' = 'edit-thank',
-   'title' = $title,
-   'extra' = array(
-   

[MediaWiki-commits] [Gerrit] Stop uls-previous-languages cookie varying by path - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Stop uls-previous-languages cookie varying by path
..


Stop uls-previous-languages cookie varying by path

Set path to '/' otherwise you get one cookie for /w and another for
/wiki locations.

Bug: 49155

Change-Id: I4756fdf06b0580b5b57a41cd771b94723bb5cdbf
---
M resources/js/ext.uls.init.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/resources/js/ext.uls.init.js b/resources/js/ext.uls.init.js
index f722caa..70a14f9 100644
--- a/resources/js/ext.uls.init.js
+++ b/resources/js/ext.uls.init.js
@@ -53,7 +53,8 @@
};
 
mw.uls.setPreviousLanguages = function ( previousLanguages ) {
-   $.cookie( mw.uls.previousLanguagesCookie, $.toJSON( 
previousLanguages ) );
+   $.cookie( mw.uls.previousLanguagesCookie, $.toJSON( 
previousLanguages ),
+   { path: '/' } );
};
 
mw.uls.getPreviousLanguages = function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4756fdf06b0580b5b57a41cd771b94723bb5cdbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Spage sp...@wikimedia.org
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add Canadian Syllabic font - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Add Canadian Syllabic font
..


Add Canadian Syllabic font

Bug: 42421

Change-Id: I3d791c3752cf73c33b74ee6f531b7fb605419560
---
A data/fontrepo/fonts/OskiEast/font.ini
A data/fontrepo/fonts/OskiEast/oskie.eot
A data/fontrepo/fonts/OskiEast/oskie.ttf
A data/fontrepo/fonts/OskiEast/oskie.woff
A data/fontrepo/fonts/OskiEast/oskiebold.eot
A data/fontrepo/fonts/OskiEast/oskiebold.ttf
A data/fontrepo/fonts/OskiEast/oskiebold.woff
A data/fontrepo/fonts/OskiEast/oskiebolditalic.eot
A data/fontrepo/fonts/OskiEast/oskiebolditalic.ttf
A data/fontrepo/fonts/OskiEast/oskiebolditalic.woff
A data/fontrepo/fonts/OskiEast/oskieitalic.eot
A data/fontrepo/fonts/OskiEast/oskieitalic.ttf
A data/fontrepo/fonts/OskiEast/oskieitalic.woff
M resources/js/ext.uls.webfonts.repository.js
14 files changed, 32 insertions(+), 1 deletion(-)

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



diff --git a/data/fontrepo/fonts/OskiEast/font.ini 
b/data/fontrepo/fonts/OskiEast/font.ini
new file mode 100644
index 000..b7bc375
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/font.ini
@@ -0,0 +1,31 @@
+[OskiEast]
+languages=cr, iu
+version=2.200
+license=GPL-3
+licensefile=gpl-3.0.txt
+url=http://www.languagegeek.com/font/fontdownload.html#AlgonAndInu
+ttf=oskie.ttf
+eot=oskie.eot
+woff=oskie.woff
+italic=OskiEast Italic
+bold=OskiEast Bold
+bolditalic=OskiEast Bold Italic
+
+[OskiEast Italic]
+ttf=oskieitalic.ttf
+eot=oskieitalic.eot
+woff=oskieitalic.woff
+fontstyle=italic
+
+[OskiEast Bold]
+ttf=oskiebold.ttf
+eot=oskiebold.eot
+woff=oskiebold.woff
+fontweight=bold
+
+[OskiEast Bold Italic]
+ttf=oskiebolditalic.ttf
+eot=oskiebolditalic.eot
+woff=oskiebolditalic.woff
+fontstyle=italic
+fontweight=bold
diff --git a/data/fontrepo/fonts/OskiEast/oskie.eot 
b/data/fontrepo/fonts/OskiEast/oskie.eot
new file mode 100644
index 000..673fd4b
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskie.eot
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskie.ttf 
b/data/fontrepo/fonts/OskiEast/oskie.ttf
new file mode 100644
index 000..3982586
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskie.ttf
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskie.woff 
b/data/fontrepo/fonts/OskiEast/oskie.woff
new file mode 100644
index 000..3c621ca
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskie.woff
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskiebold.eot 
b/data/fontrepo/fonts/OskiEast/oskiebold.eot
new file mode 100644
index 000..403042a
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskiebold.eot
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskiebold.ttf 
b/data/fontrepo/fonts/OskiEast/oskiebold.ttf
new file mode 100644
index 000..54b29c9
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskiebold.ttf
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskiebold.woff 
b/data/fontrepo/fonts/OskiEast/oskiebold.woff
new file mode 100644
index 000..983f4d5
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskiebold.woff
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskiebolditalic.eot 
b/data/fontrepo/fonts/OskiEast/oskiebolditalic.eot
new file mode 100644
index 000..9e3e503
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskiebolditalic.eot
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskiebolditalic.ttf 
b/data/fontrepo/fonts/OskiEast/oskiebolditalic.ttf
new file mode 100644
index 000..3f139d2
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskiebolditalic.ttf
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskiebolditalic.woff 
b/data/fontrepo/fonts/OskiEast/oskiebolditalic.woff
new file mode 100644
index 000..06f8bed
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskiebolditalic.woff
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskieitalic.eot 
b/data/fontrepo/fonts/OskiEast/oskieitalic.eot
new file mode 100644
index 000..5946147
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskieitalic.eot
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskieitalic.ttf 
b/data/fontrepo/fonts/OskiEast/oskieitalic.ttf
new file mode 100644
index 000..7ecf215
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskieitalic.ttf
Binary files differ
diff --git a/data/fontrepo/fonts/OskiEast/oskieitalic.woff 
b/data/fontrepo/fonts/OskiEast/oskieitalic.woff
new file mode 100644
index 000..e534c1c
--- /dev/null
+++ b/data/fontrepo/fonts/OskiEast/oskieitalic.woff
Binary files differ
diff --git a/resources/js/ext.uls.webfonts.repository.js 
b/resources/js/ext.uls.webfonts.repository.js
index 751e1f5..924b6d0 100644
--- a/resources/js/ext.uls.webfonts.repository.js
+++ b/resources/js/ext.uls.webfonts.repository.js
@@ -1,5 +1,5 @@
 // Please do not edit. This file is generated from data/fontrepo by 

[MediaWiki-commits] [Gerrit] Add free and open licensed font for Urdu script - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Add free and open licensed font for Urdu script
..


Add free and open licensed font for Urdu script

Font homepage is not available, but Debian confirms that font is
licensed to GPL-2.

Also see: http://groups.yahoo.com/group/urdu_computing/message/1081

Bug: 46693
Change-Id: I249f5a36a620ef00235f674cba92a1615a4a785f
---
A data/fontrepo/fonts/NafeesWeb/NafeesWeb.eot
A data/fontrepo/fonts/NafeesWeb/NafeesWeb.ttf
A data/fontrepo/fonts/NafeesWeb/NafeesWeb.woff
A data/fontrepo/fonts/NafeesWeb/font.ini
M resources/js/ext.uls.webfonts.repository.js
5 files changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/data/fontrepo/fonts/NafeesWeb/NafeesWeb.eot 
b/data/fontrepo/fonts/NafeesWeb/NafeesWeb.eot
new file mode 100644
index 000..aa90c1a
--- /dev/null
+++ b/data/fontrepo/fonts/NafeesWeb/NafeesWeb.eot
Binary files differ
diff --git a/data/fontrepo/fonts/NafeesWeb/NafeesWeb.ttf 
b/data/fontrepo/fonts/NafeesWeb/NafeesWeb.ttf
new file mode 100644
index 000..e7a91d2
--- /dev/null
+++ b/data/fontrepo/fonts/NafeesWeb/NafeesWeb.ttf
Binary files differ
diff --git a/data/fontrepo/fonts/NafeesWeb/NafeesWeb.woff 
b/data/fontrepo/fonts/NafeesWeb/NafeesWeb.woff
new file mode 100644
index 000..b2f6f1a
--- /dev/null
+++ b/data/fontrepo/fonts/NafeesWeb/NafeesWeb.woff
Binary files differ
diff --git a/data/fontrepo/fonts/NafeesWeb/font.ini 
b/data/fontrepo/fonts/NafeesWeb/font.ini
new file mode 100644
index 000..0145fd3
--- /dev/null
+++ b/data/fontrepo/fonts/NafeesWeb/font.ini
@@ -0,0 +1,8 @@
+[NafeesWeb]
+languages=ur
+version=1.2
+license=GPL-2
+licensefile=gpl-2.0.txt
+#URL seems broken but, Debian has this font confirming its license validity.
+#Also see: http://groups.yahoo.com/group/urdu_computing/message/1081
+url=http://www.crulp.org/nafeesWebNaskh.html
diff --git a/resources/js/ext.uls.webfonts.repository.js 
b/resources/js/ext.uls.webfonts.repository.js
index 924b6d0..c66b38b 100644
--- a/resources/js/ext.uls.webfonts.repository.js
+++ b/resources/js/ext.uls.webfonts.repository.js
@@ -1,5 +1,5 @@
 // Please do not edit. This file is generated from data/fontrepo by 
data/fontrepo/scripts/compile.php
 ( function ( $ ) {
$.webfonts = $.webfonts || {};
-   $.webfonts.repository = 
{base:..\/data\/fontrepo\/fonts\/,languages:{af:[system,OpenDyslexic],ahr:[Lohit
 
Marathi],akk:[Akkadian],am:[AbyssinicaSIL],ar:[Amiri],arb:[Amiri],arc:[Estarngelo
 Edessa,East Syriac Adiabene,SertoUrhoy],as:[system,Lohit 
Assamese],bh:[Lohit Devanagari],bho:[Lohit 
Devanagari],bk:[system,OpenDyslexic],bn:[Siyam Rupali,Lohit 
Bengali],bo:[Jomolhari],bpy:[Siyam Rupali,Lohit 
Bengali],bug:[Saweri],ca:[system,OpenDyslexic],cdo:[CharisSIL],cr:[system,OskiEast],cy:[system,OpenDyslexic],da:[system,OpenDyslexic],de:[system,OpenDyslexic],dv:[FreeFont-Thaana],dz:[Jomolhari],en:[system,OpenDyslexic],es:[system,OpenDyslexic],et:[system,OpenDyslexic],fa:[system,Iranian
 
Sans,Amiri],fi:[system,OpenDyslexic],fo:[system,OpenDyslexic],fr:[system,OpenDyslexic],fy:[system,OpenDyslexic],ga:[system,OpenDyslexic],gd:[system,OpenDyslexic],gl:[system,OpenDyslexic],gom:[Lohit
 Devanagari],gu:[Lohit Gujarati],hbo:[Taamey Frank 
CLM,Alef],he:[system,Alef,Miriam CLM,Taamey Frank 
CLM],hi:[Lohit 
Devanagari],hu:[system,OpenDyslexic],id:[system,OpenDyslexic],is:[system,OpenDyslexic],it:[system,OpenDyslexic],iu:[system,OskiEast],jv:[system,Tuladha
 Jejeg],jv-java:[Tuladha 
Jejeg],km:[KhmerOSbattambang,KhmerOS,KhmerOSbokor,KhmerOSfasthand,KhmerOSfreehand,KhmerOSmuol,KhmerOSmuollight,KhmerOSmuolpali,KhmerOSsiemreap],kn:[Lohit
 Kannada,Gubbi],kok:[Lohit 
Devanagari],lb:[system,OpenDyslexic],li:[system,OpenDyslexic],mai:[Lohit
 
Devanagari],mak:[Saweri],mi:[system,OpenDyslexic],ml:[Meera,AnjaliOldLipi],mr:[Lohit
 
Marathi],ms:[system,OpenDyslexic],my:[TharLon,Myanmar3,Padauk],nan:[Doulos
 SIL,CharisSIL],nb:[system,OpenDyslexic],ne:[Lohit 
Nepali,Madan],nl:[system,OpenDyslexic],oc:[system,OpenDyslexic],or:[Lohit
 Oriya,Utkal],pa:[Lohit 
Punjabi,Saab],pt:[system,OpenDyslexic],sa:[Lohit 
Devanagari],saz:[Pagul],sq:[system,OpenDyslexic],sux:[Akkadian],sv:[system,OpenDyslexic],sw:[system,OpenDyslexic],syc:[Estarngelo
 Edessa,East Syriac Adiabene,SertoUrhoy],ta:[system,Lohit 
Tamil,Lohit Tamil Classical,Thendral,Thenee],tcy:[Lohit 
Kannada,Gubbi],te:[Lohit 
Telugu],ti:[AbyssinicaSIL],tl:[system,OpenDyslexic],tr:[system,OpenDyslexic],wa:[system,OpenDyslexic],yi:[system,Alef]},fonts:{AbyssinicaSIL:{version:1.200,license:OFL
 
1.1,eot:AbyssinicaSIL\/AbyssinicaSIL-R.eot,ttf:AbyssinicaSIL\/AbyssinicaSIL-R.ttf,woff:AbyssinicaSIL\/AbyssinicaSIL-R.woff},Akkadian:{version:2.56,license:George-Douros,eot:Akkadian\/Akkadian.eot,ttf:Akkadian\/Akkadian.ttf,woff:Akkadian\/Akkadian.woff},Alef:{version:1.0,license:OFL
 

[MediaWiki-commits] [Gerrit] Bump $wgMaxShellMemory to 512MB; drop ctag generation - change (mediawiki/vagrant)

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

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


Change subject: Bump $wgMaxShellMemory to 512MB; drop ctag generation
..

Bump $wgMaxShellMemory to 512MB; drop ctag generation

phpsh fires a volley of warnings on start-up that all resolve to OOMs,
triggered by the hard quota set by $wgMaxShellMemory. This patch increases the
quota to 512MB (up from the default 128MB).

The patch also drops automatic generation of ctags. Autocompletion in phpsh
doesn't work very well and loading tags makes phpsh's slow start-up time even
slower.

Change-Id: I840f498932cccb96a580d444c08fa9bd7cabb70d
---
M LocalSettings.php
M puppet/modules/mediawiki/manifests/phpsh.pp
M puppet/modules/mediawiki/templates/rc.php.erb
3 files changed, 2 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/33/73733/1

diff --git a/LocalSettings.php b/LocalSettings.php
index 52e8f49..83d3739 100644
--- a/LocalSettings.php
+++ b/LocalSettings.php
@@ -16,6 +16,7 @@
 $wgUploadDirectory = '/srv/images';
 $wgUploadPath = '/images';
 $wgArticlePath = /wiki/$1;
+$wgMaxShellMemory = 1024 * 512;
 
 // Show the debug toolbar if 'debug' is set on the request, either as a
 // parameter or a cookie.
diff --git a/puppet/modules/mediawiki/manifests/phpsh.pp 
b/puppet/modules/mediawiki/manifests/phpsh.pp
index f4dabcc..9856433 100644
--- a/puppet/modules/mediawiki/manifests/phpsh.pp
+++ b/puppet/modules/mediawiki/manifests/phpsh.pp
@@ -7,10 +7,6 @@
 include mediawiki
 include php
 
-package { 'exuberant-ctags':
-ensure = present,
-}
-
 package { 'phpsh':
 ensure   = '1.3.1',
 provider = pip,
@@ -28,11 +24,5 @@
 file { '/etc/phpsh/rc.php':
 require = Package['phpsh'],
 content = template('mediawiki/rc.php.erb'),
-}
-
-exec { 'generate-ctags':
-require = [ Package['exuberant-ctags'], Git::Clone['mediawiki/core'] 
],
-command = ctags --languages=php --recurse -f ${mediawiki::dir}/tags 
${mediawiki::dir},
-creates = ${mediawiki::dir}/tags,
 }
 }
diff --git a/puppet/modules/mediawiki/templates/rc.php.erb 
b/puppet/modules/mediawiki/templates/rc.php.erb
index 07b648d..0d961f4 100644
--- a/puppet/modules/mediawiki/templates/rc.php.erb
+++ b/puppet/modules/mediawiki/templates/rc.php.erb
@@ -12,7 +12,7 @@
 case '':
// MediaWiki codebase mode
chdir( '%= scope.lookupvar(mediawiki::dir) %' );
-   include_once( '%= scope.lookupvar(mediawiki::dir) %/index.php' );
+   include_once 'index.php';
break;
 case 'none':
// Vanilla PHP

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I840f498932cccb96a580d444c08fa9bd7cabb70d
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] Bump $wgMaxShellMemory to 512MB; drop ctag generation - change (mediawiki/vagrant)

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

Change subject: Bump $wgMaxShellMemory to 512MB; drop ctag generation
..


Bump $wgMaxShellMemory to 512MB; drop ctag generation

phpsh fires a volley of warnings on start-up that all resolve to OOMs,
triggered by the hard quota set by $wgMaxShellMemory. This patch increases the
quota to 512MB (up from the default 128MB).

The patch also drops automatic generation of ctags. Autocompletion in phpsh
doesn't work very well and loading tags makes phpsh's slow start-up time even
slower.

Change-Id: I840f498932cccb96a580d444c08fa9bd7cabb70d
---
M LocalSettings.php
M puppet/modules/mediawiki/manifests/phpsh.pp
M puppet/modules/mediawiki/templates/rc.php.erb
3 files changed, 2 insertions(+), 11 deletions(-)

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



diff --git a/LocalSettings.php b/LocalSettings.php
index 52e8f49..83d3739 100644
--- a/LocalSettings.php
+++ b/LocalSettings.php
@@ -16,6 +16,7 @@
 $wgUploadDirectory = '/srv/images';
 $wgUploadPath = '/images';
 $wgArticlePath = /wiki/$1;
+$wgMaxShellMemory = 1024 * 512;
 
 // Show the debug toolbar if 'debug' is set on the request, either as a
 // parameter or a cookie.
diff --git a/puppet/modules/mediawiki/manifests/phpsh.pp 
b/puppet/modules/mediawiki/manifests/phpsh.pp
index f4dabcc..9856433 100644
--- a/puppet/modules/mediawiki/manifests/phpsh.pp
+++ b/puppet/modules/mediawiki/manifests/phpsh.pp
@@ -7,10 +7,6 @@
 include mediawiki
 include php
 
-package { 'exuberant-ctags':
-ensure = present,
-}
-
 package { 'phpsh':
 ensure   = '1.3.1',
 provider = pip,
@@ -28,11 +24,5 @@
 file { '/etc/phpsh/rc.php':
 require = Package['phpsh'],
 content = template('mediawiki/rc.php.erb'),
-}
-
-exec { 'generate-ctags':
-require = [ Package['exuberant-ctags'], Git::Clone['mediawiki/core'] 
],
-command = ctags --languages=php --recurse -f ${mediawiki::dir}/tags 
${mediawiki::dir},
-creates = ${mediawiki::dir}/tags,
 }
 }
diff --git a/puppet/modules/mediawiki/templates/rc.php.erb 
b/puppet/modules/mediawiki/templates/rc.php.erb
index 07b648d..0d961f4 100644
--- a/puppet/modules/mediawiki/templates/rc.php.erb
+++ b/puppet/modules/mediawiki/templates/rc.php.erb
@@ -12,7 +12,7 @@
 case '':
// MediaWiki codebase mode
chdir( '%= scope.lookupvar(mediawiki::dir) %' );
-   include_once( '%= scope.lookupvar(mediawiki::dir) %/index.php' );
+   include_once 'index.php';
break;
 case 'none':
// Vanilla PHP

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I840f498932cccb96a580d444c08fa9bd7cabb70d
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