]> git.mjollnir.org Git - moodle.git/commitdiff
Check added. SC#23
authorstronk7 <stronk7>
Sun, 12 Dec 2004 12:54:32 +0000 (12:54 +0000)
committerstronk7 <stronk7>
Sun, 12 Dec 2004 12:54:32 +0000 (12:54 +0000)
Merged from MOODLE_14_STABLE

rss/file.php

index 4715b99e4ce49f72bca44d67b03e1c7317a84430..c2fd872ee29d8782b14fa863290ad0c97447739c 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP //$Id$
+<?php //$Id$
     //This file returns the required rss feeds
     //The URL format MUST include:
     //    course: the course id
     $modulename = $args[2];
     $instance = (integer)$args[3];
 
+    //Check name of module
+    $mods = get_list_of_plugins("mod");
+    if (!in_array(strtolower($modulename), $mods)) {
+        error("This module doesn't exist!");
+    }
+
     if (! $course = get_record("course", "id", $courseid)) {
         $error = true;
     }