[Vtigercrm-commits] [vtiger-commits] r11109 - /vtigercrm/branches/5.0.3/modules/Migration/PatchApply.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue May 29 01:34:10 EDT 2007
Author: richie
Date: Mon May 28 23:34:06 2007
New Revision: 11109
Log:
* Changed the loop variable name which cause recursive include of patch files because previous count i has been changed in the patch files
Modified:
vtigercrm/branches/5.0.3/modules/Migration/PatchApply.php
Modified: vtigercrm/branches/5.0.3/modules/Migration/PatchApply.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Migration/PatchApply.php (original)
+++ vtigercrm/branches/5.0.3/modules/Migration/PatchApply.php Mon May 28 23:34:06 2007
@@ -60,10 +60,10 @@
$_SESSION['adodb_current_object'] = $adb;
-for($i=0;$i<count($temp);$i++)
+for($patch_count=0;$patch_count<count($temp);$patch_count++)
{
//Here we have to include all the files (all db differences for each release will be included)
- $filename = "modules/Migration/DBChanges/".$temp[$i]."_to_".$temp[$i+1].".php";
+ $filename = "modules/Migration/DBChanges/".$temp[$patch_count]."_to_".$temp[$patch_count+1].".php";
$empty_tag = "<tr><td colspan='3'> </td></tr>";
$start_tag = "<tr><td colspan='3'><b><font color='red'> ";
@@ -71,15 +71,15 @@
if(is_file($filename))
{
- echo $empty_tag.$start_tag.$temp[$i]." ==> ".$temp[$i+1]." Database changes -- Starts.".$end_tag;
-
+ echo $empty_tag.$start_tag.$temp[$patch_count]." ==> ".$temp[$patch_count+1]." Database changes -- Starts.".$end_tag;
+
include($filename);//include the file which contains the corresponding db changes
- echo $start_tag.$temp[$i]." ==> ".$temp[$i+1]." Database changes -- Ends.".$end_tag;
+ echo $start_tag.$temp[$patch_count]." ==> ".$temp[$patch_count+1]." Database changes -- Ends.".$end_tag;
}
- elseif(isset($temp[$i+1]))
+ elseif(isset($temp[$patch_count+1]))
{
- echo $empty_tag.$start_tag."There is no Database Changes from ".$temp[$i]." ==> ".$temp[$i+1].$end_tag;
+ echo $empty_tag.$start_tag."There is no Database Changes from ".$temp[$patch_count]." ==> ".$temp[$patch_count+1].$end_tag;
}
else
{
More information about the vtigercrm-commits
mailing list