Skip to content

Commit

Permalink
fix update login
Browse files Browse the repository at this point in the history
  • Loading branch information
glynhudson committed Sep 26, 2018
1 parent 8a116d9 commit 412d266
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions Modules/admin/admin_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,6 @@ function admin_controller()
// Allow for special admin session if updatelogin property is set to true in settings.php
// Its important to use this with care and set updatelogin to false or remove from settings
// after the update is complete.
if ($updatelogin===true) {
$route->format = 'html';
if ($route->action == 'db')
{
$applychanges = false;
if (isset($_GET['apply']) && $_GET['apply']==true) $applychanges = true;

require_once "Lib/dbschemasetup.php";
$updates = array(array(
'title'=>"Database schema", 'description'=>"",
'operations'=>db_schema_setup($mysqli,load_db_schema(),$applychanges)
));

return array('content'=>view("Modules/admin/update_view.php", array('applychanges'=>$applychanges, 'updates'=>$updates)));
}
}

if ($session['admin']) {

Expand Down Expand Up @@ -331,6 +315,22 @@ function read_file($file, $lines) {
}
}
}
else if ($updatelogin===true) {
$route->format = 'html';
if ($route->action == 'db')
{
$applychanges = false;
if (isset($_GET['apply']) && $_GET['apply']==true) $applychanges = true;

require_once "Lib/dbschemasetup.php";
$updates = array(array(
'title'=>"Database schema", 'description'=>"",
'operations'=>db_schema_setup($mysqli,load_db_schema(),$applychanges)
));

return array('content'=>view("Modules/admin/update_view.php", array('applychanges'=>$applychanges, 'updates'=>$updates)));
}
}

return array('content'=>$result);
}

0 comments on commit 412d266

Please sign in to comment.