Fossil SCM

Change the "Unshun" links to jump to a prefilled form for duing the unshun, rather than doing the unshun directly.

drh 2013-08-05 12:05 UTC trunk
Commit cc9b04baaf88a39ef4086945a71626b0398d3600
2 files changed +3 -3 +3 -1
+3 -3
--- src/info.c
+++ src/info.c
@@ -1443,11 +1443,11 @@
14431443
if( !g.perm.Read ){ login_needed(); return; }
14441444
if( rid==0 ) fossil_redirect_home();
14451445
if( g.perm.Admin ){
14461446
const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
14471447
if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1448
- style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
1448
+ style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#delshun",
14491449
g.zTop, zUuid);
14501450
}else{
14511451
style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
14521452
g.zTop, zUuid);
14531453
}
@@ -1593,11 +1593,11 @@
15931593
if( !g.perm.Read ){ login_needed(); return; }
15941594
if( rid==0 ) fossil_redirect_home();
15951595
if( g.perm.Admin ){
15961596
const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
15971597
if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1598
- style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
1598
+ style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#accshun",
15991599
g.zTop, zUuid);
16001600
}else{
16011601
style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
16021602
g.zTop, zUuid);
16031603
}
@@ -1701,11 +1701,11 @@
17011701
rid = name_to_rid_www("name");
17021702
if( rid==0 ){ fossil_redirect_home(); }
17031703
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
17041704
if( g.perm.Admin ){
17051705
if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1706
- style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
1706
+ style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#accshun",
17071707
g.zTop, zUuid);
17081708
}else{
17091709
style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
17101710
g.zTop, zUuid);
17111711
}
17121712
--- src/info.c
+++ src/info.c
@@ -1443,11 +1443,11 @@
1443 if( !g.perm.Read ){ login_needed(); return; }
1444 if( rid==0 ) fossil_redirect_home();
1445 if( g.perm.Admin ){
1446 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1447 if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1448 style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
1449 g.zTop, zUuid);
1450 }else{
1451 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1452 g.zTop, zUuid);
1453 }
@@ -1593,11 +1593,11 @@
1593 if( !g.perm.Read ){ login_needed(); return; }
1594 if( rid==0 ) fossil_redirect_home();
1595 if( g.perm.Admin ){
1596 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1597 if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1598 style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
1599 g.zTop, zUuid);
1600 }else{
1601 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1602 g.zTop, zUuid);
1603 }
@@ -1701,11 +1701,11 @@
1701 rid = name_to_rid_www("name");
1702 if( rid==0 ){ fossil_redirect_home(); }
1703 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1704 if( g.perm.Admin ){
1705 if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1706 style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
1707 g.zTop, zUuid);
1708 }else{
1709 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1710 g.zTop, zUuid);
1711 }
1712
--- src/info.c
+++ src/info.c
@@ -1443,11 +1443,11 @@
1443 if( !g.perm.Read ){ login_needed(); return; }
1444 if( rid==0 ) fossil_redirect_home();
1445 if( g.perm.Admin ){
1446 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1447 if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1448 style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#delshun",
1449 g.zTop, zUuid);
1450 }else{
1451 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1452 g.zTop, zUuid);
1453 }
@@ -1593,11 +1593,11 @@
1593 if( !g.perm.Read ){ login_needed(); return; }
1594 if( rid==0 ) fossil_redirect_home();
1595 if( g.perm.Admin ){
1596 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1597 if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1598 style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#accshun",
1599 g.zTop, zUuid);
1600 }else{
1601 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1602 g.zTop, zUuid);
1603 }
@@ -1701,11 +1701,11 @@
1701 rid = name_to_rid_www("name");
1702 if( rid==0 ){ fossil_redirect_home(); }
1703 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1704 if( g.perm.Admin ){
1705 if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1706 style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#accshun",
1707 g.zTop, zUuid);
1708 }else{
1709 style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
1710 g.zTop, zUuid);
1711 }
1712
+3 -1
--- src/shun.c
+++ src/shun.c
@@ -132,19 +132,21 @@
132132
@ <input type="text" name="uuid" value="%h(PD("shun",""))" size="50" />
133133
@ <input type="submit" name="add" value="Shun" />
134134
@ </div></form>
135135
@ </blockquote>
136136
@
137
+ @ <a name="delshun"></a>
137138
@ <p>Enter the UUID of a previous shunned artifact to cause it to be
138139
@ accepted again in the repository. The artifact content is not
139140
@ restored because the content is unknown. The only change is that
140141
@ the formerly shunned artifact will be accepted on subsequent sync
141142
@ operations.</p>
142143
@
143144
@ <blockquote>
144145
@ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
145
- @ <input type="text" name="uuid" size="50" />
146
+ login_insert_csrf_secret();
147
+ @ <input type="text" name="uuid" value="%h(PD("accept", ""))" size="50" />
146148
@ <input type="submit" name="sub" value="Accept" />
147149
@ </div></form>
148150
@ </blockquote>
149151
@
150152
@ <p>Press the Rebuild button below to rebuild the repository. The
151153
--- src/shun.c
+++ src/shun.c
@@ -132,19 +132,21 @@
132 @ <input type="text" name="uuid" value="%h(PD("shun",""))" size="50" />
133 @ <input type="submit" name="add" value="Shun" />
134 @ </div></form>
135 @ </blockquote>
136 @
 
137 @ <p>Enter the UUID of a previous shunned artifact to cause it to be
138 @ accepted again in the repository. The artifact content is not
139 @ restored because the content is unknown. The only change is that
140 @ the formerly shunned artifact will be accepted on subsequent sync
141 @ operations.</p>
142 @
143 @ <blockquote>
144 @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
145 @ <input type="text" name="uuid" size="50" />
 
146 @ <input type="submit" name="sub" value="Accept" />
147 @ </div></form>
148 @ </blockquote>
149 @
150 @ <p>Press the Rebuild button below to rebuild the repository. The
151
--- src/shun.c
+++ src/shun.c
@@ -132,19 +132,21 @@
132 @ <input type="text" name="uuid" value="%h(PD("shun",""))" size="50" />
133 @ <input type="submit" name="add" value="Shun" />
134 @ </div></form>
135 @ </blockquote>
136 @
137 @ <a name="delshun"></a>
138 @ <p>Enter the UUID of a previous shunned artifact to cause it to be
139 @ accepted again in the repository. The artifact content is not
140 @ restored because the content is unknown. The only change is that
141 @ the formerly shunned artifact will be accepted on subsequent sync
142 @ operations.</p>
143 @
144 @ <blockquote>
145 @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
146 login_insert_csrf_secret();
147 @ <input type="text" name="uuid" value="%h(PD("accept", ""))" size="50" />
148 @ <input type="submit" name="sub" value="Accept" />
149 @ </div></form>
150 @ </blockquote>
151 @
152 @ <p>Press the Rebuild button below to rebuild the repository. The
153

Keyboard Shortcuts

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