-
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
[WIP] Fixed group share members search for mail notifications #12030
Conversation
multiple group. Issue #11808.
Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
@nickvergessen Care to review this? Thanks! |
@owncloud-bot This is okay to test. |
@owncloud-bot Retest this please. |
💣 Test FAILed. 💣 Build result: FAILURE[...truncated 10 lines...] > git config remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10 > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Cleaning workspace > git rev-parse --verify HEAD # timeout=10No valid HEAD. Skipping the resetting > git clean -fdx # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/12030/merge^{commit} # timeout=10Checking out Revision 2521a5f53c49ad5045b4cb3b0ff5913dfad55229 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f 2521a5f53c49ad5045b4cb3b0ff5913dfad55229 > git rev-list 79fbe9f32cf37db2c34d11fd8d23cfd7984c130e # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 second💣 Test FAILed. 💣 |
@popov-d Thanks for your contribution. This seems to fail for some unit tests as pointed out at https://ci.owncloud.org//job/pull-request-analyser-ng-simple/2368/label=vm-slave-02/. The SQL query seems also to be wrong according to the Jenkins log. Can I ask you to take a look at this? - If you need help to setup a proper test environment we can gladly help you with that. |
It seems that \OC_Group::getUserGroups($user) returns empty list. That can't happen when this method is called for a mail group notification, but in current version it is called also from other places. I need another commit. Should I make another pull request when it is ready? |
You can directly commit to your fork and it will appear on this pull request automatically. That's the cool thing about them :-) |
Avoid searching for empty group list in getItemSharedWithUser(). Broke tests in previous commit, #12030.
Here is the commit. When group list is empty, calling group query is useless. Just avoided it instead of making an SQL error. |
WHERE | ||
`' . $column . '` = ? AND `item_type` = ? AND `share_with` in (?)' | ||
); | ||
if(count($groups) > 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.
Just use if (!empty($groups)) {
instead
Sorry, I am not a PHP expert. A little more used with Perl. Changed. |
The inspection completed: 2 updated code elements |
Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
A question about previous note from owncloud-bot. I have already signed and sent the agreeemet when making first version of pull request. Should I repeat it or that version is enough? |
@karlitschek Can you confirm? |
I sent mail with the signed scan to frank@owncloud.com, as was suggested. From popov@krista.ru at 07.11.2014 16:12 MSK(+03). I can re-send it once more if needed, may be to another address? |
@popov-d Sorry. Could you email it again? |
I sent it again to the same address. |
@LukasReschke confirmed |
@owncloud-bot Retest this please. |
🚀 Test PASSed. 🚀 |
@popov-d Sorry for the delay on this one. Could you rebase this PR so we can finally merge it? Thanks! 😄 |
I don't think it's needed anymore. There was a slightly different change in the same place in 7.0.3 or 7.0.4 that also fixed the problem. It worked for me since that update and works now in 8.0, without any patching. Don't know who did it, but I think you better thank that person. |
Thanks for the feedback. Closing this one then 😄 |
#24800) * Fixed group share searching for members of multiple group. Issue #11808. * Fixed group share searching, continued. Avoid searching for empty group list in getItemSharedWithUser(). Broke tests in previous commit, #12030. * Simler check for group count. * Fix for #24783 , described there * Now it's #24272, 24783 was a duplicate. Previous change was also not very good. Now we don't create ZIP with a single file inside.
#24800) * Fixed group share searching for members of multiple group. Issue #11808. * Fixed group share searching, continued. Avoid searching for empty group list in getItemSharedWithUser(). Broke tests in previous commit, #12030. * Simler check for group count. * Fix for #24783 , described there * Now it's #24272, 24783 was a duplicate. Previous change was also not very good. Now we don't create ZIP with a single file inside.
Issue #11808, my changes described there yesterday.