]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
now the installer checks for iconv module as well #2506
[friendica.git] / mod / photos.php
index 2257a96653c36b172ff6232321c979f5dc916c90..a191dcf0712562cd5222233024f8b20d9d2be7dc 100644 (file)
@@ -8,6 +8,7 @@ require_once('include/security.php');
 require_once('include/redir.php');
 require_once('include/tags.php');
 require_once('include/threads.php');
+require_once('include/Probe.php');
 
 function photos_init(&$a) {
 
@@ -305,7 +306,7 @@ function photos_post(&$a) {
                                        // send the notification upstream/downstream as the case may be
 
                                        if($rr['visible'])
-                                               proc_run('php',"include/notifier.php","drop","$drop_id");
+                                               proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $drop_id);
                                }
                        }
                }
@@ -375,7 +376,7 @@ function photos_post(&$a) {
                                $drop_id = intval($i[0]['id']);
 
                                if($i[0]['visible'])
-                                       proc_run('php',"include/notifier.php","drop","$drop_id");
+                                       proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $drop_id);
                        }
                }
 
@@ -488,7 +489,7 @@ function photos_post(&$a) {
                        $uri = item_new_uri($a->get_hostname(),$page_owner_uid);
 
                        $arr = array();
-
+                       $arr['guid']          = get_guid(32);
                        $arr['uid']           = $page_owner_uid;
                        $arr['uri']           = $uri;
                        $arr['parent-uri']    = $uri;
@@ -552,7 +553,7 @@ function photos_post(&$a) {
                                                $name = substr($tag,1);
                                                if((strpos($name,'@')) || (strpos($name,'http://'))) {
                                                        $newname = $name;
-                                                       $links = @lrdd($name);
+                                                       $links = @Probe::lrdd($name);
                                                        if(count($links)) {
                                                                foreach($links as $link) {
                                                                        if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page')
@@ -677,7 +678,7 @@ function photos_post(&$a) {
                                        $uri = item_new_uri($a->get_hostname(),$page_owner_uid);
 
                                        $arr = array();
-
+                                       $arr['guid']          = get_guid(32);
                                        $arr['uid']           = $page_owner_uid;
                                        $arr['uri']           = $uri;
                                        $arr['parent-uri']    = $uri;
@@ -718,7 +719,7 @@ function photos_post(&$a) {
 
                                        $item_id = item_store($arr);
                                        if($item_id) {
-                                               proc_run('php',"include/notifier.php","tag","$item_id");
+                                               proc_run(PRIORITY_HIGH, "include/notifier.php", "tag", $item_id);
                                        }
                                }
 
@@ -904,6 +905,7 @@ function photos_post(&$a) {
        if($lat && $lon)
                $arr['coord'] = $lat . ' ' . $lon;
 
+       $arr['guid']          = get_guid(32);
        $arr['uid']           = $page_owner_uid;
        $arr['uri']           = $uri;
        $arr['parent-uri']    = $uri;
@@ -933,7 +935,7 @@ function photos_post(&$a) {
        $item_id = item_store($arr);
 
        if($visible)
-               proc_run('php', "include/notifier.php", 'wall-new', $item_id);
+               proc_run(PRIORITY_HIGH, "include/notifier.php", 'wall-new', $item_id);
 
        call_hooks('photo_post_end',intval($item_id));
 
@@ -1305,11 +1307,10 @@ function photos_content(&$a) {
                                '$can_post' => $can_post,
                                '$upload' => array(t('Upload New Photos'), 'photos/' . $a->data['user']['nickname'] . '/upload/' . bin2hex($album)),
                                '$order' => $order,
-                               '$edit' => $edit
+                               '$edit' => $edit,
+                               '$paginate' => paginate($a),
                        ));
 
-               $o .= paginate($a);
-
                return $o;
 
        }
@@ -1886,10 +1887,9 @@ function photos_content(&$a) {
                '$can_post' => $can_post,
                '$upload' => array(t('Upload New Photos'), 'photos/'.$a->data['user']['nickname'].'/upload'),
                '$photos' => $photos,
+               '$paginate' => paginate($a),
        ));
 
-
-       $o .= paginate($a);
        return $o;
 }