mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 09:35:11 +00:00
move xchan_photo import to background
This commit is contained in:
parent
b77eac2ae8
commit
551e7b332a
1 changed files with 28 additions and 0 deletions
28
Zotlabs/Daemon/Xchan_photo.php
Normal file
28
Zotlabs/Daemon/Xchan_photo.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?php /** @file */
|
||||||
|
|
||||||
|
namespace Zotlabs\Daemon;
|
||||||
|
|
||||||
|
|
||||||
|
class Xchan_photo {
|
||||||
|
static public function run($argc,$argv) {
|
||||||
|
|
||||||
|
if($argc != 3)
|
||||||
|
return;
|
||||||
|
|
||||||
|
$url = hex2bin($argv[1]);
|
||||||
|
$xchan = hex2bin($argv[2]);
|
||||||
|
|
||||||
|
|
||||||
|
$photos = import_xchan_photo($url,$xchan);
|
||||||
|
$r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s'",
|
||||||
|
dbescdate(datetime_convert()),
|
||||||
|
dbesc($photos[0]),
|
||||||
|
dbesc($photos[1]),
|
||||||
|
dbesc($photos[2]),
|
||||||
|
dbesc($photos[3]),
|
||||||
|
dbesc($xchan)
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue