Commit 805b682f authored by jlaval's avatar jlaval
Browse files

Clean

parent ed3f5ca6
......@@ -66,6 +66,9 @@ class trombino extends basedb
public function create ($id)
{
$this->id_utilisateur = $id;
$this->autorisation = $this->photo
= $this->infos_personnelles = $this->famille = $this->associatif
= $this->commentaires = true;
$requete = new insert($this->dbrw, 'utl_trombi', array('id_utilisateur' => $this->id_utilisateur,
'autorisation' => $this->autorisation,
......
......@@ -529,21 +529,17 @@ if ( $_REQUEST['action'] == 'settrombi' && $can_edit ) {
$trb = new trombino($site->db, $site->dbrw);
$result = $trb->load_by_id ($user->id);
/* if (isset($_REQUEST['autorisation']) && isset($_REQUEST['photo']) && isset($_REQUEST['infos_personnelles'])
&& isset($_REQUEST['famille']) && isset($_REQUEST['associatif']) && isset($_REQUEST['commentaires'])) {*/
$trb->autorisation = $autorisation = $_REQUEST['autorisation'];
$trb->photo = $_REQUEST['photo'] && $autorisation;
$trb->infos_personnelles = $_REQUEST['infos_personnelles'] && $autorisation;
$trb->famille = $_REQUEST['famille'] && $autorisation;
$trb->associatif = $_REQUEST['associatif'] && $autorisation;
$trb->commentaires = $_REQUEST['commentaires'] && $autorisation;
if ($result)
$trb->update();
else
$trb->create($user->id);
// }
$trb->autorisation = $autorisation = $_REQUEST['autorisation'];
$trb->photo = $_REQUEST['photo'] && $autorisation;
$trb->infos_personnelles = $_REQUEST['infos_personnelles'] && $autorisation;
$trb->famille = $_REQUEST['famille'] && $autorisation;
$trb->associatif = $_REQUEST['associatif'] && $autorisation;
$trb->commentaires = $_REQUEST['commentaires'] && $autorisation;
if ($result)
$trb->update();
else
$trb->create($user->id);
$_REQUEST['see'] = 'trombi';
$_REQUEST['page'] = 'edit';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment