Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+13 -5
View File
@@ -2,9 +2,9 @@
/**
* @brief updatecheck Task
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 14 Aug 2013
* @version SVN_VERSION_NUMBER
*/
@@ -54,7 +54,7 @@ class _updatecheck extends \IPS\Task
$currentDetails = json_decode( $coreApp->update_version, TRUE );
if ( $currentDetails['version'] != $response['version'] and \IPS\Settings::i()->upgrade_email )
{
\IPS\Email::buildFromTemplate( 'core', 'upgrade', array( $response['version'], $response['releasenotes'], $response['security'] ) )->send( explode( ',', \IPS\Settings::i()->upgrade_email ) );
\IPS\Email::buildFromTemplate( 'core', 'upgrade', array( $response['version'], $response['releasenotes'], $response['security'] ), \IPS\Email::TYPE_LIST )->send( explode( ',', \IPS\Settings::i()->upgrade_email ) );
}
$coreApp->update_version = json_encode( $response );
$coreApp->update_last_check = time();
@@ -114,9 +114,17 @@ class _updatecheck extends \IPS\Task
try
{
$url = \IPS\Http\Url::external( $row['url'] )->setQueryString( 'version', $row['current'] );
/* Query the applications update URL */
$url = \IPS\Http\Url::external( $row['url'] )->setQueryString( array( 'version' => $row['current'], 'ips_version' => $version ) );
$response = $url->request()->get()->decodeJson();
/* Did we get all the information we need? */
if ( !isset( $response['version'], $response['longversion'], $response['released'], $response['updateurl'] ) )
{
throw new \RuntimeException( \IPS\Lang::load( \IPS\Lang::defaultLanguage() )->get( 'update_check_missing' ) );
}
/* Save the latest version data and move on to the next app */
\IPS\Db::i()->update( $row['table'], array(
$dataColumn => json_encode( array(
'version' => $response['version'],
@@ -128,7 +136,7 @@ class _updatecheck extends \IPS\Task
$timeColumn => time()
), array( "{$idColumn}=?", $row['id'] ) );
}
/* \RuntimeException catches BAD_JSON and \IPS\Http\Request\Exception both */
/* \RuntimeException catches BAD_JSON and \IPS\Http\Request\Exception both */
catch ( \RuntimeException $e )
{
$fails[] = $source . ": " . $e->getMessage();