1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-less.git synced 2024-06-26 03:40:46 +03:00

updated class for uncompressed css, to set time less than less file

This commit is contained in:
mon 2010-05-10 18:10:44 +08:00
parent b24afeffca
commit 2bd79cddbb

View file

@ -15,7 +15,7 @@ class Less
foreach ($files as $input)
{
$filename = substr($input, strripos('/' . $input, '/'), strlen($input));
$output = self::get_output($filename);
$output = self::get_output($input, $filename);
array_push($stylesheets, html::style( self::compile($input, $output), array('media' => $media) ));
}
@ -25,14 +25,14 @@ class Less
return html::style( self::glue($files), array('media' => $media) );
}
public static function get_output($filename)
public static function get_output($input, $filename)
{
$config = Kohana::config('less');
$filepath = $config->path . $filename;
if ( ! file_exists($filepath . '.css'))
{
touch($config->path . $filename . '.css', time() - 3600);
touch($filepath . '.css', filemtime($input . '.less') - 3600);
}
return $filename;
@ -113,4 +113,4 @@ class Less
return $last_modified;
}
}
}