[www] r1000 - in trunk/svn.matroska.org/WebSVN: . include

[email protected] Fri, 26 Aug 2005 17:08:41 +0400 (MSD)
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2005-08-26 17:08:23 +0400 (Fri, 26 Aug 2005)
New Revision: 1000

Modified:
   trunk/svn.matroska.org/WebSVN/blame.php
   trunk/svn.matroska.org/WebSVN/diff.php
   trunk/svn.matroska.org/WebSVN/dl.php
   trunk/svn.matroska.org/WebSVN/include/config.inc
   trunk/svn.matroska.org/WebSVN/include/configclass.inc
   trunk/svn.matroska.org/WebSVN/include/svnlook.inc
Log:
WebSVN: relocate the temp directory in /tmp/websvn

Modified: trunk/svn.matroska.org/WebSVN/blame.php
===================================================================
--- trunk/svn.matroska.org/WebSVN/blame.php	2005-08-26 08:34:54 UTC (rev 999)
+++ trunk/svn.matroska.org/WebSVN/blame.php	2005-08-26 13:08:23 UTC (rev 1000)
@@ -58,7 +58,8 @@
 $listing = array();
 
 // Get the contents of the file
-$tfname = tempnam("temp", "");
+// robUx4 - $tfname = tempnam("temp", "");
+$tfname = tempnam($config->tempPath, "");
 $svnrep->getFileContents($path, $tfname, $rev);
 
 $filecache = array();
@@ -66,7 +67,8 @@
 if ($file = fopen($tfname, "r"))      
 {
    // Get the blame info
-   $tbname = tempnam("temp", "");
+   // robUx4 - $tbname = tempnam("temp", "");
+   $tbname = tempnam($config->tempPath, "");
    $svnrep->getBlameDetails($path, $tbname, $rev); 
    
    $ent = true;

Modified: trunk/svn.matroska.org/WebSVN/diff.php
===================================================================
--- trunk/svn.matroska.org/WebSVN/diff.php	2005-08-26 08:34:54 UTC (rev 999)
+++ trunk/svn.matroska.org/WebSVN/diff.php	2005-08-26 13:08:23 UTC (rev 1000)
@@ -87,10 +87,12 @@
    }
 
    // Get the contents of the two files
-   $newtname = tempnam("temp", "");
+   // robUx4 - $newtname = tempnam("temp", "");
+   $newtname = tempnam($config->tempPath, "");
    $new = $svnrep->getFileContents($history[0]["path"], $newtname, $history[0]["rev"]);
 
-   $oldtname = tempnam("temp", "");
+   // robUx4 - $oldtname = tempnam("temp", "");
+   $oldtname = tempnam($config->tempPath, "");
    $old = $svnrep->getFileContents($history[1]["path"], $oldtname, $history[1]["rev"]);
    
    $ent = true;

Modified: trunk/svn.matroska.org/WebSVN/dl.php
===================================================================
--- trunk/svn.matroska.org/WebSVN/dl.php	2005-08-26 08:34:54 UTC (rev 999)
+++ trunk/svn.matroska.org/WebSVN/dl.php	2005-08-26 13:08:23 UTC (rev 1000)
@@ -49,7 +49,8 @@
 // Create a temporary directory.  Here we have an unavoidable but highly
 // unlikely to occure race condition
 
-$tmpname = tempnam("temp", "wsvn");
+// robUx4 - $tmpname = tempnam("temp", "wsvn");
+$tmpname = tempnam($config->tempPath, "wsvn");
 unlink($tmpname);
 if (mkdir($tmpname))
 {

Modified: trunk/svn.matroska.org/WebSVN/include/config.inc
===================================================================
--- trunk/svn.matroska.org/WebSVN/include/config.inc	2005-08-26 08:34:54 UTC (rev 999)
+++ trunk/svn.matroska.org/WebSVN/include/config.inc	2005-08-26 13:08:23 UTC (rev 1000)
@@ -244,4 +244,8 @@
 // the required line below (replacing 'myrep' for the name of the repository to be changed).
 
 // $config->findRepository("myrep")->expandTabsBy(3); // Expand Tabs by 3 for repository 'myrep'
+
+// -- robUx4 added --
+$config->setTempPath("/tmp/websvn/");
+
 ?>

Modified: trunk/svn.matroska.org/WebSVN/include/configclass.inc
===================================================================
--- trunk/svn.matroska.org/WebSVN/include/configclass.inc	2005-08-26 08:34:54 UTC (rev 999)
+++ trunk/svn.matroska.org/WebSVN/include/configclass.inc	2005-08-26 13:08:23 UTC (rev 1000)
@@ -209,6 +209,7 @@
    var $bugtraq = false;
   
    var $templatePath = "./templates/Standard/";
+   var $tempPath = "/tmp/";
 
    var $ignoreSvnMimeTypes = false;
    var $ignoreWebSVNContentTypes = false;
@@ -502,6 +503,12 @@
       $this->templatePath = $path;
    }
 
+   function setTempPath($path)
+   {
+        // temp dir used to store the cache 
+        $this->$tempPath = $path;
+    }
+
    // parentPath
    //
    // Automatically set up the repositories based on a parent path

Modified: trunk/svn.matroska.org/WebSVN/include/svnlook.inc
===================================================================
--- trunk/svn.matroska.org/WebSVN/include/svnlook.inc	2005-08-26 08:34:54 UTC (rev 999)
+++ trunk/svn.matroska.org/WebSVN/include/svnlook.inc	2005-08-26 13:08:23 UTC (rev 1000)
@@ -455,7 +455,8 @@
       // Deal with php highlighting internally
       if ($l == "php")
       {
-         $tmp = tempnam("temp", "wsvn");
+         // robUx4 - $tmp = tempnam("temp", "wsvn");
+         $tmp = tempnam($config->tempPath, "wsvn");
          
          // Output the file to a temporary file
          $path = encodepath(str_replace(DIRECTORY_SEPARATOR, "/", $this->repPath.$path));