diff --git a/lib/upgrades/UpgradeFunctions.inc.php b/lib/upgrades/UpgradeFunctions.inc.php index 90bff80..947eb8b 100644 --- a/lib/upgrades/UpgradeFunctions.inc.php +++ b/lib/upgrades/UpgradeFunctions.inc.php @@ -1,6 +1,6 @@ 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', 'updateServerConfigSettings','removeOldFilesAndFolders354','removeOldFilesAndFolders354a') + '3.5.4' => array('createIndexes', 'updateServerConfigSettings','removeOldFilesAndFolders354','removeOldFilesAndFolders354a','removeOldFilesAndFolders354a1') ); var $descriptions = array( @@ -99,6 +102,7 @@ class UpgradeFunctions { 'addAutoIncrementToTables' => 'Update all current db tables to use auto_increment.', 'removeOldFilesAndFolders354' => 'Remove old files and folders that are no longer needed.', 'removeOldFilesAndFolders354a' => 'Remove old files and folders that are no longer needed.', + 'removeOldFilesAndFolders354a1' => 'Remove old files and folders that are no longer needed.', 'addAutoIncrementToTables2' => 'Update all new db tables to use auto_increment.', 'updateServerConfigSettings' => 'Update the configuration settings for the server with the correct port' ); @@ -1390,6 +1394,35 @@ class UpgradeFunctions { return true; } + // {{{ removeOldFilesAndFolders354a1 + function removeOldFilesAndFolders354a1() { + global $default; + + $oldFile1 = KT_DIR . "/baobab/tests/BaobabServer.test.php matches" + if(file_exists($oldFile1)) unlink($oldFile1); + + $oldPath1 = KT_DIR . "/ktwsapi/" + UpgradeFunctions::rm_recursive($oldPath1); + + $oldFile2 = KT_DIR . "/lib/Log.inc" + if(file_exists($oldFile2)) unlink($oldFile2); + + $oldFile3 = KT_DIR . "/tests/api/authentication.php" + if(file_exists($oldFile3)) unlink($oldFile3); + + $oldFile4 = KT_DIR . "/tests/api/folder.php" + if(file_exists($oldFile4)) unlink($oldFile4); + + $oldFile5 = KT_DIR . "/tests/api/document.php" + if(file_exists($oldFile5)) unlink($oldFile5); + + $oldPath2 = KT_DIR . "/thirdparty/pear/HTTP/WebDAV/" + UpgradeFunctions::rm_recursive($oldPath2); + + // FIXME: We should check that they all worked + return true; + } + function updateServerConfigSettings() { global $default; $port = $_SERVER['SERVER_PORT']+0; diff --git a/sql/mysql/install/data.sql b/sql/mysql/install/data.sql index 9576f60..8170300 100644 --- a/sql/mysql/install/data.sql +++ b/sql/mysql/install/data.sql @@ -1743,8 +1743,10 @@ INSERT INTO `upgrades` VALUES (211,'func*3.5.4*0*removeOldFilesAndFolders354','Remove old files and folders that are no longer needed.','2008-10-01 00:00:00',1,'upgrade*3.5.4*99*upgrade3.5.4'), (212,'func*3.5.4*0*updateServerConfigSettings','Update the configuration settings for the server with the correct port','2008-11-25 00:00:00',1,'upgrade*3.5.4*99*upgrade3.5.4'), (213,'upgrade*3.5.4*99*upgrade3.5.4','Upgrade from version 3.5.3 to 3.5.4','2008-10-01 00:00:00',1,'upgrade*3.5.4*99*upgrade3.5.4'), -(214,'upgrade*3.5.4a*99*upgrade3.5.4a','Upgrade from version 3.5.4 to 3.5.4a','2008-12-01 00:00:00',1,'upgrade*3.5.4a*99*upgrade3.5.4a'), -(215,'upgrade*3.5.5*99*upgrade3.5.5','Upgrade from version 3.5.4a to 3.5.5','2009-01-01 00:00:00',1,'upgrade*3.5.5*99*upgrade3.5.5'); +(214,'func*3.5.4a*0*removeOldFilesAndFolders354a','Remove old files and folders that are no longer needed.','2008-10-01 00:00:00',1,'upgrade*3.5.4a*99*upgrade3.5.4a'), +(215,'func*3.5.4a*0*removeOldFilesAndFolders354a1','Remove old files and folders that are no longer needed.','2008-10-01 00:00:00',1,'upgrade*3.5.4a*99*upgrade3.5.4a'), +(216,'upgrade*3.5.4a*99*upgrade3.5.4a','Upgrade from version 3.5.4 to 3.5.4a','2008-12-01 00:00:00',1,'upgrade*3.5.4a*99*upgrade3.5.4a'), +(217,'upgrade*3.5.5*99*upgrade3.5.5','Upgrade from version 3.5.4a to 3.5.5','2009-01-01 00:00:00',1,'upgrade*3.5.5*99*upgrade3.5.5'); /*!40000 ALTER TABLE `upgrades` ENABLE KEYS */; UNLOCK TABLES; @@ -2675,7 +2677,7 @@ UNLOCK TABLES; LOCK TABLES `zseq_upgrades` WRITE; /*!40000 ALTER TABLE `zseq_upgrades` DISABLE KEYS */; INSERT INTO `zseq_upgrades` VALUES -(215); +(217); /*!40000 ALTER TABLE `zseq_upgrades` ENABLE KEYS */; UNLOCK TABLES;