Ejemplo n.º 1
0
 static function updatable()
 {
     return test::framework_working() && test::config_writable() && test::root_path_write_valid() && test::admin_data_writable() && test::directories_updatable();
 }
Ejemplo n.º 2
0
		<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 '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 '&nbsp;&nbsp;&nbsp;&nbsp;If you see no error above, then include was ' . test::ok("successful") . '
	<h3>Initializing framework</h3>';
    BF::init();
    print '&nbsp;&nbsp;&nbsp;&nbsp;If you see no error above, then initialization was ' . test::ok("successful") . '
	<h3>Database connexions</h3>';
    if (count(test::dbconnections()) > 0) {
        print '<table cellspacing="0" cellpadding="5" class="tests"><tr>';
        foreach (test::dbconnections() as $id => $data) {
            $error = false;
            try {
                BF::load_module("database");
                BF::load_module("database." . $data[0]);