setDir() public static method

Changes the current directory of the Gollem session to the supplied value.
public static setDir ( string $dir )
$dir string Directory name.
示例#1
0
                        $selectlist['files'][] = $item_value;
                    }
                }
            }
            $session->set('gollem', 'selectlist/' . $cacheid, $selectlist);
            $filelist = array_keys(array_flip($selectlist['files']));
        }
        break;
}
try {
    $info = array('list' => Gollem::listFolder(Gollem::$backend['dir']));
} catch (Gollem_Exception $e) {
    /* If that didn't work, fall back to the parent or the home directory. */
    $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