Version 5.0.0 beta 10
This commit is contained in:
1 parent
56979f8ee8
commit
264eeb97e0
325 files changed
+6442
-1849
No files matched your search
@@ -315,6 +315,14 @@ class Setting extends Model
|
||||
static::$appKeys = array_keys( Application::enabledApplications() );
|
||||
}
|
||||
|
||||
$themesToCheck = [ Theme::i()->id, Theme::$defaultFrontendThemeSet ];
|
||||
|
||||
/* If we are working with a specific theme, make sure we allow it */
|
||||
if( isset( Request::i()->set_id ) )
|
||||
{
|
||||
$themesToCheck[] = Request::i()->set_id;
|
||||
}
|
||||
|
||||
$return = [];
|
||||
foreach( new ActiveRecordIterator(
|
||||
Db::i()->select( '*', static::$databaseTable, array( 'setting_category_id=?', $category->id ), 'setting_position' ),
|
||||
@@ -327,7 +335,7 @@ class Setting extends Model
|
||||
continue;
|
||||
}
|
||||
|
||||
if( $setting->set_id and !in_array( $setting->set_id, array( Theme::$defaultFrontendThemeSet, Theme::i()->id ) ) )
|
||||
if( $setting->set_id and !in_array( $setting->set_id, $themesToCheck ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -643,9 +651,22 @@ class Setting extends Model
|
||||
$return['setting_app'] = $values['themeeditor_setting_app']->directory;
|
||||
}
|
||||
|
||||
Lang::saveCustom( 'core', static::$titleLangPrefix . $this->key, $values['themeeditor_setting_name'] );
|
||||
Lang::saveCustom( 'core', static::$titleLangPrefix . $this->key . '_desc', $values['themeeditor_setting_desc'] );
|
||||
Lang::saveCustom( 'core', static::$titleLangPrefix . $values['themeeditor_setting_key'], $values['themeeditor_setting_name'] );
|
||||
Lang::saveCustom( 'core', static::$titleLangPrefix . $values['themeeditor_setting_key'] . '_desc', $values['themeeditor_setting_desc'] );
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* [ActiveRecord] Delete Record
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function delete(): void
|
||||
{
|
||||
parent::delete();
|
||||
|
||||
Lang::deleteCustom( 'core', static::$titleLangPrefix . $this->key );
|
||||
Lang::deleteCustom( 'core', static::$titleLangPrefix . $this->key . '_desc' );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user