Commit 03c89e3644ae71eb0056544e1e84f34f0fce0fdb
1 parent
f4a49647
KTS-2761
"Last run time in Indexer Dashlet is not updated" Fixed. queue updated to reflect live files only. Committed By: Conrad Vermeulen Reviewed By: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7802 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
11 additions
and
10 deletions
plugins/search2/LuceneStatisticsDashlet.php
| @@ -6,32 +6,32 @@ | @@ -6,32 +6,32 @@ | ||
| 6 | * KnowledgeTree Open Source Edition | 6 | * KnowledgeTree Open Source Edition |
| 7 | * Document Management Made Simple | 7 | * Document Management Made Simple |
| 8 | * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited | 8 | * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited |
| 9 | - * | 9 | + * |
| 10 | * This program is free software; you can redistribute it and/or modify it under | 10 | * This program is free software; you can redistribute it and/or modify it under |
| 11 | * the terms of the GNU General Public License version 3 as published by the | 11 | * the terms of the GNU General Public License version 3 as published by the |
| 12 | * Free Software Foundation. | 12 | * Free Software Foundation. |
| 13 | - * | 13 | + * |
| 14 | * This program is distributed in the hope that it will be useful, but WITHOUT | 14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 17 | * details. | 17 | * details. |
| 18 | - * | 18 | + * |
| 19 | * You should have received a copy of the GNU General Public License | 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | - * | 21 | + * |
| 22 | * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, | 22 | * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, |
| 23 | * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. | 23 | * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. |
| 24 | - * | 24 | + * |
| 25 | * The interactive user interfaces in modified source and object code versions | 25 | * The interactive user interfaces in modified source and object code versions |
| 26 | * of this program must display Appropriate Legal Notices, as required under | 26 | * of this program must display Appropriate Legal Notices, as required under |
| 27 | * Section 5 of the GNU General Public License version 3. | 27 | * Section 5 of the GNU General Public License version 3. |
| 28 | - * | 28 | + * |
| 29 | * In accordance with Section 7(b) of the GNU General Public License version 3, | 29 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 30 | * these Appropriate Legal Notices must retain the display of the "Powered by | 30 | * these Appropriate Legal Notices must retain the display of the "Powered by |
| 31 | - * KnowledgeTree" logo and retain the original copyright notice. If the display of the | 31 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the |
| 32 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | 32 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices |
| 33 | - * must display the words "Powered by KnowledgeTree" and retain the original | ||
| 34 | - * copyright notice. | 33 | + * must display the words "Powered by KnowledgeTree" and retain the original |
| 34 | + * copyright notice. | ||
| 35 | * Contributor( s): ______________________________________ | 35 | * Contributor( s): ______________________________________ |
| 36 | * | 36 | * |
| 37 | */ | 37 | */ |
| @@ -100,7 +100,8 @@ class LuceneStatisticsDashlet extends KTBaseDashlet | @@ -100,7 +100,8 @@ class LuceneStatisticsDashlet extends KTBaseDashlet | ||
| 100 | $index = Indexer::get(); | 100 | $index = Indexer::get(); |
| 101 | $docsInIndex = $index->getDocumentsInIndex(); | 101 | $docsInIndex = $index->getDocumentsInIndex(); |
| 102 | 102 | ||
| 103 | - $sql = "SELECT count(*) as docsInQueue FROM index_files"; | 103 | + // we are only interested in documents that are active |
| 104 | + $sql = "SELECT count(*) as docsInQueue FROM index_files q INNER JOIN documents d on q.document_id=d.id WHERE d.status_id=1"; | ||
| 104 | $docsInQueue = DBUtil::getOneResultKey($sql, 'docsInQueue'); | 105 | $docsInQueue = DBUtil::getOneResultKey($sql, 'docsInQueue'); |
| 105 | 106 | ||
| 106 | $sql = "SELECT count(*) as docsInRepository FROM documents"; | 107 | $sql = "SELECT count(*) as docsInRepository FROM documents"; |