Update of /cvsroot/phplib/php-lib-stable/php
In directory sc8-pr-cvs1:/tmp/cvs-serv27591/php
Modified Files:
template.inc
Log Message:
template.inc - enabled output of filename comments as proposed on users list
Index: template.inc
===================================================================
RCS file: /cvsroot/phplib/php-lib-stable/php/template.inc,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** template.inc 11 Jul 2002 22:29:51 -0000 1.12
--- template.inc 31 Dec 2003 17:18:57 -0000 1.13
***************
*** 37,40 ****
--- 37,41 ----
* Changes in functionality which go beyond bug fixes:
*
+ * added ability for filename comments to be output (from phplib-users layne)
* changed debug handling so set, get and internals can be tracked separately (rha)
* added debug statements throughout to track most function calls (rha)
***************
*** 86,89 ****
--- 87,100 ----
/**
+ * Determines whether Template outputs filename comments.
+ * false = no filename outputs
+ * true = HTML comments (e.g. <!-- START FILE $filename -->) placed in output
+ *
+ * @var int
+ * @access public
+ */
+ var $filename_comments = false;
+
+ /**
* The base directory from which template files are loaded.
*
***************
*** 908,911 ****
--- 919,925 ----
}
+ if ($this->filename_comments) {
+ $str = "<!-- START FILE $filename -->\n$str<!-- END FILE $filename -->\n";
+ }
if ($this->debug & 4) {
printf("<b>loadfile:</b> loaded $filename into $varname<br>\n");
|