mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-08-13 06:25:03 -05:00
cleanup some sql mess
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2379 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -194,10 +194,11 @@ xaccSessionBeginSQL (Session *sess, const char * dbname)
|
||||
|
||||
if (!sess) return NULL;
|
||||
|
||||
// #define SQLHACK
|
||||
#ifdef SQLHACK
|
||||
{
|
||||
/* for testing the sql, just a hack, remove later ... */
|
||||
Backend * pgendNew (void);
|
||||
extern Backend * pgendNew (void);
|
||||
be = pgendNew ();
|
||||
}
|
||||
#endif
|
||||
@@ -210,6 +211,8 @@ xaccSessionBeginSQL (Session *sess, const char * dbname)
|
||||
// comment out until testing done, else clobber file ...
|
||||
// sess->topgroup = grp;
|
||||
xaccGroupSetBackend (sess->topgroup, be);
|
||||
|
||||
return (sess->topgroup);
|
||||
}
|
||||
|
||||
/* ============================================================== */
|
||||
|
||||
@@ -988,7 +988,7 @@ xaccTransBeginEdit (Transaction *trans, int defer)
|
||||
void
|
||||
xaccTransCommitEdit (Transaction *trans)
|
||||
{
|
||||
int i, rc=0;
|
||||
int i;
|
||||
Split *split;
|
||||
Account *acc;
|
||||
Backend *be;
|
||||
@@ -1056,15 +1056,16 @@ xaccTransCommitEdit (Transaction *trans)
|
||||
|
||||
/* See if there's a backend. If there is, invoke it. */
|
||||
be = xaccTransactionGetBackend (trans);
|
||||
rc = 0;
|
||||
if (be && be->trans_commit_edit) {
|
||||
int rc = 0;
|
||||
rc = (be->trans_commit_edit) (be, trans, trans->orig);
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
/* if the backend puked, then we must roll-back
|
||||
* at this point, and let the user know that we failed.
|
||||
*/
|
||||
if (rc) {
|
||||
/* if the backend puked, then we must roll-back
|
||||
* at this point, and let the user know that we failed.
|
||||
*/
|
||||
/* hack alert -- finish this */
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user