]> git.mxchange.org Git - friendica-addons.git/commitdiff
Take the name of the bookmark link as title - when not set.
authorMichael Vogel <icarus@dabo.de>
Mon, 23 Apr 2012 20:58:52 +0000 (22:58 +0200)
committerMichael Vogel <icarus@dabo.de>
Mon, 23 Apr 2012 20:58:52 +0000 (22:58 +0200)
tumblr/tumblr.php

index 31021842cce105ec87d0034cb750735ab6f3be91..3dd4daed7df2125630210e34cc399e94da1fa363 100755 (executable)
@@ -166,8 +166,13 @@ function tumblr_send(&$a,&$b) {
                        }
                }
                if(count($tag_arr))
-                       $tags = implode(',',$tag_arr);          
+                       $tags = implode(',',$tag_arr);
 
+               if ($b['title'] == '') {
+                       // Take the description from the bookmark
+                       if(preg_match("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/is",$b['body'],$matches))
+                               $b['title'] = $matches[2];
+               }
 
                $params = array(
                        'email' => $tmbl_username,