Adding language settings to config.php so that people can control the language output...
[viewsvn.git] / global.php
index d920725483065933904be9903530924dc3e9dc87..26c1d9f02471c56f3b6643c988b4e0168854743d 100644 (file)
@@ -2,7 +2,7 @@
 /*=====================================================================*\
 || ###################################################################
 || # ViewSVN [#]version[#]
-|| # Copyright ©2002-[#]year[#] Iris Studios, Inc.
+|| # Copyright ©2002-[#]year[#] Blue Static
 || #
 || # This program is free software; you can redistribute it and/or modify
 || # it under the terms of the GNU General Public License as published by
 \*=====================================================================*/
 
 require_once('./includes/init.php');
-require_once('./includes/controller.php');
 
-$dochooser = ((defined('PATH_OVERRIDE') AND PATH_OVERRIDE == 1) ? false : true);
-if ($dochooser)
+require_once('./includes/functions.php');
+require_once('./includes/class_revision.php');
+
+// ###################################################################
+// define the path variables
+$atpos = strpos($input->in['path'], '@');
+$input->in['rev'] = $input->clean(substr($input->in['path'], $atpos + 1), TYPE_UINT);
+if ($atpos !== false)
 {
-       $controller = new Controller(Paths::init());
-       
-       if (isset($viewsvn->in['rebuild']) AND $viewsvn->in['rebuild'] == 1 AND $viewsvn->get('debug') == true)
-       {
-               $controller->cachev->build(null);
-       }
-       else
-       {
-               if ($controller->cachev->exec_build())
-               {
-                       unset($controller);
-                       $controller = new Controller(Paths::init());
-               }
-       }
-       
-       $viewsvn->maincontrol =& $controller;
+       $input->in['path'] = substr($input->in['path'], 0, strpos($input->in['path'], '@'));
 }
 
+// ###################################################################
+// setup the SVN library
+require_once('./includes/class_libsvn.php');
+BSRegister::Register('lib', $lib = new LibSVN($conf['paths']['svn']));
+
 $fetchtemplates[] = 'header';
 $fetchtemplates[] = 'footer';
 $fetchtemplates[] = 'doctype';
 $fetchtemplates[] = 'headinclude';
 
 $show['reposchooser'] = false;
-if ($viewsvn->repos->container AND $dochooser)
+
+if ($repos->container AND !$hideChooser)
 {
        $show['reposchooser'] = true;
        $fetchtemplates[] = 'select_option';
@@ -61,7 +57,7 @@ $options = '';
 if ($show['reposchooser'])
 {
        $html = '';
-       $options = $viewsvn->repos->fetch_list();
+       $options = $repos->fetchList();
        foreach ($options AS $option)
        {
                $value = $option;