Index: trunk/extensions/MoodBar/ApiQueryMoodBarComments.php |
— | — | @@ -38,14 +38,14 @@ |
39 | 39 | $this->addOption( 'LIMIT', $params['limit'] + 1 ); |
40 | 40 | |
41 | 41 | |
42 | | - if ( isset( $params['myresponse'] ) ) { |
| 42 | + if ( $params['myresponse'] ) { |
43 | 43 | if ( !$wgUser->isAnon() ) { |
44 | 44 | $this->addTables( array( 'moodbar_feedback_response' ) ); |
45 | 45 | $this->addWhere( 'mbf_id=mbfr_mbf_id' ); |
46 | 46 | $this->addWhereFld( 'mbfr_user_id', $wgUser->getId() ); |
47 | 47 | $this->addOption( 'GROUP BY', 'mbf_id' ); |
48 | 48 | } |
49 | | - } elseif ( isset( $params['showunanswered'] ) ) { |
| 49 | + } elseif ( $params['showunanswered'] ) { |
50 | 50 | $this->addTables( array( 'moodbar_feedback_response' ) ); |
51 | 51 | $this->addJoinConds( array( 'moodbar_feedback_response' => array( 'LEFT JOIN', 'mbf_id=mbfr_mbf_id' ) ) ); |
52 | 52 | $this->addWhere( array( 'mbfr_id' => null ) ); |
— | — | @@ -171,8 +171,8 @@ |
172 | 172 | 'user' => array( |
173 | 173 | ApiBase::PARAM_TYPE => 'user', |
174 | 174 | ), |
175 | | - 'myresponse' => null, |
176 | | - 'showunanswered' => null, |
| 175 | + 'myresponse' => false, |
| 176 | + 'showunanswered' => false, |
177 | 177 | 'prop' => array( |
178 | 178 | ApiBase::PARAM_TYPE => array( 'metadata', 'formatted', 'hidden' ), |
179 | 179 | ApiBase::PARAM_DFLT => 'metadata', |