* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
- $r = $ref==-1 ? $globals->money->mpay_def_id : $ref;
- $res = XDB::query("SELECT id, text, url, flags, mail, amount_min, amount_max, amount_def, asso_id
- FROM payments WHERE id={?}", $r);
+
+ $r = ($ref == -1) ? $globals->money->mpay_def_id : $ref;
+ $res = XDB::query('SELECT id, text, url, flags, mail, amount_min, amount_max, amount_def, asso_id
+ FROM payments
+ WHERE id = {?}', $r);
list($this->id, $this->text, $this->url, $flags, $this->mail,
$this->amount_min, $this->amount_max, $this->amount_def, $this->asso_id) = $res->fetchOneRow();
$this->amount_min = (float)$this->amount_min;
$this->amount_max = (float)$this->amount_max;
list($this->id, $this->text, $this->url, $flags, $this->mail,
$this->amount_min, $this->amount_max, $this->amount_def, $this->asso_id) = $res->fetchOneRow();
$this->amount_min = (float)$this->amount_min;
$this->amount_max = (float)$this->amount_max;
function check($value)
{
$v = (float)strtr($value, ',', '.');
function check($value)
{
$v = (float)strtr($value, ',', '.');
- $i = $id==-1 ? $globals->money->mpay_def_meth : $id;
- $res = XDB::query("SELECT id,text,include FROM payment_methods WHERE id={?}", $i);
+
+ $i = ($id == -1) ? $globals->money->mpay_def_meth : $id;
+ $res = XDB::query('SELECT id, text, include
+ FROM payment_methods
+ WHERE id = {?}', $i);