Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
Merging to 2.8.x: SAK-21599 - Privacy status does not list your courses
Browse files Browse the repository at this point in the history
  • Loading branch information
nbotimer@unicon.net committed Jan 31, 2012
1 parent 78ca7d9 commit 60d1613
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -257,8 +257,12 @@ public SelectItem[] getSites() {
* @return true if there are no sites for the current user OR false otherwise
*/
public boolean getSitesEmpty() {
// sites has 1 item in it even if there are no sites in it
return (this.sites == null || this.sites.length <= 1);
// getSites always adds My Workspace, so we know whether it has run or
// not by checking if sites is empty; this avoids an extra query if it has.
if (sites == null || sites.length == 0) {
getSites();
}
return (sites == null || sites.length <= 1);
}

/** ========== processes iteraction on UI ========== */
Expand Down

0 comments on commit 60d1613

Please sign in to comment.