From 8fe3bb00af38a1790e3c2b30eb655fec12e19653 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Thu, 5 Jul 2007 23:54:47 +0200 Subject: correct hilighting of empty summary on preview darcs-hash:20070705215447-6942e-d3e1124a3cfec6661a7077bc0d9707b156bc2313.gz --- inc/html.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index 7c7d78ee7..ea71df199 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1047,13 +1047,25 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed? }else{ $text = rawWiki($ID,$REV); } + $check = md5($text); + $mod = false; }else{ //try to load a pagetemplate $data = array($ID); $text = trigger_event('HTML_PAGE_FROMTEMPLATE',$data,'pageTemplate',true); + $check = md5(''); + $mod = $text!==''; } }else{ $pr = true; //preview mode + if (isset($_REQUEST['changecheck'])) { + $check = $_REQUEST['changecheck']; + $mod = md5($text)!==$check; + } else { + // Why? Assume default text is unmodified. + $check = md5($text); + $mod = false; + } } $wr = $INFO['writable']; @@ -1084,7 +1096,7 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
@@ -1099,6 +1111,7 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed? + -- cgit v1.2.3