forward(REFERER); } if (!$title) { // user blanked title, but we need one $title = $sharemaps->title; } } $sharemaps->title = $title; $sharemaps->description = $desc; $sharemaps->access_id = $access_id; $sharemaps->container_guid = $container_guid; $sharemaps->gmaplink = $gmaplink; $tags = explode(",", $tags); $sharemaps->tags = $tags; // not saving a file but still need to save the entity to push attributes to database $guid = $sharemaps->save(); // map saved so clear sticky form elgg_clear_sticky_form('sharemaps'); // handle results differently for new files and file updates if ($new_file) { if ($guid) { $message = elgg_echo("sharemaps:saved"); system_message($message); elgg_create_river_item(array('view' => 'river/object/sharemaps/create', 'action_type' => 'create', 'subject_guid' => elgg_get_logged_in_user_guid(), 'object_guid' => $sharemaps->guid)); } else { // failed to save map object - nothing we can do about this $error = elgg_echo("sharemaps:uploadfailed"); register_error($error); } forward($sharemaps->getURL()); } else {