Take the name of the bookmark link as title - when not set.

pull/62/head
Michael Vogel 2012-04-23 22:58:52 +02:00
parent 2333679ee0
commit 7e9b3450c5
1 changed files with 6 additions and 1 deletions

View File

@ -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,