Changed static to self calls

This commit is contained in:
Deon George
2013-12-26 21:39:49 +11:00
parent a7fcddc48c
commit a23a19b581
9 changed files with 37 additions and 27 deletions

View File

@@ -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',static::$_data);
Session::instance()->set('sessionmsgs',self::$_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'))
static::$_data = $msgs;
self::$_data = $msgs;
parent::add($msg);
static::$_c = count(static::$_data);
self::$_c = count(self::$_data);
// Save our messages in our session, so that we get them for redirects
Session::instance()->set('sessionmsgs',static::$_data);
Session::instance()->set('sessionmsgs',self::$_data);
}
/**
@@ -50,7 +50,7 @@ abstract class lnApp_SystemMessage extends HTMLRender {
* @see HTMLRender::render()
*/
protected function render() {
$record = static::$_data[$this->_x];
$record = self::$_data[$this->_x];
$output = '';
@@ -83,7 +83,7 @@ abstract class lnApp_SystemMessage extends HTMLRender {
public function render_all() {
// Reload our message from the session
if ($msgs = Session::instance()->get_once('sessionmsgs'))
static::$_data = $msgs;
self::$_data = $msgs;
return parent::render_all();
}