diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2011-02-06 23:43:51 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2011-02-06 23:43:51 -0500 |
commit | 104faa07f7dc51f4ef66e323299881c2ffbec0f6 (patch) | |
tree | 9ca466241894faf39d6db9f0093711f05ac6f019 /usr/local/www/index.php | |
parent | ee3f28cc062e3374695c60d4e1a8bdd9390d85da (diff) | |
download | pfsense-104faa07f7dc51f4ef66e323299881c2ffbec0f6.zip pfsense-104faa07f7dc51f4ef66e323299881c2ffbec0f6.tar.gz |
Move routine under includes. Simplify the file skip check
Diffstat (limited to 'usr/local/www/index.php')
-rwxr-xr-x | usr/local/www/index.php | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index b1c2b50..980c87e 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -42,24 +42,6 @@ ##|*MATCH=index.php* ##|-PRIV -$crash = glob("/var/crash/*"); -$x = 0; -if(is_array($crash)) { - foreach($crash as $c) { - if($c == "minfree") - continue; - if($c == ".") - continue; - if($c == "..") - continue; - if($c == "") - continue; - $x++; - } - if($x > 0) - $savemsg = "{$g['product_name']} has detected a crash report. Click <a href='crash_reporter.php'>here</a> for more information."; -} - // Turn off csrf for the dashboard $nocsrf = true; @@ -74,6 +56,21 @@ require_once('functions.inc'); require_once('guiconfig.inc'); require_once('notices.inc'); +// Check to see if we have a crash report +$crash = glob("/var/crash/*"); +$x = 0; +$skip_files = array(".", "..", "minfree", ""); +if(is_array($crash)) { + foreach($crash as $c) { + foreach($skip_files as $sf) + if($sf == $c) + continue; + $x++; + } + if($x > 0) + $savemsg = "{$g['product_name']} has detected a crash report. Click <a href='crash_reporter.php'>here</a> for more information."; +} + ##build list of widgets $directory = "/usr/local/www/widgets/widgets/"; $dirhandle = opendir($directory); |