ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjSearchSettingsGUI Class Reference
+ Inheritance diagram for ilObjSearchSettingsGUI:
+ Collaboration diagram for ilObjSearchSettingsGUI:

Public Member Functions

 ilObjSearchSettingsGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor public.
executeCommand ()
 execute command
 cancelObject ()
 settingsObject ()
 Show settings public.
 saveSettingsObject ()
 Save settings public.
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getTabs (&$tabs_gui)
 get tabs public
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Protected Member Functions

 initFormSettings ()
 Init settings form.
 updateSettingsObject ()
 Update Settings.
 luceneSettingsObject ()
 Lucene settings.
 initFormLuceneSettings ()
 Show lucene settings form.
 saveLuceneSettingsObject ()
 Save Lucene settings.
 advancedLuceneSettingsObject ()
 saveAdvancedLuceneSettingsObject ()
 initSubTabs ($a_section)
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput())
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false
const CFORM_NEW = 1
const CFORM_IMPORT = 2
const CFORM_CLONE = 3

Detailed Description

Definition at line 17 of file class.ilObjSearchSettingsGUI.php.

Member Function Documentation

ilObjSearchSettingsGUI::advancedLuceneSettingsObject ( )
protected

Definition at line 520 of file class.ilObjSearchSettingsGUI.php.

References ilLuceneAdvancedSearchSettings\getInstance(), and initSubTabs().

Referenced by saveAdvancedLuceneSettingsObject().

