openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit ac8f6573116da50b8f0909e157badd748dabf7ed
parent 2f35a6e6718992f6fb5c22e36ae20bbf6a811978
Author: dankert <devnull@localhost>
Date:   Tue, 23 Mar 2010 21:04:57 +0100

Fix: Falsches Icon, wenn addNotice mit status=boolean aufgerufen wird.

Diffstat:
actionClasses/Action.class.php | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/actionClasses/Action.class.php b/actionClasses/Action.class.php @@ -279,6 +279,11 @@ class Action */ function addNotice( $type,$name,$text,$status=OR_NOTICE_OK,$vars=array(),$log=array() ) { + if ( $status === true ) + $status = OR_NOTICE_OK; + elseif ( $status === false ) + $status = OR_NOTICE_ERROR; + $this->templateVars['notice_status'] = $status; if ( $status == OR_NOTICE_OK && isset($_COOKIE['or_ignore_ok_notices'])) @@ -290,11 +295,6 @@ class Action if ( !is_array($vars)) $vars = array($vars); - if ( $status === true ) - $status = OR_NOTICE_OK; - elseif ( $status === false ) - $status = OR_NOTICE_ERROR; - $this->templateVars['notices'][] = array('type'=>$type, 'name'=>$name, 'key'=>'NOTICE_'.$text,