functions_mail.inc (mrbs-1.9.4) | : | functions_mail.inc (mrbs-1.10.0) | ||
---|---|---|---|---|
skipping to change at line 62 | skipping to change at line 62 | |||
{ | { | |||
$mail_locale = FALSE; | $mail_locale = FALSE; | |||
} | } | |||
} | } | |||
return $mail_locale; | return $mail_locale; | |||
} | } | |||
// Get localized (for email) field name for a user defined table column | // Get localized (for email) field name for a user defined table column | |||
// Looks for a tag of the format tablename.columnname (where tablename is | // Looks for a tag of the format tablename.columnname (where tablename is | |||
// stripped of the table prefix) and if can't find a string for that tag will | // stripped of the table prefix) and if it can't find a string for that tag will | |||
// return the column name | // return the column name | |||
function get_mail_field_name($table, $name) | // TODO: It's actually returning tablename.columnname at the moment if it | |||
// TODO: can't find a tag, rather than just the columnname. Probably need | ||||
// TODO: to restructure the way get_vocab() etc work. | ||||
function get_mail_field_name(string $table, string $name) : string | ||||
{ | { | |||
global $db_tbl_prefix; | return get_mail_vocab(get_table_short_name($table) . ".$name"); | |||
$tag = utf8_substr($table, utf8_strlen($db_tbl_prefix)); // strip the prefix | ||||
off the table name | ||||
$tag .= "." . $name; // add on the fieldname | ||||
// then if there's a string in the vocab array for $tag use that | ||||
// otherwise just use the fieldname | ||||
return get_mail_vocab($tag); | ||||
} | } | |||
// }}} | // }}} | |||
// {{{ getMailPeriodDateString() | // {{{ getMailPeriodDateString() | |||
/** | /** | |||
* Format a timestamp in non-unicode output (for emails). | * Format a timestamp in non-unicode output (for emails). | |||
* | * | |||
* @param timestamp $t | * @param timestamp $t | |||
* @param int $mod_time | * @param int $mod_time | |||
End of changes. 3 change blocks. | ||||
10 lines changed or deleted | 6 lines changed or added |