Update api_setup.class.php

This commit is contained in:
ptibogxiv
2019-11-07 17:18:39 +01:00
committed by GitHub
parent a3878d82e9
commit 4145d7c825

View File

@@ -1095,7 +1095,9 @@ class Setup extends DolibarrApi
*/
public function getListOfsocialNetworks($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '')
{
if (empty($conf->global->MAIN_MODULE_SOCIALNETWORKS)) {
global $conf;
if (empty($conf->socialnetworks->enabled)) {
throw new RestException(400, 'API not available: this dictionary is not enabled by setup');
}