@@ -22,9 +22,9 @@ |
||
| 22 | 22 | header("Pragma: public"); |
| 23 | 23 | header("Cache-Control: maxage=".$expires); |
| 24 | 24 | header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); |
| 25 | - $bookId = getURLParam ("id", NULL); |
|
| 25 | + $bookId = getURLParam ("id", null); |
|
| 26 | 26 | $type = getURLParam ("type", "jpg"); |
| 27 | - $idData = getURLParam ("data", NULL); |
|
| 27 | + $idData = getURLParam ("data", null); |
|
| 28 | 28 | if (is_null ($bookId)) |
| 29 | 29 | { |
| 30 | 30 | $book = Book::getBookByDataId($idData); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | empty ($config['cops_mail_configuration']["address.from"])) { |
| 12 | 12 | return "NOK. bad configuration."; |
| 13 | 13 | } |
| 14 | - return False; |
|
| 14 | + return false; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | function checkRequest ($idData, $emailDest) { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | if (empty ($emailDest)) { |
| 22 | 22 | return 'No email sent.'; |
| 23 | 23 | } |
| 24 | - return False; |
|
| 24 | + return false; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | if (php_sapi_name() === 'cli') { return; } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @return |
| 26 | 26 | * Transliterated text. |
| 27 | 27 | */ |
| 28 | -function _transliteration_process($string, $unknown = '?', $source_langcode = NULL) { |
|
| 28 | +function _transliteration_process($string, $unknown = '?', $source_langcode = null) { |
|
| 29 | 29 | // ASCII is always valid NFC! If we're only ever given plain ASCII, we can |
| 30 | 30 | // avoid the overhead of initializing the decomposition tables by skipping |
| 31 | 31 | // out early. |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * @return |
| 176 | 176 | * ASCII replacement character. |
| 177 | 177 | */ |
| 178 | -function _transliteration_replace($ord, $unknown = '?', $langcode = NULL) { |
|
| 178 | +function _transliteration_replace($ord, $unknown = '?', $langcode = null) { |
|
| 179 | 179 | static $map = array(); |
| 180 | 180 | |
| 181 | 181 | //GL: set language later |
@@ -36,14 +36,14 @@ discard block |
||
| 36 | 36 | // If there is a syntax error in the function created |
| 37 | 37 | // $dot will be equal to FALSE |
| 38 | 38 | if (!$dot) { |
| 39 | - return FALSE; |
|
| 39 | + return false; |
|
| 40 | 40 | } |
| 41 | 41 | // Execute the template |
| 42 | 42 | if (!empty ($data)) { |
| 43 | 43 | return $dot ($data); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - return NULL; |
|
| 46 | + return null; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | function getQueryString () { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $_SERVER['REDIRECT_STATUS'] = 404; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | -function getURLParam ($name, $default = NULL) { |
|
| 63 | +function getURLParam ($name, $default = null) { |
|
| 64 | 64 | if (!empty ($_GET) && isset($_GET[$name]) && $_GET[$name] != "") { |
| 65 | 65 | return $_GET[$name]; |
| 66 | 66 | } |
@@ -109,10 +109,10 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | switch ($error->level) { |
| 111 | 111 | case LIBXML_ERR_WARNING: |
| 112 | - $return .= "Warning $error->code: "; |
|
| 112 | + $return .= "warning $error->code: "; |
|
| 113 | 113 | break; |
| 114 | 114 | case LIBXML_ERR_ERROR: |
| 115 | - $return .= "Error $error->code: "; |
|
| 115 | + $return .= "error $error->code: "; |
|
| 116 | 116 | break; |
| 117 | 117 | case LIBXML_ERR_FATAL: |
| 118 | 118 | $return .= "Fatal Error $error->code: "; |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | $langs = getAcceptLanguages(); |
| 245 | 245 | } |
| 246 | 246 | //echo var_dump($langs); |
| 247 | - $lang_file = NULL; |
|
| 247 | + $lang_file = null; |
|
| 248 | 248 | foreach ($langs as $language => $val) { |
| 249 | 249 | $temp_file = dirname(__FILE__). '/lang/Localization_' . $language . '.json'; |
| 250 | 250 | if (file_exists($temp_file)) { |
@@ -273,13 +273,13 @@ discard block |
||
| 273 | 273 | $phrase .= ".many"; |
| 274 | 274 | |
| 275 | 275 | /* Static keyword is used to ensure the file is loaded only once */ |
| 276 | - static $translations = NULL; |
|
| 276 | + static $translations = null; |
|
| 277 | 277 | if ($reset) { |
| 278 | - $translations = NULL; |
|
| 278 | + $translations = null; |
|
| 279 | 279 | } |
| 280 | 280 | /* If no instance of $translations has occured load the language file */ |
| 281 | 281 | if (is_null($translations)) { |
| 282 | - $lang_file_en = NULL; |
|
| 282 | + $lang_file_en = null; |
|
| 283 | 283 | list ($lang, $lang_file) = getLangAndTranslationFile(); |
| 284 | 284 | if ($lang != "en") { |
| 285 | 285 | $lang_file_en = dirname(__FILE__). '/lang/' . 'Localization_en.json'; |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | public $facetGroup; |
| 357 | 357 | public $activeFacet; |
| 358 | 358 | |
| 359 | - public function __construct($phref, $ptype, $prel = NULL, $ptitle = NULL, $pfacetGroup = NULL, $pactiveFacet = FALSE) { |
|
| 359 | + public function __construct($phref, $ptype, $prel = null, $ptitle = null, $pfacetGroup = null, $pactiveFacet = false) { |
|
| 360 | 360 | $this->href = $phref; |
| 361 | 361 | $this->type = $ptype; |
| 362 | 362 | $this->rel = $prel; |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | |
| 378 | 378 | class LinkNavigation extends Link |
| 379 | 379 | { |
| 380 | - public function __construct($phref, $prel = NULL, $ptitle = NULL) { |
|
| 380 | + public function __construct($phref, $prel = null, $ptitle = null) { |
|
| 381 | 381 | parent::__construct ($phref, Link::OPDS_NAVIGATION_TYPE, $prel, $ptitle); |
| 382 | 382 | if (!is_null (GetUrlParam (DB))) $this->href = addURLParameter ($this->href, DB, GetUrlParam (DB)); |
| 383 | 383 | if (!preg_match ("#^\?(.*)#", $this->href) && !empty ($this->href)) $this->href = "?" . $this->href; |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | |
| 392 | 392 | class LinkFacet extends Link |
| 393 | 393 | { |
| 394 | - public function __construct($phref, $ptitle = NULL, $pfacetGroup = NULL, $pactiveFacet = FALSE) { |
|
| 394 | + public function __construct($phref, $ptitle = null, $pfacetGroup = null, $pactiveFacet = false) { |
|
| 395 | 395 | parent::__construct ($phref, Link::OPDS_PAGING_TYPE, "http://opds-spec.org/facet", $ptitle, $pfacetGroup, $pactiveFacet); |
| 396 | 396 | if (!is_null (GetUrlParam (DB))) $this->href = addURLParameter ($this->href, DB, GetUrlParam (DB)); |
| 397 | 397 | $this->href = parent::getScriptName() . $this->href; |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | public $linkArray; |
| 409 | 409 | public $localUpdated; |
| 410 | 410 | public $className; |
| 411 | - private static $updated = NULL; |
|
| 411 | + private static $updated = null; |
|
| 412 | 412 | |
| 413 | 413 | public static $icons = array( |
| 414 | 414 | Author::ALL_AUTHORS_ID => 'images/author.png', |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | if (($this->n) * getCurrentOption ("max_item_per_page") < $this->totalNumber) { |
| 641 | 641 | return new LinkNavigation ($currentUrl . "&n=" . ($this->n + 1), "next", localize ("paging.next.alternate")); |
| 642 | 642 | } |
| 643 | - return NULL; |
|
| 643 | + return null; |
|
| 644 | 644 | } |
| 645 | 645 | |
| 646 | 646 | public function getPrevLink () |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | if ($this->n > 1) { |
| 650 | 650 | return new LinkNavigation ($currentUrl . "&n=" . ($this->n - 1), "previous", localize ("paging.previous.alternate")); |
| 651 | 651 | } |
| 652 | - return NULL; |
|
| 652 | + return null; |
|
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | public function getMaxPage () |
@@ -746,7 +746,7 @@ discard block |
||
| 746 | 746 | { |
| 747 | 747 | public function InitializeContent () |
| 748 | 748 | { |
| 749 | - $customId = getURLParam ("custom", NULL); |
|
| 749 | + $customId = getURLParam ("custom", null); |
|
| 750 | 750 | $custom = CustomColumn::getCustomById ($customId, $this->idGet); |
| 751 | 751 | $this->idPage = $custom->getEntryId (); |
| 752 | 752 | $this->title = $custom->name; |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | { |
| 759 | 759 | public function InitializeContent () |
| 760 | 760 | { |
| 761 | - $customId = getURLParam ("custom", NULL); |
|
| 761 | + $customId = getURLParam ("custom", null); |
|
| 762 | 762 | $this->title = CustomColumn::getAllTitle ($customId); |
| 763 | 763 | $this->entryArray = CustomColumn::getAllCustoms($customId); |
| 764 | 764 | $this->idPage = CustomColumn::getAllCustomsId ($customId); |
@@ -882,9 +882,9 @@ discard block |
||
| 882 | 882 | return !is_null (getURLParam ("search")); |
| 883 | 883 | } |
| 884 | 884 | |
| 885 | - private function searchByScope ($scope, $limit = FALSE) { |
|
| 885 | + private function searchByScope ($scope, $limit = false) { |
|
| 886 | 886 | $n = $this->n; |
| 887 | - $numberPerPage = NULL; |
|
| 887 | + $numberPerPage = null; |
|
| 888 | 888 | $queryNormedAndUp = $this->query; |
| 889 | 889 | if (useNormAndUp ()) { |
| 890 | 890 | $queryNormedAndUp = normAndUp ($this->query); |
@@ -895,7 +895,7 @@ discard block |
||
| 895 | 895 | } |
| 896 | 896 | switch ($scope) { |
| 897 | 897 | case self::SCOPE_BOOK : |
| 898 | - $array = Book::getBooksByStartingLetter ('%' . $queryNormedAndUp, $n, NULL, $numberPerPage); |
|
| 898 | + $array = Book::getBooksByStartingLetter ('%' . $queryNormedAndUp, $n, null, $numberPerPage); |
|
| 899 | 899 | break; |
| 900 | 900 | case self::SCOPE_AUTHOR : |
| 901 | 901 | $array = Author::getAuthorsForSearch ('%' . $queryNormedAndUp); |
@@ -904,7 +904,7 @@ discard block |
||
| 904 | 904 | $array = Serie::getAllSeriesByQuery ($queryNormedAndUp); |
| 905 | 905 | break; |
| 906 | 906 | case self::SCOPE_TAG : |
| 907 | - $array = Tag::getAllTagsByQuery ($queryNormedAndUp, $n, NULL, $numberPerPage); |
|
| 907 | + $array = Tag::getAllTagsByQuery ($queryNormedAndUp, $n, null, $numberPerPage); |
|
| 908 | 908 | break; |
| 909 | 909 | case self::SCOPE_PUBLISHER : |
| 910 | 910 | $array = Publisher::getAllPublishersByQuery ($queryNormedAndUp); |
@@ -944,7 +944,7 @@ discard block |
||
| 944 | 944 | if (in_array($key, getCurrentOption ('ignored_categories'))) { |
| 945 | 945 | continue; |
| 946 | 946 | } |
| 947 | - $array = $this->searchByScope ($key, TRUE); |
|
| 947 | + $array = $this->searchByScope ($key, true); |
|
| 948 | 948 | |
| 949 | 949 | $i = 0; |
| 950 | 950 | if (count ($array) == 2 && is_array ($array [0])) { |
@@ -1165,7 +1165,7 @@ discard block |
||
| 1165 | 1165 | |
| 1166 | 1166 | const COMPATIBILITY_XML_ALDIKO = "aldiko"; |
| 1167 | 1167 | |
| 1168 | - private static $db = NULL; |
|
| 1168 | + private static $db = null; |
|
| 1169 | 1169 | |
| 1170 | 1170 | public static function isMultipleDatabaseEnabled () { |
| 1171 | 1171 | global $config; |
@@ -1201,7 +1201,7 @@ discard block |
||
| 1201 | 1201 | } |
| 1202 | 1202 | } |
| 1203 | 1203 | |
| 1204 | - public static function getDbName ($database = NULL) { |
|
| 1204 | + public static function getDbName ($database = null) { |
|
| 1205 | 1205 | global $config; |
| 1206 | 1206 | if (self::isMultipleDatabaseEnabled ()) { |
| 1207 | 1207 | if (is_null ($database)) $database = GetUrlParam (DB, 0); |
@@ -1214,7 +1214,7 @@ discard block |
||
| 1214 | 1214 | return ""; |
| 1215 | 1215 | } |
| 1216 | 1216 | |
| 1217 | - public static function getDbDirectory ($database = NULL) { |
|
| 1217 | + public static function getDbDirectory ($database = null) { |
|
| 1218 | 1218 | global $config; |
| 1219 | 1219 | if (self::isMultipleDatabaseEnabled ()) { |
| 1220 | 1220 | if (is_null ($database)) $database = GetUrlParam (DB, 0); |
@@ -1228,7 +1228,7 @@ discard block |
||
| 1228 | 1228 | } |
| 1229 | 1229 | |
| 1230 | 1230 | |
| 1231 | - public static function getDbFileName ($database = NULL) { |
|
| 1231 | + public static function getDbFileName ($database = null) { |
|
| 1232 | 1232 | return self::getDbDirectory ($database) .'metadata.db'; |
| 1233 | 1233 | } |
| 1234 | 1234 | |
@@ -1239,7 +1239,7 @@ discard block |
||
| 1239 | 1239 | throw new Exception("Database <{$database}> not found."); |
| 1240 | 1240 | } |
| 1241 | 1241 | |
| 1242 | - public static function getDb ($database = NULL) { |
|
| 1242 | + public static function getDb ($database = null) { |
|
| 1243 | 1243 | if (is_null (self::$db)) { |
| 1244 | 1244 | try { |
| 1245 | 1245 | if (is_readable (self::getDbFileName ($database))) { |
@@ -1270,19 +1270,19 @@ discard block |
||
| 1270 | 1270 | } |
| 1271 | 1271 | |
| 1272 | 1272 | public static function clearDb () { |
| 1273 | - self::$db = NULL; |
|
| 1273 | + self::$db = null; |
|
| 1274 | 1274 | } |
| 1275 | 1275 | |
| 1276 | - public static function executeQuerySingle ($query, $database = NULL) { |
|
| 1276 | + public static function executeQuerySingle ($query, $database = null) { |
|
| 1277 | 1277 | return self::getDb ($database)->query($query)->fetchColumn(); |
| 1278 | 1278 | } |
| 1279 | 1279 | |
| 1280 | - public static function getCountGeneric($table, $id, $pageId, $numberOfString = NULL) { |
|
| 1280 | + public static function getCountGeneric($table, $id, $pageId, $numberOfString = null) { |
|
| 1281 | 1281 | if (!$numberOfString) { |
| 1282 | 1282 | $numberOfString = $table . ".alphabetical"; |
| 1283 | 1283 | } |
| 1284 | 1284 | $count = self::executeQuerySingle ('select count(*) from ' . $table); |
| 1285 | - if ($count == 0) return NULL; |
|
| 1285 | + if ($count == 0) return null; |
|
| 1286 | 1286 | $entry = new Entry (localize($table . ".title"), $id, |
| 1287 | 1287 | str_format (localize($numberOfString, $count), $count), "text", |
| 1288 | 1288 | array ( new LinkNavigation ("?page=".$pageId)), "", $count); |
@@ -1307,7 +1307,7 @@ discard block |
||
| 1307 | 1307 | return $entryArray; |
| 1308 | 1308 | } |
| 1309 | 1309 | |
| 1310 | - public static function executeQuery($query, $columns, $filter, $params, $n, $database = NULL, $numberPerPage = NULL) { |
|
| 1310 | + public static function executeQuery($query, $columns, $filter, $params, $n, $database = null, $numberPerPage = null) { |
|
| 1311 | 1311 | $totalResult = -1; |
| 1312 | 1312 | |
| 1313 | 1313 | if (useNormAndUp ()) { |
@@ -10,8 +10,8 @@ |
||
| 10 | 10 | |
| 11 | 11 | class OPDSRenderer |
| 12 | 12 | { |
| 13 | - private $xmlStream = NULL; |
|
| 14 | - private $updated = NULL; |
|
| 13 | + private $xmlStream = null; |
|
| 14 | + private $updated = null; |
|
| 15 | 15 | |
| 16 | 16 | private function getUpdatedTime () { |
| 17 | 17 | if (is_null ($this->updated)) { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | if ($post = $result->fetchObject ()) { |
| 61 | 61 | return $post->id; |
| 62 | 62 | } |
| 63 | - return NULL; |
|
| 63 | + return null; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public static function getCount($customId) { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | if ($post = $result->fetchObject ()) { |
| 78 | 78 | return new CustomColumn ($post->id, $post->name, $customId); |
| 79 | 79 | } |
| 80 | - return NULL; |
|
| 80 | + return null; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | public static function getAllCustoms($customId) { |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | header ("Content-Type: text/html;charset=utf-8"); |
| 15 | 15 | |
| 16 | -$idData = getURLParam ("data", NULL); |
|
| 16 | +$idData = getURLParam ("data", null); |
|
| 17 | 17 | $add = "data=$idData&"; |
| 18 | 18 | if (!is_null (GetUrlParam (DB))) $add .= DB . "=" . GetUrlParam (DB) . "&"; |
| 19 | 19 | $myBook = Book::getBookByDataId($idData); |
@@ -66,8 +66,8 @@ |
||
| 66 | 66 | $out = self::getBookContentArray ($book); |
| 67 | 67 | $database = GetUrlParam (DB); |
| 68 | 68 | |
| 69 | - $out ["coverurl"] = Data::getLink ($book, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", NULL)->hrefXhtml (); |
|
| 70 | - $out ["thumbnailurl"] = Data::getLink ($book, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", NULL, NULL, $config['cops_html_thumbnail_height'] * 2)->hrefXhtml (); |
|
| 69 | + $out ["coverurl"] = Data::getLink ($book, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", null)->hrefXhtml (); |
|
| 70 | + $out ["thumbnailurl"] = Data::getLink ($book, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", null, null, $config['cops_html_thumbnail_height'] * 2)->hrefXhtml (); |
|
| 71 | 71 | $out ["content"] = $book->getComment (false); |
| 72 | 72 | $out ["datas"] = array (); |
| 73 | 73 | $dataKindle = $book->GetMostInterestingDataToSendToKindle (); |
@@ -70,12 +70,12 @@ discard block |
||
| 70 | 70 | public $seriesIndex; |
| 71 | 71 | public $comment; |
| 72 | 72 | public $rating; |
| 73 | - public $datas = NULL; |
|
| 74 | - public $authors = NULL; |
|
| 75 | - public $publisher = NULL; |
|
| 76 | - public $serie = NULL; |
|
| 77 | - public $tags = NULL; |
|
| 78 | - public $languages = NULL; |
|
| 73 | + public $datas = null; |
|
| 74 | + public $authors = null; |
|
| 75 | + public $publisher = null; |
|
| 76 | + public $serie = null; |
|
| 77 | + public $tags = null; |
|
| 78 | + public $languages = null; |
|
| 79 | 79 | public $format = array (); |
| 80 | 80 | |
| 81 | 81 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | /* End of other class (author, series, tag, ...) initialization and accessors */ |
| 199 | 199 | |
| 200 | 200 | public static function getFilterString () { |
| 201 | - $filter = getURLParam ("tag", NULL); |
|
| 201 | + $filter = getURLParam ("tag", null); |
|
| 202 | 202 | if (empty ($filter)) return ""; |
| 203 | 203 | |
| 204 | 204 | $exists = true; |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | { |
| 221 | 221 | $bestFormatForKindle = array ("EPUB", "PDF", "AZW3", "MOBI"); |
| 222 | 222 | $bestRank = -1; |
| 223 | - $bestData = NULL; |
|
| 223 | + $bestData = null; |
|
| 224 | 224 | foreach ($this->getDatas () as $data) { |
| 225 | 225 | $key = array_search ($data->format, $bestFormatForKindle); |
| 226 | 226 | if ($key !== false && $key > $bestRank) { |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | return reset ($reduced); |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | - public function getFilePath ($extension, $idData = NULL, $relative = false) |
|
| 290 | + public function getFilePath ($extension, $idData = null, $relative = false) |
|
| 291 | 291 | { |
| 292 | 292 | if ($extension == "jpg") |
| 293 | 293 | { |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | else |
| 297 | 297 | { |
| 298 | 298 | $data = $this->getDataById ($idData); |
| 299 | - if (!$data) return NULL; |
|
| 299 | + if (!$data) return null; |
|
| 300 | 300 | $file = $data->name . "." . strtolower ($data->format); |
| 301 | 301 | } |
| 302 | 302 | |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | - public function getThumbnail ($width, $height, $outputfile = NULL) { |
|
| 349 | + public function getThumbnail ($width, $height, $outputfile = null) { |
|
| 350 | 350 | if (is_null ($width) && is_null ($height)) { |
| 351 | 351 | return false; |
| 352 | 352 | } |
@@ -387,9 +387,9 @@ discard block |
||
| 387 | 387 | |
| 388 | 388 | if ($this->hasCover) |
| 389 | 389 | { |
| 390 | - array_push ($linkArray, Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", NULL)); |
|
| 390 | + array_push ($linkArray, Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", null)); |
|
| 391 | 391 | |
| 392 | - array_push ($linkArray, Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", NULL)); |
|
| 392 | + array_push ($linkArray, Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", null)); |
|
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | foreach ($this->getDatas () as $data) |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | $this->getLinkArray (), $this); |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | - public static function getBookCount($database = NULL) { |
|
| 422 | + public static function getBookCount($database = null) { |
|
| 423 | 423 | return parent::executeQuerySingle ('select count(*) from books', $database); |
| 424 | 424 | } |
| 425 | 425 | |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | $book = new Book ($post); |
| 482 | 482 | return $book; |
| 483 | 483 | } |
| 484 | - return NULL; |
|
| 484 | + return null; |
|
| 485 | 485 | } |
| 486 | 486 | |
| 487 | 487 | public static function getBookByDataId($dataId) { |
@@ -497,10 +497,10 @@ discard block |
||
| 497 | 497 | $book->datas = array ($data); |
| 498 | 498 | return $book; |
| 499 | 499 | } |
| 500 | - return NULL; |
|
| 500 | + return null; |
|
| 501 | 501 | } |
| 502 | 502 | |
| 503 | - public static function getBooksByQuery($query, $n, $database = NULL, $numberPerPage = NULL) { |
|
| 503 | + public static function getBooksByQuery($query, $n, $database = null, $numberPerPage = null) { |
|
| 504 | 504 | $i = 0; |
| 505 | 505 | $critArray = array (); |
| 506 | 506 | foreach (array (PageQueryResult::SCOPE_AUTHOR, |
@@ -544,11 +544,11 @@ discard block |
||
| 544 | 544 | return $entryArray; |
| 545 | 545 | } |
| 546 | 546 | |
| 547 | - public static function getBooksByStartingLetter($letter, $n, $database = NULL, $numberPerPage = NULL) { |
|
| 547 | + public static function getBooksByStartingLetter($letter, $n, $database = null, $numberPerPage = null) { |
|
| 548 | 548 | return self::getEntryArray (self::SQL_BOOKS_BY_FIRST_LETTER, array ($letter . "%"), $n, $database, $numberPerPage); |
| 549 | 549 | } |
| 550 | 550 | |
| 551 | - public static function getEntryArray ($query, $params, $n, $database = NULL, $numberPerPage = NULL) { |
|
| 551 | + public static function getEntryArray ($query, $params, $n, $database = null, $numberPerPage = null) { |
|
| 552 | 552 | list ($totalNumber, $result) = parent::executeQuery ($query, self::BOOK_COLUMNS, self::getFilterString (), $params, $n, $database, $numberPerPage); |
| 553 | 553 | $entryArray = array(); |
| 554 | 554 | while ($post = $result->fetchObject ()) |