Skip to content

Commit

Permalink
Update autocomplete_ajax.php
Browse files Browse the repository at this point in the history
$sendplaintext was always true
  • Loading branch information
bbannon authored Apr 24, 2024
1 parent eb1b832 commit 1e99299
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions autocomplete_ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,10 @@
if (empty($query))
$query = getValue('query');

$sendPlainText = false;
$format = getValue('format');
if (
!empty($format) &&
($format == 'text' || $format == 'plain')
);
$sendPlainText = true;
$sendPlainText = (! empty ( $format ) &&
( $format === 'text' || $format === 'plain' ) );

if ($sendPlainText) {
Header('Content-Type: text/plain');
} else {
Expand Down

0 comments on commit 1e99299

Please sign in to comment.