Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
967cd65c
Commit
967cd65c
authored
Mar 04, 2009
by
tbrehm
Browse files
database username and database name shall not be empty.
parent
0af0e9ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/web/sites/database_edit.php
View file @
967cd65c
...
...
@@ -237,6 +237,10 @@ class page_action extends tform_actions {
if
(
$old_record
[
"database_charset"
]
!=
$this
->
dataRecord
[
"database_charset"
])
{
$app
->
tform
->
errorMessage
.
=
$app
->
tform
->
wordbook
[
"database_charset_change_txt"
]
.
'<br />'
;
}
//* Database username and database name shall not be empty
if
(
$this
->
dataRecord
[
'database_name'
]
==
''
)
$app
->
tform
->
errorMessage
.
=
$app
->
tform
->
wordbook
[
"database_name_error_empty"
];
if
(
$this
->
dataRecord
[
'database_user'
]
==
''
)
$app
->
tform
->
errorMessage
.
=
$app
->
tform
->
wordbook
[
"database_user_error_empty"
];
//* Check if the server has been changed
// We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
...
...
@@ -261,6 +265,10 @@ class page_action extends tform_actions {
function
onBeforeInsert
()
{
global
$app
,
$conf
,
$interfaceConf
;
//* Database username and database name shall not be empty
if
(
$this
->
dataRecord
[
'database_name'
]
==
''
)
$app
->
tform
->
errorMessage
.
=
$app
->
tform
->
wordbook
[
"database_name_error_empty"
];
if
(
$this
->
dataRecord
[
'database_user'
]
==
''
)
$app
->
tform
->
errorMessage
.
=
$app
->
tform
->
wordbook
[
"database_user_error_empty"
];
//* Get the database name and database user prefix
$app
->
uses
(
'getconf'
);
...
...
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