the value of [PROFILENAME] is coming up empty in the post processing emails. I took the liberty of looking at the code and I found:
/**
* Returns the selected profile's name. If no ID is specified, the current
* profile's name is returned.
*
* @return string
*/
public function get_profile_name($id = null)
{
if (empty($id))
{
$id = $this->get_active_profile();
}
$id = (int) $id;
$db = Factory::getDatabase($this->get_platform_database_options());
$sql = $db->getQuery(true)
->select($db->qn('description'))
->from($db->qn('#__akeebabackup_backups'))
->where($db->qn('id') . ' = ' . $db->q($id));
$db->setQuery($sql);
return $db->loadResult();
}
;
which seems wrong to me. The descriptions in the #__akeebabackup_backups table look like this one:
Backup taken on Saturday, 08 June 2024 08:03 EDT
which is not the "profile name". The profile name is in the "description" field of the #__akeebabackup_profiles table.
I think simply changing the table reference from #__akeebabackup_backups to #__akeebabackup_profiles ought to fix this issue.
I have attached screenshots of completion emails for my profiles #2 and #3. It happens that there is an entry in the backups table with id=2 but not for id=3, therefor there isn't any 'description' field available for id=3 and so nothing is returned by the get_profile_name function. However, for id=2 the 'description' field in the backups table is found and inserted in the body of the message in place of the [PROFILENAME] placeholder - "Backup taken on Saturday, 08 June 2024 08:03 EDT Total Size 855.51 MiB". Of course, that is not at all what should have replaced that placeholder.
It would be nice if the PROFILE NAME was also available in the email subject. Apparently, there is no processing of '[PROFILENAME]' as a placeholder in the subject line so we just get to see the placeholder there.