s/getLease/getLeaseTime/ just to be a bit more clear

This commit is contained in:
Mikael Nordfeldth 2016-01-13 19:55:17 +01:00
parent 1d26fedf12
commit 377947c57f
1 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ class HubSub extends Managed_DataObject
$this->sub_end = common_sql_date(time() + $length); $this->sub_end = common_sql_date(time() + $length);
} }
function getLease() function getLeaseTime()
{ {
if (empty($this->sub_start) || empty($this->sub_end)) { if (empty($this->sub_start) || empty($this->sub_end)) {
return null; return null;
@ -159,7 +159,7 @@ class HubSub extends Managed_DataObject
'hub.topic' => $this->getTopic(), 'hub.topic' => $this->getTopic(),
'hub.challenge' => $challenge); 'hub.challenge' => $challenge);
if ($mode == 'subscribe') { if ($mode == 'subscribe') {
$params['hub.lease_seconds'] = $this->getLease(); $params['hub.lease_seconds'] = $this->getLeaseTime();
} }
if ($token !== null) { // TODO: deprecated in PuSH 0.4 if ($token !== null) { // TODO: deprecated in PuSH 0.4
$params['hub.verify_token'] = $token; // let's put it in there if remote uses PuSH <0.4 $params['hub.verify_token'] = $token; // let's put it in there if remote uses PuSH <0.4