Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Thomas Rabe <m.rabe@echtzeitraum.de>2011-10-07 00:36:34 +0400
committerMarvin Thomas Rabe <m.rabe@echtzeitraum.de>2011-10-07 00:36:34 +0400
commitae56bb63c60f825136be97ddae32cc5b9cf4b062 (patch)
tree2c982341d90526518161b757de9730da0e66b210 /apps/files_sharing
parent543e8456b7427e0f82815ad592c0c5bcf9092cf4 (diff)
parent0cde2a314656b1818d15b64139cca038930e0c24 (diff)
Merge commit 'refs/merge-requests/52' of git://gitorious.org/owncloud/owncloud into merge-requests/52
Diffstat (limited to 'apps/files_sharing')
-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'] == "/") {