From 44a35da6ab4b9a02117df84a2208a57b8f339ee6 Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 23 Sep 2006 22:49:05 +0200 Subject: p_get_first_heading simplification darcs-hash:20060923204905-9b6ab-da3e9751c07c1bd07cf6583ecc5d92c2ce95097c.gz --- inc/parserutils.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'inc/parserutils.php') diff --git a/inc/parserutils.php b/inc/parserutils.php index 4b3c8c209..17f1811ae 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -468,11 +468,7 @@ function p_render($mode,$instructions,& $info){ */ function p_get_first_heading($id){ global $conf; - if(!$conf['useheading']) return null; - - $meta = p_get_metadata($id); - if($meta['title']) return $meta['title']; - return null; + return $conf['useheading'] ? p_get_metadata($id,'title') : null; } /** -- cgit v1.2.3