From 2da9cfbbe45404482dd208c32aa8c349acd7987c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 1 Apr 2019 20:25:37 +0200 Subject: [PATCH] Update api_memberstypes.class.php --- htdocs/adherents/class/api_memberstypes.class.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/htdocs/adherents/class/api_memberstypes.class.php b/htdocs/adherents/class/api_memberstypes.class.php index c80a3c3fe6c..1b477fd567c 100644 --- a/htdocs/adherents/class/api_memberstypes.class.php +++ b/htdocs/adherents/class/api_memberstypes.class.php @@ -79,7 +79,6 @@ class MembersTypes extends DolibarrApi * * @param string $sortfield Sort field * @param string $sortorder Sort order - * @param string $nature Nature of type phy, mor or both (for only both not mor or phy only) * @param int $limit Limit for list * @param int $page Page number * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.libelle:like:'SO-%') and (t.subscription:=:'1')" @@ -87,7 +86,7 @@ class MembersTypes extends DolibarrApi * * @throws RestException */ - public function index($sortfield = "t.rowid", $sortorder = 'ASC', $nature = 'all', $limit = 100, $page = 0, $sqlfilters = '') + public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $sqlfilters = '') { global $db, $conf; @@ -100,15 +99,6 @@ class MembersTypes extends DolibarrApi $sql = "SELECT t.rowid"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= ' WHERE t.entity IN ('.getEntity('member_type').')'; - - // Nature - if ($nature != 'all') { - if ($nature == 'both') { - $sql.= ' AND t.morphy IS NULL '; - } else { - $sql.= ' AND (t.morphy IS NULL OR t.morphy = "'.$nature.'")'; - } - } // Add sql filters if ($sqlfilters)