summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2009-01-16 20:31:43 +0000
committerLester Caine <lester@lsces.co.uk>2009-01-16 20:31:43 +0000
commit092a4047881da19ca1ae6494ec7df6afee887d8d (patch)
treee4faab4e1d9fa6f4027696ccdfcebbfa5fc38b71
parentff409ccdc4bca41926dd5efb20b8622acf773c00 (diff)
downloadliberty-092a4047881da19ca1ae6494ec7df6afee887d8d.tar.gz
liberty-092a4047881da19ca1ae6494ec7df6afee887d8d.tar.bz2
liberty-092a4047881da19ca1ae6494ec7df6afee887d8d.zip
Prevent creation of cache directories when cache is switched off
-rw-r--r--LibertyContent.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/LibertyContent.php b/LibertyContent.php
index f008f62..c0675ce 100644
--- a/LibertyContent.php
+++ b/LibertyContent.php
@@ -3,7 +3,7 @@
* Management of Liberty content
*
* @package liberty
-* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.389 2008/12/31 08:57:06 squareing Exp $
+* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.390 2009/01/16 20:31:43 lsces Exp $
* @author spider <spider@steelsun.com>
*/
@@ -2936,7 +2936,8 @@ class LibertyContent extends LibertyBase {
* @return TRUE on success, FALSE on failure
*/
function expungeCacheFile( $pContentId = NULL ) {
- if( @BitBase::verifyId( $pContentId ) ) {
+ global $gBitSystem;
+ if( $gBitSystem->isFeatureActive( 'liberty_cache' ) && @BitBase::verifyId( $pContentId ) ) {
// we need to unlink all files with the same id and any extension
if( $dh = opendir( $cacheDir = LibertyContent::getCachePath( $pContentId ) ) ) {
while( FALSE !== ( $file = readdir( $dh ) ) ) {