Skip to content

Commit

Permalink
refactor(wizard): smaller code
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed May 22, 2023
1 parent c0bfe72 commit 238b4fc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ajax/homepage_wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@
exit;
}

if (!isset($_REQUEST['wizard'])) {
http_response_code(400);
die();
}

if ($_REQUEST['wizard'] == 'categories') {
plugin_formcreator_showWizardCategories();
} else if ($_REQUEST['wizard'] == 'forms') {
if (isset($_REQUEST['categoriesId'])) {
$categoriesId = (int) $_REQUEST['categoriesId'];
} else {
$categoriesId = 0;
}
$categoriesId = (int) ($_REQUEST['categoriesId'] ?? 0);
$keywords = isset($_REQUEST['keywords']) ? $_REQUEST['keywords'] : '';
$helpdeskHome = isset($_REQUEST['helpdeskHome']) ? $_REQUEST['helpdeskHome'] != '0' : false;
plugin_formcreator_showWizardForms($categoriesId, $keywords, $helpdeskHome);
Expand Down

0 comments on commit 238b4fc

Please sign in to comment.