diff options
author | joe.lapp <joe.lapp@pobox.com> | 2005-09-15 03:52:09 +0200 |
---|---|---|
committer | joe.lapp <joe.lapp@pobox.com> | 2005-09-15 03:52:09 +0200 |
commit | 03ee62cba5ae4e4f0ef7416c8a3813bc6a59d7c9 (patch) | |
tree | eb5402b48b23f2ba3914363a0cac9cc7bc0cff7f /feed.php | |
parent | 4b5db43bf44da083be4a4729be07d770aca09ea3 (diff) | |
download | rpg-03ee62cba5ae4e4f0ef7416c8a3813bc6a59d7c9.tar.gz rpg-03ee62cba5ae4e4f0ef7416c8a3813bc6a59d7c9.tar.bz2 |
$conf['useheading'] now applies to RSS feed entries
darcs-hash:20050915015209-36b45-000b261098cb368db880942248de6ded546456b0.gz
Diffstat (limited to 'feed.php')
-rw-r--r-- | feed.php | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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': |