1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Contacts: Load more preferences in js.

This commit is contained in:
Thomas Tanghus 2013-04-01 03:51:57 +02:00
parent d059f9af09
commit c9b4946e88

View File

@ -23,3 +23,12 @@
OCP\JSON::setContentTypeHeader('text/javascript'); OCP\JSON::setContentTypeHeader('text/javascript');
OCP\JSON::checkLoggedIn(); OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('contacts'); OCP\JSON::checkAppEnabled('contacts');
echo 'var contacts_groups_sortorder=[' . OCP\Config::getUserValue(OCP\USER::getUser(), 'contacts', 'groupsort', '') . '],';
echo 'contacts_properties_indexed = '
. (OCP\Config::getUserValue(OCP\USER::getUser(), 'contacts', 'contacts_properties_indexed', 'no') === 'no'
? 'false' : 'true') . ',';
echo 'contacts_categories_indexed = '
. (OCP\Config::getUserValue(OCP\USER::getUser(), 'contacts', 'contacts_categories_indexed', 'no') === 'no'
? 'false' : 'true') . ',';
echo 'lang=\'' . OCP\Config::getUserValue(OCP\USER::getUser(), 'core', 'lang', 'en') . '\';';