Commit 4d56e6b8dc1050e51937d2052904d359dc31e65c

Authored by kevin_fourie
1 parent 72809c3a

Merged in from STABLE trunk...

KTS-3596
"Remove old search plugins when upgrading from 3.4.6 to 3.5.3"
Fixed. Corrected return nonsense.

Committed by: Kevin Fourie
Reviewed by: Megan Watson


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.3-Release-Branch@9096 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/upgrades/UpgradeFunctions.inc.php
@@ -1313,14 +1313,18 @@ class UpgradeFunctions { @@ -1313,14 +1313,18 @@ class UpgradeFunctions {
1313 function removeOldSearchPlugins() { 1313 function removeOldSearchPlugins() {
1314 global $default; 1314 global $default;
1315 $oldPath1 = KT_DIR . "/templates/ktstandard/searchdashlet"; 1315 $oldPath1 = KT_DIR . "/templates/ktstandard/searchdashlet";
1316 - if(file_exists($oldPath1)) return rmdir($oldPath1); 1316 + if(file_exists($oldPath1)) rmdir($oldPath1);
1317 $oldPath2 = KT_DIR . "/plugins/generalmetadata"; 1317 $oldPath2 = KT_DIR . "/plugins/generalmetadata";
1318 - if(file_exists($oldPath2)) return rmdir($oldPath2); 1318 + if(file_exists($oldPath2)) rmdir($oldPath2);
1319 1319
1320 $oldFile1 = KT_DIR . "/plugins/ktstandard/SearchDashletPlugin.php"; 1320 $oldFile1 = KT_DIR . "/plugins/ktstandard/SearchDashletPlugin.php";
1321 - if(file_exists($oldFile1)) return unlink($oldFile1); 1321 + if(file_exists($oldFile1)) unlink($oldFile1);
1322 $oldFile2 = KT_DIR . "/plugins/ktstandard/SearchDashlet.php"; 1322 $oldFile2 = KT_DIR . "/plugins/ktstandard/SearchDashlet.php";
1323 - if(file_exists($oldFile2)) return unlink($oldFile2); 1323 + if(file_exists($oldFile2)) unlink($oldFile2);
  1324 +
  1325 + // FIXME: We should check that they all succeded
  1326 + return true;
  1327 +
1324 } 1328 }
1325 // }}} 1329 // }}}
1326 } 1330 }