Re: [aur-dev] [PATCH 0/5] Database connection overhaul

2013-02-03 Thread Dan McGee
On Sun, Feb 3, 2013 at 10:26 AM, canyonknight wrote: > Hello all, > > I recently noticed in my SQL logs that multiple database connections > will be started over the course of a page loading. Past commits have > relied on passing the handle as an argument to avoid that. > > The problem is many fun

[aur-dev] [PATCH 5/5] Remove unneeded database connection calls

2013-02-03 Thread canyonknight
Since all database related functions will establish a connection when needed, there is no need to pre-emptively try and establish a database connection. Signed-off-by: canyonknight --- web/html/account.php | 1 - web/html/home.php | 2 -- web/html/logout.php| 1 - web/html/pkgsubmit.p

[aur-dev] [PATCH 4/5] Remove checks before calling connection method

2013-02-03 Thread canyonknight
Large amount of boilerplate code that checks if a database connection exists is useless now that the new connection method automatically does the same check. Signed-off-by: canyonknight --- web/html/logout.php| 4 +- web/lib/acctfuncs.inc.php | 97 -- web/

[aur-dev] [PATCH 3/5] Remove documentation references to database parameter

2013-02-03 Thread canyonknight
--- web/lib/acctfuncs.inc.php | 24 web/lib/aur.inc.php | 18 -- web/lib/pkgfuncs.inc.php | 24 web/lib/stats.inc.php | 5 - 4 files changed, 71 deletions(-) diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfunc

[aur-dev] [PATCH 2/5] Remove unnecessary database connection parameter from all functions

2013-02-03 Thread canyonknight
All functions now have a database connection method that will use the same database connection. This imitates the functionality of passing a database connection as an argument and makes it redundant. Signed-off-by: canyonknight --- web/html/home.php | 6 +-- web/html/logout.php

[aur-dev] [PATCH 1/5] Add database wrapper class and new connection method

2013-02-03 Thread canyonknight
Uses the Singleton pattern to ensure all queries use the same database connection that is released upon script completion. All database connections should now be called with DB::connect() and not db_connect(). Signed-off-by: canyonknight --- web/html/account.php | 2 +- web/html/home.php

[aur-dev] [PATCH 0/5] Database connection overhaul

2013-02-03 Thread canyonknight
Hello all, I recently noticed in my SQL logs that multiple database connections will be started over the course of a page loading. Past commits have relied on passing the handle as an argument to avoid that. The problem is many functions don't get a handle passed to them and there is a large amou