mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +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
|
@ -19,7 +19,7 @@
|
|||
$dataid = $args[3];
|
||||
$data = $DB->get_record('data', array('id' => $dataid), '*', MUST_EXIST);
|
||||
|
||||
if (!rss_enabled('data', $data, false, true)) {
|
||||
if (!rss_enabled_for_mod('data', $data, false, true)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
//get the cache file info
|
||||
$filename = rss_get_file_name($data, $sql);
|
||||
$cachedfilepath = rss_get_file_full_name('data', $filename);
|
||||
$cachedfilepath = rss_get_file_full_name('mod_data', $filename);
|
||||
|
||||
//Is the cache out of date?
|
||||
$cachedfilelastmodified = 0;
|
||||
|
@ -91,7 +91,7 @@
|
|||
$rss = $header.$articles.$footer;
|
||||
|
||||
//Save the XML contents to file.
|
||||
$status = rss_save_file('data', $filename, $rss);
|
||||
$status = rss_save_file('mod_data', $filename, $rss);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@
|
|||
$meta = '';
|
||||
if (!empty($CFG->enablerssfeeds) && !empty($CFG->data_enablerssfeeds) && $data->rssarticles > 0) {
|
||||
$rsstitle = format_string($course->shortname) . ': %fullname%';
|
||||
rss_add_http_header($context, 'data', $data, $rsstitle);
|
||||
rss_add_http_header($context, 'mod_data', $data, $rsstitle);
|
||||
}
|
||||
if ($data->csstemplate) {
|
||||
$PAGE->requires->css('/mod/data/css.php?d='.$data->id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue