ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSearchController Class Reference
+ Collaboration diagram for ilSearchController:

Public Member Functions

 ilSearchController ()
 Constructor public.
 getLastClass ()
 setLastClass ($a_class)
executeCommand ()

Data Fields

 $ctrl = null
 $ilias = null
 $lng = null

Detailed Description

Definition at line 18 of file class.ilSearchController.php.

Member Function Documentation

& ilSearchController::executeCommand ( )

Definition at line 57 of file class.ilSearchController.php.

References $ilUser, ilSearchSettings\_getSearchSettingRefId(), getLastClass(), ilUtil\redirect(), and setLastClass().

{
global $rbacsystem,$ilUser;
// Check for incomplete profile
if($ilUser->getProfileIncomplete())
{
ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI');
}
// check whether password of user have to be changed
// due to first login or password of user is expired
if( $ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired() )
{
ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI');
}
include_once 'Services/Search/classes/class.ilSearchSettings.php';
// Check hacks
if(!$rbacsystem->checkAccess('search',ilSearchSettings::_getSearchSettingRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$forward_class = $this->ctrl->getNextClass($this) ? $this->ctrl->getNextClass($this) : $this->getLastClass();
switch($forward_class)
{
case 'illucenesearchgui':
$this->setLastClass('illucenesearchgui');
include_once './Services/Search/classes/Lucene/class.ilLuceneSearchGUI.php';
$this->ctrl->forwardCommand(new ilLuceneSearchGUI());
break;
case 'illuceneadvancedsearchgui':
$this->setLastClass('illuceneadvancedsearchgui');
include_once './Services/Search/classes/Lucene/class.ilLuceneAdvancedSearchGUI.php';
$this->ctrl->forwardCommand(new ilLuceneAdvancedSearchGUI());
break;
case 'iladvancedsearchgui':
// Remember last class
$this->setLastClass('iladvancedsearchgui');
include_once 'Services/Search/classes/class.ilAdvancedSearchGUI.php';
$this->ctrl->forwardCommand(new ilAdvancedSearchGUI());
break;
case 'ilsearchgui':
// Remember last class
$this->setLastClass('ilsearchgui');
default:
include_once 'Services/Search/classes/class.ilSearchGUI.php';
$search_gui = new ilSearchGUI();
$this->ctrl->forwardCommand($search_gui);
break;
}
$this->tpl->show();
return true;
}

+ Here is the call graph for this function:

ilSearchController::getLastClass ( )

Definition at line 38 of file class.ilSearchController.php.

References $_SESSION, and ilSearchSettings\getInstance().

Referenced by executeCommand().

{
include_once './Services/Search/classes/class.ilSearchSettings.php';
if(ilSearchSettings::getInstance()->enabledLucene())
{
$default = 'illucenesearchgui';
}
else
{
$default = 'ilsearchgui';
}
return $_SESSION['search_last_class'] ? $_SESSION['search_last_class'] : $default;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSearchController::ilSearchController ( )

Constructor public.

Definition at line 28 of file class.ilSearchController.php.

References $ilCtrl, $ilias, $lng, and $tpl.

{
$this->ilias = $ilias;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
$this->tpl = $tpl;
}
ilSearchController::setLastClass (   $a_class)

Definition at line 52 of file class.ilSearchController.php.

References $_SESSION.

Referenced by executeCommand().

{
$_SESSION['search_last_class'] = $a_class;
}

+ Here is the caller graph for this function:

Field Documentation

ilSearchController::$ctrl = null

Definition at line 20 of file class.ilSearchController.php.

ilSearchController::$ilias = null

Definition at line 21 of file class.ilSearchController.php.

Referenced by ilSearchController().

ilSearchController::$lng = null

Definition at line 22 of file class.ilSearchController.php.

Referenced by ilSearchController().


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