Index: trunk/extensions/Survey/api/ApiQuerySurveys.php |
— | — | @@ -56,7 +56,10 @@ |
57 | 57 | $this->addWhere( array( 'survey_name' => $params['names'] ) ); |
58 | 58 | } |
59 | 59 | |
60 | | - if ( isset( $params['enabled'] ) ) { |
| 60 | + if ( !$GLOBALS['wgUser']->isAllowed( 'surveyadmin' ) ) { |
| 61 | + $this->addWhere( array( 'survey_enabled' => 1 ) ); |
| 62 | + } |
| 63 | + else if ( isset( $params['enabled'] ) ) { |
61 | 64 | $this->addWhere( array( 'survey_enabled' => $params['enabled'] ) ); |
62 | 65 | } |
63 | 66 | |