diff --git a/plugins/search2/reporting/ExtractorInfo.php b/plugins/search2/reporting/ExtractorInfo.php index 48fc70d..788083f 100644 --- a/plugins/search2/reporting/ExtractorInfo.php +++ b/plugins/search2/reporting/ExtractorInfo.php @@ -6,42 +6,42 @@ * Document Management Made Simple * Copyright (C) 2008, 2009 KnowledgeTree Inc. * Portions copyright 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 KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, + * + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, * California 94120-7775, 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 + * must display the words "Powered by KnowledgeTree" and retain the original * copyright notice. * Contributor( s): ______________________________________ * */ - + require_once(KT_LIB_DIR . '/dispatcher.inc.php'); require_once(KT_LIB_DIR . '/templating/templating.inc.php'); require_once(KT_LIB_DIR . '/mime.inc.php'); class ExtractorInfoDispatcher extends KTAdminDispatcher { - + function check() { $this->aBreadcrumbs[] = array( @@ -52,60 +52,58 @@ class ExtractorInfoDispatcher extends KTAdminDispatcher { } function do_main() { - + //registerTypes registers the mime types and populates the needed tables. $indexer = Indexer::get(); $indexer->registerTypes(); - + $oTemplating =& KTTemplating::getSingleton(); - $oTemplating->addLocation('Extractor Information', '/plugins/search2/reporting/templates'); - - $oTemplate =& $oTemplating->loadTemplate('extractorinfo'); - + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/extractorinfo'); + $aExtractorInfo = KTMime::getMimeExtractorInformation(); - + if(empty($aExtractorInfo)) { $oTemplate->setData(array( 'context' => $this, 'extractor_info' => $aExtractorInfo )); - - return $oTemplate; + + return $oTemplate; } - + foreach($aExtractorInfo as $key=>$info) { $extractorClass = $info['name']; $extractor = $indexer->getExtractor($extractorClass); $info['mimeTypes'] = array(); $aMimeTypes = $this->getSupportedMimeTypesDB($extractorClass);//$extractor->getSupportedMimeTypes(); - - + + foreach($aMimeTypes as $mimeType) { - $sMimeInfo = KTMime::getFriendlyNameAndExtension($mimeType); - + $sMimeInfo = KTMime::getFriendlyNameAndExtension($mimeType); + $info['mimeTypes'][$mimeType] = array('description'=>$sMimeInfo[0]['friendly_name'], 'extensions'=>array($sMimeInfo[0]['filetypes'])); - + $extensions = array(); - foreach($sMimeInfo as $item) + foreach($sMimeInfo as $item) { $extensions[] = $item['filetypes']; } $info['mimeTypes'][$mimeType]['extensions'] = implode(', ', $extensions); } - - $aExtractorInfo[$key] = $info; + + $aExtractorInfo[$key] = $info; } - + $oTemplate->setData(array( 'context' => $this, 'extractor_info' => $aExtractorInfo )); return $oTemplate; } - + function getSupportedMimeTypesDB($sExtractorName) { $sQuery = "SELECT MT.mimetypes FROM mime_extractors as ME LEFT JOIN mime_types as MT ON " . @@ -118,7 +116,7 @@ class ExtractorInfoDispatcher extends KTAdminDispatcher { if(!in_array($aTempRes[$i]['mimetypes'], $aRes)) { $aRes[] = $aTempRes[$i]['mimetypes']; - + } } return $aRes; diff --git a/plugins/search2/reporting/IndexErrors.php b/plugins/search2/reporting/IndexErrors.php index 9636c8e..aab22e1 100644 --- a/plugins/search2/reporting/IndexErrors.php +++ b/plugins/search2/reporting/IndexErrors.php @@ -90,9 +90,7 @@ class IndexErrorsDispatcher extends KTAdminDispatcher { } $oTemplating =& KTTemplating::getSingleton(); - $oTemplating->addLocation('Index Errors', '/plugins/search2/reporting/templates'); - - $oTemplate =& $oTemplating->loadTemplate('indexerrors'); + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/indexerrors'); $aIndexerValues = Indexer::getIndexingQueue(); foreach($aIndexerValues as $key=>$doc) diff --git a/plugins/search2/reporting/ManageMimeTypes.php b/plugins/search2/reporting/ManageMimeTypes.php index 99f12e5..50dced6 100644 --- a/plugins/search2/reporting/ManageMimeTypes.php +++ b/plugins/search2/reporting/ManageMimeTypes.php @@ -6,40 +6,40 @@ * Document Management Made Simple * Copyright (C) 2008, 2009 KnowledgeTree Inc. * Portions copyright 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 KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, + * + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, * California 94120-7775, 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 + * must display the words "Powered by KnowledgeTree" and retain the original * copyright notice. * Contributor( s): ______________________________________ * */ -require_once(KT_LIB_DIR . '/dispatcher.inc.php'); -require_once(KT_LIB_DIR . '/templating/templating.inc.php'); +require_once(KT_LIB_DIR . '/dispatcher.inc.php'); +require_once(KT_LIB_DIR . '/templating/templating.inc.php'); require_once(KT_LIB_DIR . '/mime.inc.php'); -class ManageMimeTypesDispatcher extends KTAdminDispatcher { +class ManageMimeTypesDispatcher extends KTAdminDispatcher { function check() { $this->aBreadcrumbs[] = array( @@ -50,23 +50,21 @@ class ManageMimeTypesDispatcher extends KTAdminDispatcher { } function do_main() { - - //registerTypes registers the mime types and populates the needed tables. + + //registerTypes registers the mime types and populates the needed tables. $indexer = Indexer::get(); $indexer->registerTypes(); - + $oTemplating =& KTTemplating::getSingleton(); - $oTemplating->addLocation('Manage Mime Type Plugin', '/plugins/search2/reporting/templates'); + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/managemimetypes'); - $oTemplate =& $oTemplating->loadTemplate('managemimetypes'); - $aMimeTypes = KTMime::getAllMimeTypesInformation(); - - $indexer = Indexer::get(); - + + $indexer = Indexer::get(); + $numExtensions = 0; $numIndexedExtensions = 0; - + foreach($aMimeTypes as $key=>$mimeType) { $extractorClass = $mimeType['extractor']; @@ -78,21 +76,21 @@ class ManageMimeTypesDispatcher extends KTAdminDispatcher { $extractor = $indexer->getExtractor($extractorClass); $aMimeTypes[$key]['extractor'] = $extractor->getDisplayName(); $numIndexedExtensions++; - } - + } + $indexedPercentage = 0; if ($numExtensions > 0) { $indexedPercentage = number_format(($numIndexedExtensions * 100)/$numExtensions,2,'.',','); } - + $oTemplate->setData(array( 'context' => $this, 'mime_types' => $aMimeTypes, 'numExtensions'=>$numExtensions, 'numIndexedExtensions'=>$numIndexedExtensions, 'indexedPercentage'=>$indexedPercentage - + )); return $oTemplate; } diff --git a/plugins/search2/reporting/PendingDocuments.php b/plugins/search2/reporting/PendingDocuments.php index c7c04de..e0ba011 100644 --- a/plugins/search2/reporting/PendingDocuments.php +++ b/plugins/search2/reporting/PendingDocuments.php @@ -6,31 +6,31 @@ * Document Management Made Simple * Copyright (C) 2008, 2009 KnowledgeTree Inc. * Portions copyright 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 KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, + * + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, * California 94120-7775, 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 + * must display the words "Powered by KnowledgeTree" and retain the original * copyright notice. * Contributor( s): ______________________________________ * @@ -69,8 +69,7 @@ class PendingDocumentsDispatcher extends KTAdminDispatcher } $oTemplating =& KTTemplating::getSingleton(); - $oTemplating->addLocation('Pending Documents', '/plugins/search2/reporting/templates'); - $oTemplate =& $oTemplating->loadTemplate('pendingdocuments'); + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/pendingdocuments'); $config = KTConfig::getSingleton(); $rootUrl = $config->get('KnowledgeTree/rootUrl'); diff --git a/plugins/search2/reporting/RescheduleDocuments.php b/plugins/search2/reporting/RescheduleDocuments.php index de87997..533f9fc 100644 --- a/plugins/search2/reporting/RescheduleDocuments.php +++ b/plugins/search2/reporting/RescheduleDocuments.php @@ -6,40 +6,40 @@ * Document Management Made Simple * Copyright (C) 2008, 2009 KnowledgeTree Inc. * Portions copyright 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 KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, + * + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, * California 94120-7775, 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 + * must display the words "Powered by KnowledgeTree" and retain the original * copyright notice. * Contributor( s): ______________________________________ * */ - -require_once(KT_LIB_DIR . '/dispatcher.inc.php'); -require_once(KT_LIB_DIR . '/templating/templating.inc.php'); -class RescheduleDocumentsDispatcher extends KTAdminDispatcher +require_once(KT_LIB_DIR . '/dispatcher.inc.php'); +require_once(KT_LIB_DIR . '/templating/templating.inc.php'); + +class RescheduleDocumentsDispatcher extends KTAdminDispatcher { function check() { $this->aBreadcrumbs[] = array( @@ -50,17 +50,14 @@ class RescheduleDocumentsDispatcher extends KTAdminDispatcher } function do_main() { - - //registerTypes registers the mime types and populates the needed tables. + + //registerTypes registers the mime types and populates the needed tables. $indexer = Indexer::get(); $indexer->registerTypes(); - + $oTemplating =& KTTemplating::getSingleton(); - $oTemplating->addLocation('Reschedule Documents', '/plugins/search2/reporting/templates'); - - - $oTemplate =& $oTemplating->loadTemplate('rescheduledocuments'); - + $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/rescheduledocuments'); + if ($_REQUEST['rescheduleValue'] == 'reschedule') { Indexer::indexAll(); @@ -70,14 +67,14 @@ class RescheduleDocumentsDispatcher extends KTAdminDispatcher )); return $oTemplate; } - + $oTemplate->setData(array( 'context' => $this, 'rescheduleDone' => false - + )); return $oTemplate; - } + } } ?> diff --git a/plugins/search2/reporting/templates/extractorinfo.smarty b/templates/ktcore/search2/reporting/extractorinfo.smarty index 220f6fe..220f6fe 100644 --- a/plugins/search2/reporting/templates/extractorinfo.smarty +++ b/templates/ktcore/search2/reporting/extractorinfo.smarty diff --git a/plugins/search2/reporting/templates/indexerrors.smarty b/templates/ktcore/search2/reporting/indexerrors.smarty index 5cd2280..5cd2280 100644 --- a/plugins/search2/reporting/templates/indexerrors.smarty +++ b/templates/ktcore/search2/reporting/indexerrors.smarty diff --git a/plugins/search2/reporting/templates/managemimetypes.smarty b/templates/ktcore/search2/reporting/managemimetypes.smarty index f49e963..f49e963 100644 --- a/plugins/search2/reporting/templates/managemimetypes.smarty +++ b/templates/ktcore/search2/reporting/managemimetypes.smarty diff --git a/plugins/search2/reporting/templates/pendingdocuments.smarty b/templates/ktcore/search2/reporting/pendingdocuments.smarty index 3cc8a52..3cc8a52 100644 --- a/plugins/search2/reporting/templates/pendingdocuments.smarty +++ b/templates/ktcore/search2/reporting/pendingdocuments.smarty diff --git a/plugins/search2/reporting/templates/rescheduledocuments.smarty b/templates/ktcore/search2/reporting/rescheduledocuments.smarty index 77bdbf9..77bdbf9 100644 --- a/plugins/search2/reporting/templates/rescheduledocuments.smarty +++ b/templates/ktcore/search2/reporting/rescheduledocuments.smarty