summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2010-09-23 14:03:17 +0000
committerChristian Schneider2010-09-23 14:03:17 +0000
commitd1c9467b41581d40bda857ebd07a4463d4186250 (patch)
tree20ac1504f7cc3713fa2580af18eaf1f53eb83e85
parent0061f849fb1b36953be7f13413984043e55d388b (diff)
downloaditools-d1c9467b41581d40bda857ebd07a4463d4186250.tar.gz
itools-d1c9467b41581d40bda857ebd07a4463d4186250.tar.bz2
itools-d1c9467b41581d40bda857ebd07a4463d4186250.zip
Add support for .no_it_syntaxconvert in directories to ignore them in syntax conversion traversal
-rw-r--r--it_auto_prepend.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/it_auto_prepend.php b/it_auto_prepend.php
index 556f167..35014ea 100644
--- a/it_auto_prepend.php
+++ b/it_auto_prepend.php
@@ -125,11 +125,14 @@ function it_convert($source)
{
$sourcerelpath = it::replace(array('^(/|\w:)' => ""), $source); # Remove leading / or C:
- if (@is_dir($source) && !@is_link($source))
+ if (@is_dir($source))
{
- ini_set('include_path', $GLOBALS['IT_SYNTAXCONVERTER_DIR'] . "/it_syntaxconverter/$sourcerelpath" . PATH_SEPARATOR . ini_get('include_path'));
- foreach (glob("$source/*") as $file)
- it_convert($file);
+ if (!@is_link($source) && !file_exists("$source/.no_it_syntaxconvert"))
+ {
+ ini_set('include_path', $GLOBALS['IT_SYNTAXCONVERTER_DIR'] . "/it_syntaxconverter/$sourcerelpath" . PATH_SEPARATOR . ini_get('include_path'));
+ foreach (glob("$source/*") as $file)
+ it_convert($file);
+ }
}
else if (@is_readable($source))
{