* fix a bug.

This commit is contained in:
wyd621
2013-08-16 10:50:07 +08:00
parent cc2cf3484d
commit 6f5ec321d1
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -619,7 +619,7 @@ class commonModel extends model
}
else
{
$objects = $this->dbh->query($queryCondition . "OR id=$objectID ORDER BY $orderBy")->fetchAll();
$objects = $this->dbh->query($queryCondition . " ORDER BY $orderBy")->fetchAll();
}
$tmpObjectIDs = array();
+4 -1
View File
@@ -13,8 +13,11 @@ $.extend(
{
$.enableForm(formID);
/* try parse to json when response is json's string. */
try{if(typeof(response) == 'string') response = JSON.parse(response);}catch(e){}
/* The response is not an object, some error occers, alert it. */
if($.type(response) != 'object')
if(typeof(response) != 'object')
{
if(response) return alert(response);
return alert('No response.');