[evolvis-commits] r16478: Allow timestamps for js & css in lib/vendor/

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Mar 1 01:20:18 CET 2011


Author: mirabilos
Date: 2011-03-01 01:20:18 +0100 (Tue, 01 Mar 2011)
New Revision: 16478

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php
Log:
Allow timestamps for js & css in lib/vendor/

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php	2011-03-01 00:20:15 UTC (rev 16477)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/include/Layout.class.php	2011-03-01 00:20:18 UTC (rev 16478)
@@ -224,6 +224,11 @@
 			$filename = $GLOBALS['fusionforge_basedir'].'/www'.$js;
 			if (file_exists($filename)) {
 				$js .= '?'.date ("U", filemtime($filename));
+			} else {
+				$filename = str_replace('/scripts/', $GLOBALS['fusionforge_basedir'].'/lib/vendor/', $js);
+				if (file_exists($filename)) {
+					$js .= '?'.date ("U", filemtime($filename));
+				}
 			}
 			$this->javascripts[] = $js;
 		}
@@ -238,6 +243,11 @@
 			$filename = $GLOBALS['fusionforge_basedir'].'/www'.$css;
 			if (file_exists($filename)) {
 				$css .= '?'.date ("U", filemtime($filename));
+			} else {
+				$filename = str_replace('/scripts/', $GLOBALS['fusionforge_basedir'].'/lib/vendor/', $css);
+				if (file_exists($filename)) {
+					$css .= '?'.date ("U", filemtime($filename));
+				}
 			}
 			$this->stylesheets[] = array('css' => $css, 'media' => $media);
 		}



More information about the evolvis-commits mailing list