Permalink
Browse files

Merge branch 'hotfix/1.10'

  • Loading branch information...
2 parents eaad706 + 9defaa4 commit 4314975d86902196615861fc6e4d896f8cdb832d @canton7 canton7 committed Aug 25, 2011
Showing with 28 additions and 26 deletions.
  1. +2 −2 bootstrap.php
  2. +6 −1 changelog.md
  3. +12 −15 classes/casset.php
  4. +2 −2 classes/casset/csscompressor.php
  5. +2 −2 classes/casset/cssurirewriter.php
  6. +2 −2 classes/casset/jsmin.php
  7. +2 −2 config/casset.php
View
4 bootstrap.php
@@ -4,7 +4,7 @@
* Casset: Convenient asset library for FuelPHP.
*
* @package Casset
- * @version v1.9
+ * @version v1.10
* @author Antony Male
* @license MIT License
* @copyright 2011 Antony Male
@@ -21,4 +21,4 @@
'Casset\\Casset_Cssurirewriter' => __DIR__.'/classes/casset/cssurirewriter.php',
));
-/* End of file bootstrap.php */
+/* End of file bootstrap.php */
View
7 changelog.md
@@ -3,6 +3,11 @@ Changelog
This file lists the important changes between versions. For a list of minor changes, check the log.
+v1.10
+-----
+Hotfix release.
+Fixed #3, reported by krtek4, where render_css had an erroneous second loop, meaning that it would render files when it wasn't supposed to
+
v1.9
---
Hotfix release.
@@ -17,4 +22,4 @@ v1.8
- `Casset::render()` lost its 'min' parameter. Instead, minification can be controlled on a per-group basis from the config file.
- 'combine' option added. Read the readme ("Minification and combining") for details on how to use this with the 'min' option. This addition changes the behaviour of 'min' slighlty, but shouldn't break anything.
- Assets at remote locations are now supported. There are (necessarily) some gotchas, so please read the readme!
-- The 'enabled' option in the 'groups' config key is now optional, and defaults to true.
+- The 'enabled' option in the 'groups' config key is now optional, and defaults to true.
View
27 classes/casset.php
@@ -4,7 +4,7 @@
* Casset: Convenient asset library for FuelPHP.
*
* @package Casset
- * @version v1.9
+ * @version v1.10
* @author Antony Male
* @license MIT License
* @copyright 2011 Antony Male
@@ -548,21 +548,18 @@ public static function render_css($group = false, $inline = false, $attr = array
}
else
{
- foreach ($file_groups as $group_name => $file_group)
+ foreach ($file_group as $file)
{
- foreach ($file_group as $file)
+ if ($inline)
+ $ret .= html_tag('style', array('type' => 'text/css')+$attr, PHP_EOL.file_get_contents($file['file']).PHP_EOL).PHP_EOL;
+ else
{
- if ($inline)
- $ret .= html_tag('style', array('type' => 'text/css')+$attr, PHP_EOL.file_get_contents($file['file']).PHP_EOL).PHP_EOL;
- else
- {
- $base = (strpos($file['file'], '//') === false) ? static::$asset_url : '';
- $ret .= html_tag('link', array(
- 'rel' => 'stylesheet',
- 'type' => 'text/css',
- 'href' => $base.$file['file'],
- )+$attr).PHP_EOL;
- }
+ $base = (strpos($file['file'], '//') === false) ? static::$asset_url : '';
+ $ret .= html_tag('link', array(
+ 'rel' => 'stylesheet',
+ 'type' => 'text/css',
+ 'href' => $base.$file['file'],
+ )+$attr).PHP_EOL;
}
}
}
@@ -806,4 +803,4 @@ private static function clear_cache_base($filter = '*', $before = 'now')
}
-/* End of file casset.php */
+/* End of file casset.php */
View
4 classes/casset/csscompressor.php
@@ -17,7 +17,7 @@
* This library is used as part of Casset.
*
* @package Casset
- * @version v1.9
+ * @version v1.10
* @author Antony Male
* @license MIT License
* @link http://github.com/canton7/fuelphp-casset
@@ -256,4 +256,4 @@ protected function _fontFamilyCB($m)
}
}
-/* End of file casset/csscompressor.php */
+/* End of file casset/csscompressor.php */
View
4 classes/casset/cssurirewriter.php
@@ -10,7 +10,7 @@
* This library is used as part of Casset.
*
* @package Casset
- * @version v1.9
+ * @version v1.10
* @author Antony Male
* @license MIT License
* @link http://github.com/canton7/fuelphp-casset
@@ -278,4 +278,4 @@ protected static function _realpath($path)
}
}
-/* End of file casset/cssurirewriter.php */
+/* End of file casset/cssurirewriter.php */
View
4 classes/casset/jsmin.php
@@ -52,7 +52,7 @@
/**
* This library is used as part of Casset.
* @package Casset
- * @version v1.7
+ * @version v1.10
* @author Antony Male
* @license MIT License
* @link http://github.com/canton7/fuelphp-casset
@@ -324,4 +324,4 @@ class JSMin_UnterminatedStringException extends \Exception {}
class JSMin_UnterminatedCommentException extends \Exception {}
class JSMin_UnterminatedRegExpException extends \Exception {}
-/* End of file casset/jsmin.php */
+/* End of file casset/jsmin.php */
View
4 config/casset.php
@@ -4,7 +4,7 @@
* Casset: Convenient asset library for FuelPHP.
*
* @package Casset
- * @version v1.9
+ * @version v1.10
* @author Antony Male
* @license MIT License
* @copyright 2011 Antony Male
@@ -172,4 +172,4 @@
),
);
-/* End of file config/casset.php */
+/* End of file config/casset.php */

0 comments on commit 4314975

Please sign in to comment.