diff --git a/lib/addressbookprovider.php b/lib/addressbookprovider.php
index bd1874a5..1973f3fd 100644
--- a/lib/addressbookprovider.php
+++ b/lib/addressbookprovider.php
@@ -103,7 +103,7 @@ class AddressbookProvider implements \OCP\IAddressBook {
break;
}
- if(in_array($row['name'], Properties::$multi_properties)) {
+ if(in_array($row['name'], Properties::$multiProperties)) {
if(!isset($results[$row['contactid']])) {
$results[$row['contactid']] = array('id' => $row['contactid'], $row['name'] => array($value));
} elseif(!isset($results[$row['contactid']][$row['name']])) {
diff --git a/lib/contact.php b/lib/contact.php
index 74cd2e72..abe4dff2 100644
--- a/lib/contact.php
+++ b/lib/contact.php
@@ -590,7 +590,7 @@ class Contact extends VObject\VCard implements IPIMObject {
*
* NOTE: The data has actually already been merged client side!
* NOTE: The only properties coming from the web client are the ones
- * defined in \OCA\Contacts\Utils\Properties::$index_properties and
+ * defined in \OCA\Contacts\Utils\Properties::$indexProperties and
* UID is skipped for obvious reasons, and PHOTO is currently not updated.
* The data array has this structure:
*
@@ -608,12 +608,12 @@ class Contact extends VObject\VCard implements IPIMObject {
if(!is_array($properties)) {
\OCP\Util::writeLog('contacts', __METHOD__.' not an array?: ' .$name. ' '.print_r($properties, true), \OCP\Util::DEBUG);
}
- if(in_array($name, Utils\Properties::$multi_properties)) {
+ if(in_array($name, Utils\Properties::$multiProperties)) {
unset($this->{$name});
}
foreach($properties as $parray) {
\OCP\Util::writeLog('contacts', __METHOD__.' adding: ' .$name. ' '.print_r($parray['value'], true) . ' ' . print_r($parray['parameters'], true), \OCP\Util::DEBUG);
- if(in_array($name, Utils\Properties::$multi_properties)) {
+ if(in_array($name, Utils\Properties::$multiProperties)) {
// TODO: wrap in try/catch, check return value
$this->setPropertyByChecksum('new', $name, $parray['value'], $parray['parameters']);
} else {
@@ -643,7 +643,7 @@ class Contact extends VObject\VCard implements IPIMObject {
continue;
}
\OCP\Util::writeLog('contacts', __METHOD__.' merging: ' .$property->name, \OCP\Util::DEBUG);
- if(in_array($property->name, Utils\Properties::$multi_properties)) {
+ if(in_array($property->name, Utils\Properties::$multiProperties)) {
$ownproperties = $this->select($property->name);
if(count($ownproperties) === 0) {
// We don't have any instances of this property, so just add it.
diff --git a/lib/controller/contactcontroller.php b/lib/controller/contactcontroller.php
index bf06a436..04c35f11 100644
--- a/lib/controller/contactcontroller.php
+++ b/lib/controller/contactcontroller.php
@@ -103,7 +103,7 @@ class ContactController extends Controller {
->bailOut(App::$l10n->t('Property name is not set.'));
}
- if (!$checksum && in_array($name, Properties::$multi_properties)) {
+ if (!$checksum && in_array($name, Properties::$multiProperties)) {
return $response
->setStatus(Http::STATUS_PRECONDITION_FAILED)
->bailOut(App::$l10n->t('Property checksum is not set.'));
@@ -117,7 +117,7 @@ class ContactController extends Controller {
$result = array('contactId' => $params['contactId']);
- if ($checksum && in_array($name, Properties::$multi_properties)) {
+ if ($checksum && in_array($name, Properties::$multiProperties)) {
try {
if(is_null($value)) {
$contact->unsetPropertyByChecksum($checksum);
@@ -130,7 +130,7 @@ class ContactController extends Controller {
->setStatus(Http::STATUS_PRECONDITION_FAILED)
->bailOut(App::$l10n->t('Information about vCard is incorrect. Please reload the page.'));
}
- } elseif (!in_array($name, Properties::$multi_properties)) {
+ } elseif (!in_array($name, Properties::$multiProperties)) {
if (is_null($value)) {
unset($contact->{$name});
diff --git a/lib/controller/pagecontroller.php b/lib/controller/pagecontroller.php
index 1ea19926..d95dab8c 100644
--- a/lib/controller/pagecontroller.php
+++ b/lib/controller/pagecontroller.php
@@ -28,14 +28,14 @@ class PageController extends Controller {
public function index() {
\OC::$server->getNavigationManager()->setActiveEntry('contacts');
- $impp_types = Properties::getTypesForProperty('IMPP');
- $adr_types = Properties::getTypesForProperty('ADR');
- $phone_types = Properties::getTypesForProperty('TEL');
- $email_types = Properties::getTypesForProperty('EMAIL');
+ $imppTypes = Properties::getTypesForProperty('IMPP');
+ $adrTypes = Properties::getTypesForProperty('ADR');
+ $phoneTypes = Properties::getTypesForProperty('TEL');
+ $emailTypes = Properties::getTypesForProperty('EMAIL');
$ims = Properties::getIMOptions();
- $im_protocols = array();
+ $imProtocols = array();
foreach($ims as $name => $values) {
- $im_protocols[$name] = $values['displayname'];
+ $imProtocols[$name] = $values['displayname'];
}
$maxUploadFilesize = \OCP\Util::maxUploadFilesize('/');
@@ -62,11 +62,11 @@ class PageController extends Controller {
$response->setParams(array(
'uploadMaxFilesize' => $maxUploadFilesize,
'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize),
- 'phone_types' => $phone_types,
- 'email_types' => $email_types,
- 'adr_types' => $adr_types,
- 'impp_types' => $impp_types,
- 'im_protocols' => $im_protocols,
+ 'phoneTypes' => $phoneTypes,
+ 'emailTypes' => $emailTypes,
+ 'adrTypes' => $adrTypes,
+ 'imppTypes' => $imppTypes,
+ 'imProtocols' => $imProtocols,
));
return $response;
diff --git a/lib/hooks.php b/lib/hooks.php
index 8b2276ec..47a0c616 100644
--- a/lib/hooks.php
+++ b/lib/hooks.php
@@ -209,13 +209,13 @@ class Hooks{
$app = new App();
$addressBooks = $app->getAddressBooksForUser();
- $base_url = \OCP\Util::linkTo('calendar', 'ajax/events.php').'?calendar_id=';
+ $baseUrl = \OCP\Util::linkTo('calendar', 'ajax/events.php').'?calendar_id=';
foreach ($addressBooks as $addressBook) {
$info = $addressBook->getMetaData();
$parameters['sources'][]
= array(
- 'url' => $base_url.'birthday_'. $info['backend'].'_'.$info['id'],
+ 'url' => $baseUrl . 'birthday_'. $info['backend'].'_' . $info['id'],
'backgroundColor' => '#cccccc',
'borderColor' => '#888',
'textColor' => 'black',
diff --git a/lib/utils/jsonserializer.php b/lib/utils/jsonserializer.php
index 60eee0f4..6391923d 100644
--- a/lib/utils/jsonserializer.php
+++ b/lib/utils/jsonserializer.php
@@ -139,7 +139,7 @@ class JSONSerializer {
* but we should look out for any problems.
*/
public static function serializeProperty(\Sabre\VObject\Property $property) {
- if(!in_array($property->name, Properties::$index_properties)) {
+ if(!in_array($property->name, Properties::$indexProperties)) {
return;
}
$value = $property->value;
@@ -188,7 +188,7 @@ class JSONSerializer {
);
// This cuts around a 3rd off of the json response size.
- if(in_array($property->name, Properties::$multi_properties)) {
+ if(in_array($property->name, Properties::$multiProperties)) {
$temp['checksum'] = substr(md5($property->serialize()), 0, 8);
}
foreach($property->parameters as $parameter) {
diff --git a/lib/utils/properties.php b/lib/utils/properties.php
index 9cebbbe1..94ae1a8e 100644
--- a/lib/utils/properties.php
+++ b/lib/utils/properties.php
@@ -48,14 +48,14 @@ Class Properties {
*
* @var array
*/
- public static $multi_properties = array('EMAIL', 'TEL', 'IMPP', 'ADR', 'URL');
+ public static $multiProperties = array('EMAIL', 'TEL', 'IMPP', 'ADR', 'URL');
/**
* Properties to index.
*
* @var array
*/
- public static $index_properties = array(
+ public static $indexProperties = array(
'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME',
'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO');
@@ -256,7 +256,7 @@ Class Properties {
. '(`userid`, `contactid`,`name`,`value`,`preferred`) VALUES(?,?,?,?,?)' );
}
foreach($vcard->children as $property) {
- if(!in_array($property->name, self::$index_properties)) {
+ if(!in_array($property->name, self::$indexProperties)) {
continue;
}
$preferred = 0;
diff --git a/templates/contacts.php b/templates/contacts.php
index 20d021de..ff2a1a8a 100644
--- a/templates/contacts.php
+++ b/templates/contacts.php
@@ -377,7 +377,7 @@
@@ -392,7 +392,7 @@
@@ -406,7 +406,7 @@
@@ -421,7 +421,7 @@
@@ -463,7 +463,7 @@
-->
@@ -473,7 +473,7 @@