summaryrefslogtreecommitdiff
path: root/feed.php
diff options
context:
space:
mode:
Diffstat (limited to 'feed.php')
-rw-r--r--feed.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/feed.php b/feed.php
index ddeea4a83..b655cd292 100644
--- a/feed.php
+++ b/feed.php
@@ -95,12 +95,21 @@ function rssRecentChanges(&$rss,$num,$ltype,$ns){
@set_time_limit(90); // set max execution time
foreach(array_keys($recents) as $id){
- $desc = cleanDesc(p_wiki_xhtml($id,'',false));
+
$item = new FeedItem();
- $item->title = $id;
+ $item->title = $id;
+ $xhtml = p_wiki_xhtml($id,'',false);
+
+ if($conf['useheading']) {
+ $matches = array();
+ if(preg_match('|<h([1-9])>(.*?)</h\1>|', $xhtml, $matches))
+ $item->title = trim($matches[2]);
+ }
if(!empty($recents[$id]['sum'])){
$item->title .= ' - '.strip_tags($recents[$id]['sum']);
}
+
+ $desc = cleanDesc($xhtml);
switch ($ltype){
case 'page':