File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,10 @@ function onBeforeUpdate() {
237237 if ($ old_record ["database_charset " ] != $ this ->dataRecord ["database_charset " ]) {
238238 $ app ->tform ->errorMessage .= $ app ->tform ->wordbook ["database_charset_change_txt " ].'<br /> ' ;
239239 }
240+
241+ //* Database username and database name shall not be empty
242+ if ($ this ->dataRecord ['database_name ' ] == '' ) $ app ->tform ->errorMessage .= $ app ->tform ->wordbook ["database_name_error_empty " ];
243+ if ($ this ->dataRecord ['database_user ' ] == '' ) $ app ->tform ->errorMessage .= $ app ->tform ->wordbook ["database_user_error_empty " ];
240244
241245 //* Check if the server has been changed
242246 // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
@@ -261,6 +265,10 @@ function onBeforeUpdate() {
261265
262266 function onBeforeInsert () {
263267 global $ app , $ conf , $ interfaceConf ;
268+
269+ //* Database username and database name shall not be empty
270+ if ($ this ->dataRecord ['database_name ' ] == '' ) $ app ->tform ->errorMessage .= $ app ->tform ->wordbook ["database_name_error_empty " ];
271+ if ($ this ->dataRecord ['database_user ' ] == '' ) $ app ->tform ->errorMessage .= $ app ->tform ->wordbook ["database_user_error_empty " ];
264272
265273 //* Get the database name and database user prefix
266274 $ app ->uses ('getconf ' );
You can’t perform that action at this time.
0 commit comments