/** * Handle POST * * Executes the actions; deletes all flags * * @return void */ function handlePost() { $ufp = new User_flag_profile(); $result = $ufp->query('UPDATE user_flag_profile ' . 'SET cleared = now() ' . 'WHERE cleared is null ' . 'AND profile_id = ' . $this->profile->id); if ($result == false) { // TRANS: Server exception given when flags could not be cleared. $msg = sprintf(_m('Couldn\'t clear flags for profile "%s".'), $this->profile->nickname); throw new ServerException($msg); } $ufp->free(); if ($this->boolean('ajax')) { $this->ajaxResults(); } }
/** * Handle POST * * Executes the actions; deletes all flags * * @return void */ function handlePost() { $ufp = new User_flag_profile(); $result = $ufp->query('UPDATE user_flag_profile ' . 'SET cleared = now() ' . 'WHERE cleared is null ' . 'AND profile_id = ' . $this->profile->id); if ($result == false) { $msg = sprintf(_("Couldn't clear flags for profile '%s'."), $this->profile->nickname); throw new ServerException($msg); } $ufp->free(); if ($this->boolean('ajax')) { $this->ajaxResults(); } }