openrat-cms

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

commit 54d779e2dc698711a3f1fa8729382cfadcad9cc0
parent ddb23c3dd126a15969791d2ef1d6b4e4478472e1
Author: dankert <devnull@localhost>
Date:   Sun, 26 Dec 2010 00:12:53 +0100

Datenbank-Infos in die Ausgabe schreiben und per Dropdown anzeigen.

Diffstat:
actionClasses/TitleAction.class.php | 9++++++++-
themes/default/templates/title/show.tpl.src.php | 4++++
2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/actionClasses/TitleAction.class.php b/actionClasses/TitleAction.class.php @@ -34,7 +34,14 @@ class TitleAction extends Action $db = Session::getDatabase(); $this->setTemplateVar('dbname',$db->conf['comment'].(readonly()?' ('.lang('readonly').')':'')); - + + $databases = array(); + global $conf; + foreach( $conf['database'] as $dbid=>$dbconf ) + if ( $dbconf['enabled']) + $databases[$dbid] = $dbconf['comment']; + $this->setTemplateVar('databases',$databases); + $user = Session::getUser(); $this->setTemplateVar('username' ,$user->name ); $this->setTemplateVar('userfullname',$user->fullname); diff --git a/themes/default/templates/title/show.tpl.src.php b/themes/default/templates/title/show.tpl.src.php @@ -4,6 +4,10 @@ part if present:dbname text title:message:database var:dbname maxlength:25 text raw:_-_ + part class:dropdown + list list:databases key:id value:name + link class:entry action:index subaction:logout var1:dbid value1:var:id target:content + text var:name text var:cms_title title:var:buildinfo if present:projectname