summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Thomas Rabe <m.rabe@echtzeitraum.de>2011-10-06 22:36:34 +0200
committerMarvin Thomas Rabe <m.rabe@echtzeitraum.de>2011-10-06 22:36:34 +0200
commitae56bb63c60f825136be97ddae32cc5b9cf4b062 (patch)
tree2c982341d90526518161b757de9730da0e66b210
parent543e8456b7427e0f82815ad592c0c5bcf9092cf4 (diff)
parent0cde2a314656b1818d15b64139cca038930e0c24 (diff)
downloadnextcloud-server-ae56bb63c60f825136be97ddae32cc5b9cf4b062.tar.gz
nextcloud-server-ae56bb63c60f825136be97ddae32cc5b9cf4b062.zip
Merge commit 'refs/merge-requests/52' of git://gitorious.org/owncloud/owncloud into merge-requests/52
-rw-r--r--apps/files_sharing/get.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/get.php b/apps/files_sharing/get.php
index 7d040689d41..ca95a68c6ce 100644
--- a/apps/files_sharing/get.php
+++ b/apps/files_sharing/get.php
@@ -30,8 +30,9 @@ if ($source !== false) {
foreach (OC_Files::getdirectorycontent($source) as $i) {
$i['date'] = OC_Util::formatDate($i['mtime'] );
if ($i['type'] == 'file') {
- $i['extention'] = substr($i['name'], strrpos($i['name'], "."));
- $i['basename'] = substr($i['name'], 0, strrpos($i['name'], "."));
+ $fileinfo = pathinfo($i['name']);
+ $i['basename'] = $fileinfo['filename'];
+ $i['extention'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : '';
}
$i['directory'] = substr($i['directory'], $rootLength);
if ($i['directory'] == "/") {