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/Location.php';
00027
00028
00029
00030
00041
00042 class FF_ActionHandlerConfig_Location extends FF_ActionHandlerConfig {
00043
00044
00052 function loadConfig()
00053 {
00054 $appName = $this->actionHandler->o_registry->getCurrentApp();
00055 $this->actionHandler->setDefaultActionId(ACTION_LIST);
00056 $this->actionHandler->batchModifyActions(
00057 array(ACTION_LIST, ACTION_DELETE, ACTION_EDIT, ACTION_ADD, ACTION_EDIT_SUBMIT, ACTION_ADD_SUBMIT),
00058 $this->actionHandler->o_registry->getAppFile('Action', $appName, 'libs'),
00059 '_Location', 'Location');
00060 $this->actionHandler->o_model =& new FF_Model_Location();
00061 }
00062
00063
00064
00065
00074 function checkPerms()
00075 {
00076 $o_perms =& FF_Perms::factory();
00077 if (!$o_perms->hasPerm(array('can_use_location'))) {
00078 $this->actionHandler->setActionId(ACTION_PROBLEM);
00079 $o_output =& FF_Output::factory();
00080 $o_output->setMessage(_('You do not have permission to use the Location module.'), FASTFRAME_ERROR_MESSAGE);
00081 return false;
00082 }
00083
00084 return true;
00085 }
00086
00087
00088 }
00089 ?>