function usunAction() { $post = new Zend_Filter_Input($_POST); $respondent = new Respondenci(); $db = $respondent->getAdapter(); $params = $this->_action->getParams(); if (isset($params['id'])) { $id = (int) $params['id']; $num = (int) $params['page']; $where = $db->quoteInto('id_respondent = ?', $id); $respondent->delete($where); $this->_forward('respondenci', 'edytuj', array('page' => $num)); } else { $what = trim($post->noTags('Umail')); $where = $db->quoteInto('e_mail = ?', $what); try { if (empty($what)) { throw new Respondenci_Exception('Podaj adres e-mail.'); } $respondent->delete($where); $this->_redirect('/respondenci/'); } catch (Respondenci_Exception $e) { $this->_forward('respondenci', 'index', array('insertionError' => $e->getMessage())); } } }
/** * @deprecated since 0.8.0 * @return void */ public function testNoTags() { $source = array('<b>word</b>'); $filter = new Zend_Filter_Input($source); $this->assertEquals('word', $filter->noTags(0)); $this->assertFalse($filter->noTags(1)); }