/** * Add a new bookmark * * @return void */ function handlePost() { if (empty($this->title)) { // TRANS: Client exception thrown when trying to create a new bookmark without a title. throw new ClientException(_m('Bookmark must have a title.')); } if (empty($this->url)) { // TRANS: Client exception thrown when trying to create a new bookmark without a URL. throw new ClientException(_m('Bookmark must have an URL.')); } $options = array(); ToSelector::fillOptions($this, $options); $saved = Bookmark::addNew($this->scoped, $this->title, $this->url, $this->tags, $this->description, $options); }