]> git.mxchange.org Git - friendica.git/blobdiff - mod/share.php
Events: Now with guid.
[friendica.git] / mod / share.php
index f3a221eb8ef4c985f9b8ad9e86a523efb8a4fa61..085da4e30d8a8b6f15e343a480d6743f733def15 100644 (file)
@@ -1,14 +1,12 @@
 <?php
-
-if(! function_exists('share_init')) {
 function share_init(&$a) {
 
        $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
        if((! $post_id) || (! local_user()))
                killme();
 
-       $r = q("SELECT item.*, contact.network FROM `item`
-               inner join contact on `item`.`contact-id` = `contact`.`id`
+       $r = q("SELECT item.*, contact.network FROM `item` 
+               inner join contact on `item`.`contact-id` = `contact`.`id` 
                WHERE `item`.`id` = %d AND `item`.`uid` = %d LIMIT 1",
 
                intval($post_id),
@@ -42,9 +40,7 @@ function share_init(&$a) {
        echo $o;
        killme();
 }
-}
 
-if(! function_exists('share_header')) {
 function share_header($author, $profile, $avatar, $guid, $posted, $link) {
        $header = "[share author='".str_replace(array("'", "[", "]"), array("&#x27;", "&#x5B;", "&#x5D;"),$author).
                "' profile='".str_replace(array("'", "[", "]"), array("&#x27;", "&#x5B;", "&#x5D;"),$profile).
@@ -60,4 +56,3 @@ function share_header($author, $profile, $avatar, $guid, $posted, $link) {
 
        return $header;
 }
-}