36 $this->user = $a_user_id;
37 $this->token = $a_token;
46 $query =
"SELECT * FROM cal_auth_token ".
47 "WHERE user_id = ".$ilDB->quote($a_user_id,
'integer').
' '.
48 "AND selection = ".$ilDB->quote($a_selection,
'integer').
' '.
49 "AND calendar = ".$ilDB->quote($a_calendar,
'integer');
67 $query =
"SELECT * FROM cal_auth_token ".
68 "WHERE hash = ".$ilDB->quote($a_token,
'text');
103 $this->selection_type = $a_type;
113 $this->calendar = $a_cal;
156 'ical' => array(
'clob',$this->
getIcal()),
157 'c_time' => array(
'integer',time())
160 'user_id' => array(
'integer',$this->
getUserId()),
161 'hash' => array(
'text',$this->
getToken())
174 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
197 $query =
"INSERT INTO cal_auth_token (user_id,hash,selection,calendar) ".
199 $ilDB->quote($this->
getUserId(),
'integer').
', '.
200 $ilDB->quote($this->
getToken(),
'text').
', '.
204 $ilDB->manipulate(
$query);
228 $query =
"SELECT * FROM cal_auth_token ".
229 "WHERE user_id = ".$ilDB->quote($this->
getUserId(),
'integer');
233 $query =
'SELECT * FROM cal_auth_token '.
234 'WHERE user_id = '.$ilDB->quote($this->
getUserId(),
'integer').
' '.
235 'AND hash = '.$ilDB->quote($this->
getToken(),
'text');
242 $this->token =
$row->hash;
243 $this->selection_type =
$row->selection;
244 $this->calendar =
$row->calendar;
245 $this->ical =
$row->ical;
246 $this->ical_ctime =
$row->c_time;