From: Andreas Gohr Date: Tue, 19 Jun 2007 14:18:47 +0000 (+0200) Subject: added missing smarty files X-Git-Tag: 0.7.1~60 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=865a4c94a21c9ab28f50bad464a774620b2745a5;p=contagged added missing smarty files darcs-hash:20070619141847-6e07b-379989e17df92f7f977ce78d7eac9755eac7e1e7.gz --- diff --git a/inc/smarty/plugins/modifier.h.php b/inc/smarty/plugins/modifier.h.php new file mode 100644 index 0000000..84274bf --- /dev/null +++ b/inc/smarty/plugins/modifier.h.php @@ -0,0 +1,22 @@ + + * Name: h
+ */ +function smarty_modifier_h($string, $esc_type = 'html', $char_set = 'ISO-8859-1') +{ + return smarty_modifier_escape($string,'html','UTF-8'); +} + +/* vim: set expandtab: */ + +?> diff --git a/inc/smarty/plugins/modifier.http.php b/inc/smarty/plugins/modifier.http.php new file mode 100644 index 0000000..a3fffbc --- /dev/null +++ b/inc/smarty/plugins/modifier.http.php @@ -0,0 +1,33 @@ + + * @param string + * @return string + */ +function smarty_modifier_http($string){ + if(!$string) return ''; + + if(!preg_match('#^\w+://#',$string)){ + $string = 'http://'.$string; + } + + return $string; +} + +/* vim: set expandtab: */ + +?>