add upload on recruitment job and fix CI (#35880)
* add upload on recruitment job * add upload on recruitment job * fix * fix * fix * fix * fix * fix * fix
This commit is contained in:
parent
73c559b9d5
commit
acb1bc22c4
9 changed files with 33 additions and 41 deletions
|
|
@ -16062,24 +16062,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/takepos/send.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$user might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/takepos/smpcb.php
|
||||
|
||||
-
|
||||
message: '#^Right side of && is always true\.$#'
|
||||
identifier: booleanAnd.rightAlwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/takepos/split.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$fontlist might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../../htdocs/theme/eldy/btn.inc.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
|
|
|
|||
|
|
@ -263,34 +263,34 @@ if (empty($error) && !empty($xml)) {
|
|||
$moduledir = strtolower(preg_replace('/^mod/i', '', get_class($objMod)));
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
|
||||
|
||||
$text = '<span class="opacitymedium">'.$langs->trans("LastActivationDate").':</span> ';
|
||||
$htmltooltip = '<span class="opacitymedium">'.$langs->trans("LastActivationDate").':</span> ';
|
||||
if (getDolGlobalString($const_name)) {
|
||||
$text .= dol_print_date($objMod->getLastActivationDate(), 'dayhour');
|
||||
$htmltooltip .= dol_print_date($objMod->getLastActivationDate(), 'dayhour');
|
||||
} else {
|
||||
$text .= $langs->trans("Disabled");
|
||||
$htmltooltip .= $langs->trans("Disabled");
|
||||
}
|
||||
$tmp = $objMod->getLastActivationInfo();
|
||||
$authorid = (empty($tmp['authorid']) ? '' : $tmp['authorid']);
|
||||
if ($authorid > 0) {
|
||||
$tmpuser = new User($db);
|
||||
$tmpuser->fetch($authorid);
|
||||
$text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationAuthor").':</span> ';
|
||||
$text .= $tmpuser->getNomUrl(0, 'nolink', -1, 1);
|
||||
$htmltooltip .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationAuthor").':</span> ';
|
||||
$htmltooltip .= $tmpuser->getNomUrl(0, 'nolink', -1, 1);
|
||||
}
|
||||
$ip = (empty($tmp['ip']) ? '' : $tmp['ip']);
|
||||
if ($ip) {
|
||||
$text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationIP").':</span> ';
|
||||
$text .= $ip;
|
||||
$htmltooltip .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationIP").':</span> ';
|
||||
$htmltooltip .= $ip;
|
||||
}
|
||||
$lastactivationversion = (empty($tmp['lastactivationversion']) ? '' : $tmp['lastactivationversion']);
|
||||
if ($lastactivationversion && $lastactivationversion != 'dolibarr') {
|
||||
$text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationVersion").':</span> ';
|
||||
$text .= $lastactivationversion;
|
||||
$htmltooltip .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationVersion").':</span> ';
|
||||
$htmltooltip .= $lastactivationversion;
|
||||
}
|
||||
|
||||
$out .= $form->textwithpicto('', $text);
|
||||
$out .= $form->textwithpicto('', $htmltooltip);
|
||||
|
||||
$out . '</td>'."\n";
|
||||
$out .= "</td>\n";
|
||||
$out .= "</tr>\n";
|
||||
}
|
||||
|
||||
|
|
@ -510,8 +510,7 @@ if (empty($error) && !empty($xml)) {
|
|||
|
||||
// Scan scripts
|
||||
/*
|
||||
if (is_object($xml->dolibarr_script_dir[0]))
|
||||
{
|
||||
if (is_object($xml->dolibarr_script_dir[0])) {
|
||||
$file_list = array();
|
||||
$ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', ???, $checksumconcat); // Fill array $file_list
|
||||
'@phan-var-force array{insignature:string[],missing?:array<array{filename:string,expectedmd5:string,expectedsize:string}>,updated:array<array{filename:string,expectedmd5:string,expectedsize:string,md5:string}>} $file_list';
|
||||
|
|
@ -530,10 +529,6 @@ if (empty($error) && !empty($xml)) {
|
|||
$nameofsection = 'dolibarr_htdocs_dir_checksum';
|
||||
$checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum);
|
||||
}
|
||||
//var_dump(count($file_list['added']));
|
||||
//var_dump($checksumget);
|
||||
//var_dump($checksumtoget);
|
||||
//var_dump($checksumget == $checksumtoget);
|
||||
|
||||
$resultcomment = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2023-2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -163,10 +164,10 @@ abstract class DolibarrTriggers
|
|||
/**
|
||||
* setErrorsFromObject
|
||||
*
|
||||
* @param CommonObject $object Object
|
||||
* @param CommonObject|BlockedLog $object Object
|
||||
* @return void
|
||||
*/
|
||||
public function setErrorsFromObject(CommonObject $object)
|
||||
public function setErrorsFromObject($object)
|
||||
{
|
||||
if (!empty($object->error)) {
|
||||
$this->errors = array_merge($this->errors, array($object->error));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -75,7 +76,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
|
|||
if (!is_object($object) || !property_exists($object, 'element') || !in_array($object->element, $listofqualifiedelement)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** @var Facture|Don|Paiement|PaymentDonation|Subscription|PaymentVarious|CashControl $object */
|
||||
dol_syslog("Trigger '".$this->name."' for action '".$action."' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
||||
|
|
@ -104,8 +105,10 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
|
|||
if (in_array($action, array(
|
||||
'MEMBER_SUBSCRIPTION_CREATE', 'MEMBER_SUBSCRIPTION_MODIFY', 'MEMBER_SUBSCRIPTION_DELETE',
|
||||
'DON_VALIDATE', 'DON_MODIFY', 'DON_DELETE'))) {
|
||||
/** @var Don|Subscription $object */
|
||||
$amounts = (float) $object->amount;
|
||||
} elseif ($action == 'CASHCONTROL_VALIDATE') {
|
||||
/** @var CashControl $object */
|
||||
$amounts = (float) $object->cash + (float) $object->cheque + (float) $object->card;
|
||||
} elseif (property_exists($object, 'total_ttc')) {
|
||||
$amounts = (float) $object->total_ttc;
|
||||
|
|
|
|||
|
|
@ -809,7 +809,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
* Generated documents
|
||||
*/
|
||||
$subdir = dol_sanitizeFileName($projectstatic->ref)."/".dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->project->multidir_output[$object->entity]."/".$subdir;
|
||||
$filedir = $conf->project->multidir_output[$object->entity ?? $conf->entity]."/".$subdir;
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = ($user->hasRight('projet', 'lire'));
|
||||
$delallowed = ($user->hasRight('projet', 'creer'));
|
||||
|
|
|
|||
|
|
@ -111,14 +111,14 @@ if ($reshook < 0) {
|
|||
if (empty($reshook)) {
|
||||
$error = 0;
|
||||
|
||||
$backurlforlist = dol_buildpath('/recruitment/recruitmentjobposition_list.php', 1);
|
||||
$backurlforlist = dolBuildUrl(DOL_URL_ROOT.'/recruitment/recruitmentjobposition_list.php');
|
||||
|
||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
||||
$backtopage = $backurlforlist;
|
||||
} else {
|
||||
$backtopage = dol_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
|
||||
$backtopage = dolBuildUrl(DOL_URL_ROOT.'/recruitment/recruitmentjobposition_card.php', ['id' => ((!empty($id) && $id > 0) ? $id : '__ID__')]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -210,7 +210,7 @@ if ($action == 'create') {
|
|||
$_POST['fk_user_recruiter'] = $user->id;
|
||||
}
|
||||
|
||||
print dol_get_fiche_head(array(), '');
|
||||
print dol_get_fiche_head([], '');
|
||||
|
||||
print '<table class="border centpercent tableforfieldcreate">'."\n";
|
||||
|
||||
|
|
@ -268,7 +268,7 @@ if (($id || $ref) && $action == 'edit') {
|
|||
// Part to show record
|
||||
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
|
||||
$head = recruitmentjobpositionPrepareHead($object);
|
||||
print dol_get_fiche_head($head, 'card', $langs->trans("RecruitmentJobPosition"), -1, $object->picto);
|
||||
print dol_get_fiche_head($head, 'card', $langs->trans("RecruitmentJobPosition"), -1, $object->picto, 0, '', '', 0, '', 1);
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ if ($object->id && $upload_dir !== null) {
|
|||
*/
|
||||
$head = recruitmentjobpositionPrepareHead($object);
|
||||
|
||||
print dol_get_fiche_head($head, 'document', $langs->trans("RecruitmentJobPosition"), -1, $object->picto);
|
||||
print dol_get_fiche_head($head, 'document', $langs->trans("RecruitmentJobPosition"), -1, $object->picto, 0, '', '', 0, '', 1);
|
||||
|
||||
|
||||
// Build file list
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -36,6 +37,9 @@ if (!defined('NOREQUIREAJAX')) {
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
/**
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
if (!$user->hasRight('takepos', 'run')) {
|
||||
accessforbidden();
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
|
|||
* @var string $butactionbg
|
||||
* @var string $colortextlink
|
||||
* @var int $dol_optimize_smallscreen
|
||||
* @var string $fontlist
|
||||
* @var string $textbutaction
|
||||
* @var int<0,max> $nbtopmenuentries
|
||||
* @var string $right
|
||||
|
|
|
|||
Loading…
Reference in a new issue