Convert @ to : in parameter names
- Still more to do; possible connection exhaustion
This commit is contained in:
@@ -58,7 +58,7 @@ class ItemList
|
||||
try {
|
||||
$this->dbList = Custom::list(
|
||||
ItemWithFeed::SELECT_WITH_FEED . ' WHERE '
|
||||
. Query::whereByFields(array_filter($allFields, fn($it) => $it->paramName <> '@search'))
|
||||
. Query::whereByFields(array_filter($allFields, fn($it) => $it->paramName <> ':search'))
|
||||
. $searchWhere,
|
||||
Parameters::addFields($allFields, []), new DocumentMapper(ItemWithFeed::class));
|
||||
} catch (DocumentException $ex) {
|
||||
@@ -73,7 +73,7 @@ class ItemList
|
||||
*/
|
||||
public static function allBookmarked(): static
|
||||
{
|
||||
$list = new static('Bookmarked', '/?bookmarked', [Data::bookmarkField(Table::ITEM)]);
|
||||
$list = new static('Bookmarked', '/?bookmarked', [Data::bookmarkField(qualifier: Table::ITEM)]);
|
||||
$list->linkFeed = true;
|
||||
return $list;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ class ItemList
|
||||
public static function bookmarkedForFeed(int $feedId): static
|
||||
{
|
||||
return new static('Bookmarked', "/feed/items?id=$feedId&bookmarked",
|
||||
[Data::feedField($feedId, Table::FEED), Data::bookmarkField(Table::ITEM)]);
|
||||
[Data::feedField($feedId, Table::FEED), Data::bookmarkField(qualifier: Table::ITEM)]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,12 +136,12 @@ class ItemList
|
||||
*/
|
||||
public static function matchingSearch(string $search, bool $isBookmarked): static
|
||||
{
|
||||
$fields = [Field::EQ('content', $search, '@search')];
|
||||
if ($isBookmarked) $fields[] = Data::bookmarkField(Table::ITEM);
|
||||
$fields = [Field::EQ('content', $search, ':search')];
|
||||
if ($isBookmarked) $fields[] = Data::bookmarkField(qualifier: Table::ITEM);
|
||||
$list = new static('Matching' . ($isBookmarked ? ' Bookmarked' : ''),
|
||||
"/search?search=$search&items=" . ($isBookmarked ? 'bookmarked' : 'all'), $fields,
|
||||
' AND ' . Table::ITEM . ".data->>'" . Configuration::$idField . "' IN "
|
||||
. '(SELECT ROWID FROM item_search WHERE content MATCH @search)');
|
||||
. '(SELECT ROWID FROM item_search WHERE content MATCH :search)');
|
||||
$list->showIndicators = true;
|
||||
$list->displayFeed = true;
|
||||
return $list;
|
||||
|
||||
Reference in New Issue
Block a user