File tree Expand file tree Collapse file tree 3 files changed +2
-15
lines changed
Expand file tree Collapse file tree 3 files changed +2
-15
lines changed Original file line number Diff line number Diff line change 2727
2828// Parse database
2929$ v_username = $ user ;
30- $ v_dbuser = $ data [$ v_database ]['DBUSER ' ];
30+ $ v_dbuser = preg_replace ( " /^ " . $ user . " _/ " , "" , $ data [$ v_database ]['DBUSER ' ]) ;
3131$ v_password = "" ;
3232$ v_host = $ data [$ v_database ]['HOST ' ];
3333$ v_type = $ data [$ v_database ]['TYPE ' ];
5353
5454 // Change database user
5555 if (($ v_dbuser != $ _POST ['v_dbuser ' ]) && (empty ($ _SESSION ['error_msg ' ]))) {
56- $ v_dbuser = preg_replace ("/^ " .$ user ."_/ " , "" , $ _POST ['v_dbuser ' ]);
56+ // $v_dbuser = preg_replace("/^".$user."_/", "", $_POST['v_dbuser']);
5757 $ v_dbuser = escapeshellarg ($ v_dbuser );
5858 exec (HESTIA_CMD ."v-change-database-user " .$ v_username ." " .escapeshellarg ($ v_database )." " .$ v_dbuser , $ output , $ return_var );
5959 check_return_code ($ return_var ,$ output );
Original file line number Diff line number Diff line change @@ -5,11 +5,6 @@ App.Actions.DB.update_db_username_hint = function(elm, hint) {
55 if ( hint . trim ( ) == '' ) {
66 $ ( elm ) . parent ( ) . find ( '.hint' ) . html ( '' ) ;
77 }
8- // remove prefix from value in order to eliminate duplicates
9- //if (hint.indexOf(GLOBAL.DB_USER_PREFIX) == 0) {
10- // hint = hint.slice(GLOBAL.DB_USER_PREFIX.length, hint.length);
11- //}
12-
138 $ ( elm ) . parent ( ) . find ( '.hint' ) . text ( GLOBAL . DB_USER_PREFIX + hint ) ;
149}
1510
@@ -20,10 +15,6 @@ App.Actions.DB.update_db_databasename_hint = function(elm, hint) {
2015 if ( hint . trim ( ) == '' ) {
2116 $ ( elm ) . parent ( ) . find ( '.hint' ) . html ( '' ) ;
2217 }
23- // remove prefix from value in order to eliminate duplicates
24- //if (hint.indexOf(GLOBAL.DB_DBNAME_PREFIX) == 0) {
25- // hint = hint.slice(GLOBAL.DB_DBNAME_PREFIX.length, hint.length);
26- //}
2718 $ ( elm ) . parent ( ) . find ( '.hint' ) . text ( GLOBAL . DB_DBNAME_PREFIX + hint ) ;
2819}
2920
Original file line number Diff line number Diff line change @@ -23,10 +23,6 @@ App.Actions.DB.update_db_databasename_hint = function(elm, hint) {
2323App . Listeners . DB . keypress_db_username = function ( ) {
2424 var ref = $ ( 'input[name="v_dbuser"]' ) ;
2525 var current_val = ref . val ( ) ;
26- if ( current_val . indexOf ( GLOBAL . DB_DBNAME_PREFIX ) == 0 ) {
27- current_val = current_val . slice ( GLOBAL . DB_DBNAME_PREFIX . length , current_val . length ) ;
28- ref . val ( current_val ) ;
29- }
3026 if ( current_val . trim ( ) != '' ) {
3127 App . Actions . DB . update_db_username_hint ( ref , current_val ) ;
3228 }
You can’t perform that action at this time.
0 commit comments