Show "my files" icon if "users_copy_files" and "allow_my_files" are set to true see BT#10874

pull/2487/head
jmontoyaa 10 years ago
parent 23c07f91fe
commit 4aaf15e2ac
  1. 2
      main/document/document.php
  2. 6
      main/inc/lib/document.lib.php

@ -367,7 +367,7 @@ switch ($action) {
break;
case 'copytomyfiles':
// Copy a file to general my files user's
if (api_get_setting('allow_social_tool') == 'true' &&
if (api_get_setting('allow_my_files') == 'true' &&
api_get_setting('users_copy_files') == 'true'
&& api_get_user_id() != 0
&& !api_is_anonymous()

@ -5324,12 +5324,10 @@ class DocumentManager
}
// Copy files to users myfiles
if (api_get_setting('allow_social_tool') === 'true' &&
api_get_setting('users_copy_files') === 'true' &&
!api_is_anonymous()
if (api_get_setting('allow_my_files') === 'true' &&
api_get_setting('users_copy_files') === 'true'
) {
$copy_myfiles_link = ($filetype == 'file') ? api_get_self() . '?' . api_get_cidreq() . '&action=copytomyfiles&id=' . $document_data['id'] : api_get_self() . '?' . api_get_cidreq();
if ($filetype == 'file') {
$copy_to_myfiles = '<a href="' . $copy_myfiles_link . '" style="float:right"' . $prevent_multiple_click . '>' .

Loading…
Cancel
Save