summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-12-18 01:18:03 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2010-12-18 01:18:03 +1100
commit574256a01a3250d3fef4bb1f4c41b7da8c7bf9f9 (patch)
treee28f61d1cbd177496dc4b43972606d85cc7b3ec7 /post.php
parent139514402da1c12f877548087a67ab0bac2458b5 (diff)
Use PDO for databases
Diffstat (limited to 'post.php')
-rw-r--r--post.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/post.php b/post.php
index 0b0e0a64..fccf3f16 100644
--- a/post.php
+++ b/post.php
@@ -6,6 +6,7 @@
}
require 'inc/config.php';
require 'inc/template.php';
+ require 'inc/database.php';
require 'inc/user.php';
// Fix for magic quotes
@@ -191,9 +192,6 @@
// Todo: Validate some more, remove messy code, allow more specific configuration
- // MySQLify
- mysql_safe_array($post);
-
$id = post($post, $OP);
if($post['has_file'] && $post['zip']) {
@@ -295,12 +293,7 @@
buildThread(($OP?$id:$post['thread']));
if(!$OP) {
- mysql_query(
- sprintf("UPDATE `posts_%s` SET `bump` = '%d' WHERE `id` = '%s' AND `thread` IS NULL",
- mysql_real_escape_string($board['uri']),
- time(),
- $post['thread']
- ), $sql) or error(mysql_error($sql));
+ bumpThread($post['thread']);
}
buildIndex();
@@ -318,8 +311,8 @@
sql_open();
// Build all boards
- $boards_res = mysql_query('SELECT * FROM `boards`', $sql) or error(mysql_error($sql));
- while($_board = mysql_fetch_array($boards_res)) {
+ $boards = listBoards();
+ foreach($boards as &$_board) {
setupBoard($_board);
buildIndex();
}