aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 13:11:23 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 13:11:23 +0000
commit962164b97ca11d9ce155bde60f198d226ff060d3 (patch)
tree84dd5d6f7979a8c4e6efa08dd32c60b9bedffc27 /mod/groups/lib
parent83658fe7fe28332e73ca6600793ddb8bb52f5b3a (diff)
downloadelgg-962164b97ca11d9ce155bde60f198d226ff060d3.tar.gz
elgg-962164b97ca11d9ce155bde60f198d226ff060d3.tar.bz2
Fixes #3239 entities aren't blown away in form prepare functions any more
git-svn-id: http://code.elgg.org/elgg/trunk@8839 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/lib')
-rw-r--r--mod/groups/lib/discussion.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php
index 1813c87aa..94d212ef6 100644
--- a/mod/groups/lib/discussion.php
+++ b/mod/groups/lib/discussion.php
@@ -218,13 +218,16 @@ function discussion_prepare_form_vars($topic = NULL) {
if ($topic) {
foreach (array_keys($values) as $field) {
- $values[$field] = $topic->$field;
+ if (isset($topic->$field)) {
+ $values[$field] = $topic->$field;
+ }
}
}
if (elgg_is_sticky_form('topic')) {
- foreach (array_keys($values) as $field) {
- $values[$field] = elgg_get_sticky_value('topic', $field);
+ $sticky_values = elgg_get_sticky_values('topic');
+ foreach ($sticky_values as $key => $value) {
+ $values[$key] = $value;
}
}