Version 5.0.0 beta 10

This commit is contained in:
Neo committed 2025-12-19 17:53:48 -08:00
1 parent 56979f8ee8
commit 264eeb97e0
325 files changed
+6442 -1849

No files matched your search

@@ -16,6 +16,7 @@ use IPS\Developer\Controller;
use IPS\Helpers\Form\Matrix;
use IPS\IPS;
use IPS\Output;
use UnderflowException;
use function defined;
use const IPS\ROOT_PATH;
@@ -95,7 +96,17 @@ class settings extends Controller
{
if( !in_array( $values[ $key ]['key'], $existingKeys ) )
{
$insert[] = array( 'conf_key' => $values[ $key ]['key'], 'conf_value' => $values[ $key ]['default'], 'conf_default' => $values[ $key ]['default'], 'conf_app' => $this->application->directory );
/* It's possible that this is a setting that was moved from a plugin to an app.
Check if the setting exists, and if so, claim it. */
try
{
$settingRow = Db::i()->select( '*', 'core_sys_conf_settings', [ 'conf_key=? and conf_app is null', $values[ $key ]['key'] ] )->first();
Db::i()->update( 'core_sys_conf_settings', array( 'conf_app' => $this->application->directory, 'conf_default' => $values[ $key ]['default'] ), array( 'conf_key=?', $values[ $key ]['key'] ) );
}
catch( UnderflowException )
{
$insert[] = array( 'conf_key' => $values[ $key ]['key'], 'conf_value' => $values[ $key ]['default'], 'conf_default' => $values[ $key ]['default'], 'conf_app' => $this->application->directory );
}
}
else
{