]> git.mjollnir.org Git - moodle.git/commitdiff
removing deletions from {blog_association} from the core
authormudrd8mz <mudrd8mz>
Thu, 1 Oct 2009 14:41:20 +0000 (14:41 +0000)
committermudrd8mz <mudrd8mz>
Thu, 1 Oct 2009 14:41:20 +0000 (14:41 +0000)
The {blog_association} is not defined but it is still referenced in the
core functions. This seems to be some blog subsystem mess that prevents
the core from removing any activity module and the context. I am sorry
Nico if I break something in your current work...

course/lib.php
lib/accesslib.php

index c3d8a0f42555df0b4dd9bcf997773b501a627bb5..79d67717213980f215ba95219b13d36afa0ec1af 100644 (file)
@@ -2571,8 +2571,7 @@ function delete_course_module($id) {
     }
 
     delete_context(CONTEXT_MODULE, $cm->id);
-    return $DB->delete_records('course_modules', array('id'=>$cm->id)) &&
-           $DB->delete_records('blog_association', array('contextid'=>$context->id));
+    return $DB->delete_records('course_modules', array('id'=>$cm->id));
 }
 
 function delete_mod_from_section($mod, $section) {
index 54725a551319f0a97091a9ab304cbdb23b54c1a4..ae25b370769eb387ae680294ece04acbabbe1b96 100755 (executable)
@@ -2309,9 +2309,7 @@ function delete_context($contextlevel, $instanceid) {
         $result = $DB->delete_records('role_assignments', array('contextid'=>$context->id)) &&
                   $DB->delete_records('role_capabilities', array('contextid'=>$context->id)) &&
                   $DB->delete_records('context', array('id'=>$context->id)) &&
-                  $DB->delete_records('role_names', array('contextid'=>$context->id)) &&
-                  $DB->delete_records('blog_association', array('contextid'=>$context->id));
-                  
+                  $DB->delete_records('role_names', array('contextid'=>$context->id));
 
         // do not mark dirty contexts if parents unknown
         if (!is_null($context->path) and $context->depth > 0) {