Minor internal fixes
This commit is contained in:
@@ -22,7 +22,7 @@ abstract class lnApp_SystemMessage extends HTMLRender {
|
||||
|
||||
// If we are a CLI session, then we have no session
|
||||
if (PHP_SAPI !== 'cli')
|
||||
Session::instance()->set('sessionmsgs',self::$_data);
|
||||
Session::instance()->set('sessionmsgs',static::$_data);
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -35,13 +35,13 @@ abstract class lnApp_SystemMessage extends HTMLRender {
|
||||
*/
|
||||
public static function add($msg,$prepend=FALSE) {
|
||||
if ($msgs = Session::instance()->get_once('sessionmsgs'))
|
||||
self::$_data = $msgs;
|
||||
static::$_data = $msgs;
|
||||
|
||||
parent::add($msg);
|
||||
self::$_c = count(self::$_data);
|
||||
static::$_c = count(static::$_data);
|
||||
|
||||
// Save our messages in our session, so that we get them for redirects
|
||||
Session::instance()->set('sessionmsgs',self::$_data);
|
||||
Session::instance()->set('sessionmsgs',static::$_data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ abstract class lnApp_SystemMessage extends HTMLRender {
|
||||
* @see HTMLRender::render()
|
||||
*/
|
||||
protected function render() {
|
||||
$record = self::$_data[$this->_x];
|
||||
$record = static::$_data[$this->_x];
|
||||
|
||||
$output = '';
|
||||
|
||||
@@ -58,17 +58,17 @@ abstract class lnApp_SystemMessage extends HTMLRender {
|
||||
$output .= '<button type="button" class="close" data-dismiss="alert">×</button>';
|
||||
switch ($record['type']) {
|
||||
case 'error':
|
||||
$output .= '<i class="icon-ban-circle"></i>';
|
||||
$output .= '<i class="fa fa-exclamation-circle"></i>';
|
||||
break;
|
||||
case 'success':
|
||||
$output .= '<i class="icon-check"></i>';
|
||||
$output .= '<i class="fa fa-check"></i>';
|
||||
break;
|
||||
case 'warning':
|
||||
$output .= '<i class="icon-warning-sign"></i>';
|
||||
$output .= '<i class="fa fa-warning"></i>';
|
||||
break;
|
||||
case 'info':
|
||||
default:
|
||||
$output .= '<i class="icon-info-sign"></i>';
|
||||
$output .= '<i class="fa fa-info"></i>';
|
||||
}
|
||||
|
||||
$output .= sprintf(' <strong>%s</strong>: %s',$record['title'],$record['body']);
|
||||
@@ -83,9 +83,12 @@ abstract class lnApp_SystemMessage extends HTMLRender {
|
||||
public function render_all() {
|
||||
// Reload our message from the session
|
||||
if ($msgs = Session::instance()->get_once('sessionmsgs'))
|
||||
self::$_data = $msgs;
|
||||
static::$_data = $msgs;
|
||||
|
||||
return parent::render_all();
|
||||
}
|
||||
|
||||
public function dump() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user