Project

General

Profile

« Previous | Next » 

Revision 1824

Added by Dietmar almost 12 years ago

! update media in look to the changes in user management

View differences:

browse.php
32 32
$starttime = $starttime[0]+$starttime[1];
33 33

  
34 34
// Include the WB functions file
35
require_once(WB_PATH.'/framework/functions.php');
35
if(!function_exists('directory_list')) { require(WB_PATH.'/framework/functions.php'); }
36 36
include ('parameters.php');
37 37

  
38 38
// check if theme language file exists for the language set by the user (e.g. DE, EN)
......
129 129
$template->set_block('page', 'main_block', 'main');
130 130

  
131 131
// Get the current dir
132
$currentHome = $admin->get_home_folder();
132
//$currentHome = $admin->get_home_folder();
133
$currentHome = (defined('HOME_FOLDERS') && HOME_FOLDERS) ? $admin->get_home_folder() : '';
134

  
133 135
// set directory if you call from menu
134 136
$directory =	(($currentHome) AND (!array_key_exists('dir',$_GET)))
135 137
				?
......
141 143
if ($currentHome && stripos(WB_PATH.MEDIA_DIRECTORY.$directory,WB_PATH.MEDIA_DIRECTORY.$currentHome)===false) {
142 144
	$directory = $currentHome;
143 145
}
146
if($directory == '/' OR $directory == '\\') {$directory = '';}
144 147

  
145
if($directory == '/' OR $directory == '\\') {
146
	$directory = '';
148
$sBackLink = WB_PATH.MEDIA_DIRECTORY.$directory;
149
if(!is_readable( $sBackLink )) {
150
$directory = dirname($directory);
151
// reload parent page to rebuild the dropdowns
152
echo "<script type=\"text/javascript\">
153
<!--
154
// Get the location object
155
var locationObj = document.location;
156
// Set the value of the location object
157
parent.document.location = 'index.php';
158
-->
159
</script>";
147 160
}
148 161

  
149 162
$dir_backlink = 'browse.php?dir='.$directory;
......
191 204
			);
192 205

  
193 206
// Get home folder not to show
194
$home_folders = get_home_folders();
207
//$home_folders = get_home_folders();
208
$home_folders = (defined('HOME_FOLDERS') && HOME_FOLDERS) ? get_home_folders() : array();
195 209

  
196 210
// Generate list
197 211
$template->set_block('main_block', 'list_block', 'list');
......
330 344
	$template->set_var('DISPLAY_NONE_FOUND', 'hide');
331 345
}
332 346

  
333
if($currentHome=='') {
347
//if($currentHome=='') {
348
if( !in_array($admin->get_username(), explode('/',$directory)) ) {
334 349
// Insert permissions values
335 350
    if($admin->get_permission('media_rename') != true) {
336 351
    	$template->set_var('DISPLAY_RENAME', 'hide');

Also available in: Unified diff