Overview
SHA1 Hash: | 21cecd209f7201f17e8a784c0d8f735603d440ae |
---|---|
Date: | 2008-11-22 19:09:00 |
User: | drh |
Comment: | 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. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/setup.c from [22cb07cc7a] to [0829a1a6e1].
@@ -369,28 +369,28 @@ /* 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\">•</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\">•</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\">•</font>"; } free(z2); }