mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
fix lot of errors, working dashboard
This commit is contained in:
parent
27d2a6c5b2
commit
6d9b1289fd
27 changed files with 89 additions and 73 deletions
|
@ -163,11 +163,11 @@ namespace models;
|
|||
//If try to update destination, also check it does belong to user
|
||||
if ($sets['set_destination'] ?? false)
|
||||
{
|
||||
$query .= ' AND :set_destination IN (SELECT number FROM phone WHERE id_user = :id_user)'
|
||||
$query .= ' AND :set_destination IN (SELECT number FROM phone WHERE id_user = :id_user)';
|
||||
}
|
||||
|
||||
$params['id'] = $id;
|
||||
$params['id_user'] = $id_user;
|
||||
$params['id_user'] = $id_user;
|
||||
|
||||
return $this->_run_query($query, $params, self::ROWCOUNT);
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ namespace models;
|
|||
";
|
||||
|
||||
$params = [
|
||||
'id_user' => $id_user
|
||||
'id_user' => $id_user,
|
||||
'date' => $date,
|
||||
'origin' => $origin,
|
||||
];
|
||||
|
|
|
@ -163,11 +163,11 @@ namespace models;
|
|||
//If try to update origin, also check it does belong to user
|
||||
if ($sets['set_origin'] ?? false)
|
||||
{
|
||||
$query .= ' AND :set_origin IN (SELECT number FROM phone WHERE id_user = :id_user)'
|
||||
$query .= ' AND :set_origin IN (SELECT number FROM phone WHERE id_user = :id_user)';
|
||||
}
|
||||
|
||||
$params['id'] = $id;
|
||||
$params['id_user'] = $id_user;
|
||||
$params['id_user'] = $id_user;
|
||||
|
||||
return $this->_run_query($query, $params, self::ROWCOUNT);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace models;
|
|||
* @param int $id : Entry id
|
||||
* @return int : Number of removed rows
|
||||
*/
|
||||
public function delete_for_user(int $id_user, $id)
|
||||
public function delete_for_user(int $id_user, int $id)
|
||||
{
|
||||
return $this->_delete($this->get_table_name(), ['id_user' => $id_user, 'id' => $id]);
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ namespace models;
|
|||
*
|
||||
* @return int : number of modified rows
|
||||
*/
|
||||
public function update_for_user(int $id_user, $id, $entry)
|
||||
public function update_for_user(int $id_user, int $id, array $entry)
|
||||
{
|
||||
return $this->_update($this->get_table_name(), $entry, ['id_user' => $id_user, 'id' => $id]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue