Index: /freepbx/branches/2.4/upgrades/2.4.0beta2/tables.php =================================================================== --- /freepbx/branches/2.4/upgrades/2.4.0beta2/tables.php (revision 5526) +++ /freepbx/branches/2.4/upgrades/2.4.0beta2/tables.php (revision 5526) @@ -0,0 +1,12 @@ +query($sql); +if(DB::IsError($results)) { + out("ERROR: failed to convert table ".$results->getMessage()); +} else { + out("OK"); +} + +?> Index: /freepbx/branches/2.4/upgrades/2.4.0beta2/core_migrate.php =================================================================== --- /freepbx/branches/2.4/upgrades/2.4.0beta2/core_migrate.php (revision 5526) +++ /freepbx/branches/2.4/upgrades/2.4.0beta2/core_migrate.php (revision 5526) @@ -0,0 +1,56 @@ + $files) { + + out("Renaming core files in: ".$index_arr[$dir_index]); + foreach ($files as $file_item) { + + $file = $index_arr[$dir_index]."/".$file_item; + $count=0; + $max_count=1000; + + if (is_file($file) & !is_link($file)) { + while (is_file($file.".".$count)) { + debug($file.".".$count." already in use, trying again"); + $count++; + if ($count > $max_count) { + debug($file_item.": (ERROR - unable to find name"); + break; + } + } + if ($count > $max_count || !rename($file,$file.".".$count)) { + fatal($file.": Unable to rename and remove this file, proper functioning will be inhibitted"); + } else { + out("\t".$file_item."..OK"); + } + } else { + out("\t".$file_item."..(no action needed)"); + } + } + out("Finished processing core files from: ".$index_arr[$dir_index]); +} + +?>