@@ -8,11 +8,11 @@ |
||
8 | 8 | |
9 | 9 | class PageSerieDetail extends Page |
10 | 10 | { |
11 | - public function InitializeContent () |
|
11 | + public function InitializeContent() |
|
12 | 12 | { |
13 | - $serie = Serie::getSerieById ($this->idGet); |
|
13 | + $serie = Serie::getSerieById($this->idGet); |
|
14 | 14 | $this->title = $serie->name; |
15 | - list ($this->entryArray, $this->totalNumber) = Book::getBooksBySeries ($this->idGet, $this->n); |
|
16 | - $this->idPage = $serie->getEntryId (); |
|
15 | + list ($this->entryArray, $this->totalNumber) = Book::getBooksBySeries($this->idGet, $this->n); |
|
16 | + $this->idPage = $serie->getEntryId(); |
|
17 | 17 | } |
18 | 18 | } |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | // PHP pre 5.6 does not support const arrays |
12 | 12 | private $BOOLEAN_NAMES = array( |
13 | 13 | -1 => "customcolumn.boolean.unknown", // localize("customcolumn.boolean.unknown") |
14 | - 00 => "customcolumn.boolean.no", // localize("customcolumn.boolean.no") |
|
15 | - +1 => "customcolumn.boolean.yes", // localize("customcolumn.boolean.yes") |
|
14 | + 00 => "customcolumn.boolean.no", // localize("customcolumn.boolean.no") |
|
15 | + +1 => "customcolumn.boolean.yes", // localize("customcolumn.boolean.yes") |
|
16 | 16 | ); |
17 | 17 | |
18 | 18 | protected function __construct($pcustomId) |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $entryArray = array(); |
61 | 61 | while ($post = $result->fetchObject()) { |
62 | 62 | $entryPContent = str_format(localize("bookword", $post->count), $post->count); |
63 | - $entryPLinkArray = array(new LinkNavigation ($this->getUri($post->id))); |
|
63 | + $entryPLinkArray = array(new LinkNavigation($this->getUri($post->id))); |
|
64 | 64 | |
65 | 65 | $entry = new Entry(localize($this->BOOLEAN_NAMES[$post->id]), $this->getEntryId($post->id), $entryPContent, $this->datatype, $entryPLinkArray, "", $post->count); |
66 | 66 |
@@ -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 |
@@ -20,27 +20,27 @@ |
||
20 | 20 | * @param Book $pbook |
21 | 21 | */ |
22 | 22 | public function __construct($ptitle, $pid, $pcontent, $pcontentType, $plinkArray, $pbook) { |
23 | - parent::__construct ($ptitle, $pid, $pcontent, $pcontentType, $plinkArray); |
|
23 | + parent::__construct($ptitle, $pid, $pcontent, $pcontentType, $plinkArray); |
|
24 | 24 | $this->book = $pbook; |
25 | 25 | $this->localUpdated = $pbook->timestamp; |
26 | 26 | } |
27 | 27 | |
28 | - public function getCoverThumbnail () { |
|
28 | + public function getCoverThumbnail() { |
|
29 | 29 | foreach ($this->linkArray as $link) { |
30 | 30 | /* @var $link LinkNavigation */ |
31 | 31 | |
32 | 32 | if ($link->rel == Link::OPDS_THUMBNAIL_TYPE) |
33 | - return $link->hrefXhtml (); |
|
33 | + return $link->hrefXhtml(); |
|
34 | 34 | } |
35 | 35 | return null; |
36 | 36 | } |
37 | 37 | |
38 | - public function getCover () { |
|
38 | + public function getCover() { |
|
39 | 39 | foreach ($this->linkArray as $link) { |
40 | 40 | /* @var $link LinkNavigation */ |
41 | 41 | |
42 | 42 | if ($link->rel == Link::OPDS_IMAGE_TYPE) |
43 | - return $link->hrefXhtml (); |
|
43 | + return $link->hrefXhtml(); |
|
44 | 44 | } |
45 | 45 | return null; |
46 | 46 | } |
@@ -19,28 +19,33 @@ |
||
19 | 19 | * @param array $plinkArray |
20 | 20 | * @param Book $pbook |
21 | 21 | */ |
22 | - public function __construct($ptitle, $pid, $pcontent, $pcontentType, $plinkArray, $pbook) { |
|
22 | + public function __construct($ptitle, $pid, $pcontent, $pcontentType, $plinkArray, $pbook) |
|
23 | + { |
|
23 | 24 | parent::__construct ($ptitle, $pid, $pcontent, $pcontentType, $plinkArray); |
24 | 25 | $this->book = $pbook; |
25 | 26 | $this->localUpdated = $pbook->timestamp; |
26 | 27 | } |
27 | 28 | |
28 | - public function getCoverThumbnail () { |
|
29 | + public function getCoverThumbnail () |
|
30 | + { |
|
29 | 31 | foreach ($this->linkArray as $link) { |
30 | 32 | /* @var $link LinkNavigation */ |
31 | 33 | |
32 | - if ($link->rel == Link::OPDS_THUMBNAIL_TYPE) |
|
33 | - return $link->hrefXhtml (); |
|
34 | + if ($link->rel == Link::OPDS_THUMBNAIL_TYPE) { |
|
35 | + return $link->hrefXhtml (); |
|
36 | + } |
|
34 | 37 | } |
35 | 38 | return null; |
36 | 39 | } |
37 | 40 | |
38 | - public function getCover () { |
|
41 | + public function getCover () |
|
42 | + { |
|
39 | 43 | foreach ($this->linkArray as $link) { |
40 | 44 | /* @var $link LinkNavigation */ |
41 | 45 | |
42 | - if ($link->rel == Link::OPDS_IMAGE_TYPE) |
|
43 | - return $link->hrefXhtml (); |
|
46 | + if ($link->rel == Link::OPDS_IMAGE_TYPE) { |
|
47 | + return $link->hrefXhtml (); |
|
48 | + } |
|
44 | 49 | } |
45 | 50 | return null; |
46 | 51 | } |
@@ -70,7 +70,7 @@ |
||
70 | 70 | while ($post = $result->fetchObject()) |
71 | 71 | { |
72 | 72 | $entryPContent = str_format(localize("bookword", $post->count), $post->count); |
73 | - $entryPLinkArray = array(new LinkNavigation ($this->getUri($post->id))); |
|
73 | + $entryPLinkArray = array(new LinkNavigation($this->getUri($post->id))); |
|
74 | 74 | |
75 | 75 | $entry = new Entry($post->name, $this->getEntryId($post->id), $entryPContent, $this->datatype, $entryPLinkArray, "", $post->count); |
76 | 76 |
@@ -67,8 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | $result = $this->getDb()->query($query); |
69 | 69 | $entryArray = array(); |
70 | - while ($post = $result->fetchObject()) |
|
71 | - { |
|
70 | + while ($post = $result->fetchObject()) { |
|
72 | 71 | $entryPContent = str_format(localize("bookword", $post->count), $post->count); |
73 | 72 | $entryPLinkArray = array(new LinkNavigation ($this->getUri($post->id))); |
74 | 73 | |
@@ -82,7 +81,9 @@ discard block |
||
82 | 81 | public function getDescription() |
83 | 82 | { |
84 | 83 | $desc = $this->getDatabaseDescription(); |
85 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
84 | + if ($desc === NULL || empty($desc)) { |
|
85 | + $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
86 | + } |
|
86 | 87 | return $desc; |
87 | 88 | } |
88 | 89 |
@@ -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() |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $result = $this->getDb()->prepare(str_format("SELECT id, value AS name FROM {0} WHERE id = ?", $this->getTableName())); |
56 | 56 | $result->execute(array($id)); |
57 | 57 | if ($post = $result->fetchObject()) { |
58 | - return new CustomColumn ($id, $post->name, $this); |
|
58 | + return new CustomColumn($id, $post->name, $this); |
|
59 | 59 | } |
60 | 60 | return NULL; |
61 | 61 | } |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | $entryArray = array(); |
70 | 70 | while ($post = $result->fetchObject()) { |
71 | 71 | $entryPContent = str_format(localize("bookword", $post->count), $post->count); |
72 | - $entryPLinkArray = array(new LinkNavigation ($this->getUri($post->id))); |
|
72 | + $entryPLinkArray = array(new LinkNavigation($this->getUri($post->id))); |
|
73 | 73 | |
74 | - $entry = new Entry ($post->name, $this->getEntryId($post->id), $entryPContent, $this->datatype, $entryPLinkArray, "", $post->count); |
|
74 | + $entry = new Entry($post->name, $this->getEntryId($post->id), $entryPContent, $this->datatype, $entryPLinkArray, "", $post->count); |
|
75 | 75 | |
76 | 76 | array_push($entryArray, $entry); |
77 | 77 | } |
@@ -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() |
@@ -8,12 +8,12 @@ |
||
8 | 8 | |
9 | 9 | class PageCustomDetail extends Page |
10 | 10 | { |
11 | - public function InitializeContent () |
|
11 | + public function InitializeContent() |
|
12 | 12 | { |
13 | - $customId = getURLParam ("custom", NULL); |
|
14 | - $custom = CustomColumn::createCustom ($customId, $this->idGet); |
|
15 | - $this->idPage = $custom->getEntryId (); |
|
13 | + $customId = getURLParam("custom", NULL); |
|
14 | + $custom = CustomColumn::createCustom($customId, $this->idGet); |
|
15 | + $this->idPage = $custom->getEntryId(); |
|
16 | 16 | $this->title = $custom->value; |
17 | - list ($this->entryArray, $this->totalNumber) = Book::getBooksByCustom ($custom, $this->idGet, $this->n); |
|
17 | + list ($this->entryArray, $this->totalNumber) = Book::getBooksByCustom($custom, $this->idGet, $this->n); |
|
18 | 18 | } |
19 | 19 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | public function InitializeContent () |
12 | 12 | { |
13 | - $customId = getURLParam ("custom", NULL); |
|
13 | + $customId = getURLParam ("custom", null); |
|
14 | 14 | $custom = CustomColumn::createCustom ($customId, $this->idGet); |
15 | 15 | $this->idPage = $custom->getEntryId (); |
16 | 16 | $this->title = $custom->value; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | class PageAllPublishers extends Page |
10 | 10 | { |
11 | - public function InitializeContent () |
|
11 | + public function InitializeContent() |
|
12 | 12 | { |
13 | 13 | $this->title = localize("publishers.title"); |
14 | 14 | $this->entryArray = Publisher::getAllPublishers(); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | $this->activeFacet = $pactiveFacet; |
31 | 31 | } |
32 | 32 | |
33 | - public function hrefXhtml () { |
|
33 | + public function hrefXhtml() { |
|
34 | 34 | return $this->href; |
35 | 35 | } |
36 | 36 |
@@ -21,7 +21,8 @@ discard block |
||
21 | 21 | public $facetGroup; |
22 | 22 | public $activeFacet; |
23 | 23 | |
24 | - public function __construct($phref, $ptype, $prel = NULL, $ptitle = NULL, $pfacetGroup = NULL, $pactiveFacet = FALSE) { |
|
24 | + public function __construct($phref, $ptype, $prel = NULL, $ptitle = NULL, $pfacetGroup = NULL, $pactiveFacet = FALSE) |
|
25 | + { |
|
25 | 26 | $this->href = $phref; |
26 | 27 | $this->type = $ptype; |
27 | 28 | $this->rel = $prel; |
@@ -30,11 +31,13 @@ discard block |
||
30 | 31 | $this->activeFacet = $pactiveFacet; |
31 | 32 | } |
32 | 33 | |
33 | - public function hrefXhtml () { |
|
34 | + public function hrefXhtml () |
|
35 | + { |
|
34 | 36 | return $this->href; |
35 | 37 | } |
36 | 38 | |
37 | - public function getScriptName() { |
|
39 | + public function getScriptName() |
|
40 | + { |
|
38 | 41 | $parts = explode('/', $_SERVER["SCRIPT_NAME"]); |
39 | 42 | return $parts[count($parts) - 1]; |
40 | 43 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | public $facetGroup; |
22 | 22 | public $activeFacet; |
23 | 23 | |
24 | - public function __construct($phref, $ptype, $prel = NULL, $ptitle = NULL, $pfacetGroup = NULL, $pactiveFacet = FALSE) { |
|
24 | + public function __construct($phref, $ptype, $prel = null, $ptitle = null, $pfacetGroup = null, $pactiveFacet = false) { |
|
25 | 25 | $this->href = $phref; |
26 | 26 | $this->type = $ptype; |
27 | 27 | $this->rel = $prel; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | class PageAllLanguages extends Page |
10 | 10 | { |
11 | - public function InitializeContent () |
|
11 | + public function InitializeContent() |
|
12 | 12 | { |
13 | 13 | $this->title = localize("languages.title"); |
14 | 14 | $this->entryArray = Language::getAllLanguages(); |