diff --git a/lib/upgrades/UpgradeFunctions.inc.php b/lib/upgrades/UpgradeFunctions.inc.php index d9f6f78..788953b 100644 --- a/lib/upgrades/UpgradeFunctions.inc.php +++ b/lib/upgrades/UpgradeFunctions.inc.php @@ -62,7 +62,7 @@ class UpgradeFunctions { '3.5.0' => array('cleanupOldKTAdminVersionNotifier', 'updateConfigFile35', 'registerIndexingTasks'), '3.5.2' => array('setStorageEngine','dropForeignKeys','dropPrimaryKeys','dropIndexes','createPrimaryKeys','createForeignKeys','createIndexes', 'removeSlashesFromObjects'), '3.5.3' => array('moveConfigSettingsToDB','removeAdminVersionNotifier','removeOldSearchPlugins','addAutoIncrementToTables', 'addAutoIncrementToTables2'), - '3.5.4' => array('createIndexes') + '3.5.4' => array('createIndexes','removeOldFilesAndFolders354') ); var $descriptions = array( @@ -1363,6 +1363,20 @@ class UpgradeFunctions { return true; } + // {{{ removeOldFilesAndFolders354 + function removeOldFilesAndFolders354() { + global $default; + $oldFile = KT_DIR . "/lib/sanitize.inc"; + if(file_exists($oldFile)) unlink($oldFile); + + // Files MUST be removed before folders and folders MUST be empty + $oldPath1 = KT_DIR . "/plugins/toolsdashlet/"; + UpgradeFunctions::rm_recursive($oldPath1); + + // FIXME: We should check that they all worked + return true; + } + function rm_recursive($filepath) { if (is_dir($filepath) && !is_link($filepath))