aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--comments.php5
-rw-r--r--include/picture_comment.inc.php1
-rw-r--r--themes/default/template/comment_list.tpl5
3 files changed, 11 insertions, 0 deletions
diff --git a/comments.php b/comments.php
index d23e992c7..570e88997 100644
--- a/comments.php
+++ b/comments.php
@@ -364,6 +364,10 @@ $navbar = create_navigation_bar($url,
$template->assign('navbar', $navbar);
+$url_self = PHPWG_ROOT_PATH
+ .'comments.php'
+ .get_query_string_diff(array('edit','delete','validate','pwg_token'));
+
// +-----------------------------------------------------------------------+
// | last comments display |
// +-----------------------------------------------------------------------+
@@ -515,6 +519,7 @@ SELECT c.id, name, permalink, uppercats, com.id as comment_id
$tpl_comment['IMAGE_ID'] = $comment['image_id'];
$tpl_comment['CONTENT'] = $comment['content'];
$tpl_comment['PWG_TOKEN'] = get_pwg_token();
+ $tpl_comment['U_CANCEL'] = $url_self;
}
}
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php
index b4ae4c996..380a66d5a 100644
--- a/include/picture_comment.inc.php
+++ b/include/picture_comment.inc.php
@@ -207,6 +207,7 @@ SELECT
$tpl_comment['KEY'] = $key;
$tpl_comment['CONTENT'] = $row['content'];
$tpl_comment['PWG_TOKEN'] = get_pwg_token();
+ $tpl_comment['U_CANCEL'] = $url_self;
}
}
if (is_admin())
diff --git a/themes/default/template/comment_list.tpl b/themes/default/template/comment_list.tpl
index cb3052d11..59618cde2 100644
--- a/themes/default/template/comment_list.tpl
+++ b/themes/default/template/comment_list.tpl
@@ -25,6 +25,11 @@
{if isset($comment.U_DELETE)}
<a href="{$comment.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
{'Delete'|@translate}
+ </a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT) or isset($comment.U_CANCEL)} | {/if}
+ {/if}
+ {if isset($comment.U_CANCEL)}
+ <a href="{$comment.U_CANCEL}">
+ {'Cancel'|@translate}
</a>{if isset($comment.U_VALIDATE) or isset($comment.U_EDIT)} | {/if}
{/if}
{if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}