Ejemplo n.º 1
0
function InstallPageContent(&$sError)
{
    global $aConf, $confFirst, $aDbConf, $aGeneral;
    $sRet = '';
    switch ($_REQUEST['action']) {
        case 'compile_languages':
            performInstallLanguages();
            $sRet .= 'Default Dolphin language was recompiled';
            break;
        case 'step7':
            $sRet .= genMainDolphinPage();
            break;
        case 'step6':
            $sErrorMessage = checkPostInstallPermissions($sError);
            $sRet .= strlen($sErrorMessage) ? genPostInstallPermissionTable($sErrorMessage) : genMainDolphinPage();
            break;
        case 'step5':
            $sRet .= genPostInstallPermissionTable();
            break;
        case 'step4':
            $sErrorMessage = checkConfigArray($aGeneral, $sError);
            $sRet .= strlen($sErrorMessage) ? genSiteGeneralConfig($sErrorMessage) : genInstallationProcessPage();
            break;
        case 'step3':
            $sErrorMessage = checkConfigArray($aDbConf, $sError);
            $sErrorMessage .= CheckSQLParams();
            $sRet .= strlen($sErrorMessage) ? genDatabaseConfig($sErrorMessage) : genSiteGeneralConfig();
            break;
        case 'step2':
            $sErrorMessage = checkConfigArray($confFirst, $sError);
            $sRet .= strlen($sErrorMessage) ? genPathCheckingConfig($sErrorMessage) : genDatabaseConfig();
            break;
        case 'step1':
            $sErrorMessage = checkPreInstallPermission($sError);
            $sRet .= strlen($sErrorMessage) ? genPreInstallPermissionTable($sErrorMessage) : genPathCheckingConfig();
            break;
        case 'preInstall':
            $sRet .= genPreInstallPermissionTable();
            break;
        default:
            $sRet .= StartInstall();
            break;
    }
    return $sRet;
}
Ejemplo n.º 2
0
 public function checkPermissions()
 {
     $sError = '';
     $sErrorMsg = checkPreInstallPermission($sError);
     if ($sErrorMsg) {
         $this->finish($this->_aReturnCodes['permissions failed']['code'], $this->_aReturnCodes['permissions failed']['msg']);
     }
 }