Clean code

This commit is contained in:
Laurent Destailleur 2019-03-11 01:11:39 +01:00
parent fac329e637
commit f2de44ce51
7 changed files with 20 additions and 16 deletions

View File

@ -1207,7 +1207,7 @@ class Cronjob extends CommonObject
* Reprogram a job
*
* @param string $userlogin User login
* @param timestamp $now Date returned by dol_now()
* @param integer $now Date returned by dol_now()
* @return int <0 if KO, >0 if OK
*/
public function reprogram_jobs($userlogin, $now)

View File

@ -112,13 +112,14 @@ if (empty($reshook))
if (! $error)
{
$object->titre = GETPOST('nouveautitre');
$object->commentaires = GETPOST('nouveauxcommentaires');
$object->mail_admin = GETPOST('nouvelleadresse');
$object->titre = GETPOST('nouveautitre', 'nohtml');
$object->commentaires = GETPOST('nouveauxcommentaires', 'nohtml');
$object->description = GETPOST('nouveauxcommentaires', 'nohtml');
$object->mail_admin = GETPOST('nouvelleadresse', 'alpha');
$object->date_fin = $expiredate;
$object->allow_comments = GETPOST('cancomment') == 'on' ? true : false;
$object->allow_spy = GETPOST('canseeothersvote') == 'on' ? true : false;
$object->mailsonde = GETPOST('mailsonde') == 'on' ? true : false;
$object->allow_comments = GETPOST('cancomment','alpha') == 'on' ? true : false;
$object->allow_spy = GETPOST('canseeothersvote','alpha') == 'on' ? true : false;
$object->mailsonde = GETPOST('mailsonde','alpha') == 'on' ? true : false;
$res=$object->update($user);
if ($res < 0)

View File

@ -49,7 +49,7 @@ class Opensurveysondage extends CommonObject
public $id_sondage;
/**
* @deprecated
* @see description
* @see $description
*/
public $commentaires;
@ -519,6 +519,7 @@ class Opensurveysondage extends CommonObject
$this->id_sondage='';
$this->commentaires='Comment of the specimen survey';
$this->description='Comment of the specimen survey';
$this->mail_admin='';
$this->nom_admin='';
$this->titre='This is a specimen survey';
@ -606,6 +607,7 @@ class Opensurveysondage extends CommonObject
{
$this->id_sondage = trim($this->id_sondage);
$this->commentaires = trim($this->commentaires);
$this->description = trim($this->description);
$this->mail_admin = trim($this->mail_admin);
$this->nom_admin = trim($this->nom_admin);
$this->titre = trim($this->titre);

View File

@ -207,6 +207,7 @@ function ajouter_sondage()
$opensurveysondage = new Opensurveysondage($db);
$opensurveysondage->id_sondage = $sondage;
$opensurveysondage->commentaires = $_SESSION['commentaires'];
$opensurveysondage->description = $_SESSION['commentaires'];
$opensurveysondage->mail_admin = $_SESSION['adresse'];
$opensurveysondage->nom_admin = $_SESSION['nom'];
$opensurveysondage->titre = $_SESSION['titre'];

View File

@ -74,7 +74,7 @@ class Project extends CommonObject
/**
* @var string
* @deprecated
* @see title
* @see $title
*/
public $titre;
@ -107,7 +107,7 @@ class Project extends CommonObject
/**
* @var int Creation date
* @deprecated
* @see date_c
* @see $date_c
*/
public $datec;
@ -119,7 +119,7 @@ class Project extends CommonObject
/**
* @var int Modification date
* @deprecated
* @see date_m
* @see $date_m
*/
public $datem;
@ -1535,12 +1535,12 @@ class Project extends CommonObject
/**
* Shift project task date from current date to delta
*
* @param timestamp $old_project_dt_start old project start date
* @return int 1 if OK or < 0 if KO
* @param integer $old_project_dt_start Old project start date
* @return int 1 if OK or < 0 if KO
*/
public function shiftTaskDate($old_project_dt_start)
{
global $user,$langs,$conf;
global $user, $langs, $conf;
$error=0;

View File

@ -169,7 +169,7 @@ class ActionsStripeconnect
/**
* addMoreActionsButtons
*
* @param arra $parameters Parameters
* @param array $parameters Parameters
* @param Object $object Object
* @param string $action action
* @return int 0

View File

@ -266,7 +266,7 @@ exit($error);
/**
* Show usage of script
*
* @return unknown
* @return void
*/
function usage()
{