This fixes two errors in the query used to count and fetch activities:
If "Display Campaign Title column" is enabled, the "activity" table alias is referenced before the table is joined.
If "Exclude Case Activities" is enabled, a logic error causes the case activity table not to be joined, causing an error when the table is referenced in a WHERE clause.
This fixes two errors in the query used to count and fetch activities:
Fixes #13