From 2c27ba66a5a05a52a6f0144ebd3e65562edba14b Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 May 2014 20:17:52 -0700 Subject: zrlify (turn into zmg) any relevant img tags in a post. --- mod/item.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 164b345f0..9470a2b9c 100644 --- a/mod/item.php +++ b/mod/item.php @@ -440,6 +440,11 @@ function item_post(&$a) { $body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','red_unescape_codeblock',$body); $body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','red_unescape_codeblock',$body); + // fix any img tags that should be zmg + + $body = preg_replace_callback('/\[img(.*?)\](.*?)\[\/img\]/ism','red_zrlify_img_callback',$body); + + /** * -- cgit v1.2.3 From 722b6c78cbf8f0eb53c29fcc0995a488cf862031 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 14 May 2014 03:10:36 -0700 Subject: fix author delete (non-owner) --- mod/item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 9470a2b9c..68582e580 100644 --- a/mod/item.php +++ b/mod/item.php @@ -852,10 +852,10 @@ function item_content(&$a) { require_once('include/security.php'); if((argc() == 3) && (argv(1) === 'drop') && intval(argv(2))) { + require_once('include/items.php'); - $i = q("select id, uid, author_xchan, owner_xchan, source_xchan, item_restrict from item where id = %d and uid = %d limit 1", - intval(argv(2)), - intval(local_user()) + $i = q("select id, uid, author_xchan, owner_xchan, source_xchan, item_restrict from item where id = %d limit 1", + intval(argv(2)) ); if($i) { -- cgit v1.2.3