From d8144b48ffc1bcffc8a66e26ca2337bc10f219c8 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 25 Mar 2015 20:30:17 +0000 Subject: [PATCH] Add hostname to the variable list. --- app/vars/app_config.php | 8 ++++---- app/vars/var_edit.php | 22 +++++++++++----------- app/vars/vars.php | 4 +++- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/app/vars/app_config.php b/app/vars/app_config.php index 57e52f7e68..a6aee49b64 100644 --- a/app/vars/app_config.php +++ b/app/vars/app_config.php @@ -70,15 +70,15 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "var_value"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "var_hostname"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(255)"; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "var_value"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "var_cat"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; diff --git a/app/vars/var_edit.php b/app/vars/var_edit.php index a14c458ca5..6900123b03 100644 --- a/app/vars/var_edit.php +++ b/app/vars/var_edit.php @@ -222,17 +222,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo " ".$text['label-hostname']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-hostname']."\n"; - echo "\n"; - echo "\n"; - echo "\n"; echo "\n"; echo " ".$text['label-value']."\n"; @@ -244,6 +233,17 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; + echo "\n"; + echo "\n"; + echo " ".$text['label-hostname']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-hostname']."\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo " ".$text['label-category']."\n"; diff --git a/app/vars/vars.php b/app/vars/vars.php index d0c60e9687..8b9d188451 100644 --- a/app/vars/vars.php +++ b/app/vars/vars.php @@ -97,6 +97,7 @@ else { $tmp_var_header .= "\n"; $tmp_var_header .= th_order_by('var_name', $text['label-name'], $order_by, $order); $tmp_var_header .= th_order_by('var_value', $text['label-value'], $order_by, $order); + $tmp_var_header .= th_order_by('var_hostname', $text['label-hostname'], $order_by, $order); $tmp_var_header .= th_order_by('var_enabled', $text['label-enabled'], $order_by, $order); $tmp_var_header .= "".$text['label-description']."\n"; $tmp_var_header .= ""; @@ -151,6 +152,7 @@ else { echo " "; echo " ".(($row['var_enabled'] == 'true') ? $text['option-true'] : $text['option-false']).""; echo " \n"; + echo " ".$var_hostname." \n"; $var_description = str_replace("\n", "
", trim(substr(base64_decode($row['var_description']),0,40))); $var_description = str_replace(" ", "       ", $var_description); echo " ".$var_description." \n"; @@ -192,4 +194,4 @@ else { //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file