diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc
index 2a6a14b129e6429443a151068182bf523b546e00..a88498d72c1075afe2761161b4d67b2a2b51b91c 100755 (executable)
/* Finish mac edit is triggered by the tabulator dialog, so
the user wants to save edited data. Check and save at this
point. */
- if (isset($_POST['edit_finish'])){
+ if ((isset($_POST['edit_finish'])) && (isset($this->macrotabs->config))){
/* Check tabs, will feed message array */
$this->macrotabs->last= $this->macrotabs->current;
}
/* User wants to edit data? */
- if ($s_action=="edit"){
+ if (($s_action=="edit") && (!isset($this->macrotabs->config))){
/* Get 'dn' from posted 'macrolists', must be unique */
$this->dn= $this->macros[$s_entry]['dn'];
}
/* Show tab dialog if object is present */
- if ($this->macrotabs){
+ if (($this->macrotabs) && (isset($this->macrotabs->config))){
$display= $this->macrotabs->execute();
/* Don't show buttons if tab dialog requests this */
/* NEW LIST MANAGMENT */
$listhead = "<div style='background:#F0F0F9;padding:5px;'>".
- " <input class='center' type='image' align='middle' src='images/list_back.png' title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'> ".
" <input class='center' type='image' src='images/list_root.png' align='middle' title='"._("Go to root department")."' name='dep_root' alt='"._("Root"). "'> ".
+ " <input class='center' type='image' align='middle' src='images/list_back.png' title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'> ".
" <input class='center' type='image' align='middle' src='images/list_home.png' title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'> ".
+ " <input class='center' type='image' src='images/list_reload.png' align='middle' title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'> ".
" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
" <input class='center' type='image' align='middle' src='images/list_new_macro.png' title='"._("Create new phone macro")."' alt='"._("New")."' name='user_new'> ".
" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
- _("Current base")." <select name='depselect' onChange='mainform.submit()'>$options</select>".
+ _("Base")." <select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
" <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ".
"</div>";
* We also need to search for the departments
* So we are able to navigate like in konquerer
*/
- $base2 = preg_replace("/ou=people,/i","",$base);
+ $peopleOU = get_people_ou();
+
+ if(empty($peopleOU)){
+ $base2 = $base;
+ }else{
+ $base2 = preg_replace("/".$peopleOU."/i","",$base);
+ }
$res3 = get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
TRUE, $base2, array("ou", "description"), TRUE);