mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
Fix setting of prefs for default cat, remove phpversion check
This commit is contained in:
parent
1e1b56cc8b
commit
f6636247c7
@ -359,10 +359,10 @@
|
||||
|
||||
//echo '<br>first total="'.$total.'"';
|
||||
// Now, remove duplicate rows
|
||||
if (floor(phpversion()) == 4) {
|
||||
$tmp = array_unique($ldap_fields);
|
||||
$ldap_fields = $tmp;
|
||||
} else {
|
||||
//if (floor(phpversion()) == 4) {
|
||||
// $tmp = array_unique($ldap_fields);
|
||||
// $ldap_fields = $tmp;
|
||||
// } else {
|
||||
$ldap_fields = $this->asortbyindex($ldap_fields,'uidnumber');
|
||||
reset($ldap_fields);
|
||||
if (count($ldap_fields) > 0) {
|
||||
@ -380,7 +380,7 @@
|
||||
}
|
||||
$ldap_fields = $uniquearray;
|
||||
}
|
||||
} // end version check
|
||||
// } // end version check
|
||||
|
||||
$this->total_records = count($ldap_fields);
|
||||
//echo '<br>total="'.$this->total_records.'"';
|
||||
|
@ -41,18 +41,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
if ($cat_id=='') {
|
||||
$cat_id = $phpgw_info["user"]["preferences"]["addressbook"]["default_category"];
|
||||
}
|
||||
if($ncat_id || ($ncat_id==0)) {
|
||||
$cat_id = $ncat_id;
|
||||
}
|
||||
|
||||
if ($cat_id=='') {
|
||||
$cat_id = $phpgw_info["user"]["preferences"]["addressbook"]["default_category"];
|
||||
}
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["autosave_category"]) {
|
||||
$phpgw->preferences->delete("addressbook","default_category");
|
||||
$phpgw->preferences->add("addressbook","default_category",$cat_id);
|
||||
$phpgw->preferences->save_repository();
|
||||
$phpgw->preferences->add("addressbook","default_category",$ncat_id);
|
||||
}
|
||||
$phpgw->preferences->save_repository();
|
||||
|
||||
$extrafields = array(
|
||||
"ophone" => "ophone",
|
||||
|
Loading…
Reference in New Issue
Block a user