- unconditional map regeneration on Save changes
- logging to /var/log/mvlog_map.log
This commit is contained in:
parent
2745e1cc35
commit
129711d798
3 changed files with 373 additions and 56 deletions
|
|
@ -97,7 +97,11 @@ function try_send_show_notification($articleRefOrJob, $jobdir, $mvlog_root = nul
|
|||
$job = basename((string)$jobdir);
|
||||
$articleRef = strtolower(trim((string)$articleRefOrJob));
|
||||
$articleId = mvlog_article_id_is_valid($articleRef) ? $articleRef : mvlog_read_article_id((string)$jobdir);
|
||||
$identity = $articleId !== '' ? $articleId : $job;
|
||||
if ($articleId === '') {
|
||||
error_log("[mvlog] article id missing, skipping push for $job\n", 3, $logfile);
|
||||
return false;
|
||||
}
|
||||
$identity = $articleId;
|
||||
|
||||
// Don't notify for hidden jobs
|
||||
if (is_file($jobdir . '/.mvlog-hidden')) {
|
||||
|
|
@ -169,14 +173,12 @@ function try_send_show_notification($articleRefOrJob, $jobdir, $mvlog_root = nul
|
|||
|
||||
if ($articleTitle === '') $articleTitle = mvlog_nice_title((string)$job);
|
||||
|
||||
$filterUrl = 'https://bubulescu.org/?' . http_build_query([
|
||||
'q' => $articleTitle,
|
||||
]);
|
||||
$articleUrl = './?id=' . rawurlencode($articleId);
|
||||
|
||||
$payload = json_encode([
|
||||
'title' => $articleTitle,
|
||||
'body' => 'New aticle @ MVL!',
|
||||
'url' => $filterUrl,
|
||||
'url' => $articleUrl,
|
||||
'tag' => "mvlog-show-{$identity}",
|
||||
], JSON_UNESCAPED_UNICODE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue