File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public function processDatabaseInsert($form_page) {
7575 public function processDatabaseUpdate ($ form_page ) {
7676 global $ app ;
7777
78- $ old_record = $ app ->tform -> getDataRecord ( $ form_page ->id );
78+ $ old_record = $ app ->db -> queryOneRecord ( ' SELECT * FROM `web_database` WHERE `database_id` = ' . intval ( $ form_page ->id ) );
7979
8080 if ($ form_page ->dataRecord ["parent_domain_id " ] > 0 ) {
8181 $ web = $ app ->db ->queryOneRecord ("SELECT * FROM web_domain WHERE domain_id = " .intval ($ form_page ->dataRecord ["parent_domain_id " ]));
@@ -146,7 +146,7 @@ public function processDatabaseUpdate($form_page) {
146146 public function processDatabaseDelete ($ primary_id ) {
147147 global $ app ;
148148
149- $ old_record = $ app ->tform -> getDataRecord ( $ primary_id );
149+ $ old_record = $ app ->db -> queryOneRecord ( ' SELECT * FROM `web_database` WHERE `database_id` = ' . intval ( $ primary_id) );
150150 if ($ old_record ['database_user_id ' ]) {
151151 // check if any database on the server still uses this one
152152 $ check = $ app ->db ->queryOneRecord ("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = ' " . intval ($ old_record ['server_id ' ]) . "' AND (`database_user_id` = ' " . intval ($ old_record ['database_user_id ' ]) . "' OR `database_ro_user_id` = ' " . intval ($ old_record ['database_user_id ' ]) . "') AND `sys_groupid` = ' " . intval ($ old_record ['sys_groupid ' ]) . "' AND `database_id` != ' " . intval ($ primary_id ) . "' " );
You can’t perform that action at this time.
0 commit comments