diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-10-15 19:58:52 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-10-15 19:58:52 +0300 |
| commit | 5ea96397c08bb7e960a0eb2c2687073dc92c0ad3 (patch) | |
| tree | 99bd493788620c4746ac4391c87c583ea928a366 /classes | |
| parent | a58a0cd888fc267d0ee1174f799a86d5fe0bc860 (diff) | |
properly support search queries in viewfeed debugger, improve some debugging messages and output
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/Feeds.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/classes/Feeds.php b/classes/Feeds.php index f44be22bf..5239c9f8a 100644 --- a/classes/Feeds.php +++ b/classes/Feeds.php @@ -547,7 +547,13 @@ class Feeds extends Handler_Protected { // this is parsed by handleRpcJson() on first viewfeed() to set cdm expanded, etc $reply['runtime-info'] = RPC::_make_runtime_info(); - print json_encode($reply); + if (!empty($_REQUEST["debug"])) { + print "\n*** HEADLINE DATA ***\n"; + + print json_encode($reply, JSON_PRETTY_PRINT); + } else { + print json_encode($reply); + } } /** @@ -2376,6 +2382,12 @@ class Feeds extends Handler_Protected { else $search_query_part = "false"; + if (!empty($_REQUEST["debug"])) { + print "\n*** SEARCH_TO_SQL ***\n"; + print "QUERY: $search_query_part\n"; + print "WORDS: " . json_encode($search_words) . "\n"; + } + return array($search_query_part, $search_words); } |