Merge branch 'develop' into new-resource-full-address

This commit is contained in:
William Mead 2024-01-16 16:55:46 +01:00
commit 94a8df4f50
182 changed files with 3755 additions and 2838 deletions

View file

@ -49,8 +49,10 @@ repos:
hooks:
- id: php-cbf
files: \.(php)$
args: [-p]
args: [--standard=dev/setup/codesniffer/ruleset.xml -p]
- id: php-cs
files: \.(php)$
args: [--standard=dev/setup/codesniffer/ruleset.xml -p]
- id: php-lint
# Prettier (format code, only for non common files)

View file

@ -42,7 +42,7 @@ PrestaShop-WS-Lib 94feb5f OSL-3.0 No
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
Sabre 4.0.2 BSD Yes DAV support
Sabre 4.6.0 BSD Yes DAV support
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP
Symfony/var-dumper ??? MIT License Yes Library to make var dump (used by DebugBar)
Stripe 10.7.0 MIT Licence Yes Library for Stripe module

View file

@ -1,19 +1,40 @@
--- HOW TO USE COMPOSER
* Switch to the minimal version of PHP
update-alternatives --config php
* To list packages
composer show -i
cd htdocs/includes/diroflib
composer install
composer show -i
* To test upgrade of a lib with composer:
* To upgrade a lib with composer using the composer.json of the library only:
Remove entry in composer.lock
Edit composer.json to change version to "x.y.z"
composer -v update --root-reqs --no-dev --no-autoloader --dry-run ccampbell/chromephp
* To upgrade a lib with composer:
cd htdocs/includes/diroflib
rm composer.lock
Edit composer.json to change version to "x.y.z"
composer -v update --root-reqs --no-dev --ignore-platform-reqs
composer -v update --root-reqs --no-dev --ignore-platform-reqs [--no-autoloader] [--dry-run] ccampbell/chromephp
* To upgrade a lib with composer using the composer.json of Dolibarr:
Remove entry in composer.lock
cd /
mv composer.json.disabled composer.json
rm composer.lock
Edit composer.json to change version to "x.y.z"
composer -v update --root-reqs --no-dev --no-autoloader ccampbell/chromephp
composer -v update --root-reqs --no-dev --ignore-platform-reqs
composer -v update --root-reqs --no-dev --ignore-platform-reqs [--no-autoloader] [--dry-run] ccampbell/chromephp

View file

@ -33,16 +33,9 @@
"tecnickcom/tcpdf" : "6.3.2",
"nnnick/chartjs" : "^3.7.1",
"stripe/stripe-php" : "10.7.0",
"maximebf/debugbar" : "1.18.2",
"symfony/var-dumper" : ">=3.2"
"maximebf/debugbar" : "1.18.2"
},
"require-dev" : {
"php-parallel-lint/php-parallel-lint" : "^0",
"php-parallel-lint/php-console-highlighter" : "^0",
"phpunit/phpunit" : "^4",
"squizlabs/php_codesniffer" : "^2",
"phpunit/phpunit-selenium" : "^2",
"rector/rector" : "^0.16.0"
},
"suggest" : {
"ext-mysqlnd" : "To use with MySQL or MariaDB",
@ -50,7 +43,7 @@
"ext-pgsql" : "To use with PostgreSQL",
"ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
"ext-imagick" : "Generation of thumbs from PDF",
"ext-mcrypt" : "(Required but maybe built-in PHP)",
"ext-intl" : "Intl",
"ext-openssl" : "Secure connections (Emails, SOAP\u2026)",
"ext-mbstring" : "Handle non UTF-8 characters",
"ext-soap" : "Native SOAP",

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -226,7 +226,9 @@ if (empty($reshook)) {
$form = new Form($db);
$formaccounting = new FormAccounting($db);
llxHeader('', $langs->trans("ListAccounts"));
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $langs->trans("ListAccounts"), $help_url);
if ($action == 'delete') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1);

View file

