index 3e52c1f68718b3e8be990a513cde1de95d2ac269..1ba29747e639cb4c9d68043368e6c10a880e47a3 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
define("INFO_DIALOG" , 10001);
define("WARNING_DIALOG" , 10002);
public function __construct($s_title,$s_message,$i_type)
{
global $config;
+
+ if(empty($s_message)) return;
if(!in_array($i_type,array(INFO_DIALOG,WARNING_DIALOG,ERROR_DIALOG,CONFIRM_DIALOG,FATAL_ERROR_DIALOG))){
trigger_error("Invalid msg_dialog type.");
session::set('errorsAlreadyPosted',$errorsAlreadyPosted);
}
+
public static function display($s_title,$s_message,$i_type = INFO_DIALOG)
{
new msg_dialog($s_title,$s_message,$i_type);
}
+
+ public static function displayChecks($messages)
+ {
+ /* Assemble the message array to a plain string */
+ foreach ($messages as $error){
+ msg_dialog::display(_("Error"), $error, ERROR_DIALOG);
+ }
+ }
+
+
public function get_ID()
{
return($this->i_ID);
<tr><td style='vertical-align:top;padding:10px'>
<img src='images/error.png' alt='{t}Error{/t}'>
</td><td style='width:100%'>
- <b>Fatal Error - GOsa execution abortet - ".$this->s_Title."</b><br>
+ <b>".$this->s_Title."</b><br>
".$this->s_Message."<br><br>
"._("Please fix the above error and reload the page.")."
</td></tr>
}
return($return);
}
+
}
?>