@@ -18,6 +18,11 @@ discard block |
||
18 | 18 | |
19 | 19 | // TODO - НЕ ОБЯЗАТЕЛЬНО ОТПРАВЛЯТЬ ЧЕРЕЗ ЕМЕЙЛ! ЕСЛИ ЭТО ФЕЙСБУЧЕК ИЛИ ВКШЕЧКА - МОЖНО ЧЕРЕЗ ЛС ПИСАТЬ!! |
20 | 20 | // TODO - OK 4.6 |
21 | + |
|
22 | + /** |
|
23 | + * @param integer $confirmation_type_safe |
|
24 | + * @param string $email_unsafe |
|
25 | + */ |
|
21 | 26 | public function db_confirmation_get_latest_by_type_and_email($confirmation_type_safe, $email_unsafe) { |
22 | 27 | $email_safe = $this->db->db_escape($email_unsafe); |
23 | 28 | |
@@ -26,12 +31,21 @@ discard block |
||
26 | 31 | `type` = {$confirmation_type_safe} AND `email` = '{$email_safe}' ORDER BY create_time DESC LIMIT 1;", true); |
27 | 32 | } |
28 | 33 | // TODO - OK 4.6 |
34 | + |
|
35 | + /** |
|
36 | + * @param integer $confirmation_type_safe |
|
37 | + */ |
|
29 | 38 | public function db_confirmation_delete_by_type_and_email($confirmation_type_safe, $email_unsafe) { |
30 | 39 | $email_safe = $this->db->db_escape($email_unsafe); |
31 | 40 | |
32 | 41 | return $this->db->doquery("DELETE FROM {{confirmations}} WHERE `type` = {$confirmation_type_safe} AND `email` = '{$email_safe}'"); |
33 | 42 | } |
34 | 43 | // TODO - OK 4.6 |
44 | + |
|
45 | + /** |
|
46 | + * @param integer $confirmation_type_safe |
|
47 | + * @param string $email_unsafe |
|
48 | + */ |
|
35 | 49 | public function db_confirmation_get_unique_code_by_type_and_email($confirmation_type_safe, $email_unsafe) { |
36 | 50 | $email_safe = $this->db->db_escape($email_unsafe); |
37 | 51 | |
@@ -50,6 +64,11 @@ discard block |
||
50 | 64 | return $confirm_code_unsafe; |
51 | 65 | } |
52 | 66 | // TODO - OK 4.6 |
67 | + |
|
68 | + /** |
|
69 | + * @param integer $confirmation_type_safe |
|
70 | + * @param string $confirmation_code_unsafe |
|
71 | + */ |
|
53 | 72 | public function db_confirmation_get_by_type_and_code($confirmation_type_safe, $confirmation_code_unsafe) { |
54 | 73 | $confirmation_code_safe = $this->db->db_escape($confirmation_code_unsafe); |
55 | 74 |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | * Рассчёт бонуса ММ |
703 | 703 | * |
704 | 704 | * @param $dark_matter |
705 | - * @param bool|true $direct |
|
705 | + * @param boolean $direct |
|
706 | 706 | * @param bool|false $return_bonus |
707 | 707 | * |
708 | 708 | * @return float|int |
@@ -738,6 +738,12 @@ discard block |
||
738 | 738 | |
739 | 739 | // Дополнительная ре-трансляция адреса, если в каком-то случае платежная система ожидает нелогичный ответ |
740 | 740 | // Пример: иксолла при неправильно заданном пользователе в ордере ожидает НЕПРАВИЛЬНЫЙ_ОРДЕР, а не НЕПРАВИЛЬНЫЙ_ПОЛЬЗОВАТЕЛЬ |
741 | + |
|
742 | + /** |
|
743 | + * @param integer $error_code |
|
744 | + * |
|
745 | + * @return integer|null |
|
746 | + */ |
|
741 | 747 | function retranslate_error($error_code, $options = array()) { |
742 | 748 | return isset($options['retranslate_error'][$error_code]) ? $options['retranslate_error'][$error_code] : $error_code; |
743 | 749 | } |
@@ -103,6 +103,7 @@ |
||
103 | 103 | /** |
104 | 104 | * Set custom template location (able to use directory outside of phpBB) |
105 | 105 | * @access public |
106 | + * @param string $template_path |
|
106 | 107 | */ |
107 | 108 | function set_custom_template($template_path, $template_name, $fallback_template_path = false) |
108 | 109 | { |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | class template |
26 | 26 | { |
27 | 27 | /** variable that holds all the data we'll be substituting into |
28 | - * the compiled templates. Takes form: |
|
29 | - * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value |
|
30 | - * if it's a root-level variable, it'll be like this: |
|
31 | - * --> $this->_tpldata[.][0][varname] == value |
|
32 | - */ |
|
28 | + * the compiled templates. Takes form: |
|
29 | + * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value |
|
30 | + * if it's a root-level variable, it'll be like this: |
|
31 | + * --> $this->_tpldata[.][0][varname] == value |
|
32 | + */ |
|
33 | 33 | var $_tpldata = array('.' => array(0 => array())); |
34 | 34 | var $_rootref; |
35 | 35 | // var $_block_counter = array(); |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | var $parsed = false; |
61 | 61 | |
62 | 62 | /** |
63 | - * Set template location |
|
64 | - * @access public |
|
65 | - */ |
|
63 | + * Set template location |
|
64 | + * @access public |
|
65 | + */ |
|
66 | 66 | function set_template() |
67 | 67 | { |
68 | 68 | global $phpbb_root_path, $user; |
@@ -101,9 +101,9 @@ discard block |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
104 | - * Set custom template location (able to use directory outside of phpBB) |
|
105 | - * @access public |
|
106 | - */ |
|
104 | + * Set custom template location (able to use directory outside of phpBB) |
|
105 | + * @access public |
|
106 | + */ |
|
107 | 107 | function set_custom_template($template_path, $template_name, $fallback_template_path = false) |
108 | 108 | { |
109 | 109 | global $phpbb_root_path, $user; |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
145 | - * Sets the template filenames for handles. $filename_array |
|
146 | - * should be a hash of handle => filename pairs. |
|
147 | - * @access public |
|
148 | - */ |
|
145 | + * Sets the template filenames for handles. $filename_array |
|
146 | + * should be a hash of handle => filename pairs. |
|
147 | + * @access public |
|
148 | + */ |
|
149 | 149 | function set_filenames($filename_array) |
150 | 150 | { |
151 | 151 | if (!is_array($filename_array)) |
@@ -172,9 +172,9 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
175 | - * Destroy template data set |
|
176 | - * @access public |
|
177 | - */ |
|
175 | + * Destroy template data set |
|
176 | + * @access public |
|
177 | + */ |
|
178 | 178 | function destroy() |
179 | 179 | { |
180 | 180 | $this->_tpldata = array('.' => array(0 => array())); |
@@ -182,9 +182,9 @@ discard block |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
185 | - * Reset/empty complete block |
|
186 | - * @access public |
|
187 | - */ |
|
185 | + * Reset/empty complete block |
|
186 | + * @access public |
|
187 | + */ |
|
188 | 188 | function destroy_block_vars($blockname) |
189 | 189 | { |
190 | 190 | if (strpos($blockname, '.') !== false) |
@@ -212,9 +212,9 @@ discard block |
||
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
215 | - * Display handle |
|
216 | - * @access public |
|
217 | - */ |
|
215 | + * Display handle |
|
216 | + * @access public |
|
217 | + */ |
|
218 | 218 | function display($handle, $include_once = true) |
219 | 219 | { |
220 | 220 | global $user, $phpbb_hook, $lang, $config; |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | } |
249 | 249 | |
250 | 250 | /** |
251 | - * Display the handle and assign the output to a template variable or return the compiled result. |
|
252 | - * @access public |
|
253 | - */ |
|
251 | + * Display the handle and assign the output to a template variable or return the compiled result. |
|
252 | + * @access public |
|
253 | + */ |
|
254 | 254 | function assign_display($handle, $template_var = '', $return_content = true, $include_once = false) |
255 | 255 | { |
256 | 256 | ob_start(); |
@@ -268,9 +268,9 @@ discard block |
||
268 | 268 | } |
269 | 269 | |
270 | 270 | /** |
271 | - * Load a compiled template if possible, if not, recompile it |
|
272 | - * @access private |
|
273 | - */ |
|
271 | + * Load a compiled template if possible, if not, recompile it |
|
272 | + * @access private |
|
273 | + */ |
|
274 | 274 | function _tpl_load(&$handle) |
275 | 275 | { |
276 | 276 | global $user, $config; |
@@ -453,9 +453,9 @@ discard block |
||
453 | 453 | } |
454 | 454 | |
455 | 455 | /** |
456 | - * Assign key variable pairs from an array |
|
457 | - * @access public |
|
458 | - */ |
|
456 | + * Assign key variable pairs from an array |
|
457 | + * @access public |
|
458 | + */ |
|
459 | 459 | function assign_vars($vararray) |
460 | 460 | { |
461 | 461 | foreach ($vararray as $key => $val) |
@@ -467,9 +467,9 @@ discard block |
||
467 | 467 | } |
468 | 468 | |
469 | 469 | /** |
470 | - * Assign a single variable to a single key |
|
471 | - * @access public |
|
472 | - */ |
|
470 | + * Assign a single variable to a single key |
|
471 | + * @access public |
|
472 | + */ |
|
473 | 473 | function assign_var($varname, $varval) |
474 | 474 | { |
475 | 475 | $this->_rootref[$varname] = $varval; |
@@ -478,9 +478,9 @@ discard block |
||
478 | 478 | } |
479 | 479 | |
480 | 480 | /** |
481 | - * Assign key variable pairs from an array to a specified block |
|
482 | - * @access public |
|
483 | - */ |
|
481 | + * Assign key variable pairs from an array to a specified block |
|
482 | + * @access public |
|
483 | + */ |
|
484 | 484 | function assign_block_vars($blockname, $vararray) |
485 | 485 | { |
486 | 486 | if (strpos($blockname, '.') !== false) |
@@ -545,33 +545,33 @@ discard block |
||
545 | 545 | } |
546 | 546 | |
547 | 547 | /** |
548 | - * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
549 | - * |
|
550 | - * An example of how to use this function: |
|
551 | - * {@example alter_block_array.php} |
|
552 | - * |
|
553 | - * @param string $blockname the blockname, for example 'loop' |
|
554 | - * @param array $vararray the var array to insert/add or merge |
|
555 | - * @param mixed $key Key to search for |
|
556 | - * |
|
557 | - * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
558 | - * |
|
559 | - * int: Position [the position to change or insert at directly given] |
|
560 | - * |
|
561 | - * If key is false the position is set to 0 |
|
562 | - * If key is true the position is set to the last entry |
|
563 | - * |
|
564 | - * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
565 | - * |
|
566 | - * If insert, the vararray is inserted at the given position (position counting from zero). |
|
567 | - * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value). |
|
568 | - * |
|
569 | - * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
570 | - * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
571 | - * |
|
572 | - * @return bool false on error, true on success |
|
573 | - * @access public |
|
574 | - */ |
|
548 | + * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
549 | + * |
|
550 | + * An example of how to use this function: |
|
551 | + * {@example alter_block_array.php} |
|
552 | + * |
|
553 | + * @param string $blockname the blockname, for example 'loop' |
|
554 | + * @param array $vararray the var array to insert/add or merge |
|
555 | + * @param mixed $key Key to search for |
|
556 | + * |
|
557 | + * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
558 | + * |
|
559 | + * int: Position [the position to change or insert at directly given] |
|
560 | + * |
|
561 | + * If key is false the position is set to 0 |
|
562 | + * If key is true the position is set to the last entry |
|
563 | + * |
|
564 | + * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
565 | + * |
|
566 | + * If insert, the vararray is inserted at the given position (position counting from zero). |
|
567 | + * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value). |
|
568 | + * |
|
569 | + * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
570 | + * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
571 | + * |
|
572 | + * @return bool false on error, true on success |
|
573 | + * @access public |
|
574 | + */ |
|
575 | 575 | function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') |
576 | 576 | { |
577 | 577 | if (strpos($blockname, '.') !== false) |
@@ -655,9 +655,9 @@ discard block |
||
655 | 655 | } |
656 | 656 | |
657 | 657 | /** |
658 | - * Include a separate template |
|
659 | - * @access private |
|
660 | - */ |
|
658 | + * Include a separate template |
|
659 | + * @access private |
|
660 | + */ |
|
661 | 661 | function _tpl_include($filename, $include = true) |
662 | 662 | { |
663 | 663 | global $lang, $config; |
@@ -686,9 +686,9 @@ discard block |
||
686 | 686 | } |
687 | 687 | |
688 | 688 | /** |
689 | - * Include a php-file |
|
690 | - * @access private |
|
691 | - */ |
|
689 | + * Include a php-file |
|
690 | + * @access private |
|
691 | + */ |
|
692 | 692 | function _php_include($filename) |
693 | 693 | { |
694 | 694 | global $phpbb_root_path; |
@@ -705,9 +705,9 @@ discard block |
||
705 | 705 | } |
706 | 706 | |
707 | 707 | /** |
708 | - * Assign key variable pairs from an array with block support |
|
709 | - * @access public |
|
710 | - */ |
|
708 | + * Assign key variable pairs from an array with block support |
|
709 | + * @access public |
|
710 | + */ |
|
711 | 711 | function assign_recursive($values, $name = '') |
712 | 712 | { |
713 | 713 | if(isset($values['.'])) |
@@ -10,6 +10,7 @@ discard block |
||
10 | 10 | * |
11 | 11 | * 1.0 - copyright (c) 2010 by Gorlum for http://supernova.ws |
12 | 12 | * @version 1.0 |
13 | + * @param integer $lab_require |
|
13 | 14 | */ |
14 | 15 | function eco_get_lab_max_effective_level(&$user, $lab_require) |
15 | 16 | { |
@@ -193,6 +194,9 @@ discard block |
||
193 | 194 | return $result; |
194 | 195 | } |
195 | 196 | |
197 | +/** |
|
198 | + * @param integer[] $unit_list |
|
199 | + */ |
|
196 | 200 | function eco_is_builds_in_que($planet_que, $unit_list) |
197 | 201 | { |
198 | 202 | $eco_is_builds_in_que = false; |
@@ -55,6 +55,9 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | |
58 | +/** |
|
59 | + * @param integer $build_mode |
|
60 | + */ |
|
58 | 61 | function que_build($user, $planet, $build_mode = BUILD_CREATE, $redirect = true) { |
59 | 62 | global $lang, $config; |
60 | 63 | |
@@ -378,6 +381,9 @@ discard block |
||
378 | 381 | return classSupernova::db_que_list_by_type_location($user_id, $planet_id, $que_type, $for_update); |
379 | 382 | } |
380 | 383 | |
384 | +/** |
|
385 | + * @param integer $unit_id |
|
386 | + */ |
|
381 | 387 | function que_add_unit($unit_id, $user = array(), $planet = array(), $build_data, $unit_level = 0, $unit_amount = 1, $build_mode = BUILD_CREATE) { |
382 | 388 | // TODO Унифицировать проверки |
383 | 389 |
@@ -141,6 +141,9 @@ |
||
141 | 141 | "); |
142 | 142 | } |
143 | 143 | |
144 | +/** |
|
145 | + * @param string $email_unsafe |
|
146 | + */ |
|
144 | 147 | function player_create($username_unsafe, $email_unsafe, $options) { |
145 | 148 | sn_db_transaction_check(true); |
146 | 149 |
@@ -1,5 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | +/** |
|
4 | + * @return double |
|
5 | + */ |
|
3 | 6 | function flt_fleet_speed($user, $fleet) |
4 | 7 | { |
5 | 8 | if (!is_array($fleet)) |
@@ -29,6 +29,9 @@ |
||
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | +/** |
|
33 | + * @param string $group_name |
|
34 | + */ |
|
32 | 35 | function flt_spy_scan($target_planet, $group_name, $section_title, $target_user = array()) |
33 | 36 | { |
34 | 37 | global $lang; |
@@ -26,6 +26,10 @@ |
||
26 | 26 | return true; |
27 | 27 | } |
28 | 28 | |
29 | +/** |
|
30 | + * @param integer $mode |
|
31 | + * @param integer $mercenary_id |
|
32 | + */ |
|
29 | 33 | function mrc_mercenary_hire($mode, $user, $mercenary_id) { |
30 | 34 | global $config, $lang, $sn_powerup_buy_discounts; |
31 | 35 |