diff --git a/ext/comment/main.php b/ext/comment/main.php
index 45cea812..b4e5d3fc 100644
--- a/ext/comment/main.php
+++ b/ext/comment/main.php
@@ -43,15 +43,34 @@ class CommentPostingException extends SCoreException
class Comment
{
+ /** @var User */
public $owner;
+
+ /** @var int */
public $owner_id;
+
+ /** @var string */
public $owner_name;
+
+ /** @var string */
public $owner_email;
+
+ /** @var string */
public $owner_class;
+
+ /** @var string */
public $comment;
+
+ /** @var int */
public $comment_id;
+
+ /** @var int */
public $image_id;
+
+ /** @var string */
public $poster_ip;
+
+ /** @var string */
public $posted;
public function __construct($row)
diff --git a/ext/comment/theme.php b/ext/comment/theme.php
index db2adc07..5d6ac5cd 100644
--- a/ext/comment/theme.php
+++ b/ext/comment/theme.php
@@ -167,9 +167,6 @@ class CommentListTheme extends Themelet
{
global $page;
- assert(is_numeric($page_number));
- assert(is_numeric($total_pages));
-
$html = "";
foreach ($comments as $comment) {
$html .= $this->comment_to_html($comment, true);
@@ -203,12 +200,12 @@ class CommentListTheme extends Themelet
$tfe = new TextFormattingEvent($comment->comment);
send_event($tfe);
- $i_uid = int_escape($comment->owner_id);
+ $i_uid = $comment->owner_id;
$h_name = html_escape($comment->owner_name);
$h_timestamp = autodate($comment->posted);
$h_comment = ($trim ? truncate($tfe->stripped, 50) : $tfe->formatted);
- $i_comment_id = int_escape($comment->comment_id);
- $i_image_id = int_escape($comment->image_id);
+ $i_comment_id = $comment->comment_id;
+ $i_image_id = $comment->image_id;
if ($i_uid == $config->get_int("anon_id")) {
$anoncode = "";
diff --git a/ext/favorites/main.php b/ext/favorites/main.php
index 6753debd..96ef8630 100644
--- a/ext/favorites/main.php
+++ b/ext/favorites/main.php
@@ -105,7 +105,7 @@ class Favorites extends Extension
public function onParseLinkTemplate(ParseLinkTemplateEvent $event)
{
- $event->replace('$favorites', $event->image->favorites);
+ $event->replace('$favorites', (string)$event->image->favorites);
}
public function onUserBlockBuilding(UserBlockBuildingEvent $event)
diff --git a/themes/danbooru/comment.theme.php b/themes/danbooru/comment.theme.php
index 8379c237..e411d3db 100644
--- a/themes/danbooru/comment.theme.php
+++ b/themes/danbooru/comment.theme.php
@@ -94,12 +94,12 @@ class CustomCommentListTheme extends CommentListTheme
$tfe = new TextFormattingEvent($comment->comment);
send_event($tfe);
- //$i_uid = int_escape($comment->owner_id);
+ //$i_uid = $comment->owner_id;
$h_name = html_escape($comment->owner_name);
//$h_poster_ip = html_escape($comment->poster_ip);
$h_comment = ($trim ? substr($tfe->stripped, 0, 50)."..." : $tfe->formatted);
- $i_comment_id = int_escape($comment->comment_id);
- $i_image_id = int_escape($comment->image_id);
+ $i_comment_id = $comment->comment_id;
+ $i_image_id = $comment->image_id;
$h_posted = autodate($comment->posted);
$h_userlink = "$h_name";
diff --git a/themes/danbooru2/comment.theme.php b/themes/danbooru2/comment.theme.php
index 03ee17db..3399a489 100644
--- a/themes/danbooru2/comment.theme.php
+++ b/themes/danbooru2/comment.theme.php
@@ -95,12 +95,12 @@ class CustomCommentListTheme extends CommentListTheme
$tfe = new TextFormattingEvent($comment->comment);
send_event($tfe);
- //$i_uid = int_escape($comment->owner_id);
+ //$i_uid = $comment->owner_id;
$h_name = html_escape($comment->owner_name);
//$h_poster_ip = html_escape($comment->poster_ip);
$h_comment = ($trim ? substr($tfe->stripped, 0, 50)."..." : $tfe->formatted);
- $i_comment_id = int_escape($comment->comment_id);
- $i_image_id = int_escape($comment->image_id);
+ $i_comment_id = $comment->comment_id;
+ $i_image_id = $comment->image_id;
$h_posted = autodate($comment->posted);
$h_userlink = "$h_name";
diff --git a/themes/futaba/comment.theme.php b/themes/futaba/comment.theme.php
index edfd071d..aa92f52c 100644
--- a/themes/futaba/comment.theme.php
+++ b/themes/futaba/comment.theme.php
@@ -68,12 +68,12 @@ class CustomCommentListTheme extends CommentListTheme
$tfe = new TextFormattingEvent($comment->comment);
send_event($tfe);
- //$i_uid = int_escape($comment->owner_id);
+ //$i_uid = $comment->owner_id;
$h_name = html_escape($comment->owner_name);
//$h_poster_ip = html_escape($comment->poster_ip);
$h_comment = ($trim ? substr($tfe->stripped, 0, 50)."..." : $tfe->formatted);
- $i_comment_id = int_escape($comment->comment_id);
- $i_image_id = int_escape($comment->image_id);
+ $i_comment_id = $comment->comment_id;
+ $i_image_id = $comment->image_id;
$h_userlink = "$h_name";
$h_date = $comment->posted;