@@ -170,7 +170,7 @@ |
||
| 170 | 170 | |
| 171 | 171 | function upd_db_unit_by_location($user_id = 0, $location_type, $location_id, $unit_snid = 0, $for_update = false, $fields = '*') { |
| 172 | 172 | return db_fetch(upd_do_query( |
| 173 | - "SELECT {$fields} |
|
| 173 | + "select {$fields} |
|
| 174 | 174 | FROM {{unit}} |
| 175 | 175 | WHERE |
| 176 | 176 | `unit_location_type` = {$location_type} AND `unit_location_id` = {$location_id} AND " . DBStaticUnit::db_unit_time_restrictions() . |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $source_planet = &$mission_data['src_planet']; |
| 15 | 15 | $destination_planet = &$mission_data['dst_planet']; |
| 16 | 16 | |
| 17 | - if(!isset($destination_planet['id']) || !$destination_planet['id_owner']) |
|
| 17 | + if (!isset($destination_planet['id']) || !$destination_planet['id_owner']) |
|
| 18 | 18 | { |
| 19 | 19 | // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = {$fleet_row['fleet_id']} LIMIT 1;"); |
| 20 | 20 | fleet_send_back($fleet_row); |
@@ -27,10 +27,10 @@ discard block |
||
| 27 | 27 | $destination_planet['name'], uni_render_coordinates_href($fleet_row, 'fleet_end_', 3, ''), |
| 28 | 28 | $fleet_row['fleet_resource_metal'], $lang['Metal'], |
| 29 | 29 | $fleet_row['fleet_resource_crystal'], $lang['Crystal'], |
| 30 | - $fleet_row['fleet_resource_deuterium'], $lang['Deuterium'] ); |
|
| 30 | + $fleet_row['fleet_resource_deuterium'], $lang['Deuterium']); |
|
| 31 | 31 | msg_send_simple_message($fleet_row['fleet_target_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message); |
| 32 | 32 | |
| 33 | - if($fleet_row['fleet_target_owner'] <> $fleet_row['fleet_owner']) |
|
| 33 | + if ($fleet_row['fleet_target_owner'] <> $fleet_row['fleet_owner']) |
|
| 34 | 34 | { |
| 35 | 35 | msg_send_simple_message($fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message); |
| 36 | 36 | } |
@@ -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']; |
@@ -5,14 +5,14 @@ |
||
| 5 | 5 | */ |
| 6 | 6 | global $template; |
| 7 | 7 | |
| 8 | -if(isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) { |
|
| 8 | +if (isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) { |
|
| 9 | 9 | require_once('common.' . substr(strrchr(__FILE__, '.'), 1)); |
| 10 | - if($sn_page_name) { |
|
| 10 | + if ($sn_page_name) { |
|
| 11 | 11 | // Loading page-specific language files |
| 12 | 12 | |
| 13 | 13 | !empty($sn_mvc['model'][$sn_page_name]) and execute_hooks($sn_mvc['model'][$sn_page_name], $template, 'model', $sn_page_name); |
| 14 | 14 | !empty($sn_mvc['view'][$sn_page_name]) and execute_hooks($sn_mvc['view'][$sn_page_name], $template, 'view', $sn_page_name); |
| 15 | - if(!empty($template_result) && is_object($template)) { |
|
| 15 | + if (!empty($template_result) && is_object($template)) { |
|
| 16 | 16 | $template->assign_recursive($template_result); |
| 17 | 17 | } |
| 18 | 18 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | define('IN_AJAX', true); |
| 23 | 23 | |
| 24 | - if(!is_object($template)) { |
|
| 24 | + if (!is_object($template)) { |
|
| 25 | 25 | $template = gettemplate('_ajax', true); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -37,16 +37,16 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $mode = sys_get_param_str('mode'); |
| 39 | 39 | |
| 40 | - if(class_exists($className = 'Pages\\Page' . ucfirst($mode))) { |
|
| 40 | + if (class_exists($className = 'Pages\\Page' . ucfirst($mode))) { |
|
| 41 | 41 | /** |
| 42 | 42 | * @var \Pages\IPage $page |
| 43 | 43 | */ |
| 44 | 44 | $page = new $className(); |
| 45 | - if(method_exists($page, 'loadParams')) { |
|
| 45 | + if (method_exists($page, 'loadParams')) { |
|
| 46 | 46 | $page->loadParams(); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - if(method_exists($page, $action = sys_get_param('action')) && $page->checkAction($action)) { |
|
| 49 | + if (method_exists($page, $action = sys_get_param('action')) && $page->checkAction($action)) { |
|
| 50 | 50 | $result = $page->$action(); |
| 51 | 51 | is_array($result) ? HelperArray::merge($template_result['AJAX'], $result) : false; |
| 52 | 52 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | QUEST_STATUS_COMPLETE => '', |
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | - if(!isset($statuses[$this->filterQuestStatus])) { |
|
| 34 | + if (!isset($statuses[$this->filterQuestStatus])) { |
|
| 35 | 35 | $this->filterQuestStatus = QUEST_STATUS_ALL; |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - if(!isset($next)) { |
|
| 104 | + if (!isset($next)) { |
|
| 105 | 105 | $next = new TextEntity(); |
| 106 | 106 | } |
| 107 | 107 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $prev = $this->getById($currentText->prev); |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | - if(!isset($prev)) { |
|
| 122 | + if (!isset($prev)) { |
|
| 123 | 123 | $prev = new TextEntity(); |
| 124 | 124 | } |
| 125 | 125 | |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | * @return string |
| 339 | 339 | */ |
| 340 | 340 | protected function stringValue($value) { |
| 341 | - return "'" . $this->escape((string)$value) . "'"; |
|
| 341 | + return "'" . $this->escape((string) $value) . "'"; |
|
| 342 | 342 | } |
| 343 | 343 | |
| 344 | 344 | /** |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | * @return string |
| 350 | 350 | */ |
| 351 | 351 | public function quote($fieldName) { |
| 352 | - return "`" . $this->escape((string)$fieldName) . "`"; |
|
| 352 | + return "`" . $this->escape((string) $fieldName) . "`"; |
|
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | /** |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | * @return string |
| 397 | 397 | */ |
| 398 | 398 | protected function quoteTable($tableName) { |
| 399 | - return "`{{" . $this->escape((string)$tableName) . "}}`"; |
|
| 399 | + return "`{{" . $this->escape((string) $tableName) . "}}`"; |
|
| 400 | 400 | } |
| 401 | 401 | |
| 402 | 402 | /** |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function toArray() { |
| 45 | 45 | $tutorial = array(); |
| 46 | - foreach($this->keys() as $key) { |
|
| 46 | + foreach ($this->keys() as $key) { |
|
| 47 | 47 | $tutorial[$key] = $this->$key; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -7,9 +7,9 @@ |
||
| 7 | 7 | * |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -define('INSIDE' , true); |
|
| 11 | -define('INSTALL' , false); |
|
| 12 | -define('IN_ADMIN' , true); |
|
| 10 | +define('INSIDE', true); |
|
| 11 | +define('INSTALL', false); |
|
| 12 | +define('IN_ADMIN', true); |
|
| 13 | 13 | |
| 14 | 14 | require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
| 15 | 15 | |