diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-12-18 01:18:03 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2010-12-18 01:18:03 +1100 |
| commit | 574256a01a3250d3fef4bb1f4c41b7da8c7bf9f9 (patch) | |
| tree | e28f61d1cbd177496dc4b43972606d85cc7b3ec7 /post.php | |
| parent | 139514402da1c12f877548087a67ab0bac2458b5 (diff) | |
Use PDO for databases
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 15 |
1 files changed, 4 insertions, 11 deletions
@@ -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(); } |
