* use svn revision as the css and js version when no version given.
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user