|
@@ -15,8 +15,9 @@ discard block |
|
|
block discarded – undo |
|
15
|
15
|
<?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?> |
|
16
|
16
|
<?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?> |
|
17
|
17
|
<?php |
|
18
|
|
- if(isset($_SESSION['siteusername'])) |
|
19
|
|
- $__video_h->check_view($_GET['v'], @$_SESSION['siteusername']); |
|
|
18
|
+ if(isset($_SESSION['siteusername'])) { |
|
|
19
|
+ $__video_h->check_view($_GET['v'], @$_SESSION['siteusername']); |
|
|
20
|
+ } |
|
20
|
21
|
|
|
21
|
22
|
$_SESSION['current_video'] = $_video['rid']; |
|
22
|
23
|
if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
@@ -735,10 +736,11 @@ discard block |
|
|
block discarded – undo |
|
735
|
736
|
$stmt->execute(); |
|
736
|
737
|
|
|
737
|
738
|
while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
738
|
|
- if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
739
|
|
- $comment['liked'] = true; |
|
740
|
|
- else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
741
|
|
- $comment['disliked'] = true; |
|
|
739
|
+ if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) { |
|
|
740
|
+ $comment['liked'] = true; |
|
|
741
|
+ } else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) { |
|
|
742
|
+ $comment['disliked'] = true; |
|
|
743
|
+ } |
|
742
|
744
|
|
|
743
|
745
|
$comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
|
744
|
746
|
$comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |