Exemple #1
0
 if ($php54 && !empty($config['googleapi_id']) && !empty($config['googleapi_secret'])) {
     //require dirname(__FILE__) . '/class/xelFinderFlysystemGoogleDriveNetmount.php';
     elFinder::$netDrivers['googledrive'] = 'GoogleDrive';
     define('ELFINDER_GOOGLEDRIVE_CLIENTID', $config['googleapi_id']);
     define('ELFINDER_GOOGLEDRIVE_CLIENTSECRET', $config['googleapi_secret']);
 }
 // one drive
 if (!empty($config['onedriveapi_id']) && !empty($config['onedriveapi_secret'])) {
     elFinder::$netDrivers['onedrive'] = 'OneDrive';
     define('ELFINDER_ONEDRIVE_CLIENTID', $config['onedriveapi_id']);
     define('ELFINDER_ONEDRIVE_CLIENTSECRET', $config['onedriveapi_secret']);
 }
 // load xoops_elFinder
 include_once dirname(__FILE__) . '/class/xoops_elFinder.class.php';
 $xoops_elFinder = new xoops_elFinder($mydirname);
 $xoops_elFinder->setConfig($config);
 $xoops_elFinder->setLogfile($debug ? XOOPS_TRUST_PATH . '/cache/elfinder.log.txt' : '');
 // Access control
 include_once dirname(__FILE__) . '/class/xelFinderAccess.class.php';
 // get user roll
 $userRoll = $xoops_elFinder->getUserRoll();
 $isAdmin = $userRoll['isAdmin'];
 // Get volumes
 if (isset($_SESSION['XELFINDER_RF_' . $mydirname]) && $_SESSION['XELFINDER_CFG_HASH_' . $mydirname] === $config_MD5) {
     $rootConfig = unserialize(base64_decode($_SESSION['XELFINDER_RF_' . $mydirname]));
 } else {
     $memberUid = $userRoll['uid'];
     $memberGroups = $userRoll['mygids'];
     $inSpecialGroup = $userRoll['inSpecialGroup'];
     // set umask
     foreach (array('default', 'users_dir', 'guest_dir', 'group_dir') as $_key) {