-<?php
-/**
- * Smarty plugin to format text blocks
- *
- * @author Jan Altensen (Stricted)
- * @copyright 2013-2015 Jan Altensen (Stricted)
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package Smarty
- * @subpackage PluginsBlock
- */
-
-/**
- * Smarty {lang}{/lang} block plugin
- */
-function smarty_block_lang($params, $content, $template, &$repeat) {
- if (is_null($content) || empty($content)) {
- return;
- }
-
- $lang = $template->smarty->getTemplateVars('language');
-
- if (is_null($lang)) {
- return $content;
- }
-
- $content = str_replace(array("'", '"'), "", $content);
-
- if (isset($lang[$content])) {
- if (strpos($lang[$content], $template->smarty->left_delimiter) !== false && strpos($lang[$content], $template->smarty->right_delimiter) !== false) {
- $data = str_replace("\$", '$', $lang[$content]);
- $_template = new $template->smarty->template_class('eval:'.$data, $template->smarty, $template);
- return $_template->fetch();
- }
-
- return $lang[$content];
- }
-
- return $content;
-}
+<?php\r
+/**\r
+ * Smarty plugin to format text blocks\r
+ *\r
+ * @author Jan Altensen (Stricted)\r
+ * @copyright 2013-2015 Jan Altensen (Stricted)\r
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
+ * @package Smarty\r
+ * @subpackage PluginsBlock\r
+ */\r
+\r
+/**\r
+ * Smarty {lang}{/lang} block plugin\r
+ */\r
+function smarty_block_lang($params, $content, $template, &$repeat) {\r
+ if (is_null($content) || empty($content)) {\r
+ return;\r
+ }\r
+ \r
+ $lang = $template->smarty->getTemplateVars('language');\r
+ \r
+ if (is_null($lang)) {\r
+ return $content;\r
+ }\r
+ \r
+ $content = str_replace(array("'", '"'), "", $content);\r
+ \r
+ if (isset($lang[$content])) {\r
+ if (strpos($lang[$content], $template->smarty->left_delimiter) !== false && strpos($lang[$content], $template->smarty->right_delimiter) !== false) {\r
+ $data = str_replace("\$", '$', $lang[$content]);\r
+ $_template = new $template->smarty->template_class('eval:'.$data, $template->smarty, $template);\r
+ return $_template->fetch();\r
+ }\r
+ \r
+ return $lang[$content];\r
+ }\r
+ \r
+ return $content;\r
+}\r