From f8025b79d834934407083f31cb387d06bd2fe1c2 Mon Sep 17 00:00:00 2001 From: Joe Weiss Date: Tue, 21 Jun 2022 17:02:27 -0400 Subject: [PATCH] Add ability to edit apprise_notify_new_species_each_day via web --- scripts/config.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/config.php b/scripts/config.php index cbf3d25..95f42bd 100644 --- a/scripts/config.php +++ b/scripts/config.php @@ -41,6 +41,11 @@ if(isset($_GET["latitude"])){ } else { $apprise_notify_new_species = 0; } + if(isset($_GET['apprise_notify_new_species_each_day'])) { + $apprise_notify_new_species_each_day = 1; + } else { + $apprise_notify_new_species_each_day = 0; + } if(isset($timezone)) { shell_exec("sudo timedatectl set-timezone ".$timezone); @@ -95,6 +100,7 @@ if(isset($_GET["latitude"])){ $contents = preg_replace("/APPRISE_NOTIFICATION_BODY=.*/", "APPRISE_NOTIFICATION_BODY=\"$apprise_notification_body\"", $contents); $contents = preg_replace("/APPRISE_NOTIFY_EACH_DETECTION=.*/", "APPRISE_NOTIFY_EACH_DETECTION=$apprise_notify_each_detection", $contents); $contents = preg_replace("/APPRISE_NOTIFY_NEW_SPECIES=.*/", "APPRISE_NOTIFY_NEW_SPECIES=$apprise_notify_new_species", $contents); + $contents = preg_replace("/APPRISE_NOTIFY_NEW_SPECIES_EACH_DAY=.*/", "APPRISE_NOTIFY_NEW_SPECIES_EACH_DAY=$apprise_notify_new_species_each_day", $contents); $contents = preg_replace("/FLICKR_API_KEY=.*/", "FLICKR_API_KEY=$flickr_api_key", $contents); $contents = preg_replace("/DATABASE_LANG=.*/", "DATABASE_LANG=$language", $contents); $contents = preg_replace("/FLICKR_FILTER_EMAIL=.*/", "FLICKR_FILTER_EMAIL=$flickr_filter_email", $contents); @@ -107,6 +113,7 @@ if(isset($_GET["latitude"])){ $contents2 = preg_replace("/APPRISE_NOTIFICATION_BODY=.*/", "APPRISE_NOTIFICATION_BODY=\"$apprise_notification_body\"", $contents2); $contents2 = preg_replace("/APPRISE_NOTIFY_EACH_DETECTION=.*/", "APPRISE_NOTIFY_EACH_DETECTION=$apprise_notify_each_detection", $contents2); $contents2 = preg_replace("/APPRISE_NOTIFY_NEW_SPECIES=.*/", "APPRISE_NOTIFY_NEW_SPECIES=$apprise_notify_new_species", $contents2); + $contents2 = preg_replace("/APPRISE_NOTIFY_NEW_SPECIES_EACH_DAY=.*/", "APPRISE_NOTIFY_NEW_SPECIES_EACH_DAY=$apprise_notify_new_species_each_day", $contents2); $contents2 = preg_replace("/FLICKR_API_KEY=.*/", "FLICKR_API_KEY=$flickr_api_key", $contents2); $contents2 = preg_replace("/DATABASE_LANG=.*/", "DATABASE_LANG=$language", $contents2); $contents2 = preg_replace("/FLICKR_FILTER_EMAIL=.*/", "FLICKR_FILTER_EMAIL=$flickr_filter_email", $contents2); @@ -210,6 +217,8 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}
>
+ > +
>