Skip to content

Commit

Permalink
Update adherent_type.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Mar 27, 2019
1 parent 2e9badd commit fa302db
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions htdocs/adherents/class/adherent_type.class.php
@@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2019 Thibault Foucart <support@ptibogxiv.net>
*
* 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
Expand Down Expand Up @@ -64,6 +65,11 @@ class AdherentType extends CommonObject
* @var string Adherent type label
*/
public $label;

/**
* @var string Adherent type nature
*/
public $morphy;

/**
* @var int Subsription required (0 or 1)
Expand Down Expand Up @@ -184,6 +190,7 @@ public function update($user, $notrigger = 0)
$sql.= "SET ";
$sql.= "statut = ".$this->statut.",";
$sql.= "libelle = '".$this->db->escape($this->label) ."',";
$sql.= "morphy = '".$this->db->escape($this->morphy) ."',";
$sql.= "subscription = '".$this->db->escape($this->subscription)."',";
$sql.= "note = '".$this->db->escape($this->note)."',";
$sql.= "vote = ".(integer) $this->db->escape($this->vote).",";
Expand Down Expand Up @@ -274,7 +281,7 @@ public function delete()
*/
public function fetch($rowid)
{
$sql = "SELECT d.rowid, d.libelle as label, d.statut, d.subscription, d.mail_valid, d.note, d.vote";
$sql = "SELECT d.rowid, d.libelle as label, d.morphy, d.statut, d.subscription, d.mail_valid, d.note, d.vote";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
$sql .= " WHERE d.rowid = ".(int) $rowid;

Expand All @@ -290,6 +297,7 @@ public function fetch($rowid)
$this->id = $obj->rowid;
$this->ref = $obj->rowid;
$this->label = $obj->label;
$this->morphy = $obj->morphy;
$this->statut = $obj->statut;
$this->subscription = $obj->subscription;
$this->mail_valid = $obj->mail_valid;
Expand Down

0 comments on commit fa302db

Please sign in to comment.