From fa5ec6cb58ebe980f0acaacd09bbd76bba781371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Fri, 25 Oct 2013 07:59:27 +0200 Subject: [PATCH] Fix the ids in OPDS feed to produce a valid feed. fix #104 --- author.php | 2 +- base.php | 6 +++--- book.php | 4 ++-- customcolumn.php | 2 +- language.php | 2 +- serie.php | 2 +- tag.php | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/author.php b/author.php index 4ba2dd1..61c2e34 100644 --- a/author.php +++ b/author.php @@ -9,7 +9,7 @@ require_once('base.php'); class Author extends Base { - const ALL_AUTHORS_ID = "calibre:authors"; + const ALL_AUTHORS_ID = "cops:authors"; const AUTHOR_COLUMNS = "authors.id as id, authors.name as name, authors.sort as sort, count(*) as count"; const SQL_AUTHORS_BY_FIRST_LETTER = "select {0} from authors, books_authors_link where author = authors.id and upper (authors.sort) like ? group by authors.id, authors.name, authors.sort order by sort"; diff --git a/base.php b/base.php index 9382aa0..23e80e9 100644 --- a/base.php +++ b/base.php @@ -276,8 +276,8 @@ class Entry Tag::ALL_TAGS_ID => 'images/tag.png', Language::ALL_LANGUAGES_ID => 'images/language.png', CustomColumn::ALL_CUSTOMS_ID => 'images/tag.png', - "calibre:books$" => 'images/allbook.png', - "calibre:books:letter" => 'images/allbook.png' + "cops:books$" => 'images/allbook.png', + "cops:books:letter" => 'images/allbook.png' ); public function getUpdatedTime () { @@ -322,7 +322,7 @@ class Entry } } - if (!is_null (GetUrlParam (DB))) $this->id = GetUrlParam (DB) . ":" . $this->id; + if (!is_null (GetUrlParam (DB))) $this->id = str_replace ("cops:", "cops:" . GetUrlParam (DB) . ":", $this->id); } } diff --git a/book.php b/book.php index b0f8325..b2f954d 100644 --- a/book.php +++ b/book.php @@ -42,8 +42,8 @@ define ('SQL_BOOKS_RECENT', "select {0} from books " . SQL_BOOKS_LEFT_JOIN . " class Book extends Base { const ALL_BOOKS_UUID = "urn:uuid"; - const ALL_BOOKS_ID = "calibre:books"; - const ALL_RECENT_BOOKS_ID = "calibre:recentbooks"; + const ALL_BOOKS_ID = "cops:books"; + const ALL_RECENT_BOOKS_ID = "cops:recentbooks"; const BOOK_COLUMNS = "books.id as id, books.title as title, text as comment, path, timestamp, pubdate, series_index, uuid, has_cover, ratings.rating"; const SQL_BOOKS_LEFT_JOIN = SQL_BOOKS_LEFT_JOIN; diff --git a/customcolumn.php b/customcolumn.php index 63deb82..bc91502 100644 --- a/customcolumn.php +++ b/customcolumn.php @@ -9,7 +9,7 @@ require_once('base.php'); class CustomColumn extends Base { - const ALL_CUSTOMS_ID = "calibre:custom"; + const ALL_CUSTOMS_ID = "cops:custom"; public $id; public $name; diff --git a/language.php b/language.php index 443d40b..c40cac6 100644 --- a/language.php +++ b/language.php @@ -9,7 +9,7 @@ require_once('base.php'); class language extends Base { - const ALL_LANGUAGES_ID = "calibre:languages"; + const ALL_LANGUAGES_ID = "cops:languages"; public $id; public $lang_code; diff --git a/serie.php b/serie.php index b377881..7de137f 100644 --- a/serie.php +++ b/serie.php @@ -9,7 +9,7 @@ require_once('base.php'); class Serie extends Base { - const ALL_SERIES_ID = "calibre:series"; + const ALL_SERIES_ID = "cops:series"; public $id; public $name; diff --git a/tag.php b/tag.php index b3d9a23..ad20d7f 100644 --- a/tag.php +++ b/tag.php @@ -9,7 +9,7 @@ require_once('base.php'); class tag extends Base { - const ALL_TAGS_ID = "calibre:tags"; + const ALL_TAGS_ID = "cops:tags"; public $id; public $name;