diff --git a/plugins/ktstandard/KTSubscriptions.php b/plugins/ktstandard/KTSubscriptions.php index 8a98ece..f6f93da 100644 --- a/plugins/ktstandard/KTSubscriptions.php +++ b/plugins/ktstandard/KTSubscriptions.php @@ -5,32 +5,32 @@ * KnowledgeTree Open Source Edition * Document Management Made Simple * Copyright (C) 2004 - 2008 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): ______________________________________ * */ @@ -326,6 +326,8 @@ class KTDiscussionSubscriptionTrigger { $oFolder = Folder::get($oDocument->getFolderID()); $oSubscriptionEvent->DiscussDocument($oDocument, $oFolder); + $indexer = Indexer::get(); + $indexer->index($oDocument, 'D'); } } // }}} diff --git a/plugins/search2/reporting/IndexErrors.php b/plugins/search2/reporting/IndexErrors.php index b13a043..6e8b426 100644 --- a/plugins/search2/reporting/IndexErrors.php +++ b/plugins/search2/reporting/IndexErrors.php @@ -84,6 +84,11 @@ class IndexErrorsDispatcher extends KTAdminDispatcher { foreach($aIndexerValues as $key=>$doc) { $extractor=$indexer->getExtractor($doc['extractor']); + if (is_null($extractor)) + { + $doc['extractor'] = 'n/a'; + continue; + } $doc['extractor'] = $extractor->getDisplayName(); $aIndexerValues[$key] = $doc; } diff --git a/plugins/search2/reporting/PendingDocuments.php b/plugins/search2/reporting/PendingDocuments.php index 67a67eb..248d8c9 100644 --- a/plugins/search2/reporting/PendingDocuments.php +++ b/plugins/search2/reporting/PendingDocuments.php @@ -58,6 +58,11 @@ class PendingDocumentsDispatcher extends KTAdminDispatcher foreach($aPendingDocs as $key=>$doc) { $extractor = $indexer->getExtractor($doc['extractor']); + if (is_null($extractor)) + { + $doc['extractor'] = 'n/a'; + continue; + } $doc['extractor'] = $extractor->getDisplayName(); $aPendingDocs[$key] = $doc; } diff --git a/search2/indexing/indexers/JavaXMLRPCLuceneIndexer.inc.php b/search2/indexing/indexers/JavaXMLRPCLuceneIndexer.inc.php index e3a7fa9..9ca5cbd 100644 --- a/search2/indexing/indexers/JavaXMLRPCLuceneIndexer.inc.php +++ b/search2/indexing/indexers/JavaXMLRPCLuceneIndexer.inc.php @@ -118,6 +118,10 @@ class JavaXMLRPCLuceneIndexer extends Indexer try { $discussion = Indexer::getDiscussionText($docid); + if (empty($discussion)) + { + return true; + } return $this->lucene->updateDiscussion($docid, $discussion); } catch(Exception $e) diff --git a/templates/ktcore/search2/adv_query_builder.smarty b/templates/ktcore/search2/adv_query_builder.smarty index b2279b8..cc42f06 100644 --- a/templates/ktcore/search2/adv_query_builder.smarty +++ b/templates/ktcore/search2/adv_query_builder.smarty @@ -714,12 +714,12 @@ function buildExpression() var start = getElByName(gid, 'field' + gid + '_' + fid + 'start'); var end = getElByName(gid, 'field' + gid + '_' + fid + 'end'); - var expr = expr = fieldname + ' ' + fieldop + ' "' + start.value + '"'; + var expr = expr = fieldname + ' ' + fieldop + ' "' + start.value.replace(/\"/g, "'") + '"'; switch (fieldop) { case 'between': case 'BETWEEN': - expr += ' AND "' + end.value + '"'; + expr += ' AND "' + end.value.replace(/\"/g, "'") + '"'; break; default: break;