Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
1a872222
authored
2011-11-14 11:00:37 -0500
by
Marty Penner
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Point notification attachment uploads to the right directory. refs #1375
1 parent
1483f044
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
com/Notifications/Admin.php
com/Notifications/Admin.php
View file @
1a87222
...
...
@@ -83,12 +83,14 @@ function display_page() {
$text
=
$_POST
[
'text'
];
$html
=
$_POST
[
'html'
];
$attachments
=
array
();
$upload_dir
=
__DIR__
.
"/uploads/"
;
$upload_dir
=
__DIR__
.
DIRECTORY_SEPARATOR
.
'..'
.
DIRECTORY_SEPARATOR
.
'..'
.
DIRECTORY_SEPARATOR
.
'..'
.
DIRECTORY_SEPARATOR
.
'uploads'
.
DIRECTORY_SEPARATOR
;
fixFilesArray
(
$_FILES
[
'attachment'
]);
foreach
(
$_FILES
[
'attachment'
]
as
$position
=>
$file
)
{
// should output array with indices name, type, tmp_name, error, size
if
(
$file
[
'name'
]
!=
""
)
{
move_uploaded_file
(
$file
[
'tmp_name'
],
$upload_dir
.
$file
[
'name'
]);
move_uploaded_file
(
$file
[
'tmp_name'
],
$upload_dir
.
$file
[
'name'
]);
$attachments
[]
=
$file
[
'name'
];
}
}
...
...
Please
register
or
sign in
to post a comment