[MediaWiki-commits] [Gerrit] Gitignore: Clean up and ensure /includes/cache is not ignored. - change (mediawiki/core)

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

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


Change subject: Gitignore: Clean up and ensure /includes/cache is not ignored.
..

Gitignore: Clean up and ensure /includes/cache is not ignored.

In Git (at least in version 1.8.x) entries without leading slash
can be matches in any subdirectory.
Add a / in front of all those that should only be in the root.

Change-Id: I61e2be30ac24c5b369a1d36869fbd027f197bebf
---
M .gitignore
1 file changed, 54 insertions(+), 23 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index ddaa58c..ca87d93 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,29 +1,60 @@
+# Repository management
 .svn
-*~
+
+# git-deploy status file:
+/.deploy
+
+# Editors
 *.kate-swp
+*~
+.*.swp
+.project
+cscope.files
+cscope.out
+## NetBeans
+nbproject*
+project.index
+sublime-*
+
+# MediaWiki install  usage
+/cache
+/docs/js
+/images/[0-9a-f]
+/images/archive
+/images/deleted
+/images/lockdir
+/images/temp
+/images/thumb
+## Extension:EasyTimeline
+/images/timeline
+/images/tmp
+/maintenance/.mweval_history
+/maintenance/.mwsql_history
+/maintenance/dev/data
+/AdminSettings.php
+/LocalSettings.php
+/StartProfiler.php
+
+# Building  testing
+node_modules/
+
+# Composer
+/vendor
+/composer.lock
+/composer.json
+
+# Operating systems
+## Mac OS X
+.DS_Store
+## Windows
+Thumbs.db
+
+# Misc
+.buildpath
 .classpath
 .idea
 .metadata*
-.project
 .settings
-AdminSettings.php
-LocalSettings.php
-StartProfiler.php
-cscope.files
-cscope.out
-favicon.ico
-nbproject*
-project.index
-static*
-tags
-cache/*.cdb
-images/[0-9a-f]
-images/archive
-images/deleted
-images/temp
-images/thumb
-images/timeline
-images/tmp
-maintenance/dev/data
-maintenance/.mweval_history
-maintenance/.mwsql_history
+/favicon.ico
+/static*
+/tags

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61e2be30ac24c5b369a1d36869fbd027f197bebf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_19
Gerrit-Owner: Krinkle ttij...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Gitignore: Clean up and ensure /includes/cache is not ignored. - change (mediawiki/core)

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

Change subject: Gitignore: Clean up and ensure /includes/cache is not ignored.
..


Gitignore: Clean up and ensure /includes/cache is not ignored.

In Git (at least in version 1.8.x) entries without leading slash
can be matches in any subdirectory.
Add a / in front of all those that should only be in the root.

Change-Id: I61e2be30ac24c5b369a1d36869fbd027f197bebf
---
M .gitignore
1 file changed, 54 insertions(+), 23 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index ddaa58c..ca87d93 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,29 +1,60 @@
+# Repository management
 .svn
-*~
+
+# git-deploy status file:
+/.deploy
+
+# Editors
 *.kate-swp
+*~
+.*.swp
+.project
+cscope.files
+cscope.out
+## NetBeans
+nbproject*
+project.index
+sublime-*
+
+# MediaWiki install  usage
+/cache
+/docs/js
+/images/[0-9a-f]
+/images/archive
+/images/deleted
+/images/lockdir
+/images/temp
+/images/thumb
+## Extension:EasyTimeline
+/images/timeline
+/images/tmp
+/maintenance/.mweval_history
+/maintenance/.mwsql_history
+/maintenance/dev/data
+/AdminSettings.php
+/LocalSettings.php
+/StartProfiler.php
+
+# Building  testing
+node_modules/
+
+# Composer
+/vendor
+/composer.lock
+/composer.json
+
+# Operating systems
+## Mac OS X
+.DS_Store
+## Windows
+Thumbs.db
+
+# Misc
+.buildpath
 .classpath
 .idea
 .metadata*
-.project
 .settings
-AdminSettings.php
-LocalSettings.php
-StartProfiler.php
-cscope.files
-cscope.out
-favicon.ico
-nbproject*
-project.index
-static*
-tags
-cache/*.cdb
-images/[0-9a-f]
-images/archive
-images/deleted
-images/temp
-images/thumb
-images/timeline
-images/tmp
-maintenance/dev/data
-maintenance/.mweval_history
-maintenance/.mwsql_history
+/favicon.ico
+/static*
+/tags

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61e2be30ac24c5b369a1d36869fbd027f197bebf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_19
Gerrit-Owner: Krinkle ttij...@wikimedia.org
Gerrit-Reviewer: Krinkle ttij...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] mediawiki.jqueryMsg.test: Fix expected number. - change (mediawiki/core)

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

Change subject: mediawiki.jqueryMsg.test: Fix expected number.
..


mediawiki.jqueryMsg.test: Fix expected number.

Follows-up Iedb304f8

Change-Id: I0b9e296eac5c209f266ec34c89d16efa7ed8a523
---
M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Krinkle: Looks good to me, approved



diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
index c61365e..95a16c8 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
@@ -81,7 +81,7 @@
} );
}
 
-   QUnit.test( 'Replace', 9, function ( assert ) {
+   QUnit.test( 'Replace', 7, function ( assert ) {
var parser = mw.jqueryMsg.getMessageFunction();
 
mw.messages.set( 'simple', 'Foo $1 baz $2' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0b9e296eac5c209f266ec34c89d16efa7ed8a523
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: Krinkle ttij...@wikimedia.org
Gerrit-Reviewer: Krinkle ttij...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove the mediawiki.api.titleblacklist module - change (mediawiki/core)

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

Change subject: Remove the mediawiki.api.titleblacklist module
..


Remove the mediawiki.api.titleblacklist module

Moved to the TitleBlacklist extension in I5bf7064a.

Bug: 38244
Change-Id: Ia595085371615da057aaa358d76929916a3e2186
---
M RELEASE-NOTES-1.21
M resources/Resources.php
D resources/mediawiki.api/mediawiki.api.titleblacklist.js
3 files changed, 15 insertions(+), 82 deletions(-)

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



diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index 26a7d07..bda9254 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -295,13 +295,21 @@
   Vector extension (and possibly disable its features using config settings if
   you don't want them).
 * Experimental IBM DB2 support was removed due to lack of interest and 
maintainership
-* BREAKING CHANGE: Filenames of maintenance scripts were standardized into 
lowerCamelCase
-  format, and made more explicit: clear_stats.php - clearCacheStats.php; 
-  clear_interwiki_cache.php - clearInterwikiCache.php; initStats.php - 
initSiteStats.php;
-  proxy_check.php - proxyCheck.php; stats.php - showCacheStats.php;
-  showStats.php - showSiteStats.php. Class names were renamed accordingly:
-  clear_stats - ClearCacheStats; InitStats - InitSiteStats; CacheStats - 
ShowCacheStats
-  ShowStats - ShowSiteStats.
+* BREAKING CHANGE: Filenames of maintenance scripts were standardized into
+  lowerCamelCase format, and made more explicit:
+  - clear_stats.php - clearCacheStats.php
+  - clear_interwiki_cache.php - clearInterwikiCache.php
+  - initStats.php - initSiteStats.php
+  - proxy_check.php - proxyCheck.php
+  - stats.php - showCacheStats.php
+  - showStats.php - showSiteStats.php.
+  Class names were renamed accordingly:
+  - clear_stats - ClearCacheStats
+  - InitStats - InitSiteStats
+  - CacheStats - ShowCacheStats
+  - ShowStats - ShowSiteStats.
+* BREAKING CHANGE: (bug 38244) Removed the mediawiki.api.titleblacklist module
+  and moved it to the TitleBlacklist extension.
 
 == Compatibility ==
 
diff --git a/resources/Resources.php b/resources/Resources.php
index d40e845..10689cd 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -595,13 +595,6 @@
'scripts' = 'resources/mediawiki.api/mediawiki.api.parse.js',
'dependencies' = 'mediawiki.api',
),
-   'mediawiki.api.titleblacklist' = array(
-   'scripts' = 
'resources/mediawiki.api/mediawiki.api.titleblacklist.js',
-   'dependencies' = array(
-   'mediawiki.api',
-   'mediawiki.Title',
-   ),
-   ),
'mediawiki.api.watch' = array(
'scripts' = 'resources/mediawiki.api/mediawiki.api.watch.js',
'dependencies' = array(
diff --git a/resources/mediawiki.api/mediawiki.api.titleblacklist.js 
b/resources/mediawiki.api/mediawiki.api.titleblacklist.js
deleted file mode 100644
index 8c46717..000
--- a/resources/mediawiki.api/mediawiki.api.titleblacklist.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * @class mw.Api.plugin.titleblacklist
- */
-( function ( mw, $ ) {
-
-   $.extend( mw.Api.prototype, {
-   /**
-* Convinience method for `action=titleblacklist`.
-* Note: This action is not provided by MediaWiki core, but as 
part of the TitleBlacklist extension.
-*
-* @param {mw.Title|string} title
-* @param {Function} [ok] Success callback (deprecated)
-* @param {Function} [err] Error callback (deprecated)
-* @return {jQuery.Promise}
-* @return {Function} return.done
-* @return {Object|boolean} return.done.result False if title 
wasn't blacklisted, an object with 'reason', 'line'
-*  and 'message' properties if title was blacklisted.
-*/
-   isBlacklisted: function ( title, ok, err ) {
-   var d = $.Deferred();
-   // Backwards compatibility ( MW 1.20)
-   d.done( ok );
-   d.fail( err );
-
-   this.get( {
-   action: 'titleblacklist',
-   tbaction: 'create',
-   tbtitle: title.toString()
-   } )
-   .done( function ( data ) {
-   var result;
-
-   // this fails open (if nothing valid is 
returned by the api, allows the title)
-   // also fails open when the API is not 
present, which will be most of the time
-   // as this API module is part of the 

[MediaWiki-commits] [Gerrit] Clean up comments. - change (integration/zuul-config)

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

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


Change subject: Clean up comments.
..

Clean up comments.

Change-Id: I1dd8cee6187f01ad6a2c6a4e61dd223dfdcd22bf
---
M layout.yaml
1 file changed, 26 insertions(+), 23 deletions(-)


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

diff --git a/layout.yaml b/layout.yaml
index 050debc..57879d3 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -215,47 +215,52 @@
 
 # Fine tune some jobs
 jobs:
-  # JSLint
+
   #
-  # Disabled by default since most MediaWiki extensions do not pass tests yet:
+  # General
+  #
+
   - name: ^.*-jslint$
-voting: false  # Until we are sure it works fine
+# Non-voting by default (most projects do not pass yet)
+voting: false
 failure-pattern: 
http://integration.mediawiki.org/ci/job/{job.name}/{build.number}/checkstyleResult/
 success-pattern: 
http://integration.mediawiki.org/ci/job/{job.name}/{build.number}/checkstyleResult/
 
-  # Python linter, most of our script fail the tests miserably
   - name: ^.*-pep8$
+# Non-voting (most of our script fail the tests miserably)
 voting: false
 
-  # Pyflakes do not vote by default either
   - name: ^.*-pyflakes$
+# do not vote by default
 voting: false
 
-  # PHP CodeSniffer, HIGHLY experimental
+  # PHP CodeSniffer (experimental)
   - name: ^.*-phpcs$
 voting: false
   - name: ^.*-phpcs-HEAD$
 voting: false
 
-  # Explicitly enable voting for jobs we know are passing pep8:
+  # Rejecting changes having trailing whitespaces cause too many false
+  # positives. So only report the whitespace issues, but don't let it vote.
+  - name: ^.*-whitespaces$
+voting: false
+
+  # QUnit (experimental)
+  - name: ^.*-qunit$
+voting: false
+
+  #
+  # Individual adjustments
+  #
+
   - name: mwext-EventLogging-pep8
 voting: true
   - name: sartoris-pep8
 voting: true
 
-  # Rejecting changes having trailing whitespaces cause too many false
-  # positives. So only report the whitespace issue for information.
-  - name: ^.*-whitespaces$
-voting: false
-
-  # QUnit non-voting until we know other branches are passing as well:
-  - name: ^.*-qunit$
-voting: false
-
-  # Explicitly enable voting for projects we know are passing JSHint:
   - name: mediawiki-core-jslint
 voting: true
-  # (bug 44846) JSHint is always wrong in MediaWiki REL1_19
+# Doesn't work in MediaWiki REL1_19 (bug 44846)
 branch: (?!REL1_19)
   - name: mwext-PHPExcel-jslint
 voting: true
@@ -265,8 +270,6 @@
 voting: true
   - name: mwext-VisualEditor-jslint
 voting: true
-
-  # Various failing jobs that need to be fixed eventually
 
   # CentralNotice does not support SQLite backend :-/
   - name: ^mwext-CentralNotice-testextensions-.*
@@ -306,7 +309,7 @@
 success-message: Change looked fine once merged.
 failure-message: ERROR! It seems this job introduced a regression although 
it might be caused by a previous commit.
 
-  # MediaWiki Core regression tests (on merge and per branches):
+  # MediaWiki core regression tests (on merge and per branches):
   - name: ^mediawiki-core-regression-.*
 failure-message: ERROR! It seems this job introduced a regression although 
it might be caused by a previous commit.
   - name: mediawiki-core-regression-master
@@ -316,7 +319,7 @@
   - name: mediawiki-core-regression-REL1_20
 branch: ^REL1_20$
 
-  # Extensions for which tests are non functional or absents:
+  # Extensions for which tests are non-functional or absent:
   - name: ^mwext-EtherEditor-testextensions.*
 voting: false
   - name: ^mwext-cldr-testextensions.*
@@ -467,7 +470,7 @@
 check-voter:
   - wikimedia-bugzilla-wikibugs-perllint
 
- MediaWiki extensions #
+ MediaWiki extensions ##
 
   - name: mediawiki/extensions/AdminLinks
 check:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dd8cee6187f01ad6a2c6a4e61dd223dfdcd22bf
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle ttij...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add full stop to full sentences - change (mediawiki/core)

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

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


Change subject: Add full stop to full sentences
..

Add full stop to full sentences

Change-Id: I3182c093ce582fb24db1fd8216aa9b9e756edf9a
---
M languages/messages/MessagesEn.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/52596/1

diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 4debb3f..3cbb89d 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -3229,9 +3229,9 @@
 'unblockip'   = 'Unblock user',
 'unblockiptext'   = 'Use the form below to restore write 
access to a previously blocked IP address or username.',
 'ipusubmit'   = 'Remove this block',
-'unblocked'   = '[[User:$1|$1]] has been unblocked',
-'unblocked-range' = '$1 has been unblocked',
-'unblocked-id'= 'Block $1 has been removed',
+'unblocked'   = '[[User:$1|$1]] has been unblocked.',
+'unblocked-range' = '$1 has been unblocked.',
+'unblocked-id'= 'Block $1 has been removed.',
 'blocklist'   = 'Blocked users',
 'ipblocklist' = 'Blocked users',
 'ipblocklist-legend'  = 'Find a blocked user',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3182c093ce582fb24db1fd8216aa9b9e756edf9a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Clean up comments. - change (integration/zuul-config)

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

Change subject: Clean up comments.
..


Clean up comments.

Change-Id: I1dd8cee6187f01ad6a2c6a4e61dd223dfdcd22bf
---
M layout.yaml
1 file changed, 26 insertions(+), 23 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index 050debc..57879d3 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -215,47 +215,52 @@
 
 # Fine tune some jobs
 jobs:
-  # JSLint
+
   #
-  # Disabled by default since most MediaWiki extensions do not pass tests yet:
+  # General
+  #
+
   - name: ^.*-jslint$
-voting: false  # Until we are sure it works fine
+# Non-voting by default (most projects do not pass yet)
+voting: false
 failure-pattern: 
http://integration.mediawiki.org/ci/job/{job.name}/{build.number}/checkstyleResult/
 success-pattern: 
http://integration.mediawiki.org/ci/job/{job.name}/{build.number}/checkstyleResult/
 
-  # Python linter, most of our script fail the tests miserably
   - name: ^.*-pep8$
+# Non-voting (most of our script fail the tests miserably)
 voting: false
 
-  # Pyflakes do not vote by default either
   - name: ^.*-pyflakes$
+# do not vote by default
 voting: false
 
-  # PHP CodeSniffer, HIGHLY experimental
+  # PHP CodeSniffer (experimental)
   - name: ^.*-phpcs$
 voting: false
   - name: ^.*-phpcs-HEAD$
 voting: false
 
-  # Explicitly enable voting for jobs we know are passing pep8:
+  # Rejecting changes having trailing whitespaces cause too many false
+  # positives. So only report the whitespace issues, but don't let it vote.
+  - name: ^.*-whitespaces$
+voting: false
+
+  # QUnit (experimental)
+  - name: ^.*-qunit$
+voting: false
+
+  #
+  # Individual adjustments
+  #
+
   - name: mwext-EventLogging-pep8
 voting: true
   - name: sartoris-pep8
 voting: true
 
-  # Rejecting changes having trailing whitespaces cause too many false
-  # positives. So only report the whitespace issue for information.
-  - name: ^.*-whitespaces$
-voting: false
-
-  # QUnit non-voting until we know other branches are passing as well:
-  - name: ^.*-qunit$
-voting: false
-
-  # Explicitly enable voting for projects we know are passing JSHint:
   - name: mediawiki-core-jslint
 voting: true
-  # (bug 44846) JSHint is always wrong in MediaWiki REL1_19
+# Doesn't work in MediaWiki REL1_19 (bug 44846)
 branch: (?!REL1_19)
   - name: mwext-PHPExcel-jslint
 voting: true
@@ -265,8 +270,6 @@
 voting: true
   - name: mwext-VisualEditor-jslint
 voting: true
-
-  # Various failing jobs that need to be fixed eventually
 
   # CentralNotice does not support SQLite backend :-/
   - name: ^mwext-CentralNotice-testextensions-.*
@@ -306,7 +309,7 @@
 success-message: Change looked fine once merged.
 failure-message: ERROR! It seems this job introduced a regression although 
it might be caused by a previous commit.
 
-  # MediaWiki Core regression tests (on merge and per branches):
+  # MediaWiki core regression tests (on merge and per branches):
   - name: ^mediawiki-core-regression-.*
 failure-message: ERROR! It seems this job introduced a regression although 
it might be caused by a previous commit.
   - name: mediawiki-core-regression-master
@@ -316,7 +319,7 @@
   - name: mediawiki-core-regression-REL1_20
 branch: ^REL1_20$
 
-  # Extensions for which tests are non functional or absents:
+  # Extensions for which tests are non-functional or absent:
   - name: ^mwext-EtherEditor-testextensions.*
 voting: false
   - name: ^mwext-cldr-testextensions.*
@@ -467,7 +470,7 @@
 check-voter:
   - wikimedia-bugzilla-wikibugs-perllint
 
- MediaWiki extensions #
+ MediaWiki extensions ##
 
   - name: mediawiki/extensions/AdminLinks
 check:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1dd8cee6187f01ad6a2c6a4e61dd223dfdcd22bf
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle ttij...@wikimedia.org
Gerrit-Reviewer: Krinkle ttij...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] QUnit: Disable for mediawiki-core@REL1_19. - change (integration/zuul-config)

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

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


Change subject: QUnit: Disable for mediawiki-core@REL1_19.
..

QUnit: Disable for mediawiki-core@REL1_19.

Change-Id: I8e02d222f06cfa07be5c3695ea6c8efd42438882
---
M layout.yaml
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/layout.yaml b/layout.yaml
index 57879d3..b5fa82d 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -271,6 +271,12 @@
   - name: mwext-VisualEditor-jslint
 voting: true
 
+  - name: mediawiki-core-qunit
+voting: false
+# Doesn't work in MediaWiki REL1_19
+# (times out or doesn't start in the first place).
+branch: (?!REL1_19)
+
   # CentralNotice does not support SQLite backend :-/
   - name: ^mwext-CentralNotice-testextensions-.*
 voting: false

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e02d222f06cfa07be5c3695ea6c8efd42438882
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle ttij...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] QUnit: Disable for mediawiki-core@REL1_19. - change (integration/zuul-config)

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

Change subject: QUnit: Disable for mediawiki-core@REL1_19.
..


QUnit: Disable for mediawiki-core@REL1_19.

Change-Id: I8e02d222f06cfa07be5c3695ea6c8efd42438882
---
M layout.yaml
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index 57879d3..b5fa82d 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -271,6 +271,12 @@
   - name: mwext-VisualEditor-jslint
 voting: true
 
+  - name: mediawiki-core-qunit
+voting: false
+# Doesn't work in MediaWiki REL1_19
+# (times out or doesn't start in the first place).
+branch: (?!REL1_19)
+
   # CentralNotice does not support SQLite backend :-/
   - name: ^mwext-CentralNotice-testextensions-.*
 voting: false

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e02d222f06cfa07be5c3695ea6c8efd42438882
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle ttij...@wikimedia.org
Gerrit-Reviewer: Krinkle ttij...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] ParserHook re-factoring prototype [DO NOT MERGE] - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: ParserHook re-factoring prototype [DO NOT MERGE]
..

ParserHook re-factoring prototype [DO NOT MERGE]

This is a prootype based on the comments made [1]. Since I constantly
fail to understand, it is working prototpe to ensure core functionality
is working but under the understanding for a missing base class and
reimplementation of code in order to achieve loose coupling.

+ Tests are missing
+ Comments are mssing

[1] https://gerrit.wikimedia.org/r/#/c/51974/6

Change-Id: I5d3cc9ff97f77acb05225658b1fb2f815b8b9f5f
---
M includes/Setup.php
M includes/parserhooks/ParserParameter.php
M includes/parserhooks/RecurringEvents.php
M includes/parserhooks/RecurringEventsHandler.php
A includes/parserhooks/SemanticDataHandler.php
M includes/parserhooks/SetParser.php
M includes/parserhooks/SubobjectHandler.php
7 files changed, 442 insertions(+), 141 deletions(-)


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

diff --git a/includes/Setup.php b/includes/Setup.php
index d9410f0..131c526 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -210,6 +210,7 @@
$wgAutoloadClasses['SMW\Subobject'] = $phDir . 
'Subobject.php';
$wgAutoloadClasses['SMW\RecurringEventsHandler'] = $phDir . 
'RecurringEventsHandler.php';
$wgAutoloadClasses['SMW\RecurringEvents']   = $phDir . 
'RecurringEvents.php';
+   $wgAutoloadClasses['SMW\SemanticDataHandler']   = $phDir . 
'SemanticDataHandler.php';
 
// Stores  queries
$wgAutoloadClasses['SMWQueryProcessor'] = $smwgIP . 
'includes/SMW_QueryProcessor.php';
diff --git a/includes/parserhooks/ParserParameter.php 
b/includes/parserhooks/ParserParameter.php
index 34bcbec..42e8713 100644
--- a/includes/parserhooks/ParserParameter.php
+++ b/includes/parserhooks/ParserParameter.php
@@ -22,6 +22,7 @@
  *
  * @since 1.9
  *
+ * @file
  * @ingroup SMW
  *
  * @licence GNU GPL v2+
@@ -31,28 +32,72 @@
 
/**
 * Returns a default separator
-*
-* @since 1.9
-*
 * @var string
 */
protected $defaultSeparator = ',';
 
/**
-* Returns an instance of the current class
+* Returns first named identifier
+* @var array
+*/
+   protected $rawParameters;
+
+   /**
+* Returns first named identifier
+* @var array
+*/
+   protected $parameters;
+
+   /**
+* Returns first named identifier
+* @var string
+*/
+   protected $first = null;
+
+   /**
+* Constructor
 *
 * @since 1.9
 *
-* @return ParserParameter
+* @param array $parameters
 */
-   public static function singleton() {
-   static $instance = null;
+   public function __construct( array $parameters ) {
+   $this-rawParameters = $parameters;
+   $this-parameters = $this-map( $this-rawParameters );
+   }
 
-   if ( $instance === null ) {
-   $instance = new self();
-   }
+   /**
+* Returns first available parameter
+*
+* @since 1.9
+*
+* @return string
+*/
+   public function getFirst() {
+   return $this-first;
+   }
 
-   return $instance;
+   /**
+* Map parameters from an external source independent from the invoked
+* constructor
+*
+* @since 1.9
+*
+* @return string
+*/
+   public function mapParameters( array $params ) {
+   return $this-map( $params );
+   }
+
+   /**
+* Returns raw parameters
+*
+* @since 1.9
+*
+* @return string
+*/
+   public function getRaw() {
+   return $this-rawParameters;
}
 
/**
@@ -60,11 +105,48 @@
 *
 * @since 1.9
 *
-* @param array $param
+* @return string
+*/
+   public function toArray() {
+   return $this-parameters;
+   }
+
+   /**
+* Inject parameters from an outside source
+*
+* @since 1.9
+*
+* @param array
+*/
+   public function setParameters( array $parameters ) {
+   $this-parameters = $parameters;
+   }
+
+   /**
+* Add parameter key and value
+*
+* @since 1.9
+*
+* @param string $key
+* @param string $value
+*/
+   public function addParameter( $key, $value ) {
+   if( $key !== ''  $value !== '' ) {
+   $this-parameters[$key][] = $value;
+   }
+   }
+
+   /**
+* Do mapping of raw parameters array 

[MediaWiki-commits] [Gerrit] Example commit - change (mediawiki/core)

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

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


Change subject: Example commit
..

Example commit

Change-Id: I60cbbb7d95beef42027816a26d58369100cf29c1
---
A example.js
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/99/52599/1

diff --git a/example.js b/example.js
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/example.js

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60cbbb7d95beef42027816a26d58369100cf29c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_19
Gerrit-Owner: Krinkle ttij...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] I can't find where outdated class is used - change (mediawiki...Translate)

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

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


Change subject: I can't find where outdated class is used
..

I can't find where outdated class is used

Change-Id: I1290359eee885dcca5e89e900eab09cfd3cf359a
---
M resources/css/ext.translate.proofread.css
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/css/ext.translate.proofread.css 
b/resources/css/ext.translate.proofread.css
index a304469..4666448 100644
--- a/resources/css/ext.translate.proofread.css
+++ b/resources/css/ext.translate.proofread.css
@@ -43,7 +43,7 @@
top: -10px;
 }
 
-.tux-proofread-status.outdated, .tux-proofread-status.fuzzy {
+.tux-proofread-status.fuzzy {
/* @embed */
background: url(../images/outdated.png) left center no-repeat;
background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/outdated.svg);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1290359eee885dcca5e89e900eab09cfd3cf359a
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] Allow job queues to optionally request jobs not be processed... - change (mediawiki/core)

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

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


Change subject: Allow job queues to optionally request jobs not be processed 
immediately Jobs can be given either a notBefore timestamp, or a delay from now 
in seconds
..

Allow job queues to optionally request jobs not be processed immediately
Jobs can be given either a notBefore timestamp, or a delay from now in seconds

Most jobs don't need this, so unless the queue specifically has delays enabled,
the not_before column is not joined so performance of normal queues should be 
unaffected

Commit includes DB patches and unit tests for the new job behavior

Change-Id: I05df4efe7c82b8785b47b5e384879bdf6e4edb7b
---
M includes/installer/MysqlUpdater.php
M includes/installer/PostgresUpdater.php
M includes/installer/SqliteUpdater.php
M includes/job/Job.php
M includes/job/JobQueue.php
M includes/job/JobQueueDB.php
A maintenance/archives/patch-delayed-job-queue.sql
M maintenance/postgres/tables.sql
M maintenance/tables.sql
M tests/phpunit/includes/jobqueue/JobQueueTest.php
10 files changed, 204 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/52601/1

diff --git a/includes/installer/MysqlUpdater.php 
b/includes/installer/MysqlUpdater.php
index 6a2d50f..a2a8075 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -229,6 +229,8 @@
array( 'modifyField', 'user_groups', 'ug_group', 
'patch-ug_group-length-increase-255.sql' ),
array( 'modifyField', 'user_former_groups', 
'ufg_group', 'patch-ufg_group-length-increase-255.sql' ),
array( 'addIndex', 'page_props', 'pp_propname_page',  
'patch-page_props-propname-page-index.sql' ),
+   array( 'addField', 'job',   'job_not_before',   
'patch-delayed-job-queue.sql' ),
+   array( 'addIndex', 'job',   'job_not_before',   
'patch-delayed-job-queue.sql' ),
);
}
 
diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index 0a4b5e6..ebec1b5 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -160,6 +160,7 @@
array( 'addPgField', 'job',   'job_token',  
  TEXT NOT NULL DEFAULT '' ),
array( 'addPgField', 'job',   
'job_token_timestamp',  TIMESTAMPTZ ),
array( 'addPgField', 'job',   'job_sha1',   
  TEXT NOT NULL DEFAULT '' ),
+   array( 'addPgField', 'job',   'job_not_before', 
  TIMESTAMPTZ DEFAULT NULL ),
 
# type changes
array( 'changeField', 'archive',   'ar_deleted',
  'smallint', '' ),
@@ -238,6 +239,7 @@
array( 'addPgIndex', 'job',   'job_cmd_token',  
'(job_cmd, job_token, job_random)' ),
array( 'addPgIndex', 'job',   
'job_cmd_token_id',   '(job_cmd, job_token, job_id)' ),
array( 'addPgIndex', 'filearchive',   'fa_sha1',
'(fa_sha1)' ),
+   array( 'addPgIndex', 'job',   
'job_not_before_idx', '(job_not_before)' ),
 
array( 'checkIndex', 'pagelink_unique', array(
array( 'pl_from', 'int4_ops', 'btree', 0 ),
diff --git a/includes/installer/SqliteUpdater.php 
b/includes/installer/SqliteUpdater.php
index cd7a2c9..2ebb490 100644
--- a/includes/installer/SqliteUpdater.php
+++ b/includes/installer/SqliteUpdater.php
@@ -109,6 +109,9 @@
array( 'modifyField', 'user_groups', 'ug_group', 
'patch-ug_group-length-increase-255.sql' ),
array( 'modifyField', 'user_former_groups', 
'ufg_group', 'patch-ufg_group-length-increase-255.sql' ),
array( 'addIndex', 'page_props', 'pp_propname_page',  
'patch-page_props-propname-page-index.sql' ),
+
+   array( 'addField', 'job',   'job_not_before',   
'patch-delayed-job-queue.sql' ),
+   array( 'addIndex', 'job',   'job_not_before',   
'patch-delayed-job-queue.sql' ),
);
}
 
diff --git a/includes/job/Job.php b/includes/job/Job.php
index 9ec58c9..4be70bf 100644
--- a/includes/job/Job.php
+++ b/includes/job/Job.php
@@ -170,6 +170,23 @@
}
 
