diff --git a/config/config.ini b/config/config.ini
index 3e6283e..fca9ed9 100644
--- a/config/config.ini
+++ b/config/config.ini
@@ -340,6 +340,13 @@ safemode = on
;document is added to knowledgetree via KTtools. They default to true.
explorerMetadataCapture = true
officeMetadataCapture = true
+;These settings govern whether reasons are asked for in KTtools
+captureReasonsDelete = true
+captureReasonsCheckin = true
+captureReasonsCheckout = true
+captureReasonsCancelCheckout = true
+captureReasonsCopyInKT = true
+captureReasonsMoveInKT = true
; settings for the Disk Usage dashlet
[DiskUsage]
diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php
index 301c888..940a916 100644
--- a/config/dmsDefaults.php
+++ b/config/dmsDefaults.php
@@ -496,7 +496,12 @@ class KTInit {
$oKTConfig->setdefaultns('clientToolPolicies', 'explorerMetadataCapture', true);
$oKTConfig->setdefaultns('clientToolPolicies', 'officeMetadataCapture', true);
-
+ $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsDelete', true);
+ $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsCheckin', true);
+ $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsCheckout', true);
+ $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsCancelCheckout', true);
+ $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsCopyInKT', true);
+ $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsMoveInKT', true);
$res = $this->readConfig();
if (PEAR::isError($res)) { return $res; }
diff --git a/ktwebservice/webservice.php b/ktwebservice/webservice.php
index 1ce9f00..9203031 100644
--- a/ktwebservice/webservice.php
+++ b/ktwebservice/webservice.php
@@ -2,7 +2,7 @@
/**
*
- * $Id:$
+ * $Id$
*
* This implements the KnowledgeTree Web Service in SOAP.
*
@@ -3306,6 +3306,36 @@ class KTWebService
'value' => bool2str($config->get('clientToolPolicies/officeMetadataCapture')),
'type' => 'boolean'
),
+ array(
+ 'name' => 'capture_reasons_delete',
+ 'value' => bool2str($config->get('clientToolPolicies/captureReasonsDelete')),
+ 'type' => 'boolean'
+ ),
+ array(
+ 'name' => 'capture_reasons_checkin',
+ 'value' => bool2str($config->get('clientToolPolicies/captureReasonsCheckin')),
+ 'type' => 'boolean'
+ ),
+ array(
+ 'name' => 'capture_reasons_checkout',
+ 'value' => bool2str($config->get('clientToolPolicies/captureReasonsCheckout')),
+ 'type' => 'boolean'
+ ),
+ array(
+ 'name' => 'capture_reasons_cancelcheckout',
+ 'value' => bool2str($config->get('clientToolPolicies/captureReasonsCancelCheckout')),
+ 'type' => 'boolean'
+ ),
+ array(
+ 'name' => 'capture_reasons_copyinkt',
+ 'value' => bool2str($config->get('clientToolPolicies/captureReasonsCopyInKT')),
+ 'type' => 'boolean'
+ ),
+ array(
+ 'name' => 'capture_reasons_moveinkt',
+ 'value' => bool2str($config->get('clientToolPolicies/captureReasonsMoveInKT')),
+ 'type' => 'boolean'
+ ),
);
diff --git a/lib/documentmanagement/observers.inc.php b/lib/documentmanagement/observers.inc.php
index 0be4f18..c9f9f59 100644
--- a/lib/documentmanagement/observers.inc.php
+++ b/lib/documentmanagement/observers.inc.php
@@ -5,32 +5,32 @@
* KnowledgeTree Open Source Edition
* Document Management Made Simple
* Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
- *
+ *
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
- *
+ *
* 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
+ * 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.
+ * must display the words "Powered by KnowledgeTree" and retain the original
+ * copyright notice.
* Contributor( s): ______________________________________
*
*/
@@ -83,7 +83,9 @@ class JavascriptObserver {
printf('', $msg->getString());
return;
}
- printf('', htmlentities($msg->getString(),ENT_QUOTES,'UTF-8'));
+ $message = htmlentities($msg->getString(),ENT_QUOTES,'UTF-8');
+ $message = str_replace('&', '&', $message);
+ printf('', $message);
}
function redirectToDocument($id) {
diff --git a/lib/upgrades/UpgradeFunctions.inc.php b/lib/upgrades/UpgradeFunctions.inc.php
index 724cbce..1876a02 100644
--- a/lib/upgrades/UpgradeFunctions.inc.php
+++ b/lib/upgrades/UpgradeFunctions.inc.php
@@ -1005,6 +1005,12 @@ 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');
+ $ini->addItem('clientToolPolicies', 'captureReasonsDelete', 'true', "These settings govern whether reasons are asked for in KTtools.");
+ $ini->addItem('clientToolPolicies', 'captureReasonsCheckin', 'true');
+ $ini->addItem('clientToolPolicies', 'captureReasonsCheckout', 'true');
+ $ini->addItem('clientToolPolicies', 'captureReasonsCancelCheckout', 'true');
+ $ini->addItem('clientToolPolicies', 'captureReasonsCopyInKT', 'true');
+ $ini->addItem('clientToolPolicies', 'captureReasonsMoveInKT', '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");
diff --git a/resources/js/#jsonlookup.js# b/resources/js/#jsonlookup.js#
deleted file mode 100644
index ffe31ed..0000000
--- a/resources/js/#jsonlookup.js#
+++ /dev/null
@@ -1,275 +0,0 @@
-var _aLookupWidgets = {};
-
-function getJSONLookupWidget(name) {
- if(!isUndefinedOrNull(_aLookupWidgets[name])) {
- return _aLookupWidgets[name];
- } else {
- return false;
- }
-}
-
-function JSONLookupWidget() {
-}
-
-JSONLookupWidget.prototype = {
-
- /* bind_add and bind_remove are functions to be called with the key:value's of selected items */
-
- 'initialize' : function(name, action) {
- bindMethods(this);
-
- this.sName = name;
- this.sAction = action;
-
-
- this.oSelectAvail = $('select_' + name + '_avail');
- this.oSelectAssigned = $('select_' + name + '_assigned');
- this.oFilterAvail = $('filter_' + name + '_avail');
- this.oFilterAssigned = $('filter_' + name + '_assigned');
-
- this.savedFilter = this.oFilterAvail.value;
- this.savedSelector = this.oFilterAssigned.value;
- this.filterTimer = null;
-
- this.aItemsAdded = [];
- this.aItemsRemoved = [];
-
- connect(this.oFilterAvail, 'onkeyup', this, 'onchangeFilter');
- connect(this.oFilterAssigned, 'onkeyup', this, 'onchangeSelector');
- connect(name + '_add', 'onclick', this, 'onclickAdd');
- connect(name + '_remove', 'onclick', this, 'onclickRemove');
- connect(name + '_show_all', 'onclick', this, 'onclickShowAll');
-
- this.triggers = {};
- this.triggers['add'] = null;
- this.triggers['remove'] = null;
-
- this.initialValuesLoaded = false;
- var d = this.getValues();
- d.addCallback(this.postInitialize);
- },
-
- 'addTrigger' : function(event, func) {
- this.triggers[event] = func;
- },
-
-
- // values handling
-
- 'getValues' : function(all) {
- var act = this.sAction;
- if(!isUndefinedOrNull(all)) {
- act += '&' + queryString({'filter' : '%'});
- } else if(this.savedFilter) {
- act += '&' + queryString({'filter' : this.savedFilter});
- } else if(!this.initialValuesLoaded) {
- act += '&' + queryString({'selected' : '1'});
- }
-
- var d = loadJSONDoc(act);
- d.addErrback(this.errGetValues);
- d.addCallback(checkKTError);
- d.addCallback(this.saveValues);
- d.addCallback(this.renderValues);
- return d;
- },
-
- 'errGetValues' : function(res) {
- alert('There was an error retrieving data. Please check connectivity and try again.');
- this.oValues = {'off':'-- Error fetching values --'};
- this.renderValues();
- },
-
- 'saveValues' : function(res) {
- this.oValues = res;
- return res;
- },
-
- 'renderValues' : function() {
- var aOptions = [];
- var bSelFound = false;
- for(var k in this.oValues) {
- var found = false;
- for(var i=0; isourcefile, $this->targetfile);
- $cmdline = $this->command . ' ' . str_replace($sources,$target, $this->params);
+ $cmdline = $this->application . ' ' . str_replace($sources,$target, $this->params);
return $cmdline;
}
diff --git a/search2/indexing/extractors/PDFExtractor.inc.php b/search2/indexing/extractors/PDFExtractor.inc.php
index 54fb672..a6d34e9 100644
--- a/search2/indexing/extractors/PDFExtractor.inc.php
+++ b/search2/indexing/extractors/PDFExtractor.inc.php
@@ -40,7 +40,10 @@ class PDFExtractor extends ApplicationExtractor
{
public function __construct()
{
- parent::__construct('externalBinary','pdftotext','pdftotext',_kt('PDF Text Extractor'),'-nopgbrk -enc UTF-8 \'{source}\' \'{target}\'');
+ $config = KTConfig::getSingleton();
+ $params = $config->get('extractorParameters/pdftotext', '-nopgbrk -enc UTF-8 \'{source}\' \'{target}\'');
+
+ parent::__construct('externalBinary','pdftotext','pdftotext',_kt('PDF Text Extractor'),$params);
}
public function getSupportedMimeTypes()
diff --git a/search2/indexing/extractors/PSExtractor.inc.php b/search2/indexing/extractors/PSExtractor.inc.php
index 8fff6d0..fd60b74 100644
--- a/search2/indexing/extractors/PSExtractor.inc.php
+++ b/search2/indexing/extractors/PSExtractor.inc.php
@@ -40,7 +40,10 @@ class PSExtractor extends ApplicationExtractor
{
public function __construct()
{
- parent::__construct('externalBinary','pstotext','pstotext',_kt('PostScript Text Extractor'),'-nopgbrk -enc UTF-8 {source} {target}');
+ $config = KTConfig::getSingleton();
+ $params = $config->get('extractorParameters/pstotext', '\'{source}\' > \'{target}\'');
+
+ parent::__construct('externalBinary','pstotext','pstotext',_kt('PostScript Text Extractor'), $params);
}
public function getSupportedMimeTypes()
@@ -56,6 +59,7 @@ class PSExtractor extends ApplicationExtractor
{
if (OS_WINDOWS)
{
+ // pstotext is not available under windows, so no need to diagnose it
return null;
}
return parent::diagnose();
diff --git a/search2/indexing/indexerCore.inc.php b/search2/indexing/indexerCore.inc.php
index d6f54d0..f82443d 100644
--- a/search2/indexing/indexerCore.inc.php
+++ b/search2/indexing/indexerCore.inc.php
@@ -755,7 +755,7 @@ abstract class Indexer
INNER JOIN document_metadata_version dmv ON d.metadata_version_id=dmv.id
INNER JOIN document_content_version dcv ON dmv.content_version_id=dcv.id
INNER JOIN mime_types mt ON dcv.mime_id=mt.id
- INNER JOIN mime_extractors me ON mt.extractor_id=me.id
+ LEFT JOIN mime_extractors me ON mt.extractor_id=me.id
WHERE
(iff.processdate IS NULL or iff.processdate < cast(cast('$date' as date) -1 as date)) AND dmv.status_id=1
ORDER BY indexdate
@@ -807,12 +807,6 @@ abstract class Indexer
$default->log->debug(sprintf(_kt("Indexing docid: %d extension: '%s' mimetype: '%s' extractor: '%s'"), $docId, $extension,$mimeType,$extractorClass));
}
- if (!$this->isExtractorEnabled($extractorClass))
- {
- $default->log->info(sprintf(_kt("diagnose: Not indexing docid: %d because extractor '%s' is disabled."), $docId, $extractorClass));
- continue;
- }
-
if (empty($extractorClass))
{
if ($this->debug)
@@ -824,9 +818,15 @@ abstract class Indexer
continue;
}
+ if (!$this->isExtractorEnabled($extractorClass))
+ {
+ $default->log->info(sprintf(_kt("diagnose: Not indexing docid: %d because extractor '%s' is disabled."), $docId, $extractorClass));
+ continue;
+ }
+
if ($this->debug)
{
- $default->log->info(sprintf(_kt("Processing document %d.\n"),$docId));
+ $default->log->info(sprintf(_kt("Processing docid: %d.\n"),$docId));
}
$removeFromQueue = true;