Skip to content

Commit 28d1b53

Browse files
committed
Fixed Template generator functions to avoid mixed Linux / Windows line endings.
1 parent e1bbd3a commit 28d1b53

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

interface/lib/classes/listform_tpl_generator.inc.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function buildHTML($listDef,$module = '') {
6161
$lang["list_head_txt"] = $listDef["name"];
6262
foreach($listDef["item"] as $field) {
6363
$key = $field["field"];
64-
$html .= " <th class=\"tbl_col_".$key."\" scope=\"col\"><tmpl_var name=\"".$key."_txt\"></th>\r\n";
64+
$html .= " <th class=\"tbl_col_".$key."\" scope=\"col\"><tmpl_var name=\"".$key."_txt\"></th>\n";
6565
$lang[$key."_txt"] = $key;
6666
}
6767

@@ -73,9 +73,9 @@ function buildHTML($listDef,$module = '') {
7373
foreach($listDef["item"] as $field) {
7474
$key = $field["field"];
7575
if($field["formtype"] == 'SELECT') {
76-
$html .= " <td class=\"tbl_col_".$key."\"><select name=\"".$listDef["search_prefix"].$key."\" onChange=\"submitForm('pageForm','".$module."/".$listDef["file"]."');\">{tmpl_var name='".$listDef["search_prefix"].$key."'}</select></td>\r\n";
76+
$html .= " <td class=\"tbl_col_".$key."\"><select name=\"".$listDef["search_prefix"].$key."\" onChange=\"submitForm('pageForm','".$module."/".$listDef["file"]."');\">{tmpl_var name='".$listDef["search_prefix"].$key."'}</select></td>\n";
7777
} else {
78-
$html .= " <td class=\"tbl_col_".$key."\"><input type=\"text\" name=\"".$listDef["search_prefix"].$key."\" value=\"{tmpl_var name='".$listDef["search_prefix"].$key."'}\" /></td>\r\n";
78+
$html .= " <td class=\"tbl_col_".$key."\"><input type=\"text\" name=\"".$listDef["search_prefix"].$key."\" value=\"{tmpl_var name='".$listDef["search_prefix"].$key."'}\" /></td>\n";
7979
}
8080
}
8181

@@ -89,7 +89,7 @@ function buildHTML($listDef,$module = '') {
8989

9090
foreach($listDef["item"] as $field) {
9191
$key = $field["field"];
92-
$html .= " <td class=\"tbl_col_".$key."\"><a href=\"#\" onClick=\"loadContent('".$module."/".$listDef["edit_file"]."?id={tmpl_var name='id'}');\">{tmpl_var name=\"".$key."\"}</a></td>\r\n";
92+
$html .= " <td class=\"tbl_col_".$key."\"><a href=\"#\" onClick=\"loadContent('".$module."/".$listDef["edit_file"]."?id={tmpl_var name='id'}');\">{tmpl_var name=\"".$key."\"}</a></td>\n";
9393
}
9494

9595
$html .= " <td class=\"tbl_col_buttons\">
@@ -164,9 +164,9 @@ function lng_add($lang,$listDef,$module = '') {
164164

165165
if(is_array($wb_out)) {
166166
$fp = fopen ($lng_file, "w");
167-
fwrite($fp,"<?php\r\n");
167+
fwrite($fp,"<?php\n");
168168
foreach($wb_out as $key => $val) {
169-
$new_line = '$wb["'.$key.'"] = '."'$val';\r\n";
169+
$new_line = '$wb["'.$key.'"] = '."'$val';\n";
170170
fwrite($fp,$new_line);
171171

172172
}

interface/lib/classes/tform_tpl_generator.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ function lng_add($lang,$formDef) {
309309

310310
if(is_array($wb_out)) {
311311
$fp = fopen ($lng_file, "w");
312-
fwrite($fp,"<?php\r\n");
312+
fwrite($fp,"<?php\n");
313313
foreach($wb_out as $key => $val) {
314-
$new_line = '$wb["'.$key.'"] = '."'$val';\r\n";
314+
$new_line = '$wb["'.$key.'"] = '."'$val';\n";
315315
fwrite($fp,$new_line);
316316

317317
}

0 commit comments

Comments
 (0)