diff options
author | Jeffery To <jeffery.to@gmail.com> | 2009-06-26 15:42:37 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2009-06-26 15:42:37 +0800 |
commit | 71dc910a53eb2aba509c418e7ac0f8e9b94cba9a (patch) | |
tree | bf7299e5e55e69dc859a50df563e8ae59b56d4b4 /actions/showfavorites.php | |
parent | 65f784120b45dc187e28313fa2c2dca2c976c150 (diff) | |
parent | 97ee517680979bf12e82eab99ecf943712fe97c9 (diff) |
Merge branch '0.8.x' into notice-search-no-results
Diffstat (limited to 'actions/showfavorites.php')
-rw-r--r-- | actions/showfavorites.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/actions/showfavorites.php b/actions/showfavorites.php index 01f38a892..b723924a5 100644 --- a/actions/showfavorites.php +++ b/actions/showfavorites.php @@ -191,10 +191,21 @@ class ShowfavoritesAction extends CurrentUserDesignAction function showContent() { - $notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE, - NOTICES_PER_PAGE + 1); + $cur = common_current_user(); - if (!$notice) { + if (!empty($cur) && $cur->id == $this->user->id) { + + // Show imported/gateway notices as well as local if + // the user is looking at his own favorites + + $notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE, + NOTICES_PER_PAGE + 1, true); + } else { + $notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE, + NOTICES_PER_PAGE + 1, false); + } + + if (empty($notice)) { $this->serverError(_('Could not retrieve favorite notices.')); return; } |