Fossil

Check-in [69d332ff]
Login

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

Overview
Comment:Fix harmless compiler warnings. Also remove the "ago" text from the "Last Change" column in the subscriber list webpage.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 69d332ff96668aa5bac1286af7fcdb9d43d4437763ad7022dfa67c76fb93ce8d
User & Date: drh 2018-06-25 16:19:30.578
Context
2018-06-25
18:13
Change the schema of the subscriber table to make it compatible with the "fossil config sync" mechanism. Upgrading through this check-in requires running "fossil email reset" to rebuild the email notification schema, and losing subscriber information. ... (check-in: 9040de46 user: drh tags: trunk)
16:19
Fix harmless compiler warnings. Also remove the "ago" text from the "Last Change" column in the subscriber list webpage. ... (check-in: 69d332ff user: drh tags: trunk)
16:14
Enhance the subscriber since to include the creation time and so that a new random subscriber code is set. ... (check-in: 7e87699d user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/cgi.c.
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
      }
    }
  }
  fflush(g.httpOut);
  CGIDEBUG(("DONE\n"));

  /* After the webpage has been sent, do any useful background
  /* processing.
  */
  if( iReplyStatus==200 ){
    email_auto_exec();
  }
}

/*







|







336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
      }
    }
  }
  fflush(g.httpOut);
  CGIDEBUG(("DONE\n"));

  /* After the webpage has been sent, do any useful background
  ** processing.
  */
  if( iReplyStatus==200 ){
    email_auto_exec();
  }
}

/*
Changes to src/email.c.
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
** zAltDest to cause all emails to be printed to the console for
** debugging purposes.
**
** The EmailSender object returned must be freed using email_sender_free().
*/
EmailSender *email_sender_new(const char *zAltDest, int bImmediateFail){
  EmailSender *p;
  char *zMissing = 0;

  p = fossil_malloc(sizeof(*p));
  memset(p, 0, sizeof(*p));
  p->bImmediateFail = bImmediateFail;
  if( zAltDest ){
    p->zDest = zAltDest;
  }else{







<







412
413
414
415
416
417
418

419
420
421
422
423
424
425
** zAltDest to cause all emails to be printed to the console for
** debugging purposes.
**
** The EmailSender object returned must be freed using email_sender_free().
*/
EmailSender *email_sender_new(const char *zAltDest, int bImmediateFail){
  EmailSender *p;


  p = fossil_malloc(sizeof(*p));
  memset(p, 0, sizeof(*p));
  p->bImmediateFail = bImmediateFail;
  if( zAltDest ){
    p->zDest = zAltDest;
  }else{
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
  Stmt q;
  int sa, sc, st, sw;
  int sdigest, sdonotcall, sverified;
  const char *ssub;
  const char *semail;
  const char *smip;
  const char *suname;
  char *smtime;
  char *sctime;
  int eErr = 0;
  char *zErr = 0;

  if( email_webpages_disabled() ) return;
  login_check_credentials();
  if( zName==0 && login_is_individual() ){
    zName = db_text(0, "SELECT hex(subscriberCode) FROM subscriber"







|
|







1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
  Stmt q;
  int sa, sc, st, sw;
  int sdigest, sdonotcall, sverified;
  const char *ssub;
  const char *semail;
  const char *smip;
  const char *suname;
  const char *smtime;
  const char *sctime;
  int eErr = 0;
  char *zErr = 0;

  if( email_webpages_disabled() ) return;
  login_check_credentials();
  if( zName==0 && login_is_individual() ){
    zName = db_text(0, "SELECT hex(subscriberCode) FROM subscriber"
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
    @ <tr>
    @ <td><a href='%R/alerts/%s(db_column_text(&q,0))'>\
    @ %h(db_column_text(&q,1))</a></td>
    @ <td>%h(db_column_text(&q,2))</td>
    @ <td>%s(db_column_int(&q,5)?"digest":"")</td>
    @ <td>%h(db_column_text(&q,3))</td>
    @ <td>%s(db_column_int(&q,4)?"yes":"pending")</td>
    @ <td>%z(human_readable_age(rAge)) ago</td>
    @ <td>%h(db_column_text(&q,6))</td>
    @ </tr>
  }
  @ </table>
  db_finalize(&q);
  style_footer();
}







|







1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
    @ <tr>
    @ <td><a href='%R/alerts/%s(db_column_text(&q,0))'>\
    @ %h(db_column_text(&q,1))</a></td>
    @ <td>%h(db_column_text(&q,2))</td>
    @ <td>%s(db_column_int(&q,5)?"digest":"")</td>
    @ <td>%h(db_column_text(&q,3))</td>
    @ <td>%s(db_column_int(&q,4)?"yes":"pending")</td>
    @ <td>%z(human_readable_age(rAge))</td>
    @ <td>%h(db_column_text(&q,6))</td>
    @ </tr>
  }
  @ </table>
  db_finalize(&q);
  style_footer();
}
Changes to src/security_audit.c.
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
** Show the content of the error log.  Only the administrator can view
** this page.
*/
void errorlog_page(void){
  login_check_credentials();
  i64 szFile;
  FILE *in;
  long got;
  char z[10000];
  if( !g.perm.Setup && !g.perm.Admin ){
    login_needed(0);
    return;
  }
  style_header("Server Error Log");
  if( g.zErrlog==0 || fossil_strcmp(g.zErrlog,"-")==0 ){







<







408
409
410
411
412
413
414

415
416
417
418
419
420
421
** Show the content of the error log.  Only the administrator can view
** this page.
*/
void errorlog_page(void){
  login_check_credentials();
  i64 szFile;
  FILE *in;

  char z[10000];
  if( !g.perm.Setup && !g.perm.Admin ){
    login_needed(0);
    return;
  }
  style_header("Server Error Log");
  if( g.zErrlog==0 || fossil_strcmp(g.zErrlog,"-")==0 ){