--- notify.module 5 Jan 2007 07:53:43 -0000 2.67
+++ notify.module 28 Mar 2007 14:01:13 -0000
@@ -284,7 +284,6 @@
* Formatting of outgoing mail, taken from mail.inc, part of project.module
*/
function _notify_content($node, $notify) {
- static $i = 0;
switch ($notify->teasers) {
case 0:
@@ -296,9 +295,11 @@
$txt = check_markup($node->body, $node->format, FALSE);
}
- $pattern = '@((.+?))@ei';
+ global $urls;
+ $urls = array();
+ $pattern = '@((.+?))@ei';
$txt = preg_replace($pattern, "'\\3 ['. _notify_mail_urls('\\2') .']'", $txt);
- $urls = _notify_mail_urls();
+ $i = 0;
if (count($urls)) {
$txt .= "\n";
for ($max = count($urls); $i < $max; $i++) {
@@ -492,7 +493,7 @@
}
function _notify_mail_urls($url = 0) {
- static $urls = array();
+ global $urls;
if ($url) {
$urls[] = strpos($url, '://') ? $url : url($url, NULL, NULL, 1);
return count($urls);