dolibarr 21.0.0-beta
actions_changeselectedfields.inc.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 * or see https://www.gnu.org/
18 */
19
26// $action must be defined
27// $db must be defined
28// $conf must be defined
29// $object must be defined (object is loaded in this file with fetch)
39// Save selection
40if (GETPOST('formfilteraction', 'alphanohtml') == 'listafterchangingselectedfields') {
41 $tabparam = array();
42
43 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
44
45 if (GETPOST("selectedfields")) {
46 $tabparam["MAIN_SELECTEDFIELDS_".$varpage] = GETPOST("selectedfields");
47 } else {
48 $tabparam["MAIN_SELECTEDFIELDS_".$varpage] = '';
49 }
50
51 include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
52
53 $result = dol_set_user_param($db, $conf, $user, $tabparam);
54
55 //$action='list';
56 //var_dump($tabparam);exit;
57}
dol_set_user_param($db, $conf, &$user, $tab)
Save personal parameter.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79