From cffea7877fa1a5e2c46852274ae878bf73284598 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Thu, 12 Apr 2012 22:23:09 +0200 Subject: [PATCH 1/2] Added page title to search results in Remote API --- inc/RemoteAPICore.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 5468321008..80deb73775 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -302,6 +302,7 @@ function search($query){ 'mtime' => filemtime($file), 'size' => filesize($file), 'snippet' => $snippet, + 'title' => p_get_first_heading($id) ); } return $pages; From 5529fa3167d83c7fd8ab03d077c2b46163b20c24 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Thu, 12 Apr 2012 23:29:24 +0200 Subject: [PATCH 2/2] Remote search is aware of useheading option --- inc/RemoteAPICore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 80deb73775..9da4932107 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -302,7 +302,7 @@ function search($query){ 'mtime' => filemtime($file), 'size' => filesize($file), 'snippet' => $snippet, - 'title' => p_get_first_heading($id) + 'title' => useHeading('navigation') ? p_get_first_heading($id) : $id ); } return $pages;