2015-12-01, 02:39 PM
Hey all. I'm not sure if this is 100% the right place to post this since it's not an integration question, per se, but still interacting with the system externally. If I need to post it elsewhere though, please let me know.
I have a couple of holiday themes and decided last night to automate the switch to them. I currently have a script set to run automatically at a specified date and time (the Christmas script, for instance, runs at midnight on December 1). It's currently executing the following queries which work correctly so far:
This all executes and updates just fine but it doesn't actually take affect until the cache is rebuilt (I presume it's just the default_theme cache that needs to be rebuilt in this case but I did a Rebuild & Reload all initially), which makes sense. I'm not sure if I'm just missing it but I can't seem to find the code that actually executes to make this happen so I'm wondering if either of the following is possible:
Any advice? Thanks in advance!
I have a couple of holiday themes and decided last night to automate the switch to them. I currently have a script set to run automatically at a specified date and time (the Christmas script, for instance, runs at midnight on December 1). It's currently executing the following queries which work correctly so far:
UPDATE themes SET def = 0
UPDATE themes SET def = 1, allowed groups = 'all' WHERE did = 9
UPDATE users SET style = 0
This all executes and updates just fine but it doesn't actually take affect until the cache is rebuilt (I presume it's just the default_theme cache that needs to be rebuilt in this case but I did a Rebuild & Reload all initially), which makes sense. I'm not sure if I'm just missing it but I can't seem to find the code that actually executes to make this happen so I'm wondering if either of the following is possible:
- Rebuild a cache (or caches, if necessary) from a non-interactive script that isn't actually "logged in" to the system.
- Have said non-interactive script execute a call to the "Force on Users" action available form the theme manager (again while not logged in) via something like PHP's http_get() or cURL functions. I'm assuming this takes care of the cache rebuild in the process but, if not, a second call to the rebuild action on the default_theme cache would likely suffice if this is possible.
Any advice? Thanks in advance!