Ignore:
Timestamp:
Apr 6, 2020, 11:56:19 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Do not use parenthesis around returned value.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Form/Types/GPS.php

    r873 r874  
    1717      $Output = '<a href="http://www.mapy.cz/?st=search&fr=loc:'.$DbRow['Latitude'].' '.$DbRow['Longitude'].'">'.$Latitude[0].'°'.$Latitude[1]."'".$Latitude[2].'" '.$Longitude[0].'°'.$Longitude[1]."'".$Longitude[2].'"</a>';
    1818    }
    19     return ($Output);
     19    return $Output;
    2020  }
    2121
     
    4040    $Output .= '<input type="text" size="3" name="'.$Item['Name'].'-lon-min" value="'.$Value[1].'"/>\'';
    4141    $Output .= '<input type="text" size="3" name="'.$Item['Name'].'-lon-sec" value="'.$Value[2].'"/>"';
    42     return ($Output);
     42    return $Output;
    4343  }
    4444
     
    5050    $Longitude = $this->Implode($_POST[$Item['Name'].'-lon-deg'], $_POST[$Item['Name'].'-lon-min'], $_POST[$Item['Name'].'-lon-sec']);
    5151    $Database->query('INSERT INTO SystemGPS (`Latitude`, `Longitude`) VALUES ("'.$Latitude.'", "'.$Longitude.'")');
    52     return ($Database->insert_id);
     52    return $Database->insert_id;
    5353  }
    5454
     
    6161    $Float = ($Float - intval($Float)) * 60;
    6262    $Seconds = round($Float, 3);
    63     return (array($Degrees, $Minutes, $Seconds));
     63    return array($Degrees, $Minutes, $Seconds);
    6464  }
    6565
    6666  function Implode($Degrees, $Minutes, $Seconds)
    6767  {
    68     if ($Degrees < 0) return (-(abs($Degrees) + ($Minutes + $Seconds / 60) / 60));
    69     else return ($Degrees + ($Minutes + $Seconds / 60) / 60);
     68    if ($Degrees < 0) return -(abs($Degrees) + ($Minutes + $Seconds / 60) / 60);
     69    else return $Degrees + ($Minutes + $Seconds / 60) / 60;
    7070  }
    7171}
Note: See TracChangeset for help on using the changeset viewer.