Completed result/option migration

- Change casing on exposed constants
- Add file-level phpdoc
This commit is contained in:
2024-07-25 21:14:57 -04:00
parent 1d5a3c1c7a
commit 6dc264d34c
34 changed files with 658 additions and 383 deletions

View File

@@ -1,11 +1,15 @@
<?php declare(strict_types=1);
<?php
/**
* Item Search Page
*
* Search for items across all feeds
*
* @author Daniel J. Summers <daniel@bitbadger.solutions>
* @license MIT
*/
declare(strict_types=1);
include '../start.php';
FeedReaderCentral\Security::verifyUser();
@@ -13,8 +17,8 @@ FeedReaderCentral\Security::verifyUser();
$search = $_GET['search'] ?? '';
$items = $_GET['items'] ?? 'all';
if ($search != '') {
$list = FeedReaderCentral\ItemList::matchingSearch($search, $items == 'bookmarked');
if ($search !== '') {
$list = FeedReaderCentral\ItemList::matchingSearch($search, $items === 'bookmarked');
}
page_head('Item Search'); ?>
@@ -28,8 +32,8 @@ page_head('Item Search'); ?>
<label>
Items to Search
<select name=items>
<option value=all <?=$items == 'all' ? ' selected' : ''?>>All</option>
<option value=bookmarked <?=$items == 'bookmarked' ? ' selected' : ''?>>Bookmarked</option>
<option value=all <?=$items === 'all' ? ' selected' : ''?>>All</option>
<option value=bookmarked <?=$items === 'bookmarked' ? ' selected' : ''?>>Bookmarked</option>
</select>
</label>
<span class=break></span>