diff --git a/README.md b/README.md index f72ab57..0aa45a0 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,6 @@ its now possible to specify a service body parent, this is usefull for service b * static $parent_service_body_id = ''; -When using this feature if you also want to include the parent service body in the list you must add this to your config as well. - -* static $include_parent_service_body_id = true; These will be added as links to main menu if they exist in the config. @@ -50,6 +47,8 @@ Sends an email with all BMLT changes in x amount of days # install download the repository and edit the config.php then put on a server and create cron job. the config $homanydays should be set to the same amount of time you set your cron job for. +static $notify_service_body_id = ''; must be set in the config and should probably be the service body parent. + # example example cron job calls, this would set to call the script at 6pm on sunday diff --git a/bmltnotify.php b/bmltnotify.php index 1cf4493..46c1f06 100644 --- a/bmltnotify.php +++ b/bmltnotify.php @@ -10,7 +10,7 @@ // show beginning header $message = "

" .$service_body_name. " CHANGES

Changes for last $howmanydays day(s) from " .date("l jS \of F Y h:i A") . "

"; -$url = $bmlt_server. "/client_interface/xml/?switcher=GetChanges&start_date=" .$dateminus. "&end_date=" .$today. "&service_body_id=" .$service_body_id; +$url = $bmlt_server. "/client_interface/xml/?switcher=GetChanges&start_date=" .$dateminus. "&end_date=" .$today. "&service_body_id=" .$notify_service_body_id; // get xml file contents $xml = simplexml_load_file($url); diff --git a/config.php b/config.php index 9da38c2..3963b6b 100644 --- a/config.php +++ b/config.php @@ -4,13 +4,13 @@ static $service_body_name = ''; static $service_body_shortname = ''; static $service_body_website = ''; -static $service_body_id = '1'; // the BMLT parent service body id number +static $parent_service_body_id = '1'; // the BMLT parent service body id number static $howmanydays = '30'; // this should be set to the same number of days your cron job is set to +// Notifier Config Options +static $notify_service_body_id = ''; // this sets the service body id for the notifier and most likely should be set to parent service body -//static $from_name = 'Service Body Admin'; -//static $from_email = 'service@someemail.org'; static $smtp_to_name = ''; static $smtp_to_address = '';