Project

General

Profile

« Previous | Next » 

Revision 1468

Added by Dietmar over 13 years ago

update jquery-min to version 1.6.2
update jquery-ui-min to version 1.8.14
fix index error in media upload (Tks to DBS)
add missing nopreview.jpg
update media browser not to show forbidden files
remove unused jquery archiv folder

View differences:

browse.php
151 151
// $filename =  $currentdir;
152 152
if(!empty($currentdir)) {
153 153
	$usedFiles = $Dse->getMatchesFromDir( $currentdir, DseTwo::RETURN_USED);
154
/*
155
print '<pre><strong>function '.__FUNCTION__.'();</strong>  basename: '.basename(__FILE__).'  line: '.__LINE__.' -> <br />';
156
print_r( $usedFiles ); print '</pre>'; // flush ();sleep(10); die();
157
*/
158 154
}
159 155

  
156
$rename_file_types  = str_replace(',','|',RENAME_FILES_ON_UPLOAD);
157
// hardcodet forbidden filetypes
158
$forbidden_file_types = 'phtml|php5|php4|php|cgi|pl|exe|com|bat|src|'.$rename_file_types;
159

  
160 160
if($handle = opendir(WB_PATH.MEDIA_DIRECTORY.'/'.$directory)) {
161 161
	// Loop through the files and dirs an add to list
162 162
	while(false !== ($file = readdir($handle))) {
......
166 166
					$DIR[] = $file;
167 167
				}
168 168
			} else {
169
				$FILE[] = $file;
169
				$info = pathinfo($file);
170
				$ext = isset($info['extension']) ? $info['extension'] : '';
171
				if( !preg_match('/'.$forbidden_file_types.'$/i', $ext) ) {
172
					$FILE[] = $file;
173
				}
170 174
			}
171 175
		}
172 176
	}

Also available in: Unified diff