Subversion Repositories SmartDukaan

Rev

Rev 14776 | Rev 14781 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14776 Rev 14778
Line 13... Line 13...
13
 *
13
 *
14
 * @var array
14
 * @var array
15
 */
15
 */
16
	public $components = array('Paginator');
16
	public $components = array('Paginator');
17
 
17
 
-
 
18
	public function beforeFilter() {
-
 
19
		parent::beforeFilter();
-
 
20
		$this->Auth->allow('add');
-
 
21
	}
18
/**
22
/**
19
 * index method
23
 * index method
20
 *
24
 *
21
 * @return void
25
 * @return void
22
 */
26
 */
Line 45... Line 49...
45
 *
49
 *
46
 * @return void
50
 * @return void
47
 */
51
 */
48
	public function add() {
52
	public function add() {
49
		if ($this->request->is('post')) {
53
		if ($this->request->is('post')) {
-
 
54
			$this->log(print_r($this->request->data,1),'pushnotifications');
50
			$this->Pushnotification->create();
55
			$this->Pushnotification->create();
51
			if ($this->Pushnotification->save($this->request->data)) {
56
			if ($this->Pushnotification->save($this->request->data)) {
52
				$this->Session->setFlash(__('The pushnotification has been saved.'));
57
				$this->Session->setFlash(__('The pushnotification has been saved.'));
53
				return $this->redirect(array('action' => 'index'));
58
				return $this->redirect(array('action' => 'index'));
54
			} else {
59
			} else {