]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
send less messages to server; remove delete option
[friendica.git] / mod / item.php
index e3230c86436bebfb2f730bdb32ee7804d8d896aa..7d36d7f70aca152a91646dcd4dda5065d51e63a5 100644 (file)
@@ -373,8 +373,8 @@ function item_post(&$a) {
 
        $match = null;
 
-       if((! $preview) && preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match)) {
-               $images = $match[1];
+       if((! $preview) && preg_match_all("/\[img([\=0-9x]*?)\](.*?)\[\/img\]/",$body,$match)) {
+               $images = $match[2];
                if(count($images)) {
                        foreach($images as $image) {
                                if(! stristr($image,$a->get_baseurl() . '/photo/'))
@@ -619,7 +619,7 @@ function item_post(&$a) {
 
        if($preview) {
                require_once('include/conversation.php');
-               $o = conversation($a,array(array_merge($contact_record,$datarray)),'search', false);
+               $o = conversation($a,array(array_merge($contact_record,$datarray)),'search', false, true);
                logger('preview: ' . $o);
                echo json_encode(array('preview' => $o));
                killme();