Update methods names
This commit is contained in:
parent
37b2a93323
commit
1865072b73
|
@ -46,10 +46,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des commandes
|
* @return array : La liste des commandes
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
//Recupération des commandes
|
//Recupération des commandes
|
||||||
return $this->model_command->get_by_ids($ids);
|
return $this->model_command->gets($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,7 +71,7 @@ namespace controllers\internals;
|
||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
return $this->model_command->delete_by_id($id);
|
return $this->model_command->delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,10 +34,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des contactes
|
* @return array : La liste des contactes
|
||||||
*/
|
*/
|
||||||
public function get_list($nb_entry = false, $page = false)
|
public function list($nb_entry = false, $page = false)
|
||||||
{
|
{
|
||||||
//Recupération des contactes
|
//Recupération des contactes
|
||||||
return $this->model_contact->get_list($nb_entry, $nb_entry * $page);
|
return $this->model_contact->list($nb_entry, $nb_entry * $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,10 +47,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des contactes
|
* @return array : La liste des contactes
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
//Recupération des contactes
|
//Recupération des contactes
|
||||||
return $this->model_contact->get_by_ids($ids);
|
return $this->model_contact->gets($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,7 +98,7 @@ namespace controllers\internals;
|
||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
return $this->model_contact->delete_by_id($id);
|
return $this->model_contact->delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,10 +33,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des events
|
* @return array : La liste des events
|
||||||
*/
|
*/
|
||||||
public function get_list($nb_entry = false, $page = false)
|
public function list($nb_entry = false, $page = false)
|
||||||
{
|
{
|
||||||
//Recupération des events
|
//Recupération des events
|
||||||
return $this->model_event->get_list($nb_entry, $nb_entry * $page);
|
return $this->model_event->list($nb_entry, $nb_entry * $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -61,7 +61,7 @@ namespace controllers\internals;
|
||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
return $this->model_event->delete_by_id($id);
|
return $this->model_event->delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,10 +34,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des groups
|
* @return array : La liste des groups
|
||||||
*/
|
*/
|
||||||
public function get_list($nb_entry = false, $page = false)
|
public function list($nb_entry = false, $page = false)
|
||||||
{
|
{
|
||||||
//Recupération des groups
|
//Recupération des groups
|
||||||
return $this->model_group->get_list($nb_entry, $nb_entry * $page);
|
return $this->model_group->list($nb_entry, $nb_entry * $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,10 +47,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des groups
|
* @return array : La liste des groups
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
//Recupération des groups
|
//Recupération des groups
|
||||||
return $this->model_group->get_by_ids($ids);
|
return $this->model_group->gets($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,7 +85,7 @@ namespace controllers\internals;
|
||||||
*/
|
*/
|
||||||
public function delete($ids)
|
public function delete($ids)
|
||||||
{
|
{
|
||||||
return $this->model_group->delete_by_ids($ids);
|
return $this->model_group->deletes($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -32,10 +32,10 @@ class Received extends \descartes\InternalController
|
||||||
*
|
*
|
||||||
* @return array : La liste des receivedes
|
* @return array : La liste des receivedes
|
||||||
*/
|
*/
|
||||||
public function get_list($nb_entry = false, $page = false)
|
public function list($nb_entry = false, $page = false)
|
||||||
{
|
{
|
||||||
//Recupération des receivedes
|
//Recupération des receivedes
|
||||||
return $this->model_received->get_list($nb_entry, $nb_entry * $page);
|
return $this->model_received->list($nb_entry, $nb_entry * $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,10 +45,10 @@ class Received extends \descartes\InternalController
|
||||||
*
|
*
|
||||||
* @return array : La liste des receivedes
|
* @return array : La liste des receivedes
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
//Recupération des receivedes
|
//Recupération des receivedes
|
||||||
return $this->model_received->get_by_ids($ids);
|
return $this->model_received->gets($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -110,7 +110,7 @@ class Received extends \descartes\InternalController
|
||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
return $this->model_received->delete_by_id($id);
|
return $this->model_received->delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,10 +34,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des scheduledes
|
* @return array : La liste des scheduledes
|
||||||
*/
|
*/
|
||||||
public function get_list($nb_entry = false, $page = false)
|
public function list($nb_entry = false, $page = false)
|
||||||
{
|
{
|
||||||
//Recupération des scheduledes
|
//Recupération des scheduledes
|
||||||
return $this->model_scheduled->get_list($nb_entry, $nb_entry * $page);
|
return $this->model_scheduled->list($nb_entry, $nb_entry * $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,10 +47,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des scheduledes
|
* @return array : La liste des scheduledes
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
//Recupération des scheduledes
|
//Recupération des scheduledes
|
||||||
return $this->model_scheduled->get_by_ids($ids);
|
return $this->model_scheduled->gets($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,7 +85,7 @@ namespace controllers\internals;
|
||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
return $this->model_scheduled->delete_by_id($id);
|
return $this->model_scheduled->delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -32,10 +32,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des sendedes
|
* @return array : La liste des sendedes
|
||||||
*/
|
*/
|
||||||
public function get_list($nb_entry = false, $page = false)
|
public function list($nb_entry = false, $page = false)
|
||||||
{
|
{
|
||||||
//Recupération des sendedes
|
//Recupération des sendedes
|
||||||
return $this->model_sended->get_list($nb_entry, $nb_entry * $page);
|
return $this->model_sended->list($nb_entry, $nb_entry * $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,10 +45,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des sendedes
|
* @return array : La liste des sendedes
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
//Recupération des sendedes
|
//Recupération des sendedes
|
||||||
return $this->model_sended->get_by_ids($ids);
|
return $this->model_sended->gets($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -86,7 +86,7 @@ namespace controllers\internals;
|
||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
return $this->model_sended->delete_by_id($id);
|
return $this->model_sended->delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -32,10 +32,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des smsstopes
|
* @return array : La liste des smsstopes
|
||||||
*/
|
*/
|
||||||
public function get_list($nb_entry = false, $page = false)
|
public function list($nb_entry = false, $page = false)
|
||||||
{
|
{
|
||||||
//Recupération des smsstopes
|
//Recupération des smsstopes
|
||||||
return $this->model_sms_stop->get_list($nb_entry, $nb_entry * $page);
|
return $this->model_sms_stop->list($nb_entry, $nb_entry * $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,10 +45,10 @@ namespace controllers\internals;
|
||||||
*
|
*
|
||||||
* @return array : La liste des smsstopes
|
* @return array : La liste des smsstopes
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
//Recupération des smsstopes
|
//Recupération des smsstopes
|
||||||
return $this->model_sms_stop->get_by_ids($ids);
|
return $this->model_sms_stop->gets($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,7 +84,7 @@ namespace controllers\internals;
|
||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
return $this->model_sms_stop->delete_by_id($id);
|
return $this->model_sms_stop->delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -66,9 +66,7 @@ namespace controllers\publics;
|
||||||
$this->internal_command->delete($id);
|
$this->internal_command->delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->redirect(\descartes\Router::url('Command', 'list'));
|
return $this->redirect(\descartes\Router::url('Command', 'list'));
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -89,7 +87,7 @@ namespace controllers\publics;
|
||||||
global $db;
|
global $db;
|
||||||
$ids = $_GET['ids'] ?? [];
|
$ids = $_GET['ids'] ?? [];
|
||||||
|
|
||||||
$commands = $this->internal_command->get_by_ids($ids);
|
$commands = $this->internal_command->gets($ids);
|
||||||
|
|
||||||
$this->render('command/edit', [
|
$this->render('command/edit', [
|
||||||
'commands' => $commands,
|
'commands' => $commands,
|
||||||
|
@ -111,31 +109,26 @@ namespace controllers\publics;
|
||||||
if (!$this->verify_csrf($csrf))
|
if (!$this->verify_csrf($csrf))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||||
$this->redirect(\descartes\Router::url('Command', 'list'));
|
return $this->redirect(\descartes\Router::url('Command', 'list'));
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = $_POST['name'] ?? false;
|
$name = $_POST['name'] ?? false;
|
||||||
$script = $_POST['script'] ?? false;
|
$script = $_POST['script'] ?? false;
|
||||||
$admin = (isset($_POST['admin']) ? $_POST['admin'] : false);
|
$admin = $_POST['admin'] ?? false;
|
||||||
|
|
||||||
if (!$name || !$script)
|
if (!$name || !$script)
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Renseignez au moins un nom et un script.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Renseignez au moins un nom et un script.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Command', 'list'));
|
return $this->redirect(\descartes\Router::url('Command', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->internal_command->create($name, $script, $admin))
|
if (!$this->internal_command->create($name, $script, $admin))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Impossible créer cette commande.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Impossible créer cette commande.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('commands', 'add'));
|
return $this->redirect(\descartes\Router::url('commands', 'add'));
|
||||||
}
|
}
|
||||||
|
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'La commande a bien été crée.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'La commande a bien été crée.');
|
||||||
|
|
||||||
return $this->redirect(\descartes\Router::url('Command', 'list'));
|
return $this->redirect(\descartes\Router::url('Command', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,9 +145,7 @@ namespace controllers\publics;
|
||||||
if (!$this->verify_csrf($csrf))
|
if (!$this->verify_csrf($csrf))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Jeton CSRF invalid !');
|
||||||
$this->redirect(\descartes\Router::url('Command', 'list'));
|
return $this->redirect(\descartes\Router::url('Command', 'list'));
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$nb_commands_update = 0;
|
$nb_commands_update = 0;
|
||||||
|
@ -167,14 +158,10 @@ namespace controllers\publics;
|
||||||
if ($nb_commands_update !== \count($_POST['commands']))
|
if ($nb_commands_update !== \count($_POST['commands']))
|
||||||
{
|
{
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Certaines commandes n\'ont pas pu êtres mises à jour.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('danger', 'Certaines commandes n\'ont pas pu êtres mises à jour.');
|
||||||
$this->redirect(\descartes\Router::url('Command', 'list'));
|
return $this->redirect(\descartes\Router::url('Command', 'list'));
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Toutes les commandes ont été modifiées avec succès.');
|
\modules\DescartesSessionMessages\internals\DescartesSessionMessages::push('success', 'Toutes les commandes ont été modifiées avec succès.');
|
||||||
$this->redirect(\descartes\Router::url('Command', 'list'));
|
return $this->redirect(\descartes\Router::url('Command', 'list'));
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace controllers\publics;
|
||||||
public function list($page = 0)
|
public function list($page = 0)
|
||||||
{
|
{
|
||||||
$page = (int) $page;
|
$page = (int) $page;
|
||||||
$contacts = $this->internal_contact->get_list(25, $page);
|
$contacts = $this->internal_contact->list(25, $page);
|
||||||
$this->render('contact/list', ['contacts' => $contacts]);
|
$this->render('contact/list', ['contacts' => $contacts]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ namespace controllers\publics;
|
||||||
global $db;
|
global $db;
|
||||||
$ids = $_GET['ids'] ?? [];
|
$ids = $_GET['ids'] ?? [];
|
||||||
|
|
||||||
$contacts = $this->internal_contact->get_by_ids($ids);
|
$contacts = $this->internal_contact->gets($ids);
|
||||||
|
|
||||||
$this->render('contact/edit', [
|
$this->render('contact/edit', [
|
||||||
'contacts' => $contacts,
|
'contacts' => $contacts,
|
||||||
|
@ -189,6 +189,6 @@ namespace controllers\publics;
|
||||||
public function json_list()
|
public function json_list()
|
||||||
{
|
{
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
echo json_encode($this->internal_contact->get_list());
|
echo json_encode($this->internal_contact->list());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ namespace controllers\publics;
|
||||||
{
|
{
|
||||||
$_SESSION['discussion_wait_progress'] = isset($_SESSION['discussion_wait_progress']) ? $_SESSION['discussion_wait_progress'] : [];
|
$_SESSION['discussion_wait_progress'] = isset($_SESSION['discussion_wait_progress']) ? $_SESSION['discussion_wait_progress'] : [];
|
||||||
|
|
||||||
$scheduleds = $this->internal_scheduled->get_by_ids($_SESSION['discussion_wait_progress']);
|
$scheduleds = $this->internal_scheduled->gets($_SESSION['discussion_wait_progress']);
|
||||||
|
|
||||||
//On va chercher à chaque fois si on a trouvé le sms. Si ce n'est pas le cas c'est qu'il a été envoyé
|
//On va chercher à chaque fois si on a trouvé le sms. Si ce n'est pas le cas c'est qu'il a été envoyé
|
||||||
$sendeds = [];
|
$sendeds = [];
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace controllers\publics;
|
||||||
{
|
{
|
||||||
$page = (int) $page;
|
$page = (int) $page;
|
||||||
$limit = 25;
|
$limit = 25;
|
||||||
$events = $this->internal_event->get_list($limit, $page);
|
$events = $this->internal_event->list($limit, $page);
|
||||||
$this->render('event/list', ['events' => $events, 'limit' => $limit, 'page' => $page, 'nb_results' => \count($events)]);
|
$this->render('event/list', ['events' => $events, 'limit' => $limit, 'page' => $page, 'nb_results' => \count($events)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace controllers\publics;
|
||||||
public function list($page = 0)
|
public function list($page = 0)
|
||||||
{
|
{
|
||||||
$page = (int) $page;
|
$page = (int) $page;
|
||||||
$groups = $this->internal_group->get_list(25, $page);
|
$groups = $this->internal_group->list(25, $page);
|
||||||
|
|
||||||
foreach ($groups as $key => $group)
|
foreach ($groups as $key => $group)
|
||||||
{
|
{
|
||||||
|
@ -100,7 +100,7 @@ namespace controllers\publics;
|
||||||
{
|
{
|
||||||
$ids = $_GET['ids'] ?? [];
|
$ids = $_GET['ids'] ?? [];
|
||||||
|
|
||||||
$groups = $this->internal_group->get_by_ids($ids);
|
$groups = $this->internal_group->gets($ids);
|
||||||
|
|
||||||
foreach ($groups as $key => $group)
|
foreach ($groups as $key => $group)
|
||||||
{
|
{
|
||||||
|
@ -195,6 +195,6 @@ namespace controllers\publics;
|
||||||
public function json_list()
|
public function json_list()
|
||||||
{
|
{
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
echo json_encode($this->internal_group->get_list());
|
echo json_encode($this->internal_group->list());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace controllers\publics;
|
||||||
{
|
{
|
||||||
$page = (int) $page;
|
$page = (int) $page;
|
||||||
$limit = 25;
|
$limit = 25;
|
||||||
$receiveds = $this->internal_received->get_list($limit, $page);
|
$receiveds = $this->internal_received->list($limit, $page);
|
||||||
|
|
||||||
foreach ($receiveds as $key => $received)
|
foreach ($receiveds as $key => $received)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace controllers\publics;
|
||||||
public function list($page = 0)
|
public function list($page = 0)
|
||||||
{
|
{
|
||||||
$page = (int) $page;
|
$page = (int) $page;
|
||||||
$scheduleds = $this->internal_scheduled->get_list(25, $page);
|
$scheduleds = $this->internal_scheduled->list(25, $page);
|
||||||
$this->render('scheduled/list', ['scheduleds' => $scheduleds]);
|
$this->render('scheduled/list', ['scheduleds' => $scheduleds]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ namespace controllers\publics;
|
||||||
{
|
{
|
||||||
$ids = $_GET['ids'] ?? [];
|
$ids = $_GET['ids'] ?? [];
|
||||||
|
|
||||||
$scheduleds = $this->internal_scheduled->get_by_ids($ids);
|
$scheduleds = $this->internal_scheduled->gets($ids);
|
||||||
|
|
||||||
//Pour chaque message on ajoute les numéros, les contacts & les groups
|
//Pour chaque message on ajoute les numéros, les contacts & les groups
|
||||||
foreach ($scheduleds as $key => $scheduled)
|
foreach ($scheduleds as $key => $scheduled)
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace controllers\publics;
|
||||||
{
|
{
|
||||||
$page = (int) $page;
|
$page = (int) $page;
|
||||||
$limit = 25;
|
$limit = 25;
|
||||||
$sendeds = $this->internal_sended->get_list($limit, $page);
|
$sendeds = $this->internal_sended->list($limit, $page);
|
||||||
$this->render('sended/list', ['sendeds' => $sendeds, 'page' => $page, 'limit' => $limit, 'nb_results' => \count($sendeds)]);
|
$this->render('sended/list', ['sendeds' => $sendeds, 'page' => $page, 'limit' => $limit, 'nb_results' => \count($sendeds)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace controllers\publics;
|
||||||
{
|
{
|
||||||
$page = (int) $page;
|
$page = (int) $page;
|
||||||
$limit = 25;
|
$limit = 25;
|
||||||
$smsstops = $this->internal_sms_stop->get_list($limit, $page);
|
$smsstops = $this->internal_sms_stop->list($limit, $page);
|
||||||
$this->render('smsstop/list', ['page' => $page, 'smsstops' => $smsstops, 'limit' => $limit, 'nb_results' => \count($smsstops)]);
|
$this->render('smsstop/list', ['page' => $page, 'smsstops' => $smsstops, 'limit' => $limit, 'nb_results' => \count($smsstops)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : L'entrée
|
* @return array : L'entrée
|
||||||
*/
|
*/
|
||||||
public function get_by_id($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
$commands = $this->_select('command', ['id' => $id]);
|
$commands = $this->_select('command', ['id' => $id]);
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : La liste des entrées
|
* @return array : La liste des entrées
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
SELECT * FROM command
|
SELECT * FROM command
|
||||||
|
@ -70,7 +70,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nombre de lignes supprimées
|
* @return int : Le nombre de lignes supprimées
|
||||||
*/
|
*/
|
||||||
public function delete_by_id($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
DELETE FROM command
|
DELETE FROM command
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : L'entrée
|
* @return array : L'entrée
|
||||||
*/
|
*/
|
||||||
public function get_by_id($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
$contacts = $this->_select('contact', ['id' => $id]);
|
$contacts = $this->_select('contact', ['id' => $id]);
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ namespace models;
|
||||||
* @param int $limit : Nombre de résultat maximum à retourner
|
* @param int $limit : Nombre de résultat maximum à retourner
|
||||||
* @param int $offset : Nombre de résultat à ingnorer
|
* @param int $offset : Nombre de résultat à ingnorer
|
||||||
*/
|
*/
|
||||||
public function get_list($limit, $offset)
|
public function list($limit, $offset)
|
||||||
{
|
{
|
||||||
return $this->_select('contact', [], '', false, $limit, $offset);
|
return $this->_select('contact', [], '', false, $limit, $offset);
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : La liste des entrées
|
* @return array : La liste des entrées
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
SELECT * FROM contact
|
SELECT * FROM contact
|
||||||
|
@ -98,7 +98,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nombre de lignes supprimées
|
* @return int : Le nombre de lignes supprimées
|
||||||
*/
|
*/
|
||||||
public function delete_by_id($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
DELETE FROM contact
|
DELETE FROM contact
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : L'entrée
|
* @return array : L'entrée
|
||||||
*/
|
*/
|
||||||
public function get_by_id($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
$events = $this->_select('event', ['id' => $id]);
|
$events = $this->_select('event', ['id' => $id]);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace models;
|
||||||
* @param int $limit : Nombre de résultat maximum à retourner
|
* @param int $limit : Nombre de résultat maximum à retourner
|
||||||
* @param int $offset : Nombre de résultat à ingnorer
|
* @param int $offset : Nombre de résultat à ingnorer
|
||||||
*/
|
*/
|
||||||
public function get_list($limit, $offset)
|
public function list($limit, $offset)
|
||||||
{
|
{
|
||||||
return $this->_select('event', [], '', false, $limit, $offset);
|
return $this->_select('event', [], '', false, $limit, $offset);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : La liste des entrées
|
* @return array : La liste des entrées
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
SELECT * FROM event
|
SELECT * FROM event
|
||||||
|
@ -83,7 +83,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nombre de lignes supprimées
|
* @return int : Le nombre de lignes supprimées
|
||||||
*/
|
*/
|
||||||
public function delete_by_id($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
DELETE FROM event
|
DELETE FROM event
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : L'entrée
|
* @return array : L'entrée
|
||||||
*/
|
*/
|
||||||
public function get_by_id($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
$groups = $this->_select('group', ['id' => $id]);
|
$groups = $this->_select('group', ['id' => $id]);
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ namespace models;
|
||||||
* @param int $limit : Nombre de résultat maximum à retourner
|
* @param int $limit : Nombre de résultat maximum à retourner
|
||||||
* @param int $offset : Nombre de résultat à ingnorer
|
* @param int $offset : Nombre de résultat à ingnorer
|
||||||
*/
|
*/
|
||||||
public function get_list($limit, $offset)
|
public function list($limit, $offset)
|
||||||
{
|
{
|
||||||
return $this->_select('group', [], '', false, $limit, $offset);
|
return $this->_select('group', [], '', false, $limit, $offset);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : La liste des entrées
|
* @return array : La liste des entrées
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
SELECT * FROM group
|
SELECT * FROM group
|
||||||
|
@ -84,7 +84,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nombre de lignes supprimées
|
* @return int : Le nombre de lignes supprimées
|
||||||
*/
|
*/
|
||||||
public function delete_by_ids($ids)
|
public function deletes($ids)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
DELETE FROM group
|
DELETE FROM group
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : L'entrée
|
* @return array : L'entrée
|
||||||
*/
|
*/
|
||||||
public function get_by_id($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
$receiveds = $this->_select('received', ['id' => $id]);
|
$receiveds = $this->_select('received', ['id' => $id]);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace models;
|
||||||
* @param int $limit : Nombre de résultat maximum à retourner
|
* @param int $limit : Nombre de résultat maximum à retourner
|
||||||
* @param int $offset : Nombre de résultat à ingnorer
|
* @param int $offset : Nombre de résultat à ingnorer
|
||||||
*/
|
*/
|
||||||
public function get_list($limit, $offset)
|
public function list($limit, $offset)
|
||||||
{
|
{
|
||||||
return $this->_select('received', [], '', false, $limit, $offset);
|
return $this->_select('received', [], '', false, $limit, $offset);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : La liste des entrées
|
* @return array : La liste des entrées
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
SELECT * FROM received
|
SELECT * FROM received
|
||||||
|
@ -95,7 +95,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nombre de lignes supprimées
|
* @return int : Le nombre de lignes supprimées
|
||||||
*/
|
*/
|
||||||
public function delete_by_id($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
DELETE FROM received
|
DELETE FROM received
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : L'entrée
|
* @return array : L'entrée
|
||||||
*/
|
*/
|
||||||
public function get_by_id($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
$scheduleds = $this->_select('scheduled', ['id' => $id]);
|
$scheduleds = $this->_select('scheduled', ['id' => $id]);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace models;
|
||||||
* @param int $limit : Nombre de résultat maximum à retourner
|
* @param int $limit : Nombre de résultat maximum à retourner
|
||||||
* @param int $offset : Nombre de résultat à ingnorer
|
* @param int $offset : Nombre de résultat à ingnorer
|
||||||
*/
|
*/
|
||||||
public function get_list($limit, $offset)
|
public function list($limit, $offset)
|
||||||
{
|
{
|
||||||
return $this->_select('scheduled', [], '', false, $limit, $offset);
|
return $this->_select('scheduled', [], '', false, $limit, $offset);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : La liste des entrées
|
* @return array : La liste des entrées
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
SELECT * FROM scheduled
|
SELECT * FROM scheduled
|
||||||
|
@ -124,7 +124,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nombre de lignes supprimées
|
* @return int : Le nombre de lignes supprimées
|
||||||
*/
|
*/
|
||||||
public function delete_by_id($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
DELETE FROM scheduled
|
DELETE FROM scheduled
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : L'entrée
|
* @return array : L'entrée
|
||||||
*/
|
*/
|
||||||
public function get_by_id($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
$sendeds = $this->_select('sended', ['id' => $id]);
|
$sendeds = $this->_select('sended', ['id' => $id]);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace models;
|
||||||
* @param int $limit : Nombre de résultat maximum à retourner
|
* @param int $limit : Nombre de résultat maximum à retourner
|
||||||
* @param int $offset : Nombre de résultat à ingnorer
|
* @param int $offset : Nombre de résultat à ingnorer
|
||||||
*/
|
*/
|
||||||
public function get_list($limit, $offset)
|
public function list($limit, $offset)
|
||||||
{
|
{
|
||||||
return $this->_select('sended', [], '', false, $limit, $offset);
|
return $this->_select('sended', [], '', false, $limit, $offset);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : La liste des entrées
|
* @return array : La liste des entrées
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
SELECT * FROM sended
|
SELECT * FROM sended
|
||||||
|
@ -95,7 +95,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nombre de lignes supprimées
|
* @return int : Le nombre de lignes supprimées
|
||||||
*/
|
*/
|
||||||
public function delete_by_id($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
DELETE FROM sended
|
DELETE FROM sended
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : L'entrée
|
* @return array : L'entrée
|
||||||
*/
|
*/
|
||||||
public function get_by_id($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
$smsstops = $this->_select('smsstop', ['id' => $id]);
|
$smsstops = $this->_select('smsstop', ['id' => $id]);
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ namespace models;
|
||||||
* @param int $limit : Nombre de résultat maximum à retourner
|
* @param int $limit : Nombre de résultat maximum à retourner
|
||||||
* @param int $offset : Nombre de résultat à ingnorer
|
* @param int $offset : Nombre de résultat à ingnorer
|
||||||
*/
|
*/
|
||||||
public function get_list($limit, $offset)
|
public function list($limit, $offset)
|
||||||
{
|
{
|
||||||
return $this->_select('smsstop', [], '', false, $limit, $offset);
|
return $this->_select('smsstop', [], '', false, $limit, $offset);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return array : La liste des entrées
|
* @return array : La liste des entrées
|
||||||
*/
|
*/
|
||||||
public function get_by_ids($ids)
|
public function gets($ids)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
SELECT * FROM smsstop
|
SELECT * FROM smsstop
|
||||||
|
@ -85,7 +85,7 @@ namespace models;
|
||||||
*
|
*
|
||||||
* @return int : Le nombre de lignes supprimées
|
* @return int : Le nombre de lignes supprimées
|
||||||
*/
|
*/
|
||||||
public function delete_by_id($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
DELETE FROM smsstop
|
DELETE FROM smsstop
|
||||||
|
|
2
todo.txt
2
todo.txt
|
@ -1,6 +1,6 @@
|
||||||
Migrate to latest version of descartes. Remove all useless functions
|
Migrate to latest version of descartes. Remove all useless functions
|
||||||
y Account.php (almost done need to do user after)
|
y Account.php (almost done need to do user after)
|
||||||
p Command.php
|
y Command.php
|
||||||
Connect.php
|
Connect.php
|
||||||
Contact.php
|
Contact.php
|
||||||
Dashboard.php
|
Dashboard.php
|
||||||
|
|
Loading…
Reference in New Issue