openrat-cms

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

commit c78269ef6797640faf9c7b38ef36982b153aa9e5
parent f3e5595531cf2c35cef102f46298324231442b33
Author: dankert <devnull@localhost>
Date:   Thu, 10 Feb 2011 02:15:35 +0100

TitleAction auch als Gast ausführen.

Diffstat:
action/TitleAction.class.php | 9+++++++--
action/TitleAction.ini.php | 5+++--
2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/action/TitleAction.class.php b/action/TitleAction.class.php @@ -32,6 +32,11 @@ class TitleAction extends Action { $this->setTemplateVar('buildinfo',OR_TITLE.' '.OR_VERSION.' - build '.config('build','build') ); + $user = Session::getUser(); + if ( !is_object($user) ) + return; // Keine aktive Sitzung vorhanden. + + $db = Session::getDatabase(); $this->setTemplateVar('dbname',$db->conf['comment'].(readonly()?' ('.lang('readonly').')':'')); @@ -42,7 +47,6 @@ class TitleAction extends Action $databases[$dbid] = $dbconf['comment']; $this->setTemplateVar('databases',$databases); - $user = Session::getUser(); $this->setTemplateVar('username' ,$user->name ); $this->setTemplateVar('userfullname',$user->fullname); @@ -94,7 +98,8 @@ class TitleAction extends Action public function ping() { - echo "1"; + $this->setTemplateVar('ping',true ); + $this->setTemplateVar('time',date('r') ); } } diff --git a/action/TitleAction.ini.php b/action/TitleAction.ini.php @@ -1,8 +1,10 @@ + [default] goto=show [show] +guest=true [ping] -direct=true- \ No newline at end of file +async=true