예제 #1
0
         }
         // Import from Zip
         $res = ZipInstaller::install($info);
         if (!$res) {
             ZipInstaller::clean();
             $form->failed = array('zip-install');
             $page->installer_error = ZipInstaller::$error;
             return false;
         }
         // Zip successfully installed
         ZipInstaller::clean();
         $page->title = __('Install completed');
         echo $tpl->render('designer/installed', $res);
     } else {
         // Import from Github
         $res = GithubInstaller::install($_POST['github']);
         if (!$res) {
             $form->failed = array('github-install');
             $page->installer_error = GithubInstaller::$error;
             return false;
         }
         // App/theme successfully installed
         $page->title = __('Install completed');
         echo $tpl->render('designer/installed', $res);
     }
 } elseif (is_uploaded_file($_FILES['zipfile']['tmp_name'])) {
     ZipInstaller::clean();
     // Import from Zip
     $res = ZipInstaller::install($_FILES['zipfile']);
     if (!$res) {
         ZipInstaller::clean();
예제 #2
0
            ZipInstaller::clean();
            Cli::out('Error: ' . ZipInstaller::$error, 'error');
            return;
        }
        $res = ZipInstaller::install($info);
        if (!$res) {
            ZipInstaller::clean();
            Cli::out('Error: ' . ZipInstaller::$error, 'error');
            return;
        }
        ZipInstaller::clean();
        Cli::out('Install completed.', 'success');
        return;
    } else {
        // Import from Github
        $res = GithubInstaller::install($url);
        if (!$res) {
            Cli::out('Error: ' . GithubInstaller::$error, 'error');
            return;
        }
        Cli::out('Install completed.', 'success');
        return;
    }
}
if (@file_exists('conf/installed')) {
    Cli::out('** Error: Installer has already been run.', 'error');
    return;
}
require_once 'apps/cli/lib/Functions.php';
// set the necessary folder permissions
system('chmod -R 777 cache conf css files lang layouts');