From 1225cbd74dbd72c3c504b0affdfd512acedbccf9 Mon Sep 17 00:00:00 2001 From: kevin_fourie Date: Thu, 17 May 2007 12:49:02 +0000 Subject: [PATCH] KTC-76 "Upgrade fails from 3.3.3 Commercial to 3.3.6 Commercial" Fixed. --- lib/upgrades/UpgradeItems.inc.php | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/lib/upgrades/UpgradeItems.inc.php b/lib/upgrades/UpgradeItems.inc.php index 883f75f..cb4d876 100644 --- a/lib/upgrades/UpgradeItems.inc.php +++ b/lib/upgrades/UpgradeItems.inc.php @@ -161,12 +161,18 @@ class UpgradeItem { } else { $parentid = null; } + $query = "SELECT MAX(id) FROM upgrades"; + $id = DBUtil::getOneResult($query); + if (PEAR::isError($id)) { + return false; + } return DBUtil::autoInsert("upgrades", array( "descriptor" => $this->getDescriptor(), "description" => $this->description, "date_performed" => $this->date, "result" => $result, "parent" => $parentid, + "parent" => $id[1]+1, )); } -- libgit2 0.21.4