@@ -65,8 +65,7 @@ |
||
| 65 | 65 | //@todo Move to template? |
| 66 | 66 | $attributes['attr']['accesskey'] = 's'; |
| 67 | 67 | $attributes['attr']['class'] .= ' save_' . $key; |
| 68 | - } |
|
| 69 | - else if ($operation == controller::CANCEL) |
|
| 68 | + } else if ($operation == controller::CANCEL) |
|
| 70 | 69 | { |
| 71 | 70 | //@todo Move to template? |
| 72 | 71 | $attributes['attr']['accesskey'] = 'd'; |
@@ -45,8 +45,7 @@ discard block |
||
| 45 | 45 | if ($this->config['type_config']['storage_type'] === datetype::UNIXTIME) |
| 46 | 46 | { |
| 47 | 47 | $date->setTimestamp($input); |
| 48 | - } |
|
| 49 | - else if ($this->config['type_config']['storage_type'] === datetype::ISO) |
|
| 48 | + } else if ($this->config['type_config']['storage_type'] === datetype::ISO) |
|
| 50 | 49 | { |
| 51 | 50 | $date->modify($input); |
| 52 | 51 | } |
@@ -79,8 +78,7 @@ discard block |
||
| 79 | 78 | if ($this->config['type_config']['storage_type'] === datetype::UNIXTIME) |
| 80 | 79 | { |
| 81 | 80 | return $array['date']->format('U'); |
| 82 | - } |
|
| 83 | - else if ($this->config['type_config']['storage_type'] === datetype::ISO) |
|
| 81 | + } else if ($this->config['type_config']['storage_type'] === datetype::ISO) |
|
| 84 | 82 | { |
| 85 | 83 | return $array['date']->format('Y-m-d H:i:s'); |
| 86 | 84 | } |
@@ -25,13 +25,11 @@ |
||
| 25 | 25 | { |
| 26 | 26 | //This is converting from storage |
| 27 | 27 | $result[$key] = $this->transform_persistent($value); |
| 28 | - } |
|
| 29 | - else if (!empty($value['object'])) |
|
| 28 | + } else if (!empty($value['object'])) |
|
| 30 | 29 | { |
| 31 | 30 | //This is during validation errors |
| 32 | 31 | $result[$key] = $this->transform_persistent($value['object']); |
| 33 | - } |
|
| 34 | - else if ($value !== null) |
|
| 32 | + } else if ($value !== null) |
|
| 35 | 33 | { |
| 36 | 34 | $result[$key] = $this->transform_nonpersistent(array('file' => $value, 'identifier' => 'archival')); |
| 37 | 35 | } |
@@ -40,8 +40,7 @@ discard block |
||
| 40 | 40 | try |
| 41 | 41 | { |
| 42 | 42 | $results[$identifier] = new midcom_db_attachment($guid); |
| 43 | - } |
|
| 44 | - catch (midcom_error $e) |
|
| 43 | + } catch (midcom_error $e) |
|
| 45 | 44 | { |
| 46 | 45 | $e->log(); |
| 47 | 46 | } |
@@ -77,8 +76,7 @@ discard block |
||
| 77 | 76 | { |
| 78 | 77 | $identifier = md5(time() . $data['file']['name'] . $data['file']['tmp_name']); |
| 79 | 78 | } |
| 80 | - } |
|
| 81 | - else |
|
| 79 | + } else |
|
| 82 | 80 | { |
| 83 | 81 | if ($attachment->name != $filename) |
| 84 | 82 | { |
@@ -92,8 +90,7 @@ discard block |
||
| 92 | 90 | { |
| 93 | 91 | throw new midcom_error('Failed to copy attachment: ' . midcom_connection::get_error_string()); |
| 94 | 92 | } |
| 95 | - } |
|
| 96 | - else if ($attachment === null) |
|
| 93 | + } else if ($attachment === null) |
|
| 97 | 94 | { |
| 98 | 95 | continue; |
| 99 | 96 | } |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | return $this->save_attachment_list(); |
| 57 | - } |
|
| 58 | - elseif (!empty($this->value['delete'])) |
|
| 57 | + } elseif (!empty($this->value['delete'])) |
|
| 59 | 58 | { |
| 60 | 59 | $this->map = array(); |
| 61 | 60 | return $this->save_attachment_list(); |
@@ -20,14 +20,12 @@ |
||
| 20 | 20 | { |
| 21 | 21 | printf('You\'re in %s, %s', $user_location['latitude'], $user_location['longitude']); |
| 22 | 22 | // Will print "You're in 60.2345, 25.00456" |
| 23 | -} |
|
| 24 | -else |
|
| 23 | +} else |
|
| 25 | 24 | { |
| 26 | 25 | if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1') |
| 27 | 26 | { |
| 28 | 27 | echo "You're here"; |
| 29 | - } |
|
| 30 | - else |
|
| 28 | + } else |
|
| 31 | 29 | { |
| 32 | 30 | echo "No location found"; |
| 33 | 31 | } |
@@ -18,16 +18,13 @@ |
||
| 18 | 18 | { |
| 19 | 19 | // Exact enough |
| 20 | 20 | $location_array['accuracy'] = org_routamc_positioning_log_dba::ACCURACY_GPS; |
| 21 | - } |
|
| 22 | - elseif ($_POST['accuracy'] < 400) |
|
| 21 | + } elseif ($_POST['accuracy'] < 400) |
|
| 23 | 22 | { |
| 24 | 23 | $location_array['accuracy'] = org_routamc_positioning_log_dba::ACCURACY_STREET; |
| 25 | - } |
|
| 26 | - elseif ($_POST['accuracy'] < 5000) |
|
| 24 | + } elseif ($_POST['accuracy'] < 5000) |
|
| 27 | 25 | { |
| 28 | 26 | $location_array['accuracy'] = org_routamc_positioning_log_dba::ACCURACY_CITY; |
| 29 | - } |
|
| 30 | - else |
|
| 27 | + } else |
|
| 31 | 28 | { |
| 32 | 29 | // Fall back to "state level" |
| 33 | 30 | $location_array['accuracy'] = 50; |
@@ -100,8 +100,7 @@ discard block |
||
| 100 | 100 | echo "<span style=\"color: #00cc00;\">Success,</span> "; |
| 101 | 101 | $imported_cities["{$new_city->country}:{$data[3]}:{$new_city->city}"] = true; |
| 102 | 102 | $cities_created++; |
| 103 | - } |
|
| 104 | - else |
|
| 103 | + } else |
|
| 105 | 104 | { |
| 106 | 105 | echo "<span style=\"color: #cc0000;\">FAILED</span>, "; |
| 107 | 106 | } |
@@ -110,8 +109,7 @@ discard block |
||
| 110 | 109 | } |
| 111 | 110 | |
| 112 | 111 | echo "<p>{$cities_created} cities imported.</p>\n"; |
| 113 | -} |
|
| 114 | -else |
|
| 112 | +} else |
|
| 115 | 113 | { |
| 116 | 114 | ?> |
| 117 | 115 | <h1>World Cities Database installation</h1> |
@@ -303,8 +303,7 @@ discard block |
||
| 303 | 303 | { |
| 304 | 304 | $city = new org_routamc_positioning_city_dba($city_id); |
| 305 | 305 | $city_name = $city->city; |
| 306 | - } |
|
| 307 | - catch (midcom_error $e){} |
|
| 306 | + } catch (midcom_error $e){} |
|
| 308 | 307 | } |
| 309 | 308 | return $city_name; |
| 310 | 309 | } |
@@ -495,8 +494,7 @@ discard block |
||
| 495 | 494 | { |
| 496 | 495 | $city = new org_routamc_positioning_city_dba($this->_type->location->city); |
| 497 | 496 | $city_name = $city->city; |
| 498 | - } |
|
| 499 | - catch (midcom_error $e) |
|
| 497 | + } catch (midcom_error $e) |
|
| 500 | 498 | { |
| 501 | 499 | $city_name = ''; |
| 502 | 500 | } |
@@ -546,8 +544,7 @@ discard block |
||
| 546 | 544 | && $city->id) |
| 547 | 545 | { |
| 548 | 546 | $city_id = $city->id; |
| 549 | - } |
|
| 550 | - else if (! empty($results)) |
|
| 547 | + } else if (! empty($results)) |
|
| 551 | 548 | { |
| 552 | 549 | $city = new org_routamc_positioning_city_dba(); |
| 553 | 550 | $city->city = $city_name; |