diff options
author | randomdan <randomdan@localhost> | 2011-02-18 11:01:26 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-02-18 11:01:26 +0000 |
commit | 9e2483f99938fe915be7ed61eae46188112fb546 (patch) | |
tree | fe63c5430b3aafa2115b35837d3d104bbe7e00d9 | |
parent | Merge urlRows' and xslRows' CURL code into a common more fully featured (prox... (diff) | |
download | gentoobrowse-9e2483f99938fe915be7ed61eae46188112fb546.tar.bz2 gentoobrowse-9e2483f99938fe915be7ed61eae46188112fb546.tar.xz gentoobrowse-9e2483f99938fe915be7ed61eae46188112fb546.zip |
Don't require the (probably repeated) inclusion of datasource definitions, have CommonObjects load them once on demand
Fix rdbmsDataSource closing transactions it didn't open
Change XML to match the above changes
23 files changed, 0 insertions, 24 deletions
diff --git a/gentoobrowse/console/bugassociate.xml b/gentoobrowse/console/bugassociate.xml index 245c62d..d18a98f 100644 --- a/gentoobrowse/console/bugassociate.xml +++ b/gentoobrowse/console/bugassociate.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <bugassoc name="bugassociate" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres.xml" /> <project2:sqlmerge name="bugbind" datasource="postgres" targettable="package_bugs" useview="yes"> <sql> SELECT b.bugid, p.packageid diff --git a/gentoobrowse/console/bugimport.xml b/gentoobrowse/console/bugimport.xml index 994de7f..84fb761 100644 --- a/gentoobrowse/console/bugimport.xml +++ b/gentoobrowse/console/bugimport.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <bugimport name="bugimport" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres.xml" /> <project2:filerows name="bugurls" newline=" " encoding="ascii" fieldSep="" quoteChar="" path="console/bug.urls"> <columns> <column>url</column> diff --git a/gentoobrowse/console/emailebuilds.xml b/gentoobrowse/console/emailebuilds.xml index 6854602..b02d102 100644 --- a/gentoobrowse/console/emailebuilds.xml +++ b/gentoobrowse/console/emailebuilds.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <emailebuild name="emailebuild" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres.xml" /> <project2:sqlrows name="usersToEmail" datasource="postgres"> <sql> select ut.userid, ut.useremail from diff --git a/gentoobrowse/console/fileimport.xml b/gentoobrowse/console/fileimport.xml index 37b7814..6be8298 100644 --- a/gentoobrowse/console/fileimport.xml +++ b/gentoobrowse/console/fileimport.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <packageimport name="bugassociate" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres.xml" /> <project2:sqlrows name="fileTypes" datasource="postgres"> <sql> SELECT filetypeid, searchroot, searchspec diff --git a/gentoobrowse/console/packageimport.xml b/gentoobrowse/console/packageimport.xml index 8e281ef..23d4641 100644 --- a/gentoobrowse/console/packageimport.xml +++ b/gentoobrowse/console/packageimport.xml @@ -1,8 +1,6 @@ <?xml version="1.0"?> <packageimport name="bugassociate" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres.xml" /> - <project2:sqlmerge name="categories" datasource="postgres" targettable="categories" useview="yes"> <sql>SELECT DISTINCT (REGEXP_MATCHES(filename, '^[^/]+'))[1] AS name FROM files WHERE filetypeid = 1</sql> <columns> diff --git a/gentoobrowse/console/packagemasks.xml b/gentoobrowse/console/packagemasks.xml index 20fd8fd..7a26188 100644 --- a/gentoobrowse/console/packagemasks.xml +++ b/gentoobrowse/console/packagemasks.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <packagemasks name="packagemasks" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres.xml" /> <project2:sqlmerge name="masksets" datasource="postgres" targettable="masksets" useview="yes"> <sql> SELECT d.setno, diff --git a/gentoobrowse/emails/newpackageversions.xml b/gentoobrowse/emails/newpackageversions.xml index 1132407..2e567b0 100644 --- a/gentoobrowse/emails/newpackageversions.xml +++ b/gentoobrowse/emails/newpackageversions.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <view root="newpackageversions" style="emails/newpackageversions.xslt" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres.xml" /> <project2:sqlrows name="newpackageversions" datasource="postgres"> <sql> select ut.cname, ut.pname, ut.version diff --git a/gentoobrowse/emails/welcome.xml b/gentoobrowse/emails/welcome.xml index f3242ca..277ea90 100644 --- a/gentoobrowse/emails/welcome.xml +++ b/gentoobrowse/emails/welcome.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <view root="signup" style="emails/signup.xslt" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="verifyguidsbyemail" datasource="postgres-web"> <sql> SELECT userid, CAST(verifyguid AS TEXT) AS guid diff --git a/gentoobrowse/present/accountTracked.xml b/gentoobrowse/present/accountTracked.xml index 0359c43..18a72a0 100644 --- a/gentoobrowse/present/accountTracked.xml +++ b/gentoobrowse/present/accountTracked.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <view name="index" root="gentoo" contenttype="text/xml-xslt" style="login.xslt" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <xi:include href="../checks/loggedIn.xml" /> <xi:include href="../views/tracked.xml" /> <xi:include href="../views/webcommon.xml" /> diff --git a/gentoobrowse/request/doconfirm.xml b/gentoobrowse/request/doconfirm.xml index 83785a3..200ae31 100644 --- a/gentoobrowse/request/doconfirm.xml +++ b/gentoobrowse/request/doconfirm.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <view name="doconfirm" present="accountHome" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <xi:include href="../views/user.xml" /> <project2:sqlcheck datasource="postgres-web" testOp="=" testValue="1" present="login" name="checkUserAuth"> <message>No such pending account</message> diff --git a/gentoobrowse/request/dologin.xml b/gentoobrowse/request/dologin.xml index 43ff3ce..1194bab 100644 --- a/gentoobrowse/request/dologin.xml +++ b/gentoobrowse/request/dologin.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <view name="dologin" present="accountHome" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <xi:include href="../views/user.xml" /> <project2:regexcheck present="login" name="usernameEntered" regex=".+"> <apply-to source="param" name="username" /> diff --git a/gentoobrowse/request/dosignup.xml b/gentoobrowse/request/dosignup.xml index d4b6711..d06ca57 100644 --- a/gentoobrowse/request/dosignup.xml +++ b/gentoobrowse/request/dosignup.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <view name="dosignup" present="confirm" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:regexcheck present="signup" name="usernameEntered" regex=".+"> <apply-to source="param" name="username" /> <message>User name required</message> diff --git a/gentoobrowse/request/track.xml b/gentoobrowse/request/track.xml index ca7b8c8..8708daf 100644 --- a/gentoobrowse/request/track.xml +++ b/gentoobrowse/request/track.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <request name="track" present="ok" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlcheck datasource="postgres-web" testOp="=" testValue="0" present="ok" name="checkNotTracked"> <message>Package already tracked</message> <sql> diff --git a/gentoobrowse/request/untrack.xml b/gentoobrowse/request/untrack.xml index 1cef535..6604151 100644 --- a/gentoobrowse/request/untrack.xml +++ b/gentoobrowse/request/untrack.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <request name="track" present="ok" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqltask datasource="postgres-web" name="addTrack"> <sql> DELETE FROM user_packages diff --git a/gentoobrowse/views/categories.xml b/gentoobrowse/views/categories.xml index 15b74a1..8b41184 100644 --- a/gentoobrowse/views/categories.xml +++ b/gentoobrowse/views/categories.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <block xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="categories" datasource="postgres-web"> <sql> SELECT c.categoryid, MIN(c.name) AS catname, COUNT(*) AS packages diff --git a/gentoobrowse/views/category.xml b/gentoobrowse/views/category.xml index ebb4470..2803ce4 100644 --- a/gentoobrowse/views/category.xml +++ b/gentoobrowse/views/category.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <block xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="categoryPackages" datasource="postgres-web"> <sql> SELECT c.name AS catname, p.name AS pkgname, p.description diff --git a/gentoobrowse/views/newebuilds.xml b/gentoobrowse/views/newebuilds.xml index 2fc10c4..8bcc6e9 100644 --- a/gentoobrowse/views/newebuilds.xml +++ b/gentoobrowse/views/newebuilds.xml @@ -1,6 +1,5 @@ <?xml version="1.0"?> <block xmlns:project2="http://project2.randomdan.homeip.net" xmlns:xi="http://www.w3.org/2001/XInclude"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="newebuilds" datasource="postgres-web"> <sql> SELECT description, moddate, p.name AS pkgname, c.name AS catname, e.version, e.firstseen sync, diff --git a/gentoobrowse/views/newebuildsatom.xml b/gentoobrowse/views/newebuildsatom.xml index d229b45..fcc7e8f 100644 --- a/gentoobrowse/views/newebuildsatom.xml +++ b/gentoobrowse/views/newebuildsatom.xml @@ -1,6 +1,5 @@ <?xml version="1.0"?> <block xmlns:project2="http://project2.randomdan.homeip.net" xmlns:xi="http://www.w3.org/2001/XInclude"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="newebuilds" datasource="postgres-web"> <sql> SELECT version, description, moddate, p.name AS pkgname, c.name AS catname, e.firstseen sync diff --git a/gentoobrowse/views/package.xml b/gentoobrowse/views/package.xml index e4797e9..454685e 100644 --- a/gentoobrowse/views/package.xml +++ b/gentoobrowse/views/package.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <block xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="packages" datasource="postgres-web"> <sql> SELECT p.packageid, p.name AS pkgname, p.description, p.firstseen, c.name AS catname diff --git a/gentoobrowse/views/popular.xml b/gentoobrowse/views/popular.xml index e21a296..9668a7d 100644 --- a/gentoobrowse/views/popular.xml +++ b/gentoobrowse/views/popular.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <block xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="popularPackages" datasource="postgres-web"> <sql> SELECT p.packageid, MIN(c.name) AS catname, MIN(p.name) AS pkgname, MIN(p.description) AS description, COUNT(*) AS trackers diff --git a/gentoobrowse/views/search.xml b/gentoobrowse/views/search.xml index 87ce6eb..100677c 100644 --- a/gentoobrowse/views/search.xml +++ b/gentoobrowse/views/search.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <block xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="packageSearch" datasource="postgres-web"> <sql> select c.name as catname, p.name as pkgname, description diff --git a/gentoobrowse/views/tracked.xml b/gentoobrowse/views/tracked.xml index a7b50a9..ddfda03 100644 --- a/gentoobrowse/views/tracked.xml +++ b/gentoobrowse/views/tracked.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <block xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="trackedPackages" datasource="postgres-web"> <sql> SELECT c.name AS catname, p.name AS pkgname, ( diff --git a/gentoobrowse/views/user.xml b/gentoobrowse/views/user.xml index a2ea60d..f989514 100644 --- a/gentoobrowse/views/user.xml +++ b/gentoobrowse/views/user.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <block xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:project2="http://project2.randomdan.homeip.net"> - <xi:include href="../datasources/postgres-web.xml" /> <project2:sqlrows name="users" datasource="postgres-web"> <sql> SELECT u.* |