CONTRIB-490 Fixed minor bugs uncovered by generator script

This commit is contained in:
nicolasconnault
2008-06-12 12:55:13 +00:00
parent 4c75028533
commit 415f8c3eeb
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -2213,6 +2213,11 @@ class context_to_string_translator{
function question_has_capability_on($question, $cap, $cachecat = -1){
global $USER, $DB;
// [email protected] In some cases I get $question === false. Since no such object exists, it can't be deleted, we can safely return true
if ($question === false) {
return true;
}
// these are capabilities on existing questions capabilties are
//set per category. Each of these has a mine and all version. Append 'mine' and 'all'
$question_questioncaps = array('edit', 'view', 'use', 'move');
+1 -1
View File
@@ -184,7 +184,7 @@ function forum_delete_instance($id) {
forum_tp_delete_read_records(-1, -1, -1, $forum->id);
if (!$DF->delete_records('forum', array('id'=>$forum->id))) {
if (!$DB->delete_records('forum', array('id'=>$forum->id))) {
$result = false;
}