exit;
}
-$rev = $VC->hasFeature('snapshots')
- ? Horde_Util::getFormData('rev')
+$onb = $VC->hasFeature('snapshots')
+ ? Horde_Util::getFormData('onb')
: null;
try {
$atticFlags = (bool)$acts['sa'];
- $dir = $VC->getDirObject($where, array('quicklog' => true, 'rev' => $rev, 'showattic' => $atticFlags));
+ $dir = $VC->getDirObject($where, array('quicklog' => true, 'rev' => $onb, 'showattic' => $atticFlags));
$dir->applySort($acts['sbt'], $acts['ord']);
$dirList = $dir->queryDirList();
$fileList = $dir->queryFileList($atticFlags);
: sprintf(_("Source Directory of /%s"), $where);
$extraLink = $VC->hasFeature('deleted')
- ? Horde::widget(Chora::url('browsedir', $where . '/', array('rev' => $rev, 'sa' => ($acts['sa'] ? 0 : 1))), $acts['sa'] ? _("Hide Deleted Files") : _("Show Deleted Files"), 'widget', '', '', $acts['sa'] ? _("Hide _Deleted Files") : _("Show _Deleted Files"))
+ ? Horde::widget(Chora::url('browsedir', $where . '/', array('onb' => $onb, 'sa' => ($acts['sa'] ? 0 : 1))), $acts['sa'] ? _("Hide Deleted Files") : _("Show Deleted Files"), 'widget', '', '', $acts['sa'] ? _("Hide _Deleted Files") : _("Show _Deleted Files"))
: '';
$umap = array(
if ($acts['sbt'] == $val) {
$arg['ord'] = !$acts['ord'];
}
- $url[$key] = Chora::url('browsedir', $where . '/', $arg, array('rev' => $rev));
+ $url[$key] = Chora::url('browsedir', $where . '/', $arg, array('onb' => $onb));
}
$branches = array();
if ($VC->hasFeature('branches')) {
$branches = $dir->getBranches();
- if (is_null($rev)) {
- $rev = $VC->getDefaultBranch();
+ if (is_null($onb)) {
+ $onb = $VC->getDefaultBranch();
}
}
/* Unless we're at the top, display the 'back' bar. */
if ($where != '') {
- $url = Chora::url('browsedir', preg_replace('|[^/]+$|', '', $where), array('rev' => $rev));
+ $url = Chora::url('browsedir', preg_replace('|[^/]+$|', '', $where), array('onb' => $onb));
require CHORA_TEMPLATES . '/directory/back.inc';
}
if ($conf['hide_restricted'] && Chora::isRestricted($currentDir)) {
continue;
}
- $url = Chora::url('browsedir', $where . '/' . $currentDir . '/', array('rev' => $rev));
+ $url = Chora::url('browsedir', $where . '/' . $currentDir . '/', array('onb' => $onb));
$currDir = Horde_Text_Filter::filter($currentDir, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true));
require CHORA_TEMPLATES . '/directory/dir.inc';
}
$attic = $currFile->isDeleted();
$fileName = $where . ($attic ? '/' . 'Attic' : '') . '/' . $realname;
$name = Horde_Text_Filter::filter($realname, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true));
- $url = Chora::url('browsefile', $fileName, array('onb' => $rev));
+ $url = Chora::url('browsefile', $fileName, array('onb' => $onb));
$readableDate = Chora::readableTime($date);
if ($log) {
$shortLog = str_replace("\n", ' ', trim(substr($log, 0, $conf['options']['shortLogLength'] - 1)));
* Create the breadcrumb directory listing.
*
* @param string $where The current filepath.
+ * @param string $onb If not null, the branch to add to the generated
+ * URLs.
*
* @return string The directory string.
*/
- static public function whereMenu($where)
+ static public function whereMenu($where, $onb = null)
{
$bar = '';
$dirs = explode('/', $where);
}
$path .= $dir;
if (!empty($dir)) {
- $bar .= '/ <a href="' . self::url('browsedir', $path . ($i == $dir_count && !$GLOBALS['atdir'] ? '' : '/')) . '">'. Horde_Text_Filter::filter($dir, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)) . '</a> ';
+ $url = self::url('browsedir', $path . ($i == $dir_count && !$GLOBALS['atdir'] ? '' : '/'));
+ if (!empty($onb)) {
+ $url = Horde_Util::addParameter($url, array('onb' => $onb));
+ }
+ $bar .= '/ <a href="' . $url . '">'. Horde_Text_Filter::filter($dir, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)) . '</a> ';
}
}