<?php
/**
 * 首次安装木卫守护：安装完成后的全站自动检测与修复卡片。
 * 只对部署页创建的超级管理员显示一次；完成后删除 pending 文件。
 */

function first_guard_file()
{
    return APP_ROOT . '/data/first_guard_pending.json';
}

function first_guard_pending($user = null)
{
    // 已按站长要求移除「安装后首次自动检测」：不再读取或展示首次检测标记。
    return null;
}

function first_guard_complete()
{
    $file = first_guard_file();
    if (is_file($file)) {
        @unlink($file);
    }
    set_setting('muwei_first_scan_done', now());
}