@ -8,7 +8,7 @@
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2011-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
@ -401,7 +401,9 @@ if ($action == 'disable_favorite') {
$form = new Form($db);
$formadmin = new FormAdmin($db);
llxHeader();
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $langs->trans("Pcg_version"), $help_url);
$titre = $langs->trans($tablib[$id]);
$linkback = '';

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
@ -215,7 +215,7 @@ $accountsystem->fetch(getDolGlobalInt('CHARTOFACCOUNTS'));
$title = $langs->trans('AccountAccounting')." - ".$langs->trans('Card');
$help_url = 'EN:Category:Accounting';
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $title, $help_url);

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
* Copyright (C) 2017-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2017-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
@ -113,7 +113,10 @@ if ($action == 'delete') {
$form = new Form($db);
$formaccounting = new FormAccounting($db);
llxHeader('', $langs->trans('AccountingCategory'));
$title= $langs->trans('AccountingCategory');
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $title, $help_url);
$linkback = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/categories_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$titlepicto = 'setup';

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
/* Copyright (C) 2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2024 Alexandre Spangaro <aspangaro@easya.solutions>
*
* 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
@ -414,7 +414,9 @@ if ($action == 'disable_favorite') {
$form = new Form($db);
$formadmin = new FormAdmin($db);
llxHeader('', $langs->trans('DictionaryAccountancyCategory'));
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $langs->trans('DictionaryAccountancyCategory'), $help_url);
$titre = $langs->trans($tablib[$id]);
$linkback = '';

View file

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
/* Copyright (C) 2019-2024 Alexandre Spangaro <aspangaro@easya.solutions>
*
* 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
@ -101,7 +101,11 @@ if ($action == 'update') {
$form = new Form($db);
$formaccounting = new FormAccounting($db);
llxHeader();
$title = $langs->trans('Closure');
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $title, $help_url);
$linkback = '';
print load_fiche_titre($langs->trans('MenuClosureAccounts'), $linkback, 'title_accountancy');

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -198,7 +198,9 @@ if ($action == 'setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT') {
$form = new Form($db);
$formaccounting = new FormAccounting($db);
llxHeader();
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $langs->trans('MenuDefaultAccounts'), $help_url);
$linkback = '';
print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy');

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -134,9 +134,9 @@ if ($action == 'update') {
$form = new Form($db);
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
$title = $langs->trans('ExportOptions');
llxHeader('', $title);
llxHeader('', $title, $help_url);
$linkback = '';
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';

View file

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@easya.solutions>
/* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
*
* 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
@ -87,7 +87,7 @@ $fiscalyearstatic = new Fiscalyear($db);
$title = $langs->trans('AccountingPeriods');
$help_url = "EN:Module_Double_Entry_Accounting";
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $title, $help_url);

View file

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
/* Copyright (C) 2014-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -181,7 +181,7 @@ if ($action == 'create') {
$title = $langs->trans("NewFiscalYear");
}
$help_url = "EN:Module_Double_Entry_Accounting";
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $title, $help_url);

View file

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
/* Copyright (C) 2014-2024 Alexandre Spangaro <aspangaro@easya.solutions>
*
* 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
@ -45,7 +45,7 @@ $id = GETPOST('id', 'int');
$title = $langs->trans("Fiscalyear")." - ".$langs->trans("Info");
$help_url = "EN:Module_Double_Entry_Accounting";
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $title, $help_url);

View file

@ -1,13 +1,13 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2017 Laurent Destailleur <eldy@destailleur.fr>
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2017 Laurent Destailleur <eldy@destailleur.fr>
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@ -275,8 +275,8 @@ if ($action == 'setenablevatreversecharge') {
$form = new Form($db);
$title = $langs->trans('ConfigAccountingExpert');
llxHeader('', $title);
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $title, $help_url);
$linkback = '';

View file

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2017-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
/* Copyright (C) 2017-2024 Alexandre Spangaro <aspangaro@easya.solutions>
*
* 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
@ -351,7 +351,9 @@ if ($action == $acts[1]) {
$form = new Form($db);
$formadmin = new FormAdmin($db);
llxHeader();
$title = $langs->trans('AccountingJournals');
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $title, $help_url);
$titre = $langs->trans("DictionarySetup");
$linkback = '';
@ -367,7 +369,6 @@ print load_fiche_titre($titre, $linkback, $titlepicto);
if ($action == 'delete') {
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
}
//var_dump($elementList);
/*
* Show a dictionary

View file

@ -1,10 +1,10 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.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
@ -296,14 +296,14 @@ $aacompta_prodsell_export = getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_EXPORT
$title = $langs->trans("ProductsBinding");
$helpurl = '';
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
$paramsCat = '';
foreach ($searchCategoryProductList as $searchCategoryProduct) {
$paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct);
}
llxHeader('', $title, $helpurl, '', 0, 0, array(), array(), $paramsCat, '');
llxHeader('', $title, $help_url, '', 0, 0, array(), array(), $paramsCat, '');
$pcgverid = getDolGlobalString('CHARTOFACCOUNTS');
$pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version');

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -126,7 +126,7 @@ $form = new Form($db);
// Page Header
$help_url = 'EN:Module_Double_Entry_Accounting#Setup';
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
$title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger');
llxHeader('', $title, $help_url);

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2016-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -248,7 +248,9 @@ if ($type == 'sub') {
$title_page = $langs->trans("AccountBalance");
}
llxHeader('', $title_page);
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double';
llxHeader('', $title_page, $help_url);
if ($action != 'export_csv') {

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
*
@ -334,8 +334,8 @@ $form = new Form($db);
$formaccounting = new FormAccounting($db);
$title = $langs->trans("CreateMvts");
llxHeader('', $title);
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double';
llxHeader('', $title, $help_url);
// Confirmation to delete the command
if ($action == 'delete') {

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2022 Lionel Vessiller <lvessiller@open-dsi.fr>
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
@ -708,8 +708,9 @@ $arrayofselected = is_array($toselect) ? $toselect : array();
// Output page
// --------------------------------------------------------------------
$help_url ='EN:Module_Double_Entry_Accounting#Exports|FR:Module_Comptabilit&eacute;_en_Partie_Double#Exports';
llxHeader('', $title_page);
llxHeader('', $title_page, $help_url);
$formconfirm = '';

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2022 Lionel Vessiller <lvessiller@open-dsi.fr>
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
@ -711,8 +711,8 @@ $arrayofselected = is_array($toselect) ? $toselect : array();
// Output page
// --------------------------------------------------------------------
llxHeader('', $title_page);
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double';
llxHeader('', $title_page, $help_url);
$formconfirm = '';

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2020 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -559,8 +559,8 @@ if ($type == 'sub') {
$title_page .= $langs->trans("Bookkeeping");
}
$title_page .= ')';
llxHeader('', $title_page);
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double';
llxHeader('', $title_page, $help_url);
// List
$nbtotalofrecords = '';

View file

@ -161,7 +161,7 @@ $formaccounting = new FormAccounting($db);
$title = $langs->trans('Closure');
$help_url ='EN:Module_Double_Entry_Accounting';
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Cl.C3.B4ture_annuelle';
llxHeader('', $title, $help_url);

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
*
* 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
@ -84,8 +84,9 @@ if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
/*
* View
*/
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader("", $langs->trans('FicheVentilation'));
llxHeader("", $langs->trans('FicheVentilation'), $help_url);
if ($cancel == $langs->trans("Cancel")) {
$action = '';

View file

@ -299,8 +299,9 @@ if ($action == 'validatehistory') {
/*
* View
*/
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("CustomersVentilation"));
llxHeader('', $langs->trans("CustomersVentilation"), $help_url);
$textprevyear = '<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current - 1).'">'.img_previous().'</a>';
$textnextyear = '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current + 1).'">'.img_next().'</a>';

View file

@ -175,7 +175,9 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, fd.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched"));
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched"), $help_url);
print '<script type="text/javascript">
$(function () {

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2021 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -230,7 +230,9 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, l.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("Ventilation"));
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("CustomersVentilation"), $help_url);
if (empty($chartaccountcode)) {
print $langs->trans("ErrorChartOfAccountSystemNotSelected");

View file

@ -1,11 +1,11 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 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
@ -88,7 +88,9 @@ if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
/*
* View
*/
llxHeader("", $langs->trans('FicheVentilation'));
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader("", $langs->trans('FicheVentilation'), $help_url);
if ($cancel == $langs->trans("Cancel")) {
$action = '';

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
@ -177,8 +177,9 @@ if ($action == 'validatehistory') {
/*
* View
*/
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("ExpenseReportsVentilation"));
llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url);
$textprevyear = '<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current - 1).'">'.img_previous().'</a>';
$textnextyear = '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current + 1).'">'.img_next().'</a>';

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -165,7 +165,9 @@ if (GETPOST('sortfield') == 'erd.date, erd.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("ExpenseReportsVentilation").' - '.$langs->trans("Dispatched"));
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("ExpenseReportsVentilation").' - '.$langs->trans("Dispatched"), $help_url);
print '<script type="text/javascript">
$(function () {

View file

@ -1,9 +1,9 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
@ -221,7 +221,9 @@ if (GETPOST('sortfield') == 'erd.date, erd.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("ExpenseReportsVentilation"));
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url);
if (empty($chartaccountcode)) {
print $langs->trans("ErrorChartOfAccountSystemNotSelected");

View file

@ -73,7 +73,7 @@ if (GETPOST('addbox')) {
* View
*/
$help_url = 'EN:Module_Double_Entry_Accounting#Setup';
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
llxHeader('', $langs->trans("AccountancyArea"), $help_url);

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -88,7 +88,9 @@ if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
/*
* View
*/
llxHeader("", $langs->trans('FicheVentilation'));
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader("", $langs->trans('FicheVentilation'), $help_url);
if ($cancel == $langs->trans("Cancel")) {
$action = '';

View file

@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2021 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2021 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
*
* 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
@ -297,8 +297,9 @@ if ($action == 'validatehistory') {
/*
* View
*/
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("SuppliersVentilation"));
llxHeader('', $langs->trans("SuppliersVentilation"), $help_url);
$textprevyear = '<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current - 1).'">'.img_previous().'</a>';
$textnextyear = '&nbsp;<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current + 1).'">'.img_next().'</a>';

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@ -180,7 +180,9 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, l.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("SuppliersVentilation").' - '.$langs->trans("Dispatched"));
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("SuppliersVentilation").' - '.$langs->trans("Dispatched"), $help_url);
print '<script type="text/javascript">
$(function () {

View file

@ -1,9 +1,9 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2021 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
@ -232,7 +232,9 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, l.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("SuppliersVentilation"));
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("SuppliersVentilation"), $help_url);
if (empty($chartaccountcode)) {
print $langs->trans("ErrorChartOfAccountSystemNotSelected");

View file

@ -349,41 +349,41 @@ if ($search_title != '') {
if ($search_note != '') {
$param .= '&search_note='.urlencode($search_note);
}
if (GETPOST('datestartday_dtstart', 'int')) {
$param .= '&datestartday_dtstart='.GETPOST('datestartday_dtstart', 'int');
if (GETPOST('datestart_dtstartday', 'int')) {
$param .= '&datestart_dtstartday='.GETPOST('datestart_dtstartday', 'int');
}
if (GETPOST('datestartmonth_dtstart', 'int')) {
$param .= '&datestartmonth_dtstart='.GETPOST('datestartmonth_dtstart', 'int');
if (GETPOST('datestart_dtstartmonth', 'int')) {
$param .= '&datestart_dtstartmonth='.GETPOST('datestart_dtstartmonth', 'int');
}
if (GETPOST('datestartyear_dtstart', 'int')) {
$param .= '&datestartyear_dtstart='.GETPOST('datestartyear_dtstart', 'int');
if (GETPOST('datestart_dtstartyear', 'int')) {
$param .= '&datestart_dtstartyear='.GETPOST('datestart_dtstartyear', 'int');
}
if (GETPOST('datestartday_dtend', 'int')) {
$param .= '&datestartday_dtend='.GETPOST('datestartday_dtend', 'int');
if (GETPOST('datestart_dtendday', 'int')) {
$param .= '&datestart_dtendday='.GETPOST('datestart_dtendday', 'int');
}
if (GETPOST('datestartmonth_dtend', 'int')) {
$param .= '&datestartmonth_dtend='.GETPOST('datestartmonth_dtend', 'int');
if (GETPOST('datestart_dtendmonth', 'int')) {
$param .= '&datestart_dtendmonth='.GETPOST('datestart_dtendmonth', 'int');
}
if (GETPOST('datestartyear_dtend', 'int')) {
$param .= '&datestartyear_dtend='.GETPOST('datestartyear_dtend', 'int');
if (GETPOST('datestart_dtendyear', 'int')) {
$param .= '&datestart_dtendyear='.GETPOST('datestart_dtendyear', 'int');
}
if (GETPOST('dateendday_dtstart', 'int')) {
$param .= '&dateendday_dtstart='.GETPOST('dateendday_dtstart', 'int');
if (GETPOST('dateend_dtstartday', 'int')) {
$param .= '&dateend_dtstartday='.GETPOST('dateend_dtstartday', 'int');
}
if (GETPOST('dateendmonth_dtstart', 'int')) {
$param .= '&dateendmonth_dtstart='.GETPOST('dateendmonth_dtstart', 'int');
if (GETPOST('dateend_dtstartmonth', 'int')) {
$param .= '&dateend_dtstartmonth='.GETPOST('dateend_dtstartmonth', 'int');
}
if (GETPOST('dateendyear_dtstart', 'int')) {
$param .= '&dateendyear_dtstart='.GETPOST('dateendyear_dtstart', 'int');
if (GETPOST('dateend_dtstartyear', 'int')) {
$param .= '&dateend_dtstartyear='.GETPOST('dateend_dtstartyear', 'int');
}
if (GETPOST('dateendday_dtend', 'int')) {
$param .= '&dateendday_dtend='.GETPOST('dateendday_dtend', 'int');
if (GETPOST('dateend_dtendday', 'int')) {
$param .= '&dateend_dtendday='.GETPOST('dateend_dtendday', 'int');
}
if (GETPOST('dateendmonth_dtend', 'int')) {
$param .= '&dateendmonth_dtend='.GETPOST('dateendmonth_dtend', 'int');
if (GETPOST('dateend_dtendmonth', 'int')) {
$param .= '&dateend_dtendmonth='.GETPOST('dateend_dtendmonth', 'int');
}
if (GETPOST('dateendyear_dtend', 'int')) {
$param .= '&dateendyear_dtend='.GETPOST('dateendyear_dtend', 'int');
if (GETPOST('dateend_dtendyear', 'int')) {
$param .= '&dateend_dtendyear='.GETPOST('dateend_dtendyear', 'int');
}
if ($optioncss != '') {
$param .= '&optioncss='.urlencode($optioncss);

View file

@ -169,6 +169,12 @@ class FormAdvTargetEmailing extends Form
if (getDolGlobalString('USER_HIDE_INACTIVE_IN_COMBOBOX')) {
$sql_usr .= " AND u2.statut <> 0";
}
if (!empty($conf->global->USER_HIDE_NONEMPLOYEE_IN_COMBOBOX)) {
$sql_usr .= " AND u2.employee<>0 ";
}
if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) {
$sql_usr .= " AND u2.fk_soc IS NULL ";
}
$sql_usr .= " ORDER BY name ASC";
// print $sql_usr;exit;

View file

@ -2081,6 +2081,12 @@ class Form
if (getDolGlobalString('USER_HIDE_INACTIVE_IN_COMBOBOX') || $notdisabled) {
$sql .= " AND u.statut <> 0";
}
if (!empty($conf->global->USER_HIDE_NONEMPLOYEE_IN_COMBOBOX) || $notdisabled) {
$sql .= " AND u.employee <> 0";
}
if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX) || $notdisabled) {
$sql .= " AND u.fk_soc IS NULL";
}
if (!empty($morefilter)) {
$sql .= " " . $morefilter;
}
@ -2439,29 +2445,29 @@ class Form
/**
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_list
*
* @param int $selected Preselected products
* @param string $htmlname Name of HTML select field (must be unique in page).
* @param int|string $filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param int $limit Limit on number of returned lines
* @param int $price_level Level of price to show
* @param int $status Sell status -1=Return all products, 0=Products not on sell, 1=Products on sell
* @param int $finished 2=all, 1=finished, 0=raw material
* @param string $selected_input_value Value of preselected input text (for use with ajax)
* @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after)
* @param array $ajaxoptions Options for ajax_autocompleter
* @param int $socid Thirdparty Id (to get also price dedicated to this customer)
* @param string $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text.
* @param int $forcecombo Force to use combo box
* @param string $morecss Add more css on select
* @param int $hidepriceinlabel 1=Hide prices in label
* @param string $warehouseStatus Warehouse status filter to count the quantity in stock. Following comma separated filter options can be used
* 'warehouseopen' = count products from open warehouses,
* 'warehouseclosed' = count products from closed warehouses,
* 'warehouseinternal' = count products from warehouses for internal correct/transfer only
* @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...])
* @param int $nooutput No print, return the output into a string
* @param int $status_purchase Purchase status -1=Return all products, 0=Products not on purchase, 1=Products on purchase
* @return void|string
* @param int $selected Preselected products
* @param string $htmlname Name of HTML select field (must be unique in page).
* @param int|string $filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param int $limit Limit on number of returned lines
* @param int $price_level Level of price to show
* @param int $status Sell status: -1=No filter on sell status, 0=Products not on sell, 1=Products on sell
* @param int $finished 2=all, 1=finished, 0=raw material
* @param string $selected_input_value Value of preselected input text (for use with ajax)
* @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after)
* @param array $ajaxoptions Options for ajax_autocompleter
* @param int $socid Thirdparty Id (to get also price dedicated to this customer)
* @param string $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text.
* @param int $forcecombo Force to use combo box
* @param string $morecss Add more css on select
* @param int $hidepriceinlabel 1=Hide prices in label
* @param string $warehouseStatus Warehouse status filter to count the quantity in stock. Following comma separated filter options can be used
* 'warehouseopen' = count products from open warehouses,
* 'warehouseclosed' = count products from closed warehouses,
* 'warehouseinternal' = count products from warehouses for internal correct/transfer only
* @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...])
* @param string $nooutput No print, return the output into a string
* @param int $status_purchase Purchase status: -1=No filter on purchase status, 0=Products not on purchase, 1=Products on purchase
* @return void|string
*/
public function select_produits($selected = 0, $htmlname = 'productid', $filtertype = '', $limit = 0, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = null, $nooutput = 0, $status_purchase = -1)
{
@ -2858,12 +2864,10 @@ class Form
if ($finished == 0) {
$sql .= " AND p.finished = " . ((int) $finished);
} elseif ($finished == 1) {
$sql .= " AND p.finished = " . ((int) $finished);
if ($status >= 0) {
$sql .= " AND p.tosell = " . ((int) $status);
}
} elseif ($status >= 0) {
$sql .= " AND p.tosell = " . ((int) $status);
$sql .= " AND p.finished = ".((int) $finished);
}
if ($status >= 0) {
$sql .= " AND p.tosell = ".((int) $status);
}
if ($status_purchase >= 0) {
$sql .= " AND p.tobuy = " . ((int) $status_purchase);

View file

@ -522,6 +522,15 @@ class FormOther
if (!empty($user->socid)) {
$sql_usr .= " AND u.fk_soc = ".((int) $user->socid);
}
if (!empty($conf->global->USER_HIDE_NONEMPLOYEE_IN_COMBOBOX)) {
$sql_usr .= " AND u.employee <> 0";
}
if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) {
$sql_usr .= " AND u.fk_soc IS NULL";
}
if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) {
$sql_usr .= " AND u.statut <> 0";
}
//Add hook to filter on user (for example on usergroup define in custom modules)
if (!empty($reshook)) {

View file

@ -2360,7 +2360,7 @@ function addEventTypeSQL(&$sql, $actioncode, $sqlANDOR = "AND")
* @param string $sql $sql modified
* @param string $donetodo donetodo
* @param string $now now
* @param string $filters array
* @param array $filters array
* @return string sql request
*/
function addOtherFilterSQL(&$sql, $donetodo, $now, $filters)

View file

@ -587,7 +587,7 @@ function dol_get_next_week($day, $week, $month, $year)
* True or 1 or 'gmt' to compare with GMT date.
* Example: dol_get_first_day(1970,1,false) will return -3600 with TZ+1, a dol_print_date on it will return 1970-01-01 00:00:00
* Example: dol_get_first_day(1970,1,true) will return 0 whatever is TZ, a dol_print_date on it will return 1970-01-01 00:00:00
* @return int Date for first day, '' if error
* @return int|string Date as a timestamp, '' if error
*/
function dol_get_first_day($year, $month = 1, $gm = false)
{
@ -606,7 +606,7 @@ function dol_get_first_day($year, $month = 1, $gm = false)
* @param int $month Month
* @param mixed $gm False or 0 or 'tzserver' = Return date to compare with server TZ,
* True or 1 or 'gmt' to compare with GMT date.
* @return int Date for first day, '' if error
* @return int|string Date as a timestamp, '' if error
*/
function dol_get_last_day($year, $month = 12, $gm = false)
{
@ -1187,5 +1187,5 @@ function getWeekNumber($day, $month, $year)
{
$date = new DateTime($year.'-'.$month.'-'.$day);
$week = $date->format("W");
return $week;
return (int) $week;
}

View file

@ -3104,7 +3104,7 @@ function dol_getdate($timestamp, $fast = false, $forcetimezone = '')
* 'tzuserrel' = local to user TZ taking dst into account at the given date. Use this one to convert date input from user into a GMT date.
* 'tz,TimeZone' = use specified timezone
* @param int $check 0=No check on parameters (Can use day 32, etc...)
* @return int|string Date as a timestamp, '' or false if error
* @return int|string Date as a timestamp, '' if error
* @see dol_print_date(), dol_stringtotime(), dol_getdate()
*/
function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = 'auto', $check = 1)

View file

@ -229,7 +229,7 @@ function dolDecrypt($chain, $key = '')
* @param string $chain String to hash
* @param string $type Type of hash ('0':auto will use MAIN_SECURITY_HASH_ALGO else md5, '1':sha1, '2':sha1+md5, '3':md5, '4': for OpenLdap, '5':sha256, '6':password_hash).
* Use 'md5' if hash is not needed for security purpose. For security need, prefer 'auto'.
* @param string $nosalt Do not include any salt
* @param int $nosalt Do not include any salt
* @return string Hash of string
* @see getRandomPassword(), dol_verifyHash()
*/
@ -1159,7 +1159,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl
* @return void
* @see accessforbidden()
*/
function httponly_accessforbidden($message = 1, $http_response_code = 403, $stringalreadysanitized = 0)
function httponly_accessforbidden($message = '1', $http_response_code = 403, $stringalreadysanitized = 0)
{
top_httphead();
http_response_code($http_response_code);

View file

@ -186,7 +186,36 @@ function user_prepare_head(User $object)
$h++;
$head[$h][0] = DOL_URL_ROOT.'/user/info.php?id='.$object->id;
$head[$h][1] = $langs->trans("Info");
$head[$h][1] = $langs->trans("Events");
if (isModEnabled('agenda')&& ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
$nbEvent = 0;
// Enable caching of thirdparty count actioncomm
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
$cachekey = 'count_events_user_'.$object->id;
$dataretrieved = dol_getcache($cachekey);
if (!is_null($dataretrieved)) {
$nbEvent = $dataretrieved;
} else {
$sql = "SELECT COUNT(id) as nb";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm";
$sql .= " WHERE fk_user_done = ".((int) $object->id);
$sql .= " AND entity IN (".getEntity('agenda').")";
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
$nbEvent = $obj->nb;
} else {
dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
}
dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
}
$head[$h][1] .= '/';
$head[$h][1] .= $langs->trans("Agenda");
if ($nbEvent > 0) {
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbEvent.'</span>';
}
}
$head[$h][2] = 'info';
$h++;
}
@ -1173,3 +1202,523 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '</table>';
print '</div>';
}
/**
* Show html area with actions (done or not, ignore the name of function).
* Note: Global parameter $param must be defined.
*
* @param Conf $conf Object conf
* @param Translate $langs Object langs
* @param DoliDB $db Object db
* @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket... to list events linked to an object
* @param Contact $objcon Filter on object contact to filter events on a contact
* @param int $noprint Return string but does not output it
* @param string|string[] $actioncode Filter on actioncode
* @param string $donetodo Filter on event 'done' or 'todo' or ''=nofilter (all).
* @param array $filters Filter on other fields
* @param string $sortfield Sort field
* @param string $sortorder Sort order
* @param string $module You can add module name here if elementtype in table llx_actioncomm is objectkey@module
* @return string|void Return html part or void if noprint is 1
*/
function show_actions_done_user($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC', $module = '')
{
global $user, $conf, $hookmanager;
global $form;
global $param, $massactionbutton;
$start_year = GETPOST('dateevent_startyear', 'int');
$start_month = GETPOST('dateevent_startmonth', 'int');
$start_day = GETPOST('dateevent_startday', 'int');
$end_year = GETPOST('dateevent_endyear', 'int');
$end_month = GETPOST('dateevent_endmonth', 'int');
$end_day = GETPOST('dateevent_endday', 'int');
$tms_start = '';
$tms_end = '';
if (!empty($start_year) && !empty($start_month) && !empty($start_day)) {
$tms_start = dol_mktime(0, 0, 0, $start_month, $start_day, $start_year, 'tzuserrel');
}
if (!empty($end_year) && !empty($end_month) && !empty($end_day)) {
$tms_end = dol_mktime(23, 59, 59, $end_month, $end_day, $end_year, 'tzuserrel');
}
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers
$tms_start = '';
$tms_end = '';
}
dol_include_once('/comm/action/class/actioncomm.class.php');
// Check parameters
if (!is_object($filterobj) && !is_object($objcon)) {
dol_print_error('', 'BadParameter');
}
$out = '';
$histo = array();
$numaction = 0;
$now = dol_now('tzuser');
// Open DSI -- Fix order by -- Begin
$sortfield_list = explode(',', $sortfield);
$sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent');
$sortfield_new_list = array();
foreach ($sortfield_list as $sortfield_value) {
$sortfield_new_list[] = $sortfield_label_list[trim($sortfield_value)];
}
$sortfield_new = implode(',', $sortfield_new_list);
$sql = '';
if (isModEnabled('agenda')) {
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('agendadao'));
// Recherche histo sur actioncomm
if (is_object($objcon) && $objcon->id > 0) {
$sql = "SELECT DISTINCT a.id, a.label as label,";
} else {
$sql = "SELECT a.id, a.label as label,";
}
$sql .= " a.datep as dp,";
$sql .= " a.datep2 as dp2,";
$sql .= " a.percent as percent, 'action' as type,";
$sql .= " a.fk_element, a.elementtype,";
$sql .= " c.code as acode, c.libelle as alabel, c.picto as apicto,";
$sql .= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname";
if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur'))) {
$sql .= ", sp.lastname, sp.firstname";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') {
/* Nothing */
} elseif (is_object($filterobj) && get_class($filterobj) == 'Project') {
/* Nothing */
} elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') {
$sql .= ", m.lastname, m.firstname";
} elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') {
$sql .= ", o.ref";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Product') {
$sql .= ", o.ref";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') {
$sql .= ", o.ref";
} elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') {
$sql .= ", o.ref";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') {
$sql .= ", o.ref";
} elseif (is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) && $filterobj->table_element && $filterobj->element) {
if (!empty($filterobj->fields['ref'])) {
$sql .= ", o.ref";
} elseif (!empty($filterobj->fields['label'])) {
$sql .= ", o.label";
}
}
// Fields from hook
$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
$reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters); // Note that $action and $object may have been modified by hook
if (!empty($hookmanager->resPrint)) {
$sql.= $hookmanager->resPrint;
}
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id";
$force_filter_contact = false;
if (is_object($objcon) && $objcon->id > 0) {
$force_filter_contact = true;
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm";
$sql .= " AND r.element_type = '".$db->escape($objcon->table_element)."' AND r.fk_element = ".((int) $objcon->id);
}
// Fields from hook
$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
$reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters); // Note that $action and $object may have been modified by hook
if (!empty($hookmanager->resPrint)) {
$sql.= $hookmanager->resPrint;
}
$sql .= " WHERE a.entity IN (".getEntity('agenda').")";
$sql .= " AND u.rowid = ".((int) $filterobj->id);
if (!empty($tms_start) && !empty($tms_end)) {
$sql .= " AND ((a.datep BETWEEN '".$db->idate($tms_start)."' AND '".$db->idate($tms_end)."') OR (a.datep2 BETWEEN '".$db->idate($tms_start)."' AND '".$db->idate($tms_end)."'))";
} elseif (empty($tms_start) && !empty($tms_end)) {
$sql .= " AND ((a.datep <= '".$db->idate($tms_end)."') OR (a.datep2 <= '".$db->idate($tms_end)."'))";
} elseif (!empty($tms_start) && empty($tms_end)) {
$sql .= " AND ((a.datep >= '".$db->idate($tms_start)."') OR (a.datep2 >= '".$db->idate($tms_start)."'))";
}
if (is_array($actioncode) && !empty($actioncode)) {
$sql .= ' AND (';
foreach ($actioncode as $key => $code) {
if ($key != 0) {
$sql .= " OR ";
}
if (!empty($code)) {
addEventTypeSQL($sql, $code, "");
}
}
$sql .= ')';
} elseif (!empty($actioncode)) {
addEventTypeSQL($sql, $actioncode);
}
addOtherFilterSQL($sql, $donetodo, $now, $filters);
// Fields from hook
$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon, 'module' => $module);
$reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters); // Note that $action and $object may have been modified by hook
if (!empty($hookmanager->resPrint)) {
$sql.= $hookmanager->resPrint;
}
if (is_array($actioncode)) {
foreach ($actioncode as $code) {
$sql2 = addMailingEventTypeSQL($code, $objcon, $filterobj);
if (!empty($sql2)) {
if (!empty($sql)) {
$sql = $sql." UNION ".$sql2;
} elseif (empty($sql)) {
$sql = $sql2;
}
break;
}
}
} else {
$sql2 = addMailingEventTypeSQL($actioncode, $objcon, $filterobj);
if (!empty($sql) && !empty($sql2)) {
$sql = $sql." UNION ".$sql2;
} elseif (empty($sql) && !empty($sql2)) {
$sql = $sql2;
}
}
}
//TODO Add limit in nb of results
if ($sql) {
$sql .= $db->order($sortfield_new, $sortorder);
dol_syslog("usergroups.lib::show_actions_dones", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$i = 0;
$num = $db->num_rows($resql);
while ($i < $num) {
$obj = $db->fetch_object($resql);
if ($obj->type == 'action') {
$contactaction = new ActionComm($db);
$contactaction->id = $obj->id;
$result = $contactaction->fetchResources();
if ($result < 0) {
dol_print_error($db);
setEventMessage("user.lib::show_actions_done Error fetch resource", 'errors');
}
//if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
//elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
$tododone = '';
if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && (!empty($obj->datep) && $obj->datep > $now))) {
$tododone = 'todo';
}
$histo[$numaction] = array(
'type'=>$obj->type,
'tododone'=>$tododone,
'id'=>$obj->id,
'datestart'=>$db->jdate($obj->dp),
'dateend'=>$db->jdate($obj->dp2),
'note'=>$obj->label,
'percent'=>$obj->percent,
'userid'=>$obj->user_id,
'login'=>$obj->user_login,
'userfirstname'=>$obj->user_firstname,
'userlastname'=>$obj->user_lastname,
'userphoto'=>$obj->user_photo,
'contact_id'=>$obj->fk_contact,
'socpeopleassigned' => $contactaction->socpeopleassigned,
'lastname' => empty($obj->lastname) ? '' : $obj->lastname,
'firstname' => empty($obj->firstname) ? '' : $obj->firstname,
'fk_element'=>$obj->fk_element,
'elementtype'=>$obj->elementtype,
// Type of event
'acode'=>$obj->acode,
'alabel'=>$obj->alabel,
'libelle'=>$obj->alabel, // deprecated
'apicto'=>$obj->apicto
);
} else {
$histo[$numaction] = array(
'type'=>$obj->type,
'tododone'=>'done',
'id'=>$obj->id,
'datestart'=>$db->jdate($obj->dp),
'dateend'=>$db->jdate($obj->dp2),
'note'=>$obj->label,
'percent'=>$obj->percent,
'acode'=>$obj->acode,
'userid'=>$obj->user_id,
'login'=>$obj->user_login,
'userfirstname'=>$obj->user_firstname,
'userlastname'=>$obj->user_lastname,
'userphoto'=>$obj->user_photo
);
}
$numaction++;
$i++;
}
} else {
dol_print_error($db);
}
}
if (isModEnabled('agenda')|| (isModEnabled('mailing') && !empty($objcon->email))) {
$delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60;
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
$formactions = new FormActions($db);
$actionstatic = new ActionComm($db);
$userstatic = new User($db);
$userlinkcache = array();
$contactstatic = new Contact($db);
$elementlinkcache = array();
$out .= '<form name="listactionsfilter" class="listactionsfilter" action="'.$_SERVER["PHP_SELF"].'?id='.$filterobj->id.'" method="POST">';
$out .= '<input type="hidden" name="token" value="'.newToken().'">';
if ($objcon && get_class($objcon) == 'User' &&
(is_null($filterobj) || get_class($filterobj) == 'User')) {
$out .= '<input type="hidden" name="id" value="'.$objcon->id.'" />';
} else {
$out .= '<input type="hidden" name="id" value="'.$filterobj->id.'" />';
}
if ($filterobj && get_class($filterobj) == 'User') {
$out .= '<input type="hidden" name="id" value="'.$filterobj->id.'" />';
}
$out .= "\n";
$out .= '<div class="div-table-responsive-no-min">';
$out .= '<table class="noborder centpercent">';
$out .= '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<th class="liste_titre width50 middle">';
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
$out .= $searchpicto;
$out .= '</th>';
}
if ($donetodo) {
$out .= '<td class="liste_titre"></td>';
}
$out .= '<td class="liste_titre"><input type="text" class="width50" name="search_rowid" value="'.(isset($filters['search_rowid']) ? $filters['search_rowid'] : '').'"></td>';
$out .= '<td class="liste_titre"></td>';
$out .= '<td class="liste_titre">';
$out .= $formactions->select_type_actions($actioncode, "actioncode", '', !getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? 1 : -1, 0, (!getDolGlobalString('AGENDA_USE_MULTISELECT_TYPE') ? 0 : 1), 1, 'minwidth100 maxwidth150');
$out .= '</td>';
$out .= '<td class="liste_titre maxwidth100onsmartphone"><input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'"></td>';
$out .= '<td class="liste_titre center">';
$out .= $form->selectDateToDate($tms_start, $tms_end, 'dateevent', 1);
$out .= '</td>';
$out .= '<td class="liste_titre"></td>';
$out .= '<td class="liste_titre"></td>';
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<td class="liste_titre" align="middle">';
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
$out .= $searchpicto;
$out .= '</td>';
}
$out .= '</tr>';
$out .= '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
}
if ($donetodo) {
$tmp = '';
if (get_class($filterobj) == 'User') {
$tmp .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&userid='.$filterobj->id.'&status=done">';
}
$tmp .= ($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : '');
$tmp .= ($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : '');
$tmp .= ($donetodo != 'todo' ? $langs->trans("ActionsDoneShort") : '');
//$out.=$langs->trans("ActionsToDoShort").' / '.$langs->trans("ActionsDoneShort");
if (get_class($filterobj) == 'User') {
$tmp .= '</a>';
}
$out .= getTitleFieldOfList($tmp);
}
$out .= getTitleFieldOfList("Ref", 0, $_SERVER["PHP_SELF"], 'a.id', '', $param, '', $sortfield, $sortorder);
$out .= getTitleFieldOfList("Owner");
$out .= getTitleFieldOfList("Type");
$out .= getTitleFieldOfList("Label", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
$out .= getTitleFieldOfList("Date", 0, $_SERVER["PHP_SELF"], 'a.datep,a.id', '', $param, '', $sortfield, $sortorder, 'center ');
$out .= getTitleFieldOfList("Status", 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, '', $sortfield, $sortorder, 'center ');
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
}
$out .= '<td></td>';
$out .= '</tr>';
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
$caction = new CActionComm($db);
$arraylist = $caction->liste_array(1, 'code', '', (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? 1 : 0), '', 1);
foreach ($histo as $key => $value) {
$actionstatic->fetch($histo[$key]['id']); // TODO Do we need this, we already have a lot of data of line into $histo
$actionstatic->type_picto = $histo[$key]['apicto'];
$actionstatic->type_code = $histo[$key]['acode'];
$out .= '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<td></td>';
}
// Done or todo
if ($donetodo) {
$out .= '<td class="nowrap">';
$out .= '</td>';
}
// Ref
$out .= '<td class="nowraponall">';
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') {
$out .= '<a href="'.DOL_URL_ROOT.'/comm/mailing/card.php?id='.$histo[$key]['id'].'">'.img_object($langs->trans("ShowEMailing"), "email").' ';
$out .= $histo[$key]['id'];
$out .= '</a>';
} else {
$out .= $actionstatic->getNomUrl(1, -1);
}
$out .= '</td>';
// Author of event
$out .= '<td class="tdoverflowmax125">';
if ($histo[$key]['userid'] > 0) {
if (isset($userlinkcache[$histo[$key]['userid']])) {
$link = $userlinkcache[$histo[$key]['userid']];
} else {
$userstatic->fetch($histo[$key]['userid']);
$link = $userstatic->getNomUrl(-1, '', 0, 0, 16, 0, 'firstelselast', '');
$userlinkcache[$histo[$key]['userid']] = $link;
}
$out .= $link;
}
$out .= '</td>';
// Type
$labeltype = $actionstatic->type_code;
if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && empty($arraylist[$labeltype])) {
$labeltype = 'AC_OTH';
}
if (!empty($actionstatic->code) && preg_match('/^TICKET_MSG/', $actionstatic->code)) {
$labeltype = $langs->trans("Message");
} else {
if (!empty($arraylist[$labeltype])) {
$labeltype = $arraylist[$labeltype];
}
if ($actionstatic->type_code == 'AC_OTH_AUTO' && ($actionstatic->type_code != $actionstatic->code) && $labeltype && !empty($arraylist[$actionstatic->code])) {
$labeltype .= ' - '.$arraylist[$actionstatic->code]; // Use code in priority on type_code
}
}
$out .= '<td class="tdoverflowmax125" title="'.$labeltype.'">';
$out .= $actionstatic->getTypePicto();
//if (empty($conf->dol_optimize_smallscreen)) {
$out .= $labeltype;
//}
$out .= '</td>';
// Title/Label of event
$out .= '<td class="tdoverflowmax300"';
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') {
$transcode = $langs->trans("Action".$histo[$key]['acode']);
//$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']);
$libelle = $histo[$key]['note'];
$actionstatic->id = $histo[$key]['id'];
$out .= ' title="'.dol_escape_htmltag($libelle).'">';
$out .= dol_trunc($libelle, 120);
}
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') {
$out .= '<a href="'.DOL_URL_ROOT.'/comm/mailing/card.php?id='.$histo[$key]['id'].'">'.img_object($langs->trans("ShowEMailing"), "email").' ';
$transcode = $langs->trans("Action".$histo[$key]['acode']);
$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : 'Send mass mailing');
$out .= ' title="'.dol_escape_htmltag($libelle).'">';
$out .= dol_trunc($libelle, 120);
}
$out .= '</td>';
// Date
$out .= '<td class="center nowraponall">';
$out .= dol_print_date($histo[$key]['datestart'], 'dayhour', 'tzuserrel');
if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) {
$tmpa = dol_getdate($histo[$key]['datestart'], true);
$tmpb = dol_getdate($histo[$key]['dateend'], true);
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) {
$out .= '-'.dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel');
} else {
$out .= '-'.dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel');
}
}
$late = 0;
if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) {
$late = 1;
}
if ($histo[$key]['percent'] == 0 && !$histo[$key]['datestart'] && $histo[$key]['dateend'] && $histo[$key]['datestart'] < ($now - $delay_warning)) {
$late = 1;
}
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && $histo[$key]['dateend'] && $histo[$key]['dateend'] < ($now - $delay_warning)) {
$late = 1;
}
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && !$histo[$key]['dateend'] && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) {
$late = 1;
}
if ($late) {
$out .= img_warning($langs->trans("Late")).' ';
}
$out .= "</td>\n";
// Status
$out .= '<td class="nowrap center">'.$actionstatic->LibStatut($histo[$key]['percent'], 2, 0, $histo[$key]['datestart']).'</td>';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$out .= '<td></td>';
}
$out .= "</tr>\n";
$i++;
}
if (empty($histo)) {
$colspan = 9;
$out .= '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
}
$out .= "</table>\n";
$out .= "</div>\n";
$out .= '</form>';
}
if ($noprint) {
return $out;
} else {
print $out;
}
}

