mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 19:29:13 -05:00
Fixed plugin manager - show correct version for "next" branch
This commit is contained in:
@@ -17,7 +17,7 @@ $docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
function plugin($method, $arg = '') {
|
||||
global $docroot;
|
||||
exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin ".escapeshellarg($method)." ".escapeshellarg($arg), $output, $retval);
|
||||
return $retval==0 ? end($output) : false;
|
||||
return $retval==0 ? implode("\n", $output) : false;
|
||||
}
|
||||
|
||||
function check_plugin($arg, &$ncsi) {
|
||||
|
||||
@@ -57,7 +57,8 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
|
||||
copy($plugin_file,$tmp_file);
|
||||
exec("sed -ri 's|^(<!ENTITY category).*|\\1 \"{$branch}\">|' $tmp_file");
|
||||
symlink($tmp_file,"/var/log/plugins/$tmp_plg");
|
||||
if (version_compare(check_plugin($tmp_plg,$ncsi),$past,'>')) {
|
||||
$next = end(explode("\n",check_plugin($tmp_plg,$ncsi)));
|
||||
if (version_compare($next,$past,'>')) {
|
||||
copy("/tmp/plugins/$tmp_plg",$tmp_file);
|
||||
$plugin_file = $tmp_file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user