Fossil

Check-in [8f47c3f6]
Login

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

Overview
Comment:Replaced a declare-and-init line pair with a single define-with-value line. No functional change.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:8f47c3f653d87d50f408f365dcb744d4452d4b3dd8215db27a1279eac309430e
User & Date: wyoung 2018-08-16 06:36:44
Context
2018-08-16
07:21
Improved locality of a variable. No functional change. check-in: 09103fd2 user: wyoung tags: trunk
07:06
Posts are now hidden on the /forum page if they're marked as private (i.e. needing moderator attention) and they were posted by another user, except when the user is a moderator.

(Closed because a different method was implemented on trunk.) Closed-Leaf check-in: 779eaaae user: wyoung tags: hide-post-if-needmod

06:36
Replaced a declare-and-init line pair with a single define-with-value line. No functional change. check-in: 8f47c3f6 user: wyoung tags: trunk
02:03
Fix the hextoblob() function so that does not report out-of-memory if the size of the input string is zero bytes. This fixes the instances of "out-of-memory" reports when accessing the /alerts page without an argument. check-in: 5519c6b8 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/forum.c.

948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
      "                              WHERE y.froot=x.froot"
      "                              ORDER BY fmtime DESC LIMIT 1))"
      " FROM forumpost AS x"
      " GROUP BY froot ORDER BY 1 LIMIT %d OFFSET %d;",
      iLimit+1, iOfst
    );
    while( db_step(&q)==SQLITE_ROW ){
      char *zAge = 0;
      char *zDuration = 0;
      int nMsg = db_column_int(&q, 2);
      const char *zUuid = db_column_text(&q, 3);
      const char *zTitle = db_column_text(&q, 4);
      zAge = human_readable_age(db_column_double(&q,0));
      if( iCnt==0 ){
        if( iOfst>0 ){
          @ <h1>Threads at least %s(zAge) old</h1>
        }else{
          @ <h1>Most recent threads</h1>
        }
        @ <div class='fileage'><table width="100%%">







|




<







948
949
950
951
952
953
954
955
956
957
958
959

960
961
962
963
964
965
966
      "                              WHERE y.froot=x.froot"
      "                              ORDER BY fmtime DESC LIMIT 1))"
      " FROM forumpost AS x"
      " GROUP BY froot ORDER BY 1 LIMIT %d OFFSET %d;",
      iLimit+1, iOfst
    );
    while( db_step(&q)==SQLITE_ROW ){
      char *zAge = human_readable_age(db_column_double(&q,0));
      char *zDuration = 0;
      int nMsg = db_column_int(&q, 2);
      const char *zUuid = db_column_text(&q, 3);
      const char *zTitle = db_column_text(&q, 4);

      if( iCnt==0 ){
        if( iOfst>0 ){
          @ <h1>Threads at least %s(zAge) old</h1>
        }else{
          @ <h1>Most recent threads</h1>
        }
        @ <div class='fileage'><table width="100%%">