This commit is contained in:
Joas Schilling 2014-06-02 12:50:57 +02:00
Родитель f27ad52042
Коммит e7665b7f25
2 изменённых файлов: 13 добавлений и 8 удалений

Просмотреть файл

@ -397,18 +397,23 @@ class Data
// items
for ($i = 0; $i < count($content); $i++) {
xmlwriter_start_element($writer, 'item');
if (isset($content[$i]['subject_long'])) {
xmlwriter_write_element($writer, 'title', $content[$i]['subject_long']);
if (!empty($content[$i]['subject_full'])) {
xmlwriter_write_element($writer, 'title', $content[$i]['subject_full']);
}
if (isset($content[$i]['link'])) xmlwriter_write_element($writer, 'link', $content[$i]['link']);
if (isset($content[$i]['link'])) xmlwriter_write_element($writer, 'guid', $content[$i]['link']);
if (isset($content[$i]['timestamp'])) xmlwriter_write_element($writer, 'pubDate', date('r', $content[$i]['timestamp']));
if (!empty($content[$i]['link'])) {
xmlwriter_write_element($writer, 'link', $content[$i]['link']);
xmlwriter_write_element($writer, 'guid', $content[$i]['link']);
}
if (isset($content[$i]['message_long'])) {
if (!empty($content[$i]['timestamp'])) {
xmlwriter_write_element($writer, 'pubDate', date('r', $content[$i]['timestamp']));
}
if (!empty($content[$i]['message_full'])) {
xmlwriter_start_element($writer, 'description');
xmlwriter_start_cdata($writer);
xmlwriter_text($writer, $content[$i]['message_long']);
xmlwriter_text($writer, $content[$i]['message_full']);
xmlwriter_end_cdata($writer);
xmlwriter_end_element($writer);
}

Просмотреть файл

@ -33,7 +33,7 @@ if (isset($_SERVER['HTTP_ACCEPT']) && stristr($_SERVER['HTTP_ACCEPT'], 'applicat
header('Content-Type: text/xml; charset=UTF-8');
}
// read the data
// read the data
$activities=OCA\Activity\Data::read(0, 30, false);
// generate an absolute link to the rss feed.