From f12e52454414a3931b80a0c7d8522050936975ac Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 1 Dec 2010 23:40:43 +1100 Subject: Removed debugging code. --- src/zip.png | Bin 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/zip.png (limited to 'src') diff --git a/src/zip.png b/src/zip.png old mode 100755 new mode 100644 -- cgit v1.3 From b2bd3303f96167bbc3812b01e386e3b1c5252eef Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Thu, 2 Dec 2010 18:07:24 +1100 Subject: REDIRECT_HTTP directive --- inc/config.php | 5 +++++ inc/functions.php | 1 + mod.php | 2 +- post.php | 4 ++-- res/index.php | 2 +- src/index.php | 2 +- thumb/index.php | 2 +- 7 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/inc/config.php b/inc/config.php index 0ca457c4..164c1f1a 100644 --- a/inc/config.php +++ b/inc/config.php @@ -119,6 +119,11 @@ // Multi-board (%s is board abbreviation) define('BOARD_PATH', '%s/', true); + // The HTTP status code to use when redirecting. + // Should be 3xx (redirection). http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html + // "302" is recommended. + define('REDIRECT_HTTP', 302, true); + /* Mod stuff */ diff --git a/inc/functions.php b/inc/functions.php index b20ed091..2349197c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -44,6 +44,7 @@ function openBoard($uri) { global $sql; + sql_open(); $boards_res = mysql_query(sprintf( "SELECT * FROM `boards` WHERE `uri` = '%s' LIMIT 1", mysql_real_escape_string($uri) diff --git a/mod.php b/mod.php index 8a328092..44aada37 100644 --- a/mod.php +++ b/mod.php @@ -29,7 +29,7 @@ setCookies(); // Redirect - header('Location: ?' . MOD_DEFAULT, true, 302); + header('Location: ?' . MOD_DEFAULT, true, REDIRECT_HTTP); // Close connection sql_close(); diff --git a/post.php b/post.php index 8653a2c3..78d1fd60 100644 --- a/post.php +++ b/post.php @@ -306,9 +306,9 @@ sql_close(); if(ALWAYS_NOKO || $noko) { - header('Location: ' . ROOT . $board['dir'] . DIR_RES . ($OP?$id:$post['thread']) . '.html' . (!$OP?'#'.$id:''), true, 302); + header('Location: ' . ROOT . $board['dir'] . DIR_RES . ($OP?$id:$post['thread']) . '.html' . (!$OP?'#'.$id:''), true, REDIRECT_HTTP); } else { - header('Location: ' . ROOT . $board['dir'] . FILE_INDEX, true, 302); + header('Location: ' . ROOT . $board['dir'] . FILE_INDEX, true, REDIRECT_HTTP); } exit; diff --git a/res/index.php b/res/index.php index c5619a58..1869b1dd 100644 --- a/res/index.php +++ b/res/index.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/src/index.php b/src/index.php index c5619a58..1869b1dd 100644 --- a/src/index.php +++ b/src/index.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/thumb/index.php b/thumb/index.php index c5619a58..1869b1dd 100644 --- a/thumb/index.php +++ b/thumb/index.php @@ -1,3 +1,3 @@ \ No newline at end of file -- cgit v1.3 From 72ff91105841e9b3dcdc1e691ed2a4967afc6124 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Fri, 17 Dec 2010 02:25:53 +1100 Subject: Removed and cleaned directories --- res/index.php | 3 --- src/error.png | Bin 1358 -> 0 bytes src/index.php | 3 --- src/ok.png | Bin 1483 -> 0 bytes src/warning.png | Bin 1389 -> 0 bytes src/zip.png | Bin 15221 -> 0 bytes static/error.png | Bin 0 -> 1358 bytes static/ok.png | Bin 0 -> 1483 bytes static/warning.png | Bin 0 -> 1389 bytes static/zip.png | Bin 0 -> 15221 bytes thumb/index.php | 3 --- 11 files changed, 9 deletions(-) delete mode 100644 res/index.php delete mode 100644 src/error.png delete mode 100644 src/index.php delete mode 100644 src/ok.png delete mode 100644 src/warning.png delete mode 100644 src/zip.png create mode 100644 static/error.png create mode 100644 static/ok.png create mode 100644 static/warning.png create mode 100644 static/zip.png delete mode 100644 thumb/index.php (limited to 'src') diff --git a/res/index.php b/res/index.php deleted file mode 100644 index 1869b1dd..00000000 --- a/res/index.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/src/error.png b/src/error.png deleted file mode 100644 index f1ff27a8..00000000 Binary files a/src/error.png and /dev/null differ diff --git a/src/index.php b/src/index.php deleted file mode 100644 index 1869b1dd..00000000 --- a/src/index.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/src/ok.png b/src/ok.png deleted file mode 100644 index cbe92c77..00000000 Binary files a/src/ok.png and /dev/null differ diff --git a/src/warning.png b/src/warning.png deleted file mode 100644 index 43fec41e..00000000 Binary files a/src/warning.png and /dev/null differ diff --git a/src/zip.png b/src/zip.png deleted file mode 100644 index 7886679a..00000000 Binary files a/src/zip.png and /dev/null differ diff --git a/static/error.png b/static/error.png new file mode 100644 index 00000000..f1ff27a8 Binary files /dev/null and b/static/error.png differ diff --git a/static/ok.png b/static/ok.png new file mode 100644 index 00000000..cbe92c77 Binary files /dev/null and b/static/ok.png differ diff --git a/static/warning.png b/static/warning.png new file mode 100644 index 00000000..43fec41e Binary files /dev/null and b/static/warning.png differ diff --git a/static/zip.png b/static/zip.png new file mode 100644 index 00000000..7886679a Binary files /dev/null and b/static/zip.png differ diff --git a/thumb/index.php b/thumb/index.php deleted file mode 100644 index 1869b1dd..00000000 --- a/thumb/index.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file -- cgit v1.3