View file

@ -118,7 +118,7 @@ function dolKeepOnlyPhpCode($str)
* @return boolean True if OK
* @see dolWebsiteOutput() for function used to replace content in a web server context
*/
function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $contenttype = 'html', $containerid = '')
function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $contenttype = 'html', $containerid = 0)
{
$nbrep = 0;
@ -279,7 +279,7 @@ function dolReplaceSmileyCodeWithUTF8($content)
* @return void
* @see dolWebsiteReplacementOfLinks() for function used to replace content in the backoffice context.
*/
function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '')
function dolWebsiteOutput($content, $contenttype = 'html', $containerid = 0)
{
global $db, $langs, $conf, $user;
global $dolibarr_main_url_root, $dolibarr_main_data_root;

View file

@ -155,7 +155,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs = null, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user, $langs, $conf, $mysoc, $hookmanager;

View file

@ -143,7 +143,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs = null, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user, $langs, $conf, $hookmanager, $mysoc, $nblines;

View file

@ -1223,6 +1223,16 @@ class Cronjob extends CommonObject
// Run a method
if ($this->jobtype == 'method') {
// Deny to launch a method from a deactivated module
if (!empty($this->module_name) && !isModEnabled(strtolower($this->module_name))) {
$this->error = $langs->transnoentitiesnoconv('CronMethodNotAllowed', $this->methodename, $this->objectname);
dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR);
$this->lastoutput = $this->error;
$this->lastresult = -1;
$retval = $this->lastresult;
$error++;
}
// load classes
if (!$error) {
$ret = dol_include_once($this->classesname);

View file

@ -49,7 +49,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/dav/dav.class.php';
require_once DOL_DOCUMENT_ROOT.'/dav/dav.lib.php';
require_once DOL_DOCUMENT_ROOT.'/includes/sabre/autoload.php';
//require_once DOL_DOCUMENT_ROOT.'/includes/autoload.php';
$user = new User($db);

View file

@ -1833,7 +1833,7 @@ class CommandeFournisseur extends CommonOrder
* @param int $special_code Special code
* @return int Return integer <=0 if KO, >0 if OK
*/
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = 0, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1, $special_code = 0)
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = 0, $date_start = null, $date_end = null, $array_options = [], $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1, $special_code = 0)
{
global $langs, $mysoc, $conf;

View file

@ -1057,7 +1057,7 @@ if (empty($reshook)) {
if ($cancel) {
$action = '';
} elseif ($methodecommande <= 0) {
} elseif ($methodecommande <= 0 && !getDolGlobalInt('SUPPLIER_ORDER_MODE_OPTIONAL')) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors');
$action = 'createorder';
}

View file

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit60b9ac98a8448ede6c445b0fd4bd31e0::getLoader();
return ComposerAutoloaderInit51cd53f153efda61d1f1f814155d1c4a::getLoader();

View file

@ -0,0 +1,6 @@
{
"require" : {
"php": ">=7.1.0",
"sabre/dav" : ">=3.0.0"
}
}

513
htdocs/includes/sabre/composer.lock generated Normal file
View file

@ -0,0 +1,513 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "fffed375dc9f645f46fc681f0b1b7f07",
"packages": [
{
"name": "psr/log",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
"time": "2021-05-03T11:20:27+00:00"
},
{
"name": "sabre/dav",
"version": "4.6.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/dav.git",
"reference": "554145304b4a026477d130928d16e626939b0b2a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/dav/zipball/554145304b4a026477d130928d16e626939b0b2a",
"reference": "554145304b4a026477d130928d16e626939b0b2a",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-date": "*",
"ext-dom": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-pcre": "*",
"ext-simplexml": "*",
"ext-spl": "*",
"lib-libxml": ">=2.7.0",
"php": "^7.1.0 || ^8.0",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"sabre/event": "^5.0",
"sabre/http": "^5.0.5",
"sabre/uri": "^2.0",
"sabre/vobject": "^4.2.1",
"sabre/xml": "^2.0.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.19",
"monolog/monolog": "^1.27 || ^2.0",
"phpstan/phpstan": "^0.12 || ^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6"
},
"suggest": {
"ext-curl": "*",
"ext-imap": "*",
"ext-pdo": "*"
},
"bin": [
"bin/sabredav",
"bin/naturalselection"
],
"type": "library",
"autoload": {
"psr-4": {
"Sabre\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "WebDAV Framework for PHP",
"homepage": "http://sabre.io/",
"keywords": [
"CalDAV",
"CardDAV",
"WebDAV",
"framework",
"iCalendar"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/dav/issues",
"source": "https://github.com/fruux/sabre-dav"
},
"time": "2023-12-11T13:01:23+00:00"
},
{
"name": "sabre/event",
"version": "5.1.4",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/event.git",
"reference": "d7da22897125d34d7eddf7977758191c06a74497"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497",
"reference": "d7da22897125d34d7eddf7977758191c06a74497",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"type": "library",
"autoload": {
"files": [
"lib/coroutine.php",
"lib/Loop/functions.php",
"lib/Promise/functions.php"
],
"psr-4": {
"Sabre\\Event\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "sabre/event is a library for lightweight event-based programming",
"homepage": "http://sabre.io/event/",
"keywords": [
"EventEmitter",
"async",
"coroutine",
"eventloop",
"events",
"hooks",
"plugin",
"promise",
"reactor",
"signal"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/event/issues",
"source": "https://github.com/fruux/sabre-event"
},
"time": "2021-11-04T06:51:17+00:00"
},
{
"name": "sabre/http",
"version": "5.1.10",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/http.git",
"reference": "f9f3d1fba8916fa2f4ec25636c4fedc26cb94e02"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/http/zipball/f9f3d1fba8916fa2f4ec25636c4fedc26cb94e02",
"reference": "f9f3d1fba8916fa2f4ec25636c4fedc26cb94e02",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-curl": "*",
"ext-mbstring": "*",
"php": "^7.1 || ^8.0",
"sabre/event": ">=4.0 <6.0",
"sabre/uri": "^2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"suggest": {
"ext-curl": " to make http requests with the Client class"
},
"type": "library",
"autoload": {
"files": [
"lib/functions.php"
],
"psr-4": {
"Sabre\\HTTP\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "The sabre/http library provides utilities for dealing with http requests and responses. ",
"homepage": "https://github.com/fruux/sabre-http",
"keywords": [
"http"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/http/issues",
"source": "https://github.com/fruux/sabre-http"
},
"time": "2023-08-18T01:55:28+00:00"
},
{
"name": "sabre/uri",
"version": "2.2.4",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/uri.git",
"reference": "c0c9af9f7754e60a49ebd760e1708adc6d1510c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/uri/zipball/c0c9af9f7754e60a49ebd760e1708adc6d1510c0",
"reference": "c0c9af9f7754e60a49ebd760e1708adc6d1510c0",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.19.3",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"type": "library",
"autoload": {
"files": [
"lib/functions.php"
],
"psr-4": {
"Sabre\\Uri\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "Functions for making sense out of URIs.",
"homepage": "http://sabre.io/uri/",
"keywords": [
"rfc3986",
"uri",
"url"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/uri/issues",
"source": "https://github.com/fruux/sabre-uri"
},
"time": "2022-09-19T12:25:28+00:00"
},
{
"name": "sabre/vobject",
"version": "4.5.4",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/vobject.git",
"reference": "a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/vobject/zipball/a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772",
"reference": "a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": "^7.1 || ^8.0",
"sabre/xml": "^2.1 || ^3.0 || ^4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/php-invoker": "^2.0 || ^3.1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"suggest": {
"hoa/bench": "If you would like to run the benchmark scripts"
},
"bin": [
"bin/vobject",
"bin/generate_vcards"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Sabre\\VObject\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
},
{
"name": "Dominik Tobschall",
"email": "dominik@fruux.com",
"homepage": "http://tobschall.de/",
"role": "Developer"
},
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net",
"homepage": "http://mnt.io/",
"role": "Developer"
}
],
"description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects",
"homepage": "http://sabre.io/vobject/",
"keywords": [
"availability",
"freebusy",
"iCalendar",
"ical",
"ics",
"jCal",
"jCard",
"recurrence",
"rfc2425",
"rfc2426",
"rfc2739",
"rfc4770",
"rfc5545",
"rfc5546",
"rfc6321",
"rfc6350",
"rfc6351",
"rfc6474",
"rfc6638",
"rfc6715",
"rfc6868",
"vCalendar",
"vCard",
"vcf",
"xCal",
"xCard"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/vobject/issues",
"source": "https://github.com/fruux/sabre-vobject"
},
"time": "2023-11-09T12:54:37+00:00"
},
{
"name": "sabre/xml",
"version": "2.2.6",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/xml.git",
"reference": "9cde7cdab1e50893cc83b037b40cd47bfde42a2b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/xml/zipball/9cde7cdab1e50893cc83b037b40cd47bfde42a2b",
"reference": "9cde7cdab1e50893cc83b037b40cd47bfde42a2b",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"lib-libxml": ">=2.6.20",
"php": "^7.1 || ^8.0",
"sabre/uri": ">=1.0,<3.0.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"type": "library",
"autoload": {
"files": [
"lib/Deserializer/functions.php",
"lib/Serializer/functions.php"
],
"psr-4": {
"Sabre\\Xml\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
},
{
"name": "Markus Staab",
"email": "markus.staab@redaxo.de",
"role": "Developer"
}
],
"description": "sabre/xml is an XML library that you may not hate.",
"homepage": "https://sabre.io/xml/",
"keywords": [
"XMLReader",
"XMLWriter",
"dom",
"xml"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/xml/issues",
"source": "https://github.com/fruux/sabre-xml"
},
"time": "2023-06-28T12:56:05+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=7.1.0"
},
"platform-dev": [],
"plugin-api-version": "2.2.0"
}

View file

@ -37,57 +37,130 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/
public function addClassMap(array $classMap)
{
@ -102,9 +175,11 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
@ -147,11 +222,13 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
@ -195,8 +272,10 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
@ -211,10 +290,12 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
@ -234,6 +315,8 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
@ -256,6 +339,8 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@ -276,10 +361,12 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
@ -296,25 +383,44 @@ class ClassLoader
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
@ -323,6 +429,8 @@ class ClassLoader
return true;
}
return null;
}
/**
@ -367,6 +475,21 @@ class ClassLoader
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@ -374,10 +497,14 @@ class ClassLoader
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
if (0 === strpos($class, $prefix)) {
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
@ -434,6 +561,10 @@ class ClassLoader
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{

View file

@ -0,0 +1,350 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
*/
private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;
return $installed;
}
}

View file

@ -1,5 +1,5 @@
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -6,4 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
);

