Merge remote-tracking branch 'mike/master' into dev
This commit is contained in:
commit
cef1c09db6
@ -980,11 +980,7 @@ function empty_acl($item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function encode_item($item,$mirror = false) {
|
function encode_item($item,$mirror = false) {
|
||||||
$x = array();
|
$x = [];
|
||||||
$x['type'] = 'activity';
|
|
||||||
$x['encoding'] = 'zot';
|
|
||||||
|
|
||||||
// logger('encode_item: ' . print_r($item,true));
|
|
||||||
|
|
||||||
$r = q("select channel_id from channel where channel_id = %d limit 1",
|
$r = q("select channel_id from channel where channel_id = %d limit 1",
|
||||||
intval($item['uid'])
|
intval($item['uid'])
|
||||||
@ -1362,9 +1358,7 @@ function encode_item_flags($item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function encode_mail($item,$extended = false) {
|
function encode_mail($item,$extended = false) {
|
||||||
$x = array();
|
$x = [];
|
||||||
$x['type'] = 'mail';
|
|
||||||
$x['encoding'] = 'zot';
|
|
||||||
|
|
||||||
if(array_key_exists('mail_obscured',$item) && intval($item['mail_obscured'])) {
|
if(array_key_exists('mail_obscured',$item) && intval($item['mail_obscured'])) {
|
||||||
if($item['title'])
|
if($item['title'])
|
||||||
@ -2961,10 +2955,12 @@ function start_delivery_chain($channel, $item, $item_id, $parent) {
|
|||||||
|
|
||||||
$rewrite_author = intval(get_abconfig($channel['channel_id'],$item['owner_xchan'],'system','rself'));
|
$rewrite_author = intval(get_abconfig($channel['channel_id'],$item['owner_xchan'],'system','rself'));
|
||||||
if($rewrite_author) {
|
if($rewrite_author) {
|
||||||
$item['author_xchan'] = $item['owner_xchan'];
|
$item['author_xchan'] = $channel['channel_hash'];
|
||||||
if($item['owner']) {
|
|
||||||
$item['author'] = $item['owner'];
|
$r = q("update item set author_xchan = '%s' where id = %d",
|
||||||
}
|
dbesc($item['author_xchan']),
|
||||||
|
intval($item_id)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3025,7 +3021,6 @@ function start_delivery_chain($channel, $item, $item_id, $parent) {
|
|||||||
intval($item_id)
|
intval($item_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
if($r)
|
if($r)
|
||||||
Zotlabs\Daemon\Master::Summon(array('Notifier','tgroup',$item_id));
|
Zotlabs\Daemon\Master::Summon(array('Notifier','tgroup',$item_id));
|
||||||
else {
|
else {
|
||||||
|
@ -665,7 +665,7 @@ function logger($msg, $level = LOGGER_NORMAL, $priority = LOG_INFO) {
|
|||||||
$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
|
$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
|
||||||
$where = basename($stack[0]['file']) . ':' . $stack[0]['line'] . ':' . $stack[1]['function'] . ': ';
|
$where = basename($stack[0]['file']) . ':' . $stack[0]['line'] . ':' . $stack[1]['function'] . ': ';
|
||||||
|
|
||||||
$s = datetime_convert('UTC','UTC', 'now', ATOM_TIME) . ':' . log_priority_str($priority) . ':' . session_id() . ':' . $where . $msg . PHP_EOL;
|
$s = datetime_convert('UTC','UTC', 'now', ATOM_TIME) . ':' . log_priority_str($priority) . ':' . logid() . ':' . $where . $msg . PHP_EOL;
|
||||||
$pluginfo = array('filename' => $logfile, 'loglevel' => $level, 'message' => $s,'priority' => $priority, 'logged' => false);
|
$pluginfo = array('filename' => $logfile, 'loglevel' => $level, 'message' => $s,'priority' => $priority, 'logged' => false);
|
||||||
|
|
||||||
if(! (App::$module == 'setup'))
|
if(! (App::$module == 'setup'))
|
||||||
@ -675,6 +675,13 @@ function logger($msg, $level = LOGGER_NORMAL, $priority = LOG_INFO) {
|
|||||||
@file_put_contents($pluginfo['filename'], $pluginfo['message'], FILE_APPEND);
|
@file_put_contents($pluginfo['filename'], $pluginfo['message'], FILE_APPEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function logid() {
|
||||||
|
$x = session_id();
|
||||||
|
if(! $x)
|
||||||
|
$x = getmypid();
|
||||||
|
return substr(hash('whirlpool',$x),0,10);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief like logger() but with a function backtrace to pinpoint certain classes
|
* @brief like logger() but with a function backtrace to pinpoint certain classes
|
||||||
* of problems which show up deep in the calling stack.
|
* of problems which show up deep in the calling stack.
|
||||||
@ -693,7 +700,7 @@ function btlogger($msg, $level = LOGGER_NORMAL, $priority = LOG_INFO) {
|
|||||||
if(file_exists(BTLOGGER_DEBUG_FILE) && is_writable(BTLOGGER_DEBUG_FILE)) {
|
if(file_exists(BTLOGGER_DEBUG_FILE) && is_writable(BTLOGGER_DEBUG_FILE)) {
|
||||||
$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
|
$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
|
||||||
$where = basename($stack[0]['file']) . ':' . $stack[0]['line'] . ':' . $stack[1]['function'] . ': ';
|
$where = basename($stack[0]['file']) . ':' . $stack[0]['line'] . ':' . $stack[1]['function'] . ': ';
|
||||||
$s = datetime_convert('UTC','UTC', 'now', ATOM_TIME) . ':' . log_priority_str($priority) . ':' . session_id() . ':' . $where . $msg . PHP_EOL;
|
$s = datetime_convert('UTC','UTC', 'now', ATOM_TIME) . ':' . log_priority_str($priority) . ':' . logid() . ':' . $where . $msg . PHP_EOL;
|
||||||
@file_put_contents(BTLOGGER_DEBUG_FILE, $s, FILE_APPEND);
|
@file_put_contents(BTLOGGER_DEBUG_FILE, $s, FILE_APPEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -764,7 +771,7 @@ function dlogger($msg, $level = 0) {
|
|||||||
$where = basename($stack[0]['file']) . ':' . $stack[0]['line'] . ':' . $stack[1]['function'] . ': ';
|
$where = basename($stack[0]['file']) . ':' . $stack[0]['line'] . ':' . $stack[1]['function'] . ': ';
|
||||||
|
|
||||||
|
|
||||||
@file_put_contents($logfile, datetime_convert('UTC','UTC', 'now', ATOM_TIME) . ':' . session_id() . ' ' . $where . $msg . PHP_EOL, FILE_APPEND);
|
@file_put_contents($logfile, datetime_convert('UTC','UTC', 'now', ATOM_TIME) . ':' . logid() . ' ' . $where . $msg . PHP_EOL, FILE_APPEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -297,7 +297,6 @@ code {
|
|||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
padding: 1em 1.5em;
|
padding: 1em 1.5em;
|
||||||
display: block;
|
display: block;
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
code.inline-code {
|
code.inline-code {
|
||||||
|
Reference in New Issue
Block a user