| Line 31... |
Line 31... |
| 31 |
}
|
31 |
}
|
| 32 |
$settings = $this->Mobileappsetting->find('all',$options);
|
32 |
$settings = $this->Mobileappsetting->find('all',$options);
|
| 33 |
$options = array('fields'=>array("unix_timestamp(modified) t"),'order'=>array('modified'=>'desc'));
|
33 |
$options = array('fields'=>array("unix_timestamp(modified) t"),'order'=>array('modified'=>'desc'));
|
| 34 |
$lasttimestamp = $this->Mobileappsetting->find('first',$options);
|
34 |
$lasttimestamp = $this->Mobileappsetting->find('first',$options);
|
| 35 |
$failureCount = 0;
|
35 |
$failureCount = 0;
|
| 36 |
if(isset($imeinumber) && !empty($imeinumber)) {
|
36 |
/*if(isset($imeinumber) && !empty($imeinumber)) {
|
| 37 |
$this->loadModel('GcmUser');
|
37 |
$this->loadModel('GcmUser');
|
| 38 |
$options = array('conditions'=>array('imeinumber'=>$imeinumber),'fields'=>array('failurecount'),'order'=>array('id'=>'desc'));
|
38 |
$options = array('conditions'=>array('imeinumber'=>$imeinumber),'fields'=>array('failurecount'),'order'=>array('id'=>'desc'));
|
| 39 |
$data = $this->GcmUser->find('first',$options);
|
39 |
$data = $this->GcmUser->find('first',$options);
|
| 40 |
if(!empty($data)){
|
40 |
if(!empty($data)){
|
| 41 |
$failureCount = $data['GcmUser']['failurecount'];
|
41 |
$failureCount = $data['GcmUser']['failurecount'];
|
| 42 |
}
|
42 |
}
|
| 43 |
}
|
43 |
}*/
|
| 44 |
$result = array('settings' => $settings,'t'=>$lasttimestamp[0]['t'],'failureCount'=>$failureCount);
|
44 |
$result = array('settings' => $settings,'t'=>$lasttimestamp[0]['t'],'failureCount'=>$failureCount);
|
| 45 |
$this->set(array(
|
45 |
$this->set(array(
|
| 46 |
'result' => $result,
|
46 |
'result' => $result,
|
| 47 |
'_serialize' => array('result')
|
47 |
'_serialize' => array('result')
|
| 48 |
));
|
48 |
));
|