X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fsystem_diagnostics.php;h=e1d8961863077e6b74df8a78e7025b11485d0216;hb=bd8f3d60c65d47e9cf86c4cf39bf48b8d3091153;hp=4e554290ac67fcdd89e0f63ac18c300f2d30a2f1;hpb=d9b4de9d7e9d3ba77f6ece752fd6cc988effd8f1;p=fa-stable.git
diff --git a/admin/system_diagnostics.php b/admin/system_diagnostics.php
index 4e554290..e1d89618 100644
--- a/admin/system_diagnostics.php
+++ b/admin/system_diagnostics.php
@@ -114,7 +114,7 @@ function tst_debug()
$test['type'] = 0;
$test['test'] = $go_debug ? _("Yes") : _("No");
$test['result'] = $go_debug != 0;
- $test['comments'] = _('To switch debugging on set $go_debug=1 in config.php file');
+ $test['comments'] = _('To switch debugging on set $go_debug>1 in config.php file');
return $test;
}
@@ -190,6 +190,16 @@ function tst_subdirs()
if (!is_dir($spath) || !is_writable($spath) ) {
$test['result'] = false;
$test['comments'][] = sprintf(_("'%s' is not writeable"), $spath);
+ } else {
+ $dir = opendir($spath);
+ while (false !== ($fname = readdir($dir))) {
+ // check only *.js files. Manually installed package can contain other
+ // non-writable files which are non-crucial for normal operations
+ if (preg_match('/.*(\.js)/', $fname) && !is_writable("$spath/$fname")) {
+ $test['result'] = false;
+ $test['comments'][] = sprintf(_("'%s' is not writeable"), "$spath/$fname");
+ }
+ }
}
}
}
@@ -316,7 +326,11 @@ foreach ($system_tests as $test)
$comm = is_array(@$result['comments']) ? implode('
', $result['comments'])
: @$result['comments'];
- label_cell($result['result'] ? _('Ok') : ''.$comm.'');
+ $color = ($result['result'] ? 'green':
+ ($result['type']==3 ? 'red' :
+ ($result['type']==2 ? 'orange' : 'green')));
+ label_cell("".
+ ($result['result'] ? _('Ok') : ''.$comm.'').'');
end_row();
}