public function saveOrCreate($ak) { if ($this->tempID != false || $this->oid == 0) { return Option::add($ak, $this->optValue, $this->optIcon); } else { $db = Loader::db(); $th = Loader::helper('text'); $db->Execute('update atIconSelectorOptions set optValue = ? where oid = ?', array($th->sanitize($this->optValue), $this->oid)); return Option::getByID($this->oid); } }