+ q("ROLLBACK");
+
+ // Store the data into a spool file so that we can try again later.
+
+ // At first we restore the Diaspora signature that we removed above.
+ if (isset($encoded_signature)) {
+ $arr['dsprsig'] = $encoded_signature;
+ }
+
+ // Now we store the data in the spool directory
+ $file = 'item-'.round(microtime(true) * 10000).".msg";
+ $spool = get_spoolpath().'/'.$file;
+ file_put_contents($spool, json_encode($arr));
+ logger("Item wasn't stored - Item was spooled into file ".$file, LOGGER_DEBUG);