return true;
}
+ /**
+ * Run a maintenance script
+ *
+ * This should only be used when the maintenance script must run before
+ * later updates. If later updates don't depend on the script, add it to
+ * DatabaseUpdater::$postDatabaseUpdateMaintenance instead.
+ *
+ * The script's execute() method must return true to indicate successful
+ * completion, and must return false (or throw an exception) to indicate
+ * unsuccessful completion.
+ *
+ * @since 1.32
+ * @param string $class Maintenance subclass
+ * @param string $script Script path and filename, usually "maintenance/fooBar.php"
+ */
+ public function runMaintenance( $class, $script ) {
+ $this->output( "Running $script...\n" );
+ $task = $this->maintenance->runChild( $class );
+ $ok = $task->execute();
+ if ( !$ok ) {
+ throw new RuntimeException( "Execution of $script did not complete successfully." );
+ }
+ $this->output( "done.\n" );
+ }
+
/**
* Set any .htaccess files or equivilent for storage repos
*
}
}
+ /**
+ * Populates the externallinks.el_index_60 field
+ * @since 1.32
+ */
+ protected function populateExternallinksIndex60() {
+ if ( !$this->updateRowExists( 'populate externallinks.el_index_60' ) ) {
+ $this->output(
+ "Populating el_index_60 field, printing progress markers. For large\n" .
+ "databases, you may want to hit Ctrl-C and do this manually with\n" .
+ "maintenance/populateExternallinksIndex60.php.\n"
+ );
+ $task = $this->maintenance->runChild( 'PopulateExternallinksIndex60',
+ 'populateExternallinksIndex60.php' );
+ $task->execute();
+ $this->output( "done.\n" );
+ }
+ }
}