00001 <?php
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 require_once FASTFRAME_ROOT . 'lib/FastFrame/ActionHandlerConfig.php';
00026 require_once dirname(__FILE__) . '/../Model/Filter.php';
00027 require_once dirname(__FILE__) . '/actions.php';
00028
00029
00030
00031
00042
00043 class FF_ActionHandlerConfig_Filter extends FF_ActionHandlerConfig {
00044
00045
00053 function loadConfig()
00054 {
00055 $appName = $this->actionHandler->o_registry->getCurrentApp();
00056 $this->actionHandler->setDefaultActionId(ACTION_LIST);
00057 $this->actionHandler->batchModifyActions(
00058 array(ACTION_LIST, ACTION_DELETE, ACTION_EDIT, ACTION_ADD, ACTION_EDIT_SUBMIT, ACTION_ADD_SUBMIT),
00059 $this->actionHandler->o_registry->getAppFile('Action', $appName, 'libs'),
00060 '_Filter', 'Filter');
00061 $this->actionHandler->o_model =& new FF_Model_Filter();
00062 }
00063
00064
00065
00066
00075 function checkPerms()
00076 {
00077 $o_perms =& FF_Perms::factory();
00078 if (!$o_perms->hasPerm(array('can_use_filter'))) {
00079 $this->actionHandler->setActionId(ACTION_PROBLEM);
00080 $o_output =& FF_Output::factory();
00081 $o_output->setMessage(_('You do not have permission to use the Filter module.'), FASTFRAME_ERROR_MESSAGE);
00082 return false;
00083 }
00084
00085 return true;
00086 }
00087
00088
00089 }
00090 ?>