From 91b7c8b1abfa3b3d091a40f6d8e5d0db28cd9758 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 13 Jan 2006 05:32:18 +0000 Subject: [PATCH] Setting up paths in the controller --- global.php | 9 ++++----- includes/node.php | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/global.php b/global.php index 906f24c..2d381c3 100644 --- a/global.php +++ b/global.php @@ -24,17 +24,16 @@ require_once('./includes/init.php'); $dochooser = ((defined('PATH_OVERRIDE') AND PATH_OVERRIDE == 1) ? false : true); if ($dochooser) { - require_once('./includes/cachev.php'); - $cachev = new cacheV(); - $cachev->set_hash(); + require_once('./includes/node.php'); + $controller = new Node_Controller($viewsvn->paths->parse()); if (isset($viewsvn->in['rebuild']) AND $viewsvn->in['rebuild'] == 1 AND $viewsvn->get('debug') == true) { - $cachev->build(null); + $controller->cachev->build(null); } else { - $cachev->exec_build(); + $controller->cachev->exec_build(); } } diff --git a/includes/node.php b/includes/node.php index 8feefbb..4922b23 100644 --- a/includes/node.php +++ b/includes/node.php @@ -63,16 +63,48 @@ class Node_Controller */ var $cachev = null; + /** + * Full, universal path of the node + * @var string + * @access public + */ + var $fullpath; + + /** + * Repository of the path + * @var string + * @access public + */ + var $repos; + + /** + * Relative path in the repository + * @var string + * @access public + */ + var $path; + // ################################################################### /** * Constructor * * @access public */ - function Node_Controller() + function Node_Controller($nodepath) { global $viewsvn; + // variables + $this->fullpath = $nodepath; + + $temp = preg_split('#/#', $this->fullpath, -1, PREG_SPLIT_NO_EMPTY); + + $this->repos = $temp[0]; + + unset($temp[0]); + $this->path = '/' . implode('/', $temp); + + // objects $this->registry =& $viewsvn; require_once('./includes/shellcmd.php'); -- 2.43.5