Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Add the function filterNodeName() to the AjxpWrapperProvider, and use…
Browse files Browse the repository at this point in the history
… it in the webdav collection to correctly load the hidden files/folders configurations. Alternative to fix #862 and fix #861
  • Loading branch information
cdujeu committed Mar 20, 2015
1 parent a6c2f85 commit 481e176
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions core/src/core/classes/interface.AjxpWrapperProvider.php
Expand Up @@ -63,6 +63,17 @@ public function nodeChanged(&$from, &$to, $copy = false);

/**
* @param String $node
* @param null $newSize
* @return
*/
public function nodeWillChange($node, $newSize = null);

/**
* @param $nodePath
* @param $nodeName
* @param $isLeaf
* @param $lsOptions
* @return mixed
*/
public function filterNodeName($nodePath, $nodeName, &$isLeaf, $lsOptions);
}
Expand Up @@ -153,10 +153,11 @@ public function getChildren()
if ($file == "." || $file == "..") {
continue;
}
if ( !$this->repository->getOption("SHOW_HIDDEN_FILES") && AJXP_Utils::isHidden($file)) {
// This function will perform the is_dir() call and update $isDir variable.
if (!$this->getAccessDriver()->filterNodeName($this->getUrl(), $file, $isLeaf, array("d"=>true, "f"=>true, "z"=>true))){
continue;
}
if ( is_dir( $this->getUrl() . "/" . $file ) ) {
if ( !$isLeaf ) {
// Add collection without any children
$contents[] = new AJXP_Sabre_Collection($this->path."/".$file, $this->repository, $this->getAccessDriver());
} else {
Expand Down

0 comments on commit 481e176

Please sign in to comment.