Skip to content

Commit

Permalink
*7956* Fixed Announcement/WebFeed injection with component requests
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Oct 6, 2012
1 parent 56cc7bc commit 814f647
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -67,9 +67,9 @@ function callbackLoadCategory($hookName, $args) {
}

function callbackAddLinks($hookName, $args) {
if ($this->getEnabled()) {
$request =& $this->getRequest();
if ($this->getEnabled() && is_a($request->getRouter(), 'PKPPageRouter')) {
$templateManager =& $args[0];
$request =& $this->getRequest();
$currentJournal =& $templateManager->get_template_vars('currentJournal');
$announcementsEnabled = $currentJournal ? $currentJournal->getSetting('enableAnnouncements') : false;
$displayPage = $currentJournal ? $this->getSetting($currentJournal->getId(), 'displayPage') : null;
Expand Down
3 changes: 2 additions & 1 deletion plugins/generic/thesisFeed/ThesisFeedPlugin.inc.php
Expand Up @@ -67,7 +67,8 @@ function callbackLoadCategory($hookName, $args) {
}

function callbackAddLinks($hookName, $args) {
if ($this->getEnabled()) {
$request =& $this->getRequest();
if ($this->getEnabled() && is_a($request->getRouter(), 'PKPPageRouter')) {
$templateManager =& $args[0];
$currentJournal =& $templateManager->get_template_vars('currentJournal');

Expand Down

0 comments on commit 814f647

Please sign in to comment.