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;
|
global $wgCaptchaRegexes;
|
||||||
if ( $wgCaptchaRegexes ) {
|
if ( $wgCaptchaRegexes ) {
|
||||||
// Custom regex checks
|
// Custom regex checks. Reuse $oldtext if set above.
|
||||||
$oldtext = $this->loadText( $editPage, $section );
|
$oldtext = isset( $oldtext ) ? $oldtext : $this->loadText( $editPage, $section );
|
||||||
|
|
||||||
foreach ( $wgCaptchaRegexes as $regex ) {
|
foreach ( $wgCaptchaRegexes as $regex ) {
|
||||||
$newMatches = array();
|
$newMatches = array();
|
||||||
|
@ -683,7 +683,7 @@ class SimpleCaptcha {
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function loadText( $editPage, $section ) {
|
function loadText( $editPage, $section ) {
|
||||||
$rev = Revision::newFromTitle( $editPage->mTitle );
|
$rev = Revision::newFromTitle( $editPage->mTitle, false, Revision::READ_LATEST );
|
||||||
if ( is_null( $rev ) ) {
|
if ( is_null( $rev ) ) {
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue