Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

+17 -10
View File
@@ -11,16 +11,23 @@
namespace IPS\Theme\Setup;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use IPS\Dispatcher;
use IPS\Theme as SystemTheme;
use IPS\Theme\Dev\Template as DevTemplate;
use IPS\Theme\Template;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* IN_DEV Skin set
*/
class _Theme extends \IPS\Theme
class Theme extends SystemTheme
{
/**
* Constructor
@@ -33,15 +40,15 @@ class _Theme extends \IPS\Theme
/**
* Get template
*
* @param string $template Template name
* @param string $app Application key (NULL for current application)
* @param string $templateLocation Template location (NULL for current template location)
* @return \IPS\Theme\Template
* @param string $group Template name
* @param string|null $app Application key (NULL for current application)
* @param string|null $location Template location (NULL for current template location)
* @return Template
*/
public function getTemplate( $template, $app=NULL, $templateLocation=NULL )
public function getTemplate( string $group, string $app=NULL, string $location=NULL ): Template
{
$obj = new \IPS\Theme\Dev\Template( $template, 'core', 'setup' );
$obj->sourceFolder = \IPS\ROOT_PATH . "/" . \IPS\CP_DIRECTORY . "/" . \IPS\Dispatcher::i()->setupLocation . "/html/{$template}/";
$obj = new DevTemplate( $group, 'core', 'setup' );
$obj->sourceFolder = \IPS\ROOT_PATH . "/admin/" . Dispatcher::i()->setupLocation . "/html/{$group}/";
return $obj;
}
}