@@ -21,17 +21,17 @@ discard block |
||
21 | 21 | |
22 | 22 | public function getUri() |
23 | 23 | { |
24 | - return "?page=".parent::PAGE_LANGUAGE_DETAIL."&id=$this->id"; |
|
24 | + return "?page=" . parent::PAGE_LANGUAGE_DETAIL . "&id=$this->id"; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | public function getEntryId() |
28 | 28 | { |
29 | - return self::ALL_LANGUAGES_ID.":".$this->id; |
|
29 | + return self::ALL_LANGUAGES_ID . ":" . $this->id; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public static function getLanguageString($code) |
33 | 33 | { |
34 | - $string = localize("languages.".$code); |
|
34 | + $string = localize("languages." . $code); |
|
35 | 35 | if (preg_match("/^languages/", $string)) { |
36 | 36 | return $code; |
37 | 37 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $language->getEntryId(), |
72 | 72 | str_format(localize("bookword", $post->count), $post->count), |
73 | 73 | "text", |
74 | - [ new LinkNavigation($language->getUri())], |
|
74 | + [new LinkNavigation($language->getUri())], |
|
75 | 75 | "", |
76 | 76 | $post->count |
77 | 77 | )); |
@@ -117,7 +117,7 @@ |
||
117 | 117 | $content = ""; |
118 | 118 | foreach ($ignoredBaseArray as $key) { |
119 | 119 | $keyPlural = preg_replace('/(ss)$/', 's', $key . "s"); |
120 | - $content .= '<input type="checkbox" name="ignored_categories[]" onchange="updateCookieFromCheckboxGroup (this);" id="ignored_categories_' . $key . '" ' . $this->isChecked("ignored_categories", $key) . ' > ' . localize("{$keyPlural}.title") . '</input> '; |
|
120 | + $content .= '<input type="checkbox" name="ignored_categories[]" onchange="updateCookieFromCheckboxGroup (this);" id="ignored_categories_' . $key . '" ' . $this->isChecked("ignored_categories", $key) . ' > ' . localize("{$keyPlural}.title") . '</input> '; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | array_push($this->entryArray, new Entry( |
@@ -24,12 +24,12 @@ |
||
24 | 24 | |
25 | 25 | public function getUri() |
26 | 26 | { |
27 | - return "?page=".parent::PAGE_SERIE_DETAIL."&id=$this->id"; |
|
27 | + return "?page=" . parent::PAGE_SERIE_DETAIL . "&id=$this->id"; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function getEntryId() |
31 | 31 | { |
32 | - return self::ALL_SERIES_ID.":".$this->id; |
|
32 | + return self::ALL_SERIES_ID . ":" . $this->id; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public static function getCount() |
@@ -25,12 +25,12 @@ |
||
25 | 25 | |
26 | 26 | public function getUri() |
27 | 27 | { |
28 | - return "?page=".parent::PAGE_PUBLISHER_DETAIL."&id=$this->id"; |
|
28 | + return "?page=" . parent::PAGE_PUBLISHER_DETAIL . "&id=$this->id"; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function getEntryId() |
32 | 32 | { |
33 | - return self::ALL_PUBLISHERS_ID.":".$this->id; |
|
33 | + return self::ALL_PUBLISHERS_ID . ":" . $this->id; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public static function getCount() |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | public static function getContentArray($entry) |
119 | 119 | { |
120 | 120 | if ($entry instanceof EntryBook) { |
121 | - $out = [ "title" => $entry->title]; |
|
121 | + $out = ["title" => $entry->title]; |
|
122 | 122 | $out ["book"] = self::getBookContentArray($entry->book); |
123 | 123 | return $out; |
124 | 124 | } |
125 | - return [ "title" => $entry->title, "content" => $entry->content, "navlink" => $entry->getNavLink(), "number" => $entry->numberOfElement ]; |
|
125 | + return ["title" => $entry->title, "content" => $entry->content, "navlink" => $entry->getNavLink(), "number" => $entry->numberOfElement]; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | public static function getContentArrayTypeahead($page) |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | return self::getContentArrayTypeahead($currentPage); |
209 | 209 | } |
210 | 210 | |
211 | - $out = [ "title" => $currentPage->title]; |
|
211 | + $out = ["title" => $currentPage->title]; |
|
212 | 212 | $entries = []; |
213 | 213 | foreach ($currentPage->entryArray as $entry) { |
214 | 214 | array_push($entries, self::getContentArray($entry)); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $out ["fullTitle"] = $out ["databaseName"] . " > " . $out ["fullTitle"]; |
227 | 227 | } |
228 | 228 | $out ["page"] = $page; |
229 | - $out ["multipleDatabase"] = Base::isMultipleDatabaseEnabled() ? 1 : 0; |
|
229 | + $out ["multipleDatabase"] = Base::isMultipleDatabaseEnabled()?1:0; |
|
230 | 230 | $out ["entries"] = $entries; |
231 | 231 | $out ["isPaginated"] = 0; |
232 | 232 | if ($currentPage->isPaginated()) { |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | |
263 | 263 | $out ["homeurl"] = "index.php"; |
264 | 264 | if ($page != Base::PAGE_INDEX && !is_null($database)) { |
265 | - $out ["homeurl"] = $out ["homeurl"] . "?" . addURLParameter("", DB, $database); |
|
265 | + $out ["homeurl"] = $out ["homeurl"] . "?" . addURLParameter("", DB, $database); |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | return $out; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | public static function getDbFileName($database = null) |
113 | 113 | { |
114 | - return self::getDbDirectory($database) .'metadata.db'; |
|
114 | + return self::getDbDirectory($database) . 'metadata.db'; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | private static function error($database) |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | if (is_null(self::$db)) { |
128 | 128 | try { |
129 | 129 | if (is_readable(self::getDbFileName($database))) { |
130 | - self::$db = new PDO('sqlite:'. self::getDbFileName($database)); |
|
130 | + self::$db = new PDO('sqlite:' . self::getDbFileName($database)); |
|
131 | 131 | if (useNormAndUp()) { |
132 | 132 | self::$db->sqliteCreateFunction('normAndUp', 'normAndUp', 1); |
133 | 133 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $id, |
179 | 179 | str_format(localize($numberOfString, $count), $count), |
180 | 180 | "text", |
181 | - [ new LinkNavigation("?page=".$pageId)], |
|
181 | + [new LinkNavigation("?page=" . $pageId)], |
|
182 | 182 | "", |
183 | 183 | $count |
184 | 184 | ); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $instance->getEntryId(), |
206 | 206 | str_format(localize("bookword", $post->count), $post->count), |
207 | 207 | "text", |
208 | - [ new LinkNavigation($instance->getUri())], |
|
208 | + [new LinkNavigation($instance->getUri())], |
|
209 | 209 | "", |
210 | 210 | $post->count |
211 | 211 | )); |
@@ -11,8 +11,8 @@ |
||
11 | 11 | // PHP pre 5.6 does not support const arrays |
12 | 12 | private $BOOLEAN_NAMES = [ |
13 | 13 | -1 => "customcolumn.boolean.unknown", // localize("customcolumn.boolean.unknown") |
14 | - 0 => "customcolumn.boolean.no", // localize("customcolumn.boolean.no") |
|
15 | - +1 => "customcolumn.boolean.yes", // localize("customcolumn.boolean.yes") |
|
14 | + 0 => "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) |
@@ -37,13 +37,13 @@ |
||
37 | 37 | Monocle.DEBUG = true; |
38 | 38 | var bookData = { |
39 | 39 | getComponents: function() { |
40 | - <?php echo 'return [' . implode(', ', array_map(function ($comp) { |
|
40 | + <?php echo 'return [' . implode(', ', array_map(function($comp) { |
|
41 | 41 | return "'" . $comp . "'"; |
42 | 42 | }, $book->components())) . '];'; ?> |
43 | 43 | }, |
44 | 44 | getContents: function() { |
45 | - <?php echo 'return [' . implode(', ', array_map(function ($content) { |
|
46 | - return "{title: '" . addslashes($content['title']) . "', src: '". $content['src'] . "'}"; |
|
45 | + <?php echo 'return [' . implode(', ', array_map(function($content) { |
|
46 | + return "{title: '" . addslashes($content['title']) . "', src: '" . $content['src'] . "'}"; |
|
47 | 47 | }, $book->contents())) . '];'; ?> |
48 | 48 | }, |
49 | 49 | getComponent: function (componentId) { |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | } |
14 | 14 | /** @var array $config */ |
15 | 15 | |
16 | -$remote_user = array_key_exists('PHP_AUTH_USER', $_SERVER) ? $_SERVER['PHP_AUTH_USER'] : ''; |
|
16 | +$remote_user = array_key_exists('PHP_AUTH_USER', $_SERVER)?$_SERVER['PHP_AUTH_USER']:''; |
|
17 | 17 | // Clean username, only allow a-z, A-Z, 0-9, -_ chars |
18 | 18 | $remote_user = preg_replace('/[^a-zA-Z0-9_-]/', '', $remote_user); |
19 | 19 | $user_config_file = 'config_local.' . $remote_user . '.php'; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | is_array($config['cops_basic_authentication'])) { |
26 | 26 | if (!isset($_SERVER['PHP_AUTH_USER']) || |
27 | 27 | (isset($_SERVER['PHP_AUTH_USER']) && |
28 | - ($_SERVER['PHP_AUTH_USER']!=$config['cops_basic_authentication']['username'] || |
|
28 | + ($_SERVER['PHP_AUTH_USER'] != $config['cops_basic_authentication']['username'] || |
|
29 | 29 | $_SERVER['PHP_AUTH_PW'] != $config['cops_basic_authentication']['password']))) { |
30 | 30 | header('WWW-Authenticate: Basic realm="COPS Authentication"'); |
31 | 31 | header('HTTP/1.0 401 Unauthorized'); |