From e7641bc75263fad8aa65e2bf3866801c230a71b4 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Wed, 12 Oct 2011 03:04:54 +0000 Subject: [PATCH] * use svn revision as the css and js version when no version given. --- lib/front/front.class.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/front/front.class.php b/lib/front/front.class.php index ce610cb391..6a589976d7 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -352,6 +352,15 @@ class html */ class js { + /** + * Use the svn revision to get the version id. + * + * @static + * @var string + * @access public + */ + static $version = '$Id'; + /** * Import a js file. * @@ -362,6 +371,7 @@ class js */ public static function import($url, $version = '') { + if(!$version) $version = self::$version; echo "\n"; } @@ -626,6 +636,15 @@ EOT; */ class css { + /** + * Use the svn revision to get the version id. + * + * @static + * @var string + * @access public + */ + static $version = '$Id'; + /** * Import a css file. * @@ -636,6 +655,7 @@ class css */ public static function import($url, $version = '') { + if(!$version) $version = self::$version; echo "\n"; }