summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc3f5c3)
raw | patch | inline | side by side (parent: cc3f5c3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 9 Mar 2009 13:15:49 +0000 (13:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 9 Mar 2009 13:15:49 +0000 (13:15 +0000) |
-Added some more checks
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13514 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13514 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history |
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc
index 54048a4f6cbc8c1fe01bceee530292d7100e1f86..8cbd9e85e707c220ea0bafbc9bf6d8d105aa89a1 100644 (file)
$this->a_old_telenums = $this->phoneNumbers;
- /* Check table definitions
- */
- if(!phoneAccount::checkRealtimeTables($cur_cfg)){
- msg_dialog::display(_("Warning"),
- sprintf(_("GOsa identified problems with your MySQL table definition, please activate debugging for details.")),
- WARNING_DIALOG);
- }
-
/* Get voicemail PIN from MySQL DB
* Because every user can change his PIN directly from the phone
* without any update to the ldap
* If there is an old entry, get callerid and remove voicemail and extensions
*/
if($old_connection){
+
+ /* Check table definitions
+ */
+ if(!phoneAccount::checkRealtimeTables($a_Remove)){
+ msg_dialog::display(_("Warning"),
+ sprintf(_("GOsa identified problems with your MySQL table definition, please activate debugging for details.")),
+ WARNING_DIALOG);
+ }
+
$query = "SELECT id,name,callerid FROM ".$a_Remove['SIP_TABLE']." WHERE name='".$this->uid."';";
$rid = mysql_query($query,$old_connection);
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query,
* Update / Insert sip_users entry
**********************/
+ /* Check table definitions
+ */
+ if(!phoneAccount::checkRealtimeTables($a_New)){
+ msg_dialog::display(_("Warning"),
+ sprintf(_("GOsa identified problems with your MySQL table definition, please activate debugging for details.")),
+ WARNING_DIALOG);
+ }
+
+
/* Set the first given phone number as callerid */
reset($newnums);
$i_new_key = key($newnums);
$a_SETUP = $this->goFonHomeServers[$this->init_HomeServer];
$s_parameter ="";
+ /* Check table definitions
+ */
+ if(!phoneAccount::checkRealtimeTables($a_SETUP)){
+ msg_dialog::display(_("Warning"),
+ sprintf(_("GOsa identified problems with your MySQL table definition, please activate debugging for details.")),
+ WARNING_DIALOG);
+ }
+
// Connect to DB server
$r_con = @mysql_pconnect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
/* Let changes get active, everything was fine;
*/
- mysql_query("commit;",$old_connection);
+ mysql_query("commit;",$r_con);
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,"<b>commit;</b>", "");
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,"<b>---Transaction sucessful!---</b>", "");