Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -91,6 +91,16 @@ class _ajax extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$cssFiles[ $app ][ $location ][ $path ] = $items;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach( $items as $item )
|
||||
{
|
||||
if ( $item['css_added_to'] == $theme->_id or $item['css_user_edited'] )
|
||||
{
|
||||
$cssFiles[ $app ][ $location ][ $path ][ $item['css_name'] ] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,8 +137,8 @@ class _ajax extends \IPS\Dispatcher\Controller
|
||||
else
|
||||
{
|
||||
$templateNames = $skinSet->getRawCss( '', '', '', \IPS\Theme::RETURN_ALL_NO_CONTENT );
|
||||
$templateBits = $skinSet->getRawCss( $t_app, 'front', 'custom', \IPS\Theme::RETURN_ALL );
|
||||
$templateBit = ( ! empty( $t_name ) ) ? $templateBits[ $t_app ]['front']['custom'][ $t_name ] : null;
|
||||
$templateBits = $skinSet->getRawCss( $t_app, 'front', NULL, \IPS\Theme::RETURN_ALL );
|
||||
$templateBit = ( ! empty( $t_name ) ) ? $templateBits[ $t_app ]['front'][ $t_group ][ $t_name ] : null;
|
||||
$templateBit['css_content'] = htmlentities( $templateBit['css_content'], ENT_DISALLOWED, 'UTF-8', TRUE );
|
||||
}
|
||||
|
||||
|
||||
@@ -215,12 +215,12 @@ class _icons extends \IPS\Dispatcher\Controller
|
||||
*/
|
||||
public static function processApplicationIcon( $values, $homeScreen = array(), $homeScreenMaskable = array() )
|
||||
{
|
||||
if( $values['icons_homescreen'] or $values['icons_homescreen_maskable'] )
|
||||
if( ( isset( $values['icons_homescreen'] ) AND $values['icons_homescreen'] ) or ( isset( $values['icons_homescreen_maskable' ] ) AND $values['icons_homescreen_maskable'] ) )
|
||||
{
|
||||
foreach( [ 'icons_homescreen', 'icons_homescreen_maskable' ] as $type )
|
||||
{
|
||||
$setting = [];
|
||||
if( $values[ $type ] )
|
||||
if( isset( $values[ $type ] ) AND $values[ $type ] )
|
||||
{
|
||||
$sizes = array(
|
||||
'android-chrome-36x36' => array(36, 36),
|
||||
|
||||
@@ -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' );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user