From: hickert Date: Tue, 9 Jan 2007 04:23:13 +0000 (+0000) Subject: Display warnings if database is not reachable when removing conference from ldap X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9331f3a86da0a4940f110439b9fb1479be949eab;p=gosa.git Display warnings if database is not reachable when removing conference from ldap git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5482 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index 464b061aa..acbb64090 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -217,11 +217,19 @@ class conference extends plugin function remove_from_parent() { - $str = $this->SQL_remove_me(true); - if($str){ - print_red($str); + /* Check if 'old' home server is available in gosa FON server configuration + * Try to remove this entry from database and display errors. + */ + if(isset($this->goFonHomeServers[$this->goFonHomeServer])){ + $str = $this->SQL_remove_me(true); + if($str){ + print_red($str); + } + }else{ + print_red(_("Could not remove the conference entry from database on home server (%s). Please check your asterisk database configurations and remove this entry from database manually, if necessary.")); } + /* Remove ldap entry */ $ldap= $this->config->get_ldap_link(); $ldap->cd ($this->dn); $ldap->recursive_remove(); @@ -259,7 +267,7 @@ class conference extends plugin * Check currently selected home server ********************/ - $cfg_Current = $this->goFonHomeServers[$this->goFonHomeServer] ; + $cfg_Current = $this->goFonHomeServers[$this->goFonHomeServer]; $r_current = @mysql_pconnect($cfg_Current['SERVER'],$cfg_Current['LOGIN'],$cfg_Current['PASSWORD']); if(!$r_current){ gosa_log(@mysql_error($r_current));