Commit 4252ce01ae53e35177bdf404ce81d01d9677a9ca

Authored by Kevin Fourie
1 parent 2b4f6c88

KTS-2799

"3.5.2 beta 2 upgrade error"
Updated. Removed re-read plugins from the upgrade.php and added a persistent actions method. This needs to be done properly if it works.

Committed By: Kevin Fourie
Reviewed By: Jonathan Byrne

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7986 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 17 additions and 3 deletions
setup/upgrade.php
... ... @@ -119,8 +119,21 @@ function performAllUpgrades () {
119 119 break;
120 120 }
121 121 }
122   - KTPluginUtil::registerPlugins();
123   - return $res;
  122 +
  123 + return $res;
  124 +}
  125 +
  126 +function performPersistentActions() {
  127 +
  128 + // This is just to test and needs to be updated to a more sane and error resistent architrcture if it works.
  129 + // It should idealy work the same as the upgrades.
  130 +
  131 + // Clean out the plugin_helper table
  132 + $sql = "DELETE FROM plugin_helper";
  133 + $res = DBUtil::runQuery($sql);
  134 +
  135 + return $res;
  136 +
124 137 }
125 138  
126 139 function failWritablePath($name, $path) {
... ... @@ -1051,7 +1064,8 @@ function Upgrade()
1051 1064  
1052 1065 <?php
1053 1066 $res = performAllUpgrades();
1054   - if (PEAR::isError($res))
  1067 + $pres = performPersistentActions();
  1068 + if (PEAR::isError($res) || PEAR::isError($pres))
1055 1069 {
1056 1070 ?>
1057 1071 <font color="red">Upgrade failed.</font>
... ...