1a872222 by Marty Penner

Point notification attachment uploads to the right directory. refs #1375

1 parent 1483f044
...@@ -83,12 +83,14 @@ function display_page() { ...@@ -83,12 +83,14 @@ function display_page() {
83 $text = $_POST['text']; 83 $text = $_POST['text'];
84 $html = $_POST['html']; 84 $html = $_POST['html'];
85 $attachments = array(); 85 $attachments = array();
86 $upload_dir = __DIR__ . "/uploads/"; 86 $upload_dir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR;
87
87 fixFilesArray($_FILES['attachment']); 88 fixFilesArray($_FILES['attachment']);
89
88 foreach ($_FILES['attachment'] as $position => $file) { 90 foreach ($_FILES['attachment'] as $position => $file) {
89 // should output array with indices name, type, tmp_name, error, size 91 // should output array with indices name, type, tmp_name, error, size
90 if($file['name'] != "") { 92 if($file['name'] != "") {
91 move_uploaded_file($file['tmp_name'],$upload_dir . $file['name']); 93 move_uploaded_file($file['tmp_name'], $upload_dir . $file['name']);
92 $attachments[] = $file['name']; 94 $attachments[] = $file['name'];
93 } 95 }
94 } 96 }
......