From: Stéphane Jacob Date: Tue, 20 Jan 2009 21:00:36 +0000 (+0100) Subject: Adds killError, etc like trigError, etc. X-Git-Tag: core/1.0.1~28 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ca476935c2eed1151b14a783f2ca404218ebfae4;p=platal.git Adds killError, etc like trigError, etc. --- 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