From 71c74b1b572f3bdf00ba99009cc23f8f48072a1c Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Sat, 08 Mar 2014 11:58:49 -0500 Subject: [PATCH] Fixed: FS#3372 - Web browser password autofill function overwrites settings --- interface/web/help/faq_list.php | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/web/help/faq_list.php b/interface/web/help/faq_list.php index ff3ad37..53b2992 100644 --- a/interface/web/help/faq_list.php +++ b/interface/web/help/faq_list.php @@ -1,15 +1,15 @@ <?php -require_once('../../lib/config.inc.php'); -require_once('../../lib/app.inc.php'); +require_once '../../lib/config.inc.php'; +require_once '../../lib/app.inc.php'; // Path to the list definition file $list_def_file = 'list/faq_list.php'; // Check the module permissions -if(!stristr($_SESSION['s']['user']['modules'],'help')) { - header('Location: ../index.php'); - die(); +if(!stristr($_SESSION['s']['user']['modules'], 'help')) { + header('Location: ../index.php'); + die(); } // Loading the class @@ -18,7 +18,7 @@ // Optional limit $hf_section = 0; if(isset($_GET['hfs_id'])) - $hf_section = preg_replace("/[^0-9]/","",$_GET['hfs_id']); + $hf_section = $app->functions->intval(preg_replace("/[^0-9]/", "", $_GET['hfs_id'])); // if section id is not specified in the url, choose the first existing section if(!$hf_section) @@ -26,12 +26,12 @@ $res = $app->db->queryOneRecord("SELECT MIN(hfs_id) AS min_id FROM help_faq_sections"); $hf_section = $res['min_id']; } -$app->listform_actions->SQLExtWhere = "hf_section = $hf_section"; +$app->listform_actions->SQLExtWhere = "help_faq.hf_section = $hf_section"; -$res = $app->db->queryOneRecord("SELECT hfs_name FROM help_faq_sections WHERE hfs_id=$hf_section"); +if($hf_section) $res = $app->db->queryOneRecord("SELECT hfs_name FROM help_faq_sections WHERE hfs_id=$hf_section"); // Start the form rendering and action ahndling echo "<h2>FAQ: ".$res['hfs_name']."</h2>"; -$app->listform_actions->onLoad(); +if($hf_section) $app->listform_actions->onLoad(); ?> -- Gitblit v1.9.1