mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge pull request #3865 from owncloud/fix_test_for_oracle
Fix sharing test for oracle
This commit is contained in:
commit
6ddfe2029c
1 changed files with 25 additions and 1 deletions
|
|
@ -963,6 +963,30 @@ class Share {
|
|||
$switchedItems = array();
|
||||
$mounts = array();
|
||||
while ($row = $result->fetchRow()) {
|
||||
if (isset($row['id'])) {
|
||||
$row['id']=(int)$row['id'];
|
||||
}
|
||||
if (isset($row['share_type'])) {
|
||||
$row['share_type']=(int)$row['share_type'];
|
||||
}
|
||||
if (isset($row['parent'])) {
|
||||
$row['parent']=(int)$row['parent'];
|
||||
}
|
||||
if (isset($row['file_parent'])) {
|
||||
$row['file_parent']=(int)$row['file_parent'];
|
||||
}
|
||||
if (isset($row['file_source'])) {
|
||||
$row['file_source']=(int)$row['file_source'];
|
||||
}
|
||||
if (isset($row['permissions'])) {
|
||||
$row['permissions']=(int)$row['permissions'];
|
||||
}
|
||||
if (isset($row['storage'])) {
|
||||
$row['storage']=(int)$row['storage'];
|
||||
}
|
||||
if (isset($row['stime'])) {
|
||||
$row['stime']=(int)$row['stime'];
|
||||
}
|
||||
// Filter out duplicate group shares for users with unique targets
|
||||
if ($row['share_type'] == self::$shareTypeGroupUserUnique && isset($items[$row['parent']])) {
|
||||
$row['share_type'] = self::SHARE_TYPE_GROUP;
|
||||
|
|
@ -978,7 +1002,7 @@ class Share {
|
|||
// Check if the same owner shared with the user twice
|
||||
// through a group and user share - this is allowed
|
||||
$id = $targets[$row[$column]];
|
||||
if ($items[$id]['uid_owner'] == $row['uid_owner']) {
|
||||
if (isset($items[$id]) && $items[$id]['uid_owner'] == $row['uid_owner']) {
|
||||
// Switch to group share type to ensure resharing conditions aren't bypassed
|
||||
if ($items[$id]['share_type'] != self::SHARE_TYPE_GROUP) {
|
||||
$items[$id]['share_type'] = self::SHARE_TYPE_GROUP;
|
||||
|
|
|
|||
Loading…
Reference in a new issue