Bug 203521

Summary: Fix a bug that cannot unhide a platform.
Product: WebKit Reporter: dewei_zhu
Component: New BugsAssignee: dewei_zhu
Status: NEW ---    
Severity: Normal CC: dewei_zhu, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch rniwa: review+

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]
Patch
Comment 2 dewei_zhu 2019-10-28 14:30:02 PDT
<rdar://problem/43784654>
Comment 3 Ryosuke Niwa 2019-10-28 14:35:36 PDT
Comment on attachment 382107 [details]
Patch

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.