X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;ds=sidebyside;f=wwwroot%2Fsmarty%2FSmarty-2.6.10%2Flibs%2Fplugins%2Foutputfilter.trimwhitespace.php;fp=wwwroot%2Fsmarty%2FSmarty-2.6.10%2Flibs%2Fplugins%2Foutputfilter.trimwhitespace.php;h=0000000000000000000000000000000000000000;hb=e034221efbc7970ec58be22d7517fd3c503dc903;hp=01e35e03df93c829d32c127d9a8bf698da9fb2b2;hpb=c6f21b69e8210bdd0e80cf87f1c2f06dfc848a75;p=mirrors%2FKyberia-bloodline.git
diff --git a/wwwroot/smarty/Smarty-2.6.10/libs/plugins/outputfilter.trimwhitespace.php b/wwwroot/smarty/Smarty-2.6.10/libs/plugins/outputfilter.trimwhitespace.php
deleted file mode 100644
index 01e35e0..0000000
--- a/wwwroot/smarty/Smarty-2.6.10/libs/plugins/outputfilter.trimwhitespace.php
+++ /dev/null
@@ -1,75 +0,0 @@
-
- * Type: outputfilter
- * Name: trimwhitespace
- * Date: Jan 25, 2003
- * Purpose: trim leading white space and blank lines from
- * template source after it gets interpreted, cleaning
- * up code and saving bandwidth. Does not affect
- * <
>and blocks.
$smarty->load_filter('output','trimwhitespace');
- * from application.
- * @author Monte Ohrt .*?!is", $source, $match); - $_pre_blocks = $match[0]; - $source = preg_replace("!
.*?!is", - '@@@SMARTY:TRIM:PRE@@@', $source); - - // Pull out the textarea blocks - preg_match_all("!!is", $source, $match); - $_textarea_blocks = $match[0]; - $source = preg_replace("!!is", - '@@@SMARTY:TRIM:TEXTAREA@@@', $source); - - // remove all leading spaces, tabs and carriage returns NOT - // preceeded by a php close tag. - $source = trim(preg_replace('/((?)\n)[\s]+/m', '\1', $source)); - - // replace script blocks - smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source); - - // replace pre blocks - smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source); - - // replace textarea blocks - smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source); - - return $source; -} - -function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) { - $_len = strlen($search_str); - $_pos = 0; - for ($_i=0, $_count=count($replace); $_i<$_count; $_i++) - if (($_pos=strpos($subject, $search_str, $_pos))!==false) - $subject = substr_replace($subject, $replace[$_i], $_pos, $_len); - else - break; - -} - -?>