Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't encode binary files

  • Loading branch information...
commit 85d985a31926fddcd02b858bed43eb7f5a8e20ea 1 parent 5d25786
@vrana authored
Showing with 10 additions and 10 deletions.
  1. +8 −8 adminer/file.inc.php
  2. +1 −1  compile.php
  3. +1 −1  todo.txt
View
16 adminer/file.inc.php
@@ -3,21 +3,21 @@
if ($_GET["file"] == "favicon.ico") {
header("Content-Type: image/x-icon");
- echo base64_decode("compile_file('../adminer/static/favicon.ico', 'base64_encode');");
+ echo 'compile_file("../adminer/static/favicon.ico", "add_apo_slashes");';
} elseif ($_GET["file"] == "default.css") {
header("Content-Type: text/css; charset=utf-8");
- ?>compile_file('../adminer/static/default.css', 'minify_css');<?php
+ ?>compile_file("../adminer/static/default.css", "minify_css");<?php
} elseif ($_GET["file"] == "functions.js") {
header("Content-Type: text/javascript; charset=utf-8");
- ?>compile_file('../adminer/static/functions.js', 'jsShrink');compile_file('static/editing.js', 'jsShrink');<?php
+ ?>compile_file("../adminer/static/functions.js", "jsShrink");compile_file("static/editing.js", "jsShrink");<?php
} else {
header("Content-Type: image/gif");
switch ($_GET["file"]) {
- case "plus.gif": echo base64_decode("compile_file('../adminer/static/plus.gif', 'base64_encode');"); break;
- case "cross.gif": echo base64_decode("compile_file('../adminer/static/cross.gif', 'base64_encode');"); break;
- case "up.gif": echo base64_decode("compile_file('../adminer/static/up.gif', 'base64_encode');"); break;
- case "down.gif": echo base64_decode("compile_file('../adminer/static/down.gif', 'base64_encode');"); break;
- case "arrow.gif": echo base64_decode("compile_file('../adminer/static/arrow.gif', 'base64_encode');"); break;
+ case "plus.gif": echo 'compile_file("../adminer/static/plus.gif", "add_apo_slashes");'; break;
+ case "cross.gif": echo 'compile_file("../adminer/static/cross.gif", "add_apo_slashes");'; break;
+ case "up.gif": echo 'compile_file("../adminer/static/up.gif", "add_apo_slashes");'; break;
+ case "down.gif": echo 'compile_file("../adminer/static/down.gif", "add_apo_slashes");'; break;
+ case "arrow.gif": echo 'compile_file("../adminer/static/arrow.gif", "add_apo_slashes");'; break;
}
}
exit;
View
2  compile.php
@@ -328,7 +328,7 @@ function compile_file($match) {
$file = str_replace('<?php echo $LANG; ?>', $_SESSION["lang"], $file);
}
$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
+ $file = preg_replace_callback('~compile_file\\("([^"]+)", "([^"]+)"\\);~', 'compile_file', $file); // integrate static files
$replace = 'h(preg_replace("~\\\\\\\\?.*~", "", ME)) . "?file=\\1&amp;version=' . $VERSION;
$file = preg_replace('~\\.\\./adminer/static/(default\\.css|functions\\.js|favicon\\.ico)~', '<?php echo ' . $replace . '"; ?>', $file);
$file = preg_replace('~\\.\\./adminer/static/([^\'"]*)~', '" . ' . $replace, $file);
View
2  todo.txt
@@ -13,7 +13,7 @@ Selectable <option>(on update)<option>CURRENT_TIMESTAMP for timestamp - https://
? Filter by value in row under <thead> in select
? Column and table names auto-completition in SQL textarea - http://blog.quplo.com/2010/06/css-code-completion-in-your-browser/
? Aliasing of built-in functions can save 7 KB, function minification can save 7 KB, substitution of repetitive $a["a"] can save 4 KB, substitution of $_GET and friends can save 2 KB, aliasing of $connection->query can save 24 B, JS Closure compiler can save 2 KB, not enclosing HTML attribute values can save 1.2 KB, replacing \\n by \n can save .3 KB
-? Branch binary_compile: LZW compression of translations can save 30 KB, LZW compression of all texts can save 11 KB, remove of base64_decode() + using chars 127-255 in minification can save 1 KB
+? Branch binary_compile: LZW compression of all texts can save 11 KB, using chars 127-255 in minification can save 1 KB
Editor:
Three-state checkbox for boolean searches
Please sign in to comment.
Something went wrong with that request. Please try again.