]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
output/confirmlink now supports title attribute
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 3 Apr 2011 12:30:51 +0000 (12:30 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 3 Apr 2011 12:30:51 +0000 (12:30 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8928 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/output/confirmlink.php

index 58d1f5183ecf329fc4b948bb8b2ffdff1fd513f8..9670941134389fa88dcb39000c14d931aef8c7c9 100644 (file)
@@ -8,6 +8,7 @@
  *
  * @uses $vars['text'] The text of the link
  * @uses $vars['href'] The address
+ * @uses $vars['title'] The title text (defaults to confirm text)
  * @uses $vars['confirm'] The dialog text
  * @uses $vars['text_encode'] Encode special characters? (false)
  */
@@ -23,7 +24,10 @@ if ($encode) {
        $text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false);
 }
 
-$vars['title'] = addslashes($confirm);
+if (!isset($vars['title'])) {
+       $vars['title'] = addslashes($confirm);
+}
+
 if (isset($vars['class'])) {
        if (!is_array($vars['class'])) {
                $vars['class'] = array($vars['class']);