Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -10,34 +10,32 @@
|
||||
*
|
||||
*/
|
||||
|
||||
\define('REPORT_EXCEPTIONS', TRUE);
|
||||
require_once str_replace( 'applications/cms/interface/developer/developer.php', '', str_replace( '\\', '/', __FILE__ ) ) . 'init.php';
|
||||
\IPS\Dispatcher\External::i();
|
||||
use IPS\Dispatcher\External;
|
||||
use IPS\Output;
|
||||
use IPS\Request;
|
||||
|
||||
if ( \IPS\IN_DEV !== true AND ! \IPS\Theme::designersModeEnabled() )
|
||||
define('REPORT_EXCEPTIONS', TRUE);
|
||||
require_once str_replace( 'applications/cms/interface/developer/developer.php', '', str_replace( '\\', '/', __FILE__ ) ) . 'init.php';
|
||||
External::i();
|
||||
|
||||
if ( !\IPS\IN_DEV )
|
||||
{
|
||||
exit();
|
||||
}
|
||||
|
||||
/* The CSS is parsed by the theme engine, and the theme engine has plugins, and those plugins need to now which theme ID we're using */
|
||||
if ( \IPS\Theme::designersModeEnabled() )
|
||||
if ( isset( Request::i()->file ) )
|
||||
{
|
||||
\IPS\Session\Front::i();
|
||||
}
|
||||
|
||||
if ( isset( \IPS\Request::i()->file ) )
|
||||
{
|
||||
$realPath = realpath( \IPS\ROOT_PATH . '/themes/' . \IPS\Request::i()->file );
|
||||
$realPath = realpath( \IPS\ROOT_PATH . '/themes/' . Request::i()->file );
|
||||
$pathContainer = realpath(\IPS\ROOT_PATH . '/themes/' );
|
||||
|
||||
if( $realPath === FALSE OR mb_substr( $realPath, 0, mb_strlen( $pathContainer ) ) !== $pathContainer )
|
||||
{
|
||||
\IPS\Output::i()->error( 'node_error', '3C171/8', 403, '' );
|
||||
Output::i()->error( 'node_error', '3C171/8', 403, '' );
|
||||
exit;
|
||||
}
|
||||
|
||||
$file = file_get_contents( \IPS\ROOT_PATH . '/themes/' . \IPS\Request::i()->file );
|
||||
|
||||
\IPS\Output::setCacheTime( false );
|
||||
\IPS\Output::i()->sendOutput( preg_replace( '#<ips:template.+?\n#', '', $file ), 200, ( mb_substr( \IPS\Request::i()->file, -4 ) === '.css' ) ? 'text/css' : 'text/javascript' );
|
||||
$file = file_get_contents( \IPS\ROOT_PATH . '/themes/' . Request::i()->file );
|
||||
|
||||
Output::i()->pageCaching = FALSE;
|
||||
Output::i()->sendOutput( preg_replace( '#<ips:template.+?\n#', '', $file ), 200, ( mb_substr( Request::i()->file, -4 ) === '.css' ) ? 'text/css' : 'text/javascript' );
|
||||
}
|
||||
Reference in new issue
Block a user