From 724817139dc5dd456fbbdb1620aadd0b1e6bdd7e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Sep 2017 19:49:07 +0200 Subject: [PATCH] Start remove $GLOBALS --- .../canvas/default/actions_adherentcard_default.class.php | 5 +++-- .../canvas/default/actions_contactcard_default.class.php | 5 +++-- htdocs/product/canvas/product/actions_card_product.class.php | 5 +++-- htdocs/product/canvas/service/actions_card_service.class.php | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index 7e0b1291998..451f46f899f 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -76,6 +76,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon */ function assign_values(&$action, $id) { + global $limit, $offset, $sortfield, $sortorder; global $conf, $db, $langs, $user; global $form; @@ -114,14 +115,14 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon if ($action == 'list') { - $this->LoadListDatas($GLOBALS['limit'], $GLOBALS['offset'], $GLOBALS['sortfield'], $GLOBALS['sortorder']); + $this->LoadListDatas($limit, $offset, $sortfield, $sortorder); } } /** - * Fetch datas list + * Fetch datas list and save into ->list_datas * * @param int $limit Limit number of responses * @param int $offset Offset for first response diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 30a52469da2..bfcb5a21142 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -75,6 +75,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon */ function assign_values(&$action, $id) { + global $limit, $offset, $sortfield, $sortorder; global $conf, $db, $langs, $user; global $form; @@ -113,14 +114,14 @@ class ActionsContactCardDefault extends ActionsContactCardCommon if ($action == 'list') { - $this->LoadListDatas($GLOBALS['limit'], $GLOBALS['offset'], $GLOBALS['sortfield'], $GLOBALS['sortorder']); + $this->LoadListDatas($limit, $offset, $sortfield, $sortorder); } } /** - * Fetch datas list + * Fetch datas list and save into ->list_datas * * @param int $limit Limit number of responses * @param int $offset Offset for first response diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index 53442d94d39..e33d1e10fd9 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -74,6 +74,7 @@ class ActionsCardProduct */ function assign_values(&$action, $id=0, $ref='') { + global $limit, $offset, $sortfield, $sortorder; global $conf, $langs, $user, $mysoc, $canvas; global $form, $formproduct; @@ -250,7 +251,7 @@ class ActionsCardProduct if ($action == 'list') { - $this->LoadListDatas($GLOBALS['limit'], $GLOBALS['offset'], $GLOBALS['sortfield'], $GLOBALS['sortorder']); + $this->LoadListDatas($limit, $offset, $sortfield, $sortorder); } } @@ -309,7 +310,7 @@ class ActionsCardProduct /** - * Fetch datas list + * Fetch datas list and save into ->list_datas * * @param int $limit Limit number of responses * @param int $offset Offset for first response diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 355ecad14c2..171e3960299 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -73,6 +73,7 @@ class ActionsCardService */ function assign_values(&$action, $id=0, $ref='') { + global $limit, $offset, $sortfield, $sortorder; global $conf, $langs, $user, $mysoc, $canvas; global $form, $formproduct; @@ -229,7 +230,7 @@ class ActionsCardService if ($action == 'list') { - $this->LoadListDatas($GLOBALS['limit'], $GLOBALS['offset'], $GLOBALS['sortfield'], $GLOBALS['sortorder']); + $this->LoadListDatas($limit, $offset, $sortfield, $sortorder); } } @@ -287,7 +288,7 @@ class ActionsCardService } /** - * Fetch datas list + * Fetch datas list and save into ->list_datas * * @param int $limit Limit number of responses * @param int $offset Offset for first response