r69604 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69603‎ | r69604 | r69605 >
Date:11:35, 20 July 2010
Author:jeroendedauw
Status:ok
Tags:
Comment:
Doc and style improvements
Modified paths:
  • /trunk/phase3/includes/installer/Update.php (modified) (history)
  • /trunk/phase3/includes/installer/Updaters.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Update.php
@@ -1,16 +1,21 @@
22 <?php
 3+
34 /*
45 * Class for handling database updates. Roughly based off of updaters.inc, with
56 * a few improvements :)
67 */
7 -
88 class Update {
99
10 - // Array of updates to perform on the database
 10+ /**
 11+ * Array of updates to perform on the database
 12+ *
 13+ * @var array
 14+ */
1115 protected $updates = array();
1216
13 - // Things we'll need
14 - protected $db, $updater;
 17+ protected $db;
 18+
 19+ protected $updater;
1520
1621 public function __construct( $db ) {
1722 $this->db = $db;
@@ -144,4 +149,5 @@
145150 );
146151 }
147152 }
148 -}
 153+
 154+}
\ No newline at end of file
Index: trunk/phase3/includes/installer/Updaters.php
@@ -1,9 +1,11 @@
22 <?php
 3+
34 /**
45 * All DBs supported by MediaWiki need to implement this. Base interface for
56 * Updaters, which is replacing updaters.inc
67 */
78 interface Updaters {
 9+
810 /**
911 * Get an array of updates to perform on the database. Should return a
1012 * mutli-dimensional array. The main key is the MediaWiki version (1.12,
@@ -13,10 +15,11 @@
1416 * @return Array
1517 */
1618 public function getUpdates();
 19+
1720 }
1821
1922 /**
20 - * Mysql implementation
 23+ * Mysql implementation.
2124 */
2225 class MysqlUpdater implements Updaters {
2326
@@ -171,12 +174,14 @@
172175 ),
173176 );
174177 }
 178+
175179 }
176180
177181 /**
178 - * Sqlite
 182+ * Sqlite implementation.
179183 */
180184 class SqliteUpdater implements Updaters {
 185+
181186 public function getUpdates() {
182187 return array(
183188 '1.14' => array(
@@ -211,13 +216,16 @@
212217 ),
213218 );
214219 }
 220+
215221 }
216222
217223 /**
218 - * Oracle
 224+ * Oracle implementation.
219225 */
220226 class OracleUpdater implements Updaters {
 227+
221228 public function getUpdates() {
222229 return array();
223230 }
224 -}
 231+
 232+}
\ No newline at end of file

Status & tagging log