[Hastymail-cvs] SF.net SVN: hastymail:[1105] trunk/hastymail2/lib/misc_functions.php
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2009-10-26 14:24:21
|
Revision: 1105 http://hastymail.svn.sourceforge.net/hastymail/?rev=1105&view=rev Author: sailfrog Date: 2009-10-26 14:24:13 +0000 (Mon, 26 Oct 2009) Log Message: ----------- remove forced html doctype (don't think we need this anymore) Modified Paths: -------------- trunk/hastymail2/lib/misc_functions.php Modified: trunk/hastymail2/lib/misc_functions.php =================================================================== --- trunk/hastymail2/lib/misc_functions.php 2009-10-26 13:38:54 UTC (rev 1104) +++ trunk/hastymail2/lib/misc_functions.php 2009-10-26 14:24:13 UTC (rev 1105) @@ -157,19 +157,12 @@ /* HTTP headers, XML declaration, doc type */ function set_page_headers($force_html=false) { global $pd; - if (!$force_html && isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') !== false) { - if ($pd->html_content_type == 'xhtml') { - header("Content-Type: application/xhtml+xml; charset=utf-8"); - } - $declaration = '<?xml version="1.0" encoding="UTF-8"?>'. - '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'. - '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'; + if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') !== false && $pd->html_content_type == 'xhtml') { + header("Content-Type: application/xhtml+xml; charset=utf-8"); } - else { - header('Vary: Accept'); - header("Content-Type: text/html; charset=utf-8"); - $declaration = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>'; - } + $declaration = '<?xml version="1.0" encoding="UTF-8"?>'. + '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'. + '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'; echo $declaration; } /* print timestamp as a difference from now in human readable form */ @@ -748,13 +741,7 @@ foreach ($tags as $id => $val) { $string = remove_tags($string, $id, $val); } - if (isset($conf['html_message_iframe']) && $conf['html_message_iframe']) { - $force_html = false; - } - else { - $force_html = true; - } - set_page_headers($force_html); + set_page_headers(); echo $string; } function remove_tags($string, $tag_name, $strip) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |