summaryrefslogtreecommitdiff
path: root/src/web/_views/template
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/_views/template')
-rw-r--r--src/web/_views/template/pfp.php9
-rw-r--r--src/web/_views/template/post.php2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/web/_views/template/pfp.php b/src/web/_views/template/pfp.php
index 9a5a336..ebb4b5f 100644
--- a/src/web/_views/template/pfp.php
+++ b/src/web/_views/template/pfp.php
@@ -2,7 +2,16 @@
<?php /* vi: syntax=php */ ?>
<?php
$class = isset($class) ? $class : '';
+ $link = isset($link) ? $link : TRUE;
?>
+<?php if($link): ?>
<a class="image-loading pfp <?=$class?>" href="/profile?id=<?=$user['id']?>">
+<?php else: ?>
+<div class="image-loading pfp <?=$class?>">
+<?php endif; ?>
<img src="/api/rpc/profile_avatar?user_id=<?=$user['id']?>"/>
+<?php if ($link): ?>
</a>
+<?php else: ?>
+</div>
+<?php endif; ?>
diff --git a/src/web/_views/template/post.php b/src/web/_views/template/post.php
index 83a72bf..0633985 100644
--- a/src/web/_views/template/post.php
+++ b/src/web/_views/template/post.php
@@ -61,7 +61,7 @@
</div>
<?php if ($self): ?>
<div class="row pb">
- <?php $this->view('template/pfp', array('user' => $user))?>
+ <?php $this->view('template/pfp', array('user' => $self))?>
<form class="ml action-new-comment-form row">
<input
type="hidden"