Browse Source

added .hgignore to list of typically ignored files

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
c006ebeb49
  1. 4
      framework/console/controllers/AppController.php
  2. 4
      framework/web/AssetManager.php

4
framework/console/controllers/AppController.php

@ -294,7 +294,7 @@ class AppController extends Controller
* @param string $targetDir the target directory
* @param string $baseDir base directory
* @param array $ignoreFiles list of the names of files that should
* be ignored in list building process. Argument available since 1.1.11.
* be ignored in list building process.
* @param array $renameMap hash array of file names that should be
* renamed. Example value: array('1.old.txt'=>'2.new.txt').
* @return array the file list (see {@link copyFiles})
@ -304,7 +304,7 @@ class AppController extends Controller
$list = array();
$handle = opendir($sourceDir);
while(($file = readdir($handle)) !== false) {
if(in_array($file, array('.', '..', '.svn', '.gitignore')) || in_array($file, $ignoreFiles)) {
if(in_array($file, array('.', '..', '.svn', '.gitignore', '.hgignore')) || in_array($file, $ignoreFiles)) {
continue;
}
$sourcePath = $sourceDir.DIRECTORY_SEPARATOR.$file;

4
framework/web/AssetManager.php

@ -55,9 +55,9 @@ class AssetManager extends Component
public $linkAssets = false;
/**
* @var array list of directories and files which should be excluded from the publishing process.
* Defaults to exclude '.svn' and '.gitignore' files only. This option has no effect if {@link linkAssets} is enabled.
* Defaults to exclude '.svn', '.gitignore' and '.hgignore' files only. This option has no effect if {@link linkAssets} is enabled.
**/
public $excludeFiles = array('.svn', '.gitignore');
public $excludeFiles = array('.svn', '.gitignore', '.hgignore');
/**
* @var integer the permission to be set for newly published asset files.
* This value will be used by PHP chmod() function.

Loading…
Cancel
Save