Add a new config parameter to make COPS generate an unvalid OPDS feed.
That unvalid feed will allow some non compliant OPDS client to perform search. Note that Mantano Reader is the only reader so far that works with COPS's perfectly valid feed. FBReaderJ was working fine in May 2012 ans is not working anymore : see https://github.com/geometer/FBReaderJ/issues/70 Moon+ Reader is also not working without modification. Not really happy about that. Fix #14
Цей коміт міститься в:
джерело
bc4bb716e4
коміт
98d479df0f
2 змінених файлів з 19 додано та 1 видалено
|
@ -114,7 +114,15 @@ class OPDSRenderer
|
|||
self::renderLink ($link);
|
||||
$link = new LinkNavigation ("?" . $_SERVER['QUERY_STRING'], "self");
|
||||
self::renderLink ($link);
|
||||
$link = new Link ($config['cops_full_url'] . 'feed.php?query={searchTerms}', "application/atom+xml", "search", "Search here");
|
||||
if ($config['cops_generate_invalid_opds_stream'] == 0 || preg_match("/(MantanoReader)/", $_SERVER['HTTP_USER_AGENT'])) {
|
||||
// Good and compliant way of handling search
|
||||
$link = new Link ("feed.php?page=" . self::PAGE_OPENSEARCH, "application/opensearchdescription+xml", "search", "Search here");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Bad way, will be removed when OPDS client are fixed
|
||||
$link = new Link ($config['cops_full_url'] . 'feed.php?query={searchTerms}', "application/atom+xml", "search", "Search here");
|
||||
}
|
||||
self::renderLink ($link);
|
||||
}
|
||||
|
||||
|
|
Завантаження…
Додати таблицю
Додати посилання
Послатися в новій задачі