mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[php:core] add public static function getConnectorUrl()
This commit is contained in:
@@ -123,7 +123,7 @@ class elFinderVolumeFlysystemGoogleDriveNetmount extends \Hypweb\elFinderFlysyst
|
||||
|
||||
if ($options['user'] === 'init') {
|
||||
if (empty($options['url'])) {
|
||||
$options['url'] = $this->getConnectorUrl();
|
||||
$options['url'] = elFinder::getConnectorUrl();
|
||||
}
|
||||
|
||||
$callback = $options['url']
|
||||
@@ -320,22 +320,6 @@ class elFinderVolumeFlysystemGoogleDriveNetmount extends \Hypweb\elFinderFlysyst
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get script url
|
||||
*
|
||||
* @return string full URL
|
||||
* @author Naoki Sawada
|
||||
*/
|
||||
private function getConnectorUrl()
|
||||
{
|
||||
$url = ((isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off')? 'https://' : 'http://')
|
||||
. $_SERVER['SERVER_NAME'] // host
|
||||
. ($_SERVER['SERVER_PORT'] == 80 ? '' : ':' . $_SERVER['SERVER_PORT']) // port
|
||||
. $_SERVER['REQUEST_URI']; // path & query
|
||||
list($url) = explode('?', $url);
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user