Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Application Setup but no Destruct?
I am writing two new applications for Vanilla/Dashboard RC1. I know there is a Setup method in "class.hooks.php" which is called when the application is enabled. I looked at the source and saw that it is like this:
Thank you,
Richard
// Call the application's setup methodUnfortunately, there's no Destruct/Destroy/Die method. This would be useful for removing any changes made to the config file or dropping any tables, etc. Is there a way to do this that I am unaware of, or will I have to modify the source?
$Hooks = $ApplicationName.'Hooks';
if (!class_exists($Hooks)) {
$HooksFile = PATH_APPLICATIONS.DS.$ApplicationFolder.DS.'settings'.DS.'class.hooks.php';
if (file_exists($HooksFile))
include($HooksFile);
}
if (class_exists($Hooks)) {
$Hooks = new $Hooks();
$Hooks->Setup();
}
(from line 172 of class.applicationmanager.php)
Thank you,
Richard
0
Comments
If I remember correctly, it uses values like TRUE/FALSE to disable itself in the end.
Ah maybe its just for plugins not applications:
http://github.com/vanillaforums/Garden/blob/master/library/core/class.pluginmanager.php#L515