r110249 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110248‎ | r110249 | r110250 >
Date:18:48, 29 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Bug 34017 - SiteMatrix shows incorrect dbname for wikis containing dashes (- > _)
Modified paths:
  • /trunk/extensions/SiteMatrix/SiteMatrix_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SiteMatrix/SiteMatrix_body.php
@@ -156,7 +156,7 @@
157157 * @return string
158158 */
159159 public function getDBName( $minor, $major ) {
160 - return $minor . $major;
 160+ return str_replace( '-', '_', $minor ) . $major;
161161 }
162162
163163 /**
@@ -183,11 +183,13 @@
184184 // not very reliable.
185185 global $wgConf;
186186
187 - if( $wgConf->get( 'wgReadOnly', $dbname, $major, array( 'site' => $major, 'lang' => $minor ) ) )
 187+ if( $wgConf->get( 'wgReadOnly', $dbname, $major, array( 'site' => $major, 'lang' => $minor ) ) ) {
188188 return true;
 189+ }
189190 $readOnlyFile = $wgConf->get( 'wgReadOnlyFile', $dbname, $major, array( 'site' => $major, 'lang' => $minor ) );
190 - if( $readOnlyFile && file_exists( $readOnlyFile ) )
 191+ if( $readOnlyFile && file_exists( $readOnlyFile ) ) {
191192 return true;
 193+ }
192194 return false;
193195 }
194196

Follow-up revisions

RevisionCommit summaryAuthorDate
r110250MFT r110249reedy18:53, 29 January 2012

Status & tagging log