View file

@ -7,10 +7,10 @@ $baseDir = dirname($vendorDir);
return array(
'383eaff206634a77a1be54e64e6459c7' => $vendorDir . '/sabre/uri/lib/functions.php',
'3569eecfeed3bcf0bad3c998a494ecb8' => $vendorDir . '/sabre/xml/lib/Deserializer/functions.php',
'93aa591bc4ca510c520999e34229ee79' => $vendorDir . '/sabre/xml/lib/Serializer/functions.php',
'2b9d0f43f9552984cfa82fee95491826' => $vendorDir . '/sabre/event/lib/coroutine.php',
'd81bab31d3feb45bfe2f283ea3c8fdf7' => $vendorDir . '/sabre/event/lib/Loop/functions.php',
'a1cce3d26cc15c00fcd0b3354bd72c88' => $vendorDir . '/sabre/event/lib/Promise/functions.php',
'3569eecfeed3bcf0bad3c998a494ecb8' => $vendorDir . '/sabre/xml/lib/Deserializer/functions.php',
'93aa591bc4ca510c520999e34229ee79' => $vendorDir . '/sabre/xml/lib/Serializer/functions.php',
'ebdb698ed4152ae445614b69b5e4bb6a' => $vendorDir . '/sabre/http/lib/functions.php',
);

