Changeset 1589093
- Timestamp:
- 02/04/2017 10:45:18 PM (9 years ago)
- Location:
- gf-uploads-as-attachments
- Files:
-
- 5 added
- 2 edited
-
tags/1.2.0 (added)
-
tags/1.2.0/LICENSE (added)
-
tags/1.2.0/gforms-uploads-as-attachments.php (added)
-
tags/1.2.0/languages (added)
-
tags/1.2.0/readme.txt (added)
-
trunk/gforms-uploads-as-attachments.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gf-uploads-as-attachments/trunk/gforms-uploads-as-attachments.php
r1381778 r1589093 4 4 Plugin URI: https://github.com/Jebble/Gravity-Forms-Uploads-as-Attachments 5 5 Description: Adds an option to send files from the fileupload field(s) as attachment with notifications 6 Version: 1. 1.16 Version: 1.2.0 7 7 Author: Jebble 8 8 Author URI: http://jebble.nl/ … … 113 113 foreach ( $fileuploadfields as $field ) { 114 114 $url = $entry[ $field['id'] ]; 115 }116 115 117 if ( ! empty( $url ) ) { 118 if ( $field['multipleFiles'] ) { 119 $uploaded_files = json_decode( stripslashes( $url ), true ); 120 foreach ( $uploaded_files as $uploaded_file ) { 121 $attachment = preg_replace( '|^(.*?)/gravity_forms/|', $upload_root, $uploaded_file ); 122 $attachments[] = $attachment; 123 } 124 } else { 125 $attachment = preg_replace( '|^(.*?)/gravity_forms/|', $upload_root, $url ); 126 $attachments[] = $attachment; 127 } 116 if ( ! empty( $url ) ) { 117 118 if ( $field['multipleFiles'] ) { 119 $uploaded_files = json_decode( stripslashes( $url ), true ); 120 foreach ( $uploaded_files as $uploaded_file ) { 121 $attachment = preg_replace( '|^(.*?)/gravity_forms/|', $upload_root, $uploaded_file ); 122 $attachments[] = $attachment; 123 } 124 } else { 125 $attachment = preg_replace( '|^(.*?)/gravity_forms/|', $upload_root, $url ); 126 $attachments[] = $attachment; 127 } 128 } 129 128 130 } 129 131 130 $notification['attachments'] = $attachments;132 $notification['attachments'] = $attachments; 131 133 } 132 134 -
gf-uploads-as-attachments/trunk/readme.txt
r1466183 r1589093 40 40 41 41 == Changelog == 42 #####1.2.0 43 - Fixed multiple upload fields. 44 In certain cases only the file(s) from the last upload field in a form was added as an attachment. This problem is now solved. 45 42 46 #####1.1.0 43 47 - Corrected preparation for i18n localization.
Note: See TracChangeset
for help on using the changeset viewer.