aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-30 09:04:16 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-30 09:04:16 +0000
commit1ae0ad4a3dd8ee705277476cde6d4533c6adc796 (patch)
tree940bc16f9a37f04378ef27699758355159b669bd
parenta4610b309edc583ec4f4b34fb8f8f712f898e5c2 (diff)
downloadelgg-1ae0ad4a3dd8ee705277476cde6d4533c6adc796.tar.gz
elgg-1ae0ad4a3dd8ee705277476cde6d4533c6adc796.tar.bz2
Widget state cookie is now removed on widget delete.
git-svn-id: https://code.elgg.org/elgg/trunk@1588 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/widgets.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php
index 85348a4f8..171d4928e 100644
--- a/engine/lib/widgets.php
+++ b/engine/lib/widgets.php
@@ -383,8 +383,13 @@
$dbwidget->column = $col;
$dbwidget->order = $pos;
} else {
- if (!$dbwidget->delete())
+ $dbguid = $dbwidget->getGUID();
+ if (!$dbwidget->delete()) {
$return = false;
+ } else {
+ // Remove state cookie
+ setcookie('widget' + $dbquid, null);
+ }
}
}