function check_firmware_version_rss($locale) { $rss_path = "http://sourceforge.net/api/file/index/project-id/722987/mtime/desc/limit/20/rss"; $rss_release = "http://sourceforge.net/api/file/index/project-id/722987/path/NAS4Free-@@VERSION@@/mtime/desc/limit/20/rss"; $rss_beta = "http://sourceforge.net/api/file/index/project-id/722987/path/NAS4Free-Beta/mtime/desc/limit/20/rss"; // replace with existing version $path_version = get_path_version($rss_path); if (empty($path_version)) { return ""; } $rss_release = str_replace('@@VERSION@@', $path_version, $rss_release); $release = get_latest_file($rss_release); $beta = get_latest_file($rss_beta); $resp = ""; if (!empty($release)) { $resp .= sprintf(gettext("Latest Release: %s"), $release); $resp .= "<br />\n"; } if (!empty($beta)) { $resp .= sprintf(gettext("Latest Beta Build: %s"), $beta); $resp .= "<br />\n"; } return $resp; }
function check_firmware_version_rss($locale) { $rss_path = "http://sourceforge.net/projects/nas4free/rss?limit=40"; $rss_release = "http://sourceforge.net/projects/nas4free/rss?path=/NAS4Free-@@VERSION@@&limit=20"; $rss_beta = "http://sourceforge.net/projects/nas4free/rss?path=/NAS4Free-Beta&limit=20"; $rss_arm = "http://sourceforge.net/projects/nas4free/rss?path=/NAS4Free-ARM&limit=20"; $rss_arm_beta = "http://sourceforge.net/projects/nas4free/rss?path=/NAS4Free-ARM/Beta&limit=20"; // replace with existing version $path_version = get_path_version($rss_path); if (empty($path_version)) { return ""; } $rss_release = str_replace('@@VERSION@@', $path_version, $rss_release); $release = get_latest_file($rss_release); $beta = get_latest_file($rss_beta); $hw = @exec("/usr/bin/uname -m"); if ($hw == 'arm') { $arm = get_latest_file($rss_arm); $arm_beta = get_latest_file($rss_arm_beta); } $resp = ""; if (!empty($release)) { $resp .= sprintf(gettext("Latest Release: %s"), $release); $resp .= "<br />\n"; } if (!empty($beta)) { $resp .= sprintf(gettext("Latest Beta Build: %s"), $beta); $resp .= "<br />\n"; } if (!empty($arm)) { $resp .= sprintf(gettext("Latest Release: %s"), $arm); $resp .= "<br />\n"; } if (!empty($arm_beta)) { $resp .= sprintf(gettext("Latest Beta Build: %s"), $arm_beta); $resp .= "<br />\n"; } return $resp; }