[Hastymail-cvs] SF.net SVN: hastymail:[1237] trunk/hastymail2/lib/misc_functions.php
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2009-11-30 03:20:23
|
Revision: 1237 http://hastymail.svn.sourceforge.net/hastymail/?rev=1237&view=rev Author: sailfrog Date: 2009-11-30 03:20:17 +0000 (Mon, 30 Nov 2009) Log Message: ----------- - fixed a bug with the clickable email and clickable link settings on the message view page - removed some unused code Modified Paths: -------------- trunk/hastymail2/lib/misc_functions.php Modified: trunk/hastymail2/lib/misc_functions.php =================================================================== --- trunk/hastymail2/lib/misc_functions.php 2009-11-29 23:58:44 UTC (rev 1236) +++ trunk/hastymail2/lib/misc_functions.php 2009-11-30 03:20:17 UTC (rev 1237) @@ -687,7 +687,8 @@ $offset_adjust = 0; foreach ($matches[1] as $vals) { $offset = $vals[1] + $offset_adjust; - $link = str_replace(array('[span-'.$page_id.']'), array(''), $vals[0]); + $link = $vals[0]; + $link = str_replace('@', '^'.$page_id.'^', $link); $link_tag = '<a class="text_link" href="'.$link.'" title="'.$link.'" target="_blank">link</a> '; $offset_adjust += hm_strlen($link_tag); if ($offset) { @@ -704,7 +705,7 @@ $offset_adjust = 0; foreach ($matches[1] as $vals) { $offset = $vals[1] + $offset_adjust; - $email = str_replace('[span-'.$page_id.']', '', $vals[0]); + $email = $vals[0]; $email_tag = '<a class="text_link" href="?page=compose&to='.urlencode($email).'" title="'.$email.'">email</a> '; $offset_adjust += strlen($email_tag); if ($offset) { @@ -716,20 +717,10 @@ } } } + $string = str_replace('^'.$page_id.'^', '@', $string); $string = str_replace(array(' "', " '", ' >', ' <', '  '), array('"', "'", '>', '<', ' '), $string); return $string; } -function prep_text_regex_callback($matches) { - global $user; - global $page_id; - $max = 48; - $line = $matches[0]; - array_shift($matches); - foreach ($matches as $v) { - $line = str_replace($v, (hm_substr($v, 0, $max).'[span-'.$page_id.']'.hm_substr($v, $max)), $line); - } - return $line; -} function timer_display($times) { global $page_start; $base = mt_to_num($page_start); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |