diff options
author | Sem <sembrestels@riseup.net> | 2013-02-13 01:25:07 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2013-02-13 01:25:07 +0100 |
commit | 5aff5b3913fbb6226d8fb3162453c58888fba38d (patch) | |
tree | 2bf8fe649d8c9d09a3be03154c4c669bccfbc54c /engine/classes/ElggDiskFilestore.php | |
parent | 3ed289b03fa3d851fd7fffbc0441ebc9b5e98310 (diff) | |
parent | 8d3a7ab1755829c6e070a038d6b33e326de8fc8f (diff) | |
download | elgg-5aff5b3913fbb6226d8fb3162453c58888fba38d.tar.gz elgg-5aff5b3913fbb6226d8fb3162453c58888fba38d.tar.bz2 |
Merge tag '1.8.13' of git://github.com/Elgg/Elgg
Elgg 1.8.13 release
Diffstat (limited to 'engine/classes/ElggDiskFilestore.php')
-rw-r--r-- | engine/classes/ElggDiskFilestore.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/classes/ElggDiskFilestore.php b/engine/classes/ElggDiskFilestore.php index f00376481..7aace43ba 100644 --- a/engine/classes/ElggDiskFilestore.php +++ b/engine/classes/ElggDiskFilestore.php @@ -200,18 +200,18 @@ class ElggDiskFilestore extends ElggFilestore { * @return string The full path of where the file is stored */ public function getFilenameOnFilestore(ElggFile $file) { - $owner = $file->getOwnerEntity(); - if (!$owner) { - $owner = elgg_get_logged_in_user_entity(); + $owner_guid = $file->getOwnerGuid(); + if (!$owner_guid) { + $owner_guid = elgg_get_logged_in_user_guid(); } - if (!$owner) { + if (!$owner_guid) { $msg = elgg_echo('InvalidParameterException:MissingOwner', array($file->getFilename(), $file->guid)); throw new InvalidParameterException($msg); } - return $this->dir_root . $this->makefileMatrix($owner->guid) . $file->getFilename(); + return $this->dir_root . $this->makefileMatrix($owner_guid) . $file->getFilename(); } /** |