public function convert_to_storage() { $tag_array = net_nemein_tag_handler::string2tag_array($this->value); $this->auto_context = trim($this->auto_context); if (!empty($this->auto_context)) { $new_tag_array = array(); foreach ($tag_array as $tagname => $url) { $context = net_nemein_tag_handler::resolve_context($tagname); if (empty($context)) { $tagname = "{$this->auto_context}:{$tagname}"; } $new_tag_array[$tagname] = $url; } unset($tagname, $url); $tag_array = $new_tag_array; unset($new_tag_array); } $status = net_nemein_tag_handler::tag_object($this->storage->object, $tag_array); if (!$status) { debug_add("Tried to save the tags \"{$this->value}\" for field {$this->name}, but failed. Ignoring silently.", MIDCOM_LOG_WARN); } return null; }