Author: david
Date: Mon May 14 15:03:59 2012
New Revision: 11676

Log:
Use system temp directory

Modified:
   trunk/lib/Qubit.class.php

Modified: trunk/lib/Qubit.class.php
==============================================================================
--- trunk/lib/Qubit.class.php   Mon May 14 11:48:36 2012        (r11675)
+++ trunk/lib/Qubit.class.php   Mon May 14 15:03:59 2012        (r11676)
@@ -84,7 +84,7 @@
   public static function saveTemporaryFile($name, $contents)
   {
     // Set temporary directory path
-    $tmpDir = sfConfig::get('sf_upload_dir').'/tmp';
+    $tmpDir = sys_get_temp_dir();
 
     // Create temporary directory unless exists
     if (!is_writable($tmpDir))
@@ -101,7 +101,7 @@
     while (file_exists($tmpFileName) || null == $tmpFileName)
     {
       $uniqueString = substr(md5(time()), 0, 8);
-      $tmpFileName = $tmpDir.'/TMP'.$uniqueString.'.'.$extension;
+      $tmpFileName = $tmpDir.'/QUBIT'.$uniqueString.'.'.$extension;
     }
 
     return false != file_put_contents($tmpFileName, $contents) ? $tmpFileName 
: false;

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to