From 42ddf7e27be41eddff756a67cfb4c686a14f7678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 20:45:03 +0100 Subject: [PATCH 01/14] doxygen --- htdocs/core/class/openid.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/openid.class.php b/htdocs/core/class/openid.class.php index 0d382a78589..b2a265c47d5 100644 --- a/htdocs/core/class/openid.class.php +++ b/htdocs/core/class/openid.class.php @@ -101,7 +101,7 @@ class SimpleOpenID /** * SetRequiredFields * - * @param string $a Server + * @param string|array $a Server * @return void */ public function SetRequiredFields($a) @@ -118,7 +118,7 @@ class SimpleOpenID /** * SetOptionalFields * - * @param string $a Server + * @param string|array $a Server * @return void */ public function SetOptionalFields($a) From 2f3ff6628db3489d1cfed8f462a5a74145801df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 20:51:48 +0100 Subject: [PATCH 02/14] The variable $obj does not seem to be defined The variable $obj does not seem to be defined for all execution paths leading up to this point. --- htdocs/core/modules/printing/printipp.modules.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index 0a9cb1210ee..5d840cb5ca3 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -1,6 +1,6 @@ + * Copyright (C) 2014-2020 Frederic France * * 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 @@ -141,6 +141,8 @@ class printing_printipp extends PrintingDriver $ipp->setPort($this->port); $ipp->setJobName($file, true); $ipp->setUserName($this->userid); + // Set default number of copy + $ipp->setCopies(1); if (!empty($this->user)) $ipp->setAuthentication($this->user, $this->password); // select printer uri for module order, propal,... @@ -148,10 +150,11 @@ class printing_printipp extends PrintingDriver $result = $this->db->query($sql); if ($result) { $obj = $this->db->fetch_object($result); - if ($obj) - { + if ($obj) { dol_syslog("Found a default printer for user ".$user->id." = ".$obj->printer_id); $ipp->setPrinterURI($obj->printer_id); + // Set number of copy + $ipp->setCopies($obj->copy); } else { if (!empty($conf->global->PRINTIPP_URI_DEFAULT)) { @@ -167,8 +170,6 @@ class printing_printipp extends PrintingDriver dol_print_error($this->db); } - // Set number of copy - $ipp->setCopies($obj->copy); $fileprint = $conf->{$module}->dir_output; if ($subdir != '') $fileprint .= '/'.$subdir; $fileprint .= '/'.$file; From c4b13b154e314cbd1583cf651781fa54854bee78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 21:00:23 +0100 Subject: [PATCH 03/14] doxygen --- htdocs/user/clicktodial.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 339cb794c12..a97d011a2e2 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; // Load translation files required by page $langs->loadLangs(array('users', 'admin')); -$action = GETPOST('action', 'aZ09'); -$id = GETPOST('id', 'int'); +$action = (string) GETPOST('action', 'aZ09'); +$id = (int) GETPOST('id', 'int'); // Security check $socid = 0; @@ -54,14 +54,13 @@ if (empty($reshook)) { $edituser = new User($db); $edituser->fetch($id); - $edituser->clicktodial_url = GETPOST("url"); - $edituser->clicktodial_login = GETPOST("login"); - $edituser->clicktodial_password = GETPOST("password"); - $edituser->clicktodial_poste = GETPOST("poste"); + $edituser->clicktodial_url = (string) GETPOST("url", "alpha"); + $edituser->clicktodial_login = (string) GETPOST("login", "alpha"); + $edituser->clicktodial_password = (string) GETPOST("password", "alpha"); + $edituser->clicktodial_poste = (string) GETPOST("poste", "alpha"); $result = $edituser->update_clicktodial(); - if ($result < 0) - { + if ($result < 0) { setEventMessages($edituser->error, $edituser->errors, 'errors'); } } From 0448a76df560faf65a3c7e3b3bca0fa82388ad4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 21:13:00 +0100 Subject: [PATCH 04/14] doxygen --- .../class/opensurveysondage.class.php | 70 +++++++++++-------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index f8f6cb0f885..4b8ac089591 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2014 Marcos García + * Copyright (C) 2020 Frédéric France * * 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 @@ -60,7 +61,14 @@ class Opensurveysondage extends CommonObject */ public $description; + /** + * @var string email admin + */ public $mail_admin; + + /** + * @var admin name + */ public $nom_admin; /** @@ -75,10 +83,21 @@ class Opensurveysondage extends CommonObject public $title; public $date_fin = ''; + + /** + * @var int status + */ public $status = 1; public $format; + + /** + * @var int mailsonde + */ public $mailsonde; + /** + * @var string subject + */ public $sujet; /** @@ -133,8 +152,7 @@ class Opensurveysondage extends CommonObject $this->cleanParameters(); // Check parameters - if (!$this->date_fin > 0) - { + if (!$this->date_fin > 0) { $this->error = 'BadValueForEndDate'; dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -1; @@ -156,10 +174,10 @@ class Opensurveysondage extends CommonObject $sql .= ") VALUES ("; $sql .= "'".$this->db->escape($this->id_sondage)."',"; $sql .= " ".(empty($this->description) ? 'NULL' : "'".$this->db->escape($this->description)."'").","; - $sql .= " ".$user->id.","; + $sql .= " ".(int) $user->id.","; $sql .= " '".$this->db->escape($this->title)."',"; $sql .= " '".$this->db->idate($this->date_fin)."',"; - $sql .= " ".$this->status.","; + $sql .= " ".(int) $this->status.","; $sql .= " '".$this->db->escape($this->format)."',"; $sql .= " ".$this->db->escape($this->mailsonde).","; $sql .= " ".$this->db->escape($this->allow_comments).","; @@ -173,17 +191,13 @@ class Opensurveysondage extends CommonObject $resql = $this->db->query($sql); if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { - global $langs, $conf; + if (!$error && !$notrigger) + global $langs, $conf; - // Call trigger - $result = $this->call_trigger('OPENSURVEY_CREATE', $user); - if ($result < 0) $error++; - // End call triggers - } + // Call trigger + $result = $this->call_trigger('OPENSURVEY_CREATE', $user); + if ($result < 0) $error++; + // End call triggers } // Commit or rollback @@ -310,10 +324,12 @@ class Opensurveysondage extends CommonObject dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; + $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('OPENSURVEY_MODIFY', $user); if ($result < 0) $error++; @@ -356,15 +372,11 @@ class Opensurveysondage extends CommonObject $this->db->begin(); - if (!$error) - { - if (!$notrigger) - { - // Call trigger - $result = $this->call_trigger('OPENSURVEY_DELETE', $user); - if ($result < 0) $error++; - // End call triggers - } + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('OPENSURVEY_DELETE', $user); + if ($result < 0) $error++; + // End call triggers } if (!$error) @@ -441,7 +453,9 @@ class Opensurveysondage extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = ''; @@ -591,7 +605,7 @@ class Opensurveysondage extends CommonObject $this->mail_admin = trim($this->mail_admin); $this->nom_admin = trim($this->nom_admin); $this->title = trim($this->title); - $this->status = trim($this->status); + $this->status = (int) $this->status; $this->format = trim($this->format); $this->mailsonde = ($this->mailsonde ? 1 : 0); $this->allow_comments = ($this->allow_comments ? 1 : 0); From fd14ce4ea47df324c0f4ab2314b91085c03761ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 21:16:58 +0100 Subject: [PATCH 05/14] Update opensurveysondage.class.php --- htdocs/opensurvey/class/opensurveysondage.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 4b8ac089591..27179a20ac3 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -50,7 +50,6 @@ class Opensurveysondage extends CommonObject */ public $picto = 'poll'; - /** * @var string ID survey */ @@ -88,6 +87,10 @@ class Opensurveysondage extends CommonObject * @var int status */ public $status = 1; + + /** + * @var string format of survey + */ public $format; /** @@ -201,10 +204,8 @@ class Opensurveysondage extends CommonObject } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } From 894f1e8215857bcb5dedab0118dad6707538b278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 21:20:17 +0100 Subject: [PATCH 06/14] Update card.php --- htdocs/opensurvey/card.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 96bcd2af739..92d0f7a3eb5 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2014 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * 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 @@ -41,14 +41,13 @@ $cancel = GETPOST('cancel', 'alpha'); $numsondage = ''; if (GETPOST('id')) { - $numsondage = GETPOST('id', 'alpha'); + $numsondage = (string) GETPOST('id', 'alpha'); } $object = new Opensurveysondage($db); $result = $object->fetch(0, $numsondage); -if ($result <= 0) -{ +if ($result <= 0) { dol_print_error($db, $object->error); exit; } @@ -112,17 +111,16 @@ if (empty($reshook)) if (!$error) { - $object->title = GETPOST('nouveautitre', 'nohtml'); - $object->description = GETPOST('nouveauxcommentaires', 'restricthtml'); - $object->mail_admin = GETPOST('nouvelleadresse', 'alpha'); + $object->title = (string) GETPOST('nouveautitre', 'nohtml'); + $object->description = (string) GETPOST('nouveauxcommentaires', 'restricthtml'); + $object->mail_admin = (string) GETPOST('nouvelleadresse', 'alpha'); $object->date_fin = $expiredate; $object->allow_comments = GETPOST('cancomment', 'alpha') == 'on' ? 1 : 0; $object->allow_spy = GETPOST('canseeothersvote', 'alpha') == 'on' ? 1 : 0; $object->mailsonde = GETPOST('mailsonde', 'alpha') == 'on' ? true : false; $res = $object->update($user); - if ($res < 0) - { + if ($res < 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit'; } From 10bdb1f787f39a1d061155e9dfb3284c29fa3304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 21:21:48 +0100 Subject: [PATCH 07/14] Update opensurveysondage.class.php --- htdocs/opensurvey/class/opensurveysondage.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 27179a20ac3..595270b78ad 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -194,7 +194,7 @@ class Opensurveysondage extends CommonObject $resql = $this->db->query($sql); if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error && !$notrigger) + if (!$error && !$notrigger) { global $langs, $conf; // Call trigger From dd2ab6f36006028f498f3a5033fd2930cbf24e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 21:56:17 +0100 Subject: [PATCH 08/14] Update card.php --- htdocs/adherents/card.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index bd3ad481cd8..fe6f27ef8b6 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2012 Marcos García * Copyright (C) 2012-2020 Philippe Grand * Copyright (C) 2015-2018 Alexandre Spangaro - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * 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 @@ -1564,7 +1564,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'userid', ''); } else { if ($object->user_id) { - $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'none'); + $linkeduser = new User($db); + $linkeduser->fetch($object->user_id); + print $linkeduser->getNomUrl(-1); } else { print $langs->trans("NoDolibarrAccess"); } From 5c159c6344cdcc2e3c97dbdb5ad197dc9fd966c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 21:57:46 +0100 Subject: [PATCH 09/14] Update card.php --- htdocs/user/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 6a928e0bfee..cd6eb0991d9 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -13,7 +13,7 @@ * Copyright (C) 2015 Ari Elbaz (elarifr) * Copyright (C) 2015-2018 Charlene Benke * Copyright (C) 2016 Raphaël Doursenaud - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * Copyright (C) 2018 David Beniamine * * This program is free software; you can redistribute it and/or modify @@ -1781,7 +1781,7 @@ if ($action == 'create' || $action == 'adduserldap') $adh = new Adherent($db); $adh->fetch($object->fk_member); $adh->ref = $adh->getFullname($langs); // Force to show login instead of id - print $adh->getNomUrl(1); + print $adh->getNomUrl(-1); } else { print $langs->trans("UserNotLinkedToMember"); } From cce6afbeea6bc596c5ed86748d140bd8c19342af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 22:22:51 +0100 Subject: [PATCH 10/14] fix member status in box --- htdocs/core/boxes/box_members.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index 72bc088ae6c..2d0ad45a266 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015 Frederic France + * Copyright (C) 2015-2020 Frederic France * * 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 @@ -116,6 +116,7 @@ class box_members extends ModeleBoxes $memberstatic->email = $objp->email; $memberstatic->morphy = $objp->morphy; $memberstatic->company = $objp->company; + $memberstatic->statut = $objp->status; if (!empty($objp->fk_soc)) { $memberstatic->socid = $objp->fk_soc; From 70f1ed53f8b6b264e6802c02f159e4f895fee579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 13 Nov 2020 22:51:10 +0100 Subject: [PATCH 11/14] can upload odt model for user --- .../user/doc/doc_generic_user_odt.modules.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 2f534f86813..771231e6041 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -1,7 +1,7 @@ * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * 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 @@ -114,7 +114,7 @@ class doc_generic_user_odt extends ModelePDFUser $form = new Form($this->db); $texte = $this->description.".
\n"; - $texte .= '
'; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= ''; @@ -187,7 +187,17 @@ class doc_generic_user_odt extends ModelePDFUser $texte .= ""; $texte .= ''; } + $texte .= ''; } + // Add input to upload a new template file. + $texte .= '
'.$langs->trans("UploadNewTemplate").' '; + $texte .= ''; + $texte .= ''; + $texte .= '
'; $texte .= ''; From 3c5ef18b36999383380273687b47a8bdceef8718 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Nov 2020 00:47:28 +0100 Subject: [PATCH 12/14] FIX #15390 --- htdocs/compta/sociales/class/cchargesociales.class.php | 10 ++++++++-- htdocs/core/class/commonobject.class.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index ab61446c62e..ceace76bba9 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -44,7 +44,11 @@ class Cchargesociales */ public $table_element = 'c_chargesociales'; + /** + * @var string Label + */ public $libelle; + public $deductible; public $active; public $code; @@ -54,6 +58,9 @@ class Cchargesociales */ public $fk_pays; + /** + * @var string module + */ public $module; public $accountancy_code; @@ -504,13 +511,12 @@ class Cchargesociales /** * Trim object parameters - * @param string[] $parameters array of parameters to trim * + * @param string[] $parameters array of parameters to trim * @return void */ private function trimParameters($parameters) { - if (!is_array($parameters)) return; foreach ($parameters as $parameter) { if (isset($this->$parameter)) { $this->$parameter = trim($this->$parameter); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 221c69b659a..b2349fa5984 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8373,8 +8373,8 @@ abstract class CommonObject /** * Trim object parameters - * @param string[] $parameters array of parameters to trim * + * @param string[] $parameters array of parameters to trim * @return void */ public function trimParameters($parameters) From 34beb995f23b1103c34f789e67b35e592ec408c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Nov 2020 00:51:01 +0100 Subject: [PATCH 13/14] Update card.php --- htdocs/opensurvey/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 92d0f7a3eb5..393914f95ba 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -111,13 +111,13 @@ if (empty($reshook)) if (!$error) { - $object->title = (string) GETPOST('nouveautitre', 'nohtml'); + $object->title = (string) GETPOST('nouveautitre', 'alphanohtml'); $object->description = (string) GETPOST('nouveauxcommentaires', 'restricthtml'); $object->mail_admin = (string) GETPOST('nouvelleadresse', 'alpha'); $object->date_fin = $expiredate; - $object->allow_comments = GETPOST('cancomment', 'alpha') == 'on' ? 1 : 0; - $object->allow_spy = GETPOST('canseeothersvote', 'alpha') == 'on' ? 1 : 0; - $object->mailsonde = GETPOST('mailsonde', 'alpha') == 'on' ? true : false; + $object->allow_comments = GETPOST('cancomment', 'aZ09') == 'on' ? 1 : 0; + $object->allow_spy = GETPOST('canseeothersvote', 'aZ09') == 'on' ? 1 : 0; + $object->mailsonde = GETPOST('mailsonde', 'aZ09') == 'on' ? true : false; $res = $object->update($user); if ($res < 0) { From fd50f27d5d70f6d6036ca403e306d2c3198f6bb3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Nov 2020 00:52:13 +0100 Subject: [PATCH 14/14] Removed temporary warning --- scripts/emailings/reset-invalid-emails.php | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/emailings/reset-invalid-emails.php b/scripts/emailings/reset-invalid-emails.php index de6b180e208..12f279ef0d0 100755 --- a/scripts/emailings/reset-invalid-emails.php +++ b/scripts/emailings/reset-invalid-emails.php @@ -73,30 +73,30 @@ $db->begin(); $groupofemails = array(); - // For each groupofemail, we update tables to set email field to empty - if ($type == 'all' || $type == 'thirdparty') - { - // Loop on each record and update the email to null if email into $groupofemails - // TODO - } +// For each groupofemail, we update tables to set email field to empty +if ($type == 'all' || $type == 'thirdparty') +{ + // Loop on each record and update the email to null if email into $groupofemails + // TODO +} - if ($type == 'all' || $type == 'contact') - { - // Loop on each record and update the email to null if email into $groupofemails - // TODO - } +if ($type == 'all' || $type == 'contact') +{ + // Loop on each record and update the email to null if email into $groupofemails + // TODO +} - if ($type == 'all' || $type == 'user') - { - // Loop on each record and update the email to null if email into $groupofemails - // TODO - } +if ($type == 'all' || $type == 'user') +{ + // Loop on each record and update the email to null if email into $groupofemails + // TODO +} - if ($type == 'all' || $type == 'member') - { - // Loop on each record and update the email to null if email into $groupofemails - // TODO - } +if ($type == 'all' || $type == 'member') +{ + // Loop on each record and update the email to null if email into $groupofemails + // TODO +} if (!$error) {