aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-10 13:15:50 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-10 13:15:50 +0000
commitb86f37c1aca7f8a90a41682dafd9cd06a72cbc6a (patch)
treee2f97d05c12f5301ba2a8fba1f2f4ab398245a3b
parent9991a5dfafbedbf9885f14dd420b8109aaebfab4 (diff)
downloadelgg-b86f37c1aca7f8a90a41682dafd9cd06a72cbc6a.tar.gz
elgg-b86f37c1aca7f8a90a41682dafd9cd06a72cbc6a.tar.bz2
Working with multiple values in array
git-svn-id: https://code.elgg.org/elgg/trunk@1389 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/widgets.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php
index 2269d76d0..85348a4f8 100644
--- a/engine/lib/widgets.php
+++ b/engine/lib/widgets.php
@@ -296,15 +296,21 @@
$handler = $widget->handler;
if (empty($handler) || !widget_type_exists($handler)) return false;
- if (!$widget->canEdit()) return false;
+ if (!$widget->canEdit()) return false;
// Save the params to the widget
if (is_array($params) && sizeof($params) > 0) {
- foreach($params as $name => $value) {
+ foreach($params as $name => $value) {
+ error_log("ERP: $name". print_r($value, true));
if (!empty($name) && !in_array($name,array(
'guid','owner_guid','site_guid'
- ))) {
- $widget->$name = $value;
+ ))) {
+ if (is_array($value))
+ {
+ error_log("ERP: Here");
+ $widget->setMetaData($name, $value, "", true);
+ }else
+ $widget->$name = $value;
}
}
$widget->save();