From: Alexander Ebert Date: Sat, 24 Oct 2015 22:44:16 +0000 (+0200) Subject: Some cleanup and minor fixes X-Git-Tag: 3.0.0_Beta_1~2030^2~263 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0b494e88d11bb77e646190493d49d3b5ea95057;p=GitHub%2FWoltLab%2FWCF.git Some cleanup and minor fixes --- diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 70bfbeedc0..aa42fab752 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -7,7 +7,7 @@ {if $pageTitle|isset}{@$pageTitle|language} - {/if}{lang}wcf.global.acp{/lang}{if PACKAGE_ID} - {PAGE_TITLE|language}{/if} - + {@$__wcf->getStyleHandler()->getStylesheet(true)} {event name='stylesheets'} diff --git a/wcfsetup/install/files/acp/templates/packageStartInstall.tpl b/wcfsetup/install/files/acp/templates/packageStartInstall.tpl index 9581d909d3..1d676871e1 100644 --- a/wcfsetup/install/files/acp/templates/packageStartInstall.tpl +++ b/wcfsetup/install/files/acp/templates/packageStartInstall.tpl @@ -49,8 +49,8 @@
-
- {lang}wcf.acp.package.search.conditions{/lang} +
+

{lang}wcf.acp.package.search.conditions{/lang}

@@ -67,7 +67,7 @@ {lang}wcf.acp.package.search.package.description{/lang}
-
+
@@ -84,8 +84,8 @@
-
- {lang}wcf.acp.package.source{/lang} +
+

{lang}wcf.acp.package.source{/lang}

@@ -106,24 +106,7 @@ {lang}wcf.acp.package.source.upload.description{/lang} - - -
-
- - {if $errorField == 'downloadPackage'} - - {lang}wcf.acp.package.error.{@$errorType}{/lang} - - {/if} - {lang}wcf.acp.package.source.download.description{/lang} -
- - - {event name='sourceFields'} -
- - {event name='fieldsets'} +
diff --git a/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php index ccb620d6ac..b7b8f2e546 100755 --- a/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageStartInstallForm.class.php @@ -37,12 +37,6 @@ class PackageStartInstallForm extends AbstractForm { */ public $package = null; - /** - * url to the package to download - * @var string - */ - public $downloadPackage = ''; - /** * data of the uploaded package * @var array @@ -86,7 +80,6 @@ class PackageStartInstallForm extends AbstractForm { parent::readFormParameters(); if (!$this->stylePackageImportLocation) { - if (isset($_POST['downloadPackage'])) $this->downloadPackage = StringUtil::trim($_POST['downloadPackage']); if (isset($_FILES['uploadPackage'])) $this->uploadPackage = $_FILES['uploadPackage']; } } @@ -110,9 +103,6 @@ class PackageStartInstallForm extends AbstractForm { else if (!empty($this->uploadPackage['name'])) { $this->validateUploadPackage(); } - else if (!empty($this->downloadPackage)) { - $this->validateDownloadPackage(); - } else { throw new UserInputException('uploadPackage'); } @@ -156,46 +146,6 @@ class PackageStartInstallForm extends AbstractForm { $this->package = PackageValidationManager::getInstance()->getPackageValidationArchive()->getPackage(); } - /** - * Validates the download package input. - */ - protected function validateDownloadPackage() { - $this->activeTabMenuItem = 'upload'; - - if (FileUtil::isURL($this->downloadPackage)) { - // download package - $this->archive = new PackageArchive($this->downloadPackage, $this->package); - - try { - $this->downloadPackage = $this->archive->downloadArchive(); - } - catch (SystemException $e) { - throw new UserInputException('downloadPackage', 'downloadFailed'); - } - } - else { - // probably local path - if (!file_exists($this->downloadPackage)) { - throw new UserInputException('downloadPackage', 'downloadFailed'); - } - } - - if (!PackageValidationManager::getInstance()->validate($this->downloadPackage, false)) { - $exception = PackageValidationManager::getInstance()->getException(); - if ($exception instanceof PackageValidationException) { - switch ($exception->getCode()) { - case PackageValidationException::INVALID_PACKAGE_NAME: - case PackageValidationException::MISSING_PACKAGE_XML: - throw new UserInputException('downloadPackage', 'noValidPackage'); - break; - } - } - } - - $this->package = PackageValidationManager::getInstance()->getPackageValidationArchive()->getPackage(); - - } - /** * @see \wcf\form\IForm::save() */ @@ -208,7 +158,6 @@ class PackageStartInstallForm extends AbstractForm { // obey foreign key $packageID = ($this->package) ? $this->package->packageID : null; - $archive = $this->downloadPackage; if ($this->stylePackageImportLocation) { $archive = $this->stylePackageImportLocation; } diff --git a/wcfsetup/install/files/style/ui/tabMenu.scss b/wcfsetup/install/files/style/ui/tabMenu.scss index 17ef3a3033..2c99eb15e3 100644 --- a/wcfsetup/install/files/style/ui/tabMenu.scss +++ b/wcfsetup/install/files/style/ui/tabMenu.scss @@ -8,6 +8,8 @@ position: relative; > ul { + border-bottom: 1px solid $wcfContentBorderInner; + @extend .inlineList; > li {