register module-files to class.secure
Using own modulefiles in the backend was tricky in LEPTON < 1.2.2 as the author has to add his own files inside the class.secure.php inside the framework by hand.
E.g. move_up.php inside the news-module. There was no other way to handle a "register my own backend-files" to the secure-system at all.
Within LEPTON CMS 1.2.2 we introduce a simple way to manage this without editing the framework file by placing an additional php file to the module folder with simple adding the files to a simple array.
Simply register your files to the class secure using the file "register_class_secure.php".
Create a php file with the name "register_class_secure.php" inside the root of your module and place the following code inside.
List all neccessary files within the array.
Example given from modules »News«:
- $files_to_register = [
- 'atom.php',
- 'rss.php'
- ];
- LEPTON_secure::getInstance()->accessFiles( $files_to_register );