-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate post_groupDelete hook to share manager #23841
Conversation
b62c7d2
to
d067fa8
Compare
d067fa8
to
3c17669
Compare
Apparently I do something mysql does not like... I'll look into it |
3c17669
to
fe747c1
Compare
Ok, mysql is happy now as well. |
$cursor->closeCursor(); | ||
|
||
$offset = 0; | ||
$slice = array_slice($ids, $offset, 100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
array_chunk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes... lets use that indeed..
fe747c1
to
68953ab
Compare
} | ||
$cursor->closeCursor(); | ||
|
||
if (count($ids) > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!empty($ids)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
68953ab
to
1ec0865
Compare
The hook now calls the share manager that will call the responsible shareProvider to do the proper cleanup. * Unit tests added Again nothing should change it is just to cleanup old code
1ec0865
to
5899dda
Compare
Rebased to retrigger CI |
Tested and works 👍 |
$sql = 'SELECT `id` FROM `*PREFIX*share` WHERE `share_type` = ? AND `share_with` = ?'; | ||
$result = \OC_DB::executeAudited($sql, array(self::SHARE_TYPE_GROUP, $arguments['gid'])); | ||
while ($item = $result->fetchRow()) { | ||
Helper::delete($item['id']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete Helper::delete()
as well, or is it still used from elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay seems to be still used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah not yet... but 🔜
👍 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
For #22209
The hook now calls the share manager that will call the responsible
shareProvider to do the proper cleanup.
Again nothing should change it is just to cleanup old code
CC: @schiesbn @nickvergessen @PVince81 @MorrisJobke @DeepDiver1975