Index: trunk/admin/install.php =================================================================== diff -u -N -r2604 -r2618 --- trunk/admin/install.php (.../install.php) (revision 2604) +++ trunk/admin/install.php (.../install.php) (revision 2618) @@ -1106,17 +1106,15 @@ while ($file = $dir->read()) { if ($file != "." && $file != ".." && !is_dir($dir_name.$file)) { - - if (strstr($file, 'inportal_upgrade_v')) { - $file = str_replace("inportal_upgrade_v", "", $file); - $file = str_replace(".sql", "", $file); - if ($p == '') { - $p = 'in-portal'; - } + if( preg_match('/inportal_upgrade_v(.*).(php|sql)$/', $file, $rets) ) + { + if($p == '') $p = 'in-portal'; + $sql = "SELECT Version FROM ".$g_TablePrefix."Modules WHERE Name = '".$p."'"; $rs = $ado->Execute($sql); - if (ConvertVersion($rs->fields['Version']) < ConvertVersion($file)) { + if( ConvertVersion($rs->fields['Version']) < ConvertVersion( $rets[1] ) ) + { $show_upgrade = true; } }