Skip to content
Browse files

Introduce Adminer::headers method

  • Loading branch information...
1 parent 1cd506e commit 9db425940987b2a45af9feecefa9419d81685320 @vrana committed Oct 17, 2010
Showing with 13 additions and 1 deletion.
  1. +7 −0 adminer/include/adminer.inc.php
  2. +1 −1 adminer/include/design.inc.php
  3. +1 −0 changes.txt
  4. +4 −0 editor/include/adminer.inc.php
View
7 adminer/include/adminer.inc.php
@@ -32,6 +32,13 @@ function database() {
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
*/
View
2 adminer/include/design.inc.php
@@ -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");
?>
View
1 changes.txt
@@ -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
View
4 editor/include/adminer.inc.php
@@ -26,6 +26,10 @@ function database() {
);
}
+ function headers() {
+ header("X-Frame-Options: deny");
+ }
+
function loginForm() {
?>
<table cellspacing="0">

0 comments on commit 9db4259

Please sign in to comment.
Something went wrong with that request. Please try again.