update as $updatexml) { $version = $updatexml->targetplatform["version"]->__toString(); if (preg_match('/^' . $version . '/', $jversion)) { //version to check, not visible in table $updatedata->version = $updatexml->version; //in table $updatedata->versiondetail = $updatexml->version; $updatedata->date = JemOutput::formatdate($updatexml->date); $updatedata->info = $updatexml->infourl; $updatedata->download = $updatexml->downloads->downloadurl; $updatedata->notes = explode(';', $updatexml->notes); $updatedata->changes = explode(';', $updatexml->changes); $updatedata->failed = 0; $updatedata->installedversion = $installedversion; $updatedata->current = version_compare($installedversion, $updatedata->version); } } } else { $updatedata->failed = 1; $updatedata->installedversion = $installedversion; } return $updatedata; } /** * Check to see if update-file exists */ protected static function CheckFile($filename) { $ext = File::getExt($filename); if ($ext == 'xml') { if (@file_get_contents($filename, 0, null, 0, 1)) { return true; } else { return false; } } else { return false; } } } ?>