]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20625 forbid transactions when sending messages - we can not undo emails
authorPetr Skoda <skodak@moodle.org>
Sat, 7 Nov 2009 10:30:03 +0000 (10:30 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 7 Nov 2009 10:30:03 +0000 (10:30 +0000)
lib/messagelib.php

index ec2d3f28abd42ae90b24a7fa9412841bd55e19e7..916372926a14f28763eacbb96c79402e2bc28a0b 100644 (file)
@@ -46,7 +46,9 @@ function message_send($eventdata) {
 
     //TODO: this function is very slow and inefficient, it would be a major bottleneck in cron processing, this has to be improved in 2.0
     //      probably we could add two parameters with user messaging preferences and we could somehow preload/cache them in cron
-    //TODO: we need to solve problems with database transactions here somehow
+
+    //TODO: we need to solve problems with database transactions here somehow, for now we just prevent transactions - sorry
+    $DB->transactions_forbidden();
 
     if (isset($CFG->block_online_users_timetosee)) {
         $timetoshowusers = $CFG->block_online_users_timetosee * 60;