From edab31d2bf4171ef0897d61ba537bd1e17065e13 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Jan 2026 17:58:38 +0100 Subject: [PATCH] Fix regression --- .../core/modules/modExpenseReport.class.php | 2 + htdocs/takepos/admin/other.php | 160 ------------------ 2 files changed, 2 insertions(+), 160 deletions(-) delete mode 100644 htdocs/takepos/admin/other.php diff --git a/htdocs/core/modules/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php index 5294ea4e0d1..d503a83e614 100644 --- a/htdocs/core/modules/modExpenseReport.class.php +++ b/htdocs/core/modules/modExpenseReport.class.php @@ -41,6 +41,8 @@ class modExpenseReport extends DolibarrModules */ public function __construct($db) { + global $conf, $user; // Required by the extrafieldsinexport.inc.php + $this->db = $db; $this->numero = 770; diff --git a/htdocs/takepos/admin/other.php b/htdocs/takepos/admin/other.php deleted file mode 100644 index 7678ef0941b..00000000000 --- a/htdocs/takepos/admin/other.php +++ /dev/null @@ -1,160 +0,0 @@ - - * Copyright (C) 2011-2017 Juanjo Menent - * Copyright (C) 2024 Frédéric France - * - * 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 - * along with this program. If not, see . - */ - -/** - * \file htdocs/takepos/admin/other.php - * \ingroup takepos - * \brief Setup page for TakePos module - */ -require '../../main.inc.php'; // Load $user and permissions -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; - -// If socid provided by ajax company selector -if (GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha')) { - $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ? - $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ? - $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ? -} - -/** - * @var Conf $conf - * @var DoliDB $db - * @var HookManager $hookmanager - * @var Translate $langs - * @var User $user - */ - -// Security check -if (!$user->admin) { - accessforbidden(); -} - -$langs->loadLangs(array("admin", "cashdesk")); - -global $db; - -$sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement"; -$sql .= " WHERE entity IN (".getEntity('c_paiement').")"; -$sql .= " AND active = 1"; -$sql .= " ORDER BY libelle"; -$resql = $db->query($sql); -$paiements = array(); -if ($resql) { - while ($obj = $db->fetch_object($resql)) { - array_push($paiements, $obj); - } -} - - -/* - * Actions - */ - -// Nothing - - -/* - * View - */ - -llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, '', '', '', 'mod-takepos page-admin_other'); - -$linkback = ''.img_picto($langs->trans("GoBack"), 'back', 'class="pictofixedwidth"').''.$langs->trans("GoBack").''; - -print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); -$head = takepos_admin_prepare_head(); - -print dol_get_fiche_head($head, 'other', 'TakePOS', -1, 'cash-register'); -print '
'; - - -// Mode -print '
'; -print ''; -print ''; - -print '
'; - -// Marketplace -print "\n"; -print ''."\n"; -print ''; -print ''; -print ''; - -$url = 'https://www.dolistore.com/45-pos'; - -print ''."\n"; -print ''; -print ''; -print ''; -print ''; - -print "
'.$langs->trans("WebSiteDesc").''.$langs->trans("URL").'
'; -print ''; -print ''; -print ''; -print ''.$langs->trans("DolistorePosCategory").''; -print ''; -print img_picto('', 'url', 'class="pictofixedwidth"'); -print $url.'
\n"; - -print '
'; - -print '
'; - - -print '
'; - -// Support -print "\n"; -print ''."\n"; -print ''; -print ''; -print ''; - -$url = 'https://partners.dolibarr.org'; - -print ''."\n"; -print ''; -print ''; -print ''; -print ''; - -print "
TakePOS Support'.$langs->trans("URL").'
'; -print ''; -print ''; -print 'Dolibarr Preferred Partners'; -print ''; -print img_picto('', 'url', 'class="pictofixedwidth"'); -print $url.'
\n"; - -print '
'; - -print '
'; - -print dol_get_fiche_end(); - - -llxFooter(); -$db->close();