feel free to keep it strictly simple...

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«:

  1. $files_to_register = [
  2. 'atom.php',
  3. 'rss.php'
  4. ];
  5. LEPTON_secure::getInstance()->accessFiles( $files_to_register );
last edit: 12. Mar 2024 CET 20:28:31