renamed constant and removed some accidental tabs.

This commit is contained in:
At-Libitum 2013-11-30 16:21:52 +01:00
parent 9efcd661a0
commit d540cba22a
2 changed files with 17 additions and 17 deletions

View file

@ -278,7 +278,7 @@ class Entry
CustomColumn::ALL_CUSTOMS_ID => 'images/tag.png', CustomColumn::ALL_CUSTOMS_ID => 'images/tag.png',
"cops:books$" => 'images/allbook.png', "cops:books$" => 'images/allbook.png',
"cops:books:letter" => 'images/allbook.png', "cops:books:letter" => 'images/allbook.png',
"cops:publishers" => 'images/publisher.png' Publisher::ALL_PUBLISHERS_ID => 'images/publisher.png'
); );
public function getUpdatedTime () { public function getUpdatedTime () {

View file

@ -52,7 +52,7 @@ class Book extends Base {
const SQL_BOOKS_LEFT_JOIN = SQL_BOOKS_LEFT_JOIN; const SQL_BOOKS_LEFT_JOIN = SQL_BOOKS_LEFT_JOIN;
const SQL_BOOKS_ALL = SQL_BOOKS_ALL; 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_FIRST_LETTER = SQL_BOOKS_BY_FIRST_LETTER;
const SQL_BOOKS_BY_AUTHOR = SQL_BOOKS_BY_AUTHOR; const SQL_BOOKS_BY_AUTHOR = SQL_BOOKS_BY_AUTHOR;
const SQL_BOOKS_BY_SERIE = SQL_BOOKS_BY_SERIE; const SQL_BOOKS_BY_SERIE = SQL_BOOKS_BY_SERIE;
@ -296,21 +296,21 @@ class Book extends Base {
} }
return $this->datas; return $this->datas;
} }
public function GetMostInterestingDataToSendToKindle () public function GetMostInterestingDataToSendToKindle ()
{ {
$bestFormatForKindle = array ("EPUB", "PDF", "MOBI"); $bestFormatForKindle = array ("EPUB", "PDF", "MOBI");
$bestRank = -1; $bestRank = -1;
$bestData = NULL; $bestData = NULL;
foreach ($this->getDatas () as $data) { foreach ($this->getDatas () as $data) {
$key = array_search ($data->format, $bestFormatForKindle); $key = array_search ($data->format, $bestFormatForKindle);
if ($key !== false && $key > $bestRank) { if ($key !== false && $key > $bestRank) {
$bestRank = $key; $bestRank = $key;
$bestData = $data; $bestData = $data;
} }
} }
return $bestData; return $bestData;
} }
public function getDataById ($idData) public function getDataById ($idData)
{ {