Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme\Advanced;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
+14 -20
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme\Advanced;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -49,20 +49,13 @@ class _Theme extends \IPS\Theme\Dev\Theme
*/
public function __construct()
{
$column = 'skin';
if( \IPS\Dispatcher::hasInstance() )
if ( \IPS\Member::loggedIn()->skin and array_key_exists( \IPS\Member::loggedIn()->skin, \IPS\Theme::themes() ) )
{
$column = ( \IPS\Dispatcher::i()->controllerLocation == 'admin' ) ? 'acp_skin' : 'skin';
}
if ( \IPS\Member::loggedIn()->$column and array_key_exists( \IPS\Member::loggedIn()->$column, \IPS\Theme::themes() ) )
{
$setId = \IPS\Member::loggedIn()->$column;
$setId = \IPS\Member::loggedIn()->skin;
if ( \IPS\Theme::load( $setId )->canAccess() !== true )
{
$setId = ( $column == 'skin' ? \IPS\Theme::defaultTheme() : \IPS\Theme::defaultAcpTheme() );
$setId = \IPS\Theme::defaultTheme();
/* Restore default theme for member */
\IPS\Member::loggedIn()->$column = $setId;
@@ -71,7 +64,7 @@ class _Theme extends \IPS\Theme\Dev\Theme
}
else
{
$setId = ( $column == 'skin' ? \IPS\Theme::defaultTheme() : \IPS\Theme::defaultAcpTheme() );
$setId = \IPS\Theme::defaultTheme();
}
static::$currentThemeId = ( static::$currentThemeId ) ? static::$currentThemeId : $setId;
@@ -368,7 +361,7 @@ class _Theme extends \IPS\Theme\Dev\Theme
$languageStrings = \IPS\Db::i()->select( 'word_key, word_default', 'core_sys_lang_words', array( 'word_theme=? and lang_id=?', static::$currentThemeId, \IPS\Lang::defaultLanguage() ) )->setKeyField('word_key')->setValueField('word_default');
if( count( $languageStrings ) )
if( \count( $languageStrings ) )
{
$langToWrite = "\$lang = array(\n";
@@ -426,9 +419,10 @@ class _Theme extends \IPS\Theme\Dev\Theme
/**
* Writes the /application/{app}/dev/{container}/{path} directory
*
* @param string $app Application Directory
* @param string $container Path to create (e.g. admin, front)
* @return string Path created
* @param string $app Application Directory
* @param string $container Path to create (e.g. admin, front)
* @param string $path Path
* @return string Path created
* @throws \RuntimeException
*/
protected static function _writeThemePathDirectory( $app, $container, $path )
@@ -469,7 +463,7 @@ class _Theme extends \IPS\Theme\Dev\Theme
static::_writeThemeIdDirectory();
static::_writeThemeContainerDirectory( $app, 'resources');
foreach( \IPS\Db::i()->select( '*', 'core_theme_resources', array( 'resource_set_id=?', static::$currentThemeId ) )->setKeyField('resource_id') as $resourceId => $resource )
foreach( \IPS\Db::i()->select( '*', 'core_theme_resources', array( 'resource_set_id=? and resource_location!=?', static::$currentThemeId, 'admin' ) )->setKeyField('resource_id') as $resourceId => $resource )
{
static::_writeThemePathDirectory( $app, 'resources', $resource['resource_app'] );
$pathToWrite = static::_writeThemePathDirectory( $app, 'resources', $resource['resource_app'] . '/' . $resource['resource_location'] );
@@ -509,7 +503,7 @@ class _Theme extends \IPS\Theme\Dev\Theme
static::_writeThemeIdDirectory();
static::_writeThemeContainerDirectory( $app, 'css');
$css = static::load( static::$currentThemeId )->getRawCss();
$css = static::load( static::$currentThemeId )->getRawCss( array(), array( 'global', 'front' ) );
foreach( $css as $app => $data )
{
@@ -552,7 +546,7 @@ class _Theme extends \IPS\Theme\Dev\Theme
$params[] = 'hidden="1"';
}
if ( count( $params ) )
if ( \count( $params ) )
{
$write .= '/*<ips:css ' . implode( ' ', $params ) . ' />*/' . "\n";
}
@@ -585,7 +579,7 @@ class _Theme extends \IPS\Theme\Dev\Theme
static::_writeThemeIdDirectory();
static::_writeThemeContainerDirectory( $app, 'html');
$templates = static::load( static::$currentThemeId )->getRawTemplates( $app );
$templates = static::load( static::$currentThemeId )->getRawTemplates( $app, array( 'global', 'front' ) );
foreach( $templates as $app => $data )
{
+26 -9
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme\Cache;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -54,7 +54,7 @@ class _Template extends \IPS\Theme\Template
{
parent::__construct( $app, $templateLocation, $templateName );
static::$theme = \IPS\Theme::$memberTheme;
static::$theme = ( \IPS\Dispatcher::hasInstance() AND class_exists( '\IPS\Dispatcher', FALSE ) and \IPS\Dispatcher::i()->controllerLocation === 'admin' ) ? \IPS\Theme::$adminSkin : \IPS\Theme::$memberTheme;
if ( ! static::$theme->cache_key )
{
@@ -79,11 +79,26 @@ class _Template extends \IPS\Theme\Template
if ( file_exists( static::$file ) )
{
/* For FLOCK to work when setting, we need to flock when reading https://bugs.php.net/bug.php?id=52895 */
$f = fopen( static::$file, 'r' );
flock( $f, LOCK_SH );
include_once( static::$file );
flock( $f, LOCK_UN );
fclose( $f );
try
{
$f = fopen( static::$file, 'r' );
flock( $f, LOCK_SH );
include_once( static::$file );
flock( $f, LOCK_UN );
fclose( $f );
}
catch( \ParseError $e )
{
@unlink( static::$file );
/* Clear zend opcache if enabled */
if ( \function_exists( 'opcache_invalidate' ) )
{
@opcache_invalidate( static::$file );
}
return false;
}
$class = "\\IPS\\Theme\\Cache\\" . \IPS\Theme::overloadHooks( static::$className, "IPS\\Theme\\Cache" );
@@ -96,7 +111,7 @@ class _Template extends \IPS\Theme\Template
@unlink( static::$file );
/* Clear zend opcache if enabled */
if ( function_exists( 'opcache_invalidate' ) )
if ( \function_exists( 'opcache_invalidate' ) )
{
@opcache_invalidate( static::$file );
}
@@ -154,8 +169,10 @@ class _Template extends \IPS\Theme\Template
$result = (bool) @\file_put_contents( static::$file, $template );
}
@chmod( static::$file, \IPS\IPS_FILE_PERMISSION );
/* Clear zend opcache if enabled */
if ( function_exists( 'opcache_invalidate' ) )
if ( \function_exists( 'opcache_invalidate' ) )
{
@opcache_invalidate( static::$file );
}
View File
Whitespace-only changes.
+6 -6
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme\Dev;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -65,7 +65,7 @@ class _Template extends \IPS\Theme\Template
$functionName = "theme_{$this->app}_{$this->templateLocation}_{$this->templateName}_{$bit}";
/* If it doesn't exist, build it */
if( !function_exists( 'IPS\\Theme\\'.$functionName ) )
if( !\function_exists( 'IPS\\Theme\\'.$functionName ) )
{
/* Find the file */
$file = NULL;
@@ -110,7 +110,7 @@ class _Template extends \IPS\Theme\Template
$output = "<!-- " . $functionName . " -->" . $output;
}
if ( \IPS\IN_DEV AND get_called_class() !== 'IPS\Theme\System\Template' )
if ( \IPS\IN_DEV AND \get_called_class() !== 'IPS\Theme\System\Template' )
{
/* Template names that will allow inline style="" attributes */
$allowedInlineStyle = array(
@@ -136,11 +136,11 @@ class _Template extends \IPS\Theme\Template
);
/* Check we're not being naughty */
if( preg_match( "/<.+?style=['\"].+?>/i", $output ) and !in_array( $functionName, $allowedInlineStyle ) && $this->app != 'documentation' )
if( preg_match( "/<.+?style=['\"].+?>/i", $output ) and !\in_array( $functionName, $allowedInlineStyle ) && $this->app != 'documentation' )
{
//trigger_error( "There is inline CSS in {$functionName}. Please move all styling into CSS files.", E_USER_ERROR );
}
if( !in_array( $bit, $allowedStyleBlocks ) and preg_match( "/<style.*?>/i", $output ) && $this->app != 'documentation' )
if( !\in_array( $bit, $allowedStyleBlocks ) and preg_match( "/<style.*?>/i", $output ) && $this->app != 'documentation' )
{
// trigger_error( "There is a style block in {$functionName}. Please move all styling into CSS files.", E_USER_ERROR );
}
@@ -148,7 +148,7 @@ class _Template extends \IPS\Theme\Template
{
trigger_error( "There is a inline JavaScript {$functionName}. Please move all JavaScript into JS files.", E_USER_ERROR );
}
if( !in_array( $bit, $allowedScriptBlocks ) and $this->templateName !== 'embed' and preg_match( "/<script((?!src).)*>/i", $output ) && $this->app != 'documentation' )
if( !\in_array( $bit, $allowedScriptBlocks ) and $this->templateName !== 'embed' and preg_match( "/<script((?!src).)*>/i", $output ) && $this->app != 'documentation' )
{
trigger_error( "There is a script block in {$functionName}. Please move all JavaScript into JS files.", E_USER_ERROR );
}
+44 -27
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme\Dev;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -45,9 +45,9 @@ class _Theme extends \IPS\Theme
public function getRawTemplates( $app=array(), $location=array(), $group=array(), $returnType=null, $returnThisSetOnly=false )
{
$returnType = ( $returnType === null ) ? self::RETURN_ALL : $returnType;
$app = ( is_string( $app ) AND $app != '' ) ? array( $app ) : $app;
$location = ( is_string( $location ) AND $location != '' ) ? array( $location ) : $location;
$group = ( is_string( $group ) AND $group != '' ) ? array( $group ) : $group;
$app = ( \is_string( $app ) AND $app != '' ) ? array( $app ) : $app;
$location = ( \is_string( $location ) AND $location != '' ) ? array( $location ) : $location;
$group = ( \is_string( $group ) AND $group != '' ) ? array( $group ) : $group;
$where = array();
$templates = array();
@@ -61,17 +61,17 @@ class _Theme extends \IPS\Theme
foreach( \IPS\Application::applications() as $appDir => $application )
{
if ( $app === NULL or ( in_array( $appDir, $app ) ) )
if ( $app === NULL or ( \in_array( $appDir, $app ) ) )
{
foreach( $fixedLocations as $_location )
{
if ( $location === NULL or ( in_array( $_location, $location ) ) ) # location?
if ( $location === NULL or ( \in_array( $_location, $location ) ) ) # location?
{
foreach( new \DirectoryIterator( static::_getHtmlPath( $appDir, $_location ) ) as $file )
{
if ( $file->isDir() AND mb_substr( $file->getFilename(), 0, 1 ) !== '.' )
{
if ( $group === NULL or ( in_array( $file->getFilename(), $group ) ) )
if ( $group === NULL or ( \in_array( $file->getFilename(), $group ) ) )
{
foreach( new \DirectoryIterator( static::_getHtmlPath( $appDir, $_location, $file->getFilename() ) ) as $template )
{
@@ -132,7 +132,16 @@ class _Theme extends \IPS\Theme
if( file_exists( \IPS\ROOT_PATH . '/' . $data['file'] ) )
{
$contents = "namespace " . rtrim( static::_getTemplateNamespace(), '\\' ) . ";\n\n" . str_replace( '_HOOK_CLASS_', $class, file_get_contents( \IPS\ROOT_PATH . '/' . $data['file'] ) );
eval( $contents );
if ( \IPS\DEBUG_TEMPLATES )
{
static::runDebugTemplate( str_replace( '/', '_', $data['file'] ), $contents );
}
else
{
eval( $contents );
}
$class = $data['class'];
}
}
@@ -166,7 +175,7 @@ class _Theme extends \IPS\Theme
$path = static::_getCssPath($app, $location, $file);
}
if ( isset( self::$buildGrouping['css'][ $app ][ $location ] ) AND is_array( self::$buildGrouping['css'][ $app ][ $location ] ) )
if ( isset( self::$buildGrouping['css'][ $app ][ $location ] ) AND \is_array( self::$buildGrouping['css'][ $app ][ $location ] ) )
{
foreach( self::$buildGrouping['css'][ $app ][ $location ] as $buildPath )
{
@@ -202,7 +211,7 @@ class _Theme extends \IPS\Theme
sort( $csses );
if ( count( $csses ) )
if ( \count( $csses ) )
{
if( \IPS\DEV_DEBUG_CSS )
{
@@ -312,6 +321,7 @@ class _Theme extends \IPS\Theme
* @param string $path Path to resource
* @param string|null $app Application key
* @param string|null $location Location
* @param bool $noProtocol Return URL without a protocol (protocol-relative)
* @return \IPS\Http\Url|NULL URL to resource
*/
public function resource( $path, $app=NULL, $location=NULL, $noProtocol=FALSE )
@@ -367,7 +377,7 @@ class _Theme extends \IPS\Theme
if ( $location->isDir() )
{
if ( ! in_array( $location->getFilename(), $themeLocations ) )
if ( ! \in_array( $location->getFilename(), $themeLocations ) )
{
continue;
}
@@ -465,7 +475,6 @@ class _Theme extends \IPS\Theme
*
* @param string $app Application Key
* @param int $id Theme Set Id (0 if IN_DEV and not in advanced theming mode)
*
* @return void
*/
public static function importDevCss( $app, $id )
@@ -507,7 +516,7 @@ class _Theme extends \IPS\Theme
*
* @param string $app Application Key
* @param int $id Theme set ID
* @param array $master Master CSS bits
* @param array $currentCss Master CSS bits
* @param string $location Location Folder Name
* @param string $path Path
* @return void
@@ -541,7 +550,7 @@ class _Theme extends \IPS\Theme
preg_match( '#^/\*<ips:css([^>]+?)>\*/\n#', $css, $params );
/* Strip it */
if ( count( $params ) AND ! empty( $params[0] ) )
if ( \count( $params ) AND ! empty( $params[0] ) )
{
$css = str_replace( $params[0], '', $css );
}
@@ -552,7 +561,7 @@ class _Theme extends \IPS\Theme
$cssHidden = 0;
/* Tidy params */
if ( count( $params ) AND ! empty( $params[1] ) )
if ( \count( $params ) AND ! empty( $params[1] ) )
{
preg_match_all( '#([\d\w]+?)=\"([^"]+?)"#i', $params[1], $items, PREG_SET_ORDER );
@@ -567,10 +576,10 @@ class _Theme extends \IPS\Theme
$cssApp = trim( $attr[2] );
break;
case 'position':
$cssPos = intval( $attr[2] );
$cssPos = \intval( $attr[2] );
break;
case 'hidden':
$cssHidden = intval( $attr[2] );
$cssHidden = \intval( $attr[2] );
break;
}
}
@@ -631,9 +640,9 @@ class _Theme extends \IPS\Theme
/**
* Build Resourcess ready for non IN_DEV use
*
* @param string|array $app App (e.g. core, forum)
* @param int $id Theme Set Id (0 if IN_DEV and not in advanced theming mode)
*
* @return void
*/
public static function importDevResources( $app=NULL, $id )
@@ -647,7 +656,11 @@ class _Theme extends \IPS\Theme
if ( $app === null OR $app == $dir->getFilename() )
{
\IPS\Theme::deleteCompiledResources( $dir->getFilename(), null, null, null, ( $id === 0 ? \IPS\DEFAULT_THEME_ID : $id ) );
/* When we are building, removeResources() has already taken care of this */
if( $id !== 0 )
{
\IPS\Theme::deleteCompiledResources( $dir->getFilename(), null, null, null, $id );
}
if ( $id )
{
@@ -688,7 +701,6 @@ class _Theme extends \IPS\Theme
* @param int $id Theme Set Id
* @param string $location Location Folder Name
* @param string $path Path
*
* @return void
*/
public static function _importDevResources( $app, $id, $location, $path='/' )
@@ -735,9 +747,9 @@ class _Theme extends \IPS\Theme
$custom = 0;
$name = self::makeBuiltTemplateLookupHash($app, $location, $path) . '_' . $file->getFilename();
$fileName = (string) \IPS\File::create( 'core_Theme', $name, $content, 'set_resources_' . ( $id == 0 ? \IPS\DEFAULT_THEME_ID : $id ) );
$fileName = (string) \IPS\File::create( 'core_Theme', $name, $content, 'set_resources_' . ( $id == 0 ? \IPS\DEFAULT_THEME_ID : $id ), TRUE );
if ( ! isset( $master[ $file->getFilename() ] ) or !\IPS\Login::compareHashes( md5( $content ), $master[ $file->getFilename() ] ) )
if ( $id !== 0 AND ( !isset( $master[ $file->getFilename() ] ) or !\IPS\Login::compareHashes( md5( $content ), $master[ $file->getFilename() ] ) ) )
{
$custom = 1;
}
@@ -813,9 +825,10 @@ class _Theme extends \IPS\Theme
/**
* Writes the /application/{app}/dev/{container}/{path} directory
*
* @param string $app Application Directory
* @param string $container Path to create (e.g. admin, front)
* @return string Path created
* @param string $app Application Directory
* @param string $container Location of path to create (e.g. admin, front)
* @param string $path Path to create
* @return string Path created
* @throws \RuntimeException
*/
protected static function _writeThemePathDirectory( $app, $container, $path )
@@ -990,7 +1003,7 @@ class _Theme extends \IPS\Theme
$params[] = 'hidden="1"';
}
if ( count( $params ) )
if ( \count( $params ) )
{
$write .= '/*<ips:css ' . implode( ' ', $params ) . ' />*/' . "\n";
}
@@ -1104,7 +1117,7 @@ class _Theme extends \IPS\Theme
{
$file = \IPS\ROOT_PATH . "/applications/{$app}/data/themesettings.json";
if( @\file_put_contents( $file, version_compare( PHP_VERSION, '5.4.0' ) >= 0 ? json_encode( $json, JSON_PRETTY_PRINT ) : json_encode( $json ) ) === FALSE )
if( @\file_put_contents( $file, json_encode( $json, JSON_PRETTY_PRINT ) ) === FALSE )
{
\IPS\Output::i()->error( 'dev_could_not_write_data', '1C103/4', 403, '' );
}
@@ -1144,6 +1157,7 @@ class _Theme extends \IPS\Theme
/**
* Returns the namespace for the template class
*
* @return string
*/
protected static function _getTemplateNamespace()
@@ -1153,6 +1167,7 @@ class _Theme extends \IPS\Theme
/**
* Returns the path for the IN_DEV .phtml files
*
* @param string $app Application Key
* @param string|null $location Location
* @param string|null $path Path or Filename
@@ -1165,6 +1180,7 @@ class _Theme extends \IPS\Theme
/**
* Returns the path for the IN_DEV CSS file
*
* @param string $app Application Key
* @param string|null $location Location
* @param string|null $path Path or Filename
@@ -1177,6 +1193,7 @@ class _Theme extends \IPS\Theme
/**
* Returns the path for the IN_DEV resource files
*
* @param string $app Application Key
* @param string|null $location Location
* @param string|null $path Path or Filename
+7 -4
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -30,7 +30,7 @@ class _SandboxedTemplate
/**
* Contructor
*
* @param \IPS\Theme\Template $template
* @param \IPS\Theme\Template $template Template to use
* @return void
*/
public function __construct( $template )
@@ -41,7 +41,9 @@ class _SandboxedTemplate
/**
* Call
*
* @return string
* @param string $name Method name
* @param array $args Method arguments
* @return string
*/
public function __call( $name, $args )
{
@@ -49,7 +51,8 @@ class _SandboxedTemplate
{
if ( !method_exists( $this->template, $name ) )
{
return "<span style='background:black;color:white;padding:6px;'>[[Template {$this->template->app}/{$this->template->templateLocation}/{$this->template->templateName}/{$name} does not exist. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]</span>";
/* It doesn't exist in this theme or master, so ignore, as it's likely been removed from master during an upgrade */
return '';
}
else
{
+1 -1
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme\Setup;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
+1 -1
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme\System;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
+1 -1
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme\System;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
+1 -1
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
+1 -1
View File
@@ -11,7 +11,7 @@
namespace IPS\Theme;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
+553 -357
View File
File diff suppressed because it is too large. Load diff