]> git.mxchange.org Git - friendica.git/commitdiff
set permalink on uploaded photo items
authorFriendika <info@friendika.com>
Mon, 9 May 2011 05:47:35 +0000 (22:47 -0700)
committerFriendika <info@friendika.com>
Mon, 9 May 2011 05:47:35 +0000 (22:47 -0700)
boot.php
mod/photos.php

index ad3a76e8e69727de3ed1c39050ef842d2067e115..dee3b82cf03a2119323bb18615518a5c9564ca36 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -3,7 +3,7 @@
 set_time_limit(0);
 ini_set('pcre.backtrack_limit', 250000);
 
-define ( 'FRIENDIKA_VERSION',      '2.1.970' );
+define ( 'FRIENDIKA_VERSION',      '2.1.973' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 define ( 'DB_UPDATE_VERSION',      1054      );
 
index 7f94bc520c3534a964a3c0049528f7cc683a31e9..70f21d96878e5878f84e95a1042c864ad1b7976a 100644 (file)
@@ -639,6 +639,14 @@ foreach($_FILES AS $key => $val) {
 
        $item_id = item_store($arr);
 
+       if($item_id) {
+               q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
+                       dbesc($a->get_baseurl() . '/display/' . $owner_record['nickname'] . '/' . $item_id),
+                       intval($page_owner_uid),
+                       intval($item_id)
+               );
+       }
+       
        if($visible) 
                proc_run('php', "include/notifier.php", 'wall-new', $item_id);