Code

Some fixes for the asterisk objects
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Dec 2006 12:02:58 +0000 (12:02 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Dec 2006 12:02:58 +0000 (12:02 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5462 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/conference/class_divListConferences.inc
plugins/gofon/conference/class_phoneConferenceManagment.inc
plugins/gofon/phoneaccount/class_phoneAccount.inc

index 82e74f5bc2effdfeb1c54cd07eac594230a30794..22f0061dc41cc337faf8b8a1bb5c7b8ab6a363c0 100755 (executable)
@@ -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.="&nbsp;[".$conference['description'][0]."] &nbsp;";
+      }
+      $d_name .=$number;
+
 
       $title = " title='".preg_replace("/ /","&nbsp;",@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;'");
index 94e7b68b04598535e2f76b8a8134e73090c6a5a0..2a73feec52295093234b0baf3710f633633e0251 100644 (file)
@@ -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;
index 1826364acc173e280f7869b7eb4b15c7612f32aa..ce939e5a31f5e959e97ec4efe9a7f12f612161f5 100644 (file)
@@ -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");