[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Special config case

2016-12-03 Thread Seb35 (Code Review)
Seb35 has submitted this change and it was merged.

Change subject: Special config case
..


Special config case

In the special case where the config key is a single wiki, the config file
does not have a 'parameter-wiki-value' structure but only 'parameter-value'

Change-Id: I892d1151a0b4b540fc85802966ff3c2538300671
---
M src/MediaWikiFarm.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php
index be28e78..d7a3315 100644
--- a/src/MediaWikiFarm.php
+++ b/src/MediaWikiFarm.php
@@ -1149,7 +1149,7 @@
}
 
# Key 'default' => no choice of the wiki
-   if( $configFile['key'] == 'default' ) {
+   if( $configFile['key'] == 'default' || ( strpos( 
$configFile['key'], '*' ) === false && $this->variables['$WIKIID'] == 
$configFile['key'] ) ) {
 
foreach( $theseSettings as $setting => $value ) 
{
 
@@ -1168,7 +1168,7 @@
}
 
# Other key
-   else {
+   elseif( strpos( $configFile['key'], '*' ) !== false ) {
 
// $tags = array(); # @todo data sources not 
implemented, but code to selection parameters from a tag is below
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I892d1151a0b4b540fc85802966ff3c2538300671
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 
Gerrit-Reviewer: Seb35 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Special config case

2016-12-03 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review.

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

Change subject: Special config case
..

Special config case

In the special case where the config key is a single wiki, the config file
does not have a 'parameter-wiki-value' structure but only 'parameter-value'

Change-Id: I892d1151a0b4b540fc85802966ff3c2538300671
---
M src/MediaWikiFarm.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php
index be28e78..d7a3315 100644
--- a/src/MediaWikiFarm.php
+++ b/src/MediaWikiFarm.php
@@ -1149,7 +1149,7 @@
}
 
# Key 'default' => no choice of the wiki
-   if( $configFile['key'] == 'default' ) {
+   if( $configFile['key'] == 'default' || ( strpos( 
$configFile['key'], '*' ) === false && $this->variables['$WIKIID'] == 
$configFile['key'] ) ) {
 
foreach( $theseSettings as $setting => $value ) 
{
 
@@ -1168,7 +1168,7 @@
}
 
# Other key
-   else {
+   elseif( strpos( $configFile['key'], '*' ) !== false ) {
 
// $tags = array(); # @todo data sources not 
implemented, but code to selection parameters from a tag is below
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I892d1151a0b4b540fc85802966ff3c2538300671
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 

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