+ } 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");
+ }
+ }