mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-30 19:52:17 +01:00
Contacts: Load a server-side generated js script with preferences.
This commit is contained in:
parent
43c288bb9f
commit
0aa879dc45
@ -20,6 +20,9 @@ $this->create('contacts_index', '/')
|
|||||||
// }
|
// }
|
||||||
// );
|
// );
|
||||||
|
|
||||||
|
$this->create('contacts_jsconfig', 'ajax/config.js')
|
||||||
|
->actionInclude('contacts/js/config.php');
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
- Check what it requires to be a RESTful API. I think maybe {user}
|
- Check what it requires to be a RESTful API. I think maybe {user}
|
||||||
shouldn't be in the URI but be authenticated in headers or elsewhere.
|
shouldn't be in the URI but be authenticated in headers or elsewhere.
|
||||||
|
25
js/config.php
Normal file
25
js/config.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* ownCloud - Addressbook
|
||||||
|
*
|
||||||
|
* @author Thomas Tanghus
|
||||||
|
* @copyright 2012 Thomas Tanghus <thomas@tanghus.net>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 3 of the License, or any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
OCP\JSON::setContentTypeHeader('text/javascript');
|
||||||
|
OCP\JSON::checkLoggedIn();
|
||||||
|
OCP\JSON::checkAppEnabled('contacts');
|
Loading…
x
Reference in New Issue
Block a user