Skip to content

Commit 87d0684

Browse files
authored
Fix(core): Fix Dropdown generation (#1020)
1 parent ea27c47 commit 87d0684

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

inc/dropdown.class.php

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -146,47 +146,6 @@ public static function create($input)
146146
return false;
147147
}
148148

149-
//get front template
150-
$template_front = file_get_contents(PLUGINFIELDS_DIR . '/templates/dropdown.tpl');
151-
if ($template_front === false) {
152-
Toolbox::logDebug('Error : get dropdown front template error');
153-
154-
return false;
155-
}
156-
157-
//create dropdown front file
158-
$template_front = str_replace('%%CLASSNAME%%', $classname, $template_front);
159-
$front_filename = $input['name'] . 'dropdown.php';
160-
if (
161-
file_put_contents(
162-
PLUGINFIELDS_FRONT_PATH . "/$front_filename",
163-
$template_front,
164-
) === false
165-
) {
166-
Toolbox::logDebug("Error : dropdown front file creation - $class_filename");
167-
168-
return false;
169-
}
170-
171-
//get form template
172-
$template_form = file_get_contents(PLUGINFIELDS_DIR . '/templates/dropdown.form.tpl');
173-
if ($template_form === false) {
174-
return false;
175-
}
176-
177-
//create dropdown form file
178-
$template_form = str_replace('%%CLASSNAME%%', $classname, $template_form);
179-
$form_filename = $input['name'] . 'dropdown.form.php';
180-
if (
181-
file_put_contents(
182-
PLUGINFIELDS_FRONT_PATH . "/$form_filename",
183-
$template_form,
184-
) === false
185-
) {
186-
Toolbox::logDebug('Error : get dropdown form template error');
187-
188-
return false;
189-
}
190149

191150
//load class manually on plugin installation
192151
if (!class_exists($classname)) {

0 commit comments

Comments
 (0)