Version 5.0.0 beta 3

This commit is contained in:
Neo committed 2025-12-19 16:47:22 -08:00
1 parent f61b0da85d
commit e86153356a
108 files changed
+2927 -1573

No files matched your search

+8 -1
View File
@@ -36,6 +36,7 @@ use OutOfRangeException;
use ParseError;
use UnderflowException;
use UnexpectedValueException;
use function array_keys;
use function array_merge;
use function count;
use function defined;
@@ -138,7 +139,7 @@ class CustomTemplate extends Model
*/
public static function all(): ActiveRecordIterator
{
return new ActiveRecordIterator( Db::i()->select( '*', static::$databaseTable, Db::i()->in( 'template_app', array_keys( Application::enabledApplications() ) ), static::$databasePrefix . static::$databaseColumnOrder ), 'IPS\Theme\CustomTemplate' );
return new ActiveRecordIterator( Db::i()->select( '*', static::$databaseTable, null, static::$databasePrefix . static::$databaseColumnOrder ), 'IPS\Theme\CustomTemplate' );
}
/**
@@ -305,6 +306,12 @@ class CustomTemplate extends Model
$organised = [];
foreach( static::all() as $template )
{
/* Only use templates that are enabled */
if ( $template->app and ! in_array( $template->app, array_keys( Application::enabledApplications() ) ) )
{
continue;
}
if ( ! $template->hookpoint )
{
if ( $template->key )
+1 -1
View File
@@ -318,7 +318,7 @@ class Category extends Model
{
$form->add( new Translatable( 'themeeditor_cat_name', null, true, array(
'app' => 'core',
'key' => ( $this->id ? 'themeeditor_cat_' . $this->id : null )
'key' => ( $this->id ? 'themeeditor_cat_' . $this->key : null )
) ) );
$form->add( new Text( 'themeeditor_cat_key', $this->key, true, array(
+5 -5
View File
@@ -242,7 +242,7 @@ class Setting extends Model
*/
public function get_name() : string
{
return Member::loggedIn()->language()->addToStack( 'themeeditor_var_' . $this->id );
return Member::loggedIn()->language()->addToStack( 'themeeditor_var_' . $this->key );
}
/**
@@ -250,9 +250,9 @@ class Setting extends Model
*/
public function get_desc() : string
{
if( Member::loggedIn()->language()->checkKeyExists( 'themeeditor_var_' . $this->id . '_desc' ) )
if( Member::loggedIn()->language()->checkKeyExists( 'themeeditor_var_' . $this->key . '_desc' ) )
{
return Member::loggedIn()->language()->addToStack( 'themeeditor_var_' . $this->id . '_desc' );
return Member::loggedIn()->language()->addToStack( 'themeeditor_var_' . $this->key . '_desc' );
}
return '';
@@ -489,12 +489,12 @@ class Setting extends Model
{
$form->add( new Translatable( 'themeeditor_setting_name', null, true, array(
'app' => 'core',
'key' => ( $this->id ? 'themeeditor_var_' . $this->id : null )
'key' => ( $this->id ? 'themeeditor_var_' . $this->key : null )
) ) );
$form->add( new Translatable( 'themeeditor_setting_desc', null, false, array(
'app' => 'core',
'key' => ( $this->id ? 'themeeditor_var_' . $this->id . '_desc' : null )
'key' => ( $this->id ? 'themeeditor_var_' . $this->key . '_desc' : null )
) ) );
$form->add( new Text( 'themeeditor_setting_key', $this->key, true, array(