When the toggle field and values are empty then use defaults
This commit is contained in:
parent
18df561513
commit
4ed611a187
|
|
@ -1983,6 +1983,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if the toggle field and values are empty then set defaults
|
||||||
|
if (empty($toggle_field)) {
|
||||||
|
$toggle_field = self::singular($parent_name)."_enabled";
|
||||||
|
}
|
||||||
|
if (empty($toggle_values)) {
|
||||||
|
$toggle_values[] = 'true';
|
||||||
|
$toggle_values[] = 'false';
|
||||||
|
}
|
||||||
|
|
||||||
//get the current values from the database
|
//get the current values from the database
|
||||||
foreach ($toggle_array as $table_name => $table) {
|
foreach ($toggle_array as $table_name => $table) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue