From e2c8241cfc5227866c4e04c9eacc64a08fbc8461 Mon Sep 17 00:00:00 2001 From: kevin_fourie Date: Tue, 23 Oct 2007 13:32:28 +0000 Subject: [PATCH] Merged in from DEV trunk... --- bin/recreateIndexes.php | 2 ++ lib/upgrades/UpgradeFunctions.inc.php | 50 ++++++++++++++++++++++++++++++++------------------ plugins/ktcore/KTCorePlugin.php | 6 ++++-- plugins/ktcore/scheduler/KTSchedulerPlugin.php | 58 ---------------------------------------------------------- plugins/ktcore/scheduler/schedulerDashletPlugin.php | 61 ------------------------------------------------------------- sql/mysql/upgrade/3.5.0/folder_descendants.sql | 5 ++++- 6 files changed, 42 insertions(+), 140 deletions(-) delete mode 100644 plugins/ktcore/scheduler/KTSchedulerPlugin.php delete mode 100644 plugins/ktcore/scheduler/schedulerDashletPlugin.php diff --git a/bin/recreateIndexes.php b/bin/recreateIndexes.php index 8c1ed17..f4b8338 100644 --- a/bin/recreateIndexes.php +++ b/bin/recreateIndexes.php @@ -480,6 +480,8 @@ class IndexRecreator $this->addIndex('roles','name','UNIQUE'); $this->addIndex('saved_searches','namespace','UNIQUE'); + $this->addIndex('scheduler_tasks','task', 'UNIQUE'); + $this->addIndex('system_settings','name', 'UNIQUE'); $this->addIndex('units_lookup','name' ,'UNIQUE'); diff --git a/lib/upgrades/UpgradeFunctions.inc.php b/lib/upgrades/UpgradeFunctions.inc.php index 7331778..12ebac6 100644 --- a/lib/upgrades/UpgradeFunctions.inc.php +++ b/lib/upgrades/UpgradeFunctions.inc.php @@ -55,7 +55,7 @@ class UpgradeFunctions { '3.0.3.7' => array('rebuildAllPermissions'), '3.1.5' => array('upgradeSavedSearches'), '3.1.6.3' => array('cleanupGroupMembership'), - '3.5.0' => array('cleanupOldKTAdminVersionNotifier', 'registerExtractorMapping', 'updateConfigFile35', 'registerIndexingTasks'), + '3.5.0' => array('cleanupOldKTAdminVersionNotifier', 'updateConfigFile35', 'registerIndexingTasks'), ); var $descriptions = array( @@ -76,7 +76,6 @@ class UpgradeFunctions { 'upgradeSavedSearches' => 'Upgrade saved searches to use namespaces instead of integer ids', 'cleanupGroupMembership' => 'Cleanup any old references to missing groups, etc.', 'cleanupOldKTAdminVersionNotifier' => 'Cleanup any old files from the old KTAdminVersionNotifier', - 'registerExtractorMapping' => 'Register document text extractors with the appropriate mime types', 'updateConfigFile35' => 'Update the config.ini file for 3.5', 'registerIndexingTasks'=>'Register the required indexing background tasks' ); @@ -914,14 +913,6 @@ class UpgradeFunctions { } // }}} - // {{{ registerExtractorMapping - function registerExtractorMapping() - { - $indexer = Indexer::get(); - $indexer->registerTypes(); - } - // }}} - // {{{ updateConfigFile35 function updateConfigFile35() { @@ -938,12 +929,30 @@ class UpgradeFunctions { $ini->addItem('webservice', 'validateSessionCount', 'false'); // externalBinary Section - $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.'); - $ini->addItem('externalBinary', 'pdftotext', 'pdftotext'); - $ini->addItem('externalBinary', 'catppt', 'catppt'); - $ini->addItem('externalBinary', 'pstotext', 'pstotext'); - $ini->addItem('externalBinary', 'catdoc', 'catdoc'); - $ini->addItem('externalBinary', 'antiword', 'antiword.exe'); + if(OS_WINDOWS){ + $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.'); + $ini->addItem('externalBinary', 'pdftotext', 'pdftotext'); + $ini->addItem('externalBinary', 'catppt', 'catppt'); + $ini->addItem('externalBinary', 'pstotext', 'pstotext'); + $ini->addItem('externalBinary', 'catdoc', 'catdoc'); + $ini->addItem('externalBinary', 'antiword', 'antiword.exe'); + $ini->addItem('externalBinary', 'python', 'python.bat'); + $ini->addItem('externalBinary', 'java', 'java.exe'); + $ini->addItem('externalBinary', 'php', 'php.exe'); + $ini->addItem('externalBinary', 'df', 'df.exe'); + + } else { + $ini->addItem('externalBinary', 'xls2csv', 'xls2csv', '', 'The following are external binaries that may be used by various parts of knowledgeTree.'); + $ini->addItem('externalBinary', 'pdftotext', 'pdftotext'); + $ini->addItem('externalBinary', 'catppt', 'catppt'); + $ini->addItem('externalBinary', 'pstotext', 'pstotext'); + $ini->addItem('externalBinary', 'catdoc', 'catdoc'); + $ini->addItem('externalBinary', 'antiword', 'antiword.exe'); + $ini->addItem('externalBinary', 'python', 'python'); + $ini->addItem('externalBinary', 'java', 'java'); + $ini->addItem('externalBinary', 'php', 'php'); + $ini->addItem('externalBinary', 'df', 'df'); + } // search Section $ini->addItem('search', 'resultsPerPage', 'default', "The number of results per page\r\n; defaults to 25"); @@ -969,7 +978,12 @@ class UpgradeFunctions { $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"); // cache Section - $ini->addItem('cache', 'cacheEnabled', 'true', '', "Enable/disable the cache and set the cache location"); + if(OS_WINDOWS){ + $ini->addItem('cache', 'cacheEnabled', 'false', '', "Enable/disable the cache and set the cache location"); + } else { + $ini->addItem('cache', 'cacheEnabled', 'true', '', "Enable/disable the cache and set the cache location"); + } + $ini->addItem('cache', 'cacheDirectory', '${varDirectory}/cache'); $ini->addItem('cache', 'cachePlugins', 'true'); @@ -988,7 +1002,7 @@ class UpgradeFunctions { // clientToolPolicies Section $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."); $ini->addItem('clientToolPolicies', 'officeMetadataCapture', 'true'); - + // DiskUsage Section $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"); $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"); diff --git a/plugins/ktcore/KTCorePlugin.php b/plugins/ktcore/KTCorePlugin.php index e6b8c8f..4463575 100644 --- a/plugins/ktcore/KTCorePlugin.php +++ b/plugins/ktcore/KTCorePlugin.php @@ -109,10 +109,12 @@ class KTCorePlugin extends KTPlugin { $this->registerDashlet('LuceneMigrationDashlet', 'ktcore.dashlet.lucene_migration', KT_DIR . '/plugins/search2/MigrationDashlet.php'); $this->registerDashlet('IndexingStatusDashlet', 'ktcore.dashlet.indexing_status', KT_DIR . '/plugins/search2/IndexingStatusDashlet.php'); $this->registerDashlet('LuceneStatisticsDashlet', 'ktcore.dashlet.indexing_statss', KT_DIR . '/plugins/search2/LuceneStatisticsDashlet.php'); - + $this->registerDashlet('schedulerDashlet', 'ktcore.schedulerdashlet.plugin', 'scheduler/schedulerDashlet.php'); + + $this->registerAdminPage('scheduler', 'manageSchedulerDispatcher', 'misc', _kt('Manage Task Scheduler'), _kt('Manage the task scheduler'), 'scheduler/taskScheduler.php'); $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 Authentication Sources allow the system administrator to specify additional sources of authentication data.'), APP_NAME), 'authentication/authenticationadminpage.inc.php'); - $this->registerPortlet(array('browse', 'dashboard'), + $this->registerPortlet(array('browse', 'dashboard'), 'Search2Portlet', 'ktcore.search2.portlet', KT_DIR . '/plugins/search2/Search2Portlet.php'); diff --git a/plugins/ktcore/scheduler/KTSchedulerPlugin.php b/plugins/ktcore/scheduler/KTSchedulerPlugin.php deleted file mode 100644 index 84f6a45..0000000 --- a/plugins/ktcore/scheduler/KTSchedulerPlugin.php +++ /dev/null @@ -1,58 +0,0 @@ -. - * - * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, - * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU General Public License version 3. - * - * In accordance with Section 7(b) of the GNU General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. - * Contributor( s): ______________________________________ - * - */ - -require_once(KT_LIB_DIR . "/plugins/plugin.inc.php"); -require_once(KT_LIB_DIR . "/plugins/pluginregistry.inc.php"); - - class KTSchedulerPlugin extends KTPlugin - { - var $sNamespace = 'ktcore.scheduler.plugin'; - - function KTSchedulerPlugin($sFilename = null) { - $res = parent::KTPlugin($sFilename); - $this->sFriendlyName = _kt('Task Scheduler Plugin'); - return $res; - } - - function setup() { - $this->registerAdminPage('scheduler', 'manageSchedulerDispatcher', 'misc', _kt('Manage Task Scheduler'), _kt('Manage the task scheduler'), 'taskScheduler.php'); - } - } - -$oPluginRegistry =& KTPluginRegistry::getSingleton(); -$oPluginRegistry->registerPlugin('KTSchedulerPlugin', 'ktcore.scheduler.plugin', __FILE__); -?> diff --git a/plugins/ktcore/scheduler/schedulerDashletPlugin.php b/plugins/ktcore/scheduler/schedulerDashletPlugin.php deleted file mode 100644 index 44d9707..0000000 --- a/plugins/ktcore/scheduler/schedulerDashletPlugin.php +++ /dev/null @@ -1,61 +0,0 @@ -. - * - * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, - * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU General Public License version 3. - * - * In accordance with Section 7(b) of the GNU General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the - * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original - * copyright notice. - * Contributor( s): ______________________________________ - * - */ - -require_once(KT_LIB_DIR . '/plugins/plugin.inc.php'); -require_once(KT_LIB_DIR . '/plugins/pluginregistry.inc.php'); - -class schedulerDashletPlugin extends KTPlugin { - var $sNamespace = "ktcore.schedulerdashlet.plugin"; - - function schedulerDashletPlugin($sFilename = null) { - $res = parent::KTPlugin($sFilename); - $this->sFriendlyName = _kt('Scheduler Dashlet Plugin'); - return $res; - } - - function setup() { - $this->registerDashlet('schedulerDashlet', 'ktcore.schedulerdashlet.plugin', 'schedulerDashlet.php'); - - require_once(KT_LIB_DIR . "/templating/templating.inc.php"); - $oTemplating =& KTTemplating::getSingleton(); - $oTemplating->addLocation('schedulerDashlet', '/templates/ktcore/dashlets'); - } -} - -$oPluginRegistry =& KTPluginRegistry::getSingleton(); -$oPluginRegistry->registerPlugin('schedulerDashletPlugin', 'ktcore.schedulerdashlet.plugin', __FILE__); -?> diff --git a/sql/mysql/upgrade/3.5.0/folder_descendants.sql b/sql/mysql/upgrade/3.5.0/folder_descendants.sql index dd3e294..4fb4a8d 100644 --- a/sql/mysql/upgrade/3.5.0/folder_descendants.sql +++ b/sql/mysql/upgrade/3.5.0/folder_descendants.sql @@ -3,4 +3,7 @@ CREATE TABLE `folder_descendants` `parent_id` int(11) NOT NULL, `folder_id` int(11) NOT NULL, primary key (parent_id,folder_id) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +alter table folder_descendants add foreign key(parent_id) references folders(id); +alter table folder_descendants add foreign key(folder_id) references folders(id); \ No newline at end of file -- libgit2 0.21.4