[MediaWiki-commits] [Gerrit] ho ho (not) very much - change (translatewiki)

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

Change subject: ho ho (not) very much
..


ho ho (not) very much

Due to https://github.com/facebook/hhvm/issues/1437 not much works.
Basically you can browse around logged in over http if you set the
hhvm=1 cookie.

Change-Id: Ic9cdd67e120fb7fecb7eeef5d22e19b4008744c5
---
A puppet/modules/hhvm/manifests/init.pp
M puppet/modules/nginx/files/translatewiki.net
M puppet/site.pp
3 files changed, 32 insertions(+), 1 deletion(-)

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



diff --git a/puppet/modules/hhvm/manifests/init.pp 
b/puppet/modules/hhvm/manifests/init.pp
new file mode 100644
index 000..182daab
--- /dev/null
+++ b/puppet/modules/hhvm/manifests/init.pp
@@ -0,0 +1,24 @@
+class hhvm {
+  include apt
+
+  apt::source { 'hhvm':
+location= 'http://dl.hhvm.com/ubuntu',
+repos   = 'main',
+key = '1BE7A449',
+key_server  = 'pgp.mit.edu',
+include_src = false,
+  }
+
+  package { 'hhvm-fastcgi':
+ensure = present,
+require = Apt::Source['hhvm'],
+  }
+
+  service { 'hhvm-fastcgi':
+ensure = running,
+enable = true,
+hasstatus  = true,
+hasrestart = true,
+require= [ Package['hhvm-fastcgi'] ],
+  }
+}
diff --git a/puppet/modules/nginx/files/translatewiki.net 
b/puppet/modules/nginx/files/translatewiki.net
index d291e1e..f4f8279 100644
--- a/puppet/modules/nginx/files/translatewiki.net
+++ b/puppet/modules/nginx/files/translatewiki.net
@@ -35,7 +35,13 @@
 
