Update list.php

This commit is contained in:
UT from dolibit 2022-09-07 19:46:00 +02:00 committed by GitHub
parent 31fcfc5aa5
commit 310894bddb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
@ -22,6 +22,8 @@
* \brief Page to list intracomm report
*/
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
@ -30,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
// Load translation files required by the page
$langs->loadLangs(array('intracommreport'));
// Get Parameters
$action = GETPOST('action', 'alpha');
$massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOST('show_files', 'int');
@ -123,6 +126,7 @@ $arrayfields = array(
'i.label' => array('label'=>$langs->trans("Label"), 'checked'=>1),
'i.fk_product_type'=>array('label'=>$langs->trans("Type"), 'checked'=>0, 'enabled'=>(!empty($conf->produit->enabled) && isModEnabled("service"))),
);
/*
// Extra fields
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']))
@ -134,6 +138,7 @@ if (isset($extrafields->attributes[$object->table_element]['label']) && is_array
}
}
*/
$object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -210,6 +215,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
}
*/
// Add fields from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook