summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/index.php33
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);
OpenPOWER on IntegriCloud