From 9e420e46398fee6ccf9ca2f9288561c3673b6c34 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sun, 10 Jul 2011 18:12:11 -0400 Subject: [PATCH 1/3] Home icon now points to index.php --- files/templates/part.breadcrumb.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/part.breadcrumb.php b/files/templates/part.breadcrumb.php index 34f955fe675..64e0a474728 100644 --- a/files/templates/part.breadcrumb.php +++ b/files/templates/part.breadcrumb.php @@ -1,5 +1,5 @@
- ">" alt="Root"/> + ">" alt="Root"/>
From 190908bc1e48a8c948c8fed8251c85a2055bd0a6 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 12 Jul 2011 17:45:01 +0200 Subject: [PATCH 2/3] fix error in autocomplete when try to list non-existing or unreadable folders --- files/ajax/autocomplete.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/files/ajax/autocomplete.php b/files/ajax/autocomplete.php index af235379800..2c2f665fd6c 100644 --- a/files/ajax/autocomplete.php +++ b/files/ajax/autocomplete.php @@ -40,17 +40,19 @@ $query=strtolower($query); $files=array(); -if(OC_FILESYSTEM::is_dir($base)){ +if(OC_FILESYSTEM::file_exists($base) and OC_FILESYSTEM::is_dir($base)){ $dh = OC_FILESYSTEM::opendir($base); - if(substr($base,-1,1)!='/'){ - $base=$base.'/'; - } - while (($file = readdir($dh)) !== false) { - if ($file != "." && $file != ".."){ - if(substr(strtolower($file),0,$queryLen)==$query){ - $item=$base.$file; - if((!$dirOnly or OC_FILESYSTEM::is_dir($item))){ - $files[]=(object)array('id'=>$item,'label'=>$item,'name'=>$item); + if($dh){ + if(substr($base,-1,1)!='/'){ + $base=$base.'/'; + } + while (($file = readdir($dh)) !== false) { + if ($file != "." && $file != ".."){ + if(substr(strtolower($file),0,$queryLen)==$query){ + $item=$base.$file; + if((!$dirOnly or OC_FILESYSTEM::is_dir($item))){ + $files[]=(object)array('id'=>$item,'label'=>$item,'name'=>$item); + } } } } From f8eced1960ae9a17cebcb4432ff737a83327c1be Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Tue, 12 Jul 2011 18:26:44 -0400 Subject: [PATCH 3/3] Fix post_create and post_write hooks in copy(), was referencing an undefined variable --- lib/filesystem.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/filesystem.php b/lib/filesystem.php index e6b1638d8d7..a67a36c9213 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -415,9 +415,9 @@ class OC_FILESYSTEM{ } OC_HOOK::emit( 'OC_FILESYSTEM', 'post_copy', array( 'oldpath' => $path1 ,'newpath'=>$path2)); if(!$exists){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'post_create', array( 'path' => $path)); + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_create', array( 'path' => $path2)); } - OC_HOOK::emit( 'OC_FILESYSTEM', 'post_write', array( 'path' => $path)); + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_write', array( 'path' => $path2)); return $result; } }