"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "framework/assets/yii.validation.js" between
yii2-2.0.35.tar.gz and yii2-2.0.36.tar.gz

About: Yii 2 is a high-performance component-based PHP framework for developing large-scale Web applications (source).

yii.validation.js  (yii2-2.0.35):yii.validation.js  (yii2-2.0.36)
skipping to change at line 411 skipping to change at line 411
if (options.maxFiles && options.maxFiles < files.length) { if (options.maxFiles && options.maxFiles < files.length) {
messages.push(options.tooMany); messages.push(options.tooMany);
return []; return [];
} }
return files; return files;
} }
function validateFile(file, messages, options) { function validateFile(file, messages, options) {
if (options.extensions && options.extensions.length > 0) { if (options.extensions && options.extensions.length > 0) {
var index = file.name.lastIndexOf('.'); var found = false;
var ext = !~index ? '' : file.name.substr(index + 1, file.name.lengt var filename = file.name.toLowerCase();
h).toLowerCase();
if (!~options.extensions.indexOf(ext)) { for (var index=0; index < options.extensions.length; index++) {
var ext = options.extensions[index].toLowerCase();
if (filename.substr(filename.length - options.extensions[index].
length - 1) === ('.' + ext)) {
found = true;
break;
}
}
if (!found) {
messages.push(options.wrongExtension.replace(/\{file\}/g, file.n ame)); messages.push(options.wrongExtension.replace(/\{file\}/g, file.n ame));
} }
} }
if (options.mimeTypes && options.mimeTypes.length > 0) { if (options.mimeTypes && options.mimeTypes.length > 0) {
if (!validateMimeType(options.mimeTypes, file.type)) { if (!validateMimeType(options.mimeTypes, file.type)) {
messages.push(options.wrongMimeType.replace(/\{file\}/g, file.na me)); messages.push(options.wrongMimeType.replace(/\{file\}/g, file.na me));
} }
} }
 End of changes. 2 change blocks. 
4 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)