@Matt Even though I will update to 4.7.2.1 ASAP (hopefully by tomorrow), this temporary fix does not work for two reasons:
The place you mentioned is where the license text is being generated, so this does not change the way the expiration is getting checked. This is why I changed it in the init.php. At least those are the only two occurrences of the term "expireSoon" in the whole product.
applications/core/extensions/core/AdminNotifications/License.php
/**
* Notification Title (full HTML, must be escaped where necessary)
*
* @return string
*/
public function title()
{
switch ( $this->extra )
{
case 'missing':
case 'url':
return \IPS\Member::loggedIn()->language()->addToStack('license_error');
case 'expireSoon':
$licenseKeyData = \IPS\IPS::licenseKey();
return \IPS\Member::loggedIn()->language()->addToStack( 'license_renewal_soon', FALSE, array( 'pluralize' => array( \intval( \IPS\DateTime::create()->diff( \IPS\DateTime::ts( strtotime( $licenseKeyData['expires'] ) ) )->format('%r%a') ) ) ) );
case 'expired':
return \IPS\Member::loggedIn()->language()->addToStack('license_expired');
}
}
init.php
/* Check it hasn't expired */
if ( strtotime( $response['expires'] ) < time() or !$response['active'] )
{
\IPS\core\AdminNotification::send( 'core', 'License', 'expired', FALSE );
\IPS\core\AdminNotification::remove( 'core', 'License', 'expireSoon' );
}
else
{
\IPS\core\AdminNotification::remove( 'core', 'License', 'expired' );
/* Or there's 7 days or less to go */
$daysLeft = (int) (new \IPS\DateTime)->diff( \IPS\DateTime::ts( strtotime( $response['expires'], TRUE ) ) )->format('%r%a');
if( $daysLeft < 0 )
{
$daysLeft = 0;
}
if ( $daysLeft <= 7 )
{
\IPS\core\AdminNotification::send( 'core', 'License', 'expireSoon', FALSE );
}
else
{
\IPS\core\AdminNotification::remove( 'core', 'License', 'expireSoon' );
}
}
So if your recommended change is the only attempt to fix this issue in 4.7.2, it will still occur.