@@ -49,8 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | } |
51 | 51 | |
52 | - switch ($type) |
|
53 | - { |
|
52 | + switch ($type) { |
|
54 | 53 | case 'jpg': |
55 | 54 | header('Content-Type: image/jpeg'); |
56 | 55 | //by default, we don't cache |
@@ -23,10 +23,10 @@ |
||
23 | 23 | header('Pragma: public'); |
24 | 24 | header('Cache-Control: max-age=' . $expires); |
25 | 25 | header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); |
26 | - $bookId = getURLParam('id', NULL); |
|
26 | + $bookId = getURLParam('id', null); |
|
27 | 27 | $type = getURLParam('type', 'jpg'); |
28 | - $idData = getURLParam('data', NULL); |
|
29 | - $viewOnly = getURLParam('view', FALSE); |
|
28 | + $idData = getURLParam('data', null); |
|
29 | + $viewOnly = getURLParam('view', false); |
|
30 | 30 | |
31 | 31 | if (is_null($bookId)) { |
32 | 32 | $book = Book::getBookByDataId($idData); |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | } |
20 | 20 | } |
21 | 21 | |
22 | - $expires = 60*60*24*14; |
|
22 | + $expires = 60 * 60 * 24 * 14; |
|
23 | 23 | header('Pragma: public'); |
24 | 24 | header('Cache-Control: max-age=' . $expires); |
25 | - header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); |
|
25 | + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT'); |
|
26 | 26 | $bookId = getURLParam('id', NULL); |
27 | 27 | $type = getURLParam('type', 'jpg'); |
28 | 28 | $idData = getURLParam('data', NULL); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | if (!$book) { |
38 | - notFound (); |
|
38 | + notFound(); |
|
39 | 39 | return; |
40 | 40 | } |
41 | 41 | |
@@ -57,15 +57,15 @@ discard block |
||
57 | 57 | header('Content-Type: image/jpeg'); |
58 | 58 | //by default, we don't cache |
59 | 59 | $thumbnailCacheFullpath = null; |
60 | - if ( isset($config['cops_thumbnail_cache_directory']) && $config['cops_thumbnail_cache_directory'] !== '' ) { |
|
60 | + if (isset($config['cops_thumbnail_cache_directory']) && $config['cops_thumbnail_cache_directory'] !== '') { |
|
61 | 61 | $thumbnailCacheFullpath = $config['cops_thumbnail_cache_directory']; |
62 | 62 | //if multiple databases, add a subfolder with the database ID |
63 | - $thumbnailCacheFullpath .= !is_null(GetUrlParam (DB)) ? 'db-' . GetUrlParam (DB) . DIRECTORY_SEPARATOR : ''; |
|
63 | + $thumbnailCacheFullpath .= !is_null(GetUrlParam(DB))?'db-' . GetUrlParam(DB) . DIRECTORY_SEPARATOR:''; |
|
64 | 64 | //when there are lots of thumbnails, it's better to save files in subfolders, so if the book's uuid is |
65 | 65 | //"01234567-89ab-cdef-0123-456789abcdef", we will save the thumbnail in .../0/12/34567-89ab-cdef-0123-456789abcdef-... |
66 | 66 | $thumbnailCacheFullpath .= substr($book->uuid, 0, 1) . DIRECTORY_SEPARATOR . substr($book->uuid, 1, 2) . DIRECTORY_SEPARATOR; |
67 | 67 | //check if cache folder exists or create it |
68 | - if ( file_exists($thumbnailCacheFullpath) || mkdir($thumbnailCacheFullpath, 0700, true) ) { |
|
68 | + if (file_exists($thumbnailCacheFullpath) || mkdir($thumbnailCacheFullpath, 0700, true)) { |
|
69 | 69 | //we name the thumbnail from the book's uuid and it's dimensions (width and/or height) |
70 | 70 | $thumbnailCacheName = substr($book->uuid, 3) . '-' . getURLParam('width') . 'x' . getURLParam('height') . '.jpg'; |
71 | 71 | $thumbnailCacheFullpath = $thumbnailCacheFullpath . $thumbnailCacheName; |
@@ -75,20 +75,20 @@ discard block |
||
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | - if ( $thumbnailCacheFullpath !== null && file_exists($thumbnailCacheFullpath) ) { |
|
78 | + if ($thumbnailCacheFullpath !== null && file_exists($thumbnailCacheFullpath)) { |
|
79 | 79 | //return the already cached thumbnail |
80 | - readfile( $thumbnailCacheFullpath ); |
|
80 | + readfile($thumbnailCacheFullpath); |
|
81 | 81 | return; |
82 | 82 | } |
83 | 83 | |
84 | - if ($book->getThumbnail (getURLParam('width'), getURLParam('height'), $thumbnailCacheFullpath)) { |
|
84 | + if ($book->getThumbnail(getURLParam('width'), getURLParam('height'), $thumbnailCacheFullpath)) { |
|
85 | 85 | //if we don't cache the thumbnail, imagejpeg() in $book->getThumbnail() already return the image data |
86 | - if ( $thumbnailCacheFullpath === null ) { |
|
86 | + if ($thumbnailCacheFullpath === null) { |
|
87 | 87 | // The cover had to be resized |
88 | 88 | return; |
89 | 89 | } else { |
90 | 90 | //return the just cached thumbnail |
91 | - readfile( $thumbnailCacheFullpath ); |
|
91 | + readfile($thumbnailCacheFullpath); |
|
92 | 92 | return; |
93 | 93 | } |
94 | 94 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * |
190 | 190 | * Note that the composite custom columns are not supported |
191 | 191 | */ |
192 | - $config['cops_calibre_custom_column_list'] = array (); |
|
192 | + $config['cops_calibre_custom_column_list'] = array(); |
|
193 | 193 | |
194 | 194 | /* |
195 | 195 | * Custom Columns for the book preview panel |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | * |
200 | 200 | * Note that the composite custom columns are not supported |
201 | 201 | */ |
202 | - $config['cops_calibre_custom_column_preview'] = array (); |
|
202 | + $config['cops_calibre_custom_column_preview'] = array(); |
|
203 | 203 | |
204 | 204 | /* |
205 | 205 | * Rename .epub to .kepub.epub if downloaded from a Kobo eReader |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | * "address.from" => "[email protected]" |
232 | 232 | * ); |
233 | 233 | */ |
234 | - $config['cops_mail_configuration'] = NULL; |
|
234 | + $config['cops_mail_configuration'] = null; |
|
235 | 235 | |
236 | 236 | /* |
237 | 237 | * Use filter in HTML catalog |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | * array( "username" => "xxx", "password" => "secret") : Enable PHP password protection |
304 | 304 | * NULL : Disable PHP password protection (You can still use htpasswd) |
305 | 305 | */ |
306 | - $config['cops_basic_authentication'] = NULL; |
|
306 | + $config['cops_basic_authentication'] = null; |
|
307 | 307 | |
308 | 308 | /* |
309 | 309 | * Which template is used by default : |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | |
16 | 16 | $idData = getURLParam('data', NULL); |
17 | 17 | $add = 'data=' . $idData . '&'; |
18 | -if (!is_null (GetUrlParam (DB))) { |
|
19 | - $add .= DB . '=' . GetUrlParam (DB) . '&'; |
|
18 | +if (!is_null(GetUrlParam(DB))) { |
|
19 | + $add .= DB . '=' . GetUrlParam(DB) . '&'; |
|
20 | 20 | } |
21 | 21 | $myBook = Book::getBookByDataId($idData); |
22 | 22 | |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | Monocle.DEBUG = true; |
38 | 38 | var bookData = { |
39 | 39 | getComponents: function() { |
40 | - <?php echo 'return [' . implode(', ', array_map(function($comp) { return "'" . $comp . "'"; }, $book->components ())) . '];'; ?> |
|
40 | + <?php echo 'return [' . implode(', ', array_map(function($comp) { return "'" . $comp . "'"; }, $book->components())) . '];'; ?> |
|
41 | 41 | }, |
42 | 42 | getContents: function() { |
43 | - <?php echo 'return [' . implode(', ', array_map(function($content) { return "{title: '" . addslashes($content['title']) . "', src: '". $content['src'] . "'}"; }, $book->contents())) . '];'; ?> |
|
43 | + <?php echo 'return [' . implode(', ', array_map(function($content) { return "{title: '" . addslashes($content['title']) . "', src: '" . $content['src'] . "'}"; }, $book->contents())) . '];'; ?> |
|
44 | 44 | }, |
45 | 45 | getComponent: function (componentId) { |
46 | 46 | return { url: "epubfs.php?<?php echo $add ?>comp=" + componentId }; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | - header('Content-Type: text/html;charset=utf-8'); |
|
2 | + header('Content-Type: text/html;charset=utf-8'); |
|
3 | 3 | ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
4 | 4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> |
5 | 5 | <?php |
@@ -13,7 +13,7 @@ |
||
13 | 13 | require_once 'config.php'; |
14 | 14 | require_once 'base.php'; |
15 | 15 | |
16 | -$idData = getURLParam('data', NULL); |
|
16 | +$idData = getURLParam('data', null); |
|
17 | 17 | $add = 'data=' . $idData . '&'; |
18 | 18 | if (!is_null (GetUrlParam (DB))) { |
19 | 19 | $add .= DB . '=' . GetUrlParam (DB) . '&'; |
@@ -37,14 +37,14 @@ |
||
37 | 37 | header('Content-Type:text/html;charset=utf-8'); |
38 | 38 | |
39 | 39 | $data = array('title' => $config['cops_title_default'], |
40 | - 'version' => VERSION, |
|
41 | - 'opds_url' => $config['cops_full_url'] . 'feed.php', |
|
42 | - 'customHeader' => '', |
|
43 | - 'template' => getCurrentTemplate(), |
|
44 | - 'server_side_rendering' => useServerSideRendering(), |
|
45 | - 'current_css' => getCurrentCss(), |
|
46 | - 'favico' => $config['cops_icon'], |
|
47 | - 'getjson_url' => 'getJSON.php?' . addURLParameter(getQueryString(), 'complete', 1)); |
|
40 | + 'version' => VERSION, |
|
41 | + 'opds_url' => $config['cops_full_url'] . 'feed.php', |
|
42 | + 'customHeader' => '', |
|
43 | + 'template' => getCurrentTemplate(), |
|
44 | + 'server_side_rendering' => useServerSideRendering(), |
|
45 | + 'current_css' => getCurrentCss(), |
|
46 | + 'favico' => $config['cops_icon'], |
|
47 | + 'getjson_url' => 'getJSON.php?' . addURLParameter(getQueryString(), 'complete', 1)); |
|
48 | 48 | if (preg_match('/Kindle/', $_SERVER['HTTP_USER_AGENT'])) { |
49 | 49 | $data['customHeader'] = '<style media="screen" type="text/css"> html { font-size: 75%; -webkit-text-size-adjust: 75%; -ms-text-size-adjust: 75%; }</style>'; |
50 | 50 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | } |
51 | 51 | $headcontent = file_get_contents('templates/' . getCurrentTemplate() . '/file.html'); |
52 | 52 | $template = new doT(); |
53 | - $dot = $template->template($headcontent, NULL); |
|
53 | + $dot = $template->template($headcontent, null); |
|
54 | 54 | echo($dot($data)); |
55 | 55 | ?><body> |
56 | 56 | <?php |
@@ -26,56 +26,56 @@ discard block |
||
26 | 26 | * Transliterated text. |
27 | 27 | */ |
28 | 28 | function _transliteration_process($string, $unknown = '?', $source_langcode = NULL) { |
29 | - // ASCII is always valid NFC! If we're only ever given plain ASCII, we can |
|
30 | - // avoid the overhead of initializing the decomposition tables by skipping |
|
31 | - // out early. |
|
32 | - if (!preg_match('/[\x80-\xff]/', $string)) { |
|
29 | + // ASCII is always valid NFC! If we're only ever given plain ASCII, we can |
|
30 | + // avoid the overhead of initializing the decomposition tables by skipping |
|
31 | + // out early. |
|
32 | + if (!preg_match('/[\x80-\xff]/', $string)) { |
|
33 | 33 | return $string; |
34 | - } |
|
34 | + } |
|
35 | 35 | |
36 | - static $tail_bytes; |
|
36 | + static $tail_bytes; |
|
37 | 37 | |
38 | - if (!isset($tail_bytes)) { |
|
38 | + if (!isset($tail_bytes)) { |
|
39 | 39 | // Each UTF-8 head byte is followed by a certain number of tail bytes. |
40 | 40 | $tail_bytes = array(); |
41 | 41 | for ($n = 0; $n < 256; $n++) { |
42 | - if ($n < 0xc0) { |
|
42 | + if ($n < 0xc0) { |
|
43 | 43 | $remaining = 0; |
44 | - } |
|
45 | - elseif ($n < 0xe0) { |
|
44 | + } |
|
45 | + elseif ($n < 0xe0) { |
|
46 | 46 | $remaining = 1; |
47 | - } |
|
48 | - elseif ($n < 0xf0) { |
|
47 | + } |
|
48 | + elseif ($n < 0xf0) { |
|
49 | 49 | $remaining = 2; |
50 | - } |
|
51 | - elseif ($n < 0xf8) { |
|
50 | + } |
|
51 | + elseif ($n < 0xf8) { |
|
52 | 52 | $remaining = 3; |
53 | - } |
|
54 | - elseif ($n < 0xfc) { |
|
53 | + } |
|
54 | + elseif ($n < 0xfc) { |
|
55 | 55 | $remaining = 4; |
56 | - } |
|
57 | - elseif ($n < 0xfe) { |
|
56 | + } |
|
57 | + elseif ($n < 0xfe) { |
|
58 | 58 | $remaining = 5; |
59 | - } |
|
60 | - else { |
|
59 | + } |
|
60 | + else { |
|
61 | 61 | $remaining = 0; |
62 | - } |
|
63 | - $tail_bytes[chr($n)] = $remaining; |
|
62 | + } |
|
63 | + $tail_bytes[chr($n)] = $remaining; |
|
64 | + } |
|
64 | 65 | } |
65 | - } |
|
66 | 66 | |
67 | - // Chop the text into pure-ASCII and non-ASCII areas; large ASCII parts can |
|
68 | - // be handled much more quickly. Don't chop up Unicode areas for punctuation, |
|
69 | - // though, that wastes energy. |
|
70 | - preg_match_all('/[\x00-\x7f]+|[\x80-\xff][\x00-\x40\x5b-\x5f\x7b-\xff]*/', $string, $matches); |
|
67 | + // Chop the text into pure-ASCII and non-ASCII areas; large ASCII parts can |
|
68 | + // be handled much more quickly. Don't chop up Unicode areas for punctuation, |
|
69 | + // though, that wastes energy. |
|
70 | + preg_match_all('/[\x00-\x7f]+|[\x80-\xff][\x00-\x40\x5b-\x5f\x7b-\xff]*/', $string, $matches); |
|
71 | 71 | |
72 | - $result = ''; |
|
73 | - foreach ($matches[0] as $str) { |
|
72 | + $result = ''; |
|
73 | + foreach ($matches[0] as $str) { |
|
74 | 74 | if ($str[0] < "\x80") { |
75 | - // ASCII chunk: guaranteed to be valid UTF-8 and in normal form C, so |
|
76 | - // skip over it. |
|
77 | - $result .= $str; |
|
78 | - continue; |
|
75 | + // ASCII chunk: guaranteed to be valid UTF-8 and in normal form C, so |
|
76 | + // skip over it. |
|
77 | + $result .= $str; |
|
78 | + continue; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | // We'll have to examine the chunk byte by byte to ensure that it consists |
@@ -91,72 +91,72 @@ discard block |
||
91 | 91 | $len = $chunk + 1; |
92 | 92 | |
93 | 93 | for ($i = -1; --$len; ) { |
94 | - $c = $str[++$i]; |
|
95 | - if ($remaining = $tail_bytes[$c]) { |
|
94 | + $c = $str[++$i]; |
|
95 | + if ($remaining = $tail_bytes[$c]) { |
|
96 | 96 | // UTF-8 head byte! |
97 | 97 | $sequence = $head = $c; |
98 | 98 | do { |
99 | - // Look for the defined number of tail bytes... |
|
100 | - if (--$len && ($c = $str[++$i]) >= "\x80" && $c < "\xc0") { |
|
99 | + // Look for the defined number of tail bytes... |
|
100 | + if (--$len && ($c = $str[++$i]) >= "\x80" && $c < "\xc0") { |
|
101 | 101 | // Legal tail bytes are nice. |
102 | 102 | $sequence .= $c; |
103 | - } |
|
104 | - else { |
|
103 | + } |
|
104 | + else { |
|
105 | 105 | if ($len == 0) { |
106 | - // Premature end of string! Drop a replacement character into |
|
107 | - // output to represent the invalid UTF-8 sequence. |
|
108 | - $result .= $unknown; |
|
109 | - break 2; |
|
106 | + // Premature end of string! Drop a replacement character into |
|
107 | + // output to represent the invalid UTF-8 sequence. |
|
108 | + $result .= $unknown; |
|
109 | + break 2; |
|
110 | 110 | } |
111 | 111 | else { |
112 | - // Illegal tail byte; abandon the sequence. |
|
113 | - $result .= $unknown; |
|
114 | - // Back up and reprocess this byte; it may itself be a legal |
|
115 | - // ASCII or UTF-8 sequence head. |
|
116 | - --$i; |
|
117 | - ++$len; |
|
118 | - continue 2; |
|
112 | + // Illegal tail byte; abandon the sequence. |
|
113 | + $result .= $unknown; |
|
114 | + // Back up and reprocess this byte; it may itself be a legal |
|
115 | + // ASCII or UTF-8 sequence head. |
|
116 | + --$i; |
|
117 | + ++$len; |
|
118 | + continue 2; |
|
119 | + } |
|
119 | 120 | } |
120 | - } |
|
121 | 121 | } while (--$remaining); |
122 | 122 | |
123 | 123 | $n = ord($head); |
124 | 124 | if ($n <= 0xdf) { |
125 | - $ord = ($n - 192) * 64 + (ord($sequence[1]) - 128); |
|
125 | + $ord = ($n - 192) * 64 + (ord($sequence[1]) - 128); |
|
126 | 126 | } |
127 | 127 | elseif ($n <= 0xef) { |
128 | - $ord = ($n - 224) * 4096 + (ord($sequence[1]) - 128) * 64 + (ord($sequence[2]) - 128); |
|
128 | + $ord = ($n - 224) * 4096 + (ord($sequence[1]) - 128) * 64 + (ord($sequence[2]) - 128); |
|
129 | 129 | } |
130 | 130 | elseif ($n <= 0xf7) { |
131 | - $ord = ($n - 240) * 262144 + (ord($sequence[1]) - 128) * 4096 + (ord($sequence[2]) - 128) * 64 + (ord($sequence[3]) - 128); |
|
131 | + $ord = ($n - 240) * 262144 + (ord($sequence[1]) - 128) * 4096 + (ord($sequence[2]) - 128) * 64 + (ord($sequence[3]) - 128); |
|
132 | 132 | } |
133 | 133 | elseif ($n <= 0xfb) { |
134 | - $ord = ($n - 248) * 16777216 + (ord($sequence[1]) - 128) * 262144 + (ord($sequence[2]) - 128) * 4096 + (ord($sequence[3]) - 128) * 64 + (ord($sequence[4]) - 128); |
|
134 | + $ord = ($n - 248) * 16777216 + (ord($sequence[1]) - 128) * 262144 + (ord($sequence[2]) - 128) * 4096 + (ord($sequence[3]) - 128) * 64 + (ord($sequence[4]) - 128); |
|
135 | 135 | } |
136 | 136 | elseif ($n <= 0xfd) { |
137 | - $ord = ($n - 252) * 1073741824 + (ord($sequence[1]) - 128) * 16777216 + (ord($sequence[2]) - 128) * 262144 + (ord($sequence[3]) - 128) * 4096 + (ord($sequence[4]) - 128) * 64 + (ord($sequence[5]) - 128); |
|
137 | + $ord = ($n - 252) * 1073741824 + (ord($sequence[1]) - 128) * 16777216 + (ord($sequence[2]) - 128) * 262144 + (ord($sequence[3]) - 128) * 4096 + (ord($sequence[4]) - 128) * 64 + (ord($sequence[5]) - 128); |
|
138 | 138 | } else { |
139 | - $ord = $n; |
|
139 | + $ord = $n; |
|
140 | 140 | } |
141 | 141 | $result .= _transliteration_replace($ord, $unknown, $source_langcode); |
142 | 142 | $head = ''; |
143 | - } elseif ($c < "\x80") { |
|
143 | + } elseif ($c < "\x80") { |
|
144 | 144 | // ASCII byte. |
145 | 145 | $result .= $c; |
146 | 146 | $head = ''; |
147 | - } elseif ($c < "\xc0") { |
|
147 | + } elseif ($c < "\xc0") { |
|
148 | 148 | // Illegal tail bytes. |
149 | 149 | if ($head == '') { |
150 | - $result .= $unknown; |
|
150 | + $result .= $unknown; |
|
151 | 151 | } |
152 | - } else { |
|
152 | + } else { |
|
153 | 153 | // Miscellaneous freaks. |
154 | 154 | $result .= $unknown; |
155 | 155 | $head = ''; |
156 | - } |
|
156 | + } |
|
157 | 157 | } |
158 | - } |
|
159 | - return $result; |
|
158 | + } |
|
159 | + return $result; |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -175,38 +175,38 @@ discard block |
||
175 | 175 | * ASCII replacement character. |
176 | 176 | */ |
177 | 177 | function _transliteration_replace($ord, $unknown = '?', $langcode = NULL) { |
178 | - static $map = array(); |
|
178 | + static $map = array(); |
|
179 | 179 | |
180 | - //GL: set language later |
|
181 | - /* |
|
180 | + //GL: set language later |
|
181 | + /* |
|
182 | 182 | if (!isset($langcode)) { |
183 | 183 | global $language; |
184 | 184 | $langcode = $language->language; |
185 | 185 | } |
186 | 186 | */ |
187 | 187 | |
188 | - $bank = $ord >> 8; |
|
188 | + $bank = $ord >> 8; |
|
189 | 189 | |
190 | - if (!isset($map[$bank][$langcode])) { |
|
190 | + if (!isset($map[$bank][$langcode])) { |
|
191 | 191 | $file = './resources/transliteration-data/' . sprintf('x%02x', $bank) . '.php'; |
192 | 192 | if (file_exists($file)) { |
193 | - $base = array(); |
|
194 | - $variant = array(); |
|
195 | - include $file; |
|
196 | - if ($langcode != 'en' && isset($variant[$langcode])) { |
|
193 | + $base = array(); |
|
194 | + $variant = array(); |
|
195 | + include $file; |
|
196 | + if ($langcode != 'en' && isset($variant[$langcode])) { |
|
197 | 197 | // Merge in language specific mappings. |
198 | 198 | $map[$bank][$langcode] = $variant[$langcode] + $base; |
199 | - } |
|
200 | - else { |
|
199 | + } |
|
200 | + else { |
|
201 | 201 | $map[$bank][$langcode] = $base; |
202 | - } |
|
202 | + } |
|
203 | 203 | } |
204 | 204 | else { |
205 | - $map[$bank][$langcode] = array(); |
|
205 | + $map[$bank][$langcode] = array(); |
|
206 | + } |
|
206 | 207 | } |
207 | - } |
|
208 | 208 | |
209 | - $ord = $ord & 255; |
|
209 | + $ord = $ord & 255; |
|
210 | 210 | |
211 | - return isset($map[$bank][$langcode][$ord]) ? $map[$bank][$langcode][$ord] : $unknown; |
|
211 | + return isset($map[$bank][$langcode][$ord]) ? $map[$bank][$langcode][$ord] : $unknown; |
|
212 | 212 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | // Counting down is faster. I'm *so* sorry. |
91 | 91 | $len = $chunk + 1; |
92 | 92 | |
93 | - for ($i = -1; --$len; ) { |
|
93 | + for ($i = -1; --$len;) { |
|
94 | 94 | $c = $str[++$i]; |
95 | 95 | if ($remaining = $tail_bytes[$c]) { |
96 | 96 | // UTF-8 head byte! |
@@ -208,5 +208,5 @@ discard block |
||
208 | 208 | |
209 | 209 | $ord = $ord & 255; |
210 | 210 | |
211 | - return isset($map[$bank][$langcode][$ord]) ? $map[$bank][$langcode][$ord] : $unknown; |
|
211 | + return isset($map[$bank][$langcode][$ord])?$map[$bank][$langcode][$ord]:$unknown; |
|
212 | 212 | } |
@@ -25,7 +25,8 @@ 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 | 30 | // ASCII is always valid NFC! If we're only ever given plain ASCII, we can |
30 | 31 | // avoid the overhead of initializing the decomposition tables by skipping |
31 | 32 | // out early. |
@@ -41,23 +42,17 @@ discard block |
||
41 | 42 | for ($n = 0; $n < 256; $n++) { |
42 | 43 | if ($n < 0xc0) { |
43 | 44 | $remaining = 0; |
44 | - } |
|
45 | - elseif ($n < 0xe0) { |
|
45 | + } elseif ($n < 0xe0) { |
|
46 | 46 | $remaining = 1; |
47 | - } |
|
48 | - elseif ($n < 0xf0) { |
|
47 | + } elseif ($n < 0xf0) { |
|
49 | 48 | $remaining = 2; |
50 | - } |
|
51 | - elseif ($n < 0xf8) { |
|
49 | + } elseif ($n < 0xf8) { |
|
52 | 50 | $remaining = 3; |
53 | - } |
|
54 | - elseif ($n < 0xfc) { |
|
51 | + } elseif ($n < 0xfc) { |
|
55 | 52 | $remaining = 4; |
56 | - } |
|
57 | - elseif ($n < 0xfe) { |
|
53 | + } elseif ($n < 0xfe) { |
|
58 | 54 | $remaining = 5; |
59 | - } |
|
60 | - else { |
|
55 | + } else { |
|
61 | 56 | $remaining = 0; |
62 | 57 | } |
63 | 58 | $tail_bytes[chr($n)] = $remaining; |
@@ -100,15 +95,13 @@ discard block |
||
100 | 95 | if (--$len && ($c = $str[++$i]) >= "\x80" && $c < "\xc0") { |
101 | 96 | // Legal tail bytes are nice. |
102 | 97 | $sequence .= $c; |
103 | - } |
|
104 | - else { |
|
98 | + } else { |
|
105 | 99 | if ($len == 0) { |
106 | 100 | // Premature end of string! Drop a replacement character into |
107 | 101 | // output to represent the invalid UTF-8 sequence. |
108 | 102 | $result .= $unknown; |
109 | 103 | break 2; |
110 | - } |
|
111 | - else { |
|
104 | + } else { |
|
112 | 105 | // Illegal tail byte; abandon the sequence. |
113 | 106 | $result .= $unknown; |
114 | 107 | // Back up and reprocess this byte; it may itself be a legal |
@@ -123,17 +116,13 @@ discard block |
||
123 | 116 | $n = ord($head); |
124 | 117 | if ($n <= 0xdf) { |
125 | 118 | $ord = ($n - 192) * 64 + (ord($sequence[1]) - 128); |
126 | - } |
|
127 | - elseif ($n <= 0xef) { |
|
119 | + } elseif ($n <= 0xef) { |
|
128 | 120 | $ord = ($n - 224) * 4096 + (ord($sequence[1]) - 128) * 64 + (ord($sequence[2]) - 128); |
129 | - } |
|
130 | - elseif ($n <= 0xf7) { |
|
121 | + } elseif ($n <= 0xf7) { |
|
131 | 122 | $ord = ($n - 240) * 262144 + (ord($sequence[1]) - 128) * 4096 + (ord($sequence[2]) - 128) * 64 + (ord($sequence[3]) - 128); |
132 | - } |
|
133 | - elseif ($n <= 0xfb) { |
|
123 | + } elseif ($n <= 0xfb) { |
|
134 | 124 | $ord = ($n - 248) * 16777216 + (ord($sequence[1]) - 128) * 262144 + (ord($sequence[2]) - 128) * 4096 + (ord($sequence[3]) - 128) * 64 + (ord($sequence[4]) - 128); |
135 | - } |
|
136 | - elseif ($n <= 0xfd) { |
|
125 | + } elseif ($n <= 0xfd) { |
|
137 | 126 | $ord = ($n - 252) * 1073741824 + (ord($sequence[1]) - 128) * 16777216 + (ord($sequence[2]) - 128) * 262144 + (ord($sequence[3]) - 128) * 4096 + (ord($sequence[4]) - 128) * 64 + (ord($sequence[5]) - 128); |
138 | 127 | } else { |
139 | 128 | $ord = $n; |
@@ -174,7 +163,8 @@ discard block |
||
174 | 163 | * @return |
175 | 164 | * ASCII replacement character. |
176 | 165 | */ |
177 | -function _transliteration_replace($ord, $unknown = '?', $langcode = NULL) { |
|
166 | +function _transliteration_replace($ord, $unknown = '?', $langcode = NULL) |
|
167 | +{ |
|
178 | 168 | static $map = array(); |
179 | 169 | |
180 | 170 | //GL: set language later |
@@ -196,12 +186,10 @@ discard block |
||
196 | 186 | if ($langcode != 'en' && isset($variant[$langcode])) { |
197 | 187 | // Merge in language specific mappings. |
198 | 188 | $map[$bank][$langcode] = $variant[$langcode] + $base; |
199 | - } |
|
200 | - else { |
|
189 | + } else { |
|
201 | 190 | $map[$bank][$langcode] = $base; |
202 | 191 | } |
203 | - } |
|
204 | - else { |
|
192 | + } else { |
|
205 | 193 | $map[$bank][$langcode] = array(); |
206 | 194 | } |
207 | 195 | } |
@@ -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. |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @return |
175 | 175 | * ASCII replacement character. |
176 | 176 | */ |
177 | -function _transliteration_replace($ord, $unknown = '?', $langcode = NULL) { |
|
177 | +function _transliteration_replace($ord, $unknown = '?', $langcode = null) { |
|
178 | 178 | static $map = array(); |
179 | 179 | |
180 | 180 | //GL: set language later |
@@ -55,7 +55,9 @@ |
||
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)) { |
|
59 | + $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
60 | + } |
|
59 | 61 | return $desc; |
60 | 62 | } |
61 | 63 |
@@ -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.int.unknown"), $this); |
|
71 | + return new CustomColumn(null, localize("customcolumn.int.unknown"), $this); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | public function isSearchable() |
@@ -8,10 +8,10 @@ |
||
8 | 8 | |
9 | 9 | class PageAllAuthorsLetter extends Page |
10 | 10 | { |
11 | - public function InitializeContent () |
|
11 | + public function InitializeContent() |
|
12 | 12 | { |
13 | - $this->idPage = Author::getEntryIdByLetter ($this->idGet); |
|
14 | - $this->entryArray = Author::getAuthorsByStartingLetter ($this->idGet); |
|
15 | - $this->title = str_format (localize ("splitByLetter.letter"), str_format (localize ("authorword", count ($this->entryArray)), count ($this->entryArray)), $this->idGet); |
|
13 | + $this->idPage = Author::getEntryIdByLetter($this->idGet); |
|
14 | + $this->entryArray = Author::getAuthorsByStartingLetter($this->idGet); |
|
15 | + $this->title = str_format(localize("splitByLetter.letter"), str_format(localize("authorword", count($this->entryArray)), count($this->entryArray)), $this->idGet); |
|
16 | 16 | } |
17 | 17 | } |
@@ -11,18 +11,18 @@ discard block |
||
11 | 11 | */ |
12 | 12 | abstract class CustomColumnType extends Base |
13 | 13 | { |
14 | - const ALL_CUSTOMS_ID = "cops:custom"; |
|
14 | + const ALL_CUSTOMS_ID = "cops:custom"; |
|
15 | 15 | |
16 | - const CUSTOM_TYPE_TEXT = "text"; // type 1 + 2 |
|
17 | - const CUSTOM_TYPE_COMMENT = "comments"; // type 3 |
|
18 | - const CUSTOM_TYPE_SERIES = "series"; // type 4 |
|
16 | + const CUSTOM_TYPE_TEXT = "text"; // type 1 + 2 |
|
17 | + const CUSTOM_TYPE_COMMENT = "comments"; // type 3 |
|
18 | + const CUSTOM_TYPE_SERIES = "series"; // type 4 |
|
19 | 19 | const CUSTOM_TYPE_ENUM = "enumeration"; // type 5 |
20 | - const CUSTOM_TYPE_DATE = "datetime"; // type 6 |
|
21 | - const CUSTOM_TYPE_FLOAT = "float"; // type 7 |
|
22 | - const CUSTOM_TYPE_INT = "int"; // type 8 |
|
23 | - const CUSTOM_TYPE_RATING = "rating"; // type 9 |
|
24 | - const CUSTOM_TYPE_BOOL = "bool"; // type 10 |
|
25 | - const CUSTOM_TYPE_COMPOSITE = "composite"; // type 11 + 12 |
|
20 | + const CUSTOM_TYPE_DATE = "datetime"; // type 6 |
|
21 | + const CUSTOM_TYPE_FLOAT = "float"; // type 7 |
|
22 | + const CUSTOM_TYPE_INT = "int"; // type 8 |
|
23 | + const CUSTOM_TYPE_RATING = "rating"; // type 9 |
|
24 | + const CUSTOM_TYPE_BOOL = "bool"; // type 10 |
|
25 | + const CUSTOM_TYPE_COMPOSITE = "composite"; // type 11 + 12 |
|
26 | 26 | |
27 | 27 | /** @var array[integer]CustomColumnType */ |
28 | 28 | private static $customColumnCacheID = array(); |
@@ -110,7 +110,7 @@ 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 | 115 | return NULL; |
116 | 116 | } |
@@ -181,8 +181,9 @@ discard block |
||
181 | 181 | public static function createByCustomID($customId) |
182 | 182 | { |
183 | 183 | // Reuse already created CustomColumns for performance |
184 | - if (array_key_exists($customId, self::$customColumnCacheID)) |
|
185 | - return self::$customColumnCacheID[$customId]; |
|
184 | + if (array_key_exists($customId, self::$customColumnCacheID)) { |
|
185 | + return self::$customColumnCacheID[$customId]; |
|
186 | + } |
|
186 | 187 | |
187 | 188 | $datatype = self::getDatatypeByCustomID($customId); |
188 | 189 | |
@@ -221,8 +222,9 @@ discard block |
||
221 | 222 | public static function createByLookup($lookup) |
222 | 223 | { |
223 | 224 | // Reuse already created CustomColumns for performance |
224 | - if (array_key_exists($lookup, self::$customColumnCacheLookup)) |
|
225 | - return self::$customColumnCacheLookup[$lookup]; |
|
225 | + if (array_key_exists($lookup, self::$customColumnCacheLookup)) { |
|
226 | + return self::$customColumnCacheLookup[$lookup]; |
|
227 | + } |
|
226 | 228 | |
227 | 229 | $result = parent::getDb()->prepare('SELECT id FROM custom_columns WHERE label = ?'); |
228 | 230 | $result->execute(array($lookup)); |
@@ -241,8 +243,9 @@ discard block |
||
241 | 243 | public function getAllCustomValues() |
242 | 244 | { |
243 | 245 | // lazy loading |
244 | - if ($this->customValues == NULL) |
|
245 | - $this->customValues = $this->getAllCustomValuesFromDatabase(); |
|
246 | + if ($this->customValues == NULL) { |
|
247 | + $this->customValues = $this->getAllCustomValuesFromDatabase(); |
|
248 | + } |
|
246 | 249 | |
247 | 250 | return $this->customValues; |
248 | 251 | } |
@@ -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; |
@@ -21,44 +21,44 @@ |
||
21 | 21 | $this->name = $post->name; |
22 | 22 | } |
23 | 23 | |
24 | - public function getUri () { |
|
25 | - return "?page=".parent::PAGE_SERIE_DETAIL."&id=$this->id"; |
|
24 | + public function getUri() { |
|
25 | + return "?page=" . parent::PAGE_SERIE_DETAIL . "&id=$this->id"; |
|
26 | 26 | } |
27 | 27 | |
28 | - public function getEntryId () { |
|
29 | - return self::ALL_SERIES_ID.":".$this->id; |
|
28 | + public function getEntryId() { |
|
29 | + return self::ALL_SERIES_ID . ":" . $this->id; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public static function getCount() { |
33 | 33 | // str_format (localize("series.alphabetical", count(array)) |
34 | - return parent::getCountGeneric ("series", self::ALL_SERIES_ID, parent::PAGE_ALL_SERIES); |
|
34 | + return parent::getCountGeneric("series", self::ALL_SERIES_ID, parent::PAGE_ALL_SERIES); |
|
35 | 35 | } |
36 | 36 | |
37 | - public static function getSerieByBookId ($bookId) { |
|
38 | - $result = parent::getDb ()->prepare('select series.id as id, name |
|
37 | + public static function getSerieByBookId($bookId) { |
|
38 | + $result = parent::getDb()->prepare('select series.id as id, name |
|
39 | 39 | from books_series_link, series |
40 | 40 | where series.id = series and book = ?'); |
41 | - $result->execute (array ($bookId)); |
|
42 | - if ($post = $result->fetchObject ()) { |
|
43 | - return new Serie ($post); |
|
41 | + $result->execute(array($bookId)); |
|
42 | + if ($post = $result->fetchObject()) { |
|
43 | + return new Serie($post); |
|
44 | 44 | } |
45 | 45 | return NULL; |
46 | 46 | } |
47 | 47 | |
48 | - public static function getSerieById ($serieId) { |
|
49 | - $result = parent::getDb ()->prepare('select id, name from series where id = ?'); |
|
50 | - $result->execute (array ($serieId)); |
|
51 | - if ($post = $result->fetchObject ()) { |
|
52 | - return new Serie ($post); |
|
48 | + public static function getSerieById($serieId) { |
|
49 | + $result = parent::getDb()->prepare('select id, name from series where id = ?'); |
|
50 | + $result->execute(array($serieId)); |
|
51 | + if ($post = $result->fetchObject()) { |
|
52 | + return new Serie($post); |
|
53 | 53 | } |
54 | 54 | return NULL; |
55 | 55 | } |
56 | 56 | |
57 | 57 | public static function getAllSeries() { |
58 | - return Base::getEntryArrayWithBookNumber (self::SQL_ALL_SERIES, self::SERIES_COLUMNS, array (), "Serie"); |
|
58 | + return Base::getEntryArrayWithBookNumber(self::SQL_ALL_SERIES, self::SERIES_COLUMNS, array(), "Serie"); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public static function getAllSeriesByQuery($query) { |
62 | - return Base::getEntryArrayWithBookNumber (self::SQL_SERIES_FOR_SEARCH, self::SERIES_COLUMNS, array ('%' . $query . '%'), "Serie"); |
|
62 | + return Base::getEntryArrayWithBookNumber(self::SQL_SERIES_FOR_SEARCH, self::SERIES_COLUMNS, array('%' . $query . '%'), "Serie"); |
|
63 | 63 | } |
64 | 64 | } |
@@ -16,25 +16,30 @@ discard block |
||
16 | 16 | public $id; |
17 | 17 | public $name; |
18 | 18 | |
19 | - public function __construct($post) { |
|
19 | + public function __construct($post) |
|
20 | + { |
|
20 | 21 | $this->id = $post->id; |
21 | 22 | $this->name = $post->name; |
22 | 23 | } |
23 | 24 | |
24 | - public function getUri () { |
|
25 | + public function getUri () |
|
26 | + { |
|
25 | 27 | return "?page=".parent::PAGE_SERIE_DETAIL."&id=$this->id"; |
26 | 28 | } |
27 | 29 | |
28 | - public function getEntryId () { |
|
30 | + public function getEntryId () |
|
31 | + { |
|
29 | 32 | return self::ALL_SERIES_ID.":".$this->id; |
30 | 33 | } |
31 | 34 | |
32 | - public static function getCount() { |
|
35 | + public static function getCount() |
|
36 | + { |
|
33 | 37 | // str_format (localize("series.alphabetical", count(array)) |
34 | 38 | return parent::getCountGeneric ("series", self::ALL_SERIES_ID, parent::PAGE_ALL_SERIES); |
35 | 39 | } |
36 | 40 | |
37 | - public static function getSerieByBookId ($bookId) { |
|
41 | + public static function getSerieByBookId ($bookId) |
|
42 | + { |
|
38 | 43 | $result = parent::getDb ()->prepare('select series.id as id, name |
39 | 44 | from books_series_link, series |
40 | 45 | where series.id = series and book = ?'); |
@@ -45,7 +50,8 @@ discard block |
||
45 | 50 | return NULL; |
46 | 51 | } |
47 | 52 | |
48 | - public static function getSerieById ($serieId) { |
|
53 | + public static function getSerieById ($serieId) |
|
54 | + { |
|
49 | 55 | $result = parent::getDb ()->prepare('select id, name from series where id = ?'); |
50 | 56 | $result->execute (array ($serieId)); |
51 | 57 | if ($post = $result->fetchObject ()) { |
@@ -54,11 +60,13 @@ discard block |
||
54 | 60 | return NULL; |
55 | 61 | } |
56 | 62 | |
57 | - public static function getAllSeries() { |
|
63 | + public static function getAllSeries() |
|
64 | + { |
|
58 | 65 | return Base::getEntryArrayWithBookNumber (self::SQL_ALL_SERIES, self::SERIES_COLUMNS, array (), "Serie"); |
59 | 66 | } |
60 | 67 | |
61 | - public static function getAllSeriesByQuery($query) { |
|
68 | + public static function getAllSeriesByQuery($query) |
|
69 | + { |
|
62 | 70 | return Base::getEntryArrayWithBookNumber (self::SQL_SERIES_FOR_SEARCH, self::SERIES_COLUMNS, array ('%' . $query . '%'), "Serie"); |
63 | 71 | } |
64 | 72 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($post = $result->fetchObject ()) { |
43 | 43 | return new Serie ($post); |
44 | 44 | } |
45 | - return NULL; |
|
45 | + return null; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | public static function getSerieById ($serieId) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if ($post = $result->fetchObject ()) { |
52 | 52 | return new Serie ($post); |
53 | 53 | } |
54 | - return NULL; |
|
54 | + return null; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | public static function getAllSeries() { |