Fossil SCM
In /setup_ulist, show the email address in the Alerts column so that accounts which have multiple notification subscriptions under different email addresses to not appear as visually-indistinguishable duplicates (they're distinguishable by the parameters for their subscription info link, but not to the naked eye).
Commit
a4f5a53c55432ae96d3a6109572e58be4481967fe122343ac145ae800c0fbe10
Parent
eabccae174afdf0…
1 file changed
+10
-7
+10
-7
| --- src/setupuser.c | ||
| +++ src/setupuser.c | ||
| @@ -155,18 +155,19 @@ | ||
| 155 | 155 | zWith = mprintf(" AND fullcap(cap) GLOB '*[%q]*'", zWith); |
| 156 | 156 | }else{ |
| 157 | 157 | zWith = ""; |
| 158 | 158 | } |
| 159 | 159 | db_prepare(&s, |
| 160 | - "SELECT uid, login, cap, info, date(user.mtime,'unixepoch')," | |
| 161 | - " lower(login) AS sortkey, " | |
| 160 | + "SELECT uid, login, cap, info, date(user.mtime,'unixepoch')," /* 0..4 */ | |
| 161 | + " lower(login) AS sortkey, " /* 5 */ | |
| 162 | 162 | " CASE WHEN info LIKE '%%expires 20%%'" |
| 163 | 163 | " THEN substr(info,instr(lower(info),'expires')+8,10)" |
| 164 | - " END AS exp," | |
| 165 | - "atime," | |
| 166 | - " subscriber.ssub, subscriber.subscriberId," | |
| 167 | - " user.mtime AS sorttime" | |
| 164 | + " END AS exp," /* 6 */ | |
| 165 | + "atime," /* 7 */ | |
| 166 | + " subscriber.ssub, subscriber.subscriberId," /* 8, 9 */ | |
| 167 | + " user.mtime AS sorttime," /* 10 */ | |
| 168 | + " subscriber.semail" /* 11 */ | |
| 168 | 169 | " FROM user LEFT JOIN lastAccess ON login=uname" |
| 169 | 170 | " LEFT JOIN subscriber ON login=suname" |
| 170 | 171 | " WHERE login NOT IN ('anonymous','nobody','developer','reader') %s" |
| 171 | 172 | " ORDER BY sorttime DESC", zWith/*safe-for-%s*/ |
| 172 | 173 | ); |
| @@ -202,11 +203,13 @@ | ||
| 202 | 203 | if( db_column_type(&s,8)==SQLITE_NULL ){ |
| 203 | 204 | @ <td> |
| 204 | 205 | }else if( (zSub = db_column_text(&s,8))==0 || zSub[0]==0 ){ |
| 205 | 206 | @ <td><a href="%R/alerts?sid=%d(sid)"><i>off</i></a> |
| 206 | 207 | }else{ |
| 207 | - @ <td><a href="%R/alerts?sid=%d(sid)">%h(zSub)</a> | |
| 208 | + const char *zEmail = db_column_text(&s, 11); | |
| 209 | + char * zAt = zEmail ? mprintf(" → %h", zEmail) : mprintf(""); | |
| 210 | + @ <td><a href="%R/alerts?sid=%d(sid)">%h(zSub)</a> %z(zAt) | |
| 208 | 211 | } |
| 209 | 212 | |
| 210 | 213 | @ </tr> |
| 211 | 214 | fossil_free(zAge); |
| 212 | 215 | } |
| 213 | 216 |
| --- src/setupuser.c | |
| +++ src/setupuser.c | |
| @@ -155,18 +155,19 @@ | |
| 155 | zWith = mprintf(" AND fullcap(cap) GLOB '*[%q]*'", zWith); |
| 156 | }else{ |
| 157 | zWith = ""; |
| 158 | } |
| 159 | db_prepare(&s, |
| 160 | "SELECT uid, login, cap, info, date(user.mtime,'unixepoch')," |
| 161 | " lower(login) AS sortkey, " |
| 162 | " CASE WHEN info LIKE '%%expires 20%%'" |
| 163 | " THEN substr(info,instr(lower(info),'expires')+8,10)" |
| 164 | " END AS exp," |
| 165 | "atime," |
| 166 | " subscriber.ssub, subscriber.subscriberId," |
| 167 | " user.mtime AS sorttime" |
| 168 | " FROM user LEFT JOIN lastAccess ON login=uname" |
| 169 | " LEFT JOIN subscriber ON login=suname" |
| 170 | " WHERE login NOT IN ('anonymous','nobody','developer','reader') %s" |
| 171 | " ORDER BY sorttime DESC", zWith/*safe-for-%s*/ |
| 172 | ); |
| @@ -202,11 +203,13 @@ | |
| 202 | if( db_column_type(&s,8)==SQLITE_NULL ){ |
| 203 | @ <td> |
| 204 | }else if( (zSub = db_column_text(&s,8))==0 || zSub[0]==0 ){ |
| 205 | @ <td><a href="%R/alerts?sid=%d(sid)"><i>off</i></a> |
| 206 | }else{ |
| 207 | @ <td><a href="%R/alerts?sid=%d(sid)">%h(zSub)</a> |
| 208 | } |
| 209 | |
| 210 | @ </tr> |
| 211 | fossil_free(zAge); |
| 212 | } |
| 213 |
| --- src/setupuser.c | |
| +++ src/setupuser.c | |
| @@ -155,18 +155,19 @@ | |
| 155 | zWith = mprintf(" AND fullcap(cap) GLOB '*[%q]*'", zWith); |
| 156 | }else{ |
| 157 | zWith = ""; |
| 158 | } |
| 159 | db_prepare(&s, |
| 160 | "SELECT uid, login, cap, info, date(user.mtime,'unixepoch')," /* 0..4 */ |
| 161 | " lower(login) AS sortkey, " /* 5 */ |
| 162 | " CASE WHEN info LIKE '%%expires 20%%'" |
| 163 | " THEN substr(info,instr(lower(info),'expires')+8,10)" |
| 164 | " END AS exp," /* 6 */ |
| 165 | "atime," /* 7 */ |
| 166 | " subscriber.ssub, subscriber.subscriberId," /* 8, 9 */ |
| 167 | " user.mtime AS sorttime," /* 10 */ |
| 168 | " subscriber.semail" /* 11 */ |
| 169 | " FROM user LEFT JOIN lastAccess ON login=uname" |
| 170 | " LEFT JOIN subscriber ON login=suname" |
| 171 | " WHERE login NOT IN ('anonymous','nobody','developer','reader') %s" |
| 172 | " ORDER BY sorttime DESC", zWith/*safe-for-%s*/ |
| 173 | ); |
| @@ -202,11 +203,13 @@ | |
| 203 | if( db_column_type(&s,8)==SQLITE_NULL ){ |
| 204 | @ <td> |
| 205 | }else if( (zSub = db_column_text(&s,8))==0 || zSub[0]==0 ){ |
| 206 | @ <td><a href="%R/alerts?sid=%d(sid)"><i>off</i></a> |
| 207 | }else{ |
| 208 | const char *zEmail = db_column_text(&s, 11); |
| 209 | char * zAt = zEmail ? mprintf(" → %h", zEmail) : mprintf(""); |
| 210 | @ <td><a href="%R/alerts?sid=%d(sid)">%h(zSub)</a> %z(zAt) |
| 211 | } |
| 212 | |
| 213 | @ </tr> |
| 214 | fossil_free(zAge); |
| 215 | } |
| 216 |