Subversion Repositories SmartDukaan

Rev

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

Rev 14783 Rev 14784
Line 53... Line 53...
53
		if ($this->request->is('post')) {
53
		if ($this->request->is('post')) {
54
			$this->log(print_r($this->request->data,1),'pushnotifications');
54
			$this->log(print_r($this->request->data,1),'pushnotifications');
55
			$data = $this->request->data;
55
			$data = $this->request->data;
56
			$data['type'] = $data['result'];
56
			$data['type'] = $data['result'];
57
			$data['status'] = 1;
57
			$data['status'] = 1;
-
 
58
			$data['response_time'] = date('Y-m-d h:i:s',strtotime($data['timestamp']));
58
			$data['notification_campaign_id'] = $data['cid'];
59
			$data['notification_campaign_id'] = $data['cid'];
59
			unset($data['result']);
60
			unset($data['result']);
60
			unset($data['cid']);
61
			unset($data['cid']);
-
 
62
			unset($data['timestamp']);
-
 
63
			$this->log(print_r($data,1),'pushnotifications');
61
			$this->Pushnotification->create();
64
			$this->Pushnotification->create();
62
			if ($this->Pushnotification->save($data)) {
65
			if ($this->Pushnotification->save($data)) {
63
				// $this->Session->setFlash(__('The pushnotification has been saved.'));
66
				// $this->Session->setFlash(__('The pushnotification has been saved.'));
64
				// return $this->redirect(array('action' => 'index'));
67
				// return $this->redirect(array('action' => 'index'));
65
				$result = array('success' => true,'message'=>'The pushnotification has been saved.');
68
				$result = array('success' => true,'message'=>'The pushnotification has been saved.');