The branch, master has been updated
via b95179c99c9af8873e231e20b89e4e7c7cc82d8e (commit)
from 79c5181d2a20646c1ad091955c95d9035eae7c04 (commit)
- Log -----------------------------------------------------------------
commit b95179c99c9af8873e231e20b89e4e7c7cc82d8e
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sat Sep 25 09:21:13 2010 -0400
Duplicated code
-----------------------------------------------------------------------
Summary of changes:
js/indexes.js | 45 ---------------------------------------------
1 files changed, 0 insertions(+), 45 deletions(-)
diff --git a/js/indexes.js b/js/indexes.js
index b97fcd2..a15b249 100644
--- a/js/indexes.js
+++ b/js/indexes.js
@@ -5,51 +5,6 @@
*/
/**
- * Ensures a value submitted in a form is numeric and is in a range
- *
- * @param object the form
- * @param string the name of the form field to check
- * @param integer the minimum authorized value
- * @param integer the maximum authorized value
- *
- * @return boolean whether a valid number has been submitted or not
- */
-function checkFormElementInRange(theForm, theFieldName, message, min, max)
-{
- var theField = theForm.elements[theFieldName];
- var val = parseInt(theField.value);
-
- if (typeof(min) == 'undefined') {
- min = 0;
- }
- if (typeof(max) == 'undefined') {
- max = Number.MAX_VALUE;
- }
-
- // It's not a number
- if (isNaN(val)) {
- theField.select();
- alert(PMA_messages['strNotNumber']);
- theField.focus();
- return false;
- }
- // It's a number but it is not between min and max
- else if (val < min || val > max) {
- theField.select();
- alert(message.replace('%d', val));
- theField.focus();
- return false;
- }
- // It's a valid number
- else {
- theField.value = val;
- }
-
- return true;
-} // end of the 'checkFormElementInRange()' function
-
-
-/**
* Ensures indexes names are valid according to their type and, for a primary
* key, lock index name to 'PRIMARY'
*
hooks/post-receive
--
phpMyAdmin