--- a/includes/clientside/static/editor.js Sun Jul 20 13:32:04 2008 -0400
+++ b/includes/clientside/static/editor.js Tue Jul 22 14:49:18 2008 -0500
@@ -26,7 +26,7 @@
unsetAjaxLoading();
var response = String(ajax.responseText + '');
- if ( response.substr(0, 1) != '{' )
+ if ( !check_json_response(response) )
{
handle_invalid_json(response);
return false;
@@ -580,7 +580,7 @@
{
ajaxUnSetEditorLoading();
var response = String(ajax.responseText + '');
- if ( response.substr(0, 1) != '{' )
+ if ( !check_json_response(response) )
{
handle_invalid_json(response);
return false;
@@ -753,7 +753,7 @@
ajaxUnSetEditorLoading();
var response = String(ajax.responseText + '');
- if ( response.substr(0, 1) != '{' )
+ if ( !check_json_response(response) )
{
handle_invalid_json(response);
return false;
@@ -972,7 +972,7 @@
ajaxUnSetEditorLoading();
var response = String(ajax.responseText + '');
- if ( response.substr(0, 1) != '{' )
+ if ( !check_json_response(response) )
{
handle_invalid_json(response);
return false;
@@ -1001,12 +1001,3 @@
}, true);
}
-/**
- * Equivalent of PHP's time()
- * @return int
- */
-
-function unix_time()
-{
- return parseInt((new Date()).getTime()/1000);
-}