dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Set migration stage for change tag to read new"
[lhc/web/wiklou.git]
/
includes
/
SiteConfiguration.php
diff --git
a/includes/SiteConfiguration.php
b/includes/SiteConfiguration.php
index
1eaedc2
..
7af80dc
100644
(file)
--- a/
includes/SiteConfiguration.php
+++ b/
includes/SiteConfiguration.php
@@
-483,13
+483,13
@@
class SiteConfiguration {
/**
* Work out the site and language name from a database name
/**
* Work out the site and language name from a database name
- * @param string $
db
+ * @param string $
wiki Wiki ID
*
* @return array
*/
*
* @return array
*/
- public function siteFromDB( $
db
) {
+ public function siteFromDB( $
wiki
) {
// Allow override
// Allow override
- $def = $this->getWikiParams( $
db
);
+ $def = $this->getWikiParams( $
wiki
);
if ( !is_null( $def['suffix'] ) && !is_null( $def['lang'] ) ) {
return [ $def['suffix'], $def['lang'] ];
}
if ( !is_null( $def['suffix'] ) && !is_null( $def['lang'] ) ) {
return [ $def['suffix'], $def['lang'] ];
}
@@
-499,15
+499,16
@@
class SiteConfiguration {
foreach ( $this->suffixes as $altSite => $suffix ) {
if ( $suffix === '' ) {
$site = '';
foreach ( $this->suffixes as $altSite => $suffix ) {
if ( $suffix === '' ) {
$site = '';
- $lang = $
db
;
+ $lang = $
wiki
;
break;
break;
- } elseif ( substr( $
db
, -strlen( $suffix ) ) == $suffix ) {
+ } elseif ( substr( $
wiki
, -strlen( $suffix ) ) == $suffix ) {
$site = is_numeric( $altSite ) ? $suffix : $altSite;
$site = is_numeric( $altSite ) ? $suffix : $altSite;
- $lang = substr( $
db, 0, strlen( $db
) - strlen( $suffix ) );
+ $lang = substr( $
wiki, 0, strlen( $wiki
) - strlen( $suffix ) );
break;
}
}
$lang = str_replace( '_', '-', $lang );
break;
}
}
$lang = str_replace( '_', '-', $lang );
+
return [ $site, $lang ];
}
return [ $site, $lang ];
}
@@
-527,7
+528,7
@@
class SiteConfiguration {
$multi = is_array( $settings );
$settings = (array)$settings;
$multi = is_array( $settings );
$settings = (array)$settings;
- if (
$wiki === wfWikiID(
) ) { // $wiki is this wiki
+ if (
WikiMap::isCurrentWikiId( $wiki
) ) { // $wiki is this wiki
$res = [];
foreach ( $settings as $name ) {
if ( !preg_match( '/^wg[A-Z]/', $name ) ) {
$res = [];
foreach ( $settings as $name ) {
if ( !preg_match( '/^wg[A-Z]/', $name ) ) {