mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-12 01:11:15 +00:00
Set READ_LATEST for Revision query.
Change-Id: I3946e2e7bbc7ce1099412dd14b4b38b7f12e7954
This commit is contained in:
parent
d62ab9a98c
commit
cb4cc4695d
|
@ -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