Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 1 | <?php |
| 2 | require_once(__DIR__."/../core.php"); |
| 3 | |
| 4 | if (php_sapi_name() != "cli") { |
| 5 | security::notFound(); |
| 6 | exit(); |
| 7 | } |
| 8 | |
| 9 | echo "====================\n"; |
| 10 | echo "generateregistry.php\n"; |
| 11 | echo "====================\n\n"; |
| 12 | |
| 13 | if (!isset($argc)) { |
| 14 | echo "[error] An unexpected error occurred (\$argc is not set).\n"; |
| 15 | exit(); |
| 16 | } |
| 17 | |
| 18 | $time = ($argc > 1 ? (int)$argv[1] : time()); |
| 19 | |
| 20 | $logId = -1; |
| 21 | registry::generateNow($time, $logId, false); |
| 22 | |
| 23 | echo "[info] Log ID: ".$logId."\n"; |