Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

+19 -12
View File
@@ -34,23 +34,24 @@ class _Install
/* PHP Version */
$phpVersion = PHP_VERSION;
if ( version_compare( PHP_VERSION, '5.3.0' ) >= 0 )
if ( version_compare( $phpVersion, '5.3.0' ) >= 0 )
{
$return['requirements']['PHP'][] = array(
$return['requirements']['PHP']['version'] = array(
'success' => TRUE,
'message' => \IPS\Member::loggedIn()->language()->addToStack( 'requirements_php_version_success', FALSE, array( 'sprintf' => array( $phpVersion ) ) )
);
}
else
{
$return['requirements']['PHP'][] = array(
$return['requirements']['PHP']['version'] = array(
'success' => FALSE,
'message' => \IPS\Member::loggedIn()->language()->addToStack( 'requirements_php_version_fail', FALSE, array( 'sprintf' => array( $phpVersion ) ) ),
);
}
if ( version_compare( PHP_VERSION, '5.4.0' ) == -1 )
if ( version_compare( $phpVersion, '5.4.0' ) == -1 )
{
$return['advice'][] = \IPS\Member::loggedIn()->language()->addToStack( 'requirements_php_version_advice', FALSE, array( 'sprintf' => array( $phpVersion ) ) );
$return['requirements']['PHP']['version']['message'] = \IPS\Member::loggedIn()->language()->addToStack( 'requirements_php_version_success_53x', FALSE, array( 'sprintf' => array( $phpVersion ) ) );
$return['advice']['php'] = \IPS\Member::loggedIn()->language()->addToStack( 'requirements_php_version_advice', FALSE, array( 'sprintf' => array( $phpVersion ) ) );
}
/* cURL or allow_url_fopen */
@@ -623,6 +624,7 @@ class _Install
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $this->adminEmail ), "conf_key = 'email_out'" );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $this->adminEmail ), "conf_key = 'email_in'" );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $this->adminEmail ), "conf_key = 'upgrade_email'" );
unset( \IPS\Data\Store::i()->settings );
@@ -807,15 +809,15 @@ class _Install
{
return $this->appLoop( $data, function( $app )
{
if( !file_exists( \IPS\ROOT_PATH . '/plugins/hooks.txt' ) )
if( !file_exists( \IPS\ROOT_PATH . '/plugins/hooks.php' ) )
{
@touch( \IPS\ROOT_PATH . '/plugins/hooks.txt' );
@chmod( \IPS\ROOT_PATH . '/plugins/hooks.txt', 0777 );
@touch( \IPS\ROOT_PATH . '/plugins/hooks.php' );
@chmod( \IPS\ROOT_PATH . '/plugins/hooks.php', 0777 );
}
if( !is_writable( \IPS\ROOT_PATH . '/plugins/hooks.txt' ) )
if( !is_writable( \IPS\ROOT_PATH . '/plugins/hooks.php' ) )
{
throw new \RuntimeException( sprintf( \IPS\Member::loggedIn()->language()->get("hook_file_not_writable"), \IPS\ROOT_PATH . '/plugins/hooks.txt' ) );
throw new \RuntimeException( sprintf( \IPS\Member::loggedIn()->language()->get("hook_file_not_writable"), \IPS\ROOT_PATH . '/plugins/hooks.php' ) );
}
try
@@ -842,16 +844,21 @@ class _Install
$inserts = array();
foreach( json_decode( file_get_contents( \IPS\ROOT_PATH . '/' . \IPS\CP_DIRECTORY ."/install/emoticons/data.json" ) ) as $type => $file )
foreach( json_decode( file_get_contents( \IPS\ROOT_PATH . '/' . \IPS\CP_DIRECTORY ."/install/emoticons/data.json" ), TRUE ) as $type => $file )
{
$fileObj = \IPS\File::create( 'core_Emoticons', $file, file_get_contents( \IPS\ROOT_PATH . '/' . \IPS\CP_DIRECTORY . "/install/emoticons/" . $file ), 'emoticons', FALSE, NULL, FALSE );
$fileObj = \IPS\File::create( 'core_Emoticons', $file['image'], file_get_contents( \IPS\ROOT_PATH . '/' . \IPS\CP_DIRECTORY . "/install/emoticons/" . $file['image'] ), 'emoticons', FALSE, NULL, FALSE );
$fileObj2x = isset( $file['image_2x'] ) ? \IPS\File::create( 'core_Emoticons', $file['image_2x'], file_get_contents( \IPS\ROOT_PATH . '/' . \IPS\CP_DIRECTORY . "/install/emoticons/" . $file['image_2x'] ), 'emoticons', FALSE, NULL, FALSE ) : NULL;
$imageProperties = @getimagesize( \IPS\ROOT_PATH . '/' . \IPS\CP_DIRECTORY . "/install/emoticons/" . $file['image'] );
$inserts[] = array(
'typed' => $type,
'image' => (string) $fileObj,
'image_2x' => (string) $fileObj2x,
'clickable' => TRUE,
'emo_set' => $setId,
'emo_position' => ++$position,
'width' => isset( $imageProperties[0] ) ? $imageProperties[0] : 0,
'height' => isset( $imageProperties[1] ) ? $imageProperties[1] : 0
);
}