Redirect file browser if directory does not exist
This commit is contained in:
parent
4c256433c0
commit
50bf7a98c2
|
@ -42,6 +42,10 @@ if(!isset($_SESSION['timezone'])){
|
|||
OC_App::setActiveNavigationEntry( "files_index" );
|
||||
// Load the files
|
||||
$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
|
||||
// Redirect if directory does not exist
|
||||
if(!OC_Filesystem::is_dir($dir)) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."");
|
||||
}
|
||||
|
||||
$files = array();
|
||||
foreach( OC_Files::getdirectorycontent( $dir ) as $i ){
|
||||
|
|
Loading…
Reference in New Issue