Avoid This AntiPattern
Limit your functions to doing just one thing by avoiding boolean arguments.
With one such argument, your function will be doing at least two things; and with two booleans... forget about it.
If you have a boolean argument, split that function up — one for the true case and one for the false.
Think of a boolean argument as an announcement to the world that your function does more than one thing (shame on you).
Remember, a function should do one thing, do it well, and do it only.