Fossil SCM
Do not show the search entry boxes on the /help page if help-search is disabled.
Commit
4efa569a75ded316cc6c44b5d5c731e95c47237ebfea726df1e1d769bd251c93
Parent
64040c7254a26bb…
1 file changed
+4
-2
+4
-2
| --- src/dispatch.c | ||
| +++ src/dispatch.c | ||
| @@ -832,11 +832,13 @@ | ||
| 832 | 832 | |
| 833 | 833 | style_set_current_feature("tkt"); |
| 834 | 834 | style_header("Help: %s", zCmd); |
| 835 | 835 | |
| 836 | 836 | style_submenu_element("Command-List", "%R/help"); |
| 837 | - style_submenu_element("Search","%R/search?y=h"); | |
| 837 | + if( search_restrict(SRCH_HELP)!=0 ){ | |
| 838 | + style_submenu_element("Search","%R/search?y=h"); | |
| 839 | + } | |
| 838 | 840 | rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd); |
| 839 | 841 | if( *zCmd=='/' ){ |
| 840 | 842 | /* Some of the webpages require query parameters in order to work. |
| 841 | 843 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 842 | 844 | @ <h1>The "%h(zCmd)" page:</h1> |
| @@ -874,11 +876,11 @@ | ||
| 874 | 876 | int i; |
| 875 | 877 | const char *zWidth = "28ex"; |
| 876 | 878 | unsigned char occHelp[FOSSIL_MX_CMDIDX] = {0}; /* Help str occurrences */ |
| 877 | 879 | int bktHelp[FOSSIL_MX_CMDIDX][MX_HELP_DUP] = {{0}};/* Help str->commands */ |
| 878 | 880 | style_header("Help"); |
| 879 | - search_screen(SRCH_HELP, 0); | |
| 881 | + search_screen(SRCH_HELP, 0x02); | |
| 880 | 882 | |
| 881 | 883 | @ <a name='commands'></a> |
| 882 | 884 | @ <h1>Available commands:</h1> |
| 883 | 885 | @ <div class="columns" style="column-width: %s(zWidth);"> |
| 884 | 886 | @ <ul> |
| 885 | 887 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -832,11 +832,13 @@ | |
| 832 | |
| 833 | style_set_current_feature("tkt"); |
| 834 | style_header("Help: %s", zCmd); |
| 835 | |
| 836 | style_submenu_element("Command-List", "%R/help"); |
| 837 | style_submenu_element("Search","%R/search?y=h"); |
| 838 | rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd); |
| 839 | if( *zCmd=='/' ){ |
| 840 | /* Some of the webpages require query parameters in order to work. |
| 841 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 842 | @ <h1>The "%h(zCmd)" page:</h1> |
| @@ -874,11 +876,11 @@ | |
| 874 | int i; |
| 875 | const char *zWidth = "28ex"; |
| 876 | unsigned char occHelp[FOSSIL_MX_CMDIDX] = {0}; /* Help str occurrences */ |
| 877 | int bktHelp[FOSSIL_MX_CMDIDX][MX_HELP_DUP] = {{0}};/* Help str->commands */ |
| 878 | style_header("Help"); |
| 879 | search_screen(SRCH_HELP, 0); |
| 880 | |
| 881 | @ <a name='commands'></a> |
| 882 | @ <h1>Available commands:</h1> |
| 883 | @ <div class="columns" style="column-width: %s(zWidth);"> |
| 884 | @ <ul> |
| 885 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -832,11 +832,13 @@ | |
| 832 | |
| 833 | style_set_current_feature("tkt"); |
| 834 | style_header("Help: %s", zCmd); |
| 835 | |
| 836 | style_submenu_element("Command-List", "%R/help"); |
| 837 | if( search_restrict(SRCH_HELP)!=0 ){ |
| 838 | style_submenu_element("Search","%R/search?y=h"); |
| 839 | } |
| 840 | rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd); |
| 841 | if( *zCmd=='/' ){ |
| 842 | /* Some of the webpages require query parameters in order to work. |
| 843 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 844 | @ <h1>The "%h(zCmd)" page:</h1> |
| @@ -874,11 +876,11 @@ | |
| 876 | int i; |
| 877 | const char *zWidth = "28ex"; |
| 878 | unsigned char occHelp[FOSSIL_MX_CMDIDX] = {0}; /* Help str occurrences */ |
| 879 | int bktHelp[FOSSIL_MX_CMDIDX][MX_HELP_DUP] = {{0}};/* Help str->commands */ |
| 880 | style_header("Help"); |
| 881 | search_screen(SRCH_HELP, 0x02); |
| 882 | |
| 883 | @ <a name='commands'></a> |
| 884 | @ <h1>Available commands:</h1> |
| 885 | @ <div class="columns" style="column-width: %s(zWidth);"> |
| 886 | @ <ul> |
| 887 |