diff options
Diffstat (limited to 'scripts/forms.php')
-rw-r--r-- | scripts/forms.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/forms.php b/scripts/forms.php index 3c700415..9a5d0f12 100644 --- a/scripts/forms.php +++ b/scripts/forms.php @@ -394,9 +394,25 @@ SDVA($InputTags['e_changesummary'], array( 'value' => PHSC(stripmagic(@$_POST['csum']), ENT_QUOTES))); SDVA($InputTags['e_minorcheckbox'], array( ':html' => "<input type='checkbox' \$InputFormArgs />\$InputFormLabel", - 'name' => 'diffclass', 'value' => 'minor')); + 'name' => 'diffclass', 'value' => 'minor', + 'label'=>PHSC(XL('This is a minor edit'), ENT_QUOTES))); if (@$_POST['diffclass']=='minor') SDV($InputTags['e_minorcheckbox']['checked'], 'checked'); + +if (IsEnabled($EnableMergeLastMinorEdit, 0)>=1 && @$Author && PageExists($pagename)) { + if ($EnableMergeLastMinorEdit >= 120) { + $ltime = intval(PageVar($pagename, '$LastModifiedTime'))+$EnableMergeLastMinorEdit; + $samehost = PageVar($pagename, '$LastModifiedHost') == $_SERVER['REMOTE_ADDR']; + } + if ($EnableMergeLastMinorEdit < 120 || ($ltime>$Now && $samehost)) { + $InputTags['e_minorcheckbox']['label'] .= + " " . PHSC(XL('(merge with previous edit)'), ENT_QUOTES); + SDV($InputTags['e_minorcheckbox']['title'], + PHSC(XL('Merge the new edit with the last one, if by the same author, and reuse the change summary if left empty'), ENT_QUOTES)); + } + unset($ltime, $samehost); +} + SDVA($InputTags['e_savebutton'], array( ':html' => "<input type='submit' \$InputFormArgs />", 'name' => 'post', 'value' => ' '.XL('Save').' ', |