} 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(); $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 { $form->failed = array('other'); return false; } });
} ZipInstaller::clean(); Cli::out('Install completed.', 'success'); return; } require_once 'apps/designer/lib/Functions.php'; if (github_is_zip($url)) { ZipInstaller::clean(); // Retrieve zip file $info = ZipInstaller::fetch($url); if (!$info) { 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; }