/** * View items of the wurfl object * */ function wurfl_admin_view($args) { if (!xarSecurityCheck('ManageWurfl')) { return; } $modulename = 'wurfl'; // Define which object will be shown if (!xarVarFetch('objectname', 'str', $objectname, null, XARVAR_DONT_SET)) { return; } if (!empty($objectname)) { xarModUserVars::set($modulename, 'defaultmastertable', $objectname); } // Set a return url xarSession::setVar('ddcontext.' . $modulename, array('return_url' => xarServer::getCurrentURL())); // Get the available dropdown options $object = DataObjectMaster::getObjectList(array('objectid' => 1)); $data['objectname'] = xarModUserVars::get($modulename, 'defaultmastertable'); $items = $object->getItems(); $options = array(); foreach ($items as $item) { if (strpos($item['name'], $modulename) !== false) { $options[] = array('id' => $item['name'], 'name' => $item['name']); } } $data['options'] = $options; return $data; }
/** * Allows a user to modify their Calendar specific changes */ function calendar_user_updateconfig() { xarVarFetch('cal_sdow', 'int:0:6', $cal_sdow, xarModUserVars::get('calendar', 'cal_sdow')); xarModUserVars::set('calendar', 'cal_sdow', $cal_sdow); xarVarFetch('default_view', 'str::', $default_view, xarModUserVars::get('calendar', 'default_view')); xarModUserVars::set('calendar', 'default_view', $default_view); xarController::redirect(xarModURL('calendar', 'user', 'modifyconfig')); }