Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -37,6 +37,7 @@ if ( isset( \IPS\Request::i()->file ) )
|
||||
}
|
||||
|
||||
$file = file_get_contents( \IPS\ROOT_PATH . '/themes/' . \IPS\Request::i()->file );
|
||||
|
||||
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
\IPS\Output::i()->sendOutput( preg_replace( '#<ips:template.+?\n#', '', $file ), 200, ( mb_substr( \IPS\Request::i()->file, -4 ) === '.css' ) ? 'text/css' : 'text/javascript' );
|
||||
}
|
||||
+32
-2
@@ -16,7 +16,7 @@ require_once str_replace( 'applications/cms/interface/external/external.php', ''
|
||||
|
||||
$id = \IPS\Request::i()->blockid;
|
||||
$k = \IPS\Request::i()->widgetid;
|
||||
$block = \IPS\cms\Blocks\Block::display( $id );
|
||||
$blockHtml = \IPS\cms\Blocks\Block::display( $id );
|
||||
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_external.js', 'cms', 'front' ) );
|
||||
\IPS\Output::i()->globalControllers[] = 'cms.front.external.communication';
|
||||
@@ -26,4 +26,34 @@ if( isset( \IPS\Output::i()->httpHeaders['X-Frame-Options'] ) )
|
||||
unset( \IPS\Output::i()->httpHeaders['X-Frame-Options'] );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( $block ), 200, 'text/html' );
|
||||
$cache = FALSE;
|
||||
|
||||
try
|
||||
{
|
||||
if ( \is_numeric( $id ) )
|
||||
{
|
||||
$block = \IPS\cms\Blocks\Block::load( $id );
|
||||
}
|
||||
else if ( ! $block instanceof \IPS\cms\Blocks\Block )
|
||||
{
|
||||
$block = \IPS\cms\Blocks\Block::load( $id, 'block_key' );
|
||||
}
|
||||
|
||||
if ( $block->active )
|
||||
{
|
||||
$cache = ( $block->type == 'custom' ) ? $block->cache : TRUE;
|
||||
}
|
||||
}
|
||||
catch( \OutOfRangeException $ex ){}
|
||||
|
||||
if( !$cache OR !\IPS\Settings::i()->widget_cache_ttl )
|
||||
{
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
$headers = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$headers = \IPS\Output::getCacheHeaders( time(), \IPS\Settings::i()->widget_cache_ttl );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( $blockHtml ), 200, 'text/html', $headers );
|
||||
Reference in new issue
Block a user