From d34614b8d99e00a8297c5a049d56b71bd984f20b Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 10 May 2010 11:49:32 +0200 Subject: [PATCH] Fixing bug when creating a work item and then adding as an agenda event see CT#1239 --- main/work/work.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main/work/work.php b/main/work/work.php index 85a1142d44..f2cdccfc02 100755 --- a/main/work/work.php +++ b/main/work/work.php @@ -531,16 +531,16 @@ if (!empty($_REQUEST['new_dir'])) { $dir_name_sql = '/'.$created_dir; } - // insert into agenda - + // Insert into agenda $agenda_id = 0; - if (isset($_POST['add_to_calendar']) && $_POST['add_to_calendar'] == 1) { + if (isset($_POST['add_to_calendar']) && $_POST['add_to_calendar'] == 1) { require_once api_get_path(SYS_CODE_PATH).'calendar/agenda.inc.php'; require_once api_get_path(SYS_CODE_PATH).'resourcelinker/resourcelinker.inc.php'; $course = isset($course_info) ? $course_info : null; $content = ''.$_POST['new_dir'].' - '.$_POST['description']; - $agenda_id = agenda_add_item($course, $_POST['new_dir'], $content, date('Y-m-d H:i:s'), '0000-00-00', array('GROUP:'.$toolgroup), 0); - } + + $agenda_id = agenda_add_item($course, $_POST['new_dir'], $content, date('Y-m-d H:i:s'), date('Y-m-d H:i:s'), array('GROUP:'.$toolgroup), 0); + } $sql_add_publication = "INSERT INTO " . $work_table . " SET " . "url = '".Database::escape_string($dir_name_sql)."', title = '',