EXEC SQL END DECLARE SECTION;
build_qual(q->qual, q->argc, argv, qual);
- if(!strcmp(q->shortname,"guau")) {
+ if(!strcmp(q->shortname,"guau") ||
+ !strcmp(q->shortname,"gual")) {
EXEC SQL SELECT users_id INTO :id FROM users u, strings str WHERE :qual;
} else {
EXEC SQL SELECT users_id INTO :id FROM users WHERE :qual;
char **argv;
client *cl;
{
+#ifdef notdef
#ifsql INGRES
EXEC SQL set lockmode session where readlock = system;
#endsql
+#endif
}
who = cl->client_id;
entity = cl->entity;
- /* create finger entry, pobox & set modtime on user */
+ /* create finger entry & pobox, set modtime on user, and update search fields */
#ifdef GDSS
EXEC SQL REPEATED UPDATE users
SET modtime='now', modby=:who, modwith = :entity,
fullname = :fullname, affiliation = type,
+ searchfirst = UPPERCASE(first), searchlast = UPPERCASE(last),
signature = :rawsig, sigdate = :timestamp, sigwho = :sigwho,
fmodtime='now', fmodby = :who, fmodwith = :entity,
potype='NONE', pmodtime='now', pmodby = :who, pmodwith = :entity
EXEC SQL REPEATED UPDATE users
SET modtime='now', modby=:who, modwith = :entity,
fullname = :fullname, affiliation = type,
+ searchfirst = UPPERCASE(first), searchlast = UPPERCASE(last),
fmodtime='now', fmodby = :who, fmodwith = :entity,
potype='NONE', pmodtime='now', pmodby = :who, pmodwith = :entity
WHERE login = :login;
}
#endif /* GDSS */
- /* create finger entry, pobox & set modtime on user */
+ /* set modtime on user and update search fields */
#ifdef GDSS
EXEC SQL REPEATED UPDATE users SET modtime='now', modby = :who, modwith = :entity,
- signature = :rawsig, sigdate = :timestamp, sigwho = :sigwho
+ signature = :rawsig, sigdate = :timestamp, sigwho = :sigwho,
+ searchfirst = UPPERCASE(first), searchlast = UPPERCASE(last)
WHERE users_id = :id;
#else /* GDSS */
- EXEC SQL REPEATED UPDATE users SET modtime='now', modby = :who, modwith = :entity
+ EXEC SQL REPEATED UPDATE users SET modtime='now', modby = :who, modwith = :entity,
+ searchfirst = UPPERCASE(first), searchlast = UPPERCASE(last)
WHERE users_id = :id;
#endif /* GDSS */
return(MR_SUCCESS);
incremental_clear_after();
} else if (a == 0 && d == 0) {
EXEC SQL UPDATE imembers
- SET ref_count = refcount - :ref, direct = 0
+ SET ref_count = ref_count - :ref, direct = 0
WHERE list_id = :lid AND member_id = :mid
AND member_type = :mtype;
} else {
EXEC SQL UPDATE imembers
- SET ref_count = refcount - :ref
+ SET ref_count = ref_count - :ref
WHERE list_id = :lid AND member_id = :mid
AND member_type = :mtype;
}
rargv[0] = "HOSTACCESS";
EXEC SQL DECLARE csr115 CURSOR FOR
SELECT name FROM machine, hostaccess
- WHERE mach_id = hostaccess.mach_id AND hostaccess.acl_type = :atype
+ WHERE machine.mach_id = hostaccess.mach_id
+ AND hostaccess.acl_type = :atype
AND hostaccess.acl_id = :aid;
EXEC SQL OPEN csr115;
while(1) {
* where clause based on the arguments, then doing a retrieve.
*/
-static char *lflags[5] = { "active", "publicflg", "hidden", "maillist", "group" };
+static char *lflags[5] = { "active", "publicflg", "hidden", "maillist", "grouplist" };
int qualified_get_lists(q, argv, cl, action, actarg)
struct query *q;
}
rargv[0] = SQLDA->sqlvar[0].sqldata;
- sprintf(stmt_buf,"SELECT %s.%s FROM %s %s WHERE %s",q->rtable,field,q->rtable,q->rvar,qual);
+ sprintf(stmt_buf,"SELECT %s.%s FROM %s %s WHERE %s",range,field,q->rtable,range,qual);
EXEC SQL PREPARE stmt INTO :SQLDA USING NAMES FROM :stmt_buf;
if(sqlca.sqlcode)
return(MR_INTERNAL);
aargv[0] = login;
aargv[1] = "ANY";
aargv[2] = login;
- sprintf(buffer, "q.entity_id = 0 and q.filsys_id = %d and q.type = 'ANY'", fsidval);
+ sprintf(buffer, "quota.entity_id = 0 and quota.filsys_id = %d and quota.type = 'ANY'", fsidval);
incremental_after("quota", buffer, aargv);
com_err(whoami, 0, "quota of %d assigned", def_quota);
if (ingres_errno) return(mr_errcode);