コード例 #1
0
ファイル: upgrade.php プロジェクト: lmcro/fcms
/**
 * displayStepFour 
 * 
 * @return void
 */
function displayStepFour()
{
    $fcmsError = FCMS_Error::getInstance();
    $fcmsDatabase = Database::getInstance($fcmsError);
    $fcmsUpgrade = new Upgrade($fcmsError, $fcmsDatabase);
    displayHeader();
    displaySteps(4);
    // Install
    if ($fcmsUpgrade->install()) {
        echo '<meta http-equiv="refresh" content="0; url=upgrade.php?auto=5">';
    }
}
コード例 #2
0
 /**
  * Install this addon from the downloaded file.
  */
 public function install()
 {
     $this->setState("install");
     $filename = $this->getDownloadFilename();
     //if ($this->checkDownload() === false) {
     //  throw new Exception("Download file is invalid");
     //}
     if ($this->isPlugin()) {
         if ($this->getAddonId() == "enterprise") {
             $_SESSION["__ENTERPRISE_INSTALL__"] = 1;
         }
         $oPluginRegistry =& PMPluginRegistry::getSingleton();
         $oPluginRegistry->installPluginArchive($filename, $this->getAddonName());
         $this->setState();
     } else {
         if ($this->getAddonType() == "core") {
             require_once PATH_CORE . 'classes' . PATH_SEP . 'class.Upgrade.php';
             $upgrade = new Upgrade($this);
             $upgrade->install();
         } else {
             throw new Exception("Addon type {$this->getAddonType()} not supported.");
         }
     }
 }