parseStylesheet(); // Apply sanitization to the stylehseet $sanitizer = StylesheetSanitizer::newDefault(); $newStylesheet = $sanitizer->sanitize( $stylesheet ); // Convert the sanitized stylesheet back to text $outputcss = Wikimedia\CSS\Util::stringify( $newStylesheet, [ 'minify' => true ] ); file_put_contents($cssfile, $outputcss); if (!$invalidate) echo $outputcss; } else { // Either no modifications (status: 304) or an error condition. if ($invalidate) die('Error: custom CSS file not found'); if ($lastmodified) readfile($cssfile); } touch($cssfile, $timenow); // Don't check again for an hour. } else if (file_exists($cssfile)) { if ($invalidate) die('Error: custom CSS file not found'); readfile($cssfile); } curl_close($curl); if ($invalidate) { ?>

Done: was reloaded.

Back to server management