114d3f39 by Yokihito Oki

phpのバージョン警告を非表示

1 parent 1eadd7fa
......@@ -159,48 +159,48 @@ class PlgQuickiconPhpVersionCheck extends JPlugin
$today = new JDate;
$phpEndOfSupport = new JDate($phpSupportData[$activePhpVersion]['eos']);
if ($phpNotSupported = $today > $phpEndOfSupport)
{
/*
* Find the oldest PHP version still supported that is newer than the current version,
* this is our recommendation for users on unsupported platforms
*/
foreach ($phpSupportData as $version => $versionData)
{
$versionEndOfSupport = new JDate($versionData['eos']);
if (version_compare($version, $activePhpVersion, 'ge') && ($today < $versionEndOfSupport))
{
$supportStatus['status'] = self::PHP_UNSUPPORTED;
$supportStatus['message'] = JText::sprintf(
'PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED',
PHP_VERSION,
$version,
$versionEndOfSupport->format(JText::_('DATE_FORMAT_LC4'))
);
return $supportStatus;
}
}
// PHP version is not supported and we don't know of any supported versions.
$supportStatus['status'] = self::PHP_UNSUPPORTED;
$supportStatus['message'] = JText::sprintf('PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED_JOOMLA_OUTDATED', PHP_VERSION);
return $supportStatus;
}
// If the version is still supported, check if it has reached eol minus 3 month
$securityWarningDate = clone $phpEndOfSupport;
$securityWarningDate->sub(new DateInterval('P3M'));
if (!$phpNotSupported && $today > $securityWarningDate)
{
$supportStatus['status'] = self::PHP_SECURITY_ONLY;
$supportStatus['message'] = JText::sprintf(
'PLG_QUICKICON_PHPVERSIONCHECK_SECURITY_ONLY', PHP_VERSION, $phpEndOfSupport->format(JText::_('DATE_FORMAT_LC4'))
);
}
// if ($phpNotSupported = $today > $phpEndOfSupport)
// {
// /*
// * Find the oldest PHP version still supported that is newer than the current version,
// * this is our recommendation for users on unsupported platforms
// */
// foreach ($phpSupportData as $version => $versionData)
// {
// $versionEndOfSupport = new JDate($versionData['eos']);
// if (version_compare($version, $activePhpVersion, 'ge') && ($today < $versionEndOfSupport))
// {
// $supportStatus['status'] = self::PHP_UNSUPPORTED;
// $supportStatus['message'] = JText::sprintf(
// 'PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED',
// PHP_VERSION,
// $version,
// $versionEndOfSupport->format(JText::_('DATE_FORMAT_LC4'))
// );
// return $supportStatus;
// }
// }
// // PHP version is not supported and we don't know of any supported versions.
// $supportStatus['status'] = self::PHP_UNSUPPORTED;
// $supportStatus['message'] = JText::sprintf('PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED_JOOMLA_OUTDATED', PHP_VERSION);
// return $supportStatus;
// }
// // If the version is still supported, check if it has reached eol minus 3 month
// $securityWarningDate = clone $phpEndOfSupport;
// $securityWarningDate->sub(new DateInterval('P3M'));
// if (!$phpNotSupported && $today > $securityWarningDate)
// {
// $supportStatus['status'] = self::PHP_SECURITY_ONLY;
// $supportStatus['message'] = JText::sprintf(
// 'PLG_QUICKICON_PHPVERSIONCHECK_SECURITY_ONLY', PHP_VERSION, $phpEndOfSupport->format(JText::_('DATE_FORMAT_LC4'))
// );
// }
}
return $supportStatus;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!