mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-15 20:09:25 +00:00
Merge "Set READ_LATEST for Revision query."
This commit is contained in:
commit
32673fcd64
|
@ -315,8 +315,8 @@ class SimpleCaptcha {
|
|||
|
||||
global $wgCaptchaRegexes;
|
||||
if ( $wgCaptchaRegexes ) {
|
||||
// Custom regex checks
|
||||
$oldtext = $this->loadText( $editPage, $section );
|
||||
// Custom regex checks. Reuse $oldtext if set above.
|
||||
$oldtext = isset( $oldtext ) ? $oldtext : $this->loadText( $editPage, $section );
|
||||
|
||||
foreach ( $wgCaptchaRegexes as $regex ) {
|
||||
$newMatches = array();
|
||||
|
@ -683,7 +683,7 @@ class SimpleCaptcha {
|
|||
* @access private
|
||||
*/
|
||||
function loadText( $editPage, $section ) {
|
||||
$rev = Revision::newFromTitle( $editPage->mTitle );
|
||||
$rev = Revision::newFromTitle( $editPage->mTitle, false, Revision::READ_LATEST );
|
||||
if ( is_null( $rev ) ) {
|
||||
return "";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue