From 9dfdcc301bbf908d847c2f343c7903cc5acfe09d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 31 Dec 2013 23:10:47 +0100 Subject: [PATCH] Removed input fields for cookiePath --- .../files/acp/templates/applicationEdit.tpl | 16 ----------- .../acp/templates/applicationManagement.tpl | 2 -- .../acp/form/ApplicationEditForm.class.php | 27 ------------------- wcfsetup/install/lang/de.xml | 4 +-- wcfsetup/install/lang/en.xml | 4 +-- 5 files changed, 2 insertions(+), 51 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/applicationEdit.tpl b/wcfsetup/install/files/acp/templates/applicationEdit.tpl index cf269da04a..8ff1967802 100644 --- a/wcfsetup/install/files/acp/templates/applicationEdit.tpl +++ b/wcfsetup/install/files/acp/templates/applicationEdit.tpl @@ -101,22 +101,6 @@ - -
-
- - {if $errorField == 'cookiePath'} - - {if $errorType == 'empty'} - {lang}wcf.global.form.error.empty{/lang} - {else} - {lang}wcf.acp.application.cookiePath.error.{$errorType}{/lang} - {/if} - - {/if} -
- - {event name='cookieFields'} diff --git a/wcfsetup/install/files/acp/templates/applicationManagement.tpl b/wcfsetup/install/files/acp/templates/applicationManagement.tpl index 3979e2401d..98c1d7f082 100644 --- a/wcfsetup/install/files/acp/templates/applicationManagement.tpl +++ b/wcfsetup/install/files/acp/templates/applicationManagement.tpl @@ -29,7 +29,6 @@ {lang}wcf.acp.application.domainName{/lang} {lang}wcf.acp.application.domainPath{/lang} {lang}wcf.acp.application.cookieDomain{/lang} - {lang}wcf.acp.application.cookiePath{/lang} {event name='columnHeads'} @@ -53,7 +52,6 @@ {$application->domainName} {$application->domainPath} {$application->cookieDomain} - {$application->cookiePath} {event name='columns'} diff --git a/wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php b/wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php index 8364d7d75c..af64d3fa98 100644 --- a/wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php @@ -41,12 +41,6 @@ class ApplicationEditForm extends AbstractForm { */ public $cookieDomain = ''; - /** - * cookie path - * @var string - */ - public $cookiePath = ''; - /** * domain name * @var string @@ -95,7 +89,6 @@ class ApplicationEditForm extends AbstractForm { parent::readFormParameters(); if (isset($_POST['cookieDomain'])) $this->cookieDomain = StringUtil::trim($_POST['cookieDomain']); - if (isset($_POST['cookiePath'])) $this->cookiePath = StringUtil::trim($_POST['cookiePath']); if (isset($_POST['domainName'])) $this->domainName = StringUtil::trim($_POST['domainName']); if (isset($_POST['domainPath'])) $this->domainPath = StringUtil::trim($_POST['domainPath']); } @@ -108,7 +101,6 @@ class ApplicationEditForm extends AbstractForm { if (empty($_POST)) { $this->cookieDomain = $this->application->cookieDomain; - $this->cookiePath = $this->application->cookiePath; $this->domainName = $this->application->domainName; $this->domainPath = $this->application->domainPath; } @@ -143,25 +135,8 @@ class ApplicationEditForm extends AbstractForm { } } - if (empty($this->domainPath)) { - $this->cookiePath = ''; - } - else { - // strip first and last slash - $this->domainPath = FileUtil::removeLeadingSlash(FileUtil::removeTrailingSlash($this->domainPath)); - $this->cookiePath = FileUtil::removeLeadingSlash(FileUtil::removeTrailingSlash($this->cookiePath)); - - if (!empty($this->cookiePath) && ($this->domainPath != $this->cookiePath)) { - // check if cookie path is contained within domain path - if (!StringUtil::startsWith($this->domainPath, $this->cookiePath)) { - throw new UserInputException('cookiePath', 'notValid'); - } - } - } - // add slashes $this->domainPath = FileUtil::addLeadingSlash(FileUtil::addTrailingSlash($this->domainPath)); - $this->cookiePath = FileUtil::addLeadingSlash(FileUtil::addTrailingSlash($this->cookiePath)); // search for other applications with the same domain and path $sql = "SELECT packageID @@ -191,7 +166,6 @@ class ApplicationEditForm extends AbstractForm { // save application $this->objectAction = new ApplicationAction(array($this->application->getDecoratedObject()), 'update', array('data' => array_merge($this->additionalFields, array( 'cookieDomain' => $this->cookieDomain, - 'cookiePath' => $this->cookiePath, 'domainName' => $this->domainName, 'domainPath' => $this->domainPath )))); @@ -217,7 +191,6 @@ class ApplicationEditForm extends AbstractForm { WCF::getTPL()->assign(array( 'application' => $this->application, 'cookieDomain' => $this->cookieDomain, - 'cookiePath' => $this->cookiePath, 'domainName' => $this->domainName, 'domainPath' => $this->domainPath, 'packageID' => $this->packageID diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index b9f1e1fb2f..aedc09d179 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -17,12 +17,10 @@ - + - - diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 143f36dc53..4d68be808e 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -17,12 +17,10 @@ - + - - -- 2.20.1