*/
protected $skipSchema = false;
+ /**
+ * Hold the value of $wgContentHandlerUseDB during the upgrade.
+ */
+ protected $holdContentHandlerUseDB = true;
+
/**
* Constructor
*
$cl->execute();
$this->output( "done.\n" );
}
+
+ /**
+ * Turns off content handler fields during parts of the upgrade
+ * where they aren't available.
+ */
+ protected function disableContentHandlerUseDB() {
+ global $wgContentHandlerUseDB;
+
+ if( $wgContentHandlerUseDB ) {
+ $this->output( "Turning off Content Handler DB fields for this part of upgrade.\n" );
+ $this->holdContentHandlerUseDB = $wgContentHandlerUseDB;
+ $wgContentHandlerUseDB = false;
+ }
+ }
+
+ /**
+ * Turns content handler fields back on.
+ */
+ protected function enableContentHandlerUseDB() {
+ global $wgContentHandlerUseDB;
+
+ if( $this->holdContentHandlerUseDB ) {
+ $this->output( "Content Handler DB fields should be usable now.\n" );
+ $wgContentHandlerUseDB = $this->holdContentHandlerUseDB;
+ }
+ }
}