Example #1
0
 private function registerSettings()
 {
     $this->applicationFactory->registerObject('Settings', Settings::newFromGlobals($this->globalVars));
     if (CompatibilityMode::extensionNotEnabled()) {
         CompatibilityMode::disableSemantics();
     }
 }
 public function testExtensionNotEnabled()
 {
     $this->assertInternalType('boolean', CompatibilityMode::extensionNotEnabled());
 }
/**
 * To disable Semantic MediaWiki's operational functionality
 *
 * @note This function can be used to temporary disable SMW but it is paramount
 * that after SMW is re-enabled to run `rebuildData.php` in order for data to
 * represent a state that mirrors the actual environment (deleted, moved pages
 * are not tracked when disabled).
 */
function disableSemantics()
{
    CompatibilityMode::disableSemantics();
}
Example #4
0
 /**
  * @since 2.5
  *
  * @param boolean $verbose
  */
 public function install($verbose = true)
 {
     // If for some reason the enableSemantics was not yet enabled
     // still allow to run the tables create in order for the
     // setup to be completed
     if (CompatibilityMode::extensionNotEnabled()) {
         CompatibilityMode::enableTemporaryCliUpdateMode();
     }
     $messageReporter = $this->newMessageReporter($verbose);
     $messageReporter->reportMessage("\nSelected storage engine is \"SMWSQLStore3\" (or an extension thereof)\n");
     $messageReporter->reportMessage("\nSetting up standard database configuration for SMW ...\n\n");
     $this->tableBuilder->setMessageReporter($messageReporter);
     $this->tableIntegrityExaminer->setMessageReporter($messageReporter);
     foreach ($this->tableSchemaManager->getTables() as $table) {
         $this->tableBuilder->create($table);
     }
     $this->tableIntegrityExaminer->checkOnPostCreation($this->tableBuilder);
     Hooks::run('SMW::SQLStore::AfterCreateTablesComplete', array($this->tableBuilder));
     $messageReporter->reportMessage("\nDatabase initialized completed.\n" . ($this->isFromExtensionSchemaUpdate ? "\n" : ''));
     return true;
 }