Version 4.7.6

This commit is contained in:
Neo committed 2025-12-19 16:05:19 -08:00
1 parent 8ba7d43898
commit 7b7404e741
1085 files changed
+30590 -7837

No files matched your search

@@ -160,6 +160,8 @@ class _themes extends \IPS\Node\Controller
/* Just use the default */
$value = $themeSetting['sc_default'];
}
\IPS\Session::i()->log( 'acplogs__theme_setting_deleted', array( $themeSetting['sc_key'] => FALSE ) );
/* Clear guest page caches */
\IPS\Data\Cache::i()->clearAll();
@@ -780,6 +782,8 @@ class _themes extends \IPS\Node\Controller
/* Clear guest page caches */
\IPS\Data\Cache::i()->clearAll();
\IPS\Session::i()->log( 'acplog__theme_resource_deleted', array( $current['resource_filename'] => FALSE ) );
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=customization&controller=themes&do=resources&set_id=' . $set->_id ), 'deleted' );
}
@@ -889,6 +893,7 @@ class _themes extends \IPS\Node\Controller
if ( $id )
{
\IPS\Session::i()->log( 'acplog__theme_resource_edited', array( $save['resource_filename'] => FALSE ) );
\IPS\Db::i()->update( 'core_theme_resources', $save, array( 'resource_id=?', $id ) );
}
else
@@ -904,7 +909,8 @@ class _themes extends \IPS\Node\Controller
$save['resource_name'] = mb_substr( $save['resource_name'], 0, ( mb_strrpos( $save['resource_name'], '.' ) ) ) . '_' . mt_rand() . '.' . $ext;
}
catch( \UnderflowException $ex ) { }
\IPS\Session::i()->log( 'acplog__theme_resource_added', array( $save['resource_filename'] => FALSE ) );
\IPS\Db::i()->insert( 'core_theme_resources', $save );
}
@@ -984,6 +990,8 @@ class _themes extends \IPS\Node\Controller
$theme->by_skin_gen = 0;
$theme->save();
\IPS\Session::i()->log( 'acplog__theme_converted_custom', array( "core_theme_set_title_{$theme->id}" => TRUE ) );
if( \IPS\Request::i()->isAjax() )
{
\IPS\Output::i()->json( array() );
@@ -2302,6 +2310,8 @@ class _themes extends \IPS\Node\Controller
/* Finish */
$xml->endDocument();
\IPS\Session::i()->log( 'acplog__theme_exported', array( "core_theme_set_title_{$themeSet->_id}" => TRUE ) );
\IPS\Output::i()->sendOutput( $xml->outputMemory(), 200, 'application/xml', array( 'Content-Disposition' => \IPS\Output::getContentDisposition( 'attachment', \IPS\Member::loggedIn()->language()->get('core_theme_set_title_' . $themeSet->_id ) . " {$version}.xml" ), FALSE, FALSE ) );
}
@@ -2945,17 +2955,22 @@ class _themes extends \IPS\Node\Controller
{
foreach ( $customCss[ $app ]['front']['custom'] as $name => $data )
{
$cssFiles++;
if ( $name == 'custom.css' )
{
$itemId = $data['css_id'];
$cssData .= "\n" . $data['css_content'];
}
/* Any CSS files in the 'custom' folder that are prefixed with an underscore are 'hidden' to the simple theme editor */
else if ( mb_substr( $name, 0, 1 ) != '_' )
{
$cssData .= "\n\n/* ===[Filename:" . $app . '/custom/' . $name . "]=== */\n\n" . $data['css_content'];
}
else
{
$cssData .= "\n\n/* ===[Filename:" . $app . '/custom/' . $name . "]=== /*\n\n" . $data['css_content'];
continue;
}
$cssFiles++;
}
}
}
@@ -3003,6 +3018,11 @@ class _themes extends \IPS\Node\Controller
$themeSet->custom_footer = $values['theme_simple_footer'];
$themeSet->save();
$headerKey = 'custom_header_' . $themeSet->id;
$footerKey = 'custom_footer_' . $themeSet->id;
unset( \IPS\Data\Store::i()->$headerKey);
unset( \IPS\Data\Store::i()->$footerKey);
/* Now remove any additional CSS files */
if ( $cssFiles > 1 )
{
@@ -3012,9 +3032,13 @@ class _themes extends \IPS\Node\Controller
{
foreach ( $customCss[ $app ]['front']['custom'] as $name => $data )
{
if ( ! ( $app == 'core' and $name == 'custom.css' ) )
/* Any CSS files in the 'custom' folder that are prefixed with an underscore are 'hidden' to the simple theme editor */
if ( mb_substr( $name, 0, 1 ) != '_' )
{
\IPS\Theme::removeCss( $app, 'front', 'custom', NULL, TRUE, $name );
if ( !( $app == 'core' and $name == 'custom.css' ) )
{
\IPS\Theme::removeCss( $app, 'front', 'custom', NULL, TRUE, $name );
}
}
}
}
@@ -3128,6 +3152,16 @@ class _themes extends \IPS\Node\Controller
{
$cssFiles[ $app ][ $location ][ $path ] = $items;
}
else
{
foreach( $items as $item )
{
if ( $item['css_added_to'] == $themeSet->_id or $item['css_user_edited'] )
{
$cssFiles[ $app ][ $location ][ $path ][ $item['css_name'] ] = $item;
}
}
}
}
}
}
@@ -3188,6 +3222,8 @@ class _themes extends \IPS\Node\Controller
\IPS\Member::updateAllMembers( array( 'skin' => \IPS\Request::i()->id ) );
}
\IPS\Session::i()->log( 'acplog__theme_member_reset' );
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=customization&controller=themes' ), 'member_theme_reset' );
}