Skip to content

Commit

Permalink
pkp#68 Dropped invalid hook handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Feb 23, 2023
1 parent 0b8ea4b commit fce88a2
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions PLNPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public function register($category, $path, $mainContextId = null) {
$this->import('classes.DepositPackage');

HookRegistry::register('PluginRegistry::loadCategory', array($this, 'callbackLoadCategory'));
HookRegistry::register('JournalDAO::deleteJournalById', array($this, 'callbackDeleteJournalById'));
HookRegistry::register('LoadHandler', array($this, 'callbackLoadHandler'));
HookRegistry::register('NotificationManager::getNotificationMessage', array($this, 'callbackNotificationMessage'));
HookRegistry::register('LoadComponentHandler', array($this, 'setupComponentHandlers'));
Expand Down Expand Up @@ -272,21 +271,6 @@ public function callbackLoadCategory($hookName, $args) {
return false;
}

/**
* Delete all plug-in data for a journal when the journal is deleted
* @param string $hookName (JournalDAO::deleteJournalById)
* @param array $args (JournalDAO, journalId)
* @return boolean false to continue processing subsequent hooks
*/
public function callbackDeleteJournalById($hookName, $params) {
$journalId = $params[1];
$depositDao = DAORegistry::getDAO('DepositDAO');
$depositDao->deleteByJournalId($journalId);
$depositObjectDao = DAORegistry::getDAO('DepositObjectDAO');
$depositObjectDao->deleteByJournalId($journalId);
return false;
}

/**
* @copydoc AcronPlugin::parseCronTab()
*/
Expand Down

0 comments on commit fce88a2

Please sign in to comment.