[Xfce4-commits] [www/forum.xfce.org] 66/79: Revert upstream patch.

noreply at xfce.org noreply at xfce.org
Tue May 21 14:49:01 CEST 2019


This is an automated email from the git hooks/post-receive script.

s   k   u   n   n   y   k       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       o   l   d   f   o   r   u   m   
   in repository www/forum.xfce.org.

commit 33e395fb5a64f842581bff02c20715a54c411df6
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Dec 4 22:53:50 2012 +0100

    Revert upstream patch.
---
 header.php                       |  4 +---
 include/functions.php            | 21 ++-------------------
 include/template/admin.tpl       |  1 +
 include/template/help.tpl        |  1 +
 include/template/main.tpl        |  1 +
 include/template/maintenance.tpl |  1 +
 include/template/redirect.tpl    |  1 +
 misc.php                         |  2 +-
 viewtopic.php                    |  2 +-
 9 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/header.php b/header.php
index 7c5b204..20354fa 100644
--- a/header.php
+++ b/header.php
@@ -17,7 +17,7 @@ header('Cache-Control: post-check=0, pre-check=0', false);
 header('Pragma: no-cache'); // For HTTP/1.0 compatibility
 
 // Send the Content-type header in case the web server is setup to send something else
-header('Content-type: '.get_mime().'; charset=utf-8');
+header('Content-type: text/html; charset=utf-8');
 
 // Load the template
 if (defined('PUN_ADMIN_CONSOLE'))
@@ -86,8 +86,6 @@ ob_start();
 // Define $p if it's not set to avoid a PHP notice
 $p = isset($p) ? $p : null;
 
-echo '<meta http-equiv="Content-Type" content="'.get_mime().'; charset=utf-8" />'."\n";
-
 // Is this a page that we want search index spiders to index?
 if (!defined('PUN_ALLOW_INDEX'))
 	echo '<meta name="ROBOTS" content="NOINDEX, FOLLOW" />'."\n";
diff --git a/include/functions.php b/include/functions.php
index 4e3ec8a..8a0d919 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1205,7 +1205,7 @@ function maintenance_message()
 	header('Pragma: no-cache'); // For HTTP/1.0 compatibility
 
 	// Send the Content-type header in case the web server is setup to send something else
-	header('Content-type: '.get_mime().'; charset=utf-8');
+	header('Content-type: text/html; charset=utf-8');
 
 	// Deal with newlines, tabs and multiple spaces
 	$pattern = array("\t", '  ', '  ');
@@ -1263,7 +1263,6 @@ function maintenance_message()
 	$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_common['Maintenance']);
 
 ?>
-<meta http-equiv="Content-Type" content="<?php echo get_mime() ?>; charset=utf-8" />
 <title><?php echo generate_page_title($page_title) ?></title>
 <link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />
 <?php
@@ -1333,7 +1332,7 @@ function redirect($destination_url, $message)
 	header('Pragma: no-cache'); // For HTTP/1.0 compatibility
 
 	// Send the Content-type header in case the web server is setup to send something else
-	header('Content-type: '.get_mime().'; charset=utf-8');
+	header('Content-type: text/html; charset=utf-8');
 
 	if (file_exists(PUN_ROOT.'style/'.$pun_user['style'].'/redirect.tpl'))
 	{
@@ -1386,7 +1385,6 @@ function redirect($destination_url, $message)
 	$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_common['Redirecting']);
 
 ?>
-<meta http-equiv="Content-Type" content="<?php echo get_mime() ?>; charset=utf-8" />
 <meta http-equiv="refresh" content="<?php echo $pun_config['o_redirect_delay'] ?>;URL=<?php echo $destination_url ?>" />
 <title><?php echo generate_page_title($page_title) ?></title>
 <link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />
@@ -2035,21 +2033,6 @@ function forum_is_writable($path)
 }
 
 
