/** * magic method to get variable from 'default' context * * @param string $name * @return mixed */ public function __get($name) { return OpsContext::get('default')->{$name}; }
function updateTime() { $team = $_POST['teamname']; $args = $_REQUEST; $this->menu = 'backup'; $this->view = 'calendar/addedittime'; $obj_assignee = new calendarConfig(); if ($args[btnSubmit]) { $this->invalid_crumb = 0; if (getenv(".bycrumb") != $_REQUEST['crumb']) { $this->invalid_crumb = 1; } if (!$this->invalid_crumb) { $dbh = Connection::cal_rw(); try { $res = $obj_assignee->updateTimeConfig($args, $dbh); } catch (Exception $e) { $messages = OpsContext::get('messages'); $messages->errors[] = $e->getMessage(); return forward_to('this', 'configTime'); } if ($res) { echo "<script language='javascript'>parent.window.location=parent.window.location</script>"; } else { return forward_to('this', 'configTime'); } } else { error("INVALID Crumb"); return forward_to('this', 'configTime'); } } else { return forward_to('this', 'configTime'); } }