Bug 203521 - Fix a bug that cannot unhide a platform.
Summary: Fix a bug that cannot unhide a platform.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: dewei_zhu
Keywords: InRadar
Depends on:
Reported: 2019-10-28 14:26 PDT by dewei_zhu
Modified: 2019-10-28 14:35 PDT (History)
2 users (show)

See Also:

Patch (1.65 KB, patch)
2019-10-28 14:28 PDT, dewei_zhu
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dewei_zhu 2019-10-28 14:26:03 PDT
Fix a bug that cannot unhide a platform.
Comment 1 dewei_zhu 2019-10-28 14:28:24 PDT
Created attachment 382107 [details]
Comment 2 dewei_zhu 2019-10-28 14:30:02 PDT
Comment 3 Ryosuke Niwa 2019-10-28 14:35:36 PDT
Comment on attachment 382107 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=382107&action=review

> Websites/perf.webkit.org/public/admin/platforms.php:62
> -            || update_field('platforms', 'platform', 'hidden'))
> +            || update_field('platforms', 'platform', 'hidden', Database::to_database_boolean(array_get($_POST, 'hidden'))))

Can we add a helper function like update_boolean_field and do this work there?
It's kind of silly to specify the updated field name twice.