File modules/cms/ui/action/title/TitleShowAction.class.php
Last commit: Fri Apr 15 14:51:22 2022 +0200 dankert Refactoring: User,Config and Database info is now stored in the Request, because so there is no session required for clients which are using Basic Authorization.
1 <?php 2 namespace cms\ui\action\title; 3 use cms\action\Method; 4 use cms\base\Configuration; 5 use cms\base\DB; 6 use cms\base\Startup; 7 use cms\ui\action\TitleAction; 8 use util\Html; 9 use util\Session; 10 11 class TitleShowAction extends TitleAction implements Method { 12 13 public function view() { 14 15 $this->setTemplateVar('buildinfo',Startup::TITLE.' '.Startup::VERSION.' - build date '.Startup::DATE ); 16 17 $user = $this->currentUser; 18 19 if ( !is_object($user) ) 20 { 21 $this->setTemplateVar('isLoggedIn' ,false ); 22 $this->setTemplateVar('userfullname',\cms\base\Language::lang('NOT_LOGGED_IN') ); 23 return; // Kein Benutzer angemeldet. 24 } 25 26 $this->setTemplateVar('isLoggedIn',true ); 27 28 if ( DEVELOPMENT ) { 29 $db = DB::get(); 30 $this->setTemplateVar('dbname',$db->conf['name'].(Startup::readonly()?' ('.\cms\base\Language::lang('readonly').')':'')); 31 $this->setTemplateVar('dbid' ,$db->id); 32 } 33 34 $this->setTemplateVar('userfullname',$user->fullname); 35 36 // Urls zum Benutzerprofil und zum Abmelden 37 //$this->setTemplateVar('profile_url',Html::url( 'profile' )); 38 //$this->setTemplateVar('logout_url' ,Html::url( 'index','logout' )); 39 $this->setTemplateVar('isAdmin',$this->userIsAdmin() ); 40 41 if ( Configuration::subset(['interface','session'])->is('auto_extend',true) ) 42 { 43 $this->setTemplateVar('ping_url' ,Html::url('title','ping') ); 44 $this->setTemplateVar('ping_timeout',ini_get('session.gc_maxlifetime')-60 ); 45 } 46 } 47 48 49 public function post() { 50 } 51 }
Downloadmodules/cms/ui/action/title/TitleShowAction.class.php
History Fri, 15 Apr 2022 14:51:22 +0200 dankert Refactoring: User,Config and Database info is now stored in the Request, because so there is no session required for clients which are using Basic Authorization. Sun, 5 Dec 2021 20:33:24 +0100 dankert Cleanup: Removed unusable properties from class 'Value' and 'BaseObject'. Wed, 18 Nov 2020 20:23:57 +0100 Jan Dankert Cleaning up the UI actions. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.