summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-05-10 21:33:13 +0000
committeruckelman <uckelman@nomic.net>2010-05-10 21:33:13 +0000
commite39f8403c38ab055453ed9222dee43fd1d592b08 (patch)
tree98ec29c2cca012e490a55e0e45810a28d4d14a5c
parentda01ded2f61ae81eb6fc10d25a4cd42d07f470f8 (diff)
Added newlines at ends of error messages.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6847 67b53d14-2c14-4ace-a08f-0dab2b34000c
-rw-r--r--src/attachment_writer.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/attachment_writer.php b/src/attachment_writer.php
index d65b8dc..571827c 100644
--- a/src/attachment_writer.php
+++ b/src/attachment_writer.php
@@ -5,16 +5,16 @@ $attach_dir = '/var/www/forum/files';
# All requests should be local, since they come from the list post script.
if ($_SERVER['SERVER_ADDR'] != $_SERVER['REMOTE_ADDR']) {
- die('Client address is not local');
+ die("Client address is not local\n");
}
# Check the password
if (!array_key_exists('password', $_POST)) {
- die('No password given');
+ die("No password given\n");
}
if ($_POST['password'] != $password) {
- die('Incorrect password');
+ die("Incorrect password\n");
}
# Process each attachment
@@ -24,26 +24,27 @@ foreach ($_FILES as $file) {
case UPLOAD_ERR_OK:
break;
case UPLOAD_ERR_INI_SIZE:
- die('Error UPLOAD_ERR_INI_SIZE: ' . $file['name']);
+ die('Error UPLOAD_ERR_INI_SIZE: ' . $file['name'] . "\n");
case UPLOAD_ERR_FORM_SIZE:
- die('Error UPLOAD_ERR_FORM_SIZE: ' . $file['name']);
+ die('Error UPLOAD_ERR_FORM_SIZE: ' . $file['name'] . "\n");
case UPLOAD_ERR_PARTIAL:
- die('Error UPLOAD_ERR_PARTIAL: ' . $file['name']);
+ die('Error UPLOAD_ERR_PARTIAL: ' . $file['name'] . "\n");
case UPLOAD_ERR_NO_FILE:
- die('Error UPLOAD_ERR_NO_FILE: ' . $file['name']);
+ die('Error UPLOAD_ERR_NO_FILE: ' . $file['name'] . "\n");
case UPLOAD_ERR_NO_TMP_DIR:
- die('Error UPLOAD_ERR_NO_TMP_DIR: ' . $file['name']);
+ die('Error UPLOAD_ERR_NO_TMP_DIR: ' . $file['name'] . "\n");
case UPLOAD_ERR_CANT_WRITE:
- die('Error UPLOAD_ERR_CANT_WRITE: ' . $file['name']);
+ die('Error UPLOAD_ERR_CANT_WRITE: ' . $file['name'] . "\n");
case UPLOAD_ERR_EXTENSION:
- die('Error UPLOAD_ERR_EXTENSION: ' . $file['name']);
+ die('Error UPLOAD_ERR_EXTENSION: ' . $file['name'] . "\n");
default:
- die('Unrecognized error code: ' . $file['error'] . ' ' . $file['name']);
+ die('Unrecognized error code ' . $file['error'] . ': '
+ . $file['name'] . "\n");
}
# Don't continue if the name isn't what phpBB expects
if (preg_match('/^\d+_[0-9a-f]{32}$/', $file['name']) != 1) {
- die('Bad destination filename: ' . $file['name']);
+ die('Bad destination filename: ' . $file['name'] . "\n");
}
$src = $file['tmp_name'];
@@ -51,7 +52,7 @@ foreach ($_FILES as $file) {
# Move temp file to attachments dir
if (!move_uploaded_file($src, $dst)) {
- die("Failed to move $src to $dst.");
+ die("Failed to move $src to $dst.\n");
}
}