Subversion Repositories SmartDukaan

Rev

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

Rev 13593 Rev 14662
Line 15... Line 15...
15
 */
15
 */
16
	public $components = array('Paginator');
16
	public $components = array('Paginator');
17
 
17
 
18
	public function index() {	
18
	public function index() {	
19
		$this->layout = 'ajax';
19
		$this->layout = 'ajax';
-
 
20
		$t = $this->request->query('t');
-
 
21
		if(!empty($t) && $t >0){
-
 
22
			$options = array('conditions'=>array("unix_timestamp(modified) > "=>$t));
-
 
23
		}else{
-
 
24
			$options = null;
-
 
25
		}
20
		$settings = $this->Mobileappsetting->find('all');
26
		$settings = $this->Mobileappsetting->find('all',$options);
-
 
27
		$options = array('fields'=>array("unix_timestamp(modified) t"),'order'=>array('modified'=>'desc'));
-
 
28
		$lasttimestamp = $this->Mobileappsetting->find('first',$options);		
21
		$result = array('settings' => $settings);
29
		$result = array('settings' => $settings,'t'=>$lasttimestamp[0]['t']);
22
		$this->set(array(
30
		$this->set(array(
23
		    'result' => $result,
31
		    'result' => $result,
24
		    '_serialize' => array('result')
32
		    '_serialize' => array('result')
25
		));
33
		));
26
		$this->render('/Elements/json');
34
		$this->render('/Elements/json');