Version 5.0.0 beta 11.1

This commit is contained in:
Neo committed 2025-12-19 18:00:22 -08:00
1 parent 264eeb97e0
commit 90e8c7e903
466 files changed
+7796 -2394

No files matched your search

+14 -4
View File
@@ -35,7 +35,9 @@ use function intval;
use function is_array;
use function is_dir;
use function is_string;
use function preg_match;
use function str_replace;
use function str_starts_with;
use function stristr;
use function strstr;
use const IPS\DEFAULT_THEME_ID;
@@ -221,6 +223,12 @@ class Theme extends SystemTheme
if ( $location === 'interface' )
{
/* Legacy code support. The following directories were moved to /static */
if ( ( $app === "core" or $app === null) and preg_match( "/^(?:codemirror|fontawesome)/", $file ) )
{
$file = "static/" . $file;
}
$path = ROOT_PATH . "/applications/{$app}/interface/{$file}";
}
else
@@ -228,6 +236,8 @@ class Theme extends SystemTheme
$path = static::_getCssPath($app, $location, $file);
}
$isStaticInterface = (bool) ( $location === "interface" and ( $app === "core" or $app === null) and str_starts_with( $file, "static/" ) );
if ( isset( self::$buildGrouping['css'][ $app ][ $location ] ) AND is_array( self::$buildGrouping['css'][ $app ][ $location ] ) )
{
foreach( self::$buildGrouping['css'][ $app ][ $location ] as $buildPath )
@@ -251,7 +261,7 @@ class Theme extends SystemTheme
/* Load css/location/folderName/folderName.css first */
if ( is_file( $path . '/' . $fileName ) )
{
$return[] = str_replace( array( 'http://', 'https://' ), '//', Settings::i()->base_url ) . "applications/core/interface/css/css.php?css=" . ( str_replace( ROOT_PATH . '/', '', static::_getCssPath( $app, $location, $file ) ) ) . $fileName;
$return[] = str_replace( array( 'http://', 'https://' ), '//', Settings::i()->base_url ) . ( $isStaticInterface ? "" : "applications/core/interface/css/css.php?css=" ) . ( str_replace( ROOT_PATH . '/', '', static::_getCssPath( $app, $location, $file ) ) ) . $fileName;
}
$csses = array();
@@ -267,11 +277,11 @@ class Theme extends SystemTheme
if ( count( $csses ) )
{
if( DEV_DEBUG_CSS )
if( DEV_DEBUG_CSS or $isStaticInterface )
{
foreach( $csses as $cssFile )
{
$return[] = str_replace( array( 'http://', 'https://' ), '//', Settings::i()->base_url ) . "applications/core/interface/css/css.php?css=" . $cssFile;
$return[] = str_replace( array( 'http://', 'https://' ), '//', Settings::i()->base_url ) . ( $isStaticInterface ? "" : "applications/core/interface/css/css.php?css=" ) . $cssFile;
}
}
else
@@ -282,7 +292,7 @@ class Theme extends SystemTheme
}
elseif ( file_exists( $path ) )
{
$return[] = str_replace( ROOT_PATH . '/', '', str_replace( array( 'http://', 'https://' ), '//', Settings::i()->base_url ) . "applications/core/interface/css/css.php?css=" . $path );
$return[] = str_replace( ROOT_PATH . '/', '', str_replace( array( 'http://', 'https://' ), '//', Settings::i()->base_url ) . ( $isStaticInterface ? "" : "applications/core/interface/css/css.php?css=" ) . $path );
}
return $return;