From 01dcf3ef0cfb859020adc1307f2f2064dbcec54c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Fri, 3 May 2013 16:00:11 +0200 Subject: [PATCH] Revert the icon removal. not needed ! --- base.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/base.php b/base.php index 68aaa9a..56503c6 100644 --- a/base.php +++ b/base.php @@ -165,7 +165,16 @@ class Entry public $localUpdated; private static $updated = NULL; - + public static $icons = array( + Author::ALL_AUTHORS_ID => 'images/author.png', + Serie::ALL_SERIES_ID => 'images/serie.png', + Book::ALL_RECENT_BOOKS_ID => 'images/recent.png', + Tag::ALL_TAGS_ID => 'images/tag.png', + CustomColumn::ALL_CUSTOMS_ID => 'images/tag.png', + "calibre:books$" => 'images/allbook.png', + "calibre:books:letter" => 'images/allbook.png' + ); + public function getUpdatedTime () { if (!is_null ($this->localUpdated)) { return date (DATE_ATOM, $this->localUpdated); @@ -184,6 +193,16 @@ class Entry $this->contentType = $pcontentType; $this->linkArray = $plinkArray; + if ($config['cops_show_icons'] == 1) + { + foreach (self::$icons as $reg => $image) + { + if (preg_match ("/" . $reg . "/", $pid)) { + array_push ($this->linkArray, new Link (getUrlWithVersion ($image), "image/png", Link::OPDS_THUMBNAIL_TYPE)); + break; + } + } + } } }