mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Support for cleared boot.php
This commit is contained in:
parent
95622a0f0d
commit
6a349e7fd9
15 changed files with 38 additions and 25 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace CodebirdSN;
|
||||
|
||||
use Friendica\Core\System;
|
||||
|
||||
/**
|
||||
* A Twitter library in PHP.
|
||||
*
|
||||
|
@ -820,7 +822,7 @@ class CodebirdSN
|
|||
}
|
||||
|
||||
// To-Do
|
||||
$tempfile = tempnam(get_temppath(), "mimecheck");
|
||||
$tempfile = tempnam(System::getTempPath(), "mimecheck");
|
||||
file_put_contents($tempfile, $data);
|
||||
$mime = image_type_to_mime_type(exif_imagetype($tempfile));
|
||||
unlink($tempfile);
|
||||
|
|
|
@ -47,6 +47,7 @@ use Friendica\Core\Hook;
|
|||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
|
@ -599,7 +600,7 @@ function statusnet_post_hook(App $a, &$b)
|
|||
|
||||
if ($image != "") {
|
||||
$img_str = DI::httpClient()->fetch($image);
|
||||
$tempfile = tempnam(get_temppath(), "cache");
|
||||
$tempfile = tempnam(System::getTempPath(), "cache");
|
||||
file_put_contents($tempfile, $img_str);
|
||||
$postdata = ["status" => $msg, "media[]" => $tempfile];
|
||||
} else {
|
||||
|
@ -1417,7 +1418,7 @@ function statusnet_convertmsg(App $a, $body)
|
|||
} else {
|
||||
$img_str = DI::httpClient()->fetch($expanded_url, 4);
|
||||
|
||||
$tempfile = tempnam(get_temppath(), "cache");
|
||||
$tempfile = tempnam(System::getTempPath(), "cache");
|
||||
file_put_contents($tempfile, $img_str);
|
||||
$mime = mime_content_type($tempfile);
|
||||
unlink($tempfile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue