Fossil

Diff
Login

Differences From Artifact [6da016415d]:

To Artifact [af6df3466e]:


591
592
593
594
595
596
597

598
599
600
601
602
603
604
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605







+







*/
void wdiff_page(void){
  char *zTitle;
  int rid1, rid2;
  const char *zPageName;
  Manifest *pW1, *pW2 = 0;
  Blob w1, w2, d;
  int diffFlags;

  login_check_credentials();
  rid1 = atoi(PD("a","0"));
  if( !g.perm.History ){ login_needed(); return; }
  if( rid1==0 ) fossil_redirect_home();
  rid2 = atoi(PD("b","0"));
  zPageName = PD("name","");
619
620
621
622
623
624
625

626
627
628
629




630
631
632
633
634
635
636
620
621
622
623
624
625
626
627




628
629
630
631
632
633
634
635
636
637
638







+
-
-
-
-
+
+
+
+







  if( pW1==0 ) fossil_redirect_home();
  blob_init(&w1, pW1->zWiki, -1);
  blob_zero(&w2);
  if( rid2 && (pW2 = manifest_get(rid2, CFTYPE_WIKI))!=0 ){
    blob_init(&w2, pW2->zWiki, -1);
  }
  blob_zero(&d);
  diffFlags = construct_diff_flags(1,0);
  text_diff(&w2, &w1, &d, 5 | DIFF_IGNORE_EOLWS);
  @ <pre>
  @ %h(blob_str(&d))
  @ </pre>
  text_diff(&w2, &w1, &d, diffFlags | DIFF_HTML | DIFF_LINENO);
  @ <div class="udiff">
  @ %s(blob_str(&d))
  @ </div>
  manifest_destroy(pW1);
  manifest_destroy(pW2);
  style_footer();
}

/*
** prepare()s pStmt with a query requesting: