diff options
author | friendica <info@friendica.com> | 2014-02-03 19:54:32 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-03 19:54:32 -0800 |
commit | 9ce3dac479672413eed9c42241cc5d4c40349b27 (patch) | |
tree | 046fd150f177e680b9c8683418d0b05158d2ae88 /include | |
parent | 876f5d4de09f6215c3e65146460027d0dd244bc8 (diff) | |
download | volse-hubzilla-9ce3dac479672413eed9c42241cc5d4c40349b27.tar.gz volse-hubzilla-9ce3dac479672413eed9c42241cc5d4c40349b27.tar.bz2 volse-hubzilla-9ce3dac479672413eed9c42241cc5d4c40349b27.zip |
some tagging fixes - including old bugs which were never reported
Diffstat (limited to 'include')
-rwxr-xr-x | include/text.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php index 37ce54f25..dc7d94b6d 100755 --- a/include/text.php +++ b/include/text.php @@ -442,7 +442,7 @@ function item_message_id() { $mid = $hash . '@' . get_app()->get_hostname(); - $r = q("SELECT `id` FROM `item` WHERE `mid` = '%s' LIMIT 1", + $r = q("SELECT id FROM item WHERE mid = '%s' LIMIT 1", dbesc($mid)); if(count($r)) $dups = true; @@ -459,7 +459,7 @@ function photo_new_resource() { do { $found = false; $resource = hash('md5',uniqid(mt_rand(),true)); - $r = q("SELECT `id` FROM `photo` WHERE `resource_id` = '%s' LIMIT 1", + $r = q("SELECT id FROM photo WHERE resource_id = '%s' LIMIT 1", dbesc($resource) ); if(count($r)) @@ -1651,10 +1651,10 @@ function item_post_type($item) { function undo_post_tagging($s) { $matches = null; - $cnt = preg_match_all('/([@#])\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER); + $cnt = preg_match_all('/([@#])(\!*)\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { - $s = str_replace($mtch[0], $mtch[1] . $mtch[3],$s); + $s = str_replace($mtch[0], $mtch[1] . $mtch[2] . str_replace(' ','_',$mtch[4]),$s); } } return $s; |