Fossil SCM
Enhancements to the /setup_settings web page. Provide hyperlinks to documentation for all settings.
Commit
5068f23d3ef32d529c99a235535da2ce2fc122464c8c6e91471c54ee7e496174
Parent
3d02004f6ea00c1…
3 files changed
+9
-9
+44
-4
+28
-28
M
src/db.c
+9
-9
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2819,11 +2819,11 @@ | ||
| 2819 | 2819 | ** If autosync is enabled setting this to a value greater |
| 2820 | 2820 | ** than zero will cause autosync to try no more than this |
| 2821 | 2821 | ** number of attempts if there is a sync failure. |
| 2822 | 2822 | */ |
| 2823 | 2823 | /* |
| 2824 | -** SETTING: binary-glob width=40 versionable | |
| 2824 | +** SETTING: binary-glob width=40 versionable block-text | |
| 2825 | 2825 | ** The VALUE of this setting is a comma or newline-separated list of |
| 2826 | 2826 | ** GLOB patterns that should be treated as binary files |
| 2827 | 2827 | ** for committing and merging purposes. Example: *.jpg |
| 2828 | 2828 | */ |
| 2829 | 2829 | #if defined(_WIN32)||defined(__CYGWIN__)||defined(__DARWIN__) |
| @@ -2843,11 +2843,11 @@ | ||
| 2843 | 2843 | ** differ only in case are the same file. Defaults to |
| 2844 | 2844 | ** TRUE for unix and FALSE for Cygwin, Mac and Windows. |
| 2845 | 2845 | */ |
| 2846 | 2846 | #endif |
| 2847 | 2847 | /* |
| 2848 | -** STTING: clean-glob width=40 versionable | |
| 2848 | +** STTING: clean-glob width=40 versionable block-text | |
| 2849 | 2849 | ** The VALUE of this setting is a comma or newline-separated list of GLOB |
| 2850 | 2850 | ** patterns specifying files that the "clean" command will |
| 2851 | 2851 | ** delete without prompting or allowing undo. |
| 2852 | 2852 | ** Example: *.a,*.lib,*.o |
| 2853 | 2853 | */ |
| @@ -2855,18 +2855,18 @@ | ||
| 2855 | 2855 | ** SETTING: clearsign boolean default=off |
| 2856 | 2856 | ** When enabled, fossil will attempt to sign all commits |
| 2857 | 2857 | ** with gpg. When disabled, commits will be unsigned. |
| 2858 | 2858 | */ |
| 2859 | 2859 | /* |
| 2860 | -** SETTING: crlf-glob width=40 versionable | |
| 2860 | +** SETTING: crlf-glob width=40 versionable block-text | |
| 2861 | 2861 | ** The value is a comma or newline-separated list of GLOB patterns for |
| 2862 | 2862 | ** text files in which it is ok to have CR, CR+LF or mixed |
| 2863 | 2863 | ** line endings. Set to "*" to disable CR+LF checking. |
| 2864 | 2864 | ** The crnl-glob setting is a compatibility alias. |
| 2865 | 2865 | */ |
| 2866 | 2866 | /* |
| 2867 | -** SETTING: crnl-glob width=40 versionable | |
| 2867 | +** SETTING: crnl-glob width=40 versionable block-text | |
| 2868 | 2868 | ** This is an alias for the crlf-glob setting |
| 2869 | 2869 | */ |
| 2870 | 2870 | /* |
| 2871 | 2871 | ** SETTING: default-perms width=16 default=u |
| 2872 | 2872 | ** Permissions given automatically to new users. For more |
| @@ -2897,18 +2897,18 @@ | ||
| 2897 | 2897 | ** SETTING: editor width=32 |
| 2898 | 2898 | ** The value is an external command that will launch the |
| 2899 | 2899 | ** text editor command used for check-in comments. |
| 2900 | 2900 | */ |
| 2901 | 2901 | /* |
| 2902 | -** SETTING: empty-dirs width=40 versionable | |
| 2902 | +** SETTING: empty-dirs width=40 versionable block-text | |
| 2903 | 2903 | ** The value is a comma or newline-separated list of pathnames. On |
| 2904 | 2904 | ** update and checkout commands, if no file or directory |
| 2905 | 2905 | ** exists with that name, an empty directory will be |
| 2906 | 2906 | ** created. |
| 2907 | 2907 | */ |
| 2908 | 2908 | /* |
| 2909 | -** SETTING: encoding-glob width=40 versionable | |
| 2909 | +** SETTING: encoding-glob width=40 versionable block-text | |
| 2910 | 2910 | ** The value is a comma or newline-separated list of GLOB |
| 2911 | 2911 | ** patterns specifying files that the "commit" command will |
| 2912 | 2912 | ** ignore when issuing warnings about text files that may |
| 2913 | 2913 | ** use another encoding than ASCII or UTF-8. Set to "*" |
| 2914 | 2914 | ** to disable encoding checking. |
| @@ -2954,19 +2954,19 @@ | ||
| 2954 | 2954 | ** SETTING: https-login boolean default=off |
| 2955 | 2955 | ** If true, then the Fossil web server will redirect unencrypted |
| 2956 | 2956 | ** login screeen requests to HTTPS. |
| 2957 | 2957 | */ |
| 2958 | 2958 | /* |
| 2959 | -** SETTING: ignore-glob width=40 versionable | |
| 2959 | +** SETTING: ignore-glob width=40 versionable block-text | |
| 2960 | 2960 | ** The value is a comma or newline-separated list of GLOB |
| 2961 | 2961 | ** patterns specifying files that the "add", "addremove", |
| 2962 | 2962 | ** "clean", and "extra" commands will ignore. |
| 2963 | 2963 | ** |
| 2964 | 2964 | ** Example: *.log customCode.c notes.txt |
| 2965 | 2965 | */ |
| 2966 | 2966 | /* |
| 2967 | -** SETTING: keep-glob width=40 versionable | |
| 2967 | +** SETTING: keep-glob width=40 versionable block-text | |
| 2968 | 2968 | ** The value is a comma or newline-separated list of GLOB |
| 2969 | 2969 | ** patterns specifying files that the "clean" command will keep |
| 2970 | 2970 | */ |
| 2971 | 2971 | /* |
| 2972 | 2972 | ** SETTING: localauth boolean default=off |
| @@ -3116,11 +3116,11 @@ | ||
| 3116 | 3116 | ** This is the setup script to be evaluated after creating |
| 3117 | 3117 | ** and initializing the TH1 interpreter. By default, this |
| 3118 | 3118 | ** is empty and no extra setup is performed. |
| 3119 | 3119 | */ |
| 3120 | 3120 | /* |
| 3121 | -** SETTING: th1-uri-regexp width=40 versionable | |
| 3121 | +** SETTING: th1-uri-regexp width=40 versionable block-text | |
| 3122 | 3122 | ** Specify which URI's are allowed in HTTP requests from |
| 3123 | 3123 | ** TH1 scripts. If empty, no HTTP requests are allowed |
| 3124 | 3124 | ** whatsoever. |
| 3125 | 3125 | */ |
| 3126 | 3126 | /* |
| 3127 | 3127 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2819,11 +2819,11 @@ | |
| 2819 | ** If autosync is enabled setting this to a value greater |
| 2820 | ** than zero will cause autosync to try no more than this |
| 2821 | ** number of attempts if there is a sync failure. |
| 2822 | */ |
| 2823 | /* |
| 2824 | ** SETTING: binary-glob width=40 versionable |
| 2825 | ** The VALUE of this setting is a comma or newline-separated list of |
| 2826 | ** GLOB patterns that should be treated as binary files |
| 2827 | ** for committing and merging purposes. Example: *.jpg |
| 2828 | */ |
| 2829 | #if defined(_WIN32)||defined(__CYGWIN__)||defined(__DARWIN__) |
| @@ -2843,11 +2843,11 @@ | |
| 2843 | ** differ only in case are the same file. Defaults to |
| 2844 | ** TRUE for unix and FALSE for Cygwin, Mac and Windows. |
| 2845 | */ |
| 2846 | #endif |
| 2847 | /* |
| 2848 | ** STTING: clean-glob width=40 versionable |
| 2849 | ** The VALUE of this setting is a comma or newline-separated list of GLOB |
| 2850 | ** patterns specifying files that the "clean" command will |
| 2851 | ** delete without prompting or allowing undo. |
| 2852 | ** Example: *.a,*.lib,*.o |
| 2853 | */ |
| @@ -2855,18 +2855,18 @@ | |
| 2855 | ** SETTING: clearsign boolean default=off |
| 2856 | ** When enabled, fossil will attempt to sign all commits |
| 2857 | ** with gpg. When disabled, commits will be unsigned. |
| 2858 | */ |
| 2859 | /* |
| 2860 | ** SETTING: crlf-glob width=40 versionable |
| 2861 | ** The value is a comma or newline-separated list of GLOB patterns for |
| 2862 | ** text files in which it is ok to have CR, CR+LF or mixed |
| 2863 | ** line endings. Set to "*" to disable CR+LF checking. |
| 2864 | ** The crnl-glob setting is a compatibility alias. |
| 2865 | */ |
| 2866 | /* |
| 2867 | ** SETTING: crnl-glob width=40 versionable |
| 2868 | ** This is an alias for the crlf-glob setting |
| 2869 | */ |
| 2870 | /* |
| 2871 | ** SETTING: default-perms width=16 default=u |
| 2872 | ** Permissions given automatically to new users. For more |
| @@ -2897,18 +2897,18 @@ | |
| 2897 | ** SETTING: editor width=32 |
| 2898 | ** The value is an external command that will launch the |
| 2899 | ** text editor command used for check-in comments. |
| 2900 | */ |
| 2901 | /* |
| 2902 | ** SETTING: empty-dirs width=40 versionable |
| 2903 | ** The value is a comma or newline-separated list of pathnames. On |
| 2904 | ** update and checkout commands, if no file or directory |
| 2905 | ** exists with that name, an empty directory will be |
| 2906 | ** created. |
| 2907 | */ |
| 2908 | /* |
| 2909 | ** SETTING: encoding-glob width=40 versionable |
| 2910 | ** The value is a comma or newline-separated list of GLOB |
| 2911 | ** patterns specifying files that the "commit" command will |
| 2912 | ** ignore when issuing warnings about text files that may |
| 2913 | ** use another encoding than ASCII or UTF-8. Set to "*" |
| 2914 | ** to disable encoding checking. |
| @@ -2954,19 +2954,19 @@ | |
| 2954 | ** SETTING: https-login boolean default=off |
| 2955 | ** If true, then the Fossil web server will redirect unencrypted |
| 2956 | ** login screeen requests to HTTPS. |
| 2957 | */ |
| 2958 | /* |
| 2959 | ** SETTING: ignore-glob width=40 versionable |
| 2960 | ** The value is a comma or newline-separated list of GLOB |
| 2961 | ** patterns specifying files that the "add", "addremove", |
| 2962 | ** "clean", and "extra" commands will ignore. |
| 2963 | ** |
| 2964 | ** Example: *.log customCode.c notes.txt |
| 2965 | */ |
| 2966 | /* |
| 2967 | ** SETTING: keep-glob width=40 versionable |
| 2968 | ** The value is a comma or newline-separated list of GLOB |
| 2969 | ** patterns specifying files that the "clean" command will keep |
| 2970 | */ |
| 2971 | /* |
| 2972 | ** SETTING: localauth boolean default=off |
| @@ -3116,11 +3116,11 @@ | |
| 3116 | ** This is the setup script to be evaluated after creating |
| 3117 | ** and initializing the TH1 interpreter. By default, this |
| 3118 | ** is empty and no extra setup is performed. |
| 3119 | */ |
| 3120 | /* |
| 3121 | ** SETTING: th1-uri-regexp width=40 versionable |
| 3122 | ** Specify which URI's are allowed in HTTP requests from |
| 3123 | ** TH1 scripts. If empty, no HTTP requests are allowed |
| 3124 | ** whatsoever. |
| 3125 | */ |
| 3126 | /* |
| 3127 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2819,11 +2819,11 @@ | |
| 2819 | ** If autosync is enabled setting this to a value greater |
| 2820 | ** than zero will cause autosync to try no more than this |
| 2821 | ** number of attempts if there is a sync failure. |
| 2822 | */ |
| 2823 | /* |
| 2824 | ** SETTING: binary-glob width=40 versionable block-text |
| 2825 | ** The VALUE of this setting is a comma or newline-separated list of |
| 2826 | ** GLOB patterns that should be treated as binary files |
| 2827 | ** for committing and merging purposes. Example: *.jpg |
| 2828 | */ |
| 2829 | #if defined(_WIN32)||defined(__CYGWIN__)||defined(__DARWIN__) |
| @@ -2843,11 +2843,11 @@ | |
| 2843 | ** differ only in case are the same file. Defaults to |
| 2844 | ** TRUE for unix and FALSE for Cygwin, Mac and Windows. |
| 2845 | */ |
| 2846 | #endif |
| 2847 | /* |
| 2848 | ** STTING: clean-glob width=40 versionable block-text |
| 2849 | ** The VALUE of this setting is a comma or newline-separated list of GLOB |
| 2850 | ** patterns specifying files that the "clean" command will |
| 2851 | ** delete without prompting or allowing undo. |
| 2852 | ** Example: *.a,*.lib,*.o |
| 2853 | */ |
| @@ -2855,18 +2855,18 @@ | |
| 2855 | ** SETTING: clearsign boolean default=off |
| 2856 | ** When enabled, fossil will attempt to sign all commits |
| 2857 | ** with gpg. When disabled, commits will be unsigned. |
| 2858 | */ |
| 2859 | /* |
| 2860 | ** SETTING: crlf-glob width=40 versionable block-text |
| 2861 | ** The value is a comma or newline-separated list of GLOB patterns for |
| 2862 | ** text files in which it is ok to have CR, CR+LF or mixed |
| 2863 | ** line endings. Set to "*" to disable CR+LF checking. |
| 2864 | ** The crnl-glob setting is a compatibility alias. |
| 2865 | */ |
| 2866 | /* |
| 2867 | ** SETTING: crnl-glob width=40 versionable block-text |
| 2868 | ** This is an alias for the crlf-glob setting |
| 2869 | */ |
| 2870 | /* |
| 2871 | ** SETTING: default-perms width=16 default=u |
| 2872 | ** Permissions given automatically to new users. For more |
| @@ -2897,18 +2897,18 @@ | |
| 2897 | ** SETTING: editor width=32 |
| 2898 | ** The value is an external command that will launch the |
| 2899 | ** text editor command used for check-in comments. |
| 2900 | */ |
| 2901 | /* |
| 2902 | ** SETTING: empty-dirs width=40 versionable block-text |
| 2903 | ** The value is a comma or newline-separated list of pathnames. On |
| 2904 | ** update and checkout commands, if no file or directory |
| 2905 | ** exists with that name, an empty directory will be |
| 2906 | ** created. |
| 2907 | */ |
| 2908 | /* |
| 2909 | ** SETTING: encoding-glob width=40 versionable block-text |
| 2910 | ** The value is a comma or newline-separated list of GLOB |
| 2911 | ** patterns specifying files that the "commit" command will |
| 2912 | ** ignore when issuing warnings about text files that may |
| 2913 | ** use another encoding than ASCII or UTF-8. Set to "*" |
| 2914 | ** to disable encoding checking. |
| @@ -2954,19 +2954,19 @@ | |
| 2954 | ** SETTING: https-login boolean default=off |
| 2955 | ** If true, then the Fossil web server will redirect unencrypted |
| 2956 | ** login screeen requests to HTTPS. |
| 2957 | */ |
| 2958 | /* |
| 2959 | ** SETTING: ignore-glob width=40 versionable block-text |
| 2960 | ** The value is a comma or newline-separated list of GLOB |
| 2961 | ** patterns specifying files that the "add", "addremove", |
| 2962 | ** "clean", and "extra" commands will ignore. |
| 2963 | ** |
| 2964 | ** Example: *.log customCode.c notes.txt |
| 2965 | */ |
| 2966 | /* |
| 2967 | ** SETTING: keep-glob width=40 versionable block-text |
| 2968 | ** The value is a comma or newline-separated list of GLOB |
| 2969 | ** patterns specifying files that the "clean" command will keep |
| 2970 | */ |
| 2971 | /* |
| 2972 | ** SETTING: localauth boolean default=off |
| @@ -3116,11 +3116,11 @@ | |
| 3116 | ** This is the setup script to be evaluated after creating |
| 3117 | ** and initializing the TH1 interpreter. By default, this |
| 3118 | ** is empty and no extra setup is performed. |
| 3119 | */ |
| 3120 | /* |
| 3121 | ** SETTING: th1-uri-regexp width=40 versionable block-text |
| 3122 | ** Specify which URI's are allowed in HTTP requests from |
| 3123 | ** TH1 scripts. If empty, no HTTP requests are allowed |
| 3124 | ** whatsoever. |
| 3125 | */ |
| 3126 | /* |
| 3127 |
+44
-4
| --- src/dispatch.c | ||
| +++ src/dispatch.c | ||
| @@ -177,10 +177,11 @@ | ||
| 177 | 177 | ** |
| 178 | 178 | ** Options: |
| 179 | 179 | ** -e|--everything Show all commands and pages. |
| 180 | 180 | ** -t|--test Include test- commands |
| 181 | 181 | ** -w|--www Show WWW pages. |
| 182 | +** -w|--settings Show settings. | |
| 182 | 183 | ** -h|--html Transform output to HTML. |
| 183 | 184 | */ |
| 184 | 185 | void test_all_help_cmd(void){ |
| 185 | 186 | int i; |
| 186 | 187 | int mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER; |
| @@ -189,10 +190,13 @@ | ||
| 189 | 190 | if( find_option("www","w",0) ){ |
| 190 | 191 | mask = CMDFLAG_WEBPAGE; |
| 191 | 192 | } |
| 192 | 193 | if( find_option("everything","e",0) ){ |
| 193 | 194 | mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER | CMDFLAG_WEBPAGE; |
| 195 | + } | |
| 196 | + if( find_option("settings","s",0) ){ | |
| 197 | + mask = CMDFLAG_SETTING; | |
| 194 | 198 | } |
| 195 | 199 | if( find_option("test","t",0) ){ |
| 196 | 200 | mask |= CMDFLAG_TEST; |
| 197 | 201 | } |
| 198 | 202 | if( useHtml ) fossil_print("<!--\n"); |
| @@ -199,10 +203,11 @@ | ||
| 199 | 203 | fossil_print("Help text for:\n"); |
| 200 | 204 | if( mask & CMDFLAG_1ST_TIER ) fossil_print(" * Commands\n"); |
| 201 | 205 | if( mask & CMDFLAG_2ND_TIER ) fossil_print(" * Auxiliary commands\n"); |
| 202 | 206 | if( mask & CMDFLAG_TEST ) fossil_print(" * Test commands\n"); |
| 203 | 207 | if( mask & CMDFLAG_WEBPAGE ) fossil_print(" * Web pages\n"); |
| 208 | + if( mask & CMDFLAG_SETTING ) fossil_print(" * Settings\n"); | |
| 204 | 209 | if( useHtml ){ |
| 205 | 210 | fossil_print("-->\n"); |
| 206 | 211 | fossil_print("<!-- start_all_help -->\n"); |
| 207 | 212 | }else{ |
| 208 | 213 | fossil_print("---\n"); |
| @@ -231,11 +236,11 @@ | ||
| 231 | 236 | /* |
| 232 | 237 | ** WEBPAGE: help |
| 233 | 238 | ** URL: /help?name=CMD |
| 234 | 239 | ** |
| 235 | 240 | ** Show the built-in help text for CMD. CMD can be a command-line interface |
| 236 | -** command or a page name from the web interface. | |
| 241 | +** command or a page name from the web interface or a setting. | |
| 237 | 242 | */ |
| 238 | 243 | void help_page(void){ |
| 239 | 244 | const char *zCmd = P("cmd"); |
| 240 | 245 | |
| 241 | 246 | if( zCmd==0 ) zCmd = P("name"); |
| @@ -244,25 +249,27 @@ | ||
| 244 | 249 | const CmdOrPage *pCmd = 0; |
| 245 | 250 | |
| 246 | 251 | style_header("Help: %s", zCmd); |
| 247 | 252 | |
| 248 | 253 | style_submenu_element("Command-List", "%s/help", g.zTop); |
| 254 | + rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd); | |
| 249 | 255 | if( *zCmd=='/' ){ |
| 250 | 256 | /* Some of the webpages require query parameters in order to work. |
| 251 | 257 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 252 | 258 | @ <h1>The "%h(zCmd)" page:</h1> |
| 259 | + }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){ | |
| 260 | + @ <h1>The "%h(pCmd->zName)" setting:</h1> | |
| 253 | 261 | }else{ |
| 254 | 262 | @ <h1>The "%h(zCmd)" command:</h1> |
| 255 | 263 | } |
| 256 | - rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd); | |
| 257 | 264 | if( rc==1 ){ |
| 258 | 265 | @ unknown command: %h(zCmd) |
| 259 | 266 | }else if( rc==2 ){ |
| 260 | 267 | @ ambiguous command prefix: %h(zCmd) |
| 261 | 268 | }else{ |
| 262 | 269 | if( pCmd->zHelp[0]==0 ){ |
| 263 | - @ no help available for the %h(pCmd->zName) command | |
| 270 | + @ No help available for "%h(pCmd->zName)" | |
| 264 | 271 | }else{ |
| 265 | 272 | @ <blockquote> |
| 266 | 273 | help_to_html(pCmd->zHelp, cgi_output_blob()); |
| 267 | 274 | @ </blockquote> |
| 268 | 275 | } |
| @@ -341,10 +348,40 @@ | ||
| 341 | 348 | for(i=j=0; i<MX_COMMAND; i++){ |
| 342 | 349 | const char *z = aCommand[i].zName; |
| 343 | 350 | if( strncmp(z,"test",4)!=0 ) continue; |
| 344 | 351 | if( j==0 ){ |
| 345 | 352 | @ <td valign="top"><ul> |
| 353 | + } | |
| 354 | + if( aCommand[i].zHelp[0] ){ | |
| 355 | + @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> | |
| 356 | + }else{ | |
| 357 | + @ <li>%s(z)</li> | |
| 358 | + } | |
| 359 | + j++; | |
| 360 | + if( j>=n ){ | |
| 361 | + @ </ul></td> | |
| 362 | + j = 0; | |
| 363 | + } | |
| 364 | + } | |
| 365 | + if( j>0 ){ | |
| 366 | + @ </ul></td> | |
| 367 | + } | |
| 368 | + @ </tr></table> | |
| 369 | + | |
| 370 | + @ <h1>Settings:</h1> | |
| 371 | + @ <table border="0"><tr> | |
| 372 | + for(i=j=0; i<MX_COMMAND; i++){ | |
| 373 | + const char *z = aCommand[i].zName; | |
| 374 | + if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue; | |
| 375 | + j++; | |
| 376 | + } | |
| 377 | + n = (j+4)/5; | |
| 378 | + for(i=j=0; i<MX_COMMAND; i++){ | |
| 379 | + const char *z = aCommand[i].zName; | |
| 380 | + if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue; | |
| 381 | + if( j==0 ){ | |
| 382 | + @ <td valign="top"><ul> | |
| 346 | 383 | } |
| 347 | 384 | if( aCommand[i].zHelp[0] ){ |
| 348 | 385 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 349 | 386 | }else{ |
| 350 | 387 | @ <li>%s(z)</li> |
| @@ -515,11 +552,14 @@ | ||
| 515 | 552 | if( z==0 ){ |
| 516 | 553 | fossil_fatal("no help available for the %s %s", |
| 517 | 554 | pCmd->zName, zCmdOrPage); |
| 518 | 555 | } |
| 519 | 556 | if( pCmd->eCmdFlags & CMDFLAG_SETTING ){ |
| 520 | - fossil_print("Setting: \"%s\"\n\n", pCmd->zName); | |
| 557 | + fossil_print("Setting: \"%s\"%s\n\n", | |
| 558 | + pCmd->zName, | |
| 559 | + (pCmd->eCmdFlags & CMDFLAG_VERSIONABLE)!=0 ? " (versionable)" : "" | |
| 560 | + ); | |
| 521 | 561 | } |
| 522 | 562 | while( *z ){ |
| 523 | 563 | if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){ |
| 524 | 564 | fossil_print("%s", g.argv[0]); |
| 525 | 565 | z += 7; |
| 526 | 566 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -177,10 +177,11 @@ | |
| 177 | ** |
| 178 | ** Options: |
| 179 | ** -e|--everything Show all commands and pages. |
| 180 | ** -t|--test Include test- commands |
| 181 | ** -w|--www Show WWW pages. |
| 182 | ** -h|--html Transform output to HTML. |
| 183 | */ |
| 184 | void test_all_help_cmd(void){ |
| 185 | int i; |
| 186 | int mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER; |
| @@ -189,10 +190,13 @@ | |
| 189 | if( find_option("www","w",0) ){ |
| 190 | mask = CMDFLAG_WEBPAGE; |
| 191 | } |
| 192 | if( find_option("everything","e",0) ){ |
| 193 | mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER | CMDFLAG_WEBPAGE; |
| 194 | } |
| 195 | if( find_option("test","t",0) ){ |
| 196 | mask |= CMDFLAG_TEST; |
| 197 | } |
| 198 | if( useHtml ) fossil_print("<!--\n"); |
| @@ -199,10 +203,11 @@ | |
| 199 | fossil_print("Help text for:\n"); |
| 200 | if( mask & CMDFLAG_1ST_TIER ) fossil_print(" * Commands\n"); |
| 201 | if( mask & CMDFLAG_2ND_TIER ) fossil_print(" * Auxiliary commands\n"); |
| 202 | if( mask & CMDFLAG_TEST ) fossil_print(" * Test commands\n"); |
| 203 | if( mask & CMDFLAG_WEBPAGE ) fossil_print(" * Web pages\n"); |
| 204 | if( useHtml ){ |
| 205 | fossil_print("-->\n"); |
| 206 | fossil_print("<!-- start_all_help -->\n"); |
| 207 | }else{ |
| 208 | fossil_print("---\n"); |
| @@ -231,11 +236,11 @@ | |
| 231 | /* |
| 232 | ** WEBPAGE: help |
| 233 | ** URL: /help?name=CMD |
| 234 | ** |
| 235 | ** Show the built-in help text for CMD. CMD can be a command-line interface |
| 236 | ** command or a page name from the web interface. |
| 237 | */ |
| 238 | void help_page(void){ |
| 239 | const char *zCmd = P("cmd"); |
| 240 | |
| 241 | if( zCmd==0 ) zCmd = P("name"); |
| @@ -244,25 +249,27 @@ | |
| 244 | const CmdOrPage *pCmd = 0; |
| 245 | |
| 246 | style_header("Help: %s", zCmd); |
| 247 | |
| 248 | style_submenu_element("Command-List", "%s/help", g.zTop); |
| 249 | if( *zCmd=='/' ){ |
| 250 | /* Some of the webpages require query parameters in order to work. |
| 251 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 252 | @ <h1>The "%h(zCmd)" page:</h1> |
| 253 | }else{ |
| 254 | @ <h1>The "%h(zCmd)" command:</h1> |
| 255 | } |
| 256 | rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd); |
| 257 | if( rc==1 ){ |
| 258 | @ unknown command: %h(zCmd) |
| 259 | }else if( rc==2 ){ |
| 260 | @ ambiguous command prefix: %h(zCmd) |
| 261 | }else{ |
| 262 | if( pCmd->zHelp[0]==0 ){ |
| 263 | @ no help available for the %h(pCmd->zName) command |
| 264 | }else{ |
| 265 | @ <blockquote> |
| 266 | help_to_html(pCmd->zHelp, cgi_output_blob()); |
| 267 | @ </blockquote> |
| 268 | } |
| @@ -341,10 +348,40 @@ | |
| 341 | for(i=j=0; i<MX_COMMAND; i++){ |
| 342 | const char *z = aCommand[i].zName; |
| 343 | if( strncmp(z,"test",4)!=0 ) continue; |
| 344 | if( j==0 ){ |
| 345 | @ <td valign="top"><ul> |
| 346 | } |
| 347 | if( aCommand[i].zHelp[0] ){ |
| 348 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 349 | }else{ |
| 350 | @ <li>%s(z)</li> |
| @@ -515,11 +552,14 @@ | |
| 515 | if( z==0 ){ |
| 516 | fossil_fatal("no help available for the %s %s", |
| 517 | pCmd->zName, zCmdOrPage); |
| 518 | } |
| 519 | if( pCmd->eCmdFlags & CMDFLAG_SETTING ){ |
| 520 | fossil_print("Setting: \"%s\"\n\n", pCmd->zName); |
| 521 | } |
| 522 | while( *z ){ |
| 523 | if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){ |
| 524 | fossil_print("%s", g.argv[0]); |
| 525 | z += 7; |
| 526 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -177,10 +177,11 @@ | |
| 177 | ** |
| 178 | ** Options: |
| 179 | ** -e|--everything Show all commands and pages. |
| 180 | ** -t|--test Include test- commands |
| 181 | ** -w|--www Show WWW pages. |
| 182 | ** -w|--settings Show settings. |
| 183 | ** -h|--html Transform output to HTML. |
| 184 | */ |
| 185 | void test_all_help_cmd(void){ |
| 186 | int i; |
| 187 | int mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER; |
| @@ -189,10 +190,13 @@ | |
| 190 | if( find_option("www","w",0) ){ |
| 191 | mask = CMDFLAG_WEBPAGE; |
| 192 | } |
| 193 | if( find_option("everything","e",0) ){ |
| 194 | mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER | CMDFLAG_WEBPAGE; |
| 195 | } |
| 196 | if( find_option("settings","s",0) ){ |
| 197 | mask = CMDFLAG_SETTING; |
| 198 | } |
| 199 | if( find_option("test","t",0) ){ |
| 200 | mask |= CMDFLAG_TEST; |
| 201 | } |
| 202 | if( useHtml ) fossil_print("<!--\n"); |
| @@ -199,10 +203,11 @@ | |
| 203 | fossil_print("Help text for:\n"); |
| 204 | if( mask & CMDFLAG_1ST_TIER ) fossil_print(" * Commands\n"); |
| 205 | if( mask & CMDFLAG_2ND_TIER ) fossil_print(" * Auxiliary commands\n"); |
| 206 | if( mask & CMDFLAG_TEST ) fossil_print(" * Test commands\n"); |
| 207 | if( mask & CMDFLAG_WEBPAGE ) fossil_print(" * Web pages\n"); |
| 208 | if( mask & CMDFLAG_SETTING ) fossil_print(" * Settings\n"); |
| 209 | if( useHtml ){ |
| 210 | fossil_print("-->\n"); |
| 211 | fossil_print("<!-- start_all_help -->\n"); |
| 212 | }else{ |
| 213 | fossil_print("---\n"); |
| @@ -231,11 +236,11 @@ | |
| 236 | /* |
| 237 | ** WEBPAGE: help |
| 238 | ** URL: /help?name=CMD |
| 239 | ** |
| 240 | ** Show the built-in help text for CMD. CMD can be a command-line interface |
| 241 | ** command or a page name from the web interface or a setting. |
| 242 | */ |
| 243 | void help_page(void){ |
| 244 | const char *zCmd = P("cmd"); |
| 245 | |
| 246 | if( zCmd==0 ) zCmd = P("name"); |
| @@ -244,25 +249,27 @@ | |
| 249 | const CmdOrPage *pCmd = 0; |
| 250 | |
| 251 | style_header("Help: %s", zCmd); |
| 252 | |
| 253 | style_submenu_element("Command-List", "%s/help", g.zTop); |
| 254 | rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd); |
| 255 | if( *zCmd=='/' ){ |
| 256 | /* Some of the webpages require query parameters in order to work. |
| 257 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 258 | @ <h1>The "%h(zCmd)" page:</h1> |
| 259 | }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){ |
| 260 | @ <h1>The "%h(pCmd->zName)" setting:</h1> |
| 261 | }else{ |
| 262 | @ <h1>The "%h(zCmd)" command:</h1> |
| 263 | } |
| 264 | if( rc==1 ){ |
| 265 | @ unknown command: %h(zCmd) |
| 266 | }else if( rc==2 ){ |
| 267 | @ ambiguous command prefix: %h(zCmd) |
| 268 | }else{ |
| 269 | if( pCmd->zHelp[0]==0 ){ |
| 270 | @ No help available for "%h(pCmd->zName)" |
| 271 | }else{ |
| 272 | @ <blockquote> |
| 273 | help_to_html(pCmd->zHelp, cgi_output_blob()); |
| 274 | @ </blockquote> |
| 275 | } |
| @@ -341,10 +348,40 @@ | |
| 348 | for(i=j=0; i<MX_COMMAND; i++){ |
| 349 | const char *z = aCommand[i].zName; |
| 350 | if( strncmp(z,"test",4)!=0 ) continue; |
| 351 | if( j==0 ){ |
| 352 | @ <td valign="top"><ul> |
| 353 | } |
| 354 | if( aCommand[i].zHelp[0] ){ |
| 355 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 356 | }else{ |
| 357 | @ <li>%s(z)</li> |
| 358 | } |
| 359 | j++; |
| 360 | if( j>=n ){ |
| 361 | @ </ul></td> |
| 362 | j = 0; |
| 363 | } |
| 364 | } |
| 365 | if( j>0 ){ |
| 366 | @ </ul></td> |
| 367 | } |
| 368 | @ </tr></table> |
| 369 | |
| 370 | @ <h1>Settings:</h1> |
| 371 | @ <table border="0"><tr> |
| 372 | for(i=j=0; i<MX_COMMAND; i++){ |
| 373 | const char *z = aCommand[i].zName; |
| 374 | if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue; |
| 375 | j++; |
| 376 | } |
| 377 | n = (j+4)/5; |
| 378 | for(i=j=0; i<MX_COMMAND; i++){ |
| 379 | const char *z = aCommand[i].zName; |
| 380 | if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue; |
| 381 | if( j==0 ){ |
| 382 | @ <td valign="top"><ul> |
| 383 | } |
| 384 | if( aCommand[i].zHelp[0] ){ |
| 385 | @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li> |
| 386 | }else{ |
| 387 | @ <li>%s(z)</li> |
| @@ -515,11 +552,14 @@ | |
| 552 | if( z==0 ){ |
| 553 | fossil_fatal("no help available for the %s %s", |
| 554 | pCmd->zName, zCmdOrPage); |
| 555 | } |
| 556 | if( pCmd->eCmdFlags & CMDFLAG_SETTING ){ |
| 557 | fossil_print("Setting: \"%s\"%s\n\n", |
| 558 | pCmd->zName, |
| 559 | (pCmd->eCmdFlags & CMDFLAG_VERSIONABLE)!=0 ? " (versionable)" : "" |
| 560 | ); |
| 561 | } |
| 562 | while( *z ){ |
| 563 | if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){ |
| 564 | fossil_print("%s", g.argv[0]); |
| 565 | z += 7; |
| 566 |
+28
-28
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1552,23 +1552,27 @@ | ||
| 1552 | 1552 | /* Provide read-only access to versioned settings, |
| 1553 | 1553 | but only if no repo file was explicitly provided. */ |
| 1554 | 1554 | db_open_local(0); |
| 1555 | 1555 | } |
| 1556 | 1556 | db_begin_transaction(); |
| 1557 | - @ <p>This page provides a simple interface to the "fossil setting" command. | |
| 1558 | - @ See the "fossil help setting" output below for further information on | |
| 1559 | - @ the meaning of each setting.</p><hr /> | |
| 1557 | + @ <p>Settings marked with (v) are "versionable" and will be overridden | |
| 1558 | + @ by the contents of managed files named | |
| 1559 | + @ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>". | |
| 1560 | + @ If the file for a versionable setting exists, the value cannot be | |
| 1561 | + @ changed on this screen.</p><hr /><p> | |
| 1562 | + @ | |
| 1560 | 1563 | @ <form action="%s(g.zTop)/setup_settings" method="post"><div> |
| 1561 | 1564 | @ <table border="0"><tr><td valign="top"> |
| 1562 | 1565 | login_insert_csrf_secret(); |
| 1563 | 1566 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1564 | 1567 | if( pSet->width==0 ){ |
| 1565 | 1568 | int hasVersionableValue = pSet->versionable && |
| 1566 | 1569 | (db_get_versioned(pSet->name, NULL)!=0); |
| 1567 | - onoff_attribute(pSet->name, pSet->name, | |
| 1570 | + onoff_attribute("", pSet->name, | |
| 1568 | 1571 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1569 | 1572 | is_truth(pSet->def), hasVersionableValue); |
| 1573 | + @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a> | |
| 1570 | 1574 | if( pSet->versionable ){ |
| 1571 | 1575 | @ (v)<br /> |
| 1572 | 1576 | } else { |
| 1573 | 1577 | @ <br /> |
| 1574 | 1578 | } |
| @@ -1575,46 +1579,42 @@ | ||
| 1575 | 1579 | } |
| 1576 | 1580 | } |
| 1577 | 1581 | @ <br /><input type="submit" name="submit" value="Apply Changes" /> |
| 1578 | 1582 | @ </td><td style="width:50px;"></td><td valign="top"> |
| 1579 | 1583 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1580 | - if( pSet->width!=0 && !pSet->versionable && !pSet->forceTextArea ){ | |
| 1581 | - entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name, | |
| 1582 | - pSet->var!=0 ? pSet->var : pSet->name, | |
| 1583 | - (char*)pSet->def, 0); | |
| 1584 | - @ <br /> | |
| 1585 | - } | |
| 1586 | - } | |
| 1587 | - for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ | |
| 1588 | - if( pSet->width!=0 && !pSet->versionable && pSet->forceTextArea ){ | |
| 1589 | - @<b>%s(pSet->name)</b><br /> | |
| 1590 | - textarea_attribute("", /*rows*/ 3, /*cols*/ 50, pSet->name, | |
| 1591 | - pSet->var!=0 ? pSet->var : pSet->name, | |
| 1592 | - (char*)pSet->def, 0); | |
| 1593 | - @ <br /> | |
| 1584 | + if( pSet->width!=0 && !pSet->forceTextArea ){ | |
| 1585 | + int hasVersionableValue = pSet->versionable && | |
| 1586 | + (db_get_versioned(pSet->name, NULL)!=0); | |
| 1587 | + entry_attribute("", /*pSet->width*/ 25, pSet->name, | |
| 1588 | + pSet->var!=0 ? pSet->var : pSet->name, | |
| 1589 | + (char*)pSet->def, hasVersionableValue); | |
| 1590 | + @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a> | |
| 1591 | + if( pSet->versionable ){ | |
| 1592 | + @ (v)<br /> | |
| 1593 | + } else { | |
| 1594 | + @ <br /> | |
| 1595 | + } | |
| 1594 | 1596 | } |
| 1595 | 1597 | } |
| 1596 | 1598 | @ </td><td style="width:50px;"></td><td valign="top"> |
| 1597 | 1599 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1598 | - if( pSet->width!=0 && pSet->versionable ){ | |
| 1600 | + if( pSet->width!=0 && pSet->forceTextArea ){ | |
| 1599 | 1601 | int hasVersionableValue = db_get_versioned(pSet->name, NULL)!=0; |
| 1600 | - @<b>%s(pSet->name)</b> (v)<br /> | |
| 1601 | - textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name, | |
| 1602 | + @ <a href='%R/help?cmd=%s(pSet->name)'>%s(pSet->name)</a> | |
| 1603 | + if( pSet->versionable ){ | |
| 1604 | + @ (v)<br /> | |
| 1605 | + } else { | |
| 1606 | + @ <br /> | |
| 1607 | + } | |
| 1608 | + textarea_attribute("", /*rows*/ 2, /*cols*/ 35, pSet->name, | |
| 1602 | 1609 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1603 | 1610 | (char*)pSet->def, hasVersionableValue); |
| 1604 | 1611 | @<br /> |
| 1605 | 1612 | } |
| 1606 | 1613 | } |
| 1607 | 1614 | @ </td></tr></table> |
| 1608 | 1615 | @ </div></form> |
| 1609 | - @ <p>Settings marked with (v) are 'versionable' and will be overridden | |
| 1610 | - @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt> | |
| 1611 | - @ in the check-out root. | |
| 1612 | - @ If such a file is present, the corresponding field above is not | |
| 1613 | - @ editable.</p><hr /><p> | |
| 1614 | - @ These settings work the same as the | |
| 1615 | - @ <a href='%R/help?cmd=settings'>fossil set</a> command. | |
| 1616 | 1616 | db_end_transaction(0); |
| 1617 | 1617 | style_footer(); |
| 1618 | 1618 | } |
| 1619 | 1619 | |
| 1620 | 1620 | /* |
| 1621 | 1621 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1552,23 +1552,27 @@ | |
| 1552 | /* Provide read-only access to versioned settings, |
| 1553 | but only if no repo file was explicitly provided. */ |
| 1554 | db_open_local(0); |
| 1555 | } |
| 1556 | db_begin_transaction(); |
| 1557 | @ <p>This page provides a simple interface to the "fossil setting" command. |
| 1558 | @ See the "fossil help setting" output below for further information on |
| 1559 | @ the meaning of each setting.</p><hr /> |
| 1560 | @ <form action="%s(g.zTop)/setup_settings" method="post"><div> |
| 1561 | @ <table border="0"><tr><td valign="top"> |
| 1562 | login_insert_csrf_secret(); |
| 1563 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1564 | if( pSet->width==0 ){ |
| 1565 | int hasVersionableValue = pSet->versionable && |
| 1566 | (db_get_versioned(pSet->name, NULL)!=0); |
| 1567 | onoff_attribute(pSet->name, pSet->name, |
| 1568 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1569 | is_truth(pSet->def), hasVersionableValue); |
| 1570 | if( pSet->versionable ){ |
| 1571 | @ (v)<br /> |
| 1572 | } else { |
| 1573 | @ <br /> |
| 1574 | } |
| @@ -1575,46 +1579,42 @@ | |
| 1575 | } |
| 1576 | } |
| 1577 | @ <br /><input type="submit" name="submit" value="Apply Changes" /> |
| 1578 | @ </td><td style="width:50px;"></td><td valign="top"> |
| 1579 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1580 | if( pSet->width!=0 && !pSet->versionable && !pSet->forceTextArea ){ |
| 1581 | entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name, |
| 1582 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1583 | (char*)pSet->def, 0); |
| 1584 | @ <br /> |
| 1585 | } |
| 1586 | } |
| 1587 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1588 | if( pSet->width!=0 && !pSet->versionable && pSet->forceTextArea ){ |
| 1589 | @<b>%s(pSet->name)</b><br /> |
| 1590 | textarea_attribute("", /*rows*/ 3, /*cols*/ 50, pSet->name, |
| 1591 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1592 | (char*)pSet->def, 0); |
| 1593 | @ <br /> |
| 1594 | } |
| 1595 | } |
| 1596 | @ </td><td style="width:50px;"></td><td valign="top"> |
| 1597 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1598 | if( pSet->width!=0 && pSet->versionable ){ |
| 1599 | int hasVersionableValue = db_get_versioned(pSet->name, NULL)!=0; |
| 1600 | @<b>%s(pSet->name)</b> (v)<br /> |
| 1601 | textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name, |
| 1602 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1603 | (char*)pSet->def, hasVersionableValue); |
| 1604 | @<br /> |
| 1605 | } |
| 1606 | } |
| 1607 | @ </td></tr></table> |
| 1608 | @ </div></form> |
| 1609 | @ <p>Settings marked with (v) are 'versionable' and will be overridden |
| 1610 | @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt> |
| 1611 | @ in the check-out root. |
| 1612 | @ If such a file is present, the corresponding field above is not |
| 1613 | @ editable.</p><hr /><p> |
| 1614 | @ These settings work the same as the |
| 1615 | @ <a href='%R/help?cmd=settings'>fossil set</a> command. |
| 1616 | db_end_transaction(0); |
| 1617 | style_footer(); |
| 1618 | } |
| 1619 | |
| 1620 | /* |
| 1621 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1552,23 +1552,27 @@ | |
| 1552 | /* Provide read-only access to versioned settings, |
| 1553 | but only if no repo file was explicitly provided. */ |
| 1554 | db_open_local(0); |
| 1555 | } |
| 1556 | db_begin_transaction(); |
| 1557 | @ <p>Settings marked with (v) are "versionable" and will be overridden |
| 1558 | @ by the contents of managed files named |
| 1559 | @ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>". |
| 1560 | @ If the file for a versionable setting exists, the value cannot be |
| 1561 | @ changed on this screen.</p><hr /><p> |
| 1562 | @ |
| 1563 | @ <form action="%s(g.zTop)/setup_settings" method="post"><div> |
| 1564 | @ <table border="0"><tr><td valign="top"> |
| 1565 | login_insert_csrf_secret(); |
| 1566 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1567 | if( pSet->width==0 ){ |
| 1568 | int hasVersionableValue = pSet->versionable && |
| 1569 | (db_get_versioned(pSet->name, NULL)!=0); |
| 1570 | onoff_attribute("", pSet->name, |
| 1571 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1572 | is_truth(pSet->def), hasVersionableValue); |
| 1573 | @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a> |
| 1574 | if( pSet->versionable ){ |
| 1575 | @ (v)<br /> |
| 1576 | } else { |
| 1577 | @ <br /> |
| 1578 | } |
| @@ -1575,46 +1579,42 @@ | |
| 1579 | } |
| 1580 | } |
| 1581 | @ <br /><input type="submit" name="submit" value="Apply Changes" /> |
| 1582 | @ </td><td style="width:50px;"></td><td valign="top"> |
| 1583 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1584 | if( pSet->width!=0 && !pSet->forceTextArea ){ |
| 1585 | int hasVersionableValue = pSet->versionable && |
| 1586 | (db_get_versioned(pSet->name, NULL)!=0); |
| 1587 | entry_attribute("", /*pSet->width*/ 25, pSet->name, |
| 1588 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1589 | (char*)pSet->def, hasVersionableValue); |
| 1590 | @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a> |
| 1591 | if( pSet->versionable ){ |
| 1592 | @ (v)<br /> |
| 1593 | } else { |
| 1594 | @ <br /> |
| 1595 | } |
| 1596 | } |
| 1597 | } |
| 1598 | @ </td><td style="width:50px;"></td><td valign="top"> |
| 1599 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1600 | if( pSet->width!=0 && pSet->forceTextArea ){ |
| 1601 | int hasVersionableValue = db_get_versioned(pSet->name, NULL)!=0; |
| 1602 | @ <a href='%R/help?cmd=%s(pSet->name)'>%s(pSet->name)</a> |
| 1603 | if( pSet->versionable ){ |
| 1604 | @ (v)<br /> |
| 1605 | } else { |
| 1606 | @ <br /> |
| 1607 | } |
| 1608 | textarea_attribute("", /*rows*/ 2, /*cols*/ 35, pSet->name, |
| 1609 | pSet->var!=0 ? pSet->var : pSet->name, |
| 1610 | (char*)pSet->def, hasVersionableValue); |
| 1611 | @<br /> |
| 1612 | } |
| 1613 | } |
| 1614 | @ </td></tr></table> |
| 1615 | @ </div></form> |
| 1616 | db_end_transaction(0); |
| 1617 | style_footer(); |
| 1618 | } |
| 1619 | |
| 1620 | /* |
| 1621 |