HubSub didn't save sub start and end datetimes

This commit is contained in:
Mikael Nordfeldth 2016-01-13 19:23:34 +01:00
parent 818aaa0578
commit b38a789005

View File

@ -81,6 +81,7 @@ class HubSub extends Managed_DataObject
*/ */
function setLease($length) function setLease($length)
{ {
common_debug('PuSH hub got requested lease_seconds=='._ve($length));
assert(is_int($length)); assert(is_int($length));
$min = 86400; $min = 86400;
@ -95,9 +96,10 @@ class HubSub extends Managed_DataObject
$length = $max; $length = $max;
} }
common_debug('PuSH hub after sanitation: lease_seconds=='._ve($length));
$this->lease = $length; $this->lease = $length;
$this->start_sub = common_sql_now(); $this->sub_start = common_sql_now();
$this->end_sub = common_sql_date(time() + $length); $this->sub_end = common_sql_date(time() + $length);
} }
/** /**