diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-02-16 11:48:34 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-02-16 11:48:34 -0200 |
commit | b6ee1b93376d42f8a8fcee0127bc10f84d1e018e (patch) | |
tree | cbde5e4d0b745c3bb854c215bccea8b2d6bb367e /engine/classes/ElggDiskFilestore.php | |
parent | 694306cf537fb8cb45beb7d4fd63c5b56cb5c4da (diff) | |
parent | 5aff5b3913fbb6226d8fb3162453c58888fba38d (diff) | |
download | elgg-b6ee1b93376d42f8a8fcee0127bc10f84d1e018e.tar.gz elgg-b6ee1b93376d42f8a8fcee0127bc10f84d1e018e.tar.bz2 |
Merge branch 'master' into saravea
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(); } /** |