Revision 1087
Added by Matthias over 15 years ago
trunk/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
|
13 | 13 |
------------------------------------- 2.8.0 ------------------------------------- |
14 |
22-July 2009 Matthias Gallas |
|
15 |
# Fixed bug with home folders are viewable and writable from other users |
|
16 |
(ticket #605 and #748) (Thanks to Aldus) |
|
14 | 17 |
20-July 2009 Matthias Gallas |
15 | 18 |
! Moved backend.js back from <body> to <head> |
16 | 19 |
+ Added possibility to add a backend_body.js to modules wich is then called in <body> |
trunk/wb/admin/media/browse.php | ||
---|---|---|
77 | 77 |
$template->set_block('page', 'main_block', 'main'); |
78 | 78 |
|
79 | 79 |
// Get the current dir |
80 |
$directory = $admin->strip_slashes($admin->get_get('dir')); |
|
80 |
$currentHome = $admin->get_home_folder(); |
|
81 |
$directory = (($currentHome) AND (!array_key_exists('dir',$_GET))) |
|
82 |
? |
|
83 |
$currentHome |
|
84 |
: |
|
85 |
$admin->strip_slashes($admin->get_get('dir')) ; |
|
81 | 86 |
if($directory == '/' OR $directory == '\\') { |
82 | 87 |
$directory = ''; |
83 | 88 |
} |
... | ... | |
107 | 112 |
// Workout the parent dir link |
108 | 113 |
$parent_dir_link = ADMIN_URL.'/media/browse.php?dir='.$directory.'&up=1'; |
109 | 114 |
// Workout if the up arrow should be shown |
110 |
if($directory == '') {
|
|
115 |
if(($directory == '') or ($directory==$currentHome)) {
|
|
111 | 116 |
$display_up_arrow = 'hide'; |
112 | 117 |
} else { |
113 | 118 |
$display_up_arrow = ''; |
trunk/wb/admin/media/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 |
) |
trunk/wb/templates/classic_theme/templates/media.htt | ||
---|---|---|
19 | 19 |
<td width="100">{TEXT_TARGET_FOLDER}:</td> |
20 | 20 |
<td> |
21 | 21 |
<select name="target" style="width: 100%;"> |
22 |
<option value="{MEDIA_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}</option>
|
|
22 |
<option value="{MEDIA_DIRECTORY}{HOME_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}{HOME_DIRECTORY}</option>
|
|
23 | 23 |
<!-- BEGIN dir_list_block --> |
24 | 24 |
<option value="{NAME}">{NAME}</option> |
25 | 25 |
<!-- END dir_list_block --> |
... | ... | |
53 | 53 |
<td width="100">{TEXT_TARGET_FOLDER}:</td> |
54 | 54 |
<td> |
55 | 55 |
<select name="target" style="width: 100%;"> |
56 |
<option value="{MEDIA_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}</option>
|
|
56 |
<option value="{MEDIA_DIRECTORY}{HOME_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}{HOME_DIRECTORY}</option>
|
|
57 | 57 |
<!-- BEGIN dir_list_block --> |
58 | 58 |
<option value="{NAME}">{NAME}</option> |
59 | 59 |
<!-- END dir_list_block --> |
trunk/wb/templates/wb_theme/templates/media.htt | ||
---|---|---|
30 | 30 |
<td width="100">{TEXT_TARGET_FOLDER}:</td> |
31 | 31 |
<td> |
32 | 32 |
<select name="target" style="width: 100%;"> |
33 |
<option value="{MEDIA_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}</option>
|
|
33 |
<option value="{MEDIA_DIRECTORY}{HOME_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}{HOME_DIRECTORY}</option>
|
|
34 | 34 |
<!-- BEGIN dir_list_block --> |
35 | 35 |
<option value="{NAME}">{NAME}</option> |
36 | 36 |
<!-- END dir_list_block --> |
... | ... | |
63 | 63 |
<td width="100">{TEXT_TARGET_FOLDER}:</td> |
64 | 64 |
<td> |
65 | 65 |
<select name="target" style="width: 100%;"> |
66 |
<option value="{MEDIA_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}</option>
|
|
66 |
<option value="{MEDIA_DIRECTORY}{HOME_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}{HOME_DIRECTORY}</option>
|
|
67 | 67 |
<!-- BEGIN dir_list_block --> |
68 | 68 |
<option value="{NAME}">{NAME}</option> |
69 | 69 |
<!-- END dir_list_block --> |
trunk/wb/templates/argos_theme/templates/media.htt | ||
---|---|---|
27 | 27 |
onChange="browse.location.href='browse.php?dir=' + |
28 | 28 |
document.upload.target.value.substr(6,100); |
29 | 29 |
document.create.target.value = document.upload.target.value;"> |
30 |
<option value="{MEDIA_DIRECTORY}" selected>{MEDIA_DIRECTORY}</option>
|
|
30 |
<option value="{MEDIA_DIRECTORY}{HOME_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}{HOME_DIRECTORY}</option>
|
|
31 | 31 |
<!-- BEGIN dir_list_block --> |
32 | 32 |
<option value="{NAME}">{NAME}</option> |
33 | 33 |
<!-- END dir_list_block --> |
... | ... | |
104 | 104 |
<tr> |
105 | 105 |
<td>{TEXT_TARGET_FOLDER}:<br /> |
106 | 106 |
<select name="target" style="width:100%;"> |
107 |
<option value="{MEDIA_DIRECTORY}" selected>{MEDIA_DIRECTORY} </option>
|
|
107 |
<option value="{MEDIA_DIRECTORY}{HOME_DIRECTORY}" selected="selected">{MEDIA_DIRECTORY}{HOME_DIRECTORY}</option>
|
|
108 | 108 |
<!-- BEGIN dir_list_block --> |
109 | 109 |
<option value="{NAME}">{NAME} </option> |
110 | 110 |
<!-- END dir_list_block --> |
Also available in: Unified diff
Fixed bug with home folders are viewable and writable from other users (ticket #605 and #748) (Thanks to Aldus)