From d540cba22a49bd053ba8c83b8117f25b7958af15 Mon Sep 17 00:00:00 2001 From: At-Libitum Date: Sat, 30 Nov 2013 16:21:52 +0100 Subject: [PATCH] renamed constant and removed some accidental tabs. --- base.php | 2 +- book.php | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/base.php b/base.php index f88a99c..eb75cb5 100644 --- a/base.php +++ b/base.php @@ -278,7 +278,7 @@ class Entry CustomColumn::ALL_CUSTOMS_ID => 'images/tag.png', "cops:books$" => 'images/allbook.png', "cops:books:letter" => 'images/allbook.png', - "cops:publishers" => 'images/publisher.png' + Publisher::ALL_PUBLISHERS_ID => 'images/publisher.png' ); public function getUpdatedTime () { diff --git a/book.php b/book.php index 6affafc..7eb1ab6 100644 --- a/book.php +++ b/book.php @@ -52,7 +52,7 @@ class Book extends Base { const SQL_BOOKS_LEFT_JOIN = SQL_BOOKS_LEFT_JOIN; const SQL_BOOKS_ALL = SQL_BOOKS_ALL; - const SQL_BOOKS_BY_PUBLISHER = SQL_BOOKS_BY_PUBLISHER; + const SQL_BOOKS_BY_PUBLISHER = SQL_BOOKS_BY_PUBLISHER; const SQL_BOOKS_BY_FIRST_LETTER = SQL_BOOKS_BY_FIRST_LETTER; const SQL_BOOKS_BY_AUTHOR = SQL_BOOKS_BY_AUTHOR; const SQL_BOOKS_BY_SERIE = SQL_BOOKS_BY_SERIE; @@ -296,21 +296,21 @@ class Book extends Base { } return $this->datas; } - - public function GetMostInterestingDataToSendToKindle () - { - $bestFormatForKindle = array ("EPUB", "PDF", "MOBI"); - $bestRank = -1; - $bestData = NULL; - foreach ($this->getDatas () as $data) { - $key = array_search ($data->format, $bestFormatForKindle); - if ($key !== false && $key > $bestRank) { - $bestRank = $key; - $bestData = $data; - } - } - return $bestData; - } + + public function GetMostInterestingDataToSendToKindle () + { + $bestFormatForKindle = array ("EPUB", "PDF", "MOBI"); + $bestRank = -1; + $bestData = NULL; + foreach ($this->getDatas () as $data) { + $key = array_search ($data->format, $bestFormatForKindle); + if ($key !== false && $key > $bestRank) { + $bestRank = $key; + $bestData = $data; + } + } + return $bestData; + } public function getDataById ($idData) {