1
0
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:
Thomas Tanghus 2013-05-19 01:36:35 +02:00
parent 591a48aa67
commit 9410affdc0
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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');