r58163 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58162‎ | r58163 | r58164 >
Date:19:58, 26 October 2009
Author:yaron
Status:deferred
Tags:
Comment:
Removed validation of years, to allow for BC dates
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.inc
@@ -184,8 +184,9 @@
185185 if (day_field.value == '' || year_field.value == '') {
186186 return true;
187187 } else if (day_field.value.match(/^\d+$/) &&
188 - day_field.value <= 31 &&
189 - year_field.value.match(/^\d+$/)) {
 188+ day_field.value <= 31) {
 189+ // no year validation, since it can also include
 190+ // 'BC' and possibly other non-number strings
190191 return true;
191192 } else {
192193 infobox = document.getElementById(info_id);

Status & tagging log