From 31582d6b40dab710353c0df783f821fdba1ea449 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 21 May 2005 17:05:35 +0000 Subject: [PATCH] r184: Added Message_Reporter::message() backend --- includes/class_message_reporter.php | 27 ++++++++++++++++++++++++--- templates/default/std_message.tpl | 3 +++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 templates/default/std_message.tpl diff --git a/includes/class_message_reporter.php b/includes/class_message_reporter.php index d5f41f7..fd38772 100755 --- a/includes/class_message_reporter.php +++ b/includes/class_message_reporter.php @@ -37,7 +37,7 @@ class Message_Reporter $errormessage = $this->process; eval('$bugsys->template->flush("' . $bugsys->template->fetch('std_error') . '");'); - exit; + exit; } function error_list_process() @@ -88,9 +88,30 @@ class Message_Reporter header("Location: {$this->url}"); } - exit; + exit; + } + + function message($text = '') + { + global $bugsys; + + if (is_array($this->phrase) AND empty($this->process)) + { + trigger_error('Message_Reporter::phrase is an array and cannot be used in Message_Reporter::message()', E_USER_ERROR); + } + + if (empty($this->process)) + { + $this->process = phrase($this->phrase);; + } + + $this->process = (($text) ? $text : $this->process); + + $message = $this->process; + + eval('$bugsys->template->flush("' . $bugsys->template->fetch('std_message') . '");'); + exit; } - } /*=====================================================================*\ diff --git a/templates/default/std_message.tpl b/templates/default/std_message.tpl new file mode 100644 index 0000000..dd7f69d --- /dev/null +++ b/templates/default/std_message.tpl @@ -0,0 +1,3 @@ + +$message + \ No newline at end of file -- 2.43.5