Browse files

fixes for windows

  • Loading branch information...
1 parent 164de16 commit 713fa712133872313c6621229eefdd04d92d6f4a @dereuromark dereuromark committed Oct 25, 2012
View
2 Console/Command/AssetCompressShell.php
@@ -173,7 +173,7 @@ public function getOptionParser() {
return $parser->description(array(
'Asset Compress Shell',
'',
- 'Builds and clears assets defined in you asset_compress.ini',
+ 'Builds and clears assets defined in your asset_compress.ini',
'file and in your view files.'
))->addSubcommand('clear', array(
'help' => 'Clears all builds defined in the ini file.'
View
8 Lib/AssetCache.php
@@ -63,13 +63,13 @@ public function isFresh($target) {
} else {
$time = filemtime($path);
}
- if ($time === false || $time >= $buildTime) {
+ if ($time === false || $time >= $buildTime) {
return false;
}
}
return true;
}
-
+
/**
* Gets the modification time of a remote $url.
* Based on: http://www.php.net/manual/en/function.filemtime.php#81194
@@ -99,11 +99,11 @@ public function getRemoteFileLastModified($url) {
break;
}
}
-
+
fclose($fp);
return $unixtime;
}
-
+
/**
* Set the timestamp for a build file.
*
View
2 Routing/Filter/AssetCompressor.php
@@ -30,7 +30,7 @@ class AssetCompressor extends DispatcherFilter {
public function beforeDispatch($event) {
$url = $event->data['request']->url;
$Config = $this->_getConfig();
- $production = Configure::read('debug') === 0;
+ $production = !Configure::read('debug');
if ($production && !$Config->general('alwaysEnableController')) {
return;
}
View
2 View/Helper/AssetCompressHelper.php
@@ -400,7 +400,7 @@ protected function _getRoute($file, $base) {
}
$query['file'] = $components;
}
- if (substr($base, -1) !== DS) {
+ if (substr($base, -1) !== DS && DS !== '\\') {
$base .= '/';
}
$query = empty($query) ? '' : '?' . http_build_query($query);

0 comments on commit 713fa71

Please sign in to comment.