$notification->push(sprintf(_("Permission denied to %s: %s"), Gollem::$backend['dir'], $e->getMessage()), 'horde.error');
$loc = strrpos(Gollem::$backend['dir'], '/');
Gollem::setDir($loc !== false ? substr(Gollem::$backend['dir'], 0, $loc) : Gollem::$backend['home']);
$info = array('list' => Gollem::listFolder(Gollem::$backend['dir']));
}
$info['title'] = htmlspecialchars(Gollem::$backend['label']);
/* Commonly used URLs. */
$self_url = Horde::url('selectlist.php');
/* Set up the template object. */
$view = $injector->createInstance('Horde_View');
$view->self_url = $self_url;
$view->forminput = Horde_Util::formInput();
$view->cacheid = $cacheid;
$view->currdir = htmlspecialchars(Gollem::$backend['dir']);
$view->formid = htmlspecialchars($vars->formid);
$view->navlink = Gollem::directoryNavLink(Gollem::$backend['dir'], $self_url->copy()->add(array('cacheid' => $cacheid, 'formid' => $vars->formid)));
if ($GLOBALS['conf']['backend']['backend_list'] == 'shown') {
// TODO
//$view->changeserver = Horde::link(htmlspecialchars(Horde_Auth::addLogoutParameters(Horde::url('login.php')->add(array('url' => Horde::url('selectlist.php')->add(array('formid' => $vars->formid)))), Horde_Auth::REASON_LOGOUT)), _("Change Server")) . Horde::img('logout.png', _("Change Server")) . '</a>', true;
}
if (is_array($info['list']) && count($info['list']) && Gollem::checkPermissions('backend', Horde_Perms::READ)) {
$entry = $icon_cache = array();
$rowct = 0;
foreach ($info['list'] as $key => $val) {
$item = array('dir' => false, 'name' => htmlspecialchars($val['name']), 'selected' => false, 'type' => $val['type']);
$name = str_replace(' ', ' ', $item['name']);
/* Determine graphic to use. */
if (!empty($val['link'])) {
$item['graphic'] = '<span class="iconImg gollem-symlink"></span>';
} elseif ($val['type'] == '**dir') {
$item['graphic'] = '<span class="iconImg gollem-folder"></span>';