X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Fapistatusnetconfig.php;h=771a95baec6e4d1f7603c7506b09e8a3a819e806;hb=fb315c6f618d8b1635442c70964f7ab14e53385e;hp=66b23c02d5db082be206395eaa9788e3db0f9220;hpb=800b33590696e85480aa73c25261d80f1926e56d;p=quix0rs-gnu-social.git diff --git a/actions/apistatusnetconfig.php b/actions/apistatusnetconfig.php index 66b23c02d5..771a95baec 100644 --- a/actions/apistatusnetconfig.php +++ b/actions/apistatusnetconfig.php @@ -46,7 +46,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class ApiStatusnetConfigAction extends ApiAction { var $keys = array( @@ -69,9 +68,7 @@ class ApiStatusnetConfigAction extends ApiAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ - function prepare($args) { parent::prepare($args); @@ -85,7 +82,6 @@ class ApiStatusnetConfigAction extends ApiAction * * @return void */ - function handle($args) { parent::handle($args); @@ -103,9 +99,9 @@ class ApiStatusnetConfigAction extends ApiAction $value = common_config($section, $setting); if (is_array($value)) { $value = implode(',', $value); - } else if ($value === false) { + } else if ($value === false || $value == '0') { $value = 'false'; - } else if ($value === true) { + } else if ($value === true || $value == '1') { $value = 'true'; } @@ -138,6 +134,7 @@ class ApiStatusnetConfigAction extends ApiAction break; default: $this->clientError( + // TRANS: Client error displayed when trying to handle an unknown API method. _('API method not found.'), 404, $this->format @@ -155,11 +152,8 @@ class ApiStatusnetConfigAction extends ApiAction * * @return boolean is read only action? */ - function isReadOnly($args) { return true; } - } -