From: Jan-Pascal van Best <janpascal@vanbest.org>
Date: Mon, 8 Aug 2011 09:42:46 +0200
Subject: [PATCH] Fix static file locations

---
 lib/SpotTemplateHelper.php           |    8 +++++++-
 lib/page/SpotPage_statics.php        |    2 +-
 templates/we1rdo/CustomTplHelper.php |    2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

--- a/lib/SpotTemplateHelper.php
+++ b/lib/SpotTemplateHelper.php
@@ -947,7 +947,13 @@
 		$fileList = $this->getStaticFiles($type);
 		
 		foreach($fileList as $file) {
-			$thisftime = filemtime($file);
+		        if (file_exists('/usr/share/spotweb/'.$file)) {
+                                $thisftime = filemtime('/usr/share/spotweb/'.$file);
+                        } elseif (file_exists('/usr/share/spotweb/www/'.$file)) {
+                                $thisftime = filemtime('/usr/share/spotweb/www/'.$file);
+                        } else {
+			        $thisftime = filemtime($file);
+                        }
 			
 			if ($thisftime > $fileTime) {
 				$fileTime = $thisftime;
--- a/lib/page/SpotPage_statics.php
+++ b/lib/page/SpotPage_statics.php
@@ -27,7 +27,7 @@
 		$tmp = '';
 
 		foreach($files as $file) {
-			$fc = file_get_contents($file) . PHP_EOL;
+			$fc = file_get_contents('/usr/share/spotweb/'.$file) . PHP_EOL;
 			$fc = str_replace(
 				Array('$HTTP_S',
 					  '$COOKIE_EXPIRES',
--- a/templates/we1rdo/SpotTemplateHelper_We1rdo.php
+++ b/templates/we1rdo/SpotTemplateHelper_We1rdo.php
@@ -139,7 +139,7 @@
 			} # case css
 							 
 			case 'ico'	: {
-				return array('images/favicon.ico');
+				return array('www/images/favicon.ico');
 				break;
 			} # case 'ico'
 		} # switch
