From deefa5372d2e069a0efda56f17509fc501c2febb Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Thu, 21 Nov 2024 19:42:11 -0500 Subject: [PATCH] Add title if missing; update deps to GA versions --- src/app-config.php | 2 +- src/composer.json | 1 - src/composer.lock | 39 ++++++++++++++++++++------------------- src/lib/ItemList.php | 3 ++- src/public/item.php | 3 ++- 5 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/app-config.php b/src/app-config.php index ca9ea16..60f0c21 100644 --- a/src/app-config.php +++ b/src/app-config.php @@ -14,7 +14,7 @@ use BitBadger\PDODocument\{AutoId, Configuration}; use FeedReaderCentral\Data; /** The current Feed Reader Central version */ -const FRC_VERSION = '1.0.0-beta4'; +const FRC_VERSION = '1.0.0'; /** * Drop .0 or .0.0 from the end of the version to format it for display diff --git a/src/composer.json b/src/composer.json index aa37997..3daf686 100644 --- a/src/composer.json +++ b/src/composer.json @@ -1,6 +1,5 @@ { "name": "bit-badger/feed-reader-central", - "minimum-stability": "beta", "require": { "php": ">=8.2", "bit-badger/pdo-document": "^1", diff --git a/src/composer.lock b/src/composer.lock index 938ceeb..236754a 100644 --- a/src/composer.lock +++ b/src/composer.lock @@ -4,22 +4,22 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2966efd32e555ad8b63351673e75b5a5", + "content-hash": "1a4a7e8bbe5b45085bdfcb5a61a4f874", "packages": [ { "name": "bit-badger/inspired-by-fsharp", - "version": "v1.0.0-beta2", + "version": "v1.0.0", "source": { "type": "git", "url": "https://git.bitbadger.solutions/bit-badger/inspired-by-fsharp", - "reference": "fad428a4e40b606987499b17bb2d5b7d4b04502d" + "reference": "3cc780956daa410c74667bc9c03fffa19de74e91" }, "require": { - "php": "^8.2" + "php": "8.2 - 8.3" }, "require-dev": { - "phpoption/phpoption": "^1", - "phpunit/phpunit": "^11" + "pestphp/pest": "^3.5", + "phpoption/phpoption": "^1" }, "type": "library", "autoload": { @@ -49,24 +49,25 @@ "rss": "https://git.bitbadger.solutions/bit-badger/inspired-by-fsharp.rss", "source": "https://git.bitbadger.solutions/bit-badger/inspired-by-fsharp" }, - "time": "2024-07-29T17:58:33+00:00" + "time": "2024-11-21T01:27:18+00:00" }, { "name": "bit-badger/pdo-document", - "version": "v1.0.0-beta9", + "version": "v1.0.0", "source": { "type": "git", "url": "https://git.bitbadger.solutions/bit-badger/pdo-document", - "reference": "9e0e663811d9dbbdb94a2c04ce8b874e91a7c85b" + "reference": "3b2d2ced98cf463b058d394542e944a03fa3e680" }, "require": { "bit-badger/inspired-by-fsharp": "^1", "ext-pdo": "*", "netresearch/jsonmapper": "^4", - "php": ">=8.2" + "php": "8.2 - 8.3" }, "require-dev": { - "phpunit/phpunit": "^11", + "pestphp/pest": "^3.2", + "phpstan/phpstan": "^1.12", "square/pjson": "^0.5.0" }, "type": "library", @@ -103,20 +104,20 @@ "rss": "https://git.bitbadger.solutions/bit-badger/pdo-document.rss", "source": "https://git.bitbadger.solutions/bit-badger/pdo-document" }, - "time": "2024-07-29T20:57:51+00:00" + "time": "2024-11-21T03:26:58+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v4.4.1", + "version": "v4.5.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", - "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8e76efb98ee8b6afc54687045e1b8dba55ac76e5", + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5", "shasum": "" }, "require": { @@ -152,14 +153,14 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.5.0" }, - "time": "2024-01-31T06:18:54+00:00" + "time": "2024-09-08T10:13:13+00:00" } ], "packages-dev": [], "aliases": [], - "minimum-stability": "beta", + "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, diff --git a/src/lib/ItemList.php b/src/lib/ItemList.php index 6e2049b..be39e4d 100644 --- a/src/lib/ItemList.php +++ b/src/lib/ItemList.php @@ -152,7 +152,8 @@ class ItemList echo '
'; if ($this->dbList->hasItems()) { $this->dbList->iter(function (ItemWithFeed $item) use ($return) { - echo '

' . hx_get("/item?id=$item->id$return", strip_tags($item->title)) . '
'; + $title = trim($item->title) === '' ? 'no title' : strip_tags($item->title); + echo '

' . hx_get("/item?id=$item->id$return", $title) . '
'; if ($this->showIndicators) { if (!$item->isRead()) echo 'Unread   '; if ($item->isBookmarked()) echo 'Bookmarked   '; diff --git a/src/public/item.php b/src/public/item.php index 6afaa36..3f090b5 100644 --- a/src/public/item.php +++ b/src/public/item.php @@ -58,12 +58,13 @@ try { $published = date_time($item->published_on); $updated = isset($item->updated_on) ? date_time($item->updated_on) : null; +$title = trim($item->title) === '' ? 'no title' : strip_tags($item->title); page_head(htmlentities("$item->title | {$item->feed->title}")); ?>

- title)?>
+

From feed->title)?>