From 45809013256e8c5eb87fa90a6feee66ec632cb03 Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 20 Dec 2010 12:38:25 +0000 Subject: added elgg-icon-delete and elgg-icon-likes git-svn-id: http://code.elgg.org/elgg/trunk@7698 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/output/confirmlink.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'views/default/output/confirmlink.php') diff --git a/views/default/output/confirmlink.php b/views/default/output/confirmlink.php index bce06305a..5cb9aa52e 100644 --- a/views/default/output/confirmlink.php +++ b/views/default/output/confirmlink.php @@ -9,21 +9,27 @@ * @uses $vars['text'] The text of the link * @uses $vars['href'] The address * @uses $vars['confirm'] The dialog text - * + * @uses $vars['encode'] Encode special characters? */ -$confirm = $vars['confirm']; -if (!$confirm) { - $confirm = elgg_echo('question:areyousure'); -} +$confirm = elgg_get_array_value('confirm', $vars, elgg_echo('question:areyousure')); + +$encode = elgg_get_array_value('encode', $vars, true); // always generate missing action tokens $link = elgg_add_action_tokens_to_url(elgg_normalize_url($vars['href'])); +$text = elgg_get_array_value('text', $vars, ''); +if ($encode) { + $text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); +} + if (isset($vars['class']) && $vars['class']) { $class = 'class="' . $vars['class'] . '"'; } else { $class = ''; } ?> - onclick="return confirm('');"> + onclick="return confirm('');"> + + -- cgit v1.2.3