aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2011-06-08 12:01:36 +0200
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2011-06-08 12:01:36 +0200
commit6f9fd92c2eabd1b26182e2f7157f35e44f94dc67 (patch)
treee937348598ae50a270faa5e2c850970e42e169be
parent9ef5cb1c385e598d16ea78fef7f4207603ea4e79 (diff)
parenta10abd4860ee2e34b197fd7c1bba295cd35c1a9b (diff)
downloadvolse-hubzilla-6f9fd92c2eabd1b26182e2f7157f35e44f94dc67.tar.gz
volse-hubzilla-6f9fd92c2eabd1b26182e2f7157f35e44f94dc67.tar.bz2
volse-hubzilla-6f9fd92c2eabd1b26182e2f7157f35e44f94dc67.zip
Merge branch 'master' of git://github.com/friendika/friendika
-rw-r--r--mod/item.php11
-rw-r--r--mod/wall_upload.php8
2 files changed, 16 insertions, 3 deletions
diff --git a/mod/item.php b/mod/item.php
index 2c8cf256c..d7c15ff02 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -772,6 +772,17 @@ function item_content(&$a) {
// ignore the result
}
+ // If item is a link to an event, nuke the event record.
+
+ if(intval($item['event-id'])) {
+ q("DELETE FROM `event` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ intval($item['event-id']),
+ intval($item['uid'])
+ );
+ // ignore the result
+ }
+
+
// If it's the parent of a comment thread, kill all the kids
if($item['uri'] == $item['parent-uri']) {
diff --git a/mod/wall_upload.php b/mod/wall_upload.php
index bd6b80562..dd2197d7c 100644
--- a/mod/wall_upload.php
+++ b/mod/wall_upload.php
@@ -76,7 +76,9 @@ function wall_upload_post(&$a) {
$smallest = 0;
- $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0, 0, '<0>');
+ $defperm = '<' . $page_owner_uid . '>';
+
+ $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0, 0, $defperm);
if(! $r) {
echo ( t('Image upload failed.') . EOL);
@@ -85,14 +87,14 @@ function wall_upload_post(&$a) {
if($width > 640 || $height > 640) {
$ph->scaleImage(640);
- $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1, 0, '<0>');
+ $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1, 0, $defperm);
if($r)
$smallest = 1;
}
if($width > 320 || $height > 320) {
$ph->scaleImage(320);
- $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 2, 0, '<0>' );
+ $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 2, 0, $defperm);
if($r)
$smallest = 2;
}