Commit e2c8241cfc5227866c4e04c9eacc64a08fbc8461
1 parent
34bce63b
Merged in from DEV trunk...
KTS-2560 "Move the scheduler plugin and dashlet into core" Fixed. Moved the scheduler plugin and dashlet into the core. Committed By: Megan Watson Reviewed By: Conrad Vermeulen KTS-2429 "config.ini must be updated during upgrade for new search to work." Updated. Added OS_WINDOWS entries. Committed By: Kevin Fourie Reviewed By: Conrad Vermeulen KTS-673 "The search algorithm needs some work" Updated. Remove the mime type registration. this happens automatically when the indexer is run. Committed By: Conrad Vermeulen Reviewed By: Kevin Fourie KTS-2440 "Adding a folder descendant lookup table for search" Added. Reviewed By: Kevin Fourie Committed By: Conrad Vermeulen KTS-2460 "Allow reindexing of knowledgetree tables" Updated. scheduler has a unique field Committed By: Conrad Vermeulen Reviewed By: Kevin Fourie Merged in from STABLE trunk... KTS-2568 "Add scheduler service to Linux" Added. Committed By: Kevin Fourie Reviewed By: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@7496 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
6 changed files
with
42 additions
and
140 deletions
bin/recreateIndexes.php
| ... | ... | @@ -480,6 +480,8 @@ class IndexRecreator |
| 480 | 480 | $this->addIndex('roles','name','UNIQUE'); |
| 481 | 481 | $this->addIndex('saved_searches','namespace','UNIQUE'); |
| 482 | 482 | |
| 483 | + $this->addIndex('scheduler_tasks','task', 'UNIQUE'); | |
| 484 | + | |
| 483 | 485 | $this->addIndex('system_settings','name', 'UNIQUE'); |
| 484 | 486 | |
| 485 | 487 | $this->addIndex('units_lookup','name' ,'UNIQUE'); | ... | ... |
lib/upgrades/UpgradeFunctions.inc.php
| ... | ... | @@ -55,7 +55,7 @@ class UpgradeFunctions { |
| 55 | 55 | '3.0.3.7' => array('rebuildAllPermissions'), |
| 56 | 56 | '3.1.5' => array('upgradeSavedSearches'), |
| 57 | 57 | '3.1.6.3' => array('cleanupGroupMembership'), |
| 58 | - '3.5.0' => array('cleanupOldKTAdminVersionNotifier', 'registerExtractorMapping', 'updateConfigFile35', 'registerIndexingTasks'), | |
| 58 | + '3.5.0' => array('cleanupOldKTAdminVersionNotifier', 'updateConfigFile35', 'registerIndexingTasks'), | |
| 59 | 59 | ); |
| 60 | 60 | |
| 61 | 61 | var $descriptions = array( |
| ... | ... | @@ -76,7 +76,6 @@ class UpgradeFunctions { |
| 76 | 76 | 'upgradeSavedSearches' => 'Upgrade saved searches to use namespaces instead of integer ids', |
| 77 | 77 | 'cleanupGroupMembership' => 'Cleanup any old references to missing groups, etc.', |
| 78 | 78 | 'cleanupOldKTAdminVersionNotifier' => 'Cleanup any old files from the old KTAdminVersionNotifier', |
| 79 | - 'registerExtractorMapping' => 'Register document text extractors with the appropriate mime types', | |
| 80 | 79 | 'updateConfigFile35' => 'Update the config.ini file for 3.5', |
| 81 | 80 | 'registerIndexingTasks'=>'Register the required indexing background tasks' |
| 82 | 81 | ); |
| ... | ... | @@ -914,14 +913,6 @@ class UpgradeFunctions { |
| 914 | 913 | } |
| 915 | 914 | // }}} |
| 916 | 915 | |
| 917 | - // {{{ registerExtractorMapping | |
| 918 | - function registerExtractorMapping() | |
| 919 | - { | |
| 920 | - $indexer = Indexer::get(); | |
| 921 | - $indexer->registerTypes(); | |
| 922 | - } | |
| 923 | - // }}} | |
| 924 | - | |
| 925 | 916 | // {{{ updateConfigFile35 |
| 926 | 917 | function updateConfigFile35() |
| 927 | 918 | { |
| ... | ... | @@ -938,12 +929,30 @@ class UpgradeFunctions { |
| 938 | 929 | $ini->addItem('webservice', 'validateSessionCount', 'false'); |
| 939 | 930 | |
| 940 | 931 | // externalBinary Section |
| 941 | - $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.'); | |
| 942 | - $ini->addItem('externalBinary', 'pdftotext', 'pdftotext'); | |
| 943 | - $ini->addItem('externalBinary', 'catppt', 'catppt'); | |
| 944 | - $ini->addItem('externalBinary', 'pstotext', 'pstotext'); | |
| 945 | - $ini->addItem('externalBinary', 'catdoc', 'catdoc'); | |
| 946 | - $ini->addItem('externalBinary', 'antiword', 'antiword.exe'); | |
| 932 | + if(OS_WINDOWS){ | |
| 933 | + $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.'); | |
| 934 | + $ini->addItem('externalBinary', 'pdftotext', 'pdftotext'); | |
| 935 | + $ini->addItem('externalBinary', 'catppt', 'catppt'); | |
| 936 | + $ini->addItem('externalBinary', 'pstotext', 'pstotext'); | |
| 937 | + $ini->addItem('externalBinary', 'catdoc', 'catdoc'); | |
| 938 | + $ini->addItem('externalBinary', 'antiword', 'antiword.exe'); | |
| 939 | + $ini->addItem('externalBinary', 'python', 'python.bat'); | |
| 940 | + $ini->addItem('externalBinary', 'java', 'java.exe'); | |
| 941 | + $ini->addItem('externalBinary', 'php', 'php.exe'); | |
| 942 | + $ini->addItem('externalBinary', 'df', 'df.exe'); | |
| 943 | + | |
| 944 | + } else { | |
| 945 | + $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.'); | |
| 946 | + $ini->addItem('externalBinary', 'pdftotext', 'pdftotext'); | |
| 947 | + $ini->addItem('externalBinary', 'catppt', 'catppt'); | |
| 948 | + $ini->addItem('externalBinary', 'pstotext', 'pstotext'); | |
| 949 | + $ini->addItem('externalBinary', 'catdoc', 'catdoc'); | |
| 950 | + $ini->addItem('externalBinary', 'antiword', 'antiword.exe'); | |
| 951 | + $ini->addItem('externalBinary', 'python', 'python'); | |
| 952 | + $ini->addItem('externalBinary', 'java', 'java'); | |
| 953 | + $ini->addItem('externalBinary', 'php', 'php'); | |
| 954 | + $ini->addItem('externalBinary', 'df', 'df'); | |
| 955 | + } | |
| 947 | 956 | |
| 948 | 957 | // search Section |
| 949 | 958 | $ini->addItem('search', 'resultsPerPage', 'default', "The number of results per page\r\n; defaults to 25"); |
| ... | ... | @@ -969,7 +978,12 @@ class UpgradeFunctions { |
| 969 | 978 | $ini->addItem('builtinauth', 'password_change_interval', '30', "This would force users that use the built-in authentication provider\r\n; to have to change their passwords every 30 days." ,"This is configuration for the built-in authentication provider"); |
| 970 | 979 | |
| 971 | 980 | // cache Section |
| 972 | - $ini->addItem('cache', 'cacheEnabled', 'true', '', "Enable/disable the cache and set the cache location"); | |
| 981 | + if(OS_WINDOWS){ | |
| 982 | + $ini->addItem('cache', 'cacheEnabled', 'false', '', "Enable/disable the cache and set the cache location"); | |
| 983 | + } else { | |
| 984 | + $ini->addItem('cache', 'cacheEnabled', 'true', '', "Enable/disable the cache and set the cache location"); | |
| 985 | + } | |
| 986 | + | |
| 973 | 987 | $ini->addItem('cache', 'cacheDirectory', '${varDirectory}/cache'); |
| 974 | 988 | $ini->addItem('cache', 'cachePlugins', 'true'); |
| 975 | 989 | |
| ... | ... | @@ -988,7 +1002,7 @@ class UpgradeFunctions { |
| 988 | 1002 | // clientToolPolicies Section |
| 989 | 1003 | $ini->addItem('clientToolPolicies', 'explorerMetadataCapture', 'true', "These two settings control whether or not the client is prompted for metadata when a\r\n;document is added to knowledgetree via KTtools. They default to true."); |
| 990 | 1004 | $ini->addItem('clientToolPolicies', 'officeMetadataCapture', 'true'); |
| 991 | - | |
| 1005 | + | |
| 992 | 1006 | // DiskUsage Section |
| 993 | 1007 | $ini->addItem('DiskUsage', 'warningThreshold', '10', "When free space in a mount point is less than this percentage,\r\n; the disk usage dashlet will highlight the mount in ORANGE", "settings for the Disk Usage dashlet"); |
| 994 | 1008 | $ini->addItem('DiskUsage', 'urgentThreshold', '5', "When free space in a mount point is less than this percentage,\r\n; the disk usage dashlet will highlight the mount in RED"); | ... | ... |
plugins/ktcore/KTCorePlugin.php
| ... | ... | @@ -109,10 +109,12 @@ class KTCorePlugin extends KTPlugin { |
| 109 | 109 | $this->registerDashlet('LuceneMigrationDashlet', 'ktcore.dashlet.lucene_migration', KT_DIR . '/plugins/search2/MigrationDashlet.php'); |
| 110 | 110 | $this->registerDashlet('IndexingStatusDashlet', 'ktcore.dashlet.indexing_status', KT_DIR . '/plugins/search2/IndexingStatusDashlet.php'); |
| 111 | 111 | $this->registerDashlet('LuceneStatisticsDashlet', 'ktcore.dashlet.indexing_statss', KT_DIR . '/plugins/search2/LuceneStatisticsDashlet.php'); |
| 112 | - | |
| 112 | + $this->registerDashlet('schedulerDashlet', 'ktcore.schedulerdashlet.plugin', 'scheduler/schedulerDashlet.php'); | |
| 113 | + | |
| 114 | + $this->registerAdminPage('scheduler', 'manageSchedulerDispatcher', 'misc', _kt('Manage Task Scheduler'), _kt('Manage the task scheduler'), 'scheduler/taskScheduler.php'); | |
| 113 | 115 | $this->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', _kt('Authentication'), sprintf(_kt('By default, %s controls its own users and groups and stores all information about them inside the database. In many situations, an organisation will already have a list of users and groups, and needs to use that existing information to allow access to the DMS. These <strong>Authentication Sources</strong> allow the system administrator to specify additional sources of authentication data.'), APP_NAME), 'authentication/authenticationadminpage.inc.php'); |
| 114 | 116 | |
| 115 | - $this->registerPortlet(array('browse', 'dashboard'), | |
| 117 | + $this->registerPortlet(array('browse', 'dashboard'), | |
| 116 | 118 | 'Search2Portlet', 'ktcore.search2.portlet', |
| 117 | 119 | KT_DIR . '/plugins/search2/Search2Portlet.php'); |
| 118 | 120 | ... | ... |
plugins/ktcore/scheduler/KTSchedulerPlugin.php deleted
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * $Id:$ | |
| 4 | - * | |
| 5 | - * KnowledgeTree Open Source Edition | |
| 6 | - * Document Management Made Simple | |
| 7 | - * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited | |
| 8 | - * | |
| 9 | - * This program is free software; you can redistribute it and/or modify it under | |
| 10 | - * the terms of the GNU General Public License version 3 as published by the | |
| 11 | - * Free Software Foundation. | |
| 12 | - * | |
| 13 | - * This program is distributed in the hope that it will be useful, but WITHOUT | |
| 14 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
| 15 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
| 16 | - * details. | |
| 17 | - * | |
| 18 | - * You should have received a copy of the GNU General Public License | |
| 19 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 20 | - * | |
| 21 | - * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, | |
| 22 | - * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. | |
| 23 | - * | |
| 24 | - * The interactive user interfaces in modified source and object code versions | |
| 25 | - * of this program must display Appropriate Legal Notices, as required under | |
| 26 | - * Section 5 of the GNU General Public License version 3. | |
| 27 | - * | |
| 28 | - * In accordance with Section 7(b) of the GNU General Public License version 3, | |
| 29 | - * these Appropriate Legal Notices must retain the display of the "Powered by | |
| 30 | - * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | |
| 32 | - * must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | - * copyright notice. | |
| 34 | - * Contributor( s): ______________________________________ | |
| 35 | - * | |
| 36 | - */ | |
| 37 | - | |
| 38 | -require_once(KT_LIB_DIR . "/plugins/plugin.inc.php"); | |
| 39 | -require_once(KT_LIB_DIR . "/plugins/pluginregistry.inc.php"); | |
| 40 | - | |
| 41 | - class KTSchedulerPlugin extends KTPlugin | |
| 42 | - { | |
| 43 | - var $sNamespace = 'ktcore.scheduler.plugin'; | |
| 44 | - | |
| 45 | - function KTSchedulerPlugin($sFilename = null) { | |
| 46 | - $res = parent::KTPlugin($sFilename); | |
| 47 | - $this->sFriendlyName = _kt('Task Scheduler Plugin'); | |
| 48 | - return $res; | |
| 49 | - } | |
| 50 | - | |
| 51 | - function setup() { | |
| 52 | - $this->registerAdminPage('scheduler', 'manageSchedulerDispatcher', 'misc', _kt('Manage Task Scheduler'), _kt('Manage the task scheduler'), 'taskScheduler.php'); | |
| 53 | - } | |
| 54 | - } | |
| 55 | - | |
| 56 | -$oPluginRegistry =& KTPluginRegistry::getSingleton(); | |
| 57 | -$oPluginRegistry->registerPlugin('KTSchedulerPlugin', 'ktcore.scheduler.plugin', __FILE__); | |
| 58 | -?> |
plugins/ktcore/scheduler/schedulerDashletPlugin.php deleted
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * $Id: | |
| 4 | - * | |
| 5 | - * KnowledgeTree Open Source Edition | |
| 6 | - * Document Management Made Simple | |
| 7 | - * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited | |
| 8 | - * | |
| 9 | - * This program is free software; you can redistribute it and/or modify it under | |
| 10 | - * the terms of the GNU General Public License version 3 as published by the | |
| 11 | - * Free Software Foundation. | |
| 12 | - * | |
| 13 | - * This program is distributed in the hope that it will be useful, but WITHOUT | |
| 14 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
| 15 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
| 16 | - * details. | |
| 17 | - * | |
| 18 | - * You should have received a copy of the GNU General Public License | |
| 19 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 20 | - * | |
| 21 | - * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, | |
| 22 | - * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. | |
| 23 | - * | |
| 24 | - * The interactive user interfaces in modified source and object code versions | |
| 25 | - * of this program must display Appropriate Legal Notices, as required under | |
| 26 | - * Section 5 of the GNU General Public License version 3. | |
| 27 | - * | |
| 28 | - * In accordance with Section 7(b) of the GNU General Public License version 3, | |
| 29 | - * these Appropriate Legal Notices must retain the display of the "Powered by | |
| 30 | - * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | |
| 32 | - * must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | - * copyright notice. | |
| 34 | - * Contributor( s): ______________________________________ | |
| 35 | - * | |
| 36 | - */ | |
| 37 | - | |
| 38 | -require_once(KT_LIB_DIR . '/plugins/plugin.inc.php'); | |
| 39 | -require_once(KT_LIB_DIR . '/plugins/pluginregistry.inc.php'); | |
| 40 | - | |
| 41 | -class schedulerDashletPlugin extends KTPlugin { | |
| 42 | - var $sNamespace = "ktcore.schedulerdashlet.plugin"; | |
| 43 | - | |
| 44 | - function schedulerDashletPlugin($sFilename = null) { | |
| 45 | - $res = parent::KTPlugin($sFilename); | |
| 46 | - $this->sFriendlyName = _kt('Scheduler Dashlet Plugin'); | |
| 47 | - return $res; | |
| 48 | - } | |
| 49 | - | |
| 50 | - function setup() { | |
| 51 | - $this->registerDashlet('schedulerDashlet', 'ktcore.schedulerdashlet.plugin', 'schedulerDashlet.php'); | |
| 52 | - | |
| 53 | - require_once(KT_LIB_DIR . "/templating/templating.inc.php"); | |
| 54 | - $oTemplating =& KTTemplating::getSingleton(); | |
| 55 | - $oTemplating->addLocation('schedulerDashlet', '/templates/ktcore/dashlets'); | |
| 56 | - } | |
| 57 | -} | |
| 58 | - | |
| 59 | -$oPluginRegistry =& KTPluginRegistry::getSingleton(); | |
| 60 | -$oPluginRegistry->registerPlugin('schedulerDashletPlugin', 'ktcore.schedulerdashlet.plugin', __FILE__); | |
| 61 | -?> |
sql/mysql/upgrade/3.5.0/folder_descendants.sql
| ... | ... | @@ -3,4 +3,7 @@ CREATE TABLE `folder_descendants` |
| 3 | 3 | `parent_id` int(11) NOT NULL, |
| 4 | 4 | `folder_id` int(11) NOT NULL, |
| 5 | 5 | primary key (parent_id,folder_id) |
| 6 | -) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
| 7 | 6 | \ No newline at end of file |
| 7 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
| 8 | + | |
| 9 | +alter table folder_descendants add foreign key(parent_id) references folders(id); | |
| 10 | +alter table folder_descendants add foreign key(folder_id) references folders(id); | |
| 8 | 11 | \ No newline at end of file | ... | ... |