moved upgrade function from app_defaults
moved upgrade function out to upgrade.php otherwise during initial install all app_defaults get run twice
This commit is contained in:
parent
b5eed9f0ef
commit
efa20fb04b
|
|
@ -1018,10 +1018,6 @@ include "root.php";
|
||||||
$_SESSION['permissions'] = $prep_statementsub->fetchAll(PDO::FETCH_NAMED);
|
$_SESSION['permissions'] = $prep_statementsub->fetchAll(PDO::FETCH_NAMED);
|
||||||
unset($sql, $prep_statementsub);
|
unset($sql, $prep_statementsub);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require_once "resources/classes/schema.php";
|
require_once "resources/classes/schema.php";
|
||||||
global $db, $db_type, $db_name, $db_username, $db_password, $db_host, $db_path, $db_port;
|
global $db, $db_type, $db_name, $db_username, $db_password, $db_host, $db_path, $db_port;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,17 +26,6 @@
|
||||||
|
|
||||||
|
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
//process if the scripts directory exists
|
|
||||||
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
|
|
||||||
//if the resource scripts resource directory does not exist then create it
|
|
||||||
if (!is_dir($_SESSION['switch']['scripts']['dir']."/resources")) {
|
|
||||||
mkdir($_SESSION['switch']['scripts']['dir']."/resources",0755,true);
|
|
||||||
}
|
|
||||||
|
|
||||||
//copy the files and directories from resources/install
|
|
||||||
$obj = new install_switch;
|
|
||||||
$obj->upgrade();
|
|
||||||
}
|
|
||||||
|
|
||||||
//update the software table
|
//update the software table
|
||||||
$sql = "select count(*) as num_rows from v_software ";
|
$sql = "select count(*) as num_rows from v_software ";
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,10 @@
|
||||||
$obj = new schema;
|
$obj = new schema;
|
||||||
echo $obj->schema("text");
|
echo $obj->schema("text");
|
||||||
|
|
||||||
//run all app_defaults.php files
|
//request teh switch to perform upgrade functions
|
||||||
|
$obj = new install_switch;
|
||||||
|
$obj->upgrade();
|
||||||
|
|
||||||
require_once "resources/classes/domains.php";
|
require_once "resources/classes/domains.php";
|
||||||
$domain = new domains;
|
$domain = new domains;
|
||||||
$domain->upgrade();
|
$domain->upgrade();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue