Fossil SCM

The main menu for web display is not determined by the "mainmenu" setting, for the built-in skins. Customized skins that ignore the mainmenu setting continue to operate as before. Added the "string match" TH1 command to help.

drh 2021-01-26 21:53 trunk
Commit 923841b709092decda0308e39a34e9e1257be43857184785ccae136d0ea57067
--- skins/ardoise/header.txt
+++ skins/ardoise/header.txt
@@ -21,50 +21,24 @@
2121
2222
<!-- Main Menu -->
2323
<div class="mainmenu">
2424
<ul>
2525
<th1>
26
-proc menulink {url name} {
27
- upvar current_page current
28
- upvar home home
29
- if {[string range $url 0 [string length $current]] eq "/$current"} {
26
+html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a></li>\n"
27
+builtin_request_js hbmenu.js
28
+set once 1
29
+foreach {name url expr class} $mainmenu {
30
+ if {![capexpr $expr]} continue
31
+ if {$once && [string match /$current_page* $url]} {
3032
html "<li class='active'>"
33
+ set once 0
3134
} else {
3235
html "<li>"
3336
}
3437
html "<a href='$home$url'>$name</a></li>\n"
3538
}
36
-html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a></li>"
37
-builtin_request_js hbmenu.js
38
-menulink $index_page Home
39
-if {[anycap jor]} {
40
- menulink /timeline Timeline
41
-}
42
-if {[hascap oh]} {
43
- menulink /dir?ci=tip Files
44
-}
45
-# if {[hascap o]} {
46
-# menulink /brlist Branches
47
-# menulink /taglist Tags
48
-# }
49
-# if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
50
-# menulink /forum Forum
51
-# }
52
-# if {[hascap r]} {
53
-# menulink /ticket Tickets
54
-# }
55
-# if {[hascap j]} {
56
-# menulink /wiki Wiki
57
-# }
58
-# if {[hascap o]} {
59
-# menulink /help Help
60
-# }
61
-if {[hascap s]} {
62
- menulink /setup Admin
63
-}
64
- </th1>
65
- </ul>
39
+</th1></ul>
6640
</div> <!-- end div mainmenu -->
6741
<div id="hbdrop"></div>
6842
</div> <!-- end div container -->
6943
</div> <!-- end div header -->
7044
<div class="middle max-full-width">
7145
--- skins/ardoise/header.txt
+++ skins/ardoise/header.txt
@@ -21,50 +21,24 @@
21
22 <!-- Main Menu -->
23 <div class="mainmenu">
24 <ul>
25 <th1>
26 proc menulink {url name} {
27 upvar current_page current
28 upvar home home
29 if {[string range $url 0 [string length $current]] eq "/$current"} {
 
 
30 html "<li class='active'>"
 
31 } else {
32 html "<li>"
33 }
34 html "<a href='$home$url'>$name</a></li>\n"
35 }
36 html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a></li>"
37 builtin_request_js hbmenu.js
38 menulink $index_page Home
39 if {[anycap jor]} {
40 menulink /timeline Timeline
41 }
42 if {[hascap oh]} {
43 menulink /dir?ci=tip Files
44 }
45 # if {[hascap o]} {
46 # menulink /brlist Branches
47 # menulink /taglist Tags
48 # }
49 # if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
50 # menulink /forum Forum
51 # }
52 # if {[hascap r]} {
53 # menulink /ticket Tickets
54 # }
55 # if {[hascap j]} {
56 # menulink /wiki Wiki
57 # }
58 # if {[hascap o]} {
59 # menulink /help Help
60 # }
61 if {[hascap s]} {
62 menulink /setup Admin
63 }
64 </th1>
65 </ul>
66 </div> <!-- end div mainmenu -->
67 <div id="hbdrop"></div>
68 </div> <!-- end div container -->
69 </div> <!-- end div header -->
70 <div class="middle max-full-width">
71
--- skins/ardoise/header.txt
+++ skins/ardoise/header.txt
@@ -21,50 +21,24 @@
21
22 <!-- Main Menu -->
23 <div class="mainmenu">
24 <ul>
25 <th1>
26 html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a></li>\n"
27 builtin_request_js hbmenu.js
28 set once 1
29 foreach {name url expr class} $mainmenu {
30 if {![capexpr $expr]} continue
31 if {$once && [string match /$current_page* $url]} {
32 html "<li class='active'>"
33 set once 0
34 } else {
35 html "<li>"
36 }
37 html "<a href='$home$url'>$name</a></li>\n"
38 }
39 </th1></ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40 </div> <!-- end div mainmenu -->
41 <div id="hbdrop"></div>
42 </div> <!-- end div container -->
43 </div> <!-- end div header -->
44 <div class="middle max-full-width">
45
--- skins/black_and_white/header.txt
+++ skins/black_and_white/header.txt
@@ -12,36 +12,15 @@
1212
}
1313
</th1></div>
1414
</div>
1515
<div class="mainmenu">
1616
<th1>
17
-html "<a href='$home$index_page'>Home</a>\n"
18
-if {[anycap jor]} {
19
- html "<a href='$home/timeline'>Timeline</a>\n"
20
-}
21
-if {[anoncap oh]} {
22
- html "<a href='$home/tree?ci=tip'>Files</a>\n"
23
-}
24
-if {[anoncap o]} {
25
- html "<a href='$home/brlist'>Branches</a>\n"
26
- html "<a href='$home/taglist'>Tags</a>\n"
27
-}
28
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
29
- html "<a href='$home/forum'>Forum</a>\n"
30
-}
31
-if {[anoncap r]} {
32
- html "<a href='$home/ticket'>Tickets</a>\n"
33
-}
34
-if {[anoncap j]} {
35
- html "<a href='$home/wiki'>Wiki</a>\n"
36
-}
37
-if {[hascap s]} {
38
- html "<a href='$home/setup'>Admin</a>\n"
39
-} elseif {[hascap a]} {
40
- html "<a href='$home/setup_ulist'>Users</a>\n"
17
+foreach {name url expr class} $mainmenu {
18
+ if {![capexpr $expr]} continue
19
+ html "<a href='$home$url'>$name</a><br/>\n"
4120
}
4221
if {[info exists login]} {
4322
html "<a href='$home/login'>Logout</a>\n"
4423
} else {
4524
html "<a href='$home/login'>Login</a>\n"
4625
}
47
-</th1></ul></div>
26
+</th1></div>
4827
--- skins/black_and_white/header.txt
+++ skins/black_and_white/header.txt
@@ -12,36 +12,15 @@
12 }
13 </th1></div>
14 </div>
15 <div class="mainmenu">
16 <th1>
17 html "<a href='$home$index_page'>Home</a>\n"
18 if {[anycap jor]} {
19 html "<a href='$home/timeline'>Timeline</a>\n"
20 }
21 if {[anoncap oh]} {
22 html "<a href='$home/tree?ci=tip'>Files</a>\n"
23 }
24 if {[anoncap o]} {
25 html "<a href='$home/brlist'>Branches</a>\n"
26 html "<a href='$home/taglist'>Tags</a>\n"
27 }
28 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
29 html "<a href='$home/forum'>Forum</a>\n"
30 }
31 if {[anoncap r]} {
32 html "<a href='$home/ticket'>Tickets</a>\n"
33 }
34 if {[anoncap j]} {
35 html "<a href='$home/wiki'>Wiki</a>\n"
36 }
37 if {[hascap s]} {
38 html "<a href='$home/setup'>Admin</a>\n"
39 } elseif {[hascap a]} {
40 html "<a href='$home/setup_ulist'>Users</a>\n"
41 }
42 if {[info exists login]} {
43 html "<a href='$home/login'>Logout</a>\n"
44 } else {
45 html "<a href='$home/login'>Login</a>\n"
46 }
47 </th1></ul></div>
48
--- skins/black_and_white/header.txt
+++ skins/black_and_white/header.txt
@@ -12,36 +12,15 @@
12 }
13 </th1></div>
14 </div>
15 <div class="mainmenu">
16 <th1>
17 foreach {name url expr class} $mainmenu {
18 if {![capexpr $expr]} continue
19 html "<a href='$home$url'>$name</a><br/>\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20 }
21 if {[info exists login]} {
22 html "<a href='$home/login'>Logout</a>\n"
23 } else {
24 html "<a href='$home/login'>Login</a>\n"
25 }
26 </th1></div>
27
--- skins/blitz/header.txt
+++ skins/blitz/header.txt
@@ -23,52 +23,23 @@
2323
</th1>
2424
</div>
2525
2626
<!-- Main Menu -->
2727
<div class="mainmenu">
28
- <ul>
29
- <th1>
30
-proc menulink {url name} {
31
- upvar current_page current
32
- upvar home home
33
- if {[string range $url 0 [string length $current]] eq "/$current"} {
28
+ <ul><th1>
29
+set once 1
30
+foreach {name url expr class} $mainmenu {
31
+ if {![capexpr $expr]} continue
32
+ if {$once && [string match /$current_page* $url]} {
3433
html "<li class='active'>"
34
+ set once 0
3535
} else {
3636
html "<li>"
3737
}
3838
html "<a href='$home$url'>$name</a></li>\n"
3939
}
40
-menulink $index_page Home
41
-if {[anycap jor]} {
42
- menulink /timeline Timeline
43
-}
44
-if {[hascap oh]} {
45
- menulink /dir?ci=tip Files
46
-}
47
-if {[hascap o]} {
48
- menulink /brlist Branches
49
- menulink /taglist Tags
50
-}
51
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
52
- menulink /forum Forum
53
-}
54
-if {[hascap r]} {
55
- menulink /ticket Tickets
56
-}
57
-if {[hascap j]} {
58
- menulink /wiki Wiki
59
-}
60
-if {[hascap o]} {
61
- menulink /help Help
62
-}
63
-if {[hascap s]} {
64
- menulink /setup Admin
65
-} elseif {[hascap a]} {
66
- menulink /setup_ulist Users
67
-}
68
- </th1>
69
- </ul>
40
+</th1></ul>
7041
</div> <!-- end div mainmenu -->
7142
</div> <!-- end div container -->
7243
</div> <!-- end div header -->
7344
<div class="middle max-full-width">
7445
<div class="container">
7546
--- skins/blitz/header.txt
+++ skins/blitz/header.txt
@@ -23,52 +23,23 @@
23 </th1>
24 </div>
25
26 <!-- Main Menu -->
27 <div class="mainmenu">
28 <ul>
29 <th1>
30 proc menulink {url name} {
31 upvar current_page current
32 upvar home home
33 if {[string range $url 0 [string length $current]] eq "/$current"} {
34 html "<li class='active'>"
 
35 } else {
36 html "<li>"
37 }
38 html "<a href='$home$url'>$name</a></li>\n"
39 }
40 menulink $index_page Home
41 if {[anycap jor]} {
42 menulink /timeline Timeline
43 }
44 if {[hascap oh]} {
45 menulink /dir?ci=tip Files
46 }
47 if {[hascap o]} {
48 menulink /brlist Branches
49 menulink /taglist Tags
50 }
51 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
52 menulink /forum Forum
53 }
54 if {[hascap r]} {
55 menulink /ticket Tickets
56 }
57 if {[hascap j]} {
58 menulink /wiki Wiki
59 }
60 if {[hascap o]} {
61 menulink /help Help
62 }
63 if {[hascap s]} {
64 menulink /setup Admin
65 } elseif {[hascap a]} {
66 menulink /setup_ulist Users
67 }
68 </th1>
69 </ul>
70 </div> <!-- end div mainmenu -->
71 </div> <!-- end div container -->
72 </div> <!-- end div header -->
73 <div class="middle max-full-width">
74 <div class="container">
75
--- skins/blitz/header.txt
+++ skins/blitz/header.txt
@@ -23,52 +23,23 @@
23 </th1>
24 </div>
25
26 <!-- Main Menu -->
27 <div class="mainmenu">
28 <ul><th1>
29 set once 1
30 foreach {name url expr class} $mainmenu {
31 if {![capexpr $expr]} continue
32 if {$once && [string match /$current_page* $url]} {
 
33 html "<li class='active'>"
34 set once 0
35 } else {
36 html "<li>"
37 }
38 html "<a href='$home$url'>$name</a></li>\n"
39 }
40 </th1></ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41 </div> <!-- end div mainmenu -->
42 </div> <!-- end div container -->
43 </div> <!-- end div header -->
44 <div class="middle max-full-width">
45 <div class="container">
46
--- skins/blitz_no_logo/header.txt
+++ skins/blitz_no_logo/header.txt
@@ -20,52 +20,23 @@
2020
<small> &nbsp;$<title></small></h1>
2121
</div>
2222
2323
<!-- Main Menu -->
2424
<div class="mainmenu">
25
- <ul>
26
- <th1>
27
-proc menulink {url name} {
28
- upvar current_page current
29
- upvar home home
30
- if {[string range $url 0 [string length $current]] eq "/$current"} {
25
+ <ul><th1>
26
+set once 1
27
+foreach {name url expr class} $mainmenu {
28
+ if {![capexpr $expr]} continue
29
+ if {$once && [string match /$current_page* $url]} {
3130
html "<li class='active'>"
31
+ set once 0
3232
} else {
3333
html "<li>"
3434
}
3535
html "<a href='$home$url'>$name</a></li>\n"
3636
}
37
-menulink $index_page Home
38
-if {[anycap jor]} {
39
- menulink /timeline Timeline
40
-}
41
-if {[hascap oh]} {
42
- menulink /dir?ci=tip Files
43
-}
44
-if {[hascap o]} {
45
- menulink /brlist Branches
46
- menulink /taglist Tags
47
-}
48
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
49
- menulink /forum Forum
50
-}
51
-if {[hascap r]} {
52
- menulink /ticket Tickets
53
-}
54
-if {[hascap j]} {
55
- menulink /wiki Wiki
56
-}
57
-if {[hascap o]} {
58
- menulink /help Help
59
- }
60
-if {[hascap s]} {
61
- menulink /setup Admin
62
-} elseif {[hascap a]} {
63
- menulink /setup_ulist Users
64
-}
65
- </th1>
66
- </ul>
37
+</th1></ul>
6738
</div> <!-- end div mainmenu -->
6839
</div> <!-- end div container -->
6940
</div> <!-- end div header -->
7041
<div class="middle max-full-width">
7142
<div class="container">
7243
--- skins/blitz_no_logo/header.txt
+++ skins/blitz_no_logo/header.txt
@@ -20,52 +20,23 @@
20 <small> &nbsp;$<title></small></h1>
21 </div>
22
23 <!-- Main Menu -->
24 <div class="mainmenu">
25 <ul>
26 <th1>
27 proc menulink {url name} {
28 upvar current_page current
29 upvar home home
30 if {[string range $url 0 [string length $current]] eq "/$current"} {
31 html "<li class='active'>"
 
32 } else {
33 html "<li>"
34 }
35 html "<a href='$home$url'>$name</a></li>\n"
36 }
37 menulink $index_page Home
38 if {[anycap jor]} {
39 menulink /timeline Timeline
40 }
41 if {[hascap oh]} {
42 menulink /dir?ci=tip Files
43 }
44 if {[hascap o]} {
45 menulink /brlist Branches
46 menulink /taglist Tags
47 }
48 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
49 menulink /forum Forum
50 }
51 if {[hascap r]} {
52 menulink /ticket Tickets
53 }
54 if {[hascap j]} {
55 menulink /wiki Wiki
56 }
57 if {[hascap o]} {
58 menulink /help Help
59 }
60 if {[hascap s]} {
61 menulink /setup Admin
62 } elseif {[hascap a]} {
63 menulink /setup_ulist Users
64 }
65 </th1>
66 </ul>
67 </div> <!-- end div mainmenu -->
68 </div> <!-- end div container -->
69 </div> <!-- end div header -->
70 <div class="middle max-full-width">
71 <div class="container">
72
--- skins/blitz_no_logo/header.txt
+++ skins/blitz_no_logo/header.txt
@@ -20,52 +20,23 @@
20 <small> &nbsp;$<title></small></h1>
21 </div>
22
23 <!-- Main Menu -->
24 <div class="mainmenu">
25 <ul><th1>
26 set once 1
27 foreach {name url expr class} $mainmenu {
28 if {![capexpr $expr]} continue
29 if {$once && [string match /$current_page* $url]} {
 
30 html "<li class='active'>"
31 set once 0
32 } else {
33 html "<li>"
34 }
35 html "<a href='$home$url'>$name</a></li>\n"
36 }
37 </th1></ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38 </div> <!-- end div mainmenu -->
39 </div> <!-- end div container -->
40 </div> <!-- end div header -->
41 <div class="middle max-full-width">
42 <div class="container">
43
--- skins/bootstrap/header.txt
+++ skins/bootstrap/header.txt
@@ -39,79 +39,24 @@
3939
html " &middot; <a href='$home/login'>Login</a>"
4040
}
4141
</th1></p>
4242
<ul class="nav navbar-nav">
4343
<th1>
44
- set is_index [expr [string compare [string range $current_page 0 4] "index"]==0]
45
- set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0]
46
- if {$is_index || $is_home} {
47
- html "<li class='active'><a href='$home$index_page'>Home</a></li>\n"
48
- } else {
49
- html "<li><a href='$home$index_page'>Home</a></li>\n"
50
- }
51
- if {[hascap j]} {
52
- if {[string compare [string range $current_page 0 3] "wiki"] == 0} {
53
- html "<li class='active'><a href='$home/wiki'>Wiki</a></li>\n"
54
- } else {
55
- html "<li><a href='$home/wiki'>Wiki</a></li>\n"
56
- }
57
- }
58
- if {[anycap jor]} {
59
- if {[string compare $current_page "timeline"] == 0} {
60
- html "<li class='active'><a href='$home/timeline'>Timeline</a></li>\n"
61
- } else {
62
- html "<li><a href='$home/timeline'>Timeline</a></li>\n"
63
- }
64
- }
65
- if {[hascap oh]} {
66
- if {[string compare [string range $current_page 0 2] "dir"] == 0} {
67
- html "<li class='active'><a href='$home/dir?ci=tip'>Files</a></li>\n"
68
- } else {
69
- html "<li><a href='$home/dir?ci=tip'>Files</a></li>\n"
70
- }
71
- }
72
- if {[hascap o]} {
73
- if {[string compare $current_page "brlist"] == 0} {
74
- html "<li class='active'><a href='$home/brlist'>Branches</a></li>\n"
75
- } else {
76
- html "<li><a href='$home/brlist'>Branches</a></li>\n"
77
- }
78
- if {[string compare $current_page "taglist"] == 0} {
79
- html "<li class='active'><a href='$home/taglist'>Tags</a></li>\n"
80
- } else {
81
- html "<li><a href='$home/taglist'>Tags</a></li>\n"
82
- }
83
- }
84
- if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
85
- if {[string compare $current_page "forum"] == 0} {
86
- html "<li class='active'><a href='$home/forum'>Forum</a></li>\n"
87
- } else {
88
- html "<li><a href='$home/forum'>Forum</a></li>\n"
89
- }
90
- }
91
- if {[hascap r]} {
92
- if {[string compare $current_page "reportlist"] == 0} {
93
- html "<li class='active'><a href='$home/reportlist'>Tickets</a></li>\n"
94
- } else {
95
- html "<li><a href='$home/reportlist'>Tickets</a></li>\n"
96
- }
97
- }
98
- if {[hascap s]} {
99
- if {[string compare [string range $current_page 0 4] "setup"] == 0} {
100
- html "<li class='active'><a href='$home/setup'>Admin</a></li>\n"
101
- } else {
102
- html "<li><a href='$home/setup'>Admin</a></li>\n"
103
- }
104
- } elseif {[hascap a]} {
105
- if {[string compare [string range $current_page 0 4] "setup"] == 0} {
106
- html "<li class='active'><a href='$home/setup_ulist'>Users</a></li>\n"
107
- } else {
108
- html "<li><a href='$home/setup_ulist'>Users</a></li>\n"
109
- }
110
- }
111
- </th1>
112
- </ul>
44
+set once 1
45
+set is_index [expr [string compare [string range $current_page 0 4] "index"]==0]
46
+set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0]
47
+foreach {name url expr class} $mainmenu {
48
+ if {![capexpr $expr]} continue
49
+ if {$once && [string match /$current_page* $url]} {
50
+ html "<li class='active'>"
51
+ set once 0
52
+ } else {
53
+ html "<li>"
54
+ }
55
+ html "<a href='$home$url'>$name</a></li>\n"
56
+}
57
+</th1></ul>
11358
</div><!--/.nav-collapse -->
11459
</div>
11560
</div>
11661
<div class="content">
11762
<th1>
11863
--- skins/bootstrap/header.txt
+++ skins/bootstrap/header.txt
@@ -39,79 +39,24 @@
39 html " &middot; <a href='$home/login'>Login</a>"
40 }
41 </th1></p>
42 <ul class="nav navbar-nav">
43 <th1>
44 set is_index [expr [string compare [string range $current_page 0 4] "index"]==0]
45 set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0]
46 if {$is_index || $is_home} {
47 html "<li class='active'><a href='$home$index_page'>Home</a></li>\n"
48 } else {
49 html "<li><a href='$home$index_page'>Home</a></li>\n"
50 }
51 if {[hascap j]} {
52 if {[string compare [string range $current_page 0 3] "wiki"] == 0} {
53 html "<li class='active'><a href='$home/wiki'>Wiki</a></li>\n"
54 } else {
55 html "<li><a href='$home/wiki'>Wiki</a></li>\n"
56 }
57 }
58 if {[anycap jor]} {
59 if {[string compare $current_page "timeline"] == 0} {
60 html "<li class='active'><a href='$home/timeline'>Timeline</a></li>\n"
61 } else {
62 html "<li><a href='$home/timeline'>Timeline</a></li>\n"
63 }
64 }
65 if {[hascap oh]} {
66 if {[string compare [string range $current_page 0 2] "dir"] == 0} {
67 html "<li class='active'><a href='$home/dir?ci=tip'>Files</a></li>\n"
68 } else {
69 html "<li><a href='$home/dir?ci=tip'>Files</a></li>\n"
70 }
71 }
72 if {[hascap o]} {
73 if {[string compare $current_page "brlist"] == 0} {
74 html "<li class='active'><a href='$home/brlist'>Branches</a></li>\n"
75 } else {
76 html "<li><a href='$home/brlist'>Branches</a></li>\n"
77 }
78 if {[string compare $current_page "taglist"] == 0} {
79 html "<li class='active'><a href='$home/taglist'>Tags</a></li>\n"
80 } else {
81 html "<li><a href='$home/taglist'>Tags</a></li>\n"
82 }
83 }
84 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
85 if {[string compare $current_page "forum"] == 0} {
86 html "<li class='active'><a href='$home/forum'>Forum</a></li>\n"
87 } else {
88 html "<li><a href='$home/forum'>Forum</a></li>\n"
89 }
90 }
91 if {[hascap r]} {
92 if {[string compare $current_page "reportlist"] == 0} {
93 html "<li class='active'><a href='$home/reportlist'>Tickets</a></li>\n"
94 } else {
95 html "<li><a href='$home/reportlist'>Tickets</a></li>\n"
96 }
97 }
98 if {[hascap s]} {
99 if {[string compare [string range $current_page 0 4] "setup"] == 0} {
100 html "<li class='active'><a href='$home/setup'>Admin</a></li>\n"
101 } else {
102 html "<li><a href='$home/setup'>Admin</a></li>\n"
103 }
104 } elseif {[hascap a]} {
105 if {[string compare [string range $current_page 0 4] "setup"] == 0} {
106 html "<li class='active'><a href='$home/setup_ulist'>Users</a></li>\n"
107 } else {
108 html "<li><a href='$home/setup_ulist'>Users</a></li>\n"
109 }
110 }
111 </th1>
112 </ul>
113 </div><!--/.nav-collapse -->
114 </div>
115 </div>
116 <div class="content">
117 <th1>
118
--- skins/bootstrap/header.txt
+++ skins/bootstrap/header.txt
@@ -39,79 +39,24 @@
39 html " &middot; <a href='$home/login'>Login</a>"
40 }
41 </th1></p>
42 <ul class="nav navbar-nav">
43 <th1>
44 set once 1
45 set is_index [expr [string compare [string range $current_page 0 4] "index"]==0]
46 set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0]
47 foreach {name url expr class} $mainmenu {
48 if {![capexpr $expr]} continue
49 if {$once && [string match /$current_page* $url]} {
50 html "<li class='active'>"
51 set once 0
52 } else {
53 html "<li>"
54 }
55 html "<a href='$home$url'>$name</a></li>\n"
56 }
57 </th1></ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58 </div><!--/.nav-collapse -->
59 </div>
60 </div>
61 <div class="content">
62 <th1>
63
--- skins/default/header.txt
+++ skins/default/header.txt
@@ -8,47 +8,17 @@
88
}
99
</th1></div>
1010
</div>
1111
<div class="mainmenu">
1212
<th1>
13
-proc menulink {url name cls} {
14
- upvar current_page current
15
- upvar home home
16
- if {[string range $url 0 [string length $current]] eq "/$current"} {
17
- html "<a href='$home$url' class='active $cls'>$name</a>\n"
18
- } else {
19
- html "<a href='$home$url' class='$cls'>$name</a>\n"
20
- }
21
-}
2213
html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
2314
builtin_request_js hbmenu.js
24
-menulink $index_page Home {}
25
-if {[anycap jor]} {
26
- menulink /timeline Timeline {}
27
-}
28
-if {[hascap oh]} {
29
- if {![info exists current_checkin]} {set current_checkin tip}
30
- menulink /dir?ci=$current_checkin Files desktoponly
31
-}
32
-if {[hascap o]} {
33
- menulink /brlist Branches wideonly
34
- menulink /taglist Tags wideonly
35
-}
36
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
37
- menulink /forum Forum desktoponly
38
-}
39
-if {[hascap C]} {
40
- menulink /chat Chat wideonly
41
-}
42
-if {[hascap r]} {
43
- menulink /ticket Tickets wideonly
44
-}
45
-if {[hascap j]} {
46
- menulink /wiki Wiki wideonly
47
-}
48
-if {[hascap s]} {
49
- menulink /setup Admin {}
50
-} elseif {[hascap a]} {
51
- menulink /setup_ulist Users {}
15
+foreach {name url expr class} $mainmenu {
16
+ if {![capexpr $expr]} continue
17
+ if {[string range $url 0 [string length $current_page]] eq "/$current_page"} {
18
+ html "<a href='$home$url' class='active $class'>$name</a>\n"
19
+ } else {
20
+ html "<a href='$home$url' class='$class'>$name</a>\n"
21
+ }
5222
}
5323
</th1></div>
5424
<div id='hbdrop'></div>
5525
--- skins/default/header.txt
+++ skins/default/header.txt
@@ -8,47 +8,17 @@
8 }
9 </th1></div>
10 </div>
11 <div class="mainmenu">
12 <th1>
13 proc menulink {url name cls} {
14 upvar current_page current
15 upvar home home
16 if {[string range $url 0 [string length $current]] eq "/$current"} {
17 html "<a href='$home$url' class='active $cls'>$name</a>\n"
18 } else {
19 html "<a href='$home$url' class='$cls'>$name</a>\n"
20 }
21 }
22 html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
23 builtin_request_js hbmenu.js
24 menulink $index_page Home {}
25 if {[anycap jor]} {
26 menulink /timeline Timeline {}
27 }
28 if {[hascap oh]} {
29 if {![info exists current_checkin]} {set current_checkin tip}
30 menulink /dir?ci=$current_checkin Files desktoponly
31 }
32 if {[hascap o]} {
33 menulink /brlist Branches wideonly
34 menulink /taglist Tags wideonly
35 }
36 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
37 menulink /forum Forum desktoponly
38 }
39 if {[hascap C]} {
40 menulink /chat Chat wideonly
41 }
42 if {[hascap r]} {
43 menulink /ticket Tickets wideonly
44 }
45 if {[hascap j]} {
46 menulink /wiki Wiki wideonly
47 }
48 if {[hascap s]} {
49 menulink /setup Admin {}
50 } elseif {[hascap a]} {
51 menulink /setup_ulist Users {}
52 }
53 </th1></div>
54 <div id='hbdrop'></div>
55
--- skins/default/header.txt
+++ skins/default/header.txt
@@ -8,47 +8,17 @@
8 }
9 </th1></div>
10 </div>
11 <div class="mainmenu">
12 <th1>
 
 
 
 
 
 
 
 
 
