Patch PHPTAL_DEFAULT_CACHE_DIR.
authorAntoine Musso <hashar@users.mediawiki.org>
Fri, 23 Apr 2004 13:03:04 +0000 (13:03 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Fri, 23 Apr 2004 13:03:04 +0000 (13:03 +0000)
For os name starting by "WIN" use c:\\temp\\  else /tmp/

PHPTAL-NP-0.7.0/libs/PHPTAL.php

index e05e583..2df81c6 100644 (file)
@@ -64,7 +64,12 @@ require_once _phptal_os_path_join($__d, 'PHPTAL', 'SourceLocator.php');
 
 define('PHPTAL_VERSION', '0.7.0');
 define('PHPTAL_MARK', str_replace('.', '_', PHPTAL_VERSION) . '_');
-define('PHPTAL_DEFAULT_CACHE_DIR', '/tmp/');
+
+if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") {
+       define('PHPTAL_DEFAULT_CACHE_DIR', 'c:\temp\\');
+} else {
+       define('PHPTAL_DEFAULT_CACHE_DIR', '/tmp/');
+}
 
 /**
  * This define is used to select the templates output format.