View file

@ -11,9 +11,6 @@ return array(
'Sabre\\Uri\\' => array($vendorDir . '/sabre/uri/lib'),
'Sabre\\HTTP\\' => array($vendorDir . '/sabre/http/lib'),
'Sabre\\Event\\' => array($vendorDir . '/sabre/event/lib'),
'Sabre\\DAV\\' => array($vendorDir . '/sabre/dav/lib/DAV'),
'Sabre\\DAVACL\\' => array($vendorDir . '/sabre/dav/lib/DAVACL'),
'Sabre\\CardDAV\\' => array($vendorDir . '/sabre/dav/lib/CardDAV'),
'Sabre\\CalDAV\\' => array($vendorDir . '/sabre/dav/lib/CalDAV'),
'Sabre\\' => array($vendorDir . '/sabre/dav/lib'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
);

View file

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit60b9ac98a8448ede6c445b0fd4bd31e0
class ComposerAutoloaderInit51cd53f153efda61d1f1f814155d1c4a
{
private static $loader;
@ -13,21 +13,26 @@ class ComposerAutoloaderInit60b9ac98a8448ede6c445b0fd4bd31e0
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit60b9ac98a8448ede6c445b0fd4bd31e0', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit60b9ac98a8448ede6c445b0fd4bd31e0', 'loadClassLoader'));
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit51cd53f153efda61d1f1f814155d1c4a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit51cd53f153efda61d1f1f814155d1c4a', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit60b9ac98a8448ede6c445b0fd4bd31e0::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -48,23 +53,28 @@ class ComposerAutoloaderInit60b9ac98a8448ede6c445b0fd4bd31e0
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit60b9ac98a8448ede6c445b0fd4bd31e0::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire60b9ac98a8448ede6c445b0fd4bd31e0($fileIdentifier, $file);
composerRequire51cd53f153efda61d1f1f814155d1c4a($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire60b9ac98a8448ede6c445b0fd4bd31e0($fileIdentifier, $file)
/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequire51cd53f153efda61d1f1f814155d1c4a($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}

View file

@ -4,15 +4,15 @@
namespace Composer\Autoload;
class ComposerStaticInit60b9ac98a8448ede6c445b0fd4bd31e0
class ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a
{
public static $files = array (
'383eaff206634a77a1be54e64e6459c7' => __DIR__ . '/..' . '/sabre/uri/lib/functions.php',
'3569eecfeed3bcf0bad3c998a494ecb8' => __DIR__ . '/..' . '/sabre/xml/lib/Deserializer/functions.php',
'93aa591bc4ca510c520999e34229ee79' => __DIR__ . '/..' . '/sabre/xml/lib/Serializer/functions.php',
'2b9d0f43f9552984cfa82fee95491826' => __DIR__ . '/..' . '/sabre/event/lib/coroutine.php',
'd81bab31d3feb45bfe2f283ea3c8fdf7' => __DIR__ . '/..' . '/sabre/event/lib/Loop/functions.php',
'a1cce3d26cc15c00fcd0b3354bd72c88' => __DIR__ . '/..' . '/sabre/event/lib/Promise/functions.php',
'3569eecfeed3bcf0bad3c998a494ecb8' => __DIR__ . '/..' . '/sabre/xml/lib/Deserializer/functions.php',
'93aa591bc4ca510c520999e34229ee79' => __DIR__ . '/..' . '/sabre/xml/lib/Serializer/functions.php',
'ebdb698ed4152ae445614b69b5e4bb6a' => __DIR__ . '/..' . '/sabre/http/lib/functions.php',
);
@ -24,10 +24,7 @@ class ComposerStaticInit60b9ac98a8448ede6c445b0fd4bd31e0
'Sabre\\Uri\\' => 10,
'Sabre\\HTTP\\' => 11,
'Sabre\\Event\\' => 12,
'Sabre\\DAV\\' => 10,
'Sabre\\DAVACL\\' => 13,
'Sabre\\CardDAV\\' => 14,
'Sabre\\CalDAV\\' => 13,
'Sabre\\' => 6,
),
'P' =>
array (
@ -56,21 +53,9 @@ class ComposerStaticInit60b9ac98a8448ede6c445b0fd4bd31e0
array (
0 => __DIR__ . '/..' . '/sabre/event/lib',
),
'Sabre\\DAV\\' =>
'Sabre\\' =>
array (
0 => __DIR__ . '/..' . '/sabre/dav/lib/DAV',
),
'Sabre\\DAVACL\\' =>
array (
0 => __DIR__ . '/..' . '/sabre/dav/lib/DAVACL',
),
'Sabre\\CardDAV\\' =>
array (
0 => __DIR__ . '/..' . '/sabre/dav/lib/CardDAV',
),
'Sabre\\CalDAV\\' =>
array (
0 => __DIR__ . '/..' . '/sabre/dav/lib/CalDAV',
0 => __DIR__ . '/..' . '/sabre/dav/lib',
),
'Psr\\Log\\' =>
array (
@ -78,11 +63,16 @@ class ComposerStaticInit60b9ac98a8448ede6c445b0fd4bd31e0
),
);
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit60b9ac98a8448ede6c445b0fd4bd31e0::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit60b9ac98a8448ede6c445b0fd4bd31e0::$prefixDirsPsr4;
$loader->prefixLengthsPsr4 = ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a::$classMap;
}, null, ClassLoader::class);
}

View file

@ -1,470 +1,519 @@
[
{
"name": "sabre/uri",
"version": "1.2.0",
"version_normalized": "1.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-uri.git",
"reference": "8545a3335f741d4b7700bb14efb41b4c03775dcd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-uri/zipball/8545a3335f741d4b7700bb14efb41b4c03775dcd",
"reference": "8545a3335f741d4b7700bb14efb41b4c03775dcd",
"shasum": ""
},
"require": {
"php": ">=5.4.7"
},
"require-dev": {
"phpunit/phpunit": "*",
"sabre/cs": "~1.0.0"
},
"time": "2016-12-07T01:17:59+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/functions.php"
{
"packages": [
{
"name": "psr/log",
"version": "1.1.4",
"version_normalized": "1.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"time": "2021-05-03T11:20:27+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"psr-4": {
"Sabre\\Uri\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "Functions for making sense out of URIs.",
"homepage": "http://sabre.io/uri/",
"keywords": [
"rfc3986",
"uri",
"url"
]
},
{
"name": "sabre/xml",
"version": "1.5.0",
"version_normalized": "1.5.0.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-xml.git",
"reference": "59b20e5bbace9912607481634f97d05a776ffca7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-xml/zipball/59b20e5bbace9912607481634f97d05a776ffca7",
"reference": "59b20e5bbace9912607481634f97d05a776ffca7",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"lib-libxml": ">=2.6.20",
"php": ">=5.5.5",
"sabre/uri": ">=1.0,<3.0.0"
},
"require-dev": {
"phpunit/phpunit": "*",
"sabre/cs": "~1.0.0"
},
"time": "2016-10-09T22:57:52+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Sabre\\Xml\\": "lib/"
},
"files": [
"lib/Deserializer/functions.php",
"lib/Serializer/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
},
{
"name": "Markus Staab",
"email": "markus.staab@redaxo.de",
"role": "Developer"
}
],
"description": "sabre/xml is an XML library that you may not hate.",
"homepage": "https://sabre.io/xml/",
"keywords": [
"XMLReader",
"XMLWriter",
"dom",
"xml"
]
},
{
"name": "sabre/vobject",
"version": "4.1.2",
"version_normalized": "4.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-vobject.git",
"reference": "d0fde2fafa2a3dad1f559c2d1c2591d4fd75ae3c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/d0fde2fafa2a3dad1f559c2d1c2591d4fd75ae3c",
"reference": "d0fde2fafa2a3dad1f559c2d1c2591d4fd75ae3c",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.5",
"sabre/xml": ">=1.5 <3.0"
},
"require-dev": {
"phpunit/phpunit": "*",
"sabre/cs": "^1.0.0"
},
"suggest": {
"hoa/bench": "If you would like to run the benchmark scripts"
},
"time": "2016-12-06T04:14:09+00:00",
"bin": [
"bin/vobject",
"bin/generate_vcards"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Sabre\\VObject\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
},
{
"name": "Dominik Tobschall",
"email": "dominik@fruux.com",
"homepage": "http://tobschall.de/",
"role": "Developer"
},
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net",
"homepage": "http://mnt.io/",
"role": "Developer"
}
],
"description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects",
"homepage": "http://sabre.io/vobject/",
"keywords": [
"availability",
"freebusy",
"iCalendar",
"ical",
"ics",
"jCal",
"jCard",
"recurrence",
"rfc2425",
"rfc2426",
"rfc2739",
"rfc4770",
"rfc5545",
"rfc5546",
"rfc6321",
"rfc6350",
"rfc6351",
"rfc6474",
"rfc6638",
"rfc6715",
"rfc6868",
"vCalendar",
"vCard",
"vcf",
"xCal",
"xCard"
]
},
{
"name": "sabre/event",
"version": "3.0.0",
"version_normalized": "3.0.0.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-event.git",
"reference": "831d586f5a442dceacdcf5e9c4c36a4db99a3534"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-event/zipball/831d586f5a442dceacdcf5e9c4c36a4db99a3534",
"reference": "831d586f5a442dceacdcf5e9c4c36a4db99a3534",
"shasum": ""
},
"require": {
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit": "*",
"sabre/cs": "~0.0.4"
},
"time": "2015-11-05T20:14:39+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Sabre\\Event\\": "lib/"
},
"files": [
"lib/coroutine.php",
"lib/Loop/functions.php",
"lib/Promise/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "sabre/event is a library for lightweight event-based programming",
"homepage": "http://sabre.io/event/",
"keywords": [
"EventEmitter",
"async",
"events",
"hooks",
"plugin",
"promise",
"signal"
]
},
{
"name": "sabre/http",
"version": "4.2.2",
"version_normalized": "4.2.2.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-http.git",
"reference": "dd50e7260356f4599d40270826f9548b23efa204"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-http/zipball/dd50e7260356f4599d40270826f9548b23efa204",
"reference": "dd50e7260356f4599d40270826f9548b23efa204",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-mbstring": "*",
"php": ">=5.4",
"sabre/event": ">=1.0.0,<4.0.0",
"sabre/uri": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.3",
"sabre/cs": "~0.0.1"
},
"suggest": {
"ext-curl": " to make http requests with the Client class"
},
"time": "2017-01-02T19:38:42+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/functions.php"
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"psr-4": {
"Sabre\\HTTP\\": "lib/"
}
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
"install-path": "../psr/log"
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "The sabre/http library provides utilities for dealing with http requests and responses. ",
"homepage": "https://github.com/fruux/sabre-http",
"keywords": [
"http"
]
},
{
"name": "psr/log",
"version": "1.0.2",
"version_normalized": "1.0.2.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
{
"name": "sabre/dav",
"version": "4.6.0",
"version_normalized": "4.6.0.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/dav.git",
"reference": "554145304b4a026477d130928d16e626939b0b2a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/dav/zipball/554145304b4a026477d130928d16e626939b0b2a",
"reference": "554145304b4a026477d130928d16e626939b0b2a",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-date": "*",
"ext-dom": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-pcre": "*",
"ext-simplexml": "*",
"ext-spl": "*",
"lib-libxml": ">=2.7.0",
"php": "^7.1.0 || ^8.0",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"sabre/event": "^5.0",
"sabre/http": "^5.0.5",
"sabre/uri": "^2.0",
"sabre/vobject": "^4.2.1",
"sabre/xml": "^2.0.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.19",
"monolog/monolog": "^1.27 || ^2.0",
"phpstan/phpstan": "^0.12 || ^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6"
},
"suggest": {
"ext-curl": "*",
"ext-imap": "*",
"ext-pdo": "*"
},
"time": "2023-12-11T13:01:23+00:00",
"bin": [
"bin/sabredav",
"bin/naturalselection"
],
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Sabre\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "WebDAV Framework for PHP",
"homepage": "http://sabre.io/",
"keywords": [
"CalDAV",
"CardDAV",
"WebDAV",
"framework",
"iCalendar"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/dav/issues",
"source": "https://github.com/fruux/sabre-dav"
},
"install-path": "../sabre/dav"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"shasum": ""
{
"name": "sabre/event",
"version": "5.1.4",
"version_normalized": "5.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/event.git",
"reference": "d7da22897125d34d7eddf7977758191c06a74497"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497",
"reference": "d7da22897125d34d7eddf7977758191c06a74497",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"time": "2021-11-04T06:51:17+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/coroutine.php",
"lib/Loop/functions.php",
"lib/Promise/functions.php"
],
"psr-4": {
"Sabre\\Event\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "sabre/event is a library for lightweight event-based programming",
"homepage": "http://sabre.io/event/",
"keywords": [
"EventEmitter",
"async",
"coroutine",
"eventloop",
"events",
"hooks",
"plugin",
"promise",
"reactor",
"signal"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/event/issues",
"source": "https://github.com/fruux/sabre-event"
},
"install-path": "../sabre/event"
},
"require": {
"php": ">=5.3.0"
{
"name": "sabre/http",
"version": "5.1.10",
"version_normalized": "5.1.10.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/http.git",
"reference": "f9f3d1fba8916fa2f4ec25636c4fedc26cb94e02"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/http/zipball/f9f3d1fba8916fa2f4ec25636c4fedc26cb94e02",
"reference": "f9f3d1fba8916fa2f4ec25636c4fedc26cb94e02",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-curl": "*",
"ext-mbstring": "*",
"php": "^7.1 || ^8.0",
"sabre/event": ">=4.0 <6.0",
"sabre/uri": "^2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"suggest": {
"ext-curl": " to make http requests with the Client class"
},
"time": "2023-08-18T01:55:28+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/functions.php"
],
"psr-4": {
"Sabre\\HTTP\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "The sabre/http library provides utilities for dealing with http requests and responses. ",
"homepage": "https://github.com/fruux/sabre-http",
"keywords": [
"http"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/http/issues",
"source": "https://github.com/fruux/sabre-http"
},
"install-path": "../sabre/http"
},
"time": "2016-10-10T12:19:37+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
{
"name": "sabre/uri",
"version": "2.2.4",
"version_normalized": "2.2.4.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/uri.git",
"reference": "c0c9af9f7754e60a49ebd760e1708adc6d1510c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/uri/zipball/c0c9af9f7754e60a49ebd760e1708adc6d1510c0",
"reference": "c0c9af9f7754e60a49ebd760e1708adc6d1510c0",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.19.3",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"time": "2022-09-19T12:25:28+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/functions.php"
],
"psr-4": {
"Sabre\\Uri\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "Functions for making sense out of URIs.",
"homepage": "http://sabre.io/uri/",
"keywords": [
"rfc3986",
"uri",
"url"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/uri/issues",
"source": "https://github.com/fruux/sabre-uri"
},
"install-path": "../sabre/uri"
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
{
"name": "sabre/vobject",
"version": "4.5.4",
"version_normalized": "4.5.4.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/vobject.git",
"reference": "a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/vobject/zipball/a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772",
"reference": "a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": "^7.1 || ^8.0",
"sabre/xml": "^2.1 || ^3.0 || ^4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/php-invoker": "^2.0 || ^3.1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"suggest": {
"hoa/bench": "If you would like to run the benchmark scripts"
},
"time": "2023-11-09T12:54:37+00:00",
"bin": [
"bin/vobject",
"bin/generate_vcards"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Sabre\\VObject\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
},
{
"name": "Dominik Tobschall",
"email": "dominik@fruux.com",
"homepage": "http://tobschall.de/",
"role": "Developer"
},
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net",
"homepage": "http://mnt.io/",
"role": "Developer"
}
],
"description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects",
"homepage": "http://sabre.io/vobject/",
"keywords": [
"availability",
"freebusy",
"iCalendar",
"ical",
"ics",
"jCal",
"jCard",
"recurrence",
"rfc2425",
"rfc2426",
"rfc2739",
"rfc4770",
"rfc5545",
"rfc5546",
"rfc6321",
"rfc6350",
"rfc6351",
"rfc6474",
"rfc6638",
"rfc6715",
"rfc6868",
"vCalendar",
"vCard",
"vcf",
"xCal",
"xCard"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/vobject/issues",
"source": "https://github.com/fruux/sabre-vobject"
},
"install-path": "../sabre/vobject"
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
]
},
{
"name": "sabre/dav",
"version": "3.2.2",
"version_normalized": "3.2.2.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-dav.git",
"reference": "e987775e619728f12205606c9cc3ee565ffb1516"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-dav/zipball/e987775e619728f12205606c9cc3ee565ffb1516",
"reference": "e987775e619728f12205606c9cc3ee565ffb1516",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-date": "*",
"ext-dom": "*",
"ext-iconv": "*",
"ext-mbstring": "*",
"ext-pcre": "*",
"ext-simplexml": "*",
"ext-spl": "*",
"lib-libxml": ">=2.7.0",
"php": ">=5.5.0",
"psr/log": "^1.0",
"sabre/event": ">=2.0.0, <4.0.0",
"sabre/http": "^4.2.1",
"sabre/uri": "^1.0.1",
"sabre/vobject": "^4.1.0",
"sabre/xml": "^1.4.0"
},
"require-dev": {
"evert/phpdoc-md": "~0.1.0",
"monolog/monolog": "^1.18",
"phpunit/phpunit": "> 4.8, <6.0.0",
"sabre/cs": "^1.0.0"
},
"suggest": {
"ext-curl": "*",
"ext-pdo": "*"
},
"time": "2017-02-15T03:06:08+00:00",
"bin": [
"bin/sabredav",
"bin/naturalselection"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1.0-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Sabre\\DAV\\": "lib/DAV/",
"Sabre\\DAVACL\\": "lib/DAVACL/",
"Sabre\\CalDAV\\": "lib/CalDAV/",
"Sabre\\CardDAV\\": "lib/CardDAV/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "WebDAV Framework for PHP",
"homepage": "http://sabre.io/",
"keywords": [
"CalDAV",
"CardDAV",
"WebDAV",
"framework",
"iCalendar"
]
}
]
{
"name": "sabre/xml",
"version": "2.2.6",
"version_normalized": "2.2.6.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/xml.git",
"reference": "9cde7cdab1e50893cc83b037b40cd47bfde42a2b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/xml/zipball/9cde7cdab1e50893cc83b037b40cd47bfde42a2b",
"reference": "9cde7cdab1e50893cc83b037b40cd47bfde42a2b",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"lib-libxml": ">=2.6.20",
"php": "^7.1 || ^8.0",
"sabre/uri": ">=1.0,<3.0.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"time": "2023-06-28T12:56:05+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/Deserializer/functions.php",
"lib/Serializer/functions.php"
],
"psr-4": {
"Sabre\\Xml\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
},
{
"name": "Markus Staab",
"email": "markus.staab@redaxo.de",
"role": "Developer"
}
],
"description": "sabre/xml is an XML library that you may not hate.",
"homepage": "https://sabre.io/xml/",
"keywords": [
"XMLReader",
"XMLWriter",
"dom",
"xml"
],
"support": {
"forum": "https://groups.google.com/group/sabredav-discuss",
"issues": "https://github.com/sabre-io/xml/issues",
"source": "https://github.com/fruux/sabre-xml"
},
"install-path": "../sabre/xml"
}
],
"dev": false,
"dev-package-names": []
}

View file

@ -0,0 +1,86 @@
<?php return array(
'root' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'a2df2f2553a3f36892665f58c0e5a115a4d56038',
'name' => '__root__',
'dev' => false,
),
'versions' => array(
'__root__' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'a2df2f2553a3f36892665f58c0e5a115a4d56038',
'dev_requirement' => false,
),
'psr/log' => array(
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
'dev_requirement' => false,
),
'sabre/dav' => array(
'pretty_version' => '4.6.0',
'version' => '4.6.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/dav',
'aliases' => array(),
'reference' => '554145304b4a026477d130928d16e626939b0b2a',
'dev_requirement' => false,
),
'sabre/event' => array(
'pretty_version' => '5.1.4',
'version' => '5.1.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/event',
'aliases' => array(),
'reference' => 'd7da22897125d34d7eddf7977758191c06a74497',
'dev_requirement' => false,
),
'sabre/http' => array(
'pretty_version' => '5.1.10',
'version' => '5.1.10.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/http',
'aliases' => array(),
'reference' => 'f9f3d1fba8916fa2f4ec25636c4fedc26cb94e02',
'dev_requirement' => false,
),
'sabre/uri' => array(
'pretty_version' => '2.2.4',
'version' => '2.2.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/uri',
'aliases' => array(),
'reference' => 'c0c9af9f7754e60a49ebd760e1708adc6d1510c0',
'dev_requirement' => false,
),
'sabre/vobject' => array(
'pretty_version' => '4.5.4',
'version' => '4.5.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/vobject',
'aliases' => array(),
'reference' => 'a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772',
'dev_requirement' => false,
),
'sabre/xml' => array(
'pretty_version' => '2.2.6',
'version' => '2.2.6.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/xml',
'aliases' => array(),
'reference' => '9cde7cdab1e50893cc83b037b40cd47bfde42a2b',
'dev_requirement' => false,
),
),
);

View file

@ -0,0 +1,26 @@
<?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 70100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}

View file

@ -1 +0,0 @@
vendor

View file

@ -14,8 +14,8 @@ abstract class AbstractLogger implements LoggerInterface
/**
* System is unusable.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -30,8 +30,8 @@ abstract class AbstractLogger implements LoggerInterface
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -45,8 +45,8 @@ abstract class AbstractLogger implements LoggerInterface
*
* Example: Application component unavailable, unexpected exception.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -59,8 +59,8 @@ abstract class AbstractLogger implements LoggerInterface
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -75,8 +75,8 @@ abstract class AbstractLogger implements LoggerInterface
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -88,8 +88,8 @@ abstract class AbstractLogger implements LoggerInterface
/**
* Normal but significant events.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -103,8 +103,8 @@ abstract class AbstractLogger implements LoggerInterface
*
* Example: User logs in, SQL logs.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -116,8 +116,8 @@ abstract class AbstractLogger implements LoggerInterface
/**
* Detailed debug information.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/

View file

@ -10,7 +10,7 @@ trait LoggerAwareTrait
/**
* The logger instance.
*
* @var LoggerInterface
* @var LoggerInterface|null
*/
protected $logger;

