dolibarr/htdocs/categories/traduction.php

370 lines
12 KiB
PHP
Raw Normal View History

2014-04-25 15:17:12 +02:00
<?php
2018-10-27 14:43:12 +02:00
/* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
2015-05-23 18:52:31 +02:00
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
2017-01-22 12:13:32 +01:00
* Copyright (C) 2010-2016 Destailleur Laurent <eldy@users.sourceforge.net>
2015-05-23 18:52:31 +02:00
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
fix ignored phpstan (most of expects string, int given) (#30649) * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan
2024-09-05 16:05:37 +02:00
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
2014-04-25 15:17:12 +02:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* or see https://www.gnu.org/
2014-04-25 15:17:12 +02:00
*/
/**
2022-08-23 20:52:56 +02:00
* \file htdocs/categories/traduction.php
* \ingroup categories
* \brief Page of translation of categories
2014-04-25 15:17:12 +02:00
*/
2022-09-07 20:08:59 +02:00
// Load Dolibarr environment
2014-04-25 15:17:12 +02:00
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
2016-05-21 15:03:02 +02:00
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
2014-04-25 15:17:12 +02:00
add baseline exclude for phpstan (#31632) * add baseline exclude for phpstan * update * update * update * update * update * merge * restore one filter * delete old errors * fix * fix * fix * $moreforfilter can t be empty * fix * enable check * refresh baseline * add phpdoc * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-04 23:53:20 +01:00
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*/
2018-05-27 09:58:23 +02:00
// Load translation files required by the page
$langs->loadLangs(array('categories', 'languages'));
2014-04-25 15:17:12 +02:00
Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448) * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: GETPOST(...,'int') to GETPOSTINT(...) # Fix: GETPOST(...,'int') to GETPOSTINT(...) Converted using Phan plugin * Fix: Update spelling exceptions * Qual: Ignore Phan Notice
2024-02-27 14:05:53 +01:00
$id = GETPOSTINT('id');
2022-08-23 20:52:56 +02:00
$label = GETPOST('label', 'alpha');
2020-09-16 19:39:50 +02:00
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
$langtodelete = GETPOST('langtodelete', 'alpha');
2017-07-25 19:57:51 +02:00
2021-02-23 18:04:37 +01:00
if ($id == '' && $label == '') {
2024-01-20 09:22:38 +01:00
dol_print_error(null, 'Missing parameter id');
2014-04-25 15:17:12 +02:00
exit();
}
$object = new Categorie($db);
$result = $object->fetch($id, $label);
2020-03-20 15:40:46 +01:00
if ($result <= 0) {
2023-12-04 12:01:45 +01:00
dol_print_error($db, $object->error);
exit;
2020-03-20 15:40:46 +01:00
}
2014-04-25 15:17:12 +02:00
$type = $object->type;
2021-02-23 18:04:37 +01:00
if (is_numeric($type)) {
$type = Categorie::$MAP_ID_TO_CODE[(int) $type]; // For backward compatibility
2021-02-23 18:04:37 +01:00
}
2014-04-25 15:17:12 +02:00
2024-08-31 16:17:03 +02:00
// Security check
$result = restrictedArea($user, 'categorie', $id, '&category');
$permissiontoadd = $user->hasRight('categorie', 'creer');
2022-08-23 20:52:56 +02:00
2014-04-25 15:17:12 +02:00
/*
* Actions
*/
2022-08-23 20:52:56 +02:00
$error = 0;
2014-04-25 15:17:12 +02:00
2022-08-23 20:52:56 +02:00
// return to translation view if cancelled
2021-02-23 18:04:37 +01:00
if ($cancel == $langs->trans("Cancel")) {
2014-04-25 15:17:12 +02:00
$action = '';
}
// delete a translation
if ($action == 'delete' && $langtodelete && $user->hasRight('categorie', 'creer')) {
$res = $object->delMultiLangs($langtodelete, $user);
if ($res < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
unset($object->multilangs[$langtodelete]);
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
}
$action = '';
}
2014-04-25 15:17:12 +02:00
2022-08-23 20:52:56 +02:00
// validation of addition
2024-08-31 16:17:03 +02:00
if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $permissiontoadd) {
2014-04-25 15:17:12 +02:00
$object->fetch($id);
$current_lang = $langs->getDefaultLang();
// check parameters
$forcelangprod = GETPOST('forcelangprod', 'alpha');
$libelle = GETPOST('libelle', 'alpha');
$desc = GETPOST('desc', 'restricthtml');
if (empty($forcelangprod)) {
$error++;
$object->errors[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Translation'));
}
if (!$error) {
if (empty($libelle)) {
$error++;
$object->errors[] = $langs->trans('Language_'.$forcelangprod).' : '.$langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Label'));
}
if (!$error) {
2022-08-23 20:52:56 +02:00
// update the object
if ($forcelangprod == $current_lang) {
$object->label = $libelle;
$object->description = dol_htmlcleanlastbr($desc);
2025-02-10 03:51:10 +01:00
$object->update($user);
} else {
$object->multilangs[$forcelangprod]["label"] = $libelle;
$object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr($desc);
}
2022-08-23 20:52:56 +02:00
// save in base / sauvegarde en base
$res = $object->setMultiLangs($user);
2021-02-23 18:04:37 +01:00
if ($res < 0) {
$error++;
}
}
}
if ($error) {
$action = 'add';
setEventMessages($object->error, $object->errors, 'errors');
} else {
$action = '';
}
2014-04-25 15:17:12 +02:00
}
2022-08-23 20:52:56 +02:00
// validation of the edition
2024-08-31 16:17:03 +02:00
if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && $permissiontoadd) {
2014-04-25 15:17:12 +02:00
$object->fetch($id);
$current_lang = $langs->getDefaultLang();
2022-08-23 20:52:56 +02:00
foreach ($object->multilangs as $key => $value) { // recording of new values in the object
$libelle = GETPOST('libelle-'.$key, 'alpha');
$desc = GETPOST('desc-'.$key, 'restricthtml');
if (empty($libelle)) {
$error++;
$object->errors[] = $langs->trans('Language_'.$key).' : '.$langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Label'));
}
if ($key == $current_lang) {
$object->label = $libelle;
$object->description = dol_htmlcleanlastbr($desc);
} else {
$object->multilangs[$key]["label"] = $libelle;
$object->multilangs[$key]["description"] = dol_htmlcleanlastbr($desc);
2014-04-25 15:17:12 +02:00
}
}
if (!$error) {
$res = $object->setMultiLangs($user);
2021-02-23 18:04:37 +01:00
if ($res < 0) {
$error++;
}
}
if ($error) {
$action = 'edit';
setEventMessages($object->error, $object->errors, 'errors');
} else {
$action = '';
}
2014-04-25 15:17:12 +02:00
}
/*
* View
*/
2022-08-23 20:52:56 +02:00
$form = new Form($db);
$formadmin = new FormAdmin($db);
2016-05-21 15:03:02 +02:00
$formother = new FormOther($db);
2014-04-25 15:17:12 +02:00
2020-05-26 14:43:50 +02:00
llxHeader("", "", $langs->trans("Translation"));
2020-04-12 00:37:05 +02:00
$title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
2014-04-25 15:17:12 +02:00
$head = categories_prepare_head($object, $type);
2017-01-22 12:13:32 +01:00
// Calculate $cnt_trans
$cnt_trans = 0;
2021-02-23 18:04:37 +01:00
if (!empty($object->multilangs)) {
foreach ($object->multilangs as $key => $value) {
$cnt_trans++;
}
2017-01-22 12:13:32 +01:00
}
2020-10-22 22:50:03 +02:00
print dol_get_fiche_head($head, 'translation', $langs->trans($title), -1, 'category');
2014-04-25 15:17:12 +02:00
2021-03-14 15:06:40 +01:00
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type));
$linkback = '<a href="'.dol_sanitizeUrl($backtolist).'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = 'type:=:'.((int) $object->type);
2017-01-22 12:13:32 +01:00
$object->ref = $object->label;
$morehtmlref = '<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
2016-05-21 14:51:33 +02:00
$ways = $object->print_all_ways(" &gt;&gt; ", '', 1);
2020-05-26 14:43:50 +02:00
foreach ($ways as $way) {
$morehtmlref .= $way."<br>\n";
}
$morehtmlref .= '</div>';
2017-01-22 12:13:32 +01:00
dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type='.$type, 0, '', '', 1);
2017-01-22 12:13:32 +01:00
print '<br>';
2017-04-05 14:48:24 +02:00
print '<div class="fichecenter">';
2017-01-22 12:13:32 +01:00
print '<div class="underbanner clearboth"></div>';
2020-05-26 14:43:50 +02:00
print '<table class="border centpercent tableforfield">';
// Description
2017-01-22 12:13:32 +01:00
print '<tr><td class="titlefield notopnoleft">';
print $langs->trans("Description").'</td><td>';
print dol_htmlentitiesbr($object->description);
print '</td></tr>';
2016-05-21 15:03:02 +02:00
// Color
print '<tr><td class="notopnoleft">';
print $langs->trans("Color").'</td><td>';
print $formother->showColor($object->color);
print '</td></tr>';
2014-04-25 15:17:12 +02:00
print '</table>';
2017-04-05 14:48:24 +02:00
print '</div>';
2014-04-25 15:17:12 +02:00
2020-10-27 18:19:31 +01:00
print dol_get_fiche_end();
2017-01-22 12:13:32 +01:00
2021-03-16 04:22:55 +01:00
/*
* Action bar
*/
2022-08-23 20:52:56 +02:00
2017-01-22 12:13:32 +01:00
print "\n<div class=\"tabsAction\">\n";
2021-02-23 18:04:37 +01:00
if ($action == '') {
2023-06-19 23:05:59 +02:00
if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) {
2021-09-27 12:24:01 +02:00
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=add&token='.newToken().'&id='.$object->id.'&type='.$type.'">'.$langs->trans('Add').'</a>';
2021-02-23 18:04:37 +01:00
if ($cnt_trans > 0) {
2021-09-27 12:24:01 +02:00
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&id='.$object->id.'&type='.$type.'">'.$langs->trans('Update').'</a>';
2021-02-23 18:04:37 +01:00
}
}
2017-01-22 12:13:32 +01:00
}
print "\n</div>\n";
2021-02-23 18:04:37 +01:00
if ($action == 'edit') {
2022-08-23 20:52:56 +02:00
// WYSIWYG Editor
2014-04-25 15:17:12 +02:00
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
2014-04-25 15:17:12 +02:00
print '<input type="hidden" name="action" value="vedit">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="type" value="'.$type.'">';
2014-04-25 15:17:12 +02:00
2021-02-23 18:04:37 +01:00
if (!empty($object->multilangs)) {
foreach ($object->multilangs as $key => $value) {
print "<br><b><u>".$langs->trans('Language_'.$key)." :</u></b><br>";
2019-11-05 21:24:41 +01:00
print '<table class="border centpercent">';
// Label
$libelle = (GETPOST('libelle-'.$key, 'alpha') ? GETPOST('libelle-'.$key, 'alpha') : ($object->multilangs[$key]['label'] ?? ''));
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle-'.$key.'" size="40" value="'.$libelle.'"></td></tr>';
2022-08-23 21:18:42 +02:00
// Desc
$desc = (GETPOST('desc-'.$key) ? GETPOST('desc-'.$key) : ($object->multilangs[$key]['description'] ?? ''));
2016-05-21 15:03:02 +02:00
print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>';
2024-05-28 23:52:33 +02:00
$doleditor = new DolEditor("desc-$key", $desc, '', 160, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
2014-04-25 15:17:12 +02:00
$doleditor->Create();
print '</td></tr>';
2016-08-29 10:32:00 +02:00
2014-04-25 15:17:12 +02:00
print '</tr>';
print '</table>';
}
}
2017-07-25 19:57:51 +02:00
2017-01-22 12:13:32 +01:00
print '<br>';
2017-07-25 19:57:51 +02:00
print $form->buttonsSaveCancel();
2014-04-25 15:17:12 +02:00
print '</form>';
2021-02-23 18:04:37 +01:00
} elseif ($action != 'add') {
if ($cnt_trans) {
print '<div class="underbanner clearboth"></div>';
}
if (!empty($object->multilangs)) {
foreach ($object->multilangs as $key => $value) {
fix ignored phpstan (most of expects string, int given) (#30649) * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan
2024-09-05 16:05:37 +02:00
$s = picto_from_langcode((string) $key);
2019-11-05 21:24:41 +01:00
print '<table class="border centpercent">';
print '<tr class="liste_titre"><td colspan="2">'.($s ? $s.' ' : '')." <b>".$langs->trans('Language_'.$key).":</b> ".'<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&langtodelete='.$key.'&type='.$type.'">'.img_delete('', '').'</a></td></tr>';
print '<tr><td class="titlefield">'.$langs->trans('Label').'</td><td>'.($object->multilangs[$key]["label"] ?? '').'</td></tr>';
print '<tr><td>'.$langs->trans('Description').'</td><td>'.($object->multilangs[$key]["description"] ?? '').'</td></tr>';
2023-11-27 11:39:32 +01:00
if (getDolGlobalString('CATEGORY_USE_OTHER_FIELD_IN_TRANSLATION')) {
print '<tr><td>'.$langs->trans('Other').' ('.$langs->trans("NotYetAvailable").')</td><td>'.($object->multilangs[$key]["other"] ?? '').'</td></tr>';
2017-01-22 12:13:32 +01:00
}
2014-04-25 15:17:12 +02:00
print '</table>';
}
}
2021-02-23 18:04:37 +01:00
if (!$cnt_trans && $action != 'add') {
print '<div class="opacitymedium">'.$langs->trans('NoTranslation').'</div>';
}
2014-04-25 15:17:12 +02:00
}
/*
* Form to add a new translation
*/
2023-06-19 23:05:59 +02:00
if ($action == 'add' && ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer'))) {
2014-04-25 15:17:12 +02:00
//WYSIWYG Editor
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
print '<br>';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
2014-04-25 15:17:12 +02:00
print '<input type="hidden" name="action" value="vadd">';
2016-12-18 13:21:09 +01:00
print '<input type="hidden" name="id" value="'.$id.'">';
print '<input type="hidden" name="type" value="'.$type.'">';
2014-04-25 15:17:12 +02:00
2019-11-05 21:24:41 +01:00
print '<table class="border centpercent">';
2017-01-22 12:13:32 +01:00
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('Translation').'</td><td>';
print $formadmin->select_language(GETPOST('forcelangprod', 'alpha'), 'forcelangprod', 0, $object->multilangs);
2014-04-25 15:17:12 +02:00
print '</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td>';
print '<td><input name="libelle" class="minwidth200 maxwidth300" value="'.GETPOST('libelle', 'alpha').'"></td></tr>';
2017-01-22 12:13:32 +01:00
print '<tr><td>'.$langs->trans('Description').'</td><td>';
2024-05-28 23:52:33 +02:00
$doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
2014-04-25 15:17:12 +02:00
$doleditor->Create();
print '</td></tr>';
print '</tr>';
print '</table>';
print $form->buttonsSaveCancel();
2014-04-25 15:17:12 +02:00
print '</form>';
print '<br>';
}
2018-07-29 13:40:35 +02:00
// End of page
2014-04-25 15:17:12 +02:00
llxFooter();
$db->close();