diff --git a/emhttp/plugins/dynamix/SMBExtras.page b/emhttp/plugins/dynamix/SMBExtras.page
index 2676f890d..ffeeaefc9 100644
--- a/emhttp/plugins/dynamix/SMBExtras.page
+++ b/emhttp/plugins/dynamix/SMBExtras.page
@@ -33,7 +33,7 @@ $(function(){
_(Samba extra configuration)_:
-:
+:
: *_(Array must be **Stopped** to change)_*
diff --git a/emhttp/plugins/dynamix/include/FileTree.php b/emhttp/plugins/dynamix/include/FileTree.php
index e9f174362..377b6657f 100644
--- a/emhttp/plugins/dynamix/include/FileTree.php
+++ b/emhttp/plugins/dynamix/include/FileTree.php
@@ -45,14 +45,15 @@ $docroot = '/usr/local/emhttp';
require_once "$docroot/webGui/include/Secure.php";
$rootdir = path(realpath($_POST['dir']));
+$topdir = '/mnt/';
+$userdir = '/mnt/user/';
$filters = (array)$_POST['filter'];
$match = $_POST['match'];
$checkbox = $_POST['multiSelect'] == 'true' ? "" : "";
/* Excluded folders to not show in the dropdown in the '/mnt/' directory only. */
$excludedFolders = ['RecycleBin', 'addons', 'rootshare'];
-
-$udShares = ['addons','disks','remotes'];
+$udShares = ['disks','remotes'];
echo "
";
if ($_POST['show_parent'] == 'true' && is_top($rootdir)) {
@@ -62,10 +63,6 @@ if ($_POST['show_parent'] == 'true' && is_top($rootdir)) {
if (is_low($rootdir) && is_dir($rootdir)) {
$dirs = $files = [];
$names = array_filter(scandir($rootdir, SCANDIR_SORT_NONE), function($n){return $n != '.' && $n != '..';});
- if (is_top($rootdir)) {
- // add unassigned devices top level shares
- foreach ($udShares as $name) if (is_dir($rootdir.$name) && !in_array($rootdir.$name, $names)) $names[] = $rootdir.$name;
- }
natcasesort($names);
foreach ($names as $name) {
if (is_dir($rootdir.$name)) {
@@ -82,12 +79,18 @@ if (is_low($rootdir) && is_dir($rootdir)) {
if ($name === '.Recycle.Bin') continue;
/* Exclude folders only when directory is '/mnt/' */
- if (in_array($name, $excludedFolders) && $rootdir === '/mnt/') continue;
+ if (in_array($name, $excludedFolders) && $rootdir === $topdir) continue;
if (empty($match) || preg_match("/$match/", $rootdir.$name.'/')) {
echo "- $checkbox$htmlName
";
}
}
+ if ($rootdir === $userdir) {
+ // add unassigned devices top level shares
+ foreach ($udShares as $name) if (is_dir($topdir.$name)) {
+ echo "- $checkbox$name
";
+ }
+ }
foreach ($files as $name) {
$htmlRel = htmlspecialchars($rootdir . $name);
$htmlName = htmlspecialchars($name);
diff --git a/emhttp/plugins/dynamix/sheets/SMBExtras.css b/emhttp/plugins/dynamix/sheets/SMBExtras.css
new file mode 100644
index 000000000..58fc35623
--- /dev/null
+++ b/emhttp/plugins/dynamix/sheets/SMBExtras.css
@@ -0,0 +1,5 @@
+textarea {
+ resize: none;
+ font-family: bitstream;
+ width: 63%;
+}