r81267 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81266‎ | r81267 | r81268 >
Date:20:09, 31 January 2011
Author:demon
Status:ok
Tags:
Comment:
Fixups to r81266
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/DatabaseInstaller.php
@@ -179,7 +179,6 @@
180180 if ( !$status->isOK() ) {
181181 return $status;
182182 }
183 - $this->db;
184183 $updater = DatabaseUpdater::newForDB( $this->db );
185184 $extensionUpdates = $updater->getNewExtensions();
186185
@@ -206,76 +205,6 @@
207206 }
208207
209208 /**
210 - * Create the tables for each extension the user enabled
211 - * @return Status
212 - */
213 - public function createExtensionTables() {
214 - $status = $this->getConnection();
215 - if ( !$status->isOK() ) {
216 - return $status;
217 - }
218 - $this->db;
219 - $updater = DatabaseUpdater::newForDB( $this->db );
220 - $extensionUpdates = $updater->getNewExtensions();
221 -
222 - // No extensions need tables (or haven't updated to new installer support)
223 - if( !count( $extensionUpdates ) ) {
224 - return $status;
225 - }
226 -
227 - $ourExtensions = array_map( 'strtolower', $this->getVar( '_Extensions' ) );
228 -
229 - foreach( $ourExtensions as $ext ) {
230 - if( isset( $extensionUpdates[$ext] ) ) {
231 - $this->db->begin( __METHOD__ );
232 - $error = $this->db->sourceFile( $extensionUpdates[$ext] );
233 - if( $error !== true ) {
234 - $this->db->rollback( __METHOD__ );
235 - $status->warning( 'config-install-tables-failed', $error );
236 - } else {
237 - $this->db->commit( __METHOD__ );
238 - }
239 - }
240 - }
241 - return $status;
242 - }
243 -
244 - /**
245 - * Create the tables for each extension the user enabled
246 - * @return Status
247 - */
248 - public function createExtensionTables() {
249 - $status = $this->getConnection();
250 - if ( !$status->isOK() ) {
251 - return $status;
252 - }
253 - $this->db;
254 - $updater = DatabaseUpdater::newForDB( $this->db );
255 - $extensionUpdates = $updater->getNewExtensions();
256 -
257 - // No extensions need tables (or haven't updated to new installer support)
258 - if( !count( $extensionUpdates ) ) {
259 - return $status;
260 - }
261 -
262 - $ourExtensions = array_map( 'strtolower', $this->getVar( '_Extensions' ) );
263 -
264 - foreach( $ourExtensions as $ext ) {
265 - if( isset( $extensionUpdates[$ext] ) ) {
266 - $this->db->begin( __METHOD__ );
267 - $error = $this->db->sourceFile( $extensionUpdates[$ext] );
268 - if( $error !== true ) {
269 - $this->db->rollback( __METHOD__ );
270 - $status->warning( 'config-install-tables-failed', $error );
271 - } else {
272 - $this->db->commit( __METHOD__ );
273 - }
274 - }
275 - }
276 - return $status;
277 - }
278 -
279 - /**
280209 * Get the DBMS-specific options for LocalSettings.php generation.
281210 *
282211 * @return String

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81266(bug 26857) Fatal error during installation enabling 'Vector' extension (or a...demon20:00, 31 January 2011

Status & tagging log