I feel responsible for fixing my mistakes.

We ( ahem I think I mean me mostly ) have been using a ham fisted way of adding conditions!

Here is an example of a line that can be simplified ...
FlagService::getFlaggings()

    // The user is supplied but the flag is not.
    if (!empty($account) && empty($flag)) {
       -$query = $query->condition('uid', $account->id());
       +$query->condition('uid', $account->id());
    }

I think this fixes all of them.

CommentFileSizeAuthor
flag-ham-chaining-0.patch1.76 KBmartin107

Comments

martin107 created an issue. See original summary.

martin107’s picture

Status: Active » Needs review
socketwench’s picture

Status: Needs review » Reviewed & tested by the community

Yep. Looks fixed throughout the module now.

joachim’s picture

Status: Reviewed & tested by the community » Fixed

I hadn't noticed myself. Thanks for the clean-up! :)

  • joachim committed 88cdb24 on 8.x-4.x authored by martin107
    Issue #2552143 by martin107: Removed needless assignment of result of...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.