Fossil SCM
Change the "Unshun" links to jump to a prefilled form for duing the unshun, rather than doing the unshun directly.
Commit
cc9b04baaf88a39ef4086945a71626b0398d3600
Parent
3bb44041f0d54cc…
2 files changed
+3
-3
+3
-1
+3
-3
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1443,11 +1443,11 @@ | ||
| 1443 | 1443 | if( !g.perm.Read ){ login_needed(); return; } |
| 1444 | 1444 | if( rid==0 ) fossil_redirect_home(); |
| 1445 | 1445 | if( g.perm.Admin ){ |
| 1446 | 1446 | const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1447 | 1447 | 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", | |
| 1449 | 1449 | g.zTop, zUuid); |
| 1450 | 1450 | }else{ |
| 1451 | 1451 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 1452 | 1452 | g.zTop, zUuid); |
| 1453 | 1453 | } |
| @@ -1593,11 +1593,11 @@ | ||
| 1593 | 1593 | if( !g.perm.Read ){ login_needed(); return; } |
| 1594 | 1594 | if( rid==0 ) fossil_redirect_home(); |
| 1595 | 1595 | if( g.perm.Admin ){ |
| 1596 | 1596 | const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1597 | 1597 | 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", | |
| 1599 | 1599 | g.zTop, zUuid); |
| 1600 | 1600 | }else{ |
| 1601 | 1601 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 1602 | 1602 | g.zTop, zUuid); |
| 1603 | 1603 | } |
| @@ -1701,11 +1701,11 @@ | ||
| 1701 | 1701 | rid = name_to_rid_www("name"); |
| 1702 | 1702 | if( rid==0 ){ fossil_redirect_home(); } |
| 1703 | 1703 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1704 | 1704 | if( g.perm.Admin ){ |
| 1705 | 1705 | 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", | |
| 1707 | 1707 | g.zTop, zUuid); |
| 1708 | 1708 | }else{ |
| 1709 | 1709 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 1710 | 1710 | g.zTop, zUuid); |
| 1711 | 1711 | } |
| 1712 | 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?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 @@ | ||
| 132 | 132 | @ <input type="text" name="uuid" value="%h(PD("shun",""))" size="50" /> |
| 133 | 133 | @ <input type="submit" name="add" value="Shun" /> |
| 134 | 134 | @ </div></form> |
| 135 | 135 | @ </blockquote> |
| 136 | 136 | @ |
| 137 | + @ <a name="delshun"></a> | |
| 137 | 138 | @ <p>Enter the UUID of a previous shunned artifact to cause it to be |
| 138 | 139 | @ accepted again in the repository. The artifact content is not |
| 139 | 140 | @ restored because the content is unknown. The only change is that |
| 140 | 141 | @ the formerly shunned artifact will be accepted on subsequent sync |
| 141 | 142 | @ operations.</p> |
| 142 | 143 | @ |
| 143 | 144 | @ <blockquote> |
| 144 | 145 | @ <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" /> | |
| 146 | 148 | @ <input type="submit" name="sub" value="Accept" /> |
| 147 | 149 | @ </div></form> |
| 148 | 150 | @ </blockquote> |
| 149 | 151 | @ |
| 150 | 152 | @ <p>Press the Rebuild button below to rebuild the repository. The |
| 151 | 153 |
| --- 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 |