Index: trunk/extensions/PlayerStatsGrabber/PlayerStatsGrabber_body.php |
— | — | @@ -161,9 +161,7 @@ |
162 | 162 | global $wgRequest, $psLogEveryPlayRequestPerUser; |
163 | 163 | // do the insert into the userPlayerStats table: |
164 | 164 | $dbr =& wfGetDB( DB_READ ); |
165 | | - if ( !isset( $wgRequest->data['cs'] ) || !is_array( $wgRequest->data['cs'] ) ) { |
166 | | - $wgRequest->data['cs'] = array(); |
167 | | - } |
| 165 | + $cs = $wgRequest->getArray( 'cs', array() ); |
168 | 166 | // set up insert array: |
169 | 167 | $insAry = array( |
170 | 168 | 'user_hash' => $wgRequest->getVal( 'uh' ), |
— | — | @@ -174,19 +172,13 @@ |
175 | 173 | //'b_os' => $wgRequest->getVal( 'b_os' ), |
176 | 174 | 'flash_version' => $wgRequest->getVal( 'fv' ), |
177 | 175 | 'java_version' => $wgRequest->getVal( 'jv' ), |
178 | | - 'html5_video_enabled' => ( in_array( 'videoElement', $wgRequest->data['cs'] ) ) ? true:false, |
179 | | - 'java_enabled' => ( in_array( 'cortado', $wgRequest->data['cs'] ) ) ? true:false, |
180 | | - 'totem_enabled' => ( in_array( 'totem', $wgRequest->data['cs'] ) ) ? true:false, |
181 | | - 'flash_enabled' => ( in_array( 'flash', $wgRequest->data['cs'] ) ) ? true:false, |
182 | | - 'quicktime_enabled' => ( in_array( array( 'quicktime-mozilla', 'quicktime-activex' ), |
183 | | - $wgRequest->data['cs'] ) |
184 | | - ) ? true:false, |
185 | | - 'vlc_enabled' => ( in_array( array( 'vlc-mozilla', 'vlc-activex' ), |
186 | | - $wgRequest->data['cs'] ) |
187 | | - ) ? true:false, |
188 | | - 'mplayer_enabled' => ( in_array( 'mplayerplug-in', |
189 | | - $wgRequest->data['cs'] ) |
190 | | - ) ? true:false |
| 176 | + 'html5_video_enabled' => in_array( 'videoElement', $cs ), |
| 177 | + 'java_enabled' => in_array( 'cortado', $cs ), |
| 178 | + 'totem_enabled' => in_array( 'totem', $cs ), |
| 179 | + 'flash_enabled' => in_array( 'flash', $cs ), |
| 180 | + 'quicktime_enabled' => in_array( array( 'quicktime-mozilla', 'quicktime-activex' ), $cs ), |
| 181 | + 'vlc_enabled' => in_array( array( 'vlc-mozilla', 'vlc-activex' ), $cs ), |
| 182 | + 'mplayer_enabled' => in_array( 'mplayerplug-in', $cs ), |
191 | 183 | ); |
192 | 184 | // check for user hash (don't collect multiple times for the same user) |
193 | 185 | // $user_hash = |