aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-17 18:36:54 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-17 18:36:54 +0200
commit317095181674a01651602ddf6817e888d0ad5280 (patch)
treeda9a84a50223918408dfb578813c6fb098c1870c /etc
parent3277cd4abfa20e8b2499f052a6eb3792d8aa6cce (diff)
downloadwydawca-317095181674a01651602ddf6817e888d0ad5280.tar.gz
wydawca-317095181674a01651602ddf6817e888d0ad5280.tar.bz2
Begin rewriting method system
* src/builtin.c, src/builtin.h: New files. * src/Makefile.am (wydawca_SOURCES): Add builtin.c and builtin.h * src/config.c: New keyword access-method.query * src/update-2.0.awk: Update. * src/meta.c: Remove quote_string (replaced by method_quote_string). (meta_escape): Add `handle' argument. * src/method.c (struct method_descr): New methods: open, close, quote. Updated methods: free, run, get. All callers updated. (method_quote_string): New function. * src/process.c (scan_directory_pair): Init all access methods at once. * src/sql.c: Take name of the SQL connection from method->parmv[0]. Adapt to changes to the method subsystem. * src/sql.h: Likewise. * src/wydawca.h (struct access_method): New members id, parmc, parmv, storage. Remove union v. (meta_escape): Take 3 arguments. (method_new): Take 2 arguments. (method_open, method_close, method_quote_string): New proto. (method_run, method_result): Change signature. * src/mail.c, src/triplet.c, src/verify.c * etc/wydawca.rc: Update.
Diffstat (limited to 'etc')
-rw-r--r--etc/wydawca.rc16
1 files changed, 8 insertions, 8 deletions
diff --git a/etc/wydawca.rc b/etc/wydawca.rc
index 205c4e0..5a21376 100644
--- a/etc/wydawca.rc
+++ b/etc/wydawca.rc
@@ -53,8 +53,8 @@ sql default {
access-method project-owner {
type sql;
- params (default,
- "SELECT user.email, user.realname "
+ params (default);
+ query "SELECT user.email, user.realname "
"FROM user,user_group,groups "
"WHERE user_group.user_id=user.user_id "
"AND user_group.group_id=groups.group_id "
@@ -64,14 +64,14 @@ access-method project-owner {
access-method user-data {
type sql;
- params (default,
- "SELECT email, realname FROM user WHERE user_name='${user}'");
+ params (default);
+ query "SELECT email, realname FROM user WHERE user_name='${user}'");
}
access-method verify-user {
type sql;
- params (default,
- "SELECT user.user_name "
+ params (default);
+ query "SELECT user.user_name "
"FROM user,user_group, groups "
"WHERE user_group.user_id=user.user_id "
"AND user_group.group_id=groups.group_id "
@@ -81,8 +81,8 @@ access-method verify-user {
access-method gpg-key {
type sql;
- params (default,
- "SELECT gpg_key FROM user WHERE user_name='$u'");
+ params (default);
+ query "SELECT gpg_key FROM user WHERE user_name='$u'");
}
#############################################################################

Return to:

Send suggestions and report system problems to the System administrator.