diff options
| author | czaks <marcin@6irc.net> | 2013-08-16 10:07:24 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-08-16 10:07:24 -0400 |
| commit | 146243c473f24e6b86e711dd1afeebfcdd711af7 (patch) | |
| tree | 9b50f4b5bf76ada14b29cd9b672758f37522bd03 /inc/mod/pages.php | |
| parent | c2ffd324369dc8db4f67e6f035ccc335b3b20be7 (diff) | |
| parent | 0565e2119d54cb4be8c6931ee42acfb586188893 (diff) | |
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts:
inc/config.php
inc/display.php
inc/functions.php
Diffstat (limited to 'inc/mod/pages.php')
| -rw-r--r-- | inc/mod/pages.php | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 8a743af5..6059fefe 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -790,19 +790,9 @@ function mod_page_ip($ip) { while ($post = $query->fetch(PDO::FETCH_ASSOC)) { if (!$post['thread']) { - // TODO: There is no reason why this should be such a fucking mess. - $po = new Thread( - $post['id'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['capcode'], $post['body'], - $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], - $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $post['sticky'], $post['locked'], - $post['sage'], $post['embed'], '?/', $mod, false - ); + $po = new Thread($post, '?/', $mod, false); } else { - $po = new Post( - $post['id'], $post['thread'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['capcode'], - $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], - $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $post['embed'], '?/', $mod - ); + $po = new Post($post, '?/', $mod); } if (!isset($args['posts'][$board['uri']])) @@ -1398,7 +1388,7 @@ function mod_edit_post($board, $edit_raw_html, $postID) { $query->bindValue(':subject', $_POST['subject']); $query->bindValue(':body', $_POST['body']); if ($edit_raw_html) { - $body_nomarkup = '<tinyboard raw html>' . $_POST['body'] . '</tinyboard>'; + $body_nomarkup = $_POST['body'] . '<tinyboard raw html>1</tinyboard>'; $query->bindValue(':body_nomarkup', $body_nomarkup); } $query->execute() or error(db_error($query)); @@ -2012,19 +2002,9 @@ function mod_reports() { if (!$post['thread']) { // Still need to fix this: - $po = new Thread( - $post['id'], $post['subject'], $post['email'], $post['name'], $post['trip'], - $post['capcode'], $post['body'], $post['time'], $post['thumb'], - $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], - $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $post['sticky'], - $post['locked'], $post['sage'], $post['embed'], '?/', $mod, false - ); + $po = new Thread($post, '?/', $mod, false); } else { - $po = new Post( - $post['id'], $post['thread'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['capcode'], - $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], - $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $post['embed'], '?/', $mod - ); + $po = new Post($post, '?/', $mod); } // a little messy and inefficient |
