Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Zvonimir
ISPConfig 3
Commits
836f8329
Commit
836f8329
authored
Mar 05, 2010
by
tbrehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tpl generation classes and added missing language file createion code again.
parent
b6a07cf3
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
363 additions
and
297 deletions
+363
-297
interface/lib/classes/listform_tpl_generator.inc.php
interface/lib/classes/listform_tpl_generator.inc.php
+41
-0
interface/lib/classes/tform_tpl_generator.inc.php
interface/lib/classes/tform_tpl_generator.inc.php
+322
-297
No files found.
interface/lib/classes/listform_tpl_generator.inc.php
View file @
836f8329
...
...
@@ -132,7 +132,48 @@ class listform_tpl_generator {
}
fclose
(
$handle
);
/*$lang["page_txt"] = 'Page';
$lang["page_of_txt"] = 'of';
$lang["page_next_txt"] = 'Next';
$lang["page_back_txt"] = 'Back';
$lang["delete_txt"] = 'Delete';
$lang["filter_txt"] = 'Filter';
$lang["add_new_record_txt"] = 'Add new record';
*/
// save language file
$this
->
lng_add
(
$lang
,
$listDef
,
$module
);
}
function
lng_add
(
$lang
,
$listDef
,
$module
=
''
)
{
global
$go_api
,
$go_info
,
$conf
;
if
(
$module
==
''
)
{
$lng_file
=
"lib/lang/"
.
$conf
[
"language"
]
.
"_"
.
$listDef
[
'name'
]
.
"_list.lng"
;
}
else
{
$lng_file
=
'../'
.
$module
.
"/lib/lang/en_"
.
$listDef
[
'name'
]
.
"_list.lng"
;
}
if
(
is_file
(
$lng_file
))
{
include_once
(
$lng_file
);
}
else
{
$wb
=
array
();
}
$wb_out
=
array_merge
(
$lang
,
$wb
);
if
(
is_array
(
$wb_out
))
{
$fp
=
fopen
(
$lng_file
,
"w"
);
fwrite
(
$fp
,
"<?php
\r\n
"
);
foreach
(
$wb_out
as
$key
=>
$val
)
{
$new_line
=
'$wb["'
.
$key
.
'"] = '
.
"'
$val
';
\r\n
"
;
fwrite
(
$fp
,
$new_line
);
}
fwrite
(
$fp
,
"?>"
);
fclose
(
$fp
);
}
}
}
...
...
interface/lib/classes/tform_tpl_generator.inc.php
View file @
836f8329
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment