function do_main() { $oTemplating =& KTTemplating::getSingleton(); $oTemplate =& $oTemplating->loadTemplate('ktcore/search2/reporting/rescheduledocuments'); $rescheduleDone = $_REQUEST['rescheduleDone'] == 'true' ? 'true' : 'false'; $reprocessDone = $_REQUEST['reprocessDone'] == 'true' ? 'true' : 'false'; if ($_REQUEST['rescheduleValue'] == 'reschedule') { //registerTypes registers the mime types and populates the needed tables. $indexer = Indexer::get(); $indexer->registerTypes(); Indexer::indexAll(); $rescheduleDone = 'true'; } if ($_REQUEST['rescheduleValue'] == 'reprocess') { Indexer::processAll(); $reprocessDone = 'true'; } $oTemplate->setData(array('context' => $this, 'rescheduleDone' => $rescheduleDone, 'reprocessDone' => $reprocessDone)); return $oTemplate; }