mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
Modified function rss_get_link() so that we ignore $userid if it is empty when
we build the path to the XML file. We need this for RSS feeds for the data module, where it does not make sense to generate an XML file for each user when they will all be seeing the same feed.
This commit is contained in:
parent
55e87e5386
commit
d1dbc96fea
@ -16,11 +16,17 @@ function rss_get_link($courseid, $userid, $modulename, $id, $tooltiptext='') {
|
||||
}
|
||||
|
||||
if ($CFG->slasharguments) {
|
||||
$rsspath = "$CFG->wwwroot/rss/file.php/$courseid/$userid/$modulename/$id/rss.xml";
|
||||
$rsspath = "$CFG->wwwroot/rss/file.php/$courseid";
|
||||
} else {
|
||||
$rsspath = "$CFG->wwwroot/rss/file.php?file=/$courseid/$userid/$modulename/$id/rss.xml";
|
||||
$rsspath = "$CFG->wwwroot/rss/file.php?file=/$courseid";
|
||||
}
|
||||
|
||||
if (!empty($userid)) {
|
||||
$rsspath .= "/$userid/$modulename/$id/rss.xml";
|
||||
}
|
||||
else {
|
||||
$rsspath .= "/$modulename/$id/rss.xml";
|
||||
}
|
||||
|
||||
$rsspix = $CFG->pixpath .'/i/rss.gif';
|
||||
|
||||
return '<a href="'. $rsspath .'"><img src="'. $rsspix .'" title="'. strip_tags($tooltiptext) .'" alt="" /></a>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user