From fc0c796b68dc368b0fd3902bcebd2e5f78b8433c Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 13 Feb 2018 10:58:06 +0100 Subject: [PATCH] avoid undefined variables/indexes Signed-off-by: Michael Kaufmann (d00p) --- admin_plans.php | 31 ++++++++++++++++++++++++- templates/Sparkle/admin/plans/plans.tpl | 2 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/admin_plans.php b/admin_plans.php index 6ff53949..d37f04cd 100644 --- a/admin_plans.php +++ b/admin_plans.php @@ -244,6 +244,11 @@ if ($page == '' || $page == 'overview') { } } + // dummy to avoid unknown variables + $language_options = null; + $gender_options = null; + $hosting_plans = null; + $plans_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/plans/formfield.plans_add.php'; $cust_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/customer/formfield.customer_add.php'; // unset unneeded stuff @@ -462,7 +467,31 @@ if ($page == '' || $page == 'overview') { ); } } - + + // dummy to avoid unknown variables + $result['loginname'] = null; + $result['documentroot'] = null; + $result['standardsubdomain'] = null; + $result['deactivated'] = null; + $language_options = null; + $result['firstname'] = null; + $gender_options = null; + $result['company'] = null; + $result['street'] = null; + $result['zipcode'] = null; + $result['city'] = null; + $result['phone'] = null; + $result['fax'] = null; + $result['email'] = null; + $result['customernumber'] = null; + $result['custom_notes'] = null; + $result['custom_notes_show'] = null; + $hosting_plans = null; + $result['imap'] = null; + $result['pop3'] = null; + $admin_select_cnt = null; + $admin_select = null; + $plans_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/plans/formfield.plans_edit.php'; $cust_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/customer/formfield.customer_edit.php'; // unset unneeded stuff diff --git a/templates/Sparkle/admin/plans/plans.tpl b/templates/Sparkle/admin/plans/plans.tpl index 963c1dbf..ed9c4432 100644 --- a/templates/Sparkle/admin/plans/plans.tpl +++ b/templates/Sparkle/admin/plans/plans.tpl @@ -26,7 +26,7 @@ $header {$lng['admin']['plans']['name']} {$arrowcode['p.name']} {$lng['admin']['plans']['description']} {$arrowcode['p.description']} - {$lng['admin']['admin']} {$arrowcode['a.adminname']} + {$lng['admin']['admin']} {$arrowcode['adminname']} {$lng['admin']['plans']['last_update']} {$arrowcode['p.ts']} {$lng['panel']['options']}