r69480 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69479‎ | r69480 | r69481 >
Date:17:08, 17 July 2010
Author:peter17
Status:ok
Tags:
Comment:
Renaming DBname to WikiID
Modified paths:
  • /branches/iwtransclusion/phase3/includes/Interwiki.php (modified) (history)
  • /branches/iwtransclusion/phase3/includes/Title.php (modified) (history)
  • /branches/iwtransclusion/phase3/includes/parser/Parser.php (modified) (history)
  • /branches/iwtransclusion/phase3/maintenance/tables.sql (modified) (history)

Diff [purge]

Index: branches/iwtransclusion/phase3/maintenance/tables.sql
@@ -1071,8 +1071,8 @@
10721072 -- The URL of the file api.php
10731073 iw_api blob NOT NULL,
10741074
1075 - -- The name of the database (for a connection to be established with wfGetLB( 'dbname' ))
1076 - iw_dbname varchar(32) NOT NULL,
 1075+ -- The name of the database (for a connection to be established with wfGetLB( 'wikiid' ))
 1076+ iw_wikiid varchar(64) NOT NULL,
10771077
10781078 -- A boolean value indicating whether the wiki is in this project
10791079 -- (used, for example, to detect redirect loops)
Index: branches/iwtransclusion/phase3/includes/Interwiki.php
@@ -17,11 +17,11 @@
1818
1919 protected $mPrefix, $mURL, $mAPI, $mLocal, $mTrans;
2020
21 - public function __construct( $prefix = null, $url = '', $api = '', $dbname = '', $local = 0, $trans = 0 ) {
 21+ public function __construct( $prefix = null, $url = '', $api = '', $wikiid = '', $local = 0, $trans = 0 ) {
2222 $this->mPrefix = $prefix;
2323 $this->mURL = $url;
2424 $this->mAPI = $api;
25 - $this->mDBname = $dbname;
 25+ $this->mWikiID = $wikiid;
2626 $this->mLocal = $local;
2727 $this->mTrans = $trans;
2828 }
@@ -170,12 +170,12 @@
171171 * @return Boolean: whether everything was there
172172 */
173173 protected static function loadFromArray( $mc ) {
174 - if( isset( $mc['iw_url'] ) && isset( $mc['iw_api'] ) && isset( $mc['iw_dbname'] )
 174+ if( isset( $mc['iw_url'] ) && isset( $mc['iw_api'] ) && isset( $mc['iw_wikiid'] )
175175 && isset( $mc['iw_local'] ) && isset( $mc['iw_trans'] ) ) {
176176 $iw = new Interwiki();
177177 $iw->mURL = $mc['iw_url'];
178178 $iw->mAPI = $mc['iw_api'];
179 - $iw->mDBname = $mc['iw_dbname'];
 179+ $iw->mWikiID = $mc['iw_wikiid'];
180180 $iw->mLocal = $mc['iw_local'];
181181 $iw->mTrans = $mc['iw_trans'];
182182 return $iw;
@@ -211,8 +211,8 @@
212212 *
213213 * @return String: the DB name
214214 */
215 - public function getDBname( ) {
216 - return $this->mDBname;
 215+ public function getWikiID( ) {
 216+ return $this->mWikiID;
217217 }
218218
219219 /**
Index: branches/iwtransclusion/phase3/includes/parser/Parser.php
@@ -3430,7 +3430,7 @@
34313431
34323432 }
34333433
3434 - return "<h2>$fullTitle</h2><pre>$text</pre> List of templates: <pre>".$listSubTemplates.'</pre>' . $list2;
 3434+ return "<h2>$fullTitle</h2><pre>$url1\n$url2\n$text</pre> List of templates: <pre>".$listSubTemplates.'</pre>' . $list2;
34353435 }
34363436
34373437
Index: branches/iwtransclusion/phase3/includes/Title.php
@@ -533,11 +533,11 @@
534534 *
535535 * @return \type{\string} the DB name
536536 */
537 - public function getTransDBname() {
 537+ public function getTransWikiID() {
538538 if ( $this->mInterwiki == '' )
539539 return false;
540540
541 - return Interwiki::fetch( $this->mInterwiki )->getDBname();
 541+ return Interwiki::fetch( $this->mInterwiki )->getWikiID();
542542 }
543543
544544 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r69542Add iw_api and iw_wikiid fields to the interwiki table, plus rudimentary supp...catrope11:55, 19 July 2010
r87104Merge of r86170, r68448, r69480reedy00:19, 29 April 2011
r92985Merge r87104, which itself is a merge of r68170, r68448, r69480reedy17:19, 24 July 2011

Status & tagging log