{
$this->initSubTabs('lucene');
$this->tabs_gui->setTabActive('lucene_advanced_settings');
include_once './Services/Search/classes/Lucene/class.ilLuceneAdvancedSearchActivationTableGUI.php';
include_once './Services/Search/classes/Lucene/class.ilLuceneAdvancedSearchSettings.php';
$table = new ilLuceneAdvancedSearchActivationTableGUI($this,'advancedLuceneSettings');
$table->setTitle($this->lng->txt('lucene_advanced_settings_table'));
$this->tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSearchSettingsGUI::cancelObject ( )

Definition at line 59 of file class.ilObjSearchSettingsGUI.php.

References ilUtil\sendInfo().

{
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
$this->ctrl->redirect($this, "settings");
}

+ Here is the call graph for this function:

& ilObjSearchSettingsGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 31 of file class.ilObjSearchSettingsGUI.php.

References $cmd, $ret, and ilObjectGUI\prepareOutput().

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch($next_class)
{
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
default:
if($cmd == "" || $cmd == "view")
{
$cmd = "settings";
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjSearchSettingsGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 126 of file class.ilObjSearchSettingsGUI.php.

References getTabs().

{
$this->getTabs($tabs_gui);
}

+ Here is the call graph for this function:

ilObjSearchSettingsGUI::getTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

Definition at line 136 of file class.ilObjSearchSettingsGUI.php.

Referenced by getAdminTabs().

{
global $rbacsystem;
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "settings"), array("settings","", "view"), "", "");
}
if($rbacsystem->checkAccess('read',$this->object->getRefId()))
{
$tabs_gui->addTarget('lucene_advanced_settings',
$this->ctrl->getLinkTarget($this,'advancedLuceneSettings'));
}
if($rbacsystem->checkAccess('read',$this->object->getRefId()))
{
$tabs_gui->addTarget('lucene_settings_tab',
$this->ctrl->getLinkTarget($this,'luceneSettings'));
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
}

+ Here is the caller graph for this function:

ilObjSearchSettingsGUI::ilObjSearchSettingsGUI (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor public.

Definition at line 23 of file class.ilObjSearchSettingsGUI.php.

References ilObjectGUI\ilObjectGUI().

{
$this->type = "seas";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
$this->lng->loadLanguageModule('search');
}

+ Here is the call graph for this function:

ilObjSearchSettingsGUI::initFormLuceneSettings ( )
protected

Show lucene settings form.

Parameters
@return

Definition at line 355 of file class.ilObjSearchSettingsGUI.php.

References ilSearchSettings\getInstance(), ilSearchSettings\getLuceneMimeFilterDefinitions(), ilFormPropertyGUI\setInfo(), ilCheckboxInputGUI\setOptionTitle(), ilFormPropertyGUI\setRequired(), ilDateTimeInputGUI\setShowTime(), and ilCheckboxInputGUI\setValue().

Referenced by luceneSettingsObject(), and saveLuceneSettingsObject().

{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
include_once './Services/Search/classes/class.ilSearchSettings.php';
$this->settings = ilSearchSettings::getInstance();
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this,'cancel'));
$this->form->setTitle($this->lng->txt('lucene_settings_title'));
$this->form->addCommandButton('saveLuceneSettings',$this->lng->txt('save'));
$this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
// Offline filter
/*
$offline = new ilCheckboxInputGUI($this->lng->txt('lucene_offline_filter_setting'),'offline_filter');
$offline->setInfo($this->lng->txt('lucene_offline_filter_setting_info'));
$offline->setValue(1);
$offline->setChecked($this->settings->isLuceneOfflineFilterEnabled());
$this->form->addItem($offline);
*/
// user search
$us = new ilCheckboxInputGUI($this->lng->txt('search_user_search_form'),'user_search_enabled');
$us->setInfo($this->lng->txt('search_user_search_info_form'));
$us->setValue(1);
$us->setChecked($this->settings->isLuceneUserSearchEnabled());
$this->form->addItem($us);
// Item filter
$if = new ilCheckboxInputGUI($this->lng->txt('search_mime_filter_form'),'mime_enabled');
$if->setValue(1);
$if->setChecked($this->settings->isLuceneMimeFilterEnabled());
$if->setInfo($this->lng->txt('search_item_filter_form_info'));
$this->form->addItem($if);
$mimes = $this->settings->getLuceneMimeFilter();
{
$ch = new ilCheckboxInputGUI($this->lng->txt($def['trans']),'mime['.$mime.']');
if(isset($mimes[$mime]) and $mimes[$mime])
{
$ch->setChecked(true);
}
$ch->setValue(1);
$if->addSubItem($ch);
}
$prefix = new ilCheckboxInputGUI($this->lng->txt('lucene_prefix_wildcard'),'prefix');
$prefix->setValue(1);
$prefix->setInfo($this->lng->txt('lucene_prefix_wildcard_info'));
$prefix->setChecked($this->settings->isPrefixWildcardQueryEnabled());
$this->form->addItem($prefix);
$numFrag = new ilNumberInputGUI($this->lng->txt('lucene_num_fragments'),'fragmentCount');
$numFrag->setRequired(true);
$numFrag->setSize(2);
$numFrag->setMaxLength(2);
$numFrag->setMinValue(1);
$numFrag->setMaxValue(10);
$numFrag->setInfo($this->lng->txt('lucene_num_frag_info'));
$numFrag->setValue($this->settings->getFragmentCount());
$this->form->addItem($numFrag);
$sizeFrag = new ilNumberInputGUI($this->lng->txt('lucene_size_fragments'),'fragmentSize');
$sizeFrag->setRequired(true);
$sizeFrag->setSize(2);
$sizeFrag->setMaxLength(4);
$sizeFrag->setMinValue(10);
$sizeFrag->setMaxValue(1000);
$sizeFrag->setInfo($this->lng->txt('lucene_size_frag_info'));
$sizeFrag->setValue($this->settings->getFragmentSize());
$this->form->addItem($sizeFrag);
$maxSub = new ilNumberInputGUI($this->lng->txt('lucene_max_sub'),'maxSubitems');
$maxSub->setRequired(true);
$maxSub->setSize(2);
$maxSub->setMaxLength(2);
$maxSub->setMinValue(1);
$maxSub->setMaxValue(10);
$maxSub->setInfo($this->lng->txt('lucene_max_sub_info'));
$maxSub->setValue($this->settings->getMaxSubitems());
$this->form->addItem($maxSub);
$relevance = new ilCheckboxInputGUI($this->lng->txt('lucene_relevance'),'relevance');
$relevance->setOptionTitle($this->lng->txt('lucene_show_relevance'));
$relevance->setInfo($this->lng->txt('lucene_show_relevance_info'));
$relevance->setValue(1);
$relevance->setChecked($this->settings->isRelevanceVisible());
$this->form->addItem($relevance);
// begin-patch mime_filter
$subrel = new ilCheckboxInputGUI('','subrelevance');
$subrel->setOptionTitle($this->lng->txt('lucene_show_sub_relevance'));
$subrel->setValue(1);
$subrel->setChecked($this->settings->isSubRelevanceVisible());
$relevance->addSubItem($subrel);
// end-patch mime_filter
$last_index = new ilDateTimeInputGUI($this->lng->txt('lucene_last_index_time'),'last_index');
$last_index->setShowTime(true);
$last_index->setDate($this->settings->getLastIndexTime());
$last_index->setInfo($this->lng->txt('lucene_last_index_time_info'));
$this->form->addItem($last_index);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSearchSettingsGUI::initFormSettings ( )
protected

Init settings form.

Returns
void

Definition at line 171 of file class.ilObjSearchSettingsGUI.php.

References $ilDB, ilObjectGUI\$lng, $options, $si, ilSearchSettings\getLuceneItemFilterDefinitions(), ilSearchSettings\INDEX_SEARCH, ilSearchSettings\LIKE_SEARCH, ilSearchSettings\LUCENE_SEARCH, ilSearchSettings\OPERATOR_AND, ilSearchSettings\OPERATOR_OR, ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setRequired(), ilCheckboxInputGUI\setValue(), ilSelectInputGUI\setValue(), and ilRadioGroupInputGUI\setValue().

Referenced by settingsObject(), and updateSettingsObject().

{
global $lng,$ilDB;
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
include_once './Services/Search/classes/class.ilSearchSettings.php';
$settings = new ilSearchSettings();
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this,'updateSettings'));
$this->form->addCommandButton('updateSettings',$this->lng->txt('save'));
$this->form->setTitle($this->lng->txt('seas_settings'));
// Max hits
$hits = new ilSelectInputGUI($this->lng->txt('seas_max_hits'),'max_hits');
$hits->setValue($settings->getMaxHits());
$hits->setRequired(true);
for($value = 5; $value <= 15; $value += 5)
{
$values[$value] = $value;
}
$hits->setOptions($values);
$hits->setInfo($this->lng->txt('seas_max_hits_info'));
$this->form->addItem($hits);
// Search type
$type = new ilRadioGroupInputGUI($this->lng->txt('search_type'),'search_type');
if($settings->enabledLucene())
{
}
elseif($settings->enabledIndex())
{
}
else
{
}
$type->setRequired(true);
$this->form->addItem($type);
// Default operator
$operator = new ilRadioGroupInputGUI($this->lng->txt('lucene_default_operator'),'operator');
$operator->setRequired(true);
$operator->setInfo($this->lng->txt('lucene_default_operator_info'));
$operator->setValue($settings->getDefaultOperator());
$and = new ilRadioOption($this->lng->txt('lucene_and'),ilSearchSettings::OPERATOR_AND);
$operator->addOption($and);
$or = new ilRadioOption($this->lng->txt('lucene_or'),ilSearchSettings::OPERATOR_OR);
$operator->addOption($or);
$this->form->addItem($operator);
// Item filter
$if = new ilCheckboxInputGUI($this->lng->txt('search_item_filter_form'),'if');
$if->setValue(1);
$if->setChecked($settings->isLuceneItemFilterEnabled());
$if->setInfo($this->lng->txt('search_item_filter_form_info'));
$this->form->addItem($if);
$filter = $settings->getLuceneItemFilter();
{
$ch = new ilCheckboxInputGUI($this->lng->txt($def['trans']),'filter['.$obj.']');
if(isset($filter[$obj]) and $filter[$obj])
{
$ch->setChecked(true);
}
$ch->setValue(1);
$if->addSubItem($ch);
}
// hide advanced search
$cb = new ilCheckboxInputGUI($lng->txt("search_hide_adv_search"), "hide_adv_search");
$cb->setChecked($settings->getHideAdvancedSearch());
$this->form->addItem($cb);
// number of auto complete entries
$options = array(
5 => 5,
10 => 10,
20 => 20,
30 => 30
);
$si = new ilSelectInputGUI($lng->txt("search_auto_complete_length"), "auto_complete_length");
$si->setOptions($options);
$val = ($settings->getAutoCompleteLength() > 0)
? $settings->getAutoCompleteLength()
: 10;
$si->setValue($val);
$this->form->addItem($si);
$direct = new ilRadioOption($this->lng->txt('search_direct'),ilSearchSettings::LIKE_SEARCH,$this->lng->txt('search_like_info'));
$type->addOption($direct);
if($ilDB->getDBType() == 'mysql')
{
$index = new ilRadioOption($this->lng->txt('search_index'),ilSearchSettings::INDEX_SEARCH,$this->lng->txt('search_full_info'));
$type->addOption($index);
}
$lucene = new ilRadioOption($this->lng->txt('search_lucene'),ilSearchSettings::LUCENE_SEARCH,$this->lng->txt('java_server_info'));
$type->addOption($lucene);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSearchSettingsGUI::initSubTabs (   $a_section)
protected

