mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-22 01:16:26 +02:00
update descartes
This commit is contained in:
parent
54e4f365e5
commit
4efccf4c2f
2 changed files with 7 additions and 4 deletions
|
@ -8,7 +8,7 @@
|
|||
/**
|
||||
* Cette fonction construit la classe, elle prend en paramètre obligatoire le type de méthode (PUT, GET, POST, etc) avec laquel on a appelée la page
|
||||
*/
|
||||
public function __construct() : void
|
||||
public function __construct()
|
||||
{
|
||||
//On va choisir le type à employer
|
||||
$method = $_SERVER['REQUEST_METHOD'];
|
||||
|
|
|
@ -198,11 +198,14 @@
|
|||
default :
|
||||
$prefix_method = 'get_';
|
||||
}
|
||||
|
||||
//If we dont match prefix with request method, return error
|
||||
if (mb_substr($method, 0, mb_strlen($prefix_method)) != $prefix_method)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$prefix_method = $prefix_method ?? '';
|
||||
|
||||
|
||||
$method = $prefix_method . $method;
|
||||
if (!method_exists($controller, $method))
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue