Skip to content

Commit

Permalink
stop balastu!
Browse files Browse the repository at this point in the history
  • Loading branch information
janmarek committed Oct 7, 2010
1 parent c9d185a commit af9886a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions WebLoader.php
Expand Up @@ -366,9 +366,13 @@ public function getGeneratedFilename(array $files = null) {
$files = $this->files;
}

return $this->generatedFileNamePrefix . md5(
implode("|", $files) . "|" . $this->getLastModified($files)
) . $this->generatedFileNameSuffix;
$name = md5(implode("|", $files));

if (count($files) === 1) {
$name .= "-" . pathinfo($files[0], PATHINFO_FILENAME);
}

return $this->generatedFileNamePrefix . $name . $this->generatedFileNameSuffix;
}


Expand Down Expand Up @@ -407,7 +411,7 @@ protected function generate($files) {

$path = $this->tempPath . "/" . $name;

if (!file_exists($path)) {
if (!file_exists($path) || $this->getLastModified($files) > filemtime($path)) {
if (!in_array(SafeStream::PROTOCOL, stream_get_wrappers())) {
SafeStream::register();
}
Expand Down

0 comments on commit af9886a

Please sign in to comment.