if (!file_exists($cacheFileName)) { $dbList[$i]['cached'] = false; } else { $dbList[$i]['cached'] = true; //match the hashes, else the file is buggered. Disallow update application. if ($piece['hash'] == md5_file($cacheFileName)) { $dbList[$i]['hash_match'] = true; } } $i++; } } } //list the code updates $code = $parser->getCodeInfo(); $lowestCode = $parser->getLowestCodeVersion(); if ($parser->getLatestCodeVersion() > $codeversion) { $i = 0; foreach ($code as $piece) { if ($piece['version'] == $lowestCode) { $codeList[$i]['lowest'] = true; } if ($piece['version'] > $codeversion) { $codeList[$i]['hash'] = $piece['hash']; $codeList[$i]['version'] = $piece['version']; $codeList[$i]['desc'] = $piece['desc']; $hostFileName = $piece['url']; $lastPart = explode('/', $hostFileName); $codeList[$i]['short_name'] = $lastPart[count($lastPart) - 1]; $cacheFileName = KB_CACHEDIR . "/update/" . $lastPart[count($lastPart) - 1]; if (!file_exists($cacheFileName)) {