$inject = true; } # Run through HTML parser $document = $parser->HTMLDocument($document, $insert, $inject, $footer); break; # CSS file # CSS file case 'css': # Run through CSS parser $document = $parser->CSS($document); break; # Javascript file # Javascript file case 'javascript': # Run through javascript parser $document = $parser->JS($document); break; } # Apply postparsing from plugins if ($foundPlugin && function_exists('postParse')) { $document = postParse($document, $fetch->parseType); } # Send output if (!DEBUG_MODE) { # Do we want to gzip this? Yes, if all of the following are true: # - gzip option enabled # - client supports gzip # - zlib extension loaded # - output compression not automated if ($CONFIG['gzip_return'] && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && extension_loaded('zlib') && !ini_get('zlib.output_compression')) { # Send compressed (using level 3 compression - can be adjusted