]> ToastFreeware Gitweb - toast/cookiecaptcha.git/blobdiff - ConfirmEdit_body.php
Moving QuestyCaptcha to ConfirmEdit
[toast/cookiecaptcha.git] / ConfirmEdit_body.php
index 57655c681023ea56f4d4290919666a621bee7a3b..991bd6331c4415b56b2bb2dd62a5f5453a022847 100644 (file)
@@ -15,11 +15,11 @@ class ConfirmEditHooks {
                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 );
        }
        
@@ -218,7 +218,7 @@ class SimpleCaptcha {
         */
        function isIPWhitelisted() {
                global $wgCaptchaWhitelistIP;
-               if( !empty( $wgCaptchaWhitelistIP ) ) {
+               if( $wgCaptchaWhitelistIP ) {
                        $ip = wfGetIp();
                        foreach ( $wgCaptchaWhitelistIP as $range ) {
                                if ( IP::isInRange( $ip, $range ) ) {
@@ -349,7 +349,7 @@ class SimpleCaptcha {
                }
 
                global $wgCaptchaRegexes;
-               if( !empty( $wgCaptchaRegexes ) ) {
+               if( $wgCaptchaRegexes ) {
                        // Custom regex checks
                        $oldtext = $this->loadText( $editPage, $section );
 
@@ -467,7 +467,7 @@ class SimpleCaptcha {
         * 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;
@@ -488,7 +488,7 @@ class SimpleCaptcha {
         * @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 
@@ -506,7 +506,7 @@ class SimpleCaptcha {
         * @param EditPage $editPage
         * @param string $newtext
         */
-       function confirmEditMerged( &$editPage, $newtext ) {
+       function confirmEditMerged( $editPage, $newtext ) {
                return $this->confirmEdit( $editPage, $newtext, false, true );
        }