diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-11-27 14:36:11 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-11-27 14:36:11 +0100 |
commit | d197f434757c9c21d813584122329b774487f15e (patch) | |
tree | c9dfa53ee13e19c4e57a71e27af3042129c2eefd | |
parent | 048139074df674d0ac82da12357d3934af3abc2e (diff) | |
download | nextcloud-server-d197f434757c9c21d813584122329b774487f15e.tar.gz nextcloud-server-d197f434757c9c21d813584122329b774487f15e.zip |
Use server container
-rw-r--r-- | lib/private/appframework/app.php | 2 | ||||
-rw-r--r-- | lib/private/server.php | 9 | ||||
-rw-r--r-- | lib/public/iservercontainer.php | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/lib/private/appframework/app.php b/lib/private/appframework/app.php index 074b6cc3fd2..f56ba4af870 100644 --- a/lib/private/appframework/app.php +++ b/lib/private/appframework/app.php @@ -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)) { diff --git a/lib/private/server.php b/lib/private/server.php index c413ee8bf6d..e28e8362796 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -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; + } } diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php index b734d1b4161..301f47c68fa 100644 --- a/lib/public/iservercontainer.php +++ b/lib/public/iservercontainer.php @@ -298,4 +298,11 @@ interface IServerContainer { * @return \OCP\App\IAppManager */ function getAppManager(); + + /** + * Get the webroot + * + * @return string + */ + function getWebRoot(); } |