]> git.joonet.de Git - adminer.git/commitdiff
Introduce Adminer::headers method
authorJakub Vrana <jakub@vrana.cz>
Sun, 17 Oct 2010 20:13:32 +0000 (22:13 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sun, 17 Oct 2010 20:13:32 +0000 (22:13 +0200)
adminer/include/adminer.inc.php
adminer/include/design.inc.php
changes.txt
editor/include/adminer.inc.php

index d96921339a2be2565a21747e3e2495e68daac0ed..a9253eae1ca88d008bf827b5bf2b103a5fa030f6 100644 (file)
@@ -32,6 +32,13 @@ class Adminer {
                return DB;
        }
        
+       /** Headers to send before HTML output
+       * @return null
+       */
+       function headers() {
+               header("X-Frame-Options: deny"); // ClickJacking protection in IE8, Safari 4, Chrome 2, Firefox NoScript plugin
+       }
+       
        /** Print login form
        * @return null
        */
index 621ec5bc6d92dc5b91e23f1ae8a0748398bb6bf3..445a7b24a687f112457cf5802b4dc4274efc0289 100644 (file)
@@ -9,7 +9,7 @@
 function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
        global $LANG, $HTTPS, $adminer, $connection, $drivers;
        header("Content-Type: text/html; charset=utf-8");
-       header("X-Frame-Options: deny"); // ClickJacking protection in IE8, Safari 4, Chrome 2, Firefox NoScript plugin
+       $adminer->headers();
        $title_all = $title . ($title2 != "" ? ": " . h($title2) : "");
        $protocol = ($HTTPS ? "https" : "http");
        ?>
index ac845ee912f546c538ddd718141623dd90012d6e..87894e2bcd92cc6bf041ad323f4ab48a2711a1b1 100644 (file)
@@ -1,6 +1,7 @@
 Adminer 3.0.1-dev:
 Send the form by Ctrl+Enter in all textareas
 Disable creating SQLite databases with extension other than db, sdb, sqlite
+Ability to use Adminer in a frame through customization
 Catalan translation
 MS SQL 2005 compatibility
 PostgreSQL: connect if the eponymous database does not exist
index e7c747607eba550b3c9225a64786c04771619bcc..8014e74c67e89104d4e9b80b64f2d4519ec2c790 100644 (file)
@@ -26,6 +26,10 @@ class Adminer {
                );
        }
        
+       function headers() {
+               header("X-Frame-Options: deny");
+       }
+       
        function loginForm() {
                ?>
 <table cellspacing="0">