mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
Designs: Don't sniff protocol-relative URLs
This commit is contained in:
@@ -35,7 +35,7 @@ function page_header(string $title, string $error = "", $breadcrumb = array(), s
|
||||
if (strpos($url, "adminer.css") !== false) {
|
||||
$has_light = true;
|
||||
$filename = preg_replace('~\?.*~', '', $url);
|
||||
if (!preg_match('~:~', $url) && is_readable($filename) && preg_match('~prefers-color-scheme:\s*dark~', file_get_contents($filename))) {
|
||||
if (!preg_match('~//~', $url) && is_readable($filename) && preg_match('~prefers-color-scheme:\s*dark~', file_get_contents($filename))) {
|
||||
$has_dark = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user