[geeklog-cvs] geeklog: Fixed bug with new feature that allows autotags in temp...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Thu Aug 19 09:11:02 EDT 2010
changeset 7964:db06e8ad9f7b
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/db06e8ad9f7b
user: Tom <websitemaster at cogeco.net>
date: Wed Aug 18 20:08:19 2010 -0400
description:
Fixed bug with new feature that allows autotags in templates.
diffstat:
system/classes/template.class.php | 43 ++++++++++++++++++++++++++++++++------
1 files changed, 36 insertions(+), 7 deletions(-)
diffs (72 lines):
diff -r 645f863ceaca -r db06e8ad9f7b system/classes/template.class.php
--- a/system/classes/template.class.php Sun Aug 15 10:38:04 2010 -0400
+++ b/system/classes/template.class.php Wed Aug 18 20:08:19 2010 -0400
@@ -146,21 +146,47 @@
var $last_error = '';
/**
- * The name of a function is retained in this variable and is used to do any post processing work. Defaults to checking for Autotags
+ * The name of a function is retained in this variable and is used to do any pre processing work. Defaults to checking for Autotags
*
* @var string
* @access public
- * @see halt
+ * @see _preprocess
*/
- var $postprocess_fn = 'PLG_replaceTags';
-
-
+ var $preprocess_fn = 'PLG_replaceTags';
+
+ /**
+ * The name of a function is retained in this variable and is used to do any post processing work.
+ *
+ * @var string
+ * @access public
+ * @see _postprocess
+ */
+ var $postprocess_fn = '';
+
/**
-* Replace Tags
+* Pre Process
+*
+* Perform any post processing work by calling the function held in $preprocess_fn
+*
+* @param string $str
+* @access private
+*/
+function _preprocess($str)
+{
+ $function = $this->preprocess_fn;
+ if (function_exists($function)) {
+ $str = $function($str);
+ }
+
+ return $str;
+}
+
+ /**
+* Post Process
*
* Perform any post processing work by calling the function held in $postprocess_fn
*
-* @param string $str String to search for Autotags
+* @param string $str
* @access private
*/
function _postprocess($str)
@@ -601,10 +627,13 @@
}
}
}
+
+ $str = $this->_preprocess($str);
if ($this->debug & 4) {
echo "<p><b>parse:</b> completed</p>\n";
}
+
return $str;
}
More information about the geeklog-cvs
mailing list