gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge-plugin-scmcvs/www cvsweb.php,1.3,1.4


From: gsmet
Subject: [Gforge-commits] gforge-plugin-scmcvs/www cvsweb.php,1.3,1.4
Date: Thu, 04 Nov 2004 15:10:33 -0600

Update of /cvsroot/gforge/gforge-plugin-scmcvs/www
In directory db.perdue.net:/tmp/cvs-serv12087/www

Modified Files:
        cvsweb.php 
Log Message:
fixed [#972] SCM Plug in & Unified Diff

Index: cvsweb.php
===================================================================
RCS file: /cvsroot/gforge/gforge-plugin-scmcvs/www/cvsweb.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cvsweb.php  5 Aug 2004 20:13:08 -0000       1.3
+++ cvsweb.php  4 Nov 2004 21:10:30 -0000       1.4
@@ -19,10 +19,14 @@
 }
 
 $supportedContentTypes = array('text/html', 'text/x-cvsweb-markup');
+$plainTextDiffTypes = array('c', 's', 'u', '');
 
 $contentType = 'text/html';
 if(getStringFromGet('cvsroot') && strpos(getStringFromGet('cvsroot'), ';') === 
false) {
        $projectName = getStringFromGet('cvsroot');
+       if(getStringFromGet('r1') && getStringFromGet('r2') && 
in_array(getStringFromGet('f'), $plainTextDiffTypes)) {
+               $contentType = 'text/plain';
+       }
 } else {
        $queryString = getStringFromServer('QUERY_STRING');
        if(preg_match_all('/[;]?([^\?;=]+)=([^;]+)/', $queryString, $matches, 
PREG_SET_ORDER)) {
@@ -33,6 +37,9 @@
                if(isset($query['content-type'])) {
                        $contentType = $query['content-type'];
                }
+               if(isset($query['r1']) && isset($query['r2']) && 
(!isset($query['f']) || in_array($query['f'], $plainTextDiffTypes))) {
+                       $contentType = 'text/plain';
+               }
        }
 }
 // Remove eventual leading /cvsroot/ or cvsroot/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]