public function process() { $project = $this->getProjectFromParameters(); try { $this->mediawiki_migrator->migrateProjectTo123($project); $this->version_manager->saveVersionForProject($project, MediawikiVersionManager::MEDIAWIKI_123_VERSION); if ($this->mleb_manager->isMLEBExtensionInstalled()) { $this->mleb_manager->saveMLEBActivationForProject($project); } $this->done(); } catch (System_Command_CommandException $exception) { $this->error($exception->getMessage()); } }
private function initMediawiki() { try { $exists = $this->checkForExistingProject(); } catch (MediawikiInstantiaterException $e) { $this->logger->error($e->getMessage()); return false; } if ($exists) { $this->logger->info('Project dir ' . $this->project_name_dir . ' exists, so I assume the project already exists.'); return false; } else { $this->createDirectory(); $this->createDatabase($this->getMediawikiPath()); if ($this->isMediawiki123()) { $this->version_manager->saveVersionForProject($this->project, MediawikiVersionManager::MEDIAWIKI_123_VERSION); $this->mleb_manager->activateMLEBForProject($this->project); $this->resource_restrictor->allowProject($this->project); } else { $this->version_manager->saveVersionForProject($this->project, MediawikiVersionManager::MEDIAWIKI_120_VERSION); } return true; } }
public function isMLEBExtensionAvailableForProject(Project $project) { return $this->isMLEBExtensionInstalled() && $this->version_manager->getVersionForProject($project) == MediawikiVersionManager::MEDIAWIKI_123_VERSION && $this->getMLEBUsageForProject($project) && $this->language_manager->getUsedLanguageForProject($project); }