$this->_type_ids = unserialize($ids);
} else {
$type_mgr = $GLOBALS['injector']->getInstance('Content_Types_Manager');
- $types = $type_mgr->ensureTypes(array('gallery', 'image'));
+ try {
+ $types = $type_mgr->ensureTypes(array('gallery', 'image'));
+ } catch (Content_Exception $e) {
+ throw new Ansel_Exception($e);
+ }
$this->_type_ids = array('gallery' => (int)$types[0],
'image' => (int)$types[1]);
$GLOBALS['injector']->getInstance('Horde_Cache')->set($key, serialize($this->_type_ids));
/* Build the tag widget */
$html = $this->_htmlBegin();
- $html .= '<div id="tags">' . $this->_getTagHTML() . '</div>';
+ try {
+ $html .= '<div id="tags">' . $this->_getTagHTML() . '</div>';
+ } catch (Ansel_Exception $e) {
+ return $html . sprintf(_("There was an error fetching tags: %s"), $e->getMessage()) . $this->_htmlEnd();
+ }
if ($this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
Horde::startBuffer();
/* Attach the Ajax action */