Subversion Repositories SmartDukaan

Rev

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

Rev 14897 Rev 14928
Line 69... Line 69...
69
		}	
69
		}	
70
		$this->apihost = Configure::read('pythonapihost');
70
		$this->apihost = Configure::read('pythonapihost');
71
		$this->limit = Configure::read('dealsperpage');	
71
		$this->limit = Configure::read('dealsperpage');	
72
		$staticVersion = Configure::read('staticversion');
72
		$staticVersion = Configure::read('staticversion');
73
		$this->set('staticversion',$staticVersion);
73
		$this->set('staticversion',$staticVersion);
74
		$this->set('requiremobileverification',Configure::read('requiremobileverification'));		
74
		$this->set('requiremobileverification',Configure::read('requiremobileverification'));	
-
 
75
		$this->loadModel('NotificationRule');
-
 
76
		$notification = $this->NotificationRule->getNotification($this->Auth->User('id'));	
-
 
77
		$this->set('notification',$notification);
75
    }
78
    }
76
	
79
	
77
    function isAuthorized() {
80
    function isAuthorized() {
78
        return $this->Auth->user('id');
81
        return $this->Auth->user('id');
79
    }
82
    }
Line 165... Line 168...
165
			    'Content-Length: ' . strlen($fields))                                                                       
168
			    'Content-Length: ' . strlen($fields))                                                                       
166
			);   
169
			);   
167
		}
170
		}
168
		//execute post
171
		//execute post
169
		$result = curl_exec($ch);
172
		$result = curl_exec($ch);
170
		$this->log("[response] ".print_r($result,1),'api');
173
		// $this->log("[response] ".print_r($result,1),'api');
171
		//close connection
174
		//close connection
172
		curl_close($ch);
175
		curl_close($ch);
173
		switch($format){
176
		switch($format){
174
			case 'json':
177
			case 'json':
175
			$response = json_decode($result,1);
178
			$response = json_decode($result,1);