@@ -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 |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | * "address.from" => "[email protected]" |
| 211 | 211 | * ); |
| 212 | 212 | */ |
| 213 | - $config['cops_mail_configuration'] = NULL; |
|
| 213 | + $config['cops_mail_configuration'] = null; |
|
| 214 | 214 | |
| 215 | 215 | /* |
| 216 | 216 | * Use filter in HTML catalog |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | * array( "username" => "xxx", "password" => "secret") : Enable PHP password protection |
| 283 | 283 | * NULL : Disable PHP password protection (You can still use htpasswd) |
| 284 | 284 | */ |
| 285 | - $config['cops_basic_authentication'] = NULL; |
|
| 285 | + $config['cops_basic_authentication'] = null; |
|
| 286 | 286 | |
| 287 | 287 | /* |
| 288 | 288 | * Which template is used by default : |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | $err = getURLParam ("err", -1); |
| 18 | 18 | $full = getURLParam ("full"); |
| 19 | - $error = NULL; |
|
| 19 | + $error = null; |
|
| 20 | 20 | switch ($err) { |
| 21 | 21 | case 1 : |
| 22 | 22 | $error = "Database error"; |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | if ($post = $result->fetchObject ()) { |
| 45 | 45 | return new Language ($post->id, Language::getLanguageString ($post->lang_code)); |
| 46 | 46 | } |
| 47 | - return NULL; |
|
| 47 | + return null; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | |
@@ -19,9 +19,9 @@ discard block |
||
| 19 | 19 | return !is_null (getURLParam ("search")); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - private function searchByScope ($scope, $limit = FALSE) { |
|
| 22 | + private function searchByScope ($scope, $limit = false) { |
|
| 23 | 23 | $n = $this->n; |
| 24 | - $numberPerPage = NULL; |
|
| 24 | + $numberPerPage = null; |
|
| 25 | 25 | $queryNormedAndUp = $this->query; |
| 26 | 26 | if (useNormAndUp ()) { |
| 27 | 27 | $queryNormedAndUp = normAndUp ($this->query); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | switch ($scope) { |
| 34 | 34 | case self::SCOPE_BOOK : |
| 35 | - $array = Book::getBooksByStartingLetter ('%' . $queryNormedAndUp, $n, NULL, $numberPerPage); |
|
| 35 | + $array = Book::getBooksByStartingLetter ('%' . $queryNormedAndUp, $n, null, $numberPerPage); |
|
| 36 | 36 | break; |
| 37 | 37 | case self::SCOPE_AUTHOR : |
| 38 | 38 | $array = Author::getAuthorsForSearch ('%' . $queryNormedAndUp); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $array = Serie::getAllSeriesByQuery ($queryNormedAndUp); |
| 42 | 42 | break; |
| 43 | 43 | case self::SCOPE_TAG : |
| 44 | - $array = Tag::getAllTagsByQuery ($queryNormedAndUp, $n, NULL, $numberPerPage); |
|
| 44 | + $array = Tag::getAllTagsByQuery ($queryNormedAndUp, $n, null, $numberPerPage); |
|
| 45 | 45 | break; |
| 46 | 46 | case self::SCOPE_PUBLISHER : |
| 47 | 47 | $array = Publisher::getAllPublishersByQuery ($queryNormedAndUp); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | if (in_array($key, getCurrentOption ('ignored_categories'))) { |
| 82 | 82 | continue; |
| 83 | 83 | } |
| 84 | - $array = $this->searchByScope ($key, TRUE); |
|
| 84 | + $array = $this->searchByScope ($key, true); |
|
| 85 | 85 | |
| 86 | 86 | $i = 0; |
| 87 | 87 | if (count ($array) == 2 && is_array ($array [0])) { |
@@ -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) { |
@@ -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) { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | return $this->getUpdatedFilename () . ".kepub.epub"; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - public function getDataLink ($rel, $title = NULL) { |
|
| 108 | + public function getDataLink ($rel, $title = null) { |
|
| 109 | 109 | global $config; |
| 110 | 110 | |
| 111 | 111 | if ($rel == Link::OPDS_ACQUISITION_TYPE && $config['cops_use_url_rewriting'] == "1") { |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | return $this->book->path . "/" . $this->getFilename (); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - public function getHtmlLinkWithRewriting ($title = NULL) { |
|
| 126 | + public function getHtmlLinkWithRewriting ($title = null) { |
|
| 127 | 127 | global $config; |
| 128 | 128 | |
| 129 | 129 | $database = ""; |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | return $urlParam; |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - public static function getLink ($book, $type, $mime, $rel, $filename, $idData, $title = NULL, $height = NULL) |
|
| 176 | + public static function getLink ($book, $type, $mime, $rel, $filename, $idData, $title = null, $height = null) |
|
| 177 | 177 | { |
| 178 | 178 | global $config; |
| 179 | 179 | |