Skip to content

Commit

Permalink
Some fixes for installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
samilliken committed Aug 14, 2023
1 parent 504880b commit 9270dfb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions classes/People.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static function RowToObject($row){
$person->FirstName=$row["FirstName"];
$person->Phone1=$row["Phone1"];
$person->Phone2=$row["Phone2"];
$person->countryCode=$row["countryCode"];
$person->countryCode=@$row["countryCode"];
$person->Email=$row["Email"];
$person->AdminOwnDevices=$row["AdminOwnDevices"];
$person->ReadAccess=$row["ReadAccess"];
Expand Down Expand Up @@ -242,7 +242,9 @@ static function Current(){
$cperson->GetUserRights();
}

$dbh->exec("update fac_People set LastActivity=NOW() where PersonID=".$cperson->PersonID);
if ( intval($cperson->PersonID)>0 ) {
$dbh->exec("update fac_People set LastActivity=NOW() where PersonID=".$cperson->PersonID);
}

return $cperson;
}
Expand Down
8 changes: 4 additions & 4 deletions container-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ function upgrade(){
$config->rebuild();
}
if($version=="23.02"){
error_log("Applying database update from 23.02 to 23.03");
$results[]=applyupdate("db-23.02-to-23.03.sql");
error_log("Applying database update from 23.02 to 23.03");
$results[]=applyupdate("db-23.02-to-23.03.sql");

$config->rebuild();
}
$config->rebuild();
}
}

if($upgrade==true){ //If we're doing an upgrade don't call the rest of the installer.
Expand Down
3 changes: 3 additions & 0 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ function upgrade(){
}
}
print "<p>Anything shown here is just a notice. It is not necessarily an error. We will occasionally have to repeat database modifications that will fail and will show here. <b>This is behavior is to be expected</b>. Take note of any errors displayed in red then press F5 to reload this page until it goes to the configuration screen.</p>";
if ( array_key_exists( "Version", $config->ParameterArray )) {
" <h3>Current Version: ".$config->ParameterArray["Version"]."</h3>";
}
}else{
echo '<meta http-equiv="refresh" content="0; url=index.php">';
}
Expand Down

0 comments on commit 9270dfb

Please sign in to comment.