diff --git a/calendar/edit_entry.php b/calendar/edit_entry.php index 28a013fd07..1279323923 100755 --- a/calendar/edit_entry.php +++ b/calendar/edit_entry.php @@ -21,7 +21,7 @@ if ($id > 0) { $can_edit = false; $phpgw->db->query("SELECT cal_id FROM webcal_entry_user WHERE cal_login=" - . "'" . $phpgw_info["user"]["userid"] . "' AND cal_id = $id"); + . "'" . $phpgw_info["user"]["account_id"] . "' AND cal_id = $id"); $phpgw->db->next_record(); if ($phpgw->db->f("cal_id") > 0) $can_edit = true; @@ -258,9 +258,10 @@ function validate_and_submit() { db->query("select account_lid,account_lastname, account_firstname from accounts where " - . "account_status !='L' and account_lid != '" . $phpgw_info["user"]["userid"] . "' and " - . "account_permissions like '%:calendar:%' order by account_lastname,account_firstname,account_lid"); + $phpgw->db->query("select account_id,account_lid,account_lastname, account_firstname from " + . "accounts where account_status !='L' and account_lid != '" + . $phpgw_info["user"]["userid"] . "' and account_permissions like '%:calendar:%' " + . "order by account_lastname,account_firstname,account_lid"); if ($phpgw->db->num_rows() > 50) $size = 15; @@ -273,8 +274,8 @@ function validate_and_submit() { . "\n" + . $phpgw_info["user"]["account_id"] ."\">" . "\n"; ?> diff --git a/calendar/edit_entry_handler.php b/calendar/edit_entry_handler.php index f28c54a7c2..b80da4d289 100755 --- a/calendar/edit_entry_handler.php +++ b/calendar/edit_entry_handler.php @@ -126,7 +126,7 @@ if (! $error) { $sql = "INSERT INTO webcal_entry (cal_create_by, cal_date, " . "cal_time, cal_mod_date, cal_mod_time, cal_duration, cal_priority, " . "cal_access, cal_type, cal_name, cal_description ) " . - "VALUES ('" . $phpgw_info["user"]["userid"] . "', "; + "VALUES ('" . $phpgw_info["user"]["account_id"] . "', "; $date = mktime(0,0,0,$month,$day,$year); $sql .= date("Ymd", $date) . ", "; diff --git a/calendar/inc/functions.inc.php b/calendar/inc/functions.inc.php index e0458fab4d..a942ad31a2 100755 --- a/calendar/inc/functions.inc.php +++ b/calendar/inc/functions.inc.php @@ -294,7 +294,7 @@ . "WHERE webcal_entry.cal_id = webcal_entry_repeats.cal_id " . "AND webcal_entry.cal_id = webcal_entry_user.cal_id " . "AND webcal_entry_groups.cal_id = webcal_entry.cal_id " - . "AND (webcal_entry_user.cal_login = '" . $phpgw_info["user"]["userid"] . "' OR (webcal_entry.cal_access='group' "; + . "AND (webcal_entry_user.cal_login = '" . $phpgw_info["user"]["account_id"] . "' OR (webcal_entry.cal_access='group' "; $group_names = $phpgw->accounts->read_group_names(); if ($group_names) { $sql .= " AND ("; @@ -377,7 +377,7 @@ . "ON webcal_entry_groups.cal_id=webcal_entry.cal_id " . "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' " . "AND webcal_entry.cal_type != 'M' " - . "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["userid"] . "' " + . "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["account_id"] . "' " . sql_search_calendar() . ") " . "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time"; } else { @@ -388,7 +388,7 @@ . "FROM webcal_entry, webcal_entry_user, webcal_entry_groups " . "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' " . "AND webcal_entry.cal_type != 'M' AND " - . "(webcal_entry_user.cal_login='" . $phpgw_info["user"]["userid"] . "' " + . "(webcal_entry_user.cal_login='" . $phpgw_info["user"]["account_id"] . "' " . " AND webcal_entry.cal_id=webcal_entry_user.cal_id OR " . "(webcal_entry_groups.cal_id=webcal_entry.cal_id " . sql_search_calendar() . ")) ORDER " @@ -548,7 +548,7 @@ . "ON webcal_entry_groups.cal_id=webcal_entry.cal_id " . "WHERE webcal_entry.cal_date='" . date("Ymd", $date) . "' " . "AND webcal_entry.cal_type != 'M' " - . "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["userid"] . "' " + . "AND (webcal_entry_user.cal_login='" . $phpgw_info["user"]["account_id"] . "' " . sql_search_calendar() . ") " . "ORDER BY webcal_entry.cal_priority, webcal_entry.cal_time"; diff --git a/calendar/search.php b/calendar/search.php index 48b253b833..2252f45709 100755 --- a/calendar/search.php +++ b/calendar/search.php @@ -51,7 +51,7 @@ . "webcal_entry_groups WHERE (UPPER(webcal_entry.cal_name) LIKE UPPER('%" . $words[$i] . "%') OR UPPER(webcal_entry.cal_description) " . "LIKE UPPER('%" . $words[$i] . "%')) AND (webcal_entry_user.cal_login = '" - . $phpgw_info["user"]["userid"] . "' OR (webcal_entry.cal_access='public' " + . $phpgw_info["user"]["account_id"] . "' OR (webcal_entry.cal_access='public' " . sql_search_calendar() . ")) ORDER BY cal_date"; $phpgw->db->query($sql); diff --git a/calendar/view.php b/calendar/view.php index a2d67508fb..7ca454ceba 100755 --- a/calendar/view.php +++ b/calendar/view.php @@ -196,7 +196,7 @@

link("edit_entry.php","id=$id") . "\">" . lang("Edit") . "
\nlink("delete.php","id=$id") . "\" onClick=\"return confirm('" . lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.") . "');\">" . lang("Delete") . "
\n"; diff --git a/calendar/week.php b/calendar/week.php index f42b2ca47b..f47d8862f5 100755 --- a/calendar/week.php +++ b/calendar/week.php @@ -137,7 +137,7 @@