Revision 1087
Added by Matthias over 16 years ago
| index.php | ||
|---|---|---|
| 43 | 43 |
// Insert values |
| 44 | 44 |
$template->set_block('main_block', 'dir_list_block', 'dir_list');
|
| 45 | 45 |
$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY); |
| 46 |
$currentHome = $admin->get_home_folder(); |
|
| 47 |
|
|
| 48 |
if ($currentHome){
|
|
| 49 |
$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY.$currentHome); |
|
| 50 |
} |
|
| 51 |
else |
|
| 52 |
{
|
|
| 53 |
$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY); |
|
| 54 |
} |
|
| 46 | 55 |
$array_lowercase = array_map('strtolower', $dirs);
|
| 47 | 56 |
array_multisort($array_lowercase, SORT_ASC, SORT_STRING, $dirs); |
| 48 | 57 |
foreach($dirs AS $name) {
|
| ... | ... | |
| 62 | 71 |
if ($_SESSION['GROUP_ID'] != 1 && $pathsettings['global']['admin_only']) { // Only show admin the settings link
|
| 63 | 72 |
$template->set_var('DISPLAY_SETTINGS', 'hide');
|
| 64 | 73 |
} |
| 74 |
// Workout if the up arrow should be shown |
|
| 75 |
if(($dirs == '') or ($dirs==$currentHome) or (!array_key_exists('dir', $_GET))) {
|
|
| 76 |
$display_up_arrow = 'hide'; |
|
| 77 |
} else {
|
|
| 78 |
$display_up_arrow = ''; |
|
| 79 |
} |
|
| 65 | 80 |
|
| 66 | 81 |
// Insert language headings |
| 67 | 82 |
$template->set_var(array( |
| 68 | 83 |
'HEADING_BROWSE_MEDIA' => $HEADING['BROWSE_MEDIA'], |
| 84 |
'HOME_DIRECTORY' => $currentHome, |
|
| 85 |
'DISPLAY_UP_ARROW' => $display_up_arrow, // **! |
|
| 69 | 86 |
'HEADING_CREATE_FOLDER' => $HEADING['CREATE_FOLDER'], |
| 70 | 87 |
'HEADING_UPLOAD_FILES' => $HEADING['UPLOAD_FILES'] |
| 71 | 88 |
) |
Also available in: Unified diff
Fixed bug with home folders are viewable and writable from other users (ticket #605 and #748) (Thanks to Aldus)