Diff
Not logged in

Differences From:

File src/setup.c part of check-in [77bdac3b19] - Use colored bullets to indicate the privileges of "nobody", "anonymous", and "developer" on the user edit page. by drh on 2008-11-22 18:16:57. [view]

To:

File src/setup.c part of check-in [21cecd209f] - Fix the user edit screen to work correctly even if one or more of the "anonymous", "login", or "developer" users is omitted from the user list. by drh on 2008-11-22 19:09:00. [view]

@@ -370,26 +370,26 @@
   /* figure out inherited permissions */
   memset(inherit, 0, sizeof(inherit));
   if( strcmp(zLogin, "developer") ){
     char *z1, *z2;
-    z1 = z2 = db_text("","SELECT cap FROM user WHERE login='developer'");
-    while( *z1 ){
+    z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='developer'");
+    while( z1 && *z1 ){
       inherit[0x7f & *(z1++)] = "<font color=\"red\">&#149;</font>";
     }
     free(z2);
   }
   if( strcmp(zLogin, "anonymous") ){
     char *z1, *z2;
-    z1 = z2 = db_text("","SELECT cap FROM user WHERE login='anonymous'");
-    while( *z1 ){
+    z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='anonymous'");
+    while( z1 && *z1 ){
       inherit[0x7f & *(z1++)] = "<font color=\"blue\">&#149;</font>";
     }
     free(z2);
   }
   if( strcmp(zLogin, "nobody") ){
     char *z1, *z2;
-    z1 = z2 = db_text("","SELECT cap FROM user WHERE login='nobody'");
-    while( *z1 ){
+    z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='nobody'");
+    while( z1 && *z1 ){
       inherit[0x7f & *(z1++)] = "<font color=\"green\">&#149;</font>";
     }
     free(z2);
   }