Skip to content

Commit e94aad8

Browse files
committed
Add a third parameter to the constructor to localize error messages. Closes blueimp#2140.
1 parent 0c415e8 commit e94aad8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server/php/UploadHandler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* jQuery File Upload Plugin PHP Class 6.1.2
3+
* jQuery File Upload Plugin PHP Class 6.2
44
* https://github.com/blueimp/jQuery-File-Upload
55
*
66
* Copyright 2010, Sebastian Tschan
@@ -34,7 +34,7 @@ class UploadHandler
3434
'min_height' => 'Image requires a minimum height'
3535
);
3636

37-
function __construct($options = null, $initialize = true) {
37+
function __construct($options = null, $initialize = true, $error_messages = null) {
3838
$this->options = array(
3939
'script_url' => $this->get_full_url().'/',
4040
'upload_dir' => dirname($_SERVER['SCRIPT_FILENAME']).'/files/',
@@ -109,6 +109,9 @@ function __construct($options = null, $initialize = true) {
109109
if ($options) {
110110
$this->options = array_merge($this->options, $options);
111111
}
112+
if ($error_messages) {
113+
$this->error_messages = array_merge($this->error_messages, $error_messages);
114+
}
112115
if ($initialize) {
113116
$this->initialize();
114117
}

0 commit comments

Comments
 (0)