X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=rss%2Frsslib.php;h=7a13d01777c47c4ab84fc1bf9b419fde8ba71af1;hp=b73948f46b076acd52c03e504af6ef95fc78d9a0;hb=6069e20688197eaddd0b9186636427c17b8abb5d;hpb=b65a50e5a2660ea60ed168aa6d95164642f18fd0;ds=sidebyside diff --git a/rss/rsslib.php b/rss/rsslib.php index b73948f46b0..7a13d01777c 100644 --- a/rss/rsslib.php +++ b/rss/rsslib.php @@ -98,7 +98,7 @@ function rss_save_file ($modname,$mod,$result) { } if ($status) { - $file = $basedir .= "/".$mod->id.".xml"; + $file = rss_file_name($modname, $mod); $rss_file = fopen($file,"w"); if ($rss_file) { $status = fwrite ($rss_file,$result); @@ -110,6 +110,13 @@ function rss_save_file ($modname,$mod,$result) { return $status; } + +function rss_file_name($modname, $mod) { + global $CFG; + + return "$CFG->dataroot/rss/$modname/$mod->id.xml"; +} + //This function return all the common headers for every rss feed in the site function rss_standard_header($title = NULL, $link = NULL, $description = NULL) {