includes/clientside/static/editor.js
changeset 651 ce9d78d7251d
parent 650 e45183014778
child 672 08a7875258b4
--- 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);
-}