@@ -76,6 +76,12 @@ discard block |
||
| 76 | 76 | // prepare EMail-From |
| 77 | 77 | $emailheaders = 'From: "' . $emailaddr . '" <' . $emailaddr . '>'; |
| 78 | 78 | |
| 79 | +/** |
|
| 80 | + * @param string $module |
|
| 81 | + * @param integer $eventid |
|
| 82 | + * @param integer $objectid2 |
|
| 83 | + * @param string $logtext |
|
| 84 | + */ |
|
| 79 | 85 | function logentry($module, $eventid, $userid, $objectid1, $objectid2, $logtext, $details) |
| 80 | 86 | { |
| 81 | 87 | sql( |
@@ -148,6 +154,9 @@ discard block |
||
| 148 | 154 | return $start; |
| 149 | 155 | } |
| 150 | 156 | |
| 157 | +/** |
|
| 158 | + * @return string |
|
| 159 | + */ |
|
| 151 | 160 | function escape_javascript($text) |
| 152 | 161 | { |
| 153 | 162 | return str_replace('\'', '\\\'', str_replace('"', '"', $text)); |
@@ -159,6 +168,9 @@ discard block |
||
| 159 | 168 | sql_error(); |
| 160 | 169 | } |
| 161 | 170 | |
| 171 | +/** |
|
| 172 | + * @param string $sql |
|
| 173 | + */ |
|
| 162 | 174 | function sqlValue($sql, $default) |
| 163 | 175 | { |
| 164 | 176 | $rs = sql($sql); |
@@ -187,11 +199,21 @@ discard block |
||
| 187 | 199 | } |
| 188 | 200 | } |
| 189 | 201 | |
| 202 | +/** |
|
| 203 | + * @param string $name |
|
| 204 | + * @param string $default |
|
| 205 | + * |
|
| 206 | + * @return string |
|
| 207 | + */ |
|
| 190 | 208 | function getSysConfig($name, $default) |
| 191 | 209 | { |
| 192 | 210 | return sqlValue('SELECT `value` FROM `sysconfig` WHERE `name`=\'' . sql_escape($name) . '\'', $default); |
| 193 | 211 | } |
| 194 | 212 | |
| 213 | +/** |
|
| 214 | + * @param string $name |
|
| 215 | + * @param string $value |
|
| 216 | + */ |
|
| 195 | 217 | function setSysConfig($name, $value) |
| 196 | 218 | { |
| 197 | 219 | if (sqlValue('SELECT COUNT(*) FROM sysconfig WHERE name=\'' . sql_escape($name) . '\'', 0) == 1) { |
@@ -516,6 +538,9 @@ discard block |
||
| 516 | 538 | die('sql_error'); |
| 517 | 539 | } |
| 518 | 540 | |
| 541 | +/** |
|
| 542 | + * @param string $warnmessage |
|
| 543 | + */ |
|
| 519 | 544 | function sql_warn($warnmessage) |
| 520 | 545 | { |
| 521 | 546 | global $sql_errormail; |
@@ -549,6 +574,9 @@ discard block |
||
| 549 | 574 | return mysql_fetch_row($rs); |
| 550 | 575 | } |
| 551 | 576 | |
| 577 | +/** |
|
| 578 | + * @param resource $rs |
|
| 579 | + */ |
|
| 552 | 580 | function sql_fetch_column($rs) |
| 553 | 581 | { |
| 554 | 582 | $col = []; |
@@ -758,6 +786,9 @@ discard block |
||
| 758 | 786 | ]; |
| 759 | 787 | } |
| 760 | 788 | |
| 789 | +/** |
|
| 790 | + * @param string $filename |
|
| 791 | + */ |
|
| 761 | 792 | function fetch_email_template($filename, $language, $domain) |
| 762 | 793 | { |
| 763 | 794 | global $opt, $rootpath; |
@@ -323,6 +323,9 @@ discard block |
||
| 323 | 323 | //set no_eval true to prevent this contents from php-parsing. |
| 324 | 324 | //Important when replacing something that the user has posted |
| 325 | 325 | //in HTML code and could contain \<\? php-Code \?\> |
| 326 | +/** |
|
| 327 | + * @param string $name |
|
| 328 | + */ |
|
| 326 | 329 | function tpl_set_var($name, $value, $no_eval = true) |
| 327 | 330 | { |
| 328 | 331 | global $vars, $no_eval_vars; |
@@ -543,6 +546,9 @@ discard block |
||
| 543 | 546 | } |
| 544 | 547 | |
| 545 | 548 | //redirect to another site to display, i.e. to view a cache after logging |
| 549 | +/** |
|
| 550 | + * @param string $page |
|
| 551 | + */ |
|
| 546 | 552 | function tpl_redirect($page) |
| 547 | 553 | { |
| 548 | 554 | global $absolute_server_URI; |
@@ -562,6 +568,9 @@ discard block |
||
| 562 | 568 | //process the template replacements |
| 563 | 569 | //no_eval_replace - if true, variables will be replaced that are |
| 564 | 570 | // marked as "no_eval" |
| 571 | +/** |
|
| 572 | + * @param string $str |
|
| 573 | + */ |
|
| 565 | 574 | function tpl_do_replace($str) |
| 566 | 575 | { |
| 567 | 576 | global $vars, $no_eval_vars; |
@@ -589,6 +598,10 @@ discard block |
||
| 589 | 598 | return $str; |
| 590 | 599 | } |
| 591 | 600 | |
| 601 | +/** |
|
| 602 | + * @param string $tplnameError |
|
| 603 | + * @param string $msg |
|
| 604 | + */ |
|
| 592 | 605 | function tpl_errorMsg($tplnameError, $msg) |
| 593 | 606 | { |
| 594 | 607 | global $tplname; |
@@ -617,6 +630,9 @@ discard block |
||
| 617 | 630 | textdomain('messages'); |
| 618 | 631 | } |
| 619 | 632 | |
| 633 | +/** |
|
| 634 | + * @param string $sCode |
|
| 635 | + */ |
|
| 620 | 636 | function tpl_do_translation($sCode) |
| 621 | 637 | { |
| 622 | 638 | global $opt, $style, $tplname; |
@@ -645,6 +661,9 @@ discard block |
||
| 645 | 661 | return $sResultCode; |
| 646 | 662 | } |
| 647 | 663 | |
| 664 | +/** |
|
| 665 | + * @param string $sCode |
|
| 666 | + */ |
|
| 648 | 667 | function gettext_do_html($sCode) |
| 649 | 668 | { |
| 650 | 669 | $sResultCode = ''; |
@@ -674,6 +693,9 @@ discard block |
||
| 674 | 693 | return $sResultCode; |
| 675 | 694 | } |
| 676 | 695 | |
| 696 | +/** |
|
| 697 | + * @return string |
|
| 698 | + */ |
|
| 677 | 699 | function t($str) |
| 678 | 700 | { |
| 679 | 701 | global $translate; |
@@ -149,6 +149,9 @@ |
||
| 149 | 149 | <?php |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | +/** |
|
| 153 | + * @param string $sql |
|
| 154 | + */ |
|
| 152 | 155 | function sqldbg_execute($sql, $bSlave) |
| 153 | 156 | { |
| 154 | 157 | global $dblink; |
@@ -106,6 +106,10 @@ |
||
| 106 | 106 | // throttle admin error mails; |
| 107 | 107 | // currently used only for SQL errors and warnings |
| 108 | 108 | |
| 109 | +/** |
|
| 110 | + * @param string $errortype |
|
| 111 | + * @param string $message |
|
| 112 | + */ |
|
| 109 | 113 | function admin_errormail($to, $errortype, $message, $headers) |
| 110 | 114 | { |
| 111 | 115 | global $opt; |
@@ -26,6 +26,9 @@ discard block |
||
| 26 | 26 | * Returns: if $file specified - true if OK |
| 27 | 27 | if $file not specified - image data |
| 28 | 28 | */ |
| 29 | +/** |
|
| 30 | + * @param resource $img |
|
| 31 | + */ |
|
| 29 | 32 | function imagebmp($img,$file="",$RLE=0) |
| 30 | 33 | { |
| 31 | 34 | |
@@ -463,6 +466,9 @@ discard block |
||
| 463 | 466 | |
| 464 | 467 | |
| 465 | 468 | |
| 469 | +/** |
|
| 470 | + * @param integer $byte |
|
| 471 | + */ |
|
| 466 | 472 | function RetBits($byte,$start,$len) |
| 467 | 473 | { |
| 468 | 474 | $bin=decbin8($byte); |
@@ -474,6 +480,10 @@ discard block |
||
| 474 | 480 | |
| 475 | 481 | |
| 476 | 482 | $CurrentBit=0; |
| 483 | +/** |
|
| 484 | + * @param resource $f |
|
| 485 | + * @param integer $count |
|
| 486 | + */ |
|
| 477 | 487 | function freadbits($f,$count) |
| 478 | 488 | { |
| 479 | 489 | global $CurrentBit,$SMode; |
@@ -505,6 +515,10 @@ discard block |
||
| 505 | 515 | { |
| 506 | 516 | return chr($n & 255).chr(($n >> 8) & 255).chr(($n >> 16) & 255).chr(($n >> 24) & 255); |
| 507 | 517 | } |
| 518 | + |
|
| 519 | + /** |
|
| 520 | + * @param integer $n |
|
| 521 | + */ |
|
| 508 | 522 | function int_to_word($n) |
| 509 | 523 | { |
| 510 | 524 | return chr($n & 255).chr(($n >> 8) & 255); |
@@ -516,6 +530,9 @@ discard block |
||
| 516 | 530 | return decbinx($d,8); |
| 517 | 531 | }; |
| 518 | 532 | |
| 533 | +/** |
|
| 534 | + * @param integer $n |
|
| 535 | + */ |
|
| 519 | 536 | function decbinx($d,$n) |
| 520 | 537 | { |
| 521 | 538 | $bin=decbin($d); |
@@ -23,6 +23,10 @@ |
||
| 23 | 23 | return self::getAttrbutesListArrayInternal($cacheId, false, $firstLetterUppercase); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @param boolean $bOnlySelectable |
|
| 28 | + * @param boolean $firstLetterUppercase |
|
| 29 | + */ |
|
| 26 | 30 | public static function getAttrbutesListArrayInternal($cacheId, $bOnlySelectable, $firstLetterUppercase) |
| 27 | 31 | { |
| 28 | 32 | global $opt; |
@@ -411,9 +411,9 @@ |
||
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | /** |
| 414 | - * @param $cacheId |
|
| 415 | - * @param $start |
|
| 416 | - * @param $count |
|
| 414 | + * @param integer $cacheId |
|
| 415 | + * @param integer $start |
|
| 416 | + * @param integer $count |
|
| 417 | 417 | * @param bool $deleted |
| 418 | 418 | * @param bool $protect_old_coords |
| 419 | 419 | * |
@@ -262,6 +262,9 @@ |
||
| 262 | 262 | return $this->reCacheLog->getValue('owner_notified') != 0; |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | + /** |
|
| 266 | + * @param integer $value |
|
| 267 | + */ |
|
| 265 | 268 | public function setOwnerNotified($value) |
| 266 | 269 | { |
| 267 | 270 | return $this->reCacheLog->setValue('owner_notified', $value ? 1 : 0); |
@@ -303,6 +303,10 @@ discard block |
||
| 303 | 303 | return 'R ' . floor($result[0]) . ' H ' . floor($result[1]); |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | + /** |
|
| 307 | + * @param integer $bw |
|
| 308 | + * @param integer $lw |
|
| 309 | + */ |
|
| 306 | 310 | public function wgs2pot($bw, $lw) |
| 307 | 311 | { |
| 308 | 312 | /* Copyright (c) 2006, HELMUT H. HEIMEIER |
@@ -602,6 +606,9 @@ discard block |
||
| 602 | 606 | ]; |
| 603 | 607 | } |
| 604 | 608 | |
| 609 | + /** |
|
| 610 | + * @param string $name |
|
| 611 | + */ |
|
| 605 | 612 | public static function parseRequestLat($name) |
| 606 | 613 | { |
| 607 | 614 | if (!isset($_REQUEST[$name . 'NS']) || !isset($_REQUEST[$name . 'Lat']) || !isset($_REQUEST[$name . 'LatMin'])) { |
@@ -620,6 +627,9 @@ discard block |
||
| 620 | 627 | return $lat; |
| 621 | 628 | } |
| 622 | 629 | |
| 630 | + /** |
|
| 631 | + * @param string $name |
|
| 632 | + */ |
|
| 623 | 633 | public static function parseRequestLon($name) |
| 624 | 634 | { |
| 625 | 635 | if (!isset($_REQUEST[$name . 'EW']) || !isset($_REQUEST[$name . 'Lon']) || !isset($_REQUEST[$name . 'LonMin'])) { |