diff options
author | Srokap <srokap@gmail.com> | 2012-10-25 14:45:02 +0200 |
---|---|---|
committer | Srokap <srokap@gmail.com> | 2012-10-25 14:45:02 +0200 |
commit | ecc7c01cd8d0ac111767f22e935c81cc908e51c7 (patch) | |
tree | 23897cd50b793eb8a306512ddd4f1aac59c5e674 /engine/classes/ElggDiskFilestore.php | |
parent | 2c6403a38d45408892c7295157714ef55cbc1bbc (diff) | |
download | elgg-ecc7c01cd8d0ac111767f22e935c81cc908e51c7.tar.gz elgg-ecc7c01cd8d0ac111767f22e935c81cc908e51c7.tar.bz2 |
File access control omits now access to owner control.
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(); } /** |