Skip to content

Commit

Permalink
Set default value auth_cat_child see #7823
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Sep 9, 2015
1 parent ad349c4 commit 5a9ae88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main/inc/lib/course_category.lib.php
Expand Up @@ -140,7 +140,8 @@ function addNode($code, $name, $canHaveCourses, $parent_id)
'parent_id' => empty($parent_id) ? '' : $parent_id,
'tree_pos' => $tree_pos,
'children_count' => 0,
'auth_course_child' => $canHaveCourses
'auth_course_child' => $canHaveCourses,
'auth_cat_child' => 'TRUE'
];

$categoryId = Database::insert($tbl_category, $params);
Expand Down Expand Up @@ -242,7 +243,8 @@ function editNode($code, $name, $canHaveCourses, $old_code)
Database::query($sql);

// Updating course category
$sql = "UPDATE $tbl_course SET category_code = '$code' WHERE category_code = '$old_code' ";
$sql = "UPDATE $tbl_course SET category_code = '$code'
WHERE category_code = '$old_code' ";
Database::query($sql);
return true;
}
Expand Down

0 comments on commit 5a9ae88

Please sign in to comment.