]> git.joonet.de Git - adminer.git/commitdiff
Allow own code in <head> (thanks to Nikolaj Vasilcuk)
authorJakub Vrana <jakub@vrana.cz>
Wed, 23 Mar 2011 10:57:35 +0000 (11:57 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 23 Mar 2011 10:57:35 +0000 (11:57 +0100)
adminer/include/adminer.inc.php
adminer/include/design.inc.php
changes.txt
editor/include/adminer.inc.php
plugins/plugin.php

index 0a3ae17d5c6a571fbbed324dd5cec5f1db820c5c..f5464ca0b70106816823afd6453213effc4fb808 100644 (file)
@@ -40,6 +40,13 @@ class Adminer {
                header("X-XSS-Protection: 0"); // prevents introducing XSS in IE8 by removing safe parts of the page
        }
        
+       /** Print HTML code inside <head>
+       * @return bool true to link adminer.css if exists
+       */
+       function head() {
+               return true;
+       }
+       
        /** Print login form
        * @return null
        */
index 245efa888f0966dea6bede9c31a14ac548d6177d..1d5deec84595754ac4aac25567b575c2ff4ed864 100644 (file)
@@ -24,7 +24,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
 <title><?php echo $title_page; ?></title>
 <link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico" id="favicon">
 <link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
-<?php if (file_exists("adminer.css")) { ?>
+<?php if ($adminer->head() && file_exists("adminer.css")) { ?>
 <link rel="stylesheet" type="text/css" href="adminer.css">
 <?php } ?>
 
index d78b00e8d34d65d67c921dcc0cad7ba341cbbdb1..788178fcf48cafb3e70d8c148d13fddf6fd4f1ee 100644 (file)
@@ -7,15 +7,16 @@ Send forms by Ctrl+Enter on <select>
 Enum editor and textarea Ctrl+Enter working in IE
 AJAX forms in Google Chrome
 Parse UTF-16 and UTF-8 BOM in all text uploads
+Display ; in history (thanks to Jan Cerny)
 Use DELIMITER in history
 Show databases even with skip_show_database in MySQL 5 (thanks to Radoslaw Kowalewski)
 Set MySQL time zone by PHP setting
 Disable maxlength with functions in edit
 Better placement of AJAX icon
-Display ; in history (thanks to Jan Cerny)
 Table header in CSV export (Editor)
 Time format hint (Editor)
 Respect order after search (Editor)
+Allow own code in <head> (customization)
 Polish translation
 
 Adminer 3.2.0 (released 2011-02-24):
index 63a28d53cd1f3598a02e3b6caf3a4805f54eb94a..030e73f33d0b4d5b0a7b9d42a87c279d7bb3d131 100644 (file)
@@ -31,6 +31,10 @@ class Adminer {
                header("X-XSS-Protection: 0");
        }
        
+       function head() {
+               return true;
+       }
+       
        function loginForm() {
                ?>
 <table cellspacing="0">
index 914885ede93876d3f530e3aaa5cb5f2b3e4817b9..3d365d55e4552ec5e2af0d20875ea59f95604100 100644 (file)
@@ -89,6 +89,11 @@ class AdminerPlugin extends Adminer {
                return $this->_applyPlugin(__FUNCTION__, $args);
        }
 
+       function head() {
+               $args = func_get_args();
+               return $this->_applyPlugin(__FUNCTION__, $args);
+       }
+
        function loginForm() {
                $args = func_get_args();
                return $this->_applyPlugin(__FUNCTION__, $args);