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 | 161 | } else { |
| 162 | 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 | 169 | return DBUtil::autoInsert("upgrades", array( |
| 165 | 170 | "descriptor" => $this->getDescriptor(), |
| 166 | 171 | "description" => $this->description, |
| 167 | 172 | "date_performed" => $this->date, |
| 168 | 173 | "result" => $result, |
| 169 | 174 | "parent" => $parentid, |
| 175 | + "parent" => $id[1]+1, | |
| 170 | 176 | )); |
| 171 | 177 | } |
| 172 | 178 | ... | ... |