示例#1
0
        task($connection, $settings, 'install', $time);
    } else {
        $Message = 'Could not setup the MySQL Database.';
    }
} else {
    if ($Process == 'clean') {
        require_once $settings['functions'] . 'function.task.clean.php';
        if (task_clean($connection, $settings, $time)) {
            $Message = 'The peers list has been cleaned.';
        } else {
            $Message = 'Could not clean the peers list.';
        }
    } else {
        if ($Process == 'optimize') {
            require_once $settings['functions'] . 'function.task.optimize.php';
            if (task_optimize($connection, $settings, $time)) {
                $Message = 'Your MySQL Tracker Database has been optimized.';
            } else {
                $Message = 'Could not optimize the MySQL Database.';
            }
        }
    }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<title>Phoenix Diagnostics and Utilities</title>
	<meta charset="UTF-8">
	<script src="https://cdn.jsdelivr.net/g/jquery"></script>
	<script>
<?php

require_once $settings['functions'] . 'function.task.optimize.php';
$result = task_optimize($connection, $settings, $time);
////	WARNING
// This test doesn't clean up after itself
// as the only way to test it is to actually
// run a clean on the tracker.
if (!$result) {
    echo 'Error: Test for Function "task_optimize" failed.' . PHP_EOL;
    $failure = true;
}