0 AND $iscontainer) { $this->container = (sizeof($include) > 1); foreach ($include AS $repos) { $this->repositories[$repos] = BSFunctions::FetchSourcePath(BSFunctions::FetchSourcePath($path) . $repos); } } else { $path = BSFunctions::FetchSourcePath($path); $this->container = (bool)$iscontainer; if ($this->container) { if ($dir = @opendir($path)) { while (($file = readdir($dir)) !== false) { if (is_dir($path . $file) AND $file{0} != '.' AND is_dir($path . $file . '/' . 'db')) { $this->repositories[$file] = $path . $file; } } closedir($dir); } } else { if (is_dir($path . 'db')) { $this->repositories[basename($path)] = $path; } } } ksort($this->repositories); if (sizeof($this->repositories) < 1) { $viewsvn->trigger->error(_('There are no valid repositories')); } } // ################################################################### /** * Returns a list of repositories * * @return array List of repositories */ public function fetchList() { return array_keys($this->repositories); } // ################################################################### /** * Returns a path to a repository * * @param string Repository name * * @return string Full path to the repository */ public function fetchPath($repository = '') { global $viewsvn; if (!isset($this->repositories[$repository])) { $viewsvn->trigger->error(_('Invalid repository name specified')); } return 'file://' . $this->repositories[$repository]; } // ################################################################### /** * Verifies a path inside a repository * * @param string Repository name * @param string Path * * @return bool Validity */ public function verify($repos, $path) { global $viewsvn; if ($repospath = $this->fetchPath($repos)) { return true; } else { return false; } } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>