@@ -70,6 +70,11 @@ |
||
| 70 | 70 | return $this->getImageFrom($this->activeSkin->getName(), $image_tag, $template); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | + /** |
|
| 74 | + * @param string $skinName |
|
| 75 | + * @param string $image_tag |
|
| 76 | + * @param template|null $template |
|
| 77 | + */ |
|
| 73 | 78 | public function getImageFrom($skinName, $image_tag, $template) { |
| 74 | 79 | return $this->getSkin($skinName)->imageFromStringTag($image_tag, $template); |
| 75 | 80 | } |
@@ -468,6 +468,7 @@ discard block |
||
| 468 | 468 | * Compile IF tags - much of this is from Smarty with |
| 469 | 469 | * some adaptions for our block level methods |
| 470 | 470 | * @access private |
| 471 | + * @param boolean $elseif |
|
| 471 | 472 | */ |
| 472 | 473 | function compile_tag_if($tag_args, $elseif) |
| 473 | 474 | { |
@@ -625,6 +626,7 @@ discard block |
||
| 625 | 626 | /** |
| 626 | 627 | * Compile DEFINE tags |
| 627 | 628 | * @access private |
| 629 | + * @param boolean $op |
|
| 628 | 630 | */ |
| 629 | 631 | function compile_tag_define($tag_args, $op) |
| 630 | 632 | { |
@@ -703,6 +705,7 @@ discard block |
||
| 703 | 705 | * parse expression |
| 704 | 706 | * This is from Smarty |
| 705 | 707 | * @access private |
| 708 | + * @param string $is_arg |
|
| 706 | 709 | */ |
| 707 | 710 | function _parse_is_expr($is_arg, $tokens) |
| 708 | 711 | { |
@@ -799,6 +802,8 @@ discard block |
||
| 799 | 802 | * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. |
| 800 | 803 | * NOTE: does not expect a trailing "." on the blockname. |
| 801 | 804 | * @access private |
| 805 | + * @param string $blockname |
|
| 806 | + * @param boolean $include_last_iterator |
|
| 802 | 807 | */ |
| 803 | 808 | function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) |
| 804 | 809 | { |
@@ -862,6 +867,7 @@ discard block |
||
| 862 | 867 | /** |
| 863 | 868 | * Minifies template w/i PHP code by removing extra spaces |
| 864 | 869 | * @access private |
| 870 | + * @return string |
|
| 865 | 871 | */ |
| 866 | 872 | function minify($html) |
| 867 | 873 | { |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | - * @return array |
|
| 42 | + * @return integer |
|
| 43 | 43 | */ |
| 44 | 44 | public function toArray() { |
| 45 | 45 | $tutorial = array(); |
@@ -11,6 +11,9 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | require_once('db/db_queries.php'); |
| 13 | 13 | |
| 14 | +/** |
|
| 15 | + * @param string $tablename |
|
| 16 | + */ |
|
| 14 | 17 | function db_change_units_perform($query, $tablename, $object_id) { |
| 15 | 18 | $query = implode(',', $query); |
| 16 | 19 | if($query && $object_id) { |
@@ -67,11 +70,8 @@ discard block |
||
| 67 | 70 | /** |
| 68 | 71 | * Функция проверяет статус транзакции |
| 69 | 72 | * |
| 70 | - * @param null|true|false $status Должна ли быть запущена транзакция в момент проверки |
|
| 71 | - * <p>null - транзакция НЕ должна быть запущена</p> |
|
| 72 | - * <p>true - транзакция должна быть запущена - для совместимости с $for_update</p> |
|
| 73 | - * <p>false - всё равно - для совместимости с $for_update</p> |
|
| 74 | - * @return bool Текущий статус транзакции |
|
| 73 | + * @param boolean $transaction_should_be_started |
|
| 74 | + * @return null|boolean Текущий статус транзакции |
|
| 75 | 75 | */ |
| 76 | 76 | function sn_db_transaction_check($transaction_should_be_started = null) { |
| 77 | 77 | return classSupernova::db_transaction_check($transaction_should_be_started); |
@@ -12,6 +12,9 @@ discard block |
||
| 12 | 12 | require_once('general/compatibility.php'); |
| 13 | 13 | require_once('general_pname.php'); |
| 14 | 14 | |
| 15 | +/** |
|
| 16 | + * @param string $func_name |
|
| 17 | + */ |
|
| 15 | 18 | function sn_function_call($func_name, $func_arg = array()) |
| 16 | 19 | { |
| 17 | 20 | global $functions; // All data in $functions should be normalized to valid 'callable' state: '<function_name>'|array('<object_name>', '<method_name>') |
@@ -65,6 +68,9 @@ discard block |
||
| 65 | 68 | |
| 66 | 69 | // ---------------------------------------------------------------------------------------------------------------- |
| 67 | 70 | // Fonction de lecture / ecriture / exploitation de templates |
| 71 | +/** |
|
| 72 | + * @param string $filename |
|
| 73 | + */ |
|
| 68 | 74 | function sys_file_read($filename) |
| 69 | 75 | { |
| 70 | 76 | return @file_get_contents($filename); |
@@ -111,7 +117,7 @@ discard block |
||
| 111 | 117 | /** |
| 112 | 118 | * Получение курса обмены валюты в серверную валюту |
| 113 | 119 | * |
| 114 | - * @param $currency_symbol |
|
| 120 | + * @param string $currency_symbol |
|
| 115 | 121 | * |
| 116 | 122 | * @return float |
| 117 | 123 | */ |
@@ -148,6 +154,7 @@ discard block |
||
| 148 | 154 | null - standard result |
| 149 | 155 | true - return only style class for current params |
| 150 | 156 | false - return array('text' => $ret, 'class' => $class), where $ret - unstyled |
| 157 | + * @param boolean $style |
|
| 151 | 158 | */ |
| 152 | 159 | |
| 153 | 160 | function pretty_number($n, $floor = true, $color = false, $limit = false, $style = null) |
@@ -267,6 +274,9 @@ discard block |
||
| 267 | 274 | return preg_replace($ListCensure, '*', $String); |
| 268 | 275 | } |
| 269 | 276 | |
| 277 | +/** |
|
| 278 | + * @param string $email |
|
| 279 | + */ |
|
| 270 | 280 | function is_email($email) { |
| 271 | 281 | return(preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i", $email)); |
| 272 | 282 | } |
@@ -303,6 +313,9 @@ discard block |
||
| 303 | 313 | return floatval(sys_get_param($param_name, $default)); |
| 304 | 314 | } |
| 305 | 315 | |
| 316 | +/** |
|
| 317 | + * @param string $param_name |
|
| 318 | + */ |
|
| 306 | 319 | function sys_get_param_escaped($param_name, $default = '') |
| 307 | 320 | { |
| 308 | 321 | return db_escape(sys_get_param($param_name, $default)); |
@@ -547,6 +560,9 @@ discard block |
||
| 547 | 560 | } |
| 548 | 561 | |
| 549 | 562 | // Generates random string of $length symbols from $allowed_chars charset |
| 563 | +/** |
|
| 564 | + * @param string $allowed_chars |
|
| 565 | + */ |
|
| 550 | 566 | function sys_random_string($length = 16, $allowed_chars = SN_SYS_SEC_CHARS_ALLOWED) { |
| 551 | 567 | $allowed_length = strlen($allowed_chars); |
| 552 | 568 | |
@@ -672,6 +688,9 @@ discard block |
||
| 672 | 688 | return implode(';', $fleet_string); |
| 673 | 689 | } |
| 674 | 690 | |
| 691 | +/** |
|
| 692 | + * @param string $body |
|
| 693 | + */ |
|
| 675 | 694 | function mymail($email_unsafe, $title, $body, $from = '', $html = false) { |
| 676 | 695 | global $config, $lang; |
| 677 | 696 | |
@@ -959,6 +978,9 @@ discard block |
||
| 959 | 978 | return serialize($nick_array); |
| 960 | 979 | } |
| 961 | 980 | |
| 981 | +/** |
|
| 982 | + * @param string $nick_string |
|
| 983 | + */ |
|
| 962 | 984 | function player_nick_uncompact($nick_string) { |
| 963 | 985 | try { |
| 964 | 986 | $result = unserialize($nick_string); |
@@ -1262,6 +1284,9 @@ discard block |
||
| 1262 | 1284 | return $ranks; |
| 1263 | 1285 | } |
| 1264 | 1286 | |
| 1287 | +/** |
|
| 1288 | + * @param boolean $planet_id |
|
| 1289 | + */ |
|
| 1265 | 1290 | function sys_player_new_adjust($user_id, $planet_id){return sn_function_call('sys_player_new_adjust', array($user_id, $planet_id, &$result));} |
| 1266 | 1291 | function sn_sys_player_new_adjust($user_id, $planet_id, &$result) { |
| 1267 | 1292 | return $result; |
@@ -80,6 +80,9 @@ |
||
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | +/** |
|
| 84 | + * @param string $prefix_table_name |
|
| 85 | + */ |
|
| 83 | 86 | function upd_load_table_info($prefix_table_name, $prefixed = true) { |
| 84 | 87 | global $config, $update_tables, $update_indexes, $update_indexes_full, $update_foreigns; |
| 85 | 88 | |
@@ -21,11 +21,20 @@ discard block |
||
| 21 | 21 | return empty($result) ? null : $result; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @param integer $galaxy |
|
| 26 | + * @param integer $system |
|
| 27 | + * @param integer $planet |
|
| 28 | + * @param integer $planet_type |
|
| 29 | + */ |
|
| 24 | 30 | public static function db_planet_by_gspt_safe($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
| 25 | 31 | return classSupernova::db_get_record_list(LOC_PLANET, |
| 26 | 32 | "{{planets}}.`galaxy` = {$galaxy} AND {{planets}}.`system` = {$system} AND {{planets}}.`planet` = {$planet} AND {{planets}}.`planet_type` = {$planet_type}", true); |
| 27 | 33 | } |
| 28 | 34 | |
| 35 | + /** |
|
| 36 | + * @param integer $planet_type |
|
| 37 | + */ |
|
| 29 | 38 | public static function db_planet_by_gspt($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
| 30 | 39 | $galaxy = intval($galaxy); |
| 31 | 40 | $system = intval($system); |
@@ -114,6 +123,9 @@ discard block |
||
| 114 | 123 | "`id_owner` = '{$user_row['id']}' {$conditions} ORDER BY {$order_by}"); |
| 115 | 124 | } |
| 116 | 125 | |
| 126 | + /** |
|
| 127 | + * @param integer $planet_id |
|
| 128 | + */ |
|
| 117 | 129 | public static function db_planet_list_by_user_or_planet($user_id, $planet_id) { |
| 118 | 130 | if(!($user_id = idval($user_id)) && !($planet_id = idval($planet_id))) { |
| 119 | 131 | return false; |
@@ -130,6 +142,9 @@ discard block |
||
| 130 | 142 | return classSupernova::db_upd_record_by_id(LOC_PLANET, $planet_id, $set); |
| 131 | 143 | } |
| 132 | 144 | |
| 145 | + /** |
|
| 146 | + * @param integer $ui_planet_type |
|
| 147 | + */ |
|
| 133 | 148 | public static function db_planet_set_by_gspt($ui_galaxy, $ui_system, $ui_planet, $ui_planet_type = PT_ALL, $set) { |
| 134 | 149 | if(!($set = trim($set))) { |
| 135 | 150 | return false; |
@@ -10,6 +10,9 @@ |
||
| 10 | 10 | |
| 11 | 11 | class AllianceStatic { |
| 12 | 12 | |
| 13 | + /** |
|
| 14 | + * @param string $string |
|
| 15 | + */ |
|
| 13 | 16 | public static function parseTitleList($string) { |
| 14 | 17 | global $ally_rights; |
| 15 | 18 | |
@@ -168,6 +168,9 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | |
| 171 | + /** |
|
| 172 | + * @param string $path |
|
| 173 | + */ |
|
| 171 | 174 | protected function lng_try_filepath($path, $file_path_relative) { |
| 172 | 175 | $file_path = SN_ROOT_PHYSICAL . ($path && file_exists(SN_ROOT_PHYSICAL . $path . $file_path_relative) ? $path : '') . $file_path_relative; |
| 173 | 176 | return file_exists($file_path) ? $file_path : false; |
@@ -278,6 +281,9 @@ discard block |
||
| 278 | 281 | return null; |
| 279 | 282 | } |
| 280 | 283 | |
| 284 | + /** |
|
| 285 | + * @param string $language_new |
|
| 286 | + */ |
|
| 281 | 287 | public function lng_switch($language_new) { |
| 282 | 288 | global $language, $user, $sn_mvc; |
| 283 | 289 | |