Making WordPress.org


Ignore:
Timestamp:
09/21/2017 08:23:28 PM (9 years ago)
Author:
coffee2code
Message:

Browse Happy API: Properly attribute platform for Android instead of as 'Linux'.

Fixes lone remaining failing unit test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php

    r5951 r5952  
    4343        ) ) {
    4444                $data['platform'] = $regs['platform'];
     45        }
     46
     47        // Properly set platform if Android is actually being reported.
     48        if ( 'Linux' === $data['platform'] && false !== strpos( $user_agent, 'Android' ) ) {
     49                $data['platform'] = 'Android';
    4550        }
    4651
Note: See TracChangeset for help on using the changeset viewer.