/** * Method perform action add * * @param array $errors array with error messages * @return array return array of $_GET params fo redirect or FALSE on failure */ function action_add(&$errors) { global $data; /* create new attribute */ $atr = new Attr_type("", 2, "string", "", "", 0, 0, 0, 0, 0); /* modify the attribute by values obtained from html form */ $this->set_attr_type_by_post($atr); /* store changes to DB */ if (false === $data->update_attr_type($atr, null, null)) { return false; } /* redirect to extended setting if attribute use it */ if (Attr_type::get_apu_edit($atr->get_type())) { $this->controler->change_url_for_reload($this->opt['type_spec_script'] . "?attrib_name=" . RawURLEncode($atr->get_name()) . "&kvrk=" . uniqID("")); } return true; }