summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 079af86)
raw | patch | inline | side by side (parent: 079af86)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Dec 2006 10:07:15 +0000 (10:07 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Dec 2006 10:07:15 +0000 (10:07 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5454 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 099a16f5ec8137be403f917f49bd28c2db295699..dd4bc090e3a0b9ca2bd67cc5d49dfbc615aed219 100644 (file)
$this->init_HomeServer = $this->goFonHomeServer;
/* get config */
+ if(!isset($this->goFonHomeServers[$this->goFonHomeServer])){
+ print_red(sprintf(_("The specified goFonHomeServer '%s' is not available in GOsa server configuration. Saving this account will create a new entry on the server '%s'. Use cancel if you do not want to create a new entry ignoring old accounts."),$this->goFonHomeServer, $this->goFonHomeServers[0]['DN']));
+
+ $this->goFonHomeServer = $this->goFonHomeServers[0]['DN'];
+ $this->init_HomeServer = $this->goFonHomeServers[0]['DN'];
+ }
$cur_cfg = $this->goFonHomeServers[$this->goFonHomeServer];
$r_con = @mysql_pconnect($cur_cfg['SERVER'],$cur_cfg['LOGIN'],$cur_cfg['PASSWORD']);
if(!$r_con){
- $this->generate_error = sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."),
- $cur_cfg['SERVER'],$cur_cfg['LOGIN']);
+ print_red( sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."),
+ $cur_cfg['SERVER'],$cur_cfg['LOGIN']));
gosa_log(mysql_error());
return false;
}
$db = @mysql_select_db($cur_cfg['DB'],$r_con);
if(!$db){
- $this->generate_error = sprintf(_("Can't select database %s on %s."),$cur_cfg['DB'],$cur_cfg['SERVER']);
+ print_red(sprintf(_("Can't select database %s on %s."),$cur_cfg['DB'],$cur_cfg['SERVER']));
gosa_log(mysql_error());
return false;
}
-
+
$first = false;
foreach($this->phoneNumbers as $key => $val){
if(!$first){
$this->generate_error = sprintf(
_("The MySQL Server '%s' isn't reachable as user '%s'. Abort saving entries to keep the database consistent, check GOsa log for mysql error."),
$a_New['SERVER'],$a_New['LOGIN']);
- gosa_log(mysql_error($new_connection));
+ gosa_log(@mysql_error($new_connection));
return false;
}
$new_database = @mysql_select_db($a_New['DB'],$new_connection);
$this->generate_error = sprintf(
_("Can't select database %s on %s. Abort saving entries to keep the database consistent, check GOsa log for mysql error."),
$a_New['DB'],$a_New['SERVER']);
- gosa_log(mysql_error($new_connection));
+ gosa_log( @mysql_error($new_connection));
return false;
}
$this->generate_error = sprintf(
_("The old MySQL home server '%s' isn't reachable as user '%s'. Abort saving entries to keep the database consistent, check GOsa log for mysql error."),
$a_Remove['SERVER'],$a_Remove['LOGIN']);
- gosa_log(mysql_error($old_connection));
+ gosa_log(@mysql_error($old_connection));
return false;
}
$old_database = @mysql_select_db($a_Remove['DB'],$old_connection);
$this->generate_error = sprintf(
_("Can't select database %s on %s. Abort saving entries to keep the database consistent, check GOsa log for mysql error."),
$a_Remove['DB'],$a_Remove['SERVER']);
- gosa_log(mysql_error($old_connection));
+ gosa_log(@mysql_error($old_connection));
return false;
}
}
$EXT[$i]['exten'] = $s_telenums;
$EXT[$i]['priority']= "Hint";
$EXT[$i]['app'] = 'SIP/'.$this->uid;
- $EXT[$i]['appdata'] = '';
$i ++;
/* SetCID */
//$EXT[$i]['context'] = 'GOsa';