Index: trunk/admin/install/upgrade_errors.php =================================================================== diff -u -N -r2569 -r7391 --- trunk/admin/install/upgrade_errors.php (.../upgrade_errors.php) (revision 2569) +++ trunk/admin/install/upgrade_errors.php (.../upgrade_errors.php) (revision 7391) @@ -1,103 +1,35 @@ $section) - { - foreach($section as $key => $value) - { - $key = "g_".str_replace('-', '', $key); - global $$key; - $$key = $value; - } - } +$ini_file = $pathtoroot.'config.php'; +if (file_exists($ini_file)) { + $write_access = is_writable($ini_file); + $ini_vars = inst_parse_portal_ini($ini_file,TRUE); + foreach ($ini_vars as $secname => $section) { + foreach ($section as $key => $value) { + $key = "g_".str_replace('-', '', $key); + global $$key; + $$key = $value; + } + } } + $module_path = $pathtoroot.$mod_name.'/admin/install/'; $ado =&inst_GetADODBConnection(); $sql = 'SELECT Version FROM '.$g_TablePrefix.'Modules WHERE Name="'.addslashes($_GET['module']).'" ORDER BY LoadOrder'; @@ -115,10 +47,9 @@ $dir_name = $pathtoroot.$p."/admin";///install/upgrades/"; -$newver=GetMaxPortalVersion($dir_name); +$newver = GetMaxPortalVersion($dir_name); -if($mod_ver!=$newver) -{ +if ($mod_ver != $newver) { $dir_name = $pathtoroot.$p."/admin/install/upgrades/"; $dir = @dir($dir_name); @@ -143,7 +74,7 @@ $file_tmp = str_replace("inportal_check_v", "", $file); $file_tmp = str_replace(".php", "", $file_tmp); - if (ConvertVersion($file_tmp) > ConvertVersion($current_version)) { + if (ConvertVersion($file_tmp) > ConvertVersion($mod_ver)) { $filename = $pathtoroot.$mod_name."/admin/install/upgrades/$file"; if(file_exists($filename)) { @@ -155,11 +86,6 @@ } -function print_pre($s) -{ - echo '
'.print_r($s, true).'
'; -} - ?>