From e7ff4bf0eb604c2bb0bc8582df0d6db4d47a8292 Mon Sep 17 00:00:00 2001 From: "mike.morgan%oregonstate.edu" Date: Wed, 19 Apr 2006 15:44:25 +0000 Subject: [PATCH] Added redirect if product is not defined (redirects users accessing the URL directly to the mozilla.com support page). git-svn-id: svn://10.0.0.236/trunk@194681 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/survey/webroot/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mozilla/webtools/survey/webroot/index.php b/mozilla/webtools/survey/webroot/index.php index 71ed4385a41..5378e7952a6 100644 --- a/mozilla/webtools/survey/webroot/index.php +++ b/mozilla/webtools/survey/webroot/index.php @@ -6,6 +6,13 @@ */ $sql['product'] = !empty($_POST['product'])?mysql_real_escape_string($_POST['product']):(!empty($_GET['product'])?mysql_real_escape_string($_GET['product']):null); $sql['product_id'] = $app->getAppIdByName($sql['product']); + +// If no matching product is found, redirect them to the support page. +if (empty($sql['product_id'])) { + header('Location: http://www.mozilla.com/support/'); + exit; +} + $intends = $app->getIntends($sql['product_id']); $issues = $app->getIssues($sql['product_id']);