Decode function is now there as well.
This commit is contained in:
parent
7a0edc86ae
commit
e90af0be68
2 changed files with 174 additions and 9 deletions
|
@ -111,18 +111,18 @@ function diaspora_dispatch($importer,$msg,$attempt=1) {
|
|||
$ret = diaspora_reshare($importer,$xmlbase->reshare,$msg);
|
||||
}
|
||||
elseif($xmlbase->retraction) {
|
||||
$tempfile = tempnam(get_temppath(), "diaspora-retraction");
|
||||
file_put_contents($tempfile, json_encode($data));
|
||||
//$tempfile = tempnam(get_temppath(), "diaspora-retraction");
|
||||
//file_put_contents($tempfile, json_encode($data));
|
||||
$ret = diaspora_retraction($importer,$xmlbase->retraction,$msg);
|
||||
}
|
||||
elseif($xmlbase->signed_retraction) {
|
||||
$tempfile = tempnam(get_temppath(), "diaspora-signed_retraction");
|
||||
file_put_contents($tempfile, json_encode($data));
|
||||
//$tempfile = tempnam(get_temppath(), "diaspora-signed_retraction");
|
||||
//file_put_contents($tempfile, json_encode($data));
|
||||
$ret = diaspora_signed_retraction($importer,$xmlbase->signed_retraction,$msg);
|
||||
}
|
||||
elseif($xmlbase->relayable_retraction) {
|
||||
$tempfile = tempnam(get_temppath(), "diaspora-relayable_retraction");
|
||||
file_put_contents($tempfile, json_encode($data));
|
||||
//$tempfile = tempnam(get_temppath(), "diaspora-relayable_retraction");
|
||||
//file_put_contents($tempfile, json_encode($data));
|
||||
$ret = diaspora_signed_retraction($importer,$xmlbase->relayable_retraction,$msg);
|
||||
}
|
||||
elseif($xmlbase->photo) {
|
||||
|
@ -468,6 +468,9 @@ EOT;
|
|||
|
||||
function diaspora_decode($importer,$xml) {
|
||||
|
||||
$tempfile = tempnam(get_temppath(), "diaspora-decode");
|
||||
file_put_contents($tempfile, json_encode(array("importer" => $importer, "xml" => $xml)));
|
||||
|
||||
$public = false;
|
||||
$basedom = parse_xml_string($xml);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue