static function directories_updatable() { foreach (test::directories() as $id => $dir) { if (!$dir["updatable"]) { return false; } } return true; }
<h3>Admin console and config file</h3> <table cellspacing="0" cellpadding="5" class="tests"><tr> <td class="title"><b>Valid path to root</b></td><td>' . (test::root_path_valid() ? test::ok("YES") : test::invalid("NO")) . ' (Path: <i>' . PATH_TO_ROOT . '</i>)</td> </tr><tr> <td class="title"><b>Valid path to root for editing</b></td><td>' . (test::root_path_write_valid() ? test::ok("YES") : test::invalid("NO. Update will not work if it is not valid")) . ' (Path: <i>' . PATH_TO_ROOT_WRITE . '</i>)</td> </tr><tr> <td class="title"><b>Config file exists</b></td><td>' . (test::config_exists() ? test::ok("YES") : test::invalid("NO")) . ' (Path: <i>' . CONFIG_FILE . '</i>)</td> </tr><tr> <td class="title"><b>Config file is writable</b> (though edit path)</td><td>' . (test::config_writable() ? test::ok("YES") : test::invalid("NO")) . ' (Path: <i>' . CONFIG_FILE_WRITE . '</i>)</td> </tr><tr> <td class="title"><b>Config is complete</b></td><td>' . (test::config_complete() ? test::ok("YES") : test::invalid("NO. Run configuration again")) . '</td> </tr></table> <h3>Directories</h3> <table cellspacing="0" cellpadding="5" class="tests"><tr>'; foreach (test::directories() as $id => $data) { print ' <tr> <td class="title"><b>Folder: ' . $id . '</b>' . ($data['write_required'] ? ' (Needs to be writable)' : '') . '</td> <td>' . ($data['exists'] ? $data['write_required'] && !$data['writable'] ? test::invalid("Not writable") : test::ok("OK") : test::invalid("NOT FOUND")) . ' (Path: <i>' . $data['path'] . '</i>)</td> <td style="width: 90px; text-align:right;">' . ($data['updatable'] ? test::ok("Updatable") : test::invalid("Not Updatable")) . '</td> </tr>'; } print '</table> <h3>Loading framework</h3>'; if (!test::framework_working()) { print ' There are issues with current server configuration. Read above for more info. You can test framework and database connections once all requirements are fulfilled.'; } else { require get_file("framework", "framework.php")->get_path(); print ' If you see no error above, then include was ' . test::ok("successful") . ' <h3>Initializing framework</h3>';