mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-19 09:18:18 +03:00
Фикс меню для текущего пользователя
This commit is contained in:
parent
df37791ef6
commit
7abd83dc92
|
@ -452,8 +452,18 @@ class ModuleUser extends Module
|
|||
{
|
||||
if ($this->oUserCurrent) {
|
||||
$this->Viewer_Assign('iUserCurrentCountTalkNew', $this->Talk_GetCountTalkNew($this->oUserCurrent->getId()));
|
||||
$this->Viewer_Assign('iUserCurrentCountTopicDraft',
|
||||
$this->Topic_GetCountDraftTopicsByUserId($this->oUserCurrent->getId()));
|
||||
$this->Viewer_Assign('iUserCurrentCountTopicDraft', $this->Topic_GetCountDraftTopicsByUserId($this->oUserCurrent->getId()));
|
||||
$this->Viewer_Assign('iUserCurrentCountWall', $this->Wall_GetCountWall(array('wall_user_id' => $this->oUserCurrent->getId(), 'pid' => null)));
|
||||
$this->Viewer_Assign('iUserCurrentCountFriends', $this->User_GetCountUsersFriend($this->oUserCurrent->getId()));
|
||||
|
||||
$iCountTopic = $this->Topic_GetCountTopicsPersonalByUser($this->oUserCurrent->getId(), 1);
|
||||
$iCountComment = $this->Comment_GetCountCommentsByUserId($this->oUserCurrent->getId(), 'topic');
|
||||
$iCountNote = $this->User_GetCountUserNotesByUserId($this->oUserCurrent->getId());
|
||||
$this->Viewer_Assign('iUserCurrentCountCreated', $iCountTopic + $iCountComment + $iCountNote);
|
||||
|
||||
$iCountTopicFavourite = $this->Topic_GetCountTopicsFavouriteByUserId($this->oUserCurrent->getId());
|
||||
$iCountCommentFavourite = $this->Comment_GetCountCommentsFavouriteByUserId($this->oUserCurrent->getId());
|
||||
$this->Viewer_Assign('iUserCurrentCountFavourite', $iCountTopicFavourite + $iCountCommentFavourite);
|
||||
}
|
||||
$this->Viewer_Assign('oUserCurrent', $this->oUserCurrent);
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
'classes' => 'nav-item--userbar-username',
|
||||
'menu' => [
|
||||
[ 'name' => 'whois', 'text' => {lang name='user.profile.nav.info'}, 'url' => "{$oUserCurrent->getUserWebPath()}" ],
|
||||
[ 'name' => 'wall', 'text' => {lang name='user.profile.nav.wall'}, 'url' => "{$oUserCurrent->getUserWebPath()}wall/", 'count' => $iCountWallUser ],
|
||||
[ 'name' => 'created', 'text' => {lang name='user.profile.nav.publications'}, 'url' => "{$oUserCurrent->getUserWebPath()}created/topics/", 'count' => $iCountCreated ],
|
||||
[ 'name' => 'favourites', 'text' => {lang name='user.profile.nav.favourite'}, 'url' => "{$oUserCurrent->getUserWebPath()}favourites/topics/", 'count' => $iCountFavourite ],
|
||||
[ 'name' => 'friends', 'text' => {lang name='user.profile.nav.friends'}, 'url' => "{$oUserCurrent->getUserWebPath()}friends/", 'count' => $iCountFriendsUser ],
|
||||
[ 'name' => 'wall', 'text' => {lang name='user.profile.nav.wall'}, 'url' => "{$oUserCurrent->getUserWebPath()}wall/", 'count' => $iUserCurrentCountWall ],
|
||||
[ 'name' => 'created', 'text' => {lang name='user.profile.nav.publications'}, 'url' => "{$oUserCurrent->getUserWebPath()}created/topics/", 'count' => $iUserCurrentCountCreated ],
|
||||
[ 'name' => 'favourites', 'text' => {lang name='user.profile.nav.favourite'}, 'url' => "{$oUserCurrent->getUserWebPath()}favourites/topics/", 'count' => $iUserCurrentCountFavourite ],
|
||||
[ 'name' => 'friends', 'text' => {lang name='user.profile.nav.friends'}, 'url' => "{$oUserCurrent->getUserWebPath()}friends/", 'count' => $iUserCurrentCountFriends ],
|
||||
[ 'name' => 'activity', 'text' => {lang name='user.profile.nav.activity'}, 'url' => "{$oUserCurrent->getUserWebPath()}stream/" ],
|
||||
[ 'name' => 'talk', 'text' => {lang name='user.profile.nav.messages'}, 'url' => "{router page='talk'}", 'count' => $iUserCurrentCountTalkNew ],
|
||||
[ 'name' => 'settings', 'text' => {lang name='user.profile.nav.settings'}, 'url' => "{router page='settings'}" ],
|
||||
|
|
Loading…
Reference in a new issue