# Allowed php files, case sensitive
location ~ 
^/w/(i|index|load|api|opensearch_desc|profileinfo|webfiles/jserror)\.php$ {
-   fastcgi_pass unix:/var/run/php5-fpm.sock;
+   set $fastcgi_pass_value unix:/var/run/php5-fpm.sock;
+
+   if ($cookie_hhvm = 1) {
+   set $fastcgi_pass_value 127.0.0.1:9000;
+   }
+
+   fastcgi_pass $fastcgi_pass_value;
fastcgi_buffers 16 4k;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME 
$document_root$fastcgi_script_name;
diff --git a/puppet/site.pp b/puppet/site.pp
index 168ab14..171d522 100644
--- a/puppet/site.pp
+++ b/puppet/site.pp
@@ -20,6 +20,7 @@
   include translationmemory
   include users
   include composer
+  include hhvm
 
   class { 'backup':
 databases = ['translatewiki_net'],

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

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

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


[MediaWiki-commits] [Gerrit] Replace usage of some deprecated functions - change (mediawiki...Video)

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

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


Change subject: Replace usage of some deprecated functions
..

Replace usage of some deprecated functions

* Has some related refactoring because Skin no longer has to be passes around.
* Removed unused globals, local variables and commented out code.
* Some documentation tweaks.

Change-Id: Ie1453e37454d4fa995834db2ec101676444f092d
---
M VideoClass.php
M VideoPage.php
2 files changed, 16 insertions(+), 35 deletions(-)


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

diff --git a/VideoClass.php b/VideoClass.php
index cc7a5b5..4fbe9b3 100644
--- a/VideoClass.php
+++ b/VideoClass.php
@@ -113,8 +113,8 @@
 * Constructor -- create a new Video object from the given Title and set
 * some member variables
 *
-* @param $title Object: Title object associated with the Video
-* @param $context IContextSource nearest context object
+* @param Title $title Title object associated with the Video
+* @param IContextSource $context Nearest context object
 */
public function __construct( $title, IContextSource $context ) {
if( !is_object( $title ) ) {
diff --git a/VideoPage.php b/VideoPage.php
index b519991..514d4af 100644
--- a/VideoPage.php
+++ b/VideoPage.php
@@ -6,7 +6,7 @@
 
/**
 * Constructor and clear the article
-* @param $title Object: reference to a Title object.
+* @param Title $title
 */
public function __construct( $title ) {
parent::__construct( $title );
@@ -29,10 +29,6 @@
$this-video = new Video( $this-getTitle(), 
$this-getContext() );
$out = $this-getContext()-getOutput();
 
-   $videoLinksHTML = 'br /' . Xml::element( 'h2',
-   array( 'id' = 'filelinks' ), wfMsg( 'video-links' ) ) 
. \n;
-   $sk = $this-getContext()-getSkin();
-
// No need to display noarticletext, we use our own message
if ( $this-getID() ) {
parent::view();
@@ -52,13 +48,10 @@
$out-addHTML( $this-getEmbedThisTag() );
 
$this-videoHistory();
-
-   //$wgOut-addHTML( $videoLinksHTML );
-   //$this-videoLinks();
} else {
// Video doesn't exist, so give a link allowing user to 
add one with this name
$title = SpecialPage::getTitleFor( 'AddVideo' );
-   $link = $sk-linkKnown(
+   $link = Linker::linkKnown(
$title,
wfMsgHtml( 'video-novideo-linktext' ),
array(),
@@ -82,7 +75,7 @@
 *  parser hooks, like video name=Foo /...how to fix 
this?
 */
function videoLinks() {
-   global $wgOut, $wgUser;
+   global $wgOut;
 
$limit = 100;
 
@@ -116,7 +109,6 @@
$wgOut-addWikiMsg( 'video-links-to-video', $count );
$wgOut-addHTML( 'ul class=mw-imagepage-linktoimage' . \n 
);
 
-   $sk = $wgUser-getSkin();
$count = 0;
while ( $s = $res-fetchObject() ) {
$count++;
@@ -124,7 +116,7 @@
// We have not yet reached the extra one that 
tells us there is
// more to fetch
$name = Title::makeTitle( $s-page_namespace, 
$s-page_title );
-   $link = $sk-makeKnownLinkObj( $name, '' );
+   $link = Linker::linkKnown( $name );
$wgOut-addHTML( li{$link}/li\n );
}
}
@@ -175,14 +167,12 @@
 * we follow it with an upload history of the video and its usage.
 */
function videoHistory() {
-   global $wgUser, $wgOut;
-
-   $sk = $wgUser-getSkin();
+   global $wgOut;
 
$line = $this-video-nextHistoryLine();
 
if ( $line ) {
-   $list = new VideoHistoryList( $sk );
+   $list = new VideoHistoryList();
$s = $list-beginVideoHistoryList() .
$list-videoHistoryLine(
true,
@@ -244,11 +234,6 @@
  * @todo document
  */
 class VideoHistoryList {
-
-   function __construct( $skin ) {
-   $this-skin = $skin;
-   }
-
function beginVideoHistoryList() {
$s = \n .
Xml::element( 'h2', array( 'id' = 'filehistory' ), 
wfMsgHtml( 'video-history' ) ) .
@@ 

[MediaWiki-commits] [Gerrit] Fix fatal from exception, and improve its message - change (mediawiki...Flow)

2014-01-11 Thread Spage (Code Review)
Spage has uploaded a new change for review.

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


Change subject: Fix fatal from exception, and improve its message
..

Fix fatal from exception, and improve its message

Bug: 599400
Change-Id: Id803f4e950f4ba7f7e78e19804847eb9f5829fed
---
M includes/Model/Workflow.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/includes/Model/Workflow.php b/includes/Model/Workflow.php
index 99e9b93..11f038e 100644
--- a/includes/Model/Workflow.php
+++ b/includes/Model/Workflow.php
@@ -5,6 +5,7 @@
 use MWTimestamp;
 use Title;
 use User;
+use Flow\Exception\FlowException;
 use Flow\Exception\DataModelException;
 use Flow\Exception\InvalidInputException;
 
@@ -93,7 +94,7 @@
 
public function getArticleTitle() {
if ( $this-wiki !== wfWikiId() ) {
-   throw new FlowException( 'Interwiki not implemented', 
'default' );
+   throw new FlowException( 'Interwiki to ' . $this-wiki 
. ' not implemented ', 'default' );
}
return Title::makeTitleSafe( $this-namespace, $this-titleText 
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id803f4e950f4ba7f7e78e19804847eb9f5829fed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Spage sp...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] librensm: adjust syslog blacklist - change (operations/puppet)

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

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


Change subject: librensm: adjust syslog blacklist
..

librensm: adjust syslog blacklist

Less spam is good!

Change-Id: Idf45de71a137e53cf2a7a1c98943dab20d5a8ffb
---
M manifests/role/librenms.pp
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/106870/1

diff --git a/manifests/role/librenms.pp b/manifests/role/librenms.pp
index 473d648..03b2f8a 100644
--- a/manifests/role/librenms.pp
+++ b/manifests/role/librenms.pp
@@ -61,8 +61,9 @@
 'syslog_filter'= [
 'message repeated',
 'Connection from UDP: [',
-'CMD ( /usr/libexec/atrun)',
+'CMD (   /usr/libexec/atrun)',
 'CMD (newsyslog)',
+'CMD (adjkerntz -a)',
 ],
 
 'auth_mechanism'   = 'mysql',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf45de71a137e53cf2a7a1c98943dab20d5a8ffb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] librensm: adjust syslog blacklist - change (operations/puppet)

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

Change subject: librensm: adjust syslog blacklist
..


librensm: adjust syslog blacklist

Less spam is good!

Change-Id: Idf45de71a137e53cf2a7a1c98943dab20d5a8ffb
---
M manifests/role/librenms.pp
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/manifests/role/librenms.pp b/manifests/role/librenms.pp
index 473d648..03b2f8a 100644
--- a/manifests/role/librenms.pp
+++ b/manifests/role/librenms.pp
@@ -61,8 +61,9 @@
 'syslog_filter'= [
 'message repeated',
 'Connection from UDP: [',
-'CMD ( /usr/libexec/atrun)',
+'CMD (   /usr/libexec/atrun)',
 'CMD (newsyslog)',
+'CMD (adjkerntz -a)',
 ],
 
 'auth_mechanism'   = 'mysql',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf45de71a137e53cf2a7a1c98943dab20d5a8ffb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: 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] Provide correct type as input for LoadMonitor::postConnectio... - change (mediawiki/core)

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

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


Change subject: Provide correct type as input for 
LoadMonitor::postConnectionBackoff()
..

Provide correct type as input for LoadMonitor::postConnectionBackoff()

float is expected, bool was given.

Change-Id: I046cc4b73166e79905e3556365f567420a4cabb9
---
M includes/db/LoadBalancer.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php
index 8268f4c..c88ad05 100644
--- a/includes/db/LoadBalancer.php
+++ b/includes/db/LoadBalancer.php
@@ -278,7 +278,7 @@
 
// Perform post-connection backoff
$threshold = isset( $this-mServers[$i]['max 
threads'] )
-   ? $this-mServers[$i]['max threads'] : 
false;
+   ? $this-mServers[$i]['max threads'] : 
0;
$backoff = 
$this-getLoadMonitor()-postConnectionBackoff( $conn, $threshold );
 
// Decrement reference counter, we are finished 
with this connection.

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

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

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


[MediaWiki-commits] [Gerrit] Correct return type doc for DatabaseBase::getLBInfo() - change (mediawiki/core)

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

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


Change subject: Correct return type doc for DatabaseBase::getLBInfo()
..

Correct return type doc for DatabaseBase::getLBInfo()

This confused PHPStorm's code analyser.

Change-Id: If99abfa6ca9e52a39b6d2621441686ab564781c7
---
M includes/db/Database.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/106871/1

diff --git a/includes/db/Database.php b/includes/db/Database.php
index 45a214e..05b5082 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -445,7 +445,7 @@
 * @param string $name The entry of the info array to get, or null to 
get the
 *   whole array
 *
-* @return LoadBalancer|null
+* @return array|null
 */
public function getLBInfo( $name = null ) {
if ( is_null( $name ) ) {

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

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

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


[MediaWiki-commits] [Gerrit] Update/add documentation in the LoadBalancer class - change (mediawiki/core)

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

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


Change subject: Update/add documentation in the LoadBalancer class
..

Update/add documentation in the LoadBalancer class

These should fix the last (but one) remark by the PHPStorm code analyser
on code documentation in includes/db.

Change-Id: Ib836ab052dbc8a3f347db3013af2f00138231d47
---
M includes/db/LoadBalancer.php
1 file changed, 11 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/106872/1

diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php
index 7a49c78..8268f4c 100644
--- a/includes/db/LoadBalancer.php
+++ b/includes/db/LoadBalancer.php
@@ -29,6 +29,8 @@
  */
 class LoadBalancer {
private $mServers, $mConns, $mLoads, $mGroupLoads;
+
+   /** @var bool|DatabaseBase Database connection that caused a problem */
private $mErrorConnection;
private $mReadIndex, $mAllowLagged;
 
@@ -805,7 +807,7 @@
/**
 * Returns true if the specified index is a valid server index
 *
-* @param $i
+* @param string $i
 * @return bool
 */
function haveIndex( $i ) {
@@ -815,7 +817,7 @@
/**
 * Returns true if the specified index is valid and has non-zero load
 *
-* @param $i
+* @param string $i
 * @return bool
 */
function isNonZeroLoad( $i ) {
@@ -834,7 +836,7 @@
/**
 * Get the host name or IP address of the server with the specified 
index
 * Prefer a readable name if available.
-* @param $i
+* @param string $i
 * @return string
 */
function getServerName( $i ) {
@@ -903,6 +905,7 @@
function closeAll() {
foreach ( $this-mConns as $conns2 ) {
foreach ( $conns2 as $conns3 ) {
+   /** @var DatabaseBase $conn */
foreach ( $conns3 as $conn ) {
$conn-close();
}
@@ -919,7 +922,7 @@
 * Deprecated function, typo in function name
 *
 * @deprecated in 1.18
-* @param $conn
+* @param DatabaseBase $conn
 */
function closeConnecton( $conn ) {
wfDeprecated( __METHOD__, '1.18' );
@@ -930,7 +933,7 @@
 * Close a connection
 * Using this function makes sure the LoadBalancer knows the connection 
is closed.
 * If you use $conn-close() directly, the load balancer won't update 
its state.
-* @param $conn DatabaseBase
+* @param DatabaseBase $conn
 */
function closeConnection( $conn ) {
$done = false;
@@ -957,6 +960,7 @@
function commitAll() {
foreach ( $this-mConns as $conns2 ) {
foreach ( $conns2 as $conns3 ) {
+   /** @var DatabaseBase[] $conns3 */
foreach ( $conns3 as $conn ) {
if ( $conn-trxLevel() ) {
$conn-commit( __METHOD__, 
'flush' );
@@ -976,6 +980,7 @@
if ( empty( $conns2[$masterIndex] ) ) {
continue;
}
+   /** @var DatabaseBase $conn */
foreach ( $conns2[$masterIndex] as $conn ) {
if ( $conn-trxLevel()  
$conn-writesOrCallbacksPending() ) {
$conn-commit( __METHOD__, 'flush' );
@@ -1020,6 +1025,7 @@
$success = true;
foreach ( $this-mConns as $conns2 ) {
foreach ( $conns2 as $conns3 ) {
+   /** @var DatabaseBase[] $conns3 */
foreach ( $conns3 as $conn ) {
if ( !$conn-ping() ) {
$success = false;

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

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

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


[MediaWiki-commits] [Gerrit] Enable ACE webworkers - change (mediawiki...CodeEditor)

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

Change subject: Enable ACE webworkers
..


Enable ACE webworkers

Now that the RL path is set correctly we can enable the webworkers
This adds syntax checker and linting

Change-Id: Ie9177d4acae45f2aadb1dfd3e66049195056bca0
---
M modules/jquery.codeEditor.js
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js
index 15f23cf..31d9408 100644
--- a/modules/jquery.codeEditor.js
+++ b/modules/jquery.codeEditor.js
@@ -184,9 +184,6 @@
// updated right away to actually use 
the new style.
$( mw ).bind( 'LivePreviewPrepare', 
context.evt.codeEditorSubmit );
 
-   // Disable code-linting in the 
background using JavaScript WebWorkers.
-   // Currently broken due to require() / 
ResourceLoader mismatch.
-   session.setUseWorker( false );
session.setMode( new (require( 
ace/mode/ + lang ).Mode) );
 
// Force the box to resize horizontally 
to match in future :D

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9177d4acae45f2aadb1dfd3e66049195056bca0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
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] i18n: avoid full-width single-quote - change (mediawiki...EducationProgram)

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

Change subject: i18n: avoid full-width single-quote
..


i18n: avoid full-width single-quote

for consistency

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

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



diff --git a/EducationProgram.i18n.php b/EducationProgram.i18n.php
index 6c4a280..6d36030 100644
--- a/EducationProgram.i18n.php
+++ b/EducationProgram.i18n.php
@@ -30,9 +30,9 @@
'ep-student-view-profile' = 'student profile',
'ep-err-failed-to-save' = 'Something went wrong - your changes have 
not been saved.',
'ep-err-course-exists-title' = 'Error: Course exists',
-   'ep-err-course-exists-text' = 'You’re attempting to create the course 
$1, but it already exists.',
+   'ep-err-course-exists-text' = 'You are attempting to create the course 
$1, but it already exists.',
'ep-err-org-exists-title' = 'Error: Institution exists',
-   'ep-err-org-exists-text' = 'You’re attempting to create the 
institution $1, but it already exists.',
+   'ep-err-org-exists-text' = 'You are attempting to create the 
institution $1, but it already exists.',
'ep-didyouknow-header' = 'Did you know ... ?',
 
// Tabs

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker::formatSize statically - change (mediawiki...MediaFunctions)

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

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


Change subject: Call Linker::formatSize statically
..

Call Linker::formatSize statically

The bumps the required MediaWiki version to 1.18.

Change-Id: I1914b369049b96354187b16ef7def776337c9b3f
---
M MediaFunctions.class.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/MediaFunctions.class.php b/MediaFunctions.class.php
index ebb1b96..016d160 100644
--- a/MediaFunctions.class.php
+++ b/MediaFunctions.class.php
@@ -41,7 +41,7 @@
public static function mediasize( $parser, $name = '' ) {
if ( ( $file = self::resolve( $name ) ) instanceof File ) {
$parser-mOutput-addImage( 
$file-getTitle()-getDBkey() );
-   return $parser-mOptions-getSkin()-formatSize( 
$file-getSize() );
+   return Linker::formatSize( $file-getSize() );
}
return self::error( $file, $name );
}
@@ -123,7 +123,7 @@
}
return self::error( $file, $name );
}
-   
+
/**
 * Get the number of pages of a file
 *

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

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

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


[MediaWiki-commits] [Gerrit] Remove deprecated ParserOptions::getSkin() - change (mediawiki/core)

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

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


Change subject: Remove deprecated ParserOptions::getSkin()
..

Remove deprecated ParserOptions::getSkin()

Has been deprecated since 1.18. One remaining use in a Gerrit extension
replaced.

Change-Id: I7eba24593368047ca48a5e1cb60378319c1e51b2
---
M RELEASE-NOTES-1.23
M includes/parser/ParserOptions.php
2 files changed, 1 insertion(+), 10 deletions(-)


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

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index dbe598c..41421bb 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -218,6 +218,7 @@
 * Linker::makeBrokenLinkObj() (deprecated in 1.16)
 * Linker::makeColouredLinkObj() (deprecated in 1.16)
 * Linker::makeSizeLinkObj() (deprecated in 1.17)
+* ParserOptions::getkin() (deprecated 1.18)
 * ProfilerSimple::getCpuTime (deprecated in 1.20)
 * Revision::revText() (deprecated in 1.17)
 * SkinTemplate::jstext() (deprecated in 1.21)
diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index c4e9a1c..2ab1d89 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -255,16 +255,6 @@
function getUser()  { return $this-mUser; }
function getPreSaveTransform()  { return 
$this-mPreSaveTransform; }
 
-   /**
-* @param $title Title
-* @return Skin
-* @deprecated since 1.18 Use Linker::* instead
-*/
-   function getSkin( $title = null ) {
-   wfDeprecated( __METHOD__, '1.18' );
-   return new DummyLinker;
-   }
-
function getDateFormat() {
$this-optionUsed( 'dateformat' );
if ( !isset( $this-mDateFormat ) ) {

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

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

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


[MediaWiki-commits] [Gerrit] librenms: minor fixes to phpdump - change (operations/puppet)

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

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


Change subject: librenms: minor fixes to phpdump
..

librenms: minor fixes to phpdump

Handle integers properly, NULL  strings with embedded quotes. Borrowed
from Ori's equivalent code that was developed before this but was never
imported into this repo.

Change-Id: I36dfd0f082ed48f62c537283ed24017f1ac8ada1
---
M modules/librenms/lib/puppet/parser/functions/phpdump.rb
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/106876/1

diff --git a/modules/librenms/lib/puppet/parser/functions/phpdump.rb 
b/modules/librenms/lib/puppet/parser/functions/phpdump.rb
index 205f8ce..0c094b5 100644
--- a/modules/librenms/lib/puppet/parser/functions/phpdump.rb
+++ b/modules/librenms/lib/puppet/parser/functions/phpdump.rb
@@ -11,7 +11,7 @@
 contents = ''
 o.sort.each do |k, v|
   contents += indent*level
-  contents += \#{k}\ =  + phpdump(v, level+1)
+  contents += k.to_pson +  =  + phpdump(v, level+1)
   contents += ,\n
 end
 array(\n + contents + indent*(level-1) + )
@@ -21,8 +21,10 @@
 TRUE
   when FalseClass
 FALSE
+  when nil
+NULL
   else
-'' + o.to_s + ''
+o.include?('.') ? Float(o).to_s : Integer(o).to_s rescue o.to_pson
   end
 end
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36dfd0f082ed48f62c537283ed24017f1ac8ada1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] librenms: minor fixes to phpdump - change (operations/puppet)

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

Change subject: librenms: minor fixes to phpdump
..


librenms: minor fixes to phpdump

Handle integers properly, NULL  strings with embedded quotes. Borrowed
from Ori's equivalent code that was developed before this but was never
imported into this repo.

Change-Id: I36dfd0f082ed48f62c537283ed24017f1ac8ada1
---
M modules/librenms/lib/puppet/parser/functions/phpdump.rb
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/librenms/lib/puppet/parser/functions/phpdump.rb 
b/modules/librenms/lib/puppet/parser/functions/phpdump.rb
index 205f8ce..0c094b5 100644
--- a/modules/librenms/lib/puppet/parser/functions/phpdump.rb
+++ b/modules/librenms/lib/puppet/parser/functions/phpdump.rb
@@ -11,7 +11,7 @@
 contents = ''
 o.sort.each do |k, v|
   contents += indent*level
-  contents += \#{k}\ =  + phpdump(v, level+1)
+  contents += k.to_pson +  =  + phpdump(v, level+1)
   contents += ,\n
 end
 array(\n + contents + indent*(level-1) + )
@@ -21,8 +21,10 @@
 TRUE
   when FalseClass
 FALSE
+  when nil
+NULL
   else
-'' + o.to_s + ''
+o.include?('.') ? Float(o).to_s : Integer(o).to_s rescue o.to_pson
   end
 end
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36dfd0f082ed48f62c537283ed24017f1ac8ada1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] librenms: another syslog blacklist entry - change (operations/puppet)

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

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


Change subject: librenms: another syslog blacklist entry
..

librenms: another syslog blacklist entry

Change-Id: If3f3d61b5279268a8aad28502dc7a3ec5036b880
---
M manifests/role/librenms.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/77/106877/1

diff --git a/manifests/role/librenms.pp b/manifests/role/librenms.pp
index 03b2f8a..f34bb0a 100644
--- a/manifests/role/librenms.pp
+++ b/manifests/role/librenms.pp
@@ -64,6 +64,7 @@
 'CMD (   /usr/libexec/atrun)',
 'CMD (newsyslog)',
 'CMD (adjkerntz -a)',
+'kernel time sync enabled',
 ],
 
 'auth_mechanism'   = 'mysql',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3f3d61b5279268a8aad28502dc7a3ec5036b880
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] librenms: another syslog blacklist entry - change (operations/puppet)

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

Change subject: librenms: another syslog blacklist entry
..


librenms: another syslog blacklist entry

Change-Id: If3f3d61b5279268a8aad28502dc7a3ec5036b880
---
M manifests/role/librenms.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/manifests/role/librenms.pp b/manifests/role/librenms.pp
index 03b2f8a..f34bb0a 100644
--- a/manifests/role/librenms.pp
+++ b/manifests/role/librenms.pp
@@ -64,6 +64,7 @@
 'CMD (   /usr/libexec/atrun)',
 'CMD (newsyslog)',
 'CMD (adjkerntz -a)',
+'kernel time sync enabled',
 ],
 
 'auth_mechanism'   = 'mysql',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3f3d61b5279268a8aad28502dc7a3ec5036b880
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] (bug 54450) Fix compatibility with all skins - change (mediawiki...LastModified)

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

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


Change subject: (bug 54450) Fix compatibility with all skins
..

(bug 54450) Fix compatibility with all skins

This commit checks if the user is currently on a specified skin and
displays the relevant HTML styles for it. This fixes the display
for the Modern skin by placing it into the p-cactions section.

All other supported skins by MediaWiki work as of this commit.

Change-Id: Ia03ca52def8b42432987818635346d9ef263eaef
---
M modules/lastmodified.js
1 file changed, 46 insertions(+), 2 deletions(-)


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

diff --git a/modules/lastmodified.js b/modules/lastmodified.js
index 07bda49..2f2dd8a 100644
--- a/modules/lastmodified.js
+++ b/modules/lastmodified.js
@@ -50,16 +50,25 @@
var historyLink = getArticleHistoryLink();
//console.log( 'historyLink: ' + historyLink );
 
+   // Get the current skin
+   var currentSkin = getCurrentSkin();
+
+   // Get the proper styling (skin-dependent)
+   var divStyle = getDivStyle( currentSkin );
+
+   // Get the HTML property to append to (skin-dependent)
+   var htmlProperty = getHtmlProperty( currentSkin );
+
// Construct the HTML
var html = '';
-   html += 'div style=float:right; font-size: 0.5em; 
id=mwe-lastmodified';
+   html += 'div style=' + divStyle + ' id=mwe-lastmodified';
html += 'a href=' + historyLink + ' title=' + mw.message( 
'lastmodified-title-tag' ).escaped() + '';
html += lastModifiedText;
html += '/a';
html += '/div';
 
// Insert the HTML into the web page
-   $( '#firstHeading' ).append( html );
+   $( htmlProperty ).append( html );
 }
 /**
  * Get the UTC Timestamp without microseconds
@@ -194,6 +203,41 @@
 }
 
 /**
+ * Get the value of the current skin, introduced to fix bug 54450
+ *
+ * @return string
+ */
+function getCurrentSkin() {
+   return mw.config.get( 'skin' );
+}
+
+/**
+ * Get the proper div style tag information depending on the skin
+ *
+ * @return string
+ */
+function getDivStyle( skin ) {
+   if ( skin == 'modern' ) {
+   return float:right;;
+   } else {
+   return float:right; font-size: 0.5em;;
+   }
+}
+
+/**
+ * Get the HTML property to append to depending on the skin
+ *
+ * @return string
+ */
+function getHtmlProperty( skin ) {
+   if ( skin == 'modern' ) {
+   return '#p-cactions';
+   } else {
+   return '#firstHeading';
+   }
+}
+
+/**
  * Display the last modified link on the page.
  */
 $( document ).ready( function() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia03ca52def8b42432987818635346d9ef263eaef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LastModified
Gerrit-Branch: master
Gerrit-Owner: Hydriz ad...@alphacorp.tk
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add a new account for testing Translate - change (mediawiki/selenium)

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

Change subject: Add a new account for testing Translate
..


Add a new account for testing Translate

Change-Id: I52c79406d8a055dd9405066d2bf02a6f2af9b4ba
---
M docs/jobs.md
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/docs/jobs.md b/docs/jobs.md
index 8a7adc0..7e15625 100644
--- a/docs/jobs.md
+++ b/docs/jobs.md
@@ -158,8 +158,8 @@
 ## Translate-sandbox.translatewiki.net-linux-firefox
 - bundle exec: cucumber --verbose --profile ci --tags 
@sandbox.translatewiki.net
 - MediaWiki URL: sandbox.translatewiki.net
-- MediaWiki user: Selenium
-- MediaWiki password variable: 
MEDIAWIKI_PASSWORD_SELENIUM_SANDBOX_TRANSLATEWIKI_NET
+- MediaWiki user: Selenium-Translate
+- MediaWiki password variable: 
MEDIAWIKI_PASSWORD_SELENIUM_SANDBOX_TRANSLATE_TRANSLATEWIKI_NET
 
 ## Translate-meta.wikimedia.org-linux-firefox
 - bundle exec: cucumber --verbose --profile ci --tags @meta.wikimedia.org

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52c79406d8a055dd9405066d2bf02a6f2af9b4ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix license name - change (mediawiki...HostStats)

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

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


Change subject: Fix license name
..

Fix license name

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


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

diff --git a/HostStats.php b/HostStats.php
index a1f9b42..2fc48e1 100644
--- a/HostStats.php
+++ b/HostStats.php
@@ -18,7 +18,7 @@
'url' = 'https://www.mediawiki.org/wiki/Extension:HostStats',
'descriptionmsg' = 'hoststats-desc',
'version' = '1.3alpha',
-   'license-name' = 'GNU GPL v3',
+   'license-name' = 'GPL-3.0+',
 );
 
 // An array of commands that you wish to run and output.

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

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

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


[MediaWiki-commits] [Gerrit] Fix license name - change (mediawiki...CloseWikis)

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

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


Change subject: Fix license name
..

Fix license name

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


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

diff --git a/CloseWikis.php b/CloseWikis.php
index 2efe37c..4d8b3c8 100644
--- a/CloseWikis.php
+++ b/CloseWikis.php
@@ -28,7 +28,7 @@
'author' = array( 'Victor Vasiliev', 'Hydriz Scholz' ),
'descriptionmsg' = 'closewikis-desc',
'url'= 
'https://www.mediawiki.org/wiki/Extension:CloseWikis',
-   'license-name'   = 'GNU GPL v2',
+   'license-name'   = 'GPL-2.0+',
 );
 
 $dir = dirname( __FILE__ );

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

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

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


[MediaWiki-commits] [Gerrit] Fix license name - change (mediawiki...HostStats)

2014-01-11 Thread Hydriz (Code Review)
Hydriz has submitted this change and it was merged.

Change subject: Fix license name
..


Fix license name

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

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



diff --git a/HostStats.php b/HostStats.php
index a1f9b42..2fc48e1 100644
--- a/HostStats.php
+++ b/HostStats.php
@@ -18,7 +18,7 @@
'url' = 'https://www.mediawiki.org/wiki/Extension:HostStats',
'descriptionmsg' = 'hoststats-desc',
'version' = '1.3alpha',
-   'license-name' = 'GNU GPL v3',
+   'license-name' = 'GPL-3.0+',
 );
 
 // An array of commands that you wish to run and output.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f0dd856b9077bf19b2359039ca23cea609fb4fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/HostStats
Gerrit-Branch: master
Gerrit-Owner: Hydriz ad...@alphacorp.tk
Gerrit-Reviewer: Hydriz ad...@alphacorp.tk

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


[MediaWiki-commits] [Gerrit] Fix license name - change (mediawiki...CloseWikis)

2014-01-11 Thread Hydriz (Code Review)
Hydriz has submitted this change and it was merged.

Change subject: Fix license name
..


Fix license name

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

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



diff --git a/CloseWikis.php b/CloseWikis.php
index 2efe37c..4d8b3c8 100644
--- a/CloseWikis.php
+++ b/CloseWikis.php
@@ -28,7 +28,7 @@
'author' = array( 'Victor Vasiliev', 'Hydriz Scholz' ),
'descriptionmsg' = 'closewikis-desc',
'url'= 
'https://www.mediawiki.org/wiki/Extension:CloseWikis',
-   'license-name'   = 'GNU GPL v2',
+   'license-name'   = 'GPL-2.0+',
 );
 
 $dir = dirname( __FILE__ );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b74fc38d73b0acbca5bae81a267f8d1a6ab37d6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CloseWikis
Gerrit-Branch: master
Gerrit-Owner: Hydriz ad...@alphacorp.tk
Gerrit-Reviewer: Hydriz ad...@alphacorp.tk

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


[MediaWiki-commits] [Gerrit] Composer: suggest does not take version, but description - change (mediawiki/core)

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

Change subject: Composer: suggest does not take version, but description
..


Composer: suggest does not take version, but description

Change-Id: I06b4fc1b23ac35dda1ab69769d773c8ab8d9aaf1
---
M composer-example.json
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/composer-example.json b/composer-example.json
index 6c4d37f..cf63678 100644
--- a/composer-example.json
+++ b/composer-example.json
@@ -3,9 +3,9 @@
php: =5.3.2
},
suggest: {
-   ext-fileinfo: *,
-   ext-mbstring: *,
-   ext-wikidiff2: *,
-   ext-apc: *
+   ext-fileinfo: More accurate file type detection for uploaded 
files,
+   ext-mbstring: Faster unicode handling,
+   ext-wikidiff2: Faster diff generation,
+   ext-apc: Speed up MediaWiki with opcode caching (before PHP 
5.5)
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06b4fc1b23ac35dda1ab69769d773c8ab8d9aaf1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Correct return type doc for DatabaseBase::getLBInfo() - change (mediawiki/core)

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

Change subject: Correct return type doc for DatabaseBase::getLBInfo()
..


Correct return type doc for DatabaseBase::getLBInfo()

This confused PHPStorm's code analyser.

Change-Id: If99abfa6ca9e52a39b6d2621441686ab564781c7
---
M includes/db/Database.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/db/Database.php b/includes/db/Database.php
index 45a214e..6e87c40 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -445,7 +445,7 @@
 * @param string $name The entry of the info array to get, or null to 
get the
 *   whole array
 *
-* @return LoadBalancer|null
+* @return array|mixed|null
 */
public function getLBInfo( $name = null ) {
if ( is_null( $name ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If99abfa6ca9e52a39b6d2621441686ab564781c7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add 'get range on change' toggle button to standalone demo - change (VisualEditor/VisualEditor)

2014-01-11 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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


Change subject: Add 'get range on change' toggle button to standalone demo
..

Add 'get range on change' toggle button to standalone demo

In the same way we have 'dump model on change', allow testers to
continuously monitor the current range.

Change-Id: I9a63c0cdd96b21958c1c4a6c52fab0e502dc4d29
---
M demos/ve/demo.js
1 file changed, 22 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/81/106881/1

diff --git a/demos/ve/demo.js b/demos/ve/demo.js
index e20668f..3c1ac40 100644
--- a/demos/ve/demo.js
+++ b/demos/ve/demo.js
@@ -17,16 +17,17 @@
startTextInput = new OO.ui.TextInputWidget( { 'readOnly': true 
} ),
endTextInput = new OO.ui.TextInputWidget( { 'readOnly': true } 
),
startTextInputLabel = new OO.ui.InputLabelWidget(
-   { 'label': 'Start', 'input': startTextInput }
+   { 'label': 'Range', 'input': startTextInput }
),
endTextInputLabel = new OO.ui.InputLabelWidget(
-   { 'label': 'End', 'input': endTextInput }
+   { 'label': '-', 'input': endTextInput }
),
-   getRangeButton = new OO.ui.PushButtonWidget( { 'label': 'Get 
selected range' } ),
+   getRangeButton = new OO.ui.PushButtonWidget( { 'label': 'Get 
range' } ),
+   getRangeChangeToggle = new OO.ui.ToggleButtonWidget( { 'label': 
'Get range on change' } ),
logRangeButton = new OO.ui.PushButtonWidget(
{ 'label': 'Log to console', 'disabled': true }
),
-   dumpModelButton = new OO.ui.PushButtonWidget( { 'label': 'Dump 
model once' } ),
+   dumpModelButton = new OO.ui.PushButtonWidget( { 'label': 'Dump 
model' } ),
dumpModelChangeToggle = new OO.ui.ToggleButtonWidget( { 
'label': 'Dump model on change' } ),
validateButton = new OO.ui.PushButtonWidget( { 'label': 
'Validate view and model' } );
 
@@ -34,6 +35,7 @@
 
$( '.ve-demo-utilities-commands' ).append(
getRangeButton.$element,
+   getRangeChangeToggle.$element,
startTextInputLabel.$element,
startTextInput.$element,
endTextInputLabel.$element,
@@ -71,6 +73,7 @@
.promise().done( function () {

target.$document[0].focus();
currentTarget = target;
+   
getRangeChangeToggle.emit( 'click' );

dumpModelChangeToggle.emit( 'click' );
} );
} );
@@ -157,6 +160,13 @@
$( '#ve-dump' ).show();
}
 
+   function getRange() {
+   var range = currentTarget.surface.view.model.getSelection();
+   startTextInput.setValue( range.start );
+   endTextInput.setValue( range.end );
+   logRangeButton.setDisabled( false );
+   }
+
// Open initial page
 
if ( /^#!\/src\/.+$/.test( location.hash ) ) {
@@ -176,11 +186,14 @@
 
// Events
 
-   getRangeButton.on( 'click', function () {
-   var range = currentTarget.surface.view.model.getSelection();
-   startTextInput.setValue( range.start );
-   endTextInput.setValue( range.end );
-   logRangeButton.setDisabled( false );
+   getRangeButton.on( 'click', getRange );
+   getRangeChangeToggle.on( 'click', function () {
+   if ( getRangeChangeToggle.getValue() ) {
+   getRange();
+   currentTarget.surface.model.on( 'select', getRange );
+   } else {
+   currentTarget.surface.model.off( 'select', getRange );
+   }
} );
 
logRangeButton.on( 'click', function () {

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

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

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


[MediaWiki-commits] [Gerrit] JSHint: fix the last jslint/hint failures - change (mediawiki...CodeEditor)

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

Change subject: JSHint: fix the last jslint/hint failures
..


JSHint: fix the last jslint/hint failures

Change-Id: I3695d0da964ee607d91510c490793aca1ace5d58
---
A .jshint
M modules/ext.codeEditor.geshi.js
M modules/jquery.codeEditor.js
3 files changed, 25 insertions(+), 5 deletions(-)

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



diff --git a/.jshint b/.jshint
new file mode 100644
index 000..dae6c7d
--- /dev/null
+++ b/.jshint
@@ -0,0 +1,18 @@
+{
+/* Common */
+
+// Enforcing
+camelcase: true,
+curly: true,
+eqeqeq: true,
+immed: true,
+latedef: true,
+newcap: true,
+noarg: true,
+noempty: true,
+nonew: true,
+quotmark: single,
+trailing: true,
+undef: true,
+unused: true
+}
diff --git a/modules/ext.codeEditor.geshi.js b/modules/ext.codeEditor.geshi.js
index b1fe6ea..876c989 100644
--- a/modules/ext.codeEditor.geshi.js
+++ b/modules/ext.codeEditor.geshi.js
@@ -140,8 +140,9 @@
 
setLanguage = function ( lang ) {
geshiLang = lang;
-   var aceLang = map[geshiLang];
-   codeEditor.getSession().setMode( new 
(require( ace/mode/ + aceLang ).Mode) );
+   var aceLang = map[geshiLang],
+   AceLangMode = require( 
ace/mode/ + aceLang ).Mode;
+   codeEditor.getSession().setMode( new 
AceLangMode() );
};
setLanguage( geshiLang );
 
diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js
index 31d9408..df64d43 100644
--- a/modules/jquery.codeEditor.js
+++ b/modules/jquery.codeEditor.js
@@ -131,7 +131,7 @@
 * Sets up the iframe in place of the textarea to allow 
more advanced operations
 */
'setupCodeEditor': function () {
-   var box, lang, container, editdiv, session, 
resize, summary;
+   var box, lang, container, editdiv, session, 
resize, summary, AceLangMode;
 
box = context.$textarea;
lang = mw.config.get( 
wgCodeEditorCurrentLanguage );
@@ -184,7 +184,8 @@
// updated right away to actually use 
the new style.
$( mw ).bind( 'LivePreviewPrepare', 
context.evt.codeEditorSubmit );
 
-   session.setMode( new (require( 
ace/mode/ + lang ).Mode) );
+   AceLangMode = require( ace/mode/ + 
lang ).Mode;
+   session.setMode( new AceLangMode() );
 
// Force the box to resize horizontally 
to match in future :D
resize = function () {
@@ -251,7 +252,7 @@
}
 
// Line numbers in CodeEditor are 
zero-based
-   line = parseInt( result[1] );
+   line = parseInt( result[1], 10 );
context.codeEditor.navigateTo( line - 
1, 0 );
// Scroll up a bit to give some context
context.codeEditor.scrollToRow( line - 
4 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3695d0da964ee607d91510c490793aca1ace5d58
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: TheDJ hartman.w...@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] Fix join message gender - change (mediawiki...MediaWikiChat)

2014-01-11 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Fix join message gender
..

Fix join message gender

The gender on join messages was not being passed to the actual message. It
is passed now

Change-Id: I653b85d1005fea8e61515d285642d50f189ab1a6
---
M MediaWikiChat.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 1c4c9cf..781739f 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -379,7 +379,7 @@
MediaWikiChat.setupUserLinks();
 
if ( !firstTime ) {
-   MediaWikiChat.addSystemMessage( mw.message( 
'chat-joined', user.name ).text(), MediaWikiChat.now() );
+   MediaWikiChat.addSystemMessage( mw.message( 
'chat-joined', user.name, user.gender ).text(), MediaWikiChat.now() );
MediaWikiChat.scrollToBottom();
}
},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I653b85d1005fea8e61515d285642d50f189ab1a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Error message for invalid login changed. - change (wikimedia...modifications)

2014-01-11 Thread Tinaj1234 (Code Review)
Tinaj1234 has uploaded a new change for review.

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


Change subject: Error message for invalid login changed.
..

Error message for invalid login changed.

Error message, The username or password you entered is not valid.
changed to The email address or password you entered is not valid..

Bug: 50376
Change-Id: Ib364cef6793497bccfa3f8ff76ee36cb073bade4
---
M template/en/custom/global/user-error.html.tmpl
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bugzilla/modifications 
refs/changes/83/106883/1

diff --git a/template/en/custom/global/user-error.html.tmpl 
b/template/en/custom/global/user-error.html.tmpl
index 5d8800d..c4cb367 100644
--- a/template/en/custom/global/user-error.html.tmpl
+++ b/template/en/custom/global/user-error.html.tmpl
@@ -1005,7 +1005,7 @@
 
   [% ELSIF error == invalid_username_or_password %]
 [% title = Invalid Username Or Password %]
-The username or password you entered is not valid.
+The email address or password you entered is not valid.
 [%# People get two login attempts before being warned about
   # being locked out.
   #%]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib364cef6793497bccfa3f8ff76ee36cb073bade4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/bugzilla/modifications
Gerrit-Branch: master
Gerrit-Owner: Tinaj1234 tinajohnson.1...@gmail.com

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


[MediaWiki-commits] [Gerrit] Stop heights adjusting on timestamp hover - change (mediawiki...MediaWikiChat)

2014-01-11 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Stop heights adjusting on timestamp hover
..

Stop heights adjusting on timestamp hover

When hovering over timestamps on messages of a certain length, all the
messages below were being pushed down as the longer timestamp broke a
line.
Fixed with some CSS trickery

Change-Id: I1e4aeb463f92daa0a3b67f05242de8522c04299d
---
M MediaWikiChat.css
M MediaWikiChat.js
2 files changed, 14 insertions(+), 4 deletions(-)


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

diff --git a/MediaWikiChat.css b/MediaWikiChat.css
index c40ca4d..6fdf565 100644
--- a/MediaWikiChat.css
+++ b/MediaWikiChat.css
@@ -42,11 +42,21 @@
float: right;
margin-left: 6px;
margin-right: 3px;
+   position: relative;
 }
 .mwchat-item-timestamp {
color: #CCC;
text-transform: lowercase;
 }
+.mwchat-item-timestamp.real {
+   text-align: right;
+   width: 8em;
+   position: absolute;
+   right: 0;
+   top: 0;
+   background-color: #FFF;
+   padding-bottom: 5px;
+}
 .mwchat-item-user {
margin: 5px;
width: 20%;
diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 1c4c9cf..f723d53 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -276,11 +276,11 @@
elem = $( html ).appendTo( $( '#mwchat-table' ) );
 
elem.hover( function() {
-   $( this ).find( '.pretty' ).hide();
+   $( this ).find( '.pretty' ).css( 'visibility', 
'hidden' );
$( this ).find( '.real' ).show();
}, function() {
$( this ).find( '.real' ).hide();
-   $( this ).find( '.pretty' ).show();
+   $( this ).find( '.pretty' ).css( 'visibility', 
'visible' );
});
 
elem.find( 'a' ).attr( 'target', '_blank' );
@@ -441,9 +441,9 @@
} );
 
$( '.mwchat-useritem' ).hover( function() {
-   $( this ).find( '.mwchat-useritem-pmlink' ).fadeIn(200);
+   $( this ).find( '.mwchat-useritem-pmlink' ).fadeIn( 100 
);
}, function() {
-   $( this ).find( '.mwchat-useritem-pmlink' 
).fadeOut(200);
+   $( this ).find( '.mwchat-useritem-pmlink' ).fadeOut( 
100 );
} );
},
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e4aeb463f92daa0a3b67f05242de8522c04299d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Stop heights adjusting on timestamp hover - change (mediawiki...MediaWikiChat)

2014-01-11 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Stop heights adjusting on timestamp hover
..


Stop heights adjusting on timestamp hover

When hovering over timestamps on messages of a certain length, all the
messages below were being pushed down as the longer timestamp broke a
line.
Fixed with some CSS trickery

Change-Id: I1e4aeb463f92daa0a3b67f05242de8522c04299d
---
M MediaWikiChat.css
M MediaWikiChat.js
2 files changed, 14 insertions(+), 4 deletions(-)

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



diff --git a/MediaWikiChat.css b/MediaWikiChat.css
index c40ca4d..6fdf565 100644
--- a/MediaWikiChat.css
+++ b/MediaWikiChat.css
@@ -42,11 +42,21 @@
float: right;
margin-left: 6px;
margin-right: 3px;
+   position: relative;
 }
 .mwchat-item-timestamp {
color: #CCC;
text-transform: lowercase;
 }
+.mwchat-item-timestamp.real {
+   text-align: right;
+   width: 8em;
+   position: absolute;
+   right: 0;
+   top: 0;
+   background-color: #FFF;
+   padding-bottom: 5px;
+}
 .mwchat-item-user {
margin: 5px;
width: 20%;
diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 1c4c9cf..f723d53 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -276,11 +276,11 @@
elem = $( html ).appendTo( $( '#mwchat-table' ) );
 
elem.hover( function() {
-   $( this ).find( '.pretty' ).hide();
+   $( this ).find( '.pretty' ).css( 'visibility', 
'hidden' );
$( this ).find( '.real' ).show();
}, function() {
$( this ).find( '.real' ).hide();
-   $( this ).find( '.pretty' ).show();
+   $( this ).find( '.pretty' ).css( 'visibility', 
'visible' );
});
 
elem.find( 'a' ).attr( 'target', '_blank' );
@@ -441,9 +441,9 @@
} );
 
$( '.mwchat-useritem' ).hover( function() {
-   $( this ).find( '.mwchat-useritem-pmlink' ).fadeIn(200);
+   $( this ).find( '.mwchat-useritem-pmlink' ).fadeIn( 100 
);
}, function() {
-   $( this ).find( '.mwchat-useritem-pmlink' 
).fadeOut(200);
+   $( this ).find( '.mwchat-useritem-pmlink' ).fadeOut( 
100 );
} );
},
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e4aeb463f92daa0a3b67f05242de8522c04299d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Fix join message gender - change (mediawiki...MediaWikiChat)

2014-01-11 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Fix join message gender
..


Fix join message gender

The gender on join messages was not being passed to the actual message. It
is passed now

Change-Id: I653b85d1005fea8e61515d285642d50f189ab1a6
---
M MediaWikiChat.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 1c4c9cf..781739f 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -379,7 +379,7 @@
MediaWikiChat.setupUserLinks();
 
if ( !firstTime ) {
-   MediaWikiChat.addSystemMessage( mw.message( 
'chat-joined', user.name ).text(), MediaWikiChat.now() );
+   MediaWikiChat.addSystemMessage( mw.message( 
'chat-joined', user.name, user.gender ).text(), MediaWikiChat.now() );
MediaWikiChat.scrollToBottom();
}
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I653b85d1005fea8e61515d285642d50f189ab1a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Increased the number of rows - change (mediawiki...AbuseFilter)

2014-01-11 Thread Amruthasangeeth (Code Review)
Amruthasangeeth has uploaded a new change for review.

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


Change subject: Increased the number of rows
..

Increased the number of rows

The text areas for the table row had only 5 rows initially which was
small and it needed scroll to view it completely.
Now it has been changed to 25.

Bug: 59866
Change-Id: I77a092ac956bd9a9e4b7eb38abb16876087b8560
---
M modules/ext.abuseFilter.css
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ext.abuseFilter.css b/modules/ext.abuseFilter.css
index c1d3b2a..b20bd0a 100644
--- a/modules/ext.abuseFilter.css
+++ b/modules/ext.abuseFilter.css
@@ -33,7 +33,7 @@
 }
 
 div.mw-abuselog-var-value {
-   max-height: 10em;
+   max-height: 25em;
max-width: 100%;
overflow: auto;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77a092ac956bd9a9e4b7eb38abb16876087b8560
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Amruthasangeeth amruthasange...@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] Rename mw-ui-text class to mw-ui-quiet - change (mediawiki...Flow)

2014-01-11 Thread Spage (Code Review)
Spage has uploaded a new change for review.

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


Change subject: Rename mw-ui-text class to mw-ui-quiet
..

Rename mw-ui-text class to mw-ui-quiet

No other changes, no visible changes.
This is for compatibility with the updated Agora mw-ui styles  that will
some day be in core (I1dd9bfac).

Bug: 56641
Change-Id: I0f46d681f4ff81a4f83e9935b601c544dcd4e2dc
---
M modules/base/ui-functions.js
M modules/discussion/forms.js
M modules/discussion/ui.js
M modules/mediawiki.ui/styles/mixins/buttons.less
4 files changed, 6 insertions(+), 7 deletions(-)


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

diff --git a/modules/base/ui-functions.js b/modules/base/ui-functions.js
index dafe041..148575a 100644
--- a/modules/base/ui-functions.js
+++ b/modules/base/ui-functions.js
@@ -117,7 +117,7 @@
.text( 
mw.msg( 'flow-cancel' ) )

.addClass( 'flow-cancel-link' )

.addClass( 'mw-ui-button' )
-   
.addClass( 'mw-ui-text' )
+   
.addClass( 'mw-ui-quiet' )
.attr( 
'href', '#' )
.click( 
function ( e ) {

e.preventDefault();
diff --git a/modules/discussion/forms.js b/modules/discussion/forms.js
index 4e194f9..a3759ec 100644
--- a/modules/discussion/forms.js
+++ b/modules/discussion/forms.js
@@ -244,7 +244,7 @@
$( 'a/' )

.addClass( 'flow-cancel-link' )

.addClass( 'mw-ui-button' )
-   
.addClass( 'mw-ui-text' )
+   
.addClass( 'mw-ui-quiet' )
.attr( 
'href', '#' )
.text( 
mw.msg( 'flow-cancel' ) )
.click( 
function ( e ) {
diff --git a/modules/discussion/ui.js b/modules/discussion/ui.js
index aa5b4ac..ab80a35 100644
--- a/modules/discussion/ui.js
+++ b/modules/discussion/ui.js
@@ -113,7 +113,7 @@
.attr( 'href', '#' )
.addClass( 'flow-cancel-link' )
.addClass( 'mw-ui-button' )
-   .addClass( 'mw-ui-text' )
+   .addClass( 'mw-ui-quiet' )
.text( mw.msg( 'flow-cancel' ) )
.click( function ( e ) {
e.preventDefault();
@@ -173,7 +173,7 @@
.attr( 'href', '#' )
.addClass( 'flow-cancel-link' )
.addClass( 'mw-ui-button' )
-   .addClass( 'mw-ui-text' )
+   .addClass( 'mw-ui-quiet' )
.text( mw.msg( 'flow-cancel' ) )
.click( function ( e ) {
e.preventDefault();
@@ -223,7 +223,7 @@
.attr( 'href', '#' )
.addClass( 'flow-cancel-link' )
.addClass( 'mw-ui-button' )
-   .addClass( 'mw-ui-text' )
+   .addClass( 'mw-ui-quiet' )
.text( mw.msg( 'flow-cancel' ) )
.click( function ( e ) {
e.preventDefault();
diff --git a/modules/mediawiki.ui/styles/mixins/buttons.less 
b/modules/mediawiki.ui/styles/mixins/buttons.less
index cab29ea..8ea8129 100644
--- a/modules/mediawiki.ui/styles/mixins/buttons.less
+++ b/modules/mediawiki.ui/styles/mixins/buttons.less
@@ -50,8 +50,7 @@
 
 
// text-only, borderless text-button for secondary or quiet actions.
-   // TODO Rename this mw-ui-quiet
-   .mw-ui-text {
+   .mw-ui-quiet {
border: 1px solid transparent;
box-shadow: 0px 0px 0px 0px transparent;
-webkit-box-shadow: 0px 0px 0px 0px transparent;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f46d681f4ff81a4f83e9935b601c544dcd4e2dc

[MediaWiki-commits] [Gerrit] Consistency tweaks, round 2 - change (mediawiki...MediaWikiChat)

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

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


Change subject: Consistency tweaks, round 2
..

Consistency tweaks, round 2

* Add PLURAL
* Fix UTF-8 encodig

Change-Id: I0d7fefe0a82ca07bc2ccfdd03862881329f1463f
---
M MediaWikiChat.i18n.php
M MediaWikiChat.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/MediaWikiChat.i18n.php b/MediaWikiChat.i18n.php
index d2d1102..6c8ea7d 100644
--- a/MediaWikiChat.i18n.php
+++ b/MediaWikiChat.i18n.php
@@ -23,7 +23,7 @@
'chat-just-now' = 'just now',
 
'chat-a-minute-ago' = 'a minute ago',
-   'chat-minutes-ago' = '$1 minutes ago',
+   'chat-minutes-ago' = '{{PLURAL:$1|1 minute|$1 minutes}} ago',
 
'chat-yesterday' = 'yesterday',
 
diff --git a/MediaWikiChat.php b/MediaWikiChat.php
index 00da406..9c01da8 100644
--- a/MediaWikiChat.php
+++ b/MediaWikiChat.php
@@ -6,7 +6,7 @@
  * @ingroup Extensions
  * @version 1.0
  * @author Adam Carter
- * @copyright Copyright © 2013, Adam Carter
+ * @copyright Copyright ® 2013, Adam Carter
  */
 
 if ( !defined( 'MEDIAWIKI' ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d7fefe0a82ca07bc2ccfdd03862881329f1463f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] (bug 58976) Do not get() the item straight after preloading it. - change (pywikibot/core)

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

Change subject: (bug 58976) Do not get() the item straight after preloading it.
..


(bug 58976) Do not get() the item straight after preloading it.

The ItemPage.get() raises the NoPage exception if it does not exists.
It's not possible to catch this and return to the iterator:

try:
for page in preloaditempages():
# do something with page
except NoPage:
# ??? No way to continue processing the next page

By removing the internal .get(), we allow the following:

for page in preloaditempages():
# page is not guaranteed to exist now
try:
# do something with page
except NoPage:
# print an error
continue # with the next page

Change-Id: I9e09ba42e4562a962731f6c2cca70c020901828f
---
M pywikibot/site.py
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  Multichill: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/site.py b/pywikibot/site.py
index a090d04..31ef5b2 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3621,7 +3621,6 @@
 for qid in data['entities']:
 item = pywikibot.ItemPage(self, qid)
 item._content = data['entities'][qid]
-item.get()  # parses json and preloads the various properties
 yield item
 
 def getPropertyType(self, prop):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e09ba42e4562a962731f6c2cca70c020901828f
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Multichill maar...@mdammers.nl
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] Rename RedirectSpecialPage subclasses - change (mediawiki/core)

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

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


Change subject: Rename RedirectSpecialPage subclasses
..

Rename RedirectSpecialPage subclasses

Renaming for the sake of sanity, consistency and grammar:
* RedirectSpecialArticle   → RedirectSpecialPageToPage
* SpecialRedirectToSpecial → RedirectSpecialPageToSpecial

Also renamed a hook:
* RedirectSpecialArticleRedirectParams → RedirectSpecialPageToPageRedirectParams

All changes are backwards-compatible: old class and hook names are
just deprecated (using newly introduced mechanisms: see I1d3fb04a and
I8fd29e97) and continue to work.

Bug: 58215
Change-Id: I31ddd5f79f71390fd13caf61410e5214a280bcff
---
M docs/hooks.txt
M includes/AutoLoader.php
M includes/specialpage/RedirectSpecialPage.php
M includes/specials/SpecialCreateAccount.php
M includes/specials/SpecialListusers.php
M includes/specials/SpecialMyRedirectPages.php
6 files changed, 18 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/106888/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index bbe1680..aa9f614 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1983,7 +1983,7 @@
 'RecentChange_save': Called at the end of RecentChange::save().
 $recentChange: RecentChange object
 
-'RedirectSpecialArticleRedirectParams': Lets you alter the set of parameter
+'RedirectSpecialPageToPageRedirectParams': Lets you alter the set of parameter
 names such as oldid that are preserved when using redirecting special pages
 such as Special:MyPage and Special:MyTalk.
 $redirectParams: An array of parameters preserved by redirecting special 
pages.
diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 0e56b7c..c04b204 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -176,8 +176,10 @@
'RawMessage' = 'includes/Message.php',
'RdfMetaData' = 'includes/Metadata.php',
'ReadOnlyError' = 'includes/Exception.php',
-   'RedirectSpecialArticle' = 
'includes/specialpage/RedirectSpecialPage.php',
+   'RedirectSpecialArticle' = 'alias:RedirectSpecialPageToPage?v=1.23',
'RedirectSpecialPage' = 'includes/specialpage/RedirectSpecialPage.php',
+   'RedirectSpecialPageToPage' = 
'includes/specialpage/RedirectSpecialPage.php',
+   'RedirectSpecialPageToSpecial' = 
'includes/specialpage/RedirectSpecialPage.php',
'ReverseChronologicalPager' = 'includes/Pager.php',
'RevisionItem' = 'includes/RevisionList.php',
'RevisionItemBase' = 'includes/RevisionList.php',
@@ -201,7 +203,7 @@
'SpecialAllMyUploads' = 'includes/specials/SpecialMyRedirectPages.php',
'SpecialPage' = 'includes/specialpage/SpecialPage.php',
'SpecialPageFactory' = 'includes/SpecialPageFactory.php',
-   'SpecialRedirectToSpecial' = 
'includes/specialpage/RedirectSpecialPage.php',
+   'SpecialRedirectToSpecial' = 
'alias:RedirectSpecialPageToSpecial?v=1.23',
'SquidPurgeClient' = 'includes/SquidPurgeClient.php',
'SquidPurgeClientPool' = 'includes/SquidPurgeClient.php',
'StatCounter' = 'includes/StatCounter.php',
diff --git a/includes/specialpage/RedirectSpecialPage.php 
b/includes/specialpage/RedirectSpecialPage.php
index eb8557a..4272494 100644
--- a/includes/specialpage/RedirectSpecialPage.php
+++ b/includes/specialpage/RedirectSpecialPage.php
@@ -90,7 +90,7 @@
 /**
  * @ingroup SpecialPage
  */
-abstract class SpecialRedirectToSpecial extends RedirectSpecialPage {
+abstract class RedirectSpecialPageToSpecial extends RedirectSpecialPage {
// @todo FIXME: Visibility must be declared
var $redirName, $redirSubpage;
 
@@ -164,16 +164,16 @@
  *
  * @par Hook extension:
  * Extensions can add to the redirect parameters list by using the hook
- * RedirectSpecialArticleRedirectParams
+ * RedirectSpecialPageToPageRedirectParams
  *
  * This hook allows extensions which add GET parameters like FlaggedRevs to
  * retain those parameters when redirecting using special pages.
  *
  * @par Hook extension example:
  * @code
- * $wgHooks['RedirectSpecialArticleRedirectParams'][] =
- * 'MyExtensionHooks::onRedirectSpecialArticleRedirectParams';
- * public static function onRedirectSpecialArticleRedirectParams( 
$redirectParams ) {
+ * $wgHooks['RedirectSpecialPageToPageRedirectParams'][] =
+ * 'MyExtensionHooks::onRedirectSpecialPageToPageRedirectParams';
+ * public static function onRedirectSpecialPageToPageRedirectParams( 
$redirectParams ) {
  * $redirectParams[] = 'stable';
  * return true;
  * }
@@ -181,7 +181,7 @@
  *
  * @ingroup SpecialPage
  */
-abstract class RedirectSpecialArticle extends RedirectSpecialPage {
+abstract class RedirectSpecialPageToPage extends RedirectSpecialPage {
function __construct( $name ) {
parent::__construct( $name 

[MediaWiki-commits] [Gerrit] Added test if Lightbox is attached - change (mediawiki...MultimediaViewer)

2014-01-11 Thread Apsdehal (Code Review)
Apsdehal has uploaded a new change for review.

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


Change subject: Added test if Lightbox is attached
..

Added test if Lightbox is attached

Currently LIP.resizeCallBack was called even when lightbox was not appended, so 
I added a test to check the same.

Change-Id: Ie3a40a5d98f12a95b1d54e130896f67b71e927fa
---
M resources/multilightbox/lightboxinterface.js
1 file changed, 8 insertions(+), 4 deletions(-)


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

diff --git a/resources/multilightbox/lightboxinterface.js 
b/resources/multilightbox/lightboxinterface.js
index 607c7c6..7725fd4 100644
--- a/resources/multilightbox/lightboxinterface.js
+++ b/resources/multilightbox/lightboxinterface.js
@@ -119,6 +119,7 @@
this.$wrapper,
this.$overlay
);
+   LIP.currentlyAppended = true;
};
 
/**
@@ -130,6 +131,8 @@
 
this.$wrapper.detach();
this.$overlay.detach();
+
+   LIP.currentlyAppended = false;
};
 
LIP.fullscreen = function () {
@@ -172,11 +175,12 @@
 * @protected
 */
LIP.resizeCallback = function() {
-   // TODO: This is called even when the Lightbox is not attached !
-   var result = lightboxHooks.callAll( 'imageResize', this );
+   if( LIP.currentlyAppended ){
+   var result = lightboxHooks.callAll( 'imageResize', this 
);
 
-   if ( result !== false ) {
-   this.autoResizeImage();
+   if ( result !== false ) {
+   this.autoResizeImage();
+   }
}
};
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3a40a5d98f12a95b1d54e130896f67b71e927fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Apsdehal amanpreet.iitr2...@gmail.com

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


[MediaWiki-commits] [Gerrit] Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/me... - change (mediawiki/core)

2014-01-11 Thread AalekhN (Code Review)
AalekhN has uploaded a new change for review.

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


Change subject: Merge branch 'master' of 
ssh://gerrit.wikimedia.org:29418/mediawiki/core into bug/whatlinkshere
..

Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/core into 
bug/whatlinkshere

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/106890/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d4d03e511fc1ecfead3d5374e75eb1d304fe2a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: AalekhN aalekh1...@rediffmail.com

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


[MediaWiki-commits] [Gerrit] Increased the number of rows in AbuseFilter's Filter testin... - change (mediawiki...AbuseFilter)

2014-01-11 Thread Anjanasasindran123 (Code Review)
Anjanasasindran123 has uploaded a new change for review.

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


Change subject: Increased  the number of rows in AbuseFilter's Filter testing 
textarea
..

Increased  the number of rows in AbuseFilter's Filter testing textarea

The text areas for the table row had only 5 rows, which is a lot less than the
default number of rows.So now the number of rows in the testing textarea is 
changed to 15.

Bug: 59869
Change-Id: I9f221e7a49473ae1d47f7ecf26235366d257
---
M AbuseFilter.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php
index 8039fc8..e34b80e 100644
--- a/AbuseFilter.class.php
+++ b/AbuseFilter.class.php
@@ -1721,7 +1721,7 @@
}
 
$rules = rtrim( $rules ) . \n;
-   $rules = Xml::textarea( $textName, $rules, 40, 5, 
$textareaAttrib );
+   $rules = Xml::textarea( $textName, $rules, 40,15, 
$textareaAttrib );
 
if ( $canEdit ) {
$dropDown = self::getBuilderValues();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f221e7a49473ae1d47f7ecf26235366d257
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Anjanasasindran123 anjanasasindran...@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] Changed date format in l10nupdate-1 - change (operations/puppet)

2014-01-11 Thread Tinaj1234 (Code Review)
Tinaj1234 has uploaded a new change for review.

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


Change subject: Changed date format in l10nupdate-1
..

Changed date format in l10nupdate-1

Changed date format in script file as year comes after both the time
and the time zone. The script runs LocalisationUpdate's update.php
script and then logs to the server admin log.

Bug: 52986
Change-Id: I7ec72331bfd3b23515fd9a2f788f485f92ddcfad
---
M files/misc/l10nupdate/l10nupdate-1
1 file changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/files/misc/l10nupdate/l10nupdate-1 
b/files/misc/l10nupdate/l10nupdate-1
index f953728..5ba96bc 100755
--- a/files/misc/l10nupdate/l10nupdate-1
+++ b/files/misc/l10nupdate/l10nupdate-1
@@ -10,7 +10,7 @@
 GITREPOS=core extensions
 
 umask 0002
-echo Starting l10nupdate at `date`.
+echo Starting l10nupdate at `date --rfc-3339=seconds`.
 
 # Update i18n messages from git to the HEAD of master, or create the clone if 
it doesn't exist yet
 echo Updating git clone ...
@@ -71,24 +71,24 @@
  --all \
  --quiet
then
-   echo Rebuilding localization cache at `date`
+   echo Rebuilding localization cache at `date 
--rfc-3339=seconds`
/usr/local/bin/mwscript rebuildLocalisationCache.php 
--wiki=$mwDbName \
  --quiet 
--outdir=/var/lib/l10nupdate/cache-$mwVerNum
# Copy the LC files
-   echo Completed at `date`. Copying LC files to 
$MW_COMMON_SOURCE
+   echo Completed at `date --rfc-3339=seconds`. Copying LC files 
to $MW_COMMON_SOURCE
cp --preserve=timestamps --force 
/var/lib/l10nupdate/cache-$mwVerNum/l10n_cache-* 
$MW_COMMON_SOURCE/php-$mwVerNum/cache/l10n
# Include JSON versions of the CDB files and add MD5 files
/usr/local/bin/refreshCdbJsonFiles 
--directory=$MW_COMMON_SOURCE/php-$mwVerNum/cache/l10n
 
-   echo Syncing to Apaches at `date`
+   echo Syncing to Apaches at `date --rfc-3339=seconds`
SYNC_START=$(date +%s)
$BINDIR/sync-l10nupdate-1 $mwVerNum
SYNC_END=$(date +%s)
-   $BINDIR/dologmsg !log LocalisationUpdate completed ($mwVerNum) 
at `date`
-   echo All done at `date`
+   $BINDIR/dologmsg !log LocalisationUpdate completed ($mwVerNum) 
at `date --rfc-3339=seconds`
+   echo All done at `date --rfc-3339=seconds`
$BINDIR/deploy2graphite l10nupdate-sync $((SYNC_END-SYNC_START))
else
-   $BINDIR/dologmsg !log LocalisationUpdate failed ($mwVerNum) at 
`date`
+   $BINDIR/dologmsg !log LocalisationUpdate failed ($mwVerNum) at 
`date --rfc-3339=seconds`
echo FAILED
fi
 done
@@ -100,4 +100,4 @@
/usr/local/bin/mwscript 
extensions/WikimediaMaintenance/refreshMessageBlobs.php --wiki=$wiki
 done
 echo All done
-$BINDIR/dologmsg !log LocalisationUpdate ResourceLoader cache refresh 
completed at `date`
+$BINDIR/dologmsg !log LocalisationUpdate ResourceLoader cache refresh 
completed at `date --rfc-3339=seconds`

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ec72331bfd3b23515fd9a2f788f485f92ddcfad
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tinaj1234 tinajohnson.1...@gmail.com

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


[MediaWiki-commits] [Gerrit] Replace usage of some deprecated functions - change (mediawiki...Video)

2014-01-11 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged.

Change subject: Replace usage of some deprecated functions
..


Replace usage of some deprecated functions

* Has some related refactoring because Skin no longer has to be passes around.
* Removed unused globals, local variables and commented out code.
* Some documentation tweaks.

Change-Id: Ie1453e37454d4fa995834db2ec101676444f092d
---
M VideoClass.php
M VideoPage.php
2 files changed, 16 insertions(+), 35 deletions(-)

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



diff --git a/VideoClass.php b/VideoClass.php
index cc7a5b5..4fbe9b3 100644
--- a/VideoClass.php
+++ b/VideoClass.php
@@ -113,8 +113,8 @@
 * Constructor -- create a new Video object from the given Title and set
 * some member variables
 *
-* @param $title Object: Title object associated with the Video
-* @param $context IContextSource nearest context object
+* @param Title $title Title object associated with the Video
+* @param IContextSource $context Nearest context object
 */
public function __construct( $title, IContextSource $context ) {
if( !is_object( $title ) ) {
diff --git a/VideoPage.php b/VideoPage.php
index b519991..514d4af 100644
--- a/VideoPage.php
+++ b/VideoPage.php
@@ -6,7 +6,7 @@
 
/**
 * Constructor and clear the article
-* @param $title Object: reference to a Title object.
+* @param Title $title
 */
public function __construct( $title ) {
parent::__construct( $title );
@@ -29,10 +29,6 @@
$this-video = new Video( $this-getTitle(), 
$this-getContext() );
$out = $this-getContext()-getOutput();
 
-   $videoLinksHTML = 'br /' . Xml::element( 'h2',
-   array( 'id' = 'filelinks' ), wfMsg( 'video-links' ) ) 
. \n;
-   $sk = $this-getContext()-getSkin();
-
// No need to display noarticletext, we use our own message
if ( $this-getID() ) {
parent::view();
@@ -52,13 +48,10 @@
$out-addHTML( $this-getEmbedThisTag() );
 
$this-videoHistory();
-
-   //$wgOut-addHTML( $videoLinksHTML );
-   //$this-videoLinks();
} else {
// Video doesn't exist, so give a link allowing user to 
add one with this name
$title = SpecialPage::getTitleFor( 'AddVideo' );
-   $link = $sk-linkKnown(
+   $link = Linker::linkKnown(
$title,
wfMsgHtml( 'video-novideo-linktext' ),
array(),
@@ -82,7 +75,7 @@
 *  parser hooks, like video name=Foo /...how to fix 
this?
 */
function videoLinks() {
-   global $wgOut, $wgUser;
+   global $wgOut;
 
$limit = 100;
 
@@ -116,7 +109,6 @@
$wgOut-addWikiMsg( 'video-links-to-video', $count );
$wgOut-addHTML( 'ul class=mw-imagepage-linktoimage' . \n 
);
 
-   $sk = $wgUser-getSkin();
$count = 0;
while ( $s = $res-fetchObject() ) {
$count++;
@@ -124,7 +116,7 @@
// We have not yet reached the extra one that 
tells us there is
// more to fetch
$name = Title::makeTitle( $s-page_namespace, 
$s-page_title );
-   $link = $sk-makeKnownLinkObj( $name, '' );
+   $link = Linker::linkKnown( $name );
$wgOut-addHTML( li{$link}/li\n );
}
}
@@ -175,14 +167,12 @@
 * we follow it with an upload history of the video and its usage.
 */
function videoHistory() {
-   global $wgUser, $wgOut;
-
-   $sk = $wgUser-getSkin();
+   global $wgOut;
 
$line = $this-video-nextHistoryLine();
 
if ( $line ) {
-   $list = new VideoHistoryList( $sk );
+   $list = new VideoHistoryList();
$s = $list-beginVideoHistoryList() .
$list-videoHistoryLine(
true,
@@ -244,11 +234,6 @@
  * @todo document
  */
 class VideoHistoryList {
-
-   function __construct( $skin ) {
-   $this-skin = $skin;
-   }
-
function beginVideoHistoryList() {
$s = \n .
Xml::element( 'h2', array( 'id' = 'filehistory' ), 
wfMsgHtml( 'video-history' ) ) .
@@ -262,7 +247,7 @@
}
 
function videoHistoryLine( 

[MediaWiki-commits] [Gerrit] Fix user URLs in sidebar - change (mediawiki...MediaWikiChat)

2014-01-11 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Fix user URLs in sidebar
..

Fix user URLs in sidebar

Wrong concat symbol, easily fixed.

https://github.com/wikimedia/mediawiki-extensions-MediaWikiChat/pull/1

Change-Id: I4464123104426f073c65615e4a1cffddd82e049c
---
M MediaWikiChat.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/MediaWikiChat.hooks.php b/MediaWikiChat.hooks.php
index fdbddfe..1f88f8e 100644
--- a/MediaWikiChat.hooks.php
+++ b/MediaWikiChat.hooks.php
@@ -77,7 +77,7 @@
 
foreach ( $users as $id = $name ) {
$avatar = MediaWikiChat::getAvatar( $id 
);
-   $page = str_replace( '$1', 'User:' + 
urlencode( $name ), $wgArticlePath );
+   $page = str_replace( '$1', 'User:' . 
urlencode( $name ), $wgArticlePath );
$arr[$id] = array(
'text' = $name,
'href' = $page,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4464123104426f073c65615e4a1cffddd82e049c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Fix user URLs in sidebar - change (mediawiki...MediaWikiChat)

2014-01-11 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Fix user URLs in sidebar
..


Fix user URLs in sidebar

Wrong concat symbol, easily fixed.

https://github.com/wikimedia/mediawiki-extensions-MediaWikiChat/pull/1

Change-Id: I4464123104426f073c65615e4a1cffddd82e049c
---
M MediaWikiChat.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/MediaWikiChat.hooks.php b/MediaWikiChat.hooks.php
index fdbddfe..1f88f8e 100644
--- a/MediaWikiChat.hooks.php
+++ b/MediaWikiChat.hooks.php
@@ -77,7 +77,7 @@
 
foreach ( $users as $id = $name ) {
$avatar = MediaWikiChat::getAvatar( $id 
);
-   $page = str_replace( '$1', 'User:' + 
urlencode( $name ), $wgArticlePath );
+   $page = str_replace( '$1', 'User:' . 
urlencode( $name ), $wgArticlePath );
$arr[$id] = array(
'text' = $name,
'href' = $page,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4464123104426f073c65615e4a1cffddd82e049c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Improved icon for course talk page notifications - change (mediawiki...EducationProgram)

2014-01-11 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review.

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


Change subject: Improved icon for course talk page notifications
..

Improved icon for course talk page notifications

Change-Id: Ibb72691c340063d3430cc0eca6fba6ec5cf7f099
---
M resources/images/course-talk-notification.png
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/resources/images/course-talk-notification.png 
b/resources/images/course-talk-notification.png
index df17b73..004de59 100644
--- a/resources/images/course-talk-notification.png
+++ b/resources/images/course-talk-notification.png
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb72691c340063d3430cc0eca6fba6ec5cf7f099
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: AndyRussG andrew.green...@gmail.com

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


[MediaWiki-commits] [Gerrit] Improved icon for course talk page notifications - change (mediawiki...EducationProgram)

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

Change subject: Improved icon for course talk page notifications
..


Improved icon for course talk page notifications

Change-Id: Ibb72691c340063d3430cc0eca6fba6ec5cf7f099
---
M resources/images/course-talk-notification.png
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/resources/images/course-talk-notification.png 
b/resources/images/course-talk-notification.png
index df17b73..004de59 100644
--- a/resources/images/course-talk-notification.png
+++ b/resources/images/course-talk-notification.png
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb72691c340063d3430cc0eca6fba6ec5cf7f099
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: AndyRussG andrew.green...@gmail.com
Gerrit-Reviewer: Ragesoss rages...@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] librenms: make main class' config option simpler - change (operations/puppet)

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

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


Change subject: librenms: make main class' config option simpler
..

librenms: make main class' config option simpler

Supplying install_dir, html_dir, rrd_dir  log file to the config hash
is kind of wrong, as it's not KISS: the class already knows the best
position for these and sets up other stuff based on these locations
(e.g. logrotate). Pass them to the config.php template instead, outside
of the config hash and simplify the caller.

Change-Id: I6620ff7bb206d8fee4fb18607930195382611ec9
---
M manifests/role/librenms.pp
M modules/librenms/manifests/init.pp
M modules/librenms/templates/config.php.erb
3 files changed, 21 insertions(+), 11 deletions(-)


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

diff --git a/manifests/role/librenms.pp b/manifests/role/librenms.pp
index f34bb0a..a67ee50 100644
--- a/manifests/role/librenms.pp
+++ b/manifests/role/librenms.pp
@@ -21,11 +21,6 @@
 $config = {
 'title_image'  = 
'url(//upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Wikimedia_Foundation_RGB_logo_with_text.svg/100px-Wikimedia_Foundation_RGB_logo_with_text.svg.png)',
 
-'install_dir'  = $install_dir,
-'html_dir' = ${install_dir}/html,
-'rrd_dir'  = '/srv/librenms/rrd',
-'log_file' = '/var/log/librenms.log',
-
 'db_host'  = 'db1001.eqiad.wmnet',
 'db_user'  = $passwords::librenms::db_user,
 'db_pass'  = $passwords::librenms::db_pass,
@@ -72,6 +67,7 @@
 
 class { '::librenms':
 install_dir = $install_dir,
+rrd_dir = '/srv/librenms/rrd',
 config  = $config,
 }
 class { '::librenms::syslog':
diff --git a/modules/librenms/manifests/init.pp 
b/modules/librenms/manifests/init.pp
index 24c3364..0340bc8 100644
--- a/modules/librenms/manifests/init.pp
+++ b/modules/librenms/manifests/init.pp
@@ -8,11 +8,16 @@
 #   Configuration for LibreNMS, in a puppet hash format.
 #
 # [*install_dir*]
-#   Installation directory for LibreNMS.
+#   Installation directory for LibreNMS. Defaults to /srv/librenms.
+#
+# [*rrd_dir*]
+#   Location where RRD files are going to be placed. Defaults to rrd under
+#   *install_dir*.
 #
 class librenms(
-$config,
+$config={},
 $install_dir='/srv/librenms',
+$rrd_dir=${install_dir}/rrd,
 ) {
 group { 'librenms':
 ensure = present,
@@ -68,6 +73,7 @@
 'nmap',
 'python-mysqldb',
 'rrdtool',
+#'snmp',
 'snmp-mibs-downloader',
 'whois',
 ]:
@@ -77,7 +83,7 @@
 cron { 'librenms-discovery-all':
 ensure  = present,
 user= 'librenms',
-command = ${install_dir}/discovery.php -h all  /dev/null 21,
+command = ${install_dir}/discovery.php -h all /dev/null 21,
 hour= '*/6',
 minute  = '33',
 require = User['librenms'],
@@ -85,18 +91,20 @@
 cron { 'librenms-discovery-new':
 ensure  = present,
 user= 'librenms',
-command = ${install_dir}/discovery.php -h new  /dev/null 21,
+command = ${install_dir}/discovery.php -h new /dev/null 21,
 minute  = '*/5',
 require = User['librenms'],
 }
 cron { 'librenms-poller-all':
 ensure  = present,
 user= 'librenms',
-command = /usr/bin/python ${install_dir}/poller-wrapper.py 16  
/dev/null 21,
+command = python ${install_dir}/poller-wrapper.py 16 /dev/null 
21,
 minute  = '*/5',
 require = User['librenms'],
 }
 
+# syslog script, in an install_dir-agnostic location
+# used by librenms::syslog or a custom alternative placed manually.
 file { '/usr/local/sbin/librenms-syslog':
 ensure = link,
 target = ${install_dir}/syslog.php,
diff --git a/modules/librenms/templates/config.php.erb 
b/modules/librenms/templates/config.php.erb
index 49a14a6..ea9dbac 100644
--- a/modules/librenms/templates/config.php.erb
+++ b/modules/librenms/templates/config.php.erb
@@ -1,5 +1,11 @@
 ?php
-# This file is managed by Puppet!
+
+# This file is managed by Puppet, do not modify manually.
+
+$config['install_dir'] = %= @install_dir %;
+$config['html_dir']= %= @install_dir %/html;
+$config['rrd_dir'] = %= @rrd_dir %;
+$config['log_file']= /var/log/librenms.log;
 
 $puppet_config = %= scope.function_phpdump(@config) %;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6620ff7bb206d8fee4fb18607930195382611ec9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org


[MediaWiki-commits] [Gerrit] librenms: workaround JunOS stupidness - change (operations/puppet)

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

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


Change subject: librenms: workaround JunOS stupidness
..

librenms: workaround JunOS stupidness

Our librenms host is now dual-stacked (A  ). JunOS (or at least the
version that we're running) is stupid, and treats a log target of host
$hostname with a dual stacked hostname as two log targets, multiplying
all log lines by two. Until a better fix is in place, bind rsyslog to
IPv4 only.

Change-Id: I4a911a3fad9c0d6c27796f7f2cd1bcba16e5eff8
---
M modules/librenms/files/rsyslog.conf
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/106895/1

diff --git a/modules/librenms/files/rsyslog.conf 
b/modules/librenms/files/rsyslog.conf
index 7db0178..4d33590 100644
--- a/modules/librenms/files/rsyslog.conf
+++ b/modules/librenms/files/rsyslog.conf
@@ -1,9 +1,9 @@
 $ModLoad imudp
+$UDPServerAddress 0.0.0.0
 $UDPServerRun 514
 
 $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
 $PreserveFQDN on
-$RepeatedMsgReduction on
 
 $PrivDropToUser librenms
 $PrivDropToGroup librenms

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a911a3fad9c0d6c27796f7f2cd1bcba16e5eff8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] librenms: workaround JunOS stupidness - change (operations/puppet)

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

Change subject: librenms: workaround JunOS stupidness
..


librenms: workaround JunOS stupidness

Our librenms host is now dual-stacked (A  ). JunOS (or at least the
version that we're running) is stupid, and treats a log target of host
$hostname with a dual stacked hostname as two log targets, multiplying
all log lines by two. Until a better fix is in place, bind rsyslog to
IPv4 only.

Change-Id: I4a911a3fad9c0d6c27796f7f2cd1bcba16e5eff8
---
M modules/librenms/files/rsyslog.conf
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/librenms/files/rsyslog.conf 
b/modules/librenms/files/rsyslog.conf
index 7db0178..4d33590 100644
--- a/modules/librenms/files/rsyslog.conf
+++ b/modules/librenms/files/rsyslog.conf
@@ -1,9 +1,9 @@
 $ModLoad imudp
+$UDPServerAddress 0.0.0.0
 $UDPServerRun 514
 
 $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
 $PreserveFQDN on
-$RepeatedMsgReduction on
 
 $PrivDropToUser librenms
 $PrivDropToGroup librenms

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a911a3fad9c0d6c27796f7f2cd1bcba16e5eff8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] librenms: make main class' config option simpler - change (operations/puppet)

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

Change subject: librenms: make main class' config option simpler
..


librenms: make main class' config option simpler

Supplying install_dir, html_dir, rrd_dir  log file to the config hash
is kind of wrong, as it's not KISS: the class already knows the best
position for these and sets up other stuff based on these locations
(e.g. logrotate). Pass them to the config.php template instead, outside
of the config hash and simplify the caller.

Change-Id: I6620ff7bb206d8fee4fb18607930195382611ec9
---
M manifests/role/librenms.pp
M modules/librenms/manifests/init.pp
M modules/librenms/templates/config.php.erb
3 files changed, 21 insertions(+), 11 deletions(-)

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



diff --git a/manifests/role/librenms.pp b/manifests/role/librenms.pp
index f34bb0a..a67ee50 100644
--- a/manifests/role/librenms.pp
+++ b/manifests/role/librenms.pp
@@ -21,11 +21,6 @@
 $config = {
 'title_image'  = 
'url(//upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Wikimedia_Foundation_RGB_logo_with_text.svg/100px-Wikimedia_Foundation_RGB_logo_with_text.svg.png)',
 
-'install_dir'  = $install_dir,
-'html_dir' = ${install_dir}/html,
-'rrd_dir'  = '/srv/librenms/rrd',
-'log_file' = '/var/log/librenms.log',
-
 'db_host'  = 'db1001.eqiad.wmnet',
 'db_user'  = $passwords::librenms::db_user,
 'db_pass'  = $passwords::librenms::db_pass,
@@ -72,6 +67,7 @@
 
 class { '::librenms':
 install_dir = $install_dir,
+rrd_dir = '/srv/librenms/rrd',
 config  = $config,
 }
 class { '::librenms::syslog':
diff --git a/modules/librenms/manifests/init.pp 
b/modules/librenms/manifests/init.pp
index 24c3364..0340bc8 100644
--- a/modules/librenms/manifests/init.pp
+++ b/modules/librenms/manifests/init.pp
@@ -8,11 +8,16 @@
 #   Configuration for LibreNMS, in a puppet hash format.
 #
 # [*install_dir*]
-#   Installation directory for LibreNMS.
+#   Installation directory for LibreNMS. Defaults to /srv/librenms.
+#
+# [*rrd_dir*]
+#   Location where RRD files are going to be placed. Defaults to rrd under
+#   *install_dir*.
 #
 class librenms(
-$config,
+$config={},
 $install_dir='/srv/librenms',
+$rrd_dir=${install_dir}/rrd,
 ) {
 group { 'librenms':
 ensure = present,
@@ -68,6 +73,7 @@
 'nmap',
 'python-mysqldb',
 'rrdtool',
+#'snmp',
 'snmp-mibs-downloader',
 'whois',
 ]:
@@ -77,7 +83,7 @@
 cron { 'librenms-discovery-all':
 ensure  = present,
 user= 'librenms',
-command = ${install_dir}/discovery.php -h all  /dev/null 21,
+command = ${install_dir}/discovery.php -h all /dev/null 21,
 hour= '*/6',
 minute  = '33',
 require = User['librenms'],
@@ -85,18 +91,20 @@
 cron { 'librenms-discovery-new':
 ensure  = present,
 user= 'librenms',
-command = ${install_dir}/discovery.php -h new  /dev/null 21,
+command = ${install_dir}/discovery.php -h new /dev/null 21,
 minute  = '*/5',
 require = User['librenms'],
 }
 cron { 'librenms-poller-all':
 ensure  = present,
 user= 'librenms',
-command = /usr/bin/python ${install_dir}/poller-wrapper.py 16  
/dev/null 21,
+command = python ${install_dir}/poller-wrapper.py 16 /dev/null 
21,
 minute  = '*/5',
 require = User['librenms'],
 }
 
+# syslog script, in an install_dir-agnostic location
+# used by librenms::syslog or a custom alternative placed manually.
 file { '/usr/local/sbin/librenms-syslog':
 ensure = link,
 target = ${install_dir}/syslog.php,
diff --git a/modules/librenms/templates/config.php.erb 
b/modules/librenms/templates/config.php.erb
index 49a14a6..ea9dbac 100644
--- a/modules/librenms/templates/config.php.erb
+++ b/modules/librenms/templates/config.php.erb
@@ -1,5 +1,11 @@
 ?php
-# This file is managed by Puppet!
+
+# This file is managed by Puppet, do not modify manually.
+
+$config['install_dir'] = %= @install_dir %;
+$config['html_dir']= %= @install_dir %/html;
+$config['rrd_dir'] = %= @rrd_dir %;
+$config['log_file']= /var/log/librenms.log;
 
 $puppet_config = %= scope.function_phpdump(@config) %;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6620ff7bb206d8fee4fb18607930195382611ec9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot


[MediaWiki-commits] [Gerrit] Merge Reference is Statements are the same - change (mediawiki...Wikibase)

2014-01-11 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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


Change subject: Merge Reference is Statements are the same
..

Merge Reference is Statements are the same

If statements have the same main snak and qualifier
hashs when merging then rather than create a new
statement we should just merge the references accross!

Change-Id: I256c3e757f7bed8f2e3b731e9ad5f26d507690d3
---
M repo/includes/ChangeOp/ChangeOpReference.php
M repo/includes/ChangeOp/ChangeOpsMerge.php
M repo/tests/phpunit/includes/api/MergeItemsTest.php
M repo/tests/phpunit/includes/api/WikibaseApiTestCase.php
4 files changed, 91 insertions(+), 27 deletions(-)


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

diff --git a/repo/includes/ChangeOp/ChangeOpReference.php 
b/repo/includes/ChangeOp/ChangeOpReference.php
index b77b265..6756e29 100644
--- a/repo/includes/ChangeOp/ChangeOpReference.php
+++ b/repo/includes/ChangeOp/ChangeOpReference.php
@@ -55,7 +55,7 @@
 *
 * @param string $claimGuid
 * @param Reference|null $reference
-* @param string $referenceHash
+* @param string $referenceHash (if empty '' a new reference will be 
created)
 * @param int|null $index
 *
 * @throws \InvalidArgumentException
diff --git a/repo/includes/ChangeOp/ChangeOpsMerge.php 
b/repo/includes/ChangeOp/ChangeOpsMerge.php
index 7eb5869..cbb97e3 100644
--- a/repo/includes/ChangeOp/ChangeOpsMerge.php
+++ b/repo/includes/ChangeOp/ChangeOpsMerge.php
@@ -3,6 +3,9 @@
 namespace Wikibase\ChangeOp;
 
 use InvalidArgumentException;
+use Wikibase\DataModel\Claim\Claim;
+use Wikibase\DataModel\Claim\Statement;
+use Wikibase\DataModel\Reference;
 use Wikibase\ItemContent;
 use Wikibase\Lib\ClaimGuidGenerator;
 
@@ -115,7 +118,7 @@
}
 
private function generateClaimsChangeOps() {
-   foreach( $this-fromItemContent-getItem()-getClaims() as 
$fromClaim ){
+   foreach( $this-fromItemContent-getItem()-getClaims() as 
$fromClaim ) {
$this-fromChangeOps-add( new ChangeOpMainSnak(
$fromClaim-getGuid(),
null,
@@ -124,12 +127,44 @@
 
$toClaim = clone $fromClaim;
$toClaim-setGuid( null );
+   $claimMoved = false;
 
-   $this-toChangeOps-add( new ChangeOpClaim(
-   $toClaim ,
-   new ClaimGuidGenerator( 
$this-toItemContent-getItem()-getId() )
-   ) );
+   if( $toClaim instanceof Statement ) {
+   $claimMoved = $this-getReferenceChangeOps( 
$toClaim );
+   }
+
+   if( !$claimMoved ) {
+   $this-toChangeOps-add( new ChangeOpClaim(
+   $toClaim ,
+   new ClaimGuidGenerator( 
$this-toItemContent-getItem()-getId() )
+   ) );
+   }
}
}
 
+   /**
+* @param Statement $fromStatement
+*
+* @return bool Could be more the references?
+*/
+   private function getReferenceChangeOps( $fromStatement ) {
+   /** @var $claim Claim */
+   foreach( $this-toItemContent-getItem()-getClaims() as $claim 
) {
+   $fromHash = $fromStatement-getMainSnak()-getHash() . 
$fromStatement-getQualifiers()-getHash();
+   $toHash = $claim-getMainSnak()-getHash() . 
$claim-getQualifiers()-getHash();
+   if( $toHash === $fromHash ) {
+   /** @var $reference Reference */
+   foreach ( $fromStatement-getReferences() as 
$reference ) {
+   $this-toChangeOps-add( new 
ChangeOpReference(
+   $claim-getGuid(),
+   $reference,
+   '' // empty hash will create a 
new reference
+   ) );
+   }
+   return true;
+   }
+   }
+   return false;
+   }
+
 }
\ No newline at end of file
diff --git a/repo/tests/phpunit/includes/api/MergeItemsTest.php 
b/repo/tests/phpunit/includes/api/MergeItemsTest.php
index 4167628..49b21c2 100644
--- a/repo/tests/phpunit/includes/api/MergeItemsTest.php
+++ b/repo/tests/phpunit/includes/api/MergeItemsTest.php
@@ -2,9 +2,8 @@
 
 namespace Wikibase\Test\Api;
 
-use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\EntityId;
+use 

[MediaWiki-commits] [Gerrit] Allow PENDINGCHANGELEVEL to work on other pages - change (mediawiki...FlaggedRevs)

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

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


Change subject: Allow PENDINGCHANGELEVEL to work on other pages
..

Allow PENDINGCHANGELEVEL to work on other pages

Add an optional parameter to {{PENDINGCHANGELEVEL}} to allow it to work on
pages other than the current one.

Bug: 56863
Change-Id: Ib461e0a1aa4d26163b3a8e5feb29b7e088382a26
---
M backend/FlaggedRevs.hooks.php
1 file changed, 16 insertions(+), 7 deletions(-)


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

diff --git a/backend/FlaggedRevs.hooks.php b/backend/FlaggedRevs.hooks.php
index cb07a64..01ac177 100644
--- a/backend/FlaggedRevs.hooks.php
+++ b/backend/FlaggedRevs.hooks.php
@@ -233,18 +233,14 @@
public static function onParserFirstCallInit( $parser ) {
$parser-setFunctionHook( 'pagesusingpendingchanges',
'FlaggedRevsHooks::parserPagesUsingPendingChanges' );
+   $parser-setFunctionHook( 'pendingchangelevel',
+   'FlaggedRevsHooks::parserPendingChangeLevel', 
SFH_NO_HASH );
return true;
}
 
public static function onParserGetVariableValueSwitch( $parser, 
$cache, $word, $ret ) {
if ( $word == 'pendingchangelevel' ) {
-   $title = $parser-getTitle();
-   if ( !FlaggedRevs::inReviewNamespace( $title ) ) {
-   $ret = '';
-   } else {
-   $config = FRPageConfig::getStabilitySettings( 
$title );
-   $ret = $config['autoreview'];
-   }
+   $ret = FlaggedRevsHooks::parserPendingChangeLevel( 
$parser );
}
return true;
}
@@ -286,6 +282,19 @@
}
}
 
+   public static function parserPendingChangeLevel( $parser, $page = '' ) 
{
+   $title = Title::newFromText( $page );
+   if( !( $title instanceof Title ) ) {
+   $title = $parser-mTitle;
+   }
+   if ( !FlaggedRevs::inReviewNamespace( $title ) ) {
+   return '';
+   } else {
+   $config = FRPageConfig::getStabilitySettings( $title );
+   return $config['autoreview'];
+   }
+   }
+
/**
 * Detect if a ParserOutput object was added without mImageTimeKeys set.
 * This is needed for older, cached, ParserOutput objects.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib461e0a1aa4d26163b3a8e5feb29b7e088382a26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Jackmcbarn jackmcb...@gmail.com

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


[MediaWiki-commits] [Gerrit] (bug 59949) CategoryMoveRobot: do not move history by default - change (pywikibot/core)

2014-01-11 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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


Change subject: (bug 59949) CategoryMoveRobot: do not move history by default
..

(bug 59949) CategoryMoveRobot: do not move history by default

History moving is not implemented yet, and will raise an Exception,
so the default should be to not move the history.

Change-Id: I29161bd47ba0c3b22ba98c8becc92f98abe26614
---
M scripts/category.py
1 file changed, 9 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/99/106899/1

diff --git a/scripts/category.py b/scripts/category.py
index 73988e4..ccae5aa 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
-
+(
 Scripts to manage categories.
 
 Syntax: python category.py action [-option]
@@ -37,9 +37,10 @@
   for the language, which is Category was disbanded in
   English.
 
-Options for move action:
- * -hist- Creates a nice wikitable on the talk page of target category
-  that contains detailed page history of the source category.
+Options for move action:
+# * -hist- Creates a nice wikitable on the talk page of target category
+#  that contains detailed page history of the source category.
+
  * -nodelete- Don't delete the old category after move
 
 Options for several actions:
@@ -81,7 +82,7 @@
 
 This will move all pages in the category US to the category United States.
 
-
+)
 #
 # (C) Rob W.W. Hooft, 2004
 # (C) Daniel Herding, 2004
@@ -393,7 +394,7 @@
 def __init__(self, oldCatTitle, newCatTitle, batchMode=False,
  editSummary='', inPlace=False, moveCatPage=True,
  deleteEmptySourceCat=True, titleRegex=None,
- useSummaryForDeletion=True, withHistory=True):
+ useSummaryForDeletion=True, withHistory=False):
 self.editSummary = editSummary
 self.oldCat = pywikibot.Category(
 pywikibot.Link('Category:' + oldCatTitle))
@@ -878,7 +879,7 @@
 recurse = False
 titleRegex = None
 pagesonly = False
-withHistory = True
+withHistory = False
 
 # This factory is responsible for processing command line arguments
 # that are also used by other scripts and that determine on which pages
@@ -950,7 +951,7 @@
 elif arg == '-redirect':
 follow_redirects = True
 elif arg == '-hist':
-withHistory = True
+withHistory = False
 else:
 genFactory.handleArg(arg)
 pywikibot.Site().login()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29161bd47ba0c3b22ba98c8becc92f98abe26614
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


[MediaWiki-commits] [Gerrit] Fix more problems with not-safed usernames - change (mediawiki...MediaWikiChat)

2014-01-11 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Fix more problems with not-safed usernames
..

Fix more problems with not-safed usernames

They were causing endless problems

Change-Id: I362978672e428f56cb73b8279de893b0a6599f50
---
M MediaWikiChat.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index ba9a0e5..d10fbde 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -18,7 +18,7 @@
},
 
safe: function( string ) {
-   return string.replace( /\(\)\/\\\[\]\{\}\.\*\+\?\^=!:$\|/g, '' 
).replace( / /g, '' );
+   return string.replace( /[^\w\s]|/g, '' ).replace( / /g, '' );
},
 
unique: function( array ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I362978672e428f56cb73b8279de893b0a6599f50
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Fix more problems with not-safed usernames - change (mediawiki...MediaWikiChat)

2014-01-11 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Fix more problems with not-safed usernames
..


Fix more problems with not-safed usernames

They were causing endless problems

Change-Id: I362978672e428f56cb73b8279de893b0a6599f50
---
M MediaWikiChat.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index ba9a0e5..d10fbde 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -18,7 +18,7 @@
},
 
safe: function( string ) {
-   return string.replace( /\(\)\/\\\[\]\{\}\.\*\+\?\^=!:$\|/g, '' 
).replace( / /g, '' );
+   return string.replace( /[^\w\s]|/g, '' ).replace( / /g, '' );
},
 
unique: function( array ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I362978672e428f56cb73b8279de893b0a6599f50
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Refactor the PHP part of the Lua library - change (mediawiki...Wikibase)

2014-01-11 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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


Change subject: Refactor the PHP part of the Lua library
..

Refactor the PHP part of the Lua library

Also introduce a new non-legacy style which will be made
use of in a following commit.

Change-Id: I1d0f139d3e29bac6a1893e856e8d196ca3b02608
---
M client/WikibaseClient.classes.php
A client/includes/scribunto/LuaLibraryImplementation.php
M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
D 
client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryImplementationTest.php
4 files changed, 208 insertions(+), 125 deletions(-)


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

diff --git a/client/WikibaseClient.classes.php 
b/client/WikibaseClient.classes.php
index e554ee4..e89f34c 100644
--- a/client/WikibaseClient.classes.php
+++ b/client/WikibaseClient.classes.php
@@ -62,7 +62,7 @@
 
// includes/scribunto
'Scribunto_LuaWikibaseLibrary' = 
'includes/scribunto/Scribunto_LuaWikibaseLibrary.php',
-   'Scribunto_LuaWikibaseLibraryImplementation' = 
'includes/scribunto/Scribunto_LuaWikibaseLibraryImplementation.php',
+   'Wikibase\Client\Scribunto\LuaLibraryImplementation' = 
'includes/scribunto/LuaLibraryImplementation.php',
 
// test
'Wikibase\Test\MockPageUpdater' = 
'tests/phpunit/MockPageUpdater.php'
diff --git a/client/includes/scribunto/LuaLibraryImplementation.php 
b/client/includes/scribunto/LuaLibraryImplementation.php
new file mode 100644
index 000..daec1d5
--- /dev/null
+++ b/client/includes/scribunto/LuaLibraryImplementation.php
@@ -0,0 +1,195 @@
+?php
+
+namespace Wikibase\Client\Scribunto;
+
+use Wikibase\DataModel\Entity\EntityIdParser;
+use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\Lib\Serializers\SerializationOptions;
+use Wikibase\Lib\Serializers\SerializerFactory;
+use Wikibase\Lib\EntityIdFormatter;
+use Wikibase\LanguageFallbackChainFactory;
+use Wikibase\SiteLinkLookup;
+use Wikibase\EntityLookup;
+use Wikibase\Entity;
+use Wikibase\Utils;
+use Language;
+
+/**
+ * Actual implementations of the functions to access Wikibase through the 
Scribunto extension
+ *
+ * @since 0.5
+ *
+ * @licence GNU GPL v2+
+ * @author Jens Ohlig  jens.oh...@wikimedia.de 
+ * @author Marius Hoch  h...@online.de 
+ */
+final class LuaLibraryImplementation {
+
+   /* @var EntityIdParser */
+   protected $entityIdParser;
+
+   /* @var EntityLookup */
+   protected $entityLookup;
+
+   /* @var EntityIdFormatter */
+   protected $entityIdFormatter;
+
+   /* @var SiteLinkLookup */
+   protected $siteLinkTable;
+
+   /* @var LanguageFallbackChainFactory */
+   protected $fallbackChainFactory;
+
+   /* @var Language */
+   protected $language;
+
+   /* @var string[] */
+   protected $languageCodes;
+
+   /* @var string */
+   protected $siteId;
+
+   /**
+* @param EntityIdParser $entityIdParser
+*/
+   public function __construct(
+   EntityIdParser $entityIdParser,
+   EntityLookup $entityLookup,
+   EntityIdFormatter $entityIdFormatter,
+   SiteLinkLookup $siteLinkTable,
+   LanguageFallbackChainFactory $fallbackChainFactory,
+   Language $language,
+   $languageCodes,
+   $siteId
+   ) {
+   $this-entityIdParser = $entityIdParser;
+   $this-entityLookup = $entityLookup;
+   $this-entityIdFormatter = $entityIdFormatter;
+   $this-siteLinkTable = $siteLinkTable;
+   $this-fallbackChainFactory = $fallbackChainFactory;
+   $this-language = $language;
+   $this-languageCodes = $languageCodes;
+   $this-siteId = $siteId;
+   }
+
+   /**
+* Recursively renumber a serialized array in place, so it is indexed 
at 1, not 0.
+* Just like Lua wants it.
+*
+* @since 0.5
+*
+* @param array $entityArr
+*/
+   public function renumber( $entityArr ) {
+   foreach( $entityArr as $value ) {
+   if ( !is_array( $value ) ) {
+   continue;
+   }
+   if ( array_key_exists( 0, $value ) ) {
+   $value = array_combine( range( 1, count( $value 
) ), array_values( $value ) );
+   }
+   $this-renumber( $value );
+   }
+   }
+
+   /**
+* Get entity from prefixed ID (e.g. Q23) and return it as serialized 
array.
+*
+* @since 0.5
+*
+* @param string $prefixedEntityId
+* @param bool $legacyStyle Whether to return a legacy style entity
+*
+  

[MediaWiki-commits] [Gerrit] Remove log10 from boost in prefix search - change (mediawiki...CirrusSearch)

2014-01-11 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Remove log10 from boost in prefix search
..

Remove log10 from boost in prefix search

Because nothing but number of incoming links effects the score removing
the log10 from boost sorts the results the same way while doing less work.

On itwiki this amounts for going from 200ms for a prefix search for a
to 60ms.  Even though these are cached most of the time this is worth it.

Change-Id: Ifc60f466f324161b2349aecbe1312aef7993d172
---
M includes/Searcher.php
1 file changed, 18 insertions(+), 6 deletions(-)


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

diff --git a/includes/Searcher.php b/includes/Searcher.php
index 9311410..24448c9 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -115,10 +115,11 @@
 */
private $preferRecentHalfLife = 0;
/**
-* @var boolean should the query results boost pages with more incoming 
links. Defaults to true but some search
-* methods disable it.
+* @var string should the query results boost pages with more incoming 
links.  Default to empty stream meaning
+* don't boost.  Other values are 'linear' meaning boost score linearly 
with number of incoming links or 'log'
+* meaning boost score by log10(incoming_links + 2).
 */
-   private $boostForLinks = true;
+   private $boostLinks = '';
/**
 * @var array template name to boost multiplier for having a template.  
Defaults to none but initialized by
 * queries that use it to self::getDefaultBoostTemplates() if they need 
it.  That is too expensive to do by
@@ -165,7 +166,7 @@
$match = new \Elastica\Query\Match();
$match-setField( 'title.near_match', $search );
$this-filters[] = new \Elastica\Filter\Query( $match );
-   $this-boostForLinks = false;
+   $this-boostLinks = ''; // No boost
 
$this-description = lowercase title search for '$search';
$result = $this-search();
@@ -196,6 +197,7 @@
} else {
$this-filters[] = $this-buildPrefixFilter( $search );
}
+   $this-boostLinks = 'linear';
$this-boostTemplates = self::getDefaultBoostTemplates();
 
$this-description = prefix search for '$search';
@@ -292,6 +294,7 @@
if ( $boostTemplates === null ) {
$boostTemplates = self::getDefaultBoostTemplates();
}
+   $this-boostLinks = 'log';
$this-boostTemplates = $boostTemplates;
wfProfileOut( __METHOD__ . '-boost-template' );
 
@@ -893,10 +896,19 @@
$useFunctionScore = false;
 
// Customize score by boosting based on incoming links count
-   if ( $this-boostForLinks ) {
+   if ( $this-boostLinks ) {
$incomingLinks = (doc['incoming_links'].empty ? 0 : 
doc['incoming_links'].value);
$incomingRedirectLinks = 
(doc['incoming_redirect_links'].empty ? 0 : 
doc['incoming_redirect_links'].value);
-   $scoreBoostMvel = log10($incomingLinks + 
$incomingRedirectLinks + 2);
+   $scoreBoostMvel = $incomingLinks + 
$incomingRedirectLinks;
+   switch ( $this-boostLinks ) {
+   case 'linear':
+   break;  // scoreBoostMvel already correct
+   case 'log':
+   $scoreBostMvel = log10($scoreBoostMvel + 2);
+   break;
+   default:
+   wfLogWarning( Invalid links boost type:  
$this-boostLinks );
+   }
$fuctionScore-addScriptScoreFunction( new 
\Elastica\Script( $scoreBoostMvel ) );
$useFunctionScore = true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc60f466f324161b2349aecbe1312aef7993d172
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] dynamicproxy: Pass through existing XFF data too - change (operations/puppet)

2014-01-11 Thread Stwalkerster (Code Review)
Stwalkerster has uploaded a new change for review.

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


Change subject: dynamicproxy: Pass through existing XFF data too
..

dynamicproxy: Pass through existing XFF data too

This changes the XFF configuration of nginx to pass through the existing
XFF data through the proxy, so if there are multiple levels of proxies
then the web application behind these can use the data.

This is needed for the account-creation-assistance project on Labs, as
sometimes we see people come through proxies which are on the TrustedXFF
list, and it is beneficial to us to be able to get the same IP address
that Wikipedia itself will then use.

This is completely untested - I don't know nginx and I got my
information from 
http://www.networkinghowtos.com/howto/set-the-x-forwarded-for-header-on-a-nginx-reverse-proxy-setup/

Change-Id: Ib27796b464998f6f384dff155a60f712c3ad7d94
---
M modules/dynamicproxy/templates/proxy.conf
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/07/106907/1

diff --git a/modules/dynamicproxy/templates/proxy.conf 
b/modules/dynamicproxy/templates/proxy.conf
index 58bed0c..86a721b 100644
--- a/modules/dynamicproxy/templates/proxy.conf
+++ b/modules/dynamicproxy/templates/proxy.conf
@@ -71,7 +71,7 @@
 
 %- if @set_xff -%
 # Passes client's IP to the backend
-proxy_set_header X-Forwarded-For $remote_addr;
+proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 %- end -%
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib27796b464998f6f384dff155a60f712c3ad7d94
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Stwalkerster si...@stwalkerster.co.uk

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


[MediaWiki-commits] [Gerrit] Remove deprecated Article::forUpdate() - change (mediawiki/core)

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

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


Change subject: Remove deprecated Article::forUpdate()
..

Remove deprecated Article::forUpdate()

Was deprecated in 1.18. No uses found in core or Gerrit extensions.

Change-Id: I2e145c323f645f963c8e07e1c9f25de9d2839ad7
---
M RELEASE-NOTES-1.23
M includes/Article.php
2 files changed, 1 insertion(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/106908/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index dbe598c..fd76c82 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -208,6 +208,7 @@
 * ApiBase::getValidNamespaces() (deprecated in 1.17)
 * ApiMain::setCachePrivate() (deprecated in 1.17)
 * ApiMain::setVaryCookie (deprecated in 1.17)
+* Article::forUpdate() (deprecated in 1.18)
 * CategoryViewer::addSubcategory() (deprecated in 1.17)
 * EditPage::spamPage() (deprecated since 1.17)
 * Exif::getFormattedData() (deprecated in 1.18)
diff --git a/includes/Article.php b/includes/Article.php
index ce6407a..dc4198f 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -461,14 +461,6 @@
}
 
/**
-* No-op
-* @deprecated since 1.18
-*/
-   public function forUpdate() {
-   wfDeprecated( __METHOD__, '1.18' );
-   }
-
-   /**
 * Returns true if the currently-referenced revision is the current edit
 * to this page (and it exists).
 * @return bool

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

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

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


[MediaWiki-commits] [Gerrit] Remove deprecated Article::markpatrolled() - change (mediawiki/core)

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

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


Change subject: Remove deprecated Article::markpatrolled()
..

Remove deprecated Article::markpatrolled()

Was deprecated in 1.18. No uses found in core or Gerrit extensions.

Change-Id: I37772ee08baa1d3ee15247b1c869de1299e146a6
---
M RELEASE-NOTES-1.23
M includes/Article.php
2 files changed, 1 insertion(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/106909/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index fd76c82..899662b 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -209,6 +209,7 @@
 * ApiMain::setCachePrivate() (deprecated in 1.17)
 * ApiMain::setVaryCookie (deprecated in 1.17)
 * Article::forUpdate() (deprecated in 1.18)
+* Article::markpatrolled() (deprecated in 1.18)
 * CategoryViewer::addSubcategory() (deprecated in 1.17)
 * EditPage::spamPage() (deprecated since 1.17)
 * Exif::getFormattedData() (deprecated in 1.18)
diff --git a/includes/Article.php b/includes/Article.php
index dc4198f..28b32de 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -1891,15 +1891,6 @@
}
 
/**
-* Mark this particular edit/page as patrolled
-* @deprecated since 1.18
-*/
-   public function markpatrolled() {
-   wfDeprecated( __METHOD__, '1.18' );
-   Action::factory( 'markpatrolled', $this )-show();
-   }
-
-   /**
 * Handle action=purge
 * @deprecated since 1.19
 * @return Action|bool|null false if the action is disabled, null if it 
is not recognised

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

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

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


[MediaWiki-commits] [Gerrit] Replace deprecated Block::infinity (1.18) - change (mediawiki...AuthorProtect)

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

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


Change subject: Replace deprecated Block::infinity (1.18)
..

Replace deprecated Block::infinity (1.18)

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AuthorProtect 
refs/changes/10/106910/1

diff --git a/AuthorProtect.php b/AuthorProtect.php
index fac84d3..55213b3 100644
--- a/AuthorProtect.php
+++ b/AuthorProtect.php
@@ -247,7 +247,7 @@
// forked from ProtectionForm::getExpiry and modified to rewrite '' to 
infinity
private static function AuthorProtectExpiry( $value ) {
if ( $value == 'infinite' || $value == 'indefinite' || $value 
== 'infinity' || $value == '' ) {
-   $time = Block::infinity();
+   $time = wfGetDB( DB_SLAVE )-getInfinity();
} else {
$unix = strtotime( $value );
 

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

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

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


[MediaWiki-commits] [Gerrit] Remove methods in Block deprecated in 1.18 - change (mediawiki/core)

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

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


Change subject: Remove methods in Block deprecated in 1.18
..

Remove methods in Block deprecated in 1.18

One use found in core or Gerrit extensions which was replaced.

* Block::clear() (deprecated in 1.18)
* Block::decodeExpiry() (deprecated in 1.18)
* Block::encodeExpiry() (deprecated in 1.18)
* Block::forUpdate() (deprecated in 1.18)
* Block::infinity() (deprecated in 1.18)
* Block::load() (deprecated in 1.18)
* Block::newFromDB() (deprecated in 1.18)
* Block::normaliseRange() (deprecated in 1.18)
* Block::parseExpiryInput() (deprecated in 1.18)

Change-Id: Ia8ea6b5248111326f929062346f3868a0550421b
---
M RELEASE-NOTES-1.23
M includes/Block.php
M tests/phpunit/includes/BlockTest.php
3 files changed, 9 insertions(+), 148 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/12/106912/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 6e245bf..d5f98c2 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -215,6 +215,15 @@
 * Article::markpatrolled() (deprecated in 1.18)
 * Article::unwatch() (deprecated in 1.18)
 * Article::watch() (deprecated in 1.18)
+* Block::clear() (deprecated in 1.18)
+* Block::decodeExpiry() (deprecated in 1.18)
+* Block::encodeExpiry() (deprecated in 1.18)
+* Block::forUpdate() (deprecated in 1.18)
+* Block::infinity() (deprecated in 1.18)
+* Block::load() (deprecated in 1.18)
+* Block::newFromDB() (deprecated in 1.18)
+* Block::normaliseRange() (deprecated in 1.18)
+* Block::parseExpiryInput() (deprecated in 1.18)
 * CategoryViewer::addSubcategory() (deprecated in 1.17)
 * EditPage::spamPage() (deprecated since 1.17)
 * Exif::getFormattedData() (deprecated in 1.18)
diff --git a/includes/Block.php b/includes/Block.php
index 8673a3d..3c22f9b 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -102,21 +102,6 @@
}
 
/**
-* Load a block from the database, using either the IP address or
-* user ID. Tries the user ID first, and if that doesn't work, tries
-* the address.
-*
-* @param string $address IP address of user/anon
-* @param $user Integer: user id of user
-* @return Block Object
-* @deprecated since 1.18
-*/
-   public static function newFromDB( $address, $user = 0 ) {
-   wfDeprecated( __METHOD__, '1.18' );
-   return self::newFromTarget( User::whoIs( $user ), $address );
-   }
-
-   /**
 * Load a blocked user from their block id.
 *
 * @param $id Integer: Block id to search for
@@ -184,44 +169,6 @@
 $this-prevents( 'editownusertalk' ) == 
$block-prevents( 'editownusertalk' )
 $this-mReason == $block-mReason
);
-   }
-
-   /**
-* Clear all member variables in the current object. Does not clear
-* the block from the DB.
-* @deprecated since 1.18
-*/
-   public function clear() {
-   wfDeprecated( __METHOD__, '1.18' );
-   # Noop
-   }
-
-   /**
-* Get a block from the DB, with either the given address or the given 
username
-*
-* @param string $address The IP address of the user, or blank to skip 
IP blocks
-* @param int $user The user ID, or zero for anonymous users
-* @return Boolean: the user is blocked from editing
-* @deprecated since 1.18
-*/
-   public function load( $address = '', $user = 0 ) {
-   wfDeprecated( __METHOD__, '1.18' );
-   if ( $user ) {
-   $username = User::whoIs( $user );
-   $block = self::newFromTarget( $username, $address );
-   } else {
-   $block = self::newFromTarget( null, $address );
-   }
-
-   if ( $block instanceof Block ) {
-   # This is mildly evil, but hey, it's B/C :D
-   foreach ( $block as $variable = $value ) {
-   $this-$variable = $value;
-   }
-   return true;
-   } else {
-   return false;
-   }
}
 
/**
@@ -860,17 +807,6 @@
}
 
/**
-* Get/set the SELECT ... FOR UPDATE flag
-* @deprecated since 1.18
-*
-* @param $x Bool
-*/
-   public function forUpdate( $x = null ) {
-   wfDeprecated( __METHOD__, '1.18' );
-   # noop
-   }
-
-   /**
 * Get/set a flag determining whether the master is used for reads
 *
 * @param $x Bool
@@ -947,33 +883,6 @@
}
 
/**
-* Encode expiry for DB
-*
-* @param string $expiry timestamp for expiry, or
-* @param 

[MediaWiki-commits] [Gerrit] Set $wgExportFromNamespaces to true on MediaWiki.org - change (operations/mediawiki-config)

2014-01-11 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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


Change subject: Set $wgExportFromNamespaces to true on MediaWiki.org
..

Set $wgExportFromNamespaces to true on MediaWiki.org

This patch sets the $wgExportFromNamespaces setting
to true on MediaWiki.org while keeping it as false
for the rest of our wikis.

Please feel free to burninate this with fire if it
has potential for disaster, or even just for fun.

Bug: 59947
Change-Id: I684cab04df8d8fcd0d055bb2e63df64b5c91f0db
---
M wmf-config/InitialiseSettings.php
1 file changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1ed02f4..f677266 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8932,11 +8932,19 @@
'enwiki' = 15,
 ),
 
-'wgExportAllowHistory' = array( 'default' = true ),
+'wgExportAllowHistory' = array(
+   'default' = true
+),
+
 'wgExportMaxHistory' = array(
'default' = 1000, # changed from 100 -- brion 2008-07-10
 ),
 
+'wgExportFromNamespaces = array( // bug 59947
+   'default' = false,
+   'mediawikiwiki' = true,
+),
+
 'wgParserCacheExpireTime' = array(
'default' = 86400 * 30,
 ),

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

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

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


[MediaWiki-commits] [Gerrit] Remove use of $wgBetterDirectionality - change (mediawiki...LiquidThreads)

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

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


Change subject: Remove use of $wgBetterDirectionality
..

Remove use of $wgBetterDirectionality

Was deprecated in 1.18, removed in 1.23, defaulted to true.

Change-Id: I034f67cc4ef1e59c9fa8c2c216d008fbbd94c882
---
M pages/TalkpageView.php
1 file changed, 7 insertions(+), 8 deletions(-)


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

diff --git a/pages/TalkpageView.php b/pages/TalkpageView.php
index b3410b5..acc80da 100644
--- a/pages/TalkpageView.php
+++ b/pages/TalkpageView.php
@@ -275,14 +275,13 @@
$this-showHeader();
}
 
-   global $wgLang, $wgBetterDirectionality;
-   if ( $wgBetterDirectionality ) {
-   // This closes the div of mw-content-ltr/rtl containing 
lang and dir attributes
-   $this-output-addHTML(
-   Html::closeElement( 'div' ) . 
Html::openElement( 'div',
-   array( 'class' = 'lqt-talkpage', 'lang' = 
$wgLang-getCode(), 'dir' = $wgLang-getDir() )
-   ) );
-   }
+   global $wgLang;
+
+   // This closes the div of mw-content-ltr/rtl containing lang 
and dir attributes
+   $this-output-addHTML(
+   Html::closeElement( 'div' ) . Html::openElement( 'div',
+   array( 'class' = 'lqt-talkpage', 'lang' = 
$wgLang-getCode(), 'dir' = $wgLang-getDir() )
+   ) );
 
$html = '';
 

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

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

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


[MediaWiki-commits] [Gerrit] Remove deprecated $wgBetterDirectionality - change (mediawiki/core)

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

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


Change subject: Remove deprecated $wgBetterDirectionality
..

Remove deprecated $wgBetterDirectionality

Was deprecated in 1.18. One use remained in Liquidthreads. It was removed
there, too.

Change-Id: I4dc3290fe7fe793d8284a3337e24dbe298099079
---
M RELEASE-NOTES-1.23
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/106914/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index d5f98c2..10671fe 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -269,6 +269,9 @@
 * WikiPage::useParserCache() (deprecated in 1.18)
 * WikiPage::viewUpdates() (deprecated in 1.18)
 
+ Removed globals 
+* $wgBetterDirectionality (deprecated in 1.18)
+
 == Compatibility ==
 
 MediaWiki 1.23 requires PHP 5.3.2 or later.

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

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

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


[MediaWiki-commits] [Gerrit] Remove use of $wgBetterDirectionality - change (mediawiki...LiquidThreads)

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

Change subject: Remove use of $wgBetterDirectionality
..


Remove use of $wgBetterDirectionality

Was deprecated in 1.18, removed in 1.23, defaulted to true.

Change-Id: I034f67cc4ef1e59c9fa8c2c216d008fbbd94c882
---
M pages/TalkpageView.php
1 file changed, 7 insertions(+), 8 deletions(-)

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



diff --git a/pages/TalkpageView.php b/pages/TalkpageView.php
index b3410b5..acc80da 100644
--- a/pages/TalkpageView.php
+++ b/pages/TalkpageView.php
@@ -275,14 +275,13 @@
$this-showHeader();
}
 
-   global $wgLang, $wgBetterDirectionality;
-   if ( $wgBetterDirectionality ) {
-   // This closes the div of mw-content-ltr/rtl containing 
lang and dir attributes
-   $this-output-addHTML(
-   Html::closeElement( 'div' ) . 
Html::openElement( 'div',
-   array( 'class' = 'lqt-talkpage', 'lang' = 
$wgLang-getCode(), 'dir' = $wgLang-getDir() )
-   ) );
-   }
+   global $wgLang;
+
+   // This closes the div of mw-content-ltr/rtl containing lang 
and dir attributes
+   $this-output-addHTML(
+   Html::closeElement( 'div' ) . Html::openElement( 'div',
+   array( 'class' = 'lqt-talkpage', 'lang' = 
$wgLang-getCode(), 'dir' = $wgLang-getDir() )
+   ) );
 
$html = '';
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I034f67cc4ef1e59c9fa8c2c216d008fbbd94c882
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Alex Monk kren...@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] Remove FakeMemCachedClient - change (mediawiki/core)

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

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


Change subject: Remove FakeMemCachedClient
..

Remove FakeMemCachedClient

Was deprecated in 1.18. Not used in core or Gerrit extensions.

Change-Id: I06bc9c6f01f21386c772fa7fad57b55a7c7b2fe4
---
M RELEASE-NOTES-1.23
M includes/AutoLoader.php
M includes/objectcache/EmptyBagOStuff.php
3 files changed, 1 insertion(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/15/106915/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 10671fe..ef44032 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -169,6 +169,7 @@
 * Option to mark hooks as deprecated has been added.
 
  Removed classes 
+* FakeMemCachedClient (deprecated in 1.18)
 * TitleDependency (unused)
 * TitleListDependency (unused)
 * WikiError (deprecated in 1.17)
diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 0e56b7c..ffc1633 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -771,7 +771,6 @@
'DBABagOStuff' = 'includes/objectcache/DBABagOStuff.php',
'EhcacheBagOStuff' = 'includes/objectcache/EhcacheBagOStuff.php',
'EmptyBagOStuff' = 'includes/objectcache/EmptyBagOStuff.php',
-   'FakeMemCachedClient' = 'includes/objectcache/EmptyBagOStuff.php',
'HashBagOStuff' = 'includes/objectcache/HashBagOStuff.php',
'MediaWikiBagOStuff' = 'includes/objectcache/SqlBagOStuff.php',
'MemCachedClientforWiki' = 'includes/objectcache/MemcachedClient.php',
diff --git a/includes/objectcache/EmptyBagOStuff.php 
b/includes/objectcache/EmptyBagOStuff.php
index 6206057..0a945a9 100644
--- a/includes/objectcache/EmptyBagOStuff.php
+++ b/includes/objectcache/EmptyBagOStuff.php
@@ -78,10 +78,3 @@
return true;
}
 }
-
-/**
- * Backwards compatibility alias for EmptyBagOStuff
- * @deprecated since 1.18
- */
-class FakeMemCachedClient extends EmptyBagOStuff {
-}

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

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

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


[MediaWiki-commits] [Gerrit] Replace deprecated wfStreamFile (1.19) - change (mediawiki...SlimboxThumbs)

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

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


Change subject: Replace deprecated wfStreamFile (1.19)
..

Replace deprecated wfStreamFile (1.19)

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


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

diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php
index cb5c351..3bd1a87 100644
--- a/SlimboxThumbs.php
+++ b/SlimboxThumbs.php
@@ -94,7 +94,7 @@
 */
global $IP;
require_once $IP/includes/StreamFile.php;
-   wfStreamFile( 
$_SERVER['DOCUMENT_ROOT'].$thumb-getUrl() );
+   StreamFile::stream( 
$_SERVER['DOCUMENT_ROOT'].$thumb-getUrl() );
exit;
}
}

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

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

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


[MediaWiki-commits] [Gerrit] Replace deprecated wfGenerateToken (1.20) - change (mediawiki...ArticleCreationWorkflow)

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

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


Change subject: Replace deprecated wfGenerateToken (1.20)
..

Replace deprecated wfGenerateToken (1.20)

Change-Id: I49af49630e0175124085b632481420b995f1ed96
---
M includes/ArticleCreationUtil.php
1 file changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/includes/ArticleCreationUtil.php b/includes/ArticleCreationUtil.php
index 7260d6e..f547cef 100644
--- a/includes/ArticleCreationUtil.php
+++ b/includes/ArticleCreationUtil.php
@@ -8,7 +8,7 @@
/**
 * Is ArticleCreation enabled for the current user?
 *
-* 
+*
 * @return bool whether or not it is.
 */
public static function isEnabled() {
@@ -44,14 +44,14 @@
global $wgExtensionCredits;
return 'ext.articleCreationWorkflow@' . 
$wgExtensionCredits['other'][0]['version'] . '-';
}
-   
+
/**
 * Generate a tracking code bucket for this campaign
 * @return string
 */
public static function trackingBucket() {
global $wgRequest, $wgUser;
-   
+
if ( $wgUser-isAnon() ) {
return 'anon';
} else {
@@ -62,15 +62,15 @@
}
}
}
-   
+
/**
 * Valid tracking bucket
 * @return array
 */
public static function getValidTrackingBucket() {
-   return array( 'anon', 'new', 'reg' );   
+   return array( 'anon', 'new', 'reg' );
}
-   
+
/**
 * Valid tracking source
 * @return array
@@ -85,7 +85,7 @@
 * @param $par string - the title for the non-existing article
 */
public static function TrackSpecialLandingPage( $par ) {
-   
+
$event = self::trackingBucket() . '-impression';
 
self::clickTracking( $event, Title::newFromText( $par ) );
@@ -108,7 +108,7 @@
$token = $wgRequest-getCookie( 'clicktracking-session', '' );
 
if ( !$token ) {
-   $token = wfGenerateToken();
+   $token = MWCryptRand::generateHex( 32, true );
}
 
$revId = $title-getLatestRevID();

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

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

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


[MediaWiki-commits] [Gerrit] Replace deprecated wfGenerateToken (1.20) - change (mediawiki...ClickTracking)

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

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


Change subject: Replace deprecated wfGenerateToken (1.20)
..

Replace deprecated wfGenerateToken (1.20)

Change-Id: I70b9c106088e3ab2d300821dbe23cf714f2b9002
---
M ClickTracking.hooks.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/ClickTracking.hooks.php b/ClickTracking.hooks.php
index dd4777b..e1efcb3 100644
--- a/ClickTracking.hooks.php
+++ b/ClickTracking.hooks.php
@@ -73,8 +73,7 @@
 * @return Boolean: always true
 */
public static function makeGlobalVariablesScript( $vars ) {
-   global $wgUser;
-   $vars['wgTrackingToken'] = wfGenerateToken( array( 
$wgUser-getName(), time() ) );
+   $vars['wgTrackingToken'] = MWCryptRand::generateHex( 32, true );
return true;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Remove some deprecated global functions - change (mediawiki/core)

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

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


Change subject: Remove some deprecated global functions
..

Remove some deprecated global functions

Some uses remained in Gerrit extensions, and patches have been submitted
to replace the usages. See below for details.

* in_string (deprecated in 1.21)
* wfGenerateToken (deprecated in 1.20) (had 2 uses)
* wfStreamFile (deprecated in 1.19) (had 1 use)
* wfUILang (deprecated in 1.18)

Change-Id: Ic67a968da8f37daf44503b98d00710eb99180805
---
M RELEASE-NOTES-1.23
M includes/GlobalFunctions.php
2 files changed, 4 insertions(+), 58 deletions(-)


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

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index ef44032..8ef72e4 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -229,6 +229,7 @@
 * EditPage::spamPage() (deprecated since 1.17)
 * Exif::getFormattedData() (deprecated in 1.18)
 * Exif::makeFormattedData() (deprecated in 1.18)
+* in_string (deprecated in 1.21)
 * Language::convertLinkToAllVariants() (deprecated in 1.17)
 * LanguageConverter::convertLinkToAllVariants() (deprecated in 1.17)
 * Linker::makeBrokenLink() (deprecated in 1.16)
@@ -266,6 +267,9 @@
 * User::getPageRenderingHash() (deprecated in 1.17)
 * WebRequest::getFileSize() (deprecated in 1.17)
 * WebRequest::isPathInfoBad() (deprecated in 1.17)
+* wfGenerateToken (deprecated in 1.20)
+* wfStreamFile (deprecated in 1.19)
+* wfUILang (deprecated in 1.18)
 * WikiPage::quickEdit() (deprecated in 1.18)
 * WikiPage::useParserCache() (deprecated in 1.18)
 * WikiPage::viewUpdates() (deprecated in 1.18)
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index a638287..2dda695 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1341,19 +1341,6 @@
 }
 
 /**
- * Old function when $wgBetterDirectionality existed
- * All usage removed, wfUILang can be removed in near future
- *
- * @deprecated since 1.18
- * @return Language
- */
-function wfUILang() {
-   wfDeprecated( __METHOD__, '1.18' );
-   global $wgLang;
-   return $wgLang;
-}
-
-/**
  * This is the function for getting translated interface messages.
  *
  * @see Message class for documentation how to use them.
@@ -2620,25 +2607,6 @@
 }
 
 /**
- * Find out whether or not a mixed variable exists in a string
- *
- * @deprecated Just use str(i)pos
- * @param $needle String
- * @param $str String
- * @param $insensitive Boolean
- * @return Boolean
- */
-function in_string( $needle, $str, $insensitive = false ) {
-   wfDeprecated( __METHOD__, '1.21' );
-   $func = 'strpos';
-   if ( $insensitive ) {
-   $func = 'stripos';
-   }
-
-   return $func( $str, $needle ) !== false;
-}
-
-/**
  * Safety wrapper around ini_get() for boolean settings.
  * The values returned from ini_get() are pre-normalized for settings
  * set via php.ini or php_flag/php_admin_flag... but *not*
@@ -3713,15 +3681,6 @@
 }
 
 /**
- * Stream a file to the browser. Back-compat alias for StreamFile::stream()
- * @deprecated since 1.19
- */
-function wfStreamFile( $fname, $headers = array() ) {
-   wfDeprecated( __FUNCTION__, '1.19' );
-   StreamFile::stream( $fname, $headers );
-}
-
-/**
  * Should low-performance queries be disabled?
  *
  * @return Boolean
@@ -3846,23 +3805,6 @@
}
}
echo \n;
-}
-
-/**
- * Generate a random 32-character hexadecimal token.
- * @param $salt Mixed: some sort of salt, if necessary, to add to random
- *  characters before hashing.
- * @return string
- * @codeCoverageIgnore
- * @deprecated since 1.20; Please use MWCryptRand for security purposes and
- * wfRandomString for pseudo-random strings
- * @warning This method is NOT secure. Additionally it has many callers that
- * use it for pseudo-random purposes.
- */
-function wfGenerateToken( $salt = '' ) {
-   wfDeprecated( __METHOD__, '1.20' );
-   $salt = serialize( $salt );
-   return md5( mt_rand( 0, 0x7fff ) . $salt );
 }
 
 /**

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

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

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


[MediaWiki-commits] [Gerrit] SpecialWatchlist: Reorder some stuff in #execute - change (mediawiki/core)

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

Change subject: SpecialWatchlist: Reorder some stuff in #execute
..


SpecialWatchlist: Reorder some stuff in #execute

In order to reduce the interconnectedness between parameter parsing,
database queries and building output, and to make later changes where
I'll start removing some of this code easier to understand.

Change-Id: I6f525506b0fc4c009989ed7dff838c4e21ec4860
---
M includes/specials/SpecialWatchlist.php
1 file changed, 74 insertions(+), 76 deletions(-)

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



diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index afdf981..9caa5a8 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -145,27 +145,8 @@
// Check permissions
$this-checkPermissions();
 
-   // Add feed links
-   $wlToken = $user-getTokenFromOption( 'watchlisttoken' );
-   if ( $wlToken ) {
-   $this-addFeedLinks( array(
-   'action' = 'feedwatchlist',
-   'allrev' = 1,
-   'wlowner' = $user-getName(),
-   'wltoken' = $wlToken,
-   ) );
-   }
-
-   $opts = $this-getOptions();
-   $this-setHeaders();
-   $this-outputHeader();
-
-   $output-addSubtitle(
-   $this-msg( 'watchlistfor2', $user-getName() )
-   -rawParams( SpecialEditWatchlist::buildTools( 
null ) )
-   );
-
$request = $this-getRequest();
+   $opts = $this-getOptions();
 
$mode = SpecialEditWatchlist::getMode( $request, $par );
if ( $mode !== false ) {
@@ -179,7 +160,40 @@
return;
}
 
+   if ( ( $wgEnotifWatchlist || $wgShowUpdatedMarker )  
$request-getVal( 'reset' ) 
+   $request-wasPosted() )
+   {
+   $user-clearAllNotifications();
+   $output-redirect( $this-getPageTitle()-getFullURL( 
$opts-getChangedValues() ) );
+   return;
+   }
+
+   $this-setHeaders();
+   $this-outputHeader();
+
+   // Add feed links
+   $wlToken = $user-getTokenFromOption( 'watchlisttoken' );
+   if ( $wlToken ) {
+   $this-addFeedLinks( array(
+   'action' = 'feedwatchlist',
+   'allrev' = 1,
+   'wlowner' = $user-getName(),
+   'wltoken' = $wlToken,
+   ) );
+   }
+
+   $output-addSubtitle(
+   $this-msg( 'watchlistfor2', $user-getName() )
+   -rawParams( SpecialEditWatchlist::buildTools( 
null ) )
+   );
+
$dbr = wfGetDB( DB_SLAVE, 'watchlist' );
+
+   # Show a message about slave lag, if applicable
+   $lag = wfGetLB()-safeGetLag( $dbr );
+   if ( $lag  0 ) {
+   $output-showLagWarning( $lag );
+   }
 
$nitems = $this-countItems( $dbr );
if ( $nitems == 0 ) {
@@ -206,17 +220,6 @@
}
} else {
$nameSpaceClause = '';
-   }
-
-   // Dump everything here
-   $nondefaults = $opts-getChangedValues();
-
-   if ( ( $wgEnotifWatchlist || $wgShowUpdatedMarker )  
$request-getVal( 'reset' )
-$request-wasPosted()
-   ) {
-   $user-clearAllNotifications();
-   $output-redirect( $this-getPageTitle()-getFullURL( 
$nondefaults ) );
-   return;
}
 
# Possible where conditions
@@ -270,51 +273,6 @@
$usePage = true;
}
 
-   # Show a message about slave lag, if applicable
-   $lag = wfGetLB()-safeGetLag( $dbr );
-   if ( $lag  0 ) {
-   $output-showLagWarning( $lag );
-   }
-
-   # Create output
-   $form = '';
-
-   # Show watchlist header
-   $form .= p;
-   $form .= $this-msg( 'watchlist-details' )-numParams( $nitems 
)-parse() . \n;
-   if ( $wgEnotifWatchlist  $user-getOption( 
'enotifwatchlistpages' ) ) {
-   $form .= $this-msg( 'wlheader-enotif' )-parse() . 
\n;
-   }
-   if ( $wgShowUpdatedMarker ) {
-

[MediaWiki-commits] [Gerrit] Remove deprecated MediaWiki::articleFromTitle() and WikiPage... - change (mediawiki/core)

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

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


Change subject: Remove deprecated MediaWiki::articleFromTitle() and 
WikiPage::createUpdates()
..

Remove deprecated MediaWiki::articleFromTitle() and WikiPage::createUpdates()

No uses found in core or Gerrit extensions.

* MediaWiki::articleFromTitle() (deprecated in 1.18)
* WikiPage::createUpdates() (deprecated in 1.18)

Change-Id: I689249b579ee89f883b97fdb4ac79fb3502c45dc
---
M RELEASE-NOTES-1.23
M includes/Wiki.php
M includes/WikiPage.php
3 files changed, 2 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/106920/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 8ef72e4..3013967 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -236,6 +236,7 @@
 * Linker::makeBrokenLinkObj() (deprecated in 1.16)
 * Linker::makeColouredLinkObj() (deprecated in 1.16)
 * Linker::makeSizeLinkObj() (deprecated in 1.17)
+* MediaWiki::articleFromTitle() (deprecated in 1.18)
 * ProfilerSimple::getCpuTime (deprecated in 1.20)
 * Revision::revText() (deprecated in 1.17)
 * SkinTemplate::jstext() (deprecated in 1.21)
@@ -267,6 +268,7 @@
 * User::getPageRenderingHash() (deprecated in 1.17)
 * WebRequest::getFileSize() (deprecated in 1.17)
 * WebRequest::isPathInfoBad() (deprecated in 1.17)
+* WikiPage::createUpdates() (deprecated in 1.18)
 * wfGenerateToken (deprecated in 1.20)
 * wfStreamFile (deprecated in 1.19)
 * wfUILang (deprecated in 1.18)
diff --git a/includes/Wiki.php b/includes/Wiki.php
index 5fab9dc..9a6e6b9 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -155,19 +155,6 @@
}
 
/**
-* Create an Article object of the appropriate class for the given page.
-*
-* @deprecated in 1.18; use Article::newFromTitle() instead
-* @param $title Title
-* @param $context IContextSource
-* @return Article object
-*/
-   public static function articleFromTitle( $title, IContextSource 
$context ) {
-   wfDeprecated( __METHOD__, '1.18' );
-   return Article::newFromTitle( $title, $context );
-   }
-
-   /**
 * Performs the request.
 * - bad titles
 * - read restriction
diff --git a/includes/WikiPage.php b/includes/WikiPage.php
index 8c035aa..5fc5a38 100644
--- a/includes/WikiPage.php
+++ b/includes/WikiPage.php
@@ -3335,22 +3335,6 @@
}
 
/**
-* Perform article updates on a special page creation.
-*
-* @param $rev Revision object
-*
-* @todo This is a shitty interface function. Kill it and replace the
-* other shitty functions like doEditUpdates and such so it's not needed
-* anymore.
-* @deprecated since 1.18, use doEditUpdates()
-*/
-   public function createUpdates( $rev ) {
-   wfDeprecated( __METHOD__, '1.18' );
-   global $wgUser;
-   $this-doEditUpdates( $rev, $wgUser, array( 'created' = true ) 
);
-   }
-
-   /**
 * This function is called right before saving the wikitext,
 * so we can do things like signatures and links-in-context.
 *

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...SecurePoll)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: I91ede4c4ffb841da9a4f9cc212e67982c94ae6ab
---
M includes/main/Base.php
1 file changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/includes/main/Base.php b/includes/main/Base.php
index 046aff3..d10d5e6 100644
--- a/includes/main/Base.php
+++ b/includes/main/Base.php
@@ -93,15 +93,14 @@
 * a link target, and the link text.
 */
function setSubtitle( /*...*/ ) {
-   global $wgUser, $wgOut;
-   $skin = $wgUser-getSkin();
+   global $wgOut;
$title = $this-getPageTitle();
-   $subtitle = 'lt; ' . $skin-linkKnown( $title, 
htmlspecialchars( $title-getText() ) );
+   $subtitle = 'lt; ' . Linker::linkKnown( $title, 
htmlspecialchars( $title-getText() ) );
$pipe = wfMsg( 'pipe-separator' );
$links = func_get_args();
foreach ( $links as $link ) {
list( $title, $text ) = $link;
-   $subtitle .= $pipe . $skin-linkKnown( $title, 
htmlspecialchars( $text ) );
+   $subtitle .= $pipe . Linker::linkKnown( $title, 
htmlspecialchars( $text ) );
}
$wgOut-setSubtitle( $subtitle );
}

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...WikiLexicalData)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: Ia789e1d32ddb0a6a04641a83f7b84237c3de4f41
---
M OmegaWiki/DefinedMeaning.php
M OmegaWiki/DefinedMeaningModel.php
2 files changed, 44 insertions(+), 47 deletions(-)


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

diff --git a/OmegaWiki/DefinedMeaning.php b/OmegaWiki/DefinedMeaning.php
index ae8651b..f8f1af5 100644
--- a/OmegaWiki/DefinedMeaning.php
+++ b/OmegaWiki/DefinedMeaning.php
@@ -210,7 +210,7 @@
 * Potential refactor candidate!
 */
protected function getConceptPanel() {
-   global $wgTitle, $wgUser, $wdShowCopyPanel;
+   global $wgTitle, $wdShowCopyPanel;
$active = true; # wrong place, but hey
$dmId = $this-getDefinedMeaningId();
$dc = wdGetDataSetContext();
@@ -218,7 +218,6 @@
 
$html = div class=\dataset-panel\; ;
$html .= table border=\0\trth 
class=\dataset-panel-heading\$ow_conceptpanel/th/tr;
-   $sk = $wgUser-getSkin();
$meanings = getDefinedMeaningDataAssociatedByConcept( $dmId, 
$dc );
if ( $meanings ) {
foreach ( $meanings as $dm ) {
@@ -228,7 +227,7 @@
$prefix = $dataset-getPrefix();
 
$class = $active ? 'dataset-panel-active' : 
'dataset-panel-inactive';
-   $slot = $active ? $name : $sk-makeLinkObj( 
$dm-getTitleObject(), $name, dataset=$prefix );
+   $slot = $active ? $name : 
Linker::makeLinkObj( $dm-getTitleObject(), $name, dataset=$prefix );
$html .= trtd 
class=\$class\$slot/td/tr;
}
} else {
@@ -237,7 +236,7 @@
}
$cmtitle = Title::newFromText( Special:ConceptMapping );
$titleText = $wgTitle-getPrefixedURL();
-   $cmlink = $sk-makeLinkObj( $cmtitle, small . wfMessage( 
ow_add_concept_link )-text() . /small, 
set_$dc=$dmIdsuppressWarnings=true );
+   $cmlink = Linker::makeLinkObj( $cmtitle, small . wfMessage( 
ow_add_concept_link )-text() . /small, 
set_$dc=$dmIdsuppressWarnings=true );
$html .= trtd$cmlink/td/tr\n;
if ( $wdShowCopyPanel ) {
$html .= trtd . $this-getCopyPanel() . 
tdtr;
diff --git a/OmegaWiki/DefinedMeaningModel.php 
b/OmegaWiki/DefinedMeaningModel.php
index ace2a19..25266ff 100644
--- a/OmegaWiki/DefinedMeaningModel.php
+++ b/OmegaWiki/DefinedMeaningModel.php
@@ -6,7 +6,7 @@
 require_once( Transaction.php );
 require_once( WikiDataAPI.php );
 
-/** 
+/**
  * A front end for the database information/ArrayRecord and any other 
information
  * to do with defined meanings (as per MVC)
  * Will collect code for instantiating and loading and saving DMs here for now.
@@ -60,11 +60,11 @@
 
/**
 * Checks for existence of a DM.
-* If $this-definingExpression is set, it will also check if the 
spelling 
-* of the defining expression matches 
-* 
+* If $this-definingExpression is set, it will also check if the 
spelling
+* of the defining expression matches
+*
 * @param Boolean If true, checks beyond the dataset context and will
-*return the first match. Always searches current 
+*return the first match. Always searches current
 *context first.
 * @param Boolean Switch dataset context if match outside default is 
found.
 *
@@ -72,7 +72,7 @@
 *
 */
public function checkExistence( $searchAllDataSets = false, 
$switchContext = false ) {
-   
+
global $wdCurrentContext;
$match = $this-checkExistenceInDataSet( $this-dataset );
if ( !is_null( $match ) ) {
@@ -146,7 +146,7 @@
}
return $dc;
}
-   /** 
+   /**
 * Load the associated record object.
 *
 * @return Boolean indicating success.
@@ -200,7 +200,7 @@
return true;
}
 
-   /**  
+   /**
 * FIXME - work in progress
 *
 */
@@ -209,7 +209,7 @@
initializeObjectAttributeEditors( $this-viewInformation );
 
# Nice try sherlock, but we really need to get our DMID from 
elsewhere
-   # $definedMeaningId = $this-getId(); 
+   # $definedMeaningId = $this-getId();
 
# Need 3 steps: copy defining expression, create new dm, then 
update
 
@@ -218,12 +218,12 @@
# to make the 

[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...GoogleMaps)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: Ia37ffa514bb305fecb79376ffc55aab480a66b77
---
M GoogleMaps.body.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/GoogleMaps.body.php b/GoogleMaps.body.php
index a5199f4..fdde770 100644
--- a/GoogleMaps.body.php
+++ b/GoogleMaps.body.php
@@ -553,7 +553,6 @@
 
static function addMarker($pExporter, $pParser, 
$pLocalParser, $pLat, $pLon,
$pIcon, $pTitle, $pTabs, $pCaption, $pLineColorSet) {
-   global $wgUser;
$parsed = self::parseWikiText($pParser, $pLocalParser, 
preg_replace('/\r\n/', 'br /', $pCaption), $pParser-mTitle, 
$pParser-mOptions);
$title = Title::newFromText($pTitle);
 
@@ -571,8 +570,7 @@
$parsedArticleText = is_null($revision) ? null :
self::parseWikiText($pParser, $pLocalParser, 
$revision-getText(), $revision-getTitle(), $pParser-mOptions);
$titleMaybeNonexistent = is_null($title) ? 
Title::makeTitleSafe(NS_MAIN, $pTitle) : $title;
-   $skin = $wgUser-getSkin();
-   $titleLink = is_null($titleMaybeNonexistent) ? '' : 
$skin-makeLinkObj($titleMaybeNonexistent);
+   $titleLink = is_null($titleMaybeNonexistent) ? '' : 
Linker::makeLinkObj($titleMaybeNonexistent);
if (count($pTabs)) {
$pTabs[count($pTabs)-1]['googlemaps-caption'] = 
$parsed;
$pExporter-addMarker( $pLat, $pLon, $pIcon, 
$pTitle, $titleLink,

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

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

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


[MediaWiki-commits] [Gerrit] Avoid using User::getSkin() - change (mediawiki...LinkFilter)

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

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


Change subject: Avoid using User::getSkin()
..

Avoid using User::getSkin()

Change-Id: I205c1809a10bf83f5781c8d5f3e6f281b83e3545
---
M LinkPage.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/LinkPage.php b/LinkPage.php
index 29132d8..65cb85e 100644
--- a/LinkPage.php
+++ b/LinkPage.php
@@ -50,9 +50,9 @@
}
 
function view() {
-   global $wgOut, $wgUser, $wgLinkPageDisplay;
+   global $wgOut, $wgLinkPageDisplay;
 
-   $sk = $wgUser-getSkin();
+   $sk = $wgOut-getSkin();
 
$wgOut-setHTMLTitle( $this-getTitle()-getText() );
$wgOut-setPageTitle( $this-getTitle()-getText() );
@@ -426,4 +426,4 @@
 
return $output;
}
-}
\ No newline at end of file
+}

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...Maintenance)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

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


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

diff --git a/Maintenance_body.php b/Maintenance_body.php
index c660eae..1da560f 100644
--- a/Maintenance_body.php
+++ b/Maintenance_body.php
@@ -81,8 +81,6 @@
$this-setHeaders();
$out = $this-getOutput();
$out-addWikiMsg( 'maintenance-header' );
-
-   $sk = $this-getUser()-getSkin();
$out-addHTML( 'ul' );
 
//scripts that we allow to run via this interface, from the 
metadata.ini file
@@ -90,7 +88,7 @@
sort( $scripts );
foreach( $scripts as $type ) {
$title = $this-getTitle( $type );
-   $out-addHTML( 'li'. $sk-makeKnownLinkObj( $title, 
htmlspecialchars( $type ) ) . ' -- '.
+   $out-addHTML( 'li'. Linker::makeKnownLinkObj( 
$title, htmlspecialchars( $type ) ) . ' -- '.
wfMessage( 'maintenance-'.$type.'-desc' 
)-parse() . '/li' );
}
$out-addHTML( '/ul' );
@@ -101,7 +99,7 @@
 
$this-setHeaders();
$out = $this-getOutput();
-   $out-addHTML( $this-getUser()-getSkin()-makeKnownLinkObj( 
$this-getTitle(), wfMessage( 'maintenance-backlink' )-escaped() ). 'br /' );
+   $out-addHTML( Linker::makeKnownLinkObj( $this-getTitle(), 
wfMessage( 'maintenance-backlink' )-escaped() ). 'br /' );
 
if( $this-errmsg ) {
$out-addWikiMsg( $this-errmsg );
@@ -145,7 +143,7 @@
 
$out = $this-getOutput();
$this-setHeaders();
-   $out-addHTML( $this-getUser()-getSkin()-makeKnownLinkObj( 
$this-getTitle(), wfMessage( 'maintenance-backlink' )-escaped() ). 'br /' );
+   $out-addHTML( Linker::makeKnownLinkObj( $this-getTitle(), 
wfMessage( 'maintenance-backlink' )-escaped() ). 'br /' );
 
if( $this-errmsg ) {
$out-addWikiMsg( $this-errmsg );
@@ -166,7 +164,7 @@
str_replace(
array( 'dirname( __FILE__ )' ), 
//search
array( '$IP/maintenance' ), 
//replace
-   preg_replace( 
'/\s+(exit|die)\s*\(.*?\)\s*;/', ';', 
+   preg_replace( 
'/\s+(exit|die)\s*\(.*?\)\s*;/', ';',
file_get_contents( 
$IP/maintenance/sql.php )
)
)
@@ -348,7 +346,7 @@
}
$out-addHTML( '/pre' );
$this-scriptDone( $script );
-   $out-addHTML( $this-getUser()-getSkin()-makeKnownLinkObj( 
$this-getTitle(), wfMessage( 'maintenance-backlink' )-escaped() ). 'br /' );
+   $out-addHTML( Linker::makeKnownLinkObj( $this-getTitle(), 
wfMessage( 'maintenance-backlink' )-escaped() ). 'br /' );
}
 
private function parseMetadata() {

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...MassEditRegex)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: Ib66bee38af2164669f2414f3bfa4d7c26eebe694
---
M MassEditRegex.class.php
1 file changed, 2 insertions(+), 5 deletions(-)


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

diff --git a/MassEditRegex.class.php b/MassEditRegex.class.php
index ccf5950..d2f0563 100644
--- a/MassEditRegex.class.php
+++ b/MassEditRegex.class.php
@@ -30,7 +30,6 @@
private $aMatch;  /// $strMatch exploded into array
private $aReplace;/// $strReplace exploded into array
private $strSummary;  /// Edit summary
-   private $sk;  /// Skin instance
private $diff;/// Access to diff engine
 
function __construct() {
@@ -79,8 +78,6 @@
$this-aReplace = explode(\n, $this-strReplace);
 
$this-strSummary = $wgRequest-getText( 'wpSummary', '' );
-
-   $this-sk = $wgUser-getSkin();
 
// Replace \n in the match with an actual newline (since a 
newline can't
// be typed in, it'll act as the splitter for the next regex)
@@ -209,7 +206,7 @@
Xml::tags( 'div',
array( 'class' = 'mw-summary-preview' ),
wfMsgExt( 'summary-preview', 'parseinline' ) .
-   $this-sk-commentBlock( 
$this-strSummary )
+   Linker::commentBlock( $this-strSummary 
)
) .
Xml::closeElement( 'div' ) . // class=editOptions
 
@@ -503,7 +500,7 @@
} else {
$wgOut-addWikiMsg( 
'masseditregex-num-articles-changed', $iArticleCount );
$wgOut-addHTML(
-   $this-sk-makeKnownLinkObj(
+   Linker::makeKnownLinkObj(
SpecialPage::getSafeTitleFor( 
'Contributions', $wgUser-getName() ),
wfMsgHtml( 
'masseditregex-view-full-summary' )
)

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...Video)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: Id333dc147b232380d28c3df10c9b1d7a639f4d0c
---
M SpecialNewVideos.php
M VideoGallery.php
M providers/BlipTVVideo.php
3 files changed, 10 insertions(+), 38 deletions(-)


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

diff --git a/SpecialNewVideos.php b/SpecialNewVideos.php
index 58859bf..7c34c0a 100644
--- a/SpecialNewVideos.php
+++ b/SpecialNewVideos.php
@@ -27,12 +27,11 @@
$out = $this-getOutput();
$request = $this-getRequest();
$lang = $this-getLanguage();
-   
+
$out-setPageTitle( wfMsgHtml( 'newvideos' ) );
 
$wpIlMatch = $request-getText( 'wpIlMatch' );
$dbr = wfGetDB( DB_SLAVE );
-   $sk = $this-getSkin();
$shownav = !$this-including();
$hidebots = $request-getBool( 'hidebots', 1 );
 
@@ -153,7 +152,7 @@
 
$nt = Title::newFromText( $name, NS_VIDEO );
$vid = new Video( $nt, $this-getContext() );
-   $ul = $sk-makeLinkObj( Title::makeTitle( NS_USER, $ut 
), $ut );
+   $ul = Linker::makeLinkObj( Title::makeTitle( NS_USER, 
$ut ), $ut );
 
$gallery-add(
$vid,
@@ -205,7 +204,7 @@
$searchpar
);
 
-   $dateLink = $sk-linkKnown(
+   $dateLink = Linker::linkKnown(
$titleObj,
htmlspecialchars( wfMsgHtml( 'sp-newimages-showfrom', 
$date, $time ) ),
array(),
@@ -219,7 +218,7 @@
 
$showhide = $hidebots ? wfMsg( 'show' ) : wfMsg( 'hide' );
 
-   $botLink = $sk-linkKnown(
+   $botLink = Linker::linkKnown(
$titleObj,
htmlspecialchars( wfMsg( 'showhidebots', $showhide ) ),
array(),
@@ -234,7 +233,7 @@
$botpar,
$searchpar
);
-   $prevLink = $sk-linkKnown(
+   $prevLink = Linker::linkKnown(
$titleObj,
$prevLink,
array(),
@@ -250,7 +249,7 @@
$searchpar
);
 
-   $nextLink = $sk-linkKnown(
+   $nextLink = Linker::linkKnown(
$titleObj,
$nextLink,
array(),
diff --git a/VideoGallery.php b/VideoGallery.php
index 174caa6..5ceac88 100644
--- a/VideoGallery.php
+++ b/VideoGallery.php
@@ -82,7 +82,6 @@
  */
 class VideoGallery {
var $mVideos, $mShowFilename;
-   var $mSkin = false;
 
/**
 * Is the gallery on a wiki page (i.e. not a special page)
@@ -167,30 +166,6 @@
}
 
/**
-* Instruct the class to use a specific skin for rendering
-*
-* @param $skin Skin object
-*/
-   function useSkin( $skin ) {
-   $this-mSkin = $skin;
-   }
-
-   /**
-* Return the skin that should be used
-*
-* @return Skin object
-*/
-   function getSkin() {
-   if( !$this-mSkin ) {
-   global $wgUser;
-   $skin = $wgUser-getSkin();
-   } else {
-   $skin = $this-mSkin;
-   }
-   return $skin;
-   }
-
-   /**
 * Add a video to the gallery.
 *
 * @param $video Video object that is added to the gallery
@@ -240,8 +215,6 @@
function toHTML() {
global $wgLang;
 
-   $sk = $this-getSkin();
-
$s = 'table class=gallery cellspacing=0 cellpadding=0';
if( $this-getCaption() )
$s .= \n\tcaption{$this-mCaption}/caption;
@@ -268,7 +241,7 @@
$nb = '';
 
$textlink = $this-mShowFilename ?
-   $sk-makeKnownLinkObj( $nt, htmlspecialchars( 
$wgLang-truncate( $nt-getText(), 30, '...' ) ) ) . br /\n :
+   Linker::makeKnownLinkObj( $nt, 
htmlspecialchars( $wgLang-truncate( $nt-getText(), 30, '...' ) ) ) . br 
/\n :
'';
 
# ATTENTION: The newline after div 
class=gallerytext is needed to accommodate htmltidy which
@@ -325,4 +298,4 @@
: false;
}
 
-} //class
\ No newline at end of file

[MediaWiki-commits] [Gerrit] Don't pass arguments to methods that don't need them - change (mediawiki...TimedMediaHandler)

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

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


Change subject: Don't pass arguments to methods that don't need them
..

Don't pass arguments to methods that don't need them

Change-Id: Id6a16ab162cc6a7fd9c56e8591de74a78e662099
---
M TimedMediaIframeOutput.php
1 file changed, 2 insertions(+), 4 deletions(-)


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

diff --git a/TimedMediaIframeOutput.php b/TimedMediaIframeOutput.php
index dc22ca0..587147c 100644
--- a/TimedMediaIframeOutput.php
+++ b/TimedMediaIframeOutput.php
@@ -49,8 +49,6 @@
return false;
}
 
-   $skin = $wgUser-getSkin();
-
// Setup the render parm
$file = wfFindFile( $title );
if ( !$file ) {
@@ -74,7 +72,7 @@
echo Html::element( 'meta', array( 'name' = 
'ResourceLoaderDynamicStyles', 'content' = '' ) );
?
?php
-   echo $wgOut-getHeadLinks($skin);
+   echo $wgOut-getHeadLinks();
echo $wgOut-getHeadItems();
?
style type=text/css
@@ -96,7 +94,7 @@
  position:relative;
}
/style
-   ?php echo $wgOut-getHeadScripts( $skin ); ?
+   ?php echo $wgOut-getHeadScripts(); ?
?php
echo Html::inlineScript(
ResourceLoader::makeLoaderConditionalScript(

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...SemanticPageMaker)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: Ib06feb6e6adb9d41b45b32af55edd84e963a22bd
---
M includes/SPM_Utils.php
M specials/WidgetAssembler/SPM_UploadWindow.php
M specials/WidgetAssembler/SPM_UploadWindow2.php
3 files changed, 14 insertions(+), 24 deletions(-)


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

diff --git a/includes/SPM_Utils.php b/includes/SPM_Utils.php
index db4be65..1b2189a 100644
--- a/includes/SPM_Utils.php
+++ b/includes/SPM_Utils.php
@@ -18,11 +18,11 @@
}
 
static function showCleanWikiOutput() {
-   global $wgOut, $wgUser;
+   global $wgOut;
 
+   $sk = $wgOut-getSkin();
$wgOut-disable();
 
-   $sk = $wgUser-getSkin();
$sk-initPage( $wgOut ); // need to call this to set skin name 
correctly
 
 // global $wgJsMimeType, $wgStylePath, $wgStyleVersion,
diff --git a/specials/WidgetAssembler/SPM_UploadWindow.php 
b/specials/WidgetAssembler/SPM_UploadWindow.php
index e3fd5c6..3ba30e8 100644
--- a/specials/WidgetAssembler/SPM_UploadWindow.php
+++ b/specials/WidgetAssembler/SPM_UploadWindow.php
@@ -300,7 +300,7 @@
 * @access private
 */
function processUpload() {
-   global $wgUser, $wgOut;
+   global $wgOut;
 
if ( !wfRunHooks( 'UploadForm:BeforeProcessing', array( $this 
) ) )
{
@@ -444,9 +444,8 @@
 
global $wgUploadSizeWarning;
if ( $wgUploadSizeWarning  ( $this-mFileSize  
$wgUploadSizeWarning ) ) {
-   $skin = $wgUser-getSkin();
-   $wsize = $skin-formatSize( 
$wgUploadSizeWarning );
-   $asize = $skin-formatSize( $this-mFileSize );
+   $wsize =Linker::formatSize( 
$wgUploadSizeWarning );
+   $asize = Linker::formatSize( $this-mFileSize );
$warning .= 'li' . wfMsgHtml( 'large-file', 
$wsize, $asize ) . '/li';
}
if ( $this-mFileSize == 0 ) {
@@ -560,9 +559,9 @@
}
 
if ( $file-exists() ) {
-   $dlink = $sk-makeKnownLinkObj( $file-getTitle() );
+   $dlink = Linker::makeKnownLinkObj( $file-getTitle() );
if ( $file-allowInlineDisplay() ) {
-   $dlink2 = $sk-makeImageLinkObj( 
$file-getTitle(), wfMsgExt( 'fileexists-thumb', 'parseinline', $dlink ),
+   $dlink2 = Linker::makeImageLinkObj( 
$file-getTitle(), wfMsgExt( 'fileexists-thumb', 'parseinline', $dlink ),
$file-getName(), 'right', array(), 
false, true );
} elseif ( !$file-allowInlineDisplay()  
$file-isSafeFile() ) {
$icon = $file-iconThumb();
@@ -577,9 +576,9 @@
} elseif ( $file_lc  $file_lc-exists() ) {
# Check if image with lowercase extension exists.
# It's not forbidden but in 99% it makes no sense to 
upload the same filename with uppercase extension
-   $dlink = $sk-makeKnownLinkObj( $nt_lc );
+   $dlink = Linker::makeKnownLinkObj( $nt_lc );
if ( $file_lc-allowInlineDisplay() ) {
-   $dlink2 = $sk-makeImageLinkObj( $nt_lc, 
wfMsgExt( 'fileexists-thumb', 'parseinline', $dlink ),
+   $dlink2 = Linker::makeImageLinkObj( $nt_lc, 
wfMsgExt( 'fileexists-thumb', 'parseinline', $dlink ),
$nt_lc-getText(), 'right', array(), 
false, true );
} elseif ( !$file_lc-allowInlineDisplay()  
$file_lc-isSafeFile() ) {
$icon = $file_lc-iconThumb();
@@ -599,7 +598,7 @@
$file_thb = wfLocalFile( $nt_thb );
if ( $file_thb-exists() ) {
# Check if an image without leading '180px-' 
(or similiar) exists
-   $dlink = $sk-makeKnownLinkObj( $nt_thb );
+   $dlink = Linker::makeKnownLinkObj( $nt_thb );
if ( $file_thb-allowInlineDisplay() ) {
$dlink2 = $sk-makeImageLinkObj( 
$nt_thb,
wfMsgExt( 'fileexists-thumb', 
'parseinline', $dlink ),
@@ -828,7 +827,7 @@
function mainUploadWindowForm( $msg = '' ) {
global $wgOut, $wgUser, $wgContLang;

[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...SolrStore)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: I7796ed1a285bfe50b6701bf1d2738c40fb01ff6f
---
M SpecialSolrSearch.php
1 file changed, 12 insertions(+), 21 deletions(-)


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

diff --git a/SpecialSolrSearch.php b/SpecialSolrSearch.php
index 220e670..f98068d 100644
--- a/SpecialSolrSearch.php
+++ b/SpecialSolrSearch.php
@@ -2,14 +2,13 @@
 
 /**
  * SolrStore: The SolrStore Extesion is Semantic Mediawiki Searchprovieder 
based on Apache Solr.
- * 
+ *
  * This is the SpecialPage, displaying the SearchSets and Results
- * 
+ *
  * @defgroup SolrStore
  * @author Simon Bachenberg, Sascha Schueller
  */
 class SpecialSolrSearch extends SpecialPage {
-
/**
 * Set up basic search parameters from the request and user settings.
 * Typically you'll pass $wgRequest and $wgUser.
@@ -19,12 +18,10 @@
 */
public function __construct() {
parent::__construct( SolrSearch );
-   global $wgRequest, $wgUser;
-   $user = $wgUser;
+   global $wgRequest;
$request = $wgRequest;
list( $this-limit, $this-offset ) = $request-getLimitOffset( 
20, 'searchlimit' );
 
-   $this-sk = $user-getSkin();
$this-didYouMeanHtml = ''; # html of did you mean... link
}
 
@@ -79,9 +76,6 @@
global $wgOut, $wgUser, $wgScript, $wgSolrFields;
wfProfileIn( __METHOD__ );
 
-   //$sk = $wgUser-getSkin ();
-
-
$wgOut-setPageTitle( wfMsg( 'solrstore-searchFieldSets-title' 
) );
$wgOut-setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 
'solrstore-searchFieldSets-title', 'SolrSearch: Select FieldSet' ) ) );
 
@@ -105,10 +99,8 @@
 * @param $fieldSet String
 */
public function showResults( $fieldSet ) {
-   global $wgOut, $wgUser, $wgContLang, $wgScript, 
$wgSolrShowRelated, $wgSolrDebug;
+   global $wgOut, $wgContLang, $wgScript, $wgSolrShowRelated, 
$wgSolrDebug;
wfProfileIn( __METHOD__ );
-
-   $sk = $wgUser-getSkin();
 
$this-searchEngine = SearchEngine::create();
$search =  $this-searchEngine;
@@ -166,7 +158,7 @@
if ( $suggestionSnippet == '' )
$suggestionSnippet = null;
 
-   $suggestLink = $sk-linkKnown(
+   $suggestLink = Linker::linkKnown(
$st, $suggestionSnippet, array( 
), $stParams
);
 
@@ -369,7 +361,7 @@
 * @param $fieldSets Array: terms to highlight
 */
protected function showHit( $result, $fieldSets ) {
-   global $wgLang, $wgUser;
+   global $wgLang;
wfProfileIn( __METHOD__ );
 
if ( $result-isBrokenTitle() ) {
@@ -377,7 +369,6 @@
return !-- Broken link in search result --\n;
}
 
-   $sk = $wgUser-getSkin();
$t = $result-getTitle();
 
$titleSnippet = $result-getTitleSnippet( $fieldSets );
@@ -389,7 +380,7 @@
 
wfRunHooks( 'ShowSearchHitTitle', array( $link_t, 
$titleSnippet, $result, $fieldSets, $this ) );
 
-   $link = $this-sk-linkKnown(
+   $link = Linker::linkKnown(
$link_t, $titleSnippet
);
// FÜLLEN
@@ -423,7 +414,7 @@
$redirectText = null;
 
$redirect = span class='searchalttitle' .
-   wfMsg( 'search-redirect', 
$this-sk-linkKnown( $redirectTitle, $redirectText ) ) .
+   wfMsg( 'search-redirect', 
Linker::linkKnown( $redirectTitle, $redirectText ) ) .
/span;
}
 
@@ -435,7 +426,7 @@
$sectionText = null;
 
$section = span class='searchalttitle' .
-   wfMsg( 'search-section', 
$this-sk-linkKnown( $sectionTitle, $sectionText ) ) .
+   wfMsg( 'search-section', 
Linker::linkKnown( $sectionTitle, $sectionText ) ) .
/span;
}
 
@@ -455,7 +446,7 @@
$byteSize = $result-getByteSize();
$wordCount = $result-getWordCount();
$timestamp = $result-getTimestamp();
-   $size = wfMsgExt( 'search-result-size', array( 'parsemag', 
'escape' ), 

[MediaWiki-commits] [Gerrit] Avoid using User::getSkin() - change (mediawiki...JSBreadCrumbs)

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

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


Change subject: Avoid using User::getSkin()
..

Avoid using User::getSkin()

Change-Id: I281bddd740cdf32b1342efabddb665274ee8c497
---
M JSBreadCrumbs.hooks.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/JSBreadCrumbs.hooks.php b/JSBreadCrumbs.hooks.php
index fa47f7d..960665c 100644
--- a/JSBreadCrumbs.hooks.php
+++ b/JSBreadCrumbs.hooks.php
@@ -25,7 +25,7 @@
return true;
}
 
-   
+
 
// Allow localized separator to be overriden
if ( $wgJSBreadCrumbsSeparator !== '' ) {
@@ -49,7 +49,7 @@
 
/**
 * GetPreferences hook
-* 
+*
 * Add module-releated items to the preferences
 */
public static function addPreferences( $user, $defaultPreferences ) {
@@ -78,11 +78,11 @@
}
 
static function enableBreadCrumbs() {
-   global $wgUser;
+   global $wgOut, $wgUser;
 
// Ensure we only enable bread crumbs if we are using vector and
// the user has them enabled
-   if ( $wgUser-getSkin() instanceof SkinVector  
$wgUser-getOption( jsbreadcrumbs-showcrumbs ) ) {
+   if ( $wgOut-getSkin() instanceof SkinVector  
$wgUser-getOption( jsbreadcrumbs-showcrumbs ) ) {
return true;
}
}

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...NewestPages)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: I042fe17a5240baa50b75c8498630fea5d80eb51d
---
M NewestPages.page.php
1 file changed, 3 insertions(+), 5 deletions(-)


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

diff --git a/NewestPages.page.php b/NewestPages.page.php
index de77080..a048d98 100644
--- a/NewestPages.page.php
+++ b/NewestPages.page.php
@@ -67,7 +67,7 @@
if( $count  0 ) {
# Make list
if( !$this-mIncluding )
-   
+
$wgOut-addWikiMsg( 'newestpages-showing', 
$wgLang-formatNum($count) );
$wgOut-addHTML( ol );
foreach ( $res as $row ) {
@@ -125,13 +125,11 @@
}
 
function makeListItem( $row ) {
-   global $wgUser;
$title = Title::makeTitleSafe( $row-page_namespace, 
$row-page_title );
if( !is_null( $title ) ) {
-   $skin = $wgUser-getSkin();
$link = $row-page_is_redirect
-   ? 'span class=allpagesredirect' . 
$skin-makeKnownLinkObj( $title ) . '/span'
-   : $skin-makeKnownLinkObj( $title );
+   ? 'span class=allpagesredirect' . 
Linker::makeKnownLinkObj( $title ) . '/span'
+   : Linker::makeKnownLinkObj( $title );
return( li{$link}/li\n );
} else {
return( !-- Invalid title  . htmlspecialchars( 
$row-page_title ) .  in namespace  . htmlspecialchars( $row-page_namespace 
) .  --\n );

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

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

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


[MediaWiki-commits] [Gerrit] Avoid using deprecated User::getSkin() - change (mediawiki...OpenID)

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

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


Change subject: Avoid using deprecated User::getSkin()
..

Avoid using deprecated User::getSkin()

Change-Id: I3870ffd3ad3007e6e01e8e5f768e83ddbb5358a5
---
M OpenID.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/OpenID.hooks.php b/OpenID.hooks.php
index 4c3dd0d..bb0e982 100644
--- a/OpenID.hooks.php
+++ b/OpenID.hooks.php
@@ -100,13 +100,13 @@
 * @return bool
 */
public static function onPersonalUrls( $personal_urls, $title ) {
-   global $wgOpenIDHideOpenIDLoginLink, $wgUser, 
$wgOpenIDLoginOnly;
+   global $wgOpenIDHideOpenIDLoginLink, $wgUser, $wgOut, 
$wgOpenIDLoginOnly;
 
if ( !$wgOpenIDHideOpenIDLoginLink
 ( $wgUser-getID() == 0 )
 OpenID::isAllowedMode( 'consumer' ) ) {
 
-   $sk = $wgUser-getSkin();
+   $sk = $wgOut-getSkin();
$returnto = $title-isSpecial( 'Userlogout' ) ? '' : ( 
'returnto=' . $title-getPrefixedURL() );
 
$personal_urls['openidlogin'] = array(

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

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

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


[MediaWiki-commits] [Gerrit] Avoid using deprecated User::getSkin() - change (mediawiki...PollNY)

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

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


Change subject: Avoid using deprecated User::getSkin()
..

Avoid using deprecated User::getSkin()

Change-Id: I83a16046589d61c50c74aa4042a0f423edf1d7c5
---
M PollNYHooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/PollNYHooks.php b/PollNYHooks.php
index a71fde0..71ec7d2 100644
--- a/PollNYHooks.php
+++ b/PollNYHooks.php
@@ -192,7 +192,7 @@
 
// Load CSS for non-Monaco skins - Monaco's ny.css 
already contains
// PollNY's styles (and more)
-   if ( get_class( $wgUser-getSkin() ) !== 'SkinMonaco' ) 
{
+   if ( get_class( $wgOut-getSkin() ) !== 'SkinMonaco' ) {
$wgOut-addModuleStyles( 'ext.pollNY' );
}
 
@@ -348,4 +348,4 @@
$list[NS_POLL_TALK] = 'Poll_talk';
return true;
}
-}
\ No newline at end of file
+}

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...RefreshSpecial)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: Ia7b4725f59f335bb8aa90640e44c4795a072e236
---
M RefreshSpecial.body.php
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/RefreshSpecial.body.php b/RefreshSpecial.body.php
index f0c7550..f057581 100644
--- a/RefreshSpecial.body.php
+++ b/RefreshSpecial.body.php
@@ -276,7 +276,7 @@
 * On submit
 */
function doSubmit() {
-   global $wgOut, $wgUser, $wgRequest;
+   global $wgOut, $wgRequest;
/* guard against an empty array */
$array = $wgRequest-getArray( 'wpSpecial' );
if ( !is_array( $array ) || empty( $array ) || is_null( $array 
) ) {
@@ -286,9 +286,8 @@
 
$wgOut-setSubTitle( wfMsg( 'refreshspecial-choice', wfMsg( 
'refreshspecial-refreshing' ) ) );
$this-refreshSpecial();
-   $sk = $wgUser-getSkin();
$titleObj = SpecialPage::getTitleFor( 'RefreshSpecial' );
-   $link_back = $sk-makeKnownLinkObj( $titleObj, wfMsg( 
'refreshspecial-link-back' ) );
+   $link_back = Linker::makeKnownLinkObj( $titleObj, wfMsg( 
'refreshspecial-link-back' ) );
$wgOut-addHTML( 'br /b' . $link_back . '/b' );
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...SemanticForms)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: I069a740b4e7fa2aece7e8c99001008f21bc9a18b
---
M specials/SF_UploadWindow.php
1 file changed, 22 insertions(+), 31 deletions(-)


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

diff --git a/specials/SF_UploadWindow.php b/specials/SF_UploadWindow.php
index b14c99a..521626e 100644
--- a/specials/SF_UploadWindow.php
+++ b/specials/SF_UploadWindow.php
@@ -208,7 +208,7 @@
 */
protected function getUploadForm( $message = '', $sessionKey = '', 
$hideIgnoreWarning = false ) {
global $wgOut;
-   
+
# Initialize form
$form = new SFUploadForm( array(
'watch' = $this-watchCheck(),
@@ -230,7 +230,7 @@
 
# Add upload error message
$form-addPreText( $message );
-   
+
# Add footer to form
if ( !wfMessage( 'uploadfooter' )-isDisabled() ) {
$uploadFooter = wfMessage( 'uploadfooter' )-plain();
@@ -251,7 +251,7 @@
// Show a subtitle link to deleted revisions (to sysops et al 
only)
if ( $title instanceof Title  ( $count = $title-isDeleted() 
)  0  $wgUser-isAllowed( 'deletedhistory' ) ) {
$link = wfMessage( $wgUser-isAllowed( 'delete' ) ? 
'thisisdeleted' : 'viewdeleted' )
-   -rawParams( $wgUser-getSkin()-linkKnown(
+   -rawParams( Linker::linkKnown(
SpecialPage::getTitleFor( 'Undelete', 
$title-getPrefixedText() ),
wfMessage( 'restorelink' )-numParams( 
$count )-escaped()
)
@@ -280,7 +280,7 @@
$sessionKey = $this-mUpload-stashSession();
$message = 'h2' . wfMessage( 'uploadwarning' )-escaped() . 
/h2\n .
'div class=error' . $message . /div\n;
-   
+
$form = $this-getUploadForm( $message, $sessionKey );
$form-setSubmitText( wfMessage( 'upload-tryagain' )-text() );
$this-showUploadForm( $form );
@@ -406,12 +406,12 @@
// any more... and it messes up the encoding for all other
// browsers. @TODO - fix handling in IE!
//$basename = utf8_decode( $basename );
-   
+
$output = END
script type=text/javascript
var input = parent.window.jQuery( 
parent.document.getElementById({$this-mInputID}) );
 END;
-   
+
if ( $this-mDelimiter == null ) {
$output .= END
input.val( '$basename' );
@@ -425,7 +425,7 @@
// both a delimiter and a file name; and add on a delimiter
// at the end in any case
var cur_value = 
parent.document.getElementById({$this-mInputID}).value;
-   
+
if (cur_value === '') {
input.val( '$basename' + '{$this-mDelimiter} ' );
input.change();
@@ -715,7 +715,7 @@
protected $mSessionKey;
protected $mHideIgnoreWarning;
protected $mDestWarningAck;
-   
+
protected $mSourceIds;
 
public function __construct( $options = array() ) {
@@ -756,9 +756,9 @@
}
 
/**
-* Get the descriptor of the fieldset that contains the file source 
+* Get the descriptor of the fieldset that contains the file source
 * selection. The section is 'source'
-* 
+*
 * @return array Descriptor array
 */
protected function getSourceSection() {
@@ -836,7 +836,7 @@
 
/**
 * Get the messages indicating which extensions are preferred and 
prohibitted.
-* 
+*
 * @return string HTML string containing the message
 */
protected function getExtensionsMessage() {
@@ -872,7 +872,7 @@
/**
 * Get the descriptor of the fieldset that contains the file description
 * input. The section is 'description'
-* 
+*
 * @return array Descriptor array
 */
protected function getDescriptionSection() {
@@ -948,9 +948,9 @@
}
 
/**
-* Get the descriptor of the fieldset that contains the upload options, 
+* Get the descriptor of the fieldset that contains the upload options,
 * such as watch this file. The section is 'options'
-* 
+*
 * @return array Descriptor array
 */
protected function getOptionsSection() {
@@ -997,17 +997,8 @@

[MediaWiki-commits] [Gerrit] Avoid using deprecated User::getSkin() - change (mediawiki...ShoutWikiAds)

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

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


Change subject: Avoid using deprecated User::getSkin()
..

Avoid using deprecated User::getSkin()

Change-Id: I50a5c8c79a209428da48749831cfeb7cda352d3d
---
M ShoutWikiAds.class.php
1 file changed, 2 insertions(+), 6 deletions(-)


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

diff --git a/ShoutWikiAds.class.php b/ShoutWikiAds.class.php
index 1c6986d..272bb7d 100644
--- a/ShoutWikiAds.class.php
+++ b/ShoutWikiAds.class.php
@@ -684,13 +684,9 @@
 * @return String: skin name in lowercase
 */
public static function determineSkin() {
-   global $wgUser;
+   global $wgOut;
 
-   $skinObj = $wgUser-getSkin();
-
-   $skinName = strtolower( str_replace( 'Skin', '', get_class( 
$skinObj ) ) );
-
-   return $skinName;
+   return strtolower( $wgOut-getSkin()-getSkinName() );
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...SmoothGallery)

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

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


Change subject: Call Linker methods statically
..

Call Linker methods statically

Change-Id: I9731915a5ce5c992885cc0c98569b3827f25d5b6
---
M SmoothGalleryParser.php
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SmoothGallery 
refs/changes/41/106941/1

diff --git a/SmoothGalleryParser.php b/SmoothGalleryParser.php
index e27b30a..6ceb2a3 100644
--- a/SmoothGalleryParser.php
+++ b/SmoothGalleryParser.php
@@ -177,7 +177,6 @@
}
 
function parseImage( $title, $parser, $galleryArray, $description ) {
-   global $wgUser;
global $wgSmoothGalleryThumbHeight, $wgSmoothGalleryThumbWidth;
 
$imageArray = Array();
@@ -242,13 +241,11 @@
}
}
 
-   $skin = $wgUser-getSkin();
-
// Everything is checked, and converted; add to the array and 
return
$imageArray[title] = $title;
 
// We need the following for the image's div
-   $imageArray[heading] = $skin-makeKnownLinkObj( 
$img_obj-getTitle(), $img_obj-getName() );
+   $imageArray[heading] = Linker::makeKnownLinkObj( 
$img_obj-getTitle(), $img_obj-getName() );
$imageArray[description] = $description;
$imageArray[full_url] = $title-getFullURL();
$imageArray[view_url] = $img_obj-getViewURL();

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

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

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


[MediaWiki-commits] [Gerrit] More RELEASE-NOTES-1.22 improvments - change (mediawiki/core)

2014-01-11 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review.

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


Change subject: More RELEASE-NOTES-1.22 improvments
..

More RELEASE-NOTES-1.22 improvments

Added note about curl, moved section about 1.22.1 ahead of 1.22.0

Change-Id: I70970c03dbcfcb567881a007cda3e739be89d5dd
---
M RELEASE-NOTES-1.22
1 file changed, 12 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/106942/1

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 46f31ba..6bff5b1 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -11,7 +11,9 @@
 * Configuration changes in 1.22.0
 * Bug fixes in 1.22.0
 * API changes in 1.22.0
+* Languages updated in 1.22.1
 * Languages updated in 1.22.0
+* Other Changes in 1.22.1
 * Other changes in 1.22.0
 
 === Breaking Changes in 1.22.0 ===
@@ -465,6 +467,14 @@
   file repositories, and related ForeignAPIRepo methods getInfo and getApiUrl.
 * The new query module list=allfileusages to enumerate file usages was added.
 
+=== Languages updated in 1.22.1 ===
+* (bug 56931) Updated the plural rules to CLDR 24. They are in new format
+  which is detailed in UTS 35 Rev 33. The PHP parser and evaluator as well as
+  the JavaScript evaluator were updated to support the new format. Plural rules
+  for some languages have changed, most notably Russian. Affected software
+  messages have been updated and marked for review at translatewiki.net.
+  This change is backported from the development branch of MediaWiki 1.23.
+
 === Languages updated in 1.22.0 ===
 
 MediaWiki supports over 350 languages. Many localisations are updated
@@ -478,13 +488,8 @@
 * Batak Toba (bbc-latn) added.
 * (bug 46751) Made Buryat (Russia) (буряад) (bxr) fallback to Russian.
 
-=== Languages updated in 1.22.1 ===
-* (bug 56931) Updated the plural rules to CLDR 24. They are in new format
-  which is detailed in UTS 35 Rev 33. The PHP parser and evaluator as well as
-  the JavaScript evaluator were updated to support the new format. Plural rules
-  for some languages have changed, most notably Russian. Affected software
-  messages have been updated and marked for review at translatewiki.net.
-  This change is backported from the development branch of MediaWiki 1.23.
+=== Other changes in 1.22.1 ===
+* Restore compatibility with curl  7.16.2
 
 === Other changes in 1.22.0 ===
 * redirect.php was removed. It was unused.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70970c03dbcfcb567881a007cda3e739be89d5dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_22
Gerrit-Owner: MarkAHershberger mhershber...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] More RELEASE-NOTES-1.22 improvments - change (mediawiki/core)

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

Change subject: More RELEASE-NOTES-1.22 improvments
..


More RELEASE-NOTES-1.22 improvments

Added note about curl, moved section about 1.22.1 ahead of 1.22.0

Change-Id: I70970c03dbcfcb567881a007cda3e739be89d5dd
---
M RELEASE-NOTES-1.22
1 file changed, 12 insertions(+), 7 deletions(-)

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



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 46f31ba..6bff5b1 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -11,7 +11,9 @@
 * Configuration changes in 1.22.0
 * Bug fixes in 1.22.0
 * API changes in 1.22.0
+* Languages updated in 1.22.1
 * Languages updated in 1.22.0
+* Other Changes in 1.22.1
 * Other changes in 1.22.0
 
 === Breaking Changes in 1.22.0 ===
@@ -465,6 +467,14 @@
   file repositories, and related ForeignAPIRepo methods getInfo and getApiUrl.
 * The new query module list=allfileusages to enumerate file usages was added.
 
+=== Languages updated in 1.22.1 ===
+* (bug 56931) Updated the plural rules to CLDR 24. They are in new format
+  which is detailed in UTS 35 Rev 33. The PHP parser and evaluator as well as
+  the JavaScript evaluator were updated to support the new format. Plural rules
+  for some languages have changed, most notably Russian. Affected software
+  messages have been updated and marked for review at translatewiki.net.
+  This change is backported from the development branch of MediaWiki 1.23.
+
 === Languages updated in 1.22.0 ===
 
 MediaWiki supports over 350 languages. Many localisations are updated
@@ -478,13 +488,8 @@
 * Batak Toba (bbc-latn) added.
 * (bug 46751) Made Buryat (Russia) (буряад) (bxr) fallback to Russian.
 
-=== Languages updated in 1.22.1 ===
-* (bug 56931) Updated the plural rules to CLDR 24. They are in new format
-  which is detailed in UTS 35 Rev 33. The PHP parser and evaluator as well as
-  the JavaScript evaluator were updated to support the new format. Plural rules
-  for some languages have changed, most notably Russian. Affected software
-  messages have been updated and marked for review at translatewiki.net.
-  This change is backported from the development branch of MediaWiki 1.23.
+=== Other changes in 1.22.1 ===
+* Restore compatibility with curl  7.16.2
 
 === Other changes in 1.22.0 ===
 * redirect.php was removed. It was unused.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70970c03dbcfcb567881a007cda3e739be89d5dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_22
Gerrit-Owner: MarkAHershberger mhershber...@wikimedia.org
Gerrit-Reviewer: MarkAHershberger mhershber...@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] Avoid calling deprecated User::getSkin() - change (mediawiki...Wikilog)

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

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


Change subject: Avoid calling deprecated User::getSkin()
..

Avoid calling deprecated User::getSkin()

Change-Id: If8246aa2c192d490d18c405d35e654a3b1c9ae4f
---
M WikilogFeed.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikilog 
refs/changes/45/106945/1

diff --git a/WikilogFeed.php b/WikilogFeed.php
index 4d9d530..c696042 100644
--- a/WikilogFeed.php
+++ b/WikilogFeed.php
@@ -77,7 +77,7 @@
 */
public function __construct( Title $title, $format, WikilogQuery 
$query, $limit )
{
-   global $wgUser;
+   global $wgOut;
 
$this-mTitle = $title;
$this-mFormat = $format;
@@ -87,7 +87,7 @@
$this-mIndexField = $this-getIndexField();
 
# Retrieve copyright notice.
-   $skin = $wgUser-getSkin();
+   $skin = $wgOut-getSkin();
$saveExpUrls = WikilogParser::expandLocalUrls();
$this-mCopyright = $skin-getCopyright( 'normal' );
WikilogParser::expandLocalUrls( $saveExpUrls );

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

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

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


[MediaWiki-commits] [Gerrit] WebInstaller: Don't call getSoftwareLink() - change (mediawiki/core)

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

Change subject: WebInstaller: Don't call getSoftwareLink()
..


WebInstaller: Don't call getSoftwareLink()

This gets the web installer working without the mysql or mysqli
PHP extension, which is not needed for other database systems.

* Avoid lego construction: put link text directly in the messages,
  which because the messages are parsed as wikitext, is easy to do.
* Put URLs in separate, ignored messages to avoid duplication in
  Database*::getSoftwareLink().
* Because I had to touch a MySQL-related i18n message, I figured
  this would be a good time to address bug 28281 (regarding MySQL
  forks and Special:Version).
* Other miscellaneous message changes, such as recommending the
  mysqli PHP extension over the old, deprecated mysql extension.

Bug: 28281
Bug: 58167
Change-Id: I6dbc9d32c8c2d8f233a67d574229b80444885aea
---
M RELEASE-NOTES-1.23
M includes/db/DatabaseMssql.php
M includes/db/DatabaseMysqlBase.php
M includes/db/DatabaseOracle.php
M includes/db/DatabasePostgres.php
M includes/db/DatabaseSqlite.php
M includes/installer/Installer.i18n.php
M includes/installer/WebInstallerPage.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messageTypes.inc
M maintenance/language/messages.inc
12 files changed, 66 insertions(+), 20 deletions(-)

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



diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index e017a62..1b0a4b7 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -102,6 +102,8 @@
   remaining page content.
 * (bug 23542) imagelinks now stores both the redirect and target (as
   templatelinks does).
+* (bug 58167) The web installer no longer throws an exception when PHP is
+  compiled without support for MySQL yet with support for another DBMS.
 
 === Web API changes in 1.23 ===
 * (bug 54884) action=parseprop=categories now indicates hidden and missing
diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index 3a89cd5..7fc655f 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -729,7 +729,7 @@
 * @return string wikitext of a link to the server software's web site
 */
public function getSoftwareLink() {
-   return [http://www.microsoft.com/sql/ MS SQL Server];
+   return [{{int:version-db-mssql-url}} MS SQL Server];
}
 
/**
diff --git a/includes/db/DatabaseMysqlBase.php 
b/includes/db/DatabaseMysqlBase.php
index 12fee94..1e29e1b 100644
--- a/includes/db/DatabaseMysqlBase.php
+++ b/includes/db/DatabaseMysqlBase.php
@@ -763,7 +763,14 @@
 * @return string
 */
public function getSoftwareLink() {
-   return '[http://www.mysql.com/ MySQL]';
+   $version = $this-getServerVersion();
+   if ( strpos( $version, 'MariaDB' ) !== false ) {
+   return '[{{int:version-db-mariadb-url}} MariaDB]';
+   } elseif ( strpos( $version, 'percona' ) !== false ) {
+   return '[{{int:version-db-percona-url}} Percona 
Server]';
+   } else {
+   return '[{{int:version-db-mysql-url}} MySQL]';
+   }
}
 
/**
diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php
index 3336d1e..9761639 100644
--- a/includes/db/DatabaseOracle.php
+++ b/includes/db/DatabaseOracle.php
@@ -939,7 +939,7 @@
 * @return string wikitext of a link to the server software's web site
 */
public function getSoftwareLink() {
-   return '[http://www.oracle.com/ Oracle]';
+   return '[{{int:version-db-oracle-url}} Oracle]';
}
 
/**
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
index 21a7bcf..536e464 100644
--- a/includes/db/DatabasePostgres.php
+++ b/includes/db/DatabasePostgres.php
@@ -1140,7 +1140,7 @@
 * @return string wikitext of a link to the server software's web site
 */
public function getSoftwareLink() {
-   return '[http://www.postgresql.org/ PostgreSQL]';
+   return '[{{int:version-db-postgres-url}} PostgreSQL]';
}
 
/**
diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php
index ea35391..12eca7b 100644
--- a/includes/db/DatabaseSqlite.php
+++ b/includes/db/DatabaseSqlite.php
@@ -655,7 +655,7 @@
 * @return string wikitext of a link to the server software's web site
 */
public function getSoftwareLink() {
-   return [http://sqlite.org/ SQLite];
+   return [{{int:version-db-sqlite-url}} SQLite];
}
 
/**
diff --git a/includes/installer/Installer.i18n.php 

[MediaWiki-commits] [Gerrit] WebInstaller: Don't call getSoftwareLink() - change (mediawiki/core)

2014-01-11 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review.

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


Change subject: WebInstaller: Don't call getSoftwareLink()
..

WebInstaller: Don't call getSoftwareLink()

This gets the web installer working without the mysql or mysqli
PHP extension, which is not needed for other database systems.

* Avoid lego construction: put link text directly in the messages,
  which because the messages are parsed as wikitext, is easy to do.
* Put URLs in separate, ignored messages to avoid duplication in
  Database*::getSoftwareLink().
* Because I had to touch a MySQL-related i18n message, I figured
  this would be a good time to address bug 28281 (regarding MySQL
  forks and Special:Version).
* Other miscellaneous message changes, such as recommending the
  mysqli PHP extension over the old, deprecated mysql extension.

Bug: 28281
Bug: 58167
Manually cherry picked from Change-Id: I6dbc9d32c8c2d8f233a67d574229b80444885aea

Change-Id: I6296a106ffaf5f24fca29eacadc7721d9b83340c
---
M RELEASE-NOTES-1.22
M includes/db/DatabaseMssql.php
M includes/db/DatabaseMysqlBase.php
M includes/db/DatabaseOracle.php
M includes/db/DatabasePostgres.php
M includes/db/DatabaseSqlite.php
M includes/installer/Installer.i18n.php
M includes/installer/WebInstallerPage.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messageTypes.inc
M maintenance/language/messages.inc
12 files changed, 69 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/106953/1

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 6bff5b1..1fac0e4 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -9,6 +9,7 @@
 * Breaking Changes in 1.22.0
 * New features in 1.22.0
 * Configuration changes in 1.22.0
+* Bug fixes in 1.22.1
 * Bug fixes in 1.22.0
 * API changes in 1.22.0
 * Languages updated in 1.22.1
@@ -325,6 +326,10 @@
   script they were added for.
 * Default value of $wgMaxShellMemory has been tripled (it's now 300 MB).
 
+=== Bug fixes in 1.22.1 ===
+* (bug 58167) The web installer no longer throws an exception when PHP is
+  compiled without support for MySQL yet with support for another DBMS.
+
 === Bug fixes in 1.22.0 ===
 * (bug 47271) $wgContentHandlerUseDB should be set to false during the upgrade
 * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one
diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index 240a097..37f5372 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -655,7 +655,7 @@
 * @return string wikitext of a link to the server software's web site
 */
public function getSoftwareLink() {
-   return [http://www.microsoft.com/sql/ MS SQL Server];
+   return [{{int:version-db-mssql-url}} MS SQL Server];
}
 
/**
diff --git a/includes/db/DatabaseMysqlBase.php 
b/includes/db/DatabaseMysqlBase.php
index 26c9d24..8f12b92 100644
--- a/includes/db/DatabaseMysqlBase.php
+++ b/includes/db/DatabaseMysqlBase.php
@@ -681,7 +681,14 @@
 * @return string
 */
public function getSoftwareLink() {
-   return '[http://www.mysql.com/ MySQL]';
+   $version = $this-getServerVersion();
+   if ( strpos( $version, 'MariaDB' ) !== false ) {
+   return '[{{int:version-db-mariadb-url}} MariaDB]';
+   } elseif ( strpos( $version, 'percona' ) !== false ) {
+   return '[{{int:version-db-percona-url}} Percona 
Server]';
+   } else {
+   return '[{{int:version-db-mysql-url}} MySQL]';
+   }
}
 
/**
diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php
index fbaa4da..32d4d98 100644
--- a/includes/db/DatabaseOracle.php
+++ b/includes/db/DatabaseOracle.php
@@ -846,7 +846,7 @@
 * @return string wikitext of a link to the server software's web site
 */
public function getSoftwareLink() {
-   return '[http://www.oracle.com/ Oracle]';
+   return '[{{int:version-db-oracle-url}} Oracle]';
}
 
/**
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
index e564a16..576bbd9 100644
--- a/includes/db/DatabasePostgres.php
+++ b/includes/db/DatabasePostgres.php
@@ -1060,7 +1060,7 @@
 * @return string wikitext of a link to the server software's web site
 */
public function getSoftwareLink() {
-   return '[http://www.postgresql.org/ PostgreSQL]';
+   return '[{{int:version-db-postgres-url}} PostgreSQL]';
}
 
/**
diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php
index 4a51226..3e03464 100644
--- a/includes/db/DatabaseSqlite.php
+++ b/includes/db/DatabaseSqlite.php
@@ -614,7 

[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...WikiLexicalData)

2014-01-11 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: Call Linker methods statically
..


Call Linker methods statically

Change-Id: Ia789e1d32ddb0a6a04641a83f7b84237c3de4f41
---
M OmegaWiki/DefinedMeaning.php
M OmegaWiki/DefinedMeaningModel.php
M OmegaWiki/Editor.php
M OmegaWiki/Wikidata.php
4 files changed, 164 insertions(+), 170 deletions(-)

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



diff --git a/OmegaWiki/DefinedMeaning.php b/OmegaWiki/DefinedMeaning.php
index ae8651b..f8f1af5 100644
--- a/OmegaWiki/DefinedMeaning.php
+++ b/OmegaWiki/DefinedMeaning.php
@@ -210,7 +210,7 @@
 * Potential refactor candidate!
 */
protected function getConceptPanel() {
-   global $wgTitle, $wgUser, $wdShowCopyPanel;
+   global $wgTitle, $wdShowCopyPanel;
$active = true; # wrong place, but hey
$dmId = $this-getDefinedMeaningId();
$dc = wdGetDataSetContext();
@@ -218,7 +218,6 @@
 
$html = div class=\dataset-panel\; ;
$html .= table border=\0\trth 
class=\dataset-panel-heading\$ow_conceptpanel/th/tr;
-   $sk = $wgUser-getSkin();
$meanings = getDefinedMeaningDataAssociatedByConcept( $dmId, 
$dc );
if ( $meanings ) {
foreach ( $meanings as $dm ) {
@@ -228,7 +227,7 @@
$prefix = $dataset-getPrefix();
 
$class = $active ? 'dataset-panel-active' : 
'dataset-panel-inactive';
-   $slot = $active ? $name : $sk-makeLinkObj( 
$dm-getTitleObject(), $name, dataset=$prefix );
+   $slot = $active ? $name : 
Linker::makeLinkObj( $dm-getTitleObject(), $name, dataset=$prefix );
$html .= trtd 
class=\$class\$slot/td/tr;
}
} else {
@@ -237,7 +236,7 @@
}
$cmtitle = Title::newFromText( Special:ConceptMapping );
$titleText = $wgTitle-getPrefixedURL();
-   $cmlink = $sk-makeLinkObj( $cmtitle, small . wfMessage( 
ow_add_concept_link )-text() . /small, 
set_$dc=$dmIdsuppressWarnings=true );
+   $cmlink = Linker::makeLinkObj( $cmtitle, small . wfMessage( 
ow_add_concept_link )-text() . /small, 
set_$dc=$dmIdsuppressWarnings=true );
$html .= trtd$cmlink/td/tr\n;
if ( $wdShowCopyPanel ) {
$html .= trtd . $this-getCopyPanel() . 
tdtr;
diff --git a/OmegaWiki/DefinedMeaningModel.php 
b/OmegaWiki/DefinedMeaningModel.php
index ace2a19..25266ff 100644
--- a/OmegaWiki/DefinedMeaningModel.php
+++ b/OmegaWiki/DefinedMeaningModel.php
@@ -6,7 +6,7 @@
 require_once( Transaction.php );
 require_once( WikiDataAPI.php );
 
-/** 
+/**
  * A front end for the database information/ArrayRecord and any other 
information
  * to do with defined meanings (as per MVC)
  * Will collect code for instantiating and loading and saving DMs here for now.
@@ -60,11 +60,11 @@
 
/**
 * Checks for existence of a DM.
-* If $this-definingExpression is set, it will also check if the 
spelling 
-* of the defining expression matches 
-* 
+* If $this-definingExpression is set, it will also check if the 
spelling
+* of the defining expression matches
+*
 * @param Boolean If true, checks beyond the dataset context and will
-*return the first match. Always searches current 
+*return the first match. Always searches current
 *context first.
 * @param Boolean Switch dataset context if match outside default is 
found.
 *
@@ -72,7 +72,7 @@
 *
 */
public function checkExistence( $searchAllDataSets = false, 
$switchContext = false ) {
-   
+
global $wdCurrentContext;
$match = $this-checkExistenceInDataSet( $this-dataset );
if ( !is_null( $match ) ) {
@@ -146,7 +146,7 @@
}
return $dc;
}
-   /** 
+   /**
 * Load the associated record object.
 *
 * @return Boolean indicating success.
@@ -200,7 +200,7 @@
return true;
}
 
-   /**  
+   /**
 * FIXME - work in progress
 *
 */
@@ -209,7 +209,7 @@
initializeObjectAttributeEditors( $this-viewInformation );
 
# Nice try sherlock, but we really need to get our DMID from 
elsewhere
-   # $definedMeaningId = $this-getId(); 
+   # $definedMeaningId = $this-getId();
 
# Need 3 steps: copy defining expression, create new dm, then 
update
 
@@ -218,12 +218,12 @@
# to make the expression really work, we may need 

[MediaWiki-commits] [Gerrit] Port generate_family_file.py to core - change (pywikibot/core)

2014-01-11 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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


Change subject: Port generate_family_file.py to core
..

Port generate_family_file.py to core

Change-Id: I7a9ba232f9dee797347cde9c1792f068c64563fb
---
A generate_family_file.py
1 file changed, 280 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/05/107005/1

diff --git a/generate_family_file.py b/generate_family_file.py
new file mode 100644
index 000..14f8568
--- /dev/null
+++ b/generate_family_file.py
@@ -0,0 +1,280 @@
+# -*- coding: utf-8 -*-
+
+This script generates a family file from a given URL.
+Hackish, etc. Regexps, yes. Sorry, jwz.
+
+
+#
+# (C) Merlijn van Deen, 2010-2013
+# (C) Pywikibot team, 2010-2013
+#
+# Distributed under the terms of the MIT license
+#
+__version__ = $Id$
+#
+
+# system imports
+import sys
+import re
+import os
+import codecs
+from distutils.version import LooseVersion as V
+
+# creating urls
+from urlparse import urlparse, urljoin, ParseResult
+
+# retrieving urls
+import urllib2
+from urllib2 import HTTPError
+
+
+def urlopen(url):
+req = urllib2.Request(
+url,
+headers={'User-agent': 'Pywikibot family generator 0.1 - 
pywikipediabot.sf.net'})
+return urllib2.urlopen(req)
+
+# parsing response data
+from BeautifulSoup import BeautifulSoup
+
+import json
+
+class FamilyFileGenerator(object):
+def __init__(self, url=None, name=None, dointerwiki=None):
+if url is None:
+url = raw_input(Please insert URL to wiki: )
+if name is None:
+name = raw_input(Please insert a short name (eg: freeciv): )
+self.dointerwiki = dointerwiki
+self.base_url = url
+self.name = name
+
+self.wikis = {}  # {'http://wiki/$1': Wiki('http://wiki/$1'), ...}
+self.langs = []  # [Wiki('http://wiki/$1'), ...]
+
+def run(self):
+print Generating family file from %s % self.base_url
+
+w = Wiki(self.base_url)
+self.wikis[w.iwpath] = w
+print
+print ==
+print api url: %s % w.api
+print MediaWiki version: %s % w.version
+print ==
+print
+
+self.getlangs(w)
+self.getapis()
+self.writefile()
+
+def getlangs(self, w):
+print Determining other languages...,
+try:
+iw = json.load(urlopen(
+w.api +
+
?action=querymeta=siteinfosiprop=interwikimapsifilteriw=localformat=json))
+if 'error' in iw:
+raise RuntimeError('%s - %s' % (iw['error']['code'],
+iw['error']['info']))
+self.langs = [wiki for wiki in iw['query']['interwikimap']
+  if u'language' in wiki]
+print u' '.join(sorted([wiki[u'prefix'] for wiki in self.langs]))
+except HTTPError, e:
+self.langs = []
+print e, ; continuing...
+
+if len([lang for lang in self.langs if lang['url'] == w.iwpath]) == 0:
+self.langs.append({u'language': w.lang,
+   u'local': u'',
+   u'prefix': w.lang,
+   u'url': w.iwpath})
+
+if len(self.langs)  1:
+if self.dointerwiki is None:
+makeiw = raw_input(
+\nThere are %i languages available.\nDo you want to 
generate interwiki links? This might take a long time. ([y]es/[N]o/[e]dit)
+% len(self.langs)).lower()
+else:
+makeiw = self.dointerwiki
+
+if makeiw == y:
+pass
+elif makeiw == e:
+for wiki in self.langs:
+print wiki['prefix'], wiki['url']
+do_langs = raw_input(Which languages do you want: )
+self.langs = [wiki for wiki in self.langs
+  if wiki['prefix'] in do_langs
+  or wiki['url'] == w.iwpath]
+else:
+self.langs = [wiki for wiki in self.langs
+  if wiki[u'url'] == w.iwpath]
+
+def getapis(self):
+print Loading wikis... 
+for lang in self.langs:
+print   * %s...  % (lang[u'prefix']),
+if lang[u'url'] not in self.wikis:
+try:
+self.wikis[lang[u'url']] = Wiki(lang[u'url'])
+print downloaded
+except Exception, e:
+print e
+else:
+print in cache
+
+def writefile(self):
+fn = pywikibot/families/%s_family.py % self.name
+print Writing %s...  % fn
+try:
+open(fn)
+if raw_input(%s already exists. 

[MediaWiki-commits] [Gerrit] Call Installer::getDBTypes() static - change (mediawiki/core)

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

Change subject: Call Installer::getDBTypes() static
..


Call Installer::getDBTypes() static

Change-Id: Ie819c7c6be39c4beab0fca30216632b3e87178a8
---
M includes/installer/WebInstallerPage.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/installer/WebInstallerPage.php 
b/includes/installer/WebInstallerPage.php
index 200e4cd..d4b3d65 100644
--- a/includes/installer/WebInstallerPage.php
+++ b/includes/installer/WebInstallerPage.php
@@ -484,7 +484,7 @@
// Messages: config-dbsupport-mysql, config-dbsupport-postgres, 
config-dbsupport-oracle,
// config-dbsupport-sqlite
$dbSupport = '';
-   foreach ( $this-parent-getDBTypes() as $type ) {
+   foreach ( Installer::getDBTypes() as $type ) {
$dbSupport .= wfMessage( config-dbsupport-$type 
)-plain() . \n;
}
$this-addHTML( $this-parent-getInfoBox(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie819c7c6be39c4beab0fca30216632b3e87178a8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: Waldir wal...@email.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 59963) ignore git not found errors - change (pywikibot/core)

2014-01-11 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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


Change subject: (bug 59963) ignore git not found errors
..

(bug 59963) ignore git not found errors

By calling 'git' directly instead of via a shell, an Exception is raised
instead of an error being printed.

Change-Id: Ide8b1c5407ce58243ac4615ae450e0ccf5132099
---
M pywikibot/version.py
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/06/107006/1

diff --git a/pywikibot/version.py b/pywikibot/version.py
index 6dd9514..d386568 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -124,14 +124,12 @@
 tag = '[%s] %s' % (t[0][:-1], '/'.join(t[3:])[:-4])
 info = subprocess.Popen('git --no-pager log 
--pretty=format:%ad|%an|%h|%H|%d --abbrev-commit --date=iso -1',
 cwd=_program_dir,
-shell=True,
 stdout=subprocess.PIPE).stdout.read()
 info = info.split('|')
 date = info[0][:-6]
 date = time.strptime(date, '%Y-%m-%d %H:%M:%S')
 rev = subprocess.Popen('git rev-list HEAD',
cwd=_program_dir,
-   shell=True,
stdout=subprocess.PIPE).stdout.read()
 rev = len(rev.splitlines())
 hsh = info[3]  # also stored in '.git/refs/heads/master'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide8b1c5407ce58243ac4615ae450e0ccf5132099
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


[MediaWiki-commits] [Gerrit] (bug 59963) ignore git not found errors - change (pywikibot/compat)

2014-01-11 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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


Change subject: (bug 59963) ignore git not found errors
..

(bug 59963) ignore git not found errors

By calling 'git' directly instead of via a shell, an Exception is raised
instead of an error being printed.

Change-Id: Ide8b1c5407ce58243ac4615ae450e0ccf5132099
---
M pywikibot/version.py
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/07/107007/1

diff --git a/pywikibot/version.py b/pywikibot/version.py
index 115b1a9..420fd80 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -123,14 +123,12 @@
 tag = '[%s] %s' % (t[0][:-1], '/'.join(t[3:])[:-4])
 info = subprocess.Popen('git --no-pager log 
--pretty=format:%ad|%an|%h|%H|%d --abbrev-commit --date=iso -1',
 cwd=_program_dir,
-shell=True,
 stdout=subprocess.PIPE).stdout.read()
 info = info.split('|')
 date = info[0][:-6]
 date = time.strptime(date, '%Y-%m-%d %H:%M:%S')
 rev = subprocess.Popen('git rev-list HEAD',
cwd=_program_dir,
-   shell=True,
stdout=subprocess.PIPE).stdout.read()
 rev = len(rev.splitlines())
 hsh = info[3]  # also stored in '.git/refs/heads/master'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide8b1c5407ce58243ac4615ae450e0ccf5132099
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


  1   2   >