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
00026 require_once FASTFRAME_ROOT . 'lib/FastFrame/ActionHandlerConfig.php';
00027 require_once dirname(__FILE__) . '/../Model/OverrideCode.php';
00028 require_once dirname(__FILE__) . '/actions.php';
00029
00030
00031
00032
00043
00044 class FF_ActionHandlerConfig_OverrideCode extends FF_ActionHandlerConfig {
00045
00046
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_EDIT, ACTION_ADD, ACTION_EDIT_SUBMIT, ACTION_ADD_SUBMIT, ACTION_DELETE, ACTION_DISPLAY),
00059 $this->actionHandler->o_registry->getAppFile('Action', $appName, 'libs'),
00060 '_OverrideCode',
00061 'OverrideCode'
00062 );
00063 $this->actionHandler->o_model =& new FF_Model_OverrideCode();
00064 }
00065
00066
00067
00068
00077 function checkPerms()
00078 {
00079 $o_perms =& FF_Perms::factory();
00080 if (!$o_perms->hasPerm(array('can_use_override_codes'))) {
00081 $this->actionHandler->setActionId(ACTION_PROBLEM);
00082 $o_output =& FF_Output::factory();
00083 $o_output->setMessage(_('You do not have permission to use the override codes module.'), FASTFRAME_ERROR_MESSAGE);
00084 return false;
00085 }
00086
00087 return true;
00088 }
00089
00090
00091 }
00092 ?>