]> andersk Git - moira.git/commitdiff
First and last name in the users table now act case insensitive.
authorgenoa <genoa>
Wed, 26 Aug 1992 01:21:15 +0000 (01:21 +0000)
committergenoa <genoa>
Wed, 26 Aug 1992 01:21:15 +0000 (01:21 +0000)
server/qsupport.dc
server/queries2.c

index 90d9aba4981415172019201ef6a353b7aa00d788..9a1263e95714b3731d479fee4596c7bcc62c2bed 100644 (file)
@@ -1513,11 +1513,12 @@ followup_ausr(q, argv, cl)
     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
@@ -1526,6 +1527,7 @@ followup_ausr(q, argv, cl)
     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;
@@ -1603,14 +1605,16 @@ followup_uuac(q, argv, cl)
     }
 #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);
index 5aee1b5a2bcd87a1d86fbe6984a5961b99134b55..05fb50d9beb690735b270339d1257768deb62bb9 100644 (file)
@@ -174,6 +174,13 @@ static struct valobj VOwild01sort01[] = {
   {V_SORT, 1}, 
 };
 
+static struct valobj VOupwild01sort01[] = {
+  {V_UPWILD, 0},
+  {V_UPWILD, 1},
+  {V_SORT, 0},
+  {V_SORT, 1}, 
+};
+
 static struct valobj VOwild012sort0[] = {  /* get_alias */
   {V_WILD, 0},
   {V_WILD, 1},
@@ -291,6 +298,18 @@ static struct validate VDupwildsortf = {
     followup_fix_modby,
 };
 
+static struct validate VDupwild2sortf = { 
+    VOupwild01sort01,
+    4,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    followup_fix_modby,
+};
+
 
 \f
 /* Query data */
@@ -373,10 +392,10 @@ static char *gubn_fields[] = {
   MIT_ID, CLASS, MOD1, MOD2, MOD3,
 };
 
-static struct validate gubn_validate =
+static struct validate gubn_validate = /* Q_GUBN, Q_GUAN */
 {
-    VOwild01sort0,
-    3,
+    VOupwild01sort01,
+    4,
     0,
     0,
     0,
@@ -500,7 +519,7 @@ static struct validate uusr_validate = {
   USERS_ID,
   0,
   setup_ausr,
-  set_modtime_by_id,
+  followup_uuac,
 };
 
 static char *uush_fields[] = {
@@ -2288,9 +2307,9 @@ struct query Queries2[] = {
       "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str",
       guan_fields,
       15,
-      "u.first LIKE '%s' ESCAPE '*' AND u.last LIKE '%s' ESCAPE '*' AND u.users_id != 0 and u.comment = str.string_id",
+      "u.searchfirst LIKE '%s' ESCAPE '*' AND u.searchlast LIKE '%s' ESCAPE '*' AND u.users_id != 0 and u.comment = str.string_id",
       2,
-      &VDwild2sortf,
+      &gubn_validate,
   },
  
   {
@@ -2363,7 +2382,7 @@ struct query Queries2[] = {
     "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users",
     gubn_fields,
     12,
-    "first LIKE '%s' ESCAPE '*' AND last LIKE '%s' ESCAPE '*' AND users_id != 0",
+    "searchfirst LIKE '%s' ESCAPE '*' AND searchlast LIKE '%s' ESCAPE '*' AND users_id != 0",
     2,
     &gubn_validate,
   },
This page took 0.054186 seconds and 5 git commands to generate.