Expose string->bool conversion as function
authorStanislav Malyshev <smalyshev@gmail.com>
Tue, 31 Oct 2017 21:01:02 +0000 (14:01 -0700)
committerSmalyshev <smalyshev@wikimedia.org>
Wed, 15 Nov 2017 06:57:40 +0000 (06:57 +0000)
commit194acaa0e02b584e8e3f5fe8434b1fe4cbb801de
tree43a4d40d7229a4d53e4a29c93ac1833314f19156
parent4acbbf097291d8b0e63700aa9bf500c3f8de1627
Expose string->bool conversion as function

There is code in several places in extensions which converts
setting or parameter string (such as "true", "yes", "false", "no")
to boolean. Since we already have the code that does in global
functions in wfStringToBool(), it makes sense to expose this code
and reuse it.

Change-Id: I88d98b012ff4bf14fd64a05a9135a6e75cf2d4e7
includes/GlobalFunctions.php
tests/phpunit/includes/GlobalFunctions/wfStringToBoolTest.php [new file with mode: 0644]