mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-03 06:13:41 +02:00
Merge a8aae96f5c
into ca4b1b1743
This commit is contained in:
commit
9186589e88
|
@ -66,6 +66,12 @@ $root_path = $_SERVER['DOCUMENT_ROOT'];
|
|||
// Will not working if $root_path will be outside of server document root
|
||||
$root_url = '';
|
||||
|
||||
// Static ressource URL used only for direct links
|
||||
// comes in handy if fm handles files that are public, but on a different URL
|
||||
// gives users a copy&paste able direct link they can use
|
||||
// eg. https://example.org/foo/file.png where fm is hosted on https://backend.example.org/files/index.php
|
||||
$static_url = '';
|
||||
|
||||
// Server hostname. Can set manually if wrong
|
||||
// $_SERVER['HTTP_HOST'].'/folder'
|
||||
$http_host = $_SERVER['HTTP_HOST'];
|
||||
|
@ -271,6 +277,10 @@ $root_url = fm_clean_path($root_url);
|
|||
defined('FM_ROOT_URL') || define('FM_ROOT_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . (!empty($root_url) ? '/' . $root_url : ''));
|
||||
defined('FM_SELF_URL') || define('FM_SELF_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . $_SERVER['PHP_SELF']);
|
||||
|
||||
// only used to directly link to ressources
|
||||
//$static_url = fm_clean_path($static_url);
|
||||
defined('FM_STATIC_URL') || define('FM_STATIC_URL', !empty($static_url) ? $static_url : $FM_ROOT_URL);
|
||||
|
||||
// logout
|
||||
if (isset($_GET['logout'])) {
|
||||
unset($_SESSION[FM_SESSION_ID]['logged']);
|
||||
|
@ -2113,7 +2123,7 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
|
|||
<a title="<?php echo lng('Rename')?>" href="#" onclick="rename('<?php echo fm_enc(addslashes(FM_PATH)) ?>', '<?php echo fm_enc(addslashes($f)) ?>');return false;"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>
|
||||
<a title="<?php echo lng('CopyTo')?>..." href="?p=&copy=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="fa fa-files-o" aria-hidden="true"></i></a>
|
||||
<?php endif; ?>
|
||||
<a title="<?php echo lng('DirectLink')?>" href="<?php echo fm_enc(FM_ROOT_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f . '/') ?>" target="_blank"><i class="fa fa-link" aria-hidden="true"></i></a>
|
||||
<a title="<?php echo lng('DirectLink')?>" href="<?php echo fm_enc(FM_STATIC_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f . '/') ?>" target="_blank"><i class="fa fa-link" aria-hidden="true"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
@ -2184,7 +2194,7 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
|
|||
<a title="<?php echo lng('CopyTo') ?>..."
|
||||
href="?p=<?php echo urlencode(FM_PATH) ?>&copy=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="fa fa-files-o"></i></a>
|
||||
<?php endif; ?>
|
||||
<a title="<?php echo lng('DirectLink') ?>" href="<?php echo fm_enc(FM_ROOT_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f) ?>" target="_blank"><i class="fa fa-link"></i></a>
|
||||
<a title="<?php echo lng('DirectLink') ?>" href="<?php echo fm_enc(FM_STATIC_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f) ?>" target="_blank"><i class="fa fa-link"></i></a>
|
||||
<a title="<?php echo lng('Download') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&dl=<?php echo urlencode($f) ?>" onclick="confirmDailog(event, 1211, '<?php echo lng('Download'); ?>','<?php echo urlencode($f); ?>', this.href);"><i class="fa fa-download"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue