Index: trunk/admin/install/install_lib.php =================================================================== diff -u -r89 -r105 --- trunk/admin/install/install_lib.php (.../install_lib.php) (revision 89) +++ trunk/admin/install/install_lib.php (.../install_lib.php) (revision 105) @@ -13,6 +13,27 @@ return true; } +function GetMaxPortalVersion($admindirname) +{ + $dir = @dir($admindirname.'/install/upgrades'); + + $version = ''; + while ($file = $dir->read()) { + if ($file != "." && $file != ".." && !is_dir($dir_name.$file)) + { + $file = str_replace("inportal_upgrade_v", "", $file); + $file = str_replace(".sql", "", $file); + + if ($file != '') { + if (str_replace('.', '', $file) > str_replace('.', '', $version)) { + $version = $file; + } + } + } + } + + return $version; +} function TableExists($ado, $tables) { @@ -286,6 +307,8 @@ { global $path,$admin; + $data = Array(); + if(!strlen($file)) { $f = $path.$admin."/include/inportal.dat"; @@ -295,7 +318,8 @@ if(file_exists($f)) { $contents = file($f); - $data = base64_decode($contents[1]); + $data[0] = base64_decode($contents[1]); + $data[1] = $contents[2]; } else if($LoadRemote)