Commit fad95b6357f41723e3e48339fbb5804b5182ee83
1 parent
5cbc27ff
OEM-193 - "Unable to connect to the Pinnacle Server with Pinnacle Tools"
Fixed. Obsolete files are now removed during upgrade. NOTE: This issue also effects non-OEM builds. Committed By: Kevin Fourie Reviewed By: Megan Watson git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9702 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
41 additions
and
6 deletions
lib/upgrades/UpgradeFunctions.inc.php
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * $Id$ | |
| 3 | + * Implements the functions run during upgrades | |
| 4 | 4 | * |
| 5 | 5 | * KnowledgeTree Community Edition |
| 6 | 6 | * Document Management Made Simple |
| ... | ... | @@ -32,8 +32,11 @@ |
| 32 | 32 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices |
| 33 | 33 | * must display the words "Powered by KnowledgeTree" and retain the original |
| 34 | 34 | * copyright notice. |
| 35 | - * Contributor( s): ______________________________________ | |
| 36 | 35 | * |
| 36 | + * @copyright 2008-2009, KnowledgeTree Inc. | |
| 37 | + * @license GNU General Public License version 3 | |
| 38 | + * @author KnowledgeTree Team | |
| 39 | + * @package KnowledgeTree | |
| 37 | 40 | */ |
| 38 | 41 | |
| 39 | 42 | //debugger_start_debug(); |
| ... | ... | @@ -62,7 +65,7 @@ class UpgradeFunctions { |
| 62 | 65 | '3.5.0' => array('cleanupOldKTAdminVersionNotifier', 'updateConfigFile35', 'registerIndexingTasks'), |
| 63 | 66 | '3.5.2' => array('setStorageEngine','dropForeignKeys','dropPrimaryKeys','dropIndexes','createPrimaryKeys','createForeignKeys','createIndexes', 'removeSlashesFromObjects'), |
| 64 | 67 | '3.5.3' => array('moveConfigSettingsToDB','removeAdminVersionNotifier','removeOldSearchPlugins','addAutoIncrementToTables', 'addAutoIncrementToTables2'), |
| 65 | - '3.5.4' => array('createIndexes', 'updateServerConfigSettings','removeOldFilesAndFolders354','removeOldFilesAndFolders354a') | |
| 68 | + '3.5.4' => array('createIndexes', 'updateServerConfigSettings','removeOldFilesAndFolders354','removeOldFilesAndFolders354a','removeOldFilesAndFolders354a1') | |
| 66 | 69 | ); |
| 67 | 70 | |
| 68 | 71 | var $descriptions = array( |
| ... | ... | @@ -99,6 +102,7 @@ class UpgradeFunctions { |
| 99 | 102 | 'addAutoIncrementToTables' => 'Update all current db tables to use auto_increment.', |
| 100 | 103 | 'removeOldFilesAndFolders354' => 'Remove old files and folders that are no longer needed.', |
| 101 | 104 | 'removeOldFilesAndFolders354a' => 'Remove old files and folders that are no longer needed.', |
| 105 | + 'removeOldFilesAndFolders354a1' => 'Remove old files and folders that are no longer needed.', | |
| 102 | 106 | 'addAutoIncrementToTables2' => 'Update all new db tables to use auto_increment.', |
| 103 | 107 | 'updateServerConfigSettings' => 'Update the configuration settings for the server with the correct port' |
| 104 | 108 | ); |
| ... | ... | @@ -1390,6 +1394,35 @@ class UpgradeFunctions { |
| 1390 | 1394 | return true; |
| 1391 | 1395 | } |
| 1392 | 1396 | |
| 1397 | + // {{{ removeOldFilesAndFolders354a1 | |
| 1398 | + function removeOldFilesAndFolders354a1() { | |
| 1399 | + global $default; | |
| 1400 | + | |
| 1401 | + $oldFile1 = KT_DIR . "/baobab/tests/BaobabServer.test.php matches" | |
| 1402 | + if(file_exists($oldFile1)) unlink($oldFile1); | |
| 1403 | + | |
| 1404 | + $oldPath1 = KT_DIR . "/ktwsapi/" | |
| 1405 | + UpgradeFunctions::rm_recursive($oldPath1); | |
| 1406 | + | |
| 1407 | + $oldFile2 = KT_DIR . "/lib/Log.inc" | |
| 1408 | + if(file_exists($oldFile2)) unlink($oldFile2); | |
| 1409 | + | |
| 1410 | + $oldFile3 = KT_DIR . "/tests/api/authentication.php" | |
| 1411 | + if(file_exists($oldFile3)) unlink($oldFile3); | |
| 1412 | + | |
| 1413 | + $oldFile4 = KT_DIR . "/tests/api/folder.php" | |
| 1414 | + if(file_exists($oldFile4)) unlink($oldFile4); | |
| 1415 | + | |
| 1416 | + $oldFile5 = KT_DIR . "/tests/api/document.php" | |
| 1417 | + if(file_exists($oldFile5)) unlink($oldFile5); | |
| 1418 | + | |
| 1419 | + $oldPath2 = KT_DIR . "/thirdparty/pear/HTTP/WebDAV/" | |
| 1420 | + UpgradeFunctions::rm_recursive($oldPath2); | |
| 1421 | + | |
| 1422 | + // FIXME: We should check that they all worked | |
| 1423 | + return true; | |
| 1424 | + } | |
| 1425 | + | |
| 1393 | 1426 | function updateServerConfigSettings() { |
| 1394 | 1427 | global $default; |
| 1395 | 1428 | $port = $_SERVER['SERVER_PORT']+0; | ... | ... |
sql/mysql/install/data.sql
| ... | ... | @@ -1743,8 +1743,10 @@ INSERT INTO `upgrades` VALUES |
| 1743 | 1743 | (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'), |
| 1744 | 1744 | (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'), |
| 1745 | 1745 | (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'), |
| 1746 | -(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'), | |
| 1747 | -(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'); | |
| 1746 | +(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'), | |
| 1747 | +(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'), | |
| 1748 | +(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'), | |
| 1749 | +(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'); | |
| 1748 | 1750 | /*!40000 ALTER TABLE `upgrades` ENABLE KEYS */; |
| 1749 | 1751 | UNLOCK TABLES; |
| 1750 | 1752 | |
| ... | ... | @@ -2675,7 +2677,7 @@ UNLOCK TABLES; |
| 2675 | 2677 | LOCK TABLES `zseq_upgrades` WRITE; |
| 2676 | 2678 | /*!40000 ALTER TABLE `zseq_upgrades` DISABLE KEYS */; |
| 2677 | 2679 | INSERT INTO `zseq_upgrades` VALUES |
| 2678 | -(215); | |
| 2680 | +(217); | |
| 2679 | 2681 | /*!40000 ALTER TABLE `zseq_upgrades` ENABLE KEYS */; |
| 2680 | 2682 | UNLOCK TABLES; |
| 2681 | 2683 | ... | ... |