Skip to content

Commit

Permalink
User in group can edit wiki page see BT#9422
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Feb 20, 2015
1 parent fb445f8 commit 132919c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions main/wiki/wiki.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4370,11 +4370,13 @@ public function showActionBar()
echo '</ul>';
echo '</li>';

//menu show page
// Menu show page
echo '<a href="index.php?cidReq='.$_course['id'].'&action=showpage&amp;title='.api_htmlentities(urlencode($page)).'&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab('showpage').'>'.
Display::return_icon('page.png',get_lang('ShowThisPage'),'',ICON_SIZE_MEDIUM).'</a>';

if (api_is_allowed_to_session_edit(false, true) && api_is_allowed_to_edit()) {
if (api_is_allowed_to_session_edit(false, true) && api_is_allowed_to_edit() ||
GroupManager::is_user_in_group(api_get_user_id(), api_get_group_id())
) {
// menu edit page

echo '<a href="index.php?cidReq=' . $_course['id'] . '&action=edit&amp;title=' . api_htmlentities(urlencode($page)) . '&session_id=' . $session_id . '&group_id=' . $groupId . '"' . self::is_active_navigation_tab('edit') . '>' .
Expand All @@ -4384,7 +4386,7 @@ public function showActionBar()
'',
ICON_SIZE_MEDIUM
) . '</a>';
//menu discuss page
// menu discuss page
echo '<a href="index.php?action=discuss&amp;title='.api_htmlentities(urlencode($page)).'"'.self::is_active_navigation_tab('discuss').'>'.
Display::return_icon('discuss.png',get_lang('DiscussThisPage'),'',ICON_SIZE_MEDIUM).'</a>';
}
Expand Down Expand Up @@ -4461,7 +4463,7 @@ public function editPage()
$groupId = $this->group_id;
$userId = api_get_user_id();

if (api_get_session_id() != 0 && api_is_allowed_to_session_edit(false,true)==false) {
if (api_get_session_id() != 0 && api_is_allowed_to_session_edit(false,true) == false) {
api_not_allowed();
}

Expand Down

0 comments on commit 132919c

Please sign in to comment.