multiViews) { $op = @$_REQUEST['op']; // This means the user wants to browse another project, so we switch to it and exit. if ($op == 'rep') { $rep =& $config->findRepository(@$_REQUEST['repname']); if ($rep != null) { header('Location: '.$config->getURL($rep, '', 'dir')); } else { include $locwebsvnreal.'/index.php'; } exit; } $origPathInfo = isset($_SERVER['ORIG_PATH_INFO']) ? $_SERVER['ORIG_PATH_INFO'] : ''; $pathInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : ''; $path = trim(empty($pathInfo) ? $origPathInfo : $pathInfo); // Remove initial slash $path = substr($path, 1); if (empty($path)) { include $locwebsvnreal.'/index.php'; exit; } // Split the path into repository and path elements // Note: we have to cope with the repository name having a slash in it $pos = strpos($path, '/'); if ($pos === false) { $pos = strlen($path); } $name = substr($path, 0, $pos); $rep =& $config->findRepository($name); if ($rep != null && is_object($rep)) { $path = substr($path, $pos); if ($path == '') { $path = '/'; } $repname = $name; } else { include $locwebsvnreal.'/index.php'; exit; } createProjectSelectionForm(); createRevisionSelectionForm(); $vars['repurl'] = $config->getURL($rep, '', 'dir'); $vars['clientrooturl'] = $rep->clientRootURL; $vars['allowdownload'] = $rep->getAllowDownload(); $vars['repname'] = escape($rep->getDisplayName()); // find the operation type switch ($op) { case 'dir': $file = 'listing.php'; break; case 'revision': $file = 'revision.php'; break; case 'file': $file = 'filedetails.php'; break; case 'log': $file = 'log.php'; break; case 'diff': $file = 'diff.php'; break; case 'blame': $file = 'blame.php'; break; case 'rss': $file = 'rss.php'; break; case 'dl': $file = 'dl.php'; break; case 'comp': $file = 'comp.php'; break; default: $svnrep = new SVNRepository($rep); if ($svnrep->isFile($path, $rev, $peg)) { $file = 'filedetails.php'; } else { $file = 'listing.php'; } break; } // Now include the file that handles it include $locwebsvnreal.'/'.$file; } else { $vars['error'] = 'MultiViews must be enabled in include/config.php in order to use wsvn.php. See the install docs for details, or use this path instead.'; include $locwebsvnreal.'/index.php'; exit; }