kopia lustrzana https://github.com/friendica/friendica
Merge pull request #3169 from annando/bugfix-delete-spool
We have to delete spool files after posting in any casepull/3170/head
commit
e647aa8846
|
@ -35,13 +35,19 @@ function spool_post_run($argv, $argc) {
|
|||
continue;
|
||||
}
|
||||
$arr = json_decode(file_get_contents($fullfile), true);
|
||||
|
||||
// If it isn't an array then it is no spool file
|
||||
if (!is_array($arr)) {
|
||||
continue;
|
||||
}
|
||||
$result = item_store($arr);
|
||||
if ($result == 0) {
|
||||
|
||||
// Skip if it doesn't seem to be an item array
|
||||
if (!isset($arr['uid']) AND !isset($arr['uri']) AND !isset($arr['network'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$result = item_store($arr);
|
||||
|
||||
logger("Spool file ".$file." stored: ".$result, LOGGER_DEBUG);
|
||||
unlink($fullfile);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue