]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
mucho progress on notifier, email style dfrn url's
[friendica.git] / mod / item.php
index 588dd9a9d3f48a3f2a579d43a56ab42f3c714960..4314719fb510ab05728074c25b7ada5a88a39017 100644 (file)
@@ -12,7 +12,7 @@ function item_post(&$a) {
        $parent = ((x($_POST,'parent')) ? intval($_POST['parent']) : 0);
        $profile_uid = ((x($_POST,'profile_uid')) ? intval($_POST['profile_uid']) : 0);
        if(! can_write_wall($a,$profile_uid)) {
-               $_SESSION['sysmsg'] .= "Permission denied." . EOL;
+               notice("Permission denied." . EOL) ;
                return;
        }
 
@@ -23,7 +23,7 @@ function item_post(&$a) {
                        intval($_SESSION['uid']));
                if(count($r))
                        $contact_id = $r[0]['id'];
-       
+       }       
        if($_POST['type'] == 'jot') {
 
                do {
@@ -35,6 +35,7 @@ function item_post(&$a) {
                                $dups = true;
                } while($dups == true);
 
+
                $r = q("INSERT INTO `item` (`uid`,`type`,`contact-id`,`created`,`edited`,`hash`,`body`)
                        VALUES( %d, '%s', %d, '%s', '%s', '%s', '%s' )",
                        intval($profile_uid),
@@ -56,8 +57,15 @@ function item_post(&$a) {
                                intval($parent),
                                intval($post_id));
                }
+
+               $url = bin2hex($a->get_baseurl());
+               proc_close(proc_open("php include/notifier.php $url $post_id > notify.log &",
+                       array(),$foo));
+
+//             notifier($a,$post_id,$parent);
+
        }
-       goaway($a->get_baseurl() . "/profile/$uid");
+       goaway($a->get_baseurl() . "/profile/$profile_uid");