public function activityQuery($Join = true)
{
$this->SQL->select('a.*')->select('t.FullHeadline, t.ProfileHeadline, t.AllowComments, t.ShowIcon, t.RouteCode')->select('t.Name', '', 'ActivityType')->from('Activity a')->join('ActivityType t', 'a.ActivityTypeID = t.ActivityTypeID');
if ($Join) {
$this->SQL->select('au.Name', '', 'ActivityName')->select('au.Gender', '', 'ActivityGender')->select('au.Photo', '', 'ActivityPhoto')->select('au.Email', '', 'ActivityEmail')->select('ru.Name', '', 'RegardingName')->select('ru.Gender', '', 'RegardingGender')->select('ru.Email', '', 'RegardingEmail')->select('ru.Photo', '', 'RegardingPhoto')->join('User au', 'a.ActivityUserID = au.UserID')->join('User ru', 'a.RegardingUserID = ru.UserID', 'left');
}
$this->fireEvent('AfterActivityQuery');
}