From ca476935c2eed1151b14a783f2ca404218ebfae4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Tue, 20 Jan 2009 22:00:36 +0100 Subject: [PATCH] Adds killError, etc like trigError, etc. --- classes/plpage.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/classes/plpage.php b/classes/plpage.php index 26445c9..12c7d27 100644 --- a/classes/plpage.php +++ b/classes/plpage.php @@ -246,7 +246,7 @@ abstract class PlPage extends Smarty // }}} // {{{ function kill() - public function kill($msg) + public function kill($msg, $type = 'errors') { // PHP is used on command line... do not run the whole page stuff. if (php_sapi_name() == 'cli') { @@ -256,11 +256,26 @@ abstract class PlPage extends Smarty global $platal; - $this->trigError($msg); + $this->trig($msg, $type); $this->_failure = true; $this->run(); } + public function killError($msg) + { + $this->kill($msg, 'errors'); + } + + public function killWarning($msg) + { + $this->kill($msg, 'warnings'); + } + + public function killSuccess($msg) + { + $this->kill($msg, 'success'); + } + // }}} // {{{ function setTitle -- 2.1.4