File modules/cms/action/login/LoginLicenseAction.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\action\login; 3 use cms\action\LoginAction; 4 use cms\action\Method; 5 use cms\base\Configuration; 6 use cms\model\User; 7 use util\Session; 8 9 10 class LoginLicenseAction extends LoginAction { 11 12 public function view() { 13 $software = array_map( function($lib) { 14 return [ 15 'name' => $lib[0], 16 'url' => $lib[1], 17 'license' => $lib[2] 18 ]; 19 },[ 20 ['OpenRat Content Management System' ,'http://www.openrat.de/' ,'GPL v2' ], 21 ['jQuery Core Javascript Framework' ,'http://jquery.com/' ,'MPL, GPL v2'], 22 ['GeSHi - Generic Syntax Highlighter','http://qbnz.com/highlighter/','GPL v2' ], 23 ['CodeMirror' ,'https://codemirror.net/' ,'MIT' ], 24 ['SimpleMDE' ,'https://simplemde.com/' ,'MIT' ], 25 ['Trumbowyg' ,'https://alex-d.github.io/Trumbowyg/','MIT' ], 26 ['JSON file format' ,'http://pear.php.net/pepr/pepr-proposal-show.php?id=198','BSD'], 27 ] ); 28 29 $this->setTemplateVar('software',$software); 30 31 32 33 $this->setTemplateVar('time' ,date('r') ); 34 $this->setTemplateVar('os' ,php_uname('s') ); 35 $this->setTemplateVar('release' ,php_uname('r') ); 36 $this->setTemplateVar('machine' ,php_uname('m') ); 37 $this->setTemplateVar('version' , phpversion() ); 38 39 $this->setTemplateVar('cms_name' , Configuration::Conf()->subset('application')->get('name' ) ); 40 $this->setTemplateVar('cms_version' , Configuration::Conf()->subset('application')->get('version' ) ); 41 $this->setTemplateVar('cms_operator', Configuration::Conf()->subset('application')->get('operator') ); 42 43 $user = $this->currentUser ?: new User(); // empty user object as default. 44 45 $this->setTemplateVar('user_login' , $user->loginDate ); 46 $this->setTemplateVar('user_name' , $user->name ); 47 $this->setTemplateVar('user_fullname', $user->fullname ); 48 } 49 50 51 public function checkAccess() 52 { 53 return true; 54 } 55 }
Downloadmodules/cms/action/login/LoginLicenseAction.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. Fri, 15 Apr 2022 12:50:31 +0200 dankert Code cleanup... Sat, 19 Mar 2022 12:10:34 +0100 dankert Removed support for: Export, Import, Compress, Uncompress, Extract. This is more comfortable via WebDAV. Fri, 3 Dec 2021 23:27:44 +0100 dankert New: Only allowed methods are shown in the dropdown menu; Some security enhancements. Sat, 17 Apr 2021 01:59:54 +0200 Jan Dankert Cleanup license info, dropped Jquery UI Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.