/** */ public function canRender($mode) { global $browser; switch ($mode) { case 'full': case 'raw': /* Only display raw images we know the browser supports, and we * know can't cause any sort of security issue. */ if ($browser->isViewable($this->_getType())) { return true; } break; } return parent::canRender($mode); }
/** */ public function canRender($mode) { global $browser, $registry; switch ($mode) { case 'full': case 'raw': /* Only display raw images we know the browser supports, and we * know can't cause any sort of security issue. */ if ($browser->isViewable($this->_getType())) { return true; } break; case 'inline': /* For minimal view: allow rendering of attachments inline (on the * view parts page). */ if ($registry->getView() == $registry::VIEW_MINIMAL) { return true; } break; } return parent::canRender($mode); }