Merge remote branch 'upstream/master'

This commit is contained in:
Tony Baldwin 2012-03-17 17:16:57 -04:00
commit f75d96e5bc
61 changed files with 844 additions and 225 deletions

View file

@ -6,6 +6,7 @@
* Version: 1.0
* Author: Tony Baldwin <https://free-haven.org/profile/tony>
* Author: Michael Johnston
* Author: Cat Gray <https://free-haven.org/profile/catness>
*/
function dwpost_install() {
@ -173,6 +174,7 @@ function dwpost_send(&$a,&$b) {
$title = $b['title'];
$post = bbcode($b['body']);
$post = xmlify($post);
$tags = dwpost_get_tags($b['tag']);
$date = datetime_convert('UTC',$tz,$b['created'],'Y-m-d H:i:s');
$year = intval(substr($date,0,4));
@ -200,7 +202,7 @@ function dwpost_send(&$a,&$b) {
<member><name>props</name>
<value><struct>
<member><name>useragent</name><value><string>Friendica</string></value></member>
<member><name>taglist</name><value><string>friendica</string></value></member>
<member><name>taglist</name><value><string>$tags</string></value></member>
</struct></value></member>
</struct></value>
</param></params>
@ -217,3 +219,9 @@ EOT;
}
}
function dwpost_get_tags($post)
{
preg_match_all("/\]([^\[#]+)\[/",$post,$matches);
$tags = implode(', ',$matches[1]);
return $tags;
}