Support » Plugin: Email Before Download » [file_name] is automatically lower-cased

  • Hi,

    Starting with v5, the [file_name] macro is automatically lower-cased regardless of the original document title. This is due to the use of strtolower() in the parse_post_array() method (in file includes/class-email-before-download-process.php).

    Below is a patch for v5.1.9 to address the issue.

    Michael

    
    31c31
    <         $downloads = $this->parse_post_array($post_data['ebd_downloads']);
    ---
    >         $downloads = $this->parse_post_array($post_data['ebd_downloads'], false);
    61c61
    <     private function parse_post_array($post_array)
    ---
    >     private function parse_post_array($post_array, $toLower = true)
    70c70,74
    <             $new_array[$tmp[0]] = strtolower($tmp[1]);
    ---
    > 			$val = $tmp[1];
    > 			if ($toLower) {
    > 				$val = strtolower($val);
    > 			}
    >             $new_array[$tmp[0]] = $val;
    
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.