Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+26 -22
View File
@@ -234,7 +234,8 @@ class _Upgrade
/* Import data */
$limit = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
$select = \IPS\Db::i()->select( 'core_members.*, profile_portal.*', 'core_members', NULL, 'core_members.member_id', array( $limit, $perCycle ) )
$_SESSION['upg_40000_member_id'] = isset( $_SESSION['upg_40000_member_id'] ) ? $_SESSION['upg_40000_member_id'] : 0;
$select = \IPS\Db::i()->select( 'core_members.*, profile_portal.*', 'core_members', array( 'core_members.member_id>'. $_SESSION['upg_40000_member_id'] ), 'core_members.member_id', $perCycle )
->join( 'profile_portal', 'profile_portal.pp_member_id=core_members.member_id' );
if ( count( $select ) )
{
@@ -674,6 +675,9 @@ class _Upgrade
}
}
/* Save the last member_id */
$_SESSION['upg_40000_member_id'] = $row['member_id'];
/* Build insert */
try
{
@@ -728,7 +732,7 @@ class _Upgrade
unset( $_SESSION['idm_block_submissions'] );
}
unset( $_SESSION['aboutMe_Field'], $_SESSION['_step1Count'] );
unset( $_SESSION['aboutMe_Field'], $_SESSION['_step1Count'], $_SESSION['upg_40000_member_id'] );
}
$_SESSION['core_40000_step1_finished'] = true;
@@ -819,7 +823,7 @@ class _Upgrade
{
$data = NULL;
$login['login_folder_name'] = ucfirst( $login['login_folder_name'] );
$login['login_folder_name'] = mb_ucfirst( $login['login_folder_name'] );
if( $login['login_folder_name'] == 'internal' )
{
$login['login_folder_name'] = 'Internal';
@@ -2187,6 +2191,7 @@ DROP INDEX like_lookup_area"
case 'custom_pages':
$locationKey = 'nexus_Admin';
$id3 = 'pkg-pg';
break;
case 'packages':
@@ -2833,7 +2838,7 @@ DROP INDEX like_lookup_area"
{
if ( $row['conf_value'] )
{
if ( in_array( $row['conf_key'], array( 'upload_dir', 'gallery_images_path', 'idm_localsspath', 'idm_localfilepath', 'blog_upload_dir' ) ) and !@is_dir( $row['conf_value'] ) )
if ( in_array( $row['conf_key'], array( 'upload_dir', 'gallery_images_path', 'idm_localsspath', 'idm_localfilepath', 'blog_upload_dir' ) ) and !@is_dir( str_replace( array( '{root_path}', '{root}' ), \IPS\ROOT_PATH, $row['conf_value'] ) ) )
{
continue;
}
@@ -2965,21 +2970,21 @@ DROP INDEX like_lookup_area"
}
else if( $settings['idm_filestorage'] == 'db' )
{
$downloads = \IPS\Db::i()->insert( 'core_file_storage', array( 'method' => 'FileSystem', 'configuration' => json_encode( array() ) ) );
$downloads = \IPS\Db::i()->insert( 'core_file_storage', array( 'method' => 'Database', 'configuration' => json_encode( array() ) ) );
$screenshots = $downloads;
if( \IPS\Db::i()->checkForTable( 'downloads_files_records' ) )
{
\IPS\Db::i()->insert( 'core_files',
\IPS\Db::i()->select( "NULL, downloads_files_records.record_realname, MD5( RAND() ), downloads_filestorage.storage_file, NULL", 'downloads_filestorage' )->join( 'downloads_files_records', "downloads_filestorage.storage_id=downloads_files_records.record_id" )
\IPS\Db::i()->select( "NULL, downloads_files_records.record_location, MD5( RAND() ), downloads_filestorage.storage_file, ''", 'downloads_filestorage', "downloads_files_records.record_type='upload' AND downloads_files_records.record_storagetype='db' AND downloads_filestorage.storage_file IS NOT NULL AND downloads_filestorage.storage_file != ''" )->join( 'downloads_files_records', "downloads_filestorage.storage_id=downloads_files_records.record_db_id" )
);
\IPS\Db::i()->insert( 'core_files',
\IPS\Db::i()->select( "NULL, downloads_files_records.record_realname, MD5( RAND() ), downloads_filestorage.storage_ss, NULL", 'downloads_filestorage' )->join( 'downloads_files_records', "downloads_filestorage.storage_id=downloads_files_records.record_id" )
\IPS\Db::i()->select( "NULL, downloads_files_records.record_location, MD5( RAND() ), downloads_filestorage.storage_ss, ''", 'downloads_filestorage', "downloads_files_records.record_type='ssupload' AND downloads_files_records.record_storagetype='db' AND downloads_filestorage.storage_ss IS NOT NULL AND downloads_filestorage.storage_ss != ''" )->join( 'downloads_files_records', "downloads_filestorage.storage_id=downloads_files_records.record_db_id" )
);
\IPS\Db::i()->insert( 'core_files',
\IPS\Db::i()->select( "NULL, downloads_files_records.record_realname, MD5( RAND() ), downloads_filestorage.storage_thumb, NULL", 'downloads_filestorage' )->join( 'downloads_files_records', "downloads_filestorage.storage_id=downloads_files_records.record_id" )
\IPS\Db::i()->select( "NULL, downloads_files_records.record_location, MD5( RAND() ), downloads_filestorage.storage_thumb, ''", 'downloads_filestorage', "downloads_files_records.record_type='ssupload' AND downloads_files_records.record_storagetype='db' AND downloads_filestorage.storage_thumb IS NOT NULL AND downloads_filestorage.storage_thumb != ''" )->join( 'downloads_files_records', "downloads_filestorage.storage_id=downloads_files_records.record_db_id" )
);
}
@@ -3016,7 +3021,7 @@ DROP INDEX like_lookup_area"
'dir' => str_replace( '{root_path}', '{root}', $settings['idm_localsspath'] ),
'url' => '',
'toggle' => 1,
'custom_url' => $_SESSION['screenshots_url'],
'custom_url' => rtrim( \IPS\Settings::i()->base_url, '/' ) . '/' . $_SESSION['screenshots_url'],
);
}
else
@@ -3056,7 +3061,8 @@ DROP INDEX like_lookup_area"
}
}
unset( \IPS\Data\Store::i()->settings, \IPS\Data\Store::i()->storageConfigurations );
unset( \IPS\Data\Store::i()->storageConfigurations );
\IPS\Settings::i()->clearCache();
/* This constant isn't used in 4.0 but may be leftover from 3.x */
$publicPath = ( defined( 'PUBLIC_DIRECTORY' ) ? PUBLIC_DIRECTORY : 'public' );
@@ -3086,7 +3092,7 @@ DROP INDEX like_lookup_area"
{
$pathDetails = explode( '/', $row[ $column ] );
$fileName = array_pop( $pathDetails );
$newPathname = ltrim( implode( '/', $pathDetails ) . '/' . $row['attach_file'] . '.' . md5( uniqid( microtime() ) ), '/' );
$newPathname = ltrim( implode( '/', $pathDetails ) . '/' . $row['attach_file'] . '.' . md5( mt_rand() ), '/' );
if( @rename( $settings['upload_dir'] . '/' . $row[ $column ], $settings['upload_dir'] . '/' . $newPathname ) )
{
@@ -3435,14 +3441,14 @@ DROP INDEX like_lookup_area"
}
/* Make sure license key does not have extra spaces at end */
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => trim( \IPS\Settings::i()->ipb_reg_number ) ), array( 'conf_key=?', 'ipb_reg_number' ) );
\IPS\Settings::i()->changeValues( array( 'ipb_reg_number' => trim( \IPS\Settings::i()->ipb_reg_number ) ) );
/* Settings */
\IPS\Lang::saveCustom( 'core', "copyright_line_value", \IPS\Settings::i()->ipb_reg_name );
try
{
$guidelines = \IPS\Text\Parser::parseStatic( \IPS\Settings::i()->gl_guidelines, TRUE, NULL, NULL, TRUE, TRUE, TRUE );
$guidelines = \IPS\Text\LegacyParser::parseStatic( \IPS\Settings::i()->gl_guidelines, NULL, TRUE );
}
catch( \Exception $e )
{
@@ -3460,7 +3466,7 @@ DROP INDEX like_lookup_area"
try
{
$reg_rules = \IPS\Text\Parser::parseStatic( \IPS\Settings::i()->reg_rules, TRUE, NULL, NULL, TRUE, TRUE, TRUE );
$reg_rules = \IPS\Text\LegacyParser::parseStatic( \IPS\Settings::i()->reg_rules, NULL, TRUE );
}
catch( \Exception $e )
{
@@ -3478,7 +3484,7 @@ DROP INDEX like_lookup_area"
try
{
$priv_body = \IPS\Text\Parser::parseStatic( \IPS\Settings::i()->priv_body, TRUE, NULL, NULL, TRUE, TRUE, TRUE );
$priv_body = \IPS\Text\LegacyParser::parseStatic( \IPS\Settings::i()->priv_body, NULL, TRUE );
}
catch( \Exception $e )
{
@@ -3571,7 +3577,7 @@ DROP INDEX like_lookup_area"
}
/* Disable cron task job */
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 0 ), array( 'conf_key=?', 'task_use_cron' ) );
\IPS\Settings::i()->changeValues( array( 'task_use_cron' => 0 ) );
/* Delete old settings - some of these should not still be present but might have slipped through */
\IPS\Db::i()->delete( 'core_sys_conf_settings', "conf_key IN ('admob_bottom', 'admob_pub_id', 'admob_top', 'ad_code_board_index_footer', 'ad_code_board_index_header', 'ad_code_board_sidebar',
@@ -3644,17 +3650,15 @@ DROP INDEX like_lookup_area"
{
if ( isset( $settings[ $list ] ) AND ! empty( $settings[ $list ] ) )
{
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => implode( ",", explode( "\n", $settings[ $list ] ) ) ), array( 'conf_key=?', $list ) );
\IPS\Settings::i()->changeValues( array( $list => implode( ",", explode( "\n", $settings[ $list ] ) ) ) );
}
}
if ( !isset( $settings['ipb_use_url_filter'] ) OR empty( $settings['ipb_use_url_filter'] ) )
{
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 'none' ), array( 'conf_key=?', 'ipb_url_filter_option' ) );
\IPS\Settings::i()->changeValues( array( 'ipb_url_filter_option' => 'none' ) );
}
unset( \IPS\Data\Store::i()->settings );
/* Disable all apps not currently being upgraded */
if ( is_array( $_SESSION['apps'] ) )
{
@@ -3671,7 +3675,7 @@ DROP INDEX like_lookup_area"
}
$acpNotes = \IPS\Db::i()->select( 'cs_value', 'cache_store', array( 'cs_key=?', 'adminnotes' ) )->first();
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $acpNotes ), array( 'conf_key=?', 'acp_notes' ) );
\IPS\Settings::i()->changeValues( array( 'acp_notes' => $acpNotes ) );
return TRUE;
}
@@ -3998,7 +4002,7 @@ DROP INDEX like_lookup_area"
{
return "Upgrading commerce customer history";
}
/**
* Finish - This is run after all apps have been upgraded
*