Skip to content

Commit fb93c9b

Browse files
committed
Merge branch '1.10.x' of https://github.com/chamilo/chamilo-lms into 1.10.x
2 parents d3a910d + 25a40cf commit fb93c9b

File tree

4 files changed

+84
-96
lines changed

4 files changed

+84
-96
lines changed

main/blog/blog.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@
7777
$blog_id,
7878
$safe_task_name,
7979
$safe_task_description,
80-
$_POST['chkArticleDelete'],
81-
$_POST['chkArticleEdit'],
82-
$_POST['chkCommentsDelete'],
83-
$_POST['task_color']
80+
(isset($_POST['chkArticleDelete']) ? $_POST['chkArticleDelete'] : null),
81+
(isset($_POST['chkArticleEdit']) ? $_POST['chkArticleEdit'] : null),
82+
(isset($_POST['chkCommentsDelete']) ? $_POST['chkCommentsDelete'] : null),
83+
(isset($_POST['task_color']) ? $_POST['task_color'] : null)
8484
);
8585
$return_message = array('type' => 'confirmation', 'message' => get_lang('TaskCreated'));
8686
}

main/blog/blog_admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// showing the header if we are not in the learning path, if we are in
3030
// the learning path, we do not include the banner so we have to explicitly
3131
// include the stylesheet, which is normally done in the header
32-
if ($_GET['origin'] != 'learnpath') {
32+
if (empty($_GET['origin']) || $_GET['origin'] != 'learnpath') {
3333
$interbreadcrumb[]= array ('url' => 'blog_admin.php?','name' => $nameTools);
3434
$my_url='';
3535
if (isset($_GET['action']) && $_GET['action']=='add') {

main/permissions/blog_permissions.inc.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}
5454

5555
//$user_id=$userIdViewed;
56-
if ($mainUserInfo['status'] == 1) {
56+
if (isset($mainUserInfo) && isset($mainUserInfo['status']) && $mainUserInfo['status'] == 1) {
5757
$course_admin = 1;
5858
}
5959

@@ -154,8 +154,7 @@
154154
echo "\t</tr>\n";
155155

156156
// the main area with the checkboxes or images
157-
foreach ($blog_users as $user_id => $user_name) // $blog_users contains all the users in this blog
158-
{
157+
foreach ($blog_users as $user_id => $user_name) { // $blog_users contains all the users in this blog
159158
// ---------------------------------------------------
160159
// RETRIEVING THE PERMISSIONS OF THE USER
161160
// ---------------------------------------------------
@@ -164,16 +163,21 @@
164163

165164
echo "\t<tr>\n";
166165
echo "\t\t<td>\n";
167-
echo $user_name;
166+
echo $user_name;
168167
echo "\t\t</td>\n";
169168

170-
foreach ($rights_full as $key => $value)
171-
{
169+
foreach ($rights_full as $key => $value) {
172170

173171
echo "\t\t<td align='center'>\n";
174-
if (in_array($value,$rights_blog))
175-
{
176-
display_image_matrix_for_blogs($current_user_permissions, $user_id, 'BLOG_'.$blog_id, $value,$inherited_permissions, $course_admin);
172+
if (in_array($value,$rights_blog)) {
173+
display_image_matrix_for_blogs(
174+
$current_user_permissions,
175+
$user_id,
176+
'BLOG_'.$blog_id,
177+
$value,
178+
(isset($inherited_permissions) ? $inherited_permissions : null),
179+
(isset($course_admin) ? $course_admin : null)
180+
);
177181
}
178182
// note: in a later stage this part will be replaced by a function
179183
// so that we can easily switch between a checkbox approach or an image approach

0 commit comments

Comments
 (0)