From 306b2c8594cf19e54f0b855eab0f898f064c5b67 Mon Sep 17 00:00:00 2001
From: Denis Simakov <akinoame1@gmail.com>
Date: Mon, 22 May 2006 20:20:43 +0200
Subject: [PATCH] fix: wrong secedit when page changes

Binds secedit buttons to file modification stamp ('lastmod'), so that if the page changes in between, editing of the old revision starts.

darcs-hash:20060522182043-3c565-17e6ac5d018300dd009c24218f4b1b8c8ae80363.gz
---
 inc/html.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/inc/html.php b/inc/html.php
index dbd8cd77d..1dc0d5759 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -136,12 +136,14 @@ function html_editbutton(){
 function html_secedit_button($section,$p){
   global $ID;
   global $lang;
+  global $INFO;
   $secedit  = '';
 #  if($p) $secedit .= "</p>\n";
   $secedit .= '<div class="secedit">';
   $secedit .= html_btn('secedit',$ID,'',
                         array('do'      => 'edit',
-                              'lines'   => "$section"),
+                              'lines'   => "$section",
+                              'rev' => $INFO['lastmod']),
                               'post');
   $secedit .= '</div>';
 #  if($p) $secedit .= "\n<p>";
-- 
GitLab