Diff
Not logged in

Differences From Artifact [6da016415dc52d61]:

To Artifact [af6df3466e3c4a88]:


591 */ 591 */ 592 void wdiff_page(void){ 592 void wdiff_page(void){ 593 char *zTitle; 593 char *zTitle; 594 int rid1, rid2; 594 int rid1, rid2; 595 const char *zPageName; 595 const char *zPageName; 596 Manifest *pW1, *pW2 = 0; 596 Manifest *pW1, *pW2 = 0; 597 Blob w1, w2, d; 597 Blob w1, w2, d; > 598 int diffFlags; 598 599 599 login_check_credentials(); 600 login_check_credentials(); 600 rid1 = atoi(PD("a","0")); 601 rid1 = atoi(PD("a","0")); 601 if( !g.perm.History ){ login_needed(); return; } 602 if( !g.perm.History ){ login_needed(); return; } 602 if( rid1==0 ) fossil_redirect_home(); 603 if( rid1==0 ) fossil_redirect_home(); 603 rid2 = atoi(PD("b","0")); 604 rid2 = atoi(PD("b","0")); 604 zPageName = PD("name",""); 605 zPageName = PD("name",""); ................................................................................................................................................................................ 619 if( pW1==0 ) fossil_redirect_home(); 620 if( pW1==0 ) fossil_redirect_home(); 620 blob_init(&w1, pW1->zWiki, -1); 621 blob_init(&w1, pW1->zWiki, -1); 621 blob_zero(&w2); 622 blob_zero(&w2); 622 if( rid2 && (pW2 = manifest_get(rid2, CFTYPE_WIKI))!=0 ){ 623 if( rid2 && (pW2 = manifest_get(rid2, CFTYPE_WIKI))!=0 ){ 623 blob_init(&w2, pW2->zWiki, -1); 624 blob_init(&w2, pW2->zWiki, -1); 624 } 625 } 625 blob_zero(&d); 626 blob_zero(&d); > 627 diffFlags = construct_diff_flags(1,0); 626 text_diff(&w2, &w1, &d, 5 | DIFF_IGNORE_EOLWS); | 628 text_diff(&w2, &w1, &d, diffFlags | DIFF_HTML | DIFF_LINENO); 627 @ <pre> < > 629 @ <div class="udiff"> 628 @ %h(blob_str(&d)) | 630 @ %s(blob_str(&d)) 629 @ </pre> | 631 @ </div> 630 manifest_destroy(pW1); 632 manifest_destroy(pW1); 631 manifest_destroy(pW2); 633 manifest_destroy(pW2); 632 style_footer(); 634 style_footer(); 633 } 635 } 634 636 635 /* 637 /* 636 ** prepare()s pStmt with a query requesting: 638 ** prepare()s pStmt with a query requesting: