[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_2-1664-g928840f
Michal Čihař
nijel at users.sourceforge.net
Wed Apr 21 15:12:24 CEST 2010
The branch, master has been updated
via 928840f449136ad9a41aff66660a0523c2ba8918 (commit)
from f984f0c888aab3a16831f521aef128e0c933e328 (commit)
- Log -----------------------------------------------------------------
commit 928840f449136ad9a41aff66660a0523c2ba8918
Author: Michal Čihař <mcihar at novell.com>
Date: Wed Apr 21 15:06:53 2010 +0200
Whitespace fixups.
-----------------------------------------------------------------------
Summary of changes:
js/tbl_change.js | 72 +++++++++++++++++++++++++++---------------------------
1 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/js/tbl_change.js b/js/tbl_change.js
index a5ee5c1..36c4303 100644
--- a/js/tbl_change.js
+++ b/js/tbl_change.js
@@ -9,7 +9,7 @@
* Modify from controls when the "NULL" checkbox is selected
*
* @param string the MySQL field type
- * @param string the urlencoded field name - OBSOLETE
+ * @param string the urlencoded field name - OBSOLETE
* @param string the md5 hashed field name
* @param string the multi_edit row sequence number
*
@@ -81,7 +81,7 @@ function fractionReplace(num)
case 8:res= "08";break;
case 9:res= "09";break;
}
- return res;
+ return res;
}
/* function to check the validity of date
@@ -96,7 +96,7 @@ function isDate(val,tmstmp)
val=val.replace(/[.|*|^|+|//|@]/g,'-');
var arrayVal=val.split("-");
for(var a=0;a<arrayVal.length;a++)
- {
+ {
if(arrayVal[a].length==1)
arrayVal[a]=fractionReplace(arrayVal[a]);
}
@@ -142,7 +142,7 @@ function isTime(val)
{
var arrayVal=val.split(":");
for(var a=0;a<arrayVal.length;a++)
- {
+ {
if(arrayVal[a].length==1)
arrayVal[a]=fractionReplace(arrayVal[a]);
}
@@ -158,7 +158,7 @@ function Validator(urlField, multi_edit,theType){
var evt = window.event || arguments.callee.caller.arguments[0];
var target = evt.target || evt.srcElement;
unNullify(urlField, multi_edit);
-
+
if(target.name.substring(0,6)=="fields")
{
var dt=rowForm.elements['fields[multi_edit][' + multi_edit + '][' + urlField + ']'];
@@ -171,55 +171,55 @@ function Validator(urlField, multi_edit,theType){
dt.className="invalid_value";
return false;
}
+ }
+ else if(theType=="time")
+ {
+ if(!isTime(dt.value))
+ {
+ dt.className="invalid_value";
+ return false;
}
- else if(theType=="time")
+ }
+ else if(theType=="datetime"||theType=="timestamp")
+ {
+ tmstmp=false;
+ if(dt.value=="CURRENT_TIMESTAMP")
{
- if(!isTime(dt.value))
- {
- dt.className="invalid_value";
- return false;
- }
+ dt.className="";
+ return true;
}
- else if(theType=="datetime"||theType=="timestamp")
+ if(theType=="timestamp")
{
- tmstmp=false;
- if(dt.value=="CURRENT_TIMESTAMP")
- {
- dt.className="";
- return true;
- }
- if(theType=="timestamp")
- {
- tmstmp=true;
- }
- if(dt.value=="0000-00-00 00:00:00")
- return true;
- var dv=dt.value.indexOf(" ");
- if(dv==-1)
+ tmstmp=true;
+ }
+ if(dt.value=="0000-00-00 00:00:00")
+ return true;
+ var dv=dt.value.indexOf(" ");
+ if(dv==-1)
+ {
+ dt.className="invalid_value";
+ return false;
+ }
+ else
+ {
+ if(!(isDate(dt.value.substring(0,dv),tmstmp)&&isTime(dt.value.substring(dv+1))))
{
dt.className="invalid_value";
return false;
}
- else
- {
- if(!(isDate(dt.value.substring(0,dv),tmstmp)&&isTime(dt.value.substring(dv+1))))
- {
- dt.className="invalid_value";
- return false;
- }
- }
}
+ }
}
//validate for integer type
if(theType.substring(0,3)=="int"){
-
+
if(isNaN(dt.value)){
dt.className="invalid_value";
return false;
}
}
}
-
+
dt.className="";
}
/* End of datetime validation*/
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list