Skip to content
Permalink
Browse files

Add config option to ignore specified files or folders when importing…

… paths
  • Loading branch information...
Magnus Vikstrøm
Magnus Vikstrøm committed Oct 16, 2015
1 parent 5716919 commit 9cefd88972a31ea09e0f712518a8361f2eb5ef18
Showing with 10 additions and 1 deletion.
  1. +5 −0 app/config/core.php
  2. +5 −1 cake/libs/configure.php
@@ -247,6 +247,11 @@
*/
//date_default_timezone_set('UTC');
/**
* Add files or folders that should be ignored by CakePHP when scanning application folder.
*/
//Configure::write('ignorePaths', array('.svn', '.git', 'CVS', 'tests', 'templates', 'node_modules'));
/**
*
* Cache Engine Configuration
@@ -1035,7 +1035,11 @@ function __find($file, $recursive = true) {
require LIBS . 'folder.php';
}
$Folder =& new Folder();
$directories = $Folder->tree($path, array('.svn', '.git', 'CVS', 'tests', 'templates'), 'dir');
$ignorePaths = Configure::read('ignorePaths');
if(empty($ignorePaths)) {
$ignorePaths = array('.svn', '.git', 'CVS', 'tests', 'templates');
}
$directories = $Folder->tree($path, $ignorePaths, 'dir');
sort($directories);
$this->__paths[$path] = $directories;
}

0 comments on commit 9cefd88

Please sign in to comment.
You can’t perform that action at this time.