/** * Unregister a hook function. * * @deprecated * @see ModUtil::unregisterHook() * * @param string $hookobject The hook object. * @param string $hookaction The hook action. * @param string $hookarea The area of the hook (either 'GUI' or 'API'). * @param string $hookmodule Name of the hook module. * @param string $hooktype Name of the hook type. * @param string $hookfunc Name of the hook function. * * @return boolean True if successful, false otherwise. */ function pnModUnregisterHook($hookobject, $hookaction, $hookarea, $hookmodule, $hooktype, $hookfunc) { LogUtil::log(__f('Warning! Function %1$s is deprecated. Please use %2$s instead.', array(__FUNCTION__, 'ModUtil::unregisterHook()')), E_USER_DEPRECATED); return ModUtil::unregisterHook($hookobject, $hookaction, $hookarea, $hookmodule, $hooktype, $hookfunc); }
/** * delete the EZComments module from an old version * * This function deletes the module to be used. It deletes tables, * registers hooks,... * * @return boolean true on success, false otherwise. */ public function uninstall() { if (!ModUtil::unregisterHook('item', 'display', 'GUI', 'EZComments', 'user', 'view')) { return LogUtil::registerError($this->__('Error deleting hook.')); } if (!ModUtil::unregisterHook('item', 'delete', 'API', 'EZComments', 'admin', 'deletebyitem')) { return LogUtil::registerError($this->__('Error deleting hook.')); } if (!ModUtil::unregisterHook('module', 'remove', 'API', 'EZComments', 'admin', 'deletemodule')) { return LogUtil::registerError($this->__('Error deleting hook.')); } // drop main table if (!DBUtil::dropTable('EZComments')) { return false; } // delete all module vars for the ezcomments module $this->delVars(); HookUtil::unregisterProviderBundles($this->version->getHookProviderBundles()); HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles()); EventUtil::unregisterPersistentModuleHandler('EZComments', 'installer.module.uninstalled', array('EZComments_EventHandlers', 'moduleDelete')); EventUtil::unregisterPersistentModuleHandler('EZComments', 'installer.subscriberarea.uninstalled', array('EZComments_EventHandlers', 'hookAreaDelete')); // Deletion successful return true; }