r64859 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64858‎ | r64859 | r64860 >
Date:08:42, 10 April 2010
Author:malvineous
Status:ok
Tags:
Comment:
Make ForcePreview extension play nicely with ConfirmEdit extension. This change allows article edits with Captchas on them to be saved.
Modified paths:
  • /trunk/extensions/ForcePreview/ForcePreview.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ForcePreview/ForcePreview.php
@@ -11,7 +11,7 @@
1212 $wgExtensionCredits['other'][] = array(
1313 'path' => __FILE__,
1414 'name' => 'Force Preview',
15 - 'version' => '1.1',
 15+ 'version' => '1.2',
1616 'author' => 'Ryan Schmidt',
1717 #'description' => 'Force preview for unprivelaged users',
1818 'descriptionmsg' => 'forcepreview-desc',
@@ -29,7 +29,7 @@
3030
3131 function efForcePreview( &$editpage, &$buttons ) {
3232 global $wgUser;
33 - if( !$wgUser->isAllowed( 'forcepreviewexempt' ) && !$editpage->preview ) {
 33+ if( !$wgUser->isAllowed( 'forcepreviewexempt' ) && !$editpage->preview && empty($editpage->save) ) {
3434 wfLoadExtensionMessages( 'ForcePreview' );
3535 $buttons['save'] = str_replace( '/>', 'disabled="disabled" />', $buttons['save'] );
3636 $buttons['save'] = preg_replace( '/value="' . wfMsg('savearticle') . '"/i', 'value="' . wfMsg('forcepreview') . '"', $buttons['save'] );

Status & tagging log