mirror of
https://github.com/unraid/webgui.git
synced 2026-03-20 20:02:44 -05:00
Replace fixed path with docroot variable
This commit is contained in:
@@ -16,7 +16,7 @@ Cond="glob('/boot/config/plugins-error/*.plg')"
|
||||
?>
|
||||
|
||||
<?
|
||||
require_once('plugins/dynamix.plugin.manager/include/PluginHelpers.php');
|
||||
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
|
||||
|
||||
echo "<table class='tablesorter' id='plugin_table'><thead>";
|
||||
echo "<tr><th>Plugin File</th><th>Status</th></tr>";
|
||||
|
||||
@@ -16,7 +16,7 @@ Cond="glob('/boot/config/plugins-stale/*.plg')"
|
||||
?>
|
||||
|
||||
<?
|
||||
require_once('plugins/dynamix.plugin.manager/include/PluginHelpers.php');
|
||||
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>";
|
||||
|
||||
@@ -11,9 +11,12 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
|
||||
// Invoke the plugin command with indicated method
|
||||
function plugin($method, $arg = '') {
|
||||
exec("/usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin $method $arg", $output, $retval);
|
||||
global $docroot;
|
||||
exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin $method $arg", $output, $retval);
|
||||
if ($retval != 0) return false;
|
||||
return implode("\n", $output);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
</head>
|
||||
<body style="margin:14px 10px">
|
||||
<?
|
||||
require_once 'webGui/include/Markdown.php';
|
||||
$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
|
||||
require_once "$docroot/webGui/include/Markdown.php";
|
||||
|
||||
$file = $_GET['file'];
|
||||
if (file_exists($file)) echo Markdown(file_get_contents($file)); else echo Markdown("*No release notes available!*");
|
||||
?>
|
||||
<br><center><input type="button" value="Done" onclick="top.Shadowbox.close()"></center>
|
||||
<br><div style="text-align:center"><input type="button" value="Done" onclick="top.Shadowbox.close()"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
require_once 'webGui/include/Markdown.php';
|
||||
require_once 'plugins/dynamix.plugin.manager/include/PluginHelpers.php';
|
||||
$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
require_once "$docroot/webGui/include/Markdown.php";
|
||||
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
|
||||
|
||||
$current = parse_ini_file('/etc/unraid-version');
|
||||
foreach (glob("/var/log/plugins/*.plg", GLOB_NOSORT) as $plugin_link) {
|
||||
@@ -73,7 +74,7 @@ foreach (glob("/var/log/plugins/*.plg", GLOB_NOSORT) as $plugin_link) {
|
||||
$version_info .= " <a href='#' title='View Release Notes' onclick=\"openBox('/plugins/dynamix.plugin.manager/include/ShowChanges.php?file=".urlencode($txtfile)."','Release Notes',600,900); return false\"><img src='/webGui/images/information.png' class='icon'></a>";
|
||||
}
|
||||
// action
|
||||
$action = strpos($plugin_file, "/usr/local/emhttp/plugins") !== 0 ? make_link("remove", basename($plugin_file)) : "built-in";
|
||||
$action = strpos($plugin_file, "$docroot/plugins") !== 0 ? make_link("remove", basename($plugin_file)) : "built-in";
|
||||
// write plugin information
|
||||
echo "<tr>";
|
||||
echo "<td style='vertical-align:top;width:64px'><p style='text-align:center'>{$link}</p></td>";
|
||||
|
||||
@@ -12,15 +12,16 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
require_once '/usr/local/emhttp/webGui/include/Wrappers.php';
|
||||
require_once '/usr/local/emhttp/plugins/dynamix.plugin.manager/include/PluginHelpers.php';
|
||||
$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
require_once "$docroot/webGui/include/Wrappers.php";
|
||||
require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php";
|
||||
|
||||
exec("wget -qO /dev/null 127.0.0.1:$(lsof -i -P -sTCP:LISTEN|grep -Pom1 '^emhttp.*:\K\d+')/update.htm?cmdStatus=apply");
|
||||
|
||||
$current = parse_ini_file('/etc/unraid-version');
|
||||
$var = parse_ini_file('/var/local/emhttp/var.ini');
|
||||
$unraid = parse_plugin_cfg('dynamix', true);
|
||||
$notify = '/usr/local/emhttp/webGui/scripts/notify';
|
||||
$notify = "$docroot/webGui/scripts/notify";
|
||||
$server = strtoupper($var['NAME']);
|
||||
$output = $unraid['notify']['plugin'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user