View file

@ -22,8 +22,8 @@ interface LoggerInterface
/**
* System is unusable.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -35,8 +35,8 @@ interface LoggerInterface
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -47,8 +47,8 @@ interface LoggerInterface
*
* Example: Application component unavailable, unexpected exception.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -58,8 +58,8 @@ interface LoggerInterface
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -71,8 +71,8 @@ interface LoggerInterface
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -81,8 +81,8 @@ interface LoggerInterface
/**
* Normal but significant events.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -93,8 +93,8 @@ interface LoggerInterface
*
* Example: User logs in, SQL logs.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -103,8 +103,8 @@ interface LoggerInterface
/**
* Detailed debug information.
*
* @param string $message
* @param array $context
* @param string $message
* @param mixed[] $context
*
* @return void
*/
@ -113,11 +113,13 @@ interface LoggerInterface
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
* @param array $context
* @param mixed $level
* @param string $message
* @param mixed[] $context
*
* @return void
*
* @throws \Psr\Log\InvalidArgumentException
*/
public function log($level, $message, array $context = array());
}

View file

@ -135,6 +135,8 @@ trait LoggerTrait
* @param array $context
*
* @return void
*
* @throws \Psr\Log\InvalidArgumentException
*/
abstract public function log($level, $message, array $context = array());
}

View file

@ -20,6 +20,8 @@ class NullLogger extends AbstractLogger
* @param array $context
*
* @return void
*
* @throws \Psr\Log\InvalidArgumentException
*/
public function log($level, $message, array $context = array())
{

View file

@ -0,0 +1,18 @@
<?php
namespace Psr\Log\Test;
/**
* This class is internal and does not follow the BC promise.
*
* Do NOT use this class in any way.
*
* @internal
*/
class DummyTest
{
public function __toString()
{
return 'DummyTest';
}
}

View file

@ -4,6 +4,7 @@ namespace Psr\Log\Test;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
use PHPUnit\Framework\TestCase;
/**
* Provides a base test class for ensuring compliance with the LoggerInterface.
@ -11,7 +12,7 @@ use Psr\Log\LogLevel;
* Implementors can extend the class and implement abstract methods to run this
* as part of their test suite.
*/
abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
abstract class LoggerInterfaceTest extends TestCase
{
/**
* @return LoggerInterface
@ -101,6 +102,9 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
public function testContextCanContainAnything()
{
$closed = fopen('php://memory', 'r');
fclose($closed);
$context = array(
'bool' => true,
'null' => null,
@ -110,6 +114,7 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
'nested' => array('with object' => new DummyTest),
'object' => new \DateTime,
'resource' => fopen('php://memory', 'r'),
'closed' => $closed,
);
$this->getLogger()->warning('Crazy context data', $context);
@ -131,10 +136,3 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expected, $this->getLogs());
}
}
class DummyTest
{
public function __toString()
{
}
}

View file

@ -0,0 +1,147 @@
<?php
namespace Psr\Log\Test;
use Psr\Log\AbstractLogger;
/**
* Used for testing purposes.
*
* It records all records and gives you access to them for verification.
*
* @method bool hasEmergency($record)
* @method bool hasAlert($record)
* @method bool hasCritical($record)
* @method bool hasError($record)
* @method bool hasWarning($record)
* @method bool hasNotice($record)
* @method bool hasInfo($record)
* @method bool hasDebug($record)
*
* @method bool hasEmergencyRecords()
* @method bool hasAlertRecords()
* @method bool hasCriticalRecords()
* @method bool hasErrorRecords()
* @method bool hasWarningRecords()
* @method bool hasNoticeRecords()
* @method bool hasInfoRecords()
* @method bool hasDebugRecords()
*
* @method bool hasEmergencyThatContains($message)
* @method bool hasAlertThatContains($message)
* @method bool hasCriticalThatContains($message)
* @method bool hasErrorThatContains($message)
* @method bool hasWarningThatContains($message)
* @method bool hasNoticeThatContains($message)
* @method bool hasInfoThatContains($message)
* @method bool hasDebugThatContains($message)
*
* @method bool hasEmergencyThatMatches($message)
* @method bool hasAlertThatMatches($message)
* @method bool hasCriticalThatMatches($message)
* @method bool hasErrorThatMatches($message)
* @method bool hasWarningThatMatches($message)
* @method bool hasNoticeThatMatches($message)
* @method bool hasInfoThatMatches($message)
* @method bool hasDebugThatMatches($message)
*
* @method bool hasEmergencyThatPasses($message)
* @method bool hasAlertThatPasses($message)
* @method bool hasCriticalThatPasses($message)
* @method bool hasErrorThatPasses($message)
* @method bool hasWarningThatPasses($message)
* @method bool hasNoticeThatPasses($message)
* @method bool hasInfoThatPasses($message)
* @method bool hasDebugThatPasses($message)
*/
class TestLogger extends AbstractLogger
{
/**
* @var array
*/
public $records = [];
public $recordsByLevel = [];
/**
* @inheritdoc
*/
public function log($level, $message, array $context = [])
{
$record = [
'level' => $level,
'message' => $message,
'context' => $context,
];
$this->recordsByLevel[$record['level']][] = $record;
$this->records[] = $record;
}
public function hasRecords($level)
{
return isset($this->recordsByLevel[$level]);
}
public function hasRecord($record, $level)
{
if (is_string($record)) {
$record = ['message' => $record];
}
return $this->hasRecordThatPasses(function ($rec) use ($record) {
if ($rec['message'] !== $record['message']) {
return false;
}
if (isset($record['context']) && $rec['context'] !== $record['context']) {
return false;
}
return true;
}, $level);
}
public function hasRecordThatContains($message, $level)
{
return $this->hasRecordThatPasses(function ($rec) use ($message) {
return strpos($rec['message'], $message) !== false;
}, $level);
}
public function hasRecordThatMatches($regex, $level)
{
return $this->hasRecordThatPasses(function ($rec) use ($regex) {
return preg_match($regex, $rec['message']) > 0;
}, $level);
}
public function hasRecordThatPasses(callable $predicate, $level)
{
if (!isset($this->recordsByLevel[$level])) {
return false;
}
foreach ($this->recordsByLevel[$level] as $i => $rec) {
if (call_user_func($predicate, $rec, $i)) {
return true;
}
}
return false;
}
public function __call($method, $args)
{
if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) {
$genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3];
$level = strtolower($matches[2]);
if (method_exists($this, $genericMethod)) {
$args[] = $level;
return call_user_func_array([$this, $genericMethod], $args);
}
}
throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()');
}
public function reset()
{
$this->records = [];
$this->recordsByLevel = [];
}
}

View file

@ -7,6 +7,13 @@ This repository holds all interfaces/classes/traits related to
Note that this is not a logger of its own. It is merely an interface that
describes a logger. See the specification for more details.
Installation
------------
```bash
composer require psr/log
```
Usage
-----
@ -31,6 +38,12 @@ class Foo
if ($this->logger) {
$this->logger->info('Doing work');
}
try {
$this->doSomethingElse();
} catch (Exception $exception) {
$this->logger->error('Oh no!', array('exception' => $exception));
}
// do something useful
}

View file

@ -7,7 +7,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"require": {
@ -20,7 +20,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "1.1.x-dev"
}
}
}

View file

