<?php

use auctionforge\inc\Debug;
use auctionforge\inc\import\LotList;

if (!empty($_SERVER['DOCUMENT_ROOT'])) {
    die("Access denied");
}

define('CRON_TASKS_BASE_PATH', __DIR__);
define('WP_USE_THEMES', false);
require(CRON_TASKS_BASE_PATH . '/../../../../wp-load.php');

if (!is_plugin_active(basename(dirname(__DIR__)) . '/' . basename(dirname(__DIR__)) . '.php')) {
    die("Plugin AuctionForge disabled\r\n");
}

$lotList = new LotList();
$lotList->init();
if (!empty($lotList->getErrors())) {
    $errors = $lotList->getErrors();
    var_dump($errors);
    Debug::logData($errors, "lot-list-new");
}

$lotList->init(false);
if (!empty($lotList->getErrors())) {
    $errors = $lotList->getErrors();
    var_dump($errors);
    Debug::logData($errors, "lot-list-old");
}
