@@ -8,8 +8,7 @@ |
||
| 8 | 8 | * @copyright 2008 By Chlorel for XNova |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -function flt_mission_transport(&$mission_data) |
|
| 12 | -{ |
|
| 11 | +function flt_mission_transport(&$mission_data) { |
|
| 13 | 12 | $fleet_row = &$mission_data['fleet']; |
| 14 | 13 | $source_planet = &$mission_data['src_planet']; |
| 15 | 14 | $destination_planet = &$mission_data['dst_planet']; |
@@ -10,8 +10,7 @@ |
||
| 10 | 10 | // ---------------------------------------------------------------------------------------------------------------- |
| 11 | 11 | // Mission Case 9: -> Coloniser |
| 12 | 12 | // |
| 13 | -function flt_mission_colonize(&$mission_data) |
|
| 14 | -{ |
|
| 13 | +function flt_mission_colonize(&$mission_data) { |
|
| 15 | 14 | $fleet_row = &$mission_data['fleet']; |
| 16 | 15 | $src_user_row = &$mission_data['src_user']; |
| 17 | 16 | |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | * version 2.0 copyright (c) 2012 by Gorlum for http://supernova.ws |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -function sn_techtree_view($template = null) |
|
| 10 | -{ |
|
| 9 | +function sn_techtree_view($template = null) { |
|
| 11 | 10 | global $lang, $user, $planetrow; |
| 12 | 11 | |
| 13 | 12 | $tech_tree = array(); |
@@ -115,8 +115,7 @@ |
||
| 115 | 115 | )); |
| 116 | 116 | |
| 117 | 117 | display($template, $lang['tech'][STRUC_MOON_GATE]); |
| 118 | - } |
|
| 119 | - else |
|
| 118 | + } else |
|
| 120 | 119 | { |
| 121 | 120 | messageBox($lang['gate_no_src_ga'], $lang['tech'][STRUC_MOON_GATE], "overview.php", 10); |
| 122 | 121 | } |
@@ -74,14 +74,12 @@ discard block |
||
| 74 | 74 | doquery("UPDATE {{alliance}} SET " . implode(',', $ally_changeset) . " WHERE `id`='{$ally['id']}' LIMIT 1;"); |
| 75 | 75 | sys_redirect('alliance.php?mode=admin&edit=ally'); |
| 76 | 76 | } |
| 77 | -} |
|
| 78 | -elseif(sys_get_param_str('isSaveText')) |
|
| 77 | +} elseif(sys_get_param_str('isSaveText')) |
|
| 79 | 78 | { |
| 80 | 79 | $text = sys_get_param_str_both('text'); |
| 81 | 80 | doquery("UPDATE {{alliance}} SET `{$text_list[$allyTextID]['db_field']}`='{$text['safe']}' WHERE `id`='{$ally['id']}';"); |
| 82 | 81 | $ally[$text_list[$allyTextID]['db_field']] = $text['unsafe']; |
| 83 | -} |
|
| 84 | -elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader')) |
|
| 82 | +} elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader')) |
|
| 85 | 83 | { |
| 86 | 84 | if(!$isAllyOwner) |
| 87 | 85 | { |
@@ -98,8 +96,7 @@ discard block |
||
| 98 | 96 | sn_db_transaction_commit(); |
| 99 | 97 | sys_redirect('alliance.php'); |
| 100 | 98 | } |
| 101 | -} |
|
| 102 | -elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband')) |
|
| 99 | +} elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband')) |
|
| 103 | 100 | { |
| 104 | 101 | if(!$isAllyOwner) |
| 105 | 102 | { |
@@ -23,16 +23,14 @@ discard block |
||
| 23 | 23 | $lang['Go_out_welldone'] = str_replace("%s", $ally_name, $lang['Go_out_welldone']); |
| 24 | 24 | messageBox(sprintf($lang['ali_info_leave_success'], $ally['ally_name']), $lang['sys_alliance']); |
| 25 | 25 | } |
| 26 | -} |
|
| 27 | -elseif($mode == 'ainfo') |
|
| 26 | +} elseif($mode == 'ainfo') |
|
| 28 | 27 | { |
| 29 | 28 | $tag = sys_get_param_str('tag'); |
| 30 | 29 | $id_ally = sys_get_param_id('a'); |
| 31 | 30 | if($tag) |
| 32 | 31 | { |
| 33 | 32 | $ally = doquery("SELECT * FROM {{alliance}} WHERE ally_tag='{$tag}' LIMIT 1;", '', true); |
| 34 | - } |
|
| 35 | - elseif($id_ally) |
|
| 33 | + } elseif($id_ally) |
|
| 36 | 34 | { |
| 37 | 35 | $ally = doquery("SELECT * FROM {{alliance}} WHERE id='{$id_ally}' LIMIT 1;", '', true); |
| 38 | 36 | } |
@@ -52,20 +50,17 @@ discard block |
||
| 52 | 50 | 'USER_ALLY_ID' => $user['ally_id'], |
| 53 | 51 | )); |
| 54 | 52 | $page_header = $lang['sys_alliance']; |
| 55 | -} |
|
| 56 | -else |
|
| 53 | +} else |
|
| 57 | 54 | { |
| 58 | 55 | $page_header = $lang['your_alliance']; |
| 59 | 56 | |
| 60 | 57 | if($ally['ally_owner'] == $user['id']) |
| 61 | 58 | { |
| 62 | 59 | $range = $ally['ally_owner_range'] ? $ally['ally_owner_range'] : $lang['Founder']; |
| 63 | - } |
|
| 64 | - elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
| 60 | + } elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
| 65 | 61 | { |
| 66 | 62 | $range = $ranks[$user['ally_rank_id']]['name']; |
| 67 | - } |
|
| 68 | - else |
|
| 63 | + } else |
|
| 69 | 64 | { |
| 70 | 65 | $range = $lang['member']; |
| 71 | 66 | } |
@@ -37,8 +37,7 @@ |
||
| 37 | 37 | </script>'; |
| 38 | 38 | |
| 39 | 39 | messageBoxAdmin("{$script}<img src=\"design/images/progressbar.gif\"><br>{$lang['sys_wait']}", $lang['adm_stat_title'], '', 0); |
| 40 | -} |
|
| 41 | -else |
|
| 40 | +} else |
|
| 42 | 41 | { |
| 43 | 42 | messageBoxAdmin($lang['adm_stat_already_started'], $lang['adm_stat_title'], 'admin/overview.php'); |
| 44 | 43 | } |
@@ -4,8 +4,7 @@ discard block |
||
| 4 | 4 | * |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -function sn_chat_model() |
|
| 8 | -{ |
|
| 7 | +function sn_chat_model() { |
|
| 9 | 8 | global $config, $user, $template_result, $lang; |
| 10 | 9 | |
| 11 | 10 | $config->array_set('users', $user['id'], 'chat_last_activity', SN_TIME_MICRO); |
@@ -44,15 +43,13 @@ discard block |
||
| 44 | 43 | |
| 45 | 44 | $template_result['PAGE_HEADER'] = $page_title; |
| 46 | 45 | } |
| 47 | -function sn_chat_view($template = null) |
|
| 48 | -{ |
|
| 46 | +function sn_chat_view($template = null) { |
|
| 49 | 47 | $template = gettemplate('chat_body', $template); |
| 50 | 48 | |
| 51 | 49 | return $template; |
| 52 | 50 | } |
| 53 | 51 | |
| 54 | -function sn_chat_add_model() |
|
| 55 | -{ |
|
| 52 | +function sn_chat_add_model() { |
|
| 56 | 53 | global $config, $user; |
| 57 | 54 | |
| 58 | 55 | define('IN_AJAX', true); |
@@ -76,8 +73,7 @@ discard block |
||
| 76 | 73 | |
| 77 | 74 | die(); |
| 78 | 75 | } |
| 79 | -function sn_chat_msg_view($template = null) |
|
| 80 | -{ |
|
| 76 | +function sn_chat_msg_view($template = null) { |
|
| 81 | 77 | global $config, $user, $lang; |
| 82 | 78 | |
| 83 | 79 | define('IN_AJAX', true); |
@@ -99,8 +95,7 @@ discard block |
||
| 99 | 95 | 'TIME' => date(FMT_DATE_TIME, htmlentities(SN_CLIENT_TIME_LOCAL, ENT_QUOTES, 'utf-8')), |
| 100 | 96 | 'DISABLE' => true, |
| 101 | 97 | ); |
| 102 | - } |
|
| 103 | - else |
|
| 98 | + } else |
|
| 104 | 99 | { |
| 105 | 100 | $alliance = sys_get_param_str('ally') && $user['ally_id'] ? $user['ally_id'] : 0; |
| 106 | 101 | |
@@ -121,8 +116,7 @@ discard block |
||
| 121 | 116 | } |
| 122 | 117 | |
| 123 | 118 | $page = min($page_count, max(0, sys_get_param_int('sheet'))); |
| 124 | - } |
|
| 125 | - else |
|
| 119 | + } else |
|
| 126 | 120 | { |
| 127 | 121 | $last_message = sys_get_param_id('last_message'); |
| 128 | 122 | $where_add = $last_message ? "AND `messageid` > {$last_message}" : ''; |
@@ -171,8 +165,7 @@ discard block |
||
| 171 | 165 | { |
| 172 | 166 | $pageTitle = "{$lang['chat_history']} - {$lang[$alliance ? 'chat_ally' : 'chat_common']}"; |
| 173 | 167 | display($template, $pageTitle); |
| 174 | - } |
|
| 175 | - else |
|
| 168 | + } else |
|
| 176 | 169 | { |
| 177 | 170 | $result['last_message'] = $last_message; |
| 178 | 171 | $result['html'] = templateRenderToHtml($template); |
@@ -22,8 +22,7 @@ discard block |
||
| 22 | 22 | /** |
| 23 | 23 | * phpBB Hook Class |
| 24 | 24 | */ |
| 25 | -class phpbb_hook |
|
| 26 | -{ |
|
| 25 | +class phpbb_hook { |
|
| 27 | 26 | /** |
| 28 | 27 | * Registered hooks |
| 29 | 28 | */ |
@@ -44,8 +43,7 @@ discard block |
||
| 44 | 43 | * |
| 45 | 44 | * @param array $valid_hooks array containing the hookable functions/methods |
| 46 | 45 | */ |
| 47 | - function phpbb_hook($valid_hooks) |
|
| 48 | - { |
|
| 46 | + function phpbb_hook($valid_hooks) { |
|
| 49 | 47 | foreach ($valid_hooks as $_null => $method) |
| 50 | 48 | { |
| 51 | 49 | $this->add_hook($method); |
@@ -65,8 +63,7 @@ discard block |
||
| 65 | 63 | * @param mixed $hook The replacement function/method to be called. Passing function name or array with object/class definition |
| 66 | 64 | * @param string $mode Specify the priority/chain mode. 'normal' -> hook gets appended to the chain. 'standalone' -> only the specified hook gets called - later hooks are not able to overwrite this (E_NOTICE is triggered then). 'first' -> hook is called as the first one within the chain. 'last' -> hook is called as the last one within the chain. |
| 67 | 65 | */ |
| 68 | - function register($definition, $hook, $mode = 'normal') |
|
| 69 | - { |
|
| 66 | + function register($definition, $hook, $mode = 'normal') { |
|
| 70 | 67 | $class = (!is_array($definition)) ? '__global' : $definition[0]; |
| 71 | 68 | $function = (!is_array($definition)) ? $definition : $definition[1]; |
| 72 | 69 | |
@@ -79,8 +76,7 @@ discard block |
||
| 79 | 76 | if (!isset($this->hooks[$class][$function]['standalone'])) |
| 80 | 77 | { |
| 81 | 78 | $this->hooks[$class][$function] = array('standalone' => $hook); |
| 82 | - } |
|
| 83 | - else |
|
| 79 | + } else |
|
| 84 | 80 | { |
| 85 | 81 | trigger_error('Hook not able to be called standalone, previous hook already standalone.', E_NOTICE); |
| 86 | 82 | } |
@@ -106,8 +102,7 @@ discard block |
||
| 106 | 102 | * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) |
| 107 | 103 | * @return bool False if no hook got executed, true otherwise |
| 108 | 104 | */ |
| 109 | - function call_hook($definition) |
|
| 110 | - { |
|
| 105 | + function call_hook($definition) { |
|
| 111 | 106 | $class = (!is_array($definition)) ? '__global' : $definition[0]; |
| 112 | 107 | $function = (!is_array($definition)) ? $definition : $definition[1]; |
| 113 | 108 | |
@@ -128,8 +123,7 @@ discard block |
||
| 128 | 123 | if (isset($this->hooks[$class][$function]['standalone'])) |
| 129 | 124 | { |
| 130 | 125 | $this->hook_result[$class][$function] = call_user_func_array($this->hooks[$class][$function]['standalone'], $arguments); |
| 131 | - } |
|
| 132 | - else |
|
| 126 | + } else |
|
| 133 | 127 | { |
| 134 | 128 | foreach (array('first', 'normal', 'last') as $mode) |
| 135 | 129 | { |
@@ -159,8 +153,7 @@ discard block |
||
| 159 | 153 | * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) |
| 160 | 154 | * @return mixed False if nothing returned if there is no result, else array('result' => ... ) |
| 161 | 155 | */ |
| 162 | - function previous_hook_result($definition) |
|
| 163 | - { |
|
| 156 | + function previous_hook_result($definition) { |
|
| 164 | 157 | $class = (!is_array($definition)) ? '__global' : $definition[0]; |
| 165 | 158 | $function = (!is_array($definition)) ? $definition : $definition[1]; |
| 166 | 159 | |
@@ -178,8 +171,7 @@ discard block |
||
| 178 | 171 | * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) |
| 179 | 172 | * @return bool True if results are there, false if not |
| 180 | 173 | */ |
| 181 | - function hook_return($definition) |
|
| 182 | - { |
|
| 174 | + function hook_return($definition) { |
|
| 183 | 175 | $class = (!is_array($definition)) ? '__global' : $definition[0]; |
| 184 | 176 | $function = (!is_array($definition)) ? $definition : $definition[1]; |
| 185 | 177 | |
@@ -197,8 +189,7 @@ discard block |
||
| 197 | 189 | * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) |
| 198 | 190 | * @return mixed The result |
| 199 | 191 | */ |
| 200 | - function hook_return_result($definition) |
|
| 201 | - { |
|
| 192 | + function hook_return_result($definition) { |
|
| 202 | 193 | $class = (!is_array($definition)) ? '__global' : $definition[0]; |
| 203 | 194 | $function = (!is_array($definition)) ? $definition : $definition[1]; |
| 204 | 195 | |
@@ -217,8 +208,7 @@ discard block |
||
| 217 | 208 | * |
| 218 | 209 | * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) |
| 219 | 210 | */ |
| 220 | - function add_hook($definition) |
|
| 221 | - { |
|
| 211 | + function add_hook($definition) { |
|
| 222 | 212 | if (!is_array($definition)) |
| 223 | 213 | { |
| 224 | 214 | $definition = array('__global', $definition); |
@@ -232,8 +222,7 @@ discard block |
||
| 232 | 222 | * |
| 233 | 223 | * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) |
| 234 | 224 | */ |
| 235 | - function remove_hook($definition) |
|
| 236 | - { |
|
| 225 | + function remove_hook($definition) { |
|
| 237 | 226 | $class = (!is_array($definition)) ? '__global' : $definition[0]; |
| 238 | 227 | $function = (!is_array($definition)) ? $definition : $definition[1]; |
| 239 | 228 | |