Esempio n. 1
0
 public static function createHref($row, $spamProtect = true)
 {
     $ret = 'mailto:';
     if ($spamProtect) {
         $helper = new Kwf_View_Helper_MailLink();
         $ret .= $helper->encodeMail($row->mail);
     } else {
         $ret .= $row->mail;
     }
     if ($row->text || $row->subject) {
         $ret .= '?';
     }
     if ($row->subject) {
         $ret .= 'subject=' . $row->subject;
     }
     if ($row->text && $row->subject) {
         $ret .= '&';
     }
     if ($row->text) {
         $ret .= 'body=' . $row->text;
     }
     return $ret;
 }