aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/xml.php2
-rw-r--r--mod/file/actions/upload.php7
-rw-r--r--mod/groups/actions/forums/deletepost.php7
3 files changed, 11 insertions, 5 deletions
diff --git a/engine/lib/xml.php b/engine/lib/xml.php
index f691b2475..b21fdd92b 100644
--- a/engine/lib/xml.php
+++ b/engine/lib/xml.php
@@ -110,7 +110,7 @@
}
if ($n==0) {
- $output = "</array>\n";
+ $output .= "</array>\n";
}
return $output;
diff --git a/mod/file/actions/upload.php b/mod/file/actions/upload.php
index e515c73e0..5a22b1231 100644
--- a/mod/file/actions/upload.php
+++ b/mod/file/actions/upload.php
@@ -87,9 +87,9 @@
// use same filename on the disk - ensures thumbnails are overwritten
$filestorename = $file->getFilename();
- $filestorename = substr($filestorename, strlen($prefix));
+ $filestorename = elgg_substr($filestorename, elgg_strlen($prefix));
} else {
- $filestorename = strtolower(time().$_FILES['upload']['name']);
+ $filestorename = elgg_strtolower(time().$_FILES['upload']['name']);
}
$file->setFilename($prefix.$filestorename);
@@ -139,6 +139,9 @@
unset($thumblarge);
}
}
+ } else {
+ // not saving a file but still need to save the entity to push attributes to database
+ $file->save();
}
// make sure session cache is cleared
diff --git a/mod/groups/actions/forums/deletepost.php b/mod/groups/actions/forums/deletepost.php
index 4066b7456..14336c1fa 100644
--- a/mod/groups/actions/forums/deletepost.php
+++ b/mod/groups/actions/forums/deletepost.php
@@ -24,11 +24,14 @@
//check that the user can edit as well as admin
if ($post->canEdit() || ($post->owner_guid == $_SESSION['user']->guid)) {
- //delete
+ //delete forum comment
$post->delete();
+
+ // remove river entry if it exists
+ remove_from_river_by_annotation($post_id);
+
//display confirmation message
system_message(elgg_echo("grouppost:deleted"));
-
}
} else {