summaryrefslogtreecommitdiff
path: root/inc/mod/pages.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-08-16 21:08:01 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-08-16 21:08:01 +1000
commitb666886416f793074669a7e2bc1d7cc3c2b4746a (patch)
treee5f69f4279621ce72747707e164aa358354b084c /inc/mod/pages.php
parent88dff2a683ea580930b95ffa33cccdf648d89cab (diff)
A few modifications:
1. Finally, clean up some of the crappy code in inc/display.php; no more extreme clutter. new Thread() and new Post() take an array as the first parameter now. 2. Poster country flags. Currently requires the "geoip" extension. 3. Give post images a classname. This was also long-overdue.
Diffstat (limited to 'inc/mod/pages.php')
-rw-r--r--inc/mod/pages.php28
1 files changed, 4 insertions, 24 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 932b2ed6..9f8fcc5c 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -780,19 +780,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']]))
@@ -1907,19 +1897,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