* use svn revision as the css and js version when no version given.

This commit is contained in:
wangchunsheng
2011-10-12 03:04:54 +00:00
parent 58a96e12e0
commit e7641bc752
+20
View File
@@ -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 "<script src='$url?v=$version' type='text/javascript'></script>\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 "<link rel='stylesheet' href='$url?v=$version' type='text/css' media='screen' />\n";
}