Commit 1597b086 authored by Thomas Bella's avatar Thomas Bella

Allow to disable export

parent 90e86ddf
......@@ -9,3 +9,6 @@ if (!defined("BASEURL")) {
if (!defined("EMAIL")) {
define("EMAIL", false);
}
if (!defined("EXPORT")) {
define("EXPORT", true);
}
......@@ -30,3 +30,6 @@ define("EMAIL_PASSWORD", "secret");
define("EMAIL_FROM", EMAIL_USERNAME);
// default recipient. can be one or multible addresses like me@example.com;you@example.com separated with ";"
define("EMAIL_TARGET", "");
// Enable or disable export of database (default: true)
define("EXPORT", true);
......@@ -72,7 +72,7 @@ if (isset($_SESSION["active"]) && isset($_GET["ajax"])) {
define("AJAXCALL", true);
require_once "page/ajax.php";
exit;
} else if (isset($_SESSION['active']) && isset($_GET['export'])) {
} else if (EXPORT && isset($_SESSION['active']) && isset($_GET['export'])) {
if ($_GET['export'] == 'csv') {
header('Content-Type: text/csv; Charset=UTF-8');
header('Content-Disposition: attachment; filename="certificate-monitor-' . date('Ymd') . '.csv"');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment