/** * @see Page::show() */ public function show() { parent::show(); // check master password WCFACP::checkMasterPassword(); switch ($this->action) { case 'install': case 'update': if ($this->action == 'install') { WCF::getUser()->checkPermission('admin.system.package.canInstallPackage'); } else { WCF::getUser()->checkPermission('admin.system.package.canUpdatePackage'); } require_once WCF_DIR . 'lib/acp/package/PackageInstallation.class.php'; new PackageInstallation($this->queueID); break; case 'rollback': WCF::getUser()->checkPermission('admin.system.package.canInstallPackage'); require_once WCF_DIR . 'lib/acp/package/PackageInstallationRollback.class.php'; new PackageInstallationRollback($this->queueID); break; case 'uninstall': WCF::getUser()->checkPermission('admin.system.package.canUninstallPackage'); require_once WCF_DIR . 'lib/acp/package/PackageUninstallation.class.php'; new PackageUninstallation($this->queueID); break; case 'openQueue': require_once WCF_DIR . 'lib/acp/package/PackageInstallationQueue.class.php'; PackageInstallationQueue::openQueue($this->parentQueueID, $this->processNo); break; case 'startUninstall': WCF::getUser()->checkPermission('admin.system.package.canUninstallPackage'); require_once WCF_DIR . 'lib/acp/package/PackageUninstallation.class.php'; PackageUninstallation::checkDependencies(); break; } }
/** * @see PackageUninstallation::startUninstallation() */ protected function startUninstallation() { if ($this->parentQueueID != 0 && $this->packageID == 0) { return 'finish'; } return parent::startUninstallation(); }