summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bfecaba)
raw | patch | inline | side by side (parent: bfecaba)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 2 Aug 2005 11:46:23 +0000 (11:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 2 Aug 2005 11:46:23 +0000 (11:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1046 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history |
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 3c2f020b46bd2adf75f3783dfe6df2f6117dccce..26c5a86f727c7404269f31da44957b7f8e28b963 100644 (file)
}
// Save data
- if($save == true){
// Get phonehardware to setup sip entry
$ldap= $this->config->get_ldap_link();
}
$s_parameter = preg_replace("/\|$/","",$s_parameter);
}
+
+
+
+
+
+
// $SQL contains all queries
$SQL = array();
$key = key($this->phoneNumbers);
$sip_entry['callerid'] =$this->phoneNumbers[$key];
+
+
+
+ foreach($this->phoneNumbers as $phonekey => $val){
+ $ress = mysql_query( "SELECT * FROM ".$a_SETUP['EXT_TABLE']." WHERE ((exten='".$this->phoneNumbers[$phonekey]."') AND (app='hint'))
+ OR ((exten='".$this->phoneNumbers[$phonekey]."') AND (priority='hint'));");
+ while($atr = mysql_fetch_row($ress)){
+ $uid = preg_replace("/^.*\//","",$atr[5]);
+ if($uid != $this->uid){
+ $this->generate_error = sprintf(_("This telephone number '%s' is already assigned to userID '%s'"),$this->phoneNumbers[$key],$uid);
+ gosa_log(mysql_error());
+ return false;
+ }
+ }
+ }
+
+ if($save == true){
if(isset($this->parent->by_object['mailAccount']->mail)){
$mail = $this->parent->by_object['mailAccount']->mail;
}else{