more types
This commit is contained in:
parent
235b976dbc
commit
e0778f94f7
6 changed files with 32 additions and 16 deletions
|
@ -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)
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 = "<a class='username' href='".make_link("user/$h_name")."'>$h_name</a>";
|
||||
|
|
|
@ -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 = "<a class='username' href='".make_link("user/$h_name")."'>$h_name</a>";
|
||||
|
|
|
@ -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 = "<a href='".make_link("user/$h_name")."'>$h_name</a>";
|
||||
$h_date = $comment->posted;
|
||||
|
|
Reference in a new issue