Skip to content

Commit

Permalink
Merge branch 'develop' into qual/fixandenabledeprecatealias
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Mar 8, 2024
2 parents 1a2303d + 9a281ed commit 7c0464f
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 16 deletions.
12 changes: 10 additions & 2 deletions htdocs/adherents/class/api_members.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,12 @@ public function delete($id)
private function _validate($data)
{
$member = array();
foreach (Members::$FIELDS as $field) {

$mandatoryfields = array(
'morphy',
'typeid'
);
foreach ($mandatoryfields as $field) {
if (!isset($data[$field])) {
throw new RestException(400, "$field field missing");
}
Expand Down Expand Up @@ -857,7 +862,10 @@ public function deleteType($id)
private function _validateType($data)
{
$membertype = array();
foreach (MembersTypes::$FIELDS as $field) {

$mandatoryfields = array('label');

foreach ($mandatoryfields as $field) {
if (!isset($data[$field])) {
throw new RestException(400, "$field field missing");
}
Expand Down
2 changes: 0 additions & 2 deletions htdocs/comm/propal/class/propal.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,6 @@ class Propal extends CommonObject
*/
public function __construct($db, $socid = 0, $propalid = 0)
{
global $conf, $langs;

$this->db = $db;

$this->socid = $socid;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/contact/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
$search_categ = GETPOSTINT("search_categ");
$search_categ_thirdparty = GETPOSTINT("search_categ_thirdparty");
$search_categ_supplier = GETPOSTINT("search_categ_supplier");
$search_status = GETPOSTINT("search_status");
$search_status = GETPOST("search_status", "intcomma");
$search_type = GETPOST('search_type', 'alpha');
$search_address = GETPOST('search_address', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/company.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
$sortorder = GETPOST('sortorder', 'aZ09comma');
$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");

$search_status = GETPOSTINT("search_status");
$search_status = GETPOST("search_status", "intcomma");
if ($search_status == '') {
$search_status = 1; // always display active customer first
}
Expand Down
1 change: 1 addition & 0 deletions htdocs/modulebuilder/template/myobject_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@
$search[$key.'_dtend'] = '';
}
}
$search_all = '';
$toselect = array();
$search_array_options = array();
}
Expand Down
12 changes: 6 additions & 6 deletions htdocs/product/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';

$type = GETPOSTINT("type");
$type = GETPOST("type", 'intcomma');
if ($type == '' && !$user->hasRight('produit', 'lire') && $user->hasRight('service', 'lire')) {
$type = '1'; // Force global page on service page only
}
Expand Down Expand Up @@ -69,15 +69,15 @@
$transAreaType = $langs->trans("ProductsAndServicesArea");

$helpurl = '';
if (!isset($_GET["type"])) {
if (!GETPOSTISSET("type")) {
$transAreaType = $langs->trans("ProductsAndServicesArea");
$helpurl = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
}
if ((isset($_GET["type"]) && $_GET["type"] == 0) || !isModEnabled("service")) {
if ((GETPOSTISSET("type") && GETPOST("type") == '0') || !isModEnabled("service")) {
$transAreaType = $langs->trans("ProductsArea");
$helpurl = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
}
if ((isset($_GET["type"]) && $_GET["type"] == 1) || !isModEnabled("product")) {
if ((GETPOSTISSET("type") && GETPOST("type") == '1') || !isModEnabled("product")) {
$transAreaType = $langs->trans("ServicesArea");
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
}
Expand Down Expand Up @@ -310,10 +310,10 @@

if ($num > 0) {
$transRecordedType = $langs->trans("LastModifiedProductsAndServices", $max);
if (isset($_GET["type"]) && $_GET["type"] == 0) {
if (GETPOSTISSET("type") && GETPOST("type") == '0') {
$transRecordedType = $langs->trans("LastRecordedProducts", $max);
}
if (isset($_GET["type"]) && $_GET["type"] == 1) {
if (GETPOSTISSET("type") && GETPOST("type") == '1') {
$transRecordedType = $langs->trans("LastRecordedServices", $max);
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/product/stock/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
$search_ref = GETPOST("sref", "alpha") ? GETPOST("sref", "alpha") : GETPOST("search_ref", "alpha");
$search_label = GETPOST("snom", "alpha") ? GETPOST("snom", "alpha") : GETPOST("search_label", "alpha");
$search_status = GETPOSTINT("search_status");
$search_status = GETPOST("search_status", "intcomma");

$search_category_list = array();
if (isModEnabled('category')) {
Expand Down
8 changes: 5 additions & 3 deletions htdocs/societe/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
$search_type_thirdparty = GETPOSTINT("search_type_thirdparty");
$search_price_level = GETPOSTINT('search_price_level');
$search_staff = GETPOSTINT("search_staff");
$search_status = GETPOSTINT("search_status");
$search_status = GETPOST("search_status", 'intcomma');
$search_type = GETPOST('search_type', 'alpha');
$search_level = GETPOST("search_level", "array:alpha");
$search_stcomm = GETPOST('search_stcomm', "array:int");
Expand Down Expand Up @@ -446,6 +446,8 @@
$search_level = '';
$search_parent_name = '';
$search_import_key = '';

$search_all = '';
$toselect = array();
$search_array_options = array();
}
Expand All @@ -472,8 +474,8 @@
}
}

if ($search_status == '') {
$search_status = 1; // always display active thirdparty first
if ($search_status == '' && empty($search_all)) {
$search_status = 1; // display active thirdparty only by default
}


Expand Down

0 comments on commit 7c0464f

Please sign in to comment.