From eb5dadcd4c2c4cd7bd63b0e313929e36a1791d47 Mon Sep 17 00:00:00 2001
From: Mark Baker <mark@lange.demon.co.uk>
Date: Fri, 11 Feb 2011 22:26:51 +0000
Subject: [PATCH] Bugfix:	Work item 15312 - Caching and tmp partition
 exhaustion

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@68479 2327b42d-5241-43d6-9e2a-de5ac946f064
---
 Classes/PHPExcel/CachedObjectStorage/DiscISAM.php | 4 ++--
 changelog.txt                                     | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php b/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php
index 3087680..327f4b4 100644
--- a/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php
+++ b/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php
@@ -112,7 +112,7 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
 		parent::copyCellCollection($parent);
 		//	Get a new id for the new file name
 		$baseUnique = $this->_getUniqueID();
-		$newFileName = sys_get_temp_dir().'/PHPExcel.'.$baseUnique.'.cache';
+		$newFileName = PHPExcel_Shared_File::sys_get_temp_dir().'/PHPExcel.'.$baseUnique.'.cache';
 		//	Copy the existing cell cache file
 		copy ($this->_fileName,$newFileName);
 		$this->_fileName = $newFileName;
@@ -140,7 +140,7 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage
 		parent::__construct($parent);
 		if (is_null($this->_fileHandle)) {
 			$baseUnique = $this->_getUniqueID();
-			$this->_fileName = sys_get_temp_dir().'/PHPExcel.'.$baseUnique.'.cache';
+			$this->_fileName = PHPExcel_Shared_File::sys_get_temp_dir().'/PHPExcel.'.$baseUnique.'.cache';
 			$this->_fileHandle = fopen($this->_fileName,'a+');
 		}
 	}	//	function __construct()
diff --git a/changelog.txt b/changelog.txt
index 054ae6f..252cb27 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -60,6 +60,7 @@ Fixed in SVN:
 - Bugfix:	(MBaker) Work item 15121 - Column reference rather than cell reference in Print Area definition
 						Fix Excel2007 Writer to handle print areas that are defined as row or column ranges rather than just as cell ranges
 - Bugfix:	(MBaker) Reduced false positives from isDateTimeFormatCode() method by suppressing testing within quoted strings
+- Bugfix:	(MBaker) Work item 15312 - Caching and tmp partition exhaustion 
 - General:  (MBaker) Improved performance (speed), for building the Shared Strings table in the Excel2007 Writer.
 - General:  (MBaker) Enhanced SheetViews element structures in the Excel2007 Writer for frozen panes.