validate contact
This commit is contained in:
parent
46ebd39c04
commit
4050dce290
|
@ -23,8 +23,10 @@ class Console extends \descartes\InternalController
|
||||||
|
|
||||||
private $internal_event;
|
private $internal_event;
|
||||||
|
|
||||||
public function __construct(\PDO $bdd)
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
$bdd = descartes\Model::connect(DATABASE_HOST, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD);
|
||||||
|
|
||||||
$this->model_command = new \models\Command($bdd);
|
$this->model_command = new \models\Command($bdd);
|
||||||
$this->model_database = new \models\DataBase($bdd);
|
$this->model_database = new \models\DataBase($bdd);
|
||||||
$this->model_sended = new \models\Sended($bdd);
|
$this->model_sended = new \models\Sended($bdd);
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace controllers\publics;
|
||||||
{
|
{
|
||||||
$page = (int) $page;
|
$page = (int) $page;
|
||||||
$contacts = $this->internal_contact->list(25, $page);
|
$contacts = $this->internal_contact->list(25, $page);
|
||||||
$this->render('contact/list', ['contacts' => $contacts]);
|
return $this->render('contact/list', ['contacts' => $contacts]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,9 +70,7 @@ namespace controllers\publics;
|
||||||
$this->internal_contact->delete($id);
|
$this->internal_contact->delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->redirect(\descartes\Router::url('Contact', 'list'));
|
return $this->redirect(\descartes\Router::url('Contact', 'list'));
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
4
todo.txt
4
todo.txt
|
@ -2,8 +2,8 @@ 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)
|
||||||
y Command.php
|
y Command.php
|
||||||
y Connect.php
|
y Connect.php
|
||||||
p Console.php
|
y Console.php
|
||||||
Contact.php
|
y Contact.php
|
||||||
Dashboard.php
|
Dashboard.php
|
||||||
Discussion.php
|
Discussion.php
|
||||||
Event.php
|
Event.php
|
||||||
|
|
Loading…
Reference in New Issue