diff --git a/main/forum/reply.php b/main/forum/reply.php index 40c0341ab5..473cfde914 100755 --- a/main/forum/reply.php +++ b/main/forum/reply.php @@ -67,7 +67,11 @@ if (!$_user['user_id'] AND $current_forum['allow_anonymous'] == 0) { } if ($current_forum['forum_of_group'] != 0) { - $show_forum = GroupManager::user_has_access(api_get_user_id(), $current_forum['forum_of_group'], GroupManager::GROUP_TOOL_FORUM); + $show_forum = GroupManager::user_has_access( + api_get_user_id(), + $current_forum['forum_of_group'], + GroupManager::GROUP_TOOL_FORUM + ); if (!$show_forum) { api_not_allowed(); } @@ -90,25 +94,52 @@ if (!empty($gradebook) && $gradebook == 'view') { if ($origin == 'group') { $_clean['toolgroup'] = (int)$_SESSION['toolgroup']; $group_properties = GroupManager :: get_group_properties($_clean['toolgroup']); - $interbreadcrumb[] = array('url' => '../group/group.php', 'name' => get_lang('Groups')); - $interbreadcrumb[] = array('url' => '../group/group_space.php?gidReq='.$_SESSION['toolgroup'], 'name' => get_lang('GroupSpace').' '.$group_properties['name']); - $interbreadcrumb[] = array('url' => 'viewforum.php?origin='.$origin.'&forum='.Security::remove_XSS($_GET['forum']), 'name' => $current_forum['forum_title']); - $interbreadcrumb[] = array('url' => 'viewthread.php?origin='.$origin.'&gradebook='.$gradebook.'&forum='.Security::remove_XSS($_GET['forum']).'&thread='.Security::remove_XSS($_GET['thread']), 'name' => $current_thread['thread_title']); - $interbreadcrumb[] = array('url' => 'javascript: void(0);', 'name' => get_lang('Reply')); + $interbreadcrumb[] = array( + 'url' => '../group/group.php?'.api_get_cidreq(), + 'name' => get_lang('Groups'), + ); + $interbreadcrumb[] = array( + 'url' => '../group/group_space.php?'.api_get_cidreq(), + 'name' => get_lang('GroupSpace').' '.$group_properties['name'], + ); + $interbreadcrumb[] = array( + 'url' => 'viewforum.php?origin='.$origin.'&forum='.intval($_GET['forum']).'&'.api_get_cidreq(), + 'name' => $current_forum['forum_title'], + ); + $interbreadcrumb[] = array( + 'url' => 'viewthread.php?origin='.$origin.'&gradebook='.$gradebook.'&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&'.api_get_cidreq(), + 'name' => $current_thread['thread_title'], + ); + $interbreadcrumb[] = array( + 'url' => 'javascript: void(0);', + 'name' => get_lang('Reply'), + ); } else { - $interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook, 'name' => $nameTools); - $interbreadcrumb[] = array('url' => 'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'], 'name' => $current_forum_category['cat_title']); - $interbreadcrumb[] = array('url' => 'viewforum.php?origin='.$origin.'&forum='.Security::remove_XSS($_GET['forum']), 'name' => $current_forum['forum_title']); - $interbreadcrumb[] = array('url' => 'viewthread.php?origin='.$origin.'&gradebook='.$gradebook.'&forum='.Security::remove_XSS($_GET['forum']).'&thread='.Security::remove_XSS($_GET['thread']), 'name' => $current_thread['thread_title']); + $interbreadcrumb[] = array( + 'url' => 'index.php?gradebook='.$gradebook, + 'name' => $nameTools, + ); + $interbreadcrumb[] = array( + 'url' => 'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'].'&'.api_get_cidreq(), + 'name' => $current_forum_category['cat_title'], + ); + $interbreadcrumb[] = array( + 'url' => 'viewforum.php?origin='.$origin.'&forum='.intval($_GET['forum']).'&'.api_get_cidreq(), + 'name' => $current_forum['forum_title'], + ); + $interbreadcrumb[] = array( + 'url' => 'viewthread.php?origin='.$origin.'&gradebook='.$gradebook.'&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&'.api_get_cidreq(), + 'name' => $current_thread['thread_title'], + ); $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Reply')); } /* Resource Linker */ -if (isset($_POST['add_resources']) AND $_POST['add_resources'] == get_lang('Resources')) { - $_SESSION['formelements'] = $_POST; - $_SESSION['origin'] = $_SERVER['REQUEST_URI']; - $_SESSION['breadcrumbs'] = $interbreadcrumb; +if (isset($_POST['add_resources']) && $_POST['add_resources'] == get_lang('Resources')) { + $_SESSION['formelements'] = $_POST; + $_SESSION['origin'] = $_SERVER['REQUEST_URI']; + $_SESSION['breadcrumbs'] = $interbreadcrumb; header('Location: ../resourcelinker/resourcelinker.php'); exit; } @@ -151,7 +182,9 @@ if ($origin != 'learnpath') { } /*New display forum div*/ echo '
'.prepare4display($current_forum['forum_comment']).'
'; echo '
';
+ $blog_post_actions .= '
';
if (api_is_allowed('BLOG_' . $blog_id, 'article_delete', $task_id))
- $blog_post_actions .= '
';
+ $blog_post_actions .= '
';
if(api_is_allowed('BLOG_' . $blog_id, 'article_rate'))
$rating_select = Blog::display_rating_form('post',$blog_id,$post_id);
@@ -999,7 +999,7 @@ class Blog
// Display post
echo '
'; }
+ if(api_is_allowed('BLOG_' . $blog_id, 'article_comments_delete', $task_id)) { $blog_comment_actions .= '
'; }
if(api_is_allowed('BLOG_' . $blog_id, 'article_comments_rate')) { $rating_select = Blog::display_rating_form('comment', $blog_id, $post_id, $comment['comment_id']); }
if (!is_null($comment['task_id'])) {
@@ -1349,10 +1349,10 @@ class Blog
global $color2;
echo '
' . get_lang('AddTasks') . ' ';
- echo '
' . get_lang('AssignTasks') . '';
+ echo '
' . get_lang('AddTasks') . ' ';
+ echo '
' . get_lang('AssignTasks') . '';
?>
-
+
';
@@ -1385,7 +1385,7 @@ class Blog
$css_class = (($counter % 2) == 0) ? "row_odd" : "row_even";
$delete_icon = ($task['system_task'] == '1') ? "delete_na.gif" : "delete.gif";
$delete_title = ($task['system_task'] == '1') ? get_lang('DeleteSystemTask') : get_lang('DeleteTask');
- $delete_link = ($task['system_task'] == '1') ? '#' : api_get_self() . '?action=manage_tasks&blog_id=' . $task['blog_id'] . '&do=delete&task_id=' . $task['task_id'];
+ $delete_link = ($task['system_task'] == '1') ? '#' : api_get_self() . '?action=manage_tasks&blog_id=' . $task['blog_id'] . '&do=delete&task_id=' . $task['task_id'];
$delete_confirm = ($task['system_task'] == '1') ? '' : 'onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset)). '\')) return false;"';
echo '
',
"\n",
''.stripslashes($assignment['description']) . '
',
"\n",
- '',
"\n",
@@ -1500,7 +1500,7 @@ class Blog
);
// form
- echo '