remove non-functional repair console

This commit is contained in:
Shish 2012-06-26 22:21:45 +01:00
parent 19ca8b7b9f
commit b85387208e

View File

@ -60,83 +60,7 @@ require_once __SHIMMIE_ROOT__."core/util.inc.php";
require_once __SHIMMIE_ROOT__."core/exceptions.class.php"; require_once __SHIMMIE_ROOT__."core/exceptions.class.php";
require_once __SHIMMIE_ROOT__."core/database.class.php"; require_once __SHIMMIE_ROOT__."core/database.class.php";
if(is_readable("data/config/shimmie.conf.php")) die("Already installed");
// repair console {{{
/*
* This file lets anyone destroy the database -- disable it
* as soon as the admin is done installing for the first time
*/
if(is_readable("data/config/shimmie.conf.php")) {
session_start();
echo '<div id="iblock">';
echo '<h1>Shimmie Repair Console</h1>';
// Load the config
require_once __SHIMMIE_ROOT__."core/sys_config.inc.php";
if(
(array_key_exists('dsn', $_SESSION) && $_SESSION['dsn'] === DATABASE_DSN) ||
(array_key_exists('dsn', $_POST) && $_POST['dsn'] === DATABASE_DSN)
) {
if (array_key_exists('dsn', $_POST) && !empty($_POST['dsn'])) {
$_SESSION['dsn'] = $_POST['dsn'];
}
if(empty($_GET["action"])) {
echo "
<h3>Basic Checks</h3>
If these checks fail, something is broken; if they all pass,
something <i>might</i> be broken, just not checked for...
";
eok("Images writable", is_writable("images"));
eok("Thumbs writable", is_writable("thumbs"));
eok("Data writable", is_writable("data"));
/*
echo "<h3>New Database DSN</h3>";
echo "
<form action='install.php?action=newdsn' method='POST'>
<center>
<table>
<tr><td>Database:</td><td><input type='text' name='new_dsn' size='40'></td></tr>
<tr><td colspan='2'><center><input type='submit' value='Go!'></center></td></tr>
</table>
</center>
</form>
";
*/
echo "
<h3>Log Out</h3>
<form action='install.php?action=logout' method='POST'>
<input type='submit' value='Leave'>
</form>
";
}
else if($_GET["action"] == "logout") {
session_destroy();
echo "<h3>Logged Out</h3><p>You have been logged out.</p><a href='index.php'>Main Shimmie Page</a>";
}
}
else {
echo "
<h3>Login</h3>
<p>Enter the database DSN exactly as in shimmie.conf.php (ie, as originally installed) to access advanced recovery tools:</p>
<form action='install.php' method='POST'>
<center>
<table class='form'>
<tr><th>Database:</th><td><input type='text' name='dsn' size='40'></td></tr>
<tr><td colspan='2'><center><input type='submit' value='Go!'></center></td></tr>
</table>
</center>
</form>
";
}
echo "\t\t</div>";
exit;
}
// }}}
do_install(); do_install();