Update of /cvsroot/phpcvsview/phpcvsview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv756
Modified Files:
config.php cvsview.php
Log Message:
Added support for multiple CVS repositories.
Index: config.php
===================================================================
RCS file: /cvsroot/phpcvsview/phpcvsview/config.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** config.php 1 Feb 2005 15:13:00 -0000 1.11
--- config.php 3 Feb 2005 23:47:29 -0000 1.12
***************
*** 12,32 ****
**/
! // The CVSROOT path to access as it is on the server, ie for this projects
! // repository the value should be "/cvsroot/phpcvsview"
! $config['cvsroot'] = "/cvsroot/phpcvsview";
!
! // The hostname (or IP Address) of the server providing the PServer services.
! $config['pserver'] = "cvs.sourceforge.net";
!
! // The username to pass to the PServer for authentication purposes.
! $config['username'] = "anonymous";
! // The password associated with the username above for authentication process.
! $config['password'] = "";
! // The HTMLTitle and HTMLHeading are used purely for the generation of the
! // resultant web pages.
! $config['html_title'] = "phpCVSView Source Code Library";
! $config['html_header'] = "phpCVSView Source Code Library";
// The default theme
--- 12,38 ----
**/
! // CVSROOT configuration.
! /* phpCVSView Source Repository */
! $config['cvs']['phpCVSView']['server'] = "cvs.sourceforge.net";
! $config['cvs']['phpCVSView']['cvsroot'] = "/cvsroot/phpcvsview";
! $config['cvs']['phpCVSView']['username'] = "anonymous";
! $config['cvs']['phpCVSView']['password'] = "";
! $config['cvs']['phpCVSView']['mode'] = "pserver";
! $config['cvs']['phpCVSView']['description'] = "PHP based CVS Repository Viewer";
! $config['cvs']['phpCVSView']['html_title'] = "phpCVSView Source Code Library";
! $config['cvs']['phpCVSView']['html_header'] = "phpCVSView Source Code Library";
! /* phpCVSView Source Repository */
! $config['cvs']['RPak']['server'] = "bcheese.homeip.net";
! $config['cvs']['RPak']['cvsroot'] = "/cvsroot/mstsrpak";
! $config['cvs']['RPak']['username'] = "anonymous";
! $config['cvs']['RPak']['password'] = "";
! $config['cvs']['RPak']['mode'] = "pserver";
! $config['cvs']['RPak']['description'] = "MS Train Sim Route Packaging System";
! $config['cvs']['RPak']['html_title'] = "RPak Source Code Library";
! $config['cvs']['RPak']['html_header'] = "RPak Source Code Library";
! // Default CVSROOT configuration to use.
! $config['default_cvs'] = "phpCVSView";
// The default theme
***************
*** 41,43 ****
--- 47,52 ----
$config['language'] = "en";
+ // Settings for TAR creation.
+ $config['TempFileLocation'] = "/tmp";
+
?>
Index: cvsview.php
===================================================================
RCS file: /cvsroot/phpcvsview/phpcvsview/cvsview.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** cvsview.php 2 Feb 2005 07:15:34 -0000 1.22
--- cvsview.php 3 Feb 2005 23:47:29 -0000 1.23
***************
*** 41,44 ****
--- 41,53 ----
$config['theme'] = (in_array($config['theme'], GetThemeList(), false)) ? $config['theme'] : 'Default';
+ // Determine the CVSROOT settings required for this instance.
+ $env['CVSROOT'] = (empty($_COOKIE['config']['CVSROOT'])) ? $config['default_cvs'] : $_COOKIE['config']['CVSROOT'];
+ if (isset($_GET["cr"])) {
+ $env['CVSROOT'] = $_GET["cr"];
+ // Set cookie with theme info. This cookie is set to expire 1 year from today.
+ setcookie("config[CVSROOT]", $env['CVSROOT'], time()+31536000, "/");
+ }
+ $env['CVSSettings'] = $config['cvs'][$env['CVSROOT']];
+
if (isset($_GET["tm"])) {
$config['theme'] = $_GET["tm"];
|