$rows = db_execute_all("SELECT id FROM $projects_table WHERE type = ? AND status IN (?) ORDER BY created_on DESC", PROJECT_TYPE_NORMAL, $statuses);
} else {
$rows = db_execute_all("SELECT id FROM $projects_table WHERE type = ? ORDER BY created_on DESC", PROJECT_TYPE_NORMAL);
} // if
} else {
if($statuses) {
$rows = db_execute_all("SELECT $projects_table.id FROM $projects_table, $project_users_table WHERE $project_users_table.user_id = ? AND $project_users_table.project_id = $projects_table.id AND $projects_table.type = ? AND $projects_table.status IN (?) ORDER BY $projects_table.created_on DESC", $user->getId(), PROJECT_TYPE_NORMAL, $statuses);
} else {
$rows = db_execute_all("SELECT $projects_table.id FROM $projects_table, $project_users_table WHERE $project_users_table.user_id = ? AND $project_users_table.project_id = $projects_table.id AND $projects_table.type = ? ORDER BY $projects_table.created_on DESC", $user->getId(), PROJECT_TYPE_NORMAL);
Because if you have over 1300 projects, as we do, you have 130 pages of projects to sort through and thus currently we cannot use the Pin Projects feature at all.
Also, if changes are to be made to Active Projects, or the Dashboard at all, can we please take into consideration the following requests:
Annoucements box, with ability to put HTML links, and also choose which Clients receive these notifications (Clients, not user by User).
Modular design, can remove Active Projects box if wanted, to show more Recent Activities.
And finally, if the Active Projects box must remain, it should be broken up logically like Sorted by Date, and instead of Page numbers, 26 Letters of the Alphabet so you can simply list all projects starting with A, D, O etc.
Only then, can Pinning projects become useful for those who have more than a handful of projects (most corporate AC users).