36 require_once
"classes/class.ilObjectGUI.php";
47 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
49 $this->lng->loadLanguageModule(
'search');
54 $next_class = $this->ctrl->getNextClass($this);
55 $cmd = $this->ctrl->getCmd();
60 case 'ilpermissiongui':
61 include_once(
"./classes/class.ilPermissionGUI.php");
63 $ret =& $this->ctrl->forwardCommand($perm_gui);
82 $this->ctrl->redirect($this,
"settings");
93 include_once
'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
97 if(!$rbacsystem->checkAccess(
'read',$this->object->getRefId()))
99 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
102 $this->
object->initSettingsObject();
104 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.seas_settings.html',
'Services/Search');
106 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
107 $this->tpl->setVariable(
"TXT_SEAS_TITLE",$this->lng->txt(
'seas_settings'));
110 $this->tpl->setVariable(
"TXT_MAX_HITS",$this->lng->txt(
'seas_max_hits'));
111 $this->tpl->setVariable(
"TXT_MAX_HITS_INFO",$this->lng->txt(
'seas_max_hits_info'));
112 for($i = 10; $i <= 100; $i += 10)
116 $this->tpl->setVariable(
'SELECT_MAX_HITS',
ilUtil::formSelect($this->object->settings_obj->getMaxHits(),
118 $max_hits,
false,
true));
120 $this->tpl->setVariable(
"TXT_DIRECT",$this->lng->txt(
'search_direct'));
121 $this->tpl->setVariable(
"TXT_INDEX",$this->lng->txt(
'search_index'));
123 $this->tpl->setVariable(
"TXT_TYPE",$this->lng->txt(
'search_type'));
124 $this->tpl->setVariable(
"TXT_LIKE_INFO",$this->lng->txt(
'search_like_info'));
125 $this->tpl->setVariable(
"TXT_FULL_INFO",$this->lng->txt(
'search_full_info'));
127 $this->tpl->setVariable(
"RADIO_TYPE_LIKE",
ilUtil::formRadioButton($this->object->settings_obj->enabledIndex() ? 0 : 1,
130 $this->tpl->setVariable(
"RADIO_TYPE_FULL",
ilUtil::formRadioButton($this->object->settings_obj->enabledIndex() ? 1 : 0,
134 $this->tpl->setVariable(
"TXT_LUCENE",$this->lng->txt(
'search_lucene'));
135 $this->tpl->setVariable(
"TXT_LUCENE_INFO",$this->lng->txt(
'search_lucene_info'));
137 $this->tpl->setVariable(
"CHECK_TYPE_LUCENE",ilUtil::formCheckBox($this->object->settings_obj->enabledLucene() ? 1 : 0,
143 $this->tpl->setVariable(
"CMD_SUBMIT",
'saveSettings');
144 $this->tpl->setVariable(
"TXT_SUBMIT",$this->lng->txt(
'save'));
145 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
156 include_once
'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
160 if(!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
162 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
165 $this->
object->initSettingsObject();
166 $this->
object->settings_obj->setMaxHits((
int) $_POST[
'max_hits']);
167 $this->
object->settings_obj->enableIndex($_POST[
'search_index']);
168 $this->
object->settings_obj->enableLucene($_POST[
'search_lucene']);
171 if($this->object->settings_obj->enabledLucene() and !$rpc_settings->pingServer())
174 $this->ctrl->redirect($this,
'settings');
179 $this->
object->settings_obj->update();
182 $this->ctrl->redirect($this,
'settings');
201 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
203 $tabs_gui->addTarget(
"settings",
204 $this->ctrl->getLinkTarget($this,
"settings"), array(
"settings",
"",
"view"),
"",
"");
207 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
209 $tabs_gui->addTarget(
"perm_settings",
210 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');