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

Contacts: ksort on array values

This commit is contained in:
Thomas Tanghus 2013-04-08 22:39:22 +02:00
parent 2b03184548
commit e819c3462d

View File

@ -282,6 +282,11 @@ $this->create('contacts_contact_save_property', 'addressbook/{user}/{backend}/{a
if(!$name) { if(!$name) {
bailOut(App::$l10n->t('Property name is not set.')); bailOut(App::$l10n->t('Property name is not set.'));
} }
if(is_array($value)) {
// NOTE: Important, otherwise the compound value will be
// set in the order the fields appear in the form!
ksort($value);
}
if(!$checksum && in_array($name, Utils\Properties::$multi_properties)) { if(!$checksum && in_array($name, Utils\Properties::$multi_properties)) {
bailOut(App::$l10n->t('Property checksum is not set.')); bailOut(App::$l10n->t('Property checksum is not set.'));
} elseif($checksum && in_array($name, Utils\Properties::$multi_properties)) { } elseif($checksum && in_array($name, Utils\Properties::$multi_properties)) {