@ -1,73 +0,0 @@
language: php
sudo: required
branches:
only:
- master
php:
- 7.1
- 7.2
- 7.3
- 7.4
env:
global:
- SABRE_MYSQLUSER="root"
- SABRE_MYSQLPASS=""
- SABRE_MYSQLDSN="mysql:host=127.0.0.1;dbname=sabredav_test"
- RUN_PHPCSFIXER="TRUE"
- RUN_PHPUNIT="TRUE"
- RUN_PHPSTAN="FALSE"
matrix:
- PREFER_LOWEST="" TEST_DEPS="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml"
- PREFER_LOWEST="--prefer-lowest" TEST_DEPS="tests/Sabre/" REPORT_COVERAGE="FALSE" WITH_COVERAGE=""
matrix:
include:
- name: 'PHP8'
dist: bionic
php: 8.0
env:
- RUN_PHPCSFIXER="FALSE"
- REPORT_COVERAGE="FALSE"
- name: 'PHPStan'
php: 7.4
env:
- RUN_PHPCSFIXER="FALSE"
- RUN_PHPUNIT="FALSE"
- RUN_PHPSTAN="TRUE"
- REPORT_COVERAGE="FALSE"
- name: 'Test with streaming propfind'
php: 7.2
env:
- RUN_TEST_WITH_STREAMING_PROPFIND="TRUE"
- REPORT_COVERAGE="FALSE"
fast_finish: true
services:
- mysql
- postgresql
before_script:
- mysql -u root -h 127.0.0.1 -e 'create database sabredav_test'
- psql -c "create database sabredav_test" -U postgres
- psql -c "create user sabredav with PASSWORD 'sabredav';GRANT ALL PRIVILEGES ON DATABASE sabredav_test TO sabredav" -U postgres
- if [ $RUN_PHPCSFIXER == "FALSE" ]; then composer remove --no-update --dev friendsofphp/php-cs-fixer; fi
- composer update $PREFER_LOWEST
addons:
postgresql: "9.5"
script:
- if [ $RUN_PHPCSFIXER == "TRUE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
- if [ $RUN_PHPUNIT == "TRUE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE $TEST_DEPS; fi
- if [ $RUN_PHPUNIT == "TRUE" ]; then rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; fi
- if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi
after_success:
- if [ $REPORT_COVERAGE == "TRUE" ]; then bash <(curl -s https://codecov.io/bash); fi
cache:
directories:
- $HOME/.composer/cache

View file

@ -15,11 +15,11 @@
],
"require": {
"php": "^7.1.0 || ^8.0",
"sabre/vobject": "^4.5.1",
"sabre/event" : "^5.0.0",
"sabre/xml" : "^2.5.5",
"sabre/vobject": "^4.2.1",
"sabre/event" : "^5.0",
"sabre/xml" : "^2.0.1",
"sabre/http" : "^5.0.5",
"sabre/uri" : "^2.2.3",
"sabre/uri" : "^2.0",
"ext-dom": "*",
"ext-pcre": "*",
"ext-spl": "*",
@ -33,11 +33,11 @@
"ext-json": "*"
},
"require-dev" : {
"friendsofphp/php-cs-fixer": "^2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
"evert/phpdoc-md" : "~0.1.0",
"monolog/monolog": "^1.18"
"friendsofphp/php-cs-fixer": "^2.19",
"monolog/monolog": "^1.27 || ^2.0",
"phpstan/phpstan": "^0.12 || ^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6"
},
"suggest" : {
"ext-curl" : "*",
@ -46,21 +46,12 @@
},
"autoload": {
"psr-4" : {
"Sabre\\DAV\\" : "lib/DAV/",
"Sabre\\DAVACL\\" : "lib/DAVACL/",
"Sabre\\CalDAV\\" : "lib/CalDAV/",
"Sabre\\CardDAV\\" : "lib/CardDAV/"
"Sabre\\" : "lib/"
}
},
"autoload-dev" : {
"psr-4" : {
"Sabre\\" : "tests/Sabre/",
"Sabre\\CalDAV\\" : "tests/Sabre/CalDAV",
"Sabre\\CardDAV\\" : "tests/Sabre/CardDAV",
"Sabre\\DAV\\" : "tests/Sabre/DAV",
"Sabre\\DAV\\Property\\" : "tests/Sabre/DAV/Xml/Property",
"Sabre\\DAVACL\\" : "tests/Sabre/DAVACL",
"Sabre\\HTTP\\" : "tests/Sabre/HTTP"
"Sabre\\" : "tests/Sabre/"
}
},
"support" : {

View file

@ -78,7 +78,7 @@ abstract class AbstractBackend implements BackendInterface
*
* This default may well be good enough for personal use, and calendars
* that aren't very large. But if you anticipate high usage, big calendars
* or high loads, you are strongly adviced to optimize certain paths.
* or high loads, you are strongly advised to optimize certain paths.
*
* The best way to do so is override this method and to optimize
* specifically for 'common filters'.
@ -95,7 +95,7 @@ abstract class AbstractBackend implements BackendInterface
* Note that especially time-range-filters may be difficult to parse. A
* time-range filter specified on a VEVENT must for instance also handle
* recurrence rules correctly.
* A good example of how to interprete all these filters can also simply
* A good example of how to interpret all these filters can also simply
* be found in \Sabre\CalDAV\CalendarQueryFilter. This class is as correct
* as possible, so it gives you a good idea on what type of stuff you need
* to think of.

View file

@ -939,7 +939,7 @@ SQL;
* @param int $syncLevel
* @param int $limit
*
* @return array
* @return array|null
*/
public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null)
{

View file

@ -77,7 +77,7 @@ interface SyncSupport extends BackendInterface
* @param int $syncLevel
* @param int $limit
*
* @return array
* @return array|null
*/
public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null);
}

View file

@ -186,17 +186,17 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection,
* The contents of the new file must be a valid ICalendar string.
*
* @param string $name
* @param resource $calendarData
* @param resource $data
*
* @return string|null
*/
public function createFile($name, $calendarData = null)
public function createFile($name, $data = null)
{
if (is_resource($calendarData)) {
$calendarData = stream_get_contents($calendarData);
if (is_resource($data)) {
$data = stream_get_contents($data);
}
return $this->caldavBackend->createCalendarObject($this->calendarInfo['id'], $name, $calendarData);
return $this->caldavBackend->createCalendarObject($this->calendarInfo['id'], $name, $data);
}
/**
@ -442,7 +442,7 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection,
* @param int $syncLevel
* @param int $limit
*
* @return array
* @return array|null
*/
public function getChanges($syncToken, $syncLevel, $limit = null)
{

View file

@ -96,10 +96,10 @@ class CalendarHome implements DAV\IExtendedCollection, DAVACL\IACL
*
* This is currently not allowed
*
* @param string $filename
* @param string $name
* @param resource $data
*/
public function createFile($filename, $data = null)
public function createFile($name, $data = null)
{
throw new DAV\Exception\MethodNotAllowed('Creating new files in this collection is not supported');
}

View file

@ -30,13 +30,6 @@ class IMipPlugin extends DAV\ServerPlugin
*/
protected $senderEmail;
/**
* ITipMessage.
*
* @var ITip\Message
*/
protected $itipMessage;
/**
* Creates the email handler.
*

View file

@ -605,10 +605,9 @@ class Plugin extends ServerPlugin
*
* This method may update $newObject to add any status changes.
*
* @param VCalendar|string $oldObject
* @param array $ignore any addresses to not send messages to
* @param bool $modified a marker to indicate that the original object
* modified by this process
* @param VCalendar|string|null $oldObject
* @param array $ignore any addresses to not send messages to
* @param bool $modified a marker to indicate that the original object modified by this process
*/
protected function processICalendarChange($oldObject, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false)
{
@ -969,7 +968,7 @@ class Plugin extends ServerPlugin
*
* @return bool
*/
private function scheduleReply(RequestInterface $request)
protected function scheduleReply(RequestInterface $request)
{
$scheduleReply = $request->getHeader('Schedule-Reply');

View file

@ -53,7 +53,7 @@ class PropFilter implements XmlDeserializable
'is-not-defined' => false,
'param-filters' => [],
'text-match' => null,
'time-range' => false,
'time-range' => [],
];
$att = $reader->parseAttributes();

View file

@ -129,19 +129,19 @@ class AddressBook extends DAV\Collection implements IAddressBook, DAV\IPropertie
* This method may return an ETag.
*
* @param string $name
* @param resource $vcardData
* @param resource $data
*
* @return string|null
*/
public function createFile($name, $vcardData = null)
public function createFile($name, $data = null)
{
if (is_resource($vcardData)) {
$vcardData = stream_get_contents($vcardData);
if (is_resource($data)) {
$data = stream_get_contents($data);
}
// Converting to UTF-8, if needed
$vcardData = DAV\StringUtil::ensureUTF8($vcardData);
$data = DAV\StringUtil::ensureUTF8($data);
return $this->carddavBackend->createCard($this->addressBookInfo['id'], $name, $vcardData);
return $this->carddavBackend->createCard($this->addressBookInfo['id'], $name, $data);
}
/**
@ -317,7 +317,7 @@ class AddressBook extends DAV\Collection implements IAddressBook, DAV\IPropertie
* @param int $syncLevel
* @param int $limit
*
* @return array
* @return array|null
*/
public function getChanges($syncToken, $syncLevel, $limit = null)
{

View file

@ -92,10 +92,10 @@ class AddressBookHome extends DAV\Collection implements DAV\IExtendedCollection,
*
* This is currently not allowed
*
* @param string $filename
* @param string $name
* @param resource $data
*/
public function createFile($filename, $data = null)
public function createFile($name, $data = null)
{
throw new DAV\Exception\MethodNotAllowed('Creating new files in this collection is not supported');
}

View file

@ -452,7 +452,7 @@ class PDO extends AbstractBackend implements SyncSupport
* @param int $syncLevel
* @param int $limit
*
* @return array
* @return array|null
*/
public function getChangesForAddressBook($addressBookId, $syncToken, $syncLevel, $limit = null)
{

View file

@ -77,7 +77,7 @@ interface SyncSupport extends BackendInterface
* @param int $syncLevel
* @param int $limit
*
* @return array
* @return array|null
*/
public function getChangesForAddressBook($addressBookId, $syncToken, $syncLevel, $limit = null);
}

View file

@ -38,7 +38,7 @@ class AddressBookMultiGetReport implements XmlDeserializable
public $hrefs;
/**
* The mimetype of the content that should be returend. Usually
* The mimetype of the content that should be returned. Usually
* text/vcard.
*
* @var string
@ -53,6 +53,13 @@ class AddressBookMultiGetReport implements XmlDeserializable
*/
public $version = null;
/**
* An array with requested vcard properties.
*
* @var array
*/
public $addressDataProperties;
/**
* The deserialize method is called during xml parsing.
*

View file

@ -173,28 +173,99 @@ class Client extends HTTP\Client
$this->propertyMap = &$this->xml->elementMap;
}
/**
* Does a PROPFIND request with filtered response returning only available properties.
*
* The list of requested properties must be specified as an array, in clark
* notation.
*
* Depth should be either 0 or 1. A depth of 1 will cause a request to be
* made to the server to also return all child resources.
*
* For depth 0, just the array of properties for the resource is returned.
*
* For depth 1, the returned array will contain a list of resource names as keys,
* and an array of properties as values.
*
* The array of properties will contain the properties as keys with their values as the value.
* Only properties that are actually returned from the server without error will be
* returned, anything else is discarded.
*
* @param 1|0 $depth
*/
public function propFind($url, array $properties, $depth = 0): array
{
$result = $this->doPropFind($url, $properties, $depth);
// If depth was 0, we only return the top item
if (0 === $depth) {
reset($result);
$result = current($result);
return isset($result[200]) ? $result[200] : [];
}
$newResult = [];
foreach ($result as $href => $statusList) {
$newResult[$href] = isset($statusList[200]) ? $statusList[200] : [];
}
return $newResult;
}
/**
* Does a PROPFIND request with unfiltered response.
*
* The list of requested properties must be specified as an array, in clark
* notation.
*
* Depth should be either 0 or 1. A depth of 1 will cause a request to be
* made to the server to also return all child resources.
*
* For depth 0, just the multi-level array of status and properties for the resource is returned.
*
* For depth 1, the returned array will contain a list of resources as keys and
* a multi-level array containing status and properties as value.
*
* The multi-level array of status and properties is formatted the same as what is
* documented for parseMultiStatus.
*
* All properties that are actually returned from the server are returned by this method.
*
* @param 1|0 $depth
*/
public function propFindUnfiltered(string $url, array $properties, int $depth = 0): array
{
$result = $this->doPropFind($url, $properties, $depth);
// If depth was 0, we only return the top item
if (0 === $depth) {
reset($result);
return current($result);
} else {
return $result;
}
}
/**
* Does a PROPFIND request.
*
* The list of requested properties must be specified as an array, in clark
* notation.
*
* The returned array will contain a list of filenames as keys, and
* properties as values.
*
* The properties array will contain the list of properties. Only properties
* that are actually returned from the server (without error) will be
* returned, anything else is discarded.
*
* Depth should be either 0 or 1. A depth of 1 will cause a request to be
* made to the server to also return all child resources.
*
* @param string $url
* @param int $depth
* The returned array will contain a list of resources as keys and
* a multi-level array containing status and properties as value.
*
* @return array
* The multi-level array of status and properties is formatted the same as what is
* documented for parseMultiStatus.
*
* @param 1|0 $depth
*/
public function propFind($url, array $properties, $depth = 0)
private function doPropFind($url, array $properties, $depth = 0): array
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
@ -232,22 +303,7 @@ class Client extends HTTP\Client
throw new HTTP\ClientHttpException($response);
}
$result = $this->parseMultiStatus($response->getBodyAsString());
// If depth was 0, we only return the top item
if (0 === $depth) {
reset($result);
$result = current($result);
return isset($result[200]) ? $result[200] : [];
}
$newResult = [];
foreach ($result as $href => $statusList) {
$newResult[$href] = isset($statusList[200]) ? $statusList[200] : [];
}
return $newResult;
return $this->parseMultiStatus($response->getBodyAsString());
}
/**
@ -385,7 +441,7 @@ class Client extends HTTP\Client
{
return Uri\resolve(
$this->baseUri,
$url
(string) $url
);
}

View file

@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace Sabre\DAV;
/**
* INodeByPath.
*
* This interface adds a tiny bit of functionality to collections.
*
* Getting a node that is deep in the tree normally requires going trough each parent node
* which can cause a significant performance overhead.
*
* Implementing this interface allows solving this overhead by directly jumping to the target node.
*
* @copyright Copyright (C) Robin Appelman (https://icewind.nl/)
* @author Robin Appelman (https://icewind.nl/)
* @license http://sabre.io/license/ Modified BSD License
*/
interface INodeByPath
{
/**
* Returns the INode object for the requested path.
*
* In case where this collection can not retrieve the requested node
* but also can not determine that the node does not exists,
* null should be returned to signal that the caller should fallback
* to walking the directory tree.
*
* @param string $path
*
* @return INode|null
*/
public function getNodeForPath($path);
}

View file

@ -84,7 +84,7 @@ interface ISyncCollection extends DAV\ICollection
* @param int $syncLevel
* @param int $limit
*
* @return array
* @return array|null
*/
public function getChanges($syncToken, $syncLevel, $limit = null);
}

View file

@ -16,7 +16,7 @@ use Sabre\Uri;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
class Tree
class Tree implements INodeByPath
{
/**
* The root node.
@ -62,20 +62,26 @@ class Tree
return $this->rootNode;
}
// Attempting to fetch its parent
list($parentName, $baseName) = Uri\split($path);
$parts = explode('/', $path);
$node = $this->rootNode;
// If there was no parent, we must simply ask it from the root node.
if ('' === $parentName) {
$node = $this->rootNode->getChild($baseName);
} else {
// Otherwise, we recursively grab the parent and ask him/her.
$parent = $this->getNodeForPath($parentName);
if (!($parent instanceof ICollection)) {
while (count($parts)) {
if (!($node instanceof ICollection)) {
throw new Exception\NotFound('Could not find node at path: '.$path);
}
$node = $parent->getChild($baseName);
if ($node instanceof INodeByPath) {
$targetNode = $node->getNodeForPath(implode('/', $parts));
if ($targetNode instanceof Node) {
$node = $targetNode;
break;
}
}
$part = array_shift($parts);
if ('' !== $part) {
$node = $node->getChild($part);
}
}
$this->cache[$path] = $node;

View file

@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
const VERSION = '4.4.0';
public const VERSION = '4.6.0';
}

View file

@ -40,7 +40,7 @@ class Response implements Element
*
* This is currently only used in WebDAV-Sync
*
* @var string
* @var string|null
*/
protected $httpStatus;
@ -112,13 +112,21 @@ class Response implements Element
*/
public function xmlSerialize(Writer $writer)
{
if ($status = $this->getHTTPStatus()) {
$writer->writeElement('{DAV:}status', 'HTTP/1.1 '.$status.' '.\Sabre\HTTP\Response::$statusCodes[$status]);
}
/*
* Accordingly to the RFC the element looks like:
* <!ELEMENT response (href, ((href*, status)|(propstat+)), error?, responsedescription? , location?) >
*
* So the response
* - MUST contain a href and
* - EITHER a status and additional href(s)
* OR one or more propstat(s)
*/
$writer->writeElement('{DAV:}href', $writer->contextUri.\Sabre\HTTP\encodePath($this->getHref()));
$empty = true;
$httpStatus = $this->getHTTPStatus();
// Add propstat elements
foreach ($this->getResponseProperties() as $status => $properties) {
// Skipping empty lists
if (!$properties || (!is_int($status) && !ctype_digit($status))) {
@ -130,19 +138,25 @@ class Response implements Element
$writer->writeElement('{DAV:}status', 'HTTP/1.1 '.$status.' '.\Sabre\HTTP\Response::$statusCodes[$status]);
$writer->endElement(); // {DAV:}propstat
}
// The WebDAV spec only allows the status element on responses _without_ a propstat
if ($empty) {
/*
* The WebDAV spec _requires_ at least one DAV:propstat to appear for
* every DAV:response. In some circumstances however, there are no
* properties to encode.
*
* In those cases we MUST specify at least one DAV:propstat anyway, with
* no properties.
*/
$writer->writeElement('{DAV:}propstat', [
'{DAV:}prop' => [],
'{DAV:}status' => 'HTTP/1.1 418 '.\Sabre\HTTP\Response::$statusCodes[418],
]);
if (null !== $httpStatus) {
$writer->writeElement('{DAV:}status', 'HTTP/1.1 '.$httpStatus.' '.\Sabre\HTTP\Response::$statusCodes[$httpStatus]);
} else {
/*
* The WebDAV spec _requires_ at least one DAV:propstat to appear for
* every DAV:response if there is no status.
* In some circumstances however, there are no properties to encode.
*
* In those cases we MUST specify at least one DAV:propstat anyway, with
* no properties.
*/
$writer->writeElement('{DAV:}propstat', [
'{DAV:}prop' => [],
'{DAV:}status' => 'HTTP/1.1 418 '.\Sabre\HTTP\Response::$statusCodes[418],
]);
}
}
}

Some files were not shown because too many files have changed in this diff Show more