rss MDL-23383 moved the RSS cache to /dataroot/cache/rss
authorAndrew Davis <andrew@affinitysoftware.net>
Mon, 19 Jul 2010 06:46:23 +0000 (06:46 +0000)
committerAndrew Davis <andrew@affinitysoftware.net>
Mon, 19 Jul 2010 06:46:23 +0000 (06:46 +0000)
blog/rsslib.php
lib/rsslib.php
mod/forum/rsslib.php

index 9963053..6972c17 100755 (executable)
@@ -136,9 +136,9 @@ function blog_rss_file_name($type, $id, $tagid=0) {
     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";
     }
 }
 
index 5933dff..a3b1b19 100644 (file)
@@ -81,13 +81,13 @@ function rss_print_link($contextid, $userid, $modulename, $id, $tooltiptext='')
 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");
                 }
             }
         }
@@ -134,7 +134,7 @@ function rss_save_file($modname, $filename, $result) {
 
     $status = true;
 
-    if (! $basedir = make_upload_directory ('rss/'. $modname)) {
+    if (! $basedir = make_upload_directory ('cache/rss/'. $modname)) {
         //Cannot be created, so error
         $status = false;
     }
@@ -155,7 +155,7 @@ function rss_save_file($modname, $filename, $result) {
 
 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) {
index 8dd4807..5e8a2c3 100644 (file)
@@ -29,7 +29,6 @@
  * @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.
  */