]> git.joonet.de Git - adminer.git/commitdiff
Optimize compiling files
authorJakub Vrana <jakub@vrana.cz>
Wed, 9 Feb 2011 14:28:45 +0000 (15:28 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 9 Feb 2011 14:28:45 +0000 (15:28 +0100)
adminer/include/design.inc.php
adminer/static/default.css
compile.php

index a74b69139ab81f011ff74f311d682e9f2560c0bb..efdc7a9de4c096b8855b241e1f746e59fe2037f2 100644 (file)
@@ -24,7 +24,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
 <meta name="robots" content="noindex">
 <title><?php echo $title_page; ?></title>
 <link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
-<link rel="stylesheet" type="text/css" href="../adminer/static/default.css<?php // Ondrej Valka, http://valka.info ?>">
+<link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
 <?php if (file_exists("adminer.css")) { ?>
 <link rel="stylesheet" type="text/css" href="adminer.css">
 <?php } ?>
index 7b8e9bd7924e5e5f78658bdeb73cf1c077249736..76aa335f370b9329c7b3e14726c134b4854c3040 100644 (file)
@@ -1,3 +1,4 @@
+/** @author Ondrej Valka, http://valka.info */
 body { color: #000; background: #fff; font: 90%/1.25 Verdana, Arial, Helvetica, sans-serif; margin: 0; }
 a { color: blue; }
 a:visited { color: navy; }
index 5a6e3894bc5dce01f43816b0ba783b8f54cee938..39356558f4ef837b0a11023c07ecb804fb8a4179 100644 (file)
@@ -173,7 +173,7 @@ function php_shrink($input) {
 }
 
 function minify_css($file) {
-       return preg_replace('~\\s*([:;{},])\\s*~', '\\1', $file);
+       return preg_replace('~\\s*([:;{},])\\s*~', '\\1', preg_replace('~/\\*.*\\*/~sU', '', $file));
 }
 
 function compile_file($match) {
@@ -261,7 +261,7 @@ foreach (array("adminer", "editor") as $project) {
        }
        $file = str_replace('<script type="text/javascript" src="static/editing.js"></script>' . "\n", "", $file);
        $file = preg_replace_callback("~compile_file\\('([^']+)', '([^']+)'\\);~", 'compile_file', $file); // integrate static files
-       $replace = 'h(preg_replace("~\\\\\\\\?.*~", "", $_SERVER["REQUEST_URI"])) . "?file=\\1&amp;version=' . $VERSION;
+       $replace = 'h(preg_replace("~\\\\\\\\?.*~", "", ME)) . "?file=\\1&amp;version=' . $VERSION;
        $file = preg_replace('~\\.\\./adminer/static/(loader\\.gif)~', "'+location.pathname+'?file=\\1&amp;version=$VERSION", $file);
        $file = preg_replace('~\\.\\./adminer/static/(default\\.css|functions\\.js|favicon\\.ico)~', '<?php echo ' . $replace . '"; ?>', $file);
        $file = preg_replace('~\\.\\./adminer/static/([^\'"]*)~', '" . ' . $replace, $file);