Files
webgui/plugins/dynamix.plugin.manager/PluginsStale.page
2020-06-09 09:11:36 +02:00

71 lines
1.9 KiB
Plaintext

Menu="Plugins"
Title="Plugin History"
Tag="puzzle-piece"
Cond="glob('/boot/config/plugins-stale/*.plg')"
---
<?PHP
/* Copyright 2005-2020, Lime Technology
* Copyright 2012-2020, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<?
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
echo "<table class='tablesorter plugins shift' id='plugin_table'><thead>";
echo "<tr><th></th><th>".('Plugin')."</th><th>"._('Author')."</th><th>"._('Version')."</th><th>"._('Status')."</th><th></th></tr>";
echo "</thead><tbody>";
foreach (glob("/boot/config/plugins-stale/*.plg", GLOB_NOSORT) as $plugin_file) {
// plugin name
$name = plugin("name", $plugin_file);
if ($name === false) $name = basename($plugin_file, ".plg");
// icon
$icon = icon($name);
// 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 = _("STALE");
// action
$action = make_link("delete", $plugin_file);
// echo our plugin information
echo "<tr>";
echo "<td><img src=\"/{$icon}\" /></td>";
echo "<td>{$desc}</td>";
echo "<td>{$author}</td>";
echo "<td>{$version_info}</td>";
echo "<td>{$status_info}</td>";
echo "<td>{$action}</td>";
echo "</tr>";
}
echo "</tbody></table>";
?>
:plugin_stale_help: