"; else $link = ""; // desc $readme = "plugins/{$name}/README.md"; if (file_exists($readme)) $desc = Markdown(file_get_contents($readme)); else $desc = Markdown("**{$name}**"); // author $author = plugin("author", $plugin_file); if ($author === false) $author = "anonymous"; // version $version = plugin("version", $plugin_file); if ($version === false) $version = "unknown"; // version info $version_info = $version; // status info $status_info = "no update"; $changes_file = $plugin_file; $URL = plugin("pluginURL", $plugin_file); if ($URL !== false) { $filename = "/tmp/plugins/".basename($URL); if (file_exists($filename)) { $latest = plugin("version", $filename); if (strcmp($latest, $version) > 0) { $unRAID = plugin("unRAID", $filename); if ($unRAID === false || version_compare($current['version'], $unRAID, '>=')) { $version_info .= "
{$latest}"; $status_info = make_link("update", basename($plugin_file)); $changes_file = $filename; } else { $status_info = "up-to-date"; } } else { $status_info = "up-to-date"; } } else { if ($_GET['stale']) $status_info = "unknown"; } } $changes = plugin("changes", $changes_file); if ($changes !== false) { $txtfile = "/tmp/plugins/".basename($plugin_file,'.plg').".txt"; file_put_contents($txtfile, $changes); $version_info .= " "; } // action $action = strpos($plugin_file, "$docroot/plugins") !== 0 ? make_link("remove", basename($plugin_file)) : "built-in"; // write plugin information echo ""; echo "

{$link}

"; echo "{$desc}"; echo "{$author}"; echo "{$version_info}"; echo "{$status_info}"; echo "{$action}"; echo ""; } ?>