1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-18 07:52:21 +01:00

Misc cleanup

This commit is contained in:
Thomas Tanghus 2013-10-18 15:29:16 +02:00
parent 7eff55d9cd
commit 155a61c867
3 changed files with 6 additions and 11 deletions

View File

@ -7,6 +7,7 @@ OC.Contacts = OC.Contacts || {};
this.getAllResponseHeaders = jqXHR.getAllResponseHeaders;
this.getResponseHeader = jqXHR.getResponseHeader;
this.statusCode = jqXHR.status;
this.error = false;
// 204 == No content
// 304 == Not modified
if(!response) {
@ -29,7 +30,6 @@ OC.Contacts = OC.Contacts || {};
this.message = t('contacts', 'Server error! Please inform system administator');
}
} else {
this.error = false;
this.data = response;
}
}

View File

@ -19,6 +19,8 @@ use Sabre\VObject,
/**
* This class manages our app actions
*
* TODO: Merge in Dispatcher
*/
App::$l10n = \OC_L10N::get('contacts');

View File

@ -23,6 +23,8 @@ use OCP\AppFramework\App as MainApp,
/**
* This class manages our app actions
*
* TODO: Merge with App
*/
class Dispatcher extends MainApp {
@ -32,18 +34,9 @@ class Dispatcher extends MainApp {
protected $app;
public function __construct($params) {
parent::__construct('contacts');
parent::__construct('contacts', $params);
$this->container = $this->getContainer();
$this->container['urlParams'] = $params;
$this->container->registerMiddleware(new HttpMiddleware($this->container));
// TODO: Remove this once sorted out.
// When querying the middleware dispatcher Request gets instantiated
// but urlParams isn't set yet
//$this->container['urlParams'] = $params;
//$this->middleware = $this->container->query('MiddlewareDispatcher');
//$this->middleware->registerMiddleware(new HttpMiddleware($this->container->query('API')));
//$this->api = $this->container->query('API');
//$this->request = $this->container->query('Request');
$this->app = new App($this->container->query('API')->getUserId());
$this->registerServices();
}