[Pkg-owncloud-commits] [owncloud] 13/75: Redirect file browser if directory does not exist

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:08:29 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v3.0.1
in repository owncloud.

commit fadedaab2b645e58da86717c38aad2589d8c37a6
Author: Michael Gapczynski <GapczynskiM at gmail.com>
Date:   Sat Oct 22 01:50:40 2011 -0400

    Redirect file browser if directory does not exist
---
 files/index.php |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/files/index.php b/files/index.php
index aa081d4..13e76d4 100644
--- a/files/index.php
+++ b/files/index.php
@@ -39,6 +39,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 ){

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list