Qual: Fix phan notices (public-2)

This commit is contained in:
MDW 2025-02-12 00:52:24 +01:00
parent f352a68150
commit 3b1200df77
No known key found for this signature in database
17 changed files with 158 additions and 133 deletions

View File

@ -9,18 +9,17 @@
*/
return [
// # Issue statistics:
// PhanTypeMismatchArgument : 1810+ occurrences
// PhanTypeMismatchArgument : 1790+ occurrences
// PhanUndeclaredProperty : 510+ occurrences
// PhanTypeMismatchArgumentNullable : 360+ occurrences
// PhanPluginUnknownArrayMethodReturnType : 170+ occurrences
// PhanUndeclaredGlobalVariable : 170+ occurrences
// PhanTypeMismatchProperty : 130+ occurrences
// PhanTypeMismatchProperty : 120+ occurrences
// PhanPluginUnknownArrayMethodParamType : 110+ occurrences
// PhanPossiblyUndeclaredGlobalVariable : 85+ occurrences
// PhanTypeMismatchArgumentProbablyReal : 85+ occurrences
// PhanTypeMismatchArgumentProbablyReal : 80+ occurrences
// PhanPossiblyUndeclaredGlobalVariable : 75+ occurrences
// PhanTypeExpectedObjectPropAccess : 40+ occurrences
// PhanTypeInvalidDimOffset : 25+ occurrences
// PhanRedefineFunction : 20+ occurrences
// PhanTypeMismatchDimFetch : 20+ occurrences
// PhanPluginUndeclaredVariableIsset : 15+ occurrences
// PhanUndeclaredConstant : 15+ occurrences
@ -29,6 +28,7 @@ return [
// PhanTypeComparisonFromArray : 8 occurrences
// PhanPluginDuplicateExpressionBinaryOp : 6 occurrences
// PhanPluginUnknownObjectMethodCall : 6 occurrences
// PhanRedefineFunction : 6 occurrences
// PhanTypeArraySuspiciousNull : 6 occurrences
// PhanParamTooMany : 5 occurrences
// PhanPluginDuplicateArrayKey : 4 occurrences
@ -39,7 +39,6 @@ return [
// PhanEmptyForeach : 2 occurrences
// PhanPluginEmptyStatementIf : 2 occurrences
// PhanTypeMismatchDimAssignment : 2 occurrences
// PhanTypeMismatchDimFetchNullable : 2 occurrences
// PhanTypeSuspiciousStringExpression : 2 occurrences
// PhanAccessMethodProtected : 1 occurrence
// PhanPluginDuplicateExpressionAssignmentOperation : 1 occurrence
@ -620,22 +619,12 @@ return [
'htdocs/public/members/new.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/public/payment/newpayment.php' => ['PhanUndeclaredProperty'],
'htdocs/public/payment/paymentok.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
'htdocs/public/project/index.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
'htdocs/public/project/new.php' => ['PhanRedefineFunction'],
'htdocs/public/project/suggestbooth.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgument', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/public/project/suggestconference.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgument', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
'htdocs/public/recruitment/view.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
'htdocs/public/stripe/ipn.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'],
'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'],
'htdocs/public/ticket/list.php' => ['PhanTypeMismatchArgument'],
'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/public/project/index.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/public/project/suggestbooth.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/public/project/suggestconference.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/public/project/viewandvote.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/public/recruitment/view.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/public/webportal/webportal.main.inc.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgument'],
'htdocs/public/website/index.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgument'],
'htdocs/public/website/javascript.js.php' => ['PhanRedefineFunction'],
'htdocs/public/website/styles.css.php' => ['PhanRedefineFunction'],
'htdocs/reception/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/reception/class/api_receptions.class.php' => ['PhanTypeMismatchArgumentNullable'],
'htdocs/reception/class/reception.class.php' => ['PhanUndeclaredProperty'],

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -99,8 +99,8 @@ trait CommonPeople
* Return full name (civility+' '+name+' '+lastname)
*
* @param Translate $langs Language object for translation of civility (used only if option is 1)
* @param int $option 0=No option, 1=Add civility
* @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname, 3=Firstname if defined else lastname, 4=Lastname, 5=Lastname if defined else firstname
* @param int<0,1> $option 0=No option, 1=Add civility
* @param int<-1,5> $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname, 3=Firstname if defined else lastname, 4=Lastname, 5=Lastname if defined else firstname
* @param int $maxlen Maximum length
* @return string String with full name
*/

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2021 Dorian Vabre <dorian.vabre@gmail.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -111,6 +112,8 @@ if (empty($conf->project->enabled)) {
/**
* Show header for new member
*
* Note: also called by functions.lib:recordNotFound
*
* @param string $title Title
* @param string $head Head array
* @param int $disablejs More content into html header
@ -119,7 +122,7 @@ if (empty($conf->project->enabled)) {
* @param string[]|string $arrayofcss Array of complementary css files
* @return void
*/
function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = []) // @phan-suppress-current-line PhanRedefineFunction
{
global $conf, $langs, $mysoc;
@ -168,9 +171,11 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
/**
* Show footer for new member
*
* Note: also called by functions.lib:recordNotFound
*
* @return void
*/
function llxFooterVierge()
function llxFooterVierge() // @phan-suppress-current-line PhanRedefineFunction
{
print '</div>';

View File

@ -6,7 +6,7 @@
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -98,6 +98,8 @@ if (empty($conf->project->enabled)) {
/**
* Show header for new member
*
* Note: also called by functions.lib:recordNotFound
*
* @param string $title Title
* @param string $head Head array
* @param int $disablejs More content into html header
@ -106,7 +108,7 @@ if (empty($conf->project->enabled)) {
* @param string[]|string $arrayofcss Array of complementary css files
* @return void
*/
function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = []) // @phan-suppress-current-line PhanRedefineFunction
{
global $conf, $langs, $mysoc;
@ -154,9 +156,11 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
/**
* Show footer for new member
*
* Note: also called by functions.lib:recordNotFound
*
* @return void
*/
function llxFooterVierge()
function llxFooterVierge() // @phan-suppress-current-line PhanRedefineFunction
{
print '</div>';

View File

@ -125,6 +125,8 @@ if (empty($conf->eventorganization->enabled)) {
/**
* Show header for new member
*
* Note: also called by functions.lib:recordNotFound
*
* @param string $title Title
* @param string $head Head array
* @param int $disablejs More content into html header
@ -133,7 +135,7 @@ if (empty($conf->eventorganization->enabled)) {
* @param string[]|string $arrayofcss Array of complementary css files
* @return void
*/
function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = []) // @phan-suppress-current-line PhanRedefineFunction
{
global $conf, $langs, $mysoc;
@ -181,9 +183,11 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
/**
* Show footer for new member
*
* Note: also called by functions.lib:recordNotFound
*
* @return void
*/
function llxFooterVierge()
function llxFooterVierge() // @phan-suppress-current-line PhanRedefineFunction
{
print '</div>';
@ -331,7 +335,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he
// Adding supplier tag and tag from setup to thirdparty
$category = new Categorie($db);
$resultcategory = $category->fetch(getDolGlobalString('EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH'));
$resultcategory = $category->fetch(getDolGlobalInt('EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH'));
if ($resultcategory <= 0) {
$error++;
@ -433,7 +437,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he
$facture = null;
if (!empty((float) $project->price_booth)) {
$productforinvoicerow = new Product($db);
$resultprod = $productforinvoicerow->fetch(getDolGlobalString('SERVICE_BOOTH_LOCATION'));
$resultprod = $productforinvoicerow->fetch(getDolGlobalInt('SERVICE_BOOTH_LOCATION'));
if ($resultprod < 0) {
$error++;
$errmsg .= $productforinvoicerow->error;
@ -516,7 +520,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he
// Get email content from template
$arraydefaultmessage = null;
$labeltouse = getDolGlobalString('EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH');
$labeltouse = getDolGlobalInt('EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH');
if (!empty($labeltouse)) {
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $labeltouse, 1, '');
}
@ -699,7 +703,7 @@ print '</td></tr>';
if (!getDolGlobalString('SOCIETE_DISABLE_STATE')) {
print '<tr><td>'.$langs->trans('State').'</td><td>';
if ($country_code) {
print $formcompany->select_state(GETPOST("state_id"), $country_code);
print $formcompany->select_state(GETPOSTINT("state_id"), $country_code);
} else {
print '';
}

View File

@ -126,6 +126,8 @@ if (empty($conf->eventorganization->enabled)) {
/**
* Show header for new member
*
* Note: also called by functions.lib:recordNotFound
*
* @param string $title Title
* @param string $head Head array
* @param int $disablejs More content into html header
@ -134,7 +136,7 @@ if (empty($conf->eventorganization->enabled)) {
* @param string[]|string $arrayofcss Array of complementary css files
* @return void
*/
function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = []) // @phan-suppress-current-line PhanRedefineFunction
{
global $conf, $langs, $mysoc;
@ -182,9 +184,11 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
/**
* Show footer for new member
*
* Note: also called by functions.lib:recordNotFound
*
* @return void
*/
function llxFooterVierge()
function llxFooterVierge() // @phan-suppress-current-line PhanRedefineFunction
{
print '</div>';
@ -330,7 +334,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he
// Adding supplier tag and tag from setup to thirdparty
$category = new Categorie($db);
$resultcategory = $category->fetch(getDolGlobalString('EVENTORGANIZATION_CATEG_THIRDPARTY_CONF'));
$resultcategory = $category->fetch(getDolGlobalInt('EVENTORGANIZATION_CATEG_THIRDPARTY_CONF'));
if ($resultcategory <= 0) {
$error++;
@ -446,7 +450,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he
// Get email content from template
$arraydefaultmessage = null;
$labeltouse = getDolGlobalString('EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF');
$labeltouse = getDolGlobalInt('EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF');
if (!empty($labeltouse)) {
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $labeltouse, 1, '');
}
@ -635,7 +639,7 @@ print '</td></tr>';
if (!getDolGlobalString('SOCIETE_DISABLE_STATE')) {
print '<tr><td>'.$langs->trans('State').'</td><td>';
if ($country_code) {
print $formcompany->select_state(GETPOST("state_id"), $country_code);
print $formcompany->select_state(GETPOSTINT("state_id"), $country_code);
} else {
print '';
}

View File

@ -178,6 +178,7 @@ $idvote = GETPOSTINT("vote");
$hashedvote = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'vote'.$idvote);
if ($idvote > 0) {
$votestatus = 'err';
if (in_array($hashedvote, $listofvotes)) {
// Has already voted
$votestatus = 'ko';

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -363,7 +363,7 @@ if (empty($emailforcontact)) {
}
}
print '<b class="wordbreak">';
print $tmpuser->getFullName(-1);
print $tmpuser->getFullName($langs);
print ' &nbsp; '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0, 'envelope');
print '</b>';
print '</b><br>';

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2018-2020 Thibault FOUCART <support@ptibogxiv.net>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -96,7 +96,7 @@ if (empty($endpoint_secret)) {
if (getDolGlobalString('STRIPE_USER_ACCOUNT_FOR_ACTIONS')) {
// We set the user to use for all ipn actions in Dolibarr
$user = new User($db);
$user->fetch(getDolGlobalString('STRIPE_USER_ACCOUNT_FOR_ACTIONS'));
$user->fetch(getDolGlobalInt('STRIPE_USER_ACCOUNT_FOR_ACTIONS'));
$user->loadRights();
} else {
httponly_accessforbidden('Error: Setup of module Stripe not complete for mode '.dol_escape_htmltag($service).'. The STRIPE_USER_ACCOUNT_FOR_ACTIONS is not defined.', 400, 1);
@ -252,13 +252,13 @@ if ($event->type == 'payout.created' && getDolGlobalString('STRIPE_AUTO_RECORD_P
$db->begin();
if (!$error) {
$bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, -1 * (float) price2num($amount), '', '', $user);
$bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, -1 * (float) price2num($amount), '', 0, $user);
}
if (!($bank_line_id_from > 0)) {
$error++;
}
if (!$error) {
$bank_line_id_to = $accountto->addline($dateo, $typeto, $label, price2num($amount), '', '', $user);
$bank_line_id_to = $accountto->addline($dateo, $typeto, $label, (float) price2num($amount), '', 0, $user);
}
if (!($bank_line_id_to > 0)) {
$error++;
@ -367,12 +367,12 @@ if ($event->type == 'payout.created' && getDolGlobalString('STRIPE_AUTO_RECORD_P
$obj = $db->fetch_object($result);
if ($obj) {
if ($obj->type == 'ban') {
$pdid = $obj->rowid;
$directdebitorcreditransfer_id = $obj->fk_prelevement_bons;
if ($obj->traite == 1) {
// This is a direct-debit with an order (llx_bon_prelevement) ALREADY generated, so
// it means we received here the confirmation that payment request is finished.
$pdid = $obj->rowid;
$invoice_id = $obj->fk_facture;
$directdebitorcreditransfer_id = $obj->fk_prelevement_bons;
$payment_amountInDolibarr = $obj->amount;
$paymentTypeCodeInDolibarr = $obj->type;
@ -382,9 +382,9 @@ if ($event->type == 'payout.created' && getDolGlobalString('STRIPE_AUTO_RECORD_P
}
}
if ($obj->type == 'card' || empty($obj->type)) {
$pdid = $obj->rowid;
if ($obj->traite == 0) {
// This is a card payment not already flagged as sent to Stripe.
$pdid = $obj->rowid;
$invoice_id = $obj->fk_facture;
$payment_amountInDolibarr = $obj->amount;
$paymentTypeCodeInDolibarr = empty($obj->type) ? 'card' : $obj->type;
@ -827,7 +827,7 @@ if ($event->type == 'payout.created' && getDolGlobalString('STRIPE_AUTO_RECORD_P
$amountdisputestripe = $object->amoutndispute; // In stripe format
$amountdispute = $amountdisputestripe; // In real currency format
$invoice_id = "";
$invoice_id = 0;
$paymentTypeCode = ""; // payment type according to Stripe
$paymentTypeCodeInDolibarr = ""; // payment type according to Dolibarr
$payment_amount = 0;
@ -861,7 +861,7 @@ if ($event->type == 'payout.created' && getDolGlobalString('STRIPE_AUTO_RECORD_P
$payment_amountInDolibarr = $obj->amount;
$paymentTypeCodeInDolibarr = empty($obj->type) ? 'card' : $obj->type;
dol_syslog("Found the payment intent for card in database (pdid = ".$pdid." directdebitorcreditransfer_id=".$directdebitorcreditransfer_id.")");
dol_syslog("Found the payment intent for card in database (pdid = ".$pdid.")");
}
} else {
dol_syslog("Payment intent ".$TRANSACTIONID." not found into database, so ignored.");

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -201,7 +202,7 @@ $sortfield = 'aaa';
$sortorder = 'ASC';
$tasksarray = array(1, 2, 3); // To force having several lines
$tagidfortablednd = 'tablelines3';
if (!isset($moreforfilter)) {
if (!isset($moreforfilter)) { // @phan-suppress-current-line PhanPluginUndeclaredVariableIsset
$moreforfilter = '';
}
if (!empty($conf->use_javascript_ajax)) {
@ -228,7 +229,7 @@ if ($socid) {
if (isset($showbirthday) && $showbirthday) {
$nav .= '<input type="hidden" name="showbirthday" value="1">';
}
if (isset($pid) && $pid) {
if (isset($pid) && $pid) { // @phan-suppress-current-line PhanPluginUndeclaredVariableIsset
$nav .= '<input type="hidden" name="projectid" value="'.$pid.'">';
}
if ($type) {

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -153,12 +153,13 @@ if (empty($reshook)) {
$upload_dir_tmp = $vardir.'/temp/'.session_id();
// TODO Delete only files that was uploaded from form
dol_remove_file_process(GETPOST('removedfile'), 0, 0);
dol_remove_file_process(GETPOSTINT('removedfile'), 0, 0);
$action = 'create_ticket';
}
if ($action == 'create_ticket' && GETPOST('save', 'alpha')) { // Test on permission not required. This is a public form. Security is managed by mitigation.
$error = 0;
$cid = -1;
$origin_email = GETPOST('email', 'email');
if (empty($origin_email)) {
$error++;
@ -166,16 +167,18 @@ if (empty($reshook)) {
$action = '';
} else {
// Search company saved with email
$searched_companies = $object->searchSocidByEmail($origin_email, '0');
$searched_companies = $object->searchSocidByEmail($origin_email, 0);
// Chercher un contact existent avec cette address email
// Le premier contact trouvé est utilisé pour déterminer le contact suivi
$contacts = $object->searchContactByEmail($origin_email);
if (!is_array($contacts)) {
$contacts = array();
}
// Ensure that contact is active and select first active contact
$cid = -1;
foreach ($contacts as $key => $contact) {
if ((int) $contact->statut == 1) {
if ((int) $contact->status == 1) {
$cid = $key;
break;
}
@ -195,7 +198,7 @@ if (empty($reshook)) {
$contact_phone = '';
if ($with_contact) {
// set linked contact to add in form
if (is_array($contacts) && count($contacts) == 1) {
if (/* is_array($contacts) && */ count($contacts) == 1) {
$with_contact = current($contacts);
}
@ -309,7 +312,7 @@ if (empty($reshook)) {
if ($result < 0) {
$error++;
$errors = ($company->error ? array($company->error) : $company->errors);
array_push($object->errors, $errors);
$object->errors = array_merge($object->errors, $errors);
$action = 'create_ticket';
}
@ -324,7 +327,7 @@ if (empty($reshook)) {
if ($result < 0) {
$error++;
$errors = ($with_contact->error ? array($with_contact->error) : $with_contact->errors);
array_push($object->errors, $errors);
$object->errors = array_merge($object->errors, $errors);
$action = 'create_ticket';
} else {
$contacts = array($with_contact);
@ -336,7 +339,7 @@ if (empty($reshook)) {
$object->fk_soc = $searched_companies[0]->id;
}
if (is_array($contacts) && count($contacts) > 0 && $cid >= 0) {
if (/* is_array($contacts) && */ count($contacts) > 0 && $cid >= 0) {
$object->fk_soc = $contacts[$cid]->socid;
$usertoassign = $contacts[$cid]->id;
}
@ -363,7 +366,9 @@ if (empty($reshook)) {
if ($id <= 0) {
$error++;
$errors = ($object->error ? array($object->error) : $object->errors);
array_push($object->errors, $object->error ? array($object->error) : $object->errors);
if ($object->error) {
array_push($object->errors, $object->error);
}
$action = 'create_ticket';
}
}
@ -421,8 +426,8 @@ if (empty($reshook)) {
$sendtocc = '';
$deliveryreceipt = 0;
if (getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO') !== '') {
$old_MAIN_MAIL_AUTOCOPY_TO = getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO');
$old_MAIN_MAIL_AUTOCOPY_TO = getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO');
if ($old_MAIN_MAIL_AUTOCOPY_TO !== '') {
$conf->global->MAIN_MAIL_AUTOCOPY_TO = '';
}
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
@ -432,7 +437,7 @@ if (empty($reshook)) {
} else {
$result = $mailfile->sendfile();
}
if (getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO') !== '') {
if ($old_MAIN_MAIL_AUTOCOPY_TO !== '') {
$conf->global->MAIN_MAIL_AUTOCOPY_TO = $old_MAIN_MAIL_AUTOCOPY_TO;
}
@ -464,8 +469,8 @@ if (empty($reshook)) {
$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' <' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
$replyto = $from;
if (getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO') !== '') {
$old_MAIN_MAIL_AUTOCOPY_TO = getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO');
$old_MAIN_MAIL_AUTOCOPY_TO = getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO');
if ($old_MAIN_MAIL_AUTOCOPY_TO !== '') {
$conf->global->MAIN_MAIL_AUTOCOPY_TO = '';
}
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
@ -475,7 +480,7 @@ if (empty($reshook)) {
} else {
$result = $mailfile->sendfile();
}
if ((getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO') !== '')) {
if ($old_MAIN_MAIL_AUTOCOPY_TO !== '') {
$conf->global->MAIN_MAIL_AUTOCOPY_TO = $old_MAIN_MAIL_AUTOCOPY_TO;
}
}

View File

@ -1,8 +1,7 @@
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2013-2016 Jean-François FERRY <jfefe@aternatik.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*/
/* Copyright (C) 2013-2016 Jean-François FERRY <jfefe@aternatik.fr>
*
* 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
@ -253,25 +252,25 @@ if ($action == "view_ticketlist") {
// Definition of fields for list
$arrayfields = array(
't.datec' => array('label' => $langs->trans("Date"), 'checked' => 1),
't.date_read' => array('label' => $langs->trans("TicketReadOn"), 'checked' => 0),
't.date_close' => array('label' => $langs->trans("TicketCloseOn"), 'checked' => 0),
't.ref' => array('label' => $langs->trans("Ref"), 'checked' => 1),
//'t.track_id' => array('label' => $langs->trans("IDTracking"), 'checked' => 0),
't.fk_statut' => array('label' => $langs->trans("Status"), 'checked' => 1),
't.subject' => array('label' => $langs->trans("Subject"), 'checked' => 1),
'type.code' => array('label' => $langs->trans("Type"), 'checked' => 1),
'category.code' => array('label' => $langs->trans("Category"), 'checked' => 1),
'severity.code' => array('label' => $langs->trans("Severity"), 'checked' => 1),
't.progress' => array('label' => $langs->trans("Progression"), 'checked' => 0),
//'t.fk_contract' => array('label' => $langs->trans("Contract"), 'checked' => 0),
't.fk_user_create' => array('label' => $langs->trans("Author"), 'checked' => 1),
't.fk_user_assign' => array('label' => $langs->trans("AssignedTo"), 'checked' => 0),
't.datec' => array('label' => $langs->trans("Date"), 'checked' => '1'),
't.date_read' => array('label' => $langs->trans("TicketReadOn"), 'checked' => '0'),
't.date_close' => array('label' => $langs->trans("TicketCloseOn"), 'checked' => '0'),
't.ref' => array('label' => $langs->trans("Ref"), 'checked' => '1'),
//'t.track_id' => array('label' => $langs->trans("IDTracking"), 'checked' => '0'),
't.fk_statut' => array('label' => $langs->trans("Status"), 'checked' => '1'),
't.subject' => array('label' => $langs->trans("Subject"), 'checked' => '1'),
'type.code' => array('label' => $langs->trans("Type"), 'checked' => '1'),
'category.code' => array('label' => $langs->trans("Category"), 'checked' => '1'),
'severity.code' => array('label' => $langs->trans("Severity"), 'checked' => '1'),
't.progress' => array('label' => $langs->trans("Progression"), 'checked' => '0'),
//'t.fk_contract' => array('label' => $langs->trans("Contract"), 'checked' => '0'),
't.fk_user_create' => array('label' => $langs->trans("Author"), 'checked' => '1'),
't.fk_user_assign' => array('label' => $langs->trans("AssignedTo"), 'checked' => '0'),
//'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(isModEnabled('multicompany') && empty($conf->multicompany->transverse_mode))),
//'t.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => 0, 'position' => 500),
//'t.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => 0, 'position' => 2)
//'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
//'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked' => '1', 'enabled'=>(isModEnabled('multicompany') && empty($conf->multicompany->transverse_mode))),
//'t.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => '0', 'position' => 500),
//'t.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => '0', 'position' => 2)
//'t.statut'=>array('label'=>$langs->trans("Status"), 'checked' => '1', 'position'=>1000),
);
if (!getDolGlobalString('TICKET_SHOW_PROGRESSION')) {
@ -284,7 +283,7 @@ if ($action == "view_ticketlist") {
if ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate') {
$enabled = abs((int) dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1, 1, '2'));
$enabled = (($enabled == 0 || $enabled == 3) ? 0 : $enabled);
$arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => ($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1, 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' => $enabled && $extrafields->attributes[$object->table_element]['perms'][$key]);
$arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => ($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? '0' : '1', 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' => (string) (int) ($enabled && $extrafields->attributes[$object->table_element]['perms'][$key]));
}
}
}

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 Benjamin Falière <benjamin.faliere@altairis.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -103,9 +104,9 @@ if ($cancel) {
$action = 'view_ticket';
}
$display_ticket = false;
if (in_array($action, array("view_ticket", "presend", "close", "confirm_public_close", "add_message", "add_contact"))) { // Test on permission not required here. Done later by using the $track_id + check email in session
$error = 0;
$display_ticket = false;
if (!strlen($track_id)) {
$error++;
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketTrackId")));
@ -124,7 +125,7 @@ if (in_array($action, array("view_ticket", "presend", "close", "confirm_public_c
}
if (!$error) {
$ret = $object->fetch('', '', $track_id);
$ret = $object->fetch(0, '', $track_id);
if ($ret && $object->dao->id > 0) {
// Check if emails provided is the one of author
$emailofticket = CMailFile::getValidAddress($object->dao->origin_email, 2);
@ -404,7 +405,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
$baseurl = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.'/public/ticket/');
$formticket->param = array('track_id' => $object->dao->track_id, 'fk_user_create' => '-1',
'returnurl' => $baseurl.'view.php'.(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:''));
'returnurl' => $baseurl.'view.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : ''));
$formticket->withfile = 2;
$formticket->withcancel = 1;
@ -415,7 +416,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
if ($action != 'presend') {
$baseurl = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.'/public/ticket/');
print '<form method="POST" id="form_view_ticket_list" name="form_view_ticket_list" action="'.$baseurl.'list.php'.(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'">';
print '<form method="POST" id="form_view_ticket_list" name="form_view_ticket_list" action="'.$baseurl.'list.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="view_ticketlist">';
print '<input type="hidden" name="track_id" value="'.$object->dao->track_id.'">';

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2023-2024 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2023-2024 Lionel Vessiller <lvessiller@easya.solutions>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -57,7 +57,7 @@ if (!function_exists('dol_getprefix')) {
* @param string $mode '' (prefix for session name) or 'email' (prefix for email id)
* @return string A calculated prefix
*/
function dol_getprefix($mode = '')
function dol_getprefix($mode = '') // @phan-suppress-current-line PhanRedefineFunction
{
global $dolibarr_main_instance_unique_id,
$dolibarr_main_cookie_cryptkey; // This is loaded by filefunc.inc.php
@ -225,7 +225,7 @@ if (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->access
$result = $logged_user->fetch($user_id);
if ($result <= 0) {
$error++;
$error_msg = $langs->transnoentitiesnoconv('WebPortalErrorFetchLoggedUser', $user_id);
$error_msg = $langs->transnoentitiesnoconv('WebPortalErrorFetchLoggedUser', (string) $user_id);
dol_syslog($error_msg, LOG_ERR);
$context->setEventMessages($error_msg, null, 'errors');
}
@ -237,7 +237,7 @@ if (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->access
if (!$logged_thirdparty || !($logged_thirdparty->id > 0)) {
$result = $websiteaccount->fetch_thirdparty();
if ($result < 0) {
$error_msg = $langs->transnoentitiesnoconv('WebPortalErrorFetchLoggedThirdParty', $websiteaccount->fk_soc);
$error_msg = $langs->transnoentitiesnoconv('WebPortalErrorFetchLoggedThirdParty', (string) $websiteaccount->fk_soc);
//dol_syslog("Can't load third-party (ID: ".$websiteaccount->fk_soc.") even if session logged.", LOG_ERR);
dol_syslog($error_msg, LOG_ERR);
$context->setEventMessage($error_msg, 'errors');
@ -253,7 +253,7 @@ if (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->access
$result = $logged_member->fetch(0, '', $websiteaccount->thirdparty->id);
if ($result < 0) {
$error++;
$error_msg = $langs->transnoentitiesnoconv('WebPortalErrorFetchLoggedMember', $websiteaccount->thirdparty->id);
$error_msg = $langs->transnoentitiesnoconv('WebPortalErrorFetchLoggedMember', (string) $websiteaccount->thirdparty->id);
dol_syslog($error_msg, LOG_ERR);
$context->setEventMessage($error_msg, 'errors');
}
@ -265,7 +265,7 @@ if (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->access
$result = $logged_partnership->fetch(0, '', $logged_member->id, $websiteaccount->thirdparty->id);
if ($result < 0) {
$error++;
$error_msg = $langs->transnoentitiesnoconv('WebPortalErrorFetchLoggedPartnership', $websiteaccount->thirdparty->id, $logged_member->id);
$error_msg = $langs->transnoentitiesnoconv('WebPortalErrorFetchLoggedPartnership', (string) $websiteaccount->thirdparty->id, (string) $logged_member->id);
dol_syslog($error_msg, LOG_ERR);
$context->setEventMessage($error_msg, 'errors');
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -60,35 +60,39 @@ if (!defined('NOBROWSERNOTIF')) {
/**
* Header empty
*
* Note: also called by functions.lib:recordNotFound
*
* @param string $head Optional head lines
* @param string $title HTML title
* @param string $help_url Url links to help page
* Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage|DE:GermanPage
* For other external page: http://server/url
* @param string $target Target to use on links
* @param int $disablejs More content into html header
* @param int $disablehead More content into html header
* @param int<0,1> $disablejs More content into html header
* @param int<0,1> $disablehead More content into html header
* @param string[]|string $arrayofjs Array of complementary js files
* @param string[]|string $arrayofcss Array of complementary css files
* @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails)
* @param string $morecssonbody More CSS on body tag. For example 'classforhorizontalscrolloftabs'.
* @param string $replacemainareaby Replace call to main_area() by a print of this string
* @param int $disablenofollow Disable the "nofollow" on meta robot header
* @param int $disablenoindex Disable the "noindex" on meta robot header
* @param int<0,1> $disablenofollow Disable the "nofollow" on meta robot header
* @param int<0,1> $disablenoindex Disable the "noindex" on meta robot header
* @return void
*/
function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0, $disablenoindex = 0)
function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0, $disablenoindex = 0) // @phan-suppress-current-line PhanRedefineFunction
{
}
/**
* Footer empty
*
* @param string $comment A text to add as HTML comment into HTML generated page
* @param string $zone 'private' (for private pages) or 'public' (for public pages)
* @param int $disabledoutputofmessages Clear all messages stored into session without displaying them
* Note: also called by functions.lib:recordNotFound
*
* @param string $comment A text to add as HTML comment into HTML generated page
* @param 'private'|'public' $zone 'private' (for private pages) or 'public' (for public pages)
* @param int<0,1> $disabledoutputofmessages Clear all messages stored into session without displaying them
* @return void
*/
function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = 0)
function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = 0) // @phan-suppress-current-line PhanRedefineFunction
{
}
@ -131,13 +135,13 @@ if (empty($pageid)) {
if ($pageref) {
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$result = $objectpage->fetch(0, $object->id, $pageref);
$result = $objectpage->fetch(0, (string) $object->id, $pageref);
if ($result > 0) {
$pageid = $objectpage->id;
} elseif ($result == 0) {
// Page not found from ref=pageurl, we try using alternative alias
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$result = $objectpage->fetch(0, $object->id, null, $pageref);
$result = $objectpage->fetch(0, (string) $object->id, null, $pageref);
if ($result > 0) {
$pageid = $objectpage->id;
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2016-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -51,35 +51,39 @@ if (!defined('NOBROWSERNOTIF')) {
/**
* Header empty
*
* Note: also called by functions.lib:recordNotFound
*
* @param string $head Optional head lines
* @param string $title HTML title
* @param string $help_url Url links to help page
* Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage|DE:GermanPage
* For other external page: http://server/url
* @param string $target Target to use on links
* @param int $disablejs More content into html header
* @param int $disablehead More content into html header
* @param int<0,1> $disablejs More content into html header
* @param int<0,1> $disablehead More content into html header
* @param string[]|string $arrayofjs Array of complementary js files
* @param string[]|string $arrayofcss Array of complementary css files
* @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails)
* @param string $morecssonbody More CSS on body tag. For example 'classforhorizontalscrolloftabs'.
* @param string $replacemainareaby Replace call to main_area() by a print of this string
* @param int $disablenofollow Disable the "nofollow" on meta robot header
* @param int $disablenoindex Disable the "noindex" on meta robot header
* @param int<0,1> $disablenofollow Disable the "nofollow" on meta robot header
* @param int<0,1> $disablenoindex Disable the "noindex" on meta robot header
* @return void
*/
function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0, $disablenoindex = 0)
function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0, $disablenoindex = 0) // @phan-suppress-current-line PhanRedefineFunction
{
}
/**
* Footer empty
*
* @param string $comment A text to add as HTML comment into HTML generated page
* @param string $zone 'private' (for private pages) or 'public' (for public pages)
* @param int $disabledoutputofmessages Clear all messages stored into session without displaying them
* Note: also called by functions.lib:recordNotFound
*
* @param string $comment A text to add as HTML comment into HTML generated page
* @param 'private'|'public' $zone 'private' (for private pages) or 'public' (for public pages)
* @param int<0,1> $disabledoutputofmessages Clear all messages stored into session without displaying them
* @return void
*/
function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = 0)
function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = 0) // @phan-suppress-current-line PhanRedefineFunction
{
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -51,35 +51,39 @@ if (!defined('NOBROWSERNOTIF')) {
/**
* Header empty
*
* Note: also called by functions.lib:recordNotFound
*
* @param string $head Optional head lines
* @param string $title HTML title
* @param string $help_url Url links to help page
* Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage|DE:GermanPage
* For other external page: http://server/url
* @param string $target Target to use on links
* @param int $disablejs More content into html header
* @param int $disablehead More content into html header
* @param int<0,1> $disablejs More content into html header
* @param int<0,1> $disablehead More content into html header
* @param string[]|string $arrayofjs Array of complementary js files
* @param string[]|string $arrayofcss Array of complementary css files
* @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails)
* @param string $morecssonbody More CSS on body tag. For example 'classforhorizontalscrolloftabs'.
* @param string $replacemainareaby Replace call to main_area() by a print of this string
* @param int $disablenofollow Disable the "nofollow" on meta robot header
* @param int $disablenoindex Disable the "noindex" on meta robot header
* @param int<0,1> $disablenofollow Disable the "nofollow" on meta robot header
* @param int<0,1> $disablenoindex Disable the "noindex" on meta robot header
* @return void
*/
function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0, $disablenoindex = 0)
function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0, $disablenoindex = 0) // @phan-suppress-current-line PhanRedefineFunction
{
}
/**
* Footer empty
*
* @param string $comment A text to add as HTML comment into HTML generated page
* @param string $zone 'private' (for private pages) or 'public' (for public pages)
* @param int $disabledoutputofmessages Clear all messages stored into session without displaying them
* Note: also called by functions.lib:recordNotFound
*
* @param string $comment A text to add as HTML comment into HTML generated page
* @param 'private'|'public' $zone 'private' (for private pages) or 'public' (for public pages)
* @param int<0,1> $disabledoutputofmessages Clear all messages stored into session without displaying them
* @return void
*/
function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = 0)
function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = 0) // @phan-suppress-current-line PhanRedefineFunction
{
}