Restored Hook::register and added Hook::add

pull/922/head
nupplaPhil 2019-12-23 01:36:32 +01:00
parent 838c28f171
commit 382ca2b3bc
No known key found for this signature in database
GPG Key ID: D8365C3D36B77D90
1 changed files with 3 additions and 1 deletions

View File

@ -56,10 +56,11 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'a
function advancedcontentfilter_install(App $a) function advancedcontentfilter_install(App $a)
{ {
Hook::add('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition'); Hook::register('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
Hook::register('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter'); Hook::register('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
Hook::register('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings'); Hook::register('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
Hook::add('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
DBStructure::update($a->getBasePath(), false, true); DBStructure::update($a->getBasePath(), false, true);
Logger::log("installed advancedcontentfilter"); Logger::log("installed advancedcontentfilter");
@ -67,6 +68,7 @@ function advancedcontentfilter_install(App $a)
function advancedcontentfilter_uninstall() function advancedcontentfilter_uninstall()
{ {
Hook::unregister('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
Hook::unregister('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter'); Hook::unregister('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
Hook::unregister('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings'); Hook::unregister('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
} }