items) > 0 AND empty($this->process)) { trigger_error('Message_Reporter->phrase is an array so please use Message_Reporter::error_list_process() to prepare it', E_USER_ERROR); } $this->process = ($text ? $text : $this->process); $this->check_process(); eval('$bugsys->template->flush("' . $bugsys->template->fetch('std_error') . '");'); exit; } /** * Converts the phrase array into a list for use in error() */ function error_list_process() { if (!is_array($this->items) OR count($this->items) < 1) { return; } $this->process = "\n\n
    "; foreach ($this->items AS $phrase) { $this->process .= "\n\t
  1. " . $phrase . "
  2. "; } $this->process .= "\n
"; } /** * Throws a common no-permission error */ function error_permission() { global $bugsys; $this->error($bugsys->lang->string('You do not have permission to access this page. If you think that this is an error, please contact an administrator.')); } /** * Performs a front-end redirect by either header or * * @param string Redirect message text * @param string URL to take the user */ function redirect($text = '', $url = '') { global $bugsys; global $doctype, $header, $headinclude, $footer, $focus, $show, $stylevar; $this->process = ($text ? $text : $this->process); $this->url = ($url ? $url : $this->url); $this->check_process(); eval('$bugsys->template->flush("' . $bugsys->template->fetch('std_redirect') . '");'); if ($this->useheaders) { header("Location: {$this->url}"); } exit; } /** * Displays a fatal warning/notice that is usually not an error * * @param string Warning text */ function message($text = '') { global $bugsys; global $doctype, $header, $headinclude, $footer, $focus, $show, $stylevar; $this->process = ($text ? $text : $this->process); $this->check_process(); eval('$bugsys->template->flush("' . $bugsys->template->fetch('std_message') . '");'); exit; } /** * Checks to make sure that there is some text in the processed variable */ function check_process() { if (empty($this->process)) { trigger_error('Message_Reporter requires some text to display a message', E_USER_ERROR); } } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>