rss MDL-23391 made lib/rsslib.php more generic

This commit is contained in:
Andrew Davis 2010-07-21 02:11:53 +00:00
parent e269084401
commit 43b92251be
9 changed files with 40 additions and 37 deletions

View file

@ -22,7 +22,7 @@
$glossaryid = $args[3];
$glossary = $DB->get_record('glossary', array('id' => $glossaryid), '*', MUST_EXIST);
if (!rss_enabled('glossary', $glossary)) {
if (!rss_enabled_for_mod('glossary', $glossary)) {
return null;
}
@ -30,7 +30,7 @@
//get the cache file info
$filename = rss_get_file_name($glossary, $sql);
$cachedfilepath = rss_get_file_full_name('glossary', $filename);
$cachedfilepath = rss_get_file_full_name('mod_glossary', $filename);
//Is the cache out of date?
$cachedfilelastmodified = 0;
@ -83,7 +83,7 @@
$rss = $header.$articles.$footer;
//Save the XML contents to file.
$status = rss_save_file('glossary', $filename, $rss);
$status = rss_save_file('mod_glossary', $filename, $rss);
}
}

View file

@ -241,7 +241,7 @@ if (!empty($CFG->enablerssfeeds) && !empty($CFG->glossary_enablerssfeeds)
&& $glossary->rsstype && $glossary->rssarticles) {
$rsstitle = format_string($course->shortname) . ': %fullname%';
rss_add_http_header($context, 'glossary', $glossary, $rsstitle);
rss_add_http_header($context, 'mod_glossary', $glossary, $rsstitle);
}
if ($tab == GLOSSARY_APPROVAL_VIEW) {