Skip to content

Commit

Permalink
refs #1700 : bugfix - re-setup does not modify admin user information.
Browse files Browse the repository at this point in the history
 - Table prefix is missing when DBModel is called.
  • Loading branch information
inureyes committed Nov 5, 2014
1 parent 13ac4e8 commit 57ee1d2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
require_once($bf);
}
unset($bootFiles);

if (get_magic_quotes_gpc()) {
foreach ($_GET as $key => $value)
$_GET[$key] = stripslashes($value);
Expand All @@ -41,7 +40,7 @@
$_SERVER['SERVER_PORT'] = $host[1];
}
unset($host);

//$test = DBModel::getInstance();
if(empty($accessInfo)) {
$root = substr($_SERVER['SCRIPT_FILENAME'], 0, strlen($_SERVER['SCRIPT_FILENAME']) - 10);
$path = stripPath(substr($_SERVER['PHP_SELF'], 0, strlen($_SERVER['PHP_SELF']) - 10));
Expand Down Expand Up @@ -1011,7 +1010,6 @@ function_exists
$_POST['blog'] = $result;
}
}

?>
<input type="hidden" name="step" value="<?php echo $step;?>" />
<input type="hidden" name="mode" value="<?php echo $_POST['mode'];?>" />
Expand Down Expand Up @@ -1240,6 +1238,8 @@ function fail($msg) {
}
}
else {
$ctx = Model_Context::getInstance();
$ctx->setProperty('database.prefix',$_POST['dbPrefix']);
$pool = DBModel::getInstance();
$pool->reset('Users');
$pool->setAttribute('loginid',$loginid,true);
Expand Down Expand Up @@ -1270,7 +1270,6 @@ function fail($msg) {
$pool->setQualifier('blogid','equals',1);
$pool->setQualifier('name','equals','timezone',true);
$pool->update();

}
if (!$error) {
POD::unbind();
Expand Down

0 comments on commit 57ee1d2

Please sign in to comment.