From 913109796ef58339cf9ac4590e7e0e06e7a3ce02 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 27 Sep 2014 05:10:09 -0700 Subject: provide backup copy of post for diaspora reshare and re-fetch --- mod/p.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 mod/p.php (limited to 'mod/p.php') diff --git a/mod/p.php b/mod/p.php new file mode 100644 index 000000000..227f9e24a --- /dev/null +++ b/mod/p.php @@ -0,0 +1,52 @@ +get_hostname(); + + $item = $r[0]; + + $title = $item['title']; + $body = bb2diaspora_itembody($item); + $created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C'); + + $tpl = get_markup_template('diaspora_post.tpl'); + $msg = replace_macros($tpl, array( + '$body' => xmlify($body), + '$guid' => $item['mid'], + '$handle' => xmlify($myaddr), + '$public' => 'true', + '$created' => $created, + '$provider' => (($item['app']) ? $item['app'] : 'redmatrix') + )); + + header('Content-type: text/xml'); + echo $msg; + killme(); +} \ No newline at end of file -- cgit v1.2.3