commit 700a73e89751ce84ef6e7df31ae938e7d1340518
parent 9cea71152e520bc21393f1a0e4be822dbf7b81e3
Author: dankert <devnull@localhost>
Date: Mon, 22 Oct 2007 23:53:05 +0200
Neue Einstellung "chmod" unter theme/compiler.
Diffstat:
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/config/theme.ini.php b/config/theme.ini.php
@@ -1,5 +1,18 @@
; <?php exit('direct access denied') ?>
+; Theme compiler.
+; These settings are only useful for developers!
[compiler]
+
+; Enable the Template Compiler
+; files under themes/default/pages must be writable.
+; default=false
enable=false
-cache=true-
\ No newline at end of file
+
+; Only compile, if the file under themes/default/templates is changed.
+; default=true
+cache=true
+
+; Do a CHMOD on a written file.
+; default=
+chmod=
diff --git a/serviceClasses/TemplateEngine.class.php b/serviceClasses/TemplateEngine.class.php
@@ -98,13 +98,13 @@ class TemplateEngine
$type = '';
$attributes = array();
$value = '';
- $tag = '';
-
+ $tag = '';
+
// Setzt: $tag, $attributes, $value, $type
extract( $line );
-
- $this->actualTagName = $tag;
+
+ $this->actualTagName = $tag;
if ($type == 'complete' || $type == 'open')
$attributes = $this->checkAttributes($tag,$attributes);
@@ -123,6 +123,10 @@ class TemplateEngine
}
fclose($outFile);
+
+ // CHMOD ausführen.
+ if ( !empty($conf['theme']['compiler']['chmod']))
+ chmod($dest,octdec($conf['theme']['compiler']['chmod']));
}