@ -331,7 +331,7 @@ function display_myminimonthcalendar($agendaitems, $month, $year, $monthName) {
*/
function store_personal_item($day, $month, $year, $hour, $minute, $title, $content, $id = "") {
$tbl_personal_agenda = Database :: get_user_personal _table(TABLE_PERSONAL_AGENDA);
$tbl_personal_agenda = Database :: get_main _table(TABLE_PERSONAL_AGENDA);
//constructing the date
$date = $year."-".$month."-".$day." ".$hour.":".$minute.":00";
@ -415,7 +415,7 @@ function get_courses_of_user() {
* This function retrieves all the personal agenda items and add them to the agenda items found by the other functions.
*/
function get_personal_agenda_items($user_id, $agendaitems, $day = "", $month = "", $year = "", $week = "", $type) {
$tbl_personal_agenda = Database :: get_user_personal _table(TABLE_PERSONAL_AGENDA);
$tbl_personal_agenda = Database :: get_main _table(TABLE_PERSONAL_AGENDA);
$user_id = intval($user_id);
// 1. creating the SQL statement for getting the personal agenda items in MONTH view
@ -517,7 +517,7 @@ function get_personal_agenda_items($user_id, $agendaitems, $day = "", $month = "
* @return array The results of the database query, or null if not found
*/
function get_personal_agenda_item($id) {
$tbl_personal_agenda = Database :: get_user_personal _table(TABLE_PERSONAL_AGENDA);
$tbl_personal_agenda = Database :: get_main _table(TABLE_PERSONAL_AGENDA);
$id = intval($id);
// make sure events of the personal agenda can only be seen by the user himself
$user = api_get_user_id();
@ -537,7 +537,7 @@ function get_personal_agenda_item($id) {
function show_personal_agenda() {
global $MonthsLong, $charset;
$tbl_personal_agenda = Database :: get_user_personal _table(TABLE_PERSONAL_AGENDA);
$tbl_personal_agenda = Database :: get_main _table(TABLE_PERSONAL_AGENDA);
// The SQL statement that retrieves all the personal agenda items of this user
$sql = "SELECT * FROM ".$tbl_personal_agenda." WHERE user='".api_get_user_id()."' ORDER BY date DESC";
@ -641,7 +641,7 @@ function show_personal_agenda() {
function show_simple_personal_agenda($user_id) {
global $MonthsLong, $charset;
$tbl_personal_agenda = Database :: get_user_personal _table(TABLE_PERSONAL_AGENDA);
$tbl_personal_agenda = Database :: get_main _table(TABLE_PERSONAL_AGENDA);
// The SQL statement that retrieves all the personal agenda items of this user
$sql = "SELECT * FROM ".$tbl_personal_agenda." WHERE user='".$user_id."' ORDER BY date DESC";