Commit d197f434 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Use server container

parent 04813907
......@@ -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)) {
......
......@@ -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;
}
}
......@@ -298,4 +298,11 @@ interface IServerContainer {
* @return \OCP\App\IAppManager
*/
function getAppManager();
/**
* Get the webroot
*
* @return string
*/
function getWebRoot();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment