mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
rss MDL-23391 made lib/rsslib.php more generic
This commit is contained in:
parent
e269084401
commit
43b92251be
9 changed files with 40 additions and 37 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue