Remove unused local variables in API
authorSiebrand Mazeland <siebrand@kitano.nl>
Tue, 8 Mar 2016 07:03:49 +0000 (08:03 +0100)
committerSiebrand Mazeland <siebrand@kitano.nl>
Tue, 8 Mar 2016 15:52:00 +0000 (16:52 +0100)
Change-Id: Ia94ae232308ad47ee88dbd30675cfcbdb6b371ed

includes/api/ApiLogin.php
includes/api/ApiQueryBacklinksprop.php

index a6e6c49..02aae06 100644 (file)
@@ -208,7 +208,6 @@ class ApiLogin extends ApiBase {
 
                        case LoginForm::THROTTLED:
                                $result['result'] = 'Throttled';
-                               $throttle = $this->getConfig()->get( 'PasswordAttemptThrottle' );
                                $result['wait'] = intval( $loginForm->mThrottleWait );
                                break;
 
index 17b51da..5b55332 100644 (file)
@@ -164,22 +164,14 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase {
                        $this->dieContinueUsageIf( count( $cont ) != count( $sortby ) );
                        $where = '';
                        $i = count( $sortby ) - 1;
-                       $cont_ns = 0;
-                       $cont_title = '';
                        foreach ( array_reverse( $sortby, true ) as $field => $type ) {
                                $v = $cont[$i];
                                switch ( $type ) {
                                        case 'ns':
-                                               $cont_ns = (int)$v;
-                                               /* fall through */
                                        case 'int':
                                                $v = (int)$v;
                                                $this->dieContinueUsageIf( $v != $cont[$i] );
                                                break;
-
-                                       case 'title':
-                                               $cont_title = $v;
-                                               /* fall through */
                                        default:
                                                $v = $db->addQuotes( $v );
                                                break;