$legislation->update(); } else { $id = $legislation->insert(); } // sponsor IDs next $sponsor_ids = get_param('sponsor_ids'); if (!empty($sponsor_ids)) { $legislation->associate_sponsors($sponsor_ids); } // tags next $tag_list = get_param('tag_list'); $tags = explode('|', $tag_list); if (!empty($tags)) { $legislation->associate_tags($tags); } else { $legislation->disassociate_tags(); } redirect('legislation'); } $html = new HTML('admin'); $html->set_title('Edit this legislative legislation'); $html->use_style('admin/tag.css'); $html->use_style('dp/themes/base/ui.all.css'); $html->use_style('dp/themes/base/ui.core.css'); $html->use_style('dp/themes/base/ui.datepicker.css'); $html->use_style('dp/themes/base/ui.theme.css'); $html->use_script('admin/stopwords.js'); $html->use_script('admin/tag_extraction.js'); $html->use_script('datepicker/ui/ui.core.js'); $html->use_script('datepicker/ui/ui.datepicker.js'); $html->use_script('datepicker/header.js');