mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-15 11:56:25 +00:00
19 lines
470 B
PHP
19 lines
470 B
PHP
|
<?
|
||
|
authorize();
|
||
|
if (!check_perms('users_mod')) {
|
||
|
error(404);
|
||
|
}
|
||
|
|
||
|
$Class = $_POST['class'];
|
||
|
$Method = $_POST['method'];
|
||
|
$Params = json_decode($_POST['params'], true);
|
||
|
|
||
|
if (!empty($Class) && !empty($Method) && Testing::has_testable_method($Class, $Method)) {
|
||
|
if (count($Params)) {
|
||
|
$Results = call_user_func_array(array($Class, $Method), array_values($Params));
|
||
|
} else {
|
||
|
$Results = call_user_func(array($Class, $Method));
|
||
|
}
|
||
|
TestingView::render_results($Results);
|
||
|
}
|