diff --git a/main/dropbox/index.php b/main/dropbox/index.php index 998fcc5dbc..9fd8c8907d 100644 --- a/main/dropbox/index.php +++ b/main/dropbox/index.php @@ -371,16 +371,19 @@ if (!$_GET['view'] OR $_GET['view']=='received' OR $dropbox_cnf['sent_received_t { $dropbox_file_data[]=$dropbox_file->id; - $new_icon=''; - if (is_array($_SESSION['_seen'][$_course['id']][TOOL_DROPBOX])) + if (!is_array($_SESSION['_seen'][$_course['id']][TOOL_DROPBOX])) { - // new icon - if ($dropbox_file->last_upload_date > $last_access AND !in_array($dropbox_file->id,$_SESSION['_seen'][$_course['id']][TOOL_DROPBOX])) - { - $new_icon=' '.get_lang('New').''; - } + $_SESSION['_seen'][$_course['id']][TOOL_DROPBOX] = array(); + } + + // new icon + $new_icon=''; + if ($dropbox_file->last_upload_date > $last_access AND !in_array($dropbox_file->id,$_SESSION['_seen'][$_course['id']][TOOL_DROPBOX])) + { + $new_icon=' '.get_lang('New').''; } + $dropbox_file_data[]=build_document_icon_tag('file',$dropbox_file->title); $dropbox_file_data[]=''.get_lang('Save').''.$dropbox_file->title.''.$new_icon.'
'.$dropbox_file->description; $dropbox_file_data[]=ceil(($dropbox_file->filesize)/1024).' '.get_lang('kB');