Commit 1225cbd74dbd72c3c504b0affdfd512acedbccf9
1 parent
b4ad1090
KTC-76
"Upgrade fails from 3.3.3 Commercial to 3.3.6 Commercial" Fixed. Reviewed By: Conrad git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.3.7-Release-Branch@6569 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
0 deletions
lib/upgrades/UpgradeItems.inc.php
| @@ -161,12 +161,18 @@ class UpgradeItem { | @@ -161,12 +161,18 @@ class UpgradeItem { | ||
| 161 | } else { | 161 | } else { |
| 162 | $parentid = null; | 162 | $parentid = null; |
| 163 | } | 163 | } |
| 164 | + $query = "SELECT MAX(id) FROM upgrades"; | ||
| 165 | + $id = DBUtil::getOneResult($query); | ||
| 166 | + if (PEAR::isError($id)) { | ||
| 167 | + return false; | ||
| 168 | + } | ||
| 164 | return DBUtil::autoInsert("upgrades", array( | 169 | return DBUtil::autoInsert("upgrades", array( |
| 165 | "descriptor" => $this->getDescriptor(), | 170 | "descriptor" => $this->getDescriptor(), |
| 166 | "description" => $this->description, | 171 | "description" => $this->description, |
| 167 | "date_performed" => $this->date, | 172 | "date_performed" => $this->date, |
| 168 | "result" => $result, | 173 | "result" => $result, |
| 169 | "parent" => $parentid, | 174 | "parent" => $parentid, |
| 175 | + "parent" => $id[1]+1, | ||
| 170 | )); | 176 | )); |
| 171 | } | 177 | } |
| 172 | 178 |