@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | if ($post = $result->fetchObject()) { |
| 58 | 58 | return new CustomColumn ($id, $post->name, $this); |
| 59 | 59 | } |
| 60 | - return NULL; |
|
| 60 | + return null; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | protected function getAllCustomValuesFromDatabase() |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | if ($post = $result->fetchObject()) { |
| 93 | 93 | return new CustomColumn($post->id, $post->name, $this); |
| 94 | 94 | } |
| 95 | - return new CustomColumn(NULL, localize("customcolumn.enum.unknown"), $this); |
|
| 95 | + return new CustomColumn(null, localize("customcolumn.enum.unknown"), $this); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | public function isSearchable() |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | if ($post = $result->fetchObject()) { |
| 58 | 58 | return new CustomColumn($id, $post->name, $this); |
| 59 | 59 | } |
| 60 | - return NULL; |
|
| 60 | + return null; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | protected function getAllCustomValuesFromDatabase() |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | public function getDescription() |
| 83 | 83 | { |
| 84 | 84 | $desc = $this->getDatabaseDescription(); |
| 85 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 85 | + if ($desc === null || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 86 | 86 | return $desc; |
| 87 | 87 | } |
| 88 | 88 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if ($post = $result->fetchObject()) { |
| 96 | 96 | return new CustomColumn($post->id, $post->name, $this); |
| 97 | 97 | } |
| 98 | - return new CustomColumn(NULL, "", $this); |
|
| 98 | + return new CustomColumn(null, "", $this); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | public function isSearchable() |
@@ -37,14 +37,14 @@ discard block |
||
| 37 | 37 | /** @var string the datatype of this column (one of the CUSTOM_TYPE_* constant values) */ |
| 38 | 38 | public $datatype; |
| 39 | 39 | /** @var null|Entry[] */ |
| 40 | - private $customValues = NULL; |
|
| 40 | + private $customValues = null; |
|
| 41 | 41 | |
| 42 | 42 | protected function __construct($pcustomId, $pdatatype) |
| 43 | 43 | { |
| 44 | 44 | $this->columnTitle = self::getTitleByCustomID($pcustomId); |
| 45 | 45 | $this->customId = $pcustomId; |
| 46 | 46 | $this->datatype = $pdatatype; |
| 47 | - $this->customValues = NULL; |
|
| 47 | + $this->customValues = null; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
@@ -110,9 +110,9 @@ discard block |
||
| 110 | 110 | $result->execute(array($this->customId)); |
| 111 | 111 | if ($post = $result->fetchObject()) { |
| 112 | 112 | $json = json_decode($post->display); |
| 113 | - return (isset($json->description) && !empty($json->description)) ? $json->description : NULL; |
|
| 113 | + return (isset($json->description) && !empty($json->description)) ? $json->description : null; |
|
| 114 | 114 | } |
| 115 | - return NULL; |
|
| 115 | + return null; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | if ($post = $result->fetchObject()) { |
| 169 | 169 | return $post->datatype; |
| 170 | 170 | } |
| 171 | - return NULL; |
|
| 171 | + return null; |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | case self::CUSTOM_TYPE_BOOL: |
| 207 | 207 | return self::$customColumnCacheID[$customId] = new CustomColumnTypeBool($customId); |
| 208 | 208 | case self::CUSTOM_TYPE_COMPOSITE: |
| 209 | - return NULL; //TODO Currently not supported |
|
| 209 | + return null; //TODO Currently not supported |
|
| 210 | 210 | default: |
| 211 | 211 | throw new Exception("Unkown column type: " . $datatype); |
| 212 | 212 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | if ($post = $result->fetchObject()) { |
| 230 | 230 | return self::$customColumnCacheLookup[$lookup] = self::createByCustomID($post->id); |
| 231 | 231 | } |
| 232 | - return self::$customColumnCacheLookup[$lookup] = NULL; |
|
| 232 | + return self::$customColumnCacheLookup[$lookup] = null; |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | /** |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | public function getAllCustomValues() |
| 242 | 242 | { |
| 243 | 243 | // lazy loading |
| 244 | - if ($this->customValues == NULL) |
|
| 244 | + if ($this->customValues == null) |
|
| 245 | 245 | $this->customValues = $this->getAllCustomValuesFromDatabase(); |
| 246 | 246 | |
| 247 | 247 | return $this->customValues; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $query = str_format(Book::SQL_BOOKS_BY_CUSTOM_BOOL_TRUE, "{0}", "{1}", $this->getTableName()); |
| 43 | 43 | return array($query, array()); |
| 44 | 44 | } else { |
| 45 | - return NULL; |
|
| 45 | + return null; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | public function getDescription() |
| 63 | 63 | { |
| 64 | 64 | $desc = $this->getDatabaseDescription(); |
| 65 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 65 | + if ($desc === null || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 66 | 66 | return $desc; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | return new CustomColumn($date->format("Y-m-d"), $date->format(localize("customcolumn.date.format")), $this); |
| 79 | 79 | } |
| 80 | - return new CustomColumn(NULL, localize("customcolumn.date.unknown"), $this); |
|
| 80 | + return new CustomColumn(null, localize("customcolumn.date.unknown"), $this); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | public function isSearchable() |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | if ($post = $result->fetchObject()) { |
| 101 | 101 | return new CustomColumn($post->value, str_format(localize("customcolumn.stars", $post->value / 2), $post->value / 2), $this); |
| 102 | 102 | } |
| 103 | - return new CustomColumn(NULL, localize("customcolumn.rating.unknown"), $this); |
|
| 103 | + return new CustomColumn(null, localize("customcolumn.rating.unknown"), $this); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | public function isSearchable() |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | public function getDescription() |
| 56 | 56 | { |
| 57 | 57 | $desc = $this->getDatabaseDescription(); |
| 58 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 58 | + if ($desc === null || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 59 | 59 | return $desc; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | if ($post = $result->fetchObject()) { |
| 69 | 69 | return new CustomColumn($post->value, $post->value, $this); |
| 70 | 70 | } |
| 71 | - return new CustomColumn(NULL, localize("customcolumn.float.unknown"), $this); |
|
| 71 | + return new CustomColumn(null, localize("customcolumn.float.unknown"), $this); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | public function isSearchable() |
@@ -99,12 +99,12 @@ discard block |
||
| 99 | 99 | public $seriesIndex; |
| 100 | 100 | public $comment; |
| 101 | 101 | public $rating; |
| 102 | - public $datas = NULL; |
|
| 103 | - public $authors = NULL; |
|
| 104 | - public $publisher = NULL; |
|
| 105 | - public $serie = NULL; |
|
| 106 | - public $tags = NULL; |
|
| 107 | - public $languages = NULL; |
|
| 102 | + public $datas = null; |
|
| 103 | + public $authors = null; |
|
| 104 | + public $publisher = null; |
|
| 105 | + public $serie = null; |
|
| 106 | + public $tags = null; |
|
| 107 | + public $languages = null; |
|
| 108 | 108 | public $format = array (); |
| 109 | 109 | |
| 110 | 110 | |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | /* End of other class (author, series, tag, ...) initialization and accessors */ |
| 243 | 243 | |
| 244 | 244 | public static function getFilterString() { |
| 245 | - $filter = getURLParam('tag', NULL); |
|
| 245 | + $filter = getURLParam('tag', null); |
|
| 246 | 246 | if (empty($filter)) return ''; |
| 247 | 247 | |
| 248 | 248 | $exists = true; |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | { |
| 265 | 265 | $bestFormatForKindle = array('EPUB', 'PDF', 'AZW3', 'MOBI'); |
| 266 | 266 | $bestRank = -1; |
| 267 | - $bestData = NULL; |
|
| 267 | + $bestData = null; |
|
| 268 | 268 | foreach ($this->getDatas() as $data) { |
| 269 | 269 | $key = array_search($data->format, $bestFormatForKindle); |
| 270 | 270 | if ($key !== false && $key > $bestRank) { |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | return reset($reduced); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - public function getFilePath($extension, $idData = NULL, $relative = false) |
|
| 334 | + public function getFilePath($extension, $idData = null, $relative = false) |
|
| 335 | 335 | { |
| 336 | 336 | if ($extension == 'jpg') |
| 337 | 337 | { |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | else |
| 341 | 341 | { |
| 342 | 342 | $data = $this->getDataById($idData); |
| 343 | - if (!$data) return NULL; |
|
| 343 | + if (!$data) return null; |
|
| 344 | 344 | $file = $data->name . '.' . strtolower($data->format); |
| 345 | 345 | } |
| 346 | 346 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | } |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | - public function getThumbnail($width, $height, $outputfile = NULL) { |
|
| 393 | + public function getThumbnail($width, $height, $outputfile = null) { |
|
| 394 | 394 | if (is_null($width) && is_null($height)) { |
| 395 | 395 | return false; |
| 396 | 396 | } |
@@ -431,9 +431,9 @@ discard block |
||
| 431 | 431 | |
| 432 | 432 | if ($this->hasCover) |
| 433 | 433 | { |
| 434 | - array_push($linkArray, Data::getLink($this, 'jpg', 'image/jpeg', Link::OPDS_IMAGE_TYPE, 'cover.jpg', NULL)); |
|
| 434 | + array_push($linkArray, Data::getLink($this, 'jpg', 'image/jpeg', Link::OPDS_IMAGE_TYPE, 'cover.jpg', null)); |
|
| 435 | 435 | |
| 436 | - array_push($linkArray, Data::getLink($this, 'jpg', 'image/jpeg', Link::OPDS_THUMBNAIL_TYPE, 'cover.jpg', NULL)); |
|
| 436 | + array_push($linkArray, Data::getLink($this, 'jpg', 'image/jpeg', Link::OPDS_THUMBNAIL_TYPE, 'cover.jpg', null)); |
|
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | foreach ($this->getDatas() as $data) |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | $this->getLinkArray(), $this); |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | - public static function getBookCount($database = NULL) { |
|
| 467 | + public static function getBookCount($database = null) { |
|
| 468 | 468 | return parent::executeQuerySingle('select count(*) from books', $database); |
| 469 | 469 | } |
| 470 | 470 | |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | $book = new Book($post); |
| 534 | 534 | return $book; |
| 535 | 535 | } |
| 536 | - return NULL; |
|
| 536 | + return null; |
|
| 537 | 537 | } |
| 538 | 538 | |
| 539 | 539 | public static function getBookByDataId($dataId) { |
@@ -549,10 +549,10 @@ discard block |
||
| 549 | 549 | $book->datas = array($data); |
| 550 | 550 | return $book; |
| 551 | 551 | } |
| 552 | - return NULL; |
|
| 552 | + return null; |
|
| 553 | 553 | } |
| 554 | 554 | |
| 555 | - public static function getBooksByQuery($query, $n, $database = NULL, $numberPerPage = NULL) { |
|
| 555 | + public static function getBooksByQuery($query, $n, $database = null, $numberPerPage = null) { |
|
| 556 | 556 | $i = 0; |
| 557 | 557 | $critArray = array(); |
| 558 | 558 | foreach (array(PageQueryResult::SCOPE_AUTHOR, |
@@ -599,11 +599,11 @@ discard block |
||
| 599 | 599 | return $entryArray; |
| 600 | 600 | } |
| 601 | 601 | |
| 602 | - public static function getBooksByStartingLetter($letter, $n, $database = NULL, $numberPerPage = NULL) { |
|
| 602 | + public static function getBooksByStartingLetter($letter, $n, $database = null, $numberPerPage = null) { |
|
| 603 | 603 | return self::getEntryArray(self::SQL_BOOKS_BY_FIRST_LETTER, array($letter . '%'), $n, $database, $numberPerPage); |
| 604 | 604 | } |
| 605 | 605 | |
| 606 | - public static function getEntryArray($query, $params, $n, $database = NULL, $numberPerPage = NULL) { |
|
| 606 | + public static function getEntryArray($query, $params, $n, $database = null, $numberPerPage = null) { |
|
| 607 | 607 | /* @var $totalNumber integer */ |
| 608 | 608 | /* @var $result PDOStatement */ |
| 609 | 609 | list($totalNumber, $result) = parent::executeQuery($query, self::BOOK_COLUMNS, self::getFilterString(), $params, $n, $database, $numberPerPage); |
@@ -41,13 +41,13 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | protected function getAllCustomValuesFromDatabase() |
| 43 | 43 | { |
| 44 | - return NULL; |
|
| 44 | + return null; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public function getDescription() |
| 48 | 48 | { |
| 49 | 49 | $desc = $this->getDatabaseDescription(); |
| 50 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 50 | + if ($desc === null || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 51 | 51 | return $desc; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | if ($post = $result->fetchObject()) { |
| 61 | 61 | return new CustomColumn($post->id, $post->value, $this); |
| 62 | 62 | } |
| 63 | - return new CustomColumn(NULL, localize("customcolumn.float.unknown"), $this); |
|
| 63 | + return new CustomColumn(null, localize("customcolumn.float.unknown"), $this); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public function isSearchable() |