if (count($modmap) > 0) {
         $modmap = getMapFingering($modmap, $module, 'module');
     } else {
         $modmap = array();
     }
     if ($libmap = XoopsCache::read(basename(dirname(dirname(__DIR__))) . '.xoopslib' . $module . '.delays')) {
         if ($monthlib = XoopsCache::read(basename(dirname(dirname(__DIR__))) . '.xoopslib' . $module . '.old')) {
             foreach ($monthlib as $key => $values) {
                 if (isset($libmap[$key]) && $libmap[$key]['is'] == 'file') {
                     unset($libmap[$key]);
                 } elseif (isset($libmap[$key]) && $libmap[$key]['is'] == 'folder') {
                     unset($libmap[$key]);
                 }
             }
             if (count($libmap) > 0) {
                 $libmap = getMapFingering($libmap, $module, 'xoopslib');
             } else {
                 $libmap = array();
             }
         }
     }
 } else {
     $libmap = array();
 }
 // Get Harvest Comparison Request on Peers API's
 $mobject = new XoopsModule();
 $mobject->loadInfoAsVar($module);
 if ($peers = XoopsCache::read(basename(dirname(dirname(__DIR__))) . '.available.peers')) {
     $uris = $peers['harvest']['modules']['uris'];
     shuffle($uris);
     foreach ($uris as $uri) {
xoops_load("XoopsCache");
xoops_load("XoopsLists");
if ($resourcesConfigsList['harvester']) {
    foreach (XoopsLists::getThemesList() as $theme) {
        if ($thememap = XoopsCache::read(basename(dirname(dirname(__DIR__))) . '.theme' . $theme . '.delays')) {
            if (!XoopsCache::read(basename(dirname(dirname(__DIR__))) . '.theme' . $theme)) {
                if ($monthmap = XoopsCache::read(basename(dirname(dirname(__DIR__))) . '.theme' . $theme . '.old')) {
                    foreach ($monthmap as $key => $values) {
                        if (isset($thememap[$key]) && $thememap[$key]['is'] == 'file') {
                            unset($thememap[$key]);
                        } elseif (isset($thememap[$key]) && $thememap[$key]['is'] == 'folder') {
                            unset($thememap[$key]);
                        }
                    }
                    if (count($thememap) > 0) {
                        $thememap = getMapFingering($thememap, $theme, 'theme');
                    } else {
                        $thememap = array();
                    }
                    // Get Harvest Comparison Request on Peers API's
                    if ($peers = XoopsCache::read(basename(dirname(dirname(__DIR__))) . '.available.peers')) {
                        $uris = $peers['harvest']['themes']['uris'];
                        shuffle($uris);
                        foreach ($uris as $uri) {
                            $harvest[md5($uri)] = json_decode(getURIData($uri, array('theme' => $theme, 'url' => XOOPS_URL, 'salt' => sha1(_RESOURCES_SALT_BLOWFISH), 'thememap' => $thememap, 'mode' => 'theme', 'timezone' => date_default_timezone_get(), 'microtime' => microtime(true))), true);
                        }
                    }
                    mkdirSecure(XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . basename(__DIR__));
                    mkdirSecure($path = XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . basename(__DIR__) . DIRECTORY_SEPARATOR . 'harvest');
                    if (file_exists($ffile = XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . basename(__DIR__) . DIRECTORY_SEPARATOR . "harvest.json")) {
                        $filedata = json_decode(readRawFile($ffile), true);