Fossil SCM
Improvements to the /setup_login_group configuration page.
Commit
4420efdf32bc45557386515d09d88f953fd04495273b4a50d80ce342f639cafa
Parent
d6bbf550e73fe07…
1 file changed
+23
-23
+23
-23
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -760,10 +760,11 @@ | ||
| 760 | 760 | ** group. |
| 761 | 761 | */ |
| 762 | 762 | void setup_login_group(void){ |
| 763 | 763 | const char *zGroup; |
| 764 | 764 | char *zErrMsg = 0; |
| 765 | + Stmt q; | |
| 765 | 766 | Blob fullName; |
| 766 | 767 | char *zSelfRepo; |
| 767 | 768 | const char *zRepo = PD("repo", ""); |
| 768 | 769 | const char *zLogin = PD("login", ""); |
| 769 | 770 | const char *zPw = PD("pw", ""); |
| @@ -821,11 +822,10 @@ | ||
| 821 | 822 | @ |
| 822 | 823 | @ <tr><td colspan="3" align="center"> |
| 823 | 824 | @ <input type="submit" value="Join" name="join"></td></tr> |
| 824 | 825 | @ </table></blockquote></div></form> |
| 825 | 826 | }else{ |
| 826 | - Stmt q; | |
| 827 | 827 | int n = 0; |
| 828 | 828 | @ <p>This repository (in the file "%h(zSelfRepo)") |
| 829 | 829 | @ is currently part of the "<b>%h(zGroup)</b>" login group. |
| 830 | 830 | @ Other repositories in that group are:</p> |
| 831 | 831 | @ <table border="0" cellspacing="4"> |
| @@ -852,32 +852,32 @@ | ||
| 852 | 852 | @ <p><form action="%R/setup_login_group" method="post"><div> |
| 853 | 853 | login_insert_csrf_secret(); |
| 854 | 854 | @ To leave this login group press |
| 855 | 855 | @ <input type="submit" value="Leave Login Group" name="leave"> |
| 856 | 856 | @ </form></p> |
| 857 | - @ <hr><h2>Implementation Details</h2> | |
| 858 | - @ <p>The following are fields from the CONFIG table related to login-groups, | |
| 859 | - @ provided here for instructional and debugging purposes:</p> | |
| 860 | - @ <table border='1' class='sortable' data-column-types='ttt' \ | |
| 861 | - @ data-init-sort='1'> | |
| 862 | - @ <thead><tr> | |
| 863 | - @ <th>Config.Name<th>Config.Value<th>Config.mtime</tr> | |
| 864 | - @ </thead><tbody> | |
| 865 | - db_prepare(&q, "SELECT name, value, datetime(mtime,'unixepoch') FROM config" | |
| 866 | - " WHERE name GLOB 'peer-*'" | |
| 867 | - " OR name GLOB 'project-*'" | |
| 868 | - " OR name GLOB 'login-group-*'" | |
| 869 | - " ORDER BY name"); | |
| 870 | - while( db_step(&q)==SQLITE_ROW ){ | |
| 871 | - @ <tr><td>%h(db_column_text(&q,0))</td> | |
| 872 | - @ <td>%h(db_column_text(&q,1))</td> | |
| 873 | - @ <td>%h(db_column_text(&q,2))</td></tr> | |
| 874 | - } | |
| 875 | - db_finalize(&q); | |
| 876 | - @ </tbody></table> | |
| 877 | - style_table_sorter(); | |
| 878 | - } | |
| 857 | + } | |
| 858 | + @ <hr><h2>Implementation Details</h2> | |
| 859 | + @ <p>The following are fields from the CONFIG table related to login-groups. | |
| 860 | + @ </p> | |
| 861 | + @ <table border='1' cellspacing="0" cellpadding="4"\ | |
| 862 | + @ class='sortable' data-column-types='ttt' data-init-sort='1'> | |
| 863 | + @ <thead><tr> | |
| 864 | + @ <th>Config.Name<th>Config.Value<th>Config.mtime</tr> | |
| 865 | + @ </thead><tbody> | |
| 866 | + db_prepare(&q, "SELECT name, value, datetime(mtime,'unixepoch') FROM config" | |
| 867 | + " WHERE name GLOB 'peer-*'" | |
| 868 | + " OR name GLOB 'project-*'" | |
| 869 | + " OR name GLOB 'login-group-*'" | |
| 870 | + " ORDER BY name"); | |
| 871 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 872 | + @ <tr><td>%h(db_column_text(&q,0))</td> | |
| 873 | + @ <td>%h(db_column_text(&q,1))</td> | |
| 874 | + @ <td>%h(db_column_text(&q,2))</td></tr> | |
| 875 | + } | |
| 876 | + db_finalize(&q); | |
| 877 | + @ </tbody></table> | |
| 878 | + style_table_sorter(); | |
| 879 | 879 | style_finish_page(); |
| 880 | 880 | } |
| 881 | 881 | |
| 882 | 882 | /* |
| 883 | 883 | ** WEBPAGE: setup_timeline |
| 884 | 884 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -760,10 +760,11 @@ | |
| 760 | ** group. |
| 761 | */ |
| 762 | void setup_login_group(void){ |
| 763 | const char *zGroup; |
| 764 | char *zErrMsg = 0; |
| 765 | Blob fullName; |
| 766 | char *zSelfRepo; |
| 767 | const char *zRepo = PD("repo", ""); |
| 768 | const char *zLogin = PD("login", ""); |
| 769 | const char *zPw = PD("pw", ""); |
| @@ -821,11 +822,10 @@ | |
| 821 | @ |
| 822 | @ <tr><td colspan="3" align="center"> |
| 823 | @ <input type="submit" value="Join" name="join"></td></tr> |
| 824 | @ </table></blockquote></div></form> |
| 825 | }else{ |
| 826 | Stmt q; |
| 827 | int n = 0; |
| 828 | @ <p>This repository (in the file "%h(zSelfRepo)") |
| 829 | @ is currently part of the "<b>%h(zGroup)</b>" login group. |
| 830 | @ Other repositories in that group are:</p> |
| 831 | @ <table border="0" cellspacing="4"> |
| @@ -852,32 +852,32 @@ | |
| 852 | @ <p><form action="%R/setup_login_group" method="post"><div> |
| 853 | login_insert_csrf_secret(); |
| 854 | @ To leave this login group press |
| 855 | @ <input type="submit" value="Leave Login Group" name="leave"> |
| 856 | @ </form></p> |
| 857 | @ <hr><h2>Implementation Details</h2> |
| 858 | @ <p>The following are fields from the CONFIG table related to login-groups, |
| 859 | @ provided here for instructional and debugging purposes:</p> |
| 860 | @ <table border='1' class='sortable' data-column-types='ttt' \ |
| 861 | @ data-init-sort='1'> |
| 862 | @ <thead><tr> |
| 863 | @ <th>Config.Name<th>Config.Value<th>Config.mtime</tr> |
| 864 | @ </thead><tbody> |
| 865 | db_prepare(&q, "SELECT name, value, datetime(mtime,'unixepoch') FROM config" |
| 866 | " WHERE name GLOB 'peer-*'" |
| 867 | " OR name GLOB 'project-*'" |
| 868 | " OR name GLOB 'login-group-*'" |
| 869 | " ORDER BY name"); |
| 870 | while( db_step(&q)==SQLITE_ROW ){ |
| 871 | @ <tr><td>%h(db_column_text(&q,0))</td> |
| 872 | @ <td>%h(db_column_text(&q,1))</td> |
| 873 | @ <td>%h(db_column_text(&q,2))</td></tr> |
| 874 | } |
| 875 | db_finalize(&q); |
| 876 | @ </tbody></table> |
| 877 | style_table_sorter(); |
| 878 | } |
| 879 | style_finish_page(); |
| 880 | } |
| 881 | |
| 882 | /* |
| 883 | ** WEBPAGE: setup_timeline |
| 884 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -760,10 +760,11 @@ | |
| 760 | ** group. |
| 761 | */ |
| 762 | void setup_login_group(void){ |
| 763 | const char *zGroup; |
| 764 | char *zErrMsg = 0; |
| 765 | Stmt q; |
| 766 | Blob fullName; |
| 767 | char *zSelfRepo; |
| 768 | const char *zRepo = PD("repo", ""); |
| 769 | const char *zLogin = PD("login", ""); |
| 770 | const char *zPw = PD("pw", ""); |
| @@ -821,11 +822,10 @@ | |
| 822 | @ |
| 823 | @ <tr><td colspan="3" align="center"> |
| 824 | @ <input type="submit" value="Join" name="join"></td></tr> |
| 825 | @ </table></blockquote></div></form> |
| 826 | }else{ |
| 827 | int n = 0; |
| 828 | @ <p>This repository (in the file "%h(zSelfRepo)") |
| 829 | @ is currently part of the "<b>%h(zGroup)</b>" login group. |
| 830 | @ Other repositories in that group are:</p> |
| 831 | @ <table border="0" cellspacing="4"> |
| @@ -852,32 +852,32 @@ | |
| 852 | @ <p><form action="%R/setup_login_group" method="post"><div> |
| 853 | login_insert_csrf_secret(); |
| 854 | @ To leave this login group press |
| 855 | @ <input type="submit" value="Leave Login Group" name="leave"> |
| 856 | @ </form></p> |
| 857 | } |
| 858 | @ <hr><h2>Implementation Details</h2> |
| 859 | @ <p>The following are fields from the CONFIG table related to login-groups. |
| 860 | @ </p> |
| 861 | @ <table border='1' cellspacing="0" cellpadding="4"\ |
| 862 | @ class='sortable' data-column-types='ttt' data-init-sort='1'> |
| 863 | @ <thead><tr> |
| 864 | @ <th>Config.Name<th>Config.Value<th>Config.mtime</tr> |
| 865 | @ </thead><tbody> |
| 866 | db_prepare(&q, "SELECT name, value, datetime(mtime,'unixepoch') FROM config" |
| 867 | " WHERE name GLOB 'peer-*'" |
| 868 | " OR name GLOB 'project-*'" |
| 869 | " OR name GLOB 'login-group-*'" |
| 870 | " ORDER BY name"); |
| 871 | while( db_step(&q)==SQLITE_ROW ){ |
| 872 | @ <tr><td>%h(db_column_text(&q,0))</td> |
| 873 | @ <td>%h(db_column_text(&q,1))</td> |
| 874 | @ <td>%h(db_column_text(&q,2))</td></tr> |
| 875 | } |
| 876 | db_finalize(&q); |
| 877 | @ </tbody></table> |
| 878 | style_table_sorter(); |
| 879 | style_finish_page(); |
| 880 | } |
| 881 | |
| 882 | /* |
| 883 | ** WEBPAGE: setup_timeline |
| 884 |