We still have a hard-coded Database name in two (2) files. These must be changed from $DatabaseName='weberp' to $DatabaseName = $_SESSION['DatabaseName']
PDFSalesBySalesperson.php:
Line 4: $DatabaseName='weberp';
PDFWeeklyOrdersn.php:
Line 4: $DatabaseName='weberp';
And to be consistent why not append "Recipients" to the end of the GetMailList argument in these two files to match the other four?
$Recipients = GetMailList('salesbysalesperson'); > $Recipients = GetMailList('SalesBySalespersonRecipients');
$Recipients = GetMailList('WeeklyOrders'); > $Recipients = GetMailList('WeeklyOrdersRecipients');
Paul, there are some interesting things that I discovered based on your findings here! (Have you tried these files, out of curiosity?)
- The variable $DatabaseName seems to have no use in either script, nor with any sub-included files. So, these two entries can very likely be removed.
- There is nothing about the 'Mailing Group Maintenance' script that adds a 'Recipients' suffix to any new entries -- as the groups are entered as-is, or user-defined. The "other four" that you mentioned are created by:
- the weberp demo database SQL [file: sql/mysql/country_sql/demo.sql]
- the non-demo weberp 4.10-4.11 update SQL [file: sql/mysql/upgrade4.10-4.11.sql]
As a side note, I do NOT see anywhere that the 'salesbysalesperson' or the 'WeeklyOrders' is created as real mail groups??
- Also, while investigating item #2, both files sub-include: 'includes/PDFWeeklyOrdersPageHeader.inc' -- however, the PDFWeeklyOrdersPageHeader.inc file does NOT exist in the includes/ directory or in the root directory. I also checked the online web-erp trunk and it is not there either. There IS, however, a file in the includes/ directory named PDFWOPageHeader.inc, but this file apparently for 'Work Orders' and not 'Weekly Orders', so there might be a missing file?
...so, I'm guessing that these files apparently have no use? I'm not aware of any complaints with those two files.
Phil/Tim: ... any thoughts on these findings?
Re 1 yes $DatabaseName is redundant now - they can go!!
I think Exson did the mailing groups work - so perhaps best placed to advise on 2.
Paul B's solution looks like a good idea to me.
Phil, any idea about item 3?
There appears to be a missing file?
Looks like it was Andrew Galuski commit - and he's not committed the include.
Paul, I wasn't happy with these two reports at the time so didn't include them in my code. I seem to remember I had some correspondence with Andrew about them but right now I can't seem to find it.
Tim