From b0aabd0559eb6ca70af2ffeb35299b63d7edf097 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sat, 3 Oct 2009 15:24:04 -0400 Subject: Fixed voting issue Because XHTML was accidentally disabled in the previous changeset, a new error was found that, when in HTML mode (required for IE and layouts prior to 7), voting did not work due to the encoded ampherstand in the query string. This is odd because what works in XHTML should also work in HTML. So, to fix this, XHTML was re-enabled and now the ampherstand is only encoded when XHTML mode is on. Also fixed some positioning errors with the tails of bubbles. --- index.php | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index d110743..7a958ee 100755 --- a/index.php +++ b/index.php @@ -20,14 +20,6 @@ require('headerproc.php'); -if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $_SERVER['HTTP_USER_AGENT'], $matched)) -{ - header('Content-type: text/html'); - $usingIE = true; -} else { -// header('Content-type: application/xhtml+xml'); -} - header('X-Pingback: http://fourisland.com/xmlrpc.php'); include('../security/config.php'); @@ -42,6 +34,32 @@ include('includes/functions.php'); include('includes/hits.php'); include('includes/updatePending.php'); +if (isset($_GET['layout'])) +{ + if (!file_exists('theme/layouts/' . basename($_GET['layout']))) + { + $_GET['layout'] = '7'; + } + + setcookie('layout', $_GET['layout'], time()+60*60*24*30, '/', '.fourisland.com'); + + unset($_GET['layout']); + + header('Location: ' . getRewriteURL()); + exit; +} + +if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $_SERVER['HTTP_USER_AGENT'], $matched)) +{ + $usingIE = true; +} else { + if (getLayout() == '7') + { + header('Content-type: application/xhtml+xml'); + $xhtml = true; + } +} + if (strpos($_SERVER['REQUEST_URI'],'index.php')) { header('Location: ' . getRewriteURL()); -- cgit 1.4.1