Merge branch '16.0' into FIX#23087

This commit is contained in:
Laurent Destailleur 2022-12-22 13:46:36 +01:00 committed by GitHub
commit 17efd55af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 13 deletions

View File

@ -82,13 +82,13 @@ before_install:
install:
- |
echo "Updating Composer"
rm $TRAVIS_BUILD_DIR/composer.json
rm $TRAVIS_BUILD_DIR/composer.lock
echo "Updating Composer (version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)"
#rm $TRAVIS_BUILD_DIR/composer.json
#rm $TRAVIS_BUILD_DIR/composer.lock
composer -V
composer self-update
composer -n init
composer -n config vendor-dir htdocs/includes
composer self-update 2.4.4
#composer -n init
#composer -n config vendor-dir htdocs/includes
composer -n config -g vendor-dir htdocs/includes
echo

View File

@ -27,6 +27,7 @@ Permission56003=Delete tickets
Permission56004=Manage tickets
Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on)
Tickets=Tickets
TicketDictType=Ticket - Types
TicketDictCategory=Ticket - Groupes
TicketDictSeverity=Ticket - Severities

View File

@ -55,7 +55,6 @@ global $langs, $user;
// Libraries
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
require_once '../lib/mymodule.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
//require_once "../class/myclass.class.php";
// Translations

View File

@ -489,11 +489,11 @@ llxHeader("", $title, $help_url);
$titleboth = $langs->trans("LeadsOrProjects");
$titlenew = $langs->trans("NewLeadOrProject"); // Leads and opportunities by default
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
if (!getDolGlobalInt('PROJECT_USE_OPPORTUNITIES')) {
$titleboth = $langs->trans("Projects");
$titlenew = $langs->trans("NewProject");
}
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
if (getDolGlobalInt('PROJECT_USE_OPPORTUNITIES') == 2) { // 2 = leads only
$titleboth = $langs->trans("Leads");
$titlenew = $langs->trans("NewLead");
}

View File

@ -164,7 +164,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$search_date_update = '';
$search_task_ref = '';
$search_task_label = '';
$search_user = 0;
$search_user = -1;
$search_valuebilled = '';
$toselect = array();
$search_array_options = array();
@ -1346,7 +1346,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
if (empty($search_user)) {
$search_user = $user->id;
}
$sql .= " AND t.fk_user = ".((int) $search_user);
if ($search_user > 0) $sql .= " AND t.fk_user = ".((int) $search_user);
}
if ($search_note) {

View File

@ -46,6 +46,7 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1;
*/
class AdminLibTest extends PHPUnit\Framework\TestCase
{
protected $backupGlobalsBlacklist = array('conf', 'user', 'langs', 'db');
protected $savconf;
protected $savuser;
protected $savlangs;
@ -69,6 +70,7 @@ class AdminLibTest extends PHPUnit\Framework\TestCase
$this->savdb=$db;
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
//print " - db ".$db->db;
print "\n";
}

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE phpunit SYSTEM "phpunit.dtd" >
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
backupGlobals="false"
backupStaticAttributes="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"