global $CFG;
if ($tagid) {
- return "$CFG->dataroot/rss/blog/$type/$id/$tagid.xml";
+ return "$CFG->dataroot/cache/rss/blog/$type/$id/$tagid.xml";
} else {
- return "$CFG->dataroot/rss/blog/$type/$id.xml";
+ return "$CFG->dataroot/cache/rss/blog/$type/$id.xml";
}
}
function rss_delete_file($modname, $instance) {
global $CFG;
- $dirpath = "$CFG->dataroot/rss/$modname";
+ $dirpath = "$CFG->dataroot/cache/rss/$modname";
if (is_dir($dirpath)) {
$dh = opendir($dirpath);
while (false !== ($filename = readdir($dh))) {
if ($filename!='.' && $filename!='..') {
if (preg_match("/{$instance->id}_/", $filename)) {
- unlink("$CFG->dataroot/rss/$modname/$filename");
+ unlink("$CFG->dataroot/cache/rss/$modname/$filename");
}
}
}
$status = true;
- if (! $basedir = make_upload_directory ('rss/'. $modname)) {
+ if (! $basedir = make_upload_directory ('cache/rss/'. $modname)) {
//Cannot be created, so error
$status = false;
}
function rss_get_file_full_name($modname, $filename) {
global $CFG;
- return "$CFG->dataroot/rss/$modname/$filename.xml";
+ return "$CFG->dataroot/cache/rss/$modname/$filename.xml";
}
function rss_get_file_name($instance, $sql) {
* @global object $DB
* @param object $context the context
* @param int $forumid the ID of the forum
- * @param string $cachepath the path to the cache directory. For example '/home/user/moodledata/rss/forum/'
* @param array $args the arguments received in the url
* @return string the full path to the cached RSS feed directory. Null if there is a problem.
*/