Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Switched back to using modified date instead of file contents.

  • Loading branch information...
commit 4a60db7c179fadf570c8e19fdc9b1b17337c6f05 1 parent 4b67bb5
@STRML STRML authored
View
4 wordless/preprocessors/compass_preprocessor.php
@@ -42,10 +42,10 @@ protected function asset_hash($file_path) {
sort($files);
$hash_seed = array();
foreach ($files as $file) {
- $hash_seed[] = file_get_contents($file);
+ $hash_seed[] = $file . date("%U", filemtime($file));
}
// Concat original file onto hash seed for uniqueness so each file is unique
- $hash_seed[] = file_get_contents($file_path);
+ $hash_seed[] = $file_path;
return md5(join($hash_seed));
}
View
4 wordless/preprocessors/less_preprocessor.php
@@ -37,10 +37,10 @@ protected function asset_hash($file_path) {
sort($files);
$hash_seed = array();
foreach ($files as $file) {
- $hash_seed[] = file_get_contents($file);
+ $hash_seed[] = $file . date("%U", filemtime($file));
}
// Concat original file onto hash seed for uniqueness so each file is unique
- $hash_seed[] = file_get_contents($file_path);
+ $hash_seed[] = $file_path;
return md5(join($hash_seed));
}
View
4 wordless/preprocessors/sprockets_preprocessor.php
@@ -38,10 +38,10 @@ protected function asset_hash($file_path) {
sort($files);
$hash_seed = array();
foreach ($files as $file) {
- $hash_seed[] = file_get_contents($file);
+ $hash_seed[] = $file . date("%U", filemtime($file));
}
// Concat original file onto hash seed for uniqueness so each file is unique
- $hash_seed[] = file_get_contents($file_path);
+ $hash_seed[] = $file_path;
return md5(join($hash_seed));
}
View
4 wordless/preprocessors/wordless_preprocessor.php
@@ -92,8 +92,8 @@ protected function comment_line($line) {
*
*/
protected function asset_hash($file_path) {
- // First we get the file content
- $hash_seed = file_get_contents($file_path);
+ // First we get the file's modified date
+ $hash_seed = date("%U", filemtime($file_path));
// Then we attach the preferences
foreach ($this->preferences_defaults as $pref => $value) {
Please sign in to comment.
Something went wrong with that request. Please try again.