From 79a4bc69f63fe9487c5c4459db457318d4f21dc8 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 16 Jan 2008 13:23:02 +0000 Subject: [PATCH] Updated msg plugin print_red git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8388 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/addons/notifications/class_msgplug.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gosa-core/plugins/addons/notifications/class_msgplug.inc b/gosa-core/plugins/addons/notifications/class_msgplug.inc index edbab55ee..e88e64170 100644 --- a/gosa-core/plugins/addons/notifications/class_msgplug.inc +++ b/gosa-core/plugins/addons/notifications/class_msgplug.inc @@ -96,11 +96,11 @@ class msgplug extends plugin /*Permissions ok? */ if (!$this->acl_is_writeable('notify')){ - print_red(_("You have no permissions to send a message!")); + msg_dialog::display(_("Permission error"), _("You have no permissions to send a message!"), ERROR_DIALOG); } else { $cmd= $this->config->search("msgplug", "NOTIFY_COMMAND",array('menu')); if ($cmd == ""){ - print_red(_("No NOTIFY_COMMAND definition found in your gosa.conf")); + msg_dialog::display(_("Configuration error"), sprintf(_("Missing '%s' directive in configuration!"), "notify_command"), ERROR_DIALOG); } else { $parameters= base64_encode($this->nmessage) ." "; foreach ($this->recipients as $key => $value){ @@ -108,13 +108,13 @@ class msgplug extends plugin } exec ("$cmd $parameters", $dummy, $retval); if ($retval != 0){ - print_red(sprintf(_("Execution of '%s' failed!"), $cmd)); + msg_dialog::display(_("Configuration error"), sprintf(_("'%s' defined for the '%s' directive cannot be executed!"), $cmd, "notify_command"), ERROR_DIALOG); } $this->finalized= true; } } } else { - print_red(_("Please specify at least one recipient to send a message!")); + msg_dialog::display(_("Error"), _("Please specify at least one recipient to send a message!") , ERROR_DIALOG); } } @@ -210,7 +210,7 @@ class msgplug extends plugin $line= fgets($fh, 256); if (!preg_match('/^DESC:/', $line)){ - print_red (_("No DESC tag in message file:")." $file"); + msg_dialog::display(_("Error"), sprintf(_("Cannot find a DESC tag in file '%s'!"), $file), ERROR_DIALOG); return $desc; } fclose ($fh); -- 2.30.2