Skip to content

Commit

Permalink
Replace some session_start() calls with locale.php includes
Browse files Browse the repository at this point in the history
  • Loading branch information
reedy committed Jan 3, 2024
1 parent a58bf71 commit eca3bed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions php/flights.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

session_start();
include_once 'locale.php';

$uid = $_SESSION["uid"];
$export = $_GET["export"] ?? false;
if ($export) {
if (!$uid || empty($uid)) {
exit("You must be logged in to export.");
exit(_("You must be logged in to export."));
}

header("Content-type: text/csv; charset=utf-8");
Expand Down
1 change: 1 addition & 0 deletions php/helper.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

include_once 'locale.php';
include_once 'greatcircle.php';

/**
Expand Down
2 changes: 0 additions & 2 deletions php/kml.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

// https://developers.google.com/kml/documentation/kmlreference

session_start();

header("Content-type: application/vnd.google-earth.kml+xml");
header("Content-disposition: attachment; filename=\"openflights-" . date("Y-m-d-Hi") . ".kml\"");

Expand Down

0 comments on commit eca3bed

Please sign in to comment.