public static function guid($item, $notify)
{
if (!empty($item['guid'])) {
- return Strings::escapeTags(trim($item['guid']));
+ return trim($item['guid']);
}
if ($notify) {
// We use "microtime" to keep the arrival order and "mt_rand" to avoid duplicates
$file = 'item-' . round(microtime(true) * 10000) . '-' . mt_rand() . '.msg';
- $spoolpath = get_spoolpath();
+ $spoolpath = System::getSpoolPath();
if ($spoolpath != "") {
$spool = $spoolpath . '/' . $file;
}
if (!empty($item['cancel'])) {
- Logger::log('post cancelled by addon.');
+ Logger::notice('post cancelled by addon.');
return 0;
}
foreach ($matches as $mtch) {
if (Strings::compareLink($link, $mtch[1]) || Strings::compareLink($dlink, $mtch[1])) {
$mention = true;
- Logger::log('mention found: ' . $mtch[2]);
+ Logger::notice('mention found', ['mention' => $mtch[2]]);
}
}
}
++$expired;
}
DBA::close($items);
- Logger::log('User ' . $uid . ": expired $expired items; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos");
+ Logger::notice('User ' . $uid . ": expired $expired items; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos");
}
public static function firstPostDate($uid, $wall = false)
$item = Post::selectFirst(self::ITEM_FIELDLIST, ['id' => $item_id]);
if (!DBA::isResult($item)) {
- Logger::log('like: unknown item ' . $item_id);
+ Logger::notice('like: unknown item', ['id' => $item_id]);
return false;
}