Code

Applied patch from 'qnamic' #857
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 22 Feb 2010 09:50:29 +0000 (09:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 22 Feb 2010 09:50:29 +0000 (09:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15662 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc

index 96d61a66d905ef972edd453cacdfbdf3ef7c495e..a217529071a629fdd78460711bd43f3fb7d7560c 100644 (file)
@@ -469,7 +469,8 @@ class phoneAccount extends plugin
     $s_host         = NULL;                   // Contains host for Sip entry
     $s_qualify      = "yes";                  // Qualify entry
     $s_pin          = NULL;                   // Entry for secret
-    $s_type         = NULL;                   // Entry for phone type (friend , peer ..)
+    $s_type         = "friend";               // Entry for phone type (friend , peer ..)
+                                              // Set the default to the default of the db
 
     $sip_data_array = array();                // Contains complete sip entry, to generate SQL syntax
     $i_old_key      = false;                  // Contains index for first old phonenumber, to delete old entries corectly
@@ -514,6 +515,7 @@ class phoneAccount extends plugin
 
     /* Get phonehardware to setup sip entry  */
     $ldap         = $this->config->get_ldap_link();
+    $ldap->cd ($this->config->current['BASE']);
     $r_res        = $ldap->search("(&(objectClass=goFonHardware)(cn=".$this->goFonHardware."))", array('*'));
     $a_ldap_attrs = $ldap->fetch();
 
@@ -1438,7 +1440,7 @@ class phoneAccount extends plugin
     }
 
     if ($this->initially_was_account != $this->is_account || $this->is_modified){
-      $str = $this->generate_mysql_entension_entries(true);
+      $str = $this->generate_mysql_entension_entries(false);
       if(empty($str)){
         msg_dialog::display(_("Error"), $str, ERROR_DIALOG);
       }