[svn r22397] Only show "remind inactive user" link if the current user is allowed to edit (partially fixes private FS#4436)

skala
Yannick Warnier 16 years ago
parent 3118f115a2
commit d72202756e
  1. 2
      main/inc/lib/tracking.lib.php

@ -211,7 +211,7 @@ class Tracking {
//If the last connection is > than 7 days, the text is red
//345600 = 7 days in seconds
if ($currentTimestamp - $timestamp > 604800) {
return '<span style="color: #F00;">' . format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($last_login_date)) . ' <a href="'.api_get_path(REL_CODE_PATH).'announcements/announcements.php?action=add&remind_inactive='.$student_id.'" title="'.get_lang('RemindInactiveUser').'"><img align="middle" src="'.api_get_path(WEB_IMG_PATH).'messagebox_warning.gif" /></a></span>';
return '<span style="color: #F00;">' . format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($last_login_date)) . (api_is_allowed_to_edit()?' <a href="'.api_get_path(REL_CODE_PATH).'announcements/announcements.php?action=add&remind_inactive='.$student_id.'" title="'.get_lang('RemindInactiveUser').'"><img align="middle" src="'.api_get_path(WEB_IMG_PATH).'messagebox_warning.gif" /></a>':'').'</span>';
} else {
return format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($last_login_date));
}

Loading…
Cancel
Save