Commit 11e48917f7b3cec8d4794b32dfad25625f75c371
1 parent
327b80ed
Merged in from DEV trunk...
KTS-3059 "Unsupported documents are not indexed rightly so but the Documents Indexer Statistics's Documents Indexed shows a number contrary this" Fixed. Committed By: Conrad Vermeulen Reviewed By: Megan Watson KTS-1594 "Support for Office 2007 Documents" Fixed. Committed By: Conrad Vermeulen Reviewed By: Megan Watson KTS-2400 "Using double quotes in the new search system may be problematic" Fixed. Committed By: Conrad Vermeulen Reviewed By: Megan Watson git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8147 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
5 changed files
with
27 additions
and
11 deletions
plugins/ktstandard/KTSubscriptions.php
| ... | ... | @@ -5,32 +5,32 @@ |
| 5 | 5 | * KnowledgeTree Open Source Edition |
| 6 | 6 | * Document Management Made Simple |
| 7 | 7 | * Copyright (C) 2004 - 2008 The Jam Warehouse Software (Pty) Limited |
| 8 | - * | |
| 8 | + * | |
| 9 | 9 | * This program is free software; you can redistribute it and/or modify it under |
| 10 | 10 | * the terms of the GNU General Public License version 3 as published by the |
| 11 | 11 | * Free Software Foundation. |
| 12 | - * | |
| 12 | + * | |
| 13 | 13 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 14 | 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 15 | 15 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 16 | 16 | * details. |
| 17 | - * | |
| 17 | + * | |
| 18 | 18 | * You should have received a copy of the GNU General Public License |
| 19 | 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | - * | |
| 20 | + * | |
| 21 | 21 | * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, |
| 22 | 22 | * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. |
| 23 | - * | |
| 23 | + * | |
| 24 | 24 | * The interactive user interfaces in modified source and object code versions |
| 25 | 25 | * of this program must display Appropriate Legal Notices, as required under |
| 26 | 26 | * Section 5 of the GNU General Public License version 3. |
| 27 | - * | |
| 27 | + * | |
| 28 | 28 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 29 | 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 | |
| 30 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | 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. | |
| 32 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | + * copyright notice. | |
| 34 | 34 | * Contributor( s): ______________________________________ |
| 35 | 35 | * |
| 36 | 36 | */ |
| ... | ... | @@ -326,6 +326,8 @@ class KTDiscussionSubscriptionTrigger { |
| 326 | 326 | $oFolder = Folder::get($oDocument->getFolderID()); |
| 327 | 327 | |
| 328 | 328 | $oSubscriptionEvent->DiscussDocument($oDocument, $oFolder); |
| 329 | + $indexer = Indexer::get(); | |
| 330 | + $indexer->index($oDocument, 'D'); | |
| 329 | 331 | } |
| 330 | 332 | } |
| 331 | 333 | // }}} | ... | ... |
plugins/search2/reporting/IndexErrors.php
| ... | ... | @@ -84,6 +84,11 @@ class IndexErrorsDispatcher extends KTAdminDispatcher { |
| 84 | 84 | foreach($aIndexerValues as $key=>$doc) |
| 85 | 85 | { |
| 86 | 86 | $extractor=$indexer->getExtractor($doc['extractor']); |
| 87 | + if (is_null($extractor)) | |
| 88 | + { | |
| 89 | + $doc['extractor'] = 'n/a'; | |
| 90 | + continue; | |
| 91 | + } | |
| 87 | 92 | $doc['extractor'] = $extractor->getDisplayName(); |
| 88 | 93 | $aIndexerValues[$key] = $doc; |
| 89 | 94 | } | ... | ... |
plugins/search2/reporting/PendingDocuments.php
| ... | ... | @@ -58,6 +58,11 @@ class PendingDocumentsDispatcher extends KTAdminDispatcher |
| 58 | 58 | foreach($aPendingDocs as $key=>$doc) |
| 59 | 59 | { |
| 60 | 60 | $extractor = $indexer->getExtractor($doc['extractor']); |
| 61 | + if (is_null($extractor)) | |
| 62 | + { | |
| 63 | + $doc['extractor'] = 'n/a'; | |
| 64 | + continue; | |
| 65 | + } | |
| 61 | 66 | $doc['extractor'] = $extractor->getDisplayName(); |
| 62 | 67 | $aPendingDocs[$key] = $doc; |
| 63 | 68 | } | ... | ... |
search2/indexing/indexers/JavaXMLRPCLuceneIndexer.inc.php
| ... | ... | @@ -118,6 +118,10 @@ class JavaXMLRPCLuceneIndexer extends Indexer |
| 118 | 118 | try |
| 119 | 119 | { |
| 120 | 120 | $discussion = Indexer::getDiscussionText($docid); |
| 121 | + if (empty($discussion)) | |
| 122 | + { | |
| 123 | + return true; | |
| 124 | + } | |
| 121 | 125 | return $this->lucene->updateDiscussion($docid, $discussion); |
| 122 | 126 | } |
| 123 | 127 | catch(Exception $e) | ... | ... |
templates/ktcore/search2/adv_query_builder.smarty
| ... | ... | @@ -714,12 +714,12 @@ function buildExpression() |
| 714 | 714 | var start = getElByName(gid, 'field' + gid + '_' + fid + 'start'); |
| 715 | 715 | var end = getElByName(gid, 'field' + gid + '_' + fid + 'end'); |
| 716 | 716 | |
| 717 | - var expr = expr = fieldname + ' ' + fieldop + ' "' + start.value + '"'; | |
| 717 | + var expr = expr = fieldname + ' ' + fieldop + ' "' + start.value.replace(/\"/g, "'") + '"'; | |
| 718 | 718 | switch (fieldop) |
| 719 | 719 | { |
| 720 | 720 | case 'between': |
| 721 | 721 | case 'BETWEEN': |
| 722 | - expr += ' AND "' + end.value + '"'; | |
| 722 | + expr += ' AND "' + end.value.replace(/\"/g, "'") + '"'; | |
| 723 | 723 | break; |
| 724 | 724 | default: |
| 725 | 725 | break; | ... | ... |