diff --git a/core/database.class.php b/core/database.class.php
index 2ee4db23..eb00e1ab 100644
--- a/core/database.class.php
+++ b/core/database.class.php
@@ -271,11 +271,13 @@ class Database {
/**
* Meta info about the database engine
+ * @var DBEngine
*/
private $engine = null;
/**
* The currently active cache engine
+ * @var CacheEngine
*/
public $cache = null;
diff --git a/core/extension.class.php b/core/extension.class.php
index b288e91f..9d881c80 100644
--- a/core/extension.class.php
+++ b/core/extension.class.php
@@ -140,9 +140,9 @@ abstract class FormatterExtension extends Extension {
*/
abstract class DataHandlerExtension extends Extension {
public function onDataUpload(DataUploadEvent $event) {
- global $user;
-
- if(($supported_ext = $this->supported_ext($event->type)) && ($check_contents = $this->check_contents($event->tmpname))) {
+ $supported_ext = $this->supported_ext($event->type);
+ $check_contents = $this->check_contents($event->tmpname);
+ if($supported_ext && $check_contents) {
if(!move_upload_to_archive($event)) return;
send_event(new ThumbnailGenerationEvent($event->hash, $event->type));
diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php
index 26582333..8e21de8b 100644
--- a/core/imageboard.pack.php
+++ b/core/imageboard.pack.php
@@ -122,7 +122,7 @@ class Image {
if(SPEED_HAX) {
if(!$user->can("big_search") and count($tags) > 3) {
- die("Anonymous users may only search for up to 3 tags at a time"); // FIXME: throw an exception?
+ throw new SCoreException("Anonymous users may only search for up to 3 tags at a time");
}
}
@@ -644,7 +644,7 @@ class Image {
* images table. Yes, MySQL does suck this much.
*/
private static function build_accurate_search_querylet($terms) {
- global $config, $database;
+ global $database;
$tag_querylets = array();
$img_querylets = array();
@@ -804,7 +804,7 @@ class Image {
* build_accurate_search_querylet() for a full explanation
*/
private static function build_ugly_search_querylet($terms) {
- global $config, $database;
+ global $database;
$tag_querylets = array();
$img_querylets = array();
@@ -910,8 +910,6 @@ class Image {
// more than one positive tag, or more than zero negative tags
else {
- $s_tag_array = array_map("sql_escape", $tag_search->variables);
-
$tag_id_array = array();
$tags_ok = true;
foreach($tag_search->variables as $tag) {
@@ -1113,7 +1111,6 @@ function move_upload_to_archive(DataUploadEvent $event) {
if(!@copy($event->tmpname, $target)) {
$errors = error_get_last(); // note: requires php 5.2
throw new UploadException("Failed to copy file from uploads ({$event->tmpname}) to archive ($target): {$errors['type']} / {$errors['message']}");
- return false;
}
return true;
}
diff --git a/core/user.class.php b/core/user.class.php
index 50034926..3adceadc 100644
--- a/core/user.class.php
+++ b/core/user.class.php
@@ -15,6 +15,9 @@ class User {
var $name;
var $email;
var $join_date;
+ var $passhash;
+
+ /* @var UserClass */
var $class;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/core/util.inc.php b/core/util.inc.php
index f77b36b5..587f66a0 100644
--- a/core/util.inc.php
+++ b/core/util.inc.php
@@ -385,7 +385,13 @@ function make_http(/*string*/ $link) {
/**
* Make a form tag with relevant auth token and stuff
*
- * @retval string
+ * @param target string
+ * @param method string
+ * @param multipart boolean
+ * @param form_id string
+ * @param onsubmit string
+ *
+ * @return string
*/
function make_form($target, $method="POST", $multipart=False, $form_id="", $onsubmit="") {
global $user;
@@ -451,7 +457,7 @@ function captcha_get_html() {
}
else {
session_start();
- $securimg = new Securimage();
+ //$securimg = new Securimage();
$base = get_base_href();
$captcha = "
".
"
CAPTCHA: ";
@@ -1276,6 +1282,7 @@ function _sanitise_environment() {
}
function _get_themelet_files($_theme) {
+ $base_themelets = array();
if(file_exists('themes/'.$_theme.'/custompage.class.php')) $base_themelets[] = 'themes/'.$_theme.'/custompage.class.php';
$base_themelets[] = 'themes/'.$_theme.'/layout.class.php';
$base_themelets[] = 'themes/'.$_theme.'/themelet.class.php';
@@ -1406,7 +1413,7 @@ function _decaret($str) {
}
function _get_user() {
- global $config, $database;
+ global $config;
$user = null;
if(get_prefixed_cookie("user") && get_prefixed_cookie("session")) {
$tmp_user = User::by_session(get_prefixed_cookie("user"), get_prefixed_cookie("session"));
diff --git a/ext/admin/theme.php b/ext/admin/theme.php
index 64c18d2f..3eefdb11 100644
--- a/ext/admin/theme.php
+++ b/ext/admin/theme.php
@@ -14,9 +14,9 @@ class AdminPageTheme extends Themelet {
protected function button(/*string*/ $name, /*string*/ $action, /*boolean*/ $protected=false) {
$c_protected = $protected ? " protected" : "";
- $html = make_form(make_link("admin/$action"), "POST", false, false, false, "admin$c_protected");
+ $html = make_form(make_link("admin/$action"), "POST", false, null, null, "admin$c_protected");
if($protected) {
- $html .= "";
+ $html .= "";
$html .= "";
}
else {
diff --git a/ext/artists/main.php b/ext/artists/main.php
index 38c614f9..7aea77ad 100644
--- a/ext/artists/main.php
+++ b/ext/artists/main.php
@@ -143,7 +143,7 @@ class Artists extends Extension {
}
public function handle_commands($event)
{
- global $config, $page, $user;
+ global $page, $user;
if($event->page_matches("artist"))
{
diff --git a/ext/artists/theme.php b/ext/artists/theme.php
index 1e00cf31..c6d957a3 100644
--- a/ext/artists/theme.php
+++ b/ext/artists/theme.php
@@ -14,19 +14,11 @@ class ArtistsTheme extends Themelet {
";
}
- public function display_artists(){
- global $page;
-
- $page->set_title("Artists");
- $page->set_heading("Artists");
- $page->add_block(new Block("Artists", $html, "main", 10));
-
- //$this->display_paginator($page, "artist/list", null, $pageNumber, $totalPages);
- }
-
public function sidebar_options(/*string*/ $mode, $artistID=NULL, $is_admin=FALSE){
- global $page;
-
+ global $page, $user;
+
+ $html = "";
+
if($mode == "neutral"){
$html = "
";
}
- $page->add_block(new Block("Manage Artists", $html, "left", 10));
+
+ if($html) $page->add_block(new Block("Manage Artists", $html, "left", 10));
}
- public function show_artist_editor($artist, $aliases, $members, $urls)
- {
- $artistName = $artist['name'];
- $artistNotes = $artist['notes'];
- $artistID = $artist['id'];
+ public function show_artist_editor($artist, $aliases, $members, $urls)
+ {
+ global $user;
- // aliases
- $aliasesString = "";
- $aliasesIDsString = "";
- foreach ($aliases as $alias)
- {
- $aliasesString .= $alias["alias_name"]." ";
- $aliasesIDsString .= $alias["alias_id"]." ";
- }
- $aliasesString = rtrim($aliasesString);
- $aliasesIDsString = rtrim($aliasesIDsString);
+ $artistName = $artist['name'];
+ $artistNotes = $artist['notes'];
+ $artistID = $artist['id'];
- // members
- $membersString = "";
- $membersIDsString = "";
- foreach ($members as $member)
- {
- $membersString .= $member["name"]." ";
- $membersIDsString .= $member["id"]." ";
- }
- $membersString = rtrim($membersString);
- $membersIDsString = rtrim($membersIDsString);
+ // aliases
+ $aliasesString = "";
+ $aliasesIDsString = "";
+ foreach ($aliases as $alias)
+ {
+ $aliasesString .= $alias["alias_name"]." ";
+ $aliasesIDsString .= $alias["alias_id"]." ";
+ }
+ $aliasesString = rtrim($aliasesString);
+ $aliasesIDsString = rtrim($aliasesIDsString);
- // urls
- $urlsString = "";
- $urlsIDsString = "";
- foreach ($urls as $url)
- {
- $urlsString .= $url["url"]."\n";
- $urlsIDsString .= $url["id"]." ";
- }
- $urlsString = substr($urlsString, 0, strlen($urlsString) -1);
- $urlsIDsString = rtrim($urlsIDsString);
+ // members
+ $membersString = "";
+ $membersIDsString = "";
+ foreach ($members as $member)
+ {
+ $membersString .= $member["name"]." ";
+ $membersIDsString .= $member["id"]." ";
+ }
+ $membersString = rtrim($membersString);
+ $membersIDsString = rtrim($membersIDsString);
- $html =
+ // urls
+ $urlsString = "";
+ $urlsIDsString = "";
+ foreach ($urls as $url)
+ {
+ $urlsString .= $url["url"]."\n";
+ $urlsIDsString .= $url["id"]." ";
+ }
+ $urlsString = substr($urlsString, 0, strlen($urlsString) -1);
+ $urlsIDsString = rtrim($urlsIDsString);
+
+ $html =
'
-
+
';
- global $page;
- $page->add_block(new Block("Edit artist", $html, "main", 10));
- }
+ global $page;
+ $page->add_block(new Block("Edit artist", $html, "main", 10));
+ }
public function new_artist_composer()
- {
- global $page;
+ {
+ global $page, $user;
- $html = "
- ';
+ ';
- global $page;
- $page->add_block(new Block("Artist Aliases", $html, "main", 20));
- }
- public function show_new_member_composer($artistID)
- {
- $html =
- '
- ';
+
+ ';
- global $page;
- $page->add_block(new Block("Artist members", $html, "main", 30));
- }
+ global $page;
+ $page->add_block(new Block("Artist members", $html, "main", 30));
+ }
- public function show_new_url_composer($artistID)
- {
- $html =
- '
- ';
+
+ ';
- global $page;
- $page->add_block(new Block("Artist URLs", $html, "main", 40));
- }
+ global $page;
+ $page->add_block(new Block("Artist URLs", $html, "main", 40));
+ }
- public function show_alias_editor($alias)
- {
- $html =
- '
-
- ';
+
+
+
+
+
+ ';
- global $page;
- $page->add_block(new Block("Edit Alias", $html, "main", 10));
- }
+ global $page;
+ $page->add_block(new Block("Edit Alias", $html, "main", 10));
+ }
- public function show_url_editor($url)
- {
- $html =
- '
-
- ';
+
+
+
+
+
+ ';
- global $page;
- $page->add_block(new Block("Edit URL", $html, "main", 10));
- }
+ global $page;
+ $page->add_block(new Block("Edit URL", $html, "main", 10));
+ }
- public function show_member_editor($member)
- {
- $html =
- '
-
- ';
+
+
+
+
+
+ ';
- global $page;
- $page->add_block(new Block("Edit Member", $html, "main", 10));
- }
+ global $page;
+ $page->add_block(new Block("Edit Member", $html, "main", 10));
+ }
public function show_artist($artist, $aliases, $members, $urls, $images, $userIsLogged, $userIsAdmin)
- {
- global $user, $event, $page;
+ {
+ global $page;
- $artist_link = "".str_replace("_", " ", $artist['name'])."";
+ $artist_link = "".str_replace("_", " ", $artist['name'])."";
- $html = "
-
-
- |
- | ";
-
- if ($userIsLogged)
- $html .= " | ";
-
- if ($userIsAdmin)
- $html .= " | ";
-
- $html .= "
-
-
-
- Name: |
- ".$artist_link." | ";
- if ($userIsLogged) $html .= " | ";
- if ($userIsAdmin) $html .= " | ";
- $html .= "
";
-
- if (count($aliases) > 0)
- {
- $aliasViewLink = str_replace("_", " ", $aliases[0]['alias_name']); // no link anymore
- $aliasEditLink = "Edit";
- $aliasDeleteLink = "Delete";
-
- $html .= "
- Aliases: |
- ".$aliasViewLink." | ";
-
- if ($userIsLogged)
- $html .= "".$aliasEditLink." | ";
-
- if ($userIsAdmin)
- $html .= "".$aliasDeleteLink." | ";
-
- $html .= "
";
-
- if (count($aliases) > 1)
- {
- for ($i = 1; $i < count($aliases); $i++)
- {
- $aliasViewLink = str_replace("_", " ", $aliases[$i]['alias_name']); // no link anymore
- $aliasEditLink = "Edit";
- $aliasDeleteLink = "Delete";
-
- $html .= "
- |
- ".$aliasViewLink." | ";
- if ($userIsLogged)
- $html .= "".$aliasEditLink." | ";
- if ($userIsAdmin)
- $html .= "".$aliasDeleteLink." | ";
-
- $html .= "
";
- }
- }
- }
-
- if (count($members) > 0)
- {
- $memberViewLink = str_replace("_", " ", $members[0]['name']); // no link anymore
- $memberEditLink = "Edit";
- $memberDeleteLink = "Delete";
-
- $html .= "
- Members: |
- ".$memberViewLink." | ";
- if ($userIsLogged)
- $html .= "".$memberEditLink." | ";
- if ($userIsAdmin)
- $html .= "".$memberDeleteLink." | ";
-
- $html .= "
";
-
- if (count($members) > 1)
- {
- for ($i = 1; $i < count($members); $i++)
- {
- $memberViewLink = str_replace("_", " ", $members[$i]['name']); // no link anymore
- $memberEditLink = "Edit";
- $memberDeleteLink = "Delete";
-
- $html .= "
- |
- ".$memberViewLink." | ";
- if ($userIsLogged)
- $html .= "".$memberEditLink." | ";
- if ($userIsAdmin)
- $html .= "".$memberDeleteLink." | ";
-
- $html .= "
";
- }
- }
- }
-
- if (count($urls) > 0)
- {
- $urlViewLink = "".str_replace("_", " ", $urls[0]['url'])."";
- $urlEditLink = "Edit";
- $urlDeleteLink = "Delete";
-
- $html .= "
- URLs: |
- ".$urlViewLink." | ";
-
- if ($userIsLogged)
- $html .= "".$urlEditLink." | ";
-
- if ($userIsAdmin)
- $html .= "".$urlDeleteLink." | ";
-
- $html .= "
";
-
- if (count($urls) > 1)
- {
- for ($i = 1; $i < count($urls); $i++)
- {
- $urlViewLink = "".str_replace("_", " ", $urls[$i]['url'])."";
- $urlEditLink = "Edit";
- $urlDeleteLink = "Delete";
-
- $html .= "
- |
- ".$urlViewLink." | ";
- if ($userIsLogged)
- $html .= "".$urlEditLink." | ";
-
- if ($userIsAdmin)
- $html .= "".$urlDeleteLink." | ";
-
- $html .= "
";
- }
- }
- }
-
- $html .=
- "
- Notes: |
- ".$artist["notes"]." | ";
- if ($userIsLogged) $html .= " | ";
- if ($userIsAdmin) $html .= " | ";
- //TODO how will notes be edited? On edit artist? (should there be an editartist?) or on a editnotes?
- //same question for deletion
- $html .= "
-
";
-
- $page->set_title("Artist");
- $page->set_heading("Artist");
- $page->add_block(new Block("Artist", $html, "main", 10));
-
+ $html = "
+
+
+ |
+ | ";
+ if ($userIsLogged)
+ $html .= " | ";
+
+ if ($userIsAdmin)
+ $html .= " | ";
+
+ $html .= "
+
+
+
+ Name: |
+ ".$artist_link." | ";
+ if ($userIsLogged) $html .= " | ";
+ if ($userIsAdmin) $html .= " | ";
+ $html .= "
";
+
+ if (count($aliases) > 0)
+ {
+ $aliasViewLink = str_replace("_", " ", $aliases[0]['alias_name']); // no link anymore
+ $aliasEditLink = "Edit";
+ $aliasDeleteLink = "Delete";
+
+ $html .= "
+ Aliases: |
+ ".$aliasViewLink." | ";
+
+ if ($userIsLogged)
+ $html .= "".$aliasEditLink." | ";
+
+ if ($userIsAdmin)
+ $html .= "".$aliasDeleteLink." | ";
+
+ $html .= "
";
+
+ if (count($aliases) > 1)
+ {
+ for ($i = 1; $i < count($aliases); $i++)
+ {
+ $aliasViewLink = str_replace("_", " ", $aliases[$i]['alias_name']); // no link anymore
+ $aliasEditLink = "Edit";
+ $aliasDeleteLink = "Delete";
+
+ $html .= "
+ |
+ ".$aliasViewLink." | ";
+ if ($userIsLogged)
+ $html .= "".$aliasEditLink." | ";
+ if ($userIsAdmin)
+ $html .= "".$aliasDeleteLink." | ";
+
+ $html .= "
";
+ }
+ }
+ }
+
+ if (count($members) > 0)
+ {
+ $memberViewLink = str_replace("_", " ", $members[0]['name']); // no link anymore
+ $memberEditLink = "Edit";
+ $memberDeleteLink = "Delete";
+
+ $html .= "
+ Members: |
+ ".$memberViewLink." | ";
+ if ($userIsLogged)
+ $html .= "".$memberEditLink." | ";
+ if ($userIsAdmin)
+ $html .= "".$memberDeleteLink." | ";
+
+ $html .= "
";
+
+ if (count($members) > 1)
+ {
+ for ($i = 1; $i < count($members); $i++)
+ {
+ $memberViewLink = str_replace("_", " ", $members[$i]['name']); // no link anymore
+ $memberEditLink = "Edit";
+ $memberDeleteLink = "Delete";
+
+ $html .= "
+ |
+ ".$memberViewLink." | ";
+ if ($userIsLogged)
+ $html .= "".$memberEditLink." | ";
+ if ($userIsAdmin)
+ $html .= "".$memberDeleteLink." | ";
+
+ $html .= "
";
+ }
+ }
+ }
+
+ if (count($urls) > 0)
+ {
+ $urlViewLink = "".str_replace("_", " ", $urls[0]['url'])."";
+ $urlEditLink = "Edit";
+ $urlDeleteLink = "Delete";
+
+ $html .= "
+ URLs: |
+ ".$urlViewLink." | ";
+
+ if ($userIsLogged)
+ $html .= "".$urlEditLink." | ";
+
+ if ($userIsAdmin)
+ $html .= "".$urlDeleteLink." | ";
+
+ $html .= "
";
+
+ if (count($urls) > 1)
+ {
+ for ($i = 1; $i < count($urls); $i++)
+ {
+ $urlViewLink = "".str_replace("_", " ", $urls[$i]['url'])."";
+ $urlEditLink = "Edit";
+ $urlDeleteLink = "Delete";
+
+ $html .= "
+ |
+ ".$urlViewLink." | ";
+ if ($userIsLogged)
+ $html .= "".$urlEditLink." | ";
+
+ if ($userIsAdmin)
+ $html .= "".$urlDeleteLink." | ";
+
+ $html .= "
";
+ }
+ }
+ }
+
+ $html .=
+ "
+ Notes: |
+ ".$artist["notes"]." | ";
+ if ($userIsLogged) $html .= " | ";
+ if ($userIsAdmin) $html .= " | ";
+ //TODO how will notes be edited? On edit artist? (should there be an editartist?) or on a editnotes?
+ //same question for deletion
+ $html .= "
+
";
+
+ $page->set_title("Artist");
+ $page->set_heading("Artist");
+ $page->add_block(new Block("Artist", $html, "main", 10));
+
//we show the images for the artist
$artist_images = "";
foreach($images as $image) {
diff --git a/ext/blotter/theme.php b/ext/blotter/theme.php
index 4c35db3b..872f550a 100644
--- a/ext/blotter/theme.php
+++ b/ext/blotter/theme.php
@@ -133,7 +133,7 @@ class BlotterTheme extends Themelet {
// Reset variables:
$i_open = "";
$i_close = "";
- $id = $entries[$i]['id'];
+ //$id = $entries[$i]['id'];
$messy_date = $entries[$i]['entry_date'];
$clean_date = date("m/d/y", strtotime($messy_date));
$entry_text = $entries[$i]['entry_text'];
@@ -144,8 +144,6 @@ class BlotterTheme extends Themelet {
$entries_list .= "{$i_open}{$clean_date} - {$entry_text}{$i_close}";
}
- $out_text = "";
- $in_text = "";
$pos_break = "";
$pos_align = "text-align: right; position: absolute; right: 0px;";
diff --git a/ext/bulk_add/main.php b/ext/bulk_add/main.php
index 2cab0f46..cf58e4a3 100644
--- a/ext/bulk_add/main.php
+++ b/ext/bulk_add/main.php
@@ -30,7 +30,7 @@ class BulkAdd extends Extension {
public function onCommand(CommandEvent $event) {
if($event->cmd == "help") {
print " bulk-add [directory]\n";
- print " Import this directory\n\n";
+ print " Import this directory\n\n";
}
if($event->cmd == "bulk-add") {
if(count($event->args) == 1) {
@@ -53,6 +53,7 @@ class BulkAdd extends Extension {
if(!array_key_exists('extension', $pathinfo)) {
throw new UploadException("File has no extension");
}
+ $metadata = array();
$metadata['filename'] = $pathinfo['basename'];
$metadata['extension'] = $pathinfo['extension'];
$metadata['tags'] = $tags;
@@ -65,8 +66,6 @@ class BulkAdd extends Extension {
}
private function add_dir(/*string*/ $base, $subdir="") {
- global $page;
-
if(!is_dir($base)) {
$this->theme->add_status("Error", "$base is not a directory");
return;
diff --git a/ext/bulk_add_csv/main.php b/ext/bulk_add_csv/main.php
index fd177846..4ff15773 100644
--- a/ext/bulk_add_csv/main.php
+++ b/ext/bulk_add_csv/main.php
@@ -33,7 +33,7 @@ class BulkAddCSV extends Extension {
public function onCommand(CommandEvent $event) {
if($event->cmd == "help") {
print " bulk-add-csv [/path/to.csv]\n";
- print " Import this .csv file (refer to documentation)\n\n";
+ print " Import this .csv file (refer to documentation)\n\n";
}
if($event->cmd == "bulk-add-csv") {
global $user;
@@ -62,6 +62,7 @@ class BulkAddCSV extends Extension {
if(!array_key_exists('extension', $pathinfo)) {
throw new UploadException("File has no extension");
}
+ $metadata = array();
$metadata['filename'] = $pathinfo['basename'];
$metadata['extension'] = $pathinfo['extension'];
$metadata['tags'] = $tags;
@@ -82,8 +83,6 @@ class BulkAddCSV extends Extension {
}
private function add_csv(/*string*/ $csvfile) {
- global $page;
-
if(!file_exists($csvfile)) {
$this->theme->add_status("Error", "$csvfile not found");
return;
diff --git a/ext/bulk_remove/main.php b/ext/bulk_remove/main.php
index 73bcbb8e..2e609386 100644
--- a/ext/bulk_remove/main.php
+++ b/ext/bulk_remove/main.php
@@ -12,7 +12,7 @@
class BulkRemove extends Extension {
public function onPageRequest(PageRequestEvent $event) {
- global $page, $user;
+ global $user;
if($event->page_matches("bulk_remove") && $user->is_admin() && $user->check_auth_token()) {
if ($event->get_arg(0) == "confirm") $this->do_bulk_remove();
else $this->show_confirm();
@@ -20,7 +20,7 @@ class BulkRemove extends Extension {
}
public function onAdminBuilding(AdminBuildingEvent $event) {
- global $page, $user;
+ global $page;
$html = "Be extremely careful when using this!
Once an image is removed there is no way to recover it so it is recommended that
you first take when removing a large amount of images.
@@ -83,10 +83,10 @@ class BulkRemove extends Extension {
// if no images were found with the given info
- if (count($images_for_removal) == 0 && $html == "")
+ if (count($images_for_removal) == 0)
$error = "No images selected for removal";
- var_dump($tags_arr);
+ //var_dump($tags_arr);
return array(
"error" => $error,
"images_for_removal" => $images_for_removal);
@@ -119,6 +119,7 @@ class BulkRemove extends Extension {
private function do_bulk_remove()
{
+ global $page;
// display error if user didn't go through admin board
if (!isset($_POST["bulk_remove_images"])) {
$page->add_block(new Block("Bulk Remove Error",
diff --git a/ext/chatbox/main.php b/ext/chatbox/main.php
index 9c48ce40..fc48cac1 100644
--- a/ext/chatbox/main.php
+++ b/ext/chatbox/main.php
@@ -13,7 +13,7 @@ class Chatbox extends Extension {
global $page, $user;
// Adds header to enable chatbox
- $root = make_http();
+ $root = get_base_href();
$yPath = "$root/ext/chatbox/";
$page->add_html_header("
diff --git a/ext/comment/theme.php b/ext/comment/theme.php
index ba4d12b4..7821b68c 100644
--- a/ext/comment/theme.php
+++ b/ext/comment/theme.php
@@ -244,7 +244,7 @@ class CommentListTheme extends Themelet {
$hb = ($comment->owner_class == "hellbanned" ? "hb" : "");
if($trim) {
- return "
+ $html = "