return $wgCaptcha;
}
- static function confirmEdit( &$editPage, $newtext, $section ) {
+ static function confirmEdit( $editPage, $newtext, $section ) {
return self::getInstance()->confirmEdit( $editPage, $newtext, $section );
}
- static function confirmEditMerged( &$editPage, $newtext ) {
+ static function confirmEditMerged( $editPage, $newtext ) {
return self::getInstance()->confirmEditMerged( $editPage, $newtext );
}
*/
function isIPWhitelisted() {
global $wgCaptchaWhitelistIP;
- if( !empty( $wgCaptchaWhitelistIP ) ) {
+ if( $wgCaptchaWhitelistIP ) {
$ip = wfGetIp();
foreach ( $wgCaptchaWhitelistIP as $range ) {
if ( IP::isInRange( $ip, $range ) ) {
}
global $wgCaptchaRegexes;
- if( !empty( $wgCaptchaRegexes ) ) {
+ if( $wgCaptchaRegexes ) {
// Custom regex checks
$oldtext = $this->loadText( $editPage, $section );
* Backend function for confirmEdit() and confirmEditAPI()
* @return bool false if the CAPTCHA is rejected, true otherwise
*/
- private function doConfirmEdit( &$editPage, $newtext, $section, $merged = false ) {
+ private function doConfirmEdit( $editPage, $newtext, $section, $merged = false ) {
if( $this->shouldCheck( $editPage, $newtext, $section, $merged ) ) {
if( $this->passCaptcha() ) {
return true;
* @param bool $merged
* @return bool true to continue saving, false to abort and show a captcha form
*/
- function confirmEdit( &$editPage, $newtext, $section, $merged = false ) {
+ function confirmEdit( $editPage, $newtext, $section, $merged = false ) {
if( defined('MW_API') ) {
# API mode
# The CAPTCHA was already checked and approved
* @param EditPage $editPage
* @param string $newtext
*/
- function confirmEditMerged( &$editPage, $newtext ) {
+ function confirmEditMerged( $editPage, $newtext ) {
return $this->confirmEdit( $editPage, $newtext, false, true );
}