Diff
Not logged in

Differences From:

File src/shun.c part of check-in [0be54823ba] - Add defenses against cross-site request forgery attacks. by drh on 2008-10-18 12:55:44. [view]

To:

File src/shun.c part of check-in [3f6edbc779] - Update to the latest SQLite. Add a Rebuild button on the Shun webpage. Add the test-detach CLI method. by drh on 2008-11-10 00:40:10. [view]

@@ -54,8 +54,13 @@
   login_check_credentials();
   if( !g.okAdmin ){
     login_needed();
   }
+  if( P("rebuild") ){
+    db_begin_transaction();
+    rebuild_db(0,0);
+    db_end_transaction(0);
+  }
   if( zUuid ){
     nUuid = strlen(zUuid);
     if( nUuid!=40 || !validate16(zUuid, nUuid) ){
       zUuid = 0;
@@ -146,8 +151,19 @@
   @ <input type="text" name="uuid" size="50">
   @ <input type="submit" name="sub" value="Accept">
   @ </form>
   @ </blockquote>
+  @
+  @ <p>Press the button below to rebuild the respository.  The rebuild
+  @ may take several seconds, so be patient after pressing the button.</p>
+  @
+  @ <blockquote>
+  @ <form method="POST" action="%s(g.zBaseURL)/%s(g.zPath)">
+  login_insert_csrf_secret();
+  @ <input type="submit" name="rebuild" value="Rebuild">
+  @ </form>
+  @ </blockquote>
+  @
   style_footer();
 }
 
 /*