addCheck(new HandlerValidatorJournal($this)); } /** * @see PKPAnnouncementHandler::_getAnnouncementsEnabled() */ function _getAnnouncementsEnabled($request) { $journal =& $request->getJournal(); return $journal->getSetting('enableAnnouncements'); } /** * @see PKPAnnouncementHandler::_getAnnouncements() */ function &_getAnnouncements($request, $rangeInfo = null) { $journal =& $request->getJournal(); $announcementDao =& DAORegistry::getDAO('AnnouncementDAO'); $announcements =& $announcementDao->getAnnouncementsNotExpiredByAssocId(ASSOC_TYPE_JOURNAL, $journal->getId(), $rangeInfo); return $announcements; } /** * @see PKPAnnouncementHandler::_getAnnouncementsIntroduction() */ function _getAnnouncementsIntroduction($request) { $journal =& $request->getJournal(); return $journal->getLocalizedSetting('announcementsIntroduction'); } /** * @see PKPAnnouncementHandler::_announcementIsValid() */ function _announcementIsValid($request, $announcementId) { $journal =& $request->getJournal(); $announcementDao =& DAORegistry::getDAO('AnnouncementDAO'); return ($announcementId != null && $announcementDao->getAnnouncementAssocId($announcementId) == $journal->getId()); } } ?>