]> git.mjollnir.org Git - moodle.git/commitdiff
re-merge of "Merged fix from 1.6 for Bug #5131 - RSS Feeds and Moving Discussions."
authormartinlanghoff <martinlanghoff>
Sun, 17 Sep 2006 02:27:13 +0000 (02:27 +0000)
committermartinlanghoff <martinlanghoff>
Sun, 17 Sep 2006 02:27:13 +0000 (02:27 +0000)
Originally by vyshane - got dropped accidentally in one of the biiiiig roles
commits.

mod/forum/discuss.php

index 545944a36dcb0fcf65089ed9c59d8b10f5c6e99e..846171fb1a45d4541d9c312a59d673107a30d965 100644 (file)
                 add_to_log($course->id, "forum", "move discussion", "discuss.php?d=$discussion->id", "$discussion->id");
             }
             $discussionmoved = true;
+            require_once('rsslib.php');
+            require_once($CFG->libdir.'/rsslib.php');
+
+            // Delete the RSS files for the 2 forums because we want to force
+            // the regeneration of the feeds since the discussions have been
+            // moved.
+            if (!forum_rss_delete_file($forum) || !forum_rss_delete_file($fromforum)) {
+                notify('Could not purge the cached RSS feeds for the source and/or'.
+                       'destination forum(s) - check your file permissionsforums');
+            }
         } else {
             error("You can't move to that forum - it doesn't exist!");
         }