Commit c0b42cf0641c4f71a2a11b19f2df7ccbf7127075
1 parent
756972b5
KTS-4276 Moved the templates into the templates directory and removed the addLocation function
"Templating "addLocation" not in plugin setup method" Fixed. Committed by: Megan Watson
Showing
10 changed files
with
86 additions
and
96 deletions
plugins/search2/reporting/ExtractorInfo.php
| @@ -6,42 +6,42 @@ | @@ -6,42 +6,42 @@ | ||
| 6 | * Document Management Made Simple | 6 | * Document Management Made Simple |
| 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. | 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. |
| 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited | 8 | * Portions copyright 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 | - * | ||
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | 21 | + * |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | ||
| 23 | * California 94120-7775, or email info@knowledgetree.com. | 23 | * California 94120-7775, 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 | 33 | + * must display the words "Powered by KnowledgeTree" and retain the original |
| 34 | * copyright notice. | 34 | * copyright notice. |
| 35 | * Contributor( s): ______________________________________ | 35 | * Contributor( s): ______________________________________ |
| 36 | * | 36 | * |
| 37 | */ | 37 | */ |
| 38 | - | 38 | + |
| 39 | require_once(KT_LIB_DIR . '/dispatcher.inc.php'); | 39 | require_once(KT_LIB_DIR . '/dispatcher.inc.php'); |
| 40 | require_once(KT_LIB_DIR . '/templating/templating.inc.php'); | 40 | require_once(KT_LIB_DIR . '/templating/templating.inc.php'); |
| 41 | require_once(KT_LIB_DIR . '/mime.inc.php'); | 41 | require_once(KT_LIB_DIR . '/mime.inc.php'); |
| 42 | 42 | ||
| 43 | class ExtractorInfoDispatcher extends KTAdminDispatcher { | 43 | class ExtractorInfoDispatcher extends KTAdminDispatcher { |
| 44 | - | 44 | + |
| 45 | 45 | ||
| 46 | function check() { | 46 | function check() { |
| 47 | $this->aBreadcrumbs[] = array( | 47 | $this->aBreadcrumbs[] = array( |
| @@ -52,60 +52,58 @@ class ExtractorInfoDispatcher extends KTAdminDispatcher { | @@ -52,60 +52,58 @@ class ExtractorInfoDispatcher extends KTAdminDispatcher { | ||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | function do_main() { | 54 | function do_main() { |
| 55 | - | 55 | + |
| 56 | //registerTypes registers the mime types and populates the needed tables. | 56 | //registerTypes registers the mime types and populates the needed tables. |
| 57 | $indexer = Indexer::get(); | 57 | $indexer = Indexer::get(); |
| 58 | $indexer->registerTypes(); | 58 | $indexer->registerTypes(); |
| 59 | - | 59 | + |
| 60 | $oTemplating =& KTTemplating::getSingleton(); | 60 | $oTemplating =& KTTemplating::getSingleton(); |
| 61 | - $oTemplating->addLocation('Extractor Information', '/plugins/search2/reporting/templates'); | ||
| 62 | - | ||
| 63 | - $oTemplate =& $oTemplating->loadTemplate('extractorinfo'); | ||
| 64 | - | 61 | + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/extractorinfo'); |
| 62 | + | ||
| 65 | $aExtractorInfo = KTMime::getMimeExtractorInformation(); | 63 | $aExtractorInfo = KTMime::getMimeExtractorInformation(); |
| 66 | - | 64 | + |
| 67 | if(empty($aExtractorInfo)) | 65 | if(empty($aExtractorInfo)) |
| 68 | { | 66 | { |
| 69 | $oTemplate->setData(array( | 67 | $oTemplate->setData(array( |
| 70 | 'context' => $this, | 68 | 'context' => $this, |
| 71 | 'extractor_info' => $aExtractorInfo | 69 | 'extractor_info' => $aExtractorInfo |
| 72 | )); | 70 | )); |
| 73 | - | ||
| 74 | - return $oTemplate; | 71 | + |
| 72 | + return $oTemplate; | ||
| 75 | } | 73 | } |
| 76 | - | 74 | + |
| 77 | foreach($aExtractorInfo as $key=>$info) | 75 | foreach($aExtractorInfo as $key=>$info) |
| 78 | { | 76 | { |
| 79 | $extractorClass = $info['name']; | 77 | $extractorClass = $info['name']; |
| 80 | $extractor = $indexer->getExtractor($extractorClass); | 78 | $extractor = $indexer->getExtractor($extractorClass); |
| 81 | $info['mimeTypes'] = array(); | 79 | $info['mimeTypes'] = array(); |
| 82 | $aMimeTypes = $this->getSupportedMimeTypesDB($extractorClass);//$extractor->getSupportedMimeTypes(); | 80 | $aMimeTypes = $this->getSupportedMimeTypesDB($extractorClass);//$extractor->getSupportedMimeTypes(); |
| 83 | - | ||
| 84 | - | 81 | + |
| 82 | + | ||
| 85 | foreach($aMimeTypes as $mimeType) | 83 | foreach($aMimeTypes as $mimeType) |
| 86 | { | 84 | { |
| 87 | - $sMimeInfo = KTMime::getFriendlyNameAndExtension($mimeType); | ||
| 88 | - | 85 | + $sMimeInfo = KTMime::getFriendlyNameAndExtension($mimeType); |
| 86 | + | ||
| 89 | $info['mimeTypes'][$mimeType] = array('description'=>$sMimeInfo[0]['friendly_name'], 'extensions'=>array($sMimeInfo[0]['filetypes'])); | 87 | $info['mimeTypes'][$mimeType] = array('description'=>$sMimeInfo[0]['friendly_name'], 'extensions'=>array($sMimeInfo[0]['filetypes'])); |
| 90 | - | 88 | + |
| 91 | $extensions = array(); | 89 | $extensions = array(); |
| 92 | - foreach($sMimeInfo as $item) | 90 | + foreach($sMimeInfo as $item) |
| 93 | { | 91 | { |
| 94 | $extensions[] = $item['filetypes']; | 92 | $extensions[] = $item['filetypes']; |
| 95 | } | 93 | } |
| 96 | $info['mimeTypes'][$mimeType]['extensions'] = implode(', ', $extensions); | 94 | $info['mimeTypes'][$mimeType]['extensions'] = implode(', ', $extensions); |
| 97 | } | 95 | } |
| 98 | - | ||
| 99 | - $aExtractorInfo[$key] = $info; | 96 | + |
| 97 | + $aExtractorInfo[$key] = $info; | ||
| 100 | } | 98 | } |
| 101 | - | 99 | + |
| 102 | $oTemplate->setData(array( | 100 | $oTemplate->setData(array( |
| 103 | 'context' => $this, | 101 | 'context' => $this, |
| 104 | 'extractor_info' => $aExtractorInfo | 102 | 'extractor_info' => $aExtractorInfo |
| 105 | )); | 103 | )); |
| 106 | return $oTemplate; | 104 | return $oTemplate; |
| 107 | } | 105 | } |
| 108 | - | 106 | + |
| 109 | function getSupportedMimeTypesDB($sExtractorName) | 107 | function getSupportedMimeTypesDB($sExtractorName) |
| 110 | { | 108 | { |
| 111 | $sQuery = "SELECT MT.mimetypes FROM mime_extractors as ME LEFT JOIN mime_types as MT ON " . | 109 | $sQuery = "SELECT MT.mimetypes FROM mime_extractors as ME LEFT JOIN mime_types as MT ON " . |
| @@ -118,7 +116,7 @@ class ExtractorInfoDispatcher extends KTAdminDispatcher { | @@ -118,7 +116,7 @@ class ExtractorInfoDispatcher extends KTAdminDispatcher { | ||
| 118 | if(!in_array($aTempRes[$i]['mimetypes'], $aRes)) | 116 | if(!in_array($aTempRes[$i]['mimetypes'], $aRes)) |
| 119 | { | 117 | { |
| 120 | $aRes[] = $aTempRes[$i]['mimetypes']; | 118 | $aRes[] = $aTempRes[$i]['mimetypes']; |
| 121 | - | 119 | + |
| 122 | } | 120 | } |
| 123 | } | 121 | } |
| 124 | return $aRes; | 122 | return $aRes; |
plugins/search2/reporting/IndexErrors.php
| @@ -90,9 +90,7 @@ class IndexErrorsDispatcher extends KTAdminDispatcher { | @@ -90,9 +90,7 @@ class IndexErrorsDispatcher extends KTAdminDispatcher { | ||
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | $oTemplating =& KTTemplating::getSingleton(); | 92 | $oTemplating =& KTTemplating::getSingleton(); |
| 93 | - $oTemplating->addLocation('Index Errors', '/plugins/search2/reporting/templates'); | ||
| 94 | - | ||
| 95 | - $oTemplate =& $oTemplating->loadTemplate('indexerrors'); | 93 | + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/indexerrors'); |
| 96 | 94 | ||
| 97 | $aIndexerValues = Indexer::getIndexingQueue(); | 95 | $aIndexerValues = Indexer::getIndexingQueue(); |
| 98 | foreach($aIndexerValues as $key=>$doc) | 96 | foreach($aIndexerValues as $key=>$doc) |
plugins/search2/reporting/ManageMimeTypes.php
| @@ -6,40 +6,40 @@ | @@ -6,40 +6,40 @@ | ||
| 6 | * Document Management Made Simple | 6 | * Document Management Made Simple |
| 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. | 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. |
| 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited | 8 | * Portions copyright 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 | - * | ||
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | 21 | + * |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | ||
| 23 | * California 94120-7775, or email info@knowledgetree.com. | 23 | * California 94120-7775, 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 | 33 | + * must display the words "Powered by KnowledgeTree" and retain the original |
| 34 | * copyright notice. | 34 | * copyright notice. |
| 35 | * Contributor( s): ______________________________________ | 35 | * Contributor( s): ______________________________________ |
| 36 | * | 36 | * |
| 37 | */ | 37 | */ |
| 38 | -require_once(KT_LIB_DIR . '/dispatcher.inc.php'); | ||
| 39 | -require_once(KT_LIB_DIR . '/templating/templating.inc.php'); | 38 | +require_once(KT_LIB_DIR . '/dispatcher.inc.php'); |
| 39 | +require_once(KT_LIB_DIR . '/templating/templating.inc.php'); | ||
| 40 | require_once(KT_LIB_DIR . '/mime.inc.php'); | 40 | require_once(KT_LIB_DIR . '/mime.inc.php'); |
| 41 | 41 | ||
| 42 | -class ManageMimeTypesDispatcher extends KTAdminDispatcher { | 42 | +class ManageMimeTypesDispatcher extends KTAdminDispatcher { |
| 43 | 43 | ||
| 44 | function check() { | 44 | function check() { |
| 45 | $this->aBreadcrumbs[] = array( | 45 | $this->aBreadcrumbs[] = array( |
| @@ -50,23 +50,21 @@ class ManageMimeTypesDispatcher extends KTAdminDispatcher { | @@ -50,23 +50,21 @@ class ManageMimeTypesDispatcher extends KTAdminDispatcher { | ||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | function do_main() { | 52 | function do_main() { |
| 53 | - | ||
| 54 | - //registerTypes registers the mime types and populates the needed tables. | 53 | + |
| 54 | + //registerTypes registers the mime types and populates the needed tables. | ||
| 55 | $indexer = Indexer::get(); | 55 | $indexer = Indexer::get(); |
| 56 | $indexer->registerTypes(); | 56 | $indexer->registerTypes(); |
| 57 | - | 57 | + |
| 58 | $oTemplating =& KTTemplating::getSingleton(); | 58 | $oTemplating =& KTTemplating::getSingleton(); |
| 59 | - $oTemplating->addLocation('Manage Mime Type Plugin', '/plugins/search2/reporting/templates'); | 59 | + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/managemimetypes'); |
| 60 | 60 | ||
| 61 | - $oTemplate =& $oTemplating->loadTemplate('managemimetypes'); | ||
| 62 | - | ||
| 63 | $aMimeTypes = KTMime::getAllMimeTypesInformation(); | 61 | $aMimeTypes = KTMime::getAllMimeTypesInformation(); |
| 64 | - | ||
| 65 | - $indexer = Indexer::get(); | ||
| 66 | - | 62 | + |
| 63 | + $indexer = Indexer::get(); | ||
| 64 | + | ||
| 67 | $numExtensions = 0; | 65 | $numExtensions = 0; |
| 68 | $numIndexedExtensions = 0; | 66 | $numIndexedExtensions = 0; |
| 69 | - | 67 | + |
| 70 | foreach($aMimeTypes as $key=>$mimeType) | 68 | foreach($aMimeTypes as $key=>$mimeType) |
| 71 | { | 69 | { |
| 72 | $extractorClass = $mimeType['extractor']; | 70 | $extractorClass = $mimeType['extractor']; |
| @@ -78,21 +76,21 @@ class ManageMimeTypesDispatcher extends KTAdminDispatcher { | @@ -78,21 +76,21 @@ class ManageMimeTypesDispatcher extends KTAdminDispatcher { | ||
| 78 | $extractor = $indexer->getExtractor($extractorClass); | 76 | $extractor = $indexer->getExtractor($extractorClass); |
| 79 | $aMimeTypes[$key]['extractor'] = $extractor->getDisplayName(); | 77 | $aMimeTypes[$key]['extractor'] = $extractor->getDisplayName(); |
| 80 | $numIndexedExtensions++; | 78 | $numIndexedExtensions++; |
| 81 | - } | ||
| 82 | - | 79 | + } |
| 80 | + | ||
| 83 | $indexedPercentage = 0; | 81 | $indexedPercentage = 0; |
| 84 | if ($numExtensions > 0) | 82 | if ($numExtensions > 0) |
| 85 | { | 83 | { |
| 86 | $indexedPercentage = number_format(($numIndexedExtensions * 100)/$numExtensions,2,'.',','); | 84 | $indexedPercentage = number_format(($numIndexedExtensions * 100)/$numExtensions,2,'.',','); |
| 87 | } | 85 | } |
| 88 | - | 86 | + |
| 89 | $oTemplate->setData(array( | 87 | $oTemplate->setData(array( |
| 90 | 'context' => $this, | 88 | 'context' => $this, |
| 91 | 'mime_types' => $aMimeTypes, | 89 | 'mime_types' => $aMimeTypes, |
| 92 | 'numExtensions'=>$numExtensions, | 90 | 'numExtensions'=>$numExtensions, |
| 93 | 'numIndexedExtensions'=>$numIndexedExtensions, | 91 | 'numIndexedExtensions'=>$numIndexedExtensions, |
| 94 | 'indexedPercentage'=>$indexedPercentage | 92 | 'indexedPercentage'=>$indexedPercentage |
| 95 | - | 93 | + |
| 96 | )); | 94 | )); |
| 97 | return $oTemplate; | 95 | return $oTemplate; |
| 98 | } | 96 | } |
plugins/search2/reporting/PendingDocuments.php
| @@ -6,31 +6,31 @@ | @@ -6,31 +6,31 @@ | ||
| 6 | * Document Management Made Simple | 6 | * Document Management Made Simple |
| 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. | 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. |
| 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited | 8 | * Portions copyright 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 | - * | ||
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | 21 | + * |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | ||
| 23 | * California 94120-7775, or email info@knowledgetree.com. | 23 | * California 94120-7775, 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 | 33 | + * must display the words "Powered by KnowledgeTree" and retain the original |
| 34 | * copyright notice. | 34 | * copyright notice. |
| 35 | * Contributor( s): ______________________________________ | 35 | * Contributor( s): ______________________________________ |
| 36 | * | 36 | * |
| @@ -69,8 +69,7 @@ class PendingDocumentsDispatcher extends KTAdminDispatcher | @@ -69,8 +69,7 @@ class PendingDocumentsDispatcher extends KTAdminDispatcher | ||
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | $oTemplating =& KTTemplating::getSingleton(); | 71 | $oTemplating =& KTTemplating::getSingleton(); |
| 72 | - $oTemplating->addLocation('Pending Documents', '/plugins/search2/reporting/templates'); | ||
| 73 | - $oTemplate =& $oTemplating->loadTemplate('pendingdocuments'); | 72 | + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/pendingdocuments'); |
| 74 | 73 | ||
| 75 | $config = KTConfig::getSingleton(); | 74 | $config = KTConfig::getSingleton(); |
| 76 | $rootUrl = $config->get('KnowledgeTree/rootUrl'); | 75 | $rootUrl = $config->get('KnowledgeTree/rootUrl'); |
plugins/search2/reporting/RescheduleDocuments.php
| @@ -6,40 +6,40 @@ | @@ -6,40 +6,40 @@ | ||
| 6 | * Document Management Made Simple | 6 | * Document Management Made Simple |
| 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. | 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. |
| 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited | 8 | * Portions copyright 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 | - * | ||
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | 21 | + * |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | ||
| 23 | * California 94120-7775, or email info@knowledgetree.com. | 23 | * California 94120-7775, 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 | 33 | + * must display the words "Powered by KnowledgeTree" and retain the original |
| 34 | * copyright notice. | 34 | * copyright notice. |
| 35 | * Contributor( s): ______________________________________ | 35 | * Contributor( s): ______________________________________ |
| 36 | * | 36 | * |
| 37 | */ | 37 | */ |
| 38 | - | ||
| 39 | -require_once(KT_LIB_DIR . '/dispatcher.inc.php'); | ||
| 40 | -require_once(KT_LIB_DIR . '/templating/templating.inc.php'); | ||
| 41 | 38 | ||
| 42 | -class RescheduleDocumentsDispatcher extends KTAdminDispatcher | 39 | +require_once(KT_LIB_DIR . '/dispatcher.inc.php'); |
| 40 | +require_once(KT_LIB_DIR . '/templating/templating.inc.php'); | ||
| 41 | + | ||
| 42 | +class RescheduleDocumentsDispatcher extends KTAdminDispatcher | ||
| 43 | { | 43 | { |
| 44 | function check() { | 44 | function check() { |
| 45 | $this->aBreadcrumbs[] = array( | 45 | $this->aBreadcrumbs[] = array( |
| @@ -50,17 +50,14 @@ class RescheduleDocumentsDispatcher extends KTAdminDispatcher | @@ -50,17 +50,14 @@ class RescheduleDocumentsDispatcher extends KTAdminDispatcher | ||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | function do_main() { | 52 | function do_main() { |
| 53 | - | ||
| 54 | - //registerTypes registers the mime types and populates the needed tables. | 53 | + |
| 54 | + //registerTypes registers the mime types and populates the needed tables. | ||
| 55 | $indexer = Indexer::get(); | 55 | $indexer = Indexer::get(); |
| 56 | $indexer->registerTypes(); | 56 | $indexer->registerTypes(); |
| 57 | - | 57 | + |
| 58 | $oTemplating =& KTTemplating::getSingleton(); | 58 | $oTemplating =& KTTemplating::getSingleton(); |
| 59 | - $oTemplating->addLocation('Reschedule Documents', '/plugins/search2/reporting/templates'); | ||
| 60 | - | ||
| 61 | - | ||
| 62 | - $oTemplate =& $oTemplating->loadTemplate('rescheduledocuments'); | ||
| 63 | - | 59 | + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/rescheduledocuments'); |
| 60 | + | ||
| 64 | if ($_REQUEST['rescheduleValue'] == 'reschedule') | 61 | if ($_REQUEST['rescheduleValue'] == 'reschedule') |
| 65 | { | 62 | { |
| 66 | Indexer::indexAll(); | 63 | Indexer::indexAll(); |
| @@ -70,14 +67,14 @@ class RescheduleDocumentsDispatcher extends KTAdminDispatcher | @@ -70,14 +67,14 @@ class RescheduleDocumentsDispatcher extends KTAdminDispatcher | ||
| 70 | )); | 67 | )); |
| 71 | return $oTemplate; | 68 | return $oTemplate; |
| 72 | } | 69 | } |
| 73 | - | 70 | + |
| 74 | $oTemplate->setData(array( | 71 | $oTemplate->setData(array( |
| 75 | 'context' => $this, | 72 | 'context' => $this, |
| 76 | 'rescheduleDone' => false | 73 | 'rescheduleDone' => false |
| 77 | - | 74 | + |
| 78 | )); | 75 | )); |
| 79 | return $oTemplate; | 76 | return $oTemplate; |
| 80 | - } | 77 | + } |
| 81 | } | 78 | } |
| 82 | 79 | ||
| 83 | ?> | 80 | ?> |
plugins/search2/reporting/templates/extractorinfo.smarty renamed to templates/ktcore/search2/reporting/extractorinfo.smarty
plugins/search2/reporting/templates/indexerrors.smarty renamed to templates/ktcore/search2/reporting/indexerrors.smarty
plugins/search2/reporting/templates/managemimetypes.smarty renamed to templates/ktcore/search2/reporting/managemimetypes.smarty
plugins/search2/reporting/templates/pendingdocuments.smarty renamed to templates/ktcore/search2/reporting/pendingdocuments.smarty
plugins/search2/reporting/templates/rescheduledocuments.smarty renamed to templates/ktcore/search2/reporting/rescheduledocuments.smarty