mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:04:53 +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.'"';
|
//echo '<br>first total="'.$total.'"';
|
||||||
// Now, remove duplicate rows
|
// Now, remove duplicate rows
|
||||||
if (floor(phpversion()) == 4) {
|
//if (floor(phpversion()) == 4) {
|
||||||
$tmp = array_unique($ldap_fields);
|
// $tmp = array_unique($ldap_fields);
|
||||||
$ldap_fields = $tmp;
|
// $ldap_fields = $tmp;
|
||||||
} else {
|
// } else {
|
||||||
$ldap_fields = $this->asortbyindex($ldap_fields,'uidnumber');
|
$ldap_fields = $this->asortbyindex($ldap_fields,'uidnumber');
|
||||||
reset($ldap_fields);
|
reset($ldap_fields);
|
||||||
if (count($ldap_fields) > 0) {
|
if (count($ldap_fields) > 0) {
|
||||||
@ -380,7 +380,7 @@
|
|||||||
}
|
}
|
||||||
$ldap_fields = $uniquearray;
|
$ldap_fields = $uniquearray;
|
||||||
}
|
}
|
||||||
} // end version check
|
// } // end version check
|
||||||
|
|
||||||
$this->total_records = count($ldap_fields);
|
$this->total_records = count($ldap_fields);
|
||||||
//echo '<br>total="'.$this->total_records.'"';
|
//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)) {
|
if($ncat_id || ($ncat_id==0)) {
|
||||||
$cat_id = $ncat_id;
|
$cat_id = $ncat_id;
|
||||||
}
|
}
|
||||||
|
if ($cat_id=='') {
|
||||||
|
$cat_id = $phpgw_info["user"]["preferences"]["addressbook"]["default_category"];
|
||||||
|
}
|
||||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["autosave_category"]) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["autosave_category"]) {
|
||||||
$phpgw->preferences->delete("addressbook","default_category");
|
$phpgw->preferences->delete("addressbook","default_category");
|
||||||
$phpgw->preferences->add("addressbook","default_category",$cat_id);
|
$phpgw->preferences->add("addressbook","default_category",$ncat_id);
|
||||||
$phpgw->preferences->save_repository();
|
|
||||||
}
|
}
|
||||||
|
$phpgw->preferences->save_repository();
|
||||||
|
|
||||||
$extrafields = array(
|
$extrafields = array(
|
||||||
"ophone" => "ophone",
|
"ophone" => "ophone",
|
||||||
|
Loading…
Reference in New Issue
Block a user