From 5f2932d70c6e54f5fbd4870386e1248d51036c2a Mon Sep 17 00:00:00 2001 From: Carlos Vargas Date: Mon, 4 Jan 2010 10:55:26 -0500 Subject: [PATCH 1/2] complete reminder mail to users without task see BT#489 --- main/work/work.lib.php | 5 +++-- main/work/work.php | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/main/work/work.lib.php b/main/work/work.lib.php index 9506a586f4..e077669b5e 100755 --- a/main/work/work.lib.php +++ b/main/work/work.lib.php @@ -104,8 +104,9 @@ function display_action_links($cur_dir_path, $always_show_tool_options, $always_ $display_output .= "". Display::return_icon('check.gif', get_lang('ViewUsersWithTask')).' '.get_lang('ViewUsersWithTask'). "\n"; - - $display_output .= "". + + $_SESSION['token'] = time(); + $display_output .= "". Display::return_icon('messagebox_warning.gif', get_lang('ReminderMessage')).' '.get_lang('ReminderMessage'). "\n"; } diff --git a/main/work/work.php b/main/work/work.php index ec11d3930a..7d103a245e 100755 --- a/main/work/work.php +++ b/main/work/work.php @@ -217,8 +217,12 @@ if (isset($_GET['list']) && Security::remove_XSS($_GET['list'])=='without') { $display_list_users_without_publication= false; } -if (isset($_GET['action']) && $_GET['action'] == 'send_mail') { - send_reminder_users_without_publication($publication['id']); + +if (isset($_GET['action']) && $_GET['action'] == 'send_mail') { + if ($_GET['sec_token'] == $_SESSION['token']) { + send_reminder_users_without_publication($publication['id']); + unset($_SESSION['token']); + } } api_protect_course_script(true); From 2eef59241045b4688d4ef70b0202a5585b55ca3a Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Mon, 4 Jan 2010 11:12:46 -0500 Subject: [PATCH 2/2] fixed intercrumpt for shared profile - partial CT#446 --- main/social/home.php | 2 +- main/social/profile.php | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/main/social/home.php b/main/social/home.php index 9919f4cb99..691514c1f4 100755 --- a/main/social/home.php +++ b/main/social/home.php @@ -18,7 +18,7 @@ $show_full_profile = true; //social tab $this_section = SECTION_SOCIAL; -$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Social')); +$interbreadcrumb[]= array ('url' => 'home.php','name' => get_lang('Social')); $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Home')); api_block_anonymous_users(); diff --git a/main/social/profile.php b/main/social/profile.php index d7d30ee212..1f9cd80c01 100755 --- a/main/social/profile.php +++ b/main/social/profile.php @@ -187,10 +187,10 @@ if (isset($_GET['shared'])) { $my_link='../social/profile.php'; $link_shared=''; } -$interbreadcrumb[]= array ('url' =>'profile.php','name' => get_lang('Social') ); -$interbreadcrumb[]= array ('url' => '#', 'name' => get_lang('ViewMySharedProfile')); +$interbreadcrumb[]= array ('url' =>'home.php','name' => get_lang('Social') ); +$interbreadcrumb[]= array ('url' => 'profile.php?u='.api_get_user_id(), 'name' => get_lang('ViewMySharedProfile')); -if (isset($_GET['u']) && is_numeric($_GET['u'])) { +if (isset($_GET['u']) && is_numeric($_GET['u']) && $_GET['u'] != api_get_user_id()) { $info_user=api_get_user_info($_GET['u']); $interbreadcrumb[]= array ('url' => '#','name' => api_get_person_name($info_user['firstName'], $info_user['lastName'])); } @@ -207,8 +207,6 @@ $_SESSION['social_user_id'] = intval($user_id); */ Display :: display_header(null); - - // @todo here we must show the user information as read only //User picture size is calculated from SYSTEM path