]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use server container
authorLukas Reschke <lukas@owncloud.com>
Thu, 27 Nov 2014 13:36:11 +0000 (14:36 +0100)
committerLukas Reschke <lukas@owncloud.com>
Thu, 27 Nov 2014 13:36:11 +0000 (14:36 +0100)
lib/private/appframework/app.php
lib/private/server.php
lib/public/iservercontainer.php

index 074b6cc3fd28d95f5cbe8ecf5c0a879385257e0c..f56ba4af870e7d4882259f1f4d636b666c341fd3 100644 (file)
@@ -69,7 +69,7 @@ class App {
                        if($value['expireDate'] instanceof \DateTime) {
                                $expireDate = $value['expireDate']->getTimestamp();
                        }
-                       setcookie($name, $value['value'], $expireDate, \OC::$WEBROOT, null, \OC::$server->getConfig()->getSystemValue('forcessl', false), true);
+                       setcookie($name, $value['value'], $expireDate, $container->getServer()->getWebRoot(), null, $container->getServer()->getConfig()->getSystemValue('forcessl', false), true);
                }
 
                if(!is_null($output)) {
index c413ee8bf6d75f30bd803e1504f66e6d382c0579..e28e8362796f5b4d0abc909cde39d3a64f8bb732 100644 (file)
@@ -631,4 +631,13 @@ class Server extends SimpleContainer implements IServerContainer {
        function getAppManager() {
                return $this->query('AppManager');
        }
+
+       /**
+        * Get the webroot
+        *
+        * @return string
+        */
+       function getWebRoot() {
+               return \OC::$WEBROOT;
+       }
 }
index b734d1b4161779bd0400d79aae96bb8d05901d53..301f47c68fac1479ea267423683b2a37b58fd81c 100644 (file)
@@ -298,4 +298,11 @@ interface IServerContainer {
         * @return \OCP\App\IAppManager
         */
        function getAppManager();
+
+       /**
+        * Get the webroot
+        *
+        * @return string
+        */
+       function getWebRoot();
 }