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«:
global $lepton_filemanager; if (!is_object($lepton_filemanager)) require_once( "../../framework/class.lepton.filemanager.php" ); $files_to_register = array( '/modules/news/add_group.php', '/modules/news/add_post.php', '/modules/news/delete_comment.php', '/modules/news/delete_group.php', '/modules/news/modify_post.php', '/modules/news/modify_settings.php', '/modules/news/move_up.php', '/modules/news/move_down.php', '/modules/news/delete_post.php', '/modules/news/comment.php', '/modules/news/submit_comment.php', '/modules/news/modify_comment.php', '/modules/news/modify_group.php', '/modules/news/rss.php', '/modules/news/save_comment.php', '/modules/news/save_group.php', '/modules/news/save_post.php', '/modules/news/save_settings.php' ); $lepton_filemanager->register( $files_to_register );