r88293 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88292‎ | r88293 | r88294 >
Date:11:33, 17 May 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r87867
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/UploadWizard/resources/jquery/jquery.validate.wmCommonsBlacklist.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/UploadWizard/resources/jquery/jquery.validate.wmCommonsBlacklist.js
@@ -71,7 +71,7 @@
7272 /^JD[\d\s]+$/, // Jenoptik
7373 /^SDC[\d\s]+$/, // Samsung
7474 /^DVC[\d\s]+$/, // DoCoMo
75 - /^SANY[\d\s]+$/, // Sanyo
 75+ /^SANY[\d\s]+$/ // Sanyo
7676 ],
7777
7878 // filename from elsewhere
@@ -88,7 +88,7 @@
8989 /^[^A-Za-z]*(small|medium|large)\)?/,
9090 /^(Untitled|No[-_]?name|Picture|Pict?|Image[mn]?|Img|Immagine|Photo|Foto|Bild|Scan|Panorama|Sin_título)[^A-Za-z]*/,
9191 /^(January|Jan|February|Febr?|March|Mar|April|Apr|May|June?|July?|August|Aug|September|Sept?|October|Oct|November|Nov|December|Dec)[^A-Za-z]*/,
92 - /^[0-9 ]*([A-Z][0-9 ]*){30,}/,
 92+ /^[0-9 ]*([A-Z][0-9 ]*){30,}/
9393 ],
9494
9595 'titleThumbnail': [
@@ -106,7 +106,8 @@
107107 return function( value, element, params ) {
108108 var ok = true;
109109 $.each( regexes, function( i, regex ) {
110 - if ( value.match( regex ) ) {
 110+ // if we make a mistake with commas in the above list, IE sometimes gives us an undefined regex, causes nastiness
 111+ if ( typeof regex !== undefined && value.match( regex ) ) {
111112 ok = false;
112113 return false;
113114 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87867fix bug 28918 -- errant commas caused undefined regexes, which cause match() ...neilk01:59, 11 May 2011

Status & tagging log