From: hickert Date: Tue, 16 Aug 2005 11:25:10 +0000 (+0000) Subject: Added Conferences X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=72a8082692a8618ae50b19711d7606b68efe4ec9;p=gosa.git Added Conferences git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1151 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index 2d44350b4..b2880643e 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -21,25 +21,28 @@ class conference extends plugin { /* department attributes */ - var $cn= ""; - var $description= ""; - var $base =""; - - - var $goFonPIN = ""; - - var $goFonConferenceOption_D = ""; - var $goFonConferenceOption_r = ""; - var $goFonConferenceOption_M = ""; - var $goFonConferenceOption_s = ""; - var $goFonConferenceOption_i = ""; - var $goFonConferenceOption_c = ""; - var $goFonConferenceOption_P = ""; + var $cn = ""; + var $description = ""; + var $base = ""; + var $ou = ""; + var $goFonPIN = ""; + + var $goFonConferenceOption = ""; + var $goFonConferenceOption_D = ""; // Set PIN + var $goFonConferenceOption_r = ""; // record Conference + var $goFonConferenceOption_M = ""; // Play Music opn hold + var $goFonConferenceOption_s = ""; // activate menu + var $goFonConferenceOption_i = ""; // announce new and leaving user + var $goFonConferenceOption_c = ""; // Count User + var $goFonConferenceOption_P = ""; // Conference Type, no PIN/PIN var $goFonConferenceOptionFormat = ""; var $goFonConferenceOptionLifetime = ""; var $goFonConferenceOptionNumber = ""; - + + var $old_tele_number = false; + var $generate_error = ""; + /* Headpage attributes */ var $last_dep_sorting= "invalid"; var $departments= array(); @@ -49,67 +52,69 @@ class conference extends plugin "goFonConferenceOption_M","goFonConferenceOption_s","goFonConferenceOption_i","goFonConferenceOption_c", "goFonConferenceOption_P","goFonConferenceOptionFormat","goFonConferenceOptionLifetime","goFonConferenceOptionNumber"); - var $objectclasses= array("top", "gosaDepartment", "organizationalUnit"); + var $objectclasses= array("top", "goFonConference"); function conference ($config, $dn) { - plugin::plugin($config, $dn); - $this->is_account= TRUE; - $this->ui= get_userinfo(); - $this->dn= $dn; - $this->orig_dn= $dn; - $this->config= $config; - - /* Set base */ + plugin::plugin($config, $dn); + $this->is_account = TRUE; + $this->ui = get_userinfo(); + $this->dn = $dn; + $this->orig_dn = $dn; + $this->config = $config; + + /* Set base */ if ($this->dn == "new"){ - $ui= get_userinfo(); - if(isset($_SESSION['depfilter']['depselect'])){ - $this->base = $_SESSION['depfilter']['depselect']; - }else{ - $this->base= dn2base($ui->dn); - } - } else { - $this->base= preg_replace ("/^[^,]+,/", "", $this->dn); - } + $ui= get_userinfo(); + if(isset($_SESSION['conferencefilter']['depselect'])){ + $this->base = $_SESSION['conferencefilter']['depselect']; + }else{ + $this->base= dn2base($ui->dn); + } + } else { + $this->base= preg_replace ("/^[^,]+,/", "", $this->dn); + } + + + /* Parse Options ... + * Parameter|Lifetime|number + */ + if($this->dn!="new"){ + $tmp1= split("\|",$this->attrs['goFonConferenceOption'][0]); + + for($i = 0 ; $i < strlen($tmp1[0]);$i++){ + $varname = "goFonConferenceOption_".$tmp1[0][$i]; + $this->$varname = $tmp1[0][$i]; + } + + $this->goFonConferenceOptionLifetime = $tmp1[1]; + $this->goFonConferenceOptionNumber = $tmp1[2]; + $this->old_tele_number = $tmp1[2]; + } } function execute() { - /* Reload departments */ - $this->config->departments= get_departments($this->dn); + $this->config->departments = get_departments($this->dn); $this->config->make_idepartments(); $smarty= get_smarty(); - $smarty->assign("goFonConferenceOptions", array("P"=>"Conference ",""=>"Conference without PIN")); - $smarty->assign("goFonConferenceOptionFormats", array("P"=>"Conference ",""=>"Conference without PIN")); - $smarty->assign("goFonConferenceOption" ,$this->goFonConferenceOption_P); + $smarty->assign("goFonConferenceOptions", array("P"=>"Conference ",""=>"Conference without PIN")); + $smarty->assign("goFonConferenceOptionFormats", array("wav"=>"Wave","gsm"=>"GSM","wav49"=>"Wave49")); + $smarty->assign("goFonConferenceOption", $this->goFonConferenceOption_P); foreach ($this->attributes as $val){ $smarty->assign("$val", $this->$val); $smarty->assign("$val"."ACL", chkacl($this->acl, "$val")); - if($this->$val){ + if(!$this->$val){ $smarty->assign($val."CHK", ""); }else{ $smarty->assign($val."CHK", " checked "); } } - $smarty->assign("bases", $this->config->idepartments); - $smarty->assign("base_select", $this->base); return($smarty->fetch (get_template_path('generic.tpl', TRUE))); } - function clear_fields() - { - $this->dn= ""; - $this->base= ""; - $this->acl= "#none#"; - - foreach ($this->attributes as $val){ - $this->$val= ""; - } - } - - function remove_from_parent() { $ldap= $this->config->get_ldap_link(); @@ -124,14 +129,17 @@ class conference extends plugin /* Save data to object */ function save_object() { - if (isset($_POST['base'])){ - plugin::save_object(); - - /* Save base, since this is no LDAP attribute */ - if (chkacl($this->acl, "create") == ""){ - $this->base= $_POST['base']; - } - } + plugin::save_object(); + if(isset($_POST['cn'])){ + foreach(array("goFonConferenceOption_D","goFonConferenceOption_r","goFonConferenceOption_M","goFonConferenceOption_s", + "goFonConferenceOption_i","goFonConferenceOption_c","goFonConferenceOption_P") as $attrs){ + if(isset($_POST[$attrs])){ + $this->$attrs = $_POST[$attrs]; + }else{ + $this->$attrs = false; + } + } + } } @@ -139,48 +147,161 @@ class conference extends plugin function check() { $message= array(); + + if(empty($this->cn)){ + $message[] =_("Please enter a name for the conference."); + } + + if(!is_numeric($this->goFonConferenceOptionNumber)){ + $message[] =_("Only numeric chars are allowed in Number field."); + } - /* Permissions for that base? */ - $this->dn= "ou=$this->ou,".$this->base; - $acl= get_permissions ($this->dn, $this->ui->subtreeACL); - $acl= get_module_permission($acl, "department", $this->dn); - if (chkacl($acl, "create") != ""){ - $message[]= _("You have no permissions to create a department on this 'Base'."); - } + if(!is_numeric($this->goFonConferenceOptionLifetime)){ + $message[] =_("Only numbers are allowed in Lifetime."); + } + + $this->SQL_remove_me(false); + $this->SQL_add_me(false); + + if(!empty($this->generate_error)){ + $message[]=$this->generate_error; + $this->generate_error=""; + } - /* Check for presence of this department */ - $ldap= $this->config->get_ldap_link(); - $attrs= $ldap->cat ($this->dn); - if ($this->orig_dn == "new" && !($attrs === FALSE)){ - $message[]= _("Department with that 'Name' already exists."); - } elseif ($this->orig_dn != $this->dn && !($attrs === FALSE)){ - $message[]= _("Department with that 'Name' already exists."); - } + return $message; + } - /* All required fields are set? */ - if ($this->ou == ""){ - $message[]= _("Required field 'Name' is not set."); - } - if ($this->description == ""){ - $message[]= _("Required field 'Description' is not set."); - } - /* Validate and modify - or: spaghetti rules! */ - if ($this->ou == "incoming"){ - $message[]= _("The field 'Name' contains the reserved word 'incoming'.". - " Please choose another name."); - } - if (preg_match ('/[,#+:=>\\\\]/', $this->ou)){ - $message[]= _("The field 'Name' contains invalid characters."); - } - if (!is_phone_nr($this->telephoneNumber)){ - $message[]= _("The field 'Phone' contains an invalid phone number."); - } - if (!is_phone_nr($this->facsimileTelephoneNumber)){ - $message[]= _("The field 'Fax' contains an invalid phone number."); - } + function SQL_add_me($save){ + // Get Configuration for Mysql database Server + $a_SETUP = $_SESSION['config']->data['SERVERS']['FON']; + + // Connect to DB server + $r_con = @mysql_connect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']); + + // Check if we are connected correctly + if(!$r_con){ + $this->generate_error = sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), + $a_SETUP['SERVER'],$a_SETUP['LOGIN']); + gosa_log(mysql_error()); + return false; + } + + // Select database for Extensions + $db = @mysql_select_db($a_SETUP['DB'],$r_con); + + // Test if we have the database selected correctly + if(!$db){ + $this->generate_error = sprintf(_("Can't select database %s on %s."),$a_SETUP['DB'],$a_SETUP['SERVER']); + gosa_log(mysql_error()); + return false; + } + + if((!empty($this->goFonConferenceOptionNumber))&&($save==true)){ + + $EXT=array(); + + $parameter =""; + foreach(array("goFonConferenceOption_D","goFonConferenceOption_r","goFonConferenceOption_M","goFonConferenceOption_s", + "goFonConferenceOption_i","goFonConferenceOption_c","goFonConferenceOption_P") as $attrs){ + $parameter .= $this->$attrs; + } + + $i=1; + $context="GOsa"; + // Set Language to German + $EXT[$i]['exten'] =$this->goFonConferenceOptionNumber; + $EXT[$i]['context'] = $context; + $EXT[$i]['priority']= $i; + $EXT[$i]['app'] ="SetLanguage"; + $EXT[$i]['appdata'] ="de"; + $i++; + + if($this->goFonConferenceOption_r == "r"){ + + // Recordingformat for conference + $EXT[$i]['exten'] =$this->goFonConferenceOptionNumber; + $EXT[$i]['context'] =$context; + $EXT[$i]['priority']= $i; + $EXT[$i]['app'] ="Setvar"; + $EXT[$i]['appdata'] ="MEETME_RECORDINGFORMAT=".$this->goFonConferenceOptionFormat; + $i++; + + } + + // Answer Call + $EXT[$i]['exten'] =$this->goFonConferenceOptionNumber; + $EXT[$i]['context'] =$context; + $EXT[$i]['priority']=$i; + $EXT[$i]['app'] ="answer"; + $EXT[$i]['appdata'] =""; + $i++; + + // Start Conference + $EXT[$i]['exten'] =$this->goFonConferenceOptionNumber; + $EXT[$i]['context'] =$context; + $EXT[$i]['priority']=$i; + $EXT[$i]['app'] ="MeetMe"; + $EXT[$i]['appdata'] =$this->goFonConferenceOptionNumber."|".$parameter."|".$this->goFonPIN; + + $SQL=array(); + + foreach($EXT as $keytop => $valtop){ + $s_keys = ""; + $s_values = ""; + foreach($valtop as $key=>$val){ + $s_keys .="`".$key."`,"; + $s_values .="'".$val."',"; + } + $s_keys =preg_replace("/\,$/","",$s_keys); + $s_values =preg_replace("/\,$/","",$s_values); + $SQL[]="INSERT INTO ".$a_SETUP['EXT_TABLE']." (".$s_keys.") VALUES (".$s_values.");"; + } + foreach($SQL as $sqlsyn){ + mysql_query($sqlsyn); + } + } + + + + return(true); + } - return $message; + function SQL_remove_me($save){ + + if($this->old_tele_number){ + // Get Configuration for Mysql database Server + $a_SETUP = $_SESSION['config']->data['SERVERS']['FON']; + + // Connect to DB server + $r_con = @mysql_connect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']); + + // Check if we are connected correctly + if(!$r_con){ + $this->generate_error = sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), + $a_SETUP['SERVER'],$a_SETUP['LOGIN']); + gosa_log(mysql_error()); + return false; + } + + // Select database for Extensions + $db = @mysql_select_db($a_SETUP['DB'],$r_con); + + // Test if we have the database selected correctly + if(!$db){ + $this->generate_error = sprintf(_("Can't select database %s on %s."),$a_SETUP['DB'],$a_SETUP['SERVER']); + gosa_log(mysql_error()); + return false; + } + + $SQL = "DELETE FROM ".$a_SETUP['EXT_TABLE']." WHERE (exten= '".$this->old_tele_number."') OR (exten='".$this->goFonConferenceOptionNumber."')"; + + if($save){ + @mysql_query($SQL); + } + + }//ENDE old num availiable ... + return(true); } @@ -189,7 +310,24 @@ class conference extends plugin { plugin::save(); - /* Write back to ldap */ + $this->SQL_remove_me(true); + $this->SQL_add_me(true); + + $this->attrs['goFonConferenceOption']=""; + foreach(array("goFonConferenceOption_D","goFonConferenceOption_r","goFonConferenceOption_M","goFonConferenceOption_s", + "goFonConferenceOption_i","goFonConferenceOption_c","goFonConferenceOption_P","goFonConferenceOptionFormat") as $attrs){ + $this->attrs['goFonConferenceOption'] .= $this->$attrs; + unset($this->attrs[$attrs]); + } + + $this->attrs['goFonConferenceOption'].="|".$this->goFonConferenceOptionLifetime; + unset($this->attrs['goFonConferenceOptionLifetime']); + + $this->attrs['goFonConferenceOption'].="|".$this->goFonConferenceOptionNumber; + unset($this->attrs['goFonConferenceOptionNumber']); + + + /* Write back to ldap */ $ldap= $this->config->get_ldap_link(); $ldap->cat($this->dn); $a= $ldap->fetch(); @@ -209,4 +347,5 @@ class conference extends plugin } +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc index f2e0bb69e..239e76605 100644 --- a/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -22,7 +22,7 @@ require "tabs_conference.inc"; class phoneConferenceManagment extends plugin { /* Definitions */ - var $plHeadline = "Phone Conference Rooms"; + var $plHeadline = "Phone conference"; var $plDescription = "Managment "; /* CLI vars */ @@ -38,12 +38,25 @@ class phoneConferenceManagment extends plugin var $objectclasses = array(); var $conftab = false; + var $departments =array(); + /* Initialise Class */ function phoneConferenceManagment ($config, $ui) { $this->ui = $ui; $this->dn = ""; $this->config = $config; + + /* Get global filter config */ + if (!isset($_SESSION["conferencefilter"])){ + $base= get_base_from_people($ui->dn); + $conferencefilter= array( + "depselect" => $base, + "regex" => "*"); + $_SESSION["conferencefilter"] = $conferencefilter; + } + + } /* Execute class and display something */ @@ -55,19 +68,173 @@ class phoneConferenceManagment extends plugin $display = ""; $s_action = ""; // Will contain an action, like del or edit $s_entry = ""; // The entry name for edit delete -... + $conferencefilter = $_SESSION["conferencefilter"]; + + /* Start for New List Managment */ + if(isset($_GET['act'])&&($_GET['act']=="dep_open")){ + $s_action="open"; + $s_entry = base64_decode($_GET['dep_id']); + $conferencefilter['depselect']= "".$this->config->departments[trim($s_entry)]; + } - foreach($_POST as $post => $key){ - if(preg_match("/.*new.*/i",$post)){ + foreach($_POST as $key => $post){ + if(preg_match("/.*new.*/i",$key)){ $s_action = "new"; + // Post for delete + }elseif(preg_match("/conf_del.*/",$key)){ + $s_action = "del"; + $s_entry = preg_replace("/conf_".$s_action."_/i","",$key); + $s_entry = preg_replace("/_.*$/","",$s_entry); + // Post for edit + }elseif(preg_match("/conf_edit_.*/",$key)){ + $s_action="edit"; + $s_entry = preg_replace("/conf_".$s_action."_/i","",$key); + $s_entry = preg_replace("/_.*$/","",$s_entry); + }elseif(preg_match("/dep_back.*/i",$key)){ + $s_action="back"; + }elseif(preg_match("/dep_home.*/i",$key)){ + $s_action="home"; + }elseif(preg_match("/dep_root.*/i",$key)){ + $s_action="root"; + } + } + + if((isset($_GET['act']))&&($_GET['act']=="edit_entry")){ + $s_action = "edit"; + $s_entry = $_GET['id']; + } + + /* Department changed? */ + if(isset($_POST['depselect']) && $_POST['depselect']){ + $conferencefilter['depselect']= $_POST['depselect']; + } + + /* Homebutton is posted */ + if($s_action=="home"){ + $conferencefilter['depselect']=(preg_replace("/^[^,]+,/","",$this->ui->dn)); + $conferencefilter['depselect']=(preg_replace("/^[^,]+,/","",$conferencefilter['depselect'])); + } + + if($s_action=="root"){ + $conferencefilter['depselect']=($this->config->current['BASE']); + } + + /* If Backbutton is Posted */ + if($s_action=="back"){ + $base_back = preg_replace("/^[^,]+,/","",$conferencefilter['depselect']); + $base_back = convert_department_dn($base_back); + + if(isset($this->config->departments[trim($base_back)])){ + $conferencefilter['depselect']= $this->config->departments[trim($base_back)]; + }else{ + $conferencefilter['depselect']= $this->config->departments["/"]; } } - + + register_global("conferencefilter",$conferencefilter); + $this->reload(); + + /* Reset requested? */ + if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){ + if (isset($this->conftab)){ + del_lock ($this->conftab->dn); + unset ($this->conftab); + } + $this->conftab= NULL; + $this->lognames= array();; + $this->cn= ""; + unset ($_SESSION['objectinfo']); + } + + /* Delete Entry if Posted action (s_action) == del + * The entry which will be deleted is defined in $s_entry + */ + if ($s_action =="del"){ + $this->dn= $this->conferences[$s_entry]['dn']; + + /* Check locking */ + if (($conf= get_lock($this->dn)) != ""){ + $_SESSION['dn']= $this->dn; + return(gen_locked_message($conf, $this->dn)); + } else { + add_lock ($this->dn, $this->ui->dn); + $smarty->assign("info", sprintf(_("You're about to delete the whole LDAP subtree placed under '%s'."), $this->dn)); + $display.= $smarty->fetch (get_template_path('remove.tpl', TRUE)); + return ($display); + } + } + + /* If department deletion is accepted ... + * Finally delete department + */ + if (isset($_POST['delete_department_confirm'])){ + $acl= get_permissions ($this->dn, $this->ui->subtreeACL); + $acl= get_module_permission($acl, "goFonConference", $this->dn); + if (chkacl($acl, "all") == ""){ + $this->remove_from_parent(); + gosa_log ("Department object'".$this->dn."' has been removed"); + $this->reload (); + } else { + print_red (_("You have no permission to remove this department.")); + } + } + + /* Edit Entry if Posted action (s_action) == edit + * The entry which will be edited is defined in $s_entry + */ + if ($s_action=="edit"){ + + $this->dn= $this->conferences[$s_entry]['dn']; + + if (($conf= get_lock($this->dn)) != ""){ + return(gen_locked_message ($conf, $this->dn)); + } + + /* Lock the current entry, so everyone will get the above dialog */ + add_lock ($this->dn, $this->ui->dn); + + /* Set up the users ACL's for this 'dn' */ + $this->acl= get_permissions ($this->dn, $this->ui->subtreeACL); + + /* Register conftab to trigger edit dialog */ + $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn); + $this->conftab->set_acl(array(":all")); + $_SESSION['objectinfo']= $this->dn; + } + if($s_action == "new"){ $this->dn= "new"; $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn); $this->conftab->set_acl(array(':all')); } - + + if (isset($_POST['edit_finish'])){ + + /* Check tabs, will feed message array */ + $this->conftab->last= $this->conftab->current; + $this->conftab->save_object(); + $message= $this->conftab->check(); + + if (count($message) == 0){ + if($this->conftab->save() == 1){ + gosa_log ("goFonConference object '".$this->dn."' saving failed."); + return; + } + gosa_log ("goFonConference object '".$this->dn."' has been saved"); + + if ($this->dn != "new"){ + del_lock ($this->dn); + } + + $this->conftab->save (); + unset ($this->conftab); + $this->conftab= NULL; + unset ($_SESSION['objectinfo']); + } else { + show_errors($message); + } + } + /* if edit or new, show dialog */ if($this->conftab){ $display= $this->conftab->execute(); @@ -88,8 +255,32 @@ class phoneConferenceManagment extends plugin   "; - $actions = ""; - $actions.= ""; + + + + $options= ""; + foreach ($this->config->idepartments as $key => $value){ + if ($conferencefilter['depselect'] == $key){ + $options.= ""; + } else { + $options.= ""; + } + } + + $listhead = "
". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + _("Current base")." ". + "  ". + "
"; + + + $actions = ""; + $actions.= ""; $linkopen= "%s"; /* Set Header */ @@ -101,10 +292,36 @@ class phoneConferenceManagment extends plugin array("string" =>_("Name / nummer")), array("string" =>_("Actions"), "attach" => "style='text-align: right;border:none'"))); - foreach($this->conferences as $conference ){ - $field1 = array("string"=>""); - $field2 = array("string"=>$conference['cn'][0]); - $field3 = array("string"=>""); + /* Insert departments in divlist*/ + foreach($this->departments as $key=> $val){ + + if(!isset($this->config->departments[trim($key)])){ + $this->config->departments[trim($key)]=""; + } + + $non_empty=""; + $keys= str_replace("/","\/",$key); + foreach($this->config->departments as $keyd=>$vald ){ + if(preg_match("/".$keys."\/.*/",$keyd)){ + $non_empty="full"; + } + } + + $field1 = array("string" => "department","attach"=>"style='width:22px;'"); + $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val)); + $field3 = array("string" => " ", "attach" => "style='border:none;width:60px;'"); + + + $divlist->AddEntry(array($field1,$field2,$field3)); + } + + $userimg = "User"; + $editlink = "%s"; + + foreach($this->conferences as $conferencekey => $conference ){ + $field1 = array("string"=>sprintf($userimg,_("Conference"))); + $field2 = array("string"=>sprintf($editlink,$conferencekey,$conference['cn'][0])); + $field3 = array("string"=>preg_replace("/%KEY%/",$conferencekey,$actions)); $divlist->AddEntry(array($field1,$field2,$field3)); } @@ -127,7 +344,40 @@ class phoneConferenceManagment extends plugin function reload() { $base = "dc=gonicus,dc=de"; - $this->conferences= get_list($this->ui->subtreeACL, "(objectClass=goFonAccount)",TRUE, $base, array("*"), TRUE); + + $conferencefilter = $_SESSION["conferencefilter"]; + $base = $conferencefilter['depselect']; + $regex = $conferencefilter['regex']; + + $this->conferences= get_list($this->ui->subtreeACL, "(objectClass=goFonConference)",TRUE, $base, array("*"), TRUE); + + /* NEW LIST MANAGMENT + * We also need to search for the departments + * So we are able to navigate like in konquerer + */ + $base2 = preg_replace("/ou=people,/i","",$base); + + $res3 = get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))", + TRUE, $base2, array("ou", "description"), TRUE); + + $this->departments= array(); + + $tmp = array(); + foreach ($res3 as $value){ + $tmp[strtolower($value['dn']).$value['dn']]=$value; + } + ksort($tmp); + foreach($tmp as $value){ + if($value["description"][0]!=".."){ + $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; + }else{ + $this->departments[$value['dn']]=$value["description"][0]; + } + } + /* END NEW LIST MANAGMENT + */ + + } diff --git a/plugins/gofon/conference/generic.tpl b/plugins/gofon/conference/generic.tpl index 3c7e55a2d..9f8cc03b7 100644 --- a/plugins/gofon/conference/generic.tpl +++ b/plugins/gofon/conference/generic.tpl @@ -33,10 +33,10 @@
- {$must} + {$must} - + {html_options options=$goFonConferenceOptions selected=$goFonConferenceOption_P} @@ -79,7 +79,7 @@ diff --git a/plugins/gofon/conference/tabs_conference.inc b/plugins/gofon/conference/tabs_conference.inc index a3497db29..ce623065d 100644 --- a/plugins/gofon/conference/tabs_conference.inc +++ b/plugins/gofon/conference/tabs_conference.inc @@ -6,8 +6,8 @@ class conferencetabs extends tabs function conferencetabs($config, $data, $dn) { - tabs::tabs($config, $data, $dn); - $this->base= $this->by_object['conference']->base; + tabs::tabs($config, $data, $dn); + $this->base= $this->by_object['conference']->base; } function check() @@ -19,7 +19,7 @@ class conferencetabs extends tabs function save() { $baseobject= $this->by_object['conference']; - $new_dn= 'ou='.$baseobject->ou.','.$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.','.$baseobject->base; if ($this->dn != $new_dn && $this->dn != "new"){ $baseobject->recursive_move($this->dn, $new_dn);
- + {t}PIN vorgeben{/t}