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
Carlos Gonzalez
ISPConfig 3
Commits
6e094613
Commit
6e094613
authored
Aug 17, 2018
by
Till Brehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #5102
parent
e41a487d
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
72 additions
and
51 deletions
+72
-51
interface/lib/classes/functions.inc.php
interface/lib/classes/functions.inc.php
+22
-0
interface/lib/classes/listform.inc.php
interface/lib/classes/listform.inc.php
+1
-1
interface/lib/classes/listform_actions.inc.php
interface/lib/classes/listform_actions.inc.php
+1
-1
interface/lib/classes/listform_tpl_generator.inc.php
interface/lib/classes/listform_tpl_generator.inc.php
+2
-2
interface/lib/classes/plugin_backuplist.inc.php
interface/lib/classes/plugin_backuplist.inc.php
+1
-1
interface/lib/classes/plugin_backuplist_mail.inc.php
interface/lib/classes/plugin_backuplist_mail.inc.php
+1
-1
interface/lib/classes/plugin_directive_snippets.inc.php
interface/lib/classes/plugin_directive_snippets.inc.php
+1
-1
interface/lib/classes/plugin_listview.inc.php
interface/lib/classes/plugin_listview.inc.php
+1
-1
interface/lib/classes/searchform_actions.inc.php
interface/lib/classes/searchform_actions.inc.php
+2
-2
interface/lib/classes/tform_base.inc.php
interface/lib/classes/tform_base.inc.php
+2
-2
interface/lib/classes/tform_tpl_generator.inc.php
interface/lib/classes/tform_tpl_generator.inc.php
+1
-1
interface/web/admin/language_add.php
interface/web/admin/language_add.php
+1
-1
interface/web/admin/language_complete.php
interface/web/admin/language_complete.php
+1
-1
interface/web/admin/language_edit.php
interface/web/admin/language_edit.php
+1
-1
interface/web/admin/language_export.php
interface/web/admin/language_export.php
+1
-1
interface/web/admin/language_import.php
interface/web/admin/language_import.php
+1
-1
interface/web/admin/language_list.php
interface/web/admin/language_list.php
+1
-1
interface/web/admin/remote_action_ispcupdate.php
interface/web/admin/remote_action_ispcupdate.php
+1
-1
interface/web/admin/remote_action_osupdate.php
interface/web/admin/remote_action_osupdate.php
+1
-1
interface/web/admin/software_package_list.php
interface/web/admin/software_package_list.php
+1
-1
interface/web/admin/software_update_list.php
interface/web/admin/software_update_list.php
+1
-1
interface/web/client/client_del.php
interface/web/client/client_del.php
+1
-1
interface/web/client/client_message.php
interface/web/client/client_message.php
+1
-1
interface/web/client/domain_del.php
interface/web/client/domain_del.php
+1
-1
interface/web/client/domain_edit.php
interface/web/client/domain_edit.php
+1
-1
interface/web/dashboard/dashboard.php
interface/web/dashboard/dashboard.php
+1
-1
interface/web/dns/dns_import.php
interface/web/dns/dns_import.php
+1
-1
interface/web/dns/dns_wizard.php
interface/web/dns/dns_wizard.php
+1
-1
interface/web/js/scrigo.js.php
interface/web/js/scrigo.js.php
+1
-0
interface/web/login/index.php
interface/web/login/index.php
+2
-2
interface/web/login/login_as.php
interface/web/login/login_as.php
+1
-1
interface/web/login/logout.php
interface/web/login/logout.php
+1
-1
interface/web/login/password_reset.php
interface/web/login/password_reset.php
+1
-1
interface/web/mailuser/index.php
interface/web/mailuser/index.php
+1
-1
interface/web/nav.php
interface/web/nav.php
+1
-1
interface/web/sites/aps_install_package.php
interface/web/sites/aps_install_package.php
+1
-1
interface/web/sites/aps_packagedetails_show.php
interface/web/sites/aps_packagedetails_show.php
+1
-1
interface/web/sites/aps_update_packagelist.php
interface/web/sites/aps_update_packagelist.php
+1
-1
interface/web/tools/import_ispconfig.php
interface/web/tools/import_ispconfig.php
+1
-1
interface/web/tools/import_vpopmail.php
interface/web/tools/import_vpopmail.php
+1
-1
interface/web/tools/index.php
interface/web/tools/index.php
+1
-1
interface/web/tools/tpl_default.php
interface/web/tools/tpl_default.php
+1
-1
interface/web/tools/user_settings.php
interface/web/tools/user_settings.php
+4
-6
interface/web/vm/openvz_action.php
interface/web/vm/openvz_action.php
+1
-1
No files found.
interface/lib/classes/functions.inc.php
View file @
6e094613
...
...
@@ -477,6 +477,28 @@ class functions {
return
$out
;
}
// Function to check paths before we use it as include. Use with absolute paths only.
public
function
check_include_path
(
$path
)
{
if
(
strpos
(
$path
,
'//'
))
die
(
'Include path seems to be an URL: '
.
$this
->
htmlentities
(
$path
));
if
(
strpos
(
$path
,
'..'
))
die
(
'Two dots are not allowed in include path: '
.
$this
->
htmlentities
(
$path
));
if
(
!
preg_match
(
"/^[a-zA-Z0-9_\/\.\-]
{
1,
}
$/"
,
$path
))
die
(
'Wrong chars in include path: '
.
$this
->
htmlentities
(
$path
));
$path
=
realpath
(
$path
);
if
(
$path
==
''
)
die
(
'Include path does not exist.'
);
if
(
substr
(
$path
,
0
,
strlen
(
ISPC_ROOT_PATH
))
!=
ISPC_ROOT_PATH
)
die
(
'Path '
.
$this
->
htmlentities
(
$path
)
.
' is outside of ISPConfig installation directory.'
);
return
$path
;
}
// Function to check language strings
public
function
check_language
(
$language
)
{
global
$app
;
if
(
preg_match
(
'/^[a-z]{2}$/'
,
$language
))
{
return
$language
;
}
else
{
die
(
'Invalid language string: '
.
$this
->
htmlentities
(
$language
));
}
}
}
?>
interface/lib/classes/listform.inc.php
View file @
6e094613
...
...
@@ -60,7 +60,7 @@ class listform {
}
//* Set local Language File
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_'
.
$this
->
listDef
[
'name'
]
.
'_list.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_'
.
$this
->
listDef
[
'name'
]
.
'_list.lng'
;
if
(
!
file_exists
(
$lng_file
))
$lng_file
=
'lib/lang/en_'
.
$this
->
listDef
[
'name'
]
.
'_list.lng'
;
include
$lng_file
;
...
...
interface/lib/classes/listform_actions.inc.php
View file @
6e094613
...
...
@@ -249,7 +249,7 @@ class listform_actions {
global
$app
;
//* Set global Language File
$lng_file
=
ISPC_LIB_PATH
.
'/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'.lng'
;
$lng_file
=
ISPC_LIB_PATH
.
'/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'.lng'
;
if
(
!
file_exists
(
$lng_file
))
$lng_file
=
ISPC_LIB_PATH
.
'/lang/en.lng'
;
include
$lng_file
;
...
...
interface/lib/classes/listform_tpl_generator.inc.php
View file @
6e094613
...
...
@@ -153,10 +153,10 @@ class listform_tpl_generator {
}
function
lng_add
(
$lang
,
$listDef
,
$module
=
''
)
{
global
$
go_api
,
$go_info
,
$conf
;
global
$
app
,
$conf
;
if
(
$module
==
''
)
{
$lng_file
=
"lib/lang/"
.
$conf
[
"language"
]
.
"_"
.
$listDef
[
'name'
]
.
"_list.lng"
;
$lng_file
=
"lib/lang/"
.
$
app
->
functions
->
check_language
(
$
conf
[
"language"
]
)
.
"_"
.
$listDef
[
'name'
]
.
"_list.lng"
;
}
else
{
$lng_file
=
'../'
.
$module
.
"/lib/lang/en_"
.
$listDef
[
'name'
]
.
"_list.lng"
;
}
...
...
interface/lib/classes/plugin_backuplist.inc.php
View file @
6e094613
...
...
@@ -45,7 +45,7 @@ class plugin_backuplist extends plugin_base {
$listTpl
->
newTemplate
(
'templates/web_backup_list.htm'
);
//* Loading language file
$lng_file
=
"lib/lang/"
.
$_SESSION
[
"s"
][
"language"
]
.
"_web_backup_list.lng"
;
$lng_file
=
"lib/lang/"
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
"s"
][
"language"
]
)
.
"_web_backup_list.lng"
;
include
$lng_file
;
$listTpl
->
setVar
(
$wb
);
...
...
interface/lib/classes/plugin_backuplist_mail.inc.php
View file @
6e094613
...
...
@@ -46,7 +46,7 @@ class plugin_backuplist_mail extends plugin_base {
$listTpl
->
newTemplate
(
'templates/mail_user_backup_list.htm'
);
//* Loading language file
$lng_file
=
"lib/lang/"
.
$_SESSION
[
"s"
][
"language"
]
.
"_mail_backup_list.lng"
;
$lng_file
=
"lib/lang/"
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
"s"
][
"language"
]
)
.
"_mail_backup_list.lng"
;
include
(
$lng_file
);
$listTpl
->
setVar
(
$wb
);
...
...
interface/lib/classes/plugin_directive_snippets.inc.php
View file @
6e094613
...
...
@@ -18,7 +18,7 @@ class plugin_directive_snippets extends plugin_base
$listTpl
->
newTemplate
(
'templates/web_directive_snippets.htm'
);
//* Loading language file
$lng_file
=
"lib/lang/"
.
$_SESSION
[
"s"
][
"language"
]
.
"_web_directive_snippets.lng"
;
$lng_file
=
"lib/lang/"
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
"s"
][
"language"
]
)
.
"_web_directive_snippets.lng"
;
include
$lng_file
;
$listTpl
->
setVar
(
$wb
);
...
...
interface/lib/classes/plugin_listview.inc.php
View file @
6e094613
...
...
@@ -120,7 +120,7 @@ class plugin_listview extends plugin_base {
}
// Loading language field
$lng_file
=
"lib/lang/"
.
$_SESSION
[
"s"
][
"language"
]
.
"_"
.
$app
->
listform
->
listDef
[
'name'
]
.
"_list.lng"
;
$lng_file
=
"lib/lang/"
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
"s"
][
"language"
]
)
.
"_"
.
$app
->
listform
->
listDef
[
'name'
]
.
"_list.lng"
;
include
$lng_file
;
$listTpl
->
setVar
(
$wb
);
...
...
interface/lib/classes/searchform_actions.inc.php
View file @
6e094613
...
...
@@ -151,10 +151,10 @@ class searchform_actions {
global
$app
;
// Language File setzen
$lng_file
=
ISPC_WEB_PATH
.
'/lang/lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_list.lng'
;
$lng_file
=
ISPC_WEB_PATH
.
'/lang/lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_list.lng'
;
if
(
!
file_exists
(
$lng_file
))
$lng_file
=
ISPC_WEB_PATH
.
'/lang/lib/lang/en_'
.
'_list.lng'
;
include
$lng_file
;
$lng_file
=
"lib/lang/"
.
$_SESSION
[
"s"
][
"language"
]
.
"_"
.
$app
->
searchform
->
listDef
[
'name'
]
.
"_search.lng"
;
$lng_file
=
"lib/lang/"
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
"s"
][
"language"
]
)
.
"_"
.
$app
->
searchform
->
listDef
[
'name'
]
.
"_search.lng"
;
if
(
!
file_exists
(
$lng_file
))
$lng_file
=
'lib/lang/en_'
.
$app
->
searchform
->
listDef
[
'name'
]
.
"_search.lng"
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/lib/classes/tform_base.inc.php
View file @
6e094613
...
...
@@ -134,7 +134,7 @@ class tform_base {
$this
->
module
=
$module
;
$wb
=
array
();
include_once
ISPC_ROOT_PATH
.
'/lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'.lng'
;
include_once
ISPC_ROOT_PATH
.
'/lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'.lng'
;
if
(
is_array
(
$wb
))
$wb_global
=
$wb
;
...
...
@@ -143,7 +143,7 @@ class tform_base {
if
(
!
file_exists
(
$lng_file
))
$lng_file
=
"lib/lang/en_"
.
$this
->
formDef
[
"name"
]
.
".lng"
;
include
$lng_file
;
}
else
{
$lng_file
=
"../
$module
/lib/lang/"
.
$_SESSION
[
"s"
][
"language"
]
.
"_"
.
$this
->
formDef
[
"name"
]
.
".lng"
;
$lng_file
=
"../
$module
/lib/lang/"
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
"s"
][
"language"
]
)
.
"_"
.
$this
->
formDef
[
"name"
]
.
".lng"
;
if
(
!
file_exists
(
$lng_file
))
$lng_file
=
"../
$module
/lib/lang/en_"
.
$this
->
formDef
[
"name"
]
.
".lng"
;
include
$lng_file
;
}
...
...
interface/lib/classes/tform_tpl_generator.inc.php
View file @
6e094613
...
...
@@ -298,7 +298,7 @@ class tform_tpl_generator {
function
lng_add
(
$lang
,
$formDef
)
{
global
$go_api
,
$go_info
,
$conf
;
$lng_file
=
"lib/lang/"
.
$conf
[
"language"
]
.
"_"
.
$formDef
[
'name'
]
.
".lng"
;
$lng_file
=
"lib/lang/"
.
$
app
->
functions
->
check_language
(
$
conf
[
"language"
]
)
.
"_"
.
$formDef
[
'name'
]
.
".lng"
;
if
(
is_file
(
$lng_file
))
{
include
$lng_file
;
}
else
{
...
...
interface/web/admin/language_add.php
View file @
6e094613
...
...
@@ -104,7 +104,7 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']);
$app
->
tpl
->
setVar
(
'_csrf_key'
,
$csrf_token
[
'csrf_key'
]);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_language_add.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_language_add.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/admin/language_complete.php
View file @
6e094613
...
...
@@ -166,7 +166,7 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']);
$app
->
tpl
->
setVar
(
'_csrf_key'
,
$csrf_token
[
'csrf_key'
]);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_language_complete.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_language_complete.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/admin/language_edit.php
View file @
6e094613
...
...
@@ -104,7 +104,7 @@ $app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_language_edit.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_language_edit.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/admin/language_export.php
View file @
6e094613
...
...
@@ -111,7 +111,7 @@ if(isset($_POST['lng_select']) && $error == '') {
$app
->
tpl
->
setVar
(
'msg'
,
$msg
);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_language_export.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_language_export.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/admin/language_import.php
View file @
6e094613
...
...
@@ -194,7 +194,7 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']);
$app
->
tpl
->
setVar
(
'_csrf_key'
,
$csrf_token
[
'csrf_key'
]);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_language_import.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_language_import.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/admin/language_list.php
View file @
6e094613
...
...
@@ -97,7 +97,7 @@ $app->tpl->setLoop('records', $language_files_list);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_language_list.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_language_list.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/admin/remote_action_ispcupdate.php
View file @
6e094613
...
...
@@ -44,7 +44,7 @@ $app->tpl->newTemplate('form.tpl.htm');
$app
->
tpl
->
setInclude
(
'content_tpl'
,
'templates/remote_action_ispcupdate.htm'
);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_remote_action.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_remote_action.lng'
;
include
$lng_file
;
/*
...
...
interface/web/admin/remote_action_osupdate.php
View file @
6e094613
...
...
@@ -43,7 +43,7 @@ $app->tpl->newTemplate('form.tpl.htm');
$app
->
tpl
->
setInclude
(
'content_tpl'
,
'templates/remote_action_osupdate.htm'
);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_remote_action.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_remote_action.lng'
;
include
$lng_file
;
/*
...
...
interface/web/admin/software_package_list.php
View file @
6e094613
...
...
@@ -184,7 +184,7 @@ if(is_array($packages) && count($packages) > 0) {
$app
->
tpl
->
setLoop
(
'records'
,
$packages
);
$language
=
(
isset
(
$_SESSION
[
's'
][
'language'
]))
?
$_SESSION
[
's'
][
'language'
]
:
$conf
[
'language'
];
include_once
'lib/lang/'
.
$
language
.
'_software_package_list.lng'
;
include_once
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$language
)
.
'_software_package_list.lng'
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/admin/software_update_list.php
View file @
6e094613
...
...
@@ -193,7 +193,7 @@ if(is_array($installed_packages)) {
$app
->
tpl
->
setLoop
(
'records'
,
$records_out
);
$language
=
(
isset
(
$_SESSION
[
's'
][
'language'
]))
?
$_SESSION
[
's'
][
'language'
]
:
$conf
[
'language'
];
include_once
'lib/lang/'
.
$
language
.
'_software_update_list.lng'
;
include_once
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$language
)
.
'_software_update_list.lng'
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/client/client_del.php
View file @
6e094613
...
...
@@ -97,7 +97,7 @@ class page_action extends tform_actions {
$app
->
tpl
->
setLoop
(
'records'
,
$table_list
);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_client_del.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_client_del.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/client/client_message.php
View file @
6e094613
...
...
@@ -42,7 +42,7 @@ $app->tpl->newTemplate('form.tpl.htm');
$app
->
tpl
->
setInclude
(
'content_tpl'
,
'templates/client_message.htm'
);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_client_message.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_client_message.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/client/domain_del.php
View file @
6e094613
...
...
@@ -54,7 +54,7 @@ class page_action extends tform_actions {
global
$app
;
$conf
;
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'.lng'
;
include
$lng_file
;
/*
...
...
interface/web/client/domain_edit.php
View file @
6e094613
...
...
@@ -49,7 +49,7 @@ $app->uses('tpl,tform,tform_actions');
$app
->
load
(
'tform_actions'
);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'.lng'
;
include
$lng_file
;
...
...
interface/web/dashboard/dashboard.php
View file @
6e094613
...
...
@@ -51,7 +51,7 @@ $app->uses('tpl');
$app
->
tpl
->
newTemplate
(
"templates/dashboard.htm"
);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/dns/dns_import.php
View file @
6e094613
...
...
@@ -204,7 +204,7 @@ if ($settings['use_domain_module'] == 'y') {
}
}
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_dns_import.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_dns_import.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/dns/dns_wizard.php
View file @
6e094613
...
...
@@ -465,7 +465,7 @@ $csrf_token = $app->auth->csrf_token_get('dns_wizard');
$app
->
tpl
->
setVar
(
'_csrf_id'
,
$csrf_token
[
'csrf_id'
]);
$app
->
tpl
->
setVar
(
'_csrf_key'
,
$csrf_token
[
'csrf_key'
]);
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_dns_wizard.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_dns_wizard.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/js/scrigo.js.php
View file @
6e094613
...
...
@@ -3,6 +3,7 @@ include '../../lib/config.inc.php';
header
(
'Content-Type: text/javascript; charset=utf-8'
);
// the config file sets the content type header so we have to override it here!
require_once
'../../lib/app.inc.php'
;
$lang
=
(
isset
(
$_SESSION
[
's'
][
'language'
])
&&
$_SESSION
[
's'
][
'language'
]
!=
''
)
?
$_SESSION
[
's'
][
'language'
]
:
'en'
;
$lang
=
$app
->
functions
->
check_language
(
$lang
);
include_once
ISPC_ROOT_PATH
.
'/web/strengthmeter/lib/lang/'
.
$lang
.
'_strengthmeter.lng'
;
$app
->
uses
(
'ini_parser,getconf'
);
...
...
interface/web/login/index.php
View file @
6e094613
...
...
@@ -229,12 +229,12 @@ if(count($_POST) > 0) {
if
(
$loginAs
)
$_SESSION
[
's_old'
]
=
$oldSession
;
// keep the way back!
$_SESSION
[
's'
][
'user'
]
=
$user
;
$_SESSION
[
's'
][
'user'
][
'theme'
]
=
isset
(
$user
[
'app_theme'
])
?
$user
[
'app_theme'
]
:
'default'
;
$_SESSION
[
's'
][
'language'
]
=
$user
[
'language'
];
$_SESSION
[
's'
][
'language'
]
=
$app
->
functions
->
check_language
(
$user
[
'language'
]
)
;
$_SESSION
[
"s"
][
'theme'
]
=
$_SESSION
[
's'
][
'user'
][
'theme'
];
if
(
$loginAs
)
$_SESSION
[
's'
][
'plugin_cache'
]
=
$_SESSION
[
's_old'
][
'plugin_cache'
];
if
(
is_file
(
ISPC_WEB_PATH
.
'/'
.
$_SESSION
[
's'
][
'user'
][
'startmodule'
]
.
'/lib/module.conf.php'
))
{
include_once
ISPC_WEB_PATH
.
'/'
.
$_SESSION
[
's'
][
'user'
][
'startmodule'
]
.
'/lib/module.conf.php'
;
include_once
$app
->
functions
->
check_include_path
(
ISPC_WEB_PATH
.
'/'
.
$_SESSION
[
's'
][
'user'
][
'startmodule'
]
.
'/lib/module.conf.php'
)
;
$menu_dir
=
ISPC_WEB_PATH
.
'/'
.
$_SESSION
[
's'
][
'user'
][
'startmodule'
]
.
'/lib/menu.d'
;
if
(
is_dir
(
$menu_dir
))
{
if
(
$dh
=
opendir
(
$menu_dir
))
{
...
...
interface/web/login/login_as.php
View file @
6e094613
...
...
@@ -83,7 +83,7 @@ $dbData = $app->db->queryOneRecord(
* TODO: move the login_as form to a template file -> themeability
*/
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_login_as.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_login_as.lng'
;
include
$lng_file
;
echo
'
...
...
interface/web/login/logout.php
View file @
6e094613
...
...
@@ -43,7 +43,7 @@ if (isset($_GET['l']) && ($_GET['l']== 1)) $forceLogout = true;
if
((
isset
(
$_SESSION
[
's_old'
])
&&
(
$_SESSION
[
's_old'
][
'user'
][
'typ'
]
==
'admin'
||
$app
->
auth
->
has_clients
(
$_SESSION
[
's_old'
][
'user'
][
'userid'
])))
&&
(
!
$forceLogout
)){
$utype
=
(
$_SESSION
[
's_old'
][
'user'
][
'typ'
]
==
'admin'
?
'admin'
:
'reseller'
);
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_login_as.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_login_as.lng'
;
include
$lng_file
;
echo
'
<br /> <br /> <br /> <br />
...
...
interface/web/login/password_reset.php
View file @
6e094613
...
...
@@ -43,7 +43,7 @@ $app->tpl->setInclude('content_tpl', 'templates/password_reset.htm');
$app
->
tpl_defaults
();
include
ISPC_ROOT_PATH
.
'/web/login/lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'.lng'
;
include
ISPC_ROOT_PATH
.
'/web/login/lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'.lng'
;
$app
->
tpl
->
setVar
(
$wb
);
$continue
=
true
;
...
...
interface/web/mailuser/index.php
View file @
6e094613
...
...
@@ -13,7 +13,7 @@ $msg = '';
$error
=
''
;
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_index.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_index.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/nav.php
View file @
6e094613
...
...
@@ -75,7 +75,7 @@ if(isset($_GET['nav']) && $_GET['nav'] == 'top') {
}
include_once
$mt
.
'/lib/module.conf.php'
;
$language
=
(
isset
(
$_SESSION
[
's'
][
'user'
][
'language'
]))
?
$_SESSION
[
's'
][
'user'
][
'language'
]
:
$conf
[
'language'
];
$language
=
$app
->
functions
->
check_language
(
(
isset
(
$_SESSION
[
's'
][
'user'
][
'language'
]))
?
$_SESSION
[
's'
][
'user'
][
'language'
]
:
$conf
[
'language'
]
)
;
$app
->
load_language_file
(
'web/'
.
$mt
.
'/lib/'
.
$language
.
'.lng'
);
$active
=
(
$module
[
'name'
]
==
$_SESSION
[
's'
][
'module'
][
'name'
])
?
1
:
0
;
$topnav
[
$module
[
'order'
]
.
'-'
.
$module
[
'name'
]]
=
array
(
'title'
=>
$app
->
lng
(
$module
[
'title'
]),
...
...
interface/web/sites/aps_install_package.php
View file @
6e094613
...
...
@@ -42,7 +42,7 @@ $app->tpl->newTemplate("form.tpl.htm");
$app
->
tpl
->
setInclude
(
'content_tpl'
,
'templates/aps_install_package.htm'
);
// Load the language file
$lngfile
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_aps.lng'
;
$lngfile
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_aps.lng'
;
require_once
$lngfile
;
$app
->
tpl
->
setVar
(
$wb
);
$app
->
load_language_file
(
'web/sites/'
.
$lngfile
);
...
...
interface/web/sites/aps_packagedetails_show.php
View file @
6e094613
...
...
@@ -42,7 +42,7 @@ $app->tpl->newTemplate("listpage.tpl.htm");
$app
->
tpl
->
setInclude
(
'content_tpl'
,
'templates/aps_packagedetails_show.htm'
);
// Load the language file
$lngfile
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_aps.lng'
;
$lngfile
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_aps.lng'
;
require_once
$lngfile
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/sites/aps_update_packagelist.php
View file @
6e094613
...
...
@@ -41,7 +41,7 @@ $msg = '';
$error
=
''
;
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_aps_update_packagelist.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_aps_update_packagelist.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/tools/import_ispconfig.php
View file @
6e094613
...
...
@@ -44,7 +44,7 @@ $msg = '';
$error
=
''
;
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_import_ispconfig.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_import_ispconfig.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/tools/import_vpopmail.php
View file @
6e094613
...
...
@@ -46,7 +46,7 @@ $msg = '';
$error
=
''
;
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_import_vpopmail.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_import_vpopmail.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/tools/index.php
View file @
6e094613
...
...
@@ -41,7 +41,7 @@ $app->uses('tpl');
$app
->
tpl
->
newTemplate
(
'listpage.tpl.htm'
);
$app
->
tpl
->
setInclude
(
'content_tpl'
,
'templates/index.htm'
);
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_index.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_index.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/tools/tpl_default.php
View file @
6e094613
...
...
@@ -41,7 +41,7 @@ $app->uses('tpl');
$app
->
tpl
->
newTemplate
(
'listpage.tpl.htm'
);
$app
->
tpl
->
setInclude
(
'content_tpl'
,
'templates/tpl_default.htm'
);
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_tpl_default.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_tpl_default.lng'
;
include
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
interface/web/tools/user_settings.php
View file @
6e094613
...
...
@@ -86,12 +86,10 @@ class page_action extends tform_actions {
if
(
$_POST
[
'passwort'
]
!=
$_POST
[
'repeat_password'
])
{
$app
->
tform
->
errorMessage
=
$app
->
tform
->
lng
(
'password_mismatch'
);
}
if
(
preg_match
(
'/[a-z]{2}/'
,
$_POST
[
'language'
]))
{
$_SESSION
[
's'
][
'user'
][
'language'
]
=
$_POST
[
'language'
];
$_SESSION
[
's'
][
'language'
]
=
$_POST
[
'language'
];
}
else
{
$app
->
error
(
'Invalid language.'
);
}
$language
=
$app
->
functions
->
check_language
(
$_POST
[
'language'
]);
$_SESSION
[
's'
][
'user'
][
'language'
]
=
$language
;
$_SESSION
[
's'
][
'language'
]
=
$language
;
}
function
onAfterUpdate
()
{
...
...
interface/web/vm/openvz_action.php
View file @
6e094613
...
...
@@ -32,7 +32,7 @@ $app->tpl->newTemplate('form.tpl.htm');
$app
->
tpl
->
setInclude
(
'content_tpl'
,
'templates/openvz_action.htm'
);
//* load language file
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'_openvz_action.lng'
;
$lng_file
=
'lib/lang/'
.
$
app
->
functions
->
check_language
(
$
_SESSION
[
's'
][
'language'
]
)
.
'_openvz_action.lng'
;
include_once
$lng_file
;
$app
->
tpl
->
setVar
(
$wb
);
...
...
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