This is a ''diff -c'' against Usemod 0.92 *** wiki.org Sun Apr 22 02:44:10 2001 --- wiki.pl Sun Feb 16 01:22:30 2003 *************** *** 2607,2612 **** --- 2607,2613 ---- print T($EditNote) . '<br>'; # Allow translation } print $q->submit(-name=>'Save', -value=>T('Save')), "\n"; + print " "; $userName = &GetParam("username", ""); if ($userName ne "") { print ' (', T('Your user name is'), ' ', *************** *** 2614,2620 **** --- 2615,2624 ---- } else { print ' (', Ts('Visit %s to set your user name.', &GetPrefsLink()), ') '; } + print " "; print $q->submit(-name=>'Preview', -value=>T('Preview')), "\n"; + print " "; + print $q->submit(-name=>'wantCancel', -value=>T('Cancel Edit')), "\n"; if ($isConflict) { print "\n<br><hr><p><strong>", T('This is the text you submitted:'), *************** *** 3195,3200 **** --- 3199,3205 ---- my $summary = &GetParam("summary", ""); my $oldtime = &GetParam("oldtime", ""); my $oldconflict = &GetParam("oldconflict", ""); + my $wantCancel = (&GetParam("wantCancel", "") ne ""); my $isEdit = 0; my $editTime = $Now; my $authorAddr = $ENV{REMOTE_ADDR}; *************** *** 3203,3208 **** --- 3208,3219 ---- # This is an internal interface--we don't need to explain &ReportError(Ts('Editing not allowed for %s.', $id)); return; + } + + if ($wantCancel) { + &ReleaseLock(); + &ReBrowsePage($id, "", 1); + return; } if (($id eq 'SampleUndefinedPage') || ($id eq T('SampleUndefinedPage'))) {
+ my $wantCancel = (&GetParam("wantCancel", "") ne "");
instead of
+ my $wantCancel = &GetParam("wantCancel", ""); ?
Thanks.
--JuanmaMP