/**
+* @return null or integer 
+* notBefore is a timestamp in seconds
+* It can be set directly or calculated from the current timestamp and 
a 'delay' (also in seconds)
+*/
+   public function getNotBefore() {
+   if( isset( $this-params['notBefore'] ) 
+  intval( 

[MediaWiki-commits] [Gerrit] Add PageContentSaveComplete server-side event - change (mediawiki...EventLogging)

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

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


Change subject: Add PageContentSaveComplete server-side event
..

Add PageContentSaveComplete server-side event

Requested by Tomasz. Schema:
http://meta.wikimedia.org/wiki/Schema:PageContentSaveComplete

Change-Id: I095d27b483210613a04a5c349c7b9fd8041586f9
---
M EventLogging.hooks.php
M EventLogging.php
2 files changed, 22 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging 
refs/changes/02/52602/1

diff --git a/EventLogging.hooks.php b/EventLogging.hooks.php
index 423269b..1fc5ff3 100644
--- a/EventLogging.hooks.php
+++ b/EventLogging.hooks.php
@@ -64,12 +64,12 @@
 
$returnTo = $wgRequest-getVal( 'returnto' );
if ( $returnTo !== null ) {
-   $event['returnTo'] = $returnTo;
+   $event[ 'returnTo' ] = $returnTo;
}
 
$returnToQuery = $wgRequest-getVal( 'returntoquery' );
if ( $returnToQuery !== null ) {
-   $event['returnToQuery'] = $returnToQuery;
+   $event[ 'returnToQuery' ] = $returnToQuery;
}
 
efLogServerSideEvent( 'ServerSideAccountCreation', 5233795, 
$event );
@@ -78,6 +78,25 @@
 
 
/**
+* Log server-side event on successful page edit.
+* @see 
https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete
+* @see https://meta.wikimedia.org/wiki/Schema:PageContentSaveComplete
+*/
+   public static function onPageContentSaveComplete( $article, $user, 
$content, $summary,
+   $isMinor, $isWatch, $section, $flags, $revision, $status, 
$baseRevId ) {
+
+   if ( $revision ) {
+   $event = array( 'revisionId' = $revision-getId() );
+   if ( isset( $_SERVER[ 'HTTP_USER_AGENT' ] ) ) {
+   $event[ 'userAgent' ] = $_SERVER[ 
'HTTP_USER_AGENT' ];
+   }
+   efLogServerSideEvent( 'PageContentSaveComplete', 
5303086, $event );
+   }
+   return true;
+   }
+
+
+   /**
 * @param array $vars
 * @return bool
 */
diff --git a/EventLogging.php b/EventLogging.php
index 2ffa165..d5cb105 100644
--- a/EventLogging.php
+++ b/EventLogging.php
@@ -239,6 +239,7 @@
 $wgExtensionFunctions[] = 'EventLoggingHooks::onSetup';
 
 $wgHooks[ 'AddNewAccount' ][] = 'EventLoggingHooks::onAddNewAccount';
+$wgHooks[ 'PageContentSaveComplete' ][] = 
'EventLoggingHooks::onPageContentSaveComplete';
 $wgHooks[ 'ResourceLoaderGetConfigVars' ][] = 
'EventLoggingHooks::onResourceLoaderGetConfigVars';
 $wgHooks[ 'ResourceLoaderTestModules' ][] = 
'EventLoggingHooks::onResourceLoaderTestModules';
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I095d27b483210613a04a5c349c7b9fd8041586f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
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] Consistency tweak in preparation for adding extension to tra... - change (mediawiki...AWS)

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

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


Change subject: Consistency tweak in preparation for adding extension to 
translatewiki.net
..

Consistency tweak in preparation for adding extension to translatewiki.net

Change-Id: Ibb53eff71529ffbeb5c528547ea31bb735c36999
---
M AWS.i18n.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AWS 
refs/changes/03/52603/1

diff --git a/AWS.i18n.php b/AWS.i18n.php
index 211003d..2884025 100644
--- a/AWS.i18n.php
+++ b/AWS.i18n.php
@@ -1,5 +1,4 @@
 ?php
-
 /**
  * Internationalization and localization for Extension:AWS
  *
@@ -10,7 +9,7 @@
 $messages = array();
 
 $messages['en'] = array(
-   'aws-desc' = 'This plugin provides classes for using Amazon Web 
Services with MediaWiki.'
+   'aws-desc' = 'Adds an plugin for using Amazon Web Services'
 );
 
 $messages['qqq'] = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb53eff71529ffbeb5c528547ea31bb735c36999
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AWS
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] Cache the options token for preferences system - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Cache the options token for preferences system
..

Cache the options token for preferences system

Change-Id: I2e9a4326119db390aba36cc5bc6da20c5c16eed1
---
M resources/js/ext.uls.preferences.js
1 file changed, 92 insertions(+), 22 deletions(-)


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

diff --git a/resources/js/ext.uls.preferences.js 
b/resources/js/ext.uls.preferences.js
index 8f7f076..913d539 100644
--- a/resources/js/ext.uls.preferences.js
+++ b/resources/js/ext.uls.preferences.js
@@ -21,7 +21,90 @@
 ( function ( $, mw, undefined ) {
'use strict';
 
-   var ULSPreferences = function () {
+   var ULSPreferences,
+   cachedOptionsToken = null;
+
+   /**
+* Post to options API with correct token.
+* If we have no token, get one and try to post.
+* If we have a cached token try using that, and if it fails, blank out 
the
+* cached token and start over.
+*
+* @param params {Object} API parameters
+* @param ok {Function} callback for success
+* @param err {Function} [optional] error callback
+* @return {jqXHR}
+*/
+   function saveOptionsWithToken ( params, ok, err ) {
+   var useTokenToPost, getTokenIfBad;
+   if ( cachedOptionsToken === null ) {
+   // We don't have a valid cached token, so get a fresh 
one and try posting.
+   // We do not trap any 'badtoken' or 'notoken' errors, 
because we don't want
+   // an infinite loop. If this fresh token is bad, 
something else is very wrong.
+   useTokenToPost = function ( token ) {
+   params.token = token;
+   new mw.Api().post( params, ok, err );
+   };
+   return getOptionToken( useTokenToPost, err );
+   } else {
+   // We do have a token, but it might be expired. So if 
it is 'bad' then
+   // start over with a new token.
+   params.token = cachedOptionsToken;
+   getTokenIfBad = function ( code, result ) {
+   if ( code === 'badtoken' ) {
+   // force a new token, clear any old one
+   cachedOptionsToken = null;
+   saveOptionsWithToken( params, ok, err );
+   } else {
+   err( code, result );
+   }
+   };
+   return new mw.Api().post( params, { ok : ok, err : 
getTokenIfBad });
+   }
+   }
+
+   /**
+* Api helper to grab an options token
+*
+* token callback has signature ( String token )
+* error callback has signature ( String code, Object results, 
XmlHttpRequest xhr, Exception exception )
+* Note that xhr and exception are only available for 'http_*' errors
+* code may be any http_* error code (see mw.Api), or 'token_missing'
+*
+* @param tokenCallback {Function} received token callback
+* @param err {Function} error callback
+* @return {jqXHR}
+*/
+   function getOptionToken ( tokenCallback, err ) {
+   var parameters = {
+   action: 'tokens',
+   type: 'options'
+   },
+   ok = function ( data ) {
+   var token;
+   // If token type is not available for this user,
+   // key 'translationreviewtoken' is missing or 
can contain Boolean false
+   if ( data.tokens  data.tokens.optionstoken ) {
+   token = data.tokens.optionstoken;
+   cachedOptionsToken = token;
+   tokenCallback( token );
+   } else {
+   err( 'token-missing', data );
+   }
+   },
+   ajaxOptions = {
+   ok: ok,
+   err: err,
+   // Due to the API assuming we're logged out if 
we pass the callback-parameter,
+   // we have to disable jQuery's callback system, 
and instead parse JSON string,
+   // by setting 'jsonp' to false.
+   jsonp: false
+

[MediaWiki-commits] [Gerrit] Added TermsToClaimsTranslator - change (mediawiki...Wikibase)

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

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


Change subject: Added TermsToClaimsTranslator
..

Added TermsToClaimsTranslator

Change-Id: I3769b528cc3b21a24525b1b8801ffd27543efc7a
---
M lib/WikibaseLib.hooks.php
M lib/WikibaseLib.php
A lib/includes/TermsToClaimsTranslator.php
A lib/tests/phpunit/TermsToClaimsTranslatorTest.php
4 files changed, 317 insertions(+), 1 deletion(-)


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

diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 28c7436..e6198f4 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -93,8 +93,9 @@
'MapValueHasher',
'SettingsArray',
'SiteLink',
-   'Utils',
+   'TermsToClaimsTranslator',
'Term',
+   'Utils',
);
 
foreach ( $testFiles as $file ) {
diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index 2955626..10e8cba 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -117,6 +117,7 @@
 $wgAutoloadClasses['Wikibase\SettingsArray']   = $dir . 
'includes/SettingsArray.php';
 $wgAutoloadClasses['Wikibase\SiteLink']= $dir 
. 'includes/SiteLink.php';
 $wgAutoloadClasses['Wikibase\Term']= $dir 
. 'includes/Term.php';
+$wgAutoloadClasses['Wikibase\Lib\TermsToClaimsTranslator'] = $dir . 
'includes/TermsToClaimsTranslator.php';
 $wgAutoloadClasses['Wikibase\Utils']   = $dir 
. 'includes/Utils.php';
 $wgAutoloadClasses['Wikibase\WikibaseDiffOpFactory']   = $dir . 
'includes/WikibaseDiffOpFactory.php';
 
diff --git a/lib/includes/TermsToClaimsTranslator.php 
b/lib/includes/TermsToClaimsTranslator.php
new file mode 100644
index 000..8e0432b
--- /dev/null
+++ b/lib/includes/TermsToClaimsTranslator.php
@@ -0,0 +1,154 @@
+?php
+
+namespace Wikibase\Lib;
+
+use InvalidArgumentException;
+use Wikibase\Term;
+use Wikibase\Claim;
+use Wikibase\PropertyValueSnak;
+use DataValues\MonolingualTextValue;
+use DataValues\MultilingualTextValue;
+
+/**
+ * Can turn Term objects into Claims.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+class TermsToClaimsTranslator {
+
+   /**
+* Term type = Property id
+*
+* @var int[]
+*/
+   private $propertyIds = array();
+
+   /**
+* Constructor.
+*
+* @since 0.4
+*
+* @param int[] $propertyIds
+*/
+   public function __construct( array $propertyIds ) {
+   $this-propertyIds = $propertyIds;
+   }
+
+   /**
+* Turns a set of terms representing the same property though in 
different languages into a Claim
+* with a MultilingualTextValue in its main snak.
+*
+* @since 0.4
+*
+* @param Term[] $terms
+*
+* @return Claim
+* @throws InvalidArgumentException
+*/
+   public function termsToClaim( array $terms ) {
+   if ( empty( $terms ) ) {
+   throw new InvalidArgumentException( 'Need to have at 
least one term to construct a claim' );
+   }
+
+   $term = reset( $terms );
+   $termType = $term-getType();
+
+   $propertyId = $this-getPropertyIdForTermType( $termType );
+
+   $monoTexts = array();
+
+   foreach ( $terms as $term ) {
+   if ( $term-getType() !== $termType ) {
+   throw new InvalidArgumentException( 'Term types 
must be the same to construct a claim' );
+   }
+
+   $monoTexts[] = $this-termToMonoText( $term );
+   }
+
+   $multiText = new MultilingualTextValue( $monoTexts );
+
+   $mainSnak = new PropertyValueSnak( 

[MediaWiki-commits] [Gerrit] (Bug 45830) Separate slow-parse into public and private files - change (operations/mediawiki-config)

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

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


Change subject: (Bug 45830) Separate slow-parse into public and private files
..

(Bug 45830) Separate slow-parse into public and private files

Move slow-parse of private wikis into its own 'file'

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7723bcb..157c70f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4209,6 +4209,10 @@
'torblock'  = udp://$wmfUdp2logDest/torblock,
),
 
+   '+private' = array(
+   'slow-parse' = udp://$wmfUdp2logDest/privatewiki-slow-parse,
+   ),
+
// To measure the # of articles on enwiki during the million = 
million transition
'+testwiki' = array(
'articles' = udp://$wmfUdp2logDest/articles/testwiki,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7ab3d0167776358f0dc409cc8a74b89656a145d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Platonides platoni...@gmail.com

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


[MediaWiki-commits] [Gerrit] (mingle #410) Add X-CS request/response header handling support - change (mediawiki...MobileFrontend)

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

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


Change subject: (mingle #410) Add X-CS request/response header handling support
..

(mingle #410) Add X-CS request/response header handling support

This change will cause MF to add analytics info to X-CS response
header when user is in alpha or beta, and/or if there is an X-CS
request header (in WMF production, this will happen if the user
is accessing the site via ZeroRatedMobileAccess). The X-CS
response header will only be set if the aforementioned criteria
are met, AND wgMFEnableXCSLogging (added in this changeset) is
set to true.

In the longer term, it would be good to move the X-CS response
header handling into core, perhaps into OutputPage - but since
Zero and MobileFrontend are the only components currently using
the X-CS analytics headers, it seemed prudent and more expedient
to start with the handling in MobileFrontend.

Change-Id: I93758fc76721d89f9c32a28c1821f3e59eb384ef
---
M MobileFrontend.php
M includes/MobileContext.php
M includes/MobileFrontend.hooks.php
3 files changed, 108 insertions(+), 0 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index 1181d7e..bf77f69 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -98,6 +98,7 @@
 $wgHooks['UserLoginComplete'][] = 'MobileFrontendHooks::onUserLoginComplete';
 $wgHooks['UserLoginForm'][] = 'MobileFrontendHooks::onUserLoginForm';
 $wgHooks['UserCreateForm'][] = 'MobileFrontendHooks::onUserCreateForm';
+$wgHooks['BeforePageDisplay'][] = 'MobileFrontendHooks::onBeforePageDisplay';
 
 $wgSpecialPages['DonateImage'] = 'SpecialDonateImage';
 $wgSpecialPages['MobileDiff'] = 'SpecialMobileDiff';
@@ -691,3 +692,12 @@
  * (wiki)text to append to photo description during photo upload.
  */
 $wgMFPhotoUploadAppendToDesc = '';
+
+/**
+ * Whether or not to enable the use of the X-CS HTTP response header
+ *
+ * This header is used for analytics purposes.
+ * @var bool
+ */
+$wgMFEnableXCSLogging = false;
+
diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index c94b19b..7e76994 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -9,6 +9,12 @@
protected $useFormat;
 
/**
+* Key/value pairs of things to add to X-CS response header for anlytics
+* @var array
+*/
+   protected $analyticsLogItems = array();
+
+   /**
 * @var string xDevice header information
 */
private $xDevice;
@@ -372,10 +378,12 @@
if ( !empty( $optInCookie ) 
$optInCookie == 1 ) {
$this-betaGroupMember = true;
+   $this-addAnalyticsLogItem( 'mf-m', 'b' );
}
if ( !empty( $alpha ) 
$alpha == 1 ) {
$this-setAlphaGroupMember( true );
+   $this-addAnalyticsLogItem( 'mf-m', 'a' );
} else {
$this-setAlphaGroupMember( false );
}
@@ -882,4 +890,52 @@
$wgUseSiteJs = false;
$wgAllowUserJs = false;
}
+
+   /**
+* Add key/value pairs for analytics purposes to 
$this-analyticsLogItems
+* @param string $key
+* @param string $val
+*/
+   public function addAnalyticsLogItem( $key, $val ) {
+   $this-analyticsLogItems[$key] = $val;
+   }
+
+   /**
+* @return array
+*/
+   public function getAnalyticsLogItems() {
+   return $this-analyticsLogItems;
+   }
+
+   /**
+* Get HTTP header string for X-CS
+*
+* This is made up of key/vaule pairs and is used for analytics
+* purposes.
+*
+* @return string|bool
+*/
+   public function getXCSHeader() {
+   $logItems = $this-getAnalyticsLogItems();
+   if ( count( $logItems ) ) {
+   $xcs_items = array();
+   foreach ( $logItems as $key = $val ) {
+   $xcs_items[] = {$key}={$val};
+   }
+   $headerValue = implode( ';', $xcs_items );
+   return X-CS: $headerValue;
+   } else {
+   return false;
+   }
+   }
+
+   /**
+* Take a key/val pair in string format and add it to 
$this-analyticsLogItems
+*
+* @param string $xcs_item: In the format key=value
+*/
+   public function addAnalyticsLogItemFromXCS( $xcs_item ) {
+   list( $key, $val ) = explode( '=', $xcs_item );
+   $this-addAnalyticsLogItem( $key, $val );
+   }
 }
diff --git a/includes/MobileFrontend.hooks.php 

[MediaWiki-commits] [Gerrit] Update X-CS handling to new k/v pair spec - change (operations/puppet)

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

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


Change subject: Update X-CS handling to new k/v pair spec
..

Update X-CS handling to new k/v pair spec

Per discussion between ops, mobile, and analytics, the X-CS HTTP
header is being repurposed as a general analytics header. Specific
data needed by analytics is serialized into key/value pairs that
are appended to the X-CS header, separated by ';'.

The specific key naming for the X-CS header usage by Zero is still up
in the air and this patchset should not be merged until it is settled.

This is related to Change-Id: I93758fc76721d89f9c32a28c1821f3e59eb384ef

Change-Id: I14973cce2d2e80f480aabefa2dfbbfd5936db6cb
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 29 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/52606/1

diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 08e9ed3..5af70df 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -260,99 +260,99 @@
set req.http.X-Subdomain = ZERO;
if ( client.ip ~ carrier_celcom_malaysia ) {
set req.http.X-Carrier = Celcom Malaysia;
-   set req.http.X-CS = 502-13;
+   set req.http.X-CS = mfz-c=502-13;
} else if ( client.ip ~ carrier_hello_cambodia ) {
set req.http.X-Carrier = Hello Cambodia;
-   set req.http.X-CS = 456-02;
+   set req.http.X-CS = mfz-c=456-02;
} else if (client.ip ~ wmf_office) {
set req.http.X-Carrier = wikimedia;
-   set req.http.X-CS = WMF;
+   set req.http.X-CS = mfz-c=WMF;
} else if (client.ip ~ carrier_digi) {
if ( req.http.User-Agent ~ Opera ) {
set req.http.X-Carrier = DIGI;
-   set req.http.X-CS = 502-16;
+   set req.http.X-CS = mfz-c=502-16;
}
} else if (client.ip ~ carrier_dialog_sri_lanka) {
set req.http.X-Carrier = Dialog Sri Lanka;
-   set req.http.X-CS = 413-02;
+   set req.http.X-CS = mfz-c=413-02;
} else if (client.ip ~ carrier_dtac) {
set req.http.X-Carrier = DTAC;
-   set req.http.X-CS = 520-18;
+   set req.http.X-CS = mfz-c=520-18;
} else if (client.ip ~ carrier_tata) {
set req.http.X-Carrier = TATA;
/* MCC-MNC not clear from 
http://en.wikipedia.org/wiki/Mobile_country_code */
-   set req.http.X-CS = 405-0*;
+   set req.http.X-CS = mfz-c=405-0*;
} else if (client.ip ~ carrier_telenor_montenegro) {
set req.http.X-Carrier = Telenor Montenegro;
-   set req.http.X-CS = 297-01;
+   set req.http.X-CS = mfz-c=297-01;
} else if (client.ip ~ carrier_grameenphone_bangladesh) {
if ( req.http.host ~ 
(^(bn)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org ) {
set req.http.X-Carrier = Grameenphone 
Bangladesh;
-   set req.http.X-CS = 470-01;
+   set req.http.X-CS = mfz-c=470-01;
}
} else if (client.ip ~ carrier_saudi_telecom) {
if ( req.http.host ~ 
(^(ar|en|ur|bn|tl)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org ) {
set req.http.X-Carrier = Saudi Telecom;
-   set req.http.X-CS = 420-01;
+   set req.http.X-CS = mfz-c=420-01;
}
} else if (client.ip ~ carrier_xl_indonesia) {
if ( req.http.host ~ 
(^(id|en|zh|ar|hi|ms|jv|su)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org ) {
set req.http.X-Carrier = XL Axiata;
-   set req.http.X-CS = 510-11;
+   set req.http.X-CS = mfz-c=510-11;
}
} else if (client.ip ~ carrier_vimpelcom_beeline) {
if ( req.http.host ~ 
(^(en|ru)\.zero|^zero)\.([a-zA-Z0-9-]+)\.org ) {
set req.http.X-Carrier = Vimpelcom Beeline;
-   set req.http.X-CS = 250-99;
+   set req.http.X-CS = mfz-c=250-99;
}
}
} else {
set 

[MediaWiki-commits] [Gerrit] Add full stop to full sentences - change (mediawiki/core)

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

Change subject: Add full stop to full sentences
..


Add full stop to full sentences

Change-Id: I3182c093ce582fb24db1fd8216aa9b9e756edf9a
---
M languages/messages/MessagesEn.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 4debb3f..3cbb89d 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -3229,9 +3229,9 @@
 'unblockip'   = 'Unblock user',
 'unblockiptext'   = 'Use the form below to restore write 
access to a previously blocked IP address or username.',
 'ipusubmit'   = 'Remove this block',
-'unblocked'   = '[[User:$1|$1]] has been unblocked',
-'unblocked-range' = '$1 has been unblocked',
-'unblocked-id'= 'Block $1 has been removed',
+'unblocked'   = '[[User:$1|$1]] has been unblocked.',
+'unblocked-range' = '$1 has been unblocked.',
+'unblocked-id'= 'Block $1 has been removed.',
 'blocklist'   = 'Blocked users',
 'ipblocklist' = 'Blocked users',
 'ipblocklist-legend'  = 'Find a blocked user',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3182c093ce582fb24db1fd8216aa9b9e756edf9a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@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] DO NOT MERGE - change (mediawiki...Wikibase)

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

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


Change subject: DO NOT MERGE
..

DO NOT MERGE

Change-Id: Iece4a230dd475653af0beeab7ce72abd94dbb676
---
A DataModel/DataModel.classes.php
A DataModel/DataModel.mw.php
A DataModel/DataModel.php
R DataModel/DataModel/Claim/Claim.php
R DataModel/DataModel/Claim/ClaimAggregate.php
R DataModel/DataModel/Claim/ClaimListAccess.php
R DataModel/DataModel/Claim/Claims.php
R DataModel/DataModel/Claim/Statement.php
R DataModel/DataModel/Entity/Entity.php
R DataModel/DataModel/Entity/EntityId.php
R DataModel/DataModel/Entity/Item.php
R DataModel/DataModel/Entity/Property.php
R DataModel/DataModel/Entity/Query.php
R DataModel/DataModel/Reference.php
R DataModel/DataModel/ReferenceList.php
R DataModel/DataModel/References.php
R DataModel/DataModel/SiteLink.php
R DataModel/DataModel/Snak/PropertyNoValueSnak.php
R DataModel/DataModel/Snak/PropertySnak.php
R DataModel/DataModel/Snak/PropertySomeValueSnak.php
R DataModel/DataModel/Snak/PropertyValueSnak.php
R DataModel/DataModel/Snak/Snak.php
R DataModel/DataModel/Snak/SnakFactory.php
R DataModel/DataModel/Snak/SnakList.php
R DataModel/DataModel/Snak/SnakObject.php
R DataModel/DataModel/Snak/Snaks.php
R DataModel/tests/phpunit/Claim/ClaimAggregateTest.php
R DataModel/tests/phpunit/Claim/ClaimListAccessTest.php
R DataModel/tests/phpunit/Claim/ClaimTest.php
R DataModel/tests/phpunit/Claim/ClaimsTest.php
R DataModel/tests/phpunit/Claim/StatementTest.php
R DataModel/tests/phpunit/Entity/EntityIdTest.php
R DataModel/tests/phpunit/Entity/EntityTest.php
R DataModel/tests/phpunit/Entity/ItemMultilangTextsTest.php
R DataModel/tests/phpunit/Entity/ItemNewEmptyTest.php
R DataModel/tests/phpunit/Entity/ItemNewFromArrayTest.php
R DataModel/tests/phpunit/Entity/ItemTest.php
R DataModel/tests/phpunit/Entity/PropertyTest.php
R DataModel/tests/phpunit/Entity/QueryTest.php
R DataModel/tests/phpunit/Entity/TestItems.php
R DataModel/tests/phpunit/ReferenceListTest.php
R DataModel/tests/phpunit/ReferenceTest.php
R DataModel/tests/phpunit/SiteLinkTest.php
R DataModel/tests/phpunit/Snak/PropertyValueSnakTest.php
R DataModel/tests/phpunit/Snak/SnakListTest.php
R DataModel/tests/phpunit/Snak/SnakObjectTest.php
R DataModel/tests/phpunit/Snak/SnakTest.php
M lib/WikibaseLib.php
M lib/config/WikibaseLib.experimental.php
R lib/includes/ClaimDiffer.php
R lib/includes/ClaimDifference.php
R lib/includes/ClaimDifferenceVisualizer.php
R lib/includes/EntityDiff.php
R lib/includes/EntityDiffVisualizer.php
R lib/includes/EntityFactory.php
R lib/includes/ItemDiff.php
56 files changed, 159 insertions(+), 45 deletions(-)


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

diff --git a/DataModel/DataModel.classes.php b/DataModel/DataModel.classes.php
new file mode 100644
index 000..3b3ede1
--- /dev/null
+++ b/DataModel/DataModel.classes.php
@@ -0,0 +1,57 @@
+?php
+
+/**
+ * Class registration file for the DataModel component of Wikibase.
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseDataModel
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+return call_user_func( function() {
+
+   $wgAutoloadClasses['Wikibase\Claim']= $dir 
. 'includes/claim/Claim.php';
+   $wgAutoloadClasses['Wikibase\ClaimAggregate']   = $dir . 
'includes/claim/ClaimAggregate.php';
+   $wgAutoloadClasses['Wikibase\ClaimListAccess']  = $dir . 
'includes/claim/ClaimListAccess.php';
+   $wgAutoloadClasses['Wikibase\Claims']   = $dir 
. 'includes/claim/Claims.php';
+
+   $wgAutoloadClasses['Wikibase\Item'] = $dir 
. 'includes/item/Item.php';
+   $wgAutoloadClasses['Wikibase\ItemObject']   = $dir 
. 'includes/item/Item.php';
+
+   $wgAutoloadClasses['Wikibase\Entity']   = $dir 
. 'includes/entity/Entity.php';
+   $wgAutoloadClasses['Wikibase\EntityId'] = $dir 
. 'includes/entity/EntityId.php';
+
+   $wgAutoloadClasses['Wikibase\Property'] 
= $dir . 'includes/property/Property.php';
+   $wgAutoloadClasses['Wikibase\Reference']
= $dir . 'includes/reference/Reference.php';
+   $wgAutoloadClasses['Wikibase\ReferenceList']= $dir 
. 'includes/reference/ReferenceList.php';
+   $wgAutoloadClasses['Wikibase\ReferenceObject']  = $dir 
. 'includes/reference/Reference.php';
+   $wgAutoloadClasses['Wikibase\References']   
= $dir . 'includes/reference/References.php';
+
+   $wgAutoloadClasses['Wikibase\Query'] = __DIR__ . 
'/../includes/query/Query.php';
+
+   $wgAutoloadClasses['Wikibase\SiteLink'] 
= $dir . 

[MediaWiki-commits] [Gerrit] 'no' is already in global blacklist - change (translatewiki)

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

Change subject: 'no' is already in global blacklist
..


'no' is already in global blacklist

Change-Id: I59cb0e3820ce4e96ed6d5bf26edcbebc683c02c2
---
M groups/OpenStreetMap/WaymarkedTrails.yaml
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/groups/OpenStreetMap/WaymarkedTrails.yaml 
b/groups/OpenStreetMap/WaymarkedTrails.yaml
index b481aa1..51e2fe9 100644
--- a/groups/OpenStreetMap/WaymarkedTrails.yaml
+++ b/groups/OpenStreetMap/WaymarkedTrails.yaml
@@ -32,8 +32,6 @@
   sourcePattern: 
%GROUPROOT%/waymarked-trails-site/django/locale/%CODE%/LC_MESSAGES/django.po
   definitionFile: 
%GROUPROOT%/waymarked-trails-site/django/locale/qot/LC_MESSAGES/django.po
   targetPattern: 
waymarked-trails-site/django/locale/%CODE%/LC_MESSAGES/django.po
-  codeMap:
-no: x-invalidLanguageCode
 
   header: |
 # This file is part of the Waymarked Trails Map Project

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

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

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


[MediaWiki-commits] [Gerrit] Changing position of colon - change (mediawiki/core)

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

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


Change subject: Changing position of colon
..

Changing position of colon

Change-Id: I5a973a04221f730c3b6cb4e1abf1a6d0bd95d107
---
M includes/installer/Installer.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/52610/1

diff --git a/includes/installer/Installer.i18n.php 
b/includes/installer/Installer.i18n.php
index ff29ea8..7f2d83f 100644
--- a/includes/installer/Installer.i18n.php
+++ b/includes/installer/Installer.i18n.php
@@ -542,7 +542,7 @@
 
 $3
 
-'''Note''': If you do not do this now, this generated configuration file will 
not be available to you later if you exit the installation without downloading 
it.
+'''Note:''' If you do not do this now, this generated configuration file will 
not be available to you later if you exit the installation without downloading 
it.
 
 When that has been done, you can '''[$2 enter your wiki]'''.,
'config-download-localsettings' = 'Download 
codeLocalSettings.php/code',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a973a04221f730c3b6cb4e1abf1a6d0bd95d107
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] (bug 44328) Do not display fuzzy translations on translation... - change (mediawiki...Translate)

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

Change subject: (bug 44328) Do not display fuzzy translations on translation 
pages
..


(bug 44328) Do not display fuzzy translations on translation pages

Bug: 44328
Change-Id: I8ff927f9dbd89ee312ddb778df5d6fe804d86ca2
---
M PageTranslation.i18n.php
M resources/css/ext.translate.css
M tag/PageTranslationHooks.php
M tag/RenderJob.php
M tag/TPParse.php
5 files changed, 5 insertions(+), 33 deletions(-)

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



diff --git a/PageTranslation.i18n.php b/PageTranslation.i18n.php
index 468c450..f53b898 100644
--- a/PageTranslation.i18n.php
+++ b/PageTranslation.i18n.php
@@ -89,7 +89,6 @@
'translate-tag-markthisagain' = 'This page has span 
class=plainlinks[$1 changes]/span since it was last span 
class=plainlinks[$2 marked for translation]/span.',
'translate-tag-hasnew' = 'This page contains span 
class=plainlinks[$1 changes]/span which are not marked for translation.',
'tpt-translation-intro' = 'This page is a span class=plainlinks[$1 
translated version]/span of a page [[$2]] and the translation is $3% 
complete.',
-   'tpt-translation-intro-fuzzy' = 'Outdated translations are marked like 
this.',
 
'tpt-languages-legend' = 'Other languages:',
'tpt-languages-separator' = '#160;•#160;',
diff --git a/resources/css/ext.translate.css b/resources/css/ext.translate.css
index b88614d..a321463 100644
--- a/resources/css/ext.translate.css
+++ b/resources/css/ext.translate.css
@@ -1,7 +1,3 @@
-.mw-translate-fuzzy {
-   background-color: #FDD;
-}
-
 .mw-translate-page-info {
font-size: x-small;
text-align: center;
diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index 5423138..3084bd4 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -739,17 +739,6 @@
$wrap = 'div class=mw-translate-page-info$1/div';
$wgOut-wrapWikiMsg( $wrap, array( 'tpt-translation-intro', 
$url, $titleText, $per ) );
 
-   if ( floor( $per )  100 ) {
-   $groupId = $page-getMessageGroup()-getId();
-   $stats = MessageGroupStats::forItem( $groupId, $code );
-   $fuzzy = $stats[MessageGroupStats::FUZZY];
-   if ( $fuzzy ) {
-   // Only show if there is fuzzy messages
-   $wrap = 'div class=mw-translate-page-info 
mw-translate-fuzzy$1/div';
-   $wgOut-wrapWikiMsg( $wrap, array( 
'tpt-translation-intro-fuzzy' ) );
-   }
-   }
-
$wgOut-addHTML( 'hr /' );
}
 
diff --git a/tag/RenderJob.php b/tag/RenderJob.php
index d428d04..d26cd99 100644
--- a/tag/RenderJob.php
+++ b/tag/RenderJob.php
@@ -49,7 +49,6 @@
 
$group = $page-getMessageGroup();
$collection = $group-initCollection( $code );
-   $collection-loadTranslations( DB_MASTER );
 
$text = $page-getParse()-getTranslationPageText( $collection 
);
 
diff --git a/tag/TPParse.php b/tag/TPParse.php
index 0200e46..84a298d 100644
--- a/tag/TPParse.php
+++ b/tag/TPParse.php
@@ -165,10 +165,8 @@
}
 
/**
-* Returns translation page with all possible translations replaced in, 
ugly
-* translation tags removed and outdated translation marked with a class
-* mw-translate-fuzzy.
-* @todo The class marking has to be more intelligent with spandiv use.
+* Returns translation page with all possible translations replaced in
+* and ugly translation tags removed.
 * @param MessageCollection $collection Collection that holds 
translated messages.
 * @return string Whole page as wikitext.
 */
@@ -179,8 +177,8 @@
$prefix = $this-title-getPrefixedDBKey() . '/';
 
if ( $collection instanceof MessageCollection ) {
-   $collection-filter( 'hastranslation', false );
-   $collection-loadTranslations();
+   $collection-filter( 'translated', false );
+   $collection-loadTranslations( DB_MASTER );
}
 
foreach ( $this-sections as $ph = $s ) {
@@ -191,16 +189,7 @@
 * @var TMessage $msg
 */
$msg = $collection[$prefix . $s-id];
-   $translation = $msg-translation();
-
-   if ( $translation !== null ) {
-   // Ideally we should not have fuzzy 
here, but old texts do
-   $sectiontext = str_replace( 
TRANSLATE_FUZZY, '', $translation );
-
-   

[MediaWiki-commits] [Gerrit] Simplify translatable page completion calculation - change (mediawiki...Translate)

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

Change subject: Simplify translatable page completion calculation
..


Simplify translatable page completion calculation

Now that we are not showing fuzzy messages, it makes no sense
to count fuzzy messages towards completion. This also makes
the percentages consistent with message group stats.

Bug: 44328
Change-Id: I148c42c02880c5ac5ea147fdcfea395a83c2c11b
---
M tag/TranslatablePage.php
1 file changed, 20 insertions(+), 82 deletions(-)

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



diff --git a/tag/TranslatablePage.php b/tag/TranslatablePage.php
index 3cfd02a..9b0be1d 100644
--- a/tag/TranslatablePage.php
+++ b/tag/TranslatablePage.php
@@ -699,101 +699,39 @@
return $units;
}
 
-   public function getTranslationPercentages( $force = false ) {
-   global $wgRequest;
-
-   // Check the cache, as this is relatively slow to calculate
-   $memcKey = wfMemcKey( 'pt', 'status', 
$this-getTitle()-getPrefixedText() );
-   $cached = wfGetCache( CACHE_ANYTHING )-get( $memcKey );
-
-   $force = $force || $wgRequest-getText( 'action' ) === 'purge';
-   if ( !$force  is_array( $cached ) ) {
-   return $cached;
-   }
-
-   $titles = $this-getTranslationPages();
-
+   /**
+*
+* @return array
+*/
+   public function getTranslationPercentages() {
// Calculate percentages for the available translations
$group = $this-getMessageGroup();
if ( !$group instanceof WikiPageMessageGroup ) {
-   return null;
+   return array();
}
 
-   $markedRevs = $this-getMarkedRevs();
+   $titles = $this-getTranslationPages();
+   $temp = MessageGroupStats::forGroup( $this-getMessageGroupId() 
);
+   $stats = array();
 
-   $temp = array();
foreach ( $titles as $t ) {
-   list( , $code ) = TranslateUtils::figureMessage( 
$t-getText() );
-   $collection = $group-initCollection( $code );
+   $handle = new MessageHandle( $t );
+   $code = $handle-getCode();
 
-   $percent = $this-getPercentageInternal( $collection, 
$markedRevs );
-   // To avoid storing 40 decimals of inaccuracy, truncate 
to two decimals
-   $temp[$collection-code] = sprintf( '%.2f', $percent );
+   // Sometimes we want to display 0.00 for pages which 
translation
+   // hasn't started yet.
+   $stats[$code] = 0.00;
+   if ( isset( $temp[$code] )  
$temp[$code][MessageGroupStats::TOTAL]  0 ) {
+   $per = 
$temp[$code][MessageGroupStats::TRANSLATED] / 
$temp[$code][MessageGroupStats::TOTAL];
+   $stats[$code] = sprintf( '%.2f', $per );
+   }
}
 
// Content language is always up-to-date
global $wgContLang;
+   $stats[$wgContLang-getCode()] = 1.00;
 
-   $temp[$wgContLang-getCode()] = 1.00;
-
-   wfGetCache( CACHE_ANYTHING )-set( $memcKey, $temp, 60 * 60 * 
12 );
-
-   return $temp;
-   }
-
-   /**
-* @param MessageCollection $collection
-* @param $markedRevs
-* @return float|int
-*/
-   protected function getPercentageInternal( $collection, $markedRevs ) {
-   $count = count( $collection );
-   if ( $count === 0 ) {
-   return 0;
-   }
-
-   // We want to get fuzzy though
-   $collection-filter( 'hastranslation', false );
-   $collection-initMessages();
-
-   $total = 0;
-
-   /**
-* @var TMessage $message
-*/
-   foreach ( $collection as $key = $message ) {
-   $score = 1;
-
-   // Fuzzy halves score
-   if ( $message-hasTag( 'fuzzy' ) ) {
-   $score *= 0.5;
-
-   /* Reduce 20% for every newer revision than 
what is translated against.
-* This is inside fuzzy clause, because there 
might be silent changes
-* which we don't want to decrease the 
translation percentage.
-*/
-   $rev = $this-getTransrev( $key . '/' . 
$collection-code );
-   foreach ( $markedRevs as $r ) {
-   if ( $rev === 

[MediaWiki-commits] [Gerrit] Don't assume page content language is wiki content language - change (mediawiki...Translate)

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

Change subject: Don't assume page content language is wiki content language
..


Don't assume page content language is wiki content language

Bug: 35489
Change-Id: Ida6d5bdaf6b9cb43df3276e07c26b40fc49d947b
---
M tag/TranslatablePage.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/tag/TranslatablePage.php b/tag/TranslatablePage.php
index 9b0be1d..1bbbac0 100644
--- a/tag/TranslatablePage.php
+++ b/tag/TranslatablePage.php
@@ -728,8 +728,7 @@
}
 
// Content language is always up-to-date
-   global $wgContLang;
-   $stats[$wgContLang-getCode()] = 1.00;
+   $stats[$this-getSourceLanguageCode()] = 1.00;
 
return $stats;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida6d5bdaf6b9cb43df3276e07c26b40fc49d947b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix whitelist/blacklist checking on export - change (mediawiki...Translate)

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

Change subject: Fix whitelist/blacklist checking on export
..


Fix whitelist/blacklist checking on export

The list of supported languages is an array, not a list.

Bug: 45693
Change-Id: Id52cc01c36cee71c2d8ce300b2287b7f8ce6e75c
---
M scripts/export.php
1 file changed, 5 insertions(+), 7 deletions(-)

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



diff --git a/scripts/export.php b/scripts/export.php
index 743b664..922fe53 100644
--- a/scripts/export.php
+++ b/scripts/export.php
@@ -233,15 +233,13 @@
$definitionFile = str_replace( $wgTranslateGroupRoot, 
$options['ppgettext'], $path );
}
 
-   $translatebleLanguages = $group-getTranslatableLanguages();
+   $whitelist = $group-getTranslatableLanguages();
 
foreach ( $langs as $lang ) {
-   // Do not export languges that are blacklisted (or not 
whitelisted). As
-   // $translatebleLanguages can be null, only test if 
$translatebleLanguages
-   // is an array.
-   if ( is_array( $translatebleLanguages ) 
-   !in_array( $lang, $translatebleLanguages )
-   ) {
+   // Do not export languges that are blacklisted (or not 
whitelisted).
+   // Also check that whitelist is not null, which means 
that all
+   // languages are allowed for translation and export.
+   if ( is_array( $whitelist )  !isset( 
$whitelist[$lang] ) ) {
continue;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id52cc01c36cee71c2d8ce300b2287b7f8ce6e75c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Adjusted layout for side-by-side views - change (mediawiki...Translate)

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

Change subject: Adjusted layout for side-by-side views
..


Adjusted layout for side-by-side views

Several changes to better fit short messages when displayed in a
side-by-side view such as page or proofread:
* Margins are used when width is more than 900px
* Style adjusted to make the list of messages look more like a document.
* Fixes in the buttons to switch views to make them look connected.
* By using a tux-view-switcher class, CSS rules for addign icons on toggle 
buttons are smplified.

Change-Id: I39a36df9d76b10dad5c511be391d20345e84b663
---
M resources/css/ext.translate.messagetable.css
M resources/css/ext.translate.proofread.css
M utils/TuxMessageTable.php
3 files changed, 42 insertions(+), 27 deletions(-)

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



diff --git a/resources/css/ext.translate.messagetable.css 
b/resources/css/ext.translate.messagetable.css
index 032499c..0ac40dd 100644
--- a/resources/css/ext.translate.messagetable.css
+++ b/resources/css/ext.translate.messagetable.css
@@ -54,7 +54,7 @@
 /* Default colors */
 .tux-messagelist {
color: #252525;
-   background-color: #FF;
+   background-color: #F8F8F8;
max-width: 800px;
 }
 
@@ -71,6 +71,7 @@
margin-left: 5px !important;
vertical-align: middle;
border-bottom: 1px solid #C9C9C9;
+   background: #FF;
 }
 
 .tux-message-item.translated,
@@ -209,24 +210,33 @@
text-shadow: none;
 }
 
-.toggle.button:first-child {
-   border-radius: 3px 0 0 3px;
-}
-
-.toggle.button:last-child {
-   border-radius: 0 3px 3px 0;
+.tux-action-bar .tux-view-switcher {
+   padding: 0 5px;
 }
 
 .tux-action-bar .tux-view-switcher .toggle.button {
-   width: 50%;
+   width: 33%;
 }
 
-.tux-action-bar .translate-mode-button:before {
+.tux-action-bar .tux-view-switcher .toggle.button:first-child {
+   border-radius: 3px 0 0 3px;
+   border-right: none;
+}
+
+.tux-action-bar .tux-view-switcher .toggle.button:last-child {
+   border-radius: 0 3px 3px 0;
+   border-left: none;
+}
+
+.tux-action-bar .tux-view-switcher .toggle.button:before {
content: ;
height: 15px;
width: 25px;
display: inline-block;
vertical-align: bottom;
+}
+
+.tux-action-bar .translate-mode-button:before {
background: transparent url(../images/view-list.png) center center 
no-repeat;
background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/view-list.svg);
background-image: -moz-linear-gradient(transparent, transparent), 
url(../images/view-list.svg);
@@ -241,11 +251,6 @@
 }
 
 .tux-action-bar .page-mode-button:before {
-   content: ;
-   height: 15px;
-   width: 25px;
-   display: inline-block;
-   vertical-align: bottom;
background: transparent url(../images/view-page.png) center center 
no-repeat;
background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/view-page.svg);
background-image: -moz-linear-gradient(transparent, transparent), 
url(../images/view-page.svg);
@@ -260,11 +265,6 @@
 }
 
 .tux-action-bar .tux-proofread-button:before {
-   content: ;
-   height: 15px;
-   width: 25px;
-   display: inline-block;
-   vertical-align: bottom;
background: transparent url(../images/view-proofread.png) center center 
no-repeat;
background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/view-proofread.svg);
background-image: -moz-linear-gradient(transparent, transparent), 
url(../images/view-proofread.svg);
diff --git a/resources/css/ext.translate.proofread.css 
b/resources/css/ext.translate.proofread.css
index a304469..b016756 100644
--- a/resources/css/ext.translate.proofread.css
+++ b/resources/css/ext.translate.proofread.css
@@ -1,16 +1,30 @@
 .ext-translate-container .tux-messagelist .tux-message-proofread {
height: auto;
min-height: 50px;
-   padding: 20px 0 20px 0;
-   margin: 0;
+   padding: 40px 0px;
+   margin: 0 auto;
vertical-align: middle;
-   border-bottom: 1px solid #f8f8f8;
-   border-left: 1px solid #f0f0f0;
-   border-right: 1px solid #f0f0f0;
+   border-bottom: 1px solid #f0f0f0;
+   border-left: 1px solid #DD;
+   border-right: 1px solid #DD;
+   max-width: 900px;
+   background: #FF;
 }
 
-.tux-message-proofread:hover {
-   background: #fefefe;
+.ext-translate-container .tux-messagelist .tux-message-proofread:hover {
+   background: #FCFCFC;
+}
+
+.ext-translate-container .tux-messagelist .tux-message-proofread:first-child {
+   margin-top: 10px;
+   padding-top: 60px;
+   border-top: 1px solid #DD;
+}
+
+.ext-translate-container .tux-messagelist .tux-message-proofread:last-child {
+   margin-bottom: 

[MediaWiki-commits] [Gerrit] Simplifying listview widget while introducing snaklistview - change (mediawiki...Wikibase)

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

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


Change subject: Simplifying listview widget while introducing snaklistview
..

Simplifying listview widget while introducing snaklistview

The generic listview widget does not need a cascading DOM structure anymore. 
The toolbar
placeholder needed for the references is moved to a new snaklistview template.
The actual snaklistview widget will be implemented in another change set.

Change-Id: Id2cbff8246baba9dad93e35a0dd1ff9cc1f9cbdf
---
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
M lib/resources/templates.php
M selenium/lib/modules/reference_module.rb
4 files changed, 32 insertions(+), 21 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js
index eea643d..f817810 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js
@@ -54,12 +54,6 @@
widgetBaseClass: 'wb-listview',
 
/**
-* Section node containing the list items
-* @type jQuery
-*/
-   $listItems: null,
-
-   /**
 * Short cut for 'listItemAdapter' option
 * @type jQuery.wikibase.listview.ListItemAdapter
 */
@@ -75,9 +69,6 @@
'', // list items
'' // toolbar
],
-   templateShortCuts: {
-   '$listItems': '.wb-listview-items'
-   },
value: null,
listItemAdapter: null
},
@@ -101,7 +92,7 @@
// apply template to this.element:
PARENT.prototype._create.call( this );
 
-   this._createList(); // fill this.$listItems
+   this._createList(); // fill list with items
 
// remove list item after remove operation has finished
this.element.on( liAfterRemoveEvent, function( e ) {
@@ -130,7 +121,7 @@
},
 
/**
-* Will fill this.$listItems with sections DOM, all sections will 
already contain their related
+* Will fill the list element with sections DOM, all sections will 
already contain their related
 * list items DOM.
 *
 * @since 0.4
@@ -152,7 +143,7 @@
 * @return {jQuery}
 */
items: function() {
-   return this.$listItems.children();
+   return this.element.children();
},
 
/**
@@ -199,7 +190,7 @@
},
natively: function( event, value, $newLi ) {
// first insert DOM so value widget's events can 
already bubble during initialization!
-   this.$listItems.append( $newLi );
+   this.element.append( $newLi );
this._lia.newListItem( $newLi, value );
 
this._trigger( 'itemadded', null, [ value, $newLi ] );
@@ -218,7 +209,7 @@
removeItem: $.NativeEventHandler( 'removeitem', {
initially: function( event, $itemNode ) {
// check whether given node actually is in this list. 
If not, fail!
-   if( !$itemNode.parent( this.$listItems ).length ) {
+   if( !$itemNode.parent( this.element ).length ) {
throw new Error( 'The given node is not an 
element in this list' );
}
// even though this information is kind of redundant 
since the value can be accessed
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
index 8bd0039..f55c89b 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
@@ -68,7 +68,13 @@
if( this.value() ) {
var statementGuid = this.value().getGuid();
 
-   this.$references.listview( {
+   this.$references.append( mw.template( 'wb-snaklistview',
+   '', // listview placeholder
+   '' // toolbar placeholder
+   ) );
+
+   var $snaklistview = this.$references.find( 
'.wb-snaklistview-listview' );
+   $snaklistview.listview( {
listItemAdapter: new 
$.wikibase.listview.ListItemAdapter( {
listItemWidget: 
$.wikibase.referenceview,
listItemWidgetValueAccessor: 'value',

[MediaWiki-commits] [Gerrit] Simplifying listview widget while introducing snaklistview - change (mediawiki...Wikibase)

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

Change subject: Simplifying listview widget while introducing snaklistview
..


Simplifying listview widget while introducing snaklistview

The generic listview widget does not need a cascading DOM structure anymore. 
The toolbar
placeholder needed for the references is moved to a new snaklistview template.
The actual snaklistview widget will be implemented in another change set.

Change-Id: Id2cbff8246baba9dad93e35a0dd1ff9cc1f9cbdf
---
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
M lib/resources/templates.php
M selenium/lib/modules/reference_module.rb
4 files changed, 32 insertions(+), 21 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js
index eea643d..f817810 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.js
@@ -54,12 +54,6 @@
widgetBaseClass: 'wb-listview',
 
/**
-* Section node containing the list items
-* @type jQuery
-*/
-   $listItems: null,
-
-   /**
 * Short cut for 'listItemAdapter' option
 * @type jQuery.wikibase.listview.ListItemAdapter
 */
@@ -75,9 +69,6 @@
'', // list items
'' // toolbar
],
-   templateShortCuts: {
-   '$listItems': '.wb-listview-items'
-   },
value: null,
listItemAdapter: null
},
@@ -101,7 +92,7 @@
// apply template to this.element:
PARENT.prototype._create.call( this );
 
-   this._createList(); // fill this.$listItems
+   this._createList(); // fill list with items
 
// remove list item after remove operation has finished
this.element.on( liAfterRemoveEvent, function( e ) {
@@ -130,7 +121,7 @@
},
 
/**
-* Will fill this.$listItems with sections DOM, all sections will 
already contain their related
+* Will fill the list element with sections DOM, all sections will 
already contain their related
 * list items DOM.
 *
 * @since 0.4
@@ -152,7 +143,7 @@
 * @return {jQuery}
 */
items: function() {
-   return this.$listItems.children();
+   return this.element.children();
},
 
/**
@@ -199,7 +190,7 @@
},
natively: function( event, value, $newLi ) {
// first insert DOM so value widget's events can 
already bubble during initialization!
-   this.$listItems.append( $newLi );
+   this.element.append( $newLi );
this._lia.newListItem( $newLi, value );
 
this._trigger( 'itemadded', null, [ value, $newLi ] );
@@ -218,7 +209,7 @@
removeItem: $.NativeEventHandler( 'removeitem', {
initially: function( event, $itemNode ) {
// check whether given node actually is in this list. 
If not, fail!
-   if( !$itemNode.parent( this.$listItems ).length ) {
+   if( !$itemNode.parent( this.element ).length ) {
throw new Error( 'The given node is not an 
element in this list' );
}
// even though this information is kind of redundant 
since the value can be accessed
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
index 8bd0039..f55c89b 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
@@ -68,7 +68,13 @@
if( this.value() ) {
var statementGuid = this.value().getGuid();
 
-   this.$references.listview( {
+   this.$references.append( mw.template( 'wb-snaklistview',
+   '', // listview placeholder
+   '' // toolbar placeholder
+   ) );
+
+   var $snaklistview = this.$references.find( 
'.wb-snaklistview-listview' );
+   $snaklistview.listview( {
listItemAdapter: new 
$.wikibase.listview.ListItemAdapter( {
listItemWidget: 
$.wikibase.referenceview,
listItemWidgetValueAccessor: 'value',
@@ -170,6 +176,15 @@
 
} );
 
+ 

[MediaWiki-commits] [Gerrit] Improving focusing after add action in statements UI - change (mediawiki...Wikibase)

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

Change subject: Improving focusing after add action in statements UI
..


Improving focusing after add action in statements UI

After ending a statement section's add action (e.g. by canceling), the focus 
is
not moved to the general add button anymore but to the section's add button.

Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
---
M lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
2 files changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
index 9e9a555..e8592a8 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
@@ -135,9 +135,6 @@
.on(
prefixed( 'itemadded ' ) + prefixed( 
'itemremoved ' ) + prefixed( 'canceled' ),
function( event, value, $node ) {
-   if ( value === null ) {
-   return;
-   }
if ( $node !== undefined  
$node.parent()[0] !== self.element.parent()[0] ) {
// The event does not belong to 
this add button but rather to an add
// button encapsulated in a 
descendant node.
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 3ef8e39..74c8eab 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -419,7 +419,7 @@
if( dropValue || !self._lmwInstance( $newClaim 
).$mainSnak.data( 'snakview' ).snak() ) {
// if new claim is canceled before saved, or if 
it is invalid, we simply remove
// and forget about it
-   self._trigger( 'canceled', null, [ $newClaim ] 
);
+   self._trigger( 'canceled', null, [ null, 
$newClaim ] );
 
self._lmwInstance( $newClaim ).destroy();
$newClaim.remove();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Empty msgctxt is now exported properly in GettextFFS - change (mediawiki...Translate)

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

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


Change subject: Empty msgctxt is now exported properly in GettextFFS
..

Empty msgctxt is now exported properly in GettextFFS

Bug: 43953
Change-Id: Ie12e3ea6eeca5c1220923a58b26b6016e7990275
---
M ffs/GettextFFS.php
M tests/ffs/GettextFFSTest.php
2 files changed, 72 insertions(+), 1 deletion(-)


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

diff --git a/ffs/GettextFFS.php b/ffs/GettextFFS.php
index 0e341da..68f24ce 100644
--- a/ffs/GettextFFS.php
+++ b/ffs/GettextFFS.php
@@ -468,7 +468,7 @@
$content .= 'msgctxt ' . self::escape( $key ) . \n;
} else {
$ctxt = self::chainGetter( 'ctxt', $pot, $trans, false 
);
-   if ( $ctxt ) {
+   if ( $ctxt !== false ) {
$content .= 'msgctxt ' . self::escape( $ctxt ) 
. \n;
}
}
diff --git a/tests/ffs/GettextFFSTest.php b/tests/ffs/GettextFFSTest.php
index 6622883..fe23168 100644
--- a/tests/ffs/GettextFFSTest.php
+++ b/tests/ffs/GettextFFSTest.php
@@ -13,6 +13,23 @@
  */
 class GettextFFSTest extends MediaWikiTestCase {
 
+   public function setUp() {
+   parent::setUp();
+   $this-groupConfiguration = array(
+   'BASIC' = array(
+   'class' = 'FileBasedMessageGroup',
+   'id' = 'test-id',
+   'label' = 'Test Label',
+   'namespace' = 'NS_MEDIAWIKI',
+   'description' = 'Test description',
+   ),
+   'FILES' = array(
+   'class' = 'GettextFFS',
+   'sourcePattern' = __DIR__ . 
'/../data/gettext.po',
+   ),
+   );
+   }
+
/**
 * @dataProvider provideMangling
 */
@@ -83,4 +100,58 @@
);
}
 
+   public function testMsgctxtExport() {
+   /** @var FileBasedMessageGroup $group */
+   $group = MessageGroupBase::factory( $this-groupConfiguration );
+   $ffs = new GettextFFS( $group );
+
+   $object = new ReflectionObject( $ffs );
+   $method = $object-getMethod( 'formatMessageBlock' );
+   $method-setAccessible( true );
+
+   $key = 'key';
+   $m = new FatMessage( 'key', 'definition' );
+   $m-setTranslation( 'translation' );
+   $trans = array();
+   $pot = array();
+   $pluralCount = 0;
+
+   $results = GETTEXT
+#
+msgid definition
+msgstr translation
+
+#
+msgctxt 
+msgid definition
+msgstr translation
+
+#
+msgctxt context
+msgid definition
+msgstr translation
+GETTEXT;
+
+   $results = preg_split( '/\n\n/', $results );
+
+   // Case 1: no context
+   $this-assertEquals(
+   $results[0],
+   trim( $method-invoke( $ffs, $key, $m, $trans, $pot, 
$pluralCount ) )
+   );
+
+   // Case 2: empty context
+   $pot['ctxt'] = '';
+   $this-assertEquals(
+   $results[1],
+   trim( $method-invoke( $ffs, $key, $m, $trans, $pot, 
$pluralCount ) )
+   );
+
+   // Case 3: context
+   $pot['ctxt'] = 'context';
+   $this-assertEquals(
+   $results[2],
+   trim(  $method-invoke( $ffs, $key, $m, $trans, $pot, 
$pluralCount ) )
+   );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie12e3ea6eeca5c1220923a58b26b6016e7990275
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] Proper enter key handling for entity selector's more link - change (mediawiki...Wikibase)

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

Change subject: Proper enter key handling for entity selector's more link
..


Proper enter key handling for entity selector's more link

Implemented proper enter key handling for suggester widget's custom items. 
Additionally,
event propagation is prevented for the entity selector's more link since it 
would cause
unrelated action. Furthermore, no string auto-completion is performed when 
fetching more
results since the replace operation would trigger another API call.
Setting proper focus will be done in another change set.

- patch set 2: rebase
- patch set 3: using correct offset
- patch set 4: updated documentation

Change-Id: I3e7f3929c7cdf4c698553ea90f8be14e2117
---
M lib/resources/jquery.ui/jquery.ui.suggester.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
2 files changed, 31 insertions(+), 10 deletions(-)

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



diff --git a/lib/resources/jquery.ui/jquery.ui.suggester.js 
b/lib/resources/jquery.ui/jquery.ui.suggester.js
index 1618ac3..f85ad69 100644
--- a/lib/resources/jquery.ui/jquery.ui.suggester.js
+++ b/lib/resources/jquery.ui/jquery.ui.suggester.js
@@ -54,7 +54,7 @@
  * Example:
  *   {
  * content: 'custom item label',
- * action: function( suggestger ) {
+ * action: function( event, suggester ) {
  *   console.log( suggester.element.val() );
  *   suggester.close();
  * }
@@ -64,7 +64,8 @@
  * For custom styling, the css class 'ui-suggester-custom' is assigned 
to the li/ node.
  * @option customListItem.action {Function} The action to perform when 
selecting the additional
  * list item.
- * Parameters: (1) Reference to the entity selector widget
+ * Parameters: (1) {jQuery.Event} Event that has triggered the custom 
action
+ * (2) {$.ui.suggester} Reference to the suggester widget
  * @option customListItem.cssClass {String} (optional) Additional css 
class(es) to assign to the custom
  * item's li/ node.
  *
@@ -152,6 +153,18 @@
}
} )
.on( 'keydown.' + this.widgetName, function( event ) {
+   if ( event.keyCode === $.ui.keyCode.ENTER ) {
+   if ( self.menu.active ) {
+   var item = 
self.menu.active.data( 'item.autocomplete' );
+   if ( item.isCustom  
item.customAction ) {
+   // Custom actions are 
supposed to be suggester-specific. If, for some
+   // reason, they should 
interact with external components, the action(s)
+   // may trigger custom 
events.
+   item.customAction( 
event, self );
+   return;
+   }
+   }
+   }
self._lastKeyDown = event.keyCode;
} );
 
@@ -164,7 +177,7 @@
if ( !item.isCustom ) {
fnNativeMenuSelected( event, ui );
} else if ( $.isFunction( item.customAction ) ) 
{
-   item.customAction( self );
+   item.customAction( event, self );
}
} );
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index bf12508..5605044 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -335,7 +335,8 @@
// check if response has all information
if ( response.success !== undefined ) {
var suggest = this._response(),
-   searchTerm = response.searchinfo.search;
+   searchTerm = response.searchinfo.search,
+   initialOffset = this.offset;
 
if ( searchTerm === this.element.val() ) {
// clear cached results
@@ -359,9 +360,15 @@
 
this._updateValue();
 
-   // auto-complete input box text 
(because of the API call lag, this is
-  

[MediaWiki-commits] [Gerrit] Empty msgctxt is now exported properly in GettextFFS - change (mediawiki...Translate)

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

Change subject: Empty msgctxt is now exported properly in GettextFFS
..


Empty msgctxt is now exported properly in GettextFFS

Bug: 43953
Change-Id: Ie12e3ea6eeca5c1220923a58b26b6016e7990275
---
M ffs/GettextFFS.php
M tests/ffs/GettextFFSTest.php
2 files changed, 72 insertions(+), 1 deletion(-)

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



diff --git a/ffs/GettextFFS.php b/ffs/GettextFFS.php
index 0e341da..68f24ce 100644
--- a/ffs/GettextFFS.php
+++ b/ffs/GettextFFS.php
@@ -468,7 +468,7 @@
$content .= 'msgctxt ' . self::escape( $key ) . \n;
} else {
$ctxt = self::chainGetter( 'ctxt', $pot, $trans, false 
);
-   if ( $ctxt ) {
+   if ( $ctxt !== false ) {
$content .= 'msgctxt ' . self::escape( $ctxt ) 
. \n;
}
}
diff --git a/tests/ffs/GettextFFSTest.php b/tests/ffs/GettextFFSTest.php
index 6622883..fe23168 100644
--- a/tests/ffs/GettextFFSTest.php
+++ b/tests/ffs/GettextFFSTest.php
@@ -13,6 +13,23 @@
  */
 class GettextFFSTest extends MediaWikiTestCase {
 
+   public function setUp() {
+   parent::setUp();
+   $this-groupConfiguration = array(
+   'BASIC' = array(
+   'class' = 'FileBasedMessageGroup',
+   'id' = 'test-id',
+   'label' = 'Test Label',
+   'namespace' = 'NS_MEDIAWIKI',
+   'description' = 'Test description',
+   ),
+   'FILES' = array(
+   'class' = 'GettextFFS',
+   'sourcePattern' = __DIR__ . 
'/../data/gettext.po',
+   ),
+   );
+   }
+
/**
 * @dataProvider provideMangling
 */
@@ -83,4 +100,58 @@
);
}
 
+   public function testMsgctxtExport() {
+   /** @var FileBasedMessageGroup $group */
+   $group = MessageGroupBase::factory( $this-groupConfiguration );
+   $ffs = new GettextFFS( $group );
+
+   $object = new ReflectionObject( $ffs );
+   $method = $object-getMethod( 'formatMessageBlock' );
+   $method-setAccessible( true );
+
+   $key = 'key';
+   $m = new FatMessage( 'key', 'definition' );
+   $m-setTranslation( 'translation' );
+   $trans = array();
+   $pot = array();
+   $pluralCount = 0;
+
+   $results = GETTEXT
+#
+msgid definition
+msgstr translation
+
+#
+msgctxt 
+msgid definition
+msgstr translation
+
+#
+msgctxt context
+msgid definition
+msgstr translation
+GETTEXT;
+
+   $results = preg_split( '/\n\n/', $results );
+
+   // Case 1: no context
+   $this-assertEquals(
+   $results[0],
+   trim( $method-invoke( $ffs, $key, $m, $trans, $pot, 
$pluralCount ) )
+   );
+
+   // Case 2: empty context
+   $pot['ctxt'] = '';
+   $this-assertEquals(
+   $results[1],
+   trim( $method-invoke( $ffs, $key, $m, $trans, $pot, 
$pluralCount ) )
+   );
+
+   // Case 3: context
+   $pot['ctxt'] = 'context';
+   $this-assertEquals(
+   $results[2],
+   trim(  $method-invoke( $ffs, $key, $m, $trans, $pot, 
$pluralCount ) )
+   );
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie12e3ea6eeca5c1220923a58b26b6016e7990275
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Bump version - change (mediawiki...Translate)

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

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


Change subject: Bump version
..

Bump version

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


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

diff --git a/Translate.php b/Translate.php
index 72fc479..fbeab26 100644
--- a/Translate.php
+++ b/Translate.php
@@ -17,7 +17,7 @@
 /**
  * Version number used in extension credits and in other places where needed.
  */
-define( 'TRANSLATE_VERSION', '2013-01-15' );
+define( 'TRANSLATE_VERSION', '2013-03-07' );
 
 /**
  * Extension credits properties.

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

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

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


[MediaWiki-commits] [Gerrit] Configure for development - change (mediawiki/vagrant)

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

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


Change subject: Configure for development
..

Configure for development

- Verbose debug output
- Profiling based on URL params (forceprofile/forcetrace)
- localsettings = LocalSettings.php
- memcached port back to 11211
- mediawiki-debug.log log file

Change-Id: Ide918954bc469249b50f7d06a0529fd5cfe05307
---
A mediawiki-debug.log
M modules/mediawiki/manifests/init.pp
A modules/mediawiki/templates/LocalSettings.php
D modules/mediawiki/templates/localsettings
M modules/memcached/manifests/init.pp
5 files changed, 53 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/15/52615/1

diff --git a/mediawiki-debug.log b/mediawiki-debug.log
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/mediawiki-debug.log
diff --git a/modules/mediawiki/manifests/init.pp 
b/modules/mediawiki/manifests/init.pp
index 7813ffc..6ac2b91 100644
--- a/modules/mediawiki/manifests/init.pp
+++ b/modules/mediawiki/manifests/init.pp
@@ -53,7 +53,7 @@
 
file { /srv/mediawiki/LocalSettings.php:
require = Exec[mediawiki_setup],
-   content = template(mediawiki/localsettings),
+   content = template(mediawiki/LocalSettings.php),
ensure = present;
}
 
diff --git a/modules/mediawiki/templates/LocalSettings.php 
b/modules/mediawiki/templates/LocalSettings.php
new file mode 100644
index 000..f8c1774
--- /dev/null
+++ b/modules/mediawiki/templates/LocalSettings.php
@@ -0,0 +1,51 @@
+?php
+#
+### THIS FILE IS MANAGED BY PUPPET
+###
+###  Changes to this file will be clobbered by Puppet.
+###  If you need to hand-edit local settings, modify
+###  LocalSettings.php in the Vagrant project root.
+###
+#
+
+// Enable error reporting
+error_reporting( -1 );
+ini_set( 'display_errors', 1 );
+
+// Expose debug info for PHP errors.
+$wgDebugToolbar = true;
+$wgShowDebug = true;
+$wgShowExceptionDetails = true;
+$wgDebugLogFile = '/srv/mediawiki-debug.log';
+
+// Expose debug info for SQL errors.
+$wgDebugDumpSql  = true;
+$wgShowDBErrorBacktrace = true;
+$wgShowSQLErrors = true;
+
+// Profiling
+$wgDebugProfiling = false;
+
+require( __DIR__ . '/../LocalSettings.php' );
+
+$wgArticlePath = /wiki/$1;
+$wgLogo = '/srv/vagrant-wmf-logo.png';
+
+$wgGroupPermissions['*']['createpage'] = false;
+
+// Caching
+$wgMainCacheType = CACHE_MEMCACHED;
+$wgMemCachedServers = array( '127.0.0.1:11211' );
+
+$wgEnableJavaScriptTest = true;
+
+$wgProfilerParams = array(
+   'forceprofile' = 'ProfilerSimpleText',
+   'forcetrace' = 'ProfilerSimpleTrace'
+);
+
+foreach( $wgProfilerParams as $param = $cls ) {
+   if ( array_key_exists( $param, $_REQUEST ) ) {
+   $wgProfiler['class'] = $cls;
+   }
+}
diff --git a/modules/mediawiki/templates/localsettings 
b/modules/mediawiki/templates/localsettings
deleted file mode 100644
index 5987d4f..000
--- a/modules/mediawiki/templates/localsettings
+++ /dev/null
@@ -1,22 +0,0 @@
-?php
-#
-### THIS FILE IS MANAGED BY PUPPET
-###
-###  Changes to this file will be clobbered by Puppet.
-###  If you need to hand-edit local settings, modify
-###  LocalSettings.php in the Vagrant project root.
-###
-#
-
-require( __DIR__ . '/../LocalSettings.php' );
-
-$wgArticlePath = /wiki/$1;
-$wgLogo = '/srv/vagrant-wmf-logo.png';
-
-$wgGroupPermissions['*']['createpage'] = false;
-
-# Memcached
-$wgMainCacheType = CACHE_MEMCACHED;
-$wgMemCachedServers = array( 127.0.0.1:11000 );
-
-$wgEnableJavaScriptTest = true;
diff --git a/modules/memcached/manifests/init.pp 
b/modules/memcached/manifests/init.pp
index 0176066..83bac78 100644
--- a/modules/memcached/manifests/init.pp
+++ b/modules/memcached/manifests/init.pp
@@ -1,7 +1,7 @@
 class memcached {
 
$memcached_size = 200 # Mb
-   $memcached_port = 11000
+   $memcached_port = 11211
$memcached_ip = 0.0.0.0
 
package { [memcached, libmemcached6]:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide918954bc469249b50f7d06a0529fd5cfe05307
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] [bug 45770] Update used parameters in statesToRun and resolu... - change (operations/puppet)

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

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


Change subject: [bug 45770] Update used parameters in statesToRun and 
resolutionsToRun arrays
..

[bug 45770] Update used parameters in statesToRun and resolutionsToRun arrays

Change-Id: I75a6eca1ffe154475e68b0712527635c15383656
---
M templates/misc/bugzilla_report.php
1 file changed, 7 insertions(+), 6 deletions(-)


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

diff --git a/templates/misc/bugzilla_report.php 
b/templates/misc/bugzilla_report.php
index 6f9ea0f..919885f 100755
--- a/templates/misc/bugzilla_report.php
+++ b/templates/misc/bugzilla_report.php
@@ -184,15 +184,16 @@
  'getBugsPerProduct',
  'getBugsResolvedPerUser',);
 
-$statesToRun = array('NEW',
+$statesToRun = array('UNCONFIRMED',
+ 'NEW',
  'ASSIGNED',
  'REOPENED',
- 'RESOLVED',);
+ 'RESOLVED',
+ 'VERIFIED',);
 
-$resolutionsToRun = array('FIXED',  'REMIND',
-  'INVALID','DUPLICATE',
-  'WONTFIX','WORKSFORME',
-  'LATER',  'MOVED',);
+$resolutionsToRun = array('FIXED',  'DUPLICATE',
+  'INVALID','WORKSFORME',
+  'WONTFIX',);
 
 $totalStatistics = array ('getTotalOpenBugs',);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75a6eca1ffe154475e68b0712527635c15383656
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Aklapper aklap...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] getBools doesn't exist in Translate anymore - change (mediawiki/core)

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

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


Change subject: getBools doesn't exist in Translate anymore
..

getBools doesn't exist in Translate anymore

Change-Id: Id22e87dee426fbbb685f61c2dddff9d14baa521b
---
M maintenance/language/languages.inc
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/maintenance/language/languages.inc 
b/maintenance/language/languages.inc
index 420e842..dcd9b9b 100644
--- a/maintenance/language/languages.inc
+++ b/maintenance/language/languages.inc
@@ -739,9 +739,8 @@
function __construct( MessageGroup $group ) {
$this-mMessageGroup = $group;
 
-   $bools = $this-mMessageGroup-getBools();
-   $this-mIgnoredMessages = $bools['ignored'];
-   $this-mOptionalMessages = $bools['optional'];
+   $this-mIgnoredMessages = $this-mMessageGroup-getIgnored();
+   $this-mOptionalMessages = $this-mMessageGroup-getOptional();
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id22e87dee426fbbb685f61c2dddff9d14baa521b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] (Bug 45607) Add a callback for the hook for reordering of sp... - change (mediawiki...Wikibase)

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

Change subject: (Bug 45607) Add a callback for the hook for reordering of 
special pages
..


(Bug 45607) Add a callback for the hook for reordering of special pages

This callback is for the hook in https://gerrit.wikimedia.org/r/#/c/51827/

Change-Id: Iab2536c894c350f77e1619315fd8f55a7a1db5ac
---
M repo/Wikibase.hooks.php
M repo/Wikibase.php
2 files changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 8040b26..6b02b1a 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -590,6 +590,21 @@
}
 
/**
+* Reorder the groups for the special pages
+*
+* @since 0.4
+*
+* @param array $groups
+* @param bool $moveOther
+*
+* @return boolean
+*/
+   public static function onSpecialPage_reorderPages( $groups, 
$moveOther ) {
+   $groups = array_merge( array( 'wikibaserepo' = null ), $groups 
);
+   return true;
+   }
+
+   /**
 * Deletes all the data stored on the repository.
 * @see https://www.mediawiki.org/wiki/Manual:Hooks/WikibaseDeleteData
 *
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 56187af..eec22ef 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -252,6 +252,7 @@
 $wgSpecialPageGroups['SetLabel']   = 
'wikibaserepo';
 
 
+
 // Hooks
 $wgHooks['BeforePageDisplay'][]
= 'Wikibase\RepoHooks::onBeforePageDisplay';
 $wgHooks['WikibaseDefaultSettings'][]  = 
'Wikibase\RepoHooks::onWikibaseDefaultSettings';
@@ -277,6 +278,7 @@
 $wgHooks['ShowSearchHit'][]= 
'Wikibase\RepoHooks::onShowSearchHit';
 $wgHooks['TitleGetRestrictionTypes'][] = 
'Wikibase\RepoHooks::onTitleGetRestrictionTypes';
 $wgHooks['AbuseFilter-contentToString'][]  = 
'Wikibase\RepoHooks::onAbuseFilterContentToString';
+$wgHooks['SpecialPage_reorderPages'][] = 
'Wikibase\RepoHooks::onSpecialPage_reorderPages';
 
 // Resource Loader Modules:
 $wgResourceModules = array_merge( $wgResourceModules, include( 
$dir/resources/Resources.php ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab2536c894c350f77e1619315fd8f55a7a1db5ac
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad john.b...@wikimedia.de
Gerrit-Reviewer: Anja Jentzsch anja.jentz...@wikimedia.de
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Tweak updating scripts - change (translatewiki)

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

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


Change subject: Tweak updating scripts
..

Tweak updating scripts

Change-Id: I2ef58d6d7ad2ad1be40ab60a53fae62ac5e897c2
---
M bin/twn-update-all
M bin/wikiupdate
2 files changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/bin/twn-update-all b/bin/twn-update-all
index 9a522da..951a92b 100755
--- a/bin/twn-update-all
+++ b/bin/twn-update-all
@@ -7,6 +7,7 @@
 REV=`git log --pretty='%h %ci (%cr)' -n 1`
 udpcast updating $WIKINAME from $REV...
 
+echo *** Updating config ***
 cd /home/betawiki/config
 sudo -u betawiki git pull
 
diff --git a/bin/wikiupdate b/bin/wikiupdate
index 74e7f1b..27b7baf 100755
--- a/bin/wikiupdate
+++ b/bin/wikiupdate
@@ -5,8 +5,7 @@
 cd $WIKI
 
 echo *** Updating core ***
-git fetch --all
-git pull origin master
+git pull --rebase origin master
 
 cd extensions
 
@@ -17,7 +16,7 @@
cd $dir
if [ -d .git ]; then
echo -n $dir.. ;
-   git pull |grep -v Already 
+   git pull --rebase |grep -v Already 
let count+=1; [[ $((count%10)) -eq 0 ]]  wait
fi
cd ..
@@ -30,4 +29,3 @@
 
 wait
 echo *** All done ***
-echo Consider running git commit -a to commit local changes

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ef58d6d7ad2ad1be40ab60a53fae62ac5e897c2
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
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] Bump version - change (mediawiki...Translate)

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

Change subject: Bump version
..


Bump version

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

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



diff --git a/Translate.php b/Translate.php
index 72fc479..fbeab26 100644
--- a/Translate.php
+++ b/Translate.php
@@ -17,7 +17,7 @@
 /**
  * Version number used in extension credits and in other places where needed.
  */
-define( 'TRANSLATE_VERSION', '2013-01-15' );
+define( 'TRANSLATE_VERSION', '2013-03-07' );
 
 /**
  * Extension credits properties.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I39b1c25ff39f89563dfa28d469b4c4af679dd44c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Entity selector: Option to emulate search box behavior - change (mediawiki...Wikibase)

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

Change subject: Entity selector: Option to emulate search box behavior
..


Entity selector: Option to emulate search box behavior

This change set adds a option named emulateSearch to the entity selector. 
Setting
this option to true links the entity selector's suggestions to the actual 
entity
pages. Another change set will enable entering random text in the input box.

- patch set 2: added documentation

Change-Id: If17dd8bd50af5fce096c07f3232eb5612c76167d
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
M repo/resources/wikibase.ui.entitysearch.js
2 files changed, 40 insertions(+), 8 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index 5605044..b2b8739 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -51,6 +51,11 @@
  * @option messages['more'] {String} (optional) Label of the link to display 
more suggestions.
  * Default value: 'more'
  *
+ * @option emulateSearch {boolean} (optional) Allows emulating the behaviour 
of a search box by
+ * linking the entities to their corresponding pages. Instead of 
selecting an entity, the
+ * whole page will be redirected to the entity page.
+ * Default value: false
+ *
  * @event response Triggered after an API request has been received 
successfully.
  *Parameters: (1) {jQuery.Event}
  *(2) {Array} Entity data
@@ -63,7 +68,7 @@
  * @dependency jquery.ui.suggester
  * @dependency jquery.ui.resizable
  */
-( function( $, undefined ) {
+( function( $ ) {
'use strict';
 
/**
@@ -111,7 +116,8 @@
messages: {
'aliases-label': mwMsgOrString( 
'wikibase-aliases-label', 'also known as:' ),
'more': mwMsgOrString( 
'wikibase-entityselector-more', 'more' )
-   }
+   },
+   emulateSearch: false // TODO: Allow setting a custom 
target to trigger the redirect on
},
 
/**
@@ -186,6 +192,16 @@
// when pressing enter, check if the current 
input matches any of the suggested item
// and select it
if ( event.keyCode === $.ui.keyCode.ENTER ) {
+
+   if ( self.options.emulateSearch  
self.selectedEntity() ) {
+   // Prevent submitting search 
form since we want to redirect directly to the
+   // entity.
+   
event.stopImmediatePropagation();
+   event.preventDefault();
+   window.location.href = 
self.selectedEntity().url;
+   return;
+   }
+
if ( self.validateInput() ) {
self.menu.select( $.Event( 
'programmatic' ) );
}
@@ -210,10 +226,15 @@
// value but blur event will not trigger a redundant 
selected event since the entity
// is set already.
this.menu.element.on( 'mousedown.' + this.widgetName, 
function( event ) {
-   if ( $( event.target ).closest( '.ui-menu-item' 
).length ) {
+   if ( $( event.target ).closest( 
'.ui-menu-item:not( .ui-suggester-custom )' ).length ) {
var item =
$( event.target ).closest( 
'.ui-menu-item' ).data( 'item.autocomplete' );
self._setEntity( item );
+
+   if ( self.options.emulateSearch ) {
+   window.location.href = item.url;
+   }
+
}
} );
 
@@ -452,10 +473,15 @@
this.menu.element.show();
}
} else {
-   this._hiddenInput( '' );
this._setEntity( null );
+   if ( this.options.emulateSearch ) {
+   this._hiddenInput( 

[MediaWiki-commits] [Gerrit] (bug 42635) Some GettextFFS messages were not unfuzzied on i... - change (mediawiki...Translate)

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

Change subject: (bug 42635) Some GettextFFS messages were not unfuzzied on 
import
..


(bug 42635) Some GettextFFS messages were not unfuzzied on import

Namely those, where only change was removal of fuzzy flag.

Bug: 42635
Change-Id: Ic07c5e8056d10a6cd23201d6ddc2bbb580b0d97d
---
M ffs/FFS.php
M ffs/GettextFFS.php
M ffs/IniFFS.php
M ffs/JavaFFS.php
M ffs/MediaWikiExtensionFFS.php
M scripts/processMessageChanges.php
6 files changed, 66 insertions(+), 16 deletions(-)

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



diff --git a/ffs/FFS.php b/ffs/FFS.php
index d2a1dff..c8314f5 100644
--- a/ffs/FFS.php
+++ b/ffs/FFS.php
@@ -64,6 +64,16 @@
 * @return \string
 */
public function writeIntoVariable( MessageCollection $collection );
+
+   /**
+* Query the capabilities of this FFS. Allowed values are:
+*  - yes
+*  - write (ignored on read)
+*  - no (stripped on write)
+* @return string
+* @since 2013-03-05
+*/
+   public function supportsFuzzy();
 }
 
 /**
@@ -392,4 +402,8 @@
 
return $data;
}
+
+   public function supportsFuzzy() {
+   return 'no';
+   }
 }
diff --git a/ffs/GettextFFS.php b/ffs/GettextFFS.php
index f865fc1..83dcdcd 100644
--- a/ffs/GettextFFS.php
+++ b/ffs/GettextFFS.php
@@ -630,4 +630,9 @@
 
return $splitPlurals;
}
+
+   public function supportsFuzzy() {
+   return 'yes';
+   }
+
 }
diff --git a/ffs/IniFFS.php b/ffs/IniFFS.php
index b8f5e45..56438d1 100644
--- a/ffs/IniFFS.php
+++ b/ffs/IniFFS.php
@@ -102,4 +102,8 @@
$header .= '[' . $collection-getLanguage() . ]\n;
return $header . $output;
}
+
+   public function supportsFuzzy() {
+   return 'write';
+   }
 }
diff --git a/ffs/JavaFFS.php b/ffs/JavaFFS.php
index f3e6dda..f291a28 100644
--- a/ffs/JavaFFS.php
+++ b/ffs/JavaFFS.php
@@ -239,4 +239,8 @@
 
return $output;
}
+
+   public function supportsFuzzy() {
+   return 'write';
+   }
 }
diff --git a/ffs/MediaWikiExtensionFFS.php b/ffs/MediaWikiExtensionFFS.php
index 3517026..b5ccb62 100644
--- a/ffs/MediaWikiExtensionFFS.php
+++ b/ffs/MediaWikiExtensionFFS.php
@@ -263,4 +263,8 @@
return $quote . $value . $quote;
}
 
+   public function supportsFuzzy() {
+   return 'write';
+   }
+
 }
diff --git a/scripts/processMessageChanges.php 
b/scripts/processMessageChanges.php
index bd857a1..2a68186 100644
--- a/scripts/processMessageChanges.php
+++ b/scripts/processMessageChanges.php
@@ -158,7 +158,7 @@
$path = $group-getSourceFilePath( $code );
$this-error( Source message file for 
{$group-getId()} does not exist. Looking for $path, 1 );
}
-   $file = $group-getFFS()-read( $code );
+   $file = $ffs-read( $code );
if ( !isset( $file['MESSAGES'] ) ) {
error_log( {$group-getId()} has an FFS - the FFS 
didn't return cake for $code );
}
@@ -166,22 +166,43 @@
 
$common = array_intersect( $fileKeys, $wikiKeys );
 
+   $supportsFuzzy = $ffs-supportsFuzzy();
+
foreach ( $common as $key ) {
$sourceContent = $file['MESSAGES'][$key];
$wikiContent = $wiki[$key]-translation();
 
-   if ( !self::compareContent( $sourceContent, 
$wikiContent ) ) {
-   if ( $reason !== MessageGroupCache::NO_CACHE ) {
-   $cacheContent = $cache-get( $key );
-   if ( self::compareContent( 
$sourceContent, $cacheContent ) ) {
-   /* This message has only 
changed in the wiki, which means
-* we can ignore the difference 
and have it exported on
-* next export. */
-   continue;
-   }
-   }
-   $this-addChange( 'change', $group, $code, 
$key, $sourceContent );
+   // If FFS doesn't support it, ignore fuzziness as 
difference
+   $wikiContent = str_replace( TRANSLATE_FUZZY, '', 
$wikiContent );
+   // But if it does, ensure we have exactly one fuzzy 
marker prefixed
+   if ( $supportsFuzzy === 'yes'  $wiki[$key]-hasTag( 
'fuzzy' ) ) {
+   $wikiContent = TRANSLATE_FUZZY . $wikiContent;
}
+
+   if ( 

[MediaWiki-commits] [Gerrit] Entity search: Allow random text input in entity selector - change (mediawiki...Wikibase)

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

Change subject: Entity search: Allow random text input in entity selector
..


Entity search: Allow random text input in entity selector

With this change set, the text typed into the entity selector search box will
not get lost when triggering a full-text search (when entering text that does
not match an entity).

Change-Id: Ie27da6cf8f7f2294a228f6357dc85e2fdafa5c23
---
M repo/resources/wikibase.ui.entitysearch.js
1 file changed, 35 insertions(+), 1 deletion(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved
  Anja Jentzsch: Verified; Looks good to me, but someone else must approve



diff --git a/repo/resources/wikibase.ui.entitysearch.js 
b/repo/resources/wikibase.ui.entitysearch.js
index ca56e69..2858e0d 100644
--- a/repo/resources/wikibase.ui.entitysearch.js
+++ b/repo/resources/wikibase.ui.entitysearch.js
@@ -12,6 +12,8 @@
'use strict';
 
$( document ).ready( function() {
+   var $form = $( '#searchform ' ),
+   $input = $( '#searchInput' );
 
/**
 * Removes the native search box suggestion list.
@@ -24,7 +26,7 @@
$.removeData( input, 'suggestionsContext' );
}
 
-   $( '#searchInput' )
+   $input
.one( 'focus', function( event ) {
if ( $.data( this, 'suggestionsContext' ) ) {
removeSuggestionContext( this );
@@ -46,6 +48,38 @@
emulateSearch: true
} );
 
+   // TODO: Re-evaluate entity selector input (e.g. hitting Go 
after having hit Search
+   // before. However, this will require triggering the entity 
selector's API call and waiting
+   // for its response.
+
+   $( '#searchGoButton' ).on( 'click keydown', function( event ) {
+   if ( !$input.data( 'entityselector' ) ) {
+   return;
+   }
+
+   // If an entity is selected, redirect to that entity's 
page.
+   if (
+   event.type === 'click'
+   || event.keyCode === $.ui.keyCode.ENTER || 
event.keyCode === $.ui.keyCode.SPACE
+   ) {
+   var entity = $input.data( 'entityselector' 
).selectedEntity();
+   if ( entity  entity.url ){
+   event.preventDefault(); // Prevent 
default form sumit action.
+   window.location.href = entity.url;
+   }
+   }
+
+   } );
+
+   // Default form submit action: Imitate full-text search.
+   // Since we are using the entity selector, if an entity is 
selected, the entity id is stored
+   // in a hidden input element (which has ripped the name 
attribute from the original search
+   // box). Therefore, the entity id needs to be replaced by the 
actual search box (entity
+   // selector) content.
+   $form.on( 'submit', function( event ) {
+   $( this ).find( 'input[name=search]' ).val( 
$input.val() );
+   } );
+
} );
 
 }( jQuery, mediaWiki ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie27da6cf8f7f2294a228f6357dc85e2fdafa5c23
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Anja Jentzsch anja.jentz...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Do not show export tab if exports are disabled - change (mediawiki...Translate)

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

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


Change subject: Do not show export tab if exports are disabled
..

Do not show export tab if exports are disabled

Bug: 40923
Change-Id: I45bacb384632be651331c738b9e83cc9c1383661
---
M specials/SpecialTranslate.php
1 file changed, 17 insertions(+), 5 deletions(-)


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

diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index 84d353c..e19f2d1 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -819,11 +819,23 @@
'href' = $messagegroupstats-getLocalUrl( $params ),
'class' = $alias === 'MessageGroupStats' ? 'selected' 
: '',
);
-   $tabs['views']['export'] = array(
-   'text' = wfMessage( 'translate-taction-export' 
)-text(),
-   'href' = $translate-getLocalUrl( array( 'taction' = 
'export' ) + $params ),
-   'class' = $alias === 'Translate'  $taction === 
'export' ? 'selected' : '',
-   );
+
+   // Kind of hackish, but works for now
+   global $wgTranslateTasks;
+   foreach ( array_keys( $wgTranslateTasks ) as $taskname ) {
+   if ( !preg_match( '/^export-/', $taskname ) ) {
+   continue;
+   }
+
+   $tabs['views']['export'] = array(
+   'text' = wfMessage( 'translate-taction-export' 
)-text(),
+   'href' = $translate-getLocalUrl( array( 
'taction' = 'export' ) + $params ),
+   'class' = $alias === 'Translate'  $taction 
=== 'export' ? 'selected' : '',
+   );
+
+   // We only need the tab to apper once ;)
+   break;
+   }
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45bacb384632be651331c738b9e83cc9c1383661
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] (bug 44674) Full-text search section for entity search - change (mediawiki...Wikibase)

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

Change subject: (bug 44674) Full-text search section for entity search
..


(bug 44674) Full-text search section for entity search

Change set depends on change Ia67b5aea6886bba460dff7535e2306234201624c in the
DataValues extension.
The entity selector replacing the native search box now will display an 
additional
section in the list of suggestions that allows triggering a full-text search.
For the moment, still, the list of suggestions will close when there are no
suggestions. This will be addressed in another commit since that behavior 
depends
on another change set.

Change-Id: I2d9c8554f3e531977997ebc8120621b79730a130
---
M lib/resources/jquery.ui/jquery.ui.suggester.js
M repo/resources/Resources.php
A repo/resources/themes/default/wikibase.ui.entitysearch.css
M repo/resources/wikibase.ui.entitysearch.js
4 files changed, 67 insertions(+), 2 deletions(-)

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



diff --git a/lib/resources/jquery.ui/jquery.ui.suggester.js 
b/lib/resources/jquery.ui/jquery.ui.suggester.js
index f85ad69..9a59bc1 100644
--- a/lib/resources/jquery.ui/jquery.ui.suggester.js
+++ b/lib/resources/jquery.ui/jquery.ui.suggester.js
@@ -374,7 +374,13 @@
throw new Error( 'suggester: Custom list item 
is invalid.' );
}
 
-   return $li.appendTo( this.menu.element );
+   if ( this.menu.element.children( '.ui-suggester-custom' 
).length  0 ) {
+   // TODO: This is entity selector more button 
specific. There should be a method
+   // to specify a position where to add the 
custom list item.
+   return this.menu.element.children( 
'.ui-suggester-custom' ).first().before( $li );
+   } else {
+   return $li.appendTo( this.menu.element );
+   }
},
 
/**
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index de12726..0f8ee8b 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -66,9 +66,16 @@
'scripts' = array(
'wikibase.ui.entitysearch.js',
),
+   'styles' = array(
+   'themes/default/wikibase.ui.entitysearch.css',
+   ),
'dependencies' = array(
+   'jquery.eachchange',
'jquery.wikibase.entityselector',
),
+   'messages' = array(
+   'searchsuggest-containing',
+   )
),
 
/* Wikibase special pages */
diff --git a/repo/resources/themes/default/wikibase.ui.entitysearch.css 
b/repo/resources/themes/default/wikibase.ui.entitysearch.css
new file mode 100644
index 000..3a52256
--- /dev/null
+++ b/repo/resources/themes/default/wikibase.ui.entitysearch.css
@@ -0,0 +1,26 @@
+/**
+ * Styles for the entity selector search box replacement.
+ *
+ * @since 0.4
+ * @file
+ * @ingroup WikibaseRepo
+ *
+ * @license GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ */
+
+.ui-entityselector-list .wb-entitysearch-suggestions {
+   border-top: 1px solid #C9C9C9;
+}
+
+.ui-entityselector-list .wb-entitysearch-suggestions .suggestions-special {
+   display: block;
+   border: none;
+   background-color: transparent;
+   margin: 0;
+   padding: 0;
+}
+
+.ui-entityselector-list .wb-entitysearch-suggestions .ui-state-hover div {
+   color: #FF;
+}
diff --git a/repo/resources/wikibase.ui.entitysearch.js 
b/repo/resources/wikibase.ui.entitysearch.js
index 2858e0d..6ffb426 100644
--- a/repo/resources/wikibase.ui.entitysearch.js
+++ b/repo/resources/wikibase.ui.entitysearch.js
@@ -16,6 +16,14 @@
$input = $( '#searchInput' );
 
/**
+* Updates the suggestion list special item that triggers a 
full-text search.
+*/
+   function updateSuggestionSpecial() {
+   var $suggestionsSpecial = $( 
'.wb-entitysearch-suggestions .suggestions-special' );
+   $suggestionsSpecial.find( '.special-query' ).text( 
$input.val() );
+   }
+
+   /**
 * Removes the native search box suggestion list.
 *
 * @param {Object} input Search box node
@@ -45,7 +53,25 @@
.entityselector( {
url: mw.config.get( 'wgServer' ) + mw.config.get( 
'wgScriptPath' ) + '/api.php',
language: mw.config.get( 'wgUserLanguage' ),
-   

[MediaWiki-commits] [Gerrit] (bug 45198) Do not hide entity selector's list of suggestion - change (mediawiki...Wikibase)

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

Change subject: (bug 45198) Do not hide entity selector's list of suggestion
..


(bug 45198) Do not hide entity selector's list of suggestion

The change set prevents the entity selector's list of suggestions from hiding
when an exact, unique label is typed into the input box.

Change-Id: I4e573d0578d3e153a842a20b4196fb7ed2b3b0f9
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index b2b8739..55cfd66 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -341,6 +341,18 @@
},
 
/**
+* @see ui.suggester.close
+*/
+   close: function( event ) {
+   if ( !event || !event.originalEvent || 
event.originalEvent.type !== 'programmatic' ) {
+   // Do not close the list of suggestions when 
programmatically selecting an entity
+   // (e.g by typing an exact, unique entity 
label), allowing the user to check that
+   // the typed string actually matches a single 
entity.
+   $.ui.suggester.prototype.close.apply( this, 
event );
+   }
+   },
+
+   /**
 * Triggers searching for more results with the current search 
term.
 */
more: function() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e573d0578d3e153a842a20b4196fb7ed2b3b0f9
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Don't leak zvals when a timeout is hit - change (mediawiki...luasandbox)

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

Change subject: Don't leak zvals when a timeout is hit
..


Don't leak zvals when a timeout is hit

The unit tests for I1188123 hit this bug. On timeout, execution returns
to PHP with the timed_out flag set. Then when the LuaSandbox object is
destroyed, lua_close() is called, which calls
luasandbox_free_zval_userdata() for each zval stored in the state. This
in turn calls luasandbox_enter_php(), which causes a call to lua_error()
if the timed_out flag is set, aborting the __gc metamethod without
freeing the reference.

The fix ignores the timed_out flag during userdata destruction.

Change-Id: I30b98cc8577b31f2b51d611bf195493e19971ad8
---
M data_conversion.c
M php_luasandbox.h
2 files changed, 14 insertions(+), 1 deletion(-)

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



diff --git a/data_conversion.c b/data_conversion.c
index b151473..85f62df 100644
--- a/data_conversion.c
+++ b/data_conversion.c
@@ -113,7 +113,10 @@
 {
zval ** zpp = (zval**)lua_touserdata(L, 1);
php_luasandbox_obj * intern = luasandbox_get_php_obj(L);
-   luasandbox_enter_php(L, intern);
+
+   // Don't abort if the request has timed out, we need to be able to 
clean up
+   luasandbox_enter_php_ignore_timeouts(L, intern);
+
if (zpp  *zpp) {
zval_ptr_dtor(zpp);
}
diff --git a/php_luasandbox.h b/php_luasandbox.h
index 0af7c25..d31ac01 100644
--- a/php_luasandbox.h
+++ b/php_luasandbox.h
@@ -88,6 +88,16 @@
 }
 /* }}} */
 
+/**
+ * {{ luasandbox_enter_php_ignore_timeouts
+ *
+ * Like luasandbox_enter_php except that no error is raised if a timeout has 
occurred
+ */
+static inline void luasandbox_enter_php_ignore_timeouts(lua_State * L, 
php_luasandbox_obj * intern)
+{
+   intern-in_php ++;
+}
+
 /** {{{ luasandbox_leave_php
  *
  * This function must be called after luasandbox_enter_php, before the 
callback 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30b98cc8577b31f2b51d611bf195493e19971ad8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/php/luasandbox
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@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] Relax unit tests from I11881232 - change (mediawiki...luasandbox)

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

Change subject: Relax unit tests from I11881232
..


Relax unit tests from I11881232

They were failing for me due to an extra 0.01s of CPU time being added
to some test cases. Apparently they failed for jenkins also. So I
rounded off an extra digit.

Change-Id: Ide889ef9961a91fc2b7742bf3b22232c55b87315
---
M tests/timer.phpt
1 file changed, 22 insertions(+), 22 deletions(-)

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



diff --git a/tests/timer.phpt b/tests/timer.phpt
index d61aaa6..2726d4c 100644
--- a/tests/timer.phpt
+++ b/tests/timer.phpt
@@ -10,7 +10,7 @@
lua = {}
 
function lua.expensive()
-   local t = os.clock() + 0.15
+   local t = os.clock() + 0.2
while os.clock()  t do end
end
 
@@ -21,7 +21,7 @@
 
function test_pause_overrun()
php.overrun();
-   local t = os.clock() + 0.15
+   local t = os.clock() + 0.2
while os.clock()  t do end
end
 
@@ -31,7 +31,7 @@
 LUA;
 
 function expensive() {
-   $t = microtime( 1 ) + 0.15;
+   $t = microtime( 1 ) + 0.2;
while ( microtime( 1 )  $t ) {
}
 }
@@ -39,7 +39,7 @@
 function paused() {
global $sandbox;
$sandbox-pauseUsageTimer();
-   $t = microtime( 1 ) + 0.15;
+   $t = microtime( 1 ) + 0.2;
while ( microtime( 1 )  $t ) {
}
 }
@@ -48,7 +48,7 @@
global $sandbox;
$sandbox-pauseUsageTimer();
$sandbox-unpauseUsageTimer();
-   $t = microtime( 1 ) + 0.15;
+   $t = microtime( 1 ) + 0.2;
while ( microtime( 1 )  $t ) {
}
 }
@@ -65,7 +65,7 @@
global $sandbox;
$sandbox-pauseUsageTimer();
$sandbox-setCPULimit( 0.1 );
-   $t = microtime( 1 ) + 0.15;
+   $t = microtime( 1 ) + 0.2;
while ( microtime( 1 )  $t ) {
}
 }
@@ -115,7 +115,7 @@
}
$t1 = microtime( 1 ) - $t0;
$u1 = $sandbox-getCPUUsage() - $u0;
-   printf( %3s (%.2fs of %.2fs)\n, $timeout, $u1, $t1 );
+   printf( %3s (%.1fs of %.1fs)\n, $timeout, $u1, $t1 );
 }
 
 doTest( 'Lua usage counted', 'lua.expensive' );
@@ -136,18 +136,18 @@
 doTest( 'paused-PHP to PHP to paused-PHP counted', 'php.pauseCall', 
'php.call', 'php.paused' );
 
 --EXPECTF--
-Lua usage counted:  yes (0.10s of %fs)
-PHP usage counted:  yes (0.15s of %fs)
-Paused PHP usage counted:no (0.00s of %fs)
-Unpause works:  yes (0.15s of %fs)
-Auto-unpause works: yes (0.10s of %fs)
-Reset limit unpauses:no (0.00s of %fs)
-Pause overrun prevented:yes (0.10s of %fs)
-PHP to Lua counted: yes (0.10s of %fs)
-PHP to paused-PHP counted:  yes (0.15s of %fs)
-PHP to paused-PHP to paused-PHP counted:yes (0.15s of %fs)
-paused-PHP to Lua counted:  yes (0.10s of %fs)
-paused-PHP to PHP counted:  yes (0.15s of %fs)
-paused-PHP to paused-PHP counted:no (0.00s of %fs)
-paused-PHP to paused-PHP to paused-PHP counted:  no (0.00s of %fs)
-paused-PHP to PHP to paused-PHP counted:yes (0.15s of %fs)
+Lua usage counted:  yes (0.1s of %fs)
+PHP usage counted:  yes (0.2s of %fs)
+Paused PHP usage counted:no (0.0s of %fs)
+Unpause works:  yes (0.2s of %fs)
+Auto-unpause works: yes (0.1s of %fs)
+Reset limit unpauses:no (0.0s of %fs)
+Pause overrun prevented:yes (0.1s of %fs)
+PHP to Lua counted: yes (0.1s of %fs)
+PHP to paused-PHP counted:  yes (0.2s of %fs)
+PHP to paused-PHP to paused-PHP counted:yes (0.2s of %fs)
+paused-PHP to Lua counted:  yes (0.1s of %fs)
+paused-PHP to PHP counted:  yes (0.2s of %fs)
+paused-PHP to paused-PHP counted:no (0.0s of %fs)
+paused-PHP to paused-PHP to paused-PHP counted:  no (0.0s of %fs)
+paused-PHP to PHP to paused-PHP counted:yes (0.2s of %fs)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide889ef9961a91fc2b7742bf3b22232c55b87315
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/php/luasandbox
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Change example namespace base - change (mediawiki...Wikibase)

2013-03-07 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Change example namespace base
..


Change example namespace base

This is to avoid collission with the SMW namespaces.
Else we even end up with the same property NS, which is very awkward!

Picked 120 as it seems to not cause problems and is already being used by WMF.

Change-Id: Ib26f654f4f7ed1e58ef4748a1c1b579560899690
---
M repo/config/Wikibase.example.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved



diff --git a/repo/config/Wikibase.example.php b/repo/config/Wikibase.example.php
index c08ebf2..7cb9513 100644
--- a/repo/config/Wikibase.example.php
+++ b/repo/config/Wikibase.example.php
@@ -36,9 +36,9 @@
 
 $wgContentHandlerUseDB = true;
 
-// Define custom namespaces. Use these exact constant names.
-$baseNs = 100;
+$baseNs = 120;
 
+// Define custom namespaces. Use these exact constant names.
 define( 'WB_NS_ITEM', $baseNs );
 define( 'WB_NS_ITEM_TALK', $baseNs + 1 );
 define( 'WB_NS_PROPERTY', $baseNs + 2 );
@@ -82,7 +82,7 @@
 // Alternative settings, using the main namespace for items.
 // Note: if you do that, several core tests may fail. Parser tests for instance
 // assume that the main namespace contains wikitext.
-$baseNs = 100;
+$baseNs = 120;
 
 // NOTE: do *not* define WB_NS_ITEM and WB_NS_ITEM_TALK when using a core 
namespace for items!
 define( 'WB_NS_PROPERTY', $baseNs +2 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib26f654f4f7ed1e58ef4748a1c1b579560899690
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jens Ohlig jens.oh...@wikimedia.de
Gerrit-Reviewer: John Erling Blad john.b...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Added insert, update and delete methods to query interface - change (mediawiki...Wikibase)

2013-03-07 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Added insert, update and delete methods to query interface
..


Added insert, update and delete methods to query interface

Change-Id: I539ad26b87e1db06a4546df21621d7ffefeec028
---
M repo/includes/Database/MediaWikiQueryInterface.php
M repo/includes/Database/ObservableQueryInterface.php
M repo/includes/Database/QueryInterface.php
M repo/tests/phpunit/includes/Database/MediaWikiQueryInterfaceTest.php
4 files changed, 258 insertions(+), 1 deletion(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved



diff --git a/repo/includes/Database/MediaWikiQueryInterface.php 
b/repo/includes/Database/MediaWikiQueryInterface.php
index 86313f0..29fa479 100644
--- a/repo/includes/Database/MediaWikiQueryInterface.php
+++ b/repo/includes/Database/MediaWikiQueryInterface.php
@@ -104,4 +104,60 @@
return $this-getDB()-dropTable( $tableName, __METHOD__ ) !== 
false;
}
 
+   /**
+* @see QueryInterface::insert
+*
+* @since wd.db
+*
+* @param string $tableName
+* @param array $values
+*
+* @return boolean Success indicator
+*/
+   public function insert( $tableName, array $values ) {
+   return $this-getDB()-insert(
+   $tableName,
+   $values,
+   __METHOD__
+   ) !== false;
+   }
+
+   /**
+* @see QueryInterface::update
+*
+* @since wd.db
+*
+* @param string $tableName
+* @param array $values
+* @param array $conditions
+*
+* @return boolean Success indicator
+*/
+   public function update( $tableName, array $values, array $conditions ) {
+   return $this-getDB()-update(
+   $tableName,
+   $values,
+   $conditions,
+   __METHOD__
+   ) !== false;
+   }
+
+   /**
+* @see QueryInterface::delete
+*
+* @since wd.db
+*
+* @param string $tableName
+* @param array $conditions
+*
+* @return boolean Success indicator
+*/
+   public function delete( $tableName, array $conditions ) {
+   return $this-getDB()-delete(
+   $tableName,
+   $conditions,
+   __METHOD__
+   ) !== false;
+   }
+
 }
diff --git a/repo/includes/Database/ObservableQueryInterface.php 
b/repo/includes/Database/ObservableQueryInterface.php
index 48af945..8b01461 100644
--- a/repo/includes/Database/ObservableQueryInterface.php
+++ b/repo/includes/Database/ObservableQueryInterface.php
@@ -102,4 +102,47 @@
$this-runCallbacks( __FUNCTION__, func_get_args() );
}
 
+   /**
+* @see QueryInterface::insert
+*
+* @since wd.db
+*
+* @param string $tableName
+* @param array $values
+*
+* @return boolean Success indicator
+*/
+   public function insert( $tableName, array $values ) {
+   $this-runCallbacks( __FUNCTION__, func_get_args() );
+   }
+
+   /**
+* @see QueryInterface::update
+*
+* @since wd.db
+*
+* @param string $tableName
+* @param array $values
+* @param array $conditions
+*
+* @return boolean Success indicator
+*/
+   public function update( $tableName, array $values, array $conditions ) {
+   $this-runCallbacks( __FUNCTION__, func_get_args() );
+   }
+
+   /**
+* @see QueryInterface::delete
+*
+* @since wd.db
+*
+* @param string $tableName
+* @param array $conditions
+*
+* @return boolean Success indicator
+*/
+   public function delete( $tableName, array $conditions ) {
+   $this-runCallbacks( __FUNCTION__, func_get_args() );
+   }
+
 }
diff --git a/repo/includes/Database/QueryInterface.php 
b/repo/includes/Database/QueryInterface.php
index 419fca4..85fe2c1 100644
--- a/repo/includes/Database/QueryInterface.php
+++ b/repo/includes/Database/QueryInterface.php
@@ -63,4 +63,47 @@
 */
public function dropTable( $tableName );
 
+   /**
+* Inserts the provided values into the specified table.
+* The values are provided as an associative array in
+* which the keys are the field names.
+*
+* @since wd.db
+*
+* @param string $tableName
+* @param array $values
+*
+* @return boolean Success indicator
+*/
+   public function insert( $tableName, array $values );
+
+   /**
+* Updates the rows that match the conditions with the provided 

[MediaWiki-commits] [Gerrit] Added TermsToClaimsTranslator - change (mediawiki...Wikibase)

2013-03-07 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Added TermsToClaimsTranslator
..


Added TermsToClaimsTranslator

Change-Id: I3769b528cc3b21a24525b1b8801ffd27543efc7a
---
M lib/WikibaseLib.hooks.php
M lib/WikibaseLib.php
A lib/includes/TermsToClaimsTranslator.php
A lib/tests/phpunit/TermsToClaimsTranslatorTest.php
4 files changed, 317 insertions(+), 1 deletion(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved



diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 28c7436..e6198f4 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -93,8 +93,9 @@
'MapValueHasher',
'SettingsArray',
'SiteLink',
-   'Utils',
+   'TermsToClaimsTranslator',
'Term',
+   'Utils',
);
 
foreach ( $testFiles as $file ) {
diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index 2955626..10e8cba 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -117,6 +117,7 @@
 $wgAutoloadClasses['Wikibase\SettingsArray']   = $dir . 
'includes/SettingsArray.php';
 $wgAutoloadClasses['Wikibase\SiteLink']= $dir 
. 'includes/SiteLink.php';
 $wgAutoloadClasses['Wikibase\Term']= $dir 
. 'includes/Term.php';
+$wgAutoloadClasses['Wikibase\Lib\TermsToClaimsTranslator'] = $dir . 
'includes/TermsToClaimsTranslator.php';
 $wgAutoloadClasses['Wikibase\Utils']   = $dir 
. 'includes/Utils.php';
 $wgAutoloadClasses['Wikibase\WikibaseDiffOpFactory']   = $dir . 
'includes/WikibaseDiffOpFactory.php';
 
diff --git a/lib/includes/TermsToClaimsTranslator.php 
b/lib/includes/TermsToClaimsTranslator.php
new file mode 100644
index 000..8e0432b
--- /dev/null
+++ b/lib/includes/TermsToClaimsTranslator.php
@@ -0,0 +1,154 @@
+?php
+
+namespace Wikibase\Lib;
+
+use InvalidArgumentException;
+use Wikibase\Term;
+use Wikibase\Claim;
+use Wikibase\PropertyValueSnak;
+use DataValues\MonolingualTextValue;
+use DataValues\MultilingualTextValue;
+
+/**
+ * Can turn Term objects into Claims.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+class TermsToClaimsTranslator {
+
+   /**
+* Term type = Property id
+*
+* @var int[]
+*/
+   private $propertyIds = array();
+
+   /**
+* Constructor.
+*
+* @since 0.4
+*
+* @param int[] $propertyIds
+*/
+   public function __construct( array $propertyIds ) {
+   $this-propertyIds = $propertyIds;
+   }
+
+   /**
+* Turns a set of terms representing the same property though in 
different languages into a Claim
+* with a MultilingualTextValue in its main snak.
+*
+* @since 0.4
+*
+* @param Term[] $terms
+*
+* @return Claim
+* @throws InvalidArgumentException
+*/
+   public function termsToClaim( array $terms ) {
+   if ( empty( $terms ) ) {
+   throw new InvalidArgumentException( 'Need to have at 
least one term to construct a claim' );
+   }
+
+   $term = reset( $terms );
+   $termType = $term-getType();
+
+   $propertyId = $this-getPropertyIdForTermType( $termType );
+
+   $monoTexts = array();
+
+   foreach ( $terms as $term ) {
+   if ( $term-getType() !== $termType ) {
+   throw new InvalidArgumentException( 'Term types 
must be the same to construct a claim' );
+   }
+
+   $monoTexts[] = $this-termToMonoText( $term );
+   }
+
+   $multiText = new MultilingualTextValue( $monoTexts );
+
+   $mainSnak = new PropertyValueSnak( $propertyId, $multiText );
+
+   return new Claim( $mainSnak 

[MediaWiki-commits] [Gerrit] (bug 42019) Find common range box must always flow left-to-... - change (mediawiki...CheckUser)

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

Change subject: (bug 42019)  Find common range box must always flow 
left-to-right
..


(bug 42019)  Find common range box must always flow left-to-right

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

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



diff --git a/CheckUser_body.php b/CheckUser_body.php
index d9eab8e..e7b401a 100644
--- a/CheckUser_body.php
+++ b/CheckUser_body.php
@@ -191,7 +191,7 @@
protected function addJsCIDRForm() {
$s = 'fieldset id=mw-checkuser-cidrform style=display:none; 
clear:both;' .
'legend' . $this-msg( 'checkuser-cidr-label' 
)-escaped() . '/legend';
-   $s .= 'textarea id=mw-checkuser-iplist rows=5 
cols=50/textareabr /';
+   $s .= 'textarea id=mw-checkuser-iplist dir=ltr rows=5 
cols=50/textareabr /';
$s .= $this-msg( 'checkuser-cidr-res' )-escaped() . '#160;' .
Xml::input( 'mw-checkuser-cidr-res', 35, '', array( 
'id' = 'mw-checkuser-cidr-res' ) ) .
'#160;strong id=mw-checkuser-ipnote/strong';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I296e9f919b3e15e0cd6ace3e5071ea56690c0bc0
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Huji huji.h...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Grunny mwgru...@gmail.com
Gerrit-Reviewer: Huji huji.h...@gmail.com
Gerrit-Reviewer: Victor Vasiliev vasi...@gmail.com
Gerrit-Reviewer: saper sa...@saper.info

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


[MediaWiki-commits] [Gerrit] Adding trailing dot + comment for grep (24 messages) - change (mediawiki...AbuseFilter)

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

Change subject: Adding trailing dot + comment for grep (24 messages)
..


Adding trailing dot + comment for grep (24 messages)

Change-Id: I7b532028a2bdbed11f0dfe6cdf4eb4514671294c
---
M AbuseFilter.i18n.php
M AbuseFilter.parser.php
M Views/AbuseFilterViewEdit.php
3 files changed, 16 insertions(+), 1 deletion(-)

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



diff --git a/AbuseFilter.i18n.php b/AbuseFilter.i18n.php
index 959a78b..595373e 100644
--- a/AbuseFilter.i18n.php
+++ b/AbuseFilter.i18n.php
@@ -381,7 +381,7 @@
'abusefilter-exception-unrecognisedtoken' = 'Unrecognized token $2 
at character $1.',
'abusefilter-exception-noparams' = 'No parameters given to function 
$2 at character $1.',
'abusefilter-exception-dividebyzero' = 'Illegal attempt to divide $2 
by zero at character $1.',
-   'abusefilter-exception-unrecognisedvar' = 'Unrecognized variable $2 at 
character $1',
+   'abusefilter-exception-unrecognisedvar' = 'Unrecognized variable $2 at 
character $1.',
'abusefilter-exception-notenoughargs' = 'Not enough arguments to 
function $2 called at character $1.
Expected $3 {{PLURAL:$3|argument|arguments}}, got $4',
'abusefilter-exception-regexfailure' = 'Error in regular expression 
$3 at character $1: $2',
diff --git a/AbuseFilter.parser.php b/AbuseFilter.parser.php
index f38f168..fa38d5d 100644
--- a/AbuseFilter.parser.php
+++ b/AbuseFilter.parser.php
@@ -519,6 +519,15 @@
 * @param array $params
 */
function __construct( $exception_id, $position, $params ) {
+   // Give grep a chance to find the usages:
+   // abusefilter-exception-unexpectedatend, 
abusefilter-exception-expectednotfound
+   // abusefilter-exception-unrecognisedkeyword, 
abusefilter-exception-unexpectedtoken
+   // abusefilter-exception-unclosedstring, 
abusefilter-exception-invalidoperator
+   // abusefilter-exception-unrecognisedtoken, 
abusefilter-exception-noparams
+   // abusefilter-exception-dividebyzero, 
abusefilter-exception-unrecognisedvar
+   // abusefilter-exception-notenoughargs, 
abusefilter-exception-regexfailure
+   // abusefilter-exception-overridebuiltin, 
abusefilter-exception-outofbounds
+   // abusefilter-exception-notlist
$msg = wfMessage(
'abusefilter-exception-' . $exception_id,
array_merge( array( $position ), $params )
diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php
index 41c0ab1..7aab7bd 100644
--- a/Views/AbuseFilterViewEdit.php
+++ b/Views/AbuseFilterViewEdit.php
@@ -720,6 +720,12 @@
);
return $output;
default:
+   // Give grep a chance to find the usages:
+   // abusefilter-edit-action-warn, 
abusefilter-edit-action-disallow
+   // abusefilter-edit-action-flag, 
abusefilter-edit-action-blockautopromote
+   // abusefilter-edit-action-degroup, 
abusefilter-edit-action-block
+   // abusefilter-edit-action-throttle, 
abusefilter-edit-action-rangeblock
+   // abusefilter-edit-action-tag
$message = 'abusefilter-edit-action-' . $action;
$form_field = 'wpFilterAction' . ucfirst( 
$action );
$status = $set;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b532028a2bdbed11f0dfe6cdf4eb4514671294c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Changing position of colon - change (mediawiki/core)

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

Change subject: Changing position of colon
..


Changing position of colon

Change-Id: I5a973a04221f730c3b6cb4e1abf1a6d0bd95d107
---
M includes/installer/Installer.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/installer/Installer.i18n.php 
b/includes/installer/Installer.i18n.php
index ff29ea8..7f2d83f 100644
--- a/includes/installer/Installer.i18n.php
+++ b/includes/installer/Installer.i18n.php
@@ -542,7 +542,7 @@
 
 $3
 
-'''Note''': If you do not do this now, this generated configuration file will 
not be available to you later if you exit the installation without downloading 
it.
+'''Note:''' If you do not do this now, this generated configuration file will 
not be available to you later if you exit the installation without downloading 
it.
 
 When that has been done, you can '''[$2 enter your wiki]'''.,
'config-download-localsettings' = 'Download 
codeLocalSettings.php/code',

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

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

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


[MediaWiki-commits] [Gerrit] Add dt/dd msgs for of the datatypes in Special:ListDatatypes - change (mediawiki...Wikibase)

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

Change subject: Add dt/dd msgs for of the datatypes in Special:ListDatatypes
..


Add dt/dd msgs for of the datatypes in Special:ListDatatypes

These messages are used at the List all datatypes -special page.
In those cases some datatypes exists that can be added as configuration,
the messages can be set upp manually in as local system messages.

Patchset 9: Only a rebase

Change-Id: I66ed2cf6e82d50fc0904c89d37e09daa88a2a6ad
---
M repo/Wikibase.i18n.php
M repo/includes/specials/SpecialListDatatypes.php
2 files changed, 79 insertions(+), 5 deletions(-)

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



diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 57634e1..0f799b6 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -288,6 +288,46 @@
// query - summary and autocomment
'wikibase-query-summary-special-create-query' = 'Created a [$2] query 
with {{PLURAL:$1|value|values}}',
 
+   // datatype descriptions
+   'wikibase-listdatatypes-wikibase-item-head' = 'Item',
+   'wikibase-listdatatypes-wikibase-item-body' = 'Link to other items at 
the project. During entry the Item namespace on Wikidata will be searced for 
matching entries. It consists of a single text entry field.
+* scheme – implicit part of the Iri-string
+* hierarchicalpart – implicit part of the Iri-string
+* query – implicit part of the Iri-string
+* fragment – implicit part of the Iri-string',
+   'wikibase-listdatatypes-commonsmedia-head' = 'Commons media',
+   'wikibase-listdatatypes-commonsmedia-body' = 'Link to files stored at 
Wikimedia Commons. During entry the File namespace on Commons will be 
searched for matching entries.
+* scheme – implicit part of the Iri-string
+* hierarchicalpart – implicit part of the Iri-string
+* query – implicit part of the Iri-string
+* fragment – implicit part of the Iri-string',
+   'wikibase-listdatatypes-geo-coordinate-head' = 'Geo coordinate',
+   'wikibase-listdatatypes-geo-coordinate-body' = 'Literal data for a 
geographical position given as a latitude-longitude pair in gms or decimal 
degrees for the given stellar body. Defaults to Earth and then WGS84. It 
adds a resolution and range.
+* latitude – implicit first part (float, dms, dm, dd) of the coordinate 
string, direction is either given by prefixed sign or by postfixed N/S
+* longitude – implicit second part (float, dms, dm, dd) of the coordinate 
string, direction is either given by prefixed sign or by postfixed E/W
+* altitude (optional) – explicit (?) value for the height over a reference 
plane , for the globe Earth that would be the WGS84 reference globe
+* globe (optional) – explicit (?) data value, given as stellar body that 
defaults to Earth and then WGS84',
+   'wikibase-listdatatypes-quantity-head' = 'Quantity',
+   'wikibase-listdatatypes-quantity-body' = 'Literal data field for a 
quantity that relates to some kind of well-defined unit. The actual unit goes 
in the data values that is entered.
+* value – implicit part of the string (mapping of unit prefix is unclear)
+* unit – implicit part of the string (mapping to standardizing body is unclear)
+* accuracy (optional) – explicit data value, has the same unit as the value',
+   'wikibase-listdatatypes-monolingual-text-head' = 'Monolingual text',
+   'wikibase-listdatatypes-monolingual-text-body' = 'Literal data field 
for a string that is not translated into other languages. This type of string 
is defined once and reused across all languages. Typical use is a geographical 
names written in the local language, an identifier of some kind, a chemical 
formula or a Latin scientific name.
+* language – explicit value for identifying the language for the text part
+* text – explicit value for the language specific variant string',
+   'wikibase-listdatatypes-multilingual-text-head' = 'Multilingual text',
+   'wikibase-listdatatypes-multilingual-text-body' = 'Literal data field 
for a string that must be translated into other languages. Typical use is a 
entity name of global interest that has non-local written forms. Those can 
differ both in languages and script systems.
+* language – explicit value for identifying the language for the text part
+* text – explicit value for the language specific variant string',
+   'wikibase-listdatatypes-time-head' = 'Time',
+   'wikibase-listdatatypes-time-body' = 'Literal data field for a time 
value. Given as a time with some precision and boundaries. The time are always 
saved internally in proleptic Gregorian, but can use other formats during 
parsing and formating.(?)
+* time – explicit value for point in time, represented per ISO8601, they year 
always having 11 digits, the date always be signed, in the format 
+0002013-01-01T00:00:00Z
+* timezone – 

[MediaWiki-commits] [Gerrit] (bug 1495) Enable on-wiki message language fallbacks - change (mediawiki/core)

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

Change subject: (bug 1495) Enable on-wiki message language fallbacks
..


(bug 1495) Enable on-wiki message language fallbacks

The core function behind wfMessage() (MessageCache-get()) did not
apply the language fallback chain to on-wiki messages.

This patch has changed the behavior to iterate over all possible
on-wiki fallbacks (starting with the user's language) before
using the built-in language cache (CDB files). Previously we only looked
for the existence of an on-wiki message in the users's language.

Performance wise, using the 'ab' language ('ru', 'en' fallbacks)
MessageCache::get (Averaged over runs and calls)
New Code: ~8.5% TET (110us/call)
Old Code: ~6.5% TET ( 90us/call)

TET: Total Execution Time

Change-Id: Iaaf6ccebd8c40c9602748c58c3a5c73c29e7aa4d
---
M includes/cache/MessageCache.php
M languages/Language.php
A tests/phpunit/includes/cache/MessageCacheTest.php
3 files changed, 188 insertions(+), 33 deletions(-)

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



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

[MediaWiki-commits] [Gerrit] Cache the options token for preferences system - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Cache the options token for preferences system
..


Cache the options token for preferences system

Change-Id: I2e9a4326119db390aba36cc5bc6da20c5c16eed1
---
M resources/js/ext.uls.preferences.js
1 file changed, 92 insertions(+), 22 deletions(-)

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



diff --git a/resources/js/ext.uls.preferences.js 
b/resources/js/ext.uls.preferences.js
index 8f7f076..913d539 100644
--- a/resources/js/ext.uls.preferences.js
+++ b/resources/js/ext.uls.preferences.js
@@ -21,7 +21,90 @@
 ( function ( $, mw, undefined ) {
'use strict';
 
-   var ULSPreferences = function () {
+   var ULSPreferences,
+   cachedOptionsToken = null;
+
+   /**
+* Post to options API with correct token.
+* If we have no token, get one and try to post.
+* If we have a cached token try using that, and if it fails, blank out 
the
+* cached token and start over.
+*
+* @param params {Object} API parameters
+* @param ok {Function} callback for success
+* @param err {Function} [optional] error callback
+* @return {jqXHR}
+*/
+   function saveOptionsWithToken ( params, ok, err ) {
+   var useTokenToPost, getTokenIfBad;
+   if ( cachedOptionsToken === null ) {
+   // We don't have a valid cached token, so get a fresh 
one and try posting.
+   // We do not trap any 'badtoken' or 'notoken' errors, 
because we don't want
+   // an infinite loop. If this fresh token is bad, 
something else is very wrong.
+   useTokenToPost = function ( token ) {
+   params.token = token;
+   new mw.Api().post( params, ok, err );
+   };
+   return getOptionToken( useTokenToPost, err );
+   } else {
+   // We do have a token, but it might be expired. So if 
it is 'bad' then
+   // start over with a new token.
+   params.token = cachedOptionsToken;
+   getTokenIfBad = function ( code, result ) {
+   if ( code === 'badtoken' ) {
+   // force a new token, clear any old one
+   cachedOptionsToken = null;
+   saveOptionsWithToken( params, ok, err );
+   } else {
+   err( code, result );
+   }
+   };
+   return new mw.Api().post( params, { ok : ok, err : 
getTokenIfBad });
+   }
+   }
+
+   /**
+* Api helper to grab an options token
+*
+* token callback has signature ( String token )
+* error callback has signature ( String code, Object results, 
XmlHttpRequest xhr, Exception exception )
+* Note that xhr and exception are only available for 'http_*' errors
+* code may be any http_* error code (see mw.Api), or 'token_missing'
+*
+* @param tokenCallback {Function} received token callback
+* @param err {Function} error callback
+* @return {jqXHR}
+*/
+   function getOptionToken ( tokenCallback, err ) {
+   var parameters = {
+   action: 'tokens',
+   type: 'options'
+   },
+   ok = function ( data ) {
+   var token;
+   // If token type is not available for this user,
+   // key 'translationreviewtoken' is missing or 
can contain Boolean false
+   if ( data.tokens  data.tokens.optionstoken ) {
+   token = data.tokens.optionstoken;
+   cachedOptionsToken = token;
+   tokenCallback( token );
+   } else {
+   err( 'token-missing', data );
+   }
+   },
+   ajaxOptions = {
+   ok: ok,
+   err: err,
+   // Due to the API assuming we're logged out if 
we pass the callback-parameter,
+   // we have to disable jQuery's callback system, 
and instead parse JSON string,
+   // by setting 'jsonp' to false.
+   jsonp: false
+   };
+
+   return new mw.Api().get( parameters, 

[MediaWiki-commits] [Gerrit] Cleanup for JSHint - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Cleanup for JSHint
..

Cleanup for JSHint

Change-Id: Idc4ef9cfc527308b2fd077956a6914bbe05e9503
---
M resources/js/ext.uls.ime.js
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/resources/js/ext.uls.ime.js b/resources/js/ext.uls.ime.js
index 292ac54..6ef2dcc 100644
--- a/resources/js/ext.uls.ime.js
+++ b/resources/js/ext.uls.ime.js
@@ -34,7 +34,9 @@
availableLanguages = {};
 
for ( language in $.ime.languages ) {
-   availableLanguages[language] = mw.config.get( 
'wgULSLanguages' )[language];
+   if ( $.ime.languages.hasOwnProperty( language ) ) {
+   availableLanguages[language] = mw.config.get( 
'wgULSLanguages' )[language];
+   }
}
 
return availableLanguages;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc4ef9cfc527308b2fd077956a6914bbe05e9503
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Simplify variables and clean up comments - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Simplify variables and clean up comments
..

Simplify variables and clean up comments

Not supposed to have any functional changes

Change-Id: Ibb16af9144f183d85b985bcb3133a4244e310cda
---
M resources/js/ext.uls.preferences.js
1 file changed, 34 insertions(+), 36 deletions(-)


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

diff --git a/resources/js/ext.uls.preferences.js 
b/resources/js/ext.uls.preferences.js
index 913d539..3340438 100644
--- a/resources/js/ext.uls.preferences.js
+++ b/resources/js/ext.uls.preferences.js
@@ -27,39 +27,40 @@
/**
 * Post to options API with correct token.
 * If we have no token, get one and try to post.
-* If we have a cached token try using that, and if it fails, blank out 
the
-* cached token and start over.
+* If we have a cached token try using that,
+* and if it fails, blank out the cached token and start over.
 *
 * @param params {Object} API parameters
 * @param ok {Function} callback for success
 * @param err {Function} [optional] error callback
 * @return {jqXHR}
 */
-   function saveOptionsWithToken ( params, ok, err ) {
-   var useTokenToPost, getTokenIfBad;
+   function saveOptionsWithToken( params, ok, err ) {
if ( cachedOptionsToken === null ) {
// We don't have a valid cached token, so get a fresh 
one and try posting.
// We do not trap any 'badtoken' or 'notoken' errors, 
because we don't want
// an infinite loop. If this fresh token is bad, 
something else is very wrong.
-   useTokenToPost = function ( token ) {
+   return getOptionsToken( function ( token ) {
params.token = token;
new mw.Api().post( params, ok, err );
-   };
-   return getOptionToken( useTokenToPost, err );
+   }, err );
} else {
-   // We do have a token, but it might be expired. So if 
it is 'bad' then
-   // start over with a new token.
params.token = cachedOptionsToken;
-   getTokenIfBad = function ( code, result ) {
-   if ( code === 'badtoken' ) {
-   // force a new token, clear any old one
-   cachedOptionsToken = null;
-   saveOptionsWithToken( params, ok, err );
-   } else {
-   err( code, result );
+
+   return new mw.Api().post( params, {
+   ok: ok,
+   err: function ( code, result ) {
+   // We do have a token, but it might be 
expired.
+   // So if it is 'bad', then start over 
with a new token.
+   if ( code === 'badtoken' ) {
+   // force a new token, clear any 
old one
+   cachedOptionsToken = null;
+   saveOptionsWithToken( params, 
ok, err );
+   } else {
+   err( code, result );
+   }
}
-   };
-   return new mw.Api().post( params, { ok : ok, err : 
getTokenIfBad });
+   } );
}
}
 
@@ -75,13 +76,14 @@
 * @param err {Function} error callback
 * @return {jqXHR}
 */
-   function getOptionToken ( tokenCallback, err ) {
-   var parameters = {
-   action: 'tokens',
-   type: 'options'
-   },
-   ok = function ( data ) {
+   function getOptionsToken( tokenCallback, err ) {
+   return new mw.Api().get( {
+   action: 'tokens',
+   type: 'options'
+   }, {
+   ok: function ( data ) {
var token;
+
// If token type is not available for this user,
// key 'translationreviewtoken' is missing or 
can contain Boolean false
if ( data.tokens  data.tokens.optionstoken ) {
@@ -92,16 +94,12 @@
   

[MediaWiki-commits] [Gerrit] (Bug 38135) Workaround a Fatal error - change (mediawiki...LdapAuthentication)

2013-03-07 Thread Guillaume Beaudoin (Code Review)
Guillaume Beaudoin has uploaded a new change for review.

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


Change subject: (Bug 38135) Workaround a Fatal error
..

(Bug 38135) Workaround a Fatal error

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LdapAuthentication 
refs/changes/22/52622/1

diff --git a/LdapAuthentication.php b/LdapAuthentication.php
index be81879..1fb1afd 100644
--- a/LdapAuthentication.php
+++ b/LdapAuthentication.php
@@ -1133,7 +1133,8 @@
}
# If the session domain isn't set, the user may have been logged
# in with a token, check the user options.
-   if ( $wgUser-isLoggedIn()  $wgUser-getToken( false ) ) {
+   # If $wgUser isn't defined yet, it might be due to an 
LDAPAutoAuthDomain config.
+   if ( defined($wgUser)  $wgUser-isLoggedIn()  
$wgUser-getToken( false ) ) {
$this-printDebug( Pulling domain from user options., 
NONSENSITIVE );
$domain = self::loadDomain( $wgUser );
if ( $domain ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I882cd56a63ff4709a6db6e11b995c41aa14a393a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LdapAuthentication
Gerrit-Branch: master
Gerrit-Owner: Guillaume Beaudoin mediaw...@soli.ca

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


[MediaWiki-commits] [Gerrit] Rename CreateEntity and CreateItem to NewEntity and NewItem - change (mediawiki...Wikibase)

2013-03-07 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has submitted this change and it was merged.

Change subject: Rename CreateEntity and CreateItem to NewEntity and NewItem
..


Rename CreateEntity and CreateItem to NewEntity and NewItem

This change makes the naming of the specal pages Special:CreateItem
and Special:NewProperty consistent as the create item page will be
Special:NewItem. There are also aliases to make Special:CreateItem
and Special:CreateProperty work.

This changeset has some consequences in messages, but unfortunatly
a lot of them has also changed keys.

Patchset 6: Rebased
Patchset 10: Rebased
Patchset 11: cleanup
Patchset 12: cleanup

Change-Id: Ic2d7c49f09f749b47dd3d946321d8e3302d3
---
M lib/resources/Resources.php
M repo/Wikibase.hooks.php
M repo/Wikibase.i18n.alias.php
M repo/Wikibase.i18n.php
M repo/Wikibase.php
M repo/includes/Autocomment.php
M repo/includes/EntityView.php
M repo/includes/content/ItemHandler.php
R repo/includes/specials/SpecialNewEntity.php
R repo/includes/specials/SpecialNewItem.php
M repo/includes/specials/SpecialNewProperty.php
R repo/tests/phpunit/includes/specials/SpecialNewItemTest.php
12 files changed, 130 insertions(+), 125 deletions(-)

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



diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index cd0501d..6d77ad6 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -50,7 +50,7 @@
),
'messages' = array(
'special-createitem',
-   'wb-special-createitem-new-item-notification'
+   'wb-special-newitem-new-item-notification'
)
),
 
diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 8040b26..c1d6c58 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -191,7 +191,7 @@
'content/PropertyContent',
'content/PropertyHandler',
 
-   'specials/SpecialCreateItem',
+   'specials/SpecialNewItem',
'specials/SpecialItemDisambiguation',
'specials/SpecialItemByTitle',
 
diff --git a/repo/Wikibase.i18n.alias.php b/repo/Wikibase.i18n.alias.php
index 3163339..c83deab 100644
--- a/repo/Wikibase.i18n.alias.php
+++ b/repo/Wikibase.i18n.alias.php
@@ -17,8 +17,8 @@
 /** English (English) */
 $specialPageAliases['en'] = array(
'EntityData' = array( 'EntityData' ),
-   'CreateItem' = array( 'CreateItem' ),
-   'NewProperty' = array( 'NewProperty' ),
+   'NewItem' = array( 'NewItem', 'CreateItem' ),
+   'NewProperty' = array( 'NewProperty', 'CreateProperty' ),
'ItemByTitle' = array( 'ItemByTitle' ),
'ItemDisambiguation' = array( 'ItemDisambiguation' ),
'ListDatatypes' = array( 'ListDatatypes' ),
@@ -31,7 +31,7 @@
 
 /** Arabic (العربية) */
 $specialPageAliases['ar'] = array(
-   'CreateItem' = array( 'إنشاء_مدخلة' ),
+   'NewItem' = array( 'إنشاء_مدخلة' ),
'ItemByTitle' = array( 'المدخلات_بالعنوان' ),
'ItemDisambiguation' = array( 'المدخلات_بالعلامة' ),
 );
@@ -43,7 +43,7 @@
 
 /** буряад (буряад) */
 $specialPageAliases['bxr'] = array(
-   'CreateItem' = array( 'Зүйл_үүсхэхэ' ),
+   'NewItem' = array( 'Зүйл_үүсхэхэ' ),
'NewProperty' = array( 'Шэнэ_шэнжэ_шанар' ),
'ItemByTitle' = array( 'Нэрээр_жагсааха' ),
'ItemDisambiguation' = array( 'Дэлгэрэнгы_нэрэ' ),
@@ -52,7 +52,7 @@
 /** German (Deutsch) */
 $specialPageAliases['de'] = array(
'EntityData' = array( 'Objektdaten' ),
-   'CreateItem' = array( 'Neues_Datenelement_erstellen' ),
+   'NewItem' = array( 'Neues_Datenelement_erstellen' ),
'NewProperty' = array( 'Neues_Attribut_erstellen' ),
'ItemByTitle' = array( 'Datenelement_nach_Name' ),
'ItemDisambiguation' = array( 'Begriffsklärung_zu_Datenelement' ),
@@ -66,7 +66,7 @@
 
 /** Zazaki (Zazaki) */
 $specialPageAliases['diq'] = array(
-   'CreateItem' = array( 'LeteVırazê' ),
+   'NewItem' = array( 'LeteVırazê' ),
'NewProperty' = array( 'XısusiyetêNewey' ),
'ItemByTitle' = array( 'SernuşteyêLeti' ),
'ItemDisambiguation' = array( 'EtiketêLeti' ),
@@ -77,7 +77,7 @@
 /** Spanish (español) */
 $specialPageAliases['es'] = array(
'EntityData' = array( 'DatosDeEntidad' ),
-   'CreateItem' = array( 'CrearElemento' ),
+   'NewItem' = array( 'CrearElemento' ),
'NewProperty' = array( 'NuevaPropiedad' ),
'ItemByTitle' = array( 'ElementoPorTítulo' ),
'ItemDisambiguation' = array( 'DesambiguaciónDeElementos' ),
@@ -88,7 +88,7 @@
 
 /** Finnish (suomi) */
 $specialPageAliases['fi'] = array(
-   'CreateItem' = array( 'Luo_kohde' ),
+   'NewItem' = array( 'Luo_kohde' ),
   

[MediaWiki-commits] [Gerrit] Revert make check_http (80) and check_tcp (8080) on install... - change (operations/puppet)

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

Change subject: Revert make check_http (80) and check_tcp (8080) on install 
hosts a critical (paging) service
..


Revert make check_http (80) and check_tcp (8080) on install hosts a critical 
(paging) service

Waking people up for this, are you crazy?

This reverts commit e2d5cd28bfa2e97953c6eaa3acf8617ebbc66f6d

Change-Id: I53a6aae5823b4fc3c75e5dbd38e5d2b02472fee1
---
M manifests/misc/install-server.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/manifests/misc/install-server.pp b/manifests/misc/install-server.pp
index 719d656..5f10979 100644
--- a/manifests/misc/install-server.pp
+++ b/manifests/misc/install-server.pp
@@ -30,7 +30,7 @@
}
 
# Monitoring
-   monitor_service { http: description = HTTP, check_command 
= check_http, critical = true }
+   monitor_service { http: description = HTTP, check_command 
= check_http }
}
 
class tftp-server {
@@ -115,7 +115,7 @@
}
 
# Monitoring
-   monitor_service { squid: description = Squid, 
check_command = check_tcp!8080, critical = true }
+   monitor_service { squid: description = Squid, 
check_command = check_tcp!8080 }
}
 
class ubuntu-mirror {

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

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

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


[MediaWiki-commits] [Gerrit] Add description of string to the list in DataTypes - change (mediawiki...Wikibase)

2013-03-07 Thread John Erling Blad (Code Review)
John Erling Blad has uploaded a new change for review.

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


Change subject: Add description of string to the list in DataTypes
..

Add description of string to the list in DataTypes

Change-Id: If5b9b8af97778a334cca8c024f14e506b9294d1d
---
M repo/Wikibase.i18n.php
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 87aa254..1ba1b88 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -320,6 +320,10 @@
'wikibase-listdatatypes-multilingual-text-body' = 'Literal data field 
for a string that must be translated into other languages. Typical use is a 
entity name of global interest that has non-local written forms. Those can 
differ both in languages and script systems.
 * language – explicit value for identifying the language for the text part
 * text – explicit value for the language specific variant string',
+   'wikibase-listdatatypes-string-head' = 'String',
+   'wikibase-listdatatypes-string-body' = 'Literal data field for a 
string of characters. Typical use is identifiers that has written forms that 
does not depend on the language. Such strings can in some cases be 
transliterated into other script systems.
+* language – explicit value for identifying the language for the text part
+* text – explicit value for the language specific variant string',
'wikibase-listdatatypes-time-head' = 'Time',
'wikibase-listdatatypes-time-body' = 'Literal data field for a time 
value. Given as a time with some precision and boundaries. The time are always 
saved internally in proleptic Gregorian, but can use other formats during 
parsing and formating.(?)
 * time – explicit value for point in time, represented per ISO8601, they year 
always having 11 digits, the date always be signed, in the format 
+0002013-01-01T00:00:00Z
@@ -828,6 +832,10 @@
'wikibase-listdatatypes-monolingual-text-body' = 
'{{Wikibase-datatype-body|Monolingual text}}',
'wikibase-listdatatypes-multilingual-text-head' = 
'{{Wikibase-datatype-head|Multilingual text}}',
'wikibase-listdatatypes-multilingual-text-body' = 
'{{Wikibase-datatype-body|Multilingual text}}',
+   'wikibase-listdatatypes-string-head' = 
'{{Wikibase-datatype-head|String}}',
+   'wikibase-listdatatypes-string-body' = 
'{{Wikibase-datatype-body|String}}',
+   'wikibase-listdatatypes-time-head' = '{{Wikibase-datatype-head|Time}}',
+   'wikibase-listdatatypes-time-body' = '{{Wikibase-datatype-body|Time}}',
 );
 
 /** Achinese (Acèh)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5b9b8af97778a334cca8c024f14e506b9294d1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad john.b...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Add a collapse tooltip, in addition to expand - change (mediawiki...Translate)

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

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


Change subject: Add a collapse tooltip, in addition to expand
..

Add a collapse tooltip, in addition to expand

Follow up to Ibbd6e2b58c58a6a1ed46aaf1e8f1a685c89d51fc

Change-Id: Ia68d9c1691a8880098fcb87efc2dcf0c5c1c7e96
---
M Translate.i18n.php
M Translate.php
M resources/js/ext.translate.editor.js
3 files changed, 7 insertions(+), 2 deletions(-)


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

diff --git a/Translate.i18n.php b/Translate.i18n.php
index ce69f1a..dbfb82f 100644
--- a/Translate.i18n.php
+++ b/Translate.i18n.php
@@ -494,6 +494,7 @@
'tux-empty-list-other-link' = 'Show all messages',
'tux-editor-close-tooltip' = 'Close',
'tux-editor-expand-tooltip' = 'Expand',
+   'tux-editor-collapse-tooltip' = 'Collapse',
 
 );
 
@@ -1020,6 +1021,7 @@
 {{Identical|Show all messages}}',
'tux-editor-close-tooltip' = 'Tooltip for close icon of translate 
editor',
'tux-editor-expand-tooltip' = 'Tooltip for expand icon of translate 
editor',
+   'tux-editor-collapse-tooltip' = 'Tooltip for the collapse icon of 
translate editor',
 );
 
 /** Afrikaans (Afrikaans)
diff --git a/Translate.php b/Translate.php
index fbeab26..ebc809a 100644
--- a/Translate.php
+++ b/Translate.php
@@ -291,6 +291,7 @@
'tux-editor-outdated-warning-diff-link',
'tux-editor-close-tooltip',
'tux-editor-expand-tooltip',
+   'tux-editor-collapse-tooltip',
),
'position' = 'top',
 ) + $resourcePaths;
diff --git a/resources/js/ext.translate.editor.js 
b/resources/js/ext.translate.editor.js
index 62d4fa3..5d4057b 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -708,7 +708,8 @@
// Change the icon image
toggleIcon
.removeClass( 'editor-contract' )
-   .addClass( 'editor-expand' );
+   .addClass( 'editor-expand' )
+   .attr( 'title', mw.msg( 
'tux-editor-expand-tooltip' ) );
 
this.$editor.find( '.infocolumn-block' )
.removeClass( 'hide' );
@@ -723,7 +724,8 @@
// Change the icon image
toggleIcon
.removeClass( 'editor-expand' )
-   .addClass( 'editor-contract' );
+   .addClass( 'editor-contract' )
+   .attr( 'title', mw.msg( 
'tux-editor-collapse-tooltip' ) );
 
this.$editor.find( '.infocolumn-block' )
.addClass( 'hide' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia68d9c1691a8880098fcb87efc2dcf0c5c1c7e96
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Add description of string to the list in DataTypes - change (mediawiki...Wikibase)

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

Change subject: Add description of string to the list in DataTypes
..


Add description of string to the list in DataTypes

Change-Id: If5b9b8af97778a334cca8c024f14e506b9294d1d
---
M repo/Wikibase.i18n.php
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 87aa254..1ba1b88 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -320,6 +320,10 @@
'wikibase-listdatatypes-multilingual-text-body' = 'Literal data field 
for a string that must be translated into other languages. Typical use is a 
entity name of global interest that has non-local written forms. Those can 
differ both in languages and script systems.
 * language – explicit value for identifying the language for the text part
 * text – explicit value for the language specific variant string',
+   'wikibase-listdatatypes-string-head' = 'String',
+   'wikibase-listdatatypes-string-body' = 'Literal data field for a 
string of characters. Typical use is identifiers that has written forms that 
does not depend on the language. Such strings can in some cases be 
transliterated into other script systems.
+* language – explicit value for identifying the language for the text part
+* text – explicit value for the language specific variant string',
'wikibase-listdatatypes-time-head' = 'Time',
'wikibase-listdatatypes-time-body' = 'Literal data field for a time 
value. Given as a time with some precision and boundaries. The time are always 
saved internally in proleptic Gregorian, but can use other formats during 
parsing and formating.(?)
 * time – explicit value for point in time, represented per ISO8601, they year 
always having 11 digits, the date always be signed, in the format 
+0002013-01-01T00:00:00Z
@@ -828,6 +832,10 @@
'wikibase-listdatatypes-monolingual-text-body' = 
'{{Wikibase-datatype-body|Monolingual text}}',
'wikibase-listdatatypes-multilingual-text-head' = 
'{{Wikibase-datatype-head|Multilingual text}}',
'wikibase-listdatatypes-multilingual-text-body' = 
'{{Wikibase-datatype-body|Multilingual text}}',
+   'wikibase-listdatatypes-string-head' = 
'{{Wikibase-datatype-head|String}}',
+   'wikibase-listdatatypes-string-body' = 
'{{Wikibase-datatype-body|String}}',
+   'wikibase-listdatatypes-time-head' = '{{Wikibase-datatype-head|Time}}',
+   'wikibase-listdatatypes-time-body' = '{{Wikibase-datatype-body|Time}}',
 );
 
 /** Achinese (Acèh)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5b9b8af97778a334cca8c024f14e506b9294d1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad john.b...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Handle exts. in tokenizer and removed ExtensionContentCollec... - change (mediawiki...Parsoid)

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

Change subject: Handle exts. in tokenizer and removed ExtensionContentCollector.
..


Handle exts. in tokenizer and removed ExtensionContentCollector.

* Since the tokenizer can now identify the extension content and
  that strategy proved successful, this patch pushes that one step
  further by matching start and end tags and encapsulating it in
  the self-closing tag that the ExtensionContentCollector was
  doing thus far. There is no collection involved anymore since
  extension content is entirely encapsulated in this token.  So,
  there is no use for the ExtensionContentCollector anymore.

* If an xml tag is not a html5 tag, an older html tag, is a known
  installed extension, an include directive, or a native parsoid
  extension tag (ref, references), the xml tag is now
  converted to plain text.  This fixes parsing of text like:
  xy\n\nab which is no longer parsed as an xml-tag

* Fixed Util.arrayToHash to record e: true for each element 'e'
  of the array rather than '1'.  Also fixed all users to explicitly
  check for 'true' rather than a truthy value.
 Ex: var h = Util.arrayToHash(a);
 if (h[candidate] === true) instead of if (h[candidate])
  This is because if candidate is 'prototype' or 'constructor'
  h[candidate] will be a truthy value (functions), but not true.
  I realized this yesterday, courtesy marktraceur.

* A couple minor fixes and simplifications

* Change in parser test results:
  - 2 wt2wt tests green
  - 1 wt2wt test red (to be investigated)
  - 1 html2html test green

* This also speeds up parser tests since all tokens (and their attrs)
  are no longer repeatedly examined for matching extension tags.

Notes for next steps

* There are 3 different ways how the non-html tags are handled:
  - natively-supported extensions like ref
* tokenized in tokenizer in new scope and inserted back into
  top-level scope
* go through stages 1  2 of the main pipeline
* handled in ext.Cite.js where they get pulled out of stage 3.
* separately post-procesed in a new stage 3 pipeline.

  - php-parser-supported extensions like math
* content pulled out of tokenizer and hidden in a SelfclosingTag
  of type mw:Object/Extension.
* processed by ext.core.TemplateHandler.js during stage 2 of the
  main pipeline:
  - content sent to php parser to generate html
  - html retokenized to tags and inserted back into token stream

  - noinclude, includeonly, onlyinclude directives
 * tokenized in a new scope and inserted back into the token
   stream if matched by the extension-tag production.
 * tokenized normally if matched by include_limits production
 * handled by TokenAndAttrCollector and processed by
   ext.core.NoIncludeOnly.js

* Next step: uniform handling of both natively-supported and
  php-parser supported extensions that effectively mimics a full
  expansion right upto to DOM building (either natively or via
  php-parser).  In a later step, possibly fold *include* directives
  into this abstraction if it lends itself to that.

Change-Id: Iecac76c27518a4690242e584c8c95ef363c749af
---
D js/lib/ext.ExtensionContentCollector.js
M js/lib/ext.core.Sanitizer.js
M js/lib/mediawiki.DOMPostProcessor.js
M js/lib/mediawiki.Util.js
M js/lib/mediawiki.parser.js
M js/lib/pegTokenizer.pegjs.txt
6 files changed, 96 insertions(+), 197 deletions(-)

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



diff --git a/js/lib/ext.ExtensionContentCollector.js 
b/js/lib/ext.ExtensionContentCollector.js
deleted file mode 100644
index 4935d84..000
--- a/js/lib/ext.ExtensionContentCollector.js
+++ /dev/null
@@ -1,147 +0,0 @@
-use strict;
-
-var Collector = require( './ext.util.TokenAndAttrCollector.js' 
).TokenAndAttrCollector,
-   Util = require( './mediawiki.Util.js' ).Util;
-
-// SSS FIXME: Since we sweep the entire token stream in TokenAndAttrCollector
-// and since we add a new collector for each entry below, this is an expensive 
way
-// to collect extension content.  We should probably use a single collector and
-// match up against all these tags.
-//
-// List of supported extensions
-var supportedExtensions = [
-   'categorytree', 'charinsert', 'gallery', 'hiero', 'imagemap',
-   'inputbox', 'math', 'poem', 'syntaxhighlight', 'tag', 'timeline'
-];
-
-/**
- * Simple token collector for extensions
- */
-function ExtensionContent ( manager, options ) {
-   this.manager = manager;
-   this.options = options;
-   for (var i = 0; i  supportedExtensions.length; i++) {
-   var ext = supportedExtensions[i];
-   new Collector(
-   manager,
-   this.handleExtensionTag.bind(this, ext),
-   true, // match the end-of-input if closing tag is 
missing
-   // *NEVER* register several 

[MediaWiki-commits] [Gerrit] Maintenance: Css cleanup - change (mediawiki...MobileFrontend)

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

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


Change subject: Maintenance: Css cleanup
..

Maintenance: Css cleanup

* Move css specific to Special:MobileMenu into its own css file
* Put all essential css for non-javascript users into ui.css and hamburger.css
(for the left menu)
Load all javascript dependant css in javascript

* Define mobile.styles.page and put all styles that are not relevant to special 
pages
there
* Combine less statements for readability

Change-Id: I39d2ced37dde5e6bd2488870918dca2f7600ca6c
---
M MobileFrontend.php
M includes/skins/SkinMobile.php
A less/common/hamburgermenu.less
M less/common/mf-navigation.less
A less/common/ui.less
M less/modules/mf-search.less
A less/specials/mobilemenu.less
A stylesheets/common/hamburgermenu.css
M stylesheets/common/mf-navigation.css
A stylesheets/common/ui.css
M stylesheets/modules/mf-search.css
A stylesheets/specials/mobilemenu.css
12 files changed, 565 insertions(+), 542 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index 8b83fe9..70ed132 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -167,18 +167,22 @@
'mobileTargets' = array(),
 );
 
+$wgResourceModules['mobile.styles.page'] = $wgMFMobileResourceBoilerplate + 
array(
+   'dependencies' = array( 'mobile.startup' ),
+   'styles' = array(
+   'stylesheets/common/mf-footer.css',
+   'stylesheets/common/mf-hacks.css',
+   'stylesheets/common/mf-enwp.css'
+   ),
+   'mobileTargets' = array(),
+);
+
 $wgResourceModules['mobile.styles'] = $wgMFMobileResourceBoilerplate + array(
'styles' = array(
'stylesheets/externals/reset.css',
'stylesheets/common/mf-common.css',
-   'stylesheets/common/mf-footer.css',
+   'stylesheets/common/ui.css',
'stylesheets/common/mf-typography.css',
-   'stylesheets/common/mf-navigation.css',
-   'stylesheets/modules/mf-search.css',
-   'stylesheets/modules/mf-banner.css',
-   'stylesheets/modules/mf-toggle.css',
-   'stylesheets/common/mf-hacks.css',
-   'stylesheets/common/mf-enwp.css'
),
'position' = 'top',
// expects to be added manually
@@ -326,6 +330,10 @@
'mediawiki.util',
),
'styles' = array(
+   'stylesheets/common/mf-navigation.css',
+   'stylesheets/modules/mf-search.css',
+   'stylesheets/modules/mf-banner.css',
+   'stylesheets/modules/mf-toggle.css',
'stylesheets/modules/mf-references.css',
'stylesheets/modules/mf-cleanuptemplates.css',
'stylesheets/modules/mf-watchstar.css',
@@ -433,6 +441,11 @@
* Name must be the name of the special page lowercased prefixed by 
'mobile.'
* suffixed by '.styles' or '.scripts'
*/
+$wgResourceModules['mobile.mobilemenu.styles'] = 
$wgMFMobileSpecialPageResourceBoilerplate + array(
+   'styles' = array(
+   'stylesheets/specials/mobilemenu.css',
+   ),
+);
 $wgResourceModules['mobile.mobilefeedback.styles'] = 
$wgMFMobileSpecialPageResourceBoilerplate + array(
'styles' = array(
'stylesheets/specials/mobilefeedback.css',
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 3e55022..619c6f5 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -393,6 +393,8 @@
if ( isset( $wgResourceModules[ 
$specialScriptModuleName ] ) ) {
$moduleNames[] = $specialScriptModuleName;
}
+   } else {
+   $moduleNames[] = 'mobile.styles.page';
}
 
if ( $action === 'edit' ) {
diff --git a/less/common/hamburgermenu.less b/less/common/hamburgermenu.less
new file mode 100644
index 000..a1b42b8
--- /dev/null
+++ b/less/common/hamburgermenu.less
@@ -0,0 +1,95 @@
+/* Left menu */
+#mw-mf-page-left {
+   background-color: #4E4E4E;
+   font-family: Helvetica, Arial, sans-serif;
+   font-size: 1.2em;
+   bottom: 0;
+   top: 0;
+   margin-right: 0;
+   position: absolute;
+   border-right: solid 1px #AAA;
+   display: none; /* JS only */
+
+   #mw-mf-content-left {
+   height: 100%;
+   border-left: solid 12px #252525;
+   border-right: solid 1px black;
+   }
+
+   #mw-mf-menu-main {
+   list-style: none;
+   margin: 0;
+   padding: 0;
+   padding-bottom: 12px;
+
+   li {
+   text-shadow: 0 1px 0 black;
+   

[MediaWiki-commits] [Gerrit] Hide the 'Next' button until a license is chosen. - change (mediawiki...UploadWizard)

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

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


Change subject: Hide the 'Next' button until a license is chosen.
..

Hide the 'Next' button until a license is chosen.

When uploading an image the 'Continue' button only appears after the
files have uploaded, it therefore makes sense to show the 'next' button in
the license step only after any deed is selected.

This removes the need for the NullDeed

Change-Id: Id9551311d833ace26abff4bec1ad136a84206168
---
M UploadWizard.i18n.php
M UploadWizardHooks.php
M includes/specials/SpecialUploadWizard.php
M resources/mw.UploadWizardDeed.js
4 files changed, 2 insertions(+), 25 deletions(-)


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

diff --git a/UploadWizard.i18n.php b/UploadWizard.i18n.php
index 72ad625..f154a11 100644
--- a/UploadWizard.i18n.php
+++ b/UploadWizard.i18n.php
@@ -206,7 +206,6 @@
'mwe-upwiz-tooltip-location' = 'Coordinates of the location where this 
media file was created.',
'mwe-upwiz-tooltip-more-info' = 'Learn more.',
'mwe-upwiz-file-need-file' = 'Please add an upload first.',
-   'mwe-upwiz-deeds-need-deed' = 'Please explain where you got 
{{PLURAL:$1|this file|these files}} and how this site can use 
{{PLURAL:$1|it|them}}, by selecting one of the options.',
'mwe-upwiz-deeds-need-license' = 'Please select a license.',
'mwe-upwiz-license-show-all' = 'Use a different license',
'mwe-upwiz-license-show-recommended' = 'Use the recommended license',
diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index e12c89f..87b5fbe 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -317,7 +317,6 @@
'mwe-upwiz-tooltip-location',
'mwe-upwiz-tooltip-more-info',
'mwe-upwiz-file-need-file',
-   'mwe-upwiz-deeds-need-deed',
'mwe-upwiz-deeds-need-license',
'mwe-upwiz-license-show-all',
'mwe-upwiz-license-show-recommended',
diff --git a/includes/specials/SpecialUploadWizard.php 
b/includes/specials/SpecialUploadWizard.php
index 30e9aaf..217ca29 100644
--- a/includes/specials/SpecialUploadWizard.php
+++ b/includes/specials/SpecialUploadWizard.php
@@ -452,7 +452,7 @@
.   'div id=mwe-upwiz-deeds 
class=ui-helper-clearfix/div'
.   'div id=mwe-upwiz-deeds-custom 
class=ui-helper-clearfix/div'
.   'div class=mwe-upwiz-buttons'
-   .  'button class=mwe-upwiz-button-next' . 
$this-msg( mwe-upwiz-next-deeds )-text()  . '/button'
+   .  'button class=mwe-upwiz-button-next 
style=display:none;' . $this-msg( mwe-upwiz-next-deeds )-text()  . 
'/button'
.   '/div'
. '/div'
 
diff --git a/resources/mw.UploadWizardDeed.js b/resources/mw.UploadWizardDeed.js
index c4a274d..698eaf6 100644
--- a/resources/mw.UploadWizardDeed.js
+++ b/resources/mw.UploadWizardDeed.js
@@ -34,14 +34,6 @@
 
 };
 
-
-mw.UploadWizardNullDeed = $j.extend( new mw.UploadWizardDeed(), {
-   valid: function() {
-   return false;
-   }
-} );
-
-
 /**
  * Set up the form and deed object for the deed option that says these uploads 
are all the user's own work.
  * @param {Number} integer count of uploads that this deed refers to (useful 
for message pluralization)
@@ -416,10 +408,6 @@
 
// deselect all deeds
_this.deselectDeedInterface( this.$selector.find( '.mwe-upwiz-deed' ) );
-
-   // set the value to be the null deed; which will cause an error if 
the data is submitted.
-   _this.choose( mw.UploadWizardNullDeed );
-
 };
 
 
@@ -442,13 +430,6 @@
// otherwise, we can assume that the widgets have already added 
error messages.
if (valid) {
_this.hideError();
-   } else {
-   if ( _this.deed === mw.UploadWizardNullDeed ) {
-   _this.showError( gM( 
'mwe-upwiz-deeds-need-deed', _this.uploads.length ) );
-   $j( _this ).bind( 'chooseDeed', function() {
-   _this.hideError();
-   } );
-   }
}
return valid;
},
@@ -472,9 +453,7 @@
choose: function( deed ) {
var _this = this;
_this.deed = deed;
-   if ( deed !== mw.UploadWizardNullDeed ) {
-   $j( _this ).trigger( 'chooseDeed' );
-   }
+   $( '#mwe-upwiz-stepdiv-deeds .mwe-upwiz-button-next' ).show();
},
 
/**

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] Back to weird title - change (mediawiki...Wikibase)

2013-03-07 Thread John Erling Blad (Code Review)
John Erling Blad has uploaded a new change for review.

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


Change subject: Back to weird title
..

Back to weird title

In some part of the extension we are using words that simply don't
fit what we are doing, but some of the weird wording has stuck
somehow. In ItemByTitle we are really talking about a sitelink to
an external site, with a pair of site id and a title on the external
site, not about a single title. The last would be a local page.

Change-Id: I40f69948036cec605dc0aa342084d884a003dd50
---
M repo/Wikibase.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 9c3435f..4ba5532 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -113,7 +113,7 @@
'wikibase-itemlink-title' = '$1 | $2',
 
// Special pages
-   'special-itembytitle' = 'Item by sitelink',
+   'special-itembytitle' = 'Item by title',
'wikibase-itembytitle-lookup-fieldset' = 'Search for items by site and 
title',
'wikibase-itembytitle-lookup-site' = 'Site:',
'wikibase-itembytitle-lookup-page' = 'Page:',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40f69948036cec605dc0aa342084d884a003dd50
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad john.b...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Used config to identify valid exts; Made pre nowiki case i... - change (mediawiki...Parsoid)

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

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


Change subject: Used config to identify valid exts; Made pre  nowiki case 
insensitive
..

Used config to identify valid exts; Made pre  nowiki case insensitive

* Used config information to identify valid extensions and removed
  temporary hack.

* Made nowiki and pre tag matching case-insensitive.
  - RTing of these in original case is not yet done -- this seems
a little bit messy and will require fixing any tag-comparison
that doesn't do normalized case comparison.  Will also require
fixes to serializer.  Can be done post ongoing refactoring.

* 1 wt2wt test worse off -- this is because of RTing in normalized
  lower-case of nowiki tags.

Change-Id: Ie727b76926247d65abf4b9c3fe79afc32eb03827
---
M js/lib/mediawiki.Util.js
M js/lib/pegTokenizer.pegjs.txt
2 files changed, 27 insertions(+), 33 deletions(-)


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

diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index 028bba6..74a451b 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -803,25 +803,6 @@
}
console.error(out.join(arguments[1]));
},
-
-   // SSS FIXME: This should probably come from some config/api?
-   // This is just a temporary hack for this patch
-   installedExts: null,
-
-   extensionInstalled: function(env, name) {
-   // SSS FIXME: This is just a temporary hack for this patch.
-   //
-   // Once this info is available in the config, we should check
-   // env.conf.wiki.extensionTags instead.
-
-   if (!this.installedExts) {
-   this.installedExts = this.arrayToHash([
-   'categorytree', 'charinsert', 'gallery', 
'hiero', 'imagemap',
-   'inputbox', 'math', 'poem', 'syntaxhighlight', 
'tag', 'timeline'
-   ]);
-   }
-   return this.installedExts[name] === true;
-   }
 };
 
 /**
diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt
index fbeae09..3559e17 100644
--- a/js/lib/pegTokenizer.pegjs.txt
+++ b/js/lib/pegTokenizer.pegjs.txt
@@ -1251,6 +1251,12 @@
   return [l].concat(ls);
   }
 
+pre_tag_name =
+  tag:[prePRE]+ {
+  tag = tag.join('');
+  return tag.toLowerCase() === pre ? tag : null;
+  }
+
 // An indented pre block that is surrounded with pre tags. The pre tags are
 // used directly.
 // XXX gwicke: check if the first line is not indented, and round-trip spaces;
@@ -1259,12 +1265,12 @@
 pre_indent_in_tags
   =  { return stops.inc('pre'); }
space+ // XXX: capture space for round-tripping
-pre
+ pre_tag_name
 attribs:generic_attribute*
 
 l:inlineline
 ls:(sol pre_indent_line)*
-/pre
+/ pre_tag_name 
   {
 stops.dec('pre');
 var ret = [ new TagTk( 'pre', attribs, { tsr: [pos0, pos0] } ) ];
@@ -1288,7 +1294,7 @@
  */
 pre
   =  { return stops.inc('pre'); }
-pre
+ pre_tag_name
 attribs:generic_attribute*
 endpos:( { return pos })
 // MediaWiki pre is special in that it converts all pre content to plain
@@ -1296,14 +1302,14 @@
 ts:(newlineToken
 / (htmlentity / [^]+)+
 / nowiki
-/ !/pre t2:(htmlentity / .) { return t2 })+
-(/pre / eof) {
+/ !(/ pre_tag_name ) t2:(htmlentity / .) { return t2 })+
+(/ pre_tag_name  / eof) {
 stops.dec('pre');
 // return nowiki tags as well?
 return [ new TagTk( 'pre', attribs, { stx: 'html', tsr: [pos0, endpos] 
} ) ]
 .concat(flatten_stringlist(ts), [ new EndTagTk( 'pre', [], 
{ tsr: [pos - 6, pos] } ) ]);
 }
-  / /pre { stops.dec('pre'); return /pre; }
+  / / pre_tag_name  { stops.dec('pre'); return /pre; }
   /  { return stops.dec('pre'); }
 
 /* ---
@@ -1325,7 +1331,7 @@
 var tagName = t.name.toLowerCase(),
 dp = t.dataAttribs,
 isHtmlTag = html5_tag_names[tagName] === true || 
html_old_names[tagName] === true,
-isInstalledExt = Util.extensionInstalled(pegArgs.env, tagName),
+isInstalledExt = pegArgs.env.conf.wiki.isExtensionTag(tagName),
 supportedTag = nativeParsoidExts[tagName] === true;
 
 if (!isHtmlTag  !isInstalledExt  !supportedTag) {
@@ -1464,9 +1470,16 @@
  * pre blocks would still remain in the grammar though, so overall handling it
  * all here is cleaner.
  */
+
+nowiki_tag_name =
+  tag:[nowikNOWIK]+ {
+  tag = tag.join('');
+  return tag.toLowerCase() === nowiki ? tag : null;
+  }
+
 nowiki
-  = nowiki nc:nowiki_content /nowiki {
-//console.warn( 'full 

[MediaWiki-commits] [Gerrit] Back to weird title - change (mediawiki...Wikibase)

2013-03-07 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Back to weird title
..


Back to weird title

In some part of the extension we are using words that simply don't
fit what we are doing, but some of the weird wording has stuck
somehow. In ItemByTitle we are really talking about a sitelink to
an external site, with a pair of site id and a title on the external
site, not about a single title. The last would be a local page.

Change-Id: I40f69948036cec605dc0aa342084d884a003dd50
---
M repo/Wikibase.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 9c3435f..4ba5532 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -113,7 +113,7 @@
'wikibase-itemlink-title' = '$1 | $2',
 
// Special pages
-   'special-itembytitle' = 'Item by sitelink',
+   'special-itembytitle' = 'Item by title',
'wikibase-itembytitle-lookup-fieldset' = 'Search for items by site and 
title',
'wikibase-itembytitle-lookup-site' = 'Site:',
'wikibase-itembytitle-lookup-page' = 'Page:',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I40f69948036cec605dc0aa342084d884a003dd50
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad john.b...@wikimedia.de
Gerrit-Reviewer: John Erling Blad john.b...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Read full memcached response before manipulating data - change (mediawiki/core)

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

Change subject: Read full memcached response before manipulating data
..


Read full memcached response before manipulating data

Memcached response when fetching data typically looks like this:
VALUE the stored value for whatever key you requested
END

What the code used to do is read the first line (the VALUE) and re-
assemble the data being fetched there (like unserializing serialized
data). After that, it will read the next line (END).

The value could be a serialized object, which could have a __wakeup.
This __wakeup could have code which in turn executes Memcached-
related stuff. The problem is that, while that object is being
unserialized already, it's wakeup code is attempting to read new
stuff from Memcached, but we have yet to read the END of the data
we're attempting to unserialize (when we'll read a new value from
Memcached, the first thing we'd get is the END we have not yet read..)

The correct way to go about this would be to first read the full
Memcached response, and only unserialize the read data after that.
This is exactly what this patchset does.

Change-Id: I902809c6dde657091c8161a09df823170bd41f7a
---
M includes/objectcache/MemcachedClient.php
M tests/phpunit/includes/objectcache/BagOStuffTest.php
2 files changed, 62 insertions(+), 18 deletions(-)

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



diff --git a/includes/objectcache/MemcachedClient.php 
b/includes/objectcache/MemcachedClient.php
index 2342d63..54f6c59 100644
--- a/includes/objectcache/MemcachedClient.php
+++ b/includes/objectcache/MemcachedClient.php
@@ -908,34 +908,47 @@
 * @access private
 */
function _load_items( $sock, $ret, $casToken = null ) {
+   $results = array();
+
while ( 1 ) {
$decl = $this-_fgets( $sock );
if( $decl === false ) {
return false;
-   } elseif ( $decl == END ) {
-   return true;
} elseif ( preg_match( '/^VALUE (\S+) (\d+) (\d+) 
(\d+)$/', $decl, $match ) ) {
-   list( $rkey, $flags, $len, $casToken ) = array( 
$match[1], $match[2], $match[3], $match[4] );
-   $data = $this-_fread( $sock, $len + 2 );
-   if ( $data === false ) {
+
+   $results[] = array(
+   $match[1], // rkey
+   $match[2], // flags
+   $match[3], // len
+   $match[4], // casToken
+   $this-_fread( $sock, $match[3] + 2 ), 
// data
+   );
+   } elseif ( $decl == END ) {
+   if ( count( $results ) == 0 ) {
return false;
}
-   if ( substr( $data, -2 ) !== \r\n ) {
-   $this-_handle_error( $sock,
-   'line ending missing from data 
block from $1' );
-   return false;
-   }
-   $data = substr( $data, 0, -2 );
-   $ret[$rkey] = $data;
 
-   if ( $this-_have_zlib  $flags  
self::COMPRESSED ) {
-   $ret[$rkey] = gzuncompress( $ret[$rkey] 
);
+   foreach ( $results as $vars ) {
+   list( $rkey, $flags, $len, $casToken, 
$data ) = $vars;
+
+   if ( $data === false || substr( $data, 
-2 ) !== \r\n ) {
+   $this-_handle_error( $sock,
+   'line ending missing 
from data block from $1' );
+   return false;
+   }
+   $data = substr( $data, 0, -2 );
+   $ret[$rkey] = $data;
+
+   if ( $this-_have_zlib  $flags  
self::COMPRESSED ) {
+   $ret[$rkey] = gzuncompress( 
$ret[$rkey] );
+   }
+
+   if ( $flags  self::SERIALIZED ) {
+   $ret[$rkey] = unserialize( 
$ret[$rkey] );
+   }
}
 
-   if ( $flags  self::SERIALIZED ) {
-  

[MediaWiki-commits] [Gerrit] Bug 45819 - Fix RSS plugin on wmfwiki - change (operations/mediawiki-config)

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

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


Change subject: Bug 45819 - Fix RSS plugin on wmfwiki
..

Bug 45819 - Fix RSS plugin on wmfwiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7723bcb..e38acb8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10296,7 +10296,11 @@
 'wmgRSSUrlWhitelist' = array(
'default' = array(),  // as of Ext:RSS v2, this means no URLs are 
allowed.
'uawikimedia' = array( 'http://wikimediaukraine.wordpress.com/feed/' ),
-   'foundationwiki' = array( 'http://blog.wikimedia.org/feed/' ),
+   'foundationwiki' = array(
+   'http://blog.wikimedia.org/feed/',
+   'http://blog.wikimedia.org/c/our-wikis/wikimediacommons/feed/',
+   
'http://blog.wikimedia.org/c/communications/picture-of-the-day/feed/',
+   ),
 ),
 
 'wmgUseDoubleWiki' = array(

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

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

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


[MediaWiki-commits] [Gerrit] Bug 45819 - Fix RSS plugin on wmfwiki - change (operations/mediawiki-config)

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

Change subject: Bug 45819 - Fix RSS plugin on wmfwiki
..


Bug 45819 - Fix RSS plugin on wmfwiki

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7723bcb..e38acb8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10296,7 +10296,11 @@
 'wmgRSSUrlWhitelist' = array(
'default' = array(),  // as of Ext:RSS v2, this means no URLs are 
allowed.
'uawikimedia' = array( 'http://wikimediaukraine.wordpress.com/feed/' ),
-   'foundationwiki' = array( 'http://blog.wikimedia.org/feed/' ),
+   'foundationwiki' = array(
+   'http://blog.wikimedia.org/feed/',
+   'http://blog.wikimedia.org/c/our-wikis/wikimediacommons/feed/',
+   
'http://blog.wikimedia.org/c/communications/picture-of-the-day/feed/',
+   ),
 ),
 
 'wmgUseDoubleWiki' = array(

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

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

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


[MediaWiki-commits] [Gerrit] Docs for gerrit 47419 - change (mediawiki/core)

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

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


Change subject: Docs for gerrit 47419
..

Docs for gerrit 47419

Change-Id: I021b7250418e60397127e1778107ee3da77ffb18
---
M includes/objectcache/MemcachedClient.php
1 file changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/52632/1

diff --git a/includes/objectcache/MemcachedClient.php 
b/includes/objectcache/MemcachedClient.php
index 441c02b..f8ce0d0 100644
--- a/includes/objectcache/MemcachedClient.php
+++ b/includes/objectcache/MemcachedClient.php
@@ -911,10 +911,21 @@
 
while ( 1 ) {
$decl = $this-_fgets( $sock );
+
if( $decl === false ) {
+   /*
+* If nothing can be read, something is wrong 
because we know exactly when
+* to stop reading (right after END) and we 
return right after that.
+*/
return false;
} elseif ( preg_match( '/^VALUE (\S+) (\d+) (\d+) 
(\d+)$/', $decl, $match ) ) {
-
+   /*
+* Read all data returned. This can be either 
one or multiple values.
+* Save all that data (in an array) to be 
processed later: we'll first
+* want to continue reading until END before 
doing anything else,
+* to make sure that we don't leave our client 
in a state where it's
+* output is not yet fully read.
+*/
$results[] = array(
$match[1], // rkey
$match[2], // flags
@@ -927,6 +938,10 @@
return false;
}
 
+   /**
+* All data has been read, time to process the 
data and build
+* meaningful return values.
+*/
foreach ( $results as $vars ) {
list( $rkey, $flags, $len, $casToken, 
$data ) = $vars;
 
@@ -942,6 +957,15 @@
$ret[$rkey] = gzuncompress( 
$ret[$rkey] );
}
 
+   /*
+* This unserialize is the exact reason 
that we only want to
+* process data after having read until 
END (instead of doing
+* this right away): unserialize can 
trigger outside code:
+* in the event that $ret[$rkey] is a 
serialized object,
+* unserializing it will trigger 
__wakeup() if present. If that
+* function attempted to read from 
memcached (while we did not
+* yet read END), these 2 calls would 
collide.
+*/
if ( $flags  self::SERIALIZED ) {
$ret[$rkey] = unserialize( 
$ret[$rkey] );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I021b7250418e60397127e1778107ee3da77ffb18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] New version: 1.6 - change (mediawiki...ExternalData)

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

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


Change subject: New version: 1.6
..

New version: 1.6

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


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

diff --git a/ExternalData.php b/ExternalData.php
index f886bdb..762499d 100644
--- a/ExternalData.php
+++ b/ExternalData.php
@@ -12,7 +12,7 @@
 $wgExtensionCredits['parserhook'][] = array(
'path'   = __FILE__,
'name'   = 'External Data',
-   'version'= '1.5',
+   'version'= '1.6',
'author' = array( 'Yaron Koren', 'Michael Dale', 'David 
Macdonald' ),
'url'= 
'https://www.mediawiki.org/wiki/Extension:External_Data',
'descriptionmsg' = 'externaldata-desc',

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

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

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


[MediaWiki-commits] [Gerrit] New version: 1.6 - change (mediawiki...ExternalData)

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

Change subject: New version: 1.6
..


New version: 1.6

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

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



diff --git a/ExternalData.php b/ExternalData.php
index f886bdb..762499d 100644
--- a/ExternalData.php
+++ b/ExternalData.php
@@ -12,7 +12,7 @@
 $wgExtensionCredits['parserhook'][] = array(
'path'   = __FILE__,
'name'   = 'External Data',
-   'version'= '1.5',
+   'version'= '1.6',
'author' = array( 'Yaron Koren', 'Michael Dale', 'David 
Macdonald' ),
'url'= 
'https://www.mediawiki.org/wiki/Extension:External_Data',
'descriptionmsg' = 'externaldata-desc',

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

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

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


[MediaWiki-commits] [Gerrit] Used config to identify valid exts; Made pre nowiki case i... - change (mediawiki...Parsoid)

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

Change subject: Used config to identify valid exts; Made pre  nowiki case 
insensitive
..


Used config to identify valid exts; Made pre  nowiki case insensitive

* Used config information to identify valid extensions and removed
  temporary hack.

* Made nowiki and pre tag matching case-insensitive.
  - RTing of these in original case is not yet done -- this seems
a little bit messy and will require fixing any tag-comparison
that doesn't do normalized case comparison.  Will also require
fixes to serializer.  Can be done post ongoing refactoring.

* 1 wt2wt test worse off -- this is because of RTing in normalized
  lower-case of nowiki tags.

Change-Id: Ie727b76926247d65abf4b9c3fe79afc32eb03827
---
M js/lib/mediawiki.Util.js
M js/lib/pegTokenizer.pegjs.txt
2 files changed, 27 insertions(+), 33 deletions(-)

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



diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index 028bba6..74a451b 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -803,25 +803,6 @@
}
console.error(out.join(arguments[1]));
},
-
-   // SSS FIXME: This should probably come from some config/api?
-   // This is just a temporary hack for this patch
-   installedExts: null,
-
-   extensionInstalled: function(env, name) {
-   // SSS FIXME: This is just a temporary hack for this patch.
-   //
-   // Once this info is available in the config, we should check
-   // env.conf.wiki.extensionTags instead.
-
-   if (!this.installedExts) {
-   this.installedExts = this.arrayToHash([
-   'categorytree', 'charinsert', 'gallery', 
'hiero', 'imagemap',
-   'inputbox', 'math', 'poem', 'syntaxhighlight', 
'tag', 'timeline'
-   ]);
-   }
-   return this.installedExts[name] === true;
-   }
 };
 
 /**
diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt
index fbeae09..3559e17 100644
--- a/js/lib/pegTokenizer.pegjs.txt
+++ b/js/lib/pegTokenizer.pegjs.txt
@@ -1251,6 +1251,12 @@
   return [l].concat(ls);
   }
 
+pre_tag_name =
+  tag:[prePRE]+ {
+  tag = tag.join('');
+  return tag.toLowerCase() === pre ? tag : null;
+  }
+
 // An indented pre block that is surrounded with pre tags. The pre tags are
 // used directly.
 // XXX gwicke: check if the first line is not indented, and round-trip spaces;
@@ -1259,12 +1265,12 @@
 pre_indent_in_tags
   =  { return stops.inc('pre'); }
space+ // XXX: capture space for round-tripping
-pre
+ pre_tag_name
 attribs:generic_attribute*
 
 l:inlineline
 ls:(sol pre_indent_line)*
-/pre
+/ pre_tag_name 
   {
 stops.dec('pre');
 var ret = [ new TagTk( 'pre', attribs, { tsr: [pos0, pos0] } ) ];
@@ -1288,7 +1294,7 @@
  */
 pre
   =  { return stops.inc('pre'); }
-pre
+ pre_tag_name
 attribs:generic_attribute*
 endpos:( { return pos })
 // MediaWiki pre is special in that it converts all pre content to plain
@@ -1296,14 +1302,14 @@
 ts:(newlineToken
 / (htmlentity / [^]+)+
 / nowiki
-/ !/pre t2:(htmlentity / .) { return t2 })+
-(/pre / eof) {
+/ !(/ pre_tag_name ) t2:(htmlentity / .) { return t2 })+
+(/ pre_tag_name  / eof) {
 stops.dec('pre');
 // return nowiki tags as well?
 return [ new TagTk( 'pre', attribs, { stx: 'html', tsr: [pos0, endpos] 
} ) ]
 .concat(flatten_stringlist(ts), [ new EndTagTk( 'pre', [], 
{ tsr: [pos - 6, pos] } ) ]);
 }
-  / /pre { stops.dec('pre'); return /pre; }
+  / / pre_tag_name  { stops.dec('pre'); return /pre; }
   /  { return stops.dec('pre'); }
 
 /* ---
@@ -1325,7 +1331,7 @@
 var tagName = t.name.toLowerCase(),
 dp = t.dataAttribs,
 isHtmlTag = html5_tag_names[tagName] === true || 
html_old_names[tagName] === true,
-isInstalledExt = Util.extensionInstalled(pegArgs.env, tagName),
+isInstalledExt = pegArgs.env.conf.wiki.isExtensionTag(tagName),
 supportedTag = nativeParsoidExts[tagName] === true;
 
 if (!isHtmlTag  !isInstalledExt  !supportedTag) {
@@ -1464,9 +1470,16 @@
  * pre blocks would still remain in the grammar though, so overall handling it
  * all here is cleaner.
  */
+
+nowiki_tag_name =
+  tag:[nowikNOWIK]+ {
+  tag = tag.join('');
+  return tag.toLowerCase() === nowiki ? tag : null;
+  }
+
 nowiki
-  = nowiki nc:nowiki_content /nowiki {
-//console.warn( 'full nowiki return: ' + pp(nc));
+  =  nowiki_tag_name  nc:nowiki_content / nowiki_tag_name  

[MediaWiki-commits] [Gerrit] mw.title:getContent() should record in templatelinks - change (mediawiki...Scribunto)

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

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


Change subject: mw.title:getContent() should record in templatelinks
..

mw.title:getContent() should record in templatelinks

Since the content of a page is being loaded, this should be recorded in
templatelinks so things can be updated properly when that page is
edited.

Change-Id: I3e720fee2705f6c08ac0456c3cab0ed4ede84536
---
M engines/LuaCommon/TitleLibrary.php
M tests/engines/LuaCommon/TitleLibraryTest.php
2 files changed, 19 insertions(+), 0 deletions(-)


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

diff --git a/engines/LuaCommon/TitleLibrary.php 
b/engines/LuaCommon/TitleLibrary.php
index 1dd5b06..c48390f 100644
--- a/engines/LuaCommon/TitleLibrary.php
+++ b/engines/LuaCommon/TitleLibrary.php
@@ -202,6 +202,12 @@
if ( !$title ) {
return array( null );
}
+
+   // Record in templatelinks, so edits cause the page to be 
refreshed
+   $this-getParser()-getOutput()-addTemplate(
+   $title, $title-getArticleID(), $title-getLatestRevID()
+   );
+
$rev = Revision::newFromTitle( $title );
if ( !$rev ) {
return array( null );
diff --git a/tests/engines/LuaCommon/TitleLibraryTest.php 
b/tests/engines/LuaCommon/TitleLibraryTest.php
index b72151a..72ec5af 100644
--- a/tests/engines/LuaCommon/TitleLibraryTest.php
+++ b/tests/engines/LuaCommon/TitleLibraryTest.php
@@ -85,6 +85,7 @@
$engine = $this-getEngine();
$interpreter = $engine-getInterpreter();
 
+   // Loading a title should create a link
$links = $engine-getParser()-getOutput()-getLinks();
$this-assertFalse( isset( 
$links[NS_PROJECT]['Referenced_from_Lua'] ) );
 
@@ -95,5 +96,17 @@
$links = $engine-getParser()-getOutput()-getLinks();
$this-assertArrayHasKey( NS_PROJECT, $links );
$this-assertArrayHasKey( 'Referenced_from_Lua', 
$links[NS_PROJECT] );
+
+   // Loading the page content should create a templatelink
+   $templates = $engine-getParser()-getOutput()-getTemplates();
+   $this-assertFalse( isset( 
$links[NS_PROJECT]['Loaded_from_Lua'] ) );
+
+   $interpreter-callFunction(
+   $interpreter-loadString( 'mw.title.new( 
Project:Loaded from Lua ):getContent()', 'load title' )
+   );
+
+   $templates = $engine-getParser()-getOutput()-getTemplates();
+   $this-assertArrayHasKey( NS_PROJECT, $templates );
+   $this-assertArrayHasKey( 'Loaded_from_Lua', 
$templates[NS_PROJECT] );
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] [FileBackend] Added a ttl option to getFileHttpUrl(). - change (mediawiki/core)

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

Change subject: [FileBackend] Added a ttl option to getFileHttpUrl().
..


[FileBackend] Added a ttl option to getFileHttpUrl().

Change-Id: Ifc7b9c012276ed1f1e436ffafbd5615689680054
---
M includes/filebackend/FileBackend.php
M includes/filebackend/SwiftFileBackend.php
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/includes/filebackend/FileBackend.php 
b/includes/filebackend/FileBackend.php
index 3ebfdb1..47bc7ac 100644
--- a/includes/filebackend/FileBackend.php
+++ b/includes/filebackend/FileBackend.php
@@ -1016,6 +1016,7 @@
 * @param $params Array
 * $params include:
 *   - src : source storage path
+*   - ttl : lifetime (seconds) if pre-authenticated; default is 1 day
 * @return string|null
 * @since 1.21
 */
diff --git a/includes/filebackend/SwiftFileBackend.php 
b/includes/filebackend/SwiftFileBackend.php
index 9c271ea..471cd4b 100644
--- a/includes/filebackend/SwiftFileBackend.php
+++ b/includes/filebackend/SwiftFileBackend.php
@@ -1210,12 +1210,13 @@
return null; // invalid path
}
try {
+   $ttl = isset( $params['ttl'] ) ? $params['ttl'] 
: 86400;
$sContObj = $this-getContainer( $srcCont );
$obj = new CF_Object( $sContObj, $srcRel, 
false, false ); // skip HEAD
if ( $this-swiftTempUrlKey != '' ) {
-   return $obj-get_temp_url( 
$this-swiftTempUrlKey, 86400, GET );
+   return $obj-get_temp_url( 
$this-swiftTempUrlKey, $ttl, GET );
} else { // give S3 API URL for rgw
-   $expires = time() + 86400;
+   $expires = time() + $ttl;
// Path for signature starts with the 
bucket
$spath = '/' . rawurlencode( $srcCont ) 
. '/' .
str_replace( '%2F', '/', 
rawurlencode( $srcRel ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc7b9c012276ed1f1e436ffafbd5615689680054
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@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] Use git diff --patience to compare test results - change (mediawiki...Parsoid)

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

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


Change subject: Use git diff --patience to compare test results
..

Use git diff --patience to compare test results

The 'patience' algorithm produces a larger diff, but mostly avoids mixing test
results from unrelated tests which made the default diff often very hard to
decipher.

Change-Id: I323b483731b2d0a456e88e0511c8202c5b71a190
---
M js/tests/runtests.sh
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/js/tests/runtests.sh b/js/tests/runtests.sh
index d25ce14..566f336 100755
--- a/js/tests/runtests.sh
+++ b/js/tests/runtests.sh
@@ -60,7 +60,7 @@
 
 cd results || exit 1
 if [ $1 != '-c' -a $2 != '-c' ];then
-git diff | less -R
+git diff --patience | less -R
 else
git add $OUTPUT
 if [ $1 = '--wt2wt' ];then
@@ -73,6 +73,6 @@
 git commit -m `tail -11 all.txt` all.txt || exit 1
 fi
 if [ $2 != '-q'];then
-git diff HEAD~1 | less -R || exit 1
+git diff --patience HEAD~1 | less -R || exit 1
 fi
 fi

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I323b483731b2d0a456e88e0511c8202c5b71a190
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] scroll to first error on clicking 'next' - change (mediawiki...UploadWizard)

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

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


Change subject: scroll to first error on clicking 'next'
..

scroll to first error on clicking 'next'

on clicking 'Next' we scroll to the topmost error, the user can click this
several times to go the next erorrs and so on.

bug: 30649
Change-Id: Ib0561f5f93f60ada0bd0206be742c6aad79d9e2f
---
M resources/mw.UploadWizard.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index e044053..44ccb20 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -1109,6 +1109,8 @@
var errorCount = $errorElements.length;
if ( errorCount  0 ) {
$( '#mwe-upwiz-details-error-count' ).msg( 
'mwe-upwiz-details-error-count', errorCount, this.uploads.length );
+   // Scroll to the first error
+   $( 'html,body' ).animate( { scrollTop: $( 
$errorElements[0] ).offset().top - 50 }, 'slow');
} else {
$( '#mwe-upwiz-details-error-count' ).empty();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0561f5f93f60ada0bd0206be742c6aad79d9e2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 nischay...@gmail.com
Gerrit-Reviewer: Eloquence e...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix proofreading view - change (mediawiki...Translate)

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

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


Change subject: Fix proofreading view
..

Fix proofreading view

Only translate view has message editors that can be preloaded.

Change-Id: I1d95571f035c1cf3f1af6e08723a5d500a5e86bc
---
M resources/js/ext.translate.messagetable.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index 88178c8..00371a8 100644
--- a/resources/js/ext.translate.messagetable.js
+++ b/resources/js/ext.translate.messagetable.js
@@ -372,7 +372,7 @@
message.group = messagegroup;
messageTable.add( message );
messageTable.messages.push( message );
-   if ( index === 0 ) {
+   if ( index === 0  this.mode === 
'translate' ) {
$( '.tux-message:first' ).data( 
'translateeditor' ).init();
}
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d95571f035c1cf3f1af6e08723a5d500a5e86bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Adding specials folder to CheckUser and moving SpecialCheckU... - change (mediawiki...CheckUser)

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

Change subject: Adding specials folder to CheckUser and moving 
SpecialCheckUserLog there.
..


Adding specials folder to CheckUser and moving SpecialCheckUserLog there.

Change-Id: I8e139dcb85a61e70486ba28cb5d24954ea5b88d7
---
M CheckUser.php
R specials/SpecialCheckUserLog.php
2 files changed, 1 insertion(+), 1 deletion(-)

Approvals:
  CSteipp: Verified; Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve



diff --git a/CheckUser.php b/CheckUser.php
index b140696..54eb2f0 100644
--- a/CheckUser.php
+++ b/CheckUser.php
@@ -98,7 +98,7 @@
 $wgAutoloadClasses['CheckUser'] = $dir . '/CheckUser_body.php';
 $wgAutoloadClasses['CheckUserHooks'] = $dir . '/CheckUser.hooks.php';
 $wgAutoloadClasses['CheckUserLogPager'] = $dir . '/CheckUserLogPager.php';
-$wgAutoloadClasses['SpecialCheckUserLog'] = $dir . '/SpecialCheckUserLog.php';
+$wgAutoloadClasses['SpecialCheckUserLog'] = $dir . 
'/specials/SpecialCheckUserLog.php';
 $wgAutoloadClasses['CheckUserEncryptedData'] = $dir . 
'/CheckUserEncryptedData.php';
 
 // API modules
diff --git a/SpecialCheckUserLog.php b/specials/SpecialCheckUserLog.php
similarity index 100%
rename from SpecialCheckUserLog.php
rename to specials/SpecialCheckUserLog.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e139dcb85a61e70486ba28cb5d24954ea5b88d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Pgehres pgeh...@wikimedia.org
Gerrit-Reviewer: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Pgehres pgeh...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Overhaul of the AbuseFilter JS - change (mediawiki...AbuseFilter)

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

Change subject: Overhaul of the AbuseFilter JS
..


Overhaul of the AbuseFilter JS

I've changed the JS of the AbuseFilter extension to match our
coding conventions and made it use mediaWiki.Api(). Furthermore
I fixed several error handlers and made some things nicer in
general while trying to not change the user appearance.

I've tested the changes as good as I could (I'm pretty sure everything
works).

Change-Id: Iaa0f99367bd7e0bfaf7249dcc9ac9ce9881b46e1
---
M AbuseFilter.php
M modules/ext.abuseFilter.edit.js
M modules/ext.abuseFilter.examine.js
M modules/ext.abuseFilter.tools.js
4 files changed, 342 insertions(+), 233 deletions(-)

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



diff --git a/AbuseFilter.php b/AbuseFilter.php
index 6f3adc9..65d3e3c 100644
--- a/AbuseFilter.php
+++ b/AbuseFilter.php
@@ -120,6 +120,7 @@
),
'dependencies' = array(
'mediawiki.util',
+   'mediawiki.api',
'jquery.textSelection',
'jquery.spinner',
),
@@ -131,9 +132,12 @@
'abusefilter-reautoconfirm-notallowed',
'abusefilter-reautoconfirm-none',
'abusefilter-reautoconfirm-done',
+   'unknown-error',
),
'dependencies' = array(
-   'mediawiki.util',
+   'mediawiki.api',
+   'mediawiki.notify',
+   'user.tokens',
'jquery.spinner'
),
 ) + $commonModuleInfo;
@@ -145,9 +149,12 @@
'abusefilter-examine-nomatch',
'abusefilter-examine-syntaxerror',
'abusefilter-examine-notfound',
+   'abusefilter-mustbeeditor',
+   'unknown-error',
),
'dependencies' = array(
-   'mediawiki.util',
+   'jquery.spinner',
+   'mediawiki.api'
),
 ) + $commonModuleInfo;
 
diff --git a/modules/ext.abuseFilter.edit.js b/modules/ext.abuseFilter.edit.js
index 021ffce..e49ec2b 100644
--- a/modules/ext.abuseFilter.edit.js
+++ b/modules/ext.abuseFilter.edit.js
@@ -1,78 +1,115 @@
-// AbuseFilter editing stuff
-( function( $, mw ) {
+/**
+ * AbuseFilter editing JavaScript
+ *
+ * @author John Du Hart
+ * @author Marius Hoch h...@online.de
+ */
+
+( function( mw, $ ) {
+   'use strict';
 
// Filter textarea
// @var {jQuery}
-   var $filterBox = [],
-   // Reference to this
-   // @var {this}
-   that = this,
-   // Returns the currently selected warning message
-   // @returns {String} current warning message
-   getCurrentWarningMessage = function() {
-   var message = 
$('#mw-abusefilter-warn-message-existing').val();
+   var $filterBox;
 
-   if ( message === 'other' ) {
-   message = 
$('#mw-abusefilter-warn-message-other').val();
-   }
+   /**
+* Returns the currently selected warning message
+*
+* @returns {string} current warning message
+*/
+   function getCurrentWarningMessage() {
+   var message = $( '#mw-abusefilter-warn-message-existing' 
).val();
 
-   return message;
-   };
+   if ( message === 'other' ) {
+   message = $( '#mw-abusefilter-warn-message-other' 
).val();
+   }
 
-   // Sends the current filter text to be checked for syntax issues
-   this.doSyntaxCheck = function() {
+   return message;
+   }
+
+   /**
+* Sends the current filter text to be checked for syntax issues
+*/
+   function doSyntaxCheck() {
var filter = $filterBox.val();
 
-   $( this ).injectSpinner( 'abusefilter-syntaxcheck' );
-   this.disabled = true;
-   $.getJSON(
-   mw.util.wikiScript( 'api' ), {
-   action: 'abusefilterchecksyntax',
-   filter: filter,
-   format: 'json'
-   }, that.processSyntaxResult
-   );
-   };
+   $( this )
+   .attr( 'disabled', 'disabled' )
+   .injectSpinner( 'abusefilter-syntaxcheck' );
 
-   // Takes the data retrieved in doSyntaxCheck and processes it
-   // @param {Object} data Data returned from the AJAX request
-   this.processSyntaxResult = function( data ) {
-   data = data.abusefilterchecksyntax;
+   var api = new mw.Api();
+   api.get( {
+   action: 'abusefilterchecksyntax',
+   filter: filter
+   } )
+   .done( processSyntaxResult )
+

[MediaWiki-commits] [Gerrit] Docs for gerrit 47419 - change (mediawiki/core)

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

Change subject: Docs for gerrit 47419
..


Docs for gerrit 47419

Change-Id: I021b7250418e60397127e1778107ee3da77ffb18
---
M includes/objectcache/MemcachedClient.php
1 file changed, 25 insertions(+), 1 deletion(-)

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



diff --git a/includes/objectcache/MemcachedClient.php 
b/includes/objectcache/MemcachedClient.php
index 441c02b..f8ce0d0 100644
--- a/includes/objectcache/MemcachedClient.php
+++ b/includes/objectcache/MemcachedClient.php
@@ -911,10 +911,21 @@
 
while ( 1 ) {
$decl = $this-_fgets( $sock );
+
if( $decl === false ) {
+   /*
+* If nothing can be read, something is wrong 
because we know exactly when
+* to stop reading (right after END) and we 
return right after that.
+*/
return false;
} elseif ( preg_match( '/^VALUE (\S+) (\d+) (\d+) 
(\d+)$/', $decl, $match ) ) {
-
+   /*
+* Read all data returned. This can be either 
one or multiple values.
+* Save all that data (in an array) to be 
processed later: we'll first
+* want to continue reading until END before 
doing anything else,
+* to make sure that we don't leave our client 
in a state where it's
+* output is not yet fully read.
+*/
$results[] = array(
$match[1], // rkey
$match[2], // flags
@@ -927,6 +938,10 @@
return false;
}
 
+   /**
+* All data has been read, time to process the 
data and build
+* meaningful return values.
+*/
foreach ( $results as $vars ) {
list( $rkey, $flags, $len, $casToken, 
$data ) = $vars;
 
@@ -942,6 +957,15 @@
$ret[$rkey] = gzuncompress( 
$ret[$rkey] );
}
 
+   /*
+* This unserialize is the exact reason 
that we only want to
+* process data after having read until 
END (instead of doing
+* this right away): unserialize can 
trigger outside code:
+* in the event that $ret[$rkey] is a 
serialized object,
+* unserializing it will trigger 
__wakeup() if present. If that
+* function attempted to read from 
memcached (while we did not
+* yet read END), these 2 calls would 
collide.
+*/
if ( $flags  self::SERIALIZED ) {
$ret[$rkey] = unserialize( 
$ret[$rkey] );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I021b7250418e60397127e1778107ee3da77ffb18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Rename job classes to more specific names - change (mediawiki...Translate)

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

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


Change subject: Rename job classes to more specific names
..

Rename job classes to more specific names

RenderJob - TranslateRenderJob
DeleteJob - TranslateDeleteJob
MoveJob - TranslateMoveJob

Change-Id: I23d0226545863960fb955f9d5498e6ad5ec13822
---
M TranslateHooks.php
M _autoload.php
M tag/PageTranslationHooks.php
M tag/SpecialPageTranslation.php
M tag/SpecialPageTranslationDeletePage.php
M tag/SpecialPageTranslationMovePage.php
R tag/TranslateDeleteJob.php
R tag/TranslateMoveJob.php
R tag/TranslateRenderJob.php
M tests/PageTranslationTaggingTest.php
10 files changed, 27 insertions(+), 24 deletions(-)


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

diff --git a/TranslateHooks.php b/TranslateHooks.php
index b476741..fee79d8 100644
--- a/TranslateHooks.php
+++ b/TranslateHooks.php
@@ -71,9 +71,12 @@
$wgLogActionsHandlers['pagetranslation/dissociate'] = 
'PageTranslationLogFormatter';
 
global $wgJobClasses;
-   $wgJobClasses['RenderJob'] = 'RenderJob';
-   $wgJobClasses['MoveJob'] = 'MoveJob';
-   $wgJobClasses['DeleteJob'] = 'DeleteJob';
+   $wgJobClasses['TranslateRenderJob'] = 
'TranslateRenderJob';
+   $wgJobClasses['RenderJob'] = 'TranslateRenderJob';
+   $wgJobClasses['TranslateMoveJob'] = 'TranslateMoveJob';
+   $wgJobClasses['MoveJob'] = 'TranslateMoveJob';
+   $wgJobClasses['TranslateDeleteJob'] = 
'TranslateDeleteJob';
+   $wgJobClasses['DeleteJob'] = 'TranslateDeleteJob';
 
// Namespaces
global $wgPageTranslationNamespace;
diff --git a/_autoload.php b/_autoload.php
index f40a03d..b8be167 100644
--- a/_autoload.php
+++ b/_autoload.php
@@ -132,11 +132,11 @@
  * @ingroup PageTranslation
  * @{
  */
-$wgAutoloadClasses['DeleteJob'] = $dir/tag/DeleteJob.php;
-$wgAutoloadClasses['MoveJob'] = $dir/tag/MoveJob.php;
+$wgAutoloadClasses['TranslateDeleteJob'] = $dir/tag/TranslateDeleteJob.php;
+$wgAutoloadClasses['TranslateMoveJob'] = $dir/tag/TranslateMoveJob.php;
 $wgAutoloadClasses['PageTranslationHooks'] = 
$dir/tag/PageTranslationHooks.php;
 $wgAutoloadClasses['PageTranslationLogFormatter'] = 
$dir/tag/PageTranslationLogFormatter.php;
-$wgAutoloadClasses['RenderJob'] = $dir/tag/RenderJob.php;
+$wgAutoloadClasses['TranslateRenderJob'] = $dir/tag/TranslateRenderJob.php;
 $wgAutoloadClasses['SpecialPageTranslation'] = 
$dir/tag/SpecialPageTranslation.php;
 $wgAutoloadClasses['SpecialPageTranslationDeletePage'] = 
$dir/tag/SpecialPageTranslationDeletePage.php;
 $wgAutoloadClasses['SpecialPageTranslationMovePage'] = 
$dir/tag/SpecialPageTranslationMovePage.php;
diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index 5d008c9..283d57f 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -135,7 +135,7 @@
$flags = ~EDIT_NEW  ~EDIT_UPDATE;
 
// Update the target page
-   $job = RenderJob::newJob( $target );
+   $job = TranslateRenderJob::newJob( $target );
$job-setUser( $user );
$job-setSummary( $summary );
$job-setFlags( $flags );
diff --git a/tag/SpecialPageTranslation.php b/tag/SpecialPageTranslation.php
index c131734..2768c67 100644
--- a/tag/SpecialPageTranslation.php
+++ b/tag/SpecialPageTranslation.php
@@ -781,7 +781,7 @@
 
$titles = $page-getTranslationPages();
foreach ( $titles as $t ) {
-   $jobs[] = RenderJob::newJob( $t );
+   $jobs[] = TranslateRenderJob::newJob( $t );
}
 
return $jobs;
diff --git a/tag/SpecialPageTranslationDeletePage.php 
b/tag/SpecialPageTranslationDeletePage.php
index c6877f0..40086ba 100644
--- a/tag/SpecialPageTranslationDeletePage.php
+++ b/tag/SpecialPageTranslationDeletePage.php
@@ -281,12 +281,12 @@
$translationPages = $this-getTranslationPages();
$user = $this-getUser();
foreach ( $translationPages as $old ) {
-   $jobs[$old-getPrefixedText()] = DeleteJob::newJob( 
$old, $base, !$this-singleLanguage(), $user );
+   $jobs[$old-getPrefixedText()] = 
TranslateDeleteJob::newJob( $old, $base, !$this-singleLanguage(), $user );
}
 
$sectionPages = $this-getSectionPages();
foreach ( $sectionPages as $old ) {
-   $jobs[$old-getPrefixedText()] = DeleteJob::newJob( 
$old, $base, !$this-singleLanguage(), $user );
+   $jobs[$old-getPrefixedText()] = 
TranslateDeleteJob::newJob( 

[MediaWiki-commits] [Gerrit] Fix proofreading view - change (mediawiki...Translate)

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

Change subject: Fix proofreading view
..


Fix proofreading view

Only translate view has message editors that can be preloaded.

Bug: 45739
Change-Id: I1d95571f035c1cf3f1af6e08723a5d500a5e86bc
---
M resources/js/ext.translate.messagetable.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index 88178c8..ed85667 100644
--- a/resources/js/ext.translate.messagetable.js
+++ b/resources/js/ext.translate.messagetable.js
@@ -372,7 +372,7 @@
message.group = messagegroup;
messageTable.add( message );
messageTable.messages.push( message );
-   if ( index === 0 ) {
+   if ( index === 0  messageTable.mode 
=== 'translate' ) {
$( '.tux-message:first' ).data( 
'translateeditor' ).init();
}
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d95571f035c1cf3f1af6e08723a5d500a5e86bc
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fixing PHP fatal when saving banner - change (mediawiki...CentralNotice)

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

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


Change subject: Fixing PHP fatal when saving banner
..

Fixing PHP fatal when saving banner

An object was not created by the time it was supposed to be
used. Obviously this causes problems. Created the object and
voila.

Bug: 45846
Change-Id: I9a2ef497dc230819e5ab58d01dadf1f01d57af4a
---
M special/SpecialNoticeTemplate.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/special/SpecialNoticeTemplate.php 
b/special/SpecialNoticeTemplate.php
index d409e16..069431c 100644
--- a/special/SpecialNoticeTemplate.php
+++ b/special/SpecialNoticeTemplate.php
@@ -915,7 +915,8 @@
}
 
Banner::updateTranslationMetadata( $pageResult, $name, 
$body, $priorityLangs );
-
+   
+   $bannerObj = new Banner( $name );
$bannerObj-logBannerChange( 'modified', 
$this-getUser(), $initialBannerSettings );
 
return;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a2ef497dc230819e5ab58d01dadf1f01d57af4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Making sure email notifications are based on categories as well - change (mediawiki...Echo)

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

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


Change subject: Making sure email notifications are based on categories as well
..

Making sure email notifications are based on categories as well

Change-Id: Ib7cee67c940a4bb1b770f509edd995cb0631950d
---
M Notifier.php
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/Notifier.php b/Notifier.php
index 5029c2a..99bc76a 100644
--- a/Notifier.php
+++ b/Notifier.php
@@ -58,8 +58,9 @@
// No valid email address
return false;
}
-   // See if the user wants to receive emails for this type of 
event
-   if ( $user-getOption( 'echo-subscriptions-email-' . 
$event-getType() ) ) {
+   // See if the user wants to receive emails for this category of 
event
+   $category = 
EchoNotificationController::getNotificationCategory( $event-getType() );
+   if ( $user-getOption( 'echo-subscriptions-email-' . $category 
) ) {
global $wgEchoEnableEmailBatch, $wgPasswordSender, 
$wgPasswordSenderName;

// batched email notification

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

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

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


[MediaWiki-commits] [Gerrit] Fixing PHP fatal when saving banner - change (mediawiki...CentralNotice)

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

Change subject: Fixing PHP fatal when saving banner
..


Fixing PHP fatal when saving banner

An object was not created by the time it was supposed to be
used. Obviously this causes problems. Created the object and
voila.

Bug: 45846
Change-Id: I9a2ef497dc230819e5ab58d01dadf1f01d57af4a
---
M special/SpecialNoticeTemplate.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/special/SpecialNoticeTemplate.php 
b/special/SpecialNoticeTemplate.php
index d409e16..069431c 100644
--- a/special/SpecialNoticeTemplate.php
+++ b/special/SpecialNoticeTemplate.php
@@ -915,7 +915,8 @@
}
 
Banner::updateTranslationMetadata( $pageResult, $name, 
$body, $priorityLangs );
-
+   
+   $bannerObj = new Banner( $name );
$bannerObj-logBannerChange( 'modified', 
$this-getUser(), $initialBannerSettings );
 
return;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a2ef497dc230819e5ab58d01dadf1f01d57af4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org
Gerrit-Reviewer: Pgehres pgeh...@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] Rename job classes to more specific names - change (mediawiki...Translate)

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

Change subject: Rename job classes to more specific names
..


Rename job classes to more specific names

RenderJob - TranslateRenderJob
DeleteJob - TranslateDeleteJob
MoveJob - TranslateMoveJob

Change-Id: I23d0226545863960fb955f9d5498e6ad5ec13822
---
M TranslateHooks.php
M _autoload.php
M tag/PageTranslationHooks.php
M tag/SpecialPageTranslation.php
M tag/SpecialPageTranslationDeletePage.php
M tag/SpecialPageTranslationMovePage.php
R tag/TranslateDeleteJob.php
R tag/TranslateMoveJob.php
R tag/TranslateRenderJob.php
M tests/PageTranslationTaggingTest.php
10 files changed, 27 insertions(+), 24 deletions(-)

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



diff --git a/TranslateHooks.php b/TranslateHooks.php
index b476741..fee79d8 100644
--- a/TranslateHooks.php
+++ b/TranslateHooks.php
@@ -71,9 +71,12 @@
$wgLogActionsHandlers['pagetranslation/dissociate'] = 
'PageTranslationLogFormatter';
 
global $wgJobClasses;
-   $wgJobClasses['RenderJob'] = 'RenderJob';
-   $wgJobClasses['MoveJob'] = 'MoveJob';
-   $wgJobClasses['DeleteJob'] = 'DeleteJob';
+   $wgJobClasses['TranslateRenderJob'] = 
'TranslateRenderJob';
+   $wgJobClasses['RenderJob'] = 'TranslateRenderJob';
+   $wgJobClasses['TranslateMoveJob'] = 'TranslateMoveJob';
+   $wgJobClasses['MoveJob'] = 'TranslateMoveJob';
+   $wgJobClasses['TranslateDeleteJob'] = 
'TranslateDeleteJob';
+   $wgJobClasses['DeleteJob'] = 'TranslateDeleteJob';
 
// Namespaces
global $wgPageTranslationNamespace;
diff --git a/_autoload.php b/_autoload.php
index f40a03d..b8be167 100644
--- a/_autoload.php
+++ b/_autoload.php
@@ -132,11 +132,11 @@
  * @ingroup PageTranslation
  * @{
  */
-$wgAutoloadClasses['DeleteJob'] = $dir/tag/DeleteJob.php;
-$wgAutoloadClasses['MoveJob'] = $dir/tag/MoveJob.php;
+$wgAutoloadClasses['TranslateDeleteJob'] = $dir/tag/TranslateDeleteJob.php;
+$wgAutoloadClasses['TranslateMoveJob'] = $dir/tag/TranslateMoveJob.php;
 $wgAutoloadClasses['PageTranslationHooks'] = 
$dir/tag/PageTranslationHooks.php;
 $wgAutoloadClasses['PageTranslationLogFormatter'] = 
$dir/tag/PageTranslationLogFormatter.php;
-$wgAutoloadClasses['RenderJob'] = $dir/tag/RenderJob.php;
+$wgAutoloadClasses['TranslateRenderJob'] = $dir/tag/TranslateRenderJob.php;
 $wgAutoloadClasses['SpecialPageTranslation'] = 
$dir/tag/SpecialPageTranslation.php;
 $wgAutoloadClasses['SpecialPageTranslationDeletePage'] = 
$dir/tag/SpecialPageTranslationDeletePage.php;
 $wgAutoloadClasses['SpecialPageTranslationMovePage'] = 
$dir/tag/SpecialPageTranslationMovePage.php;
diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index 5d008c9..283d57f 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -135,7 +135,7 @@
$flags = ~EDIT_NEW  ~EDIT_UPDATE;
 
// Update the target page
-   $job = RenderJob::newJob( $target );
+   $job = TranslateRenderJob::newJob( $target );
$job-setUser( $user );
$job-setSummary( $summary );
$job-setFlags( $flags );
diff --git a/tag/SpecialPageTranslation.php b/tag/SpecialPageTranslation.php
index c131734..2768c67 100644
--- a/tag/SpecialPageTranslation.php
+++ b/tag/SpecialPageTranslation.php
@@ -781,7 +781,7 @@
 
$titles = $page-getTranslationPages();
foreach ( $titles as $t ) {
-   $jobs[] = RenderJob::newJob( $t );
+   $jobs[] = TranslateRenderJob::newJob( $t );
}
 
return $jobs;
diff --git a/tag/SpecialPageTranslationDeletePage.php 
b/tag/SpecialPageTranslationDeletePage.php
index c6877f0..40086ba 100644
--- a/tag/SpecialPageTranslationDeletePage.php
+++ b/tag/SpecialPageTranslationDeletePage.php
@@ -281,12 +281,12 @@
$translationPages = $this-getTranslationPages();
$user = $this-getUser();
foreach ( $translationPages as $old ) {
-   $jobs[$old-getPrefixedText()] = DeleteJob::newJob( 
$old, $base, !$this-singleLanguage(), $user );
+   $jobs[$old-getPrefixedText()] = 
TranslateDeleteJob::newJob( $old, $base, !$this-singleLanguage(), $user );
}
 
$sectionPages = $this-getSectionPages();
foreach ( $sectionPages as $old ) {
-   $jobs[$old-getPrefixedText()] = DeleteJob::newJob( 
$old, $base, !$this-singleLanguage(), $user );
+   $jobs[$old-getPrefixedText()] = 
TranslateDeleteJob::newJob( $old, $base, !$this-singleLanguage(), $user );
 

[MediaWiki-commits] [Gerrit] Use git diff --patience to compare test results - change (mediawiki...Parsoid)

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

Change subject: Use git diff --patience to compare test results
..


Use git diff --patience to compare test results

The 'patience' algorithm produces a larger diff, but mostly avoids mixing test
results from unrelated tests which made the default diff often very hard to
decipher.

Change-Id: I323b483731b2d0a456e88e0511c8202c5b71a190
---
M js/tests/runtests.sh
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/js/tests/runtests.sh b/js/tests/runtests.sh
index d25ce14..566f336 100755
--- a/js/tests/runtests.sh
+++ b/js/tests/runtests.sh
@@ -60,7 +60,7 @@
 
 cd results || exit 1
 if [ $1 != '-c' -a $2 != '-c' ];then
-git diff | less -R
+git diff --patience | less -R
 else
git add $OUTPUT
 if [ $1 = '--wt2wt' ];then
@@ -73,6 +73,6 @@
 git commit -m `tail -11 all.txt` all.txt || exit 1
 fi
 if [ $2 != '-q'];then
-git diff HEAD~1 | less -R || exit 1
+git diff --patience HEAD~1 | less -R || exit 1
 fi
 fi

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I323b483731b2d0a456e88e0511c8202c5b71a190
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org

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


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

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

Change subject: Echo style tweaks per Vibha
..


Echo style tweaks per Vibha

Change-Id: I4111092e32213b50ccb0e8dee849a2edfb645827
---
M modules/icons/icons.css
M modules/overlay/ext.echo.overlay.css
M modules/overlay/ext.echo.overlay.js
M modules/special/ext.echo.special.css
4 files changed, 21 insertions(+), 2 deletions(-)

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



diff --git a/modules/icons/icons.css b/modules/icons/icons.css
index 14dd5c7..7a5947b 100644
--- a/modules/icons/icons.css
+++ b/modules/icons/icons.css
@@ -2,7 +2,8 @@
width: 30px;
height: 30px;
float: left;
-   margin-right: 15px;
+   margin-right: 10px;
+   margin-left: 10px;
background: no-repeat center left;
 }
 
diff --git a/modules/overlay/ext.echo.overlay.css 
b/modules/overlay/ext.echo.overlay.css
index 6634872..adcfe34 100644
--- a/modules/overlay/ext.echo.overlay.css
+++ b/modules/overlay/ext.echo.overlay.css
@@ -30,6 +30,7 @@
 }
 
 #p-personal .mw-echo-overlay li.mw-echo-notification {
+   background-color: #F0F0F0;
display: block;
float: none;
border-bottom: 1px solid #DD;
@@ -39,6 +40,13 @@
font-size: 13px;
line-height: 16px;
 }
+#p-personal .mw-echo-overlay li.mw-echo-notification:hover {
+   background-color: #F8F8F8;
+}
+#p-personal .mw-echo-overlay li.mw-echo-notification.mw-echo-unread,
+#p-personal .mw-echo-overlay li.mw-echo-notification.mw-echo-unread:hover {
+   background-color: white;
+}
 #p-personal .mw-echo-overlay li.mw-echo-notification:last-child {
border-bottom: none;
 }
diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index 106c1e8..1aa5ff1 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -19,7 +19,7 @@
$( '#pt-notifications  a' )
.text( '' )
.badge( newCount, true, true );
-   $( '#pt-notifications .mw-badge' ).css( 
'margin-left', '-5px' );
+   $( '#pt-notifications .mw-badge' ).css( 
'margin-left', '-6px' );
}
 
mw.echo.overlay.notification_count = newCount;
diff --git a/modules/special/ext.echo.special.css 
b/modules/special/ext.echo.special.css
index 30a1131..2585412 100644
--- a/modules/special/ext.echo.special.css
+++ b/modules/special/ext.echo.special.css
@@ -67,6 +67,16 @@
 .mw-echo-notification {
padding: 15px 35px 10px 0;
 }
+#mw-echo-special-container .mw-echo-notification {
+   background-color: #F0F0F0;
+}
+#mw-echo-special-container .mw-echo-notification:hover {
+   background-color: #F8F8F8;
+}
+#mw-echo-special-container .mw-echo-notification.mw-echo-unread,
+#mw-echo-special-container .mw-echo-notification.mw-echo-unread:hover {
+   background-color: white;
+}
 #mw-echo-special-container .mw-echo-notification .mw-echo-state {
filter: alpha(opacity=50);
opacity: 0.5;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4111092e32213b50ccb0e8dee849a2edfb645827
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Bsitu bs...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (Bug 45732) Set custom bold and italic buttons for Galician ... - change (mediawiki...WikiEditor)

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

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


Change subject: (Bug 45732) Set custom bold and italic buttons for Galician 
language
..

(Bug 45732) Set custom bold and italic buttons for Galician language

Use N for Bold (Negra) and C for Italic (Cursiva)

Change-Id: I89423dfb5b52065bb4bd25f2a54a6b2ef8e982ea
---
M modules/jquery.wikiEditor.toolbar.config.js
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/modules/jquery.wikiEditor.toolbar.config.js 
b/modules/jquery.wikiEditor.toolbar.config.js
index 412c9e1..81821f9 100644
--- a/modules/jquery.wikiEditor.toolbar.config.js
+++ b/modules/jquery.wikiEditor.toolbar.config.js
@@ -21,6 +21,7 @@
'cs': [2, -142],
'de': [2, -214],
'fr': [2, -286],
+   'gl': [2, -358],
'es': [2, -358],
'he': [2, -142],
'hu': [2, -214],
@@ -37,6 +38,7 @@
'cs': 
'format-bold-B.png',
'de': 
'format-bold-F.png',
'fr': 
'format-bold-G.png',
+   'gl': 
'format-bold-N.png',
'es': 
'format-bold-N.png',
'he': 
'format-bold-B.png',
'hu': 
'format-bold-F.png',
@@ -71,6 +73,7 @@
'cs': [2, -862],
'de': [2, -934],
'fr': [2, -862],
+   'gl': [2, -790],
'es': [2, -790],
'he': [2, -862],
'it': [2, -790],
@@ -87,6 +90,7 @@
'cs': 
'format-italic-I.png',
'de': 
'format-italic-K.png',
'fr': 
'format-italic-I.png',
+   'gl': 
'format-italic-C.png',
'es': 
'format-italic-C.png',
'he': 
'format-italic-I.png',
'hu': 
'format-italic-D.png',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89423dfb5b52065bb4bd25f2a54a6b2ef8e982ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Platonides platoni...@gmail.com

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


[MediaWiki-commits] [Gerrit] Enable translate gitweb rss feed on mediawikiwiki - change (operations/mediawiki-config)

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

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


Change subject: Enable translate gitweb rss feed on mediawikiwiki
..

Enable translate gitweb rss feed on mediawikiwiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index e38acb8..d61883d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10301,6 +10301,7 @@
'http://blog.wikimedia.org/c/our-wikis/wikimediacommons/feed/',

'http://blog.wikimedia.org/c/communications/picture-of-the-day/feed/',
),
+   'mediawikiwiki' = array( 
'https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Translate.gita=rss'
 ),
 ),
 
 'wmgUseDoubleWiki' = array(

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

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

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


[MediaWiki-commits] [Gerrit] Enable translate gitweb rss feed on mediawikiwiki - change (operations/mediawiki-config)

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

Change subject: Enable translate gitweb rss feed on mediawikiwiki
..


Enable translate gitweb rss feed on mediawikiwiki

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index e38acb8..d61883d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10301,6 +10301,7 @@
'http://blog.wikimedia.org/c/our-wikis/wikimediacommons/feed/',

'http://blog.wikimedia.org/c/communications/picture-of-the-day/feed/',
),
+   'mediawikiwiki' = array( 
'https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Translate.gita=rss'
 ),
 ),
 
 'wmgUseDoubleWiki' = array(

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

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

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


[MediaWiki-commits] [Gerrit] Updating PageTriage for Echo change Id745ed - change (mediawiki...PageTriage)

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

Change subject: Updating PageTriage for Echo change Id745ed
..


Updating PageTriage for Echo change Id745ed

Change-Id: Ibe21b33f871c2418cc55d79a3f8f1f9f0e8475d4
---
M PageTriage.hooks.php
M PageTriage.i18n.php
M PageTriage.php
3 files changed, 69 insertions(+), 69 deletions(-)

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



diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index 2cead63..7a46b23 100644
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -467,68 +467,70 @@
 * @param $wgEchoEnabledEvents array a list of enabled echo events
 * @param $wgEchoEventDetails array details for echo events
 */
-   public static function onBeforeCreateEchoEvent( $wgEchoEnabledEvents, 
$wgEchoEventDetails ) {
+   public static function onBeforeCreateEchoEvent( $wgEchoNotifications, 
$wgEchoNotificationCategories ) {
global $wgPageTriageEnabledEchoEvents;
 
-   foreach ( $wgPageTriageEnabledEchoEvents as $enabledEchoEvent ) 
{
-   $wgEchoEnabledEvents[] = $enabledEchoEvent;
-   $wgEchoEventDetails += array(
-   $enabledEchoEvent = array(
-   'category' = 'page-review',
-   'priority' = 8
-   )
+   if ( $wgPageTriageEnabledEchoEvents ) {
+   $wgEchoNotificationCategories['page-review'] = array(
+   'priority' = 8,
);
}
-   return true;
-   }
 
-   /**
-* Add extension notification formatter to $wgEchoNotificationFormatters
-* @param $wgEchoNotificationFormatters array a list of echo 
notification formatters
-*/
-   public static function onBeforeFormatEchoNotification( 
$wgEchoNotificationFormatters ) {
-   $wgEchoNotificationFormatters['pagetriage-mark-as-reviewed'] = 
array(
-   'class' = 'PageTriageNotificationFormatter',
-   'title-message' = 
'pagetriage-notification-mark-as-reviewed2',
-   'title-params' = array( 'agent', 'title' ),
-   'flyout-message' = 
'pagetriage-notification-mark-as-reviewed-flyout',
-   'flyout-params' = array( 'agent', 'title' ),
-   'email-subject-message' = 
'pagetriage-notification-mark-as-reviewed-email-subject2',
-   'email-subject-params' = array( 'agent', 'title' ),
-   'email-body-message' = 
'pagetriage-notification-mark-as-reviewed-email-body2',
-   'email-body-params' = array( 'agent', 'title', 
'titlelink', 'email-footer' ),
-   'email-body-batch-message' = 
'pagetriage-notification-mark-as-reviewed-email-batch-body',
-   'email-body-batch-params' = array( 'title', 'agent' ),
-   'icon' = 'checkmark',
-   );
-   $wgEchoNotificationFormatters['pagetriage-add-maintenance-tag'] 
= array(
-   'class' = 'PageTriageNotificationFormatter',
-   'title-message' = 
'pagetriage-notification-add-maintenance-tag2',
-   'title-params' = array( 'agent', 'title', 'tag' ),
-   'flyout-message' = 
'pagetriage-notification-add-maintenance-tag-flyout',
-   'flyout-params' = array( 'agent', 'title', 'tag' ),
-   'email-subject-message' = 
'pagetriage-notification-add-maintenance-tag-email-subject2',
-   'email-subject-params' = array( 'agent', 'title' ),
-   'email-body-message' = 
'pagetriage-notification-add-maintenance-tag-email-body2',
-   'email-body-params' = array( 'agent', 'title', 
'titlelink', 'tag', 'email-footer' ),
-   'email-body-batch-message' = 
'pagetriage-notification-mark-as-reviewed-email-batch-body',
-   'email-body-batch-params' = array( 'title', 'agent' ),
-   'icon' = 'checkmark',
-   );
-   $wgEchoNotificationFormatters['pagetriage-add-deletion-tag'] = 
array(
-   'class' = 'PageTriageNotificationFormatter',
-   'title-message' = 
'pagetriage-notification-add-deletion-tag2',
-   'title-params' = array( 'agent', 'title', 'tag' ),
-   'flyout-message' = 
'pagetriage-notification-add-deletion-tag-flyout',
-   'flyout-params' = array( 'agent', 'title', 'tag' ),
-   'email-subject-message' = 
'pagetriage-notification-add-deletion-tag-email-subject2',
-   

  1   2   3   >