Updated sup
This commit is contained in:
parent
cc5808cc28
commit
c0d7ce8a3c
|
@ -21,10 +21,8 @@ if (!defined('LACONICA')) { exit(1); }
|
|||
|
||||
class SupAction extends Action
|
||||
{
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
|
||||
parent::handle($args);
|
||||
|
||||
$seconds = $this->trimmed('seconds');
|
||||
|
@ -33,18 +31,18 @@ class SupAction extends Action
|
|||
$seconds = 15;
|
||||
}
|
||||
|
||||
$updates = $this->get_updates($seconds);
|
||||
$updates = $this->getUpdates($seconds);
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
print json_encode(array('updated_time' => date('c'),
|
||||
'since_time' => date('c', time() - $seconds),
|
||||
'available_periods' => $this->available_periods(),
|
||||
'available_periods' => $this->availablePeriods(),
|
||||
'period' => $seconds,
|
||||
'updates' => $updates));
|
||||
}
|
||||
|
||||
function available_periods()
|
||||
function availablePeriods()
|
||||
{
|
||||
static $periods = array(86400, 43200, 21600, 7200,
|
||||
3600, 1800, 600, 300, 120,
|
||||
|
@ -58,7 +56,7 @@ class SupAction extends Action
|
|||
return $available;
|
||||
}
|
||||
|
||||
function get_updates($seconds)
|
||||
function getUpdates($seconds)
|
||||
{
|
||||
$notice = new Notice();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user