X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fsystem_diagnostics.php;h=e1d8961863077e6b74df8a78e7025b11485d0216;hb=bd8f3d60c65d47e9cf86c4cf39bf48b8d3091153;hp=44cd37ce5506dcef34a2fe73832018386f11bb8e;hpb=d23b97ed26bc0608c9ba1037b66058c709e83765;p=fa-stable.git
diff --git a/admin/system_diagnostics.php b/admin/system_diagnostics.php
index 44cd37ce..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");
+ }
+ }
}
}
}
@@ -297,7 +307,7 @@ function tst_extconfig()
}
//-------------------------------------------------------------------------------------------------
-start_table("$table_style width=80%");
+start_table(TABLESTYLE, "width=80%");
$th = array(_("Test"), _('Test type'), _("Value"), _("Comments"));
table_header($th);
@@ -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();
}