{'$format'} !== 1) $cssFatal("Invalid theme format"); foreach ($theme->files as $file) { if (is_array($file)) { if ($enableLogging) $buffer .= "/*!INLINE start */\n"; $buffer .= implode("\n", $file); if ($enableLogging) $buffer .= "/*!INLINE end */\n"; } elseif (is_file($filePath = $themeDir . "/" . $file)) { if ($enableLogging) $buffer .= "/*!INCLUDE " . basename($file) . " */\n"; $buffer .= file_get_contents($filePath); if ($enableLogging) $buffer .= "/*!INCLUDE end */\n"; } else $cssError($buffer, "Could not include file $file"); } $etag = md5($buffer); $ifNoneMatch = $_SERVER["HTTP_IF_NONE_MATCH"] ?? null; if ($ifNoneMatch !== null) { $ifNoneMatch = trim($ifNoneMatch, '"'); if ($etag_strip_gzip_suffix) $ifNoneMatch = preg_replace('/-gzip$/', '', $ifNoneMatch); } header("ETag: \"$etag\""); if ($ifNoneMatch === $etag) http_response_code(304); else echo $buffer;