diff --git a/install/upgrades/1.0.1.php b/install/upgrades/1.0.1.php index 9946732e..e88222bc 100644 --- a/install/upgrades/1.0.1.php +++ b/install/upgrades/1.0.1.php @@ -7,10 +7,14 @@ if(!function_exists('mysql_connect')) { exit(1); } -// we don't check our AlternC session -if(!chdir("/var/alternc/bureau")) - exit(1); -require("/var/alternc/bureau/class/config_nochk.php"); +// If we upgrade directly to 3.1 the panel directory change +$panel=''; +if(chdir("/usr/share/alternc/panel")) $panel='/usr/share/alternc/panel'; +elseif (chdir("/var/alternc/bureau")) $panel='/var/alternc/bureau'; + +if (empty($panel)) { echo "Problem to load panel library"; exit(1); } + +require("$panel/class/config_nochk.php"); // we go super-admin $admin->enabled=1; @@ -33,4 +37,4 @@ foreach($domains as $v) { $dom->unlock(); -?> \ No newline at end of file +?> diff --git a/install/upgrades/3.0.0~3.php b/install/upgrades/3.0.0~3.php index 22858ea3..709d9782 100644 --- a/install/upgrades/3.0.0~3.php +++ b/install/upgrades/3.0.0~3.php @@ -8,11 +8,14 @@ if(!function_exists('mysql_connect')) { exit(1); } +// If we upgrade directly to 3.1 the panel directory change +$panel=''; +if(chdir("/usr/share/alternc/panel")) $panel='/usr/share/alternc/panel'; +elseif (chdir("/var/alternc/bureau")) $panel='/var/alternc/bureau'; -// we don't check our AlternC session -if(!chdir("/var/alternc/bureau")) -exit(1); -require("/var/alternc/bureau/class/config_nochk.php"); +if (empty($panel)) { echo "Problem to load panel library"; exit(1); } + +require("$panel/class/config_nochk.php"); $db2=new DB_System(); // we go super-admin diff --git a/install/upgrades/3.0.1.php b/install/upgrades/3.0.1.php index 120f555a..a9658f52 100644 --- a/install/upgrades/3.0.1.php +++ b/install/upgrades/3.0.1.php @@ -7,10 +7,14 @@ if(!function_exists('mysql_connect')) { exit(1); } -// we don't check our AlternC session -if(!chdir("/usr/share/alternc/panel")) -exit(1); -require("/usr/share/alternc/panel/class/config_nochk.php"); +// If we upgrade directly to 3.1 the panel directory change +$panel=''; +if(chdir("/usr/share/alternc/panel")) $panel='/usr/share/alternc/panel'; +elseif (chdir("/var/alternc/bureau")) $panel='/var/alternc/bureau'; + +if (empty($panel)) { echo "Problem to load panel library"; exit(1); } + +require("$panel/class/config_nochk.php"); $db2=new DB_System(); // we go super-admin