@@ -128,6 +128,9 @@ discard block |
||
128 | 128 | /** @var null|Entry[] */ |
129 | 129 | private $customValues = NULL; |
130 | 130 | |
131 | + /** |
|
132 | + * @param string $pdatatype |
|
133 | + */ |
|
131 | 134 | protected function __construct($pcustomId, $pdatatype) |
132 | 135 | { |
133 | 136 | $this->columnTitle = self::getTitleByCustomID($pcustomId); |
@@ -236,7 +239,7 @@ discard block |
||
236 | 239 | /** |
237 | 240 | * Encode a value of this column ready to be displayed in an HTML document |
238 | 241 | * |
239 | - * @param integer|string $value |
|
242 | + * @param string $value |
|
240 | 243 | * @return string |
241 | 244 | */ |
242 | 245 | public function encodeHTMLValue($value) |
@@ -404,6 +407,9 @@ discard block |
||
404 | 407 | |
405 | 408 | class CustomColumnTypeText extends CustomColumnType |
406 | 409 | { |
410 | + /** |
|
411 | + * @param integer $pcustomId |
|
412 | + */ |
|
407 | 413 | protected function __construct($pcustomId) |
408 | 414 | { |
409 | 415 | parent::__construct($pcustomId, self::CUSTOM_TYPE_TEXT); |
@@ -502,6 +508,9 @@ discard block |
||
502 | 508 | |
503 | 509 | class CustomColumnTypeSeries extends CustomColumnType |
504 | 510 | { |
511 | + /** |
|
512 | + * @param integer $pcustomId |
|
513 | + */ |
|
505 | 514 | protected function __construct($pcustomId) |
506 | 515 | { |
507 | 516 | parent::__construct($pcustomId, self::CUSTOM_TYPE_SERIES); |
@@ -597,6 +606,9 @@ discard block |
||
597 | 606 | |
598 | 607 | class CustomColumnTypeEnumeration extends CustomColumnType |
599 | 608 | { |
609 | + /** |
|
610 | + * @param integer $pcustomId |
|
611 | + */ |
|
600 | 612 | protected function __construct($pcustomId) |
601 | 613 | { |
602 | 614 | parent::__construct($pcustomId, self::CUSTOM_TYPE_ENUM); |
@@ -692,6 +704,9 @@ discard block |
||
692 | 704 | |
693 | 705 | class CustomColumnTypeDate extends CustomColumnType |
694 | 706 | { |
707 | + /** |
|
708 | + * @param integer $pcustomId |
|
709 | + */ |
|
695 | 710 | protected function __construct($pcustomId) |
696 | 711 | { |
697 | 712 | parent::__construct($pcustomId, self::CUSTOM_TYPE_DATE); |
@@ -772,6 +787,9 @@ discard block |
||
772 | 787 | |
773 | 788 | class CustomColumnTypeRating extends CustomColumnType |
774 | 789 | { |
790 | + /** |
|
791 | + * @param integer $pcustomId |
|
792 | + */ |
|
775 | 793 | protected function __construct($pcustomId) |
776 | 794 | { |
777 | 795 | parent::__construct($pcustomId, self::CUSTOM_TYPE_RATING); |
@@ -882,6 +900,9 @@ discard block |
||
882 | 900 | +1 => "customcolumn.boolean.yes", // localize("customcolumn.boolean.yes") |
883 | 901 | ); |
884 | 902 | |
903 | + /** |
|
904 | + * @param integer $pcustomId |
|
905 | + */ |
|
885 | 906 | protected function __construct($pcustomId) |
886 | 907 | { |
887 | 908 | parent::__construct($pcustomId, self::CUSTOM_TYPE_BOOL); |
@@ -962,6 +983,9 @@ discard block |
||
962 | 983 | |
963 | 984 | class CustomColumnTypeInteger extends CustomColumnType |
964 | 985 | { |
986 | + /** |
|
987 | + * @param integer $pcustomId |
|
988 | + */ |
|
965 | 989 | protected function __construct($pcustomId) |
966 | 990 | { |
967 | 991 | parent::__construct($pcustomId, self::CUSTOM_TYPE_INT); |
@@ -1033,6 +1057,9 @@ discard block |
||
1033 | 1057 | |
1034 | 1058 | class CustomColumnTypeFloat extends CustomColumnType |
1035 | 1059 | { |
1060 | + /** |
|
1061 | + * @param integer $pcustomId |
|
1062 | + */ |
|
1036 | 1063 | protected function __construct($pcustomId) |
1037 | 1064 | { |
1038 | 1065 | parent::__construct($pcustomId, self::CUSTOM_TYPE_FLOAT); |
@@ -1104,6 +1131,9 @@ discard block |
||
1104 | 1131 | |
1105 | 1132 | class CustomColumnTypeComment extends CustomColumnType |
1106 | 1133 | { |
1134 | + /** |
|
1135 | + * @param integer $pcustomId |
|
1136 | + */ |
|
1107 | 1137 | protected function __construct($pcustomId) |
1108 | 1138 | { |
1109 | 1139 | parent::__construct($pcustomId, self::CUSTOM_TYPE_COMMENT); |
@@ -60,6 +60,9 @@ discard block |
||
60 | 60 | $_SERVER['REDIRECT_STATUS'] = 404; |
61 | 61 | } |
62 | 62 | |
63 | +/** |
|
64 | + * @param string $name |
|
65 | + */ |
|
63 | 66 | function getURLParam ($name, $default = NULL) { |
64 | 67 | if (!empty ($_GET) && isset($_GET[$name]) && $_GET[$name] != "") { |
65 | 68 | return $_GET[$name]; |
@@ -95,6 +98,11 @@ discard block |
||
95 | 98 | return $url . "?v=" . VERSION; |
96 | 99 | } |
97 | 100 | |
101 | +/** |
|
102 | + * @param string $xml |
|
103 | + * |
|
104 | + * @return string |
|
105 | + */ |
|
98 | 106 | function xml2xhtml($xml) { |
99 | 107 | return preg_replace_callback('#<(\w+)([^>]*)\s*/>#s', create_function('$m', ' |
100 | 108 | $xhtml_tags = array("br", "hr", "input", "frame", "img", "area", "link", "col", "base", "basefont", "param"); |
@@ -308,6 +316,9 @@ discard block |
||
308 | 316 | return $phrase; |
309 | 317 | } |
310 | 318 | |
319 | +/** |
|
320 | + * @param string $paramName |
|
321 | + */ |
|
311 | 322 | function addURLParameter($urlParams, $paramName, $paramValue) { |
312 | 323 | if (empty ($urlParams)) { |
313 | 324 | $urlParams = ""; |
@@ -369,6 +380,9 @@ discard block |
||
369 | 380 | return $this->href; |
370 | 381 | } |
371 | 382 | |
383 | + /** |
|
384 | + * @return string |
|
385 | + */ |
|
372 | 386 | public function getScriptName() { |
373 | 387 | $parts = explode('/', $_SERVER["SCRIPT_NAME"]); |
374 | 388 | return $parts[count($parts) - 1]; |
@@ -377,6 +391,9 @@ discard block |
||
377 | 391 | |
378 | 392 | class LinkNavigation extends Link |
379 | 393 | { |
394 | + /** |
|
395 | + * @param string $prel |
|
396 | + */ |
|
380 | 397 | public function __construct($phref, $prel = NULL, $ptitle = NULL) { |
381 | 398 | parent::__construct ($phref, Link::OPDS_NAVIGATION_TYPE, $prel, $ptitle); |
382 | 399 | if (!is_null (GetUrlParam (DB))) $this->href = addURLParameter ($this->href, DB, GetUrlParam (DB)); |
@@ -391,6 +408,9 @@ discard block |
||
391 | 408 | |
392 | 409 | class LinkFacet extends Link |
393 | 410 | { |
411 | + /** |
|
412 | + * @param string $phref |
|
413 | + */ |
|
394 | 414 | public function __construct($phref, $ptitle = NULL, $pfacetGroup = NULL, $pactiveFacet = FALSE) { |
395 | 415 | parent::__construct ($phref, Link::OPDS_PAGING_TYPE, "http://opds-spec.org/facet", $ptitle, $pfacetGroup, $pactiveFacet); |
396 | 416 | if (!is_null (GetUrlParam (DB))) $this->href = addURLParameter ($this->href, DB, GetUrlParam (DB)); |
@@ -445,6 +465,9 @@ discard block |
||
445 | 465 | return "#"; |
446 | 466 | } |
447 | 467 | |
468 | + /** |
|
469 | + * @param string $pcontentType |
|
470 | + */ |
|
448 | 471 | public function __construct($ptitle, $pid, $pcontent, $pcontentType, $plinkArray, $pclass = "", $pcount = 0) { |
449 | 472 | global $config; |
450 | 473 | $this->title = $ptitle; |
@@ -1111,6 +1134,9 @@ discard block |
||
1111 | 1134 | |
1112 | 1135 | class PageCustomize extends Page |
1113 | 1136 | { |
1137 | + /** |
|
1138 | + * @param string $key |
|
1139 | + */ |
|
1114 | 1140 | private function isChecked ($key, $testedValue = 1) { |
1115 | 1141 | $value = getCurrentOption ($key); |
1116 | 1142 | if (is_array ($value)) { |
@@ -1125,6 +1151,9 @@ discard block |
||
1125 | 1151 | return ""; |
1126 | 1152 | } |
1127 | 1153 | |
1154 | + /** |
|
1155 | + * @param string $key |
|
1156 | + */ |
|
1128 | 1157 | private function isSelected ($key, $value) { |
1129 | 1158 | if (getCurrentOption ($key) == $value) { |
1130 | 1159 | return "selected='selected'"; |
@@ -1271,6 +1300,9 @@ discard block |
||
1271 | 1300 | } |
1272 | 1301 | } |
1273 | 1302 | |
1303 | + /** |
|
1304 | + * @param integer $database |
|
1305 | + */ |
|
1274 | 1306 | public static function getDbName ($database = NULL) { |
1275 | 1307 | global $config; |
1276 | 1308 | if (self::isMultipleDatabaseEnabled ()) { |
@@ -1284,6 +1316,9 @@ discard block |
||
1284 | 1316 | return ""; |
1285 | 1317 | } |
1286 | 1318 | |
1319 | + /** |
|
1320 | + * @return string |
|
1321 | + */ |
|
1287 | 1322 | public static function getDbDirectory ($database = NULL) { |
1288 | 1323 | global $config; |
1289 | 1324 | if (self::isMultipleDatabaseEnabled ()) { |
@@ -1347,6 +1382,12 @@ discard block |
||
1347 | 1382 | return self::getDb ($database)->query($query)->fetchColumn(); |
1348 | 1383 | } |
1349 | 1384 | |
1385 | + /** |
|
1386 | + * @param string $table |
|
1387 | + * @param string $id |
|
1388 | + * @param string $numberOfString |
|
1389 | + * @param string $sql |
|
1390 | + */ |
|
1350 | 1391 | public static function getCountGeneric($table, $id, $pageId, $numberOfString = NULL, $sql = NULL) { |
1351 | 1392 | if (!$numberOfString) { |
1352 | 1393 | $numberOfString = $table . ".alphabetical"; |
@@ -1363,6 +1404,10 @@ discard block |
||
1363 | 1404 | return $entry; |
1364 | 1405 | } |
1365 | 1406 | |
1407 | + /** |
|
1408 | + * @param string $columns |
|
1409 | + * @param string $category |
|
1410 | + */ |
|
1366 | 1411 | public static function getEntryArrayWithBookNumber ($query, $columns, $params, $category) { |
1367 | 1412 | /* @var $result PDOStatement */ |
1368 | 1413 | |
@@ -1385,6 +1430,9 @@ discard block |
||
1385 | 1430 | return $entryArray; |
1386 | 1431 | } |
1387 | 1432 | |
1433 | + /** |
|
1434 | + * @param string $filter |
|
1435 | + */ |
|
1388 | 1436 | public static function executeQuery($query, $columns, $filter, $params, $n, $database = NULL, $numberPerPage = NULL, $max = NULL) { |
1389 | 1437 | $totalResult = -1; |
1390 | 1438 |