public static function GetLastPathes() { $arPathes = CFileMan::GetLastPathes(); $arRes = array(array("name" => "/", "desc" => GetMessage("FM_UTIL_ROOT_DIR"))); for ($i = 0, $l = count($arPathes); $i < $l; $i++) { $arRes[] = array("name" => $arPathes[$i]); } return $arRes; }
function SaveLastPath($path) { $path = CFileMan::NormalizePath($path); if ($path == "" || $path == "/") { return; } $arPathes = CFileMan::GetLastPathes(); $key = array_search($path, $arPathes); if ($key !== false) { unset($arPathes[$key]); } $arPathes = array_merge(array($path), $arPathes); CFileMan::SetLastPathes($arPathes); }