r53683 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53682‎ | r53683 | r53684 >
Date:17:51, 23 July 2009
Author:yaron
Status:deferred
Tags:
Comment:
Removed 'integer' validation (no longer needed), fixed FCKeditor handling to allow for "disable" link
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.inc
@@ -169,7 +169,7 @@
170170 infobox.innerHTML = "$bad_email_error_str";
171171 return false;
172172 }
173 - } else if (type == 'float') {
 173+ } else if (type == 'number') {
174174 if (field.value.match(/^[\d\.,]+$/)) {
175175 return true;
176176 } else {
@@ -177,15 +177,6 @@
178178 infobox.innerHTML = "$bad_number_error_str";
179179 return false;
180180 }
181 - } else if (type == 'integer') {
182 - var num_regexp = /[0-9,]*/;
183 - if (field.value.match(/^[\d,]+$/)) {
184 - return true;
185 - } else {
186 - infobox = document.getElementById(info_id);
187 - infobox.innerHTML = "$bad_integer_error_str";
188 - return false;
189 - }
190181 } else if (type == 'date') {
191182 // validate only if day and year fields are both filled in
192183 day_field = document.getElementById(field_id + "_day");
@@ -689,17 +680,16 @@
690681 }
691682
692683 static function getShowFCKEditor() {
693 - global $wgUser;
 684+ global $wgUser, $wgDefaultUserOptions;
694685
695686 $showFCKEditor = 0;
696 - if ( !$wgUser->getOption( 'riched_start_disabled' ) ) {
 687+ if ( !$wgUser->getOption( 'riched_start_disabled', $wgDefaultUserOptions['riched_start_disabled'] ) ) {
697688 $showFCKEditor += RTE_VISIBLE;
698 -
699689 }
700 - if ( $wgUser->getOption( 'riched_use_popup' ) ) {
 690+ if ( $wgUser->getOption( 'riched_use_popup', $wgDefaultUserOptions['riched_use_popup'] ) ) {
701691 $showFCKEditor += RTE_POPUP;
702692 }
703 - if ( $wgUser->getOption( 'riched_use_toggle' ) ) {
 693+ if ( $wgUser->getOption( 'riched_use_toggle', $wgDefaultUserOptions['riched_use_toggle'] ) ) {
704694 $showFCKEditor += RTE_TOGGLE_LINK;
705695 }
706696

Status & tagging log