aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-09-27 02:00:58 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-09-27 02:00:58 +0000
commitc26e3c422c42a4e8e446fd2a87b52534d1bcf05f (patch)
tree02d0dcf1973220dd25d66b2f9a271bfbd16284b6
parent9735ab546e754b1a7320ec79710f61028ca2a342 (diff)
downloadpfsense-packages-c26e3c422c42a4e8e446fd2a87b52534d1bcf05f.tar.gz
pfsense-packages-c26e3c422c42a4e8e446fd2a87b52534d1bcf05f.tar.bz2
pfsense-packages-c26e3c422c42a4e8e446fd2a87b52534d1bcf05f.zip
Do not allow the download process to even start by removing the start button if no oink id is defined.
-rw-r--r--packages/snort/snort_download_rules.php28
1 files changed, 16 insertions, 12 deletions
diff --git a/packages/snort/snort_download_rules.php b/packages/snort/snort_download_rules.php
index bca57b7e..d726d650 100644
--- a/packages/snort/snort_download_rules.php
+++ b/packages/snort/snort_download_rules.php
@@ -35,6 +35,10 @@ require_once("service-utils.inc");
$pgtitle = "Services: Snort: Update Rules";
+/* define oinkid */
+if($config['installedpackages']['snort'])
+ $oinkid = $config['installedpackages']['snort']['config'][0]['oinkmastercode'];
+
include("head.inc");
?>
@@ -81,14 +85,18 @@ include("head.inc");
else
echo "<tr><td><b>You last updated the ruleset:</b></td><td>NEVER</td></tr>";
echo "</td></tr></table>";
- /* get time stamps for comparison operations */
- $date1ts = strtotime($last_ruleset_download);
- $date2ts = strtotime($last_ruleset_download);
- /* is there a newer ruleset available? */
- if($date1ts > $date2ts or !$last_ruleset_download)
- echo "<tr><td colspan='2'>Press <a href='snort_download_rules.php?start=yes'>here</a> to start download.</td></tr>";
- else
- echo "<tr><td colspan='2'>Your snort rulesets are <b>up to date</b>.</td></tr>";
+ if(!$oinkid) {
+ echo "<tr><td colspan='2'>You must obtain an oinkid from snort.com and set its value in the Snort settings tab in order to start the download process.</td></tr>";
+ } else {
+ /* get time stamps for comparison operations */
+ $date1ts = strtotime($last_ruleset_download);
+ $date2ts = strtotime($last_ruleset_download);
+ /* is there a newer ruleset available? */
+ if($date1ts > $date2ts or !$last_ruleset_download)
+ echo "<tr><td colspan='2'>Press <a href='snort_download_rules.php?start=yes'>here</a> to start download.</td></tr>";
+ else
+ echo "<tr><td colspan='2'>Your snort rulesets are <b>up to date</b>.</td></tr>";
+ }
echo "</td>";
echo " </tr>";
echo " </table>";
@@ -133,10 +141,6 @@ include("head.inc");
<?php include("fend.inc"); ?>
<?php
-/* define oinkid */
-if($config['installedpackages']['snort'])
- $oinkid = $config['installedpackages']['snort']['config'][0]['oinkmastercode'];
-
if(!$oinkid) {
$static_output = gettext("You must obtain an oinkid from snort.com and set its value in the Snort settings tab.");
update_all_status($static_output);