diff --git a/config/config.ini b/config/config.ini index 830d60d..3087aff 100644 --- a/config/config.ini +++ b/config/config.ini @@ -139,7 +139,7 @@ dot = dot [i18n] ; Default language for the interface -defaultLanguage = de_DE +defaultLanguage = en ; If your language doesn't have distinguishable words (usually, doesn't ; have a space character), set useLike to true to use a search that can ; deal with this, but which is slower. diff --git a/lib/upgrades/Ini.inc.php b/lib/upgrades/Ini.inc.php index b83c6f9..d95d68e 100644 --- a/lib/upgrades/Ini.inc.php +++ b/lib/upgrades/Ini.inc.php @@ -40,7 +40,7 @@ class Ini { var $lineNum = 0; var $exists = ''; - function Ini($iniFile = '../../../config.ini') { + function Ini($iniFile = '../../config.ini') { $this->iniFile = $iniFile; $this->read($iniFile); } @@ -159,7 +159,7 @@ class Ini { /* // USAGE EXAMPLE -if(file_exists('../../../config.ini')) { +if(file_exists('../../config.ini')) { $ini = new Ini(); $ini->addItem('Section1', 'NewItem1', 'Some Text1', 'Item1 Comment', 'Section1 Comment'); diff --git a/lib/upgrades/UpgradeFunctions.inc.php b/lib/upgrades/UpgradeFunctions.inc.php index 7f7d400..dae5ab8 100644 --- a/lib/upgrades/UpgradeFunctions.inc.php +++ b/lib/upgrades/UpgradeFunctions.inc.php @@ -29,6 +29,8 @@ * */ +require_once(KT_LIB_DIR . '/upgrades/Ini.inc.php'); + class UpgradeFunctions { var $upgrades = array( '2.0.0' => array('setPermissionFolder'), @@ -46,7 +48,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'), + '3.5.0' => array('cleanupOldKTAdminVersionNotifier', 'registerExtractorMapping', 'updateConfigFile35'), ); var $descriptions = array( @@ -67,7 +69,8 @@ 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' + 'registerExtractorMapping' => 'Register document text extractors with the appropriate mime types', + 'updateConfigFile35' => 'Update the config.ini file for 3.5', ); var $phases = array( "setPermissionFolder" => 1, @@ -903,12 +906,83 @@ class UpgradeFunctions { } // }}} + // {{{ registerExtractorMapping function registerExtractorMapping() { $indexer = Indexer::get(); $indexer->registerTypes(); } + // }}} + + // {{{ updateConfigFile35 + function updateConfigFile35() + { + if(file_exists('../../config.ini')) { + + $ini = new Ini(); + + // Webservices Section + $ini->addItem('webservice', 'uploadDirectory', '${varDirectory}/uploads'); + $ini->addItem('webservice', 'downloadUrl', '${rootUrl}/ktwebservice/download.php'); + $ini->addItem('webservice', 'uploadExpiry', '30'); + $ini->addItem('webservice', 'downloadExpiry', '30'); + $ini->addItem('webservice', 'randomKeyText', 'bkdfjhg23yskjdhf2iu'); + $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'); + + // search Section + $ini->addItem('search', 'resultsPerPage', 'default', "The number of results per page\r\n; defaults to 25"); + $ini->addItem('search', 'dateFormat', 'default', "The date format used when making queries using widgets\r\n; defaults to Y-m-d"); + + // indexer Section + $ini->addItem('indexer', 'coreClass', 'JavaXMLRPCLuceneIndexer', "The core indexing class\r\n;coreClass=PHPLuceneIndexer"); + $ini->addItem('indexer', 'batchDocuments', 'default', "The number of documents to be indexed in a cron session\r\n; defaults to 20"); + $ini->addItem('indexer', 'luceneDirectory', '${varDirectory}/indexes', "The location of the lucene indexes"); + + // openoffice Section + $ini->addItem('openoffice', 'host', 'default', "The host on which open office is installed\r\n; defaults to localhost"); + $ini->addItem('openoffice', 'port', 'default', "The port on which open office is listening\r\n; defaults to 8100"); + + // user_prefs Section + $ini->addItem('user_prefs', 'passwordLength', '6', "The minimum password length on password-setting\r\n; could be moved into DB-auth-config"); + $ini->addItem('user_prefs', 'restrictAdminPasswords', 'default', "Apply the minimum password length to admin while creating / editing accounts?\r\n; default is set to \"false\" meaning that admins can create users with shorter passwords."); + $ini->addItem('user_prefs', 'restrictPreferences', 'false', "Restrict users from accessing their preferences menus?"); + + // builtinauth Section + $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"); + $ini->addItem('cache', 'cacheDirectory', '${varDirectory}/cache'); + + // KTWebDAVSettings Section + $ini->addItem('KTWebDAVSettings', 'debug', 'off', '_LOTS_ of debug info will be logged if the following is "on"', 'This section is for KTWebDAV only'); + $ini->addItem('KTWebDAVSettings', 'safemode', 'on', 'To allow write access to WebDAV clients set safe mode to "off" below'); + + // BaobabSettings Section + $ini->addItem('BaobabSettings', 'debug', 'off', '_LOTS_ of debug info will be logged if the following is "on"', 'This section is for Boabab only'); + $ini->addItem('BaobabSettings', 'safemode', 'on', 'To allow write access to WebDAV clients set safe mode to "off" below'); + + // backup Section + $ini->addItem('backup', 'backupDirectory', 'default', "Identify location of kt-backup for database backups\r\n;backupDirectory = c:/kt-backups\r\n;backupDirectory = /tmp/kt-backups"); + $ini->addItem('backup', 'mysqlDirectory', 'default', "Identify the location of the mysql.exe and mysqldump.exe\r\n;mysqlDirectory = c:/program files/ktdms/mysql/bin"); + + // 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'); + + $ini->write(); + } + } + // }}} } ?> diff --git a/search2/indexing/bin/registerTypes.php b/search2/indexing/bin/registerTypes.php index cf4f80b..726f7b3 100644 --- a/search2/indexing/bin/registerTypes.php +++ b/search2/indexing/bin/registerTypes.php @@ -12,21 +12,14 @@ */ session_start(); -print _kt("Registering Extractor mapping to Mime types") . "...\n"; - require_once(realpath('../../../config/dmsDefaults.php')); +print _kt("Registering Extractor mapping to Mime types") . "...\n"; + $config = KTConfig::getSingleton(); $indexer = $config->get('indexer/coreClass'); -if ($indexer != 'PHPLuceneIndexer') -{ - print _kt("This script only works with the PHPLuceneIndexer.") . "\n"; - exit; -} - require_once('indexing/indexerCore.inc.php'); - $clear=false; if ($argc > 0) { diff --git a/templates/ktcore/search2/external_resources.smarty b/templates/ktcore/search2/external_resources.smarty new file mode 100644 index 0000000..48f0576 --- /dev/null +++ b/templates/ktcore/search2/external_resources.smarty @@ -0,0 +1,11 @@ +

{i18n}External Resource Dependency Status{/i18n}

+

+{i18n}The following resources are used by KnowledgeTree and are impacting on the normal operations of the system:{/i18n} + + +{foreach from=$resources item=resource} + + +{/foreach} + +
{i18n}Resource{/i18n}{i18n}Status{/i18n}
{$resource.name}{$resource.status}

{i18n}Refresh{/i18n}
diff --git a/templates/ktcore/search2/indexing_status.smarty b/templates/ktcore/search2/indexing_status.smarty new file mode 100644 index 0000000..3043b29 --- /dev/null +++ b/templates/ktcore/search2/indexing_status.smarty @@ -0,0 +1,40 @@ +{if !empty($indexerDiagnosis)} +{i18n arg_name=$indexerName}The #name# is not functioning correctly. This could be because:{/i18n} +

+{$indexerDiagnosis} +
+{/if} +{if count($extractorDiagnosis) > 0} +
+{i18n}Text Extractor Status{/i18n} +
+{i18n}KnowledgeTree has detected some issues with some of the text extractors used to index document text:{/i18n} +
+ + +{foreach from=$extractorDiagnosis item=diagnosis} + + + + + + + + +{/foreach} +

{$diagnosis.problem}
{i18n}Text extractor(s)s affected:{/i18n}
    + {foreach from=$diagnosis.indexers item=indexer} +
  • {$indexer}
  • + {/foreach} +
+

+{/if} +
+{i18n}Note:{/i18n} {i18n}Indexing will not continue until all issues have been resolved.{/i18n} + + +
Refresh +
diff --git a/templates/ktcore/search2/lucene_migration.smarty b/templates/ktcore/search2/lucene_migration.smarty new file mode 100644 index 0000000..503ce11 --- /dev/null +++ b/templates/ktcore/search2/lucene_migration.smarty @@ -0,0 +1,20 @@ +

+Migration to using the new search requires text to be moved from the database full text indexes into the Lucene indexes. This may take some time depending +on the size of the repository. For this reason, the process is a background task. +

+ + + + + + + + + + + +
Documents processed in a single migration run:20
Frequency at which migration batch task runs:every 5 minutes
Total documents to migrate:1500
Migration process started on:2007-01-10 15:13
Migration process has taken:15 hours 10 minutes
Total documents migrated:1500
Total documents to be migrated:1500
Estimated completion time:2007-01-10 15:13
Estimated migration time remaining:15 hours 10 minutes
+Note: Search results will not be accurate until the migration process is complete. +
This dashlet will disappear when the migration process is complete. + +
\ No newline at end of file diff --git a/templates/ktcore/search2/lucene_statistics.smarty b/templates/ktcore/search2/lucene_statistics.smarty new file mode 100644 index 0000000..8b9f970 --- /dev/null +++ b/templates/ktcore/search2/lucene_statistics.smarty @@ -0,0 +1,26 @@ +

+This dashlet provides some basic statistics on the Lucene index. +

+ + + + + + + + + + + +
Last optimisation date:{$stats.optimisationDate}
Period since last optimisation:{$stats.optimisationPeriod}
Last indexing date:{$stats.indexingDate}
Period since last indexing:{$stats.indexingPeriod}
Total documents in repository:{$stats.docsInRepository}
Documents in index:{$stats.docsInIndex}
Documents in indexing queue:{$stats.docsInQueue}
Indexing coverage:{$stats.indexingCoverage}
Queue coverage:{$stats.queueCoverage}
+Notes:
+ +
*Not all documents contain text. This will explain why the indexing coverage percentage my vary. +
*The queue coverage indicates how many documents are in the queue in relation to the repository size. +{if $stats.noOptimisation} +
*To get the best performance out of Lucene, the indexes must be optimised periodically. This is managed by a background task. +{/if} +
+ + +
Refresh
\ No newline at end of file