Kalender Anpassungen
- Kalender Termin Kopierfeature
This commit is contained in:
@@ -1030,18 +1030,19 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
|||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
$db = self::dbKalender();
|
$db = self::dbKalender();
|
||||||
|
|
||||||
$res = $db->select("cal_events", 'id,microsoft_id,user_id,calendar_id', "id = '" . $id . "' LIMIT 1");
|
$res = $db->select("cal_events", 'id,microsoft_id,user_id,calendar_id,microsoft_ical_uid', "id = '" . $id . "' LIMIT 1");
|
||||||
if ($db->num_rows($res)) {
|
if ($db->num_rows($res)) {
|
||||||
$result = $db->fetch_object($res);
|
$result = $db->fetch_object($res);
|
||||||
$rescal = $db->select("cal_calendars", "id,ms_user_id", "id = '" . $result->calendar_id . "' LIMIT 1");
|
$resical = $db->select("cal_events", 'id,microsoft_id,user_id,calendar_id,microsoft_ical_uid', "microsoft_ical_uid = '" . $result->microsoft_ical_uid . "'");
|
||||||
|
while ($resultical = $db->fetch_object($resical)) {
|
||||||
|
$rescal = $db->select("cal_calendars", "id,ms_user_id", "id = '" . $resultical->calendar_id . "' LIMIT 1");
|
||||||
if ($db->num_rows($res)) {
|
if ($db->num_rows($res)) {
|
||||||
$resultcal = $db->fetch_object($rescal);
|
$resultcal = $db->fetch_object($rescal);
|
||||||
$microsoft_user_id = $resultcal->ms_user_id;
|
$microsoft_user_id = $resultcal->ms_user_id;
|
||||||
var_dump($resultcal);
|
|
||||||
}
|
}
|
||||||
$data = [];
|
$data = [];
|
||||||
$data['ms_user_id'] = $microsoft_user_id;
|
$data['ms_user_id'] = $microsoft_user_id;
|
||||||
$data['ms_event_id'] = $result->microsoft_id;
|
$data['ms_event_id'] = $resultical->microsoft_id;
|
||||||
$data['type'] = 'd';
|
$data['type'] = 'd';
|
||||||
$data['status'] = 'p';
|
$data['status'] = 'p';
|
||||||
$data['edit'] = time();
|
$data['edit'] = time();
|
||||||
@@ -1049,8 +1050,10 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
|||||||
$data['edit_by'] = 89;
|
$data['edit_by'] = 89;
|
||||||
$data['create_by'] = 89;
|
$data['create_by'] = 89;
|
||||||
$db->insert("TheTool_CalendarQueue", $data);
|
$db->insert("TheTool_CalendarQueue", $data);
|
||||||
|
$db->delete("cal_events", "id = '" . $resical->id . "'");
|
||||||
}
|
}
|
||||||
$db->delete("cal_events", "id = '" . $id . "'");
|
}
|
||||||
|
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user