Remove redundant code
This commit is contained in:
parent
d197f43475
commit
fef32e63dd
|
@ -33,15 +33,15 @@ class Server extends SimpleContainer implements IServerContainer {
|
||||||
$this->registerService('ContactsManager', function ($c) {
|
$this->registerService('ContactsManager', function ($c) {
|
||||||
return new ContactsManager();
|
return new ContactsManager();
|
||||||
});
|
});
|
||||||
$this->registerService('Request', function ($c) {
|
$this->registerService('Request', function (Server $c) {
|
||||||
if (isset($c['urlParams'])) {
|
if (isset($c['urlParams'])) {
|
||||||
$urlParams = $c['urlParams'];
|
$urlParams = $c['urlParams'];
|
||||||
} else {
|
} else {
|
||||||
$urlParams = array();
|
$urlParams = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (\OC::$server->getSession()->exists('requesttoken')) {
|
if ($c->getSession()->exists('requesttoken')) {
|
||||||
$requestToken = \OC::$server->getSession()->get('requesttoken');
|
$requestToken = $c->getSession()->get('requesttoken');
|
||||||
} else {
|
} else {
|
||||||
$requestToken = false;
|
$requestToken = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue