mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-08 16:36:25 +00:00
Fix ordering into app loader. Also fix a syntax... newbie... issue
This commit is contained in:
parent
816a3a784f
commit
c9fa6a7fc9
@ -43,13 +43,20 @@ class OcSmsApp extends App {
|
||||
$this->c = $container;
|
||||
$app = $this;
|
||||
|
||||
/**
|
||||
* Core
|
||||
*/
|
||||
$container->registerService('UserId', function($c) {
|
||||
return \OCP\User::getUser();
|
||||
});
|
||||
|
||||
/**
|
||||
* Database Layer
|
||||
*/
|
||||
$container->registerService('ConfigMapper', function ($c) use ($app) {
|
||||
return new ConfigMapper(
|
||||
$c->query('ServerContainer')->getDb(),
|
||||
$app->getUserId(),
|
||||
$c->query('UserId'),
|
||||
$c->query('ServerContainer')->getCrypto()
|
||||
);
|
||||
});
|
||||
@ -62,13 +69,6 @@ class OcSmsApp extends App {
|
||||
return new SmsMapper($c->query('ServerContainer')->getDb());
|
||||
});
|
||||
|
||||
/**
|
||||
* Core
|
||||
*/
|
||||
$container->registerService('UserId', function($c) {
|
||||
return \OCP\User::getUser();
|
||||
});
|
||||
|
||||
/**
|
||||
* Controllers
|
||||
*/
|
||||
|
@ -54,4 +54,6 @@ class ConfigMapper extends Mapper {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user