Fixed the repository jump selector
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 9 Apr 2007 04:17:36 +0000 (04:17 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 9 Apr 2007 04:17:36 +0000 (04:17 +0000)
global.php
includes/repository.php
repository.php
templates/default/header.tpl

index c62433f78d0a977f4f9ff18cd093d8472828cf95..691d663d257fd6e9c03a951c176acdf97c5b3cf7 100644 (file)
@@ -44,7 +44,8 @@ $fetchtemplates[] = 'doctype';
 $fetchtemplates[] = 'headinclude';
 
 $show['reposchooser'] = false;
-if ($viewsvn->repos->container AND $dochooser)
+
+if ($repos->container AND !$hideChooser)
 {
        $show['reposchooser'] = true;
        $fetchtemplates[] = 'select_option';
@@ -56,7 +57,7 @@ $options = '';
 if ($show['reposchooser'])
 {
        $html = '';
-       $options = $viewsvn->repos->fetch_list();
+       $options = $repos->fetchList();
        foreach ($options AS $option)
        {
                $value = $option;
index ff864542856faaac45f2bfa55c9685ad1ebf9565..51f78fe0864322164fcbd917301d1318332e5673 100644 (file)
@@ -51,7 +51,7 @@ class Repository
        * Whether or not the path is a container
        * @var  bool
        */
-       private $container;
+       public $container;
        
        // ###################################################################
        /**
index 7f29e0676b96bf38a3523cac96709c8601302e75..eb56d1d194e42ea48fb4c39403c71cdee0ea8305 100644 (file)
 || ###################################################################
 \*=====================================================================*/
 
-define('PATH_OVERRIDE', 1);
-
 require_once('./global.php');
 
 // ###################################################################
 
-if ($viewsvn->in['repository'])
+if ($input->in['repository'])
 {
-       if (in_array($viewsvn->in['repository'], $viewsvn->repos->fetch_list()))
+       if (in_array($input->in['repository'], $repos->fetchList()))
        {
-               header('Location: ' . $viewsvn->path . '/browse.php/' . $viewsvn->in['repository'] . '/');
+               header('Location: ' . BSRegister::Get('webpath') . '/browse/' . $input->in['repository'] . ':');
                exit;
        }
 }
 
-header('Location: ' . $viewsvn->path . '/index.php');
+header('Location: ' . BSRegister::Get('webpath') . '/index.php');
 
 /*=====================================================================*\
 || ###################################################################
index d554927d79163bd2192c050c2a12a22a586bf51b..51137727440295dbb066659e788182d4f73bee79 100644 (file)
@@ -5,7 +5,7 @@
        <td><h1 style="display: inline">ViewSVN</h1></td>
        <td style="text-align: right">
                <if condition="$show['reposchooser']">
-               <form name="jumper" method="post" action="$viewsvn->path/repository.php">
+               <form name="jumper" method="post" action="{BSRegister::Get('webpath')}/repository.php">
                        {@"Repository"}: <select name="repository">
                        $options
                        </select>