Definition at line 552 of file class.ilObjSearchSettingsGUI.php.

Referenced by advancedLuceneSettingsObject(), and luceneSettingsObject().

{
switch($a_section)
{
case 'lucene':
$this->tabs_gui->addSubTabTarget('lucene_general_settings',
$this->ctrl->getLinkTarget($this,'luceneSettings'));
break;
}
}

+ Here is the caller graph for this function:

ilObjSearchSettingsGUI::luceneSettingsObject ( )
protected

Lucene settings.

Parameters
@return

Definition at line 341 of file class.ilObjSearchSettingsGUI.php.

References initFormLuceneSettings(), and initSubTabs().

Referenced by saveLuceneSettingsObject().

{
$this->initSubTabs('lucene');
$this->tabs_gui->setTabActive('lucene_settings_tab');
$this->tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSearchSettingsGUI::saveAdvancedLuceneSettingsObject ( )
protected

Definition at line 535 of file class.ilObjSearchSettingsGUI.php.

References $_POST, advancedLuceneSettingsObject(), ilLuceneAdvancedSearchFields\getFields(), ilLuceneAdvancedSearchSettings\getInstance(), and ilUtil\sendInfo().

{
include_once './Services/Search/classes/Lucene/class.ilLuceneAdvancedSearchSettings.php';
foreach(ilLuceneAdvancedSearchFields::getFields() as $field => $translation)
{
$settings->setActive($field,in_array($field,(array) $_POST['fid']) ? true : false);
}
$settings->save();
ilUtil::sendInfo($this->lng->txt('settings_saved'));
}

+ Here is the call graph for this function:

ilObjSearchSettingsGUI::saveLuceneSettingsObject ( )
protected

Save Lucene settings.

Returns

Definition at line 471 of file class.ilObjSearchSettingsGUI.php.

References $_POST, $ilBench, $ilLog, $ilSetting, ilRpcClientFactory\factory(), ilSearchSettings\getInstance(), initFormLuceneSettings(), luceneSettingsObject(), ilUtil\sendFailure(), and ilUtil\sendInfo().

{
$settings->enableLuceneUserSearch((int) $_POST['user_search_enabled']);
$settings->setFragmentCount((int) $_POST['fragmentCount']);
$settings->setFragmentSize((int) $_POST['fragmentSize']);
$settings->setMaxSubitems((int) $_POST['maxSubitems']);
$settings->showRelevance((int) $_POST['relevance']);
$settings->enableLuceneOfflineFilter((int) $_POST['offline_filter']);
$settings->enableLuceneMimeFilter((int) $_POST['mime_enabled']);
$settings->setLuceneMimeFilter((array) $_POST['mime']);
$settings->showSubRelevance((int) $_POST['subrelevance']);
$settings->enablePrefixWildcardQuery((int) $_POST['prefix']);
if($this->form->checkInput())
{
$settings->setLastIndexTime($this->form->getItemByPostVar('last_index')->getDate());
$settings->update();
// refresh lucene server
$ilBench->start('Lucene','LuceneRefreshSettings');
try {
include_once './Services/WebServices/RPC/classes/class.ilRpcClientFactory.php';
ilRpcClientFactory::factory('RPCAdministration')->refreshSettings(
CLIENT_ID.'_'.$ilSetting->get('inst_id',0));
ilUtil::sendInfo($this->lng->txt('settings_saved'));
return true;
}
catch(Exception $e)
{
$ilLog->write(__METHOD__.': '.$e->getMessage());
ilUtil::sendFailure($e->getMessage());
return false;
}
}
ilUtil::sendInfo($this->lng->txt('err_check_input'));
return false;
}

+ Here is the call graph for this function:

ilObjSearchSettingsGUI::saveSettingsObject ( )

Save settings public.

Definition at line 87 of file class.ilObjSearchSettingsGUI.php.

References $_POST, ilRPCServerSettings\getInstance(), and ilUtil\sendInfo().

{
include_once 'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
global $rbacsystem;
if(!$rbacsystem->checkAccess('write',$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->object->initSettingsObject();
$this->object->settings_obj->setMaxHits((int) $_POST['max_hits']);
$this->object->settings_obj->enableIndex($_POST['search_index']);
$this->object->settings_obj->enableLucene($_POST['search_lucene']);
$this->object->settings_obj->setHideAdvancedSearch($_POST['hide_adv_search']);
$this->object->settings_obj->setAutoCompleteLength($_POST['auto_complete_length']);
$this->object->settings_obj->setDefaultOperator((int) $_POST['operator']);
$this->object->settings_obj->enableLuceneItemFilter((int) $_POST['if']);
$this->object->settings_obj->setLuceneItemFilter((array) $_POST['filter']);
if($this->object->settings_obj->enabledLucene() and !$rpc_settings->pingServer())
{
ilUtil::sendInfo($this->lng->txt('search_no_connection_lucene'),true);
$this->ctrl->redirect($this,'settings');
return false;
}
$this->object->settings_obj->update();
ilUtil::sendInfo($this->lng->txt('settings_saved'),true);
$this->ctrl->redirect($this,'settings');
return true;
}

+ Here is the call graph for this function:

ilObjSearchSettingsGUI::settingsObject ( )

Show settings public.

Definition at line 69 of file class.ilObjSearchSettingsGUI.php.

References $ilErr, and initFormSettings().

Referenced by updateSettingsObject().

{
global $ilAccess,$ilErr;
if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->MESSAGE);
}
$this->tabs_gui->setTabActive('settings');
$this->initFormSettings();
$this->tpl->setContent($this->form->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSearchSettingsGUI::updateSettingsObject ( )
protected

Update Settings.

Returns
void

Definition at line 289 of file class.ilObjSearchSettingsGUI.php.

References $_POST, $_SESSION, $ilErr, ilSearchSettings\INDEX_SEARCH, initFormSettings(), ilSearchSettings\LIKE_SEARCH, ilSearchSettings\LUCENE_SEARCH, ilUtil\sendSuccess(), and settingsObject().

{
global $ilAccess,$ilErr;
$this->initFormSettings();
$this->form->checkInput();
if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->MESSAGE);
}
include_once './Services/Search/classes/class.ilSearchSettings.php';
$settings = new ilSearchSettings();
$settings->setMaxHits((int) $_POST['max_hits']);
switch((int) $_POST['search_type'])
{
$settings->enableIndex(false);
$settings->enableLucene(false);
break;
$settings->enableIndex(true);
$settings->enableLucene(false);
break;
$settings->enableIndex(false);
$settings->enableLucene(true);
break;
}
$settings->setDefaultOperator((int) $_POST['operator']);
$settings->enableLuceneItemFilter((int) $_POST['if']);
$settings->setLuceneItemFilter((array) $_POST['filter']);
$settings->setHideAdvancedSearch($_POST['hide_adv_search']);
$settings->setAutoCompleteLength($_POST['auto_complete_length']);
$settings->update();
unset($_SESSION['search_last_class']);
ilUtil::sendSuccess($this->lng->txt('settings_saved'));
$this->settingsObject();
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: