summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9331f3a)
raw | patch | inline | side by side (parent: 9331f3a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 9 Jan 2007 04:33:06 +0000 (04:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 9 Jan 2007 04:33:06 +0000 (04:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5483 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/macro/class_gofonMacro.inc | patch | blob | history |
index abfd539bd11a283ed0c4d49cce4f709273cc04d6..6f464c9d2bc466a9ee5e20e5a7aebe3a1cd6b520 100755 (executable)
$a_SETUP= array();
if(array_key_exists('config',$_SESSION) &&
array_key_exists('SERVERS',$_SESSION['config']->data) &&
+ count($_SESSION['config']->data['SERVERS']['FON']) &&
array_key_exists('FON',$_SESSION['config']->data['SERVERS'])) {
/* Set available server */
}else{
$smarty->assign("disable_cn"," ");
}
+
+ /* Ensure that macro content is displayed correctly encoded */
+ $smarty->assign("goFonMacroContent",htmlentities(utf8_decode ($this->goFonMacroContent)));
+
/* Show main page */
return($smarty->fetch (get_template_path('generic.tpl', TRUE)));
}
/* Call common method to give check the hook */
$message= plugin::check();
+ if(!count($this->goFonHomeServers)){
+ $message[] = _("There must be at least one server with an asterisk database to save this phone macro.");
+ }
+
/* Check if insert/replace is possible and all servers are available */
$str = $this->add_to_database(false);
if($str){
}
/* Try to remove from database */
- $str = $this->remove_from_database(true);
- if($str){
- print_red($str);
+ if(count($this->goFonHomeServers)){
+ $str = $this->remove_from_database(true);
+ if($str){
+ print_red($str);
+ }
+ }else{
+ print_red(_("Could not remove the macro entry from asterisk databases. Please check your asterisk database configurations and remove this entry from database manually, if necessary."));
}
/* Remove phone macro */