try to show disk name as folder in home page
parent
7a86da6764
commit
4ef20bdf50
|
@ -263,6 +263,7 @@ function main($path)
|
||||||
foreach ($disktags as $disktag) {
|
foreach ($disktags as $disktag) {
|
||||||
$files['children'][$disktag]['folder'] = 1;
|
$files['children'][$disktag]['folder'] = 1;
|
||||||
$files['children'][$disktag]['name'] = $disktag;
|
$files['children'][$disktag]['name'] = $disktag;
|
||||||
|
$files['children'][$disktag]['showname'] = getConfig('diskname', $disktag);
|
||||||
}
|
}
|
||||||
if ($_GET['json']) {
|
if ($_GET['json']) {
|
||||||
// return a json
|
// return a json
|
||||||
|
@ -2332,7 +2333,7 @@ function render_list($path = '', $files = '')
|
||||||
if ($_SERVER['admin'] or !isHideFile($file['name'])) {
|
if ($_SERVER['admin'] or !isHideFile($file['name'])) {
|
||||||
$filenum++;
|
$filenum++;
|
||||||
$FolderListStr = str_replace('<!--FileEncodeReplaceUrl-->', path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])), $FolderList);
|
$FolderListStr = str_replace('<!--FileEncodeReplaceUrl-->', path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])), $FolderList);
|
||||||
$FolderListStr = str_replace('<!--FileEncodeReplaceName-->', str_replace('&','&', $file['name']), $FolderListStr);
|
$FolderListStr = str_replace('<!--FileEncodeReplaceName-->', str_replace('&','&', $file['showname']?$file['showname']:$file['name']), $FolderListStr);
|
||||||
$FolderListStr = str_replace('<!--lastModifiedDateTime-->', time_format($file['lastModifiedDateTime']), $FolderListStr);
|
$FolderListStr = str_replace('<!--lastModifiedDateTime-->', time_format($file['lastModifiedDateTime']), $FolderListStr);
|
||||||
$FolderListStr = str_replace('<!--size-->', size_format($file['size']), $FolderListStr);
|
$FolderListStr = str_replace('<!--size-->', size_format($file['size']), $FolderListStr);
|
||||||
while (strpos($FolderListStr, '<!--filenum-->')) $FolderListStr = str_replace('<!--filenum-->', $filenum, $FolderListStr);
|
while (strpos($FolderListStr, '<!--filenum-->')) $FolderListStr = str_replace('<!--filenum-->', $filenum, $FolderListStr);
|
||||||
|
|
Loading…
Reference in New Issue