Windows compatibility
Opened this issue · 0 comments
ansata2001 commented
The current revision of plugin doesn't work on windows servers, here are 2 patches to fix the issue
Index: swCombineStylesheet.class.php
===================================================================
--- swCombineStylesheet.class.php (revision 47)
+++ swCombineStylesheet.class.php (working copy)
@@ -140,7 +140,7 @@
if($file)
{
- return 'url('.$file.')';
+ return 'url('.str_replace('\\', '/', $file).')';
}
$this->logSection('fix-image', 'unable to find the file : '.$matches[2]);
AND
Index: swOptimizeCreateFilesTask.class.php
===================================================================
--- swOptimizeCreateFilesTask.class.php (revision 47)
+++ swOptimizeCreateFilesTask.class.php (working copy)
@@ -146,9 +146,10 @@
->maxdepth(0)
->in(sfConfig::get('sf_app_module_dir'));
+ $r = str_replace("\\", '/', sfConfig::get('sf_app_module_dir').'/');
foreach($app_modules as $module)
{
- $modules[] = str_replace(sfConfig::get('sf_app_module_dir').'/', '', $module);
+ $modules[] = str_replace($r, '', $module);
}