Changes On Branch modDispUser
Not logged in

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

Changes In Branch modDispUser Excluding Merge-Ins

This is equivalent to a diff from 60f71ba20a to 89ed7dc591

2012-11-20
14:28
Prevent blank user names from being displayed for items awaiting moderation. Also, Show much less output on a sync operation, unless the --verbose flag is given. check-in: 15708574fe user: drh tags: trunk
06:04
Add 'th1-setup' setting for the optional TH1 script to evaluate after creating and initializing the TH1 interpreter. Revise TH1 integration in preparation for generalized hooks. check-in: b058c8a944 user: mistachkin tags: trunk
02:05
Show much less output on a sync operation, unless the --verbose flag is given. Closed-Leaf check-in: 407cd4c534 user: drh tags: less-verbose-sync
2012-11-19
23:58
Prevent blank user names from being displayed for items awaiting moderation. Closed-Leaf check-in: 89ed7dc591 user: mistachkin tags: modDispUser
23:57
Fix harmless compiler warning in the wiki rendering code. check-in: 60f71ba20a user: mistachkin tags: trunk
16:41
Fix the git-fast-export generator so that it does not make links to files that for some reason or another do not exist in the repository. Also fix some stylistic problems in the export code. check-in: c3bfb0083a user: drh tags: trunk

Changes to src/attach.c.

    69     69       const char *zSrc = db_column_text(&q, 1);
    70     70       const char *zTarget = db_column_text(&q, 2);
    71     71       const char *zFilename = db_column_text(&q, 3);
    72     72       const char *zComment = db_column_text(&q, 4);
    73     73       const char *zUser = db_column_text(&q, 5);
    74     74       const char *zUuid = db_column_text(&q, 6);
    75     75       int attachid = db_column_int(&q, 7);
           76  +    const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous";
    76     77       int i;
    77     78       char *zUrlTail;
    78     79       for(i=0; zFilename[i]; i++){
    79     80         if( zFilename[i]=='/' && zFilename[i+1]!=0 ){ 
    80     81           zFilename = &zFilename[i+1];
    81     82           i = -1;
    82     83         }
................................................................................
   113    114       }else{
   114    115         if( zSrc==0 || zSrc[0]==0 ){
   115    116           @ Deleted
   116    117         }else {
   117    118           @ Added
   118    119         }
   119    120       }
   120         -    @ by %h(zUser) on
          121  +    @ by %h(zDispUser) on
   121    122       hyperlink_to_date(zDate, ".");
   122    123       free(zUrlTail);
   123    124     }
   124    125     db_finalize(&q);
   125    126     @ </ol>
   126    127     style_footer();
   127    128     return;
................................................................................
   555    556     );
   556    557     while( db_step(&q)==SQLITE_ROW ){
   557    558       const char *zDate = db_column_text(&q, 0);
   558    559       const char *zFile = db_column_text(&q, 1);
   559    560       const char *zUser = db_column_text(&q, 2);
   560    561       const char *zUuid = db_column_text(&q, 3);
   561    562       const char *zSrc = db_column_text(&q, 4);
          563  +    const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous";
   562    564       if( cnt==0 ){
   563    565         @ %s(zHeader)
   564    566       }
   565    567       cnt++;
   566    568       @ <li>
   567    569       @ %z(href("%R/artifact/%s",zSrc))%h(zFile)</a>
   568         -    @ added by %h(zUser) on
          570  +    @ added by %h(zDispUser) on
   569    571       hyperlink_to_date(zDate, ".");
   570    572       @ [%z(href("%R/ainfo/%s",zUuid))details</a>]
   571    573       @ </li>
   572    574     }
   573    575     if( cnt ){
   574    576       @ </ul>
   575    577     }
   576    578     db_finalize(&q);
   577    579     
   578    580   }

Changes to src/timeline.c.

    83     83   
    84     84   /*
    85     85   ** Generate a hyperlink to a user.  This will link to a timeline showing
    86     86   ** events by that user.  If the date+time is specified, then the timeline
    87     87   ** is centered on that date+time.
    88     88   */
    89     89   void hyperlink_to_user(const char *zU, const char *zD, const char *zSuf){
           90  +  if( zU==0 || zU[0]==0 ) zU = "anonymous";
    90     91     if( zSuf==0 ) zSuf = "";
    91     92     if( g.perm.Hyperlink ){
    92     93       if( zD && zD[0] ){
    93     94         @ %z(href("%R/timeline?c=%T&u=%T",zD,zU))%h(zU)</a>%s(zSuf)
    94     95       }else{
    95     96         @ %z(href("%R/timeline?u=%T",zU))%h(zU)</a>%s(zSuf)
    96     97       }
................................................................................
   235    236       int isLeaf = db_column_int(pQuery, 5);
   236    237       const char *zBgClr = db_column_text(pQuery, 6);
   237    238       const char *zDate = db_column_text(pQuery, 2);
   238    239       const char *zType = db_column_text(pQuery, 7);
   239    240       const char *zUser = db_column_text(pQuery, 4);
   240    241       const char *zTagList = db_column_text(pQuery, 8);
   241    242       int tagid = db_column_int(pQuery, 9);
          243  +    const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous";
   242    244       const char *zBr = 0;      /* Branch */
   243    245       int commentColumn = 3;    /* Column containing comment text */
   244    246       int modPending;           /* Pending moderation */
   245    247       char zTime[8];
   246    248   
   247    249       modPending =  moderation_pending(rid);
   248    250       if( tagid ){
................................................................................
   370    372       }
   371    373       blob_reset(&comment);
   372    374   
   373    375       /* Generate the "user: USERNAME" at the end of the comment, together
   374    376       ** with a hyperlink to another timeline for that user.
   375    377       */
   376    378       if( zTagList && zTagList[0]==0 ) zTagList = 0;
   377         -    if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){
   378         -      char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd", zUser, zDate);
   379         -      @ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051")
          379  +    if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){
          380  +      char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd", zDispUser, zDate);
          381  +      @ (user: %z(href("%z",zLink))%h(zDispUser)</a>%s(zTagList?",":"\051")
   380    382       }else{
   381         -      @ (user: %h(zUser)%s(zTagList?",":"\051")
          383  +      @ (user: %h(zDispUser)%s(zTagList?",":"\051")
   382    384       }
   383    385   
   384    386       /* Generate a "detail" link for tags. */
   385    387       if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){
   386    388         @ [%z(href("%R/info/%S",zUuid))details</a>]
   387    389       }
   388    390