Fossil

Check-in [671e7c34]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the "Behavior" setup page so that it has the correct default values for unspecified attributes. Ticket [0101a97fefd5ca91d]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:671e7c34e9a78bd49212e149760c51625fbb9a82
User & Date: drh 2009-10-31 13:50:08
References
2009-10-31
13:50 Fixed ticket [0101a97f]: GPG error on commit with GPG disabled plus 2 other changes artifact: f29ed2aa user: drh
Context
2009-10-31
14:03
Fix the "remote-url" command so that it preserves the userid and password. Ticket [68c7f7bee951302]. check-in: 11ecd5c0 user: drh tags: trunk
13:50
Fix the "Behavior" setup page so that it has the correct default values for unspecified attributes. Ticket [0101a97fefd5ca91d] check-in: 671e7c34 user: drh tags: trunk
13:23
Remove the extra space character before filenames in web directory listings. Ticket [28d861eb5799a60] check-in: 4165033b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/setup.c.

632
633
634
635
636
637
638
639
640
641
642
643
644
645
646

647
648
649
650
651
652
653
...
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
*/
static void onoff_attribute(
  const char *zLabel,   /* The text label on the checkbox */
  const char *zVar,     /* The corresponding row in the VAR table */
  const char *zQParm,   /* The query parameter */
  int dfltVal           /* Default value if VAR table entry does not exist */
){
  const char *zVal = db_get(zVar, 0);
  const char *zQ = P(zQParm);
  int iVal;
  if( zVal ){
    iVal = atoi(zVal);
  }else{
    iVal = dfltVal;
  }

  if( zQ==0 && P("submit") ){
    zQ = "off";
  }
  if( zQ ){
    int iQ = strcmp(zQ,"on")==0 || atoi(zQ);
    if( iQ!=iVal ){
      login_verify_csrf_secret();
................................................................................
  style_header("Fossil SCM Behavior");
  db_begin_transaction();
  @ <form action="%s(g.zBaseURL)/setup_behavior" method="POST">
  login_insert_csrf_secret();

  @ <hr>
  onoff_attribute("Automatically synchronize with repository",
                  "autosync", "autosync", 0);
  @ <p>Automatically keeps your work in sync with a centralized server.</p>

  @ <hr>
  onoff_attribute("Sign all commits with gpg",
                  "clearsign", "clearsign", 0);
  @ <p>When enabled (the default), fossil will attempt to
  @     sign all commits with gpg.  When disabled, commits will
  @    be unsigned.</p>  
  
  @ <hr>
  onoff_attribute("Require local authentication",
                  "localauth", "localauth", 0);
  @ <p>If enabled, require that HTTP connections from
  @         127.0.0.1 be authenticated by password.  If







<

<
<
<
<
<
<
>







 







|



|
|

|







632
633
634
635
636
637
638

639






640
641
642
643
644
645
646
647
...
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
*/
static void onoff_attribute(
  const char *zLabel,   /* The text label on the checkbox */
  const char *zVar,     /* The corresponding row in the VAR table */
  const char *zQParm,   /* The query parameter */
  int dfltVal           /* Default value if VAR table entry does not exist */
){

  const char *zQ = P(zQParm);






  int iVal = db_get_boolean(zVar, dfltVal);
  if( zQ==0 && P("submit") ){
    zQ = "off";
  }
  if( zQ ){
    int iQ = strcmp(zQ,"on")==0 || atoi(zQ);
    if( iQ!=iVal ){
      login_verify_csrf_secret();
................................................................................
  style_header("Fossil SCM Behavior");
  db_begin_transaction();
  @ <form action="%s(g.zBaseURL)/setup_behavior" method="POST">
  login_insert_csrf_secret();

  @ <hr>
  onoff_attribute("Automatically synchronize with repository",
                  "autosync", "autosync", 1);
  @ <p>Automatically keeps your work in sync with a centralized server.</p>

  @ <hr>
  onoff_attribute("Sign all commits with GPG",
                  "clearsign", "clearsign", 1);
  @ <p>When enabled (the default), fossil will attempt to
  @     sign all commits with GPG.  When disabled, commits will
  @    be unsigned.</p>  
  
  @ <hr>
  onoff_attribute("Require local authentication",
                  "localauth", "localauth", 0);
  @ <p>If enabled, require that HTTP connections from
  @         127.0.0.1 be authenticated by password.  If