f440737b by Marty Penner

Make notification uploads paths more robust

1 parent b43072e0
......@@ -81,7 +81,7 @@ function display_page()
$text = $_POST[$lang.'_text'];
$html = $_POST[$lang.'_html'];
$attachments = [];
$uploadDir = __DIR__.'/../../../uploads/notifications/';
$uploadDir = wp_upload_dir()['basedir'].'/notifications/';
fixFilesArray($_FILES[$lang.'_attachment']);
......@@ -328,7 +328,7 @@ function create_notification()
$text = $_POST[$lang.'_text'];
$html = $_POST[$lang.'_html'];
$attachments = [];
$uploadDir = __DIR__.'/../../../uploads/notifications/';
$uploadDir = wp_upload_dir()['basedir'].'/notifications/';
fixFilesArray($_FILES[$lang.'_attachment']);
......