diff options
-rw-r--r-- | apps/files/js/files.js | 18 | ||||
-rw-r--r-- | apps/files/lib/Helper.php | 1 | ||||
-rw-r--r-- | lib/private/legacy/helper.php | 4 |
3 files changed, 15 insertions, 8 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 977e642948c..3a08dda1cf9 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -73,6 +73,7 @@ $('#upload.button').attr('data-original-title', response.data.maxHumanFilesize); $('#usedSpacePercent').val(response.data.usedSpacePercent); $('#usedSpacePercent').data('mount-type', response.data.mountType); + $('#usedSpacePercent').data('mount-point', response.data.mountPoint); $('#owner').val(response.data.owner); $('#ownerDisplayName').val(response.data.ownerDisplayName); Files.displayStorageWarnings(); @@ -155,7 +156,8 @@ var usedSpacePercent = $('#usedSpacePercent').val(), owner = $('#owner').val(), ownerDisplayName = $('#ownerDisplayName').val(), - mountType = $('#usedSpacePercent').data('mount-type'); + mountType = $('#usedSpacePercent').data('mount-type'), + mountPoint = $('#usedSpacePercent').data('mount-point'); if (usedSpacePercent > 98) { if (owner !== OC.getCurrentUser().uid) { OC.Notification.show(t('files', 'Storage of {owner} is full, files can not be updated or synced anymore!', @@ -163,12 +165,14 @@ ); } else if (mountType === 'group') { OC.Notification.show(t('files', - 'This group folder is full, files can not be updated or synced anymore!'), + 'Group folder "{mountPoint}" is full, files can not be updated or synced anymore!', + {mountPoint: mountPoint}), {type: 'error'} ); } else if (mountType === 'external') { OC.Notification.show(t('files', - 'This external storage is full, files can not be updated or synced anymore!'), + 'External storage "{mountPoint}" is full, files can not be updated or synced anymore!', + {mountPoint: mountPoint}), {type : 'error'} ); } else { @@ -190,14 +194,14 @@ ); } else if (mountType === 'group') { OC.Notification.show(t('files', - 'This group folder is almost full ({usedSpacePercent}%)', - {usedSpacePercent: usedSpacePercent}), + 'Group folder "{mountPoint}" is almost full ({usedSpacePercent}%)', + {mountPoint: mountPoint, usedSpacePercent: usedSpacePercent}), {type : 'error'} ); } else if (mountType === 'external') { OC.Notification.show(t('files', - 'This external storage is almost full ({usedSpacePercent}%)', - {usedSpacePercent: usedSpacePercent}), + 'External storage "{mountPoint}" is almost full ({usedSpacePercent}%)', + {mountPoint: mountPoint, usedSpacePercent: usedSpacePercent}), {type : 'error'} ); } else { diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php index 46c97db94b9..294dd7e2a96 100644 --- a/apps/files/lib/Helper.php +++ b/apps/files/lib/Helper.php @@ -63,6 +63,7 @@ class Helper { 'owner' => $storageInfo['owner'], 'ownerDisplayName' => $storageInfo['ownerDisplayName'], 'mountType' => $storageInfo['mountType'], + 'mountPoint' => $storageInfo['mountPoint'], ]; } diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php index 0f7b2d1b3af..387999a96da 100644 --- a/lib/private/legacy/helper.php +++ b/lib/private/legacy/helper.php @@ -544,6 +544,7 @@ class OC_Helper { if($owner) { $ownerDisplayName = $owner->getDisplayName(); } + [,,,$mountPoint] = explode('/', $mount->getMountPoint(), 4); return [ 'free' => $free, @@ -553,7 +554,8 @@ class OC_Helper { 'relative' => $relative, 'owner' => $ownerId, 'ownerDisplayName' => $ownerDisplayName, - 'mountType' => $mount->getMountType() + 'mountType' => $mount->getMountType(), + 'mountPoint' => trim($mountPoint, '/'), ]; } |