Make notification uploads paths more robust
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -81,7 +81,7 @@ function display_page() | ... | @@ -81,7 +81,7 @@ function display_page() |
| 81 | $text = $_POST[$lang.'_text']; | 81 | $text = $_POST[$lang.'_text']; |
| 82 | $html = $_POST[$lang.'_html']; | 82 | $html = $_POST[$lang.'_html']; |
| 83 | $attachments = []; | 83 | $attachments = []; |
| 84 | $uploadDir = __DIR__.'/../../../uploads/notifications/'; | 84 | $uploadDir = wp_upload_dir()['basedir'].'/notifications/'; |
| 85 | 85 | ||
| 86 | fixFilesArray($_FILES[$lang.'_attachment']); | 86 | fixFilesArray($_FILES[$lang.'_attachment']); |
| 87 | 87 | ||
| ... | @@ -328,7 +328,7 @@ function create_notification() | ... | @@ -328,7 +328,7 @@ function create_notification() |
| 328 | $text = $_POST[$lang.'_text']; | 328 | $text = $_POST[$lang.'_text']; |
| 329 | $html = $_POST[$lang.'_html']; | 329 | $html = $_POST[$lang.'_html']; |
| 330 | $attachments = []; | 330 | $attachments = []; |
| 331 | $uploadDir = __DIR__.'/../../../uploads/notifications/'; | 331 | $uploadDir = wp_upload_dir()['basedir'].'/notifications/'; |
| 332 | 332 | ||
| 333 | fixFilesArray($_FILES[$lang.'_attachment']); | 333 | fixFilesArray($_FILES[$lang.'_attachment']); |
| 334 | 334 | ... | ... |
-
Please register or sign in to post a comment