summaryrefslogtreecommitdiffstats
path: root/apps/contacts/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/contacts/index.php')
-rw-r--r--apps/contacts/index.php45
1 files changed, 25 insertions, 20 deletions
diff --git a/apps/contacts/index.php b/apps/contacts/index.php
index 00b1b4f7a95..c35e1b85d4e 100644
--- a/apps/contacts/index.php
+++ b/apps/contacts/index.php
@@ -14,13 +14,17 @@ OCP\App::checkAppEnabled('contacts');
// Get active address books. This creates a default one if none exists.
$ids = OC_Contacts_Addressbook::activeIds(OCP\USER::getUser());
-$has_contacts = (count(OC_Contacts_VCard::all($ids, 0, 1)) > 0 ? true : false); // just to check if there are any contacts.
+$has_contacts = (count(OC_Contacts_VCard::all($ids, 0, 1)) > 0
+ ? true
+ : false); // just to check if there are any contacts.
if($has_contacts === false) {
- OCP\Util::writeLog('contacts','index.html: No contacts found.',OCP\Util::DEBUG);
+ OCP\Util::writeLog('contacts',
+ 'index.html: No contacts found.',
+ OCP\Util::DEBUG);
}
// Load the files we need
-OCP\App::setActiveNavigationEntry( 'contacts_index' );
+OCP\App::setActiveNavigationEntry('contacts_index');
// Load a specific user?
$id = isset( $_GET['id'] ) ? $_GET['id'] : null;
@@ -34,30 +38,31 @@ $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
$freeSpace=OC_Filesystem::free_space('/');
-$freeSpace=max($freeSpace,0);
-$maxUploadFilesize = min($maxUploadFilesize ,$freeSpace);
-
-OCP\Util::addscript('','jquery.multiselect');
-OCP\Util::addscript('','oc-vcategories');
-OCP\Util::addscript('contacts','contacts');
-OCP\Util::addscript('contacts','expanding');
-OCP\Util::addscript('contacts','jquery.combobox');
+$freeSpace=max($freeSpace, 0);
+$maxUploadFilesize = min($maxUploadFilesize, $freeSpace);
+
+OCP\Util::addscript('', 'jquery.multiselect');
+OCP\Util::addscript('', 'oc-vcategories');
+OCP\Util::addscript('contacts', 'contacts');
+OCP\Util::addscript('contacts', 'expanding');
+OCP\Util::addscript('contacts', 'jquery.combobox');
OCP\Util::addscript('files', 'jquery.fileupload');
-OCP\Util::addscript('contacts','jquery.inview');
-OCP\Util::addscript('contacts','jquery.Jcrop');
-OCP\Util::addscript('contacts','jquery.multi-autocomplete');
-OCP\Util::addStyle('','jquery.multiselect');
-OCP\Util::addStyle('contacts','jquery.combobox');
-OCP\Util::addStyle('contacts','jquery.Jcrop');
-OCP\Util::addStyle('contacts','contacts');
+OCP\Util::addscript('contacts', 'jquery.inview');
+OCP\Util::addscript('contacts', 'jquery.Jcrop');
+OCP\Util::addscript('contacts', 'jquery.multi-autocomplete');
+OCP\Util::addStyle('', 'jquery.multiselect');
+OCP\Util::addStyle('contacts', 'jquery.combobox');
+OCP\Util::addStyle('contacts', 'jquery.Jcrop');
+OCP\Util::addStyle('contacts', 'contacts');
$tmpl = new OCP\Template( "contacts", "index", "user" );
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize, false);
-$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize), false);
+$tmpl->assign('uploadMaxHumanFilesize',
+ OCP\Util::humanFileSize($maxUploadFilesize), false);
$tmpl->assign('property_types', $property_types, false);
$tmpl->assign('phone_types', $phone_types, false);
$tmpl->assign('email_types', $email_types, false);
$tmpl->assign('categories', $categories, false);
$tmpl->assign('has_contacts', $has_contacts, false);
-$tmpl->assign('id',$id, false);
+$tmpl->assign('id', $id, false);
$tmpl->printPage();