MDL-7945 Database learning activity does not use user defined RSS template, but continues to use default template.

This commit is contained in:
skodak 2006-12-17 21:48:51 +00:00
parent e076bccbc9
commit aa3b20e9df
2 changed files with 20 additions and 16 deletions

View File

@ -877,23 +877,27 @@ function data_print_template($template, $records, $data, $search='',$page=0, $re
$newtext = str_ireplace($patterns, $replacement, $data->{$template});
/// no more html formatting and filtering - see MDL-6635
echo $newtext;
if ($return) {
return $newtext;
} else {
echo $newtext;
/**********************************
* Printing Ratings Form *
*********************************/
if ($template == 'singletemplate') { //prints ratings options
data_print_ratings($data, $record);
// hack alert - return is always false in singletemplate anyway ;-)
/**********************************
* Printing Ratings Form *
*********************************/
if ($template == 'singletemplate') { //prints ratings options
data_print_ratings($data, $record);
}
/**********************************
* Printing Ratings Form *
*********************************/
if (($template == 'singletemplate') && ($data->comments)) { //prints ratings options
data_print_comments($data, $record, $page);
}
}
/**********************************
* Printing Ratings Form *
*********************************/
if (($template == 'singletemplate') && ($data->comments)) { //prints ratings options
data_print_comments($data, $record, $page);
}
}
}

View File

@ -68,7 +68,7 @@
$item = null;
// guess title or not
if ($data->rsstitletemplate) {
if (!empty($data->rsstitletemplate)) {
$item->title = data_print_template('rsstitletemplate', $recordarray, $data, '', 0, true);
} else { // else we guess
$item->title = strip_tags(get_field('data_content', 'content',