Skip to content
This repository has been archived by the owner on Mar 10, 2018. It is now read-only.

Windows compatibility #14

Open
ansata2001 opened this issue Apr 4, 2012 · 0 comments
Open

Windows compatibility #14

ansata2001 opened this issue Apr 4, 2012 · 0 comments

Comments

@ansata2001
Copy link

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);
     }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant