@@ -1944,21 +1944,12 @@ private function klientadd($formdef_file, $reseller_id, $params)
19441944 //* Save changes to Datalog
19451945 if ($ app ->remoting_lib ->formDef ["db_history " ] == 'yes ' ) {
19461946 $ new_rec = $ app ->remoting_lib ->getDataRecord ($ insert_id );
1947- $ app ->remoting_lib ->datalogSave ('INSERT ' ,$ primary_id ,array (),$ new_rec );
1948-
1949- $ app ->remoting_lib ->ispconfig_sysuser_add ($ params ,$ insert_id );
1950-
1947+ $ app ->remoting_lib ->datalogSave ('INSERT ' ,$ primary_id ,array (),$ new_rec );
1948+ $ app ->remoting_lib ->ispconfig_sysuser_add ($ params ,$ insert_id );
19511949 }
1952-
1953-
1954-
1955-
19561950 return $ insert_id ;
19571951 }
19581952
1959-
1960-
1961-
19621953 private function insertQuery ($ formdef_file , $ client_id , $ params ,$ event_identifier = '' )
19631954 {
19641955 global $ app , $ tform , $ remoting_lib ;
@@ -1987,21 +1978,18 @@ private function insertQuery($formdef_file, $client_id, $params,$event_identifie
19871978
19881979 $ insert_id = $ app ->db ->insertID ();
19891980
1981+ // set a few values for compatibility with tform actions, mostly used by plugins
1982+ $ this ->id = $ insert_id ;
1983+ $ this ->dataRecord = $ params ;
1984+
19901985 if ($ event_identifier != '' ) $ app ->plugin ->raiseEvent ($ event_identifier ,$ this );
19911986
19921987 //$app->uses('tform');
19931988 //* Save changes to Datalog
19941989 if ($ app ->remoting_lib ->formDef ["db_history " ] == 'yes ' ) {
19951990 $ new_rec = $ app ->remoting_lib ->getDataRecord ($ insert_id );
1996- $ app ->remoting_lib ->datalogSave ('INSERT ' ,$ primary_id ,array (),$ new_rec );
1997-
1998- }
1999-
2000- // set a few values for compatibility with tform actions, mostly used by plugins
2001- $ this ->id = $ insert_id ;
2002- $ this ->dataRecord = $ params ;
2003-
2004-
1991+ $ app ->remoting_lib ->datalogSave ('INSERT ' ,$ primary_id ,array (),$ new_rec );
1992+ }
20051993 return $ insert_id ;
20061994 }
20071995
@@ -2032,7 +2020,6 @@ private function updateQuery($formdef_file, $client_id, $primary_id, $params, $e
20322020 $ this ->id = $ primary_id ;
20332021 $ this ->dataRecord = $ params ;
20342022
2035-
20362023 $ app ->db ->query ($ sql );
20372024
20382025 if ($ app ->db ->errorMessage != '' ) {
@@ -2050,8 +2037,6 @@ private function updateQuery($formdef_file, $client_id, $primary_id, $params, $e
20502037 $ app ->remoting_lib ->datalogSave ('UPDATE ' ,$ primary_id ,$ old_rec ,$ new_rec );
20512038 }
20522039
2053-
2054-
20552040 return $ affected_rows ;
20562041 }
20572042
@@ -2131,5 +2116,4 @@ private function getSession($session_id)
21312116 }
21322117 }
21332118}
2134-
2135- ?>
2119+ ?>
0 commit comments