-//
-// This function returns the correct mime type to serve with XHTML
-//
-function get_mime()
-{
-	if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') !== false)
-		return 'application/xhtml+xml';
-	// special check for the W3C validation service
-	else if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') !== false)
-		return 'application/xhtml+xml';
-	else
-		return 'text/html';
-}
-
-
 // DEBUG FUNCTIONS BELOW
 
 //
diff --git a/include/template/admin.tpl b/include/template/admin.tpl
index 4ab3730..5bfc4fa 100644
--- a/include/template/admin.tpl
+++ b/include/template/admin.tpl
@@ -1,6 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<pun_language>" lang="<pun_language>" dir="<pun_content_direction>">
 <head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <pun_head>
 <link rel="stylesheet" media="screen" type="text/css" href="/style/header.css" />
 <style type="text/css">
diff --git a/include/template/help.tpl b/include/template/help.tpl
index ec93d77..58fec14 100644
--- a/include/template/help.tpl
+++ b/include/template/help.tpl
@@ -1,6 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<pun_language>" lang="<pun_language>" dir="<pun_content_direction>">
 <head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <pun_head>
 </head>
 
diff --git a/include/template/main.tpl b/include/template/main.tpl
index 40b8b3a..b62bbd7 100644
--- a/include/template/main.tpl
+++ b/include/template/main.tpl
@@ -1,6 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<pun_language>" lang="<pun_language>" dir="<pun_content_direction>">
 <head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <pun_head>
 <link rel="stylesheet" media="screen" type="text/css" href="/style/header.css" />
 <style type="text/css">
diff --git a/include/template/maintenance.tpl b/include/template/maintenance.tpl
index f3283ea..56edc49 100644
--- a/include/template/maintenance.tpl
+++ b/include/template/maintenance.tpl
@@ -1,6 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<pun_language>" lang="<pun_language>" dir="<pun_content_direction>">
 <head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <pun_head>
 </head>
 
diff --git a/include/template/redirect.tpl b/include/template/redirect.tpl
index ec475b0..31f5f19 100644
--- a/include/template/redirect.tpl
+++ b/include/template/redirect.tpl
@@ -1,6 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<pun_language>" lang="<pun_language>" dir="<pun_content_direction>">
 <head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <pun_head>
 </head>
 
diff --git a/misc.php b/misc.php
index 304d316..98e062b 100644
--- a/misc.php
+++ b/misc.php
@@ -270,7 +270,7 @@ else if (isset($_GET['report']))
 
 		$db->query('UPDATE '.$db->prefix.'users SET last_report_sent='.time().' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
 
-		redirect('viewtopic.php?pid='.$post_id.'#p'.$post_id, $lang_misc['Report redirect']);
+		redirect('viewforum.php?id='.$forum_id, $lang_misc['Report redirect']);
 	}
 
 	// Fetch some info about the post, the topic and the forum
diff --git a/viewtopic.php b/viewtopic.php
index bf0b667..976dcab 100644
--- a/viewtopic.php
+++ b/viewtopic.php
@@ -358,7 +358,7 @@ while ($cur_post = $db->fetch_assoc($result))
 		$user_title = get_title($cur_post);
 
 		if ($pun_user['is_admmod'])
-			$user_info[] = '<dd><span><a href="moderate.php?get_host='.$cur_post['id'].'" title="'.$cur_post['poster_ip'].'">'.$lang_topic['IP address logged'].'</a></span></dd>';
+			$user_info[] = '<dd><span><a href="moderate.php?get_host='.$cur_post['id'].'" title="'.pun_htmlspecialchars($cur_post['poster_ip']).'">'.$lang_topic['IP address logged'].'</a></span></dd>';
 
 		if ($pun_config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$pun_user['is_guest'] && $pun_user['g_send_email'] == '1')
 			$user_contacts[] = '<span class="email"><a href="mailto:'.$cur_post['poster_email'].'">'.$lang_common['Email'].'</a></span>';

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list