From 80b39b8394c5656366eb9505c80ce01f7e1456e9 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 22 Dec 2006 12:02:58 +0000 Subject: [PATCH] Some fixes for the asterisk objects git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5462 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/conference/class_divListConferences.inc | 11 +++++++++-- .../conference/class_phoneConferenceManagment.inc | 2 +- plugins/gofon/phoneaccount/class_phoneAccount.inc | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index 82e74f5bc..22f0061dc 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -125,15 +125,22 @@ class divListConference extends MultiSelectWindow $cn =""; } + /* Create the display name */ + $d_name = $conference['cn'][0]; + if(isset($conference['description'][0])){ + $d_name.=" [".$conference['description'][0]."]  "; + } + $d_name .=$number; + $title = " title='".preg_replace("/ /"," ",@LDAP::fix($data['dn']))."' "; $a_field1 = array("string"=>sprintf($userimg,_("Conference")), "attach" => $title." style='text-align:center;width:20px;'"); if(($this->parent->acl=="#all#")||(($this->parent->ui->dn==$conference['goFonConferenceOwner'][0])&&(chkacl($this->parent->acl,"goFonConferenceOwner")==""))){ - $a_field2 = array("string"=>sprintf($editlink,$conferencekey,$conference['cn'][0].$number), "attach" => $title." style=''"); + $a_field2 = array("string"=>sprintf($editlink,$conferencekey,$d_name ), "attach" => $title." style=''"); }else{ - $a_field2 = array("string"=>$conference['cn'][0].$number, "attach" => $title." style=''"); + $a_field2 = array("string"=>$d_name , "attach" => $title." style=''"); } $a_field3 = array("string"=> $cn, "attach" => $title." style='width:200px;'"); $a_field4 = array("string"=> $pin, "attach" => $title." style='width:50px;'"); diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc index 94e7b68b0..2a73feec5 100644 --- a/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -273,7 +273,7 @@ class phoneConferenceManagment extends plugin $Regex = $this->DivListConference->Regex; $Flags = GL_SIZELIMIT ; $Filter = "(&(|(cn=".$Regex.")(description=".$Regex."))(objectClass=goFonConference))"; - $Attrs = array("cn","goFonConferenceOwner","goFonPIN","telephoneNumber"); + $Attrs = array("cn","goFonConferenceOwner","goFonPIN","telephoneNumber","description"); if($SubSearch){ $Flags |= GL_SUBSEARCH; diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index 1826364ac..ce939e5a3 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -83,7 +83,7 @@ class phoneAccount extends plugin $this->goFonHomeServers = $_SESSION['config']->data['SERVERS']['FON']; /* Set default server */ - if($this->dn == "new"){ + if(empty($this->goFonHomeServer) || $this->goFonHomeServer == "0"){ $this->goFonHomeServer = $this->goFonHomeServers[0]['DN']; } @@ -141,7 +141,7 @@ class phoneAccount extends plugin * Search for all Marcos that are visible and create * an array with name and parameters */ - $ldap->search("((objectClass=goFonMacro)(goFonMacroVisible=1))", array("*")); + $ldap->search("(&(objectClass=goFonMacro)(goFonMacroVisible=1))", array("*")); /* Add none for no macro*/ $this->macros['none']=_("no macro"); -- 2.30.2