Remove Content-Type header; HTML5 meta tags do this for us.

This commit is contained in:
Floorb 2021-08-22 22:11:57 -04:00
parent 25fdaf66b8
commit 8ff3e95488
11 changed files with 0 additions and 50 deletions

View file

@ -2,9 +2,6 @@
define('IN_PONEPASTE', 1); define('IN_PONEPASTE', 1);
require_once('includes/common.php'); require_once('includes/common.php');
// UTF-8
header('Content-Type: text/html; charset=utf-8');
$date = date('jS F Y'); $date = date('jS F Y');
// Temp count for untagged pastes // Temp count for untagged pastes

View file

@ -3,9 +3,6 @@ define('IN_PONEPASTE', 1);
require_once('includes/common.php'); require_once('includes/common.php');
require_once('includes/functions.php'); require_once('includes/functions.php');
// UTF-8
header('Content-Type: text/html; charset=utf-8');
function getMonthPopularPastes(DatabaseHandle $conn, int $count) : array { function getMonthPopularPastes(DatabaseHandle $conn, int $count) : array {
$query = $conn->prepare( $query = $conn->prepare(
"SELECT pastes.id AS id, title, created_at, updated_at, users.username AS member "SELECT pastes.id AS id, title, created_at, updated_at, users.username AS member

View file

@ -3,10 +3,6 @@ define('IN_PONEPASTE', 1);
require_once('includes/common.php'); require_once('includes/common.php');
require_once('includes/functions.php'); require_once('includes/functions.php');
// UTF-8
header('Content-Type: text/html; charset=utf-8');
$p_title = $lang['archive']; // "Pastes Archive"; $p_title = $lang['archive']; // "Pastes Archive";
// Theme // Theme

View file

@ -3,9 +3,6 @@ define('IN_PONEPASTE', 1);
require_once('includes/common.php'); require_once('includes/common.php');
require_once('includes/functions.php'); require_once('includes/functions.php');
// UTF-8
header('Content-Type: text/html; charset=utf-8');
if ($current_user && !empty($_POST['fid'])) { if ($current_user && !empty($_POST['fid'])) {
$paste_id = intval($_POST['fid']); $paste_id = intval($_POST['fid']);
$query = $conn->prepare('SELECT 1 FROM pins WHERE paste_id = ? AND user_id = ?'); $query = $conn->prepare('SELECT 1 FROM pins WHERE paste_id = ? AND user_id = ?');

View file

@ -60,13 +60,6 @@ function validatePasteFields() : string|null {
return null; return null;
} }
// UTF-8
header('Content-Type: text/html; charset=utf-8');
// Current date & user IP
$date = date('jS F Y');
$ip = $_SERVER['REMOTE_ADDR'];
// Sitemap // Sitemap
$site_sitemap_rows = $conn->query('SELECT * FROM sitemap_options LIMIT 1'); $site_sitemap_rows = $conn->query('SELECT * FROM sitemap_options LIMIT 1');
if ($row = $site_sitemap_rows->fetch()) { if ($row = $site_sitemap_rows->fetch()) {

View file

@ -3,12 +3,6 @@ define('IN_PONEPASTE', 1);
require_once('includes/common.php'); require_once('includes/common.php');
require_once('includes/functions.php'); require_once('includes/functions.php');
// UTF-8
header('Content-Type: text/html; charset=utf-8');
$date = date('jS F Y');
$ip = $_SERVER['REMOTE_ADDR'];
updatePageViews($conn); updatePageViews($conn);
if (isset($_GET['page'])) { if (isset($_GET['page'])) {

View file

@ -1,7 +1,4 @@
<?php <?php
// UTF-8
header('Content-Type: text/html; charset=utf-8');
define('IN_PONEPASTE', 1); define('IN_PONEPASTE', 1);
require_once('includes/common.php'); require_once('includes/common.php');
require_once('includes/functions.php'); require_once('includes/functions.php');

View file

@ -4,13 +4,6 @@ require_once('includes/common.php');
require_once('includes/functions.php'); require_once('includes/functions.php');
require_once('includes/passwords.php'); require_once('includes/passwords.php');
// UTF-8
header('Content-Type: text/html; charset=utf-8');
$date = date('jS F Y');
$ip = $_SERVER['REMOTE_ADDR'];
$p_title = $lang['myprofile']; //"My Profile"; $p_title = $lang['myprofile']; //"My Profile";
// Check if already logged in // Check if already logged in

View file

@ -3,11 +3,6 @@ define('IN_PONEPASTE', 1);
require_once('includes/common.php'); require_once('includes/common.php');
require_once('includes/functions.php'); require_once('includes/functions.php');
// UTF-8
header('Content-Type: text/html; charset=utf-8');
$ip = $_SERVER['REMOTE_ADDR'];
//Report paste //Report paste
$p_reasonrep = Trim(htmlspecialchars($_POST['reasonrep'])); $p_reasonrep = Trim(htmlspecialchars($_POST['reasonrep']));
$p_memreport = $current_user ? $current_user->username : 'Guest'; $p_memreport = $current_user ? $current_user->username : 'Guest';

View file

@ -3,9 +3,6 @@ define('IN_PONEPASTE', 1);
require_once('includes/common.php'); require_once('includes/common.php');
require_once('includes/functions.php'); require_once('includes/functions.php');
// UTF-8
header('Content-Type: text/html; charset=utf-8');
$p_title = $lang['archive']; // "Pastes Archive"; $p_title = $lang['archive']; // "Pastes Archive";
// Theme // Theme

View file

@ -3,12 +3,6 @@ define('IN_PONEPASTE', 1);
require_once('includes/common.php'); require_once('includes/common.php');
require_once('includes/functions.php'); require_once('includes/functions.php');
// UTF-8
header('Content-Type: text/html; charset=utf-8');
$date = date('jS F Y');
$ip = $_SERVER['REMOTE_ADDR'];
if (empty($_GET['user'])) { if (empty($_GET['user'])) {
// No username provided // No username provided
header("Location: ../error.php"); header("Location: ../error.php");