mirror of
https://github.com/friendica/friendica
synced 2025-05-05 22:24:11 +02:00
Most functions now moved from include/items.php
This commit is contained in:
parent
b158914c41
commit
7b27dda784
22 changed files with 1488 additions and 1523 deletions
|
@ -207,7 +207,7 @@ class Delivery {
|
|||
logger('notifier: '.$target_item["guid"].' dfrndelivery: '.$contact['name']);
|
||||
|
||||
if ($mail) {
|
||||
$item['body'] = fix_private_photos($item['body'],$owner['uid'],null,$message[0]['contact-id']);
|
||||
$item['body'] = Item::fixPrivatePhotos($item['body'],$owner['uid'],null,$message[0]['contact-id']);
|
||||
$atom = DFRN::mail($item, $owner);
|
||||
} elseif ($fsuggest) {
|
||||
$atom = DFRN::fsuggest($item, $owner);
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace Friendica\Worker;
|
|||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Database\DBM;
|
||||
use dba;
|
||||
|
||||
|
@ -43,7 +44,7 @@ class Expire {
|
|||
$user = dba::selectFirst('user', ['uid', 'username', 'expire'], ['uid' => $param]);
|
||||
if (DBM::is_result($user)) {
|
||||
logger('Expire items for user '.$user['uid'].' ('.$user['username'].') - interval: '.$user['expire'], LOGGER_DEBUG);
|
||||
item_expire($user['uid'], $user['expire']);
|
||||
Item::expire($user['uid'], $user['expire']);
|
||||
logger('Expire items for user '.$user['uid'].' ('.$user['username'].') - done ', LOGGER_DEBUG);
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -8,6 +8,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\PConfig;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Protocol\PortableContact;
|
||||
use Friendica\Util\Network;
|
||||
|
@ -487,7 +488,7 @@ class OnePoll
|
|||
continue;
|
||||
}
|
||||
$datarray['body'] = escape_tags($r['body']);
|
||||
$datarray['body'] = limit_body_size($datarray['body']);
|
||||
$datarray['body'] = Item::limitBodySize($datarray['body']);
|
||||
|
||||
logger("Mail: Importing ".$msg_uid." for ".$mailconf['user']);
|
||||
|
||||
|
@ -531,7 +532,7 @@ class OnePoll
|
|||
$datarray['allow_cid'] = '<' . $contact['id'] . '>';
|
||||
}
|
||||
|
||||
$stored_item = item_store($datarray);
|
||||
$stored_item = Item::insert($datarray);
|
||||
|
||||
switch ($mailconf['action']) {
|
||||
case 0:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
namespace Friendica\Worker;
|
||||
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Core\Config;
|
||||
|
||||
require_once("include/items.php");
|
||||
|
@ -46,7 +47,7 @@ class SpoolPost {
|
|||
continue;
|
||||
}
|
||||
|
||||
$result = item_store($arr);
|
||||
$result = Item::insert($arr);
|
||||
|
||||
logger("Spool file ".$file." stored: ".$result, LOGGER_DEBUG);
|
||||
unlink($fullfile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue