1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-06 06:07:31 +02:00

Version 1.1.2 Optimized Setup

This commit is contained in:
Sebastian
2018-03-15 12:57:07 +01:00
parent 1d87ed2358
commit 47fddb9e7e
127 changed files with 51 additions and 10244 deletions

View File

@@ -121,7 +121,21 @@ class SetupController extends Controller
if($themeSettings)
{
// load theme definitions by theme name
// validate input with field definitions
$themeOriginalSettings = \Typemill\Settings::getThemeSettings($appSettings['theme']);
// validate input with field definitions
if($themeOriginalSettings)
{
foreach($themeSettings as $fieldName => $fieldValue)
{
$fieldDefinition = isset($themeOriginalSettings['forms']['fields'][$fieldName]) ? $themeOriginalSettings['forms']['fields'][$fieldName] : false;
if($fieldDefinition)
{
/* validate user input for this field */
$validate->pluginField($fieldName, $fieldValue, $appSettings['theme'], $fieldDefinition);
}
}
}
$appSettings['themesettings'] = $themeSettings;
}
@@ -134,7 +148,7 @@ class SetupController extends Controller
$pluginSettings[$pluginName] = $pluginUserSettings;
}
else
{
{
/* now fetch the original plugin settings from the plugin folder to get the field definitions */
$pluginOriginalSettings = \Typemill\Settings::getPluginSettings($pluginName);