Changed cron upload so that an unrecognised file type results in an error instead of a success
This commit is contained in:
parent
eb4292316d
commit
4410baeb9c
@ -339,7 +339,7 @@ class CronUploader extends Extension
|
|||||||
// Generate info message
|
// Generate info message
|
||||||
$infomsg = ""; // Will contain info message
|
$infomsg = ""; // Will contain info message
|
||||||
if ($event->image_id == -1) {
|
if ($event->image_id == -1) {
|
||||||
$infomsg = "File type not recognised. Filename: {$filename}";
|
throw new Exception("File type not recognised. Filename: {$filename}");
|
||||||
} else {
|
} else {
|
||||||
$infomsg = "Image uploaded. ID: {$event->image_id} - Filename: {$filename} - Tags: {$tags}";
|
$infomsg = "Image uploaded. ID: {$event->image_id} - Filename: {$filename} - Tags: {$tags}";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user