Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit fe9288c

Browse files
committed
ENH: refs #0277. Removed the code that handled $_GET['reset'].
This was attempting to drop the database and recreate it. This would only work if the person installing Midas was using a user that can create databases as the midas user (or their root user doesn't have a password set). Because both of these situations are discouraged in any deployment of the system, I've removed the offending code.
1 parent b12da47 commit fe9288c

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

core/controllers/InstallController.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,8 @@ class InstallController extends AppController
3333
*/
3434
function init()
3535
{
36-
if(isset($_GET['reset']))
37-
{
38-
$db = Zend_Registry::get('dbAdapter');
39-
$table = $db->listTables();
40-
if(empty($table) && file_exists(BASE_PATH."/core/configs/database.local.ini"))
41-
{
42-
unlink(BASE_PATH."/core/configs/database.local.ini");
43-
if(file_exists(BASE_PATH."/core/configs/application.local.ini"))
44-
{
45-
unlink(BASE_PATH."/core/configs/application.local.ini");
46-
}
47-
}
48-
}
49-
if(file_exists(BASE_PATH."/core/configs/database.local.ini") && file_exists(BASE_PATH."/core/configs/application.local.ini"))
36+
if(file_exists(BASE_PATH."/core/configs/database.local.ini") &&
37+
file_exists(BASE_PATH."/core/configs/application.local.ini"))
5038
{
5139
throw new Zend_Exception("Midas is already installed.");
5240
}

0 commit comments

Comments
 (0)