|
@@ 91-99 (lines=9) @@
|
| 88 |
|
"`parent_planet` = {$parent_id} AND `planet_type` = " . PT_MOON, true); |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
public static function db_planet_by_id_and_owner($planet_id, $owner_id, $for_update = false, $fields = '*') { |
| 92 |
|
//if(!($planet_id = intval($planet_id)) || !($owner_id = intval($owner_id))) return false; |
| 93 |
|
if (!($planet_id = idval($planet_id)) || !($owner_id = idval($owner_id))) { |
| 94 |
|
return false; |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
return classSupernova::$gc->cacheOperator->db_get_record_list(LOC_PLANET, |
| 98 |
|
"`id` = {$planet_id} AND `id_owner` = {$owner_id}", true); |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
|
| 102 |
|
public static function db_planet_list_moon_other($user_id, $this_moon_id) { |
|
@@ 102-110 (lines=9) @@
|
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
|
| 102 |
|
public static function db_planet_list_moon_other($user_id, $this_moon_id) { |
| 103 |
|
// if(!($user_id = intval($user_id)) || !($this_moon_id = intval($this_moon_id))) return false; |
| 104 |
|
if (!($user_id = idval($user_id)) || !($this_moon_id = idval($this_moon_id))) { |
| 105 |
|
return false; |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
return classSupernova::$gc->cacheOperator->db_get_record_list(LOC_PLANET, |
| 109 |
|
"`planet_type` = " . PT_MOON . " AND `id_owner` = {$user_id} AND `id` != {$this_moon_id}"); |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
public static function db_planet_list_in_system($galaxy, $system) { |
| 113 |
|
$galaxy = intval($galaxy); |