From 4da75c4251752262b56b7831ef622328ded7e38d Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 12 Oct 2020 16:11:56 +0200 Subject: [PATCH 1/3] fix : undefined index --- htdocs/core/class/conf.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 32d7b145a41..3d6526690a7 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -203,7 +203,7 @@ class Conf { $modulename = strtolower($reg[1]); $partname = strtolower($reg[2]); - if (!is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } + if (!isset($this->modules_parts[$partname]) || !is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } $arrValue = json_decode($value, true); if (is_array($arrValue) && !empty($arrValue)) $value = $arrValue; elseif (in_array($partname, array('login', 'menus', 'substitutions', 'triggers', 'tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/'; From d158716cccdc6bda501b80239507c213ba5da098 Mon Sep 17 00:00:00 2001 From: Givriz Date: Mon, 12 Oct 2020 17:41:03 +0200 Subject: [PATCH 2/3] Fix : correction de commentaires MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correction de commentaires (passage de français à anglais ou correction d'un mauvais anglais). Il reste beaucoup à faire, mais je fais un premier PR pour vérifier que cela marche. --- htdocs/fourn/facture/paiement.php | 8 ++++---- htdocs/fourn/paiement/card.php | 12 ++++++------ htdocs/projet/card.php | 2 +- htdocs/projet/contact.php | 6 +++--- htdocs/projet/ganttview.php | 6 +++--- htdocs/projet/list.php | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 8c2fdbdb5b6..bd5950151eb 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -245,7 +245,7 @@ if (empty($reshook)) { $action = 'create'; } - // Le reste propre a cette action s'affiche en bas de page. + // All the next of this action is displayed at the page's bottom. } @@ -292,7 +292,7 @@ if (empty($reshook)) $thirdparty = new Societe($db); if ($socid > 0) $thirdparty->fetch($socid); - // Creation de la ligne paiement + // Creation of payment line $paiement = new PaiementFourn($db); $paiement->datepaye = $datepaye; $paiement->amounts = $amounts; // Array of amounts @@ -521,7 +521,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $sql .= " WHERE f.entity = ".$conf->entity; $sql .= ' AND f.fk_soc = '.$object->socid; $sql .= ' AND f.paye = 0'; - $sql .= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee + $sql .= ' AND f.fk_statut = 1'; // Status=0 => unvalidated, Status=2 => canceled if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE) { $sql .= ' AND f.type IN (0,1,3,5)'; // Standard invoice, replacement, deposit, situation @@ -756,7 +756,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } } - // Bouton Enregistrer + // Save Button if ($action != 'add_paiement') { print '
'.$langs->trans("ClosePaidInvoicesAutomatically"); diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 82c6e1d18d3..7ea1958c9e2 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -128,7 +128,7 @@ if ($action == 'setdatep' && !empty($_POST['datepday'])) // Build document $upload_dir = $conf->fournisseur->payment->dir_output; -// TODO: get the appropriate permisson +// TODO: get the appropriate permission $permissiontoadd = true; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -151,7 +151,7 @@ dol_fiche_head($head, 'payment', $langs->trans('SupplierPayment'), -1, 'payment' if ($result > 0) { /* - * Confirmation de la suppression du paiement + * Confirmation of payment's delete */ if ($action == 'delete') { @@ -159,7 +159,7 @@ if ($result > 0) } /* - * Confirmation de la validation du paiement + * Confirmation of payment's validation */ if ($action == 'valide') { @@ -181,7 +181,7 @@ if ($result > 0) print $form->showrefnav($object,'id','',1,'rowid','ref'); print '';*/ - // Date payment + // Date of payment print ''.$form->editfieldkey("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer).''; print $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer, 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded')); print ''; @@ -251,7 +251,7 @@ if ($result > 0) print '
'; /** - * List of vendor invoices + * List of seller's invoices */ $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.datef as date, f.fk_statut as status,'; $sql .= ' pf.amount, s.nom as name, s.rowid as socid'; @@ -332,7 +332,7 @@ if ($result > 0) /* - * Boutons Actions + * Actions Buttons */ print '
'; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index db38e3c02d7..c7e22bfb5cd 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1183,7 +1183,7 @@ if ($action == 'create' && $user->rights->projet->creer) } /* - * Boutons actions + * Actions Buttons */ print '
'; $parameters = array(); diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 8bbdbed9e6a..471e50139f5 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -84,7 +84,7 @@ if ($action == 'addcontact' && $user->rights->projet->creer) } } -// bascule du statut d'un contact +// Change contact's status if ($action == 'swapstatut' && $user->rights->projet->creer) { if ($object->fetch($id)) @@ -95,7 +95,7 @@ if ($action == 'swapstatut' && $user->rights->projet->creer) } } -// Efface un contact +// Delete a contact if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->projet->creer) { $object->fetch($id); @@ -128,7 +128,7 @@ $userstatic = new User($db); /* *************************************************************************** */ /* */ -/* Mode vue et edition */ +/* Edition and view mode */ /* */ /* *************************************************************************** */ diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index f15e6d4900f..ed775c0ea35 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -239,7 +239,7 @@ $linktotasks = dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt $linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly btnTitleSelected')); //print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1); -print load_fiche_titre($title, $linktotasks.'   '.$linktocreatetask, 'projecttask'); +print load_fiche_titre($title, $linktotasks.'   '.$linktocreatetask, 'generic'); // Get list of tasks in tasksarray and taskarrayfiltered @@ -262,14 +262,14 @@ if (count($tasksarray) > 0) $tasks = array(); $task_dependencies = array(); $taskcursor = 0; - foreach ($tasksarray as $key => $val) // Task array are sorted by "project, position, dateo" + foreach ($tasksarray as $key => $val) // Task array are sorted by "project, position, date" { $task->fetch($val->id, ''); $idparent = ($val->fk_parent ? $val->fk_parent : '-'.$val->fk_project); // If start with -, id is a project id $tasks[$taskcursor]['task_id'] = $val->id; - $tasks[$taskcursor]['task_alternate_id'] = ($taskcursor + 1); // An id that has same order than position (requird by ganttchart) + $tasks[$taskcursor]['task_alternate_id'] = ($taskcursor + 1); // An id that has same order than position (required by ganttchart) $tasks[$taskcursor]['task_project_id'] = $val->fk_project; $tasks[$taskcursor]['task_parent'] = $idparent; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 42f84c157a8..1f32494a72c 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -284,7 +284,7 @@ $formproject = new FormProjets($db); $title = $langs->trans("Projects"); -// Get list of project id allowed to user (in a string list separated by coma) +// Get list of project id allowed to user (in a string list separated by comma) $projectsListId = ''; if (!$user->rights->projet->all->lire) $projectsListId = $object->getProjectsAuthorizedForUser($user, 0, 1, $socid); @@ -386,7 +386,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller than paging size (filtering), goto and load page 0 { $page = 0; $offset = 0; From 276783a709e301306b0c2e4e50ce7ee28f386040 Mon Sep 17 00:00:00 2001 From: Damien BENOIT <48482664+Givriz@users.noreply.github.com> Date: Mon, 12 Oct 2020 18:36:13 +0200 Subject: [PATCH 3/3] Essai de revalidation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Une ligne n'était pas synchronisée avec le projet upstream. --- htdocs/projet/ganttview.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index ed775c0ea35..3ddd0402db7 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -239,7 +239,7 @@ $linktotasks = dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt $linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly btnTitleSelected')); //print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1); -print load_fiche_titre($title, $linktotasks.'   '.$linktocreatetask, 'generic'); +print load_fiche_titre($title, $linktotasks.'   '.$linktocreatetask, 'projecttask'); // Get list of tasks in tasksarray and taskarrayfiltered