[svn r16300] Fix include bug in Oogie when search server not installed

skala
Yannick Warnier 16 years ago
parent 072b1c6ebd
commit 1aa258d0fb
  1. 9
      main/newscorm/openoffice_presentation.class.php
  2. 2
      main/upload/upload_ppt.php

@ -12,8 +12,11 @@
* @package dokeos.learnpath.openofficedocument
*/
require_once('openoffice_document.class.php');
require_once(api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php');
require_once(api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php');
if(api_get_setting('search_enabled')==='true') //the true condition here should be if xapian module is installed
{
require_once(api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php');
require_once(api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php');
}
class OpenofficePresentation extends OpenofficeDocument {
@ -108,7 +111,7 @@ class OpenofficePresentation extends OpenofficeDocument {
}
}
// code for text indexing
if (isset($_POST['index_document']) && $_POST['index_document']) {
if (isset($_POST['index_document']) && $_POST['index_document'] && api_get_setting('search_enabled')==='true') {
//Display::display_normal_message(print_r($_POST));
$di = new DokeosIndexer();
isset($_POST['language'])? $lang=Database::escape_string($_POST['language']): $lang = 'english';

@ -164,7 +164,7 @@ $renderer->setElementTemplate($user_file_template);
$form -> addElement ('file', 'user_file','<img src="../img/powerpoint_big.gif" align="absbottom" />&nbsp;&nbsp;');
$form -> addElement ('checkbox', 'take_slide_name','', get_lang('TakeSlideName'));
if(api_get_setting('search_enabled')=='true')
if(api_get_setting('search_enabled')==='true')
{
$form -> addElement ('checkbox', 'index_document','', get_lang('SearchFeatureDoIndexDocument'));
$form -> addElement ('text', 'terms', get_lang('SearchFeatureDocumentTagsIfIndexing').': ');

Loading…
Cancel
Save