aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-08 22:47:35 -0700
committerFriendika <info@friendika.com>2011-05-08 22:47:35 -0700
commitc2e35d2d35a9586bd564368f39544dc487cafc12 (patch)
tree0699d2d49b8e9949f841eaa20b9b4df503fcd95b
parent2c63b65e3c66bcb0a047ce51c04d23376aa6c525 (diff)
downloadvolse-hubzilla-c2e35d2d35a9586bd564368f39544dc487cafc12.tar.gz
volse-hubzilla-c2e35d2d35a9586bd564368f39544dc487cafc12.tar.bz2
volse-hubzilla-c2e35d2d35a9586bd564368f39544dc487cafc12.zip
set permalink on uploaded photo items
-rw-r--r--boot.php2
-rw-r--r--mod/photos.php8
2 files changed, 9 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index ad3a76e8e..dee3b82cf 100644
--- 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 );
diff --git a/mod/photos.php b/mod/photos.php
index 7f94bc520..70f21d968 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -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);