mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Make App::getBackend() non-static.
This commit is contained in:
parent
591a48aa67
commit
9410affdc0
@ -66,7 +66,7 @@ class App {
|
||||
* @param string $name
|
||||
* @return \Backend\AbstractBackend
|
||||
*/
|
||||
static public function getBackend($name, $user = null) {
|
||||
public public function getBackend($name, $user = null) {
|
||||
$name = $name ? $name : 'local';
|
||||
if (isset(self::$backendClasses[$name])) {
|
||||
return new self::$backendClasses[$name]($user);
|
||||
|
@ -82,7 +82,7 @@ class AddressBookController extends BaseController {
|
||||
|
||||
$response = new JSONResponse();
|
||||
|
||||
$backend = App::getBackend('local', $this->api->getUserId());
|
||||
$backend = $app->getBackend('local');
|
||||
// TODO: Check actual permissions
|
||||
if(!$backend->hasAddressBookMethodFor(\OCP\PERMISSION_CREATE)) {
|
||||
throw new \Exception('Not implemented');
|
||||
@ -128,7 +128,7 @@ class AddressBookController extends BaseController {
|
||||
|
||||
$response = new JSONResponse();
|
||||
|
||||
$backend = App::getBackend('local', $this->api->getUserId());
|
||||
$backend = $app->getBackend('local');
|
||||
// TODO: Check actual permissions
|
||||
if(!$backend->hasAddressBookMethodFor(\OCP\PERMISSION_DELETE)) {
|
||||
throw new \Exception('Not implemented');
|
||||
|
Loading…
Reference in New Issue
Block a user