From f8a7eb11a8404a4d309ecc7d96eda59cd2bc6460 Mon Sep 17 00:00:00 2001 From: mr-russ Date: Wed, 18 Apr 2007 14:08:48 +0000 Subject: [PATCH] We are using XHTML now and HTML is not an option. The headers config has been updated to allow you to choose between Transitional and Strict. Updates were also applied to correctly identify the frameset in use. --- classes/Misc.php | 32 +++++++++++++++----------------- conf/config.inc.php-dist | 8 ++++---- index.php | 4 ++-- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/classes/Misc.php b/classes/Misc.php index 4a871c5b..68b62169 100644 --- a/classes/Misc.php +++ b/classes/Misc.php @@ -2,7 +2,7 @@ /** * Class to hold various commonly used functions * - * $Id: Misc.php,v 1.141 2007/04/13 11:18:11 mr-russ Exp $ + * $Id: Misc.php,v 1.142 2007/04/18 14:08:48 mr-russ Exp $ */ class Misc { @@ -352,30 +352,28 @@ * @param $title The title of the page * @param $script script tag */ - function printHeader($title = '', $script = null) { + function printHeader($title = '', $script = null, $frameset = false) { global $appName, $lang, $_no_output, $conf; if (!isset($_no_output)) { header("Content-Type: text/html; charset=" . $lang['appcharset']); - // Send XHTML headers, or regular HTML headers - if (isset($conf['use_xhtml']) && $conf['use_xhtml']) { - $closeTag = "/"; - echo "\n"; + // Send XHTML headers, or regular XHTML strict headers + echo "\n"; + if ($frameset !== null) { + echo "\n"; + } else if (isset($conf['use_xhtml_strict']) && $conf['use_xhtml_strict']) { + echo "\n"; + } else { echo "\n"; - echo "\n"; - } else { - $closeTag = ""; - echo "\n"; - echo "\n"; } + echo "\n"; + echo "\n"; - echo "\n"; + echo "\n"; // Theme - echo "\n"; + echo "\n"; echo "", htmlspecialchars($appName); if ($title != '') echo " - {$title}"; echo "\n"; diff --git a/conf/config.inc.php-dist b/conf/config.inc.php-dist index a8f9c933..b1072742 100644 --- a/conf/config.inc.php-dist +++ b/conf/config.inc.php-dist @@ -4,7 +4,7 @@ * Central phpPgAdmin configuration. As a user you may modify the * settings here for your particular configuration. * - * $Id: config.inc.php-dist,v 1.52 2007/04/14 08:00:03 mr-russ Exp $ + * $Id: config.inc.php-dist,v 1.53 2007/04/18 14:08:48 mr-russ Exp $ */ // An example server. Create as many of these as you wish, @@ -121,8 +121,8 @@ // Max chars of each field to display by default in browse mode $conf['max_chars'] = 50; - // Send XHTML headers? - $conf['use_xhtml'] = false; + // Send XHTML strict headers? + $conf['use_xhtml_strict'] = false; // Base URL for PostgreSQL documentation. // '%s', if present, will be replaced with the PostgreSQL version @@ -133,6 +133,6 @@ * Don't modify anything below this line * *****************************************/ - $conf['version'] = 18; + $conf['version'] = 19; ?> diff --git a/index.php b/index.php index f506fcd3..9fe0c860 100755 --- a/index.php +++ b/index.php @@ -3,13 +3,13 @@ /** * Main access point to the app. * - * $Id: index.php,v 1.12 2005/05/02 15:47:23 chriskl Exp $ + * $Id: index.php,v 1.13 2007/04/18 14:08:48 mr-russ Exp $ */ // Include application functions $_no_db_connection = true; include_once('./libraries/lib.inc.php'); - $misc->printHeader(); + $misc->printHeader('', null, true); $rtl = (strcasecmp($lang['applangdir'], 'rtl') == 0); -- 2.39.5