[MediaWiki-commits] [Gerrit] Remove BC for deprecated code - change (mediawiki...TwnMainPage)

2014-09-21 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Remove BC for deprecated code
..

Remove BC for deprecated code

Change-Id: If2834874412fd5df5dbacc23c412b794c5e00e64
---
M resources/js/ext.translate.mainpage.js
1 file changed, 7 insertions(+), 10 deletions(-)


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

diff --git a/resources/js/ext.translate.mainpage.js 
b/resources/js/ext.translate.mainpage.js
index 4c415ef..22bd704 100644
--- a/resources/js/ext.translate.mainpage.js
+++ b/resources/js/ext.translate.mainpage.js
@@ -6,9 +6,6 @@
 ( function ( $, mw ) {
'use strict';
 
-   // BC for MW = 1.21
-   var getUrl = mw.util.getUrl || mw.util.wikiGetlink;
-
/**
 * Setup the stats tiles.
 */
@@ -17,7 +14,7 @@
 
$tiles.click( function( e ) {
e.stopPropagation();
-   window.location = $( this ).find( 'a' ).prop( 'href' );
+   location = $( this ).find( 'a' ).prop( 'href' );
} );
}
 
@@ -149,7 +146,7 @@
var url = $( this ).data( 'url' );
 
if ( url ) {
-   window.location.href = url;
+   location.href = url;
}
} );
 
@@ -157,7 +154,7 @@
$tiles.find( '.action' ).click( function ( e ) {
e.stopPropagation();
 
-   window.location.href = $( this ).find( 'a' ).prop( 
'href' );
+   location.href = $( this ).find( 'a' ).prop( 'href' );
} );
 
if ( $tiles.length !== maxProjectTiles ) {
@@ -172,10 +169,10 @@
.msggroupselector( {
language: language,
onSelect: function ( messageGroup ) {
-   window.location.href = new mw.Uri( 
getUrl( 'Special:Translate' ) )
-   .extend( {
-   group: messageGroup.id
-   } );
+   location.href = mw.util.getUrl(
+   'Special:Translate',
+   { group: messageGroup.id }
+   );
},
position: {
my: 'left bottom',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2834874412fd5df5dbacc23c412b794c5e00e64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwnMainPage
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] Unset redirect param in MoveLogFormatter::getMessageParameters - change (mediawiki/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Unset redirect param in MoveLogFormatter::getMessageParameters
..


Unset redirect param in MoveLogFormatter::getMessageParameters

The redirect param is used to get a different message key, so there is
no need to pass it to the message, because the value is stable.
'logentry-move-move' always get a '0' and
'logentry-move-move-noredirect' always a '1'
The value is only visible with uselang=qqx

Change-Id: Ib6a3303e7401e29561165355b3611c3c123bfcd0
---
M includes/logging/MoveLogFormatter.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/logging/MoveLogFormatter.php 
b/includes/logging/MoveLogFormatter.php
index 3913016..35da113 100644
--- a/includes/logging/MoveLogFormatter.php
+++ b/includes/logging/MoveLogFormatter.php
@@ -37,8 +37,9 @@
 
protected function getMessageKey() {
$key = parent::getMessageKey();
-   $params = $this-getMessageParameters();
+   $params = $this-extractParameters();
if ( isset( $params[4] )  $params[4] === '1' ) {
+   // Messages: logentry-move-move-noredirect, 
logentry-move-move_redir-noredirect
$key .= '-noredirect';
}
 
@@ -51,6 +52,7 @@
$newname = $this-makePageLink( Title::newFromText( $params[3] 
) );
$params[2] = Message::rawParam( $oldname );
$params[3] = Message::rawParam( $newname );
+   unset( $params[4] ); // handled in getMessageKey
 
return $params;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6a3303e7401e29561165355b3611c3c123bfcd0
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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] View individual cache files - change (pywikibot/core)

2014-09-21 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: View individual cache files
..

View individual cache files

Allow one or more cache entries to be viewed by supplying the cache key.
Allow cache commands to use the print function.
Catch and display exceptions if pickle cant load cache entry, such as
wrong version.

Change-Id: Ib9ae0c87a13f9bec04fc83f4d934b2a424779720
---
M scripts/maintenance/cache.py
M tox.ini
2 files changed, 36 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/72/161772/1

diff --git a/scripts/maintenance/cache.py b/scripts/maintenance/cache.py
index c97ce54..27c1671 100644
--- a/scripts/maintenance/cache.py
+++ b/scripts/maintenance/cache.py
@@ -18,12 +18,11 @@
 
   Customised output if the site code is 'ar':
 
-entry.site.code == ar and \
-pywikibot.output(%s % entry._uniquedescriptionstr())
+entry.site.code == ar and print(%s % entry._uniquedescriptionstr())
 
   Or the state of the login
 entry.site._loginstatus == LoginStatus.NOT_ATTEMPTED and \
-pywikibot.output(%s % entry._uniquedescriptionstr())
+print(%s % entry._uniquedescriptionstr())
 
   These functions can be used as a command:
 has_password(entry)
@@ -43,6 +42,7 @@
 #
 # Distributed under the terms of the MIT license.
 #
+from __future__ import print_function
 __version__ = '$Id$'
 #
 
@@ -171,7 +171,7 @@
 os.remove(self._cachefile_path())
 
 
-def process_entries(cache_dir, func):
+def process_entries(cache_path, func):
  Check the contents of the cache. 
 
 # This program tries to use file access times to determine
@@ -185,15 +185,28 @@
 # - True  = always use
 use_accesstime = None
 
-if not cache_dir:
-cache_dir = os.path.join(pywikibot.config2.base_dir, 'apicache')
-for filename in os.listdir(cache_dir):
-filepath = os.path.join(cache_dir, filename)
+if not cache_path:
+cache_path = os.path.join(pywikibot.config2.base_dir, 'apicache')
+
+if os.path.isdir(cache_path):
+filenames = [os.path.join(cache_path, filename)
+ for filename in os.listdir(cache_path)]
+else:
+filenames = [cache_path]
+
+for filepath in filenames:
+filename = os.path.basename(filepath)
+cache_dir = os.path.dirname(filepath)
 if use_accesstime is not False:
 stinfo = os.stat(filepath)
 
 entry = CacheEntry(cache_dir, filename)
-entry._load_cache()
+try:
+entry._load_cache()
+except ValueError as e:
+print('Failed loading %s' % entry._cachefile_path())
+pywikibot.exception(e, tb=True)
+continue
 
 if use_accesstime is None:
 stinfo2 = os.stat(filepath)
@@ -214,10 +227,10 @@
 
 try:
 entry._rebuild()
-except Exception:
+except Exception as e:
 pywikibot.error(u'Problems loading %s with key %s, %r'
 % (entry.filename, entry.key, entry._parsed_key))
-pywikibot.exception()
+pywikibot.exception(e, tb=True)
 continue
 
 func(entry)
@@ -277,7 +290,7 @@
 
 def main():
 local_args = pywikibot.handleArgs()
-cache_dirs = None
+cache_paths = None
 delete = False
 command = None
 
@@ -294,12 +307,15 @@
 exit(1)
 command = ''
 else:
-cache_dir = [arg]
+if not cache_paths:
+cache_paths = [arg]
+else:
+cache_paths.append(arg)
 
 func = None
 
-if not cache_dirs:
-cache_dirs = ['apicache', 'tests/apicache']
+if not cache_paths:
+cache_paths = ['apicache', 'tests/apicache']
 
 # Also process the base directory, if it isnt the current directory
 if os.path.abspath(os.getcwd()) != pywikibot.config2.base_dir:
@@ -328,11 +344,10 @@
 else:
 func = action_func
 
-for cache_dir in cache_dirs:
-if os.path.isdir(cache_dir):
-if len(cache_dirs)  1:
-pywikibot.output(u'Processing %s' % cache_dir)
-process_entries(cache_dir, func)
+for cache_path in cache_paths:
+if len(cache_paths)  1:
+pywikibot.output(u'Processing %s' % cache_path)
+process_entries(cache_path, func)
 
 if __name__ == '__main__':
 main()
diff --git a/tox.ini b/tox.ini
index 3772be9..74d2113 100644
--- a/tox.ini
+++ b/tox.ini
@@ -36,6 +36,7 @@
 ./pywikibot/data/__init__.py \
 ./pywikibot/compat/userlib.py ./pywikibot/compat/catlib.py \
 ./pywikibot/compat/query.py \
+./scripts/maintenance/cache.py \
 ./tests/aspects.py
 deps = flake8-docstrings
 

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


[MediaWiki-commits] [Gerrit] Copy translations of Special:MyLanguage alias from Translate - change (mediawiki/core)

2014-09-21 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Copy translations of Special:MyLanguage alias from Translate
..

Copy translations of Special:MyLanguage alias from Translate

Tuvan (tyv) didn't have a special page section, so now it's added.

See also I6f84eaf414b6d4239522bad14e90b1cbfc82590f.

Bug: 69461
Change-Id: Ie6a4d878b87ee030f9c042b43f7b1fb424b54099
---
M languages/messages/MessagesAf.php
M languages/messages/MessagesAr.php
M languages/messages/MessagesArc.php
M languages/messages/MessagesArz.php
M languages/messages/MessagesAs.php
M languages/messages/MessagesBjn.php
M languages/messages/MessagesBr.php
M languages/messages/MessagesBxr.php
M languages/messages/MessagesCdo.php
M languages/messages/MessagesCe.php
M languages/messages/MessagesDe.php
M languages/messages/MessagesDiq.php
M languages/messages/MessagesEl.php
M languages/messages/MessagesEo.php
M languages/messages/MessagesEs.php
M languages/messages/MessagesFa.php
M languages/messages/MessagesFi.php
M languages/messages/MessagesFr.php
M languages/messages/MessagesGsw.php
M languages/messages/MessagesHe.php
M languages/messages/MessagesHsb.php
M languages/messages/MessagesHt.php
M languages/messages/MessagesIa.php
M languages/messages/MessagesId.php
M languages/messages/MessagesIt.php
M languages/messages/MessagesJa.php
M languages/messages/MessagesKa.php
M languages/messages/MessagesKm.php
M languages/messages/MessagesKo.php
M languages/messages/MessagesKrc.php
M languages/messages/MessagesKu_latn.php
M languages/messages/MessagesKw.php
M languages/messages/MessagesLb.php
M languages/messages/MessagesMk.php
M languages/messages/MessagesMl.php
M languages/messages/MessagesMr.php
M languages/messages/MessagesMyv.php
M languages/messages/MessagesNb.php
M languages/messages/MessagesNds_nl.php
M languages/messages/MessagesNl.php
M languages/messages/MessagesNn.php
M languages/messages/MessagesPa.php
M languages/messages/MessagesPl.php
M languages/messages/MessagesQu.php
M languages/messages/MessagesRu.php
M languages/messages/MessagesScn.php
M languages/messages/MessagesSr_ec.php
M languages/messages/MessagesSv.php
M languages/messages/MessagesTh.php
M languages/messages/MessagesTly.php
M languages/messages/MessagesTr.php
M languages/messages/MessagesTt_cyrl.php
M languages/messages/MessagesTyv.php
M languages/messages/MessagesUk.php
M languages/messages/MessagesVi.php
M languages/messages/MessagesYue.php
M languages/messages/MessagesZh_hans.php
M languages/messages/MessagesZh_hant.php
58 files changed, 61 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/161773/1

diff --git a/languages/messages/MessagesAf.php 
b/languages/messages/MessagesAf.php
index a8190b3..84eb922 100644
--- a/languages/messages/MessagesAf.php
+++ b/languages/messages/MessagesAf.php
@@ -139,6 +139,7 @@
'Mostrevisions' = array( 'MeesteWysigings' ),
'Movepage'  = array( 'Skuif_bladsy', 'Skuifbladsy' ),
'Mycontributions'   = array( 'Mybydrae' ),
+   'MyLanguage'= array( 'MyTaal' ),
'Mypage'= array( 'MyBladsy' ),
'Mytalk'= array( 'Mybespreking', 'Mybesprekings' ),
'Newimages' = array( 'Nuwe_beelde', 'Nuwebeelde', 
'Nuwe_lêers', 'Nuwelêers' ),
diff --git a/languages/messages/MessagesAr.php 
b/languages/messages/MessagesAr.php
index dd9b06f..3872f1c 100644
--- a/languages/messages/MessagesAr.php
+++ b/languages/messages/MessagesAr.php
@@ -357,6 +357,7 @@
'Mycontributions'   = array( 'مساهماتي' ),
'Mypage'= array( 'صفحتي' ),
'Mytalk'= array( 'نقاشي' ),
+   'MyLanguage'= array( 'لغتي' ),
'Myuploads' = array( 'رفوعاتي' ),
'Newimages' = array( 'ملفات_جديدة', 'صور_جديدة' ),
'Newpages'  = array( 'صفحات_جديدة' ),
diff --git a/languages/messages/MessagesArc.php 
b/languages/messages/MessagesArc.php
index cd514d3..2247b36 100644
--- a/languages/messages/MessagesArc.php
+++ b/languages/messages/MessagesArc.php
@@ -64,6 +64,7 @@
'Mostrevisions' = array( 'ܬܢܝ̈ܬܐ_ܝܬܝܪ_ܡܢ_ܟܠ' ),
'Movepage'  = array( 'ܫܢܝ_ܦܐܬܐ' ),
'Mycontributions'   = array( 'ܫܘܬܦܘ̈ܬܝ' ),
+   'MyLanguage'= array( 'ܠܫܢܐ_ܕܝܠܝ' ),
'Mypage'= array( 'ܦܐܬܐ_ܕܝܠܝ' ),
'Mytalk'= array( 'ܡܡܠܠܐ_ܕܝܠܝ' ),
'Myuploads' = array( 'ܐܣܩ̈ܬܐ_ܕܝܠܝ' ),
diff --git a/languages/messages/MessagesArz.php 
b/languages/messages/MessagesArz.php
index 8e2b71f..09fd319 100644
--- a/languages/messages/MessagesArz.php
+++ b/languages/messages/MessagesArz.php
@@ -83,6 +83,7 @@
'Mostrevisions'

[MediaWiki-commits] [Gerrit] Fix typo in release notes - change (mediawiki/core)

2014-09-21 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Fix typo in release notes
..

Fix typo in release notes

Change-Id: I2651bc9c8b6ace473a503719e2d2930cfb50bc04
---
M RELEASE-NOTES-1.24
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/74/161774/1

diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 8c584d0..13a0a6d 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -165,7 +165,7 @@
   similar way, links like [[localInterwikiPrefix:File:Image.png]] and
   [[localInterwikiPrefix:Category:Hello]] will now render as regular links, and
   will not include the file or add the page to the category.
-* New special page, MyLanguages, to redirect users to subpages with localised
+* New special page, MyLanguage, to redirect users to subpages with localised
   versions of a page. (Integrated from Extension:Translate)
 * MediaWiki now supports multiple password types, including bcrypt and PBKDF2.
   The default type can be changed with $wgPasswordDefault and the type

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2651bc9c8b6ace473a503719e2d2930cfb50bc04
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] Fix typo in release notes - change (mediawiki/core)

2014-09-21 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Fix typo in release notes
..

Fix typo in release notes

Change-Id: Ifd74075cbe580a6c17f79a73767c8530c2aed71a
---
M RELEASE-NOTES-1.24
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/161775/1

diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 8c584d0..13a0a6d 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -165,7 +165,7 @@
   similar way, links like [[localInterwikiPrefix:File:Image.png]] and
   [[localInterwikiPrefix:Category:Hello]] will now render as regular links, and
   will not include the file or add the page to the category.
-* New special page, MyLanguages, to redirect users to subpages with localised
+* New special page, MyLanguage, to redirect users to subpages with localised
   versions of a page. (Integrated from Extension:Translate)
 * MediaWiki now supports multiple password types, including bcrypt and PBKDF2.
   The default type can be changed with $wgPasswordDefault and the type

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd74075cbe580a6c17f79a73767c8530c2aed71a
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] Fix typo in release notes - change (mediawiki/core)

2014-09-21 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Fix typo in release notes
..

Fix typo in release notes

Change-Id: I2651bc9c8b6ace473a503719e2d2930cfb50bc04
---
M RELEASE-NOTES-1.24
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/161776/1

diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 8c584d0..13a0a6d 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -165,7 +165,7 @@
   similar way, links like [[localInterwikiPrefix:File:Image.png]] and
   [[localInterwikiPrefix:Category:Hello]] will now render as regular links, and
   will not include the file or add the page to the category.
-* New special page, MyLanguages, to redirect users to subpages with localised
+* New special page, MyLanguage, to redirect users to subpages with localised
   versions of a page. (Integrated from Extension:Translate)
 * MediaWiki now supports multiple password types, including bcrypt and PBKDF2.
   The default type can be changed with $wgPasswordDefault and the type

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2651bc9c8b6ace473a503719e2d2930cfb50bc04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_24
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] Copy translations of Special:MyLanguage alias from Translate - change (mediawiki/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Copy translations of Special:MyLanguage alias from Translate
..


Copy translations of Special:MyLanguage alias from Translate

Tuvan (tyv) didn't have a special page section, so now it's added.

See also I6f84eaf414b6d4239522bad14e90b1cbfc82590f.

Bug: 69461
Change-Id: Ie6a4d878b87ee030f9c042b43f7b1fb424b54099
---
M languages/messages/MessagesAf.php
M languages/messages/MessagesAr.php
M languages/messages/MessagesArc.php
M languages/messages/MessagesArz.php
M languages/messages/MessagesAs.php
M languages/messages/MessagesBjn.php
M languages/messages/MessagesBr.php
M languages/messages/MessagesBxr.php
M languages/messages/MessagesCdo.php
M languages/messages/MessagesCe.php
M languages/messages/MessagesDe.php
M languages/messages/MessagesDiq.php
M languages/messages/MessagesEl.php
M languages/messages/MessagesEo.php
M languages/messages/MessagesEs.php
M languages/messages/MessagesFa.php
M languages/messages/MessagesFi.php
M languages/messages/MessagesFr.php
M languages/messages/MessagesGsw.php
M languages/messages/MessagesHe.php
M languages/messages/MessagesHsb.php
M languages/messages/MessagesHt.php
M languages/messages/MessagesIa.php
M languages/messages/MessagesId.php
M languages/messages/MessagesIt.php
M languages/messages/MessagesJa.php
M languages/messages/MessagesKa.php
M languages/messages/MessagesKm.php
M languages/messages/MessagesKo.php
M languages/messages/MessagesKrc.php
M languages/messages/MessagesKu_latn.php
M languages/messages/MessagesKw.php
M languages/messages/MessagesLb.php
M languages/messages/MessagesMk.php
M languages/messages/MessagesMl.php
M languages/messages/MessagesMr.php
M languages/messages/MessagesMyv.php
M languages/messages/MessagesNb.php
M languages/messages/MessagesNds_nl.php
M languages/messages/MessagesNl.php
M languages/messages/MessagesNn.php
M languages/messages/MessagesPa.php
M languages/messages/MessagesPl.php
M languages/messages/MessagesQu.php
M languages/messages/MessagesRu.php
M languages/messages/MessagesScn.php
M languages/messages/MessagesSr_ec.php
M languages/messages/MessagesSv.php
M languages/messages/MessagesTh.php
M languages/messages/MessagesTly.php
M languages/messages/MessagesTr.php
M languages/messages/MessagesTt_cyrl.php
M languages/messages/MessagesTyv.php
M languages/messages/MessagesUk.php
M languages/messages/MessagesVi.php
M languages/messages/MessagesYue.php
M languages/messages/MessagesZh_hans.php
M languages/messages/MessagesZh_hant.php
58 files changed, 61 insertions(+), 0 deletions(-)

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



diff --git a/languages/messages/MessagesAf.php 
b/languages/messages/MessagesAf.php
index a8190b3..84eb922 100644
--- a/languages/messages/MessagesAf.php
+++ b/languages/messages/MessagesAf.php
@@ -139,6 +139,7 @@
'Mostrevisions' = array( 'MeesteWysigings' ),
'Movepage'  = array( 'Skuif_bladsy', 'Skuifbladsy' ),
'Mycontributions'   = array( 'Mybydrae' ),
+   'MyLanguage'= array( 'MyTaal' ),
'Mypage'= array( 'MyBladsy' ),
'Mytalk'= array( 'Mybespreking', 'Mybesprekings' ),
'Newimages' = array( 'Nuwe_beelde', 'Nuwebeelde', 
'Nuwe_lêers', 'Nuwelêers' ),
diff --git a/languages/messages/MessagesAr.php 
b/languages/messages/MessagesAr.php
index dd9b06f..3872f1c 100644
--- a/languages/messages/MessagesAr.php
+++ b/languages/messages/MessagesAr.php
@@ -357,6 +357,7 @@
'Mycontributions'   = array( 'مساهماتي' ),
'Mypage'= array( 'صفحتي' ),
'Mytalk'= array( 'نقاشي' ),
+   'MyLanguage'= array( 'لغتي' ),
'Myuploads' = array( 'رفوعاتي' ),
'Newimages' = array( 'ملفات_جديدة', 'صور_جديدة' ),
'Newpages'  = array( 'صفحات_جديدة' ),
diff --git a/languages/messages/MessagesArc.php 
b/languages/messages/MessagesArc.php
index cd514d3..2247b36 100644
--- a/languages/messages/MessagesArc.php
+++ b/languages/messages/MessagesArc.php
@@ -64,6 +64,7 @@
'Mostrevisions' = array( 'ܬܢܝ̈ܬܐ_ܝܬܝܪ_ܡܢ_ܟܠ' ),
'Movepage'  = array( 'ܫܢܝ_ܦܐܬܐ' ),
'Mycontributions'   = array( 'ܫܘܬܦܘ̈ܬܝ' ),
+   'MyLanguage'= array( 'ܠܫܢܐ_ܕܝܠܝ' ),
'Mypage'= array( 'ܦܐܬܐ_ܕܝܠܝ' ),
'Mytalk'= array( 'ܡܡܠܠܐ_ܕܝܠܝ' ),
'Myuploads' = array( 'ܐܣܩ̈ܬܐ_ܕܝܠܝ' ),
diff --git a/languages/messages/MessagesArz.php 
b/languages/messages/MessagesArz.php
index 8e2b71f..09fd319 100644
--- a/languages/messages/MessagesArz.php
+++ b/languages/messages/MessagesArz.php
@@ -83,6 +83,7 @@
'Mostrevisions' = array( 'اكتر_مراجعات' ),

[MediaWiki-commits] [Gerrit] Copy translations of Special:MyLanguage alias from Translate - change (mediawiki/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Copy translations of Special:MyLanguage alias from Translate
..


Copy translations of Special:MyLanguage alias from Translate

Tuvan (tyv) didn't have a special page section, so now it's added.

See also I6f84eaf414b6d4239522bad14e90b1cbfc82590f.

Bug: 69461
Change-Id: Ie6a4d878b87ee030f9c042b43f7b1fb424b54099
---
M languages/messages/MessagesAf.php
M languages/messages/MessagesAr.php
M languages/messages/MessagesArc.php
M languages/messages/MessagesArz.php
M languages/messages/MessagesAs.php
M languages/messages/MessagesBjn.php
M languages/messages/MessagesBr.php
M languages/messages/MessagesBxr.php
M languages/messages/MessagesCdo.php
M languages/messages/MessagesCe.php
M languages/messages/MessagesDe.php
M languages/messages/MessagesDiq.php
M languages/messages/MessagesEl.php
M languages/messages/MessagesEo.php
M languages/messages/MessagesEs.php
M languages/messages/MessagesFa.php
M languages/messages/MessagesFi.php
M languages/messages/MessagesFr.php
M languages/messages/MessagesGsw.php
M languages/messages/MessagesHe.php
M languages/messages/MessagesHsb.php
M languages/messages/MessagesHt.php
M languages/messages/MessagesIa.php
M languages/messages/MessagesId.php
M languages/messages/MessagesIt.php
M languages/messages/MessagesJa.php
M languages/messages/MessagesKa.php
M languages/messages/MessagesKm.php
M languages/messages/MessagesKo.php
M languages/messages/MessagesKrc.php
M languages/messages/MessagesKu_latn.php
M languages/messages/MessagesKw.php
M languages/messages/MessagesLb.php
M languages/messages/MessagesMk.php
M languages/messages/MessagesMl.php
M languages/messages/MessagesMr.php
M languages/messages/MessagesMyv.php
M languages/messages/MessagesNb.php
M languages/messages/MessagesNds_nl.php
M languages/messages/MessagesNl.php
M languages/messages/MessagesNn.php
M languages/messages/MessagesPa.php
M languages/messages/MessagesPl.php
M languages/messages/MessagesQu.php
M languages/messages/MessagesRu.php
M languages/messages/MessagesScn.php
M languages/messages/MessagesSr_ec.php
M languages/messages/MessagesSv.php
M languages/messages/MessagesTh.php
M languages/messages/MessagesTly.php
M languages/messages/MessagesTr.php
M languages/messages/MessagesTt_cyrl.php
M languages/messages/MessagesTyv.php
M languages/messages/MessagesUk.php
M languages/messages/MessagesVi.php
M languages/messages/MessagesYue.php
M languages/messages/MessagesZh_hans.php
M languages/messages/MessagesZh_hant.php
58 files changed, 61 insertions(+), 0 deletions(-)

Approvals:
  MaxSem: Looks good to me, approved
  Nemo bis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/languages/messages/MessagesAf.php 
b/languages/messages/MessagesAf.php
index a8190b3..84eb922 100644
--- a/languages/messages/MessagesAf.php
+++ b/languages/messages/MessagesAf.php
@@ -139,6 +139,7 @@
'Mostrevisions' = array( 'MeesteWysigings' ),
'Movepage'  = array( 'Skuif_bladsy', 'Skuifbladsy' ),
'Mycontributions'   = array( 'Mybydrae' ),
+   'MyLanguage'= array( 'MyTaal' ),
'Mypage'= array( 'MyBladsy' ),
'Mytalk'= array( 'Mybespreking', 'Mybesprekings' ),
'Newimages' = array( 'Nuwe_beelde', 'Nuwebeelde', 
'Nuwe_lêers', 'Nuwelêers' ),
diff --git a/languages/messages/MessagesAr.php 
b/languages/messages/MessagesAr.php
index dd9b06f..3872f1c 100644
--- a/languages/messages/MessagesAr.php
+++ b/languages/messages/MessagesAr.php
@@ -357,6 +357,7 @@
'Mycontributions'   = array( 'مساهماتي' ),
'Mypage'= array( 'صفحتي' ),
'Mytalk'= array( 'نقاشي' ),
+   'MyLanguage'= array( 'لغتي' ),
'Myuploads' = array( 'رفوعاتي' ),
'Newimages' = array( 'ملفات_جديدة', 'صور_جديدة' ),
'Newpages'  = array( 'صفحات_جديدة' ),
diff --git a/languages/messages/MessagesArc.php 
b/languages/messages/MessagesArc.php
index cd514d3..2247b36 100644
--- a/languages/messages/MessagesArc.php
+++ b/languages/messages/MessagesArc.php
@@ -64,6 +64,7 @@
'Mostrevisions' = array( 'ܬܢܝ̈ܬܐ_ܝܬܝܪ_ܡܢ_ܟܠ' ),
'Movepage'  = array( 'ܫܢܝ_ܦܐܬܐ' ),
'Mycontributions'   = array( 'ܫܘܬܦܘ̈ܬܝ' ),
+   'MyLanguage'= array( 'ܠܫܢܐ_ܕܝܠܝ' ),
'Mypage'= array( 'ܦܐܬܐ_ܕܝܠܝ' ),
'Mytalk'= array( 'ܡܡܠܠܐ_ܕܝܠܝ' ),
'Myuploads' = array( 'ܐܣܩ̈ܬܐ_ܕܝܠܝ' ),
diff --git a/languages/messages/MessagesArz.php 
b/languages/messages/MessagesArz.php
index 8e2b71f..09fd319 100644
--- a/languages/messages/MessagesArz.php
+++ b/languages/messages/MessagesArz.php
@@ -83,6 +83,7 @@

[MediaWiki-commits] [Gerrit] Fix typo in release notes - change (mediawiki/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix typo in release notes
..


Fix typo in release notes

Change-Id: I2651bc9c8b6ace473a503719e2d2930cfb50bc04
---
M RELEASE-NOTES-1.24
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  MaxSem: Looks good to me, approved
  Nemo bis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 8c584d0..13a0a6d 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -165,7 +165,7 @@
   similar way, links like [[localInterwikiPrefix:File:Image.png]] and
   [[localInterwikiPrefix:Category:Hello]] will now render as regular links, and
   will not include the file or add the page to the category.
-* New special page, MyLanguages, to redirect users to subpages with localised
+* New special page, MyLanguage, to redirect users to subpages with localised
   versions of a page. (Integrated from Extension:Translate)
 * MediaWiki now supports multiple password types, including bcrypt and PBKDF2.
   The default type can be changed with $wgPasswordDefault and the type

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2651bc9c8b6ace473a503719e2d2930cfb50bc04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix typo in release notes - change (mediawiki/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix typo in release notes
..


Fix typo in release notes

Change-Id: I2651bc9c8b6ace473a503719e2d2930cfb50bc04
---
M RELEASE-NOTES-1.24
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 8c584d0..13a0a6d 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -165,7 +165,7 @@
   similar way, links like [[localInterwikiPrefix:File:Image.png]] and
   [[localInterwikiPrefix:Category:Hello]] will now render as regular links, and
   will not include the file or add the page to the category.
-* New special page, MyLanguages, to redirect users to subpages with localised
+* New special page, MyLanguage, to redirect users to subpages with localised
   versions of a page. (Integrated from Extension:Translate)
 * MediaWiki now supports multiple password types, including bcrypt and PBKDF2.
   The default type can be changed with $wgPasswordDefault and the type

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2651bc9c8b6ace473a503719e2d2930cfb50bc04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_24
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] reorder items - change (translatewiki)

2014-09-21 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

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

Change subject: reorder items
..

reorder items

Change-Id: Icdc5386549e942a8944d3753621ad6a7c9768b27
---
M groups/Pywikibot/Pywikibot.yaml
1 file changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/77/161777/1

diff --git a/groups/Pywikibot/Pywikibot.yaml b/groups/Pywikibot/Pywikibot.yaml
index 7baaff9..19d7eb2 100644
--- a/groups/Pywikibot/Pywikibot.yaml
+++ b/groups/Pywikibot/Pywikibot.yaml
@@ -284,14 +284,6 @@
   definitionFile: %GROUPROOT%/pywikibot/pagefromfile.py
 ---
 BASIC:
-  id: out-pywikipedia-pywikibot
-  label: Pywikibot Pywikibot
-
-FILES:
-  sourcePattern: %GROUPROOT%/pywikibot/pywikibot.py
-  definitionFile: %GROUPROOT%/pywikibot/pywikibot.py

-BASIC:
   id: out-pywikipedia-protect
   label: Pywikibot Protect
 
@@ -300,12 +292,12 @@
   definitionFile: %GROUPROOT%/pywikibot/protect.py
 ---
 BASIC:
-  id: out-pywikipedia-spamremove
-  label: Pywikibot Spam Remove
+  id: out-pywikipedia-pywikibot
+  label: Pywikibot Pywikibot
 
 FILES:
-  sourcePattern: %GROUPROOT%/pywikibot/spamremove.py
-  definitionFile: %GROUPROOT%/pywikibot/spamremove.py
+  sourcePattern: %GROUPROOT%/pywikibot/pywikibot.py
+  definitionFile: %GROUPROOT%/pywikibot/pywikibot.py
 ---
 BASIC:
   id: out-pywikipedia-redirect
@@ -360,6 +352,14 @@
   definitionFile: %GROUPROOT%/pywikibot/solve_disambiguation.py
 ---
 BASIC:
+  id: out-pywikipedia-spamremove
+  label: Pywikibot Spam Remove
+
+FILES:
+  sourcePattern: %GROUPROOT%/pywikibot/spamremove.py
+  definitionFile: %GROUPROOT%/pywikibot/spamremove.py
+---
+BASIC:
   id: out-pywikipedia-spellcheck
   label: Pywikibot Spellcheck
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdc5386549e942a8944d3753621ad6a7c9768b27
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de

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


[MediaWiki-commits] [Gerrit] [IMPROV] Use 'io' package also in Python 2.6 - change (pywikibot/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [IMPROV] Use 'io' package also in Python 2.6
..


[IMPROV] Use 'io' package also in Python 2.6

This also fixes a problem with flickrripper in Python 3, because it
stored the binary image data into a StringIO and not BytesIO object.

Change-Id: I79703aa4d3a3d1df5cea546cb18152305c3b0cd4
---
M pywikibot/compat/query.py
M pywikibot/version.py
M scripts/flickrripper.py
M scripts/reflinks.py
M scripts/script_wui.py
5 files changed, 11 insertions(+), 23 deletions(-)

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



diff --git a/pywikibot/compat/query.py b/pywikibot/compat/query.py
index bd9aa77..fe02c99 100644
--- a/pywikibot/compat/query.py
+++ b/pywikibot/compat/query.py
@@ -15,11 +15,7 @@
 from pywikibot.data import api
 from pywikibot.tools import deprecated, deprecate_arg
 
-import sys
-if sys.version_info[0]  2:
-import io as StringIO
-else:
-import StringIO
+import io
 
 
 @deprecated(pywikibot.data.api.Request)
@@ -36,7 +32,7 @@
 if back_response:
 pywikibot.warning(uback_response is no longer supported; an empty 
   uresponse object will be returned)
-res_dummy = StringIO.StringIO()
+res_dummy = io.StringIO()
 res_dummy.__dict__.update({u'code': 0, u'msg': u''})
 return res_dummy, result
 return result
diff --git a/pywikibot/version.py b/pywikibot/version.py
index c8cb36c..c3042e6 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -14,7 +14,6 @@
 import time
 import datetime
 import subprocess
-import sys
 
 import pywikibot.config2 as config
 
@@ -143,10 +142,7 @@
 @return: the git hash
 @rtype: str
 
-if sys.version_info[0]  2:
-from io import StringIO
-else:
-from StringIO import StringIO
+from io import StringIO
 import xml.dom.minidom
 from pywikibot.comms import http
 
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index d5550d2..46d3475 100644
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -37,6 +37,8 @@
 import base64
 import time
 import sys
+import io
+
 import pywikibot
 from pywikibot import config, textlib
 import upload
@@ -52,14 +54,12 @@
 if sys.version_info[0]  2:
 from urllib.parse import urlencode
 from urllib.request import urlopen
-import io as StringIO
 from tkinter import (
 Tk, Label, Entry, Scrollbar, Text, Button,
 END, VERTICAL, NORMAL, WORD
 )
 else:
 from urllib import urlencode, urlopen
-import StringIO
 from Tkinter import (
 Tk, Label, Entry, Scrollbar, Text, Button,
 END, VERTICAL, NORMAL, WORD
@@ -122,13 +122,13 @@
 
 def downloadPhoto(photoUrl=''):
 
-Download the photo and store it in a StrinIO.StringIO object.
+Download the photo and store it in a io.BytesIO object.
 
 TODO: Add exception handling
 
 
 imageFile = urlopen(photoUrl).read()
-return StringIO.StringIO(imageFile)
+return io.BytesIO(imageFile)
 
 
 def findDuplicateImages(photo=None,
@@ -378,7 +378,7 @@
 self.descriptionScrollbar.grid(row=14, column=5)
 
 def getImage(self, photo, width, height):
-Take the StringIO object and build an imageTK thumbnail.
+Take the BytesIO object and build an imageTK thumbnail.
 image = Image.open(photo)
 image.thumbnail((width, height))
 imageTk = ImageTk.PhotoImage(image)
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 03664d0..477b668 100644
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -50,6 +50,7 @@
 import os
 import gzip
 import sys
+import io
 
 import pywikibot
 from pywikibot import i18n, pagegenerators, textlib, xmlreader, Bot
@@ -61,11 +62,9 @@
 from urllib.request import urlopen
 from urllib.error import HTTPError, URLError
 import http.client as httplib
-import io as StringIO
 else:
 from urllib2 import quote, urlopen, HTTPError, URLError
 import httplib
-import StringIO
 
 docuReplacements = {
 'params;': pagegenerators.parameterHelp
@@ -592,7 +591,7 @@
 # through f.read(). It might fetch big files/pages.
 # However, truncating an encoded gzipped stream is not
 # an option, for unzipping will fail.
-compressed = StringIO.StringIO(f.read())
+compressed = io.StringIO(f.read())
 f = gzip.GzipFile(fileobj=compressed)
 
 # Read the first 1,000,000 bytes (0.95 MB)
diff --git a/scripts/script_wui.py b/scripts/script_wui.py
index 1e2ef0c..9d0aab2 100755
--- a/scripts/script_wui.py
+++ b/scripts/script_wui.py
@@ -207,10 +207,7 @@
 def main_script(page, rev=None, params=None):
 # 

[MediaWiki-commits] [Gerrit] [FIX] Only apply uppercase to Link title if namespace dictat... - change (pywikibot/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [FIX] Only apply uppercase to Link title if namespace dictates 
so
..


[FIX] Only apply uppercase to Link title if namespace dictates so

The namespace defines if a Link title begins with an uppercase character.
The main namespace of Wiktionary, for example requires an exact match. As
the namespace always define the case, using the site case isn't necessary.

If the namespace doesn't report the case property it choses the site global
case property.

Bug: 69118 (partially)
Change-Id: If86346dc203c54d2e6631e3106add3c34d30
---
M pywikibot/page.py
M tests/wikibase_tests.py
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 13a5010..1096166 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4118,7 +4118,12 @@
 if self._namespace != -1 and len(t)  255:
 raise pywikibot.InvalidTitle((over 255 bytes): '%s' % t)
 
-if self._site.case() == 'first-letter':
+if hasattr(self._site.namespaces()[self._namespace], 'case'):
+case = self._site.namespaces()[self._namespace].case
+else:
+case = self._site.case()
+
+if case == 'first-letter':
 t = t[:1].upper() + t[1:]
 
 # Can't make a link to a namespace alone...
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index 7726433..0231f55 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -732,9 +732,11 @@
 class DrySite(pywikibot.site.DataSite):
 _namespaces = {
 90: Namespace(id=90,
+  case='first-letter',
   canonical_name='Item',
   defaultcontentmodel='wikibase-item'),
 92: Namespace(id=92,
+  case='first-letter',
   canonical_name='Prop',
   defaultcontentmodel='wikibase-property')
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If86346dc203c54d2e6631e3106add3c34d30
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: XZise commodorefabia...@gmx.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] update namespace aliases for as-wiki - change (pywikibot/compat)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: update namespace aliases for as-wiki
..


update namespace aliases for as-wiki

update language_by_size

Change-Id: I5668d03eae07a5a932077cc18ec1616340db9b78
---
M families/wikisource_family.py
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/families/wikisource_family.py b/families/wikisource_family.py
index 725bed3..9bab410 100644
--- a/families/wikisource_family.py
+++ b/families/wikisource_family.py
@@ -18,9 +18,9 @@
 self.languages_by_size = [
 'fr', 'en', 'de', 'ru', 'it', 'pl', 'zh', 'he', 'es', 'sv', 'pt',
 'cs', 'ca', 'fa', 'hu', 'ar', 'ml', 'ko', 'sl', 'te', 'ro', 'fi',
-'sr', 'vi', 'sa', 'el', 'hr', 'no', 'th', 'bn', 'hy', 'is', 'nl',
-'gu', 'la', 'ja', 'br', 'vec', 'uk', 'eo', 'tr', 'mk', 'yi', 'ta',
-'az', 'id', 'be', 'da', 'li', 'et', 'as', 'mr', 'bg', 'bs', 'sah',
+'sr', 'vi', 'sa', 'el', 'hr', 'th', 'no', 'bn', 'hy', 'is', 'nl',
+'gu', 'la', 'ja', 'br', 'vec', 'uk', 'eo', 'tr', 'az', 'mk', 'yi',
+'ta', 'id', 'be', 'da', 'li', 'et', 'as', 'mr', 'bg', 'bs', 'sah',
 'kn', 'gl', 'lt', 'cy', 'sk', 'zh-min-nan', 'fo',
 ]
 
@@ -277,6 +277,7 @@
 
 self.namespaces[102] = {
 'ar': u'مؤلف',
+'as': u'লেখক',
 'az': u'Müəllif',
 'be': u'Аўтар',
 'bn': u'নির্ঘণ্ট',
@@ -318,6 +319,7 @@
 
 self.namespaces[103] = {
 'ar': u'نقاش المؤلف',
+'as': u'লেখক আলোচনা',
 'az': u'Müəllif müzakirəsi',
 'be': u'Размовы пра аўтара',
 'bn': u'নির্ঘণ্ট আলাপ',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5668d03eae07a5a932077cc18ec1616340db9b78
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de
Gerrit-Reviewer: Xqt i...@gno.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] update namespace aliases for as-wiki - change (pywikibot/compat)

2014-09-21 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

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

Change subject: update namespace aliases for as-wiki
..

update namespace aliases for as-wiki

update language_by_size

Change-Id: I5668d03eae07a5a932077cc18ec1616340db9b78
---
M families/wikisource_family.py
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/78/161778/1

diff --git a/families/wikisource_family.py b/families/wikisource_family.py
index 725bed3..9bab410 100644
--- a/families/wikisource_family.py
+++ b/families/wikisource_family.py
@@ -18,9 +18,9 @@
 self.languages_by_size = [
 'fr', 'en', 'de', 'ru', 'it', 'pl', 'zh', 'he', 'es', 'sv', 'pt',
 'cs', 'ca', 'fa', 'hu', 'ar', 'ml', 'ko', 'sl', 'te', 'ro', 'fi',
-'sr', 'vi', 'sa', 'el', 'hr', 'no', 'th', 'bn', 'hy', 'is', 'nl',
-'gu', 'la', 'ja', 'br', 'vec', 'uk', 'eo', 'tr', 'mk', 'yi', 'ta',
-'az', 'id', 'be', 'da', 'li', 'et', 'as', 'mr', 'bg', 'bs', 'sah',
+'sr', 'vi', 'sa', 'el', 'hr', 'th', 'no', 'bn', 'hy', 'is', 'nl',
+'gu', 'la', 'ja', 'br', 'vec', 'uk', 'eo', 'tr', 'az', 'mk', 'yi',
+'ta', 'id', 'be', 'da', 'li', 'et', 'as', 'mr', 'bg', 'bs', 'sah',
 'kn', 'gl', 'lt', 'cy', 'sk', 'zh-min-nan', 'fo',
 ]
 
@@ -277,6 +277,7 @@
 
 self.namespaces[102] = {
 'ar': u'مؤلف',
+'as': u'লেখক',
 'az': u'Müəllif',
 'be': u'Аўтар',
 'bn': u'নির্ঘণ্ট',
@@ -318,6 +319,7 @@
 
 self.namespaces[103] = {
 'ar': u'نقاش المؤلف',
+'as': u'লেখক আলোচনা',
 'az': u'Müəllif müzakirəsi',
 'be': u'Размовы пра аўтара',
 'bn': u'নির্ঘণ্ট আলাপ',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5668d03eae07a5a932077cc18ec1616340db9b78
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de

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


[MediaWiki-commits] [Gerrit] Add '*.beeldbank.cultureelerfgoed.nl' to wgCopyUploadsDomains - change (operations/mediawiki-config)

2014-09-21 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: Add '*.beeldbank.cultureelerfgoed.nl' to wgCopyUploadsDomains
..

Add '*.beeldbank.cultureelerfgoed.nl' to wgCopyUploadsDomains

Bug: 70840
Change-Id: I20ff85ee1946393defb433e2cddca34e9caa1127
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4450a63..23fb0d8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10719,7 +10719,8 @@
'*.universiteitsmuseum.nl', // Universiteits Museum 
Utrecht
'data.kb.se',   // National Library of 
Sweden Open Data - bug 69439
'www.veikkos-archiv.com',   // Veikkos-archiv - bug 
69777
-   '*.scienceimage.csiro.au'   // CSIRO - bug 70771
+   '*.scienceimage.csiro.au',  // CSIRO - bug 70771
+   '*.beeldbank.cultureelerfgoed.nl',  // Cultureel Erfgoed - bug 
70840
),
 ),
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20ff85ee1946393defb433e2cddca34e9caa1127
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com
Gerrit-Reviewer: Glaisher glaisher.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Improve timestripper to support more languages - change (pywikibot/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve timestripper to support more languages
..


Improve timestripper to support more languages

-Fixed regex of month digit from \d{1,2} to (?:1[012]|0?[1-9])
-Added sign of day, month and year for Korean
-Added a fixer to make non_latin_digits lation (languages like fa and ckb)

I tested it on three languages that are working now: ko, fa and ckb.

Change-Id: Iddbccc7cbcf16e77ca334d9a0d434f9e084884eb
---
M pywikibot/textlib.py
M tests/archivebot_tests.py
M tests/timestripper_tests.py
3 files changed, 32 insertions(+), 9 deletions(-)

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



diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 9a2bd23..49bcf35 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -33,6 +33,15 @@
 
 TEMP_REGEX = re.compile(
 
'{{(?:msg:)?(?Pname[^{\|]+?)(?:\|(?Pparams[^{]+?(?:{[^{]+?}[^{]*?)?))?}}')
+NON_LATIN_DIGITS = [
+u'٠١٢٣٤٥٦٧٨٩',  # ckb
+u'۰۱۲۳۴۵۶۷۸۹',  # fa
+u'೦೧೨೩೪೫೬೭೮೯',  # kn
+u'०१२३४५६७८९',  # hi and some other
+u'০১২৩৪৫৬৭৮৯',  # bn
+u'૦૧૨૩૪૫૬૭૮૯',  # gu
+u'୦୧୨୩୪୫୬୭୮୯',  # or
+]
 
 
 def unescape(s):
@@ -1198,8 +1207,7 @@
 
 timeR = 
r'(?Ptime(?Phour([0-1]\d|2[0-3]))[:\.h](?Pminute[0-5]\d))'
 timeznR = r'\((?Ptzinfo[A-Z]+)\)'
-yearR = r'(?Pyear(19|20)\d\d)'
-
+yearR = r'(?Pyear(19|20)\d\d)(?:%s)?' % u'\ub144'
 # if months have 'digits' as names, they need to be
 # removed; will be handled as digits in regex, adding d+{1,2}\.?
 escaped_months = [_ for _ in self.origNames2monthNum if
@@ -1207,13 +1215,14 @@
 # match longest names first.
 escaped_months = [re.escape(_) for
   _ in sorted(escaped_months, reverse=True)]
-
 # work around for cs wiki: if month are in digits, we assume
 # that format is dd. mm. (with dot and spaces optional)
+# the last one is workaround for Korean
 if any(_.isdigit() for _ in self.origNames2monthNum):
 self.is_digit_month = True
-monthR = r'(?Pmonth(%s)|\d{1,2}\.?)' % u'|'.join(escaped_months)
-dayR = r'(?Pday(3[01]|[12]\d|0?[1-9]))\.?\s*[01]?\d\.?'
+monthR = 
r'(?Pmonth(%s)(?:\u0654)?|(?:1[012]|0?[1-9])\.?(?:\uc6d4)?)' \
+% u'|'.join(escaped_months)
+dayR = r'(?Pday(3[01]|[12]\d|0?[1-9]))(?:%s)?\.?\s*[01]?\d\.?' % 
u'\uc77c'
 else:
 self.is_digit_month = False
 monthR = r'(?Pmonth(%s))' % u'|'.join(escaped_months)
@@ -1222,7 +1231,7 @@
 self.ptimeR = re.compile(timeR)
 self.ptimeznR = re.compile(timeznR)
 self.pyearR = re.compile(yearR)
-self.pmonthR = re.compile(monthR, re.U)
+self.pmonthR = re.compile(monthR)
 self.pdayR = re.compile(dayR)
 
 # order is important to avoid mismatch when searching
@@ -1235,10 +1244,17 @@
 ]
 
 def findmarker(self, text, base=u'@@', delta='@'):
-# find a string which is not part of text
+Find a string which is not part of text.
 while base in text:
 base += delta
 return base
+
+def fix_digits(self, line):
+Make non-latin digits like Persian to latin to parse.
+for system in NON_LATIN_DIGITS:
+for i in range(0, 10):
+line = line.replace(system[i], str(i))
+return line
 
 def last_match_and_replace(self, txt, pat):
 
@@ -1278,6 +1294,7 @@
 
 # match date fields
 dateDict = dict()
+line = self.fix_digits(line)
 for pat in self.patterns:
 line, matchDict = self.last_match_and_replace(line, pat)
 if matchDict:
diff --git a/tests/archivebot_tests.py b/tests/archivebot_tests.py
index 954c1b7..5c57d54 100644
--- a/tests/archivebot_tests.py
+++ b/tests/archivebot_tests.py
@@ -70,9 +70,9 @@
 self.assertIsInstance(thread.content, basestring)
 self.assertIsInstance(thread.timestamp, datetime)
 
-expected_failures = ['ar', 'ckb', 'fa', 'pdc', 'th']
+expected_failures = ['ar', 'pdc', 'th']
 # expected failures - should be fixed
-# 'ar', 'ckb', 'fa': no digits in date, regex does not match
+# 'ar': Uses Arabic acronym for TZ
 # 'pdc': changed month name setting in wiki over time (?)
 #   in old posts in talk page, February is Feb., site message gives
 #   message name=feb xml:space=preserveHan./message.
diff --git a/tests/timestripper_tests.py b/tests/timestripper_tests.py
index d625c4b..0f265e3 100644
--- a/tests/timestripper_tests.py
+++ b/tests/timestripper_tests.py
@@ -139,6 +139,12 @@
 'match': u'3 February 2010 19:48 (UTC) 7 February 2010 19:48 
(UTC)',
 'nomatch': u'3. 2. 2010, 19:48 (UTC) 7. 2. 2010 19:48 (UTC)',
 },
+

[MediaWiki-commits] [Gerrit] mediawiki.toolbar: Properly deprecate #init - change (mediawiki/core)

2014-09-21 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: mediawiki.toolbar: Properly deprecate #init
..

mediawiki.toolbar: Properly deprecate #init

Change-Id: I0271258e5f33b21c68b6224ca74123a3723c9788
---
M resources/src/mediawiki.toolbar/toolbar.js
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/161781/1

diff --git a/resources/src/mediawiki.toolbar/toolbar.js 
b/resources/src/mediawiki.toolbar/toolbar.js
index 57f780c..04488a3 100644
--- a/resources/src/mediawiki.toolbar/toolbar.js
+++ b/resources/src/mediawiki.toolbar/toolbar.js
@@ -151,17 +151,16 @@
}
);
}
-   },
-
-   // For backwards compatibility,
-   // Called from EditPage.php, maybe in other places as well.
-   init: function () {}
+   }
};
 
// Legacy (for compatibility with the code previously in 
skins/common.edit.js)
mw.log.deprecate( window, 'addButton', toolbar.addButton, 'Use 
mw.toolbar.addButton instead.' );
mw.log.deprecate( window, 'insertTags', toolbar.insertTags, 'Use 
mw.toolbar.insertTags instead.' );
 
+   // For backwards compatibility. Used to be called from EditPage.php, 
maybe other places as well.
+   mw.log.deprecate( toolbar, 'init', $.noop, 'No longer needed.' );
+
// Expose API publicly
mw.toolbar = toolbar;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0271258e5f33b21c68b6224ca74123a3723c9788
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com

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


[MediaWiki-commits] [Gerrit] mediawiki.toolbar: Move documentation closer to code - change (mediawiki/core)

2014-09-21 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: mediawiki.toolbar: Move documentation closer to code
..

mediawiki.toolbar: Move documentation closer to code

Also tweaked whitespace and variable naming (b → button).

Change-Id: I52653a7756b3661f4f32985763af03232c873da4
---
M resources/src/mediawiki.toolbar/toolbar.js
1 file changed, 40 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/161780/1

diff --git a/resources/src/mediawiki.toolbar/toolbar.js 
b/resources/src/mediawiki.toolbar/toolbar.js
index 77938db..57f780c 100644
--- a/resources/src/mediawiki.toolbar/toolbar.js
+++ b/resources/src/mediawiki.toolbar/toolbar.js
@@ -10,17 +10,32 @@
/**
 * Internal helper that does the actual insertion of the button into 
the toolbar.
 *
-* See #addButton for parameter documentation.
+* For backwards-compatibility, passing `imageFile`, `speedTip`, 
`tagOpen`, `tagClose`,
+* `sampleText` and `imageId` as separate arguments (in this order) is 
also supported.
 *
 * @private
+*
+* @param {Object} button Object with the following properties.
+*  You are required to provide *either* the `onClick` parameter, or 
the three parameters
+*  `tagOpen`, `tagClose` and `sampleText`, but not both (they're 
mutually exclusive).
+* @param {string} [button.imageFile] Image to use for the button.
+* @param {string} button.speedTip Tooltip displayed when user mouses 
over the button.
+* @param {Function} [button.onClick] Function to be executed when the 
button is clicked.
+* @param {string} [button.tagOpen]
+* @param {string} [button.tagClose]
+* @param {string} [button.sampleText] Alternative to `onClick`. 
`tagOpen`, `tagClose` and
+*  `sampleText` together provide the markup that should be inserted 
into page text at
+*  current cursor position.
+* @param {string} [button.imageId] `id` attribute of the button HTML 
element. Can be
+*  used to define the image with CSS if it's not provided as 
`imageFile`.
 */
-   function insertButton( b, speedTip, tagOpen, tagClose, sampleText, 
imageId ) {
+   function insertButton( button, speedTip, tagOpen, tagClose, sampleText, 
imageId ) {
var $button;
 
// Backwards compatibility
-   if ( typeof b !== 'object' ) {
-   b = {
-   imageFile: b,
+   if ( typeof button !== 'object' ) {
+   button = {
+   imageFile: button,
speedTip: speedTip,
tagOpen: tagOpen,
tagClose: tagClose,
@@ -29,27 +44,27 @@
};
}
 
-   if ( b.imageFile ) {
+   if ( button.imageFile ) {
$button = $( 'img' ).attr( {
-   src: b.imageFile,
-   alt: b.speedTip,
-   title: b.speedTip,
-   id: b.imageId || undefined,
-   'class': 'mw-toolbar-editbutton'
+   src: button.imageFile,
+   alt: button.speedTip,
+   title: button.speedTip,
+   id: button.imageId || undefined,
+   'class': 'mw-toolbar-editbutton'
} );
} else {
$button = $( 'div' ).attr( {
-   title: b.speedTip,
-   id: b.imageId || undefined,
+   title: button.speedTip,
+   id: button.imageId || undefined,
'class': 'mw-toolbar-editbutton'
} );
}
 
$button.click( function ( e ) {
-   if ( b.onClick !== undefined ) {
-   b.onClick( e );
+   if ( button.onClick !== undefined ) {
+   button.onClick( e );
} else {
-   toolbar.insertTags( b.tagOpen, b.tagClose, 
b.sampleText );
+   toolbar.insertTags( button.tagOpen, 
button.tagClose, button.sampleText );
}
 
return false;
@@ -75,26 +90,13 @@
/**
 * Add buttons to the toolbar.
 *
-* Takes care of race conditions and time-based dependencies
-* by placing buttons in a queue if this method is called before
-* 

[MediaWiki-commits] [Gerrit] Use one tab instead of four spaces for indentation in Englis... - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Use one tab instead of four spaces for indentation in English 
(en) JSON i18n files
..

Use one tab instead of four spaces for indentation in English (en) JSON i18n 
files

Change-Id: Icb51049e5e85487192d8eeec91e6ed6c7da3c399
---
M SystemGifts/i18n/en.json
M UserActivity/i18n/en.json
M UserBoard/i18n/en.json
M UserGifts/i18n/en.json
M UserProfile/i18n/en.json
M UserRelationship/i18n/en.json
M UserStats/i18n/en.json
M UserWelcome/i18n/en.json
M i18n/en.json
9 files changed, 607 insertions(+), 607 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/82/161782/1

diff --git a/SystemGifts/i18n/en.json b/SystemGifts/i18n/en.json
index 0c55504..f360413 100644
--- a/SystemGifts/i18n/en.json
+++ b/SystemGifts/i18n/en.json
@@ -1,74 +1,74 @@
 {
-@metadata: {
-authors: [
-Wikia, Inc.,
-Purodha
-]
-},
-systemgiftmanager: System gifts manager,
-ga-addnew: + Add new gift,
-ga-back-edit-gift: Back to edit this gift,
-ga-back-gift-list: Back to gift list,
-ga-back-link: a href=\$1\ Back to $2's profile/a,
-ga-choosefile: Choose file:,
-ga-count: $1 has $2 {{PLURAL:$2|award|awards}}.,
-ga-create-gift: Create gift,
-ga-created: The gift has been created,
-ga-currentimage: Current image,
-ga-error-message-invalid-link: The link you have entered is invalid.,
-ga-error-message-no-user: The user you are trying to view does not 
exist.,
-ga-error-title: Woops, you took a wrong turn!,
-ga-file-instructions: Your image must be a jpeg, png or gif (no 
animated gifs), and must be less than 100kb in size.,
-ga-gift: gift,
-ga-gift-given-count: This gift has been given out $1 
{{PLURAL:$1|time|times}},
-ga-gift-title: $1's \$2\,
-ga-giftdesc: gift description,
-ga-giftimage: gift image,
-ga-giftname: gift name,
-ga-gifttype: gift type,
-ga-goback: Go back,
-ga-imagesbelow: Below are your images that will be used on the site,
-ga-img: add/replace image,
-ga-large: Large,
-ga-medium: Medium,
-ga-mediumlarge: Medium-large,
-ga-new: New,
-ga-next: Next,
-ga-previous: Prev,
-ga-recent-recipients-award: Other recent recipients of this award,
-ga-saved: The gift has been saved,
-ga-small: Small,
-ga-threshold: threshold,
-ga-title: $1's awards,
-ga-uploadsuccess: Upload successful,
-ga-viewlist: View gift list,
-ga-cancel: Cancel,
-ga-remove: Remove,
-ga-remove-title: Remove \$1\?,
-ga-delete-message: Are you sure you want to delete the gift 
\$1\?\nThis will also delete it from users who may have received it.,
-ga-remove-success-title: You have successfully removed the gift \$1\,
-ga-remove-success-message: The gift \$1\ has been removed.,
-ga-user-got-awards: $1 got $2,
-ga-awards-given-out: {{PLURAL:$1|One award|$1 awards}} were given out,
-topawards: Top Awards,
-topawards-edit-title: Top Awards - Edit Milestones,
-topawards-vote-title: Top Awards - Vote Milestones,
-topawards-comment-title: Top Awards - Comment Milestones,
-topawards-recruit-title: Top Awards - Recruit Milestones,
-topawards-friend-title: Top Awards - Friend Milestones,
-topawards-award-categories: Award Categories,
-topawards-edits: Edits,
-topawards-votes: Votes,
-topawards-comments: Comments,
-topawards-recruits: Recruits,
-topawards-friends: Friends,
-topawards-edit-milestone: {{PLURAL:$1|$1 Edit|$1 Edits}} Milestone,
-topawards-vote-milestone: {{PLURAL:$1|$1 Vote|$1 Votes}} Milestone,
-topawards-comment-milestone: {{PLURAL:$1|$1 Comment|$1 Comments}} 
Milestone,
-topawards-recruit-milestone: {{PLURAL:$1|$1 Recruit|$1 Recruits}} 
Milestone,
-topawards-friend-milestone: {{PLURAL:$1|$1 Friend|$1 Friends}} 
Milestone,
-topawards-empty: Either there are no configured awards for this award 
category, or then nobody has gotten those awards yet.,
-system_gift_received_subject: You have received the $1 award on 
{{SITENAME}}!,
-system_gift_received_body: Hi $1.\n\nYou have just received the $2 
award on {{SITENAME}}!\n\n\$3\\n\nClick below to check out your trophy 
case!\n\n$4\n\nWe hope you like it!\n\nThanks,\n\n\nThe {{SITENAME}} 
team\n\n---\n\nHey, want to stop getting emails from us?\n\nClick $5\nand 
change your settings to disable email notifications.,
-right-awardsmanage: Create new and edit existing awards
+   @metadata: {
+   authors: [
+   Wikia, Inc.,
+   Purodha
+   ]
+   },
+   systemgiftmanager: System gifts manager,
+   ga-addnew: + Add new gift,
+   ga-back-edit-gift: Back to edit this gift,
+   ga-back-gift-list: Back to gift list,
+  

[MediaWiki-commits] [Gerrit] Use one tab instead of four spaces for indentation in Englis... - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Use one tab instead of four spaces for indentation in English 
(en) JSON i18n files
..


Use one tab instead of four spaces for indentation in English (en) JSON i18n 
files

Change-Id: Icb51049e5e85487192d8eeec91e6ed6c7da3c399
---
M SystemGifts/i18n/en.json
M UserActivity/i18n/en.json
M UserBoard/i18n/en.json
M UserGifts/i18n/en.json
M UserProfile/i18n/en.json
M UserRelationship/i18n/en.json
M UserStats/i18n/en.json
M UserWelcome/i18n/en.json
M i18n/en.json
9 files changed, 607 insertions(+), 607 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/SystemGifts/i18n/en.json b/SystemGifts/i18n/en.json
index 0c55504..f360413 100644
--- a/SystemGifts/i18n/en.json
+++ b/SystemGifts/i18n/en.json
@@ -1,74 +1,74 @@
 {
-@metadata: {
-authors: [
-Wikia, Inc.,
-Purodha
-]
-},
-systemgiftmanager: System gifts manager,
-ga-addnew: + Add new gift,
-ga-back-edit-gift: Back to edit this gift,
-ga-back-gift-list: Back to gift list,
-ga-back-link: a href=\$1\ Back to $2's profile/a,
-ga-choosefile: Choose file:,
-ga-count: $1 has $2 {{PLURAL:$2|award|awards}}.,
-ga-create-gift: Create gift,
-ga-created: The gift has been created,
-ga-currentimage: Current image,
-ga-error-message-invalid-link: The link you have entered is invalid.,
-ga-error-message-no-user: The user you are trying to view does not 
exist.,
-ga-error-title: Woops, you took a wrong turn!,
-ga-file-instructions: Your image must be a jpeg, png or gif (no 
animated gifs), and must be less than 100kb in size.,
-ga-gift: gift,
-ga-gift-given-count: This gift has been given out $1 
{{PLURAL:$1|time|times}},
-ga-gift-title: $1's \$2\,
-ga-giftdesc: gift description,
-ga-giftimage: gift image,
-ga-giftname: gift name,
-ga-gifttype: gift type,
-ga-goback: Go back,
-ga-imagesbelow: Below are your images that will be used on the site,
-ga-img: add/replace image,
-ga-large: Large,
-ga-medium: Medium,
-ga-mediumlarge: Medium-large,
-ga-new: New,
-ga-next: Next,
-ga-previous: Prev,
-ga-recent-recipients-award: Other recent recipients of this award,
-ga-saved: The gift has been saved,
-ga-small: Small,
-ga-threshold: threshold,
-ga-title: $1's awards,
-ga-uploadsuccess: Upload successful,
-ga-viewlist: View gift list,
-ga-cancel: Cancel,
-ga-remove: Remove,
-ga-remove-title: Remove \$1\?,
-ga-delete-message: Are you sure you want to delete the gift 
\$1\?\nThis will also delete it from users who may have received it.,
-ga-remove-success-title: You have successfully removed the gift \$1\,
-ga-remove-success-message: The gift \$1\ has been removed.,
-ga-user-got-awards: $1 got $2,
-ga-awards-given-out: {{PLURAL:$1|One award|$1 awards}} were given out,
-topawards: Top Awards,
-topawards-edit-title: Top Awards - Edit Milestones,
-topawards-vote-title: Top Awards - Vote Milestones,
-topawards-comment-title: Top Awards - Comment Milestones,
-topawards-recruit-title: Top Awards - Recruit Milestones,
-topawards-friend-title: Top Awards - Friend Milestones,
-topawards-award-categories: Award Categories,
-topawards-edits: Edits,
-topawards-votes: Votes,
-topawards-comments: Comments,
-topawards-recruits: Recruits,
-topawards-friends: Friends,
-topawards-edit-milestone: {{PLURAL:$1|$1 Edit|$1 Edits}} Milestone,
-topawards-vote-milestone: {{PLURAL:$1|$1 Vote|$1 Votes}} Milestone,
-topawards-comment-milestone: {{PLURAL:$1|$1 Comment|$1 Comments}} 
Milestone,
-topawards-recruit-milestone: {{PLURAL:$1|$1 Recruit|$1 Recruits}} 
Milestone,
-topawards-friend-milestone: {{PLURAL:$1|$1 Friend|$1 Friends}} 
Milestone,
-topawards-empty: Either there are no configured awards for this award 
category, or then nobody has gotten those awards yet.,
-system_gift_received_subject: You have received the $1 award on 
{{SITENAME}}!,
-system_gift_received_body: Hi $1.\n\nYou have just received the $2 
award on {{SITENAME}}!\n\n\$3\\n\nClick below to check out your trophy 
case!\n\n$4\n\nWe hope you like it!\n\nThanks,\n\n\nThe {{SITENAME}} 
team\n\n---\n\nHey, want to stop getting emails from us?\n\nClick $5\nand 
change your settings to disable email notifications.,
-right-awardsmanage: Create new and edit existing awards
+   @metadata: {
+   authors: [
+   Wikia, Inc.,
+   Purodha
+   ]
+   },
+   systemgiftmanager: System gifts manager,
+   ga-addnew: + Add new gift,
+   ga-back-edit-gift: Back to edit this gift,
+   ga-back-gift-list: Back to gift list,
+   ga-back-link: a href=\$1\ Back to $2's profile/a,
+   

[MediaWiki-commits] [Gerrit] Move EntityViewPlaceholderExpander into Wikibase\Repo\View n... - change (mediawiki...Wikibase)

2014-09-21 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Move EntityViewPlaceholderExpander into Wikibase\Repo\View 
namespace
..

Move EntityViewPlaceholderExpander into Wikibase\Repo\View namespace

Change-Id: I254984bfc6bb576d290e4d276275b9da153e3b91
---
M repo/Wikibase.hooks.php
M repo/includes/EntityView.php
R repo/includes/View/EntityViewPlaceholderExpander.php
M repo/tests/phpunit/includes/EntityViewPlaceholderExpanderTest.php
4 files changed, 6 insertions(+), 3 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 02ef64b..a08e42b 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -33,6 +33,7 @@
 use Wikibase\Hook\MakeGlobalVariablesScriptHandler;
 use Wikibase\Hook\OutputPageJsConfigHookHandler;
 use Wikibase\Repo\Content\EntityHandler;
+use Wikibase\Repo\View\EntityViewPlaceholderExpander;
 use Wikibase\Repo\View\TextInjector;
 use Wikibase\Repo\WikibaseRepo;
 use WikiPage;
diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php
index 28889a5..50ccd24 100644
--- a/repo/includes/EntityView.php
+++ b/repo/includes/EntityView.php
@@ -8,6 +8,7 @@
 use Wikibase\Repo\View\ClaimsView;
 use Wikibase\Repo\View\FingerprintView;
 use Wikibase\Repo\View\TextInjector;
+use Wikibase\Repo\View\EntityViewPlaceholderExpander;
 
 /**
  * Base class for creating views for all different kinds of Wikibase\Entity.
diff --git a/repo/includes/EntityViewPlaceholderExpander.php 
b/repo/includes/View/EntityViewPlaceholderExpander.php
similarity index 98%
rename from repo/includes/EntityViewPlaceholderExpander.php
rename to repo/includes/View/EntityViewPlaceholderExpander.php
index 8ad5ae0..dea5f86 100644
--- a/repo/includes/EntityViewPlaceholderExpander.php
+++ b/repo/includes/View/EntityViewPlaceholderExpander.php
@@ -1,6 +1,6 @@
 ?php
 
-namespace Wikibase;
+namespace Wikibase\Repo\View;
 
 use InvalidArgumentException;
 use Language;
@@ -8,10 +8,11 @@
 use RuntimeException;
 use Title;
 use User;
+use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\EntityIdParser;
 use Wikibase\Lib\Store\EntityRevisionLookup;
 use Wikibase\Lib\Store\StorageException;
-use Wikibase\Repo\View\TermBoxView;
+use Wikibase\UserLanguageLookup;
 
 /**
  * Utility for expanding the placeholders left in the HTML by EntityView.
diff --git a/repo/tests/phpunit/includes/EntityViewPlaceholderExpanderTest.php 
b/repo/tests/phpunit/includes/EntityViewPlaceholderExpanderTest.php
index cd9617e..ed59336 100644
--- a/repo/tests/phpunit/includes/EntityViewPlaceholderExpanderTest.php
+++ b/repo/tests/phpunit/includes/EntityViewPlaceholderExpanderTest.php
@@ -9,9 +9,9 @@
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\EntityRevision;
 use Wikibase\Lib\Store\EntityLookup;
-use Wikibase\EntityViewPlaceholderExpander;
 use Wikibase\Lib\Store\EntityRevisionLookup;
 use Wikibase\Lib\Store\StorageException;
+use Wikibase\Repo\View\EntityViewPlaceholderExpander;
 
 /**
  * @covers Wikibase\EntityViewPlaceholderExpander

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

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

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


[MediaWiki-commits] [Gerrit] Move client recentchanges classes into namespace - change (mediawiki...Wikibase)

2014-09-21 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Move client recentchanges classes into namespace
..

Move client recentchanges classes into namespace

Change-Id: I2c65a7a97357a8415c19f455928dff2d1b97d23e
---
M client/WikibaseClient.hooks.php
M client/includes/recentchanges/ChangeLineFormatter.php
M client/includes/recentchanges/ExternalChange.php
M client/includes/recentchanges/ExternalChangeFactory.php
M client/includes/recentchanges/ExternalRecentChange.php
M client/includes/recentchanges/RecentChangesFilterOptions.php
M client/includes/recentchanges/RevisionData.php
M client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php
M client/tests/phpunit/includes/recentchanges/ExternalChangeFactoryTest.php
M client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
M client/tests/phpunit/includes/recentchanges/RevisionDataTest.php
11 files changed, 45 insertions(+), 28 deletions(-)


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

diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index cc6d8d9..47e091f 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -34,6 +34,9 @@
 use Wikibase\Client\Hooks\LanguageLinkBadgeDisplay;
 use Wikibase\Client\Hooks\SpecialWatchlistQueryHandler;
 use Wikibase\Client\MovePageNotice;
+use Wikibase\Client\RecentChanges\ChangeLineFormatter;
+use Wikibase\Client\RecentChanges\ExternalChangeFactory;
+use Wikibase\Client\RecentChanges\RecentChangesFilterOptions;
 use Wikibase\Client\WikibaseClient;
 
 /**
diff --git a/client/includes/recentchanges/ChangeLineFormatter.php 
b/client/includes/recentchanges/ChangeLineFormatter.php
index e80e7e0..400c3d0 100644
--- a/client/includes/recentchanges/ChangeLineFormatter.php
+++ b/client/includes/recentchanges/ChangeLineFormatter.php
@@ -1,12 +1,13 @@
 ?php
 
-namespace Wikibase;
+namespace Wikibase\Client\RecentChanges;
 
 use Language;
 use Linker;
 use Title;
 use User;
 use Wikibase\Client\RepoLinker;
+use Wikibase\DataModel\Entity\EntityId;
 
 /**
  * Formats a changes line for including changes from the Wikibase repo in
@@ -159,7 +160,7 @@
 *
 * @return string
 */
-   private function formatEntityLink( $entityId ) {
+   private function formatEntityLink( EntityId $entityId ) {
$entityLink = $this-repoLinker-buildEntityLink( $entityId );
 
return wfMessage( 'word-separator' )-plain()
diff --git a/client/includes/recentchanges/ExternalChange.php 
b/client/includes/recentchanges/ExternalChange.php
index df0f227..721c4b5 100644
--- a/client/includes/recentchanges/ExternalChange.php
+++ b/client/includes/recentchanges/ExternalChange.php
@@ -1,6 +1,8 @@
 ?php
 
-namespace Wikibase;
+namespace Wikibase\Client\RecentChanges;
+
+use Wikibase\DataModel\Entity\EntityId;
 
 /**
  * Represents an external change
diff --git a/client/includes/recentchanges/ExternalChangeFactory.php 
b/client/includes/recentchanges/ExternalChangeFactory.php
index 8b4758c..9a6ca1a 100644
--- a/client/includes/recentchanges/ExternalChangeFactory.php
+++ b/client/includes/recentchanges/ExternalChangeFactory.php
@@ -1,6 +1,6 @@
 ?php
 
-namespace Wikibase;
+namespace Wikibase\Client\RecentChanges;
 
 use InvalidArgumentException;
 use RecentChange;
diff --git a/client/includes/recentchanges/ExternalRecentChange.php 
b/client/includes/recentchanges/ExternalRecentChange.php
index 3e56605..83ccaee 100644
--- a/client/includes/recentchanges/ExternalRecentChange.php
+++ b/client/includes/recentchanges/ExternalRecentChange.php
@@ -1,7 +1,17 @@
 ?php
 
-namespace Wikibase;
+namespace Wikibase\Client\RecentChanges;
 
+use DatabaseBase;
+use MWException;
+use Title;
+
+/**
+ * @since 0.5
+ *
+ * @licence GNU GPL v2+
+ * @author Katie Filbert  aude.w...@gmail.com 
+ */
 class ExternalRecentChange {
 
public $mAttribs = array();
@@ -12,11 +22,11 @@
 * @since 0.3
 *
 * @param array $attribs
-* @param \Title $title
+* @param Title $title
 *
 * @return ExternalRecentChange
 */
-   public static function newFromAttribs( $attribs, $title ) {
+   public static function newFromAttribs( array $attribs, Title $title ) {
$rc = new ExternalRecentChange;
$rc-buildAttributes( $attribs, $title );
return $rc;
@@ -28,9 +38,9 @@
 * @since 0.3
 *
 * @param array @attribs
-* @param \Title $title
+* @param Title $title
 */
-   private function buildAttributes( $attribs, $title ) {
+   public function buildAttributes( array $attribs, Title $title ) {
$metadata = $attribs['wikibase-repo-change'];
 
$isBot = false;
@@ -98,15 +108,15 @@
 *
 * @since 0.4

[MediaWiki-commits] [Gerrit] General cleanup - change (mediawiki...BayesianFilter)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: General cleanup
..

General cleanup

Removed the $dir variable, made one function return true (the pre-existing
true; line likely did nothing), moved one hard-coded English string into
the i18n file, updated/added function documentation, added a meaningful
version number into extension credits.

Change-Id: I2d7255fb3c44853c45c2ed5b3cee8a2e7b16f897
---
M BayesianFilter.Body.php
M BayesianFilter.DBHandler.php
M BayesianFilter.Hooks.php
M BayesianFilter.PageView.php
M BayesianFilter.Tokenizer.php
M BayesianFilter.php
M i18n/en.json
7 files changed, 285 insertions(+), 330 deletions(-)


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

diff --git a/BayesianFilter.Body.php b/BayesianFilter.Body.php
index 6d5ed92..f886626 100644
--- a/BayesianFilter.Body.php
+++ b/BayesianFilter.Body.php
@@ -2,28 +2,26 @@
 
 class BayesianFilter {
 
-   public function __construct()
-   {
+   public function __construct() {
// this is written here instead of autoloader, cause
// tokenizer is written in a way it can be reused by
// other scripts which are not neccesarily part of mediawiki
-   if( !class_exists( 'BayesianFilterTokenizer' ) )
-   {
+   if ( !class_exists( 'BayesianFilterTokenizer' ) ) {
include( __DIR__ . '/BayesianFilter.Tokenizer.php' );
}
}
 
/**
-   * This function users $wgParser and returns the external links
-   * in the content of the page. As of now it is not used anywhere
-   * but in the later releases links would have a very big role to
-   * play in spam detection
-   * @text content of the page which we are inspecting
-   * return an array of links
-   */
-
-   public function getLinks( $text, $title )
-   {
+* This function users $wgParser and returns the external links
+* in the content of the page.
+* As of now it is not used anywhere but in the later releases links 
would
+* have a very big role to play in spam detection.
+*
+* @param string $text Content of the page which we are inspecting
+* @param Title $title
+* @return array An array of links
+*/
+   public function getLinks( $text, $title ) {
global $wgParser, $wgUser;
$options = new ParserOptions();
$modifiedText = $wgParser-preSaveTransform( $text, $title, 
$wgUser, $options );
@@ -33,15 +31,14 @@
}
 
/**
-   * This function contains the main logic for spam detection
-   * it evaulated whether content of a WikiPage is
-   * spam or not.
-   * @text content of the page which we are inspecting
-   * returns true if the content is spam, false otherwise
-   */
-
-   public function checkSpam( $text, $title )
-   {
+* This function contains the main logic for spam detection.
+* It evaluates whether the content of a WikiPage is spam or not.
+*
+* @param string $text Content of the page which we are inspecting
+* @param Title $title
+* @return bool True if the content is spam, false otherwise
+*/
+   public function checkSpam( $text, $title ) {
$links = $this-getLinks( $text, $title );
 
$tokenizer = new BayesianFilterTokenizer;
@@ -50,18 +47,18 @@
$words = array();
 
$token = $tokenizer-tokenize( $text );
-   while( $token )
-   {
+   while ( $token ) {
$token = strtolower( $token );
-   if( !$tokenizer-isStopWord( $token ) )
+   if ( !$tokenizer-isStopWord( $token ) ) {
$words[] = $tokenizer-stem( $token );
+   }
$token = $tokenizer-tokenize();
}
 
$filterDbHandler = new BayesianFilterDBHandler;
global $wgBayesianFilterWordsChunkSize;
$wordsFrequency;
-   $wordsFrequency = $filterDbHandler-getFrequency( $words , 
$wgBayesianFilterWordsChunkSize );
+   $wordsFrequency = $filterDbHandler-getFrequency( $words, 
$wgBayesianFilterWordsChunkSize );
$probMsgGivenSpam = 1.0;
$probMsgGivenHam = 1.0;
 
@@ -69,12 +66,10 @@
$hamCount = isset( $wordsFrequency['ham_count'] ) ? 
$wordsFrequency['ham_count'] : 0;
$wordCount = count( $words );
 
-   foreach ($words as $word ) 
-   {
-   if( isset( $wordsFrequency[$word] ) )
-   {
-   

[MediaWiki-commits] [Gerrit] Hacky threshold support for user profiles as a cheap anti-... - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Hacky threshold support for user profiles as a cheap 
anti-spam measure
..

Hacky threshold support for user profiles as a cheap anti-spam measure

Site admins (with server access, that is) can set $wgUserProfileThresholds
= array( 'edits' = 5 );, for example, to require users to have five edits
(in qualifying namespaces, see $wgNamespacesForEditPoints) before they're
allowed to edit their own user profile via Special:UpdateProfile.

The actual threshold code is a slightly updated version of the older
threshold code present in other related social tools, such as PictureGame,
PollNY, QuizGame, etc.

Change-Id: I98ecc072b04ba28d3cf29dfc0ef75a8a4ee918f0
---
M SocialProfile.php
M UserProfile/SpecialUpdateProfile.php
M UserProfile/UserProfile.php
M UserProfile/i18n/en.json
M UserProfile/i18n/fi.json
5 files changed, 131 insertions(+), 2 deletions(-)


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

diff --git a/SocialProfile.php b/SocialProfile.php
index cc17bf1..6e8632e 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -116,7 +116,7 @@
'path' = __FILE__,
'name' = 'SocialProfile',
'author' = array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
-   'version' = '1.7.0',
+   'version' = '1.7.1',
'url' = 'https://www.mediawiki.org/wiki/Extension:SocialProfile',
'descriptionmsg' = 'socialprofile-desc',
 );
diff --git a/UserProfile/SpecialUpdateProfile.php 
b/UserProfile/SpecialUpdateProfile.php
index d12bdf0..ecb8a21 100644
--- a/UserProfile/SpecialUpdateProfile.php
+++ b/UserProfile/SpecialUpdateProfile.php
@@ -51,7 +51,7 @@
 * @param $section Mixed: parameter passed to the page or null
 */
public function execute( $section ) {
-   global $wgUpdateProfileInRecentChanges, $wgSupressPageTitle;
+   global $wgUpdateProfileInRecentChanges, 
$wgUserProfileThresholds, $wgSupressPageTitle;
 
$out = $this-getOutput();
$request = $this-getRequest();
@@ -82,6 +82,68 @@
return;
}
 
+   /**
+* Create thresholds based on user stats
+*/
+   if ( is_array( $wgUserProfileThresholds )  count( 
$wgUserProfileThresholds )  0 ) {
+   $can_create = true;
+
+   $stats = new UserStats( $user-getId(), 
$user-getName() );
+   $stats_data = $stats-getUserStats();
+
+   $threshold_reason = '';
+   $thresholdReasons = array();
+   foreach ( $wgUserProfileThresholds as $field = 
$threshold ) {
+   // If the threshold is greater than the user's 
amount of whatever
+   // statistic we're looking at, then it means 
that they can't use
+   // this special page.
+   if ( $stats_data[$field]  $threshold ) {
+   $can_create = false;
+   $threshold_reason .= ( ( 
$threshold_reason ) ? ', ' : '' ) . $threshold $field;
+   $thresholdReasons[$threshold] = $field;
+   }
+   }
+
+   // Boo, go away!
+   if ( $can_create == false ) {
+   global $wgSupressPageTitle;
+   $wgSupressPageTitle = false;
+   $out-setPageTitle( $this-msg( 
'user-profile-create-threshold-title' )-text() );
+   $thresholdMessages = array();
+   foreach ( $thresholdReasons as $requiredAmount 
= $reason ) {
+   // Replace underscores with hyphens for 
consistency in i18n
+   // message names.
+   $reason = str_replace( '_', '-', 
$reason );
+   /**
+* For grep:
+* user-profile-create-threshold-edits
+* user-profile-create-threshold-votes
+* 
user-profile-create-threshold-comments
+* 
user-profile-create-threshold-comment-score-plus
+* 
user-profile-create-threshold-comment-score-minus
+* 
user-profile-create-threshold-recruits
+* 
user-profile-create-threshold-friend-count
+

[MediaWiki-commits] [Gerrit] Hacky threshold support for user profiles as a cheap anti-... - change (mediawiki...SocialProfile)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hacky threshold support for user profiles as a cheap 
anti-spam measure
..


Hacky threshold support for user profiles as a cheap anti-spam measure

Site admins (with server access, that is) can set $wgUserProfileThresholds
= array( 'edits' = 5 );, for example, to require users to have five edits
(in qualifying namespaces, see $wgNamespacesForEditPoints) before they're
allowed to edit their own user profile via Special:UpdateProfile.

The actual threshold code is a slightly updated version of the older
threshold code present in other related social tools, such as PictureGame,
PollNY, QuizGame, etc.

Change-Id: I98ecc072b04ba28d3cf29dfc0ef75a8a4ee918f0
---
M SocialProfile.php
M UserProfile/SpecialUpdateProfile.php
M UserProfile/UserProfile.php
M UserProfile/i18n/en.json
M UserProfile/i18n/fi.json
5 files changed, 131 insertions(+), 2 deletions(-)

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



diff --git a/SocialProfile.php b/SocialProfile.php
index cc17bf1..6e8632e 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -116,7 +116,7 @@
'path' = __FILE__,
'name' = 'SocialProfile',
'author' = array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
-   'version' = '1.7.0',
+   'version' = '1.7.1',
'url' = 'https://www.mediawiki.org/wiki/Extension:SocialProfile',
'descriptionmsg' = 'socialprofile-desc',
 );
diff --git a/UserProfile/SpecialUpdateProfile.php 
b/UserProfile/SpecialUpdateProfile.php
index d12bdf0..ecb8a21 100644
--- a/UserProfile/SpecialUpdateProfile.php
+++ b/UserProfile/SpecialUpdateProfile.php
@@ -51,7 +51,7 @@
 * @param $section Mixed: parameter passed to the page or null
 */
public function execute( $section ) {
-   global $wgUpdateProfileInRecentChanges, $wgSupressPageTitle;
+   global $wgUpdateProfileInRecentChanges, 
$wgUserProfileThresholds, $wgSupressPageTitle;
 
$out = $this-getOutput();
$request = $this-getRequest();
@@ -82,6 +82,68 @@
return;
}
 
+   /**
+* Create thresholds based on user stats
+*/
+   if ( is_array( $wgUserProfileThresholds )  count( 
$wgUserProfileThresholds )  0 ) {
+   $can_create = true;
+
+   $stats = new UserStats( $user-getId(), 
$user-getName() );
+   $stats_data = $stats-getUserStats();
+
+   $threshold_reason = '';
+   $thresholdReasons = array();
+   foreach ( $wgUserProfileThresholds as $field = 
$threshold ) {
+   // If the threshold is greater than the user's 
amount of whatever
+   // statistic we're looking at, then it means 
that they can't use
+   // this special page.
+   if ( $stats_data[$field]  $threshold ) {
+   $can_create = false;
+   $threshold_reason .= ( ( 
$threshold_reason ) ? ', ' : '' ) . $threshold $field;
+   $thresholdReasons[$threshold] = $field;
+   }
+   }
+
+   // Boo, go away!
+   if ( $can_create == false ) {
+   global $wgSupressPageTitle;
+   $wgSupressPageTitle = false;
+   $out-setPageTitle( $this-msg( 
'user-profile-create-threshold-title' )-text() );
+   $thresholdMessages = array();
+   foreach ( $thresholdReasons as $requiredAmount 
= $reason ) {
+   // Replace underscores with hyphens for 
consistency in i18n
+   // message names.
+   $reason = str_replace( '_', '-', 
$reason );
+   /**
+* For grep:
+* user-profile-create-threshold-edits
+* user-profile-create-threshold-votes
+* 
user-profile-create-threshold-comments
+* 
user-profile-create-threshold-comment-score-plus
+* 
user-profile-create-threshold-comment-score-minus
+* 
user-profile-create-threshold-recruits
+* 
user-profile-create-threshold-friend-count
+* 
user-profile-create-threshold-foe-count
+ 

[MediaWiki-commits] [Gerrit] Renumber sandbox1-b-eqiad IPv6 to match convention - change (operations/dns)

2014-09-21 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: Renumber sandbox1-b-eqiad IPv6 to match convention
..

Renumber sandbox1-b-eqiad IPv6 to match convention

We've split sandbox VLANs into separate /56 per datacenter. Move our
only existing IPv6 sandbox VLAN into the new space. This is especially
good timing, as dickson.freenode.net is offline and ripe-atlas-eqiad is
not yet online.

Change-Id: I2ccfcb53b020886a3b5b28ef0a249e8cc77e6ee0
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/155.80.208.in-addr.arpa
M templates/wikimedia.org
3 files changed, 11 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/87/161787/1

diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 38940e2..82cc005 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -86,14 +86,6 @@
 1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae4-1004.cr1-eqiad.wikimedia.org.
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae4-1004.cr2-eqiad.wikimedia.org.
 
-; sandbox1-b-eqiad (2620:0:861:52::/64)
-$ORIGIN 2.5.0.0.{{ zonename }}.
-1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   vrrp-gw-1052.eqiad.wmnet.
-1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1052.cr1-eqiad.wikimedia.org.
-2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1052.cr2-eqiad.wikimedia.org.
-8.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   dickson.freenode.net.
-9.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   ripe-atlas-eqiad.wikimedia.org.
-
 
 ; eqiad private subnets (2620:0:861:100::/56)
 
@@ -206,9 +198,11 @@
 
 ; sandbox1-b-eqiad (2620:0:861:202::/64)
 $ORIGIN 2.0.2.0.{{ zonename }}.
-
-; WARNING: sandbox1-b-eqiad is currently allocated to 2620:0:861:52::/64
-; due to legacy reasons and needs renumbering
+1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   vrrp-gw-1202.eqiad.wmnet.
+1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1202.cr1-eqiad.wikimedia.org.
+2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1202.cr2-eqiad.wikimedia.org.
+8.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   dickson.freenode.net.
+9.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   ripe-atlas-eqiad.wikimedia.org.
 
 ; sandbox1-c-eqiad (2620:0:861:203::/64)
 $ORIGIN 3.0.2.0.{{ zonename }}.
diff --git a/templates/155.80.208.in-addr.arpa 
b/templates/155.80.208.in-addr.arpa
index c05f71d..82c02a7 100644
--- a/templates/155.80.208.in-addr.arpa
+++ b/templates/155.80.208.in-addr.arpa
@@ -48,10 +48,10 @@
 38  1H IN PTR   xe-4-2-1.cr1-eqiad.wikimedia.org.
 39  1H IN PTR   xe-1-2-0.cr2-ulsfo.wikimedia.org.
 
-;208.80.155.64/28 Sandbox1-b-eqiad subnet
-65  1H IN PTR   vrrp-gw-1052.wikimedia.org.
-66  1H IN PTR   ae2-1052.cr1-eqiad.wikimedia.org.
-67  1H IN PTR   ae2-1052.cr2-eqiad.wikimedia.org.
+;208.80.155.64/28 sandbox1-b-eqiad subnet
+65  1H IN PTR   vrrp-gw-1202.wikimedia.org.
+66  1H IN PTR   ae2-1202.cr1-eqiad.wikimedia.org.
+67  1H IN PTR   ae2-1202.cr2-eqiad.wikimedia.org.
 68  1H IN PTR   dickson.freenode.net.
 69  1H IN PTR   ripe-atlas-eqiad.wikimedia.org.
 
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 7a7cf06..44bcb5e 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -136,7 +136,7 @@
 dataset21H  IN A208.80.152.185
 dataset1001 1H  IN A208.80.154.11
 dickson 1H  IN A208.80.155.68
-1H  IN  2620:0:861:52:208:80:155:68
+1H  IN  2620:0:861:202:208:80:155:68
 dobson  1H  IN A208.80.152.173
 fenari  1H  IN A208.80.152.165
 francium1H  IN A208.80.154.93
@@ -188,7 +188,7 @@
 protactinium1H  IN A208.80.154.13
 rhenium 1H  IN A208.80.154.52
 ripe-atlas-eqiad 1H  IN A208.80.155.69
-1H  IN  2620:0:861:52:208:80:155:69
+1H  IN  2620:0:861:202:208:80:155:69
 rubidium1H  IN A208.80.154.40
 samarium1H  IN A208.80.155.10
 sanger  1H  IN A208.80.152.187

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ccfcb53b020886a3b5b28ef0a249e8cc77e6ee0
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allocate sandbox vlans for codfw and ulsfo - change (operations/dns)

2014-09-21 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Allocate sandbox vlans for codfw and ulsfo
..


Allocate sandbox vlans for codfw and ulsfo

These are not setup yet. The codfw subnet currently overlaps with
the Tampa sandbox vlan, which will be gone in a month. Do not use
for another few weeks, but feel free to allocate IPs in there.

The corresponding IPv6 subnets have been allocated into a new /56 per
site for security reasons, :200::/56. eqiad's only sandbox subnet
doesn't follow that rule, but for consistency, eqiad is getting the new
allocations (for all rows) as well, with an addendum in a comment that
sandbox1-b-eqiad should be renumbered.

Change-Id: Idc8373c5d6eafcd118820606ab154a8859661018
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/152.80.208.in-addr.arpa
M templates/26.35.198.in-addr.arpa
M templates/3.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
5 files changed, 74 insertions(+), 8 deletions(-)

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



diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index bac9224..4d64ff5 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -14,7 +14,7 @@
 1D  IN NS   ns1.wikimedia.org.
 1D  IN NS   ns2.wikimedia.org.
 
-; codfw public subnets (2620:0:860:0::/80)
+; codfw public subnets (2620:0:860:0::/56)
 
 ; public1-a-codfw (2620:0:860:1::/64)
 $ORIGIN 1.0.0.0.{{ zonename }}.
@@ -51,7 +51,7 @@
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae4-2004.cr2-codfw.wikimedia.org.
 
 
-; codfw private subnets (2620:0:860:100::/80)
+; codfw private subnets (2620:0:860:100::/56)
 
 ; private1-a-codfw (2620:0:860:101::/64)
 $ORIGIN 1.0.1.0.{{ zonename }}.
@@ -85,6 +85,25 @@
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae4-2020.cr2-codfw.wikimedia.org.
 
 
+; codfw sandbox subnets (2620:0:860:200::/56)
+
+; sandbox1-a-codfw (2620:0:860:201::/64)
+$ORIGIN 1.0.2.0.{{ zonename }}.
+1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   vrrp-gw-2201.wikimedia.org.
+
+1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae1-2201.cr1-codfw.wikimedia.org.
+2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae1-2201.cr2-codfw.wikimedia.org.
+
+; sandbox1-b-codfw (2620:0:860:202::/64)
+$ORIGIN 2.0.2.0.{{ zonename }}.
+
+; sandbox1-c-codfw (2620:0:860:203::/64)
+$ORIGIN 3.0.2.0.{{ zonename }}.
+
+; sandbox1-d-codfw (2620:0:860:204::/64)
+$ORIGIN 4.0.2.0.{{ zonename }}.
+
+
 ; LVS Service IPs, 2620:0:860:ed1a::/64
 
 ; LVS Text, 2620:0:860:ed1a::0:0/112
diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 08a7fdf..38940e2 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -14,6 +14,7 @@
 1D  IN NS   ns1.wikimedia.org.
 1D  IN NS   ns2.wikimedia.org.
 
+; eqiad public subnets (2620:0:861:0::/56)
 
 ; public1-a-eqiad (2620:0:861:1::/64)
 $ORIGIN 1.0.0.0.{{ zonename }}.
@@ -85,14 +86,16 @@
 1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae4-1004.cr1-eqiad.wikimedia.org.
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae4-1004.cr2-eqiad.wikimedia.org.
 
-
-; sandbox1-b-eqiad (2620:0:861:52::/64
+; sandbox1-b-eqiad (2620:0:861:52::/64)
 $ORIGIN 2.5.0.0.{{ zonename }}.
 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   vrrp-gw-1052.eqiad.wmnet.
 1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1052.cr1-eqiad.wikimedia.org.
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1052.cr2-eqiad.wikimedia.org.
 8.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   dickson.freenode.net.
 9.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   ripe-atlas-eqiad.wikimedia.org.
+
+
+; eqiad private subnets (2620:0:861:100::/56)
 
 ; private1-a-eqiad (2620:0:861:101::/64)
 $ORIGIN 1.0.1.0.{{ zonename }}.
@@ -196,6 +199,24 @@
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae3-1119.cr2-eqiad.wikimedia.org.
 
 
+; eqiad sandbox subnets (2620:0:861:200::/56)
+
+; sandbox1-a-eqiad (2620:0:861:201::/64)
+$ORIGIN 1.0.2.0.{{ zonename }}.
+
+; sandbox1-b-eqiad (2620:0:861:202::/64)
+$ORIGIN 2.0.2.0.{{ zonename }}.
+
+; WARNING: sandbox1-b-eqiad is currently allocated to 2620:0:861:52::/64
+; due to legacy reasons and needs renumbering
+
+; sandbox1-c-eqiad (2620:0:861:203::/64)
+$ORIGIN 3.0.2.0.{{ zonename }}.
+
+; sandbox1-d-eqiad (2620:0:861:204::/64)
+$ORIGIN 4.0.2.0.{{ zonename }}.
+
+
 ; LVS Service IPs, 2620:0:861:ed1a::/64
 
 ; LVS Text, 2620:0:861:ed1a::0:0/112
diff --git a/templates/152.80.208.in-addr.arpa 
b/templates/152.80.208.in-addr.arpa
index cd0cdd3..763e7c6 100644
--- a/templates/152.80.208.in-addr.arpa
+++ b/templates/152.80.208.in-addr.arpa
@@ -68,3 +68,12 @@
 230 1H IN PTR   ts-array4a.mgmt.toolserver.org.
 
 234 1H IN PTR   web.amaranth.toolserver.org.
+
+; 

[MediaWiki-commits] [Gerrit] Allocate IPv4/IPv6 for RIPE Atlas codfw/ulsfo - change (operations/dns)

2014-09-21 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Allocate IPv4/IPv6 for RIPE Atlas codfw/ulsfo
..


Allocate IPv4/IPv6 for RIPE Atlas codfw/ulsfo

These two go in the sandbox VLANs, similar to how eqiad is set up.

Change-Id: I870e548c0e3cbceb84ccc9b6e88d5a89faaf1bbc
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/152.80.208.in-addr.arpa
M templates/26.35.198.in-addr.arpa
M templates/3.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wikimedia.org
5 files changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 4d64ff5..d58fe0c 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -94,6 +94,8 @@
 1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae1-2201.cr1-codfw.wikimedia.org.
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae1-2201.cr2-codfw.wikimedia.org.
 
+4.4.2.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   ripe-atlas-codfw.wikimedia.org.
+
 ; sandbox1-b-codfw (2620:0:860:202::/64)
 $ORIGIN 2.0.2.0.{{ zonename }}.
 
diff --git a/templates/152.80.208.in-addr.arpa 
b/templates/152.80.208.in-addr.arpa
index 763e7c6..076cb92 100644
--- a/templates/152.80.208.in-addr.arpa
+++ b/templates/152.80.208.in-addr.arpa
@@ -77,3 +77,4 @@
 241 1H IN PTR   vrrp-gw-2201.wikimedia.org.
 242 1H IN PTR   ae1-2201.cr1-codfw.wikimedia.org.
 243 1H IN PTR   ae1-2201.cr2-codfw.wikimedia.org.
+244 1H IN PTR   ripe-atlas-codfw.wikimedia.org.
diff --git a/templates/26.35.198.in-addr.arpa b/templates/26.35.198.in-addr.arpa
index 2d2a49f..0b06e9f 100644
--- a/templates/26.35.198.in-addr.arpa
+++ b/templates/26.35.198.in-addr.arpa
@@ -74,3 +74,4 @@
 241 1H IN PTR   vrrp-gw-1221.wikimedia.org.
 242 1H IN PTR   ae1-1221.cr1-ulsfo.wikimedia.org.
 243 1H IN PTR   ae1-1221.cr2-ulsfo.wikimedia.org.
+244 1H IN PTR   ripe-atlas-ulsfo.wikimedia.org.
diff --git a/templates/3.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/3.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 32e38d8..071dcb3 100644
--- a/templates/3.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/3.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -64,6 +64,8 @@
 1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae1-1221.cr1-ulsfo.wikimedia.org.
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae1-1221.cr2-ulsfo.wikimedia.org.
 
+4.4.2.0.6.2.0.0.5.3.0.0.8.9.1.0 1H IN PTR   ripe-atlas-ulsfo.wikimedia.org.
+
 
 ; Infrastructure IPs
 
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 44bcb5e..24225bc 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -189,6 +189,10 @@
 rhenium 1H  IN A208.80.154.52
 ripe-atlas-eqiad 1H  IN A208.80.155.69
 1H  IN  2620:0:861:202:208:80:155:69
+ripe-atlas-codfw 1H  IN A208.80.152.244
+1H  IN  2620:0:860:201:208:80:152:244
+ripe-atlas-ulsfo 1H  IN A198.35.26.244
+1H  IN  2620:0:863:201:198:35:26:244
 rubidium1H  IN A208.80.154.40
 samarium1H  IN A208.80.155.10
 sanger  1H  IN A208.80.152.187

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I870e548c0e3cbceb84ccc9b6e88d5a89faaf1bbc
Gerrit-PatchSet: 3
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Renumber sandbox1-b-eqiad IPv6 to match convention - change (operations/dns)

2014-09-21 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Renumber sandbox1-b-eqiad IPv6 to match convention
..


Renumber sandbox1-b-eqiad IPv6 to match convention

We've split sandbox VLANs into separate /56 per datacenter. Move our
only existing IPv6 sandbox VLAN into the new space. This is especially
good timing, as dickson.freenode.net is offline and ripe-atlas-eqiad is
not yet online.

Change-Id: I2ccfcb53b020886a3b5b28ef0a249e8cc77e6ee0
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/155.80.208.in-addr.arpa
M templates/wikimedia.org
3 files changed, 11 insertions(+), 17 deletions(-)

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



diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 38940e2..82cc005 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -86,14 +86,6 @@
 1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae4-1004.cr1-eqiad.wikimedia.org.
 2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae4-1004.cr2-eqiad.wikimedia.org.
 
-; sandbox1-b-eqiad (2620:0:861:52::/64)
-$ORIGIN 2.5.0.0.{{ zonename }}.
-1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   vrrp-gw-1052.eqiad.wmnet.
-1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1052.cr1-eqiad.wikimedia.org.
-2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1052.cr2-eqiad.wikimedia.org.
-8.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   dickson.freenode.net.
-9.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   ripe-atlas-eqiad.wikimedia.org.
-
 
 ; eqiad private subnets (2620:0:861:100::/56)
 
@@ -206,9 +198,11 @@
 
 ; sandbox1-b-eqiad (2620:0:861:202::/64)
 $ORIGIN 2.0.2.0.{{ zonename }}.
-
-; WARNING: sandbox1-b-eqiad is currently allocated to 2620:0:861:52::/64
-; due to legacy reasons and needs renumbering
+1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR   vrrp-gw-1202.eqiad.wmnet.
+1.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1202.cr1-eqiad.wikimedia.org.
+2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR   ae2-1202.cr2-eqiad.wikimedia.org.
+8.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   dickson.freenode.net.
+9.6.0.0.5.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   ripe-atlas-eqiad.wikimedia.org.
 
 ; sandbox1-c-eqiad (2620:0:861:203::/64)
 $ORIGIN 3.0.2.0.{{ zonename }}.
diff --git a/templates/155.80.208.in-addr.arpa 
b/templates/155.80.208.in-addr.arpa
index c05f71d..82c02a7 100644
--- a/templates/155.80.208.in-addr.arpa
+++ b/templates/155.80.208.in-addr.arpa
@@ -48,10 +48,10 @@
 38  1H IN PTR   xe-4-2-1.cr1-eqiad.wikimedia.org.
 39  1H IN PTR   xe-1-2-0.cr2-ulsfo.wikimedia.org.
 
-;208.80.155.64/28 Sandbox1-b-eqiad subnet
-65  1H IN PTR   vrrp-gw-1052.wikimedia.org.
-66  1H IN PTR   ae2-1052.cr1-eqiad.wikimedia.org.
-67  1H IN PTR   ae2-1052.cr2-eqiad.wikimedia.org.
+;208.80.155.64/28 sandbox1-b-eqiad subnet
+65  1H IN PTR   vrrp-gw-1202.wikimedia.org.
+66  1H IN PTR   ae2-1202.cr1-eqiad.wikimedia.org.
+67  1H IN PTR   ae2-1202.cr2-eqiad.wikimedia.org.
 68  1H IN PTR   dickson.freenode.net.
 69  1H IN PTR   ripe-atlas-eqiad.wikimedia.org.
 
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 7a7cf06..44bcb5e 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -136,7 +136,7 @@
 dataset21H  IN A208.80.152.185
 dataset1001 1H  IN A208.80.154.11
 dickson 1H  IN A208.80.155.68
-1H  IN  2620:0:861:52:208:80:155:68
+1H  IN  2620:0:861:202:208:80:155:68
 dobson  1H  IN A208.80.152.173
 fenari  1H  IN A208.80.152.165
 francium1H  IN A208.80.154.93
@@ -188,7 +188,7 @@
 protactinium1H  IN A208.80.154.13
 rhenium 1H  IN A208.80.154.52
 ripe-atlas-eqiad 1H  IN A208.80.155.69
-1H  IN  2620:0:861:52:208:80:155:69
+1H  IN  2620:0:861:202:208:80:155:69
 rubidium1H  IN A208.80.154.40
 samarium1H  IN A208.80.155.10
 sanger  1H  IN A208.80.152.187

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ccfcb53b020886a3b5b28ef0a249e8cc77e6ee0
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@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] Removing legacy (PHP) i18n support, as pre-1.23 MediaWikis a... - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Removing legacy (PHP) i18n support, as pre-1.23 MediaWikis 
aren't supported by SocialProfile anymore
..

Removing legacy (PHP) i18n support, as pre-1.23 MediaWikis aren't supported by 
SocialProfile anymore

Change-Id: I5dd07e496a7befc493a5f492ffe0fefddab98116
---
D SocialProfile.i18n.php
M SocialProfile.php
D UserBoard/UserBoard.i18n.php
D UserProfile/UserProfile.i18n.php
D UserRelationship/UserRelationship.i18n.php
D UserStats/UserStats.i18n.php
6 files changed, 0 insertions(+), 180 deletions(-)


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

diff --git a/SocialProfile.i18n.php b/SocialProfile.i18n.php
deleted file mode 100644
index 9025546..000
--- a/SocialProfile.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim998eb30466cac284' ) ) {
-   function wfJsonI18nShim998eb30466cac284( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim998eb30466cac284';
-}
diff --git a/SocialProfile.php b/SocialProfile.php
index 6e8632e..dc4ee60 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -25,17 +25,12 @@
 
 // Internationalization files
 $wgMessagesDirs['SocialProfile'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['SocialProfile'] = __DIR__ . 
'/SocialProfile.i18n.php';
 $wgExtensionMessagesFiles['SocialProfileAlias'] = __DIR__ . 
'/SocialProfile.alias.php';
 
 $wgMessagesDirs['SocialProfileUserBoard'] = __DIR__ . '/UserBoard/i18n';
-$wgExtensionMessagesFiles['SocialProfileUserBoard'] = __DIR__ . 
'/UserBoard/UserBoard.i18n.php';
 $wgMessagesDirs['SocialProfileUserProfile'] = __DIR__ . '/UserProfile/i18n';
-$wgExtensionMessagesFiles['SocialProfileUserProfile'] = __DIR__ . 
'/UserProfile/UserProfile.i18n.php';
 $wgMessagesDirs['SocialProfileUserRelationship'] = __DIR__ . 
'/UserRelationship/i18n';
-$wgExtensionMessagesFiles['SocialProfileUserRelationship'] = __DIR__ . 
'/UserRelationship/UserRelationship.i18n.php';
 $wgMessagesDirs['SocialProfileUserStats'] = __DIR__ . '/UserStats/i18n';
-$wgExtensionMessagesFiles['SocialProfileUserStats'] = __DIR__ . 
'/UserStats/UserStats.i18n.php';
 $wgExtensionMessagesFiles['SocialProfileNamespaces'] = __DIR__ . 
'/SocialProfile.namespaces.php';
 $wgExtensionMessagesFiles['AvatarMagic'] = __DIR__ . 
'/UserProfile/Avatar.magic.i18n.php';
 
diff --git a/UserBoard/UserBoard.i18n.php b/UserBoard/UserBoard.i18n.php
deleted file mode 100644
index 50700cb..000
--- a/UserBoard/UserBoard.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim5d4afcb947bc8f8c' ) ) {
-   function wfJsonI18nShim5d4afcb947bc8f8c( $cache, $code, $cachedData ) {
-  

[MediaWiki-commits] [Gerrit] Removing legacy (PHP) i18n support, as pre-1.23 MediaWikis a... - change (mediawiki...SocialProfile)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Removing legacy (PHP) i18n support, as pre-1.23 MediaWikis 
aren't supported by SocialProfile anymore
..


Removing legacy (PHP) i18n support, as pre-1.23 MediaWikis aren't supported by 
SocialProfile anymore

Change-Id: I5dd07e496a7befc493a5f492ffe0fefddab98116
---
D SocialProfile.i18n.php
M SocialProfile.php
D UserBoard/UserBoard.i18n.php
D UserProfile/UserProfile.i18n.php
D UserRelationship/UserRelationship.i18n.php
D UserStats/UserStats.i18n.php
6 files changed, 0 insertions(+), 180 deletions(-)

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



diff --git a/SocialProfile.i18n.php b/SocialProfile.i18n.php
deleted file mode 100644
index 9025546..000
--- a/SocialProfile.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim998eb30466cac284' ) ) {
-   function wfJsonI18nShim998eb30466cac284( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim998eb30466cac284';
-}
diff --git a/SocialProfile.php b/SocialProfile.php
index 6e8632e..dc4ee60 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -25,17 +25,12 @@
 
 // Internationalization files
 $wgMessagesDirs['SocialProfile'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['SocialProfile'] = __DIR__ . 
'/SocialProfile.i18n.php';
 $wgExtensionMessagesFiles['SocialProfileAlias'] = __DIR__ . 
'/SocialProfile.alias.php';
 
 $wgMessagesDirs['SocialProfileUserBoard'] = __DIR__ . '/UserBoard/i18n';
-$wgExtensionMessagesFiles['SocialProfileUserBoard'] = __DIR__ . 
'/UserBoard/UserBoard.i18n.php';
 $wgMessagesDirs['SocialProfileUserProfile'] = __DIR__ . '/UserProfile/i18n';
-$wgExtensionMessagesFiles['SocialProfileUserProfile'] = __DIR__ . 
'/UserProfile/UserProfile.i18n.php';
 $wgMessagesDirs['SocialProfileUserRelationship'] = __DIR__ . 
'/UserRelationship/i18n';
-$wgExtensionMessagesFiles['SocialProfileUserRelationship'] = __DIR__ . 
'/UserRelationship/UserRelationship.i18n.php';
 $wgMessagesDirs['SocialProfileUserStats'] = __DIR__ . '/UserStats/i18n';
-$wgExtensionMessagesFiles['SocialProfileUserStats'] = __DIR__ . 
'/UserStats/UserStats.i18n.php';
 $wgExtensionMessagesFiles['SocialProfileNamespaces'] = __DIR__ . 
'/SocialProfile.namespaces.php';
 $wgExtensionMessagesFiles['AvatarMagic'] = __DIR__ . 
'/UserProfile/Avatar.magic.i18n.php';
 
diff --git a/UserBoard/UserBoard.i18n.php b/UserBoard/UserBoard.i18n.php
deleted file mode 100644
index 50700cb..000
--- a/UserBoard/UserBoard.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim5d4afcb947bc8f8c' ) ) {
-   function wfJsonI18nShim5d4afcb947bc8f8c( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 

[MediaWiki-commits] [Gerrit] Since $wgSpecialPageGroups has been deprecated since MW 1.21... - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Since $wgSpecialPageGroups has been deprecated since MW 1.21, 
group the special pages under the correct headers using the modern, recommended 
way
..

Since $wgSpecialPageGroups has been deprecated since MW 1.21, group the special 
pages under the correct headers using the modern, recommended way

Change-Id: I443dcaaa236613ab17f0debd51f96b231c5efbcc
---
M SocialProfile.php
M UserBoard/SpecialUserBoard.php
M UserProfile/SpecialRemoveAvatar.php
M UserRelationship/SpecialAddRelationship.php
M UserRelationship/SpecialRemoveRelationship.php
M UserRelationship/SpecialViewRelationshipRequests.php
M UserRelationship/SpecialViewRelationships.php
7 files changed, 53 insertions(+), 8 deletions(-)


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

diff --git a/SocialProfile.php b/SocialProfile.php
index dc4ee60..2a29658 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -83,14 +83,6 @@
 $wgSpecialPages['ViewRelationshipRequests'] = 
'SpecialViewRelationshipRequests';
 $wgSpecialPages['ViewRelationships'] = 'SpecialViewRelationships';
 
-// Special page groups for MW 1.13+
-$wgSpecialPageGroups['AddRelationship'] = 'users';
-$wgSpecialPageGroups['RemoveAvatar'] = 'users';
-$wgSpecialPageGroups['RemoveRelationship'] = 'users';
-$wgSpecialPageGroups['UserBoard'] = 'users';
-$wgSpecialPageGroups['ViewRelationshipRequests'] = 'users';
-$wgSpecialPageGroups['ViewRelationships'] = 'users';
-
 // Necessary AJAX functions
 require_once( 
$IP/extensions/SocialProfile/UserBoard/UserBoard_AjaxFunctions.php );
 require_once( 
$IP/extensions/SocialProfile/UserRelationship/Relationship_AjaxFunctions.php 
);
diff --git a/UserBoard/SpecialUserBoard.php b/UserBoard/SpecialUserBoard.php
index 06bbfd4..47aa2d5 100644
--- a/UserBoard/SpecialUserBoard.php
+++ b/UserBoard/SpecialUserBoard.php
@@ -19,6 +19,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $params Mixed: parameter(s) passed to the page or null
diff --git a/UserProfile/SpecialRemoveAvatar.php 
b/UserProfile/SpecialRemoveAvatar.php
index c3e1cae..4b02648 100644
--- a/UserProfile/SpecialRemoveAvatar.php
+++ b/UserProfile/SpecialRemoveAvatar.php
@@ -15,6 +15,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $user Mixed: parameter passed to the page or null
diff --git a/UserRelationship/SpecialAddRelationship.php 
b/UserRelationship/SpecialAddRelationship.php
index 09b52b8..8567485 100644
--- a/UserRelationship/SpecialAddRelationship.php
+++ b/UserRelationship/SpecialAddRelationship.php
@@ -22,6 +22,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $params Mixed: parameter(s) passed to the page or null
diff --git a/UserRelationship/SpecialRemoveRelationship.php 
b/UserRelationship/SpecialRemoveRelationship.php
index d1b1ae7..d2f466a 100644
--- a/UserRelationship/SpecialRemoveRelationship.php
+++ b/UserRelationship/SpecialRemoveRelationship.php
@@ -21,6 +21,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $params Mixed: parameter(s) passed to the page or null
diff --git a/UserRelationship/SpecialViewRelationshipRequests.php 
b/UserRelationship/SpecialViewRelationshipRequests.php
index da959b5..8404f7c 100644
--- a/UserRelationship/SpecialViewRelationshipRequests.php
+++ b/UserRelationship/SpecialViewRelationshipRequests.php
@@ -20,6 +20,14 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+   /**
 * Show the special page
 *
 * @param $params Mixed: parameter(s) passed to the page or null
diff --git a/UserRelationship/SpecialViewRelationships.php 

[MediaWiki-commits] [Gerrit] Use default site for API tests - change (pywikibot/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use default site for API tests
..


Use default site for API tests

Change-Id: I446e0a807724bd63f78237ab867b670c9a8c951a
---
M tests/api_tests.py
1 file changed, 5 insertions(+), 9 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  Nullzero: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/api_tests.py b/tests/api_tests.py
index 3ff2cf6..a06e6fa 100644
--- a/tests/api_tests.py
+++ b/tests/api_tests.py
@@ -9,13 +9,11 @@
 import datetime
 import pywikibot
 import pywikibot.data.api as api
-from tests.aspects import unittest, TestCase
+from tests.aspects import unittest, TestCase, DefaultSiteTestCase
 
 
-class TestApiFunctions(TestCase):
+class TestApiFunctions(DefaultSiteTestCase):
 
-family = 'wikipedia'
-code = 'en'
 cached = True
 
 def testObjectCreation(self):
@@ -119,25 +117,23 @@
 self.assertEqual(len(results), 4)  # total=-1 but 4 expected
 
 
-class TestCachedRequest(TestCase):
+class TestCachedRequest(DefaultSiteTestCase):
 
 Test API Request caching.
 
 This test class does not use the forced test caching.
 
 
-family = 'wikipedia'
-code = 'en'
-
 cached = False
 
 def testResults(self):
 mysite = self.get_site()
+mainpage = self.get_mainpage()
 # Run the cached query twice to ensure the
 # data returned is equal
 params = {'action': 'query',
   'prop': 'info',
-  'titles': 'Main Page',
+  'titles': mainpage.title(),
   }
 req = api.CachedRequest(datetime.timedelta(minutes=10),
 site=mysite, **params)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I446e0a807724bd63f78237ab867b670c9a8c951a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Nullzero nullzero.f...@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] Since $wgSpecialPageGroups has been deprecated since MW 1.21... - change (mediawiki...SocialProfile)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Since $wgSpecialPageGroups has been deprecated since MW 1.21, 
group the special pages under the correct headers using the modern, recommended 
way
..


Since $wgSpecialPageGroups has been deprecated since MW 1.21, group the special 
pages under the correct headers using the modern, recommended way

Change-Id: I443dcaaa236613ab17f0debd51f96b231c5efbcc
---
M SocialProfile.php
M UserBoard/SpecialUserBoard.php
M UserProfile/SpecialRemoveAvatar.php
M UserRelationship/SpecialAddRelationship.php
M UserRelationship/SpecialRemoveRelationship.php
M UserRelationship/SpecialViewRelationshipRequests.php
M UserRelationship/SpecialViewRelationships.php
7 files changed, 53 insertions(+), 8 deletions(-)

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



diff --git a/SocialProfile.php b/SocialProfile.php
index dc4ee60..2a29658 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -83,14 +83,6 @@
 $wgSpecialPages['ViewRelationshipRequests'] = 
'SpecialViewRelationshipRequests';
 $wgSpecialPages['ViewRelationships'] = 'SpecialViewRelationships';
 
-// Special page groups for MW 1.13+
-$wgSpecialPageGroups['AddRelationship'] = 'users';
-$wgSpecialPageGroups['RemoveAvatar'] = 'users';
-$wgSpecialPageGroups['RemoveRelationship'] = 'users';
-$wgSpecialPageGroups['UserBoard'] = 'users';
-$wgSpecialPageGroups['ViewRelationshipRequests'] = 'users';
-$wgSpecialPageGroups['ViewRelationships'] = 'users';
-
 // Necessary AJAX functions
 require_once( 
$IP/extensions/SocialProfile/UserBoard/UserBoard_AjaxFunctions.php );
 require_once( 
$IP/extensions/SocialProfile/UserRelationship/Relationship_AjaxFunctions.php 
);
diff --git a/UserBoard/SpecialUserBoard.php b/UserBoard/SpecialUserBoard.php
index 06bbfd4..47aa2d5 100644
--- a/UserBoard/SpecialUserBoard.php
+++ b/UserBoard/SpecialUserBoard.php
@@ -19,6 +19,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $params Mixed: parameter(s) passed to the page or null
diff --git a/UserProfile/SpecialRemoveAvatar.php 
b/UserProfile/SpecialRemoveAvatar.php
index c3e1cae..4b02648 100644
--- a/UserProfile/SpecialRemoveAvatar.php
+++ b/UserProfile/SpecialRemoveAvatar.php
@@ -15,6 +15,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $user Mixed: parameter passed to the page or null
diff --git a/UserRelationship/SpecialAddRelationship.php 
b/UserRelationship/SpecialAddRelationship.php
index 09b52b8..8567485 100644
--- a/UserRelationship/SpecialAddRelationship.php
+++ b/UserRelationship/SpecialAddRelationship.php
@@ -22,6 +22,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $params Mixed: parameter(s) passed to the page or null
diff --git a/UserRelationship/SpecialRemoveRelationship.php 
b/UserRelationship/SpecialRemoveRelationship.php
index d1b1ae7..d2f466a 100644
--- a/UserRelationship/SpecialRemoveRelationship.php
+++ b/UserRelationship/SpecialRemoveRelationship.php
@@ -21,6 +21,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $params Mixed: parameter(s) passed to the page or null
diff --git a/UserRelationship/SpecialViewRelationshipRequests.php 
b/UserRelationship/SpecialViewRelationshipRequests.php
index da959b5..8404f7c 100644
--- a/UserRelationship/SpecialViewRelationshipRequests.php
+++ b/UserRelationship/SpecialViewRelationshipRequests.php
@@ -20,6 +20,14 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+   /**
 * Show the special page
 *
 * @param $params Mixed: parameter(s) passed to the page or null
diff --git a/UserRelationship/SpecialViewRelationships.php 
b/UserRelationship/SpecialViewRelationships.php
index 472eee1..596213c 100644
--- 

[MediaWiki-commits] [Gerrit] Use addModuleStyles() for loading CSS to avoid a Flash of Un... - change (mediawiki...SocialProfile)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use addModuleStyles() for loading CSS to avoid a Flash of 
Unstyled Content
..


Use addModuleStyles() for loading CSS to avoid a Flash of Unstyled Content

Change-Id: I312696f4a5dc72c8ecf9b6122ead8b5adbdce70f
---
M UserStats/TopUsers.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/UserStats/TopUsers.php b/UserStats/TopUsers.php
index e836221..88616b9 100644
--- a/UserStats/TopUsers.php
+++ b/UserStats/TopUsers.php
@@ -20,7 +20,7 @@
$out = $this-getOutput();
 
// Load CSS
-   $out-addModules( 'ext.socialprofile.userstats.css' );
+   $out-addModuleStyles( 'ext.socialprofile.userstats.css' );
 
// Set the page title, robot policies, etc.
$this-setHeaders();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I312696f4a5dc72c8ecf9b6122ead8b5adbdce70f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
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 addModuleStyles() for loading CSS to avoid a Flash of Un... - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Use addModuleStyles() for loading CSS to avoid a Flash of 
Unstyled Content
..

Use addModuleStyles() for loading CSS to avoid a Flash of Unstyled Content

Change-Id: I312696f4a5dc72c8ecf9b6122ead8b5adbdce70f
---
M UserStats/TopUsers.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/UserStats/TopUsers.php b/UserStats/TopUsers.php
index e836221..88616b9 100644
--- a/UserStats/TopUsers.php
+++ b/UserStats/TopUsers.php
@@ -20,7 +20,7 @@
$out = $this-getOutput();
 
// Load CSS
-   $out-addModules( 'ext.socialprofile.userstats.css' );
+   $out-addModuleStyles( 'ext.socialprofile.userstats.css' );
 
// Set the page title, robot policies, etc.
$this-setHeaders();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I312696f4a5dc72c8ecf9b6122ead8b5adbdce70f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] s/four spaces/one tab/g in every (non-en) i18n JSON file - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: s/four spaces/one tab/g in every (non-en) i18n JSON file
..

s/four spaces/one tab/g in every (non-en) i18n JSON file

Change-Id: Ifadce93cbc4c5592530c9b002e43a6fd4fed3d46
---
M SystemGifts/i18n/af.json
M SystemGifts/i18n/an.json
M SystemGifts/i18n/ar.json
M SystemGifts/i18n/arc.json
M SystemGifts/i18n/arz.json
M SystemGifts/i18n/az.json
M SystemGifts/i18n/be-tarask.json
M SystemGifts/i18n/bg.json
M SystemGifts/i18n/bn.json
M SystemGifts/i18n/br.json
M SystemGifts/i18n/bs.json
M SystemGifts/i18n/ca.json
M SystemGifts/i18n/ckb.json
M SystemGifts/i18n/cs.json
M SystemGifts/i18n/de-formal.json
M SystemGifts/i18n/de.json
M SystemGifts/i18n/dsb.json
M SystemGifts/i18n/el.json
M SystemGifts/i18n/eo.json
M SystemGifts/i18n/es.json
M SystemGifts/i18n/et.json
M SystemGifts/i18n/eu.json
M SystemGifts/i18n/fa.json
M SystemGifts/i18n/fi.json
M SystemGifts/i18n/fr.json
M SystemGifts/i18n/frp.json
M SystemGifts/i18n/gl.json
M SystemGifts/i18n/grc.json
M SystemGifts/i18n/gsw.json
M SystemGifts/i18n/he.json
M SystemGifts/i18n/hsb.json
M SystemGifts/i18n/hu.json
M SystemGifts/i18n/ia.json
M SystemGifts/i18n/id.json
M SystemGifts/i18n/ig.json
M SystemGifts/i18n/it.json
M SystemGifts/i18n/ja.json
M SystemGifts/i18n/km.json
M SystemGifts/i18n/kn.json
M SystemGifts/i18n/ksh.json
M SystemGifts/i18n/ku-latn.json
M SystemGifts/i18n/lb.json
M SystemGifts/i18n/mk.json
M SystemGifts/i18n/ms.json
M SystemGifts/i18n/nb.json
M SystemGifts/i18n/nl.json
M SystemGifts/i18n/nn.json
M SystemGifts/i18n/oc.json
M SystemGifts/i18n/pdc.json
M SystemGifts/i18n/pfl.json
M SystemGifts/i18n/pl.json
M SystemGifts/i18n/pms.json
M SystemGifts/i18n/ps.json
M SystemGifts/i18n/pt-br.json
M SystemGifts/i18n/pt.json
M SystemGifts/i18n/qqq.json
M SystemGifts/i18n/ro.json
M SystemGifts/i18n/roa-tara.json
M SystemGifts/i18n/ru.json
M SystemGifts/i18n/rue.json
M SystemGifts/i18n/sk.json
M SystemGifts/i18n/sl.json
M SystemGifts/i18n/sr-ec.json
M SystemGifts/i18n/sr-el.json
M SystemGifts/i18n/sv.json
M SystemGifts/i18n/te.json
M SystemGifts/i18n/tl.json
M SystemGifts/i18n/tr.json
M SystemGifts/i18n/uk.json
M SystemGifts/i18n/vep.json
M SystemGifts/i18n/vi.json
M SystemGifts/i18n/yi.json
M SystemGifts/i18n/zh-hans.json
M SystemGifts/i18n/zh-hant.json
M UserActivity/i18n/af.json
M UserActivity/i18n/an.json
M UserActivity/i18n/ar.json
M UserActivity/i18n/arc.json
M UserActivity/i18n/az.json
M UserActivity/i18n/be-tarask.json
M UserActivity/i18n/bn.json
M UserActivity/i18n/br.json
M UserActivity/i18n/bs.json
M UserActivity/i18n/cs.json
M UserActivity/i18n/de.json
M UserActivity/i18n/dsb.json
M UserActivity/i18n/es.json
M UserActivity/i18n/fa.json
M UserActivity/i18n/fi.json
M UserActivity/i18n/fr.json
M UserActivity/i18n/frp.json
M UserActivity/i18n/gl.json
M UserActivity/i18n/gsw.json
M UserActivity/i18n/he.json
M UserActivity/i18n/hsb.json
M UserActivity/i18n/hu.json
M UserActivity/i18n/ia.json
M UserActivity/i18n/id.json
M UserActivity/i18n/ja.json
M UserActivity/i18n/kn.json
M UserActivity/i18n/ksh.json
M UserActivity/i18n/lb.json
M UserActivity/i18n/ltg.json
M UserActivity/i18n/lv.json
M UserActivity/i18n/mk.json
M UserActivity/i18n/mn.json
M UserActivity/i18n/ms.json
M UserActivity/i18n/nb.json
M UserActivity/i18n/nl.json
M UserActivity/i18n/nn.json
M UserActivity/i18n/pdc.json
M UserActivity/i18n/pl.json
M UserActivity/i18n/pms.json
M UserActivity/i18n/ps.json
M UserActivity/i18n/pt-br.json
M UserActivity/i18n/pt.json
M UserActivity/i18n/qqq.json
M UserActivity/i18n/ru.json
M UserActivity/i18n/rue.json
M UserActivity/i18n/sr-ec.json
M UserActivity/i18n/sr-el.json
M UserActivity/i18n/sv.json
M UserActivity/i18n/te.json
M UserActivity/i18n/tl.json
M UserActivity/i18n/tr.json
M UserActivity/i18n/uk.json
M UserActivity/i18n/zh-hans.json
M UserActivity/i18n/zh-hant.json
M UserBoard/i18n/af.json
M UserBoard/i18n/am.json
M UserBoard/i18n/an.json
M UserBoard/i18n/ar.json
M UserBoard/i18n/arc.json
M UserBoard/i18n/arz.json
M UserBoard/i18n/az.json
M UserBoard/i18n/be-tarask.json
M UserBoard/i18n/bg.json
M UserBoard/i18n/bn.json
M UserBoard/i18n/br.json
M UserBoard/i18n/bs.json
M UserBoard/i18n/ca.json
M UserBoard/i18n/ce.json
M UserBoard/i18n/ckb.json
M UserBoard/i18n/cs.json
M UserBoard/i18n/cu.json
M UserBoard/i18n/da.json
M UserBoard/i18n/de-formal.json
M UserBoard/i18n/de.json
M UserBoard/i18n/dsb.json
M UserBoard/i18n/ee.json
M UserBoard/i18n/el.json
M UserBoard/i18n/eo.json
M UserBoard/i18n/es.json
M UserBoard/i18n/et.json
M UserBoard/i18n/eu.json
M UserBoard/i18n/fa.json
M UserBoard/i18n/fi.json
M UserBoard/i18n/fr.json
M UserBoard/i18n/frp.json
M UserBoard/i18n/fy.json
M UserBoard/i18n/gl.json
M UserBoard/i18n/got.json
M UserBoard/i18n/grc.json
M UserBoard/i18n/gsw.json
M UserBoard/i18n/ha.json
M UserBoard/i18n/hak.json
M UserBoard/i18n/he.json
M UserBoard/i18n/hi.json
M 

[MediaWiki-commits] [Gerrit] s/four spaces/one tab/g in every (non-en) i18n JSON file - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: s/four spaces/one tab/g in every (non-en) i18n JSON file
..


s/four spaces/one tab/g in every (non-en) i18n JSON file

Change-Id: Ifadce93cbc4c5592530c9b002e43a6fd4fed3d46
---
M SystemGifts/i18n/af.json
M SystemGifts/i18n/an.json
M SystemGifts/i18n/ar.json
M SystemGifts/i18n/arc.json
M SystemGifts/i18n/arz.json
M SystemGifts/i18n/az.json
M SystemGifts/i18n/be-tarask.json
M SystemGifts/i18n/bg.json
M SystemGifts/i18n/bn.json
M SystemGifts/i18n/br.json
M SystemGifts/i18n/bs.json
M SystemGifts/i18n/ca.json
M SystemGifts/i18n/ckb.json
M SystemGifts/i18n/cs.json
M SystemGifts/i18n/de-formal.json
M SystemGifts/i18n/de.json
M SystemGifts/i18n/dsb.json
M SystemGifts/i18n/el.json
M SystemGifts/i18n/eo.json
M SystemGifts/i18n/es.json
M SystemGifts/i18n/et.json
M SystemGifts/i18n/eu.json
M SystemGifts/i18n/fa.json
M SystemGifts/i18n/fi.json
M SystemGifts/i18n/fr.json
M SystemGifts/i18n/frp.json
M SystemGifts/i18n/gl.json
M SystemGifts/i18n/grc.json
M SystemGifts/i18n/gsw.json
M SystemGifts/i18n/he.json
M SystemGifts/i18n/hsb.json
M SystemGifts/i18n/hu.json
M SystemGifts/i18n/ia.json
M SystemGifts/i18n/id.json
M SystemGifts/i18n/ig.json
M SystemGifts/i18n/it.json
M SystemGifts/i18n/ja.json
M SystemGifts/i18n/km.json
M SystemGifts/i18n/kn.json
M SystemGifts/i18n/ksh.json
M SystemGifts/i18n/ku-latn.json
M SystemGifts/i18n/lb.json
M SystemGifts/i18n/mk.json
M SystemGifts/i18n/ms.json
M SystemGifts/i18n/nb.json
M SystemGifts/i18n/nl.json
M SystemGifts/i18n/nn.json
M SystemGifts/i18n/oc.json
M SystemGifts/i18n/pdc.json
M SystemGifts/i18n/pfl.json
M SystemGifts/i18n/pl.json
M SystemGifts/i18n/pms.json
M SystemGifts/i18n/ps.json
M SystemGifts/i18n/pt-br.json
M SystemGifts/i18n/pt.json
M SystemGifts/i18n/qqq.json
M SystemGifts/i18n/ro.json
M SystemGifts/i18n/roa-tara.json
M SystemGifts/i18n/ru.json
M SystemGifts/i18n/rue.json
M SystemGifts/i18n/sk.json
M SystemGifts/i18n/sl.json
M SystemGifts/i18n/sr-ec.json
M SystemGifts/i18n/sr-el.json
M SystemGifts/i18n/sv.json
M SystemGifts/i18n/te.json
M SystemGifts/i18n/tl.json
M SystemGifts/i18n/tr.json
M SystemGifts/i18n/uk.json
M SystemGifts/i18n/vep.json
M SystemGifts/i18n/vi.json
M SystemGifts/i18n/yi.json
M SystemGifts/i18n/zh-hans.json
M SystemGifts/i18n/zh-hant.json
M UserActivity/i18n/af.json
M UserActivity/i18n/an.json
M UserActivity/i18n/ar.json
M UserActivity/i18n/arc.json
M UserActivity/i18n/az.json
M UserActivity/i18n/be-tarask.json
M UserActivity/i18n/bn.json
M UserActivity/i18n/br.json
M UserActivity/i18n/bs.json
M UserActivity/i18n/cs.json
M UserActivity/i18n/de.json
M UserActivity/i18n/dsb.json
M UserActivity/i18n/es.json
M UserActivity/i18n/fa.json
M UserActivity/i18n/fi.json
M UserActivity/i18n/fr.json
M UserActivity/i18n/frp.json
M UserActivity/i18n/gl.json
M UserActivity/i18n/gsw.json
M UserActivity/i18n/he.json
M UserActivity/i18n/hsb.json
M UserActivity/i18n/hu.json
M UserActivity/i18n/ia.json
M UserActivity/i18n/id.json
M UserActivity/i18n/ja.json
M UserActivity/i18n/kn.json
M UserActivity/i18n/ksh.json
M UserActivity/i18n/lb.json
M UserActivity/i18n/ltg.json
M UserActivity/i18n/lv.json
M UserActivity/i18n/mk.json
M UserActivity/i18n/mn.json
M UserActivity/i18n/ms.json
M UserActivity/i18n/nb.json
M UserActivity/i18n/nl.json
M UserActivity/i18n/nn.json
M UserActivity/i18n/pdc.json
M UserActivity/i18n/pl.json
M UserActivity/i18n/pms.json
M UserActivity/i18n/ps.json
M UserActivity/i18n/pt-br.json
M UserActivity/i18n/pt.json
M UserActivity/i18n/qqq.json
M UserActivity/i18n/ru.json
M UserActivity/i18n/rue.json
M UserActivity/i18n/sr-ec.json
M UserActivity/i18n/sr-el.json
M UserActivity/i18n/sv.json
M UserActivity/i18n/te.json
M UserActivity/i18n/tl.json
M UserActivity/i18n/tr.json
M UserActivity/i18n/uk.json
M UserActivity/i18n/zh-hans.json
M UserActivity/i18n/zh-hant.json
M UserBoard/i18n/af.json
M UserBoard/i18n/am.json
M UserBoard/i18n/an.json
M UserBoard/i18n/ar.json
M UserBoard/i18n/arc.json
M UserBoard/i18n/arz.json
M UserBoard/i18n/az.json
M UserBoard/i18n/be-tarask.json
M UserBoard/i18n/bg.json
M UserBoard/i18n/bn.json
M UserBoard/i18n/br.json
M UserBoard/i18n/bs.json
M UserBoard/i18n/ca.json
M UserBoard/i18n/ce.json
M UserBoard/i18n/ckb.json
M UserBoard/i18n/cs.json
M UserBoard/i18n/cu.json
M UserBoard/i18n/da.json
M UserBoard/i18n/de-formal.json
M UserBoard/i18n/de.json
M UserBoard/i18n/dsb.json
M UserBoard/i18n/ee.json
M UserBoard/i18n/el.json
M UserBoard/i18n/eo.json
M UserBoard/i18n/es.json
M UserBoard/i18n/et.json
M UserBoard/i18n/eu.json
M UserBoard/i18n/fa.json
M UserBoard/i18n/fi.json
M UserBoard/i18n/fr.json
M UserBoard/i18n/frp.json
M UserBoard/i18n/fy.json
M UserBoard/i18n/gl.json
M UserBoard/i18n/got.json
M UserBoard/i18n/grc.json
M UserBoard/i18n/gsw.json
M UserBoard/i18n/ha.json
M UserBoard/i18n/hak.json
M UserBoard/i18n/he.json
M UserBoard/i18n/hi.json
M UserBoard/i18n/hil.json
M 

[MediaWiki-commits] [Gerrit] Removing a bunch of PHP i18n files I forgot in a previous co... - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Removing a bunch of PHP i18n files I forgot in a previous commit
..

Removing a bunch of PHP i18n files I forgot in a previous commit

Change-Id: I406b66f64b9f1fa7f5415801f1a72182926c751b
---
D SystemGifts/SystemGift.i18n.php
M SystemGifts/SystemGifts.php
D UserActivity/UserActivity.i18n.php
M UserActivity/UserActivity.php
M UserGifts/Gifts.php
D UserGifts/UserGifts.i18n.php
D UserWelcome/UserWelcome.i18n.php
M UserWelcome/UserWelcome.php
8 files changed, 1 insertion(+), 145 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/92/161792/1

diff --git a/SystemGifts/SystemGift.i18n.php b/SystemGifts/SystemGift.i18n.php
deleted file mode 100644
index f4d28e5..000
--- a/SystemGifts/SystemGift.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim5beac56b4a79a293' ) ) {
-   function wfJsonI18nShim5beac56b4a79a293( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim5beac56b4a79a293';
-}
diff --git a/SystemGifts/SystemGifts.php b/SystemGifts/SystemGifts.php
index 2ad8d02..06555f0 100644
--- a/SystemGifts/SystemGifts.php
+++ b/SystemGifts/SystemGifts.php
@@ -5,7 +5,7 @@
 }
 
 global $IP, $wgAutoloadClasses, $wgAvailableRights, $wgGroupPermissions,
-   $wgSpecialPages, $wgExtensionMessagesFiles;
+   $wgSpecialPages;
 
 $wgAvailableRights[] = 'awardsmanage';
 $wgGroupPermissions['staff']['awardsmanage'] = true;
@@ -40,7 +40,6 @@
 
 // i18n
 $wgMessagesDirs['SystemGifts'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['SystemGifts'] = $wgSystemGiftsDirectory . 
'/SystemGift.i18n.php';
 
 // Register the CSS with ResourceLoader
 $wgResourceModules['ext.socialprofile.systemgifts.css'] = array(
diff --git a/UserActivity/UserActivity.i18n.php 
b/UserActivity/UserActivity.i18n.php
deleted file mode 100644
index 926b6cb..000
--- a/UserActivity/UserActivity.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim87789da89614a95b' ) ) {
-   function wfJsonI18nShim87789da89614a95b( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   

[MediaWiki-commits] [Gerrit] Removing a bunch of PHP i18n files I forgot in a previous co... - change (mediawiki...SocialProfile)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Removing a bunch of PHP i18n files I forgot in a previous commit
..


Removing a bunch of PHP i18n files I forgot in a previous commit

Change-Id: I406b66f64b9f1fa7f5415801f1a72182926c751b
---
D SystemGifts/SystemGift.i18n.php
M SystemGifts/SystemGifts.php
D UserActivity/UserActivity.i18n.php
M UserActivity/UserActivity.php
M UserGifts/Gifts.php
D UserGifts/UserGifts.i18n.php
D UserWelcome/UserWelcome.i18n.php
M UserWelcome/UserWelcome.php
8 files changed, 1 insertion(+), 145 deletions(-)

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



diff --git a/SystemGifts/SystemGift.i18n.php b/SystemGifts/SystemGift.i18n.php
deleted file mode 100644
index f4d28e5..000
--- a/SystemGifts/SystemGift.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim5beac56b4a79a293' ) ) {
-   function wfJsonI18nShim5beac56b4a79a293( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim5beac56b4a79a293';
-}
diff --git a/SystemGifts/SystemGifts.php b/SystemGifts/SystemGifts.php
index 2ad8d02..06555f0 100644
--- a/SystemGifts/SystemGifts.php
+++ b/SystemGifts/SystemGifts.php
@@ -5,7 +5,7 @@
 }
 
 global $IP, $wgAutoloadClasses, $wgAvailableRights, $wgGroupPermissions,
-   $wgSpecialPages, $wgExtensionMessagesFiles;
+   $wgSpecialPages;
 
 $wgAvailableRights[] = 'awardsmanage';
 $wgGroupPermissions['staff']['awardsmanage'] = true;
@@ -40,7 +40,6 @@
 
 // i18n
 $wgMessagesDirs['SystemGifts'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['SystemGifts'] = $wgSystemGiftsDirectory . 
'/SystemGift.i18n.php';
 
 // Register the CSS with ResourceLoader
 $wgResourceModules['ext.socialprofile.systemgifts.css'] = array(
diff --git a/UserActivity/UserActivity.i18n.php 
b/UserActivity/UserActivity.i18n.php
deleted file mode 100644
index 926b6cb..000
--- a/UserActivity/UserActivity.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim87789da89614a95b' ) ) {
-   function wfJsonI18nShim87789da89614a95b( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
- 

[MediaWiki-commits] [Gerrit] Removing last instances of $wgSpecialPageGroups - change (mediawiki...SocialProfile)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Removing last instances of $wgSpecialPageGroups
..

Removing last instances of $wgSpecialPageGroups

Change-Id: I605a07b79f1ed2abcb5f03ad266df0a2647b8556
---
M UserActivity/UserActivity.body.php
M UserActivity/UserActivity.php
M UserGifts/Gifts.php
M UserGifts/SpecialGiftManager.php
M UserGifts/SpecialGiftManagerLogo.php
M UserGifts/SpecialGiveGift.php
M UserGifts/SpecialRemoveGift.php
M UserGifts/SpecialRemoveMasterGift.php
M UserGifts/SpecialViewGift.php
M UserGifts/SpecialViewGifts.php
10 files changed, 72 insertions(+), 9 deletions(-)


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

diff --git a/UserActivity/UserActivity.body.php 
b/UserActivity/UserActivity.body.php
index 191b0ac..95d67df 100644
--- a/UserActivity/UserActivity.body.php
+++ b/UserActivity/UserActivity.body.php
@@ -17,6 +17,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $par Mixed: parameter passed to the page or null
diff --git a/UserActivity/UserActivity.php b/UserActivity/UserActivity.php
index d45e314..eba3948 100644
--- a/UserActivity/UserActivity.php
+++ b/UserActivity/UserActivity.php
@@ -33,8 +33,6 @@
 $wgAutoloadClasses['UserActivity'] = __DIR__ . '/UserActivityClass.php';
 $wgAutoloadClasses['UserHome'] = __DIR__ . '/UserActivity.body.php';
 $wgSpecialPages['UserActivity'] = 'UserHome';
-// Special page group for MW 1.13+
-$wgSpecialPageGroups['UserActivity'] = 'users';
 
 // Register the CSS with ResourceLoader
 $wgResourceModules['ext.socialprofile.useractivity.css'] = array(
diff --git a/UserGifts/Gifts.php b/UserGifts/Gifts.php
index 46e2349..9696517 100644
--- a/UserGifts/Gifts.php
+++ b/UserGifts/Gifts.php
@@ -15,31 +15,24 @@
 
 $wgAutoloadClasses['GiveGift'] = {$wgUserGiftsDirectory}/SpecialGiveGift.php;
 $wgSpecialPages['GiveGift'] = 'GiveGift';
-$wgSpecialPageGroups['GiveGift'] = 'users';
 
 $wgAutoloadClasses['ViewGifts'] = 
{$wgUserGiftsDirectory}/SpecialViewGifts.php;
 $wgSpecialPages['ViewGifts'] = 'ViewGifts';
-$wgSpecialPageGroups['ViewGifts'] = 'users';
 
 $wgAutoloadClasses['ViewGift'] = {$wgUserGiftsDirectory}/SpecialViewGift.php;
 $wgSpecialPages['ViewGift'] = 'ViewGift';
-$wgSpecialPageGroups['ViewGift'] = 'users';
 
 $wgAutoloadClasses['GiftManager'] = 
{$wgUserGiftsDirectory}/SpecialGiftManager.php;
 $wgSpecialPages['GiftManager'] = 'GiftManager';
-$wgSpecialPageGroups['GiftManager'] = 'wiki';
 
 $wgAutoloadClasses['GiftManagerLogo'] = 
{$wgUserGiftsDirectory}/SpecialGiftManagerLogo.php;
 $wgSpecialPages['GiftManagerLogo'] = 'GiftManagerLogo';
-$wgSpecialPageGroups['GiftManagerLogo'] = 'wiki';
 
 $wgAutoloadClasses['RemoveMasterGift'] = 
{$wgUserGiftsDirectory}/SpecialRemoveMasterGift.php;
 $wgSpecialPages['RemoveMasterGift'] = 'RemoveMasterGift';
-$wgSpecialPageGroups['RemoveMasterGift'] = 'wiki';
 
 $wgAutoloadClasses['RemoveGift'] = 
{$wgUserGiftsDirectory}/SpecialRemoveGift.php;
 $wgSpecialPages['RemoveGift'] = 'RemoveGift';
-$wgSpecialPageGroups['RemoveGift'] = 'users';
 
 $wgMessagesDirs['UserGifts'] = __DIR__ . '/i18n';
 
diff --git a/UserGifts/SpecialGiftManager.php b/UserGifts/SpecialGiftManager.php
index 4c7208b..7eed516 100644
--- a/UserGifts/SpecialGiftManager.php
+++ b/UserGifts/SpecialGiftManager.php
@@ -14,6 +14,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'wiki';
+   }
+
+   /**
 * Show the special page
 *
 * @param $par Mixed: parameter passed to the page or null
diff --git a/UserGifts/SpecialGiftManagerLogo.php 
b/UserGifts/SpecialGiftManagerLogo.php
index 97ae453..0e08528 100644
--- a/UserGifts/SpecialGiftManagerLogo.php
+++ b/UserGifts/SpecialGiftManagerLogo.php
@@ -25,6 +25,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'wiki';
+   }
+
+   /**
 * Show the special page
 *
 * @param $par Mixed: parameter passed to the page or null
diff --git a/UserGifts/SpecialGiveGift.php b/UserGifts/SpecialGiveGift.php
index 9947603..190855a 100644
--- a/UserGifts/SpecialGiveGift.php
+++ b/UserGifts/SpecialGiveGift.php
@@ -16,6 +16,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+  

[MediaWiki-commits] [Gerrit] Removing last instances of $wgSpecialPageGroups - change (mediawiki...SocialProfile)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Removing last instances of $wgSpecialPageGroups
..


Removing last instances of $wgSpecialPageGroups

Change-Id: I605a07b79f1ed2abcb5f03ad266df0a2647b8556
---
M UserActivity/UserActivity.body.php
M UserActivity/UserActivity.php
M UserGifts/Gifts.php
M UserGifts/SpecialGiftManager.php
M UserGifts/SpecialGiftManagerLogo.php
M UserGifts/SpecialGiveGift.php
M UserGifts/SpecialRemoveGift.php
M UserGifts/SpecialRemoveMasterGift.php
M UserGifts/SpecialViewGift.php
M UserGifts/SpecialViewGifts.php
10 files changed, 72 insertions(+), 9 deletions(-)

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



diff --git a/UserActivity/UserActivity.body.php 
b/UserActivity/UserActivity.body.php
index 191b0ac..95d67df 100644
--- a/UserActivity/UserActivity.body.php
+++ b/UserActivity/UserActivity.body.php
@@ -17,6 +17,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'users';
+   }
+
+   /**
 * Show the special page
 *
 * @param $par Mixed: parameter passed to the page or null
diff --git a/UserActivity/UserActivity.php b/UserActivity/UserActivity.php
index d45e314..eba3948 100644
--- a/UserActivity/UserActivity.php
+++ b/UserActivity/UserActivity.php
@@ -33,8 +33,6 @@
 $wgAutoloadClasses['UserActivity'] = __DIR__ . '/UserActivityClass.php';
 $wgAutoloadClasses['UserHome'] = __DIR__ . '/UserActivity.body.php';
 $wgSpecialPages['UserActivity'] = 'UserHome';
-// Special page group for MW 1.13+
-$wgSpecialPageGroups['UserActivity'] = 'users';
 
 // Register the CSS with ResourceLoader
 $wgResourceModules['ext.socialprofile.useractivity.css'] = array(
diff --git a/UserGifts/Gifts.php b/UserGifts/Gifts.php
index 46e2349..9696517 100644
--- a/UserGifts/Gifts.php
+++ b/UserGifts/Gifts.php
@@ -15,31 +15,24 @@
 
 $wgAutoloadClasses['GiveGift'] = {$wgUserGiftsDirectory}/SpecialGiveGift.php;
 $wgSpecialPages['GiveGift'] = 'GiveGift';
-$wgSpecialPageGroups['GiveGift'] = 'users';
 
 $wgAutoloadClasses['ViewGifts'] = 
{$wgUserGiftsDirectory}/SpecialViewGifts.php;
 $wgSpecialPages['ViewGifts'] = 'ViewGifts';
-$wgSpecialPageGroups['ViewGifts'] = 'users';
 
 $wgAutoloadClasses['ViewGift'] = {$wgUserGiftsDirectory}/SpecialViewGift.php;
 $wgSpecialPages['ViewGift'] = 'ViewGift';
-$wgSpecialPageGroups['ViewGift'] = 'users';
 
 $wgAutoloadClasses['GiftManager'] = 
{$wgUserGiftsDirectory}/SpecialGiftManager.php;
 $wgSpecialPages['GiftManager'] = 'GiftManager';
-$wgSpecialPageGroups['GiftManager'] = 'wiki';
 
 $wgAutoloadClasses['GiftManagerLogo'] = 
{$wgUserGiftsDirectory}/SpecialGiftManagerLogo.php;
 $wgSpecialPages['GiftManagerLogo'] = 'GiftManagerLogo';
-$wgSpecialPageGroups['GiftManagerLogo'] = 'wiki';
 
 $wgAutoloadClasses['RemoveMasterGift'] = 
{$wgUserGiftsDirectory}/SpecialRemoveMasterGift.php;
 $wgSpecialPages['RemoveMasterGift'] = 'RemoveMasterGift';
-$wgSpecialPageGroups['RemoveMasterGift'] = 'wiki';
 
 $wgAutoloadClasses['RemoveGift'] = 
{$wgUserGiftsDirectory}/SpecialRemoveGift.php;
 $wgSpecialPages['RemoveGift'] = 'RemoveGift';
-$wgSpecialPageGroups['RemoveGift'] = 'users';
 
 $wgMessagesDirs['UserGifts'] = __DIR__ . '/i18n';
 
diff --git a/UserGifts/SpecialGiftManager.php b/UserGifts/SpecialGiftManager.php
index 4c7208b..7eed516 100644
--- a/UserGifts/SpecialGiftManager.php
+++ b/UserGifts/SpecialGiftManager.php
@@ -14,6 +14,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'wiki';
+   }
+
+   /**
 * Show the special page
 *
 * @param $par Mixed: parameter passed to the page or null
diff --git a/UserGifts/SpecialGiftManagerLogo.php 
b/UserGifts/SpecialGiftManagerLogo.php
index 97ae453..0e08528 100644
--- a/UserGifts/SpecialGiftManagerLogo.php
+++ b/UserGifts/SpecialGiftManagerLogo.php
@@ -25,6 +25,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 'wiki';
+   }
+
+   /**
 * Show the special page
 *
 * @param $par Mixed: parameter passed to the page or null
diff --git a/UserGifts/SpecialGiveGift.php b/UserGifts/SpecialGiveGift.php
index 9947603..190855a 100644
--- a/UserGifts/SpecialGiveGift.php
+++ b/UserGifts/SpecialGiveGift.php
@@ -16,6 +16,15 @@
}
 
/**
+* Group this special page under the correct header in 
Special:SpecialPages.
+*
+* @return string
+*/
+   function getGroupName() {
+   return 

[MediaWiki-commits] [Gerrit] Removing PHP i18n file - change (mediawiki...VoteNY)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Removing PHP i18n file
..

Removing PHP i18n file

Change-Id: If6aeaffece83d86e3d296e9a2d761898c828edec
---
D Vote.i18n.php
M VoteNY.php
2 files changed, 7 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VoteNY 
refs/changes/94/161794/1

diff --git a/Vote.i18n.php b/Vote.i18n.php
deleted file mode 100644
index a43699e..000
--- a/Vote.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim3f61e168e7e5a665' ) ) {
-   function wfJsonI18nShim3f61e168e7e5a665( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim3f61e168e7e5a665';
-}
diff --git a/VoteNY.php b/VoteNY.php
index 38384f8..fdbe1f8 100644
--- a/VoteNY.php
+++ b/VoteNY.php
@@ -22,7 +22,7 @@
 // Extension credits that show up on Special:Version
 $wgExtensionCredits['parserhook'][] = array(
'name' = 'Vote',
-   'version' = '2.6.0',
+   'version' = '2.6.1',
'author' = array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
'descriptionmsg' = 'voteny-desc',
'url' = 'https://www.mediawiki.org/wiki/Extension:VoteNY'
@@ -40,20 +40,18 @@
 require_once( 'Vote_AjaxFunctions.php' );
 
 // Autoload classes and set up i18n
-$dir = dirname( __FILE__ ) . '/';
 $wgMessagesDirs['VoteNY'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['VoteNY'] = $dir . 'Vote.i18n.php';
-$wgExtensionMessagesFiles['VoteNYMagic'] = $dir . 'VoteNY.i18n.magic.php';
-$wgAutoloadClasses['Vote'] = $dir . 'VoteClass.php';
-$wgAutoloadClasses['VoteStars'] = $dir . 'VoteClass.php';
+$wgExtensionMessagesFiles['VoteNYMagic'] = __DIR__ . '/VoteNY.i18n.magic.php';
+$wgAutoloadClasses['Vote'] = __DIR__ . '/VoteClass.php';
+$wgAutoloadClasses['VoteStars'] = __DIR__ . '/VoteClass.php';
 
 // Set up the new special page, Special:TopRatings, which shows top rated pages
 // based on given criteria
-$wgAutoloadClasses['SpecialTopRatings'] = $dir . 'SpecialTopRatings.php';
+$wgAutoloadClasses['SpecialTopRatings'] = __DIR__ . '/SpecialTopRatings.php';
 $wgSpecialPages['TopRatings'] = 'SpecialTopRatings';
 
 // Hooked functions
-$wgAutoloadClasses['VoteHooks'] = $dir . 'VoteHooks.php';
+$wgAutoloadClasses['VoteHooks'] = __DIR__ . '/VoteHooks.php';
 
 $wgHooks['ParserFirstCallInit'][] = 'VoteHooks::registerParserHook';
 $wgHooks['RenameUserSQL'][] = 'VoteHooks::onUserRename';
@@ -67,7 +65,7 @@
'styles' = 'Vote.css',
'scripts' = 'Vote.js',
'messages' = array( 'voteny-link', 'voteny-unvote-link' ),
-   'localBasePath' = dirname( __FILE__ ),
+   'localBasePath' = __DIR__,
'remoteExtPath' = 'VoteNY',
'position' = 'top' // available since r85616
 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6aeaffece83d86e3d296e9a2d761898c828edec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] Removing PHP i18n file - change (mediawiki...VoteNY)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Removing PHP i18n file
..


Removing PHP i18n file

Change-Id: If6aeaffece83d86e3d296e9a2d761898c828edec
---
D Vote.i18n.php
M VoteNY.php
2 files changed, 7 insertions(+), 44 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/Vote.i18n.php b/Vote.i18n.php
deleted file mode 100644
index a43699e..000
--- a/Vote.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim3f61e168e7e5a665' ) ) {
-   function wfJsonI18nShim3f61e168e7e5a665( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim3f61e168e7e5a665';
-}
diff --git a/VoteNY.php b/VoteNY.php
index 38384f8..fdbe1f8 100644
--- a/VoteNY.php
+++ b/VoteNY.php
@@ -22,7 +22,7 @@
 // Extension credits that show up on Special:Version
 $wgExtensionCredits['parserhook'][] = array(
'name' = 'Vote',
-   'version' = '2.6.0',
+   'version' = '2.6.1',
'author' = array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
'descriptionmsg' = 'voteny-desc',
'url' = 'https://www.mediawiki.org/wiki/Extension:VoteNY'
@@ -40,20 +40,18 @@
 require_once( 'Vote_AjaxFunctions.php' );
 
 // Autoload classes and set up i18n
-$dir = dirname( __FILE__ ) . '/';
 $wgMessagesDirs['VoteNY'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['VoteNY'] = $dir . 'Vote.i18n.php';
-$wgExtensionMessagesFiles['VoteNYMagic'] = $dir . 'VoteNY.i18n.magic.php';
-$wgAutoloadClasses['Vote'] = $dir . 'VoteClass.php';
-$wgAutoloadClasses['VoteStars'] = $dir . 'VoteClass.php';
+$wgExtensionMessagesFiles['VoteNYMagic'] = __DIR__ . '/VoteNY.i18n.magic.php';
+$wgAutoloadClasses['Vote'] = __DIR__ . '/VoteClass.php';
+$wgAutoloadClasses['VoteStars'] = __DIR__ . '/VoteClass.php';
 
 // Set up the new special page, Special:TopRatings, which shows top rated pages
 // based on given criteria
-$wgAutoloadClasses['SpecialTopRatings'] = $dir . 'SpecialTopRatings.php';
+$wgAutoloadClasses['SpecialTopRatings'] = __DIR__ . '/SpecialTopRatings.php';
 $wgSpecialPages['TopRatings'] = 'SpecialTopRatings';
 
 // Hooked functions
-$wgAutoloadClasses['VoteHooks'] = $dir . 'VoteHooks.php';
+$wgAutoloadClasses['VoteHooks'] = __DIR__ . '/VoteHooks.php';
 
 $wgHooks['ParserFirstCallInit'][] = 'VoteHooks::registerParserHook';
 $wgHooks['RenameUserSQL'][] = 'VoteHooks::onUserRename';
@@ -67,7 +65,7 @@
'styles' = 'Vote.css',
'scripts' = 'Vote.js',
'messages' = array( 'voteny-link', 'voteny-unvote-link' ),
-   'localBasePath' = dirname( __FILE__ ),
+   'localBasePath' = __DIR__,
'remoteExtPath' = 'VoteNY',
'position' = 'top' // available since r85616
 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6aeaffece83d86e3d296e9a2d761898c828edec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Modernization - change (mediawiki...VoteNY)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Modernization
..

Modernization

Change-Id: Ie8dce7c0dc3feb16ac5311d1e3fb88ce5933363a
---
M SpecialTopRatings.php
M VoteClass.php
2 files changed, 17 insertions(+), 18 deletions(-)


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

diff --git a/SpecialTopRatings.php b/SpecialTopRatings.php
index ede82d4..467c482 100644
--- a/SpecialTopRatings.php
+++ b/SpecialTopRatings.php
@@ -27,8 +27,6 @@
 * @param $par Mixed: parameter passed to the special page or null
 */
public function execute( $par ) {
-   global $wgOut, $wgScriptPath;
-
// Set the page title, robot policies, etc.
$this-setHeaders();
 
@@ -51,7 +49,7 @@
 
// Add JS (and CSS) -- needed so that users can vote on this 
page and
// so that their browsers' consoles won't be filled with JS 
errors ;-)
-   $wgOut-addModules( 'ext.voteNY' );
+   $this-getOutput()-addModules( 'ext.voteNY' );
 
$ratings = array();
$output = '';
@@ -110,8 +108,9 @@
/* XXX dirrty hack! because when we include this 
page, the JS
is not included, but we want things to work still */
if ( $this-including() ) {
+   global $wgExtensionAssetsPath;
$output .= 'script type=text/javascript 
src=' .
-   $wgScriptPath . 
'/extensions/VoteNY/Vote.js/script';
+   $wgExtensionAssetsPath . 
'/VoteNY/Vote.js/script';
}
 
// yes, array_keys() is needed
@@ -126,8 +125,8 @@
Linker::link(
$titleObj,
$titleObj-getPrefixedText() // 
prefixed, so that the namespace shows!
-   ) . wfMsg( 'word-separator' ) . // i18n 
overkill? ya betcha...
-   wfMsg( 'parentheses', $ratings[$pageId] 
) .
+   ) . $this-msg( 'word-separator' 
)-escaped() . // i18n overkill? ya betcha...
+   $this-msg( 'parentheses', 
$ratings[$pageId] )-escaped() .
'/div';
 
$id = mt_rand(); // AFAIK these IDs are and 
originally were totally random...
@@ -144,11 +143,11 @@
} else {
// Nothing? Well, display an informative error message 
rather than
// a blank page or somesuch.
-   $output .= wfMsg( 'topratings-no-pages' );
+   $output .= $this-msg( 'topratings-no-pages' 
)-escaped();
}
 
// Output everything!
-   $wgOut-addHTML( $output );
+   $this-getOutput()-addHTML( $output );
}
 
/**
diff --git a/VoteClass.php b/VoteClass.php
index 2c168ae..35b8587 100644
--- a/VoteClass.php
+++ b/VoteClass.php
@@ -226,15 +226,15 @@
$login = SpecialPage::getTitleFor( 'Userlogin' );
$output .= 'a class=votebutton href=' .
htmlspecialchars( $login-getFullURL() ) . ' 
rel=nofollow' .
-   wfMsg( 'voteny-link' ) . '/a';
+   wfMessage( 'voteny-link' )-plain() . '/a';
} else {
if( !wfReadOnly() ) {
if( $voted == false ) {
$output .= 'a 
href=javascript:void(0); class=vote-vote-link' .
-   wfMsg( 'voteny-link' ) . '/a';
+   wfMessage( 'voteny-link' 
)-plain() . '/a';
} else {
$output .= 'a 
href=javascript:void(0); class=vote-unvote-link' .
-   wfMsg( 'voteny-unvote-link' ) . 
'/a';
+   wfMessage( 'voteny-unvote-link' 
)-plain() . '/a';
}
}
}
@@ -281,15 +281,15 @@
$count = $this-count();
if( isset( $count ) ) {
$output .= ' span class=rating-total(' .
-   wfMsgExt( 'voteny-votes', 'parsemag', $count ) 
. ')/span';
+   wfMessage( 'voteny-votes', $count )-parse() . 
')/span';
}
$already_voted = $this-UserAlreadyVoted();
 

[MediaWiki-commits] [Gerrit] Modernization - change (mediawiki...VoteNY)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Modernization
..


Modernization

Change-Id: Ie8dce7c0dc3feb16ac5311d1e3fb88ce5933363a
---
M SpecialTopRatings.php
M VoteClass.php
2 files changed, 17 insertions(+), 18 deletions(-)

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



diff --git a/SpecialTopRatings.php b/SpecialTopRatings.php
index ede82d4..467c482 100644
--- a/SpecialTopRatings.php
+++ b/SpecialTopRatings.php
@@ -27,8 +27,6 @@
 * @param $par Mixed: parameter passed to the special page or null
 */
public function execute( $par ) {
-   global $wgOut, $wgScriptPath;
-
// Set the page title, robot policies, etc.
$this-setHeaders();
 
@@ -51,7 +49,7 @@
 
// Add JS (and CSS) -- needed so that users can vote on this 
page and
// so that their browsers' consoles won't be filled with JS 
errors ;-)
-   $wgOut-addModules( 'ext.voteNY' );
+   $this-getOutput()-addModules( 'ext.voteNY' );
 
$ratings = array();
$output = '';
@@ -110,8 +108,9 @@
/* XXX dirrty hack! because when we include this 
page, the JS
is not included, but we want things to work still */
if ( $this-including() ) {
+   global $wgExtensionAssetsPath;
$output .= 'script type=text/javascript 
src=' .
-   $wgScriptPath . 
'/extensions/VoteNY/Vote.js/script';
+   $wgExtensionAssetsPath . 
'/VoteNY/Vote.js/script';
}
 
// yes, array_keys() is needed
@@ -126,8 +125,8 @@
Linker::link(
$titleObj,
$titleObj-getPrefixedText() // 
prefixed, so that the namespace shows!
-   ) . wfMsg( 'word-separator' ) . // i18n 
overkill? ya betcha...
-   wfMsg( 'parentheses', $ratings[$pageId] 
) .
+   ) . $this-msg( 'word-separator' 
)-escaped() . // i18n overkill? ya betcha...
+   $this-msg( 'parentheses', 
$ratings[$pageId] )-escaped() .
'/div';
 
$id = mt_rand(); // AFAIK these IDs are and 
originally were totally random...
@@ -144,11 +143,11 @@
} else {
// Nothing? Well, display an informative error message 
rather than
// a blank page or somesuch.
-   $output .= wfMsg( 'topratings-no-pages' );
+   $output .= $this-msg( 'topratings-no-pages' 
)-escaped();
}
 
// Output everything!
-   $wgOut-addHTML( $output );
+   $this-getOutput()-addHTML( $output );
}
 
/**
diff --git a/VoteClass.php b/VoteClass.php
index 2c168ae..35b8587 100644
--- a/VoteClass.php
+++ b/VoteClass.php
@@ -226,15 +226,15 @@
$login = SpecialPage::getTitleFor( 'Userlogin' );
$output .= 'a class=votebutton href=' .
htmlspecialchars( $login-getFullURL() ) . ' 
rel=nofollow' .
-   wfMsg( 'voteny-link' ) . '/a';
+   wfMessage( 'voteny-link' )-plain() . '/a';
} else {
if( !wfReadOnly() ) {
if( $voted == false ) {
$output .= 'a 
href=javascript:void(0); class=vote-vote-link' .
-   wfMsg( 'voteny-link' ) . '/a';
+   wfMessage( 'voteny-link' 
)-plain() . '/a';
} else {
$output .= 'a 
href=javascript:void(0); class=vote-unvote-link' .
-   wfMsg( 'voteny-unvote-link' ) . 
'/a';
+   wfMessage( 'voteny-unvote-link' 
)-plain() . '/a';
}
}
}
@@ -281,15 +281,15 @@
$count = $this-count();
if( isset( $count ) ) {
$output .= ' span class=rating-total(' .
-   wfMsgExt( 'voteny-votes', 'parsemag', $count ) 
. ')/span';
+   wfMessage( 'voteny-votes', $count )-parse() . 
')/span';
}
$already_voted = $this-UserAlreadyVoted();
if( $already_voted  

[MediaWiki-commits] [Gerrit] Ran stylize.php, manually fixed documentation, etc. - change (mediawiki...VoteNY)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Ran stylize.php, manually fixed documentation, etc.
..

Ran stylize.php, manually fixed documentation, etc.

Change-Id: I8e684d00bf5142eff70d45d64e4c29cfc380749d
---
M SpecialTopRatings.php
M VoteClass.php
M VoteHooks.php
M Vote_AjaxFunctions.php
4 files changed, 78 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VoteNY 
refs/changes/96/161796/1

diff --git a/SpecialTopRatings.php b/SpecialTopRatings.php
index 467c482..86e1850 100644
--- a/SpecialTopRatings.php
+++ b/SpecialTopRatings.php
@@ -24,7 +24,7 @@
/**
 * Show the special page
 *
-* @param $par Mixed: parameter passed to the special page or null
+* @param mixed|null $par Parameter passed to the special page or null
 */
public function execute( $par ) {
// Set the page title, robot policies, etc.
@@ -164,7 +164,7 @@
$data = $wgMemc-get( $key );
$voteAvg = 0;
 
-   if( $data ) {
+   if ( $data ) {
wfDebug( Loading vote avg for page {$pageId} from 
cache (TopRatings)\n );
$voteAvg = $data;
} else {
diff --git a/VoteClass.php b/VoteClass.php
index 35b8587..dd45593 100644
--- a/VoteClass.php
+++ b/VoteClass.php
@@ -14,7 +14,7 @@
/**
 * Constructor
 *
-* @param $pageID Integer: article ID number
+* @param int $pageID Article ID number
 */
public function __construct( $pageID ) {
global $wgUser;
@@ -28,7 +28,7 @@
 * Counts all votes, fetching the data from memcached if available
 * or from the database if memcached isn't available
 *
-* @return Integer: amount of votes
+* @return int Amount of votes
 */
function count() {
global $wgMemc;
@@ -37,7 +37,7 @@
$data = $wgMemc-get( $key );
 
// Try cache
-   if( $data ) {
+   if ( $data ) {
wfDebug( Loading vote count for page {$this-PageID} 
from cache\n );
$vote_count = $data;
} else {
@@ -50,7 +50,7 @@
__METHOD__
);
$row = $dbr-fetchObject( $res );
-   if( $row ) {
+   if ( $row ) {
$vote_count = $row-votecount;
}
$wgMemc-set( $key, $vote_count );
@@ -61,7 +61,8 @@
 
/**
 * Gets the average score of all votes
-* @return Integer: formatted average number of votes (something like 
3.50)
+*
+* @return int Formatted average number of votes (something like 3.50)
 */
function getAverageVote() {
global $wgMemc;
@@ -69,7 +70,7 @@
$data = $wgMemc-get( $key );
 
$voteAvg = 0;
-   if( $data ) {
+   if ( $data ) {
wfDebug( Loading vote avg for page {$this-PageID} 
from cache\n );
$voteAvg = $data;
} else {
@@ -81,7 +82,7 @@
__METHOD__
);
$row = $dbr-fetchObject( $res );
-   if( $row ) {
+   if ( $row ) {
$voteAvg = $row-voteavg;
}
$wgMemc-set( $key, $voteAvg );
@@ -102,7 +103,7 @@
 
// Purge squid
$pageTitle = Title::newFromID( $this-PageID );
-   if( is_object( $pageTitle ) ) {
+   if ( is_object( $pageTitle ) ) {
$pageTitle-invalidateCache();
$pageTitle-purgeSquid();
 
@@ -134,7 +135,7 @@
$this-clearCache();
 
// Update social statistics if SocialProfile extension is 
enabled
-   if( class_exists( 'UserStatsTrack' ) ) {
+   if ( class_exists( 'UserStatsTrack' ) ) {
$stats = new UserStatsTrack( $this-Userid, 
$this-Username );
$stats-decStatField( 'vote' );
}
@@ -142,7 +143,8 @@
 
/**
 * Inserts a new vote into the Vote database table
-* @param $voteValue
+*
+* @param int $voteValue
 */
function insert( $voteValue ) {
global $wgRequest;
@@ -150,7 +152,7 @@
wfSuppressWarnings(); // E_STRICT whining
$voteDate = date( 'Y-m-d H:i:s' );
wfRestoreWarnings();
-   if( $this-UserAlreadyVoted() == false ) {
+   if ( 

[MediaWiki-commits] [Gerrit] Ran stylize.php, manually fixed documentation, etc. - change (mediawiki...VoteNY)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Ran stylize.php, manually fixed documentation, etc.
..


Ran stylize.php, manually fixed documentation, etc.

Change-Id: I8e684d00bf5142eff70d45d64e4c29cfc380749d
---
M SpecialTopRatings.php
M VoteClass.php
M VoteHooks.php
M Vote_AjaxFunctions.php
4 files changed, 78 insertions(+), 69 deletions(-)

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



diff --git a/SpecialTopRatings.php b/SpecialTopRatings.php
index 467c482..86e1850 100644
--- a/SpecialTopRatings.php
+++ b/SpecialTopRatings.php
@@ -24,7 +24,7 @@
/**
 * Show the special page
 *
-* @param $par Mixed: parameter passed to the special page or null
+* @param mixed|null $par Parameter passed to the special page or null
 */
public function execute( $par ) {
// Set the page title, robot policies, etc.
@@ -164,7 +164,7 @@
$data = $wgMemc-get( $key );
$voteAvg = 0;
 
-   if( $data ) {
+   if ( $data ) {
wfDebug( Loading vote avg for page {$pageId} from 
cache (TopRatings)\n );
$voteAvg = $data;
} else {
diff --git a/VoteClass.php b/VoteClass.php
index 35b8587..dd45593 100644
--- a/VoteClass.php
+++ b/VoteClass.php
@@ -14,7 +14,7 @@
/**
 * Constructor
 *
-* @param $pageID Integer: article ID number
+* @param int $pageID Article ID number
 */
public function __construct( $pageID ) {
global $wgUser;
@@ -28,7 +28,7 @@
 * Counts all votes, fetching the data from memcached if available
 * or from the database if memcached isn't available
 *
-* @return Integer: amount of votes
+* @return int Amount of votes
 */
function count() {
global $wgMemc;
@@ -37,7 +37,7 @@
$data = $wgMemc-get( $key );
 
// Try cache
-   if( $data ) {
+   if ( $data ) {
wfDebug( Loading vote count for page {$this-PageID} 
from cache\n );
$vote_count = $data;
} else {
@@ -50,7 +50,7 @@
__METHOD__
);
$row = $dbr-fetchObject( $res );
-   if( $row ) {
+   if ( $row ) {
$vote_count = $row-votecount;
}
$wgMemc-set( $key, $vote_count );
@@ -61,7 +61,8 @@
 
/**
 * Gets the average score of all votes
-* @return Integer: formatted average number of votes (something like 
3.50)
+*
+* @return int Formatted average number of votes (something like 3.50)
 */
function getAverageVote() {
global $wgMemc;
@@ -69,7 +70,7 @@
$data = $wgMemc-get( $key );
 
$voteAvg = 0;
-   if( $data ) {
+   if ( $data ) {
wfDebug( Loading vote avg for page {$this-PageID} 
from cache\n );
$voteAvg = $data;
} else {
@@ -81,7 +82,7 @@
__METHOD__
);
$row = $dbr-fetchObject( $res );
-   if( $row ) {
+   if ( $row ) {
$voteAvg = $row-voteavg;
}
$wgMemc-set( $key, $voteAvg );
@@ -102,7 +103,7 @@
 
// Purge squid
$pageTitle = Title::newFromID( $this-PageID );
-   if( is_object( $pageTitle ) ) {
+   if ( is_object( $pageTitle ) ) {
$pageTitle-invalidateCache();
$pageTitle-purgeSquid();
 
@@ -134,7 +135,7 @@
$this-clearCache();
 
// Update social statistics if SocialProfile extension is 
enabled
-   if( class_exists( 'UserStatsTrack' ) ) {
+   if ( class_exists( 'UserStatsTrack' ) ) {
$stats = new UserStatsTrack( $this-Userid, 
$this-Username );
$stats-decStatField( 'vote' );
}
@@ -142,7 +143,8 @@
 
/**
 * Inserts a new vote into the Vote database table
-* @param $voteValue
+*
+* @param int $voteValue
 */
function insert( $voteValue ) {
global $wgRequest;
@@ -150,7 +152,7 @@
wfSuppressWarnings(); // E_STRICT whining
$voteDate = date( 'Y-m-d H:i:s' );
wfRestoreWarnings();
-   if( $this-UserAlreadyVoted() == false ) {
+   if ( $this-UserAlreadyVoted() == false ) {

[MediaWiki-commits] [Gerrit] Use wgExtensionAssetsPath + mw.config.get() in the JS file - change (mediawiki...VoteNY)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Use wgExtensionAssetsPath + mw.config.get() in the JS file
..

Use wgExtensionAssetsPath + mw.config.get() in the JS file

Change-Id: Ibeaa774ebd569e2883ba9e50c6a8140aadf82c4c
---
M Vote.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/Vote.js b/Vote.js
index 021e398..f60066f 100644
--- a/Vote.js
+++ b/Vote.js
@@ -4,7 +4,7 @@
  * @file
  * @ingroup Extensions
  * @author Jack Phoenix j...@countervandalism.net
- * @date 29 August 2012
+ * @date 21 September 2014
  */
 var VoteNY = {
MaxRating: 5,
@@ -12,7 +12,7 @@
voted_new: [],
id: 0,
last_id: 0,
-   imagePath: wgScriptPath + '/extensions/VoteNY/images/',
+   imagePath: mw.config.get( 'wgExtensionAssetsPath' ) + '/VoteNY/images/',
 
/**
 * Called when voting through the green square voting box

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibeaa774ebd569e2883ba9e50c6a8140aadf82c4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] Use wgExtensionAssetsPath + mw.config.get() in the JS file - change (mediawiki...VoteNY)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use wgExtensionAssetsPath + mw.config.get() in the JS file
..


Use wgExtensionAssetsPath + mw.config.get() in the JS file

Change-Id: Ibeaa774ebd569e2883ba9e50c6a8140aadf82c4c
---
M Vote.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/Vote.js b/Vote.js
index 021e398..f60066f 100644
--- a/Vote.js
+++ b/Vote.js
@@ -4,7 +4,7 @@
  * @file
  * @ingroup Extensions
  * @author Jack Phoenix j...@countervandalism.net
- * @date 29 August 2012
+ * @date 21 September 2014
  */
 var VoteNY = {
MaxRating: 5,
@@ -12,7 +12,7 @@
voted_new: [],
id: 0,
last_id: 0,
-   imagePath: wgScriptPath + '/extensions/VoteNY/images/',
+   imagePath: mw.config.get( 'wgExtensionAssetsPath' ) + '/VoteNY/images/',
 
/**
 * Called when voting through the green square voting box

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibeaa774ebd569e2883ba9e50c6a8140aadf82c4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] s/four spaces/one tab/g - change (mediawiki...VoteNY)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: s/four spaces/one tab/g
..

s/four spaces/one tab/g

Change-Id: Ide1006da6481d5bd1fec77a8e614a5c3848ed9c8
---
M i18n/en.json
1 file changed, 17 insertions(+), 17 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index b97a5f9..8e15214 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,19 +1,19 @@
 {
-@metadata: {
-authors: [
-Aaron Wright aaron.wri...@gmail.com,
-David Pean david.p...@gmail.com
-]
-},
-voteny-desc: JavaScript-based voting with the ttlt;votegt;/tt 
tag,
-voteny-link: Vote,
-voteny-unvote-link: unvote,
-voteny-community-score: community score: $1,
-voteny-ratings: {{PLURAL:$1|one rating|$1 ratings}},
-voteny-remove: remove,
-voteny-gave-this: you gave this a $1,
-voteny-votes: {{PLURAL:$1|one vote|$1 votes}},
-topratings: Top rated pages,
-topratings-no-pages: No top rated pages.,
-right-voteny: Vote pages
+   @metadata: {
+   authors: [
+   Aaron Wright aaron.wri...@gmail.com,
+   David Pean david.p...@gmail.com
+   ]
+   },
+   voteny-desc: JavaScript-based voting with the ttlt;votegt;/tt 
tag,
+   voteny-link: Vote,
+   voteny-unvote-link: unvote,
+   voteny-community-score: community score: $1,
+   voteny-ratings: {{PLURAL:$1|one rating|$1 ratings}},
+   voteny-remove: remove,
+   voteny-gave-this: you gave this a $1,
+   voteny-votes: {{PLURAL:$1|one vote|$1 votes}},
+   topratings: Top rated pages,
+   topratings-no-pages: No top rated pages.,
+   right-voteny: Vote pages
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide1006da6481d5bd1fec77a8e614a5c3848ed9c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] s/four spaces/one tab/g - change (mediawiki...VoteNY)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: s/four spaces/one tab/g
..


s/four spaces/one tab/g

Change-Id: Ide1006da6481d5bd1fec77a8e614a5c3848ed9c8
---
M i18n/en.json
1 file changed, 17 insertions(+), 17 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index b97a5f9..8e15214 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,19 +1,19 @@
 {
-@metadata: {
-authors: [
-Aaron Wright aaron.wri...@gmail.com,
-David Pean david.p...@gmail.com
-]
-},
-voteny-desc: JavaScript-based voting with the ttlt;votegt;/tt 
tag,
-voteny-link: Vote,
-voteny-unvote-link: unvote,
-voteny-community-score: community score: $1,
-voteny-ratings: {{PLURAL:$1|one rating|$1 ratings}},
-voteny-remove: remove,
-voteny-gave-this: you gave this a $1,
-voteny-votes: {{PLURAL:$1|one vote|$1 votes}},
-topratings: Top rated pages,
-topratings-no-pages: No top rated pages.,
-right-voteny: Vote pages
+   @metadata: {
+   authors: [
+   Aaron Wright aaron.wri...@gmail.com,
+   David Pean david.p...@gmail.com
+   ]
+   },
+   voteny-desc: JavaScript-based voting with the ttlt;votegt;/tt 
tag,
+   voteny-link: Vote,
+   voteny-unvote-link: unvote,
+   voteny-community-score: community score: $1,
+   voteny-ratings: {{PLURAL:$1|one rating|$1 ratings}},
+   voteny-remove: remove,
+   voteny-gave-this: you gave this a $1,
+   voteny-votes: {{PLURAL:$1|one vote|$1 votes}},
+   topratings: Top rated pages,
+   topratings-no-pages: No top rated pages.,
+   right-voteny: Vote pages
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide1006da6481d5bd1fec77a8e614a5c3848ed9c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Removed old PHP i18n file, got rid of $wgSpecialPageGroups ... - change (mediawiki...Comments)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Removed old PHP i18n file, got rid of $wgSpecialPageGroups  
$dir
..


Removed old PHP i18n file, got rid of $wgSpecialPageGroups  $dir

Change-Id: Ibbc10f4db15a8612612555ea10bd45191435767d
---
D Comments.i18n.php
M Comments.php
M SpecialCommentIgnoreList.php
3 files changed, 19 insertions(+), 48 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/Comments.i18n.php b/Comments.i18n.php
deleted file mode 100644
index 2a98349..000
--- a/Comments.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim4a98799a1150f552' ) ) {
-   function wfJsonI18nShim4a98799a1150f552( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim4a98799a1150f552';
-}
diff --git a/Comments.php b/Comments.php
index 55911c9..e03ddb9 100644
--- a/Comments.php
+++ b/Comments.php
@@ -24,7 +24,7 @@
 $wgExtensionCredits['parserhook'][] = array(
'path' = __FILE__,
'name' = 'Comments',
-   'version' = '3.1.0',
+   'version' = '3.1.1',
'author' = array( 'David Pean', 'Misza', 'Jack Phoenix' ),
'descriptionmsg' = 'comments-desc',
'url' = 'https://www.mediawiki.org/wiki/Extension:Comments'
@@ -65,20 +65,17 @@
 // Set up the new special pages
 $dir = __DIR__ . '/';
 $wgMessagesDirs['Comments'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['Comments'] = $dir . 'Comments.i18n.php';
-$wgExtensionMessagesFiles['CommentsMagic'] = $dir . 'Comments.i18n.magic.php';
-$wgAutoloadClasses['Comment'] = $dir . 'CommentClass.php';
-$wgAutoloadClasses['CommentIgnoreList'] = $dir . 
'SpecialCommentIgnoreList.php';
-$wgAutoloadClasses['CommentListGet'] = $dir . 'CommentAction.php';
+$wgExtensionMessagesFiles['CommentsMagic'] = __DIR__ . 
'/Comments.i18n.magic.php';
+$wgAutoloadClasses['Comment'] = __DIR__ . '/CommentClass.php';
+$wgAutoloadClasses['CommentIgnoreList'] = __DIR__ . 
'/SpecialCommentIgnoreList.php';
+$wgAutoloadClasses['CommentListGet'] = __DIR__ . '/CommentAction.php';
 $wgSpecialPages['CommentIgnoreList'] = 'CommentIgnoreList';
 $wgSpecialPages['CommentListGet'] = 'CommentListGet';
-// Special page group for MW 1.13+
-$wgSpecialPageGroups['CommentIgnoreList'] = 'users';
 
 // Load the AJAX functions required by this extension
-require_once( $dir . 'Comments_AjaxFunctions.php' );
+require_once( __DIR__ . '/Comments_AjaxFunctions.php' );
 
-$wgAutoloadClasses['CommentsLogFormatter'] = $dir . 'CommentsLogFormatter.php';
+$wgAutoloadClasses['CommentsLogFormatter'] = __DIR__ . 
'/CommentsLogFormatter.php';
 // Add a new log type
 $wgLogTypes[] = 'comments';
 // Default log formatter doesn't support wikilinks (?!?) so we have to have
@@ -95,7 +92,7 @@
 $wgCommentsInRecentChanges = false;
 
 // Hooked functions
-$wgAutoloadClasses['CommentsHooks'] = $dir . 'CommentsHooks.php';
+$wgAutoloadClasses['CommentsHooks'] = __DIR__ . '/CommentsHooks.php';
 $wgHooks['ParserFirstCallInit'][] = 'CommentsHooks::onParserFirstCallInit';
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'CommentsHooks::onLoadExtensionSchemaUpdates';
 $wgHooks['RenameUserSQL'][] = 'CommentsHooks::onRenameUserSQL';
@@ -105,5 +102,5 @@
 $wgHooks['ParserGetVariableValueSwitch'][] = 
'NumberOfComments::getNumberOfCommentsMagic';
 
 // NumberOfComments magic word setup

[MediaWiki-commits] [Gerrit] Removed old PHP i18n file, got rid of $wgSpecialPageGroups ... - change (mediawiki...Comments)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Removed old PHP i18n file, got rid of $wgSpecialPageGroups  
$dir
..

Removed old PHP i18n file, got rid of $wgSpecialPageGroups  $dir

Change-Id: Ibbc10f4db15a8612612555ea10bd45191435767d
---
D Comments.i18n.php
M Comments.php
M SpecialCommentIgnoreList.php
3 files changed, 19 insertions(+), 48 deletions(-)


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

diff --git a/Comments.i18n.php b/Comments.i18n.php
deleted file mode 100644
index 2a98349..000
--- a/Comments.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim4a98799a1150f552' ) ) {
-   function wfJsonI18nShim4a98799a1150f552( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim4a98799a1150f552';
-}
diff --git a/Comments.php b/Comments.php
index 55911c9..e03ddb9 100644
--- a/Comments.php
+++ b/Comments.php
@@ -24,7 +24,7 @@
 $wgExtensionCredits['parserhook'][] = array(
'path' = __FILE__,
'name' = 'Comments',
-   'version' = '3.1.0',
+   'version' = '3.1.1',
'author' = array( 'David Pean', 'Misza', 'Jack Phoenix' ),
'descriptionmsg' = 'comments-desc',
'url' = 'https://www.mediawiki.org/wiki/Extension:Comments'
@@ -65,20 +65,17 @@
 // Set up the new special pages
 $dir = __DIR__ . '/';
 $wgMessagesDirs['Comments'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['Comments'] = $dir . 'Comments.i18n.php';
-$wgExtensionMessagesFiles['CommentsMagic'] = $dir . 'Comments.i18n.magic.php';
-$wgAutoloadClasses['Comment'] = $dir . 'CommentClass.php';
-$wgAutoloadClasses['CommentIgnoreList'] = $dir . 
'SpecialCommentIgnoreList.php';
-$wgAutoloadClasses['CommentListGet'] = $dir . 'CommentAction.php';
+$wgExtensionMessagesFiles['CommentsMagic'] = __DIR__ . 
'/Comments.i18n.magic.php';
+$wgAutoloadClasses['Comment'] = __DIR__ . '/CommentClass.php';
+$wgAutoloadClasses['CommentIgnoreList'] = __DIR__ . 
'/SpecialCommentIgnoreList.php';
+$wgAutoloadClasses['CommentListGet'] = __DIR__ . '/CommentAction.php';
 $wgSpecialPages['CommentIgnoreList'] = 'CommentIgnoreList';
 $wgSpecialPages['CommentListGet'] = 'CommentListGet';
-// Special page group for MW 1.13+
-$wgSpecialPageGroups['CommentIgnoreList'] = 'users';
 
 // Load the AJAX functions required by this extension
-require_once( $dir . 'Comments_AjaxFunctions.php' );
+require_once( __DIR__ . '/Comments_AjaxFunctions.php' );
 
-$wgAutoloadClasses['CommentsLogFormatter'] = $dir . 'CommentsLogFormatter.php';
+$wgAutoloadClasses['CommentsLogFormatter'] = __DIR__ . 
'/CommentsLogFormatter.php';
 // Add a new log type
 $wgLogTypes[] = 'comments';
 // Default log formatter doesn't support wikilinks (?!?) so we have to have
@@ -95,7 +92,7 @@
 $wgCommentsInRecentChanges = false;
 
 // Hooked functions
-$wgAutoloadClasses['CommentsHooks'] = $dir . 'CommentsHooks.php';
+$wgAutoloadClasses['CommentsHooks'] = __DIR__ . '/CommentsHooks.php';
 $wgHooks['ParserFirstCallInit'][] = 'CommentsHooks::onParserFirstCallInit';
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'CommentsHooks::onLoadExtensionSchemaUpdates';
 $wgHooks['RenameUserSQL'][] = 'CommentsHooks::onRenameUserSQL';
@@ -105,5 +102,5 @@
 $wgHooks['ParserGetVariableValueSwitch'][] = 

[MediaWiki-commits] [Gerrit] Ran stylize.php and manually fixed function documentation - change (mediawiki...Comments)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Ran stylize.php and manually fixed function documentation
..

Ran stylize.php and manually fixed function documentation

Change-Id: Ib007d4ef7739a5ec0f08387e58ad7d05ec5bba7c
---
M CommentAction.php
M CommentClass.php
M CommentsHooks.php
M CommentsOfTheDay.php
M Comments_AjaxFunctions.php
M NumberOfComments.php
M SpecialCommentIgnoreList.php
7 files changed, 152 insertions(+), 146 deletions(-)


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

diff --git a/CommentAction.php b/CommentAction.php
index 0dc2409..c83a048 100644
--- a/CommentAction.php
+++ b/CommentAction.php
@@ -17,7 +17,7 @@
/**
 * Show the special page
 *
-* @param $par Mixed: parameter passed to the page or null
+* @param mixed|null $par Parameter passed to the page or null
 */
public function execute( $par ) {
$out = $this-getOutput();
@@ -28,14 +28,14 @@
// Get new Comment list
$pid = $request-getInt( 'pid' );
$shwform = $request-getVal( 'shwform' );
-   if( $pid ) {
+   if ( $pid ) {
$comment = new Comment( $pid, $this-getContext() );
$comment-setOrderBy( $request-getInt( 'ord' ) );
-   if( $shwform  $shwform == 1 ) {
+   if ( $shwform  $shwform == 1 ) {
$output .= $comment-displayOrderForm(); // 
misza: added isset check
}
$output .= $comment-display();
-   if( $shwform  $shwform == 1 ) {
+   if ( $shwform  $shwform == 1 ) {
$output .= $comment-displayForm(); // misza: 
added isset check
}
}
diff --git a/CommentClass.php b/CommentClass.php
index 6305625..7664bab 100644
--- a/CommentClass.php
+++ b/CommentClass.php
@@ -97,12 +97,12 @@
 
static function getTimeOffset( $time, $timeabrv, $timename ) {
$timeStr = ''; // misza: initialize variables, DUMB FUCKS!
-   if( $time[$timeabrv]  0 ) {
+   if ( $time[$timeabrv]  0 ) {
// Give grep a chance to find the usages:
// comments-time-days, comments-time-hours, 
comments-time-minutes, comments-time-seconds, comments-time-months
$timeStr = wfMessage( comments-time-{$timename}, 
$time[$timeabrv] )-parse();
}
-   if( $timeStr ) {
+   if ( $timeStr ) {
$timeStr .= ' ';
}
return $timeStr;
@@ -121,15 +121,15 @@
$timeStr = $timeStrMo;
} else {
$timeStr = $timeStrD;
-   if( $timeStr  2 ) {
+   if ( $timeStr  2 ) {
$timeStr .= $timeStrH;
$timeStr .= $timeStrM;
-   if( !$timeStr ) {
+   if ( !$timeStr ) {
$timeStr .= $timeStrS;
}
}
}
-   if( !$timeStr ) {
+   if ( !$timeStr ) {
$timeStr = wfMessage( 'comments-time-seconds', 1 
)-parse();
}
return $timeStr;
@@ -139,8 +139,8 @@
 * Makes sure that link text is not too long by changing too long links 
to
 * a href=#http://www.abcxyz.html/a
 *
-* @param $matches Array
-* @return String: shortened URL
+* @param array $matches
+* @return string Shortened URL
 */
public static function cutCommentLinkText( $matches ) {
$tagOpen = $matches[1];
@@ -150,7 +150,7 @@
$image = preg_match( /img src=/i, $linkText );
$isURL = ( preg_match( 
'%^(?:http|https|ftp)://(?:www\.)?.*$%i', $linkText ) ? true : false );
 
-   if( $isURL  !$image  strlen( $linkText )  30 ) {
+   if ( $isURL  !$image  strlen( $linkText )  30 ) {
$start = substr( $linkText, 0, ( 30 / 2 ) - 3 );
$end = substr( $linkText, strlen( $linkText ) - ( 30 / 
2 ) + 3, ( 30 / 2 ) - 3 );
$linkText = trim( $start ) . wfMsg( 'ellipsis' ) . 
trim( $end );
@@ -161,7 +161,7 @@
/**
 * Constructor - set the page ID
 *
-* @param int $pageID Integer: ID number of the current page
+* @param int $pageID ID number of the current page
 * @param IContextSource $context
 */
public function 

[MediaWiki-commits] [Gerrit] Ran stylize.php and manually fixed function documentation - change (mediawiki...Comments)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Ran stylize.php and manually fixed function documentation
..


Ran stylize.php and manually fixed function documentation

Change-Id: Ib007d4ef7739a5ec0f08387e58ad7d05ec5bba7c
---
M CommentAction.php
M CommentClass.php
M CommentsHooks.php
M CommentsOfTheDay.php
M Comments_AjaxFunctions.php
M NumberOfComments.php
M SpecialCommentIgnoreList.php
7 files changed, 152 insertions(+), 146 deletions(-)

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



diff --git a/CommentAction.php b/CommentAction.php
index 0dc2409..c83a048 100644
--- a/CommentAction.php
+++ b/CommentAction.php
@@ -17,7 +17,7 @@
/**
 * Show the special page
 *
-* @param $par Mixed: parameter passed to the page or null
+* @param mixed|null $par Parameter passed to the page or null
 */
public function execute( $par ) {
$out = $this-getOutput();
@@ -28,14 +28,14 @@
// Get new Comment list
$pid = $request-getInt( 'pid' );
$shwform = $request-getVal( 'shwform' );
-   if( $pid ) {
+   if ( $pid ) {
$comment = new Comment( $pid, $this-getContext() );
$comment-setOrderBy( $request-getInt( 'ord' ) );
-   if( $shwform  $shwform == 1 ) {
+   if ( $shwform  $shwform == 1 ) {
$output .= $comment-displayOrderForm(); // 
misza: added isset check
}
$output .= $comment-display();
-   if( $shwform  $shwform == 1 ) {
+   if ( $shwform  $shwform == 1 ) {
$output .= $comment-displayForm(); // misza: 
added isset check
}
}
diff --git a/CommentClass.php b/CommentClass.php
index 6305625..7664bab 100644
--- a/CommentClass.php
+++ b/CommentClass.php
@@ -97,12 +97,12 @@
 
static function getTimeOffset( $time, $timeabrv, $timename ) {
$timeStr = ''; // misza: initialize variables, DUMB FUCKS!
-   if( $time[$timeabrv]  0 ) {
+   if ( $time[$timeabrv]  0 ) {
// Give grep a chance to find the usages:
// comments-time-days, comments-time-hours, 
comments-time-minutes, comments-time-seconds, comments-time-months
$timeStr = wfMessage( comments-time-{$timename}, 
$time[$timeabrv] )-parse();
}
-   if( $timeStr ) {
+   if ( $timeStr ) {
$timeStr .= ' ';
}
return $timeStr;
@@ -121,15 +121,15 @@
$timeStr = $timeStrMo;
} else {
$timeStr = $timeStrD;
-   if( $timeStr  2 ) {
+   if ( $timeStr  2 ) {
$timeStr .= $timeStrH;
$timeStr .= $timeStrM;
-   if( !$timeStr ) {
+   if ( !$timeStr ) {
$timeStr .= $timeStrS;
}
}
}
-   if( !$timeStr ) {
+   if ( !$timeStr ) {
$timeStr = wfMessage( 'comments-time-seconds', 1 
)-parse();
}
return $timeStr;
@@ -139,8 +139,8 @@
 * Makes sure that link text is not too long by changing too long links 
to
 * a href=#http://www.abcxyz.html/a
 *
-* @param $matches Array
-* @return String: shortened URL
+* @param array $matches
+* @return string Shortened URL
 */
public static function cutCommentLinkText( $matches ) {
$tagOpen = $matches[1];
@@ -150,7 +150,7 @@
$image = preg_match( /img src=/i, $linkText );
$isURL = ( preg_match( 
'%^(?:http|https|ftp)://(?:www\.)?.*$%i', $linkText ) ? true : false );
 
-   if( $isURL  !$image  strlen( $linkText )  30 ) {
+   if ( $isURL  !$image  strlen( $linkText )  30 ) {
$start = substr( $linkText, 0, ( 30 / 2 ) - 3 );
$end = substr( $linkText, strlen( $linkText ) - ( 30 / 
2 ) + 3, ( 30 / 2 ) - 3 );
$linkText = trim( $start ) . wfMsg( 'ellipsis' ) . 
trim( $end );
@@ -161,7 +161,7 @@
/**
 * Constructor - set the page ID
 *
-* @param int $pageID Integer: ID number of the current page
+* @param int $pageID ID number of the current page
 * @param IContextSource $context
 */
public function __construct( $pageID, $context = null ) {
@@ -184,22 

[MediaWiki-commits] [Gerrit] Split CSS and JS into their own ResourceLoader modules - change (mediawiki...Comments)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Split CSS and JS into their own ResourceLoader modules
..

Split CSS and JS into their own ResourceLoader modules

Change-Id: I8547a07f02c20313701fd7ce2cde06ad0fd1a515
---
M Comments.php
M CommentsHooks.php
2 files changed, 12 insertions(+), 6 deletions(-)


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

diff --git a/Comments.php b/Comments.php
index e03ddb9..d53ed44 100644
--- a/Comments.php
+++ b/Comments.php
@@ -7,7 +7,7 @@
  * @author David Pean david.p...@gmail.com
  * @author Misza misza1313[ at ]gmail[ dot ]com
  * @author Jack Phoenix j...@countervandalism.net
- * @copyright Copyright © 2008-2013 David Pean, Misza and Jack Phoenix
+ * @copyright Copyright © 2008-2014 David Pean, Misza and Jack Phoenix
  * @link https://www.mediawiki.org/wiki/Extension:Comments Documentation
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
@@ -31,9 +31,15 @@
 );
 
 // ResourceLoader support for MediaWiki 1.17+
-$wgResourceModules['ext.comments'] = array(
-   'scripts' = 'Comment.js',
+$wgResourceModules['ext.comments.css'] = array(
'styles' = 'Comments.css',
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = 'Comments',
+   'position' = 'top' // available since r85616
+);
+
+$wgResourceModules['ext.comments.js'] = array(
+   'scripts' = 'Comment.js',
'messages' = array(
'comments-voted-label', 'comments-loading',
'comments-auto-refresher-pause', 
'comments-auto-refresher-enable',
@@ -42,8 +48,7 @@
'comments-delete-warning'
),
'localBasePath' = __DIR__,
-   'remoteExtPath' = 'Comments',
-   'position' = 'top' // available since r85616
+   'remoteExtPath' = 'Comments'
 );
 
 # Configuration variables
diff --git a/CommentsHooks.php b/CommentsHooks.php
index d6c934c..cc96508 100644
--- a/CommentsHooks.php
+++ b/CommentsHooks.php
@@ -48,7 +48,8 @@
}
 
// Add required CSS  JS via ResourceLoader
-   $wgOut-addModules( 'ext.comments' );
+   $wgOut-addModuleStyles( 'ext.comments.css' );
+   $wgOut-addModules( 'ext.comments.js' );
 
// Parse arguments
// The preg_match() lines here are to support the old-style way 
of

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8547a07f02c20313701fd7ce2cde06ad0fd1a515
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] Split CSS and JS into their own ResourceLoader modules - change (mediawiki...Comments)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Split CSS and JS into their own ResourceLoader modules
..


Split CSS and JS into their own ResourceLoader modules

Change-Id: I8547a07f02c20313701fd7ce2cde06ad0fd1a515
---
M Comments.php
M CommentsHooks.php
2 files changed, 12 insertions(+), 6 deletions(-)

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



diff --git a/Comments.php b/Comments.php
index e03ddb9..d53ed44 100644
--- a/Comments.php
+++ b/Comments.php
@@ -7,7 +7,7 @@
  * @author David Pean david.p...@gmail.com
  * @author Misza misza1313[ at ]gmail[ dot ]com
  * @author Jack Phoenix j...@countervandalism.net
- * @copyright Copyright © 2008-2013 David Pean, Misza and Jack Phoenix
+ * @copyright Copyright © 2008-2014 David Pean, Misza and Jack Phoenix
  * @link https://www.mediawiki.org/wiki/Extension:Comments Documentation
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
@@ -31,9 +31,15 @@
 );
 
 // ResourceLoader support for MediaWiki 1.17+
-$wgResourceModules['ext.comments'] = array(
-   'scripts' = 'Comment.js',
+$wgResourceModules['ext.comments.css'] = array(
'styles' = 'Comments.css',
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = 'Comments',
+   'position' = 'top' // available since r85616
+);
+
+$wgResourceModules['ext.comments.js'] = array(
+   'scripts' = 'Comment.js',
'messages' = array(
'comments-voted-label', 'comments-loading',
'comments-auto-refresher-pause', 
'comments-auto-refresher-enable',
@@ -42,8 +48,7 @@
'comments-delete-warning'
),
'localBasePath' = __DIR__,
-   'remoteExtPath' = 'Comments',
-   'position' = 'top' // available since r85616
+   'remoteExtPath' = 'Comments'
 );
 
 # Configuration variables
diff --git a/CommentsHooks.php b/CommentsHooks.php
index d6c934c..cc96508 100644
--- a/CommentsHooks.php
+++ b/CommentsHooks.php
@@ -48,7 +48,8 @@
}
 
// Add required CSS  JS via ResourceLoader
-   $wgOut-addModules( 'ext.comments' );
+   $wgOut-addModuleStyles( 'ext.comments.css' );
+   $wgOut-addModules( 'ext.comments.js' );
 
// Parse arguments
// The preg_match() lines here are to support the old-style way 
of

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8547a07f02c20313701fd7ce2cde06ad0fd1a515
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
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 CommonsMedia tracking - change (mediawiki...Wikibase)

2014-09-21 Thread Bene (Code Review)
Bene has uploaded a new change for review.

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

Change subject: Fix CommonsMedia tracking
..

Fix CommonsMedia tracking

Change-Id: I158f1319e4cadf4cd4925e5e9d2beadeae96fd70
ParserOutput::addImage requries the title form with underscores.
---
M repo/includes/EntityParserOutputGenerator.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 8793d09..ff54d00 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -126,7 +126,7 @@
$usedImages = $valuesFinder-findFromSnaks( $snaks, 
'commonsMedia' );
 
foreach( $usedImages as $image ) {
-   $pout-addImage( $image-getValue() );
+   $pout-addImage( str_replace( ' ', '_', 
$image-getValue() ) );
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I158f1319e4cadf4cd4925e5e9d2beadeae96fd70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Bene benestar.wikime...@gmail.com

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


[MediaWiki-commits] [Gerrit] Ignore VIA before 2014-03-22 (wasn't in X-Analytics) - change (analytics/zero-sms)

2014-09-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Ignore VIA before 2014-03-22 (wasn't in X-Analytics)
..

Ignore VIA before 2014-03-22 (wasn't in X-Analytics)

Change-Id: I035f2598d315bd4f19d46660b9a966d326469939
---
M scripts/weblogs.py
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms 
refs/changes/04/161804/1

diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index ab5d3f1..1d0a136 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -216,6 +216,8 @@
 
 def combineStats(self):
 safePrint('Combine stat files')
+# Logs did not contain the VIA X-Analytics tag before this date
+ignoreViaBefore = datetime(2014, 3, 22)
 configs = self.downloadConfigs()
 stats = collections.defaultdict(int)
 for f in os.listdir(self.pathCache):
@@ -251,7 +253,7 @@
 (conf.https or https == u'http') and \
 (True == langs or lang in langs) and \
 (True == sites or site2 in sites) and \
-(via in conf.via) and \
+(dt  ignoreViaBefore or via in conf.via) 
and \
 (ipset in conf.ipsets):
 isZero = True
 break
@@ -351,5 +353,5 @@
 
 
 if __name__ == '__main__':
-WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).manualRun()
-# WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).safeRun()
+# WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).manualRun()
+WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).safeRun()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I035f2598d315bd4f19d46660b9a966d326469939
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Ignore VIA before 2014-03-22 (wasn't in X-Analytics) - change (analytics/zero-sms)

2014-09-21 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Ignore VIA before 2014-03-22 (wasn't in X-Analytics)
..


Ignore VIA before 2014-03-22 (wasn't in X-Analytics)

Change-Id: I035f2598d315bd4f19d46660b9a966d326469939
---
M scripts/weblogs.py
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index ab5d3f1..1d0a136 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -216,6 +216,8 @@
 
 def combineStats(self):
 safePrint('Combine stat files')
+# Logs did not contain the VIA X-Analytics tag before this date
+ignoreViaBefore = datetime(2014, 3, 22)
 configs = self.downloadConfigs()
 stats = collections.defaultdict(int)
 for f in os.listdir(self.pathCache):
@@ -251,7 +253,7 @@
 (conf.https or https == u'http') and \
 (True == langs or lang in langs) and \
 (True == sites or site2 in sites) and \
-(via in conf.via) and \
+(dt  ignoreViaBefore or via in conf.via) 
and \
 (ipset in conf.ipsets):
 isZero = True
 break
@@ -351,5 +353,5 @@
 
 
 if __name__ == '__main__':
-WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).manualRun()
-# WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).safeRun()
+# WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).manualRun()
+WebLogProcessor(logDatePattern=(sys.argv[1] if len(sys.argv)  1 else 
False)).safeRun()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I035f2598d315bd4f19d46660b9a966d326469939
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org
Gerrit-Reviewer: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] mediawiki.api.edit: Remove format: 'json' - change (mediawiki/core)

2014-09-21 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: mediawiki.api.edit: Remove format: 'json'
..

mediawiki.api.edit: Remove format: 'json'

Change-Id: Ifdf61205d94dbf918be5427cef89a037ce9f08a2
format: 'json' is in the defaultOptions in mediawiki.api.
---
M resources/src/mediawiki.api/mediawiki.api.edit.js
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/05/161805/1

diff --git a/resources/src/mediawiki.api/mediawiki.api.edit.js 
b/resources/src/mediawiki.api/mediawiki.api.edit.js
index e88ae5e..714c38c 100644
--- a/resources/src/mediawiki.api/mediawiki.api.edit.js
+++ b/resources/src/mediawiki.api/mediawiki.api.edit.js
@@ -71,7 +71,6 @@
return this.postWithEditToken( $.extend( {
action: 'edit',
section: 'new',
-   format: 'json',
title: String( title ),
summary: header,
text: message

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdf61205d94dbf918be5427cef89a037ce9f08a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com
Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com

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


[MediaWiki-commits] [Gerrit] filter out last day of data, simplify iszero-zero - change (analytics/zero-sms)

2014-09-21 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: filter out last day of data, simplify iszero-zero
..


filter out last day of data, simplify iszero-zero

Change-Id: If414ca8774a307f75402a4ffb6ad7aa5494307d3
---
M scripts/weblogs.py
1 file changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index 1d0a136..3fbd90c 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -257,7 +257,7 @@
 (ipset in conf.ipsets):
 isZero = True
 break
-vals[9] = u'INCL' if isZero else u'EXCL'
+vals[9] = u'yes' if isZero else u'no'
 else:
 vals[9] = ''
 else:
@@ -284,14 +284,17 @@
 else:
 df = DataFrame(stats, columns=columnHeaders11)
 
+# filter type==DATA
 data = df[df['type'] == 'DATA']
-data['iszero'] = data['zero'].map(lambda v: 'yes' if v == 'INCL' else 
'no')
+# filter out last date
+lastDate = data.date.max()
+data = data[data.date  lastDate]
 xcs = list(data.xcs.unique())
 
 for id in xcs:
 
 s = StringIO.StringIO()
-pivot_table(data[data.xcs == id], 'count', ['date', 'iszero'], 
aggfunc=np.sum).to_csv(s, header=True)
+pivot_table(data[data.xcs == id], 'count', ['date', 'zero'], 
aggfunc=np.sum).to_csv(s, header=True)
 result = s.getvalue()
 
 # sortColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'zero']

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If414ca8774a307f75402a4ffb6ad7aa5494307d3
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org
Gerrit-Reviewer: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] filter out last day of data, simplify iszero-zero - change (analytics/zero-sms)

2014-09-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: filter out last day of data, simplify iszero-zero
..

filter out last day of data, simplify iszero-zero

Change-Id: If414ca8774a307f75402a4ffb6ad7aa5494307d3
---
M scripts/weblogs.py
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms 
refs/changes/06/161806/1

diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index 1d0a136..3fbd90c 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -257,7 +257,7 @@
 (ipset in conf.ipsets):
 isZero = True
 break
-vals[9] = u'INCL' if isZero else u'EXCL'
+vals[9] = u'yes' if isZero else u'no'
 else:
 vals[9] = ''
 else:
@@ -284,14 +284,17 @@
 else:
 df = DataFrame(stats, columns=columnHeaders11)
 
+# filter type==DATA
 data = df[df['type'] == 'DATA']
-data['iszero'] = data['zero'].map(lambda v: 'yes' if v == 'INCL' else 
'no')
+# filter out last date
+lastDate = data.date.max()
+data = data[data.date  lastDate]
 xcs = list(data.xcs.unique())
 
 for id in xcs:
 
 s = StringIO.StringIO()
-pivot_table(data[data.xcs == id], 'count', ['date', 'iszero'], 
aggfunc=np.sum).to_csv(s, header=True)
+pivot_table(data[data.xcs == id], 'count', ['date', 'zero'], 
aggfunc=np.sum).to_csv(s, header=True)
 result = s.getvalue()
 
 # sortColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'zero']

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If414ca8774a307f75402a4ffb6ad7aa5494307d3
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] mediawiki.api.edit: Remove format: 'json' - change (mediawiki/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mediawiki.api.edit: Remove format: 'json'
..


mediawiki.api.edit: Remove format: 'json'

format: 'json' is in the defaultOptions in mediawiki.api.

Change-Id: Ifdf61205d94dbf918be5427cef89a037ce9f08a2
---
M resources/src/mediawiki.api/mediawiki.api.edit.js
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/src/mediawiki.api/mediawiki.api.edit.js 
b/resources/src/mediawiki.api/mediawiki.api.edit.js
index e88ae5e..714c38c 100644
--- a/resources/src/mediawiki.api/mediawiki.api.edit.js
+++ b/resources/src/mediawiki.api/mediawiki.api.edit.js
@@ -71,7 +71,6 @@
return this.postWithEditToken( $.extend( {
action: 'edit',
section: 'new',
-   format: 'json',
title: String( title ),
summary: header,
text: message

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdf61205d94dbf918be5427cef89a037ce9f08a2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
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 usage of innerHTML - change (mediawiki...RecentActivityFeed)

2014-09-21 Thread Nischayn22 (Code Review)
Nischayn22 has uploaded a new change for review.

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

Change subject: Remove usage of innerHTML
..

Remove usage of innerHTML

As per https://bugzilla.wikimedia.org/show_bug.cgi?id=69798#c1
removed usage of innerHTML

Change-Id: I9f9624c6adea59b1eee54c0c62855ecb175c4753
---
M modules/ext.inlinediff.js
1 file changed, 20 insertions(+), 28 deletions(-)


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

diff --git a/modules/ext.inlinediff.js b/modules/ext.inlinediff.js
index 6ccb086..58648c9 100644
--- a/modules/ext.inlinediff.js
+++ b/modules/ext.inlinediff.js
@@ -25,34 +25,28 @@
findString = 'a:contains(diff)';
}
 
-   var regex;
-
-   if (mw.config.get('wgCanonicalSpecialPageName') == Contributions) {
-   regex = /oldid=(\d+)$/;
-
-   } else {
-   regex = /diff=(\d+)oldid=/;
-   }
+   var regex = /diff=(\d+)oldid=/;
var diffLink = $(element).find(findString);
+
if (diffLink.length  0  !(/(\.js|\.css)/.test(diffLink[0].href))) {
var regexResult = regex.exec(diffLink[0].href);
if (regexResult != null  regexResult.length = 2) {
var diffID = regexResult[1];
var inlineDiffButton;
if (typeof inlineDiffBigUI === undefined) {
-   inlineDiffButton = document.createElement(a);
-   inlineDiffButton.href = #;
-   inlineDiffButton.innerHTML = 'bspan 
style=color:black; [/spanspan style=color:#339900;' + inspectText + 
'/spanspan style=color:black;] /span/b';
+   inlineDiffButton = $('a')
+   .attr('href', '#')
+   .html('bspan style=color:black; [/spanspan 
style=color:#339900;' + inspectText + '/spanspan style=color:black;] 
/span/b');
} else {
-   inlineDiffButton = document.createElement(input);
-   inlineDiffButton.type = button;
-   inlineDiffButton.value = Inspect edit;
+   inlineDiffButton = $('input')
+   .attr('type', 'button')
+   .value('inspect edit');
}
-   inlineDiffButton.id = diffID;
-   $(inlineDiffButton).click(function() {
-   return inspectWatchlistDiff(this);
-   });
-   $(element).find('.comment').append(inlineDiffButton);
+   inlineDiffButton.attr( 'id', diffID)
+   .click(function() {
+   return inspectWatchlistDiff(this);
+   });
+   $(element).find('br').before(inlineDiffButton);
}
}
 }
@@ -61,7 +55,7 @@
 
 
var entries = $(#mw-content-text table.mw-enhanced-rc);
-   if (entries.length == 0) {
+   if ( entries.length == 0 ) {
$(.mw-changeslist).each(function(ind, el) {
$(el).children(div).each(inspectionEachHelper);
});
@@ -84,7 +78,6 @@
diffRequestLocked = f;
return false;
}
-
var diffString = 
response.query.pages[Object.keys(response.query.pages)[0]].revisions[0].diff[*];
 
if (diffString == null) {
@@ -93,17 +86,16 @@
return false;
}
 
-   var newTable = document.createElement(table);
-   newTable.className = diff;
-   $(newTable).html('colgroupcol class=diff-markercol 
class=diff-contentcol class=diff-markercol 
class=diff-content/colgroup');
-
-   $(newTable).append(diffString);
+   var newTable = $('table')
+   .attr('class', diff)
+   .html('colgroupcol class=diff-markercol 
class=diff-contentcol class=diff-markercol 
class=diff-content/colgroup')
+   .append(diffString);
if ($(# + button.id).parent(td).length  0  !($(# + 
button.id).parent(td).hasClass(mw-enhanced-rc-nested))) {
$(# + 
button.id).parents(table.mw-enhanced-rc:first).after(newTable);
} else {
-   $(newTable).insertAfter(# + button.id);
+   newTable.insertAfter(# + button.id);
}
-   newTable.id = button.id + display;
+   newTable.attr('id', button.id + display);
 
$(button).unbind(click);
if (typeof inlineDiffBigUI === undefined) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f9624c6adea59b1eee54c0c62855ecb175c4753
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] Renamed zero fld to iszero (val=yes/no) - change (analytics/zero-sms)

2014-09-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Renamed zero fld to iszero (val=yes/no)
..

Renamed zero fld to iszero (val=yes/no)

Change-Id: I233231e5043649a973d963b5a91d96159b9a0a4f
---
M scripts/weblogs.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms 
refs/changes/08/161808/1

diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index 3fbd90c..90522a4 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -22,7 +22,7 @@
 
 
 columnHeaders10 = 
u'date,type,xcs,via,ipset,https,lang,subdomain,site,count'.split(',')
-columnHeaders11 = 
u'date,type,xcs,via,ipset,https,lang,subdomain,site,zero,count'.split(',')
+columnHeaders11 = 
u'date,type,xcs,via,ipset,https,lang,subdomain,site,iszero,count'.split(',')
 validSubDomains = {'m', 'zero', 'mobile', 'wap'}
 validHttpCode = {'200', '304'}
 
@@ -294,11 +294,11 @@
 for id in xcs:
 
 s = StringIO.StringIO()
-pivot_table(data[data.xcs == id], 'count', ['date', 'zero'], 
aggfunc=np.sum).to_csv(s, header=True)
+pivot_table(data[data.xcs == id], 'count', ['date', 'iszero'], 
aggfunc=np.sum).to_csv(s, header=True)
 result = s.getvalue()
 
-# sortColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'zero']
-# outColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'zero', 'count']
+# sortColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'iszero']
+# outColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'iszero', 'count']
 # xcsData = data[data.xcs == id].sort(columns=sortColumns)
 # result = 
xcsData.sort(columns=sortColumns).to_csv(columns=outColumns, index=False)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I233231e5043649a973d963b5a91d96159b9a0a4f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Renamed zero fld to iszero (val=yes/no) - change (analytics/zero-sms)

2014-09-21 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Renamed zero fld to iszero (val=yes/no)
..


Renamed zero fld to iszero (val=yes/no)

Change-Id: I233231e5043649a973d963b5a91d96159b9a0a4f
---
M scripts/weblogs.py
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/scripts/weblogs.py b/scripts/weblogs.py
index 3fbd90c..90522a4 100644
--- a/scripts/weblogs.py
+++ b/scripts/weblogs.py
@@ -22,7 +22,7 @@
 
 
 columnHeaders10 = 
u'date,type,xcs,via,ipset,https,lang,subdomain,site,count'.split(',')
-columnHeaders11 = 
u'date,type,xcs,via,ipset,https,lang,subdomain,site,zero,count'.split(',')
+columnHeaders11 = 
u'date,type,xcs,via,ipset,https,lang,subdomain,site,iszero,count'.split(',')
 validSubDomains = {'m', 'zero', 'mobile', 'wap'}
 validHttpCode = {'200', '304'}
 
@@ -294,11 +294,11 @@
 for id in xcs:
 
 s = StringIO.StringIO()
-pivot_table(data[data.xcs == id], 'count', ['date', 'zero'], 
aggfunc=np.sum).to_csv(s, header=True)
+pivot_table(data[data.xcs == id], 'count', ['date', 'iszero'], 
aggfunc=np.sum).to_csv(s, header=True)
 result = s.getvalue()
 
-# sortColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'zero']
-# outColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'zero', 'count']
+# sortColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'iszero']
+# outColumns = ['date', 'via', 'ipset', 'https', 'lang', 
'subdomain', 'site', 'iszero', 'count']
 # xcsData = data[data.xcs == id].sort(columns=sortColumns)
 # result = 
xcsData.sort(columns=sortColumns).to_csv(columns=outColumns, index=False)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I233231e5043649a973d963b5a91d96159b9a0a4f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org
Gerrit-Reviewer: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: ba97a1a..ab3474f - change (mediawiki/extensions)

2014-09-21 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: ba97a1a..ab3474f
..


Syncronize VisualEditor: ba97a1a..ab3474f

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

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index ba97a1a..ab3474f 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit ba97a1ac6e1e7575e84051a0b72f1795e17a2260
+Subproject commit ab3474f03252dbd1d2f533becceb68795aa27587

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cb63acd44d70df94a380ad72e56a4c913c4bcbe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: ba97a1a..ab3474f - change (mediawiki/extensions)

2014-09-21 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: ba97a1a..ab3474f
..

Syncronize VisualEditor: ba97a1a..ab3474f

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


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

diff --git a/VisualEditor b/VisualEditor
index ba97a1a..ab3474f 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit ba97a1ac6e1e7575e84051a0b72f1795e17a2260
+Subproject commit ab3474f03252dbd1d2f533becceb68795aa27587

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cb63acd44d70df94a380ad72e56a4c913c4bcbe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Clean up - change (wikimedia...crm)

2014-09-21 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Clean up
..


Clean up

Change-Id: I82b56654cedd1455267006063269fb4e034fa0a2
---
M sites/all/modules/thank_you/generators/FindUnconsumedTokens.php
M sites/all/modules/thank_you/generators/RenderTranslatedPage.php
2 files changed, 9 insertions(+), 5 deletions(-)

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



diff --git a/sites/all/modules/thank_you/generators/FindUnconsumedTokens.php 
b/sites/all/modules/thank_you/generators/FindUnconsumedTokens.php
index 3c40110..d309534 100644
--- a/sites/all/modules/thank_you/generators/FindUnconsumedTokens.php
+++ b/sites/all/modules/thank_you/generators/FindUnconsumedTokens.php
@@ -33,11 +33,14 @@
 'first_name' = 'fix',
 'last_name' = 'me',
 'recurring' = true,
-'RecurringRestarted' = true,
 
 'receive_date' = time(),
 
 'locale' = $locale,
+'contribution_tags' = array(
+RecurringRestarted,
+UnrecordedCharge,
+),
 );
 return $params;
 }
@@ -61,8 +64,9 @@
  * @throws UnconsumedTokenException
  */
 static function renderAndFindTokens( $template, $locale ) {
-$rendered = Templating::renderStringTemplate( $template, 
FindUnconsumedTokens::getRandomTemplateParams( $locale ) );
-FindUnconsumedTokens::findTokens( $buf );
+$params = FindUnconsumedTokens::getRandomTemplateParams( $locale );
+$rendered = Templating::renderStringTemplate( $template, $params );
+FindUnconsumedTokens::findTokens( $rendered );
 }
 
 /**
@@ -87,7 +91,7 @@
 if ( $count = preg_match_all( $bad_punctuation_re, $buf, $matches ) ) {
 $bad_punc = implode( ', ', $matches[0] );
 throw new UnconsumedTokenException(
-Found {$count} likely tokens [{$bad_punc}] in rendered 
thank-you translation. );
+Found {$count} likely tokens \{$bad_punc}\ in rendered 
thank-you translation. );
 }
 }
 }
diff --git a/sites/all/modules/thank_you/generators/RenderTranslatedPage.php 
b/sites/all/modules/thank_you/generators/RenderTranslatedPage.php
index c6cf93e..d7c70b5 100644
--- a/sites/all/modules/thank_you/generators/RenderTranslatedPage.php
+++ b/sites/all/modules/thank_you/generators/RenderTranslatedPage.php
@@ -51,11 +51,11 @@
// Make it nicer to read
$page_content = str_replace( '|/p|', 
/p\n, $page_content );
 
-   $file = str_replace( '$1', $lang, 
$this-proto_file );
 
// Assert no garbage
FindUnconsumedTokens::renderAndFindTokens( 
$page_content, $lang );
 
+   $file = str_replace( '$1', $lang, 
$this-proto_file );
$template_name = basename( $file );
 
$template_info = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82b56654cedd1455267006063269fb4e034fa0a2
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight awi...@wikimedia.org
Gerrit-Reviewer: Awight awi...@wikimedia.org
Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org
Gerrit-Reviewer: Katie Horn kh...@wikimedia.org
Gerrit-Reviewer: Ssmith ssm...@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] Also fill above heading when clicking a placeholder - change (mediawiki...ContentTranslation)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Also fill above heading when clicking a placeholder
..


Also fill above heading when clicking a placeholder

The heading is only filled if it contains no translation yet and
it is a preceeding parent header of the section just clicked.

Change-Id: Ib6012d7bfa0fc8f12c82e64256fe02a12267d16c
---
M Resources.php
M hooks.md
M modules/base/ext.cx.base.js
M modules/source/ext.cx.source.js
M modules/translation/ext.cx.translation.js
A tests/qunit/translation/ext.cx.translation.test.js
6 files changed, 109 insertions(+), 10 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index a9284b4..d39609a 100644
--- a/Resources.php
+++ b/Resources.php
@@ -117,12 +117,11 @@
'translation/ext.cx.translation.aligner.js',
),
'dependencies' = array(
-   'ext.cx.translation.progress',
-   'jquery.uls.data',
-   'mediawiki.Uri',
-   'jquery.throttle-debounce',
-   'mediawiki.Title',
'ext.cx.editor',
+   'jquery.throttle-debounce',
+   'jquery.uls.data',
+   'mediawiki.Title',
+   'mediawiki.Uri',
),
'styles' = array(
'translation/styles/ext.cx.translation.less',
@@ -451,6 +450,11 @@
),
) + $resourcePaths;
 
+   $modules['qunit']['ext.cx.translation.tests'] = array(
+   'scripts' = array( 
'tests/qunit/translation/ext.cx.translation.test.js' ),
+   'dependencies' = array( 'ext.cx.translation' ),
+   ) + $resourcePaths;
+
$modules['qunit']['ext.cx.util.test'] = array(
'scripts' = array( 'tests/qunit/base/ext.cx.util.test.js' ),
'dependencies' = array(
diff --git a/hooks.md b/hooks.md
index d048a8c..03773f2 100644
--- a/hooks.md
+++ b/hooks.md
@@ -88,7 +88,7 @@
 
 ## mw.cx.translation.add
 
-Used to trigger the pre-translation for a source section. Source section id is 
passed as argument. The translation module listens for this.
+Used to trigger the pre-translation for a source section. Source section id is 
passed as argument. Second argument is a boolean which controls whether machine 
translation should be applied to the text. The translation module listens for 
this.
 
 ## mw.cx.translation.change
 
diff --git a/modules/base/ext.cx.base.js b/modules/base/ext.cx.base.js
index f5a65be..ef6ce35 100644
--- a/modules/base/ext.cx.base.js
+++ b/modules/base/ext.cx.base.js
@@ -39,7 +39,11 @@
var cx = this;
this.$header.cxHeader();
this.$source.cxSource();
-   mw.loader.using( [ 'ext.cx.tools', 'ext.cx.translation' ] 
).then( function () {
+   mw.loader.using( [
+   'ext.cx.tools',
+   'ext.cx.translation',
+   'ext.cx.translation.progress',
+   ] ).then( function () {
cx.$translation.cxTranslation();
cx.$tools.cxTools();
} );
diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index 4758926..b2550c4 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -198,6 +198,7 @@
// Disable link click
return false;
} );
+
this.$content.on( 'mouseenter', 'a', function ( e ) {
var $link = $( this ),
linkid = $( this ).data( 'linkid' );
diff --git a/modules/translation/ext.cx.translation.js 
b/modules/translation/ext.cx.translation.js
index 907af50..ff8059b 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -202,10 +202,63 @@
}
};
 
+   /**
+* Checks whether a tag is a heading.
+*
+* @static
+* @param {string} tagName
+* @return {boolean}
+*/
+   ContentTranslationEditor.isHeading = function ( tagName ) {
+   return /^H[1-6]$/i.test( tagName );
+   };
+
+   /**
+* Checks whether one tag is a parent heading of another tag.
+*
+* @static
+* @param {string} preceding tagName
+* @param {string} current tagName
+* @return {boolean}
+*/
+   ContentTranslationEditor.isParentHeading = function ( preceding, 
current ) {
+   // Any header goes if this is a non-heading
+   if ( !ContentTranslationEditor.isHeading( current ) ) {
+   return ContentTranslationEditor.isHeading( preceding );
+   }
+
+   // Both are headings, check that the previous one is bigger
+   if ( 

[MediaWiki-commits] [Gerrit] Dictionary: Cache the dictionary api requests - change (mediawiki...ContentTranslation)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Dictionary: Cache the dictionary api requests
..


Dictionary: Cache the dictionary api requests

Change-Id: Id2ff348f22b938bca990bbd7249288260273f696
---
M modules/tools/ext.cx.tools.dictionary.js
1 file changed, 21 insertions(+), 4 deletions(-)

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



diff --git a/modules/tools/ext.cx.tools.dictionary.js 
b/modules/tools/ext.cx.tools.dictionary.js
index 37f6250..c72daa2 100644
--- a/modules/tools/ext.cx.tools.dictionary.js
+++ b/modules/tools/ext.cx.tools.dictionary.js
@@ -12,7 +12,8 @@
'use strict';
 
// Cached dictionary providers
-   var cachedProviders = null;
+   var cache = {},
+   cachedProviders = null;
 
/**
 * A plugin that adds text to an element,
@@ -84,10 +85,26 @@
 * @return {jQuery.Promise}
 */
function getTranslation( word, from, to, provider ) {
-   var dictUrl = mw.config.get( 'wgContentTranslationServerURL' ) 
+ '/dictionary/' +
+   var dictUrl, request;
+
+   if ( cache[ word ] 
+   cache[ word ][ from ] 
+   cache[ word ][ from ][ to ] 
+   cache[ word ][ from ][ to ][ provider ]
+   ) {
+   return cache[ word ][ from ][ to ][ provider ];
+   }
+
+   dictUrl = mw.config.get( 'wgContentTranslationServerURL' ) + 
'/dictionary/' +
word + '/' + from + '/' + to + '/' + provider;
 
-   return $.get( dictUrl );
+   request = $.get( dictUrl );
+   // Create the cache object
+   cache[ word ] = cache[ word ] || {};
+   cache[ word ][ from ] = cache[ word ][ from ] || {};
+   cache[ word ][ from ][ to ] = cache[ word ][ from ][ to ] || {};
+   cache[ word ][ from ][ to ][ provider ] = request;
+   return request;
}
 
/**
@@ -193,7 +210,7 @@
// Set the source word
this.$card.find( '.card__headword' ).text( word );
 
-   this.getProviders( mw.cx.sourceLanguage, mw.cx.targetLanguage )
+   this.getProviders( sourceLanguage, targetLanguage )
.done( function ( providers ) {
var provider;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2ff348f22b938bca990bbd7249288260273f696
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Keep debug flag while editing a page - change (mediawiki/core)

2014-09-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Keep debug flag while editing a page
..

Keep debug flag while editing a page

If request contained 'debug' field, keep it around
for the subsequent edit requests as a hidden field.

Change-Id: I6d401ce66fe5b3e131c1673b9d665fb9899228c3
---
M includes/EditPage.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/161878/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index a9925ff..421ad86 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -2284,7 +2284,8 @@
 * during form output near the top, for captchas and the like.
 */
function showEditForm( $formCallback = null ) {
-   global $wgOut, $wgUser;
+   global $wgOut, $wgUser, $wgRequest;
+;
 
wfProfileIn( __METHOD__ );
 
@@ -2422,6 +2423,10 @@
$wgOut-addHTML( Html::hidden( 'format', $this-contentFormat ) 
);
$wgOut-addHTML( Html::hidden( 'model', $this-contentModel ) );
 
+   if ( $wgRequest-getCheck( 'debug' ) ) {
+   $wgOut-addHTML( Html::hidden( 'debug', '1' ) );
+   }
+
if ( $this-section == 'new' ) {
$this-showSummaryInput( true, $this-summary );
$wgOut-addHTML( $this-getSummaryPreview( true, 
$this-summary ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d401ce66fe5b3e131c1673b9d665fb9899228c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Removed old PHP i18n file, no longer needed - change (mediawiki...LinkFilter)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Removed old PHP i18n file, no longer needed
..

Removed old PHP i18n file, no longer needed

Change-Id: I53eadddeca00e38d61a7adfd6083ecbbbfdfca0b
---
D LinkFilter.i18n.php
M LinkFilter.php
2 files changed, 3 insertions(+), 39 deletions(-)


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

diff --git a/LinkFilter.i18n.php b/LinkFilter.i18n.php
deleted file mode 100644
index 117c832..000
--- a/LinkFilter.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim500b5863a2ea1433' ) ) {
-   function wfJsonI18nShim500b5863a2ea1433( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim500b5863a2ea1433';
-}
diff --git a/LinkFilter.php b/LinkFilter.php
index ed65495..37f365f 100644
--- a/LinkFilter.php
+++ b/LinkFilter.php
@@ -24,7 +24,7 @@
 $wgExtensionCredits['other'][] = array(
'path' = __FILE__,
'name' = 'LinkFilter',
-   'version' = '3.1.0',
+   'version' = '3.1.1',
'author' = array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
'descriptionmsg' = 'linkfilter-desc',
'url' = 'https://www.mediawiki.org/wiki/Extension:LinkFilter'
@@ -38,7 +38,7 @@
'linkfilter-admin-accept-success', 
'linkfilter-admin-reject-success',
'linkfilter-submit-no-title', 'linkfilter-submit-no-type'
),
-   'localBasePath' = dirname( __FILE__ ),
+   'localBasePath' = __DIR__,
'remoteExtPath' = 'LinkFilter',
'position' = 'top' // available since r85616
 );
@@ -67,11 +67,10 @@
11 = 'Stupid',
 );
 
-$dir = dirname( __FILE__ );
+$dir = __DIR__;
 
 // Internationalization files
 $wgMessagesDirs['LinkFilter'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['LinkFilter'] = {$dir}/LinkFilter.i18n.php;
 $wgExtensionMessagesFiles['LinkFilterAlias'] = {$dir}/Link.alias.php;
 // Namespace translations
 $wgExtensionMessagesFiles['LinkNamespaces'] = {$dir}/Link.namespaces.php;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53eadddeca00e38d61a7adfd6083ecbbbfdfca0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] Removed old PHP i18n file, no longer needed - change (mediawiki...LinkFilter)

2014-09-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Removed old PHP i18n file, no longer needed
..


Removed old PHP i18n file, no longer needed

Change-Id: I53eadddeca00e38d61a7adfd6083ecbbbfdfca0b
---
D LinkFilter.i18n.php
M LinkFilter.php
2 files changed, 3 insertions(+), 39 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/LinkFilter.i18n.php b/LinkFilter.i18n.php
deleted file mode 100644
index 117c832..000
--- a/LinkFilter.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim500b5863a2ea1433' ) ) {
-   function wfJsonI18nShim500b5863a2ea1433( $cache, $code, $cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . /i18n/$csCode.json;
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim500b5863a2ea1433';
-}
diff --git a/LinkFilter.php b/LinkFilter.php
index ed65495..37f365f 100644
--- a/LinkFilter.php
+++ b/LinkFilter.php
@@ -24,7 +24,7 @@
 $wgExtensionCredits['other'][] = array(
'path' = __FILE__,
'name' = 'LinkFilter',
-   'version' = '3.1.0',
+   'version' = '3.1.1',
'author' = array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
'descriptionmsg' = 'linkfilter-desc',
'url' = 'https://www.mediawiki.org/wiki/Extension:LinkFilter'
@@ -38,7 +38,7 @@
'linkfilter-admin-accept-success', 
'linkfilter-admin-reject-success',
'linkfilter-submit-no-title', 'linkfilter-submit-no-type'
),
-   'localBasePath' = dirname( __FILE__ ),
+   'localBasePath' = __DIR__,
'remoteExtPath' = 'LinkFilter',
'position' = 'top' // available since r85616
 );
@@ -67,11 +67,10 @@
11 = 'Stupid',
 );
 
-$dir = dirname( __FILE__ );
+$dir = __DIR__;
 
 // Internationalization files
 $wgMessagesDirs['LinkFilter'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['LinkFilter'] = {$dir}/LinkFilter.i18n.php;
 $wgExtensionMessagesFiles['LinkFilterAlias'] = {$dir}/Link.alias.php;
 // Namespace translations
 $wgExtensionMessagesFiles['LinkNamespaces'] = {$dir}/Link.namespaces.php;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53eadddeca00e38d61a7adfd6083ecbbbfdfca0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
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 newitem.py to instantiate a new item - change (pywikibot/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix newitem.py to instantiate a new item
..


Fix newitem.py to instantiate a new item

Ibea8f84242a6e938882059f5d5fa28394b8a7a23 changed the ItemPage.fromPage
semantics to raise NoPage if the page does not exist, or is not linked.

Catch this exception, and instantiate a new item to call editEntity with.
Also add test case to create a new item on testwikidata.

Bug: 71095
Change-Id: I612f56d844684d85890af1c7d33051c292552253
---
M scripts/newitem.py
M tests/wikibase_edit_tests.py
2 files changed, 43 insertions(+), 5 deletions(-)

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



diff --git a/scripts/newitem.py b/scripts/newitem.py
index 99e83dd..7210d2a 100644
--- a/scripts/newitem.py
+++ b/scripts/newitem.py
@@ -65,13 +65,18 @@
 pywikibot.output(u'%s does not exist anymore. Skipping...'
  % page)
 continue
-item = pywikibot.ItemPage.fromPage(page)
-if item.exists():
+try:
+item = pywikibot.ItemPage.fromPage(page)
+except pywikibot.NoPage:
+pass
+else:
 pywikibot.output(u'%s already has an item: %s.' % (page, item))
 if self.getOption('touch'):
 pywikibot.output(u'Doing a null edit on the page.')
 page.put(page.text)
-elif page.isRedirectPage():
+continue
+
+if page.isRedirectPage():
 pywikibot.output(u'%s is a redirect page. Skipping.' % page)
 elif page.editTime()  self.lastEditBefore:
 pywikibot.output(
@@ -96,8 +101,8 @@
% page.title(asLink=True, insite=self.repo))
 
 data = {'sitelinks':
-{item.getdbName(page.site):
- {'site': item.getdbName(page.site),
+{page.site.dbName():
+ {'site': page.site.dbName(),
   'title': page.title()}
  },
 'labels':
@@ -107,6 +112,9 @@
  }
 }
 pywikibot.output(summary)
+
+# Create empty item object and add 'data'
+item = pywikibot.ItemPage(page.site.data_repository())
 item.editEntity(data, summary=summary)
 # And do a null edit to force update
 page.put(page.text)
diff --git a/tests/wikibase_edit_tests.py b/tests/wikibase_edit_tests.py
index b4e7247..a060fd5 100644
--- a/tests/wikibase_edit_tests.py
+++ b/tests/wikibase_edit_tests.py
@@ -97,6 +97,36 @@
 item = pywikibot.ItemPage(testsite)
 item.editEntity(data)
 
+def test_edit_entity_new_linked_item(self):
+ts = str(time.time())
+
+# Create a new page, which is unlinked
+site = self.get_site()
+title = 'Wikidata:Test ' + ts
+page = pywikibot.Page(site, title)
+page.text = ts
+page.save()
+
+data = {
+'labels': {
+'en': {
+'language': 'en',
+'value': 'Pywikibot test new linked item',
+}
+},
+'sitelinks': {
+page.site.dbName(): {
+'site': page.site.dbName(),
+'title': page.title()
+}
+},
+}
+
+repo = self.get_repo()
+item = pywikibot.ItemPage(repo)
+self.assertEqual(item._defined_by(), dict())
+item.editEntity(data)
+
 
 if __name__ == '__main__':
 try:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I612f56d844684d85890af1c7d33051c292552253
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: XZise commodorefabia...@gmx.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] Fix duplicate messages key in 'mediawiki.special.preferences... - change (mediawiki/core)

2014-09-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Fix duplicate messages key in 'mediawiki.special.preferences' 
definition
..

Fix duplicate messages key in 'mediawiki.special.preferences' definition

Follows up: Idb00f50a

Change-Id: I852e5965de8e0bee7e976637df95daded691e11c
---
M resources/Resources.php
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/161880/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 70905fb..f72049d 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1297,13 +1297,11 @@
'position' = 'top',
'messages' = array(
'prefs-tabs-navigation-hint',
+   'prefswarning-warning',
+   'saveprefs',
),
'dependencies' = array(
'mediawiki.language',
-   ),
-   'messages' = array(
-   'prefswarning-warning',
-   'saveprefs',
),
),
'mediawiki.special.recentchanges' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I852e5965de8e0bee7e976637df95daded691e11c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add @covers tags to SpecialPageFactoryTest - change (mediawiki/core)

2014-09-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Add @covers tags to SpecialPageFactoryTest
..

Add @covers tags to SpecialPageFactoryTest

Change-Id: I997cd4296a60eb9950f7fee0caed7a2349e07bd2
---
M tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php
1 file changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/161881/1

diff --git a/tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php 
b/tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php
index b1d4257..d56ecad 100644
--- a/tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php
+++ b/tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php
@@ -37,6 +37,7 @@
}
 
/**
+* @covers SpecialPageFactory::getPage
 * @dataProvider specialPageProvider
 */
public function testGetPage( $spec, $shouldReuseInstance ) {
@@ -53,6 +54,9 @@
SpecialPageFactory::resetList();
}
 
+   /**
+* @covers SpecialPageFactory::getNames
+*/
public function testGetNames() {
$this-mergeMwGlobalArrayValue( 'wgSpecialPages', array( 
'testdummy' = 'SpecialAllPages' ) );
 
@@ -63,6 +67,9 @@
SpecialPageFactory::resetList();
}
 
+   /**
+* @covers SpecialPageFactory::resolveAlias
+*/
public function testResolveAlias() {
$this-setMwGlobals( 'wgContLang', Language::factory( 'de' ) );
 
@@ -75,6 +82,9 @@
SpecialPageFactory::resetList();
}
 
+   /**
+* @covers SpecialPageFactory::getLocalNameFor
+*/
public function testGetLocalNameFor() {
$this-setMwGlobals( 'wgContLang', Language::factory( 'de' ) );
 
@@ -86,6 +96,9 @@
SpecialPageFactory::resetList();
}
 
+   /**
+* @covers SpecialPageFactory::getTitleForAlias
+*/
public function testGetTitleForAlias() {
$this-setMwGlobals( 'wgContLang', Language::factory( 'de' ) );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I997cd4296a60eb9950f7fee0caed7a2349e07bd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Improve coverage of MailAddress::toString() - change (mediawiki/core)

2014-09-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Improve coverage of MailAddress::toString()
..

Improve coverage of MailAddress::toString()

Change-Id: I8d5a1e8f293afa03d94167b722d3078f467cf59e
---
M tests/phpunit/includes/mail/MailAddressTest.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/161882/1

diff --git a/tests/phpunit/includes/mail/MailAddressTest.php 
b/tests/phpunit/includes/mail/MailAddressTest.php
index 2d07812..76566eb 100644
--- a/tests/phpunit/includes/mail/MailAddressTest.php
+++ b/tests/phpunit/includes/mail/MailAddressTest.php
@@ -49,6 +49,7 @@
array( false, 'f...@bar.baz', 'AUserName', 'Some real 
name', 'AUserName f...@bar.baz' ),
array( false, 'f...@bar.baz', '', '', 'f...@bar.baz' ),
array( true, 'f...@bar.baz', '', '', 'f...@bar.baz' ),
+   array( true, '', '', '', '' ),
);
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d5a1e8f293afa03d94167b722d3078f467cf59e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Use MailAddress::newFromUser() - change (mediawiki...ContactPage)

2014-09-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Use MailAddress::newFromUser()
..

Use MailAddress::newFromUser()

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


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

diff --git a/ContactPage_body.php b/ContactPage_body.php
index 5605723..54bbbe5 100644
--- a/ContactPage_body.php
+++ b/ContactPage_body.php
@@ -235,7 +235,7 @@
$senderIP = $request-getIP();
 
$contactUser = User::newFromName( $config['RecipientUser'] );
-   $targetAddress = new MailAddress( $contactUser );
+   $targetAddress = MailAddress::newFromUser( $contactUser );
$replyto = null;
$contactSender = new MailAddress( $csender, $cname );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d650e25087f83c8ea3d141c9d1d8e24731c2f00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContactPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Use MailAddress::newFromUser() - change (mediawiki...Echo)

2014-09-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Use MailAddress::newFromUser()
..

Use MailAddress::newFromUser()

Change-Id: I7c6ce9aade27dae66732274979d8baa9eeb0b17c
---
M Notifier.php
M includes/EmailBatch.php
M includes/EmailBundler.php
3 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/Notifier.php b/Notifier.php
index 702d923..53c6e74 100644
--- a/Notifier.php
+++ b/Notifier.php
@@ -86,7 +86,7 @@
// send single notification if the email wasn't added 
to queue for bundling
if ( !$addedToQueue ) {
// instant email notification
-   $toAddress = new MailAddress( $user );
+   $toAddress = MailAddress::newFromUser( $user );
$fromAddress = new MailAddress( 
$wgNotificationSender, EchoHooks::getNotificationSenderName() );
$replyAddress = new MailAddress( 
$wgNotificationSender, $wgNotificationReplyName );
// Since we are sending a single email, should 
set the bundle hash to null
diff --git a/includes/EmailBatch.php b/includes/EmailBatch.php
index 6b5bbb1..854e0d3 100644
--- a/includes/EmailBatch.php
+++ b/includes/EmailBatch.php
@@ -217,7 +217,7 @@
-inLanguage( $this-mUser-getOption( 
'language' ) )
-params( $count, $this-count )-text();
 
-   $toAddress = new MailAddress( $this-mUser );
+   $toAddress = MailAddress::newFromUser( $this-mUser );
$fromAddress = new MailAddress( $wgNotificationSender, 
EchoHooks::getNotificationSenderName() );
$replyAddress = new MailAddress( $wgNotificationSender, 
$wgNotificationReplyName );
 
diff --git a/includes/EmailBundler.php b/includes/EmailBundler.php
index da9f034..ba01ad1 100644
--- a/includes/EmailBundler.php
+++ b/includes/EmailBundler.php
@@ -243,7 +243,7 @@
 
global $wgNotificationSender, $wgNotificationReplyName;
 
-   $toAddress = new MailAddress( $this-mUser );
+   $toAddress = MailAddress::newFromUser( $this-mUser );
$fromAddress = new MailAddress( $wgNotificationSender, 
EchoHooks::getNotificationSenderName() );
$replyAddress = new MailAddress( $wgNotificationSender, 
$wgNotificationReplyName );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c6ce9aade27dae66732274979d8baa9eeb0b17c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] update-oojs-ui.sh: Exclude the minimised distribution files - change (VisualEditor/VisualEditor)

2014-09-21 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: update-oojs-ui.sh: Exclude the minimised distribution files
..

update-oojs-ui.sh: Exclude the minimised distribution files

Introduced by Ic8f8194. Also removing unneeded exclusion of non-existant
unthemed CSS file after Ieb27c3fd.

Change-Id: I42a7c32f6aeede42b0d3ab65ed53f3f8fdd252f5
---
M bin/update-oojs-ui.sh
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/85/161885/1

diff --git a/bin/update-oojs-ui.sh b/bin/update-oojs-ui.sh
index 690e06e..0eceb50 100755
--- a/bin/update-oojs-ui.sh
+++ b/bin/update-oojs-ui.sh
@@ -71,8 +71,8 @@
 NEWCHANGESDISPLAY=$(git log $OLDHASH.. --oneline --no-merges --reverse 
--color=always)
 
 # Copy files
-# - Exclude the default non-svg stylesheet and non-SVG files
-rsync --recursive --delete --force --exclude 'oojs-ui.css' --exclude 
'images/*/*.png' ./dist/ $TARGET_REPO/$TARGET_DIR || exit 1
+# - Exclude the minimised distribution files and raster images
+rsync --recursive --delete --force --exclude 'oojs-ui*.min.*' --exclude 
'images/*/*.png' ./dist/ $TARGET_REPO/$TARGET_DIR || exit 1
 
 # Read the new version
 NEWVERSION=$(oojsuiversion)

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

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

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


[MediaWiki-commits] [Gerrit] Restructure and move InvalidPasswordTest - change (mediawiki/core)

2014-09-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Restructure and move InvalidPasswordTest
..

Restructure and move InvalidPasswordTest

Change-Id: If59879a53a3123859a2652075fcd89aa459c2d18
---
R tests/phpunit/includes/password/InvalidPasswordTest.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/86/161886/1

diff --git a/tests/phpunit/includes/PasswordTest.php 
b/tests/phpunit/includes/password/InvalidPasswordTest.php
similarity index 90%
rename from tests/phpunit/includes/PasswordTest.php
rename to tests/phpunit/includes/password/InvalidPasswordTest.php
index ceb794b..5d9afea 100644
--- a/tests/phpunit/includes/PasswordTest.php
+++ b/tests/phpunit/includes/password/InvalidPasswordTest.php
@@ -1,7 +1,5 @@
 ?php
 /**
- * Testing framework for the Password infrastructure
- *
  * 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
@@ -20,7 +18,7 @@
  * @file
  */
 
-class PasswordTest extends MediaWikiTestCase {
+class InvalidPasswordTest extends MediaWikiTestCase {
/**
 * @covers InvalidPassword::equals
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If59879a53a3123859a2652075fcd89aa459c2d18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Cache non-category targets - change (mediawiki...MassMessage)

2014-09-21 Thread Wctaiwan (Code Review)
Wctaiwan has uploaded a new change for review.

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

Change subject: Cache non-category targets
..

Cache non-category targets

Category targets are not cached because the cache key scheme doesn't
work for them and parser function targets are the expensive ones.

Change-Id: Id74e240e898e2fa5c027ebd438b149a67db6a19b
---
M includes/MassMessageTargets.php
1 file changed, 21 insertions(+), 1 deletion(-)


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

diff --git a/includes/MassMessageTargets.php b/includes/MassMessageTargets.php
index cc46bcc..42b341f 100644
--- a/includes/MassMessageTargets.php
+++ b/includes/MassMessageTargets.php
@@ -14,13 +14,29 @@
 * wiki: The ID of the wiki (wfWikiID() for the local wiki)
 * site: The hostname and port (if exists) of the wiki
 *
+* Normalized targets are briefly cached because it can be expensive to 
parse PF targets on both
+* preview and save in SpecialMassMessage.
+*
 * @param Title $spamlist
 * @param $normalize Whether to normalize and deduplicate the targets
 * @return array|null
 */
 public static function getTargets( Title $spamlist, $normalize = true 
) {
+   global $wgMemc;
+
if ( !$spamlist-exists()  !$spamlist-inNamespace( 
NS_CATEGORY ) ) {
return null;
+   }
+
+   // Try to lookup cached targets
+   $cacheKey = null;
+   if ( !$spamlist-inNamespace( NS_CATEGORY ) ) {
+   $cacheKey = wfMemcKey( 'massmessage', 'targets', 
$spamlist-getLatestRevId(),
+   $spamlist-getTouched() );
+   $cacheTargets = $wgMemc-get( $cacheKey );
+   if ( $cacheTargets !== false ) {
+   return $cacheTargets;
+   }
}
 
if ( $spamlist-inNamespace( NS_CATEGORY ) ) {
@@ -38,7 +54,11 @@
}
 
if ( $normalize ) {
-   return self::normalizeTargets( $targets );
+   $normalized = self::normalizeTargets( $targets );
+   if ( $cacheKey ) { // $spamlist is not a category
+   $wgMemc-set( $cacheKey, $normalized, 60 * 20 );
+   }
+   return $normalized;
} else {
return $targets;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id74e240e898e2fa5c027ebd438b149a67db6a19b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Wctaiwan wctai...@gmail.com

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


[MediaWiki-commits] [Gerrit] Call normalizeTargets in MassMessageTargets::getTargets - change (mediawiki...MassMessage)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Call normalizeTargets in MassMessageTargets::getTargets
..


Call normalizeTargets in MassMessageTargets::getTargets

Change-Id: Ie2c3813c916df51a06140b3d5fd532047debe210
---
M includes/MassMessage.php
M includes/MassMessageTargets.php
M includes/SpecialCreateMassMessageList.php
M includes/SpecialMassMessage.php
M tests/MassMessageTargetsTest.php
5 files changed, 22 insertions(+), 17 deletions(-)

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



diff --git a/includes/MassMessage.php b/includes/MassMessage.php
index 215bdda..a5f915c 100644
--- a/includes/MassMessage.php
+++ b/includes/MassMessage.php
@@ -316,9 +316,7 @@
$spamlist = self::getSpamlist( $data['spamlist'] );
 
// Get the array of pages to deliver to.
-   $pages = MassMessageTargets::normalizeTargets(
-   MassMessageTargets::getTargets( $spamlist )
-   );
+   $pages = MassMessageTargets::getTargets( $spamlist );
 
// Log it.
self::logToWiki( $spamlist, $user, $data['subject'] );
diff --git a/includes/MassMessageTargets.php b/includes/MassMessageTargets.php
index 714a4ff..cc46bcc 100644
--- a/includes/MassMessageTargets.php
+++ b/includes/MassMessageTargets.php
@@ -15,30 +15,41 @@
 * site: The hostname and port (if exists) of the wiki
 *
 * @param Title $spamlist
+* @param $normalize Whether to normalize and deduplicate the targets
 * @return array|null
 */
-public static function getTargets( Title $spamlist ) {
+public static function getTargets( Title $spamlist, $normalize = true 
) {
if ( !$spamlist-exists()  !$spamlist-inNamespace( 
NS_CATEGORY ) ) {
return null;
}
 
if ( $spamlist-inNamespace( NS_CATEGORY ) ) {
-   return self::getCategoryTargets( $spamlist );
+   $targets = self::getCategoryTargets( $spamlist );
} elseif ( $spamlist-hasContentModel( 'MassMessageListContent' 
) ) {
-   return self::getMassMessageListContentTargets( 
$spamlist );
+   $targets = self::getMassMessageListContentTargets( 
$spamlist );
} elseif ( $spamlist-hasContentModel( CONTENT_MODEL_WIKITEXT ) 
) {
-   return self::getParserFunctionTargets( $spamlist );
+   $targets = self::getParserFunctionTargets( $spamlist );
} else {
-   return null;
+   $targets = null;
+   }
+
+   if ( !$targets ) {
+   return $targets; // null or empty array
+   }
+
+   if ( $normalize ) {
+   return self::normalizeTargets( $targets );
+   } else {
+   return $targets;
}
}
 
/**
 * Get array of normalized targets with duplicates removed
-* @param  array $data
+* @param array $data
 * @return array
 */
-   public static function normalizeTargets( array $data ) {
+   protected static function normalizeTargets( array $data ) {
global $wgNamespacesToConvert;
 
foreach ( $data as $target ) {
diff --git a/includes/SpecialCreateMassMessageList.php 
b/includes/SpecialCreateMassMessageList.php
index cfa1afe..60386e8 100644
--- a/includes/SpecialCreateMassMessageList.php
+++ b/includes/SpecialCreateMassMessageList.php
@@ -113,7 +113,7 @@
 * @return array|null
 */
protected function getTargets( Title $source ) {
-   $pages = MassMessageTargets::getTargets( $source );
+   $pages = MassMessageTargets::getTargets( $source, /* $normalize 
= */ false );
if ( $pages === null ) {
return null;
}
diff --git a/includes/SpecialMassMessage.php b/includes/SpecialMassMessage.php
index e53f328..08d084e 100644
--- a/includes/SpecialMassMessage.php
+++ b/includes/SpecialMassMessage.php
@@ -264,9 +264,7 @@
 
// Output the number of recipients
$spamlist = MassMessage::getSpamlist( $data['spamlist'] );
-   $targets = MassMessageTargets::normalizeTargets(
-   MassMessageTargets::getTargets( $spamlist )
-   );
+   $targets = MassMessageTargets::getTargets( $spamlist );
$infoFieldset = Xml::fieldset(
$this-msg( 'massmessage-fieldset-info' )-text(),
$this-msg( 'massmessage-preview-count' )-numParams( 
count( $targets ) )-parse()
diff --git a/tests/MassMessageTargetsTest.php b/tests/MassMessageTargetsTest.php
index 

[MediaWiki-commits] [Gerrit] Selections: Add selection utility functions to ext.cx.utils.js - change (mediawiki...ContentTranslation)

2014-09-21 Thread Jsahleen (Code Review)
Jsahleen has uploaded a new change for review.

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

Change subject: Selections: Add selection utility functions to ext.cx.utils.js
..

Selections: Add selection utility functions to ext.cx.utils.js

Functions added:

* mw.cx.getSelection [cross-browser function to get selection]

* mw.cx.getSelectionRange [cross-browser function get selection range]

* mw.cx.setSelectionRange [cross-browser function to set selection range]

Functions were added to utils so they can be used anywhere in cx.

Change-Id: I49ba432c24cc96172ce63b5bf68335cc6bdead12
---
M modules/base/ext.cx.util.js
1 file changed, 81 insertions(+), 0 deletions(-)


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

diff --git a/modules/base/ext.cx.util.js b/modules/base/ext.cx.util.js
index 87dc840..8743f21 100644
--- a/modules/base/ext.cx.util.js
+++ b/modules/base/ext.cx.util.js
@@ -102,4 +102,85 @@
 
return sectionTypes.join( ',' );
};
+
+   /**
+* A cross-browser function that returns a selection object
+* @return {object}
+*/
+   mw.cx.getSelection = function () {
+   // Standards
+   if ( window.getSelection ) {
+   return window.getSelection();
+   // IE  9
+   } else if ( document.selection ) {
+   return document.selection;
+   }
+
+   return null;
+   };
+
+   /**
+* A cross-browser function that returns
+* the range of the current selection.
+* @return {range}
+*/
+   mw.cx.getSelectionRange = function () {
+   var selection = mw.cx.getSelection();
+
+   // Standards
+   if ( selection  selection.getRangeAt ) {
+   if ( selection.rangeCount  0 ) {
+   return selection.getRangeAt( 0 );
+   }
+   // IE  9
+   } else if ( selection  selection.createRange ) {
+   return selection.createRange();
+   }
+
+   return null;
+   };
+
+   /**
+* A cross-browser function that sets
+* the selection range.
+* @param {range} range, the range to use
+*/
+   mw.cx.setSelectionRange = function ( range ) {
+   var selection = mw.cx.getSelection();
+
+   if ( selection ) {
+   selection.removeAllRanges();
+   selection.addRange( range );
+   }
+   };
+
+   /**
+* A cross-browser function that pastes html
+* at the selection.
+* @param {string} html, the html to paste
+*/
+   mw.cx.pasteHtmlAtSelection = function ( html ) {
+   var selection, el, frag, node, lastNode;
+   selection = mw.cx.getSelection();
+
+   if ( selection  window.getSelection ) {
+   selection.deleteContents();
+   el = document.createElement( 'div' );
+   el.innerHTML = html;
+   frag = document.createDocumentFragment();
+   while ( ( node = el.firstChild ) ) {
+   lastNode = frag.appendChild( node );
+   }
+   selection.insertNode( frag );
+
+   if ( lastNode ) {
+   selection.setStartAfter( lastNode );
+   selection.collapse( true );
+   }
+
+   } else if ( selection  selection.type !== 'Control' ) {
+   // IE  9
+   selection.createRange().pasteHTML( html );
+   }
+   };
 }( mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49ba432c24cc96172ce63b5bf68335cc6bdead12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Jsahleen jsahl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Cache non-category targets - change (mediawiki...MassMessage)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Cache non-category targets
..


Cache non-category targets

Category targets are not cached because the cache key scheme doesn't
work for them and parser function targets are the expensive ones.

Change-Id: Id74e240e898e2fa5c027ebd438b149a67db6a19b
---
M includes/MassMessageTargets.php
1 file changed, 21 insertions(+), 1 deletion(-)

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



diff --git a/includes/MassMessageTargets.php b/includes/MassMessageTargets.php
index cc46bcc..42b341f 100644
--- a/includes/MassMessageTargets.php
+++ b/includes/MassMessageTargets.php
@@ -14,13 +14,29 @@
 * wiki: The ID of the wiki (wfWikiID() for the local wiki)
 * site: The hostname and port (if exists) of the wiki
 *
+* Normalized targets are briefly cached because it can be expensive to 
parse PF targets on both
+* preview and save in SpecialMassMessage.
+*
 * @param Title $spamlist
 * @param $normalize Whether to normalize and deduplicate the targets
 * @return array|null
 */
 public static function getTargets( Title $spamlist, $normalize = true 
) {
+   global $wgMemc;
+
if ( !$spamlist-exists()  !$spamlist-inNamespace( 
NS_CATEGORY ) ) {
return null;
+   }
+
+   // Try to lookup cached targets
+   $cacheKey = null;
+   if ( !$spamlist-inNamespace( NS_CATEGORY ) ) {
+   $cacheKey = wfMemcKey( 'massmessage', 'targets', 
$spamlist-getLatestRevId(),
+   $spamlist-getTouched() );
+   $cacheTargets = $wgMemc-get( $cacheKey );
+   if ( $cacheTargets !== false ) {
+   return $cacheTargets;
+   }
}
 
if ( $spamlist-inNamespace( NS_CATEGORY ) ) {
@@ -38,7 +54,11 @@
}
 
if ( $normalize ) {
-   return self::normalizeTargets( $targets );
+   $normalized = self::normalizeTargets( $targets );
+   if ( $cacheKey ) { // $spamlist is not a category
+   $wgMemc-set( $cacheKey, $normalized, 60 * 20 );
+   }
+   return $normalized;
} else {
return $targets;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id74e240e898e2fa5c027ebd438b149a67db6a19b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Wctaiwan wctai...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Selections: Modify translation editor so it maintains its ow... - change (mediawiki...ContentTranslation)

2014-09-21 Thread Jsahleen (Code Review)
Jsahleen has uploaded a new change for review.

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

Change subject: Selections: Modify translation editor so it maintains its own 
selection
..

Selections: Modify translation editor so it maintains its own selection

Adds class variable to store selection range

Adds on keyup/mouseup event handlers to capture translation selection range

Adds on focus event handler to restore captured selection range

Sets cursor to beginning of selection postMT

Change-Id: I262d66abc7d5f7bc9daeac89e7a34f27b0a0e3d3
---
M modules/translation/ext.cx.translation.js
1 file changed, 29 insertions(+), 1 deletion(-)


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

diff --git a/modules/translation/ext.cx.translation.js 
b/modules/translation/ext.cx.translation.js
index 907af50..646470a 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -21,6 +21,7 @@
this.options = $.extend( true, {}, $.fn.cxTranslation.defaults, 
options );
this.$title = null;
this.$content = null;
+   this.$selectionRange = null;
this.init();
}
 
@@ -124,6 +125,28 @@
segmentId = $segment.data( 'segmentid' );
$( '[data-segmentid=' + segmentId + ']' 
).toggleClass( 'cx-highlight' );
} );
+
+   this.$container.on( 'keyup mouseup', function () {
+   var $container, selection, anchorNode, focusNode;
+
+   $container = $( this );
+   selection = mw.cx.getSelection();
+   if ( selection ) {
+   anchorNode = selection.anchorNode;
+   focusNode = selection.focusNode;
+
+   if ( $.contains( $container[ 0 ], anchorNode ) 
||
+   $.contains( $container[ 0 ], focusNode 
) ) {
+   cxTranslation.selectionRange = 
mw.cx.getSelectionRange();
+   }
+   }
+   } );
+
+   this.$container.on( 'focus', function () {
+   if ( cxTranslation.selectionRange ) {
+   mw.cx.setSelectionRange( 
cxTranslation.selectionRange );
+   }
+   } );
};
 
/**
@@ -131,7 +154,7 @@
 * @param {jQuery} $section
 */
ContentTranslationEditor.prototype.postProcessMT = function ( $section 
) {
-   var $sourceSection = $( '#' + $section.data( 'source' ) );
+   var range, $sourceSection = $( '#' + $section.data( 'source' ) 
);
 
mw.hook( 'mw.cx.translation.change' ).fire( $section );
mw.hook( 'mw.cx.translation.focus' ).fire( $section );
@@ -150,6 +173,11 @@
$section.cxEditor();
}
 
+   range = document.createRange();
+   range.setStart( $section[ 0 ].firstChild, 0 );
+   range.collapse( true );
+   mw.cx.setSelectionRange( range );
+
// Search for text that was selected using the mouse.
// Delay it to run every 250 ms so it won't fire all the time 
while typing.
$section.on( 'click keyup', $.debounce( 250, function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I262d66abc7d5f7bc9daeac89e7a34f27b0a0e3d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Jsahleen jsahl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use __DIR__ directly - change (mediawiki...MassMessage)

2014-09-21 Thread Wctaiwan (Code Review)
Wctaiwan has uploaded a new change for review.

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

Change subject: Use __DIR__ directly
..

Use __DIR__ directly

Change-Id: Id743071c52563954d13e7591f0cd54991c3cd774
---
M MassMessage.php
1 file changed, 31 insertions(+), 32 deletions(-)


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

diff --git a/MassMessage.php b/MassMessage.php
index 77ac57b..6728190 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -57,33 +57,32 @@
'descriptionmsg' = 'massmessage-desc',
'version' = '0.2.0',
 );
-$dir = __DIR__;
 
 // Messages
-$wgMessagesDirs['MassMessage'] = $dir/i18n;
-$wgExtensionMessagesFiles['MassMessageAlias'] = $dir/MassMessage.alias.php;
-$wgExtensionMessagesFiles['MassMessageMagic'] = 
$dir/MassMessage.i18n.magic.php;
+$wgMessagesDirs['MassMessage'] = __DIR__ . '/i18n';
+$wgExtensionMessagesFiles['MassMessageAlias'] = __DIR__ . 
'/MassMessage.alias.php';
+$wgExtensionMessagesFiles['MassMessageMagic'] = __DIR__ . 
'/MassMessage.i18n.magic.php';
 
 // Classes
-$wgAutoloadClasses['MassMessageHooks'] = $dir/MassMessage.hooks.php;
-$wgAutoloadClasses['ApiMassMessage'] = $dir/includes/ApiMassMessage.php;
-$wgAutoloadClasses['ApiEditMassMessageList'] = 
$dir/includes/ApiEditMassMessageList.php;
-$wgAutoloadClasses['ApiQueryMMSites'] = $dir/includes/ApiQueryMMSites.php;
-$wgAutoloadClasses['MassMessage'] = $dir/includes/MassMessage.php;
-$wgAutoloadClasses['MassMessageTargets'] = 
$dir/includes/MassMessageTargets.php;
-$wgAutoloadClasses['SpecialMassMessage'] = 
$dir/includes/SpecialMassMessage.php;
-$wgAutoloadClasses['SpecialCreateMassMessageList'] = 
$dir/includes/SpecialCreateMassMessageList.php;
-$wgAutoloadClasses['SpecialEditMassMessageList'] = 
$dir/includes/SpecialEditMassMessageList.php;
-$wgAutoloadClasses['MassMessageJob'] = $dir/includes/job/MassMessageJob.php;
-$wgAutoloadClasses['MassMessageSubmitJob'] = 
$dir/includes/job/MassMessageSubmitJob.php;
-$wgAutoloadClasses['MassMessageFailureLogFormatter'] = 
$dir/includes/logging/MassMessageFailureLogFormatter.php;
-$wgAutoloadClasses['MassMessageSendLogFormatter'] = 
$dir/includes/logging/MassMessageSendLogFormatter.php;
-$wgAutoloadClasses['MassMessageSkipLogFormatter'] = 
$dir/includes/logging/MassMessageSkipLogFormatter.php;
-$wgAutoloadClasses['MassMessageListContent'] = 
$dir/includes/content/MassMessageListContent.php;
-$wgAutoloadClasses['MassMessageListContentHandler'] = 
$dir/includes/content/MassMessageListContentHandler.php;
-$wgAutoloadClasses['MassMessageListDiffEngine'] = 
$dir/includes/content/MassMessageListDiffEngine.php;
-$wgAutoloadClasses['MassMessageTestCase'] = 
$dir/tests/MassMessageTestCase.php;
-$wgAutoloadClasses['MassMessageApiTestCase'] = 
$dir/tests/MassMessageApiTestCase.php;
+$wgAutoloadClasses['MassMessageHooks'] = __DIR__ . '/MassMessage.hooks.php';
+$wgAutoloadClasses['ApiMassMessage'] = __DIR__ . 
'/includes/ApiMassMessage.php';
+$wgAutoloadClasses['ApiEditMassMessageList'] = __DIR__ . 
'/includes/ApiEditMassMessageList.php';
+$wgAutoloadClasses['ApiQueryMMSites'] = __DIR__ . 
'/includes/ApiQueryMMSites.php';
+$wgAutoloadClasses['MassMessage'] = __DIR__ . '/includes/MassMessage.php';
+$wgAutoloadClasses['MassMessageTargets'] = __DIR__ . 
'/includes/MassMessageTargets.php';
+$wgAutoloadClasses['SpecialMassMessage'] = __DIR__ . 
'/includes/SpecialMassMessage.php';
+$wgAutoloadClasses['SpecialCreateMassMessageList'] = __DIR__ . 
'/includes/SpecialCreateMassMessageList.php';
+$wgAutoloadClasses['SpecialEditMassMessageList'] = __DIR__ . 
'/includes/SpecialEditMassMessageList.php';
+$wgAutoloadClasses['MassMessageJob'] = __DIR__ . 
'/includes/job/MassMessageJob.php';
+$wgAutoloadClasses['MassMessageSubmitJob'] = __DIR__ . 
'/includes/job/MassMessageSubmitJob.php';
+$wgAutoloadClasses['MassMessageFailureLogFormatter'] = __DIR__ . 
'/includes/logging/MassMessageFailureLogFormatter.php';
+$wgAutoloadClasses['MassMessageSendLogFormatter'] = __DIR__ . 
'/includes/logging/MassMessageSendLogFormatter.php';
+$wgAutoloadClasses['MassMessageSkipLogFormatter'] = __DIR__ . 
'/includes/logging/MassMessageSkipLogFormatter.php';
+$wgAutoloadClasses['MassMessageListContent'] = __DIR__ . 
'/includes/content/MassMessageListContent.php';
+$wgAutoloadClasses['MassMessageListContentHandler'] = __DIR__ . 
'/includes/content/MassMessageListContentHandler.php';
+$wgAutoloadClasses['MassMessageListDiffEngine'] = __DIR__ . 
'/includes/content/MassMessageListDiffEngine.php';
+$wgAutoloadClasses['MassMessageTestCase'] = __DIR__ . 
'/tests/MassMessageTestCase.php';
+$wgAutoloadClasses['MassMessageApiTestCase'] = __DIR__ . 
'/tests/MassMessageApiTestCase.php';
 
 // ContentHandler
 $wgContentHandlers['MassMessageListContent'] = 'MassMessageListContentHandler';
@@ -118,7 +117,7 @@
 $wgResourceModules['ext.MassMessage.autocomplete'] = array(
'scripts' = 

[MediaWiki-commits] [Gerrit] update-oojs-ui.sh: Exclude the minimised distribution files - change (mediawiki/core)

2014-09-21 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: update-oojs-ui.sh: Exclude the minimised distribution files
..

update-oojs-ui.sh: Exclude the minimised distribution files

Introduced by Ic8f8194. Also removing unneeded exclusion of non-existant
unthemed CSS file after Ieb27c3fd.

Change-Id: Ib0293695764ac32b8aac3be7c4f37b72cbd72561
---
M maintenance/resources/update-oojs-ui.sh
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/91/161891/1

diff --git a/maintenance/resources/update-oojs-ui.sh 
b/maintenance/resources/update-oojs-ui.sh
index 1b35292..651f211 100755
--- a/maintenance/resources/update-oojs-ui.sh
+++ b/maintenance/resources/update-oojs-ui.sh
@@ -71,8 +71,8 @@
 NEWCHANGESDISPLAY=$(git log $OLDHASH.. --oneline --no-merges --reverse 
--color=always)
 
 # Copy files
-# - Exclude the default non-svg stylesheet
-rsync --recursive --delete --force --exclude 'oojs-ui.css' --exclude 
'oojs-ui*.rtl.css' ./dist/ $TARGET_REPO/$TARGET_DIR || exit 1
+# - Exclude the minimised distribution files and RTL sheets for non-CSSJanus 
environments
+rsync --recursive --delete --force --exclude 'oojs-ui*.min.*' --exclude 
'oojs-ui*.rtl.css' ./dist/ $TARGET_REPO/$TARGET_DIR || exit 1
 
 # Read the new version
 NEWVERSION=$(oojsuiversion)

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

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

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


[MediaWiki-commits] [Gerrit] Revert Completely remove skin autodiscovery - change (mediawiki/core)

2014-09-21 Thread Jackmcbarn (Code Review)
Jackmcbarn has uploaded a new change for review.

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

Change subject: Revert Completely remove skin autodiscovery
..

Revert Completely remove skin autodiscovery

1.24 was un-branched.
This reverts commit 5b11fa414670cd84887a18b2c35797f2451b97d5.

Change-Id: Ie57a7c862907eae596952493c1b9b2bc5011d500
---
M RELEASE-NOTES-1.25
M docs/skin.txt
M includes/skins/SkinFactory.php
3 files changed, 137 insertions(+), 22 deletions(-)


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

diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index 3f91520..a6e0a73 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -23,9 +23,6 @@
 changes to languages because of Bugzilla reports.
 
 === Other changes in 1.25 ===
-* The skin autodiscovery mechanism, deprecated in MediaWiki 1.23, has been
-  removed. See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for
-  migration guide for creators and users of custom skins that relied on it. 
 
 == Compatibility ==
 
diff --git a/docs/skin.txt b/docs/skin.txt
index e998ebd..58f77cf 100644
--- a/docs/skin.txt
+++ b/docs/skin.txt
@@ -53,30 +53,40 @@
 These can also be customised on a per-user basis, by editing
 [[User:name/vector.css]], [[User:name/vector.js]], etc.
 
+This feature has led to a wide variety of user styles becoming available:
 
-== Custom skins ==
+https://www.mediawiki.org/wiki/Manual:Gallery_of_user_styles
 
-Several custom skins are available as of 2014.
+If you want a different look for your wiki, that gallery is a good place to 
start.
 
-https://www.mediawiki.org/wiki/Category:All_skins
+== Drop-in custom skins ==
 
-Installing a skin requires adding its files in a subdirectory under skins/ and
-adding an appropriate require_once line to LocalSettings.php, similarly to how
-extensions are installed.
+If you put a file in MediaWiki's skins directory, ending in .php, the name of 
+the file will automatically be added as a skin name, and the file will be
+expected to contain a class called Skinname with the skin class. You can then
+make that skin the default by adding to LocalSettings.php:
 
-You can then make that skin the default by adding:
-  $wgDefaultSkin = 'name';
+$wgDefaultSkin = 'name';
 
-Or disable it entirely by removing the require_once line. (User settings will
-not be lost if it's reenabled later.)
+You can also disable dropped-in or core skins using:
 
-See https://www.mediawiki.org/wiki/Manual:Skinning for more information on
-writing new skins.
+$wgSkipSkins[] = 'name';
 
+This technique is used by the more ambitious MediaWiki site operators, to 
+create complex custom skins for their wikis. It should be preferred over 
+editing the core Monobook skin directly.
 
-Until MediaWiki 1.25 it used to be possible to just put a name.php file in
-MediaWiki's skins/ directory, which would be loaded and expected to contain the
-Skinname class. This way has always been discouraged because of its 
limitations
-(inability to add localisation messages, ResourceLoader modules, etc.) and
-awkwardness in managing such skins. For information on migrating skins using
-this old method, see 
https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery.
+See https://www.mediawiki.org/wiki/Manual:Skinning for more information.
+
+== Extension skins ==
+
+It is now possible (since MediaWiki 1.12) to write a skin as a standard
+MediaWiki extension, enabled via LocalSettings.php. This is done by adding 
+it to $wgValidSkinNames, for example:
+
+$wgValidSkinNames['mycoolskin'] = 'MyCoolSkin';
+
+and then registering a class in $wgAutoloadClasses called SkinMycoolSkin, 
which 
+derives from Skin. This technique is apparently not yet used (as of 2008) 
+outside the DumpHTML extension.
+
diff --git a/includes/skins/SkinFactory.php b/includes/skins/SkinFactory.php
index ffbe629..fb40857 100644
--- a/includes/skins/SkinFactory.php
+++ b/includes/skins/SkinFactory.php
@@ -40,6 +40,13 @@
 * @var array
 */
private $displayNames = array();
+   /**
+* Map of name = class name without Skin prefix, for legacy skins 
using the autodiscovery
+* mechanism
+*
+* @var array
+*/
+   private $legacySkins = array();
 
/**
 * @var SkinFactory
@@ -76,13 +83,109 @@
}
 
/**
+* @return array
+*/
+   private function getLegacySkinNames() {
+   static $skinsInitialised = false;
+
+   if ( !$skinsInitialised || !count( $this-legacySkins ) ) {
+   # Get a list of available skins
+   # Build using the regular expression '^(.*).php$'
+   # Array keys are all lower case, array value keep the 
case used by filename
+   #
+   wfProfileIn( __METHOD__ . '-init' );
+
+   global $wgStyleDirectory;

[MediaWiki-commits] [Gerrit] new JCSingleton::getContentClass($modelId) - change (mediawiki...JsonConfig)

2014-09-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: new JCSingleton::getContentClass($modelId)
..

new JCSingleton::getContentClass($modelId)

Change-Id: I2ea5ce57059c26058dd92f3941c02ef551088159
---
M includes/JCContentHandler.php
M includes/JCSingleton.php
2 files changed, 23 insertions(+), 19 deletions(-)


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

diff --git a/includes/JCContentHandler.php b/includes/JCContentHandler.php
index b4b077e..40a5d90 100644
--- a/includes/JCContentHandler.php
+++ b/includes/JCContentHandler.php
@@ -52,27 +52,10 @@
 * @return JCContent the JsonSchemaContent object wrapping $text
 */
public function unserializeContent( $text, $format = null, $isSaving = 
true ) {
-   global $wgJsonConfigModels;
$this-checkFormat( $format );
$modelId = $this-getModelID();
-   $class = null;
-   if ( array_key_exists( $modelId, $wgJsonConfigModels ) ) {
-   $value = $wgJsonConfigModels[$modelId];
-   if ( is_array( $value ) ) {
-   if ( !array_key_exists( 'class', $value ) ) {
-   wfLogWarning( JsonConfig: Invalid 
\$wgJsonConfigModels['$modelId'] array value, 'class' not found );
-   } else {
-   $class = $value['class'];
-   }
-   } else {
-   $class = $value;
-   }
-   }
-   if ( $class ) {
-   return new $class( $text, $modelId, $isSaving );
-   } else {
-   return new JCContent( $text, $modelId, $isSaving );
-   }
+   $class = JCSingleton::getContentClass( $modelId );
+   return new $class( $text, $modelId, $isSaving );
}
 
/**
diff --git a/includes/JCSingleton.php b/includes/JCSingleton.php
index 46aa44e..de69b05 100644
--- a/includes/JCSingleton.php
+++ b/includes/JCSingleton.php
@@ -336,6 +336,27 @@
return self::$titleMap;
}
 
+   public static function getContentClass( $modelId ) {
+   global $wgJsonConfigModels;
+   $class = null;
+   if ( array_key_exists( $modelId, $wgJsonConfigModels ) ) {
+   $value = $wgJsonConfigModels[$modelId];
+   if ( is_array( $value ) ) {
+   if ( !array_key_exists( 'class', $value ) ) {
+   wfLogWarning( JsonConfig: Invalid 
\$wgJsonConfigModels['$modelId'] array value, 'class' not found );
+   } else {
+   $class = $value['class'];
+   }
+   } else {
+   $class = $value;
+   }
+   }
+   if ( !$class ) {
+   $class = __NAMESPACE__ . '\JCContent';
+   }
+   return $class;
+   }
+
/**
 * Returns an array with settings if the $titleValue object is handled 
by the JsonConfig extension,
 * false if unrecognized namespace, and null if namespace is handled 
but not this title

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ea5ce57059c26058dd92f3941c02ef551088159
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Improve coverage of MailAddress::toString() - change (mediawiki/core)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve coverage of MailAddress::toString()
..


Improve coverage of MailAddress::toString()

Change-Id: I8d5a1e8f293afa03d94167b722d3078f467cf59e
---
M tests/phpunit/includes/mail/MailAddressTest.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/tests/phpunit/includes/mail/MailAddressTest.php 
b/tests/phpunit/includes/mail/MailAddressTest.php
index 2d07812..76566eb 100644
--- a/tests/phpunit/includes/mail/MailAddressTest.php
+++ b/tests/phpunit/includes/mail/MailAddressTest.php
@@ -49,6 +49,7 @@
array( false, 'f...@bar.baz', 'AUserName', 'Some real 
name', 'AUserName f...@bar.baz' ),
array( false, 'f...@bar.baz', '', '', 'f...@bar.baz' ),
array( true, 'f...@bar.baz', '', '', 'f...@bar.baz' ),
+   array( true, '', '', '', '' ),
);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d5a1e8f293afa03d94167b722d3078f467cf59e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Krinkle krinklem...@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] Auto-refresh graph on editing - change (mediawiki...Graph)

2014-09-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Auto-refresh graph on editing
..

Auto-refresh graph on editing

Requires https://gerrit.wikimedia.org/r/161893

Change-Id: I12f481c10576ffe53f60d820900dc0dd876902a1
---
M Graph.body.php
M Graph.php
A js/graph.editor.js
M js/graph.js
4 files changed, 65 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/94/161894/1

diff --git a/Graph.body.php b/Graph.body.php
index 867ad71..9b89931 100644
--- a/Graph.body.php
+++ b/Graph.body.php
@@ -13,6 +13,7 @@
 use Html;
 use JsonConfig\JCContent;
 use JsonConfig\JCContentView;
+use JsonConfig\JCSingleton;
 use Parser;
 use ParserOptions;
 use ParserOutput;
@@ -55,6 +56,21 @@
$parserOutput-addModules( 'ext.graph' );
return $parserOutput;
}
+
+   /**
+* @param \EditPage $editpage
+* @param \OutputPage $output
+* @return bool
+*/
+   public static function editPageShowEditFormInitial( $editpage, $output 
) {
+   // TODO: not sure if this is the best way to test
+   if ( $editpage-contentFormat === CONTENT_FORMAT_JSON 
+JCSingleton::getContentClass( $editpage-contentModel ) 
=== __NAMESPACE__ . '\Content'
+   ) {
+   $output-addModules( 'ext.graph.editor' );
+   }
+   return true;
+   }
 }
 
 /**
diff --git a/Graph.php b/Graph.php
index 34a3ec6..81aa27e 100644
--- a/Graph.php
+++ b/Graph.php
@@ -47,49 +47,17 @@
 $wgGraphDataDomains = array();
 
 $wgHooks['ParserFirstCallInit'][] = 'Graph\Singleton::onParserFirstCallInit';
+$wgHooks['EditPage::showEditForm:initial'][] = 
'Graph\Singleton::editPageShowEditFormInitial';
 
-
-// ResourceLoader modules
-/**
- * A boilerplate for resource loader modules
- */
 $extGraphBoilerplate = array(
 'localBasePath' = __DIR__,
 'remoteExtPath' = 'Graph',
 'targets' = array( 'mobile', 'desktop' ),
 );
 
-$wgResourceModules['mediawiki.libs.d3'] = array(
-'scripts' = array(
-'lib/d3.js',
-//'lib/d3.geo.projection.min.js',
-),
-) + $extGraphBoilerplate;
-$wgResourceModules['mediawiki.libs.topojson'] = array(
-'scripts' = array(
-'lib/topojson.js',
-),
-) + $extGraphBoilerplate;
-$wgResourceModules['mediawiki.libs.vega'] = array(
-'dependencies' = array(
-'mediawiki.libs.d3',
-'mediawiki.libs.topojson',
-),
-'scripts' = array(
-'lib/vega.js',
-),
-) + $extGraphBoilerplate;
 $wgResourceModules['ext.graph'] = array(
-// TODO: dependencies don't work.  Symptoms:
-// * Firefox works
-// * Chrome works in debug mode
-// * Chrome does not work in production mode (debug=false)
-//'dependencies' = array(
-//'mediawiki.libs.vega',
-//),
 'scripts' = array(
 'lib/d3.js',
-// 'lib/d3.geo.projection.min.js',
 'lib/topojson.js',
 'lib/vega.js',
 'js/graph.js',
@@ -98,4 +66,11 @@
 'styles/common.less',
 ),
 ) + $extGraphBoilerplate;
+
+$wgResourceModules['ext.graph.editor'] = array(
+'scripts' = array(
+'js/graph.editor.js',
+)
+) + $extGraphBoilerplate;
+
 unset( $extGraphBoilerplate );
diff --git a/js/graph.editor.js b/js/graph.editor.js
new file mode 100644
index 000..7670cc4
--- /dev/null
+++ b/js/graph.editor.js
@@ -0,0 +1,30 @@
+( function( $ ) {
+   var oldContent = '';
+   (function() {
+   $('.mw-wiki-graph').each(function () {
+   // This should not be a loop - there must be only one 
value with this class
+   var el = this,
+   textbox = $('#wpTextbox1'),
+   context = textbox  
textbox.data('wikiEditor-context');
+
+   if (!context || !context.evt || 
!context.evt.codeEditorSync || !context.fn) {
+   return;
+   }
+   context.evt.codeEditorSync();
+   var content = context.fn.getContents();
+   if (oldContent === content) {
+   return;
+   }
+   oldContent = content;
+   var annotations = 
context.codeEditor.getSession().getAnnotations();
+   if (annotations.every(function(v) { return v.type !== 
'error'; })) {
+   if (this.hasAttribute('spec'))
+   this.removeAttribute('spec');
+   var spec = $.parseJSON(content);
+   vg.parse.spec(spec, function(chart) { 
chart({el:el}).update(); })
+   }
+   });
+   // FIXME: This should be 

[MediaWiki-commits] [Gerrit] new JCSingleton::getContentClass($modelId) - change (mediawiki...JsonConfig)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: new JCSingleton::getContentClass($modelId)
..


new JCSingleton::getContentClass($modelId)

Change-Id: I2ea5ce57059c26058dd92f3941c02ef551088159
---
M includes/JCContentHandler.php
M includes/JCSingleton.php
2 files changed, 23 insertions(+), 19 deletions(-)

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



diff --git a/includes/JCContentHandler.php b/includes/JCContentHandler.php
index b4b077e..40a5d90 100644
--- a/includes/JCContentHandler.php
+++ b/includes/JCContentHandler.php
@@ -52,27 +52,10 @@
 * @return JCContent the JsonSchemaContent object wrapping $text
 */
public function unserializeContent( $text, $format = null, $isSaving = 
true ) {
-   global $wgJsonConfigModels;
$this-checkFormat( $format );
$modelId = $this-getModelID();
-   $class = null;
-   if ( array_key_exists( $modelId, $wgJsonConfigModels ) ) {
-   $value = $wgJsonConfigModels[$modelId];
-   if ( is_array( $value ) ) {
-   if ( !array_key_exists( 'class', $value ) ) {
-   wfLogWarning( JsonConfig: Invalid 
\$wgJsonConfigModels['$modelId'] array value, 'class' not found );
-   } else {
-   $class = $value['class'];
-   }
-   } else {
-   $class = $value;
-   }
-   }
-   if ( $class ) {
-   return new $class( $text, $modelId, $isSaving );
-   } else {
-   return new JCContent( $text, $modelId, $isSaving );
-   }
+   $class = JCSingleton::getContentClass( $modelId );
+   return new $class( $text, $modelId, $isSaving );
}
 
/**
diff --git a/includes/JCSingleton.php b/includes/JCSingleton.php
index 46aa44e..de69b05 100644
--- a/includes/JCSingleton.php
+++ b/includes/JCSingleton.php
@@ -336,6 +336,27 @@
return self::$titleMap;
}
 
+   public static function getContentClass( $modelId ) {
+   global $wgJsonConfigModels;
+   $class = null;
+   if ( array_key_exists( $modelId, $wgJsonConfigModels ) ) {
+   $value = $wgJsonConfigModels[$modelId];
+   if ( is_array( $value ) ) {
+   if ( !array_key_exists( 'class', $value ) ) {
+   wfLogWarning( JsonConfig: Invalid 
\$wgJsonConfigModels['$modelId'] array value, 'class' not found );
+   } else {
+   $class = $value['class'];
+   }
+   } else {
+   $class = $value;
+   }
+   }
+   if ( !$class ) {
+   $class = __NAMESPACE__ . '\JCContent';
+   }
+   return $class;
+   }
+
/**
 * Returns an array with settings if the $titleValue object is handled 
by the JsonConfig extension,
 * false if unrecognized namespace, and null if namespace is handled 
but not this title

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ea5ce57059c26058dd92f3941c02ef551088159
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org
Gerrit-Reviewer: Yurik yu...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Use __DIR__ directly - change (mediawiki...MassMessage)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use __DIR__ directly
..


Use __DIR__ directly

Change-Id: Id743071c52563954d13e7591f0cd54991c3cd774
---
M MassMessage.php
1 file changed, 31 insertions(+), 32 deletions(-)

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



diff --git a/MassMessage.php b/MassMessage.php
index 77ac57b..6728190 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -57,33 +57,32 @@
'descriptionmsg' = 'massmessage-desc',
'version' = '0.2.0',
 );
-$dir = __DIR__;
 
 // Messages
-$wgMessagesDirs['MassMessage'] = $dir/i18n;
-$wgExtensionMessagesFiles['MassMessageAlias'] = $dir/MassMessage.alias.php;
-$wgExtensionMessagesFiles['MassMessageMagic'] = 
$dir/MassMessage.i18n.magic.php;
+$wgMessagesDirs['MassMessage'] = __DIR__ . '/i18n';
+$wgExtensionMessagesFiles['MassMessageAlias'] = __DIR__ . 
'/MassMessage.alias.php';
+$wgExtensionMessagesFiles['MassMessageMagic'] = __DIR__ . 
'/MassMessage.i18n.magic.php';
 
 // Classes
-$wgAutoloadClasses['MassMessageHooks'] = $dir/MassMessage.hooks.php;
-$wgAutoloadClasses['ApiMassMessage'] = $dir/includes/ApiMassMessage.php;
-$wgAutoloadClasses['ApiEditMassMessageList'] = 
$dir/includes/ApiEditMassMessageList.php;
-$wgAutoloadClasses['ApiQueryMMSites'] = $dir/includes/ApiQueryMMSites.php;
-$wgAutoloadClasses['MassMessage'] = $dir/includes/MassMessage.php;
-$wgAutoloadClasses['MassMessageTargets'] = 
$dir/includes/MassMessageTargets.php;
-$wgAutoloadClasses['SpecialMassMessage'] = 
$dir/includes/SpecialMassMessage.php;
-$wgAutoloadClasses['SpecialCreateMassMessageList'] = 
$dir/includes/SpecialCreateMassMessageList.php;
-$wgAutoloadClasses['SpecialEditMassMessageList'] = 
$dir/includes/SpecialEditMassMessageList.php;
-$wgAutoloadClasses['MassMessageJob'] = $dir/includes/job/MassMessageJob.php;
-$wgAutoloadClasses['MassMessageSubmitJob'] = 
$dir/includes/job/MassMessageSubmitJob.php;
-$wgAutoloadClasses['MassMessageFailureLogFormatter'] = 
$dir/includes/logging/MassMessageFailureLogFormatter.php;
-$wgAutoloadClasses['MassMessageSendLogFormatter'] = 
$dir/includes/logging/MassMessageSendLogFormatter.php;
-$wgAutoloadClasses['MassMessageSkipLogFormatter'] = 
$dir/includes/logging/MassMessageSkipLogFormatter.php;
-$wgAutoloadClasses['MassMessageListContent'] = 
$dir/includes/content/MassMessageListContent.php;
-$wgAutoloadClasses['MassMessageListContentHandler'] = 
$dir/includes/content/MassMessageListContentHandler.php;
-$wgAutoloadClasses['MassMessageListDiffEngine'] = 
$dir/includes/content/MassMessageListDiffEngine.php;
-$wgAutoloadClasses['MassMessageTestCase'] = 
$dir/tests/MassMessageTestCase.php;
-$wgAutoloadClasses['MassMessageApiTestCase'] = 
$dir/tests/MassMessageApiTestCase.php;
+$wgAutoloadClasses['MassMessageHooks'] = __DIR__ . '/MassMessage.hooks.php';
+$wgAutoloadClasses['ApiMassMessage'] = __DIR__ . 
'/includes/ApiMassMessage.php';
+$wgAutoloadClasses['ApiEditMassMessageList'] = __DIR__ . 
'/includes/ApiEditMassMessageList.php';
+$wgAutoloadClasses['ApiQueryMMSites'] = __DIR__ . 
'/includes/ApiQueryMMSites.php';
+$wgAutoloadClasses['MassMessage'] = __DIR__ . '/includes/MassMessage.php';
+$wgAutoloadClasses['MassMessageTargets'] = __DIR__ . 
'/includes/MassMessageTargets.php';
+$wgAutoloadClasses['SpecialMassMessage'] = __DIR__ . 
'/includes/SpecialMassMessage.php';
+$wgAutoloadClasses['SpecialCreateMassMessageList'] = __DIR__ . 
'/includes/SpecialCreateMassMessageList.php';
+$wgAutoloadClasses['SpecialEditMassMessageList'] = __DIR__ . 
'/includes/SpecialEditMassMessageList.php';
+$wgAutoloadClasses['MassMessageJob'] = __DIR__ . 
'/includes/job/MassMessageJob.php';
+$wgAutoloadClasses['MassMessageSubmitJob'] = __DIR__ . 
'/includes/job/MassMessageSubmitJob.php';
+$wgAutoloadClasses['MassMessageFailureLogFormatter'] = __DIR__ . 
'/includes/logging/MassMessageFailureLogFormatter.php';
+$wgAutoloadClasses['MassMessageSendLogFormatter'] = __DIR__ . 
'/includes/logging/MassMessageSendLogFormatter.php';
+$wgAutoloadClasses['MassMessageSkipLogFormatter'] = __DIR__ . 
'/includes/logging/MassMessageSkipLogFormatter.php';
+$wgAutoloadClasses['MassMessageListContent'] = __DIR__ . 
'/includes/content/MassMessageListContent.php';
+$wgAutoloadClasses['MassMessageListContentHandler'] = __DIR__ . 
'/includes/content/MassMessageListContentHandler.php';
+$wgAutoloadClasses['MassMessageListDiffEngine'] = __DIR__ . 
'/includes/content/MassMessageListDiffEngine.php';
+$wgAutoloadClasses['MassMessageTestCase'] = __DIR__ . 
'/tests/MassMessageTestCase.php';
+$wgAutoloadClasses['MassMessageApiTestCase'] = __DIR__ . 
'/tests/MassMessageApiTestCase.php';
 
 // ContentHandler
 $wgContentHandlers['MassMessageListContent'] = 'MassMessageListContentHandler';
@@ -118,7 +117,7 @@
 $wgResourceModules['ext.MassMessage.autocomplete'] = array(
'scripts' = 'ext.MassMessage.autocomplete.js',
'dependencies' = 

[MediaWiki-commits] [Gerrit] Auto-refresh graph on editing - change (mediawiki...Graph)

2014-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Auto-refresh graph on editing
..


Auto-refresh graph on editing

Requires https://gerrit.wikimedia.org/r/161893

Change-Id: I12f481c10576ffe53f60d820900dc0dd876902a1
---
M Graph.body.php
M Graph.php
A js/graph.editor.js
M js/graph.js
4 files changed, 65 insertions(+), 46 deletions(-)

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



diff --git a/Graph.body.php b/Graph.body.php
index 867ad71..9b89931 100644
--- a/Graph.body.php
+++ b/Graph.body.php
@@ -13,6 +13,7 @@
 use Html;
 use JsonConfig\JCContent;
 use JsonConfig\JCContentView;
+use JsonConfig\JCSingleton;
 use Parser;
 use ParserOptions;
 use ParserOutput;
@@ -55,6 +56,21 @@
$parserOutput-addModules( 'ext.graph' );
return $parserOutput;
}
+
+   /**
+* @param \EditPage $editpage
+* @param \OutputPage $output
+* @return bool
+*/
+   public static function editPageShowEditFormInitial( $editpage, $output 
) {
+   // TODO: not sure if this is the best way to test
+   if ( $editpage-contentFormat === CONTENT_FORMAT_JSON 
+JCSingleton::getContentClass( $editpage-contentModel ) 
=== __NAMESPACE__ . '\Content'
+   ) {
+   $output-addModules( 'ext.graph.editor' );
+   }
+   return true;
+   }
 }
 
 /**
diff --git a/Graph.php b/Graph.php
index 34a3ec6..81aa27e 100644
--- a/Graph.php
+++ b/Graph.php
@@ -47,49 +47,17 @@
 $wgGraphDataDomains = array();
 
 $wgHooks['ParserFirstCallInit'][] = 'Graph\Singleton::onParserFirstCallInit';
+$wgHooks['EditPage::showEditForm:initial'][] = 
'Graph\Singleton::editPageShowEditFormInitial';
 
-
-// ResourceLoader modules
-/**
- * A boilerplate for resource loader modules
- */
 $extGraphBoilerplate = array(
 'localBasePath' = __DIR__,
 'remoteExtPath' = 'Graph',
 'targets' = array( 'mobile', 'desktop' ),
 );
 
-$wgResourceModules['mediawiki.libs.d3'] = array(
-'scripts' = array(
-'lib/d3.js',
-//'lib/d3.geo.projection.min.js',
-),
-) + $extGraphBoilerplate;
-$wgResourceModules['mediawiki.libs.topojson'] = array(
-'scripts' = array(
-'lib/topojson.js',
-),
-) + $extGraphBoilerplate;
-$wgResourceModules['mediawiki.libs.vega'] = array(
-'dependencies' = array(
-'mediawiki.libs.d3',
-'mediawiki.libs.topojson',
-),
-'scripts' = array(
-'lib/vega.js',
-),
-) + $extGraphBoilerplate;
 $wgResourceModules['ext.graph'] = array(
-// TODO: dependencies don't work.  Symptoms:
-// * Firefox works
-// * Chrome works in debug mode
-// * Chrome does not work in production mode (debug=false)
-//'dependencies' = array(
-//'mediawiki.libs.vega',
-//),
 'scripts' = array(
 'lib/d3.js',
-// 'lib/d3.geo.projection.min.js',
 'lib/topojson.js',
 'lib/vega.js',
 'js/graph.js',
@@ -98,4 +66,11 @@
 'styles/common.less',
 ),
 ) + $extGraphBoilerplate;
+
+$wgResourceModules['ext.graph.editor'] = array(
+'scripts' = array(
+'js/graph.editor.js',
+)
+) + $extGraphBoilerplate;
+
 unset( $extGraphBoilerplate );
diff --git a/js/graph.editor.js b/js/graph.editor.js
new file mode 100644
index 000..e3ec172
--- /dev/null
+++ b/js/graph.editor.js
@@ -0,0 +1,30 @@
+( function( $ ) {
+   var oldContent = '';
+   (function() {
+   $('.mw-wiki-graph').each(function () {
+   // This should not be a loop - there must be only one 
value with this class
+   var el = this,
+   textbox = $('#wpTextbox1'),
+   context = textbox  
textbox.data('wikiEditor-context');
+
+   if (!context || !context.evt || 
!context.evt.codeEditorSync || !context.fn) {
+   return;
+   }
+   context.evt.codeEditorSync();
+   var content = context.fn.getContents();
+   if (oldContent === content) {
+   return;
+   }
+   oldContent = content;
+   var annotations = 
context.codeEditor.getSession().getAnnotations();
+   if (annotations.every(function(v) { return v.type !== 
'error'; })) {
+   if (this.hasAttribute('spec'))
+   this.removeAttribute('spec');
+   var spec = $.parseJSON(content);
+   vg.parse.spec(spec, function(chart) { 
chart({el:el}).update(); });
+   }
+   });
+   // FIXME: This should be done on data modification, not on timer
+

  1   2   >