|
|
@@ -131,6 +131,11 @@ function organizrSpecialSettings()
|
|
|
'debugArea' => qualifyRequest($GLOBALS['debugAreaAuth']),
|
|
|
'debugErrors' => $GLOBALS['debugErrors'],
|
|
|
'sandbox' => $GLOBALS['sandbox'],
|
|
|
+ ),
|
|
|
+ 'menuLink' => array(
|
|
|
+ 'githubMenuLink' => $GLOBALS['githubMenuLink'],
|
|
|
+ 'organizrSupportMenuLink' => $GLOBALS['organizrSupportMenuLink'],
|
|
|
+ 'organizrDocsMenuLink' => $GLOBALS['organizrDocsMenuLink']
|
|
|
)
|
|
|
);
|
|
|
}
|
|
|
@@ -825,6 +830,10 @@ function getSettingsMain()
|
|
|
'name' => 'Allow Top Navigation',
|
|
|
'value' => 'allow-top-navigation'
|
|
|
),
|
|
|
+ array(
|
|
|
+ 'name' => 'Allow Downloads',
|
|
|
+ 'value' => 'allow-downloads'
|
|
|
+ ),
|
|
|
)
|
|
|
),
|
|
|
array(
|
|
|
@@ -1236,6 +1245,24 @@ function getCustomizeAppearance()
|
|
|
'label' => 'Show Debug Errors',
|
|
|
'value' => $GLOBALS['debugErrors']
|
|
|
),
|
|
|
+ array(
|
|
|
+ 'type' => 'switch',
|
|
|
+ 'name' => 'githubMenuLink',
|
|
|
+ 'label' => 'Show GitHub Repo Link',
|
|
|
+ 'value' => $GLOBALS['githubMenuLink']
|
|
|
+ ),
|
|
|
+ array(
|
|
|
+ 'type' => 'switch',
|
|
|
+ 'name' => 'organizrSupportMenuLink',
|
|
|
+ 'label' => 'Show Organizr Support Link',
|
|
|
+ 'value' => $GLOBALS['organizrSupportMenuLink']
|
|
|
+ ),
|
|
|
+ array(
|
|
|
+ 'type' => 'switch',
|
|
|
+ 'name' => 'organizrDocsMenuLink',
|
|
|
+ 'label' => 'Show Organizr Docs Link',
|
|
|
+ 'value' => $GLOBALS['organizrDocsMenuLink']
|
|
|
+ ),
|
|
|
array(
|
|
|
'type' => 'select',
|
|
|
'name' => 'unsortedTabs',
|
|
|
@@ -1787,16 +1814,35 @@ function showoAuth()
|
|
|
|
|
|
function getImages()
|
|
|
{
|
|
|
+ $allIconsPrep = array();
|
|
|
+ $allIcons = array();
|
|
|
+ $ignore = array(".", "..", "._.DS_Store", ".DS_Store", ".pydio_id", "index.html");
|
|
|
$dirname = dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'tabs' . DIRECTORY_SEPARATOR;
|
|
|
$path = 'plugins/images/tabs/';
|
|
|
$images = scandir($dirname);
|
|
|
- $ignore = array(".", "..", "._.DS_Store", ".DS_Store", ".pydio_id");
|
|
|
- $allIcons = array();
|
|
|
foreach ($images as $image) {
|
|
|
if (!in_array($image, $ignore)) {
|
|
|
- $allIcons[] = $path . $image;
|
|
|
+ $allIconsPrep[$image] = array(
|
|
|
+ 'path' => $path,
|
|
|
+ 'name' => $image
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
+ $dirname = dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'userTabs' . DIRECTORY_SEPARATOR;
|
|
|
+ $path = 'plugins/images/userTabs/';
|
|
|
+ $images = scandir($dirname);
|
|
|
+ foreach ($images as $image) {
|
|
|
+ if (!in_array($image, $ignore)) {
|
|
|
+ $allIconsPrep[$image] = array(
|
|
|
+ 'path' => $path,
|
|
|
+ 'name' => $image
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ksort($allIconsPrep);
|
|
|
+ foreach ($allIconsPrep as $item) {
|
|
|
+ $allIcons[] = $item['path'] . $item['name'];
|
|
|
+ }
|
|
|
return $allIcons;
|
|
|
}
|
|
|
|
|
|
@@ -1817,7 +1863,7 @@ function editImages()
|
|
|
$array = array();
|
|
|
$postCheck = array_filter($_POST);
|
|
|
$filesCheck = array_filter($_FILES);
|
|
|
- $approvedPath = 'plugins/images/tabs/';
|
|
|
+ $approvedPath = 'plugins/images/userTabs/';
|
|
|
if (!empty($postCheck)) {
|
|
|
$removeImage = $approvedPath . pathinfo($_POST['data']['imagePath'], PATHINFO_BASENAME);
|
|
|
if ($_POST['data']['action'] == 'deleteImage' && approvedFileExtension($removeImage)) {
|
|
|
@@ -1831,7 +1877,7 @@ function editImages()
|
|
|
ini_set('upload_max_filesize', '10M');
|
|
|
ini_set('post_max_size', '10M');
|
|
|
$tempFile = $_FILES['file']['tmp_name'];
|
|
|
- $targetPath = dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'tabs' . DIRECTORY_SEPARATOR;
|
|
|
+ $targetPath = dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'userTabs' . DIRECTORY_SEPARATOR;
|
|
|
$targetFile = $targetPath . $_FILES['file']['name'];
|
|
|
return (move_uploaded_file($tempFile, $targetFile)) ? true : false;
|
|
|
}
|