]> git.mjollnir.org Git - moodle.git/commitdiff
Add an option $CFG->CSSEdit or $THEME->CSSEdit to Moodle. If one of both is set to...
authorurs_hunkler <urs_hunkler>
Sat, 23 Jun 2007 12:21:59 +0000 (12:21 +0000)
committerurs_hunkler <urs_hunkler>
Sat, 23 Jun 2007 12:21:59 +0000 (12:21 +0000)
lib/weblib.php

index 129487a47a482cfee2ac9df1af9d25ed48d69ca7..6604a6af7c883b25936f2719de0ab09e677eadcf 100644 (file)
@@ -2920,10 +2920,22 @@ function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $force
             echo replace_cssconstants($css);
         } else {
         /// Actually output all the files in order.
-            foreach ($files as $file) {
-                echo '/***** '.$file[1].' start *****/'."\n\n";
-                @include_once($file[0].'/'.$file[1]);
-                echo '/***** '.$file[1].' end *****/'."\n\n";
+            if (empty($CFG->CSSEdit) && empty($THEME->CSSEdit)) {
+                foreach ($files as $file) {
+                    echo '/***** '.$file[1].' start *****/'."\n\n";
+                    @include_once($file[0].'/'.$file[1]);
+                    echo '/***** '.$file[1].' end *****/'."\n\n";
+                }
+            } else {
+                foreach ($files as $file) {
+                    echo '/* @group '.$file[1].' */'."\n\n";
+                    if (strstr($file[1], '.css') !== FALSE) {
+                        echo '@import url("'.$CFG->themewww.'/'.$file[1].'");'."\n\n";
+                    } else {
+                        @include_once($file[0].'/'.$file[1]);
+                    }
+                    echo '/* @end */'."\n\n";
+                }
             }
         }
     }