Including Protector in ImpressCMS Preload feature
List posts in the topic
Including Protector in ImpressCMS Preload feature
msg# 1
Hi Gijoe,
We have recently implemented a Preload feature in ImpressCMS inspired by the awesome work on XCL. This now allows us to easily include Protector without requesting users to hack their mainfile.php.
However, we are encountering a small challenge and I would like to know if you could help us a little bit. What our Preload feature does, is to trigger some code when some events are called. Among others, we have 2 events which are used for Protector: startCoreBoot, which is triggered at the beginning of include/common.php, and finishCoreBoot which is triggered at the end of include/common.php.
Of course, we use these 2 events to include the precheck and postcheck of Protector. This works very well.
However, and of course you can see me coming, this cause a problem on a fresh install of ImpressCMS, when the preload features tries to include those scripts when Protector module is not yet installed.
Now, we could check if the module Protector is installed, but this is not possible as your precheck script makes sure the Database class is not yet included.
What would be the best solution we could head to to solve this ?
Thanks for your help!
Votes:0
Average:0.00
Posts tree