Skip to content

Commit

Permalink
Rearranged some of the initial checks for empty databases, now a fres…
Browse files Browse the repository at this point in the history
…h install works with the container.
  • Loading branch information
samilliken committed May 24, 2023
1 parent 747e228 commit 4b82b96
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Config{

function __construct(){
global $dbh;

//Get parameter value pairs from fac_Config
$sql='select Parameter, Value, DefaultVal from fac_Config';
$sth=$dbh->prepare($sql);
Expand Down
11 changes: 9 additions & 2 deletions misc.inc.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?php
/* All functions contained herein will be general use functions */

/* Create a quick reference for datacenter data */
@$_SESSION['datacenters']=DataCenter::GetDCList(true);
$result=$dbh->prepare("SHOW TABLES;");
$result->execute();
if($result->rowCount()==0) {
header("Location: install.php" );
}

/* Generic html sanitization routine */

Expand Down Expand Up @@ -1039,6 +1042,10 @@ function buildnavmenu($ma,&$tl){
# $lmenu[]='<a href="saml/logout.php"><span>'.__("Logout").'</span></a>';
#}


/* Create a quick reference for datacenter data */
@$_SESSION['datacenters']=DataCenter::GetDCList(true);

function download_file($archivo, $downloadfilename = null) {
if (file_exists($archivo)) {
$downloadfilename = $downloadfilename !== null ? $downloadfilename : basename($archivo);
Expand Down

0 comments on commit 4b82b96

Please sign in to comment.