Removed input fields for cookiePath
authorAlexander Ebert <ebert@woltlab.com>
Tue, 31 Dec 2013 22:10:47 +0000 (23:10 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 31 Dec 2013 22:10:47 +0000 (23:10 +0100)
wcfsetup/install/files/acp/templates/applicationEdit.tpl
wcfsetup/install/files/acp/templates/applicationManagement.tpl
wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index cf269da04a8a0cd99037be4c982e9271bec70963..8ff1967802aca1a5f13897032759f5e4b8eefff1 100644 (file)
                                </dd>
                        </dl>
                        
-                       <dl{if $errorField == 'cookiePath'} class="formError"{/if}>
-                               <dt><label for="cookiePath">{lang}wcf.acp.application.cookiePath{/lang}</label></dt>
-                               <dd>
-                                       <input type="text" name="cookiePath" id="cookiePath" value="{$cookiePath}" class="long" />
-                                       {if $errorField == 'cookiePath'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.application.cookiePath.error.{$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                               </dd>
-                       </dl>
-                       
                        {event name='cookieFields'}
                </fieldset>
                
index 3979e2401dddaf69499a798f8d7043610608ad13..98c1d7f08205d18fb9a57cad4203dfa1e08706a8 100644 (file)
@@ -29,7 +29,6 @@
                                <th class="columnText columnDomainName">{lang}wcf.acp.application.domainName{/lang}</th>
                                <th class="columnText columnDomainPath">{lang}wcf.acp.application.domainPath{/lang}</th>
                                <th class="columnText columnCookieDomain">{lang}wcf.acp.application.cookieDomain{/lang}</th>
-                               <th class="columnText columnCookiePath">{lang}wcf.acp.application.cookiePath{/lang}</th>
                                
                                {event name='columnHeads'}
                        </tr>
@@ -53,7 +52,6 @@
                                        <td class="columnText columnDomainName">{$application->domainName}</td>
                                        <td class="columnText columnDomainPath">{$application->domainPath}</td>
                                        <td class="columnText columnCookieDomain">{$application->cookieDomain}</td>
-                                       <td class="columnText columnCookiePath">{$application->cookiePath}</td>
                                        
                                        {event name='columns'}
                                </tr>
index 8364d7d75cf4ffa7157b40cd4eb23e7cadfaa971..af64d3fa98249a5cbe514c70a7d066938a79452c 100644 (file)
@@ -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
index b9f1e1fb2f0dc10d716879bff45c1224b1ce9e70..aedc09d1792e6ee0897aafde03402b36596fec8b 100644 (file)
        
        <category name="wcf.acp.application">
                <item name="wcf.acp.application.cookie"><![CDATA[Cookie-Einstellungen]]></item>
-               <item name="wcf.acp.application.cookie.warning"><![CDATA[Die folgenden Einstellungen stellen sicher, dass der Login gespeichert wird und ein automatischer Login möglich ist. Sie müssen diese Einstellungen anpassen, sollten sich Domain und/oder Pfad geändert haben. Sollten Sie sich bei den korrekten Werten nicht sicher sein, übernehmen Sie bitte die exakten Angaben der beiden obigen Eingabefelder.]]></item>
+               <item name="wcf.acp.application.cookie.warning"><![CDATA[Die folgenden Einstellungen stellen sicher, dass der Login gespeichert wird und ein automatischer Login möglich ist. Sie müssen diese Einstellungen anpassen, sollten sich die Domain geändert haben. Sollten Sie sich bei dem korrekten Wert nicht sicher sein, übernehmen Sie bitte die exakte Angabe im Feld „Domain“.]]></item>
                <item name="wcf.acp.application.cookieDomain"><![CDATA[Cookie-Domain]]></item>
                <item name="wcf.acp.application.cookieDomain.error.containsPath"><![CDATA[Die Cookie-Domain darf keine Pfadangaben enthalten]]></item>
                <item name="wcf.acp.application.cookieDomain.error.notValid"><![CDATA[Die Cookie-Domain stimmt nicht mit der oben angegebenen Domain überein (Subdomains wie zum Beispiel „www“ dürfen weggelassen werden).]]></item>
-               <item name="wcf.acp.application.cookiePath"><![CDATA[Cookie-Pfad]]></item>
-               <item name="wcf.acp.application.cookiePath.error.notValid"><![CDATA[Der Cookie-Pfad passt nicht zum oben angegebenen Domain-Pfad.]]></item>
                <item name="wcf.acp.application.domain"><![CDATA[Domain-Einstellungen]]></item>
                <item name="wcf.acp.application.domainName"><![CDATA[Domain]]></item>
                <item name="wcf.acp.application.domainName.description"><![CDATA[Geben Sie die Domain an, über die diese Anwendung erreichbar ist. Wenn Ihre Anwendung zum Beispiel unter „http://www.example.com/community/forum/“ erreichbar ist, so geben Sie hier bitte „www.example.com“ ein.]]></item>
index 143f36dc53bc9de7ab2546e7be5b026f208d97a3..4d68be808eecb43702751d6b945afa851b0b7e83 100644 (file)
        
        <category name="wcf.acp.application">
                <item name="wcf.acp.application.cookie"><![CDATA[Cookie Settings]]></item>
-               <item name="wcf.acp.application.cookie.warning"><![CDATA[The settings below are used to establish a persistent login for your website; Keep in mind to update these values whenever the domain name or path changes. If you are unsure which values you need to provide, you can safely copy both values from above.]]></item>
+               <item name="wcf.acp.application.cookie.warning"><![CDATA[The setting below is used to establish a persistent login for your website; Keep in mind to update this value whenever the domain name changes. If you are unsure which value you need to provide, you can safely copy the value of “Domain”.]]></item>
                <item name="wcf.acp.application.cookieDomain"><![CDATA[Cookie Domain]]></item>
                <item name="wcf.acp.application.cookieDomain.error.containsPath"><![CDATA[Cookie domain may not contain path components]]></item>
                <item name="wcf.acp.application.cookieDomain.error.notValid"><![CDATA[Cookie domain does not match the domain entered above (sub-domains like “www” may be omitted).]]></item>
-               <item name="wcf.acp.application.cookiePath"><![CDATA[Cookie Path]]></item>
-               <item name="wcf.acp.application.cookiePath.error.notValid"><![CDATA[Cookie path does not match the domain path above.]]></item>
                <item name="wcf.acp.application.domain"><![CDATA[Domain Settings]]></item>
                <item name="wcf.acp.application.domainName"><![CDATA[Domain]]></item>
                <item name="wcf.acp.application.domainName.description"><![CDATA[If you’re accessing this application through “http://www.example.com/community/forum/”, please enter “www.example.com”.]]></item>