fixed error elFinder
This commit is contained in:
parent
02ad88aa6d
commit
73e7f4ae1f
@ -14,20 +14,25 @@ $fmgmap = $_POST['fmgmap'];
|
||||
if ($fmgmap == 'dir_upl')
|
||||
{
|
||||
|
||||
$gmfmen = '
|
||||
<?php
|
||||
$gmfmen = '<?php
|
||||
error_reporting(0);
|
||||
define ("START_MICROTIME", microtime());
|
||||
define ("START_MEMORY", memory_get_usage());
|
||||
define("ACP", 1);
|
||||
define("BASE_DIR", str_replace("\\\", "/", dirname(dirname(dirname(dirname(dirname(__FILE__)))))));
|
||||
include_once "../../../../inc/init.php";
|
||||
define("SESSION", session_id());
|
||||
include_once BASE_DIR . "/inc/init.php";
|
||||
if (! check_permission("mediapool_finder"))
|
||||
{
|
||||
header("Location:/index.php");
|
||||
exit;
|
||||
die("No permission");
|
||||
}
|
||||
require "./autoload.php";
|
||||
elFinder::$netDrivers["ftp"] = "FTP";
|
||||
function access($attr, $path, $data, $volume) {
|
||||
return strpos(basename($path), ".") === 0
|
||||
|
||||
function access($attr, $path, $data, $volume, $isDir, $relpath) {
|
||||
$basename = basename($path);
|
||||
return $basename[0] === "."
|
||||
&& strlen($relpath) !== 1
|
||||
? !($attr == "read" || $attr == "write")
|
||||
: null;
|
||||
}
|
||||
@ -100,17 +105,23 @@ if ($fmgmap == 'dir_uplgmi')
|
||||
{
|
||||
$gmfmen = '<?php
|
||||
error_reporting(0);
|
||||
define ("START_MICROTIME", microtime());
|
||||
define ("START_MEMORY", memory_get_usage());
|
||||
define("ACP", 1);
|
||||
define("BASE_DIR", str_replace("\\\", "/", dirname(dirname(dirname(dirname(dirname(__FILE__)))))));
|
||||
include_once "../../../../inc/init.php";
|
||||
define("SESSION", session_id());
|
||||
include_once BASE_DIR . "/inc/init.php";
|
||||
if (! check_permission("mediapool_finder"))
|
||||
{
|
||||
header("Location:/index.php");
|
||||
exit;
|
||||
die("No permission");
|
||||
}
|
||||
require "./autoload.php";
|
||||
elFinder::$netDrivers["ftp"] = "FTP";
|
||||
function access($attr, $path, $data, $volume) {
|
||||
return strpos(basename($path), ".") === 0
|
||||
|
||||
function access($attr, $path, $data, $volume, $isDir, $relpath) {
|
||||
$basename = basename($path);
|
||||
return $basename[0] === "."
|
||||
&& strlen($relpath) !== 1
|
||||
? !($attr == "read" || $attr == "write")
|
||||
: null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user