mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
air: fix calculate_adue() to return false if the value is zero and do not hardcode regexpire - adding the max setting (99 years) should be fine.
This commit is contained in:
@@ -306,7 +306,7 @@ class Register extends Controller {
|
||||
|
||||
$cfgexpire = get_config('system','register_expire' );
|
||||
$regexpire = calculate_adue( $cfgexpire );
|
||||
$regexpire = $regexpire ? $regexpire['due'] : '2099-12-31 23:59:59';
|
||||
$regexpire = $regexpire ? $regexpire['due'] : datetime_convert('UTC', 'UTC', 'now + 99 years');
|
||||
|
||||
// handle an email request that will be verified or an ivitation associated with an email address
|
||||
if ( $email > '' && ($email_verify || $icdone) ) {
|
||||
|
||||
@@ -554,6 +554,10 @@ function update_birthdays() {
|
||||
if ( preg_match( '/^[0-9]{1,2}[ihdwmy]{1}$/', $duri ) && ($sign == '+' || $sign == '-') ) {
|
||||
$duru = substr( $duri, -1);
|
||||
$durn = substr( $duri, 0, -1);
|
||||
|
||||
if(!$durn)
|
||||
return false;
|
||||
|
||||
$due = date( 'Y-m-d H:i:s', strtotime(
|
||||
'+' . $durn . ' '
|
||||
. str_replace( array(':i',':h',':d',':w',':m',':y'),
|
||||
|
||||
Reference in New Issue
Block a user