Split browse.php into dir and file components.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 5 Feb 2009 05:55:00 +0000 (22:55 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 5 Feb 2009 06:49:15 +0000 (23:49 -0700)
17 files changed:
chora/browse.php [deleted file]
chora/browsedir.php [new file with mode: 0644]
chora/browsefile.php [new file with mode: 0644]
chora/co.php
chora/cvsgraph.php
chora/history.php
chora/index.php
chora/lib/Block/tree_menu.php
chora/lib/Chora.php
chora/patchsets.php
chora/templates/checkout/checkout.inc
chora/templates/diff/hr/header.inc
chora/templates/headerbar.inc
chora/templates/history/branch_cell.inc
chora/templates/history/rev.inc
chora/templates/log/header.inc
chora/templates/log/rev.inc

diff --git a/chora/browse.php b/chora/browse.php
deleted file mode 100644 (file)
index 10090f4..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-<?php
-/**
- * Copyright 1999-2009 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- *
- * @author  Anil Madhavapeddy <anil@recoil.org>
- * @author  Chuck Hagenbuch <chuck@horde.org>
- * @package Chora
- */
-
-require_once dirname(__FILE__) . '/lib/base.php';
-
-if (!$atdir && !$VC->isFile($fullname)) {
-    Chora::fatal(sprintf(_("$fullname: no such file or directory"), $where), '404 Not Found');
-}
-
-/* Scripts needed for both dirs and files. */
-Horde::addScriptFile('prototype.js', 'horde', true);
-Horde::addScriptFile('tables.js', 'horde', true);
-
-if ($atdir) {
-    $rev = $VC->hasFeature('snapshots')
-        ? Util::getFormData('rev')
-        : null;
-
-    try {
-        $atticFlags = (bool)$acts['sa'];
-        $dir = $VC->getDirObject($where, array('quicklog' => true, 'rev' => $rev, 'showattic' => $atticFlags));
-        $dir->applySort($acts['sbt'], $acts['ord']);
-        $dirList = $dir->queryDirList();
-        $fileList = $dir->queryFileList($atticFlags);
-    } catch (Horde_Vcs_Exception $e) {
-        Chora::fatal($e);
-    }
-
-    /* Decide what title to display. */
-    $title = ($where == '')
-        ? $conf['options']['introTitle']
-        : sprintf(_("Source Directory of /%s"), $where);
-
-    $extraLink = $VC->hasFeature('deleted')
-        ? Horde::widget(Chora::url('browse', $where . '/', array('sa' => ($acts['sa'] ? 0 : 1))), $acts['sa'] ? _("Hide Deleted Files") : _("Show Deleted Files"), 'widget', '', '', $acts['sa'] ? _("Hide _Deleted Files") : _("Show _Deleted Files"))
-        : '';
-
-    $umap = array(
-        'age' => Horde_Vcs::SORT_AGE,
-        'rev' => Horde_Vcs::SORT_REV,
-        'name' => Horde_Vcs::SORT_NAME,
-        'author' => Horde_Vcs::SORT_AUTHOR
-    );
-
-    foreach ($umap as $key => $val) {
-        $arg = array('sbt' => $val);
-        if ($acts['sbt'] == $val) {
-            $arg['ord'] = !$acts['ord'];
-        }
-        $url[$key] = Chora::url('browse', $where . '/', $arg);
-    }
-
-    /* Print out the directory header. */
-    $printAllCols = count($fileList);
-
-    require CHORA_TEMPLATES . '/common-header.inc';
-    require CHORA_TEMPLATES . '/menu.inc';
-    require CHORA_TEMPLATES . '/headerbar.inc';
-    require CHORA_TEMPLATES . '/directory/header.inc';
-
-    /* Unless we're at the top, display the 'back' bar. */
-    if ($where != '') {
-        $url = Chora::url('browse', preg_replace('|[^/]+$|', '', $where));
-        require CHORA_TEMPLATES . '/directory/back.inc';
-    }
-
-    /* Display all the directories first. */
-    if ($dirList) {
-        echo '<tbody>';
-        foreach ($dirList as $currentDir) {
-            if ($conf['hide_restricted'] && Chora::isRestricted($currentDir)) {
-                continue;
-            }
-            $url = Chora::url('browse', $where . '/' . $currentDir . '/');
-            $currDir = Text::htmlAllSpaces($currentDir);
-            require CHORA_TEMPLATES . '/directory/dir.inc';
-        }
-        echo '</tbody>';
-    }
-
-    /* Display all of the files in this directory */
-    if ($fileList) {
-        echo '<tbody>';
-        foreach ($fileList as $currFile) {
-            if ($conf['hide_restricted'] &&
-                Chora::isRestricted($currFile->queryName())) {
-                continue;
-            }
-            $lg = $currFile->queryLastLog();
-            $realname = $currFile->queryName();
-            $mimeType = Horde_Mime_Magic::filenameToMIME($realname);
-
-            $icon = Horde_Mime_Viewer::getIcon($mimeType);
-
-            $author = Chora::showAuthorName($lg->queryAuthor());
-            $head = $currFile->queryHead();
-            $date = $lg->queryDate();
-            $log = $lg->queryLog();
-            $attic = $currFile->isDeleted();
-            $fileName = $where . ($attic ? '/' . 'Attic' : '') . '/' . $realname;
-            $name = Text::htmlAllSpaces($realname);
-            $url = Chora::url('browse', $fileName);
-            $readableDate = Chora::readableTime($date);
-            if ($log) {
-                $shortLog = str_replace("\n", ' ', trim(substr($log, 0, $conf['options']['shortLogLength'] - 1)));
-                if (strlen($log) > 80) {
-                    $shortLog .= '...';
-                }
-            }
-            require CHORA_TEMPLATES . '/directory/file.inc';
-        }
-        echo '</tbody>';
-    }
-
-    echo '</table>';
-    require $registry->get('templates', 'horde') . '/common-footer.inc';
-    exit;
-}
-
-/* Showing a file. */
-$onb = Util::getFormData('onb');
-try {
-    $fl = $VC->getFileObject($where, array('branch' => $onb));
-} catch (Horde_Vcs_Exception $e) {
-    Chora::fatal($e);
-}
-
-$title = sprintf(_("Revisions for %s"), $where);
-
-$extraLink = Chora::getFileViews($where, 'browse');
-$logs = $fl->queryLogs();
-$first = end($logs);
-$diffValueLeft = $first->queryRevision();
-$diffValueRight = $fl->queryRevision();
-
-$sel = '';
-foreach ($fl->querySymbolicRevisions() as $sm => $rv) {
-    $sel .= '<option value="' . $rv . '">' . $sm . '</option>';
-}
-
-$selAllBranches = '';
-if ($VC->hasFeature('branches')) {
-    foreach (array_keys($fl->queryBranches()) as $sym) {
-        $selAllBranches .= '<option value="' . $sym . '"' . (($sym === $onb) ? ' selected="selected"' : '' ) . '>' . $sym . '</option>';
-    }
-}
-
-Horde::addScriptFile('QuickFinder.js', 'horde', true);
-Horde::addScriptFile('revlog.js', 'chora', true);
-require CHORA_TEMPLATES . '/common-header.inc';
-require CHORA_TEMPLATES . '/menu.inc';
-require CHORA_TEMPLATES . '/headerbar.inc';
-require CHORA_TEMPLATES . '/log/header.inc';
-
-$i = 0;
-reset($logs);
-while (list(,$lg) = each($logs)) {
-    $rev = $lg->queryRevision();
-    $branch_info = $lg->queryBranch();
-
-    $textUrl = Chora::url('co', $where, array('r' => $rev));
-    $commitDate = Chora::formatDate($lg->queryDate());
-    $readableDate = Chora::readableTime($lg->queryDate(), true);
-
-    $author = Chora::showAuthorName($lg->queryAuthor(), true);
-    $tags = Chora::getTags($lg, $where);
-
-    if ($prevRevision = $fl->queryPreviousRevision($lg->queryRevision())) {
-        $diffUrl = Chora::url('diff', $where, array('r1' => $prevRevision, 'r2' => $rev));
-    } else {
-        $diffUrl = '';
-    }
-
-    $logMessage = Chora::formatLogMessage($lg->queryLog());
-
-    require CHORA_TEMPLATES . '/log/rev.inc';
-
-    if (($i++ > 100) && !Util::getFormData('all')) {
-        break;
-    }
-}
-require CHORA_TEMPLATES . '/log/footer.inc';
-require $registry->get('templates', 'horde') . '/common-footer.inc';
diff --git a/chora/browsedir.php b/chora/browsedir.php
new file mode 100644 (file)
index 0000000..8fe1f48
--- /dev/null
@@ -0,0 +1,123 @@
+<?php
+/**
+ * Copyright 1999-2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author  Anil Madhavapeddy <anil@recoil.org>
+ * @author  Chuck Hagenbuch <chuck@horde.org>
+ * @package Chora
+ */
+
+require_once dirname(__FILE__) . '/lib/base.php';
+
+if (!$atdir) {
+    require CHORA_BASE . '/browsefile.php';
+    exit;
+}
+
+$rev = $VC->hasFeature('snapshots')
+    ? Util::getFormData('rev')
+    : null;
+
+try {
+    $atticFlags = (bool)$acts['sa'];
+    $dir = $VC->getDirObject($where, array('quicklog' => true, 'rev' => $rev, 'showattic' => $atticFlags));
+    $dir->applySort($acts['sbt'], $acts['ord']);
+    $dirList = $dir->queryDirList();
+    $fileList = $dir->queryFileList($atticFlags);
+} catch (Horde_Vcs_Exception $e) {
+    Chora::fatal($e);
+}
+
+/* Decide what title to display. */
+$title = ($where == '')
+    ? $conf['options']['introTitle']
+    : sprintf(_("Source Directory of /%s"), $where);
+
+$extraLink = $VC->hasFeature('deleted')
+    ? Horde::widget(Chora::url('browsedir', $where . '/', array('sa' => ($acts['sa'] ? 0 : 1))), $acts['sa'] ? _("Hide Deleted Files") : _("Show Deleted Files"), 'widget', '', '', $acts['sa'] ? _("Hide _Deleted Files") : _("Show _Deleted Files"))
+    : '';
+
+$umap = array(
+    'age' => Horde_Vcs::SORT_AGE,
+    'rev' => Horde_Vcs::SORT_REV,
+    'name' => Horde_Vcs::SORT_NAME,
+    'author' => Horde_Vcs::SORT_AUTHOR
+);
+
+foreach ($umap as $key => $val) {
+    $arg = array('sbt' => $val);
+    if ($acts['sbt'] == $val) {
+        $arg['ord'] = !$acts['ord'];
+    }
+    $url[$key] = Chora::url('browsedir', $where . '/', $arg);
+}
+
+/* Print out the directory header. */
+$printAllCols = count($fileList);
+
+Horde::addScriptFile('prototype.js', 'horde', true);
+Horde::addScriptFile('tables.js', 'horde', true);
+require CHORA_TEMPLATES . '/common-header.inc';
+require CHORA_TEMPLATES . '/menu.inc';
+require CHORA_TEMPLATES . '/headerbar.inc';
+require CHORA_TEMPLATES . '/directory/header.inc';
+
+/* Unless we're at the top, display the 'back' bar. */
+if ($where != '') {
+    $url = Chora::url('browsedir', preg_replace('|[^/]+$|', '', $where));
+    require CHORA_TEMPLATES . '/directory/back.inc';
+}
+
+/* Display all the directories first. */
+if ($dirList) {
+    echo '<tbody>';
+    foreach ($dirList as $currentDir) {
+        if ($conf['hide_restricted'] && Chora::isRestricted($currentDir)) {
+            continue;
+        }
+        $url = Chora::url('browsedir', $where . '/' . $currentDir . '/');
+        $currDir = Text::htmlAllSpaces($currentDir);
+        require CHORA_TEMPLATES . '/directory/dir.inc';
+    }
+    echo '</tbody>';
+}
+
+/* Display all of the files in this directory */
+if ($fileList) {
+    echo '<tbody>';
+    foreach ($fileList as $currFile) {
+        if ($conf['hide_restricted'] &&
+            Chora::isRestricted($currFile->queryName())) {
+            continue;
+        }
+        $lg = $currFile->queryLastLog();
+        $realname = $currFile->queryName();
+        $mimeType = Horde_Mime_Magic::filenameToMIME($realname);
+
+        $icon = Horde_Mime_Viewer::getIcon($mimeType);
+
+        $author = Chora::showAuthorName($lg->queryAuthor());
+        $head = $currFile->queryHead();
+        $date = $lg->queryDate();
+        $log = $lg->queryLog();
+        $attic = $currFile->isDeleted();
+        $fileName = $where . ($attic ? '/' . 'Attic' : '') . '/' . $realname;
+        $name = Text::htmlAllSpaces($realname);
+        $url = Chora::url('browsefile', $fileName);
+        $readableDate = Chora::readableTime($date);
+        if ($log) {
+            $shortLog = str_replace("\n", ' ', trim(substr($log, 0, $conf['options']['shortLogLength'] - 1)));
+            if (strlen($log) > 80) {
+                $shortLog .= '...';
+            }
+        }
+        require CHORA_TEMPLATES . '/directory/file.inc';
+    }
+    echo '</tbody>';
+}
+
+echo '</table>';
+require $registry->get('templates', 'horde') . '/common-footer.inc';
diff --git a/chora/browsefile.php b/chora/browsefile.php
new file mode 100644 (file)
index 0000000..fbf9f66
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Browse view (for files).
+ *
+ * Copyright 1999-2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author  Anil Madhavapeddy <anil@recoil.org>
+ * @author  Chuck Hagenbuch <chuck@horde.org>
+ * @package Chora
+ */
+
+require_once dirname(__FILE__) . '/lib/base.php';
+
+if ($atdir) {
+    require CHORA_BASE . '/browsedir.php';
+    exit;
+}
+
+if (!$VC->isFile($fullname)) {
+    Chora::fatal(sprintf(_("$fullname: no such file or directory"), $where), '404 Not Found');
+}
+
+$onb = Util::getFormData('onb');
+try {
+    $fl = $VC->getFileObject($where, array('branch' => $onb));
+} catch (Horde_Vcs_Exception $e) {
+    Chora::fatal($e);
+}
+
+$title = sprintf(_("Revisions for %s"), $where);
+
+$extraLink = Chora::getFileViews($where, 'browsefile');
+$logs = $fl->queryLogs();
+$first = end($logs);
+$diffValueLeft = $first->queryRevision();
+$diffValueRight = $fl->queryRevision();
+
+$sel = '';
+foreach ($fl->querySymbolicRevisions() as $sm => $rv) {
+    $sel .= '<option value="' . $rv . '">' . $sm . '</option>';
+}
+
+$selAllBranches = '';
+if ($VC->hasFeature('branches')) {
+    foreach (array_keys($fl->queryBranches()) as $sym) {
+        $selAllBranches .= '<option value="' . $sym . '"' . (($sym === $onb) ? ' selected="selected"' : '' ) . '>' . $sym . '</option>';
+    }
+}
+
+Horde::addScriptFile('QuickFinder.js', 'horde', true);
+Horde::addScriptFile('revlog.js', 'chora', true);
+require CHORA_TEMPLATES . '/common-header.inc';
+require CHORA_TEMPLATES . '/menu.inc';
+require CHORA_TEMPLATES . '/headerbar.inc';
+require CHORA_TEMPLATES . '/log/header.inc';
+
+$i = 0;
+reset($logs);
+while (list(,$lg) = each($logs)) {
+    $rev = $lg->queryRevision();
+    $branch_info = $lg->queryBranch();
+
+    $textUrl = Chora::url('co', $where, array('r' => $rev));
+    $commitDate = Chora::formatDate($lg->queryDate());
+    $readableDate = Chora::readableTime($lg->queryDate(), true);
+
+    $author = Chora::showAuthorName($lg->queryAuthor(), true);
+    $tags = Chora::getTags($lg, $where);
+
+    if ($prevRevision = $fl->queryPreviousRevision($lg->queryRevision())) {
+        $diffUrl = Chora::url('diff', $where, array('r1' => $prevRevision, 'r2' => $rev));
+    } else {
+        $diffUrl = '';
+    }
+
+    $logMessage = Chora::formatLogMessage($lg->queryLog());
+
+    require CHORA_TEMPLATES . '/log/rev.inc';
+
+    if (($i++ > 100) && !Util::getFormData('all')) {
+        break;
+    }
+}
+require CHORA_TEMPLATES . '/log/footer.inc';
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 968ad62..5705113 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 /* If we know we're at a directory, just go to browse.php. */
 if ($atdir) {
-    require CHORA_BASE . '/browse.php';
+    require CHORA_BASE . '/browsedir.php';
     exit;
 }
 
@@ -75,7 +75,7 @@ if (!$plain) {
     );
     if ($VC->hasFeature('snapshots')) {
         $snapdir = dirname($file->queryPath());
-        $views[] = Horde::widget(Chora::url('browse', $snapdir == '.' ? '' : $snapdir, array('rev' => $r)), _("Snapshot"), 'widget', '', '', _("_Snapshot"));
+        $views[] = Horde::widget(Chora::url('browsedir', $snapdir == '.' ? '' : $snapdir, array('rev' => $r)), _("Snapshot"), 'widget', '', '', _("_Snapshot"));
     }
     $extraLink = _("View:") . ' ' . implode(' | ', $views);
 
index c8eb41f..09228ef 100644 (file)
@@ -16,7 +16,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 // Exit if cvsgraph isn't active or it's not supported.
 if (empty($conf['paths']['cvsgraph']) || !$VC->hasFeature('branches')) {
-    header('Location: ' . Chora::url('browse', $where));
+    header('Location: ' . Chora::url('browsefile', $where));
     exit;
 }
 
@@ -61,7 +61,7 @@ if (Util::getFormData('show_image')) {
                   'M' => 'graphMap',
                   'r' => $root,
                   '0' => '&amp;',
-                  '1' => Chora::url('browse', $where, array('dummy' => 'true')),
+                  '1' => Chora::url('browsefile', $where, array('dummy' => 'true')),
                   '2' => Chora::url('diff', $where, array('dummy' =>'true')),
                   '3' => Chora::url('co', $where, array('dummy' => 'true')),
     );
index 1962f07..481ad57 100644 (file)
@@ -16,7 +16,7 @@ Chora::fatal('History display is currently broken', '500 Internal Server Error')
 
 /* Exit if it's not supported. */
 if (!$VC->hasFeature('branches')) {
-    header('Location: ' . Chora::url('browse', $where));
+    header('Location: ' . Chora::url('browsefile', $where));
     exit;
 }
 
index 19ee817..05362c2 100644 (file)
@@ -23,4 +23,4 @@ if (!$chora_configured) {
         array('sourceroots.php' => 'This file defines all of the source repositories that you wish Chora to display.'));
 }
 
-require CHORA_BASE . '/browse.php';
+require CHORA_BASE . '/browsedir.php';
index 8ef543e..fc4e3d0 100644 (file)
@@ -25,7 +25,7 @@ class Horde_Block_chora_tree_menu extends Horde_Block
                     array(
                         'icon' => 'folder.png',
                         'icondir' => $GLOBALS['registry']->getImageDir('horde') . '/tree',
-                        'url' => Chora::url('browse', '', array('rt' => $key))
+                        'url' => Chora::url('browsedir', '', array('rt' => $key))
                     )
                 );
             }
index 85ee6a0..4f1420b 100644 (file)
@@ -186,7 +186,7 @@ class Chora
 
         foreach ($dirs as $i => $dir) {
             if (!empty($dir)) {
-                $bar .= '/ <a href="' . self::url('browse', $dir . ($i == $dir_count ? '' : '/')) . '">'. Text::htmlallspaces($dir) . '</a> ';
+                $bar .= '/ <a href="' . self::url('browsedir', $dir . ($i == $dir_count ? '' : '/')) . '">'. Text::htmlallspaces($dir) . '</a> ';
             }
         }
 
@@ -241,7 +241,7 @@ class Chora
         $script .= '.php';
 
         if ($GLOBALS['conf']['options']['urls'] == 'rewrite') {
-            if ($script == 'browse.php') {
+            if (in_array($script, array('browse.php', 'browsedir.php'))) {
                 $script = $uri;
                 if (substr($script, 0, 1) == '/') {
                     $script = substr($script, 1);
@@ -337,7 +337,7 @@ class Chora
         $arr = array();
         foreach ($sourceroots as $key => $val) {
             if ($GLOBALS['sourceroot'] != $key) {
-                $arr[] = '<option value="' . self::url('browse', '', array('rt' => $key)) . '">' . $val['name'] . '</option>';
+                $arr[] = '<option value="' . self::url('browsedir', '', array('rt' => $key)) . '">' . $val['name'] . '</option>';
             }
         }
 
@@ -425,7 +425,7 @@ class Chora
     {
         require_once 'Horde/Menu.php';
         $menu = new Menu();
-        $menu->add(self::url('browse'), _("_Browse"), 'chora.png');
+        $menu->add(self::url('browsedir'), _("_Browse"), 'chora.png');
         return $menu->render();
     }
 
@@ -433,16 +433,16 @@ class Chora
      * Generate the link used for various file-based views.
      *
      * @param string $where    The current file path.
-     * @param string $current  The current view ('browse', 'patchsets',
+     * @param string $current  The current view ('browsefile', 'patchsets',
      *                         'history', 'cvsgraph', or 'stats').
      *
      * @return array  An array of file view links.
      */
     static public function getFileViews($where, $current)
     {
-        $views = ($current == 'browse')
+        $views = ($current == 'browsefile')
             ? array('<em class="widget">' . _("Logs") . '</em>')
-            : array(Horde::widget(self::url('browse', $where), _("Logs"), 'widget', '', '', _("_Logs")));
+            : array(Horde::widget(self::url('browsefile', $where), _("Logs"), 'widget', '', '', _("_Logs")));
 
         if ($GLOBALS['VC']->hasFeature('patchsets')) {
             $views[] = ($current == 'patchsets')
@@ -482,7 +482,7 @@ class Chora
         $tags = array();
 
         foreach ($lg->querySymbolicBranches() as $symb => $bra) {
-            $tags[] = '<a href="' . self::url('browse', $where, array('onb' => $bra)) . '">'. htmlspecialchars($symb) . '</a>';
+            $tags[] = '<a href="' . self::url('browsefile', $where, array('onb' => $bra)) . '">'. htmlspecialchars($symb) . '</a>';
         }
 
         foreach ($lg->queryTags() as $tag) {
index d8454f3..7df1e59 100644 (file)
@@ -17,7 +17,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 // Exit if patchset feature is not available.
 if (!$GLOBALS['VC']->hasFeature('patchsets')) {
-    header('Location: ' . Chora::url('browse', $where));
+    header('Location: ' . Chora::url('browsefile', $where));
     exit;
 }
 
index fd6765d..b05523d 100644 (file)
@@ -5,7 +5,7 @@
 <?php if (!empty($branch_info)): ?>
   <li><?php echo _("Branch:") ?>
 <?php foreach ($branch_info as $val): ?>
-   <strong><a href="<?php echo Chora::url('browse', $where, array('onb' => $val)) ?>"><?php echo $val ?></a></strong>
+   <strong><a href="<?php echo Chora::url('browsefile', $where, array('onb' => $val)) ?>"><?php echo $val ?></a></strong>
 <?php endforeach; ?>
   </li>
 <?php endif; ?>
index e3d087e..568400a 100644 (file)
@@ -45,7 +45,7 @@
 <?php if (!empty($val['branchinfo'])): ?>
    <li><?php echo _("Branch:") ?>
 <?php foreach ($val['branchinfo'] as $branchname): ?>
-    <strong><a href="<?php echo Chora::url('browse', $where, array('onb' => $branchname)) ?>"><?php echo $branchname ?></a></strong>
+    <strong><a href="<?php echo Chora::url('browsefile', $where, array('onb' => $branchname)) ?>"><?php echo $branchname ?></a></strong>
 <?php endforeach; ?>
    </li>
 <?php endif; ?>
index 4e49ff9..106271f 100644 (file)
@@ -3,7 +3,7 @@
  <tr>
   <td>
    <?php echo _("Location:") ?>
-   <strong>[ <a href="<?php echo Chora::url('browse') ?>"><?php echo $conf['options']['sourceRootName'] ?></a> ]
+   <strong>[ <a href="<?php echo Chora::url('browsedir') ?>"><?php echo $conf['options']['sourceRootName'] ?></a> ]
    <?php echo Chora::whereMenu($where) ?></strong>
    <?php if (!empty($onb)): ?>
     <em>(<?php echo _("Tracking Branch") ?> <strong><?php echo $onb ?></strong>)</em>
index 56c54bf..d8e2d69 100644 (file)
@@ -1,6 +1,6 @@
 <td style="background:<?php echo $bg ?>; text-align:center">
 <?php echo _("Branching to") ?>:<br />
-<a href="<?php echo Chora::url('browse', $where, array('onb' => $rev)); ?>">
+<a href="<?php echo Chora::url('browsefile', $where, array('onb' => $rev)); ?>">
  <?php echo $symname ?></a>
 <br />
 <em>(<?php printf(_("revision %s"), $rev) ?>)</em>
index 6e42976..3146f03 100644 (file)
@@ -1,5 +1,5 @@
 <td id="rev<?php echo $rev ?>" style="background:<?php echo $bg ?>">
- <a href="<?php echo Chora::url('browse', $where, array('r'=>$rev), "rev$rev") ?>">
+ <a href="<?php echo Chora::url('browsefile', $where, array('r' => $rev), 'rev' . $rev) ?>">
  <?php echo $rev ?></a> <?php printf(_("by %s"), $author) ?>
  <br />
  <em><?php echo $date ?></em>
index 67d3968..857d288 100644 (file)
@@ -23,7 +23,7 @@
 
 <?php if (!empty($selAllBranches)): ?>
   <td>
-   <form method="get" action="browse.php">
+   <form method="get" action="browsefile.php">
     <?php echo Chora::formInputs() ?>
     <input type="hidden" name="f" value="<?php echo htmlspecialchars(Util::getFormData('f')) ?>" />
     <?php echo _("Show Branch:") ?>
index ad9f124..cdf066d 100644 (file)
@@ -7,7 +7,7 @@
  </td>
  <td><a href="<?php echo $textUrl ?>" title="<?php echo htmlspecialchars($rev) ?>"><?php echo htmlspecialchars($VC->abbrev($rev)) ?></a>
 <?php foreach (array_diff($branch_info, array($onb)) as $val): ?>
-  <span class="branch"><?php echo Horde::link(Chora::url('browse', $where, array('onb' => $val))) . htmlspecialchars($val) ?></a></span>
+  <span class="branch"><?php echo Horde::link(Chora::url('browsefile', $where, array('onb' => $val))) . htmlspecialchars($val) ?></a></span>
 <?php endforeach; ?>
 <?php if (!empty($lg->lines)): ?>
   <small>(<?php printf('%s lines', $lg->lines) ?>)</small>