13 html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
14 builtin_request_js hbmenu.js
15 foreach {name url expr class} $mainmenu {
16 if {![capexpr $expr]} continue
17 if {[string range $url 0 [string length $current_page]] eq "/$current_page"} {
18 html "<a href='$home$url' class='active $class'>$name</a>\n"
19 } else {
20 html "<a href='$home$url' class='$class'>$name</a>\n"
21 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22 }
23 </th1></div>
24 <div id='hbdrop'></div>
25
--- skins/eagle/header.txt
+++ skins/eagle/header.txt
@@ -89,44 +89,16 @@
8989
setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
9090
}
9191
}
9292
updateClock();
9393
</script>
94
-<div class="mainmenu">
95
-<th1>
96
-proc menulink {url name} {
97
- upvar home home
94
+<div class="mainmenu"><th1>
95
+foreach {name url expr class} $mainmenu {
96
+ if {![capexpr $expr]} continue
9897
html "<a href='$home$url'>$name</a>\n"
9998
}
100
-menulink $index_page Home
101
-menulink /help Help
102
-if {[anycap jor]} {
103
- menulink /timeline Timeline
104
-}
105
-if {[anoncap oh]} {
106
- menulink /dir?ci=tip Files
107
-}
108
-if {[anoncap o]} {
109
- menulink /brlist Branches
110
- menulink /taglist Tags
111
-}
112
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
113
- menulink /forum Forum
114
-}
115
-if {[anoncap r]} {
116
- menulink /ticket Tickets
117
-}
118
-if {[anoncap j]} {
119
- menulink /wiki Wiki
120
-}
121
-menulink /sitemap More...
122
-if {[hascap s]} {
123
- menulink /setup Admin
124
-} elseif {[hascap a]} {
125
- menulink /setup_ulist Users
126
-}
12799
if {[info exists login]} {
128
- menulink /login Logout
100
+ html "<a href='$home/logout'>Logout</a>\n"
129101
} else {
130
- menulink /login Login
102
+ html "<a href='$home/login'>Login</a>\n"
131103
}
132104
</th1></div>
133105
--- skins/eagle/header.txt
+++ skins/eagle/header.txt
@@ -89,44 +89,16 @@
89 setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
90 }
91 }
92 updateClock();
93 </script>
94 <div class="mainmenu">
95 <th1>
96 proc menulink {url name} {
97 upvar home home
98 html "<a href='$home$url'>$name</a>\n"
99 }
100 menulink $index_page Home
101 menulink /help Help
102 if {[anycap jor]} {
103 menulink /timeline Timeline
104 }
105 if {[anoncap oh]} {
106 menulink /dir?ci=tip Files
107 }
108 if {[anoncap o]} {
109 menulink /brlist Branches
110 menulink /taglist Tags
111 }
112 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
113 menulink /forum Forum
114 }
115 if {[anoncap r]} {
116 menulink /ticket Tickets
117 }
118 if {[anoncap j]} {
119 menulink /wiki Wiki
120 }
121 menulink /sitemap More...
122 if {[hascap s]} {
123 menulink /setup Admin
124 } elseif {[hascap a]} {
125 menulink /setup_ulist Users
126 }
127 if {[info exists login]} {
128 menulink /login Logout
129 } else {
130 menulink /login Login
131 }
132 </th1></div>
133
--- skins/eagle/header.txt
+++ skins/eagle/header.txt
@@ -89,44 +89,16 @@
89 setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
90 }
91 }
92 updateClock();
93 </script>
94 <div class="mainmenu"><th1>
95 foreach {name url expr class} $mainmenu {
96 if {![capexpr $expr]} continue
 
97 html "<a href='$home$url'>$name</a>\n"
98 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99 if {[info exists login]} {
100 html "<a href='$home/logout'>Logout</a>\n"
101 } else {
102 html "<a href='$home/login'>Login</a>\n"
103 }
104 </th1></div>
105
--- skins/enhanced1/header.txt
+++ skins/enhanced1/header.txt
@@ -89,43 +89,16 @@
8989
setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
9090
}
9191
}
9292
updateClock();
9393
</script>
94
-<div class="mainmenu">
95
-<th1>
96
-proc menulink {url name} {
97
- upvar home home
94
+<div class="mainmenu"><th1>
95
+foreach {name url expr class} $mainmenu {
96
+ if {![capexpr $expr]} continue
9897
html "<a href='$home$url'>$name</a>\n"
9998
}
100
-menulink $index_page Home
101
-menulink /help Help
102
-if {[anycap jor]} {
103
- menulink /timeline Timeline
104
-}
105
-if {[anoncap oh]} {
106
- menulink /dir?ci=tip Files
107
-}
108
-if {[anoncap o]} {
109
- menulink /brlist Branches
110
- menulink /taglist Tags
111
-}
112
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
113
- menulink /forum Forum
114
-}
115
-if {[anoncap r]} {
116
- menulink /ticket Tickets
117
-}
118
-if {[anoncap j]} {
119
- menulink /wiki Wiki
120
-}
121
-if {[hascap s]} {
122
- menulink /setup Admin
123
-} elseif {[hascap a]} {
124
- menulink /setup_ulist Users
125
-}
12699
if {[info exists login]} {
127
- menulink /login Logout
100
+ html "<a href='$home/logout'>Logout</a>\n"
128101
} else {
129
- menulink /login Login
102
+ html "<a href='$home/login'>Login</a>\n"
130103
}
131104
</th1></div>
132105
--- skins/enhanced1/header.txt
+++ skins/enhanced1/header.txt
@@ -89,43 +89,16 @@
89 setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
90 }
91 }
92 updateClock();
93 </script>
94 <div class="mainmenu">
95 <th1>
96 proc menulink {url name} {
97 upvar home home
98 html "<a href='$home$url'>$name</a>\n"
99 }
100 menulink $index_page Home
101 menulink /help Help
102 if {[anycap jor]} {
103 menulink /timeline Timeline
104 }
105 if {[anoncap oh]} {
106 menulink /dir?ci=tip Files
107 }
108 if {[anoncap o]} {
109 menulink /brlist Branches
110 menulink /taglist Tags
111 }
112 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
113 menulink /forum Forum
114 }
115 if {[anoncap r]} {
116 menulink /ticket Tickets
117 }
118 if {[anoncap j]} {
119 menulink /wiki Wiki
120 }
121 if {[hascap s]} {
122 menulink /setup Admin
123 } elseif {[hascap a]} {
124 menulink /setup_ulist Users
125 }
126 if {[info exists login]} {
127 menulink /login Logout
128 } else {
129 menulink /login Login
130 }
131 </th1></div>
132
--- skins/enhanced1/header.txt
+++ skins/enhanced1/header.txt
@@ -89,43 +89,16 @@
89 setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
90 }
91 }
92 updateClock();
93 </script>
94 <div class="mainmenu"><th1>
95 foreach {name url expr class} $mainmenu {
96 if {![capexpr $expr]} continue
 
97 html "<a href='$home$url'>$name</a>\n"
98 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99 if {[info exists login]} {
100 html "<a href='$home/logout'>Logout</a>\n"
101 } else {
102 html "<a href='$home/login'>Login</a>\n"
103 }
104 </th1></div>
105
--- skins/khaki/header.txt
+++ skins/khaki/header.txt
@@ -8,38 +8,16 @@
88
} else {
99
puts "Not logged in"
1010
}
1111
</th1></div>
1212
</div>
13
-<div class="mainmenu">
14
-<th1>
15
-html "<a href='$home$index_page'>Home</a>\n"
16
-if {[anycap jor]} {
17
- html "<a href='$home/timeline'>Timeline</a>\n"
18
-}
19
-if {[anoncap oh]} {
20
- html "<a href='$home/tree?ci=tip'>Files</a>\n"
21
-}
22
-if {[anoncap o]} {
23
- html "<a href='$home/brlist'>Branches</a>\n"
24
- html "<a href='$home/taglist'>Tags</a>\n"
25
-}
26
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
27
- html "<a href='$home/forum'>Forum</a>\n"
28
-}
29
-if {[anoncap r]} {
30
- html "<a href='$home/ticket'>Tickets</a>\n"
31
-}
32
-if {[anoncap j]} {
33
- html "<a href='$home/wiki'>Wiki</a>\n"
34
-}
35
-if {[hascap s]} {
36
- html "<a href='$home/setup'>Admin</a>\n"
37
-} elseif {[hascap a]} {
38
- html "<a href='$home/setup_ulist'>Users</a>\n"
13
+<div class="mainmenu"><th1>
14
+foreach {name url expr class} $mainmenu {
15
+ if {![capexpr $expr]} continue
16
+ html "<a href='$home$url'>$name</a>\n"
3917
}
4018
if {[info exists login]} {
41
- html "<a href='$home/login'>Logout</a>\n"
19
+ html "<a href='/logout'>Logout</a>\n"
4220
} else {
43
- html "<a href='$home/login'>Login</a>\n"
21
+ html "<a href='/login'>Login</a>\n"
4422
}
4523
</th1></div>
4624
--- skins/khaki/header.txt
+++ skins/khaki/header.txt
@@ -8,38 +8,16 @@
8 } else {
9 puts "Not logged in"
10 }
11 </th1></div>
12 </div>
13 <div class="mainmenu">
14 <th1>
15 html "<a href='$home$index_page'>Home</a>\n"
16 if {[anycap jor]} {
17 html "<a href='$home/timeline'>Timeline</a>\n"
18 }
19 if {[anoncap oh]} {
20 html "<a href='$home/tree?ci=tip'>Files</a>\n"
21 }
22 if {[anoncap o]} {
23 html "<a href='$home/brlist'>Branches</a>\n"
24 html "<a href='$home/taglist'>Tags</a>\n"
25 }
26 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
27 html "<a href='$home/forum'>Forum</a>\n"
28 }
29 if {[anoncap r]} {
30 html "<a href='$home/ticket'>Tickets</a>\n"
31 }
32 if {[anoncap j]} {
33 html "<a href='$home/wiki'>Wiki</a>\n"
34 }
35 if {[hascap s]} {
36 html "<a href='$home/setup'>Admin</a>\n"
37 } elseif {[hascap a]} {
38 html "<a href='$home/setup_ulist'>Users</a>\n"
39 }
40 if {[info exists login]} {
41 html "<a href='$home/login'>Logout</a>\n"
42 } else {
43 html "<a href='$home/login'>Login</a>\n"
44 }
45 </th1></div>
46
--- skins/khaki/header.txt
+++ skins/khaki/header.txt
@@ -8,38 +8,16 @@
8 } else {
9 puts "Not logged in"
10 }
11 </th1></div>
12 </div>
13 <div class="mainmenu"><th1>
14 foreach {name url expr class} $mainmenu {
15 if {![capexpr $expr]} continue
16 html "<a href='$home$url'>$name</a>\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17 }
18 if {[info exists login]} {
19 html "<a href='/logout'>Logout</a>\n"
20 } else {
21 html "<a href='/login'>Login</a>\n"
22 }
23 </th1></div>
24
--- skins/original/header.txt
+++ skins/original/header.txt
@@ -9,38 +9,16 @@
99
} else {
1010
puts "Not logged in"
1111
}
1212
</th1></div>
1313
</div>
14
-<div class="mainmenu">
15
-<th1>
16
-html "<a href='$home$index_page'>Home</a>\n"
17
-if {[anycap jor]} {
18
- html "<a href='$home/timeline'>Timeline</a>\n"
19
-}
20
-if {[anoncap oh]} {
21
- html "<a href='$home/tree?ci=tip'>Files</a>\n"
22
-}
23
-if {[anoncap o]} {
24
- html "<a href='$home/brlist'>Branches</a>\n"
25
- html "<a href='$home/taglist'>Tags</a>\n"
26
-}
27
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
28
- html "<a href='$home/forum'>Forum</a>\n"
29
-}
30
-if {[anoncap r]} {
31
- html "<a href='$home/ticket'>Tickets</a>\n"
32
-}
33
-if {[anoncap j]} {
34
- html "<a href='$home/wiki'>Wiki</a>\n"
35
-}
36
-if {[hascap s]} {
37
- html "<a href='$home/setup'>Admin</a>\n"
38
-} elseif {[hascap a]} {
39
- html "<a href='$home/setup_ulist'>Users</a>\n"
14
+<div class="mainmenu"><th1>
15
+foreach {name url expr class} $mainmenu {
16
+ if {![capexpr $expr]} continue
17
+ html "<a href='$home$url'>$name</a>\n"
4018
}
4119
if {[info exists login]} {
42
- html "<a href='$home/login'>Logout</a>\n"
20
+ html "<a href='$home/logout'>Logout</a>\n"
4321
} else {
4422
html "<a href='$home/login'>Login</a>\n"
4523
}
4624
</th1></div>
4725
--- skins/original/header.txt
+++ skins/original/header.txt
@@ -9,38 +9,16 @@
9 } else {
10 puts "Not logged in"
11 }
12 </th1></div>
13 </div>
14 <div class="mainmenu">
15 <th1>
16 html "<a href='$home$index_page'>Home</a>\n"
17 if {[anycap jor]} {
18 html "<a href='$home/timeline'>Timeline</a>\n"
19 }
20 if {[anoncap oh]} {
21 html "<a href='$home/tree?ci=tip'>Files</a>\n"
22 }
23 if {[anoncap o]} {
24 html "<a href='$home/brlist'>Branches</a>\n"
25 html "<a href='$home/taglist'>Tags</a>\n"
26 }
27 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
28 html "<a href='$home/forum'>Forum</a>\n"
29 }
30 if {[anoncap r]} {
31 html "<a href='$home/ticket'>Tickets</a>\n"
32 }
33 if {[anoncap j]} {
34 html "<a href='$home/wiki'>Wiki</a>\n"
35 }
36 if {[hascap s]} {
37 html "<a href='$home/setup'>Admin</a>\n"
38 } elseif {[hascap a]} {
39 html "<a href='$home/setup_ulist'>Users</a>\n"
40 }
41 if {[info exists login]} {
42 html "<a href='$home/login'>Logout</a>\n"
43 } else {
44 html "<a href='$home/login'>Login</a>\n"
45 }
46 </th1></div>
47
--- skins/original/header.txt
+++ skins/original/header.txt
@@ -9,38 +9,16 @@
9 } else {
10 puts "Not logged in"
11 }
12 </th1></div>
13 </div>
14 <div class="mainmenu"><th1>
15 foreach {name url expr class} $mainmenu {
16 if {![capexpr $expr]} continue
17 html "<a href='$home$url'>$name</a>\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18 }
19 if {[info exists login]} {
20 html "<a href='$home/logout'>Logout</a>\n"
21 } else {
22 html "<a href='$home/login'>Login</a>\n"
23 }
24 </th1></div>
25
--- skins/plain_gray/header.txt
+++ skins/plain_gray/header.txt
@@ -3,35 +3,16 @@
33
</div>
44
<div class="mainmenu">
55
<th1>
66
html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
77
builtin_request_js hbmenu.js
8
-html "<a href='$home$index_page'>Home</a>\n"
9
-if {[anycap jor]} {
10
- html "<a href='$home/timeline'>Timeline</a>\n"
11
-}
12
-if {[anoncap oh]} {
13
- html "<a href='$home/tree?ci=tip'>Files</a>\n"
14
-}
15
-#if {[anoncap o]} {
16
-# html "<a href='$home/brlist'>Branches</a>\n"
17
-# html "<a href='$home/taglist'>Tags</a>\n"
18
-#}
19
-#if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
20
-# html "<a href='$home/forum'>Forum</a>\n"
21
-#}
22
-#if {[anoncap r]} {
23
-# html "<a href='$home/ticket'>Tickets</a>\n"
24
-#}
25
-#if {[anoncap j]} {
26
-# html "<a href='$home/wiki'>Wiki</a>\n"
27
-#}
28
-if {[hascap s]} {
29
- html "<a href='$home/setup'>Admin</a>\n"
8
+foreach {name url expr class} $mainmenu {
9
+ if {![capexpr $expr]} continue
10
+ html "<a href='$home$url'>$name</a>\n"
3011
}
3112
if {[info exists login]} {
32
- html "<a href='$home/login'>Logout</a>\n"
13
+ html "<a href='$home/logout'>Logout</a>\n"
3314
} else {
3415
html "<a href='$home/login'>Login</a>\n"
3516
}
3617
</th1></div>
3718
<div id='hbdrop' class='hbdrop'></div>
3819
--- skins/plain_gray/header.txt
+++ skins/plain_gray/header.txt
@@ -3,35 +3,16 @@
3 </div>
4 <div class="mainmenu">
5 <th1>
6 html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
7 builtin_request_js hbmenu.js
8 html "<a href='$home$index_page'>Home</a>\n"
9 if {[anycap jor]} {
10 html "<a href='$home/timeline'>Timeline</a>\n"
11 }
12 if {[anoncap oh]} {
13 html "<a href='$home/tree?ci=tip'>Files</a>\n"
14 }
15 #if {[anoncap o]} {
16 # html "<a href='$home/brlist'>Branches</a>\n"
17 # html "<a href='$home/taglist'>Tags</a>\n"
18 #}
19 #if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
20 # html "<a href='$home/forum'>Forum</a>\n"
21 #}
22 #if {[anoncap r]} {
23 # html "<a href='$home/ticket'>Tickets</a>\n"
24 #}
25 #if {[anoncap j]} {
26 # html "<a href='$home/wiki'>Wiki</a>\n"
27 #}
28 if {[hascap s]} {
29 html "<a href='$home/setup'>Admin</a>\n"
30 }
31 if {[info exists login]} {
32 html "<a href='$home/login'>Logout</a>\n"
33 } else {
34 html "<a href='$home/login'>Login</a>\n"
35 }
36 </th1></div>
37 <div id='hbdrop' class='hbdrop'></div>
38
--- skins/plain_gray/header.txt
+++ skins/plain_gray/header.txt
@@ -3,35 +3,16 @@
3 </div>
4 <div class="mainmenu">
5 <th1>
6 html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>&#9776;</a>"
7 builtin_request_js hbmenu.js
8 foreach {name url expr class} $mainmenu {
9 if {![capexpr $expr]} continue
10 html "<a href='$home$url'>$name</a>\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11 }
12 if {[info exists login]} {
13 html "<a href='$home/logout'>Logout</a>\n"
14 } else {
15 html "<a href='$home/login'>Login</a>\n"
16 }
17 </th1></div>
18 <div id='hbdrop' class='hbdrop'></div>
19
--- skins/rounded1/header.txt
+++ skins/rounded1/header.txt
@@ -10,38 +10,16 @@
1010
} else {
1111
puts "Not logged in"
1212
}
1313
</th1></div>
1414
</div>
15
-<div class="mainmenu">
16
-<th1>
17
-html "<a href='$home$index_page'>Home</a>\n"
18
-if {[anycap jor]} {
19
- html "<a href='$home/timeline'>Timeline</a>\n"
20
-}
21
-if {[anoncap oh]} {
22
- html "<a href='$home/tree?ci=tip'>Files</a>\n"
23
-}
24
-if {[anoncap o]} {
25
- html "<a href='$home/brlist'>Branches</a>\n"
26
- html "<a href='$home/taglist'>Tags</a>\n"
27
-}
28
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
29
- html "<a href='$home/forum'>Forum</a>\n"
30
-}
31
-if {[anoncap r]} {
32
- html "<a href='$home/ticket'>Tickets</a>\n"
33
-}
34
-if {[anoncap j]} {
35
- html "<a href='$home/wiki'>Wiki</a>\n"
36
-}
37
-if {[hascap s]} {
38
- html "<a href='$home/setup'>Admin</a>\n"
39
-} elseif {[hascap a]} {
40
- html "<a href='$home/setup_ulist'>Users</a>\n"
15
+<div class="mainmenu"><th1>
16
+foreach {name url expr class} $mainmenu {
17
+ if {![capexpr $expr]} continue
18
+ html "<a href='$home$url'>$name</a>\n"
4119
}
4220
if {[info exists login]} {
43
- html "<a href='$home/login'>Logout</a>\n"
21
+ html "<a href='$home/logout'>Logout</a>\n"
4422
} else {
4523
html "<a href='$home/login'>Login</a>\n"
4624
}
4725
</th1></div>
4826
--- skins/rounded1/header.txt
+++ skins/rounded1/header.txt
@@ -10,38 +10,16 @@
10 } else {
11 puts "Not logged in"
12 }
13 </th1></div>
14 </div>
15 <div class="mainmenu">
16 <th1>
17 html "<a href='$home$index_page'>Home</a>\n"
18 if {[anycap jor]} {
19 html "<a href='$home/timeline'>Timeline</a>\n"
20 }
21 if {[anoncap oh]} {
22 html "<a href='$home/tree?ci=tip'>Files</a>\n"
23 }
24 if {[anoncap o]} {
25 html "<a href='$home/brlist'>Branches</a>\n"
26 html "<a href='$home/taglist'>Tags</a>\n"
27 }
28 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
29 html "<a href='$home/forum'>Forum</a>\n"
30 }
31 if {[anoncap r]} {
32 html "<a href='$home/ticket'>Tickets</a>\n"
33 }
34 if {[anoncap j]} {
35 html "<a href='$home/wiki'>Wiki</a>\n"
36 }
37 if {[hascap s]} {
38 html "<a href='$home/setup'>Admin</a>\n"
39 } elseif {[hascap a]} {
40 html "<a href='$home/setup_ulist'>Users</a>\n"
41 }
42 if {[info exists login]} {
43 html "<a href='$home/login'>Logout</a>\n"
44 } else {
45 html "<a href='$home/login'>Login</a>\n"
46 }
47 </th1></div>
48
--- skins/rounded1/header.txt
+++ skins/rounded1/header.txt
@@ -10,38 +10,16 @@
10 } else {
11 puts "Not logged in"
12 }
13 </th1></div>
14 </div>
15 <div class="mainmenu"><th1>
16 foreach {name url expr class} $mainmenu {
17 if {![capexpr $expr]} continue
18 html "<a href='$home$url'>$name</a>\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19 }
20 if {[info exists login]} {
21 html "<a href='$home/logout'>Logout</a>\n"
22 } else {
23 html "<a href='$home/login'>Login</a>\n"
24 }
25 </th1></div>
26
--- skins/xekri/header.txt
+++ skins/xekri/header.txt
@@ -89,48 +89,16 @@
8989
setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
9090
}
9191
}
9292
updateClock();
9393
</script>
94
-<div class="mainmenu">
95
-<th1>
96
-proc menulink {url name} {
97
- upvar current_page current
98
- upvar home home
99
- if {[string range $url 0 [string length $current]] eq "/$current"} {
100
- html "<a href='$home$url' class='active'>$name</a>\n"
101
- } else {
102
- html "<a href='$home$url'>$name</a>\n"
103
- }
104
-}
105
-menulink $index_page Home
106
-if {[anycap jor]} {
107
- menulink /timeline Timeline
108
-}
109
-if {[anoncap oh]} {
110
- menulink /dir?ci=tip Files
111
-}
112
-if {[anoncap o]} {
113
- menulink /brlist Branches
114
- menulink /taglist Tags
115
-}
116
-if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
117
- menulink /forum Forum
118
-}
119
-if {[anoncap r]} {
120
- menulink /ticket Tickets
121
-}
122
-if {[anoncap j]} {
123
- menulink /wiki Wiki
124
-}
125
- menulink /sitemap More...
126
-if {[hascap s]} {
127
- menulink /setup Admin
128
-} elseif {[hascap a]} {
129
- menulink /setup_ulist Users
94
+<div class="mainmenu"><th1>
95
+foreach {name url expr class} $mainmenu {
96
+ if {![capexpr $expr]} continue
97
+ html "<a href='$home$url'>$name</a>\n"
13098
}
13199
if {[info exists login]} {
132
- menulink /login Logout
100
+ html "<a href='$home/logout'>Logout</a>\n"
133101
} else {
134
- menulink /login Login
102
+ html "<a href='$home/login'>Login</a>\n"
135103
}
136104
</th1></div>
137105
--- skins/xekri/header.txt
+++ skins/xekri/header.txt
@@ -89,48 +89,16 @@
89 setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
90 }
91 }
92 updateClock();
93 </script>
94 <div class="mainmenu">
95 <th1>
96 proc menulink {url name} {
97 upvar current_page current
98 upvar home home
99 if {[string range $url 0 [string length $current]] eq "/$current"} {
100 html "<a href='$home$url' class='active'>$name</a>\n"
101 } else {
102 html "<a href='$home$url'>$name</a>\n"
103 }
104 }
105 menulink $index_page Home
106 if {[anycap jor]} {
107 menulink /timeline Timeline
108 }
109 if {[anoncap oh]} {
110 menulink /dir?ci=tip Files
111 }
112 if {[anoncap o]} {
113 menulink /brlist Branches
114 menulink /taglist Tags
115 }
116 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
117 menulink /forum Forum
118 }
119 if {[anoncap r]} {
120 menulink /ticket Tickets
121 }
122 if {[anoncap j]} {
123 menulink /wiki Wiki
124 }
125 menulink /sitemap More...
126 if {[hascap s]} {
127 menulink /setup Admin
128 } elseif {[hascap a]} {
129 menulink /setup_ulist Users
130 }
131 if {[info exists login]} {
132 menulink /login Logout
133 } else {
134 menulink /login Login
135 }
136 </th1></div>
137
--- skins/xekri/header.txt
+++ skins/xekri/header.txt
@@ -89,48 +89,16 @@
89 setTimeout(updateClock,(60-d.getUTCSeconds())*1000);
90 }
91 }
92 updateClock();
93 </script>
94 <div class="mainmenu"><th1>
95 foreach {name url expr class} $mainmenu {
96 if {![capexpr $expr]} continue
97 html "<a href='$home$url'>$name</a>\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98 }
99 if {[info exists login]} {
100 html "<a href='$home/logout'>Logout</a>\n"
101 } else {
102 html "<a href='$home/login'>Login</a>\n"
103 }
104 </th1></div>
105
--- src/configure.c
+++ src/configure.c
@@ -89,10 +89,11 @@
8989
const char *zName; /* Name of the configuration parameter */
9090
int groupMask; /* Which config groups is it part of */
9191
} aConfig[] = {
9292
{ "css", CONFIGSET_CSS },
9393
{ "header", CONFIGSET_SKIN },
94
+ { "mainmenu", CONFIGSET_SKIN },
9495
{ "footer", CONFIGSET_SKIN },
9596
{ "details", CONFIGSET_SKIN },
9697
{ "js", CONFIGSET_SKIN },
9798
{ "logo-mimetype", CONFIGSET_SKIN },
9899
{ "logo-image", CONFIGSET_SKIN },
99100
--- src/configure.c
+++ src/configure.c
@@ -89,10 +89,11 @@
89 const char *zName; /* Name of the configuration parameter */
90 int groupMask; /* Which config groups is it part of */
91 } aConfig[] = {
92 { "css", CONFIGSET_CSS },
93 { "header", CONFIGSET_SKIN },
 
94 { "footer", CONFIGSET_SKIN },
95 { "details", CONFIGSET_SKIN },
96 { "js", CONFIGSET_SKIN },
97 { "logo-mimetype", CONFIGSET_SKIN },
98 { "logo-image", CONFIGSET_SKIN },
99
--- src/configure.c
+++ src/configure.c
@@ -89,10 +89,11 @@
89 const char *zName; /* Name of the configuration parameter */
90 int groupMask; /* Which config groups is it part of */
91 } aConfig[] = {
92 { "css", CONFIGSET_CSS },
93 { "header", CONFIGSET_SKIN },
94 { "mainmenu", CONFIGSET_SKIN },
95 { "footer", CONFIGSET_SKIN },
96 { "details", CONFIGSET_SKIN },
97 { "js", CONFIGSET_SKIN },
98 { "logo-mimetype", CONFIGSET_SKIN },
99 { "logo-image", CONFIGSET_SKIN },
100
+28
--- src/setup.c
+++ src/setup.c
@@ -1016,10 +1016,38 @@
10161016
@ <p>Note: To avoid a redirect loop or other problems, this entry must
10171017
@ begin with "/" and it must specify a valid page. For example,
10181018
@ "<b>/home</b>" will work but "<b>home</b>" will not, since it omits the
10191019
@ leading "/".</p>
10201020
@ <p>(Property: "index-page")
1021
+ @ <hr>
1022
+ @ <p>The main menu for the web interface
1023
+ @ <p>
1024
+ @
1025
+ @ <p>This setting should be a TCL list. Each set of four consecutive
1026
+ @ values defines a single main menu item:
1027
+ @ <ol>
1028
+ @ <li> The first term is text that appears on the menu.
1029
+ @ <li> The second term is a hyperlink to take when a user clicks on the
1030
+ @ entry. Hyperlinks that start with "/" are relative to the
1031
+ @ repository root.
1032
+ @ <li> The third term is an argument to the TH1 "capexpr" command.
1033
+ @ If capexpr evalutes to true, then the entry is shown. If not,
1034
+ @ the entry is omitted. "*" is always true. "{}" is never true.
1035
+ @ <li> The fouth term is a list of extra class names to apply to the new
1036
+ @ menu entry. Some skins will classes "desktoponly" and "wideonly"
1037
+ @ to only show the entries when the web browser screen is wide or
1038
+ @ very wide, respectively.
1039
+ @ </ol>
1040
+ @
1041
+ @ <p>Some custom skins might not use this property. Whether the property
1042
+ @ is used or a choice made by the skin designer. Some skins add an extra
1043
+ @ choices (such as the hamburger button) to the menu that are not shown
1044
+ @ on this list.
1045
+ @ (Property: mainmenu)
1046
+ textarea_attribute("Main Menu", 12, 80,
1047
+ "mainmenu", "mmenu", style_default_mainmenu(), 0);
1048
+ @
10211049
@ <hr>
10221050
@ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page,
10231051
@ as sub-items of the "Home Page" entry, appearing before the
10241052
@ "Documentation Search" entry (if any). In skins that use the /sitemap
10251053
@ page to construct a hamburger menu dropdown, new entries added here
10261054
--- src/setup.c
+++ src/setup.c
@@ -1016,10 +1016,38 @@
1016 @ <p>Note: To avoid a redirect loop or other problems, this entry must
1017 @ begin with "/" and it must specify a valid page. For example,
1018 @ "<b>/home</b>" will work but "<b>home</b>" will not, since it omits the
1019 @ leading "/".</p>
1020 @ <p>(Property: "index-page")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1021 @ <hr>
1022 @ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page,
1023 @ as sub-items of the "Home Page" entry, appearing before the
1024 @ "Documentation Search" entry (if any). In skins that use the /sitemap
1025 @ page to construct a hamburger menu dropdown, new entries added here
1026
--- src/setup.c
+++ src/setup.c
@@ -1016,10 +1016,38 @@
1016 @ <p>Note: To avoid a redirect loop or other problems, this entry must
1017 @ begin with "/" and it must specify a valid page. For example,
1018 @ "<b>/home</b>" will work but "<b>home</b>" will not, since it omits the
1019 @ leading "/".</p>
1020 @ <p>(Property: "index-page")
1021 @ <hr>
1022 @ <p>The main menu for the web interface
1023 @ <p>
1024 @
1025 @ <p>This setting should be a TCL list. Each set of four consecutive
1026 @ values defines a single main menu item:
1027 @ <ol>
1028 @ <li> The first term is text that appears on the menu.
1029 @ <li> The second term is a hyperlink to take when a user clicks on the
1030 @ entry. Hyperlinks that start with "/" are relative to the
1031 @ repository root.
1032 @ <li> The third term is an argument to the TH1 "capexpr" command.
1033 @ If capexpr evalutes to true, then the entry is shown. If not,
1034 @ the entry is omitted. "*" is always true. "{}" is never true.
1035 @ <li> The fouth term is a list of extra class names to apply to the new
1036 @ menu entry. Some skins will classes "desktoponly" and "wideonly"
1037 @ to only show the entries when the web browser screen is wide or
1038 @ very wide, respectively.
1039 @ </ol>
1040 @
1041 @ <p>Some custom skins might not use this property. Whether the property
1042 @ is used or a choice made by the skin designer. Some skins add an extra
1043 @ choices (such as the hamburger button) to the menu that are not shown
1044 @ on this list.
1045 @ (Property: mainmenu)
1046 textarea_attribute("Main Menu", 12, 80,
1047 "mainmenu", "mmenu", style_default_mainmenu(), 0);
1048 @
1049 @ <hr>
1050 @ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page,
1051 @ as sub-items of the "Home Page" entry, appearing before the
1052 @ "Documentation Search" entry (if any). In skins that use the /sitemap
1053 @ page to construct a hamburger menu dropdown, new entries added here
1054
+24
--- src/style.c
+++ src/style.c
@@ -595,10 +595,33 @@
595595
** Returns the default page header.
596596
*/
597597
const char *get_default_header(){
598598
return zDfltHeader;
599599
}
600
+
601
+/*
602
+** The default TCL list that defines the main menu.
603
+*/
604
+static const char zDfltMainMenu[] =
605
+@ Home /home * {}
606
+@ Timeline /timeline {o r j} {}
607
+@ Files /dir?ci=tip oh desktoponly
608
+@ Branches /brlist o wideonly
609
+@ Tags /taglist o wideonly
610
+@ Forum /forum {@2 3 4 5 6} wideonly
611
+@ Chat /chat C wideonly
612
+@ Tickets /ticket r wideonly
613
+@ Wiki /wiki j wideonly
614
+@ Setup /setup s {}
615
+;
616
+
617
+/*
618
+** Return the default menu
619
+*/
620
+const char *style_default_mainmenu(void){
621
+ return zDfltMainMenu;
622
+}
600623
601624
/*
602625
** Given a URL path, extract the first element as a "feature" name,
603626
** used as the <body class="FEATURE"> value by default, though
604627
** later-running code may override this, typically to group multiple
@@ -659,10 +682,11 @@
659682
Th_Store("csrf_token", g.zCsrfToken);
660683
Th_Store("release_version", RELEASE_VERSION);
661684
Th_Store("manifest_version", MANIFEST_VERSION);
662685
Th_Store("manifest_date", MANIFEST_DATE);
663686
Th_Store("compiler_name", COMPILER_NAME);
687
+ Th_Store("mainmenu", db_get("mainmenu", style_default_mainmenu()));
664688
url_var("stylesheet", "css", "style.css");
665689
image_url_var("logo");
666690
image_url_var("background");
667691
if( !login_is_nobody() ){
668692
Th_Store("login", g.zLogin);
669693
--- src/style.c
+++ src/style.c
@@ -595,10 +595,33 @@
595 ** Returns the default page header.
596 */
597 const char *get_default_header(){
598 return zDfltHeader;
599 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
600
601 /*
602 ** Given a URL path, extract the first element as a "feature" name,
603 ** used as the <body class="FEATURE"> value by default, though
604 ** later-running code may override this, typically to group multiple
@@ -659,10 +682,11 @@
659 Th_Store("csrf_token", g.zCsrfToken);
660 Th_Store("release_version", RELEASE_VERSION);
661 Th_Store("manifest_version", MANIFEST_VERSION);
662 Th_Store("manifest_date", MANIFEST_DATE);
663 Th_Store("compiler_name", COMPILER_NAME);
 
664 url_var("stylesheet", "css", "style.css");
665 image_url_var("logo");
666 image_url_var("background");
667 if( !login_is_nobody() ){
668 Th_Store("login", g.zLogin);
669
--- src/style.c
+++ src/style.c
@@ -595,10 +595,33 @@
595 ** Returns the default page header.
596 */
597 const char *get_default_header(){
598 return zDfltHeader;
599 }
600
601 /*
602 ** The default TCL list that defines the main menu.
603 */
604 static const char zDfltMainMenu[] =
605 @ Home /home * {}
606 @ Timeline /timeline {o r j} {}
607 @ Files /dir?ci=tip oh desktoponly
608 @ Branches /brlist o wideonly
609 @ Tags /taglist o wideonly
610 @ Forum /forum {@2 3 4 5 6} wideonly
611 @ Chat /chat C wideonly
612 @ Tickets /ticket r wideonly
613 @ Wiki /wiki j wideonly
614 @ Setup /setup s {}
615 ;
616
617 /*
618 ** Return the default menu
619 */
620 const char *style_default_mainmenu(void){
621 return zDfltMainMenu;
622 }
623
624 /*
625 ** Given a URL path, extract the first element as a "feature" name,
626 ** used as the <body class="FEATURE"> value by default, though
627 ** later-running code may override this, typically to group multiple
@@ -659,10 +682,11 @@
682 Th_Store("csrf_token", g.zCsrfToken);
683 Th_Store("release_version", RELEASE_VERSION);
684 Th_Store("manifest_version", MANIFEST_VERSION);
685 Th_Store("manifest_date", MANIFEST_DATE);
686 Th_Store("compiler_name", COMPILER_NAME);
687 Th_Store("mainmenu", db_get("mainmenu", style_default_mainmenu()));
688 url_var("stylesheet", "css", "style.css");
689 image_url_var("logo");
690 image_url_var("background");
691 if( !login_is_nobody() ){
692 Th_Store("login", g.zLogin);
693
--- src/th_lang.c
+++ src/th_lang.c
@@ -885,10 +885,33 @@
885885
return Th_SetResultInt(interp, argl[2]);
886886
}
887887
888888
/*
889889
** TH Syntax:
890
+**
891
+** string match PATTERN STRING
892
+**
893
+*/
894
+static int string_match_command(
895
+ Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl
896
+){
897
+ extern char *fossil_strndup(const char*,int);
898
+ char *zPat, *zStr;
899
+ int rc;
900
+ if( argc!=4 ){
901
+ return Th_WrongNumArgs(interp, "string match pattern string");
902
+ }
903
+ zPat = fossil_strndup(argv[2],argl[2]);
904
+ zStr = fossil_strndup(argv[3],argl[3]);
905
+ rc = sqlite3_strglob(zPat,zStr);
906
+ fossil_free(zPat);
907
+ fossil_free(zStr);
908
+ return Th_SetResultInt(interp, !rc);
909
+}
910
+
911
+/*
912
+** TH Syntax:
890913
**
891914
** string range STRING FIRST LAST
892915
*/
893916
static int string_range_command(
894917
Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl
@@ -1155,10 +1178,11 @@
11551178
{ "first", string_first_command },
11561179
{ "index", string_index_command },
11571180
{ "is", string_is_command },
11581181
{ "last", string_last_command },
11591182
{ "length", string_length_command },
1183
+ { "match", string_match_command },
11601184
{ "range", string_range_command },
11611185
{ "repeat", string_repeat_command },
11621186
{ "trim", string_trim_command },
11631187
{ "trimleft", string_trim_command },
11641188
{ "trimright", string_trim_command },
11651189
--- src/th_lang.c
+++ src/th_lang.c
@@ -885,10 +885,33 @@
885 return Th_SetResultInt(interp, argl[2]);
886 }
887
888 /*
889 ** TH Syntax:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
890 **
891 ** string range STRING FIRST LAST
892 */
893 static int string_range_command(
894 Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl
@@ -1155,10 +1178,11 @@
1155 { "first", string_first_command },
1156 { "index", string_index_command },
1157 { "is", string_is_command },
1158 { "last", string_last_command },
1159 { "length", string_length_command },
 
1160 { "range", string_range_command },
1161 { "repeat", string_repeat_command },
1162 { "trim", string_trim_command },
1163 { "trimleft", string_trim_command },
1164 { "trimright", string_trim_command },
1165
--- src/th_lang.c
+++ src/th_lang.c
@@ -885,10 +885,33 @@
885 return Th_SetResultInt(interp, argl[2]);
886 }
887
888 /*
889 ** TH Syntax:
890 **
891 ** string match PATTERN STRING
892 **
893 */
894 static int string_match_command(
895 Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl
896 ){
897 extern char *fossil_strndup(const char*,int);
898 char *zPat, *zStr;
899 int rc;
900 if( argc!=4 ){
901 return Th_WrongNumArgs(interp, "string match pattern string");
902 }
903 zPat = fossil_strndup(argv[2],argl[2]);
904 zStr = fossil_strndup(argv[3],argl[3]);
905 rc = sqlite3_strglob(zPat,zStr);
906 fossil_free(zPat);
907 fossil_free(zStr);
908 return Th_SetResultInt(interp, !rc);
909 }
910
911 /*
912 ** TH Syntax:
913 **
914 ** string range STRING FIRST LAST
915 */
916 static int string_range_command(
917 Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl
@@ -1155,10 +1178,11 @@
1178 { "first", string_first_command },
1179 { "index", string_index_command },
1180 { "is", string_is_command },
1181 { "last", string_last_command },
1182 { "length", string_length_command },
1183 { "match", string_match_command },
1184 { "range", string_range_command },
1185 { "repeat", string_repeat_command },
1186 { "trim", string_trim_command },
1187 { "trimleft", string_trim_command },
1188 { "trimright", string_trim_command },
1189

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button