diff options
author | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-03-17 07:08:48 +0100 |
---|---|---|
committer | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-03-17 07:08:48 +0100 |
commit | f4f5095e19badcc85453182b86bff97f57228257 (patch) | |
tree | af391e8f809c3ab7ae183c72a364ba09fd16702e /mod/share.php | |
parent | 0c16d033efd4ee878ab94318e7980d373ad3994d (diff) | |
parent | b3050d3bc8fc812f0579982e1c866ab07499e0a8 (diff) | |
download | volse-hubzilla-f4f5095e19badcc85453182b86bff97f57228257.tar.gz volse-hubzilla-f4f5095e19badcc85453182b86bff97f57228257.tar.bz2 volse-hubzilla-f4f5095e19badcc85453182b86bff97f57228257.zip |
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'mod/share.php')
-rw-r--r-- | mod/share.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mod/share.php b/mod/share.php new file mode 100644 index 000000000..8a8229e8a --- /dev/null +++ b/mod/share.php @@ -0,0 +1,23 @@ +<?php + +require_once('bbcode.php'); + +function share_init(&$a) { + + $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0); + if((! $post_id) || (! local_user())) + killme(); + + $r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1", + intval($post_id) + ); + if(! count($r) || $r[0]['private']) + killme(); + + $o = ''; + + $o .= '♲ <a href="' . $r[0]['author-link'] . '">' . $r[0]['author-name'] . '</a><br />'; + $o .= prepare_body($r[0]); + echo $o . '<br />'; + killme(); +}
\ No newline at end of file |