mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 00:46:27 +02:00
rename all instances of 'datas' to 'data'
This commit is contained in:
parent
730ac8963b
commit
61d644c247
48 changed files with 316 additions and 316 deletions
|
@ -188,16 +188,16 @@ namespace models;
|
|||
*
|
||||
* @param int $id_user : User id
|
||||
* @param int $id : Entry id
|
||||
* @param array $datas : datas to update
|
||||
* @param array $data : data to update
|
||||
*
|
||||
* @return int : number of modified rows
|
||||
*/
|
||||
public function update_for_user(int $id_user, int $id, array $datas)
|
||||
public function update_for_user(int $id_user, int $id, array $data)
|
||||
{
|
||||
$params = [];
|
||||
$sets = [];
|
||||
|
||||
foreach ($datas as $label => $value)
|
||||
foreach ($data as $label => $value)
|
||||
{
|
||||
$label = preg_replace('#[^a-zA-Z0-9_]#', '', $label);
|
||||
$params['set_' . $label] = $value;
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace models;
|
|||
*
|
||||
* @param int $id_user : User id
|
||||
* @param int $id : Entry id
|
||||
* @param array $datas : datas to update
|
||||
* @param array $data : data to update
|
||||
*
|
||||
* @return int : number of modified rows
|
||||
*/
|
||||
|
@ -167,7 +167,7 @@ namespace models;
|
|||
* Update a entry by his id.
|
||||
*
|
||||
* @param int $id : Entry id
|
||||
* @param array $datas : datas to update
|
||||
* @param array $data : data to update
|
||||
*
|
||||
* @return int : number of modified rows
|
||||
*/
|
||||
|
|
|
@ -96,13 +96,13 @@ namespace models;
|
|||
* Update a user using his is.
|
||||
*
|
||||
* @param int $id : User id
|
||||
* @param array $datas : Datas to update
|
||||
* @param array $data : Data to update
|
||||
*
|
||||
* @return int : number of modified rows
|
||||
*/
|
||||
public function update($id, $datas)
|
||||
public function update($id, $data)
|
||||
{
|
||||
return $this->_update('user', $datas, ['id' => $id]);
|
||||
return $this->_update('user', $data, ['id' => $id]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue