From b21f01f45a66ee279ce57785a89534d62f184b62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?=
'.''.get_lang("No").''.' | '.''.get_lang("Yes").''.'
'; - - Display::display_warning_message($message,false); - - if (Security::remove_XSS($_GET['copy']) == 'yes') - { + if (file_exists($copyfile)) { + $message = get_lang('AlreadyCopy').''; + if (!isset($_GET['copy'])){ + Display::display_warning_message($message,false); + } + if (Security::remove_XSS($_GET['copy']) == 'yes'){ if (!copy($file, $copyfile)) { Display::display_error_message(get_lang('CopyFailled')); }else{ - Display::display_confirmation_message(get_lang('CopyReleased')); + Display::display_confirmation_message(get_lang('FileOverwrited')); } } }else{ diff --git a/main/lang/english/document.inc.php b/main/lang/english/document.inc.php index fef44060d0..32a37ccff8 100644 --- a/main/lang/english/document.inc.php +++ b/main/lang/english/document.inc.php @@ -216,7 +216,12 @@ $HelpSharedFolder = "This directory contains the files that other learners (or y $TemplateImage = "Template's icon"; $MoveElement = "Move element"; $CertificateName = "Name"; -$CopyToMyFiles = "Copy to personal platform area my files"; +$CopyToMyFiles = "Copy to my personal area files"; $Export2PDF = "Export to PDF format"; $ResourceShared ="Resource shared"; +$AlreadyCopy="There is a file with the same name in your user area. Do you want replace it?"; +$CopyFailled="Copy failled"; +$CopyReleased="Copy released"; +$FileOverwrited="File replaced"; + ?> \ No newline at end of file diff --git a/main/lang/spanish/document.inc.php b/main/lang/spanish/document.inc.php index 8195987389..abbf792db2 100644 --- a/main/lang/spanish/document.inc.php +++ b/main/lang/spanish/document.inc.php @@ -216,7 +216,11 @@ $HelpSharedFolder = "Este directorio contiene los archivos que los estudiantes ( $TemplateImage = "Imagen de la plantilla"; $MoveElement = "Mover elemento"; $CertificateName = "Nombre del certificado"; -$CopyToMyFiles = "Copiar en mi área personal de archivos de la plataforma"; +$CopyToMyFiles = "Copiar en mi área personal de archivos"; $Export2PDF = "Exportar a formato PDF"; $ResourceShared ="Recurso compartido"; +$AlreadyCopy="Hay un archivo con el mismo nombre en su area de usuario. ¿Desea reemplazarlo?"; +$CopyFailled="Copia fallida"; +$CopyReleased="Copia realizada"; +$FileOverwrited="Archivo reemplazado"; ?> \ No newline at end of file