diff --git a/src/lib/Data.php b/src/lib/Data.php index 7ac179d..3f380b0 100644 --- a/src/lib/Data.php +++ b/src/lib/Data.php @@ -56,7 +56,6 @@ class Data { published_on TEXT NOT NULL, updated_on TEXT, content TEXT NOT NULL, - is_encoded BOOLEAN NOT NULL, is_read BOOLEAN NOT NULL DEFAULT 0, is_bookmarked BOOLEAN NOT NULL DEFAULT 0, FOREIGN KEY (feed_id) REFERENCES feed (id)) diff --git a/src/lib/Feed.php b/src/lib/Feed.php index 3c5a6af..3f2cbbc 100644 --- a/src/lib/Feed.php +++ b/src/lib/Feed.php @@ -129,8 +129,7 @@ class Feed { 'published' => Data::formatDate(self::eltValue($item, 'pubDate')), 'updated' => Data::formatDate($updNodes->length > 0 ? $updNodes->item(0)->textContent : null), 'content' => $encNodes->length > 0 ? $encNodes->item(0)->textContent - : self::eltValue($item, 'description'), - 'isEncoded' => $encNodes->length > 0 + : self::eltValue($item, 'description') ]; } @@ -148,7 +147,6 @@ class Feed { published_on = :published, updated_on = :updated, content = :content, - is_encoded = :encoded, is_read = 0 WHERE id = :id SQL); @@ -156,7 +154,6 @@ class Feed { $query->bindValue(':published', $item['published']); $query->bindValue(':updated', $item['updated']); $query->bindValue(':content', $item['content']); - $query->bindValue(':encoded', $item['isEncoded']); $query->bindValue(':id', $itemId); $query->execute(); } @@ -171,9 +168,9 @@ class Feed { private static function addItem(int $feedId, array $item, SQLite3 $db): void { $query = $db->prepare(<<<'SQL' INSERT INTO item ( - feed_id, item_guid, item_link, title, published_on, updated_on, content, is_encoded + feed_id, item_guid, item_link, title, published_on, updated_on, content ) VALUES ( - :feed, :guid, :link, :title, :published, :updated, :content, :encoded + :feed, :guid, :link, :title, :published, :updated, :content ) SQL); $query->bindValue(':feed', $feedId); @@ -183,7 +180,6 @@ class Feed { $query->bindValue(':published', $item['published']); $query->bindValue(':updated', $item['updated']); $query->bindValue(':content', $item['content']); - $query->bindValue(':encoded', $item['isEncoded']); $query->execute(); } diff --git a/src/public/index.php b/src/public/index.php index b2d8f01..6bcb14f 100644 --- a/src/public/index.php +++ b/src/public/index.php @@ -35,8 +35,8 @@ page_head('Welcome'); ?>
-

>
-
>
+
fetchArray(SQLITE3_ASSOC); } } else { ?> diff --git a/src/public/item.php b/src/public/item.php index 59a1630..1e98bd5 100644 --- a/src/public/item.php +++ b/src/public/item.php @@ -51,7 +51,6 @@ if ($item) { $published = date_time($item['published_on']); $updated = isset($item['updated_on']) ? date_time($item['updated_on']) : null; -$isEncoded = (bool) $item['is_encoded']; page_head(htmlentities("{$item['item_title']} | {$item['feed_title']}")); ?>

@@ -62,13 +61,7 @@ page_head(htmlentities("{$item['item_title']} | {$item['feed_title']}")); ?> Published