Remove some unused constants
Remove some unused constants

--- a/include/controller/Controller_Snapshot.class.php
+++ b/include/controller/Controller_Snapshot.class.php
@@ -185,10 +185,10 @@
 		$cache = $this->config->GetValue('cache', false);
 		$cachehandle = false;
 		$cachefile = '';
-		if ($cache && is_dir(GITPHP_CACHE)) {
+		if ($cache && is_dir(GITPHP_CACHEDIR)) {
 			$key = ($this->archive->GetObject() ? $this->archive->GetObject()->GetHash() : '') . '|' . (isset($this->params['path']) ? $this->params['path'] : '') . '|' . (isset($this->params['prefix']) ? $this->params['prefix'] : '');
 			$cachefile = sha1($key) . '-' . $this->archive->GetFilename();
-			$cachedfilepath = GITPHP_CACHE . $cachefile;
+			$cachedfilepath = GITPHP_CACHEDIR . $cachefile;
 
 			if (file_exists($cachedfilepath)) {
 				// read cached file
@@ -217,7 +217,7 @@
 					$pid = rand();
 
 				$tmpcachefile = 'tmp-' . $pid . '-' . $cachefile;
-				$cachehandle = fopen(GITPHP_CACHE . $tmpcachefile, 'wb');
+				$cachehandle = fopen(GITPHP_CACHEDIR . $tmpcachefile, 'wb');
 			}
 
 			while (($data = $this->archive->Read()) !== false) {
@@ -235,7 +235,7 @@
 			if ($cachehandle) {
 				fclose($cachehandle);
 				sleep(1);
-				rename(GITPHP_CACHE . $tmpcachefile, GITPHP_CACHE . $cachefile);
+				rename(GITPHP_CACHEDIR . $tmpcachefile, GITPHP_CACHEDIR . $cachefile);
 			}
 		}
 	}

file:a/index.php -> file:b/index.php
--- a/index.php
+++ b/index.php
@@ -28,12 +28,9 @@
 define('GITPHP_BASEDIR', dirname(__FILE__) . '/');
 define('GITPHP_CONFIGDIR', GITPHP_BASEDIR . 'config/');
 define('GITPHP_INCLUDEDIR', GITPHP_BASEDIR . 'include/');
-define('GITPHP_GITOBJECTDIR', GITPHP_INCLUDEDIR . 'git/');
-define('GITPHP_CONTROLLERDIR', GITPHP_INCLUDEDIR . 'controller/');
-define('GITPHP_CACHEDIR', GITPHP_INCLUDEDIR . 'cache/');
 define('GITPHP_LOCALEDIR', GITPHP_BASEDIR . 'locale/');
 
-define('GITPHP_CACHE', GITPHP_BASEDIR . 'cache/');
+define('GITPHP_CACHEDIR', GITPHP_BASEDIR . 'cache/');
 
 include(GITPHP_INCLUDEDIR . 'version.php');
 

comments