Fixed syntax error in usage of anonymous function.

This commit is contained in:
Rainulf Pineda 2012-07-25 21:38:28 -04:00
parent db0b7c36ea
commit 1573c10631

View file

@ -2156,9 +2156,9 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
/**
* Transform #tags, strip off the [url] and replace spaces with underscore
*/
$body = preg_replace_callback('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', function($match) {
return '#'. str_replace(' ', '_', $match[2]);
}, $body);
$body = preg_replace_callback('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', create_function('$match',
'return \'#\'. str_replace(\' \', \'_\', $match[2]);'
), $body);
//if(strlen($title))
// $body = "[b]".html_entity_decode($title)."[/b]\n\n".$body;