Skip to content

Commit

Permalink
Switched back to using modified date instead of file contents.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Reed committed Sep 19, 2012
1 parent 4b67bb5 commit 4a60db7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions wordless/preprocessors/compass_preprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
4 changes: 2 additions & 2 deletions wordless/preprocessors/less_preprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
4 changes: 2 additions & 2 deletions wordless/preprocessors/sprockets_preprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
4 changes: 2 additions & 2 deletions wordless/preprocessors/wordless_preprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4a60db7

Please sign in to comment.