Version 5.0.0 beta 2

This commit is contained in:
Neo committed 2025-12-19 16:39:01 -08:00
1 parent 15c7beabc5
commit f61b0da85d
181 files changed
+3182 -1533

No files matched your search

+11 -3
View File
@@ -138,7 +138,7 @@ class CustomTemplate extends Model
*/
public static function all(): ActiveRecordIterator
{
return new ActiveRecordIterator( Db::i()->select( '*', static::$databaseTable, NULL, static::$databasePrefix . static::$databaseColumnOrder ), 'IPS\Theme\CustomTemplate' );
return new ActiveRecordIterator( Db::i()->select( '*', static::$databaseTable, Db::i()->in( 'template_app', array_keys( Application::enabledApplications() ) ), static::$databasePrefix . static::$databaseColumnOrder ), 'IPS\Theme\CustomTemplate' );
}
/**
@@ -272,7 +272,12 @@ class CustomTemplate extends Model
*/
public static function pathToArray( string $path ): array
{
[ $app, $location, $group, $templateName ] = explode( '/', $path );
$bits = explode( "/", $path );
$app = array_shift( $bits );
$location = array_shift( $bits );
$group = array_shift( $bits );
$templateName = implode( "_", $bits );
//[ $app, $location, $group, $templateName ] = explode( '/', $path );
return [
'app' => $app,
@@ -576,9 +581,12 @@ EOF;
if ( $this->hookpoint and $this->hookpoint_type )
{
[ $path, $hook ] = explode( ':', $this->hookpoint );
$pathData = CustomTemplate::pathToArray( $path );
$badge = array(
0 => 'style2',
1 => $this->hookpoint . ' ' . $this->hookpoint_type
1 => implode( "/", $pathData ) . ':' . $hook . ' ' . $this->hookpoint_type
);
}
else if ( $this->key )