protected function initInstallStatus($forceInit = false)
 {
     $oStorage = OX_Admin_UI_Install_InstallUtils::getSessionStorage();
     $oStatus = $oStorage->get('installStatus');
     //initialize status if :
     // 1) it's null
     // 2) recovery was recently discovered
     // 3) upgrader reports need for recovery
     // AD1) If recovery was finished we need to give installer a chanse to
     //      reset to new state after recovery
     // AD2) If upgrader requires recovery we need to enforce it
     if ($oStatus == null || $oStatus->isRecovery() || $this->oUpgrader->isRecoveryRequired() || $forceInit) {
         //ask upgrader to determine installation status, also reset any data
         //stored by wizard
         $oStatus = new OX_Admin_UI_Install_InstallStatus($this->oUpgrader);
         $oStorage->set('installStatus', $oStatus);
         $oWizard = new OX_Admin_UI_Install_Wizard($oStatus);
         $oWizard->reset();
         // Rebild component hooks to avoid problems with previous plugin installation
         require_once LIB_PATH . '/Extension/ExtensionCommon.php';
         $oExtensionManager = new OX_Extension_Common();
         $oExtensionManager->cacheComponentHooks();
     }
     $this->oInstallStatus = $oStatus;
 }
Exemplo n.º 2
0
 * @return boolean - true if folder exists and is writable
 */
function checkFolderPermissions($folder)
{
    if (!file_exists($folder)) {
        return false;
    } elseif (!is_writable($folder)) {
        return false;
    }
    return true;
}
if (array_key_exists('btn_startagain', $_POST)) {
    // Delete the cookie if user is restarting upgrader
    setcookie('oat', '');
}
if ($oUpgrader->isRecoveryRequired()) {
    if (array_key_exists('btn_recovery', $_POST)) {
        $oUpgrader->recoverUpgrade();
        $action = OA_UPGRADE_RECOVERY;
    } else {
        $action = OA_UPGRADE_RECOVERY_INFORM;
    }
} else {
    if (array_key_exists('btn_syscheck', $_POST) || $_POST['dirPage'] == OA_UPGRADE_SYSCHECK) {
        // store checkForUpdates value into session, so that they can be inserted into DB once DB has been created
        session_start();
        // Always check for updates
        $_SESSION['checkForUpdates'] = true;
        $aSysInfo = $oUpgrader->checkEnvironment();
        // Do not check for an upgrade package if environment errors exist
        if (!$aSysInfo['PERMS']['error'] && !$aSysInfo['PHP']['error'] && !$aSysInfo['FILES']['error']) {