mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-23 09:56:34 +02:00
Compare commits
No commits in common. "fd1e7b5519a7bc1584c431ebf24eb0de0cef414e" and "d6b650147a24770018334dc20ccd65293fff5deb" have entirely different histories.
fd1e7b5519
...
d6b650147a
5 changed files with 3 additions and 40 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
v3.5.5
|
v3.5.4
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"twilio/sdk": "^6.1",
|
"twilio/sdk": "^6.1",
|
||||||
"symfony/yaml": "^5.0",
|
"symfony/yaml": "^5.0",
|
||||||
"phpmailer/phpmailer": "^6.1",
|
"phpmailer/phpmailer": "^6.1",
|
||||||
"xantios/mimey": ">=2.1",
|
"ralouphie/mimey": "^2.1",
|
||||||
"kreait/firebase-php": "^5.14"
|
"kreait/firebase-php": "^5.14"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|
|
@ -19,18 +19,6 @@ namespace controllers\internals;
|
||||||
|
|
||||||
protected $model;
|
protected $model;
|
||||||
|
|
||||||
/**
|
|
||||||
* Return all phones for active users.
|
|
||||||
*
|
|
||||||
* @param int $id_user : user id
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function get_all_for_active_users()
|
|
||||||
{
|
|
||||||
return $this->get_model()->get_all_for_active_users();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all phones of a user.
|
* Return all phones of a user.
|
||||||
*
|
*
|
||||||
|
|
|
@ -53,7 +53,7 @@ class Launcher extends AbstractDaemon
|
||||||
|
|
||||||
$this->start_mailer_daemon();
|
$this->start_mailer_daemon();
|
||||||
|
|
||||||
$phones = $this->internal_phone->get_all_for_active_users();
|
$phones = $this->internal_phone->get_all();
|
||||||
$this->start_phones_daemons($phones);
|
$this->start_phones_daemons($phones);
|
||||||
|
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
|
|
@ -13,31 +13,6 @@ namespace models;
|
||||||
|
|
||||||
class Phone extends StandardModel
|
class Phone extends StandardModel
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* Return all hones that belongs to active users
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function get_all_for_active_users()
|
|
||||||
{
|
|
||||||
$query = '
|
|
||||||
SELECT phone.*
|
|
||||||
FROM phone
|
|
||||||
LEFT JOIN user
|
|
||||||
ON phone.id_user = user.id
|
|
||||||
WHERE user.status = :status
|
|
||||||
';
|
|
||||||
|
|
||||||
$params = [
|
|
||||||
'status' => \models\User::STATUS_ACTIVE,
|
|
||||||
];
|
|
||||||
|
|
||||||
$result = $this->_run_query($query, $params);
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a phone by his name and user.
|
* Return a phone by his name and user.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue