Subversion Repositories SmartDukaan

Rev

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

Rev 15767 Rev 18187
Line 53... Line 53...
53
		$this->layout = 'ajax';
53
		$this->layout = 'ajax';
54
		$this->response->type('json');
54
		$this->response->type('json');
55
		if ($this->request->is('post')) {
55
		if ($this->request->is('post')) {
56
			if(empty($this->request->data['user_id']) || empty($this->request->data['gcm_regid'])){
56
			if(empty($this->request->data['user_id']) || empty($this->request->data['gcm_regid'])){
57
				$result = array('success'=>false);
57
				$result = array('success'=>false);
-
 
58
				$this->log('error'.print_r($this->request->data,1),'gcm');
58
			} else {
59
			} else {
59
				$dataForModel = $this->request->data;
60
				$dataForModel = $this->request->data;
60
				$this->log('before find '.print_r($dataForModel,1),'gcm');
61
				$this->log('before find '.print_r($dataForModel,1),'gcm');
61
				$data = $this->GcmUser->find('first',array('conditions'=>array('user_id'=>$this->request->data['user_id'],'imeinumber'=>$this->request->data['imeinumber']),'order'=>array('id'=>'desc')));
62
				$data = $this->GcmUser->find('first',array('conditions'=>array('user_id'=>$this->request->data['user_id'],'imeinumber'=>$this->request->data['imeinumber']),'order'=>array('id'=>'desc')));
62
				$this->log("found row ".print_r($data,1),'gcm');
63
				$this->log("found row ".print_r($data,1),'gcm');