/** * Constructor. * * @param string $siteName * @param string $admin * @param array $option */ function __construct($siteName, $admin = null, array $option = []) { global $wgContLang; parent::__construct(); if (isset($option['scriptpath'])) { $this->specifiedScriptPath = true; } foreach ($this->optionMap as $opt => $global) { if (isset($option[$opt])) { $GLOBALS[$global] = $option[$opt]; $this->setVar($global, $option[$opt]); } } if (isset($option['lang'])) { global $wgLang, $wgLanguageCode; $this->setVar('_UserLang', $option['lang']); $wgContLang = Language::factory($option['lang']); $wgLang = Language::factory($option['lang']); $wgLanguageCode = $option['lang']; RequestContext::getMain()->setLanguage($wgLang); } $this->setVar('wgSitename', $siteName); $metaNS = $wgContLang->ucfirst(str_replace(' ', '_', $siteName)); if ($metaNS == 'MediaWiki') { $metaNS = 'Project'; } $this->setVar('wgMetaNamespace', $metaNS); if ($admin) { $this->setVar('_AdminName', $admin); } if (!isset($option['installdbuser'])) { $this->setVar('_InstallUser', $this->getVar('wgDBuser')); $this->setVar('_InstallPassword', $this->getVar('wgDBpassword')); } else { $this->setVar('_InstallUser', $option['installdbuser']); $this->setVar('_InstallPassword', isset($option['installdbpass']) ? $option['installdbpass'] : ""); // Assume that if we're given the installer user, we'll create the account. $this->setVar('_CreateDBAccount', true); } if (isset($option['pass'])) { $this->setVar('_AdminPassword', $option['pass']); } // Set up the default skins $skins = $this->findExtensions('skins'); $this->setVar('_Skins', $skins); if ($skins) { $skinNames = array_map('strtolower', $skins); $this->setVar('wgDefaultSkin', $this->getDefaultSkin($skinNames)); } }
/** * Constructor. * * @param $siteName * @param $admin * @param $option Array */ function __construct($siteName, $admin = null, array $option = array()) { global $wgContLang; parent::__construct(); if (isset($option['scriptpath'])) { $this->specifiedScriptPath = true; } foreach ($this->optionMap as $opt => $global) { if (isset($option[$opt])) { $GLOBALS[$global] = $option[$opt]; $this->setVar($global, $option[$opt]); } } if (isset($option['lang'])) { global $wgLang, $wgLanguageCode; $this->setVar('_UserLang', $option['lang']); $wgContLang = Language::factory($option['lang']); $wgLang = Language::factory($option['lang']); $wgLanguageCode = $option['lang']; } $this->setVar('wgSitename', $siteName); $metaNS = $wgContLang->ucfirst(str_replace(' ', '_', $siteName)); if ($metaNS == 'MediaWiki') { $metaNS = 'Project'; } $this->setVar('wgMetaNamespace', $metaNS); if ($admin) { $this->setVar('_AdminName', $admin); } if (!isset($option['installdbuser'])) { $this->setVar('_InstallUser', $this->getVar('wgDBuser')); $this->setVar('_InstallPassword', $this->getVar('wgDBpassword')); } else { $this->setVar('_InstallUser', $option['installdbuser']); $this->setVar('_InstallPassword', isset($option['installdbpass']) ? $option['installdbpass'] : ""); } if (isset($option['pass'])) { $this->setVar('_AdminPassword', $option['pass']); } }
/** * Creates a new FTPInstaller object. * * @param string $targetDir the full path on the machine the ftp server is running * @param string $source name of the source tar archive * @param FTP $ftp active ftp connection * @param FileHandler $fileHandler * @param string $folder extract only the files from this subfolder */ public function __construct($targetDir, $source, FTP $ftp, $fileHandler = null, $folder = '') { $this->ftp = $ftp; parent::__construct($targetDir, $source, $fileHandler, $folder); }
/** * Constructor. * * @param $request WebRequest */ public function __construct(WebRequest $request) { parent::__construct(); $this->output = new WebInstallerOutput($this); $this->request = $request; // Add parser hooks global $wgParser; $wgParser->setHook('downloadlink', array($this, 'downloadLinkHook')); $wgParser->setHook('doclink', array($this, 'docLink')); }
/** * Constructor. * @see install.form.InstallForm for the expected parameters * @param $xmlDescriptor string descriptor path * @param $params array installer parameters * @param $isPlugin boolean true iff a plugin is being installed */ function __construct($xmlDescriptor, $params, $isPlugin) { parent::__construct($xmlDescriptor, $params, $isPlugin); }
/** * Constructor. * @param $params array upgrade parameters */ function __construct($params, $installFile = 'upgrade.xml', $isPlugin = false) { parent::__construct($installFile, $params, $isPlugin); }
/** * Constructor. */ public function __construct() { parent::__construct(); // TODO }