Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Repository filtering in shares list for old-school links
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Sep 10, 2014
1 parent ee2b0ca commit e44641b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/plugins/action.share/class.ShareStore.php
Expand Up @@ -203,7 +203,11 @@ public function listShares($limitToUser = '', $parentRepository = '', $cursor =
$id = array_shift($ar);
$publicletData = $this->loadShare($id);
if($publicletData === false) continue;
if ($limitToUser && ( !isSet($publicletData["OWNER_ID"]) || $publicletData["OWNER_ID"] != $limitToUser )) {
if (!empty($limitToUser) && ( !isSet($publicletData["OWNER_ID"]) || $publicletData["OWNER_ID"] != $limitToUser )) {
continue;
}
if(!empty($parentRepository) && ( (is_string($publicletData["REPOSITORY"]) && $publicletData["REPOSITORY"] != $parentRepository)
|| (is_object($publicletData["REPOSITORY"]) && $publicletData["REPOSITORY"]->getUniqueId() != $parentRepository ) )){
continue;
}
$publicletData["SHARE_TYPE"] = "file";
Expand Down

0 comments on commit e44641b

Please sign in to comment.