Subversion Repositories SmartDukaan

Rev

Rev 14561 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14561 Rev 15848
Line 108... Line 108...
108
 * @throws NotFoundException
108
 * @throws NotFoundException
109
 * @param string $id
109
 * @param string $id
110
 * @return void
110
 * @return void
111
 */
111
 */
112
	public function admin_delete($id = null) {		
112
	public function admin_delete($id = null) {		
113
		// $this->request->onlyAllow('post', 'delete');
113
		$response = $this->remove($id,'SkuDiscountInfo');
114
		if ($this->remove($id,'SkuDiscountInfo')) {
114
		if ($response) {
115
			$this->Session->setFlash(__('The negative deal has been deleted.'));
115
			$this->Session->setFlash(current($response));
116
		} else {
116
		} else {
117
			$this->Session->setFlash(__('The negative could not be deleted. Please, try again.'));
117
			$this->Session->setFlash(current($response));
118
		}
118
		}
119
		return $this->redirect(array('action' => 'index'));
119
		return $this->redirect(array('action' => 'index'));
120
	}
120